diff --git a/cmd/proc.go b/cmd/proc.go index e8bd738..635a64b 100644 --- a/cmd/proc.go +++ b/cmd/proc.go @@ -35,6 +35,7 @@ var procCmd = &cobra.Command{ config.GCONFIG.Log.LogLevel) logrus.SetLevel(config.GCONFIG.Log.LogLevel) + logrus.Info("image-proc version:", Version) godal.RegisterAll() @@ -61,6 +62,12 @@ var procCmd = &cobra.Command{ logrus.Fatal(err) } + // for i, img := range reg.MssImages { + // edge := producer.CV_Sobel(img) + // utils.SavePanToGDALGTiff(edge, 0, 0, "data/temp/out_"+strconv.Itoa(i)+".tif", 1.3) + // } + // return + os.MkdirAll(params.OutputDir, 0755) if doLUTRRC { diff --git a/cmd/test.go b/cmd/test.go index 6d3d56d..bd7d096 100644 --- a/cmd/test.go +++ b/cmd/test.go @@ -30,7 +30,7 @@ var testCmd = &cobra.Command{ mv := gocv.Split(*input0_mat) for i := 0; i < len(mv); i++ { - out := producer.FindEdges(mv[i]) + out := producer.CV_Sobel(mv[i]) utils.SavePanToGDALGTiff(out, 0, 0, "data/temp/out_"+strconv.Itoa(i)+".tif", 1.3) } }, diff --git a/cmd/version.go b/cmd/version.go index d756dc9..b54532a 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -25,9 +25,13 @@ var ( ShowVersion bool ) +const ( + Version = "v1.2.0-beta" +) + func version() string { v := fmt.Sprintf(` -Main Version: v1.2.0-beta +Main Version: %s --------------------------------------------------------- BUILT_ON_IP %s BUILT_ON_OS %s @@ -40,7 +44,7 @@ RUNTIME_VER %s OpenCV Version 4.9.0 GDAL Version 3.8.4 --------------------------------------------------------- - `, BuiltOnIP, BuiltOnOs, BuildDate, LatestCommit, Branch, CommitCnt, BuildNumber, RuntimeVer) + `, Version, BuiltOnIP, BuiltOnOs, BuildDate, LatestCommit, Branch, CommitCnt, BuildNumber, RuntimeVer) return v } diff --git a/go.mod b/go.mod index b1e66bc..544b7de 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/airbusgeo/godal v0.0.11 - github.com/duke-git/lancet/v2 v2.3.1 + github.com/duke-git/lancet/v2 v2.3.3 github.com/dustin/go-humanize v1.0.1 github.com/fsnotify/fsnotify v1.7.0 github.com/hebl/gofa v1.19.1 diff --git a/go.sum b/go.sum index 0884278..55a8b12 100644 --- a/go.sum +++ b/go.sum @@ -853,6 +853,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/duke-git/lancet/v2 v2.3.1 h1:cYZHQp57CZKP41EFkV/7TGbUrmhjaPMI5vi3Q+9KJNo= github.com/duke-git/lancet/v2 v2.3.1/go.mod h1:zGa2R4xswg6EG9I6WnyubDbFO/+A/RROxIbXcwryTsc= +github.com/duke-git/lancet/v2 v2.3.3 h1:OhqzNzkbJBS9ZlWLo/C7g+WSAOAAyNj7p9CAiEHurUc= +github.com/duke-git/lancet/v2 v2.3.3/go.mod h1:zGa2R4xswg6EG9I6WnyubDbFO/+A/RROxIbXcwryTsc= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= diff --git a/pkg/producer/edge_phase_correlation.go b/pkg/producer/edge_phase_correlation.go index 34e4c1a..b5cbcb2 100644 --- a/pkg/producer/edge_phase_correlation.go +++ b/pkg/producer/edge_phase_correlation.go @@ -12,7 +12,8 @@ import ( // by performing phase correlation on detected // edges instead of the raw image -func FindEdges(img0 gocv.Mat) gocv.Mat { +// SKIP: 多光谱各个波段的边缘检测结果不佳 +func CV_Canny(img0 gocv.Mat) gocv.Mat { fmt.Println(img0.Cols(), img0.Rows(), img0.Type().String()) dst8 := gocv.NewMatWithSize(img0.Rows(), img0.Cols(), gocv.MatTypeCV8U) defer dst8.Close() @@ -23,3 +24,20 @@ func FindEdges(img0 gocv.Mat) gocv.Mat { dstEdge.ConvertTo(&dstEdge, gocv.MatTypeCV16U) return dstEdge } + +func CV_Sobel(img0 gocv.Mat) gocv.Mat { + // x 方向 + sobelX := gocv.NewMat() + gocv.Sobel(img0, &sobelX, gocv.MatTypeCV32F, 1, 0, 5, 1.5, 0, gocv.BorderDefault) + sobelX.ConvertTo(&sobelX, gocv.MatTypeCV16U) + // y 方向 + sobelY := gocv.NewMat() + gocv.Sobel(img0, &sobelY, gocv.MatTypeCV32F, 0, 1, 5, 1.5, 0, gocv.BorderIsolated) + sobelY.ConvertTo(&sobelY, gocv.MatTypeCV16U) + // 合并 + sobelXY := gocv.NewMat() + gocv.Sobel(img0, &sobelXY, gocv.MatTypeCV32F, 1, 1, 5, 1.5, 0, gocv.BorderDefault) + sobelXY.ConvertTo(&sobelXY, gocv.MatTypeCV16U) + + return sobelY +} diff --git a/pkg/producer/image_registration.go b/pkg/producer/image_registration.go index 7bfefe2..9eeed2f 100644 --- a/pkg/producer/image_registration.go +++ b/pkg/producer/image_registration.go @@ -171,25 +171,41 @@ func (r *Registrator) CalcDownPhaseCorrelation() error { blockWidth := r.MssWidth / BlockNW // 在 MSS 4 个波段上进行配准 - err := r.doMSSPhaseCorrelation(r.MssImages[0], + err := r.doPhaseCorrelation(r.MssImages[0], []gocv.Mat{r.MssImages[0], r.MssImages[1], r.MssImages[2], r.MssImages[3]}, r.MssHeight, r.MssWidth, blockHeight, blockWidth) if err != nil { return err } - r.DoMSSCoRegistration() + r.fileterPhaseShift([]float64{64, 64, 64, 64}, true) + r.calcMSSDeltaCoeffs(4) + r.DoMSSCoRegistration(false) + + // 边缘检测后再做一次配准 + + // var mssEdges []gocv.Mat + // for band := 0; band < len(r.registeredMssImages); band++ { + // edge := CV_Sobel(r.registeredMssImages[band]) + // mssEdges = append(mssEdges, edge) + // } + // r.doPhaseCorrelation(mssEdges[0], mssEdges, + // r.MssHeight, r.MssWidth, blockHeight, blockWidth) + // r.fileterPhaseShift([]float64{5, 5, 5, 5}, false) + // r.calcMSSDeltaCoeffs(4) + // r.DoMSSCoRegistration(true) // 基于 PAN 图像进行配准 - r.phaseShifts[0] = make([]PhaseShiftM, 0) - r.deltaXCoeffs[0] = make([]float64, 0) - r.deltaYCoeffs[0] = make([]float64, 0) - err = r.doMSSPhaseCorrelation(downsampledPanImage, + err = r.doPhaseCorrelation(downsampledPanImage, []gocv.Mat{r.registeredMssImages[0]}, r.MssHeight, r.MssWidth, blockHeight, blockWidth) if err != nil { return err } - return r.DoPANCoRegistration() + r.fileterPhaseShift([]float64{30.0}, true) + r.calcMSSDeltaCoeffs(1) + r.DoPANCoRegistration() + + return nil } // 将MSS升采样采样后计算相位相关的偏移量 @@ -203,13 +219,13 @@ func (r *Registrator) CalcUpPhaseCorrelation() error { } // 在 MSS 4 个波段上进行配准 - err := r.doMSSPhaseCorrelation(r.MssImages[0], + err := r.doPhaseCorrelation(r.MssImages[0], []gocv.Mat{r.MssImages[0], r.MssImages[1], r.MssImages[2], r.MssImages[3]}, r.MssHeight, r.MssWidth, r.MssHeight/BlockNH, r.MssWidth/BlockNW) if err != nil { return err } - r.DoMSSCoRegistration() + r.DoMSSCoRegistration(false) upsampledMssImages := make([]gocv.Mat, MssBands) for i := 0; i < MssBands; i++ { @@ -227,13 +243,13 @@ func (r *Registrator) CalcUpPhaseCorrelation() error { log.Infof("blockHeight=%d, blockWidth=%d", blockHeight, blockWidth) // 基于 PAN 图像进行配准 - err = r.doMSSPhaseCorrelation(r.PanImage, + r.doPhaseCorrelation(r.PanImage, []gocv.Mat{upsampledMssImages[0]}, r.MssHeight, r.MssWidth, blockHeight, blockWidth) - return err + return r.DoPANCoRegistration() } -func (r *Registrator) doMSSPhaseCorrelation(base gocv.Mat, +func (r *Registrator) doPhaseCorrelation(base gocv.Mat, mssImages []gocv.Mat, height, width, blockHeight, blockWidth int) error { @@ -241,6 +257,8 @@ func (r *Registrator) doMSSPhaseCorrelation(base gocv.Mat, for band := 0; band < len(mssImages); band++ { r.phaseShifts[band] = make([]PhaseShiftM, 0) + r.deltaXCoeffs[band] = make([]float64, 0) + r.deltaYCoeffs[band] = make([]float64, 0) } for bh := 0; bh < BlockNH; bh++ { @@ -306,7 +324,7 @@ func (r *Registrator) doMSSPhaseCorrelation(base gocv.Mat, } } - return r.calcMSSDeltaCoeffs(len(mssImages)) + return nil } func (r *Registrator) Clean() { @@ -335,9 +353,9 @@ func (r *Registrator) calcMSSDeltaCoeffs(bands int) error { } // 经验值过滤 - if shift.dy < 64.0 { - continue - } + // if shift.dy < 64.0 { + // continue + // } effectShift++ cx = append(cx, float64(shift.Block.coord.X+shift.Block.width/2)) // MSS 块在X方向没有分块 @@ -355,12 +373,12 @@ func (r *Registrator) calcMSSDeltaCoeffs(bands int) error { var err error if r.deltaXCoeffs[i], err = PolynomialFit(cx, dx, 1); err != nil { log.Error("Error fitting deltaX coeffs: ", err) - return err + continue } if r.deltaYCoeffs[i], err = PolynomialFit(cx, dy, 2); err != nil { log.Error("Error fitting deltaY coeffs: ", err) - return err + continue } } } @@ -379,11 +397,13 @@ func (r *Registrator) calcMSSDeltaCoeffs(bands int) error { return nil } -func (r *Registrator) DoMSSCoRegistration() error { +func (r *Registrator) DoMSSCoRegistration(byEdge bool) error { for band := 0; band < MssBands; band++ { if len(r.deltaXCoeffs[band]) < 2 || len(r.deltaYCoeffs[band]) < 3 { - log.Errorf("delta coefficients not calculated, skip co-registration %d", band) - r.registeredMssImages[band] = r.MssImages[band].Clone() + log.Errorf("delta coefficients not calculated, skip co-registration %d", band+1) + if !byEdge { + r.registeredMssImages[band] = r.MssImages[band].Clone() + } continue } @@ -408,13 +428,22 @@ func (r *Registrator) DoMSSCoRegistration() error { } log.Println("co-registration for band", band+1) - r.registeredMssImages[band] = gocv.NewMatWithSize(r.MssHeight, r.MssWidth, gocv.MatTypeCV16UC1) - gocv.Remap(r.MssImages[band], - &r.registeredMssImages[band], - &mapX, &mapY, - gocv.InterpolationCubic, - gocv.BorderConstant, - color.RGBA{0, 0, 0, 0}) + if !byEdge { + r.registeredMssImages[band] = gocv.NewMatWithSize(r.MssHeight, r.MssWidth, gocv.MatTypeCV16UC1) + gocv.Remap(r.MssImages[band], + &r.registeredMssImages[band], + &mapX, &mapY, + gocv.InterpolationCubic, + gocv.BorderConstant, + color.RGBA{0, 0, 0, 0}) + } else { + gocv.Remap(r.registeredMssImages[band], + &r.registeredMssImages[band], + &mapX, &mapY, + gocv.InterpolationCubic, + gocv.BorderConstant, + color.RGBA{0, 0, 0, 0}) + } mapX.Close() mapY.Close() @@ -458,7 +487,6 @@ func (r *Registrator) DoPANCoRegistration() error { log.Println("co-registration for MSS (Align with PAN)") for i := 0; i < MssBands; i++ { - log.Infof("r.registeredMssImages[%d]: %v", i, r.registeredMssImages[i].Size()) registeredMSS := gocv.NewMatWithSize(r.MssHeight, r.MssWidth, gocv.MatTypeCV16UC1) gocv.Remap(r.registeredMssImages[i], ®isteredMSS, diff --git a/pkg/producer/phase_correlation.go b/pkg/producer/phase_correlation.go index 9e96514..9ffb3fe 100644 --- a/pkg/producer/phase_correlation.go +++ b/pkg/producer/phase_correlation.go @@ -1,8 +1,10 @@ package producer import ( + "errors" "image" + "github.com/duke-git/lancet/v2/slice" log "github.com/sirupsen/logrus" "gocv.io/x/gocv" ) @@ -40,3 +42,25 @@ func (r *Registrator) calculateBlockPhaseShift(panBlock, mssBlock gocv.Mat) (goc return shift, response } + +func (r *Registrator) fileterPhaseShift(thredholds []float64, greaterThan bool) error { + if len(thredholds) > 4 { + return errors.New("thredholds length should be less than 4") + } + + for i := 0; i < len(thredholds); i++ { + th := thredholds[i] + r.phaseShifts[i] = slice.Filter(r.phaseShifts[i], func(i int, value PhaseShiftM) bool { + if value.response > 0.999999 { + return false + } + + if greaterThan { + return value.dy > float32(th) + } + return value.dy < float32(th) + }) + } + + return nil +} diff --git a/vendor/git.sr.ht/~sbinet/gg/LICENSE.md b/vendor/git.sr.ht/~sbinet/gg/LICENSE.md deleted file mode 100644 index e88b88a..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (C) 2022 The gg Authors -Copyright (C) 2016 Michael Fogleman - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/git.sr.ht/~sbinet/gg/README.md b/vendor/git.sr.ht/~sbinet/gg/README.md deleted file mode 100644 index e37790d..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/README.md +++ /dev/null @@ -1,239 +0,0 @@ -# Go Graphics - -[![Build status](https://builds.sr.ht/~sbinet/gg.svg)](https://builds.sr.ht/~sbinet/gg?) -[![GoDoc](https://pkg.go.dev/badge/git.sr.ht/~sbinet/gg)](https://pkg.go.dev/git.sr.ht/~sbinet/gg) -[![godocs.io](https://godocs.io/git.sr.ht/~sbinet/gg?status.svg)](https://godocs.io/git.sr.ht/~sbinet/gg) - -`gg` is a library for rendering 2D graphics in pure Go. - -`git.sr.ht/~sbinet/gg` is a fork of [fogleman/gg](https://github.com/fogleman/gg) which doesn't seem to be maintained (as of January 2022). - -![Stars](https://git.sr.ht/~sbinet/gg/blob/main/examples/testdata/stars_golden.png) - -## Installation - - go get -u git.sr.ht/~sbinet/gg - -## Documentation - -- godoc: https://godoc.org/git.sr.ht/~sbinet/gg -- pkg.go.dev: https://pkg.go.dev/git.sr.ht/~sbinet/gg?tab=doc - -## Hello, Circle! - -Look how easy! - -[embedmd]:# (examples/circle_example_test.go go /func ExampleCircle/ /\n}/) -```go -func ExampleCircle() { - dc := gg.NewContext(1000, 1000) - dc.DrawCircle(500, 500, 400) - dc.SetRGB(0, 0, 0) - dc.Fill() - - err := dc.SavePNG("testdata/circle.png") - if err != nil { - log.Fatalf("could not save to file: %+v", err) - } - - // Output: -} -``` - -## Examples - -There are [lots of examples](https://git.sr.ht/~sbinet/gg/tree/main/examples) included. They're mostly for testing the code, but they're good for learning, too. - -![Examples](http://i.imgur.com/tMFoyzu.png) - -## Creating Contexts - -There are a few ways of creating a context. - -```go -NewContext(width, height int) *Context -NewContextForImage(im image.Image) *Context -NewContextForRGBA(im *image.RGBA) *Context -``` - -## Drawing Functions - -Ever used a graphics library that didn't have functions for drawing rectangles -or circles? What a pain! - -```go -DrawPoint(x, y, r float64) -DrawLine(x1, y1, x2, y2 float64) -DrawRectangle(x, y, w, h float64) -DrawRoundedRectangle(x, y, w, h, r float64) -DrawCircle(x, y, r float64) -DrawArc(x, y, r, angle1, angle2 float64) -DrawEllipse(x, y, rx, ry float64) -DrawEllipticalArc(x, y, rx, ry, angle1, angle2 float64) -DrawRegularPolygon(n int, x, y, r, rotation float64) -DrawImage(im image.Image, x, y int) -DrawImageAnchored(im image.Image, x, y int, ax, ay float64) -SetPixel(x, y int) - -MoveTo(x, y float64) -LineTo(x, y float64) -QuadraticTo(x1, y1, x2, y2 float64) -CubicTo(x1, y1, x2, y2, x3, y3 float64) -ClosePath() -ClearPath() -NewSubPath() - -Clear() -Stroke() -Fill() -StrokePreserve() -FillPreserve() -``` - -It is often desired to center an image at a point. Use `DrawImageAnchored` with `ax` and `ay` set to 0.5 to do this. Use 0 to left or top align. Use 1 to right or bottom align. `DrawStringAnchored` does the same for text, so you don't need to call `MeasureString` yourself. - -## Text Functions - -It will even do word wrap for you! - -```go -DrawString(s string, x, y float64) -DrawStringAnchored(s string, x, y, ax, ay float64) -DrawStringWrapped(s string, x, y, ax, ay, width, lineSpacing float64, align Align) -MeasureString(s string) (w, h float64) -MeasureMultilineString(s string, lineSpacing float64) (w, h float64) -WordWrap(s string, w float64) []string -SetFontFace(fontFace font.Face) -LoadFontFace(path string, points float64) error -LoadFontFaceFromBytes(raw []byte, points float64) error -LoadFontFaceFromFS(fsys fs.FS, path string, points float64) error -``` - -## Color Functions - -Colors can be set in several different ways for your convenience. - -```go -SetRGB(r, g, b float64) -SetRGBA(r, g, b, a float64) -SetRGB255(r, g, b int) -SetRGBA255(r, g, b, a int) -SetColor(c color.Color) -SetHexColor(x string) -``` - -## Stroke & Fill Options - -```go -SetLineWidth(lineWidth float64) -SetLineCap(lineCap LineCap) -SetLineJoin(lineJoin LineJoin) -SetDash(dashes ...float64) -SetDashOffset(offset float64) -SetFillRule(fillRule FillRule) -``` - -## Gradients & Patterns - -`gg` supports linear, radial and conic gradients and surface patterns. You can also implement your own patterns. - -```go -SetFillStyle(pattern Pattern) -SetStrokeStyle(pattern Pattern) -NewSolidPattern(color color.Color) -NewLinearGradient(x0, y0, x1, y1 float64) -NewRadialGradient(x0, y0, r0, x1, y1, r1 float64) -NewConicGradient(cx, cy, deg float64) -NewSurfacePattern(im image.Image, op RepeatOp) -``` - -## Transformation Functions - -```go -Identity() -Translate(x, y float64) -Scale(x, y float64) -Rotate(angle float64) -Shear(x, y float64) -ScaleAbout(sx, sy, x, y float64) -RotateAbout(angle, x, y float64) -ShearAbout(sx, sy, x, y float64) -TransformPoint(x, y float64) (tx, ty float64) -InvertY() -``` - -It is often desired to rotate or scale about a point that is not the origin. The functions `RotateAbout`, `ScaleAbout`, `ShearAbout` are provided as a convenience. - -`InvertY` is provided in case Y should increase from bottom to top vs. the default top to bottom. - -## Stack Functions - -Save and restore the state of the context. These can be nested. - -```go -Push() -Pop() -``` - -## Clipping Functions - -Use clipping regions to restrict drawing operations to an area that you -defined using paths. - -```go -Clip() -ClipPreserve() -ResetClip() -AsMask() *image.Alpha -SetMask(mask *image.Alpha) -InvertMask() -``` - -## Helper Functions - -Sometimes you just don't want to write these yourself. - -```go -Radians(degrees float64) float64 -Degrees(radians float64) float64 -LoadImage(path string) (image.Image, error) -LoadPNG(path string) (image.Image, error) -SavePNG(path string, im image.Image) error -``` - -![Separator](https://git.sr.ht/~sbinet/gg/blob/main/examples/testdata/sine_golden.png) - -## Another Example - -See the output of this example below. - -[embedmd]:# (examples/ellipse_example_test.go go /func ExampleEllipse/ /\n}/) -```go -func ExampleEllipse() { - const S = 1024 - dc := gg.NewContext(S, S) - dc.SetRGBA(0, 0, 0, 0.1) - for i := 0; i < 360; i += 15 { - dc.Push() - dc.RotateAbout(gg.Radians(float64(i)), S/2, S/2) - dc.DrawEllipse(S/2, S/2, S*7/16, S/8) - dc.Fill() - dc.Pop() - } - - im, err := gg.LoadImage("testdata/gopher.png") - if err != nil { - panic(err) - } - dc.DrawImageAnchored(im, S/2, S/2, 0.5, 0.5) - - err = dc.SavePNG("testdata/ellipse.png") - if err != nil { - log.Fatalf("could not save to file: %+v", err) - } - - // Output: -} -``` - -![Ellipses](https://git.sr.ht/~sbinet/gg/blob/main/examples/testdata/ellipse_golden.png) diff --git a/vendor/git.sr.ht/~sbinet/gg/bezier.go b/vendor/git.sr.ht/~sbinet/gg/bezier.go deleted file mode 100644 index 782b1c4..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/bezier.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright ©2022 The gg Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package gg - -import "math" - -func quadratic(x0, y0, x1, y1, x2, y2, t float64) (x, y float64) { - u := 1 - t - a := u * u - b := 2 * u * t - c := t * t - x = a*x0 + b*x1 + c*x2 - y = a*y0 + b*y1 + c*y2 - return -} - -func QuadraticBezier(x0, y0, x1, y1, x2, y2 float64) []Point { - l := (math.Hypot(x1-x0, y1-y0) + - math.Hypot(x2-x1, y2-y1)) - n := int(l + 0.5) - if n < 4 { - n = 4 - } - d := float64(n) - 1 - result := make([]Point, n) - for i := 0; i < n; i++ { - t := float64(i) / d - x, y := quadratic(x0, y0, x1, y1, x2, y2, t) - result[i] = Point{x, y} - } - return result -} - -func cubic(x0, y0, x1, y1, x2, y2, x3, y3, t float64) (x, y float64) { - u := 1 - t - a := u * u * u - b := 3 * u * u * t - c := 3 * u * t * t - d := t * t * t - x = a*x0 + b*x1 + c*x2 + d*x3 - y = a*y0 + b*y1 + c*y2 + d*y3 - return -} - -func CubicBezier(x0, y0, x1, y1, x2, y2, x3, y3 float64) []Point { - l := (math.Hypot(x1-x0, y1-y0) + - math.Hypot(x2-x1, y2-y1) + - math.Hypot(x3-x2, y3-y2)) - n := int(l + 0.5) - if n < 4 { - n = 4 - } - d := float64(n) - 1 - result := make([]Point, n) - for i := 0; i < n; i++ { - t := float64(i) / d - x, y := cubic(x0, y0, x1, y1, x2, y2, x3, y3, t) - result[i] = Point{x, y} - } - return result -} diff --git a/vendor/git.sr.ht/~sbinet/gg/context.go b/vendor/git.sr.ht/~sbinet/gg/context.go deleted file mode 100644 index f660a82..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/context.go +++ /dev/null @@ -1,964 +0,0 @@ -// Copyright ©2022 The gg Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package gg - -import ( - "errors" - "image" - "image/color" - "image/jpeg" - "image/png" - "io" - "io/fs" - "math" - "strings" - - "github.com/golang/freetype/raster" - "golang.org/x/image/draw" - "golang.org/x/image/font" - "golang.org/x/image/font/basicfont" - "golang.org/x/image/math/f64" -) - -type LineCap int - -const ( - LineCapRound LineCap = iota - LineCapButt - LineCapSquare -) - -type LineJoin int - -const ( - LineJoinRound LineJoin = iota - LineJoinBevel -) - -type FillRule int - -const ( - FillRuleWinding FillRule = iota - FillRuleEvenOdd -) - -type Align int - -const ( - AlignLeft Align = iota - AlignCenter - AlignRight -) - -var ( - defaultFillStyle = NewSolidPattern(color.White) - defaultStrokeStyle = NewSolidPattern(color.Black) -) - -type Context struct { - width int - height int - rasterizer *raster.Rasterizer - im *image.RGBA - mask *image.Alpha - color color.Color - fillPattern Pattern - strokePattern Pattern - strokePath raster.Path - fillPath raster.Path - start Point - current Point - hasCurrent bool - dashes []float64 - dashOffset float64 - lineWidth float64 - lineCap LineCap - lineJoin LineJoin - fillRule FillRule - fontFace font.Face - fontHeight float64 - matrix Matrix - stack []*Context - interp draw.Interpolator -} - -// NewContext creates a new image.RGBA with the specified width and height -// and prepares a context for rendering onto that image. -func NewContext(width, height int) *Context { - return NewContextForRGBA(image.NewRGBA(image.Rect(0, 0, width, height))) -} - -// NewContextForImage copies the specified image into a new image.RGBA -// and prepares a context for rendering onto that image. -func NewContextForImage(im image.Image) *Context { - return NewContextForRGBA(imageToRGBA(im)) -} - -// NewContextForRGBA prepares a context for rendering onto the specified image. -// No copy is made. -func NewContextForRGBA(im *image.RGBA) *Context { - w := im.Bounds().Size().X - h := im.Bounds().Size().Y - return &Context{ - width: w, - height: h, - rasterizer: raster.NewRasterizer(w, h), - im: im, - color: color.Transparent, - fillPattern: defaultFillStyle, - strokePattern: defaultStrokeStyle, - lineWidth: 1, - fillRule: FillRuleWinding, - fontFace: basicfont.Face7x13, - fontHeight: 13, - matrix: Identity(), - interp: draw.BiLinear, - } -} - -// GetCurrentPoint will return the current point and if there is a current point. -// The point will have been transformed by the context's transformation matrix. -func (dc *Context) GetCurrentPoint() (Point, bool) { - if dc.hasCurrent { - return dc.current, true - } - return Point{}, false -} - -// Image returns the image that has been drawn by this context. -func (dc *Context) Image() image.Image { - return dc.im -} - -// Width returns the width of the image in pixels. -func (dc *Context) Width() int { - return dc.width -} - -// Height returns the height of the image in pixels. -func (dc *Context) Height() int { - return dc.height -} - -// SavePNG encodes the image as a PNG and writes it to disk. -func (dc *Context) SavePNG(path string) error { - return SavePNG(path, dc.im) -} - -// SaveJPG encodes the image as a JPG and writes it to disk. -func (dc *Context) SaveJPG(path string, quality int) error { - return SaveJPG(path, dc.im, quality) -} - -// EncodePNG encodes the image as a PNG and writes it to the provided io.Writer. -func (dc *Context) EncodePNG(w io.Writer) error { - return png.Encode(w, dc.im) -} - -// EncodeJPG encodes the image as a JPG and writes it to the provided io.Writer -// in JPEG 4:2:0 baseline format with the given options. -// Default parameters are used if a nil *jpeg.Options is passed. -func (dc *Context) EncodeJPG(w io.Writer, o *jpeg.Options) error { - return jpeg.Encode(w, dc.im, o) -} - -// SetDash sets the current dash pattern to use. Call with zero arguments to -// disable dashes. The values specify the lengths of each dash, with -// alternating on and off lengths. -func (dc *Context) SetDash(dashes ...float64) { - dc.dashes = dashes -} - -// SetDashOffset sets the initial offset into the dash pattern to use when -// stroking dashed paths. -func (dc *Context) SetDashOffset(offset float64) { - dc.dashOffset = offset -} - -func (dc *Context) SetLineWidth(lineWidth float64) { - dc.lineWidth = lineWidth -} - -func (dc *Context) SetLineCap(lineCap LineCap) { - dc.lineCap = lineCap -} - -func (dc *Context) SetLineCapRound() { - dc.lineCap = LineCapRound -} - -func (dc *Context) SetLineCapButt() { - dc.lineCap = LineCapButt -} - -func (dc *Context) SetLineCapSquare() { - dc.lineCap = LineCapSquare -} - -func (dc *Context) SetLineJoin(lineJoin LineJoin) { - dc.lineJoin = lineJoin -} - -func (dc *Context) SetLineJoinRound() { - dc.lineJoin = LineJoinRound -} - -func (dc *Context) SetLineJoinBevel() { - dc.lineJoin = LineJoinBevel -} - -func (dc *Context) SetFillRule(fillRule FillRule) { - dc.fillRule = fillRule -} - -func (dc *Context) SetFillRuleWinding() { - dc.fillRule = FillRuleWinding -} - -func (dc *Context) SetFillRuleEvenOdd() { - dc.fillRule = FillRuleEvenOdd -} - -// Color Setters - -func (dc *Context) setFillAndStrokeColor(c color.Color) { - dc.color = c - dc.fillPattern = NewSolidPattern(c) - dc.strokePattern = NewSolidPattern(c) -} - -// SetFillStyle sets current fill style -func (dc *Context) SetFillStyle(pattern Pattern) { - // if pattern is SolidPattern, also change dc.color(for dc.Clear, dc.drawString) - if fillStyle, ok := pattern.(*solidPattern); ok { - dc.color = fillStyle.color - } - dc.fillPattern = pattern -} - -// SetStrokeStyle sets current stroke style -func (dc *Context) SetStrokeStyle(pattern Pattern) { - dc.strokePattern = pattern -} - -// SetColor sets the current color(for both fill and stroke). -func (dc *Context) SetColor(c color.Color) { - dc.setFillAndStrokeColor(c) -} - -// SetHexColor sets the current color using a hex string. The leading pound -// sign (#) is optional. Both 3- and 6-digit variations are supported. 8 digits -// may be provided to set the alpha value as well. -func (dc *Context) SetHexColor(x string) { - r, g, b, a := parseHexColor(x) - dc.SetRGBA255(r, g, b, a) -} - -// SetRGBA255 sets the current color. r, g, b, a values should be between 0 and -// 255, inclusive. -func (dc *Context) SetRGBA255(r, g, b, a int) { - dc.color = color.NRGBA{uint8(r), uint8(g), uint8(b), uint8(a)} - dc.setFillAndStrokeColor(dc.color) -} - -// SetRGB255 sets the current color. r, g, b values should be between 0 and 255, -// inclusive. Alpha will be set to 255 (fully opaque). -func (dc *Context) SetRGB255(r, g, b int) { - dc.SetRGBA255(r, g, b, 255) -} - -// SetRGBA sets the current color. r, g, b, a values should be between 0 and 1, -// inclusive. -func (dc *Context) SetRGBA(r, g, b, a float64) { - dc.color = color.NRGBA{ - uint8(r * 255), - uint8(g * 255), - uint8(b * 255), - uint8(a * 255), - } - dc.setFillAndStrokeColor(dc.color) -} - -// SetRGB sets the current color. r, g, b values should be between 0 and 1, -// inclusive. Alpha will be set to 1 (fully opaque). -func (dc *Context) SetRGB(r, g, b float64) { - dc.SetRGBA(r, g, b, 1) -} - -// Path Manipulation - -// MoveTo starts a new subpath within the current path starting at the -// specified point. -func (dc *Context) MoveTo(x, y float64) { - if dc.hasCurrent { - dc.fillPath.Add1(dc.start.Fixed()) - } - x, y = dc.TransformPoint(x, y) - p := Point{x, y} - dc.strokePath.Start(p.Fixed()) - dc.fillPath.Start(p.Fixed()) - dc.start = p - dc.current = p - dc.hasCurrent = true -} - -// LineTo adds a line segment to the current path starting at the current -// point. If there is no current point, it is equivalent to MoveTo(x, y) -func (dc *Context) LineTo(x, y float64) { - if !dc.hasCurrent { - dc.MoveTo(x, y) - } else { - x, y = dc.TransformPoint(x, y) - p := Point{x, y} - dc.strokePath.Add1(p.Fixed()) - dc.fillPath.Add1(p.Fixed()) - dc.current = p - } -} - -// QuadraticTo adds a quadratic bezier curve to the current path starting at -// the current point. If there is no current point, it first performs -// MoveTo(x1, y1) -func (dc *Context) QuadraticTo(x1, y1, x2, y2 float64) { - if !dc.hasCurrent { - dc.MoveTo(x1, y1) - } - x1, y1 = dc.TransformPoint(x1, y1) - x2, y2 = dc.TransformPoint(x2, y2) - p1 := Point{x1, y1} - p2 := Point{x2, y2} - dc.strokePath.Add2(p1.Fixed(), p2.Fixed()) - dc.fillPath.Add2(p1.Fixed(), p2.Fixed()) - dc.current = p2 -} - -// CubicTo adds a cubic bezier curve to the current path starting at the -// current point. If there is no current point, it first performs -// MoveTo(x1, y1). Because freetype/raster does not support cubic beziers, -// this is emulated with many small line segments. -func (dc *Context) CubicTo(x1, y1, x2, y2, x3, y3 float64) { - if !dc.hasCurrent { - dc.MoveTo(x1, y1) - } - x0, y0 := dc.current.X, dc.current.Y - x1, y1 = dc.TransformPoint(x1, y1) - x2, y2 = dc.TransformPoint(x2, y2) - x3, y3 = dc.TransformPoint(x3, y3) - points := CubicBezier(x0, y0, x1, y1, x2, y2, x3, y3) - previous := dc.current.Fixed() - for _, p := range points[1:] { - f := p.Fixed() - if f == previous { - // TODO: this fixes some rendering issues but not all - continue - } - previous = f - dc.strokePath.Add1(f) - dc.fillPath.Add1(f) - dc.current = p - } -} - -// ClosePath adds a line segment from the current point to the beginning -// of the current subpath. If there is no current point, this is a no-op. -func (dc *Context) ClosePath() { - if dc.hasCurrent { - dc.strokePath.Add1(dc.start.Fixed()) - dc.fillPath.Add1(dc.start.Fixed()) - dc.current = dc.start - } -} - -// ClearPath clears the current path. There is no current point after this -// operation. -func (dc *Context) ClearPath() { - dc.strokePath.Clear() - dc.fillPath.Clear() - dc.hasCurrent = false -} - -// NewSubPath starts a new subpath within the current path. There is no current -// point after this operation. -func (dc *Context) NewSubPath() { - if dc.hasCurrent { - dc.fillPath.Add1(dc.start.Fixed()) - } - dc.hasCurrent = false -} - -// Path Drawing - -func (dc *Context) capper() raster.Capper { - switch dc.lineCap { - case LineCapButt: - return raster.ButtCapper - case LineCapRound: - return raster.RoundCapper - case LineCapSquare: - return raster.SquareCapper - } - return nil -} - -func (dc *Context) joiner() raster.Joiner { - switch dc.lineJoin { - case LineJoinBevel: - return raster.BevelJoiner - case LineJoinRound: - return raster.RoundJoiner - } - return nil -} - -func (dc *Context) stroke(painter raster.Painter) { - path := dc.strokePath - if len(dc.dashes) > 0 { - path = dashed(path, dc.dashes, dc.dashOffset) - } else { - // TODO: this is a temporary workaround to remove tiny segments - // that result in rendering issues - path = rasterPath(flattenPath(path)) - } - r := dc.rasterizer - r.UseNonZeroWinding = true - r.Clear() - r.AddStroke(path, fix(dc.lineWidth), dc.capper(), dc.joiner()) - r.Rasterize(painter) -} - -func (dc *Context) fill(painter raster.Painter) { - path := dc.fillPath - if dc.hasCurrent { - path = make(raster.Path, len(dc.fillPath)) - copy(path, dc.fillPath) - path.Add1(dc.start.Fixed()) - } - r := dc.rasterizer - r.UseNonZeroWinding = dc.fillRule == FillRuleWinding - r.Clear() - r.AddPath(path) - r.Rasterize(painter) -} - -// StrokePreserve strokes the current path with the current color, line width, -// line cap, line join and dash settings. The path is preserved after this -// operation. -func (dc *Context) StrokePreserve() { - var painter raster.Painter - if dc.mask == nil { - if pattern, ok := dc.strokePattern.(*solidPattern); ok { - // with a nil mask and a solid color pattern, we can be more efficient - // TODO: refactor so we don't have to do this type assertion stuff? - p := raster.NewRGBAPainter(dc.im) - p.SetColor(pattern.color) - painter = p - } - } - if painter == nil { - painter = newPatternPainter(dc.im, dc.mask, dc.strokePattern) - } - dc.stroke(painter) -} - -// Stroke strokes the current path with the current color, line width, -// line cap, line join and dash settings. The path is cleared after this -// operation. -func (dc *Context) Stroke() { - dc.StrokePreserve() - dc.ClearPath() -} - -// FillPreserve fills the current path with the current color. Open subpaths -// are implicitly closed. The path is preserved after this operation. -func (dc *Context) FillPreserve() { - var painter raster.Painter - if dc.mask == nil { - if pattern, ok := dc.fillPattern.(*solidPattern); ok { - // with a nil mask and a solid color pattern, we can be more efficient - // TODO: refactor so we don't have to do this type assertion stuff? - p := raster.NewRGBAPainter(dc.im) - p.SetColor(pattern.color) - painter = p - } - } - if painter == nil { - painter = newPatternPainter(dc.im, dc.mask, dc.fillPattern) - } - dc.fill(painter) -} - -// Fill fills the current path with the current color. Open subpaths -// are implicitly closed. The path is cleared after this operation. -func (dc *Context) Fill() { - dc.FillPreserve() - dc.ClearPath() -} - -// ClipPreserve updates the clipping region by intersecting the current -// clipping region with the current path as it would be filled by dc.Fill(). -// The path is preserved after this operation. -func (dc *Context) ClipPreserve() { - clip := image.NewAlpha(image.Rect(0, 0, dc.width, dc.height)) - painter := raster.NewAlphaOverPainter(clip) - dc.fill(painter) - if dc.mask == nil { - dc.mask = clip - } else { - mask := image.NewAlpha(image.Rect(0, 0, dc.width, dc.height)) - draw.DrawMask(mask, mask.Bounds(), clip, image.Point{}, dc.mask, image.Point{}, draw.Over) - dc.mask = mask - } -} - -// SetMask allows you to directly set the *image.Alpha to be used as a clipping -// mask. It must be the same size as the context, else an error is returned -// and the mask is unchanged. -func (dc *Context) SetMask(mask *image.Alpha) error { - if mask.Bounds().Size() != dc.im.Bounds().Size() { - return errors.New("mask size must match context size") - } - dc.mask = mask - return nil -} - -// AsMask returns an *image.Alpha representing the alpha channel of this -// context. This can be useful for advanced clipping operations where you first -// render the mask geometry and then use it as a mask. -func (dc *Context) AsMask() *image.Alpha { - mask := image.NewAlpha(dc.im.Bounds()) - draw.Draw(mask, dc.im.Bounds(), dc.im, image.Point{}, draw.Src) - return mask -} - -// InvertMask inverts the alpha values in the current clipping mask such that -// a fully transparent region becomes fully opaque and vice versa. -func (dc *Context) InvertMask() { - if dc.mask == nil { - dc.mask = image.NewAlpha(dc.im.Bounds()) - } else { - for i, a := range dc.mask.Pix { - dc.mask.Pix[i] = 255 - a - } - } -} - -// Clip updates the clipping region by intersecting the current -// clipping region with the current path as it would be filled by dc.Fill(). -// The path is cleared after this operation. -func (dc *Context) Clip() { - dc.ClipPreserve() - dc.ClearPath() -} - -// ResetClip clears the clipping region. -func (dc *Context) ResetClip() { - dc.mask = nil -} - -// Convenient Drawing Functions - -// Clear fills the entire image with the current color. -func (dc *Context) Clear() { - src := image.NewUniform(dc.color) - draw.Draw(dc.im, dc.im.Bounds(), src, image.Point{}, draw.Src) -} - -// SetPixel sets the color of the specified pixel using the current color. -func (dc *Context) SetPixel(x, y int) { - dc.im.Set(x, y, dc.color) -} - -// DrawPoint is like DrawCircle but ensures that a circle of the specified -// size is drawn regardless of the current transformation matrix. The position -// is still transformed, but not the shape of the point. -func (dc *Context) DrawPoint(x, y, r float64) { - dc.Push() - tx, ty := dc.TransformPoint(x, y) - dc.Identity() - dc.DrawCircle(tx, ty, r) - dc.Pop() -} - -func (dc *Context) DrawLine(x1, y1, x2, y2 float64) { - dc.MoveTo(x1, y1) - dc.LineTo(x2, y2) -} - -func (dc *Context) DrawRectangle(x, y, w, h float64) { - dc.NewSubPath() - dc.MoveTo(x, y) - dc.LineTo(x+w, y) - dc.LineTo(x+w, y+h) - dc.LineTo(x, y+h) - dc.ClosePath() -} - -func (dc *Context) DrawRoundedRectangle(x, y, w, h, r float64) { - x0, x1, x2, x3 := x, x+r, x+w-r, x+w - y0, y1, y2, y3 := y, y+r, y+h-r, y+h - dc.NewSubPath() - dc.MoveTo(x1, y0) - dc.LineTo(x2, y0) - dc.DrawArc(x2, y1, r, Radians(270), Radians(360)) - dc.LineTo(x3, y2) - dc.DrawArc(x2, y2, r, Radians(0), Radians(90)) - dc.LineTo(x1, y3) - dc.DrawArc(x1, y2, r, Radians(90), Radians(180)) - dc.LineTo(x0, y1) - dc.DrawArc(x1, y1, r, Radians(180), Radians(270)) - dc.ClosePath() -} - -func (dc *Context) DrawEllipticalArc(x, y, rx, ry, angle1, angle2 float64) { - const n = 16 - for i := 0; i < n; i++ { - p1 := float64(i+0) / n - p2 := float64(i+1) / n - a1 := angle1 + (angle2-angle1)*p1 - a2 := angle1 + (angle2-angle1)*p2 - x0 := x + rx*math.Cos(a1) - y0 := y + ry*math.Sin(a1) - x1 := x + rx*math.Cos((a1+a2)/2) - y1 := y + ry*math.Sin((a1+a2)/2) - x2 := x + rx*math.Cos(a2) - y2 := y + ry*math.Sin(a2) - cx := 2*x1 - x0/2 - x2/2 - cy := 2*y1 - y0/2 - y2/2 - if i == 0 { - if dc.hasCurrent { - dc.LineTo(x0, y0) - } else { - dc.MoveTo(x0, y0) - } - } - dc.QuadraticTo(cx, cy, x2, y2) - } -} - -func (dc *Context) DrawEllipse(x, y, rx, ry float64) { - dc.NewSubPath() - dc.DrawEllipticalArc(x, y, rx, ry, 0, 2*math.Pi) - dc.ClosePath() -} - -func (dc *Context) DrawArc(x, y, r, angle1, angle2 float64) { - dc.DrawEllipticalArc(x, y, r, r, angle1, angle2) -} - -func (dc *Context) DrawCircle(x, y, r float64) { - dc.NewSubPath() - dc.DrawEllipticalArc(x, y, r, r, 0, 2*math.Pi) - dc.ClosePath() -} - -func (dc *Context) DrawRegularPolygon(n int, x, y, r, rotation float64) { - angle := 2 * math.Pi / float64(n) - rotation -= math.Pi / 2 - if n%2 == 0 { - rotation += angle / 2 - } - dc.NewSubPath() - for i := 0; i < n; i++ { - a := rotation + angle*float64(i) - dc.LineTo(x+r*math.Cos(a), y+r*math.Sin(a)) - } - dc.ClosePath() -} - -// SetInterpolator sets the current context's drawing interpolator. -func (dc *Context) SetInterpolator(interp draw.Interpolator) { - if interp == nil { - panic(errors.New("gg: invalid interpolator")) - } - dc.interp = interp -} - -// DrawImage draws the specified image at the specified point. -func (dc *Context) DrawImage(im image.Image, x, y int) { - dc.DrawImageAnchored(im, x, y, 0, 0) -} - -// DrawImageAnchored draws the specified image at the specified anchor point. -// The anchor point is x - w * ax, y - h * ay, where w, h is the size of the -// image. Use ax=0.5, ay=0.5 to center the image at the specified point. -func (dc *Context) DrawImageAnchored(im image.Image, x, y int, ax, ay float64) { - s := im.Bounds().Size() - x -= int(ax * float64(s.X)) - y -= int(ay * float64(s.Y)) - var ( - fx = float64(x) - fy = float64(y) - m = dc.matrix.Translate(fx, fy) - s2d = f64.Aff3{m.XX, m.XY, m.X0, m.YX, m.YY, m.Y0} - opt *draw.Options - ) - if dc.mask != nil { - opt = &draw.Options{ - DstMask: dc.mask, - DstMaskP: image.Point{}, - } - } - dc.interp.Transform(dc.im, s2d, im, im.Bounds(), draw.Over, opt) -} - -// Text Functions - -func (dc *Context) SetFontFace(fontFace font.Face) { - dc.fontFace = fontFace - dc.fontHeight = float64(fontFace.Metrics().Height) / 64 -} - -func (dc *Context) LoadFontFace(path string, points float64) error { - face, err := LoadFontFace(path, points) - if err != nil { - return err - } - - dc.fontFace = face - dc.fontHeight = points * 72 / 96 - return nil -} - -func (dc *Context) LoadFontFaceFromFS(fsys fs.FS, path string, points float64) error { - face, err := LoadFontFaceFromFS(fsys, path, points) - if err != nil { - return err - } - - dc.fontFace = face - dc.fontHeight = points * 72 / 96 - return nil -} - -func (dc *Context) LoadFontFaceFromBytes(raw []byte, points float64) error { - face, err := LoadFontFaceFromBytes(raw, points) - if err != nil { - return err - } - - dc.fontFace = face - dc.fontHeight = points * 72 / 96 - return nil -} - -func (dc *Context) FontHeight() float64 { - return dc.fontHeight -} - -func (dc *Context) drawString(im *image.RGBA, s string, x, y float64) { - d := &font.Drawer{ - Dst: im, - Src: image.NewUniform(dc.color), - Face: dc.fontFace, - Dot: fixp(x, y), - } - // based on Drawer.DrawString() in golang.org/x/image/font/font.go - prevC := rune(-1) - for _, c := range s { - if prevC >= 0 { - d.Dot.X += d.Face.Kern(prevC, c) - } - dr, mask, maskp, advance, ok := d.Face.Glyph(d.Dot, c) - if !ok { - // TODO: is falling back on the U+FFFD glyph the responsibility of - // the Drawer or the Face? - // TODO: set prevC = '\ufffd'? - continue - } - sr := dr.Sub(dr.Min) - fx, fy := float64(dr.Min.X), float64(dr.Min.Y) - m := dc.matrix.Translate(fx, fy) - s2d := f64.Aff3{m.XX, m.XY, m.X0, m.YX, m.YY, m.Y0} - dc.interp.Transform(d.Dst, s2d, d.Src, sr, draw.Over, &draw.Options{ - SrcMask: mask, - SrcMaskP: maskp, - }) - d.Dot.X += advance - prevC = c - } -} - -// DrawString draws the specified text at the specified point. -func (dc *Context) DrawString(s string, x, y float64) { - dc.DrawStringAnchored(s, x, y, 0, 0) -} - -// DrawStringAnchored draws the specified text at the specified anchor point. -// The anchor point is x - w * ax, y - h * ay, where w, h is the size of the -// text. Use ax=0.5, ay=0.5 to center the text at the specified point. -func (dc *Context) DrawStringAnchored(s string, x, y, ax, ay float64) { - w, h := dc.MeasureString(s) - x -= ax * w - y += ay * h - if dc.mask == nil { - dc.drawString(dc.im, s, x, y) - } else { - im := image.NewRGBA(image.Rect(0, 0, dc.width, dc.height)) - dc.drawString(im, s, x, y) - draw.DrawMask(dc.im, dc.im.Bounds(), im, image.Point{}, dc.mask, image.Point{}, draw.Over) - } -} - -// DrawStringWrapped word-wraps the specified string to the given max width -// and then draws it at the specified anchor point using the given line -// spacing and text alignment. -func (dc *Context) DrawStringWrapped(s string, x, y, ax, ay, width, lineSpacing float64, align Align) { - lines := dc.WordWrap(s, width) - - // sync h formula with MeasureMultilineString - h := float64(len(lines)) * dc.fontHeight * lineSpacing - h -= (lineSpacing - 1) * dc.fontHeight - - x -= ax * width - y -= ay * h - switch align { - case AlignLeft: - ax = 0 - case AlignCenter: - ax = 0.5 - x += width / 2 - case AlignRight: - ax = 1 - x += width - } - ay = 1 - for _, line := range lines { - dc.DrawStringAnchored(line, x, y, ax, ay) - y += dc.fontHeight * lineSpacing - } -} - -func (dc *Context) MeasureMultilineString(s string, lineSpacing float64) (width, height float64) { - lines := strings.Split(s, "\n") - - // sync h formula with DrawStringWrapped - height = float64(len(lines)) * dc.fontHeight * lineSpacing - height -= (lineSpacing - 1) * dc.fontHeight - - d := &font.Drawer{ - Face: dc.fontFace, - } - - // max width from lines - for _, line := range lines { - adv := d.MeasureString(line) - currentWidth := float64(adv >> 6) // from gg.Context.MeasureString - if currentWidth > width { - width = currentWidth - } - } - - return width, height -} - -// MeasureString returns the rendered width and height of the specified text -// given the current font face. -func (dc *Context) MeasureString(s string) (w, h float64) { - d := &font.Drawer{ - Face: dc.fontFace, - } - a := d.MeasureString(s) - return float64(a >> 6), dc.fontHeight -} - -// WordWrap wraps the specified string to the given max width and current -// font face. -func (dc *Context) WordWrap(s string, w float64) []string { - return wordWrap(dc, s, w) -} - -// Transformation Matrix Operations - -// Identity resets the current transformation matrix to the identity matrix. -// This results in no translating, scaling, rotating, or shearing. -func (dc *Context) Identity() { - dc.matrix = Identity() -} - -// Translate updates the current matrix with a translation. -func (dc *Context) Translate(x, y float64) { - dc.matrix = dc.matrix.Translate(x, y) -} - -// Scale updates the current matrix with a scaling factor. -// Scaling occurs about the origin. -func (dc *Context) Scale(x, y float64) { - dc.matrix = dc.matrix.Scale(x, y) -} - -// ScaleAbout updates the current matrix with a scaling factor. -// Scaling occurs about the specified point. -func (dc *Context) ScaleAbout(sx, sy, x, y float64) { - dc.Translate(x, y) - dc.Scale(sx, sy) - dc.Translate(-x, -y) -} - -// Rotate updates the current matrix with a anticlockwise rotation. -// Rotation occurs about the origin. Angle is specified in radians. -func (dc *Context) Rotate(angle float64) { - dc.matrix = dc.matrix.Rotate(angle) -} - -// RotateAbout updates the current matrix with a anticlockwise rotation. -// Rotation occurs about the specified point. Angle is specified in radians. -func (dc *Context) RotateAbout(angle, x, y float64) { - dc.Translate(x, y) - dc.Rotate(angle) - dc.Translate(-x, -y) -} - -// Shear updates the current matrix with a shearing angle. -// Shearing occurs about the origin. -func (dc *Context) Shear(x, y float64) { - dc.matrix = dc.matrix.Shear(x, y) -} - -// ShearAbout updates the current matrix with a shearing angle. -// Shearing occurs about the specified point. -func (dc *Context) ShearAbout(sx, sy, x, y float64) { - dc.Translate(x, y) - dc.Shear(sx, sy) - dc.Translate(-x, -y) -} - -// TransformPoint multiplies the specified point by the current matrix, -// returning a transformed position. -func (dc *Context) TransformPoint(x, y float64) (tx, ty float64) { - return dc.matrix.TransformPoint(x, y) -} - -// InvertY flips the Y axis so that Y grows from bottom to top and Y=0 is at -// the bottom of the image. -func (dc *Context) InvertY() { - dc.Translate(0, float64(dc.height)) - dc.Scale(1, -1) -} - -// Stack - -// Push saves the current state of the context for later retrieval. These -// can be nested. -func (dc *Context) Push() { - x := *dc - dc.stack = append(dc.stack, &x) -} - -// Pop restores the last saved context state from the stack. -func (dc *Context) Pop() { - var ( - before = *dc - s = dc.stack - ctx *Context - ) - ctx, dc.stack = s[len(s)-1], s[:len(s)-1] - *dc = *ctx - dc.mask = before.mask - dc.strokePath = before.strokePath - dc.fillPath = before.fillPath - dc.start = before.start - dc.current = before.current - dc.hasCurrent = before.hasCurrent -} diff --git a/vendor/git.sr.ht/~sbinet/gg/gg.go b/vendor/git.sr.ht/~sbinet/gg/gg.go deleted file mode 100644 index 0f33d95..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/gg.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright ©2022 The gg Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -//go:generate go run github.com/campoy/embedmd -w README.md - -// Package gg provides a simple API for rendering 2D graphics in pure Go. -package gg // import "git.sr.ht/~sbinet/gg" diff --git a/vendor/git.sr.ht/~sbinet/gg/gg_gen.go b/vendor/git.sr.ht/~sbinet/gg/gg_gen.go deleted file mode 100644 index ff973e1..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/gg_gen.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright ©2023 The gg Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -//go:build tools - -package gg - -import ( - _ "github.com/campoy/embedmd" // needed for generating gallery -) diff --git a/vendor/git.sr.ht/~sbinet/gg/gradient.go b/vendor/git.sr.ht/~sbinet/gg/gradient.go deleted file mode 100644 index 0b46911..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/gradient.go +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright ©2022 The gg Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package gg - -import ( - "image/color" - "math" - "sort" -) - -type stop struct { - pos float64 - color color.Color -} - -type stops []stop - -// Len satisfies the Sort interface. -func (s stops) Len() int { - return len(s) -} - -// Less satisfies the Sort interface. -func (s stops) Less(i, j int) bool { - return s[i].pos < s[j].pos -} - -// Swap satisfies the Sort interface. -func (s stops) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -type Gradient interface { - Pattern - AddColorStop(offset float64, color color.Color) -} - -// Linear Gradient -type linearGradient struct { - x0, y0, x1, y1 float64 - stops stops -} - -func (g *linearGradient) ColorAt(x, y int) color.Color { - if len(g.stops) == 0 { - return color.Transparent - } - - fx, fy := float64(x), float64(y) - x0, y0, x1, y1 := g.x0, g.y0, g.x1, g.y1 - dx, dy := x1-x0, y1-y0 - - // Horizontal - if dy == 0 && dx != 0 { - return getColor((fx-x0)/dx, g.stops) - } - - // Vertical - if dx == 0 && dy != 0 { - return getColor((fy-y0)/dy, g.stops) - } - - // Dot product - s0 := dx*(fx-x0) + dy*(fy-y0) - if s0 < 0 { - return g.stops[0].color - } - // Calculate distance to (x0,y0) alone (x0,y0)->(x1,y1) - mag := math.Hypot(dx, dy) - u := ((fx-x0)*-dy + (fy-y0)*dx) / (mag * mag) - x2, y2 := x0+u*-dy, y0+u*dx - d := math.Hypot(fx-x2, fy-y2) / mag - return getColor(d, g.stops) -} - -func (g *linearGradient) AddColorStop(offset float64, color color.Color) { - g.stops = append(g.stops, stop{pos: offset, color: color}) - sort.Sort(g.stops) -} - -func NewLinearGradient(x0, y0, x1, y1 float64) Gradient { - g := &linearGradient{ - x0: x0, y0: y0, - x1: x1, y1: y1, - } - return g -} - -// Radial Gradient -type circle struct { - x, y, r float64 -} - -type radialGradient struct { - c0, c1, cd circle - a, inva float64 - mindr float64 - stops stops -} - -func dot3(x0, y0, z0, x1, y1, z1 float64) float64 { - return x0*x1 + y0*y1 + z0*z1 -} - -func (g *radialGradient) ColorAt(x, y int) color.Color { - if len(g.stops) == 0 { - return color.Transparent - } - - // copy from pixman's pixman-radial-gradient.c - - dx, dy := float64(x)+0.5-g.c0.x, float64(y)+0.5-g.c0.y - b := dot3(dx, dy, g.c0.r, g.cd.x, g.cd.y, g.cd.r) - c := dot3(dx, dy, -g.c0.r, dx, dy, g.c0.r) - - if g.a == 0 { - if b == 0 { - return color.Transparent - } - t := 0.5 * c / b - if t*g.cd.r >= g.mindr { - return getColor(t, g.stops) - } - return color.Transparent - } - - discr := dot3(b, g.a, 0, b, -c, 0) - if discr >= 0 { - sqrtdiscr := math.Sqrt(discr) - t0 := (b + sqrtdiscr) * g.inva - t1 := (b - sqrtdiscr) * g.inva - - if t0*g.cd.r >= g.mindr { - return getColor(t0, g.stops) - } else if t1*g.cd.r >= g.mindr { - return getColor(t1, g.stops) - } - } - - return color.Transparent -} - -func (g *radialGradient) AddColorStop(offset float64, color color.Color) { - g.stops = append(g.stops, stop{pos: offset, color: color}) - sort.Sort(g.stops) -} - -func NewRadialGradient(x0, y0, r0, x1, y1, r1 float64) Gradient { - c0 := circle{x0, y0, r0} - c1 := circle{x1, y1, r1} - cd := circle{x1 - x0, y1 - y0, r1 - r0} - a := dot3(cd.x, cd.y, -cd.r, cd.x, cd.y, cd.r) - var inva float64 - if a != 0 { - inva = 1.0 / a - } - mindr := -c0.r - g := &radialGradient{ - c0: c0, - c1: c1, - cd: cd, - a: a, - inva: inva, - mindr: mindr, - } - return g -} - -// Conic Gradient -type conicGradient struct { - cx, cy float64 - rotation float64 - stops stops -} - -func (g *conicGradient) ColorAt(x, y int) color.Color { - if len(g.stops) == 0 { - return color.Transparent - } - a := math.Atan2(float64(y)-g.cy, float64(x)-g.cx) - t := norm(a, -math.Pi, math.Pi) - g.rotation - if t < 0 { - t += 1 - } - return getColor(t, g.stops) -} - -func (g *conicGradient) AddColorStop(offset float64, color color.Color) { - g.stops = append(g.stops, stop{pos: offset, color: color}) - sort.Sort(g.stops) -} - -func NewConicGradient(cx, cy, deg float64) Gradient { - g := &conicGradient{ - cx: cx, - cy: cy, - rotation: normalizeAngle(deg) / 360, - } - return g -} - -func normalizeAngle(t float64) float64 { - t = math.Mod(t, 360) - if t < 0 { - t += 360 - } - return t -} - -// Map value which is in range [a..b] to range [0..1] -func norm(value, a, b float64) float64 { - return (value - a) * (1.0 / (b - a)) -} - -func getColor(pos float64, stops stops) color.Color { - if pos <= 0.0 || len(stops) == 1 { - return stops[0].color - } - - last := stops[len(stops)-1] - - if pos >= last.pos { - return last.color - } - - for i, stop := range stops[1:] { - if pos < stop.pos { - pos = (pos - stops[i].pos) / (stop.pos - stops[i].pos) - return colorLerp(stops[i].color, stop.color, pos) - } - } - - return last.color -} - -func colorLerp(c0, c1 color.Color, t float64) color.Color { - r0, g0, b0, a0 := c0.RGBA() - r1, g1, b1, a1 := c1.RGBA() - - return color.RGBA{ - lerp(r0, r1, t), - lerp(g0, g1, t), - lerp(b0, b1, t), - lerp(a0, a1, t), - } -} - -func lerp(a, b uint32, t float64) uint8 { - return uint8(int32(float64(a)*(1.0-t)+float64(b)*t) >> 8) -} diff --git a/vendor/git.sr.ht/~sbinet/gg/matrix.go b/vendor/git.sr.ht/~sbinet/gg/matrix.go deleted file mode 100644 index 0c41e11..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/matrix.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright ©2022 The gg Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package gg - -import "math" - -type Matrix struct { - XX, YX, XY, YY, X0, Y0 float64 -} - -func Identity() Matrix { - return Matrix{ - 1, 0, - 0, 1, - 0, 0, - } -} - -func Translate(x, y float64) Matrix { - return Matrix{ - 1, 0, - 0, 1, - x, y, - } -} - -func Scale(x, y float64) Matrix { - return Matrix{ - x, 0, - 0, y, - 0, 0, - } -} - -func Rotate(angle float64) Matrix { - c := math.Cos(angle) - s := math.Sin(angle) - return Matrix{ - c, s, - -s, c, - 0, 0, - } -} - -func Shear(x, y float64) Matrix { - return Matrix{ - 1, y, - x, 1, - 0, 0, - } -} - -func (a Matrix) Multiply(b Matrix) Matrix { - return Matrix{ - a.XX*b.XX + a.YX*b.XY, - a.XX*b.YX + a.YX*b.YY, - a.XY*b.XX + a.YY*b.XY, - a.XY*b.YX + a.YY*b.YY, - a.X0*b.XX + a.Y0*b.XY + b.X0, - a.X0*b.YX + a.Y0*b.YY + b.Y0, - } -} - -func (a Matrix) TransformVector(x, y float64) (tx, ty float64) { - tx = a.XX*x + a.XY*y - ty = a.YX*x + a.YY*y - return -} - -func (a Matrix) TransformPoint(x, y float64) (tx, ty float64) { - tx = a.XX*x + a.XY*y + a.X0 - ty = a.YX*x + a.YY*y + a.Y0 - return -} - -func (a Matrix) Translate(x, y float64) Matrix { - return Translate(x, y).Multiply(a) -} - -func (a Matrix) Scale(x, y float64) Matrix { - return Scale(x, y).Multiply(a) -} - -func (a Matrix) Rotate(angle float64) Matrix { - return Rotate(angle).Multiply(a) -} - -func (a Matrix) Shear(x, y float64) Matrix { - return Shear(x, y).Multiply(a) -} diff --git a/vendor/git.sr.ht/~sbinet/gg/path.go b/vendor/git.sr.ht/~sbinet/gg/path.go deleted file mode 100644 index 0eee10f..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/path.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright ©2022 The gg Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package gg - -import ( - "math" - - "github.com/golang/freetype/raster" - "golang.org/x/image/math/fixed" -) - -func flattenPath(p raster.Path) [][]Point { - var result [][]Point - var path []Point - var cx, cy float64 - for i := 0; i < len(p); { - switch p[i] { - case 0: - if len(path) > 0 { - result = append(result, path) - path = nil - } - x := unfix(p[i+1]) - y := unfix(p[i+2]) - path = append(path, Point{x, y}) - cx, cy = x, y - i += 4 - case 1: - x := unfix(p[i+1]) - y := unfix(p[i+2]) - path = append(path, Point{x, y}) - cx, cy = x, y - i += 4 - case 2: - x1 := unfix(p[i+1]) - y1 := unfix(p[i+2]) - x2 := unfix(p[i+3]) - y2 := unfix(p[i+4]) - points := QuadraticBezier(cx, cy, x1, y1, x2, y2) - path = append(path, points...) - cx, cy = x2, y2 - i += 6 - case 3: - x1 := unfix(p[i+1]) - y1 := unfix(p[i+2]) - x2 := unfix(p[i+3]) - y2 := unfix(p[i+4]) - x3 := unfix(p[i+5]) - y3 := unfix(p[i+6]) - points := CubicBezier(cx, cy, x1, y1, x2, y2, x3, y3) - path = append(path, points...) - cx, cy = x3, y3 - i += 8 - default: - panic("bad path") - } - } - if len(path) > 0 { - result = append(result, path) - } - return result -} - -func dashPath(paths [][]Point, dashes []float64, offset float64) [][]Point { - var result [][]Point - if len(dashes) == 0 { - return paths - } - if len(dashes) == 1 { - dashes = append(dashes, dashes[0]) - } - for _, path := range paths { - if len(path) < 2 { - continue - } - previous := path[0] - pathIndex := 1 - dashIndex := 0 - segmentLength := 0.0 - - // offset - if offset != 0 { - var totalLength float64 - for _, dashLength := range dashes { - totalLength += dashLength - } - offset = math.Mod(offset, totalLength) - if offset < 0 { - offset += totalLength - } - for i, dashLength := range dashes { - offset -= dashLength - if offset < 0 { - dashIndex = i - segmentLength = dashLength + offset - break - } - } - } - - var segment []Point - segment = append(segment, previous) - for pathIndex < len(path) { - dashLength := dashes[dashIndex] - point := path[pathIndex] - d := previous.Distance(point) - maxd := dashLength - segmentLength - if d > maxd { - t := maxd / d - p := previous.Interpolate(point, t) - segment = append(segment, p) - if dashIndex%2 == 0 && len(segment) > 1 { - result = append(result, segment) - } - segment = nil - segment = append(segment, p) - segmentLength = 0 - previous = p - dashIndex = (dashIndex + 1) % len(dashes) - } else { - segment = append(segment, point) - previous = point - segmentLength += d - pathIndex++ - } - } - if dashIndex%2 == 0 && len(segment) > 1 { - result = append(result, segment) - } - } - return result -} - -func rasterPath(paths [][]Point) raster.Path { - var result raster.Path - for _, path := range paths { - var previous fixed.Point26_6 - for i, point := range path { - f := point.Fixed() - if i == 0 { - result.Start(f) - } else { - dx := f.X - previous.X - dy := f.Y - previous.Y - if dx < 0 { - dx = -dx - } - if dy < 0 { - dy = -dy - } - if dx+dy > 4 { - // TODO: this is a hack for cases where two points are - // too close - causes rendering issues with joins / caps - result.Add1(f) - } - } - previous = f - } - } - return result -} - -func dashed(path raster.Path, dashes []float64, offset float64) raster.Path { - return rasterPath(dashPath(flattenPath(path), dashes, offset)) -} diff --git a/vendor/git.sr.ht/~sbinet/gg/pattern.go b/vendor/git.sr.ht/~sbinet/gg/pattern.go deleted file mode 100644 index 522a012..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/pattern.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright ©2022 The gg Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package gg - -import ( - "image" - "image/color" - - "github.com/golang/freetype/raster" -) - -type RepeatOp int - -const ( - RepeatBoth RepeatOp = iota - RepeatX - RepeatY - RepeatNone -) - -type Pattern interface { - ColorAt(x, y int) color.Color -} - -// Solid Pattern -type solidPattern struct { - color color.Color -} - -func (p *solidPattern) ColorAt(x, y int) color.Color { - return p.color -} - -func NewSolidPattern(color color.Color) Pattern { - return &solidPattern{color: color} -} - -// Surface Pattern -type surfacePattern struct { - im image.Image - op RepeatOp -} - -func (p *surfacePattern) ColorAt(x, y int) color.Color { - b := p.im.Bounds() - switch p.op { - case RepeatX: - if y >= b.Dy() { - return color.Transparent - } - case RepeatY: - if x >= b.Dx() { - return color.Transparent - } - case RepeatNone: - if x >= b.Dx() || y >= b.Dy() { - return color.Transparent - } - } - x = x%b.Dx() + b.Min.X - y = y%b.Dy() + b.Min.Y - return p.im.At(x, y) -} - -func NewSurfacePattern(im image.Image, op RepeatOp) Pattern { - return &surfacePattern{im: im, op: op} -} - -type patternPainter struct { - im *image.RGBA - mask *image.Alpha - p Pattern -} - -// Paint satisfies the Painter interface. -func (r *patternPainter) Paint(ss []raster.Span, done bool) { - b := r.im.Bounds() - for _, s := range ss { - if s.Y < b.Min.Y { - continue - } - if s.Y >= b.Max.Y { - return - } - if s.X0 < b.Min.X { - s.X0 = b.Min.X - } - if s.X1 > b.Max.X { - s.X1 = b.Max.X - } - if s.X0 >= s.X1 { - continue - } - const m = 1<<16 - 1 - y := s.Y - r.im.Rect.Min.Y - x0 := s.X0 - r.im.Rect.Min.X - // RGBAPainter.Paint() in $GOPATH/src/github.com/golang/freetype/raster/paint.go - i0 := (s.Y-r.im.Rect.Min.Y)*r.im.Stride + (s.X0-r.im.Rect.Min.X)*4 - i1 := i0 + (s.X1-s.X0)*4 - for i, x := i0, x0; i < i1; i, x = i+4, x+1 { - ma := s.Alpha - if r.mask != nil { - ma = ma * uint32(r.mask.AlphaAt(x, y).A) / 255 - if ma == 0 { - continue - } - } - c := r.p.ColorAt(x, y) - cr, cg, cb, ca := c.RGBA() - dr := uint32(r.im.Pix[i+0]) - dg := uint32(r.im.Pix[i+1]) - db := uint32(r.im.Pix[i+2]) - da := uint32(r.im.Pix[i+3]) - a := (m - (ca * ma / m)) * 0x101 - r.im.Pix[i+0] = uint8((dr*a + cr*ma) / m >> 8) - r.im.Pix[i+1] = uint8((dg*a + cg*ma) / m >> 8) - r.im.Pix[i+2] = uint8((db*a + cb*ma) / m >> 8) - r.im.Pix[i+3] = uint8((da*a + ca*ma) / m >> 8) - } - } -} - -func newPatternPainter(im *image.RGBA, mask *image.Alpha, p Pattern) *patternPainter { - return &patternPainter{im, mask, p} -} diff --git a/vendor/git.sr.ht/~sbinet/gg/point.go b/vendor/git.sr.ht/~sbinet/gg/point.go deleted file mode 100644 index ffb8612..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/point.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright ©2022 The gg Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package gg - -import ( - "math" - - "golang.org/x/image/math/fixed" -) - -type Point struct { - X, Y float64 -} - -func (a Point) Fixed() fixed.Point26_6 { - return fixp(a.X, a.Y) -} - -func (a Point) Distance(b Point) float64 { - return math.Hypot(a.X-b.X, a.Y-b.Y) -} - -func (a Point) Interpolate(b Point, t float64) Point { - x := a.X + (b.X-a.X)*t - y := a.Y + (b.Y-a.Y)*t - return Point{x, y} -} diff --git a/vendor/git.sr.ht/~sbinet/gg/util.go b/vendor/git.sr.ht/~sbinet/gg/util.go deleted file mode 100644 index c25fed6..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/util.go +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright ©2022 The gg Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package gg - -import ( - "fmt" - "image" - "image/draw" - "image/jpeg" - "image/png" - "io/fs" - "math" - "os" - "path/filepath" - "strings" - - "golang.org/x/image/font" - "golang.org/x/image/font/opentype" - "golang.org/x/image/math/fixed" -) - -func Radians(degrees float64) float64 { - return degrees * math.Pi / 180 -} - -func Degrees(radians float64) float64 { - return radians * 180 / math.Pi -} - -func LoadImage(path string) (image.Image, error) { - file, err := os.Open(path) - if err != nil { - return nil, err - } - defer file.Close() - im, _, err := image.Decode(file) - return im, err -} - -func LoadPNG(path string) (image.Image, error) { - file, err := os.Open(path) - if err != nil { - return nil, err - } - defer file.Close() - return png.Decode(file) -} - -func SavePNG(path string, im image.Image) error { - file, err := os.Create(path) - if err != nil { - return err - } - defer file.Close() - - err = png.Encode(file, im) - if err != nil { - return fmt.Errorf("could not encode PNG to %q: %w", path, err) - } - - return file.Close() -} - -func LoadJPG(path string) (image.Image, error) { - file, err := os.Open(path) - if err != nil { - return nil, err - } - defer file.Close() - return jpeg.Decode(file) -} - -func SaveJPG(path string, im image.Image, quality int) error { - file, err := os.Create(path) - if err != nil { - return err - } - defer file.Close() - - var opt jpeg.Options - opt.Quality = quality - - err = jpeg.Encode(file, im, &opt) - if err != nil { - return fmt.Errorf("could not encode JPG to %q: %w", path, err) - } - - return file.Close() -} - -func imageToRGBA(src image.Image) *image.RGBA { - bounds := src.Bounds() - dst := image.NewRGBA(bounds) - draw.Draw(dst, bounds, src, bounds.Min, draw.Src) - return dst -} - -func parseHexColor(x string) (r, g, b, a int) { - x = strings.TrimPrefix(x, "#") - a = 255 - if len(x) == 3 { - format := "%1x%1x%1x" - fmt.Sscanf(x, format, &r, &g, &b) - r |= r << 4 - g |= g << 4 - b |= b << 4 - } - if len(x) == 6 { - format := "%02x%02x%02x" - fmt.Sscanf(x, format, &r, &g, &b) - } - if len(x) == 8 { - format := "%02x%02x%02x%02x" - fmt.Sscanf(x, format, &r, &g, &b, &a) - } - return -} - -func fixp(x, y float64) fixed.Point26_6 { - return fixed.Point26_6{fix(x), fix(y)} -} - -func fix(x float64) fixed.Int26_6 { - return fixed.Int26_6(math.Round(x * 64)) -} - -func unfix(x fixed.Int26_6) float64 { - const shift, mask = 6, 1<<6 - 1 - if x >= 0 { - return float64(x>>shift) + float64(x&mask)/64 - } - x = -x - if x >= 0 { - return -(float64(x>>shift) + float64(x&mask)/64) - } - return 0 -} - -// LoadFontFace is a helper function to load the specified font file with -// the specified point size. Note that the returned `font.Face` objects -// are not thread safe and cannot be used in parallel across goroutines. -// You can usually just use the Context.LoadFontFace function instead of -// this package-level function. -func LoadFontFace(path string, points float64) (font.Face, error) { - fontBytes, err := os.ReadFile(path) - if err != nil { - return nil, err - } - return LoadFontFaceFromBytes(fontBytes, points) -} - -// LoadFontFaceFromFS is a helper function to load the specified font file from -// the provided filesystem and path, with the specified point size. -// -// Note that the returned `font.Face` objects are not thread safe and -// cannot be used in parallel across goroutines. -// You can usually just use the Context.LoadFontFace function instead of -// this package-level function. -func LoadFontFaceFromFS(fsys fs.FS, path string, points float64) (font.Face, error) { - if fsys == nil { - switch { - case filepath.IsAbs(path): - var ( - err error - orig = path - root = filepath.FromSlash("/") - ) - path, err = filepath.Rel(root, path) - if err != nil { - return nil, fmt.Errorf("could not find relative path for %q from %q: %w", orig, root, err) - } - fsys = os.DirFS(root) - default: - fsys = os.DirFS(".") - } - } - fontBytes, err := fs.ReadFile(fsys, path) - if err != nil { - return nil, err - } - - return LoadFontFaceFromBytes(fontBytes, points) -} - -// LoadFontFace is a helper function to load the specified font with -// the specified point size. Note that the returned `font.Face` objects -// are not thread safe and cannot be used in parallel across goroutines. -// You can usually just use the Context.LoadFontFace function instead of -// this package-level function. -func LoadFontFaceFromBytes(raw []byte, points float64) (font.Face, error) { - f, err := opentype.Parse(raw) - if err != nil { - return nil, err - } - face, err := opentype.NewFace(f, &opentype.FaceOptions{ - Size: points, - DPI: 72, - // Hinting: font.HintingFull, - }) - return face, err -} diff --git a/vendor/git.sr.ht/~sbinet/gg/wrap.go b/vendor/git.sr.ht/~sbinet/gg/wrap.go deleted file mode 100644 index bad15a7..0000000 --- a/vendor/git.sr.ht/~sbinet/gg/wrap.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright ©2022 The gg Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package gg - -import ( - "strings" - "unicode" -) - -type measureStringer interface { - MeasureString(s string) (w, h float64) -} - -func splitOnSpace(x string) []string { - var result []string - pi := 0 - ps := false - for i, c := range x { - s := unicode.IsSpace(c) - if s != ps && i > 0 { - result = append(result, x[pi:i]) - pi = i - } - ps = s - } - result = append(result, x[pi:]) - return result -} - -func wordWrap(m measureStringer, s string, width float64) []string { - var result []string - for _, line := range strings.Split(s, "\n") { - fields := splitOnSpace(line) - if len(fields)%2 == 1 { - fields = append(fields, "") - } - x := "" - for i := 0; i < len(fields); i += 2 { - w, _ := m.MeasureString(x + fields[i]) - if w > width { - if x == "" { - result = append(result, fields[i]) - x = "" - continue - } else { - result = append(result, x) - x = "" - } - } - x += fields[i] + fields[i+1] - } - if x != "" { - result = append(result, x) - } - } - for i, line := range result { - result[i] = strings.TrimSpace(line) - } - return result -} diff --git a/vendor/github.com/airbusgeo/godal/CONTRIBUTING.md b/vendor/github.com/airbusgeo/godal/CONTRIBUTING.md deleted file mode 100644 index ce95dea..0000000 --- a/vendor/github.com/airbusgeo/godal/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# How to contribute # - -Thank you for stopping by. Please read these few small guidelines before -creating an issue or a pull request on godal. - - -## Reporting issues ## - -Bugs, feature requests, and development-related questions should be directed to -our [GitHub issue tracker](https://github.com/airbusgeo/godal/issues). If -reporting a bug, please try and provide as much context as possible such as -your Go version, GDAL version and anything else that might be relevant to -the bug. For feature requests, please explain what you're trying to do, and -how the requested feature would help you do that. - -## Submitting a patch ## - - 1. Patches are to be submitted through pull-requests: https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request - - 1. Make sure each group of changes be done in distinct branches in order to - ensure that a pull request only includes code related to that bug or feature. - - 1. Always run `go fmt` on your code before committing it. - - 1. Do not squash / force-push your commits inside the pull request branch as - these tend to mess up the review comments. - - 1. As far as possible, the public API exposed by godal should remain backwards - compatible, meaning that existing code using godal should compile correctly - when using a newer godal version, and that the resulting behavior of the - compiled program should be unchanged. godal makes heavy use of - [optional parameters](https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis) - in its exposed API in order to allow this. - - 1. Any changes should almost always be accompanied by tests. Look at some of - the existing tests if you're unsure how to go about it. Tests should ensure - that the godal wrapper itself is working correctly, not the underlying GDAL - library (e.g. the test could check that a particular option has been taken - into account by gdal, not that gdal has produced correct output for all - possible option values) - - 1. Pull requests will be automatically tested, vetted and checked for test - coverage. You can run the following tools locally before submitting your - changes to ensure the checks will pass: - * `go test ./... -cover` - * `golangci-lint run --skip-files doc_test.go` - diff --git a/vendor/github.com/airbusgeo/godal/LICENSE b/vendor/github.com/airbusgeo/godal/LICENSE deleted file mode 100644 index 8e018a4..0000000 --- a/vendor/github.com/airbusgeo/godal/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - -// Copyright 2021 Airbus Defence and Space -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - diff --git a/vendor/github.com/airbusgeo/godal/README.md b/vendor/github.com/airbusgeo/godal/README.md deleted file mode 100644 index 8d95aa7..0000000 --- a/vendor/github.com/airbusgeo/godal/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# Golang bindings for GDAL -[![Go Reference](https://pkg.go.dev/badge/github.com/airbusgeo/godal.svg)](https://pkg.go.dev/github.com/airbusgeo/godal) -[![License](https://img.shields.io/github/license/airbusgeo/godal.svg)](https://github.com/airbusgeo/godal/blob/main/LICENSE) -[![Build Status](https://github.com/airbusgeo/godal/workflows/build/badge.svg?branch=main&event=push)](https://github.com/airbusgeo/godal/actions?query=workflow%3Agodal+event%3Apush+branch%3Amain) -[![Coverage Status](https://coveralls.io/repos/github/airbusgeo/godal/badge.svg?branch=main)](https://coveralls.io/github/airbusgeo/godal?branch=main) -[![Go Report Card](https://goreportcard.com/badge/github.com/airbusgeo/godal)](https://goreportcard.com/report/github.com/airbusgeo/godal) - - - -### Goals - -Godal aims at providing an idiomatic go wrapper around the -[GDAL](https://gdal.org) library: - -* Function calls return a result and an error. The result will be valid if - no error was returned. The error message will contain the root cause of why - the error happened. -* Calls between go and native libraries incur some overhead. As such godal does - not strictly expose GDAL's API, but groups often-used calls in a single cgo function - to reduce this overhead. For example, C code like -```c++ - hDS = GDALOpen(filename, GA_Readonly) - if (hDS == NULL) exit(1); - int sx = GDALGetRasterXSize(hDS); - int sy = GDALGetRasterYSize(hDS); - int nBands = GDALGetRasterCount(hDS); - printf("dataset size: %dx%dx%d\n",sx,sy,nBands); - for (int i=1; i<=nBands; i++) { - hBand = GDALGetRasterBand(hDS,i); - int ovrCount = GDALGetOverviewCount(hBand) - for(int o=0; o<=ovrCount; o++) { - GDALRasterBandH oBand = GDALGetOverview(hBand,o); - int osx = GDALGetRasterBandXSize(oBand); - int osy = GDALGetRasterBandYSize(oBand); - printf("overview %d size: %dx%d\n",o,osx,osy); - } - } -``` -will be written as -```go - hDS,err := godal.Open(filename) - if err!=nil { - panic(err) - } - structure := hDS.Structure() - fmt.Printf("dataset size: %dx%dx%d\n", structure.SizeX,structure.SizeY,structure.NBands) - for _,band := range hDS.Bands() { - for o,ovr := range band.Overviews() { - bstruct := ovr.Structure() - fmt.Printf("overview %d size: %dx%d\n",o,bstruct.SizeX,bstruct.SizeY) - } - } -``` -* Unfrequently used or non-default parameters are passed as options: -```go - ds,err := godal.Open(filename) //read-only - ds,err := godal.Open(filename, Update()) //read-write -``` -* Godal exposes a VSI handler that can easily allow you to expose an - [io.ReaderAt](https://golang.org/pkg/io/#ReaderAt) as a filename that can be - opened by GDAL. A handler for opening `gs://` google cloud storage URIs is - provided through https://github.com/airbusgeo/osio - -### Documentation - -[![GoReference](https://pkg.go.dev/badge/github.com/airbusgeo/godal.svg)](https://pkg.go.dev/github.com/airbusgeo/godal) -contains the API reference and example code to get you started. The -`*_test.go` files can also be used as reference. - - -### Status - -Godal is not feature complete. The raster side is nearing completion and -should remain stable. The vector and spatial-referencing sides are far from -complete, meaning that the API might evolve in backwards incompatible ways -until essential functionality is covered. - -### Contributing - -Contributions are welcome. Please read the [contribution guidelines](CONTRIBUTING.md) -before submitting fixes or enhancements. - -### Installation - -Godal requires a GDAL version greater than 3.0. Make sure the GDAL headers -are installed on the system used for compiling go+godal code. If using a GDAL -installation in a non standard location, you can set your `PKG_CONFIG_PATH` -environment variable, e.g. `export PKG_CONFIG_PATH=/opt/include/pkgconfig`. - -### Licensing -Godal is licensed under the Apache License, Version 2.0. See -[LICENSE](https://github.com/airbusgeo/godal/blob/main/LICENSE) for the full -license text. - - diff --git a/vendor/github.com/airbusgeo/godal/driver.go b/vendor/github.com/airbusgeo/godal/driver.go deleted file mode 100644 index 9769c4a..0000000 --- a/vendor/github.com/airbusgeo/godal/driver.go +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright 2021 Airbus Defence and Space -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package godal - -//DriverName is GDAL driver -type DriverName string - -const ( - //GTiff GeoTIFF - GTiff DriverName = "GTiff" - //GeoJSON RFCxxxx geojson - GeoJSON DriverName = "GeoJSON" - //Memory in memory driver - Memory DriverName = "Memory" - //VRT is a VRT - VRT DriverName = "VRT" - //Shapefile is an ESRI Shapefile - Shapefile DriverName = "ESRI Shapefile" - //GeoPackage is a geo-package - GeoPackage DriverName = "GPKG" - //JP2KAK is a Kakadu Jpeg2000 - JP2KAK DriverName = "JP2KAK" - //OpenJPEG is an OpenJPEG JPEG2000 - OpenJPEG DriverName = "OpenJPEG" - //DIMAP is a Dimap - DIMAP DriverName = "DIMAP" - //HFA is an erdas img - HFA DriverName = "HFA" - //Mitab is a mapinfo mif/tab file - Mitab DriverName = "Mitab" - //CSV comma-separated values driver - CSV DriverName = "CSV" -) - -type driverMapping struct { - rasterName string - vectorName string - rasterRegister string - vectorRegister string -} - -var driverMappings = map[DriverName]driverMapping{ - GTiff: { - rasterName: "GTiff", - rasterRegister: "GDALRegister_GTiff", - }, - Memory: { - rasterName: "MEM", - vectorName: "Memory", - rasterRegister: "GDALRegister_MEM", - vectorRegister: "RegisterOGRMEM", - }, - GeoJSON: { - vectorName: "GeoJSON", - vectorRegister: "RegisterOGRGeoJSON", - }, - VRT: { - rasterName: "VRT", - vectorName: "OGR_VRT", - rasterRegister: "GDALRegister_VRT", - vectorRegister: "RegisterOGRVRT", - }, - Shapefile: { - vectorName: "ESRI Shapefile", - vectorRegister: "RegisterOGRShape", - }, - GeoPackage: { - rasterName: "GPKG", - vectorName: "GPKG", - rasterRegister: "RegisterOGRGeoPackage", - vectorRegister: "RegisterOGRGeoPackage", - }, - JP2KAK: { - rasterName: "JP2KAK", - rasterRegister: "GDALRegister_JP2KAK", - }, - OpenJPEG: { - rasterName: "OpenJPEG", - rasterRegister: "GDALRegister_JP2OpenJPEG", - }, - DIMAP: { - rasterName: "DIMAP", - rasterRegister: "GDALRegister_DIMAP", - }, - HFA: { - rasterName: "HFA", - rasterRegister: "GDALRegister_HFA", - }, - Mitab: { - vectorName: "Mapinfo File", - vectorRegister: "RegisterOGRTAB", - }, - CSV: { - vectorName: "CSV", - vectorRegister: "RegisterOGRCSV", - }, -} - -func (dn DriverName) setDatasetVectorTranslateOpt(to *dsVectorTranslateOpts) { - to.driver = dn -} - -func (dn DriverName) setDatasetTranslateOpt(to *dsTranslateOpts) { - to.driver = dn -} - -func (dn DriverName) setDatasetWarpOpt(to *dsWarpOpts) { - to.driver = dn -} - -func (dn DriverName) setRasterizeOpt(to *rasterizeOpts) { - to.driver = dn -} - -type driversOpt struct { - drivers []string -} - -//Drivers specifies the list of drivers that are allowed to try opening the dataset -func Drivers(drivers ...string) interface { - OpenOption -} { - return driversOpt{drivers} -} -func (do driversOpt) setOpenOpt(oo *openOpts) { - oo.drivers = append(oo.drivers, do.drivers...) -} - -type driverOpenOption struct { - oo []string -} - -//DriverOpenOption adds a list of Open Options (-oo switch) to the open command. Each keyval must -//be provided in a "KEY=value" format -func DriverOpenOption(keyval ...string) interface { - OpenOption - BuildVRTOption -} { - return driverOpenOption{keyval} -} -func (doo driverOpenOption) setOpenOpt(oo *openOpts) { - oo.options = append(oo.options, doo.oo...) -} -func (doo driverOpenOption) setBuildVRTOpt(bvo *buildVRTOpts) { - bvo.openOptions = append(bvo.openOptions, doo.oo...) -} diff --git a/vendor/github.com/airbusgeo/godal/errors.go b/vendor/github.com/airbusgeo/godal/errors.go deleted file mode 100644 index 093ac34..0000000 --- a/vendor/github.com/airbusgeo/godal/errors.go +++ /dev/null @@ -1,461 +0,0 @@ -// Copyright 2021 Airbus Defence and Space -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package godal - -import ( - "bytes" - "errors" - "sync" -) - -var errorHandlerMu sync.Mutex -var errorHandlerIndex int - -// ErrorHandler is a function that can be used to override godal's default behavior -// of treating all messages with severity >= CE_Warning as errors. When an ErrorHandler -// is passed as an option to a godal function, all logs/errors emitted by gdal will be passed -// to this function, which can decide wether the parameters correspond to an actual error -// or not. -// -// If the ErrorHandler returns nil, the parent function will not return an error. It is up -// to the ErrorHandler to log the message if needed. -// -// If the ErrorHandler returns an error, that error will be returned as-is to the caller -// of the parent function -type ErrorHandler func(ec ErrorCategory, code int, msg string) error - -type errorHandlerWrapper struct { - fn ErrorHandler - err error -} - -var errorHandlers = make(map[int]*errorHandlerWrapper) - -func registerErrorHandler(fn ErrorHandler) int { - errorHandlerMu.Lock() - defer errorHandlerMu.Unlock() - for errorHandlerIndex == 0 || errorHandlers[errorHandlerIndex] != nil { - errorHandlerIndex++ - } - errorHandlers[errorHandlerIndex] = &errorHandlerWrapper{fn: fn} - return errorHandlerIndex -} - -func getErrorHandler(i int) *errorHandlerWrapper { - errorHandlerMu.Lock() - defer errorHandlerMu.Unlock() - return errorHandlers[i] -} - -func unregisterErrorHandler(i int) { - errorHandlerMu.Lock() - defer errorHandlerMu.Unlock() - delete(errorHandlers, i) -} - -type errorAndLoggingOpts struct { - eh ErrorHandler - config []string -} - -type errorCallback struct { - fn ErrorHandler -} - -type errorAndLoggingOption interface { - setErrorAndLoggingOpt(elo *errorAndLoggingOpts) -} - -// ErrLogger is an option to override default error handling. -// -// See ErrorHandler. -func ErrLogger(fn ErrorHandler) interface { - errorAndLoggingOption - AddGeometryOption - BandCreateMaskOption - BandIOOption - BoundsOption - BufferOption - BuildOverviewsOption - BuildVRTOption - ClearOverviewsOption - CloseOption - CopyLayerOption - CreateFeatureOption - CreateLayerOption - CreateSpatialRefOption - DatasetCreateMaskOption - DatasetCreateOption - DatasetIOOption - DatasetTranslateOption - DatasetVectorTranslateOption - DatasetWarpIntoOption - DatasetWarpOption - DeleteFeatureOption - DifferenceOption - FeatureCountOption - FillBandOption - FillNoDataOption - GeoJSONOption - GeometryTransformOption - GeometryReprojectOption - GeometryWKBOption - GeometryWKTOption - GetGeoTransformOption - GMLExportOption - HistogramOption - IntersectsOption - IntersectionOption - MetadataOption - NewFeatureOption - NewGeometryOption - OpenOption - PolygonizeOption - RasterizeGeometryOption - RasterizeOption - RasterizeIntoOption - SetColorInterpOption - SetColorTableOption - SetDescriptionOption - SetGeometryOption - SetFieldValueOption - SetNoDataOption - SetScaleOffsetOption - SetGeoTransformOption - SetGeometryColumnNameOption - SetProjectionOption - SetSpatialRefOption - SieveFilterOption - SimplifyOption - SpatialRefValidateOption - SubGeometryOption - TransformOption - UnionOption - UpdateFeatureOption - VSIHandlerOption - VSIOpenOption - VSIUnlinkOption - WKTExportOption - StatisticsOption - SetStatisticsOption - ClearStatisticsOption - GridOption - NearblackOption - DemOption - SetGCPsOption - GCPsToGeoTransformOption - RegisterPluginOption -} { - return errorCallback{fn} -} - -func (ec errorCallback) setErrorAndLoggingOpt(elo *errorAndLoggingOpts) { - elo.eh = ec.fn -} -func (ec errorCallback) setAddGeometryOpt(ao *addGeometryOpts) { - ao.errorHandler = ec.fn -} -func (ec errorCallback) setBandCreateMaskOpt(o *bandCreateMaskOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setBandIOOpt(o *bandIOOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setBoundsOpt(o *boundsOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setBufferOpt(o *bufferOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setBuildOverviewsOpt(o *buildOvrOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setBuildVRTOpt(o *buildVRTOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setClearOverviewsOpt(o *clearOvrOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setCloseOpt(o *closeOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setCopyLayerOpt(o *copyLayerOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setCreateFeatureOpt(cfo *createFeatureOpts) { - cfo.errorHandler = ec.fn -} -func (ec errorCallback) setCreateLayerOpt(o *createLayerOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setCreateSpatialRefOpt(o *createSpatialRefOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setDatasetCreateMaskOpt(o *dsCreateMaskOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setDatasetCreateOpt(o *dsCreateOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setDatasetIOOpt(o *datasetIOOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setDatasetTranslateOpt(o *dsTranslateOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setDatasetVectorTranslateOpt(o *dsVectorTranslateOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setDatasetWarpIntoOpt(o *dsWarpIntoOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setDatasetWarpOpt(o *dsWarpOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setDeleteFeatureOpt(o *deleteFeatureOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setDifferenceOpt(do *differenceOpts) { - do.errorHandler = ec.fn -} -func (ec errorCallback) setFeatureCountOpt(o *featureCountOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setFillBandOpt(o *fillBandOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setFillnodataOpt(o *fillnodataOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setGeojsonOpt(o *geojsonOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setGeometryColumnNameOpt(o *setGeometryColumnNameOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setGeometryTransformOpt(o *geometryTransformOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setGeometryReprojectOpt(o *geometryReprojectOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setGeometryWKBOpt(o *geometryWKBOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setGeometryWKTOpt(o *geometryWKTOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setGetGeoTransformOpt(o *getGeoTransformOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setGMLExportOpt(o *gmlExportOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setHistogramOpt(o *histogramOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setIntersectsOpt(o *intersectsOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setIntersectionOpt(o *intersectionOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setMetadataOpt(o *metadataOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setDescriptionOpt(o *setDescriptionOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setNewFeatureOpt(o *newFeatureOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setNewGeometryOpt(o *newGeometryOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setOpenOpt(oo *openOpts) { - oo.errorHandler = ec.fn -} -func (ec errorCallback) setPolygonizeOpt(o *polygonizeOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setRasterizeGeometryOpt(o *rasterizeGeometryOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setRasterizeOpt(o *rasterizeOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setRasterizeIntoOpt(o *rasterizeIntoOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setSetColorInterpOpt(ndo *setColorInterpOpts) { - ndo.errorHandler = ec.fn -} -func (ec errorCallback) setSetColorTableOpt(ndo *setColorTableOpts) { - ndo.errorHandler = ec.fn -} -func (ec errorCallback) setSetGeometryOpt(o *setGeometryOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setSetFieldValueOpt(o *setFieldValueOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setSetGeoTransformOpt(o *setGeoTransformOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setSetProjectionOpt(o *setProjectionOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setSetNoDataOpt(ndo *setNodataOpts) { - ndo.errorHandler = ec.fn -} -func (ec errorCallback) setSetScaleOffsetOpt(soo *setScaleOffsetOpts) { - soo.errorHandler = ec.fn -} -func (ec errorCallback) setSetSpatialRefOpt(ndo *setSpatialRefOpts) { - ndo.errorHandler = ec.fn -} -func (ec errorCallback) setSieveFilterOpt(sfo *sieveFilterOpts) { - sfo.errorHandler = ec.fn -} -func (ec errorCallback) setSimplifyOpt(o *simplifyOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setSpatialRefValidateOpt(o *spatialRefValidateOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setSubGeometryOpt(so *subGeometryOpts) { - so.errorHandler = ec.fn -} -func (ec errorCallback) setTransformOpt(o *trnOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setUnionOpt(uo *unionOpts) { - uo.errorHandler = ec.fn -} -func (ec errorCallback) setUpdateFeatureOpt(o *updateFeatureOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setVSIHandlerOpt(o *vsiHandlerOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setVSIOpenOpt(o *vsiOpenOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setVSIUnlinkOpt(o *vsiUnlinkOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setWKTExportOpt(o *srWKTOpts) { - o.errorHandler = ec.fn -} - -func (ec errorCallback) setStatisticsOpt(o *statisticsOpts) { - o.errorHandler = ec.fn -} - -func (ec errorCallback) setSetStatisticsOpt(o *setStatisticsOpt) { - o.errorHandler = ec.fn -} - -func (ec errorCallback) setClearStatisticsOpt(o *clearStatisticsOpt) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setGridCreateOpt(o *gridCreateOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setGridOpt(o *gridOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setNearblackOpt(o *nearBlackOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setDemOpt(o *demOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setSetGCPsOpt(o *setGCPsOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setGCPsToGeoTransformOpts(o *gcpsToGeoTransformOpts) { - o.errorHandler = ec.fn -} -func (ec errorCallback) setRegisterPluginOpt(o *registerPluginOpts) { - o.errorHandler = ec.fn -} - -type multiError struct { - errs []error -} - -// Error is the standard error interface -func (me *multiError) Error() string { - w := bytes.NewBufferString(me.errs[0].Error()) - for i := 1; i < len(me.errs); i++ { - w.WriteByte('\n') - w.WriteString(me.errs[i].Error()) - } - return w.String() -} - -// As is the standard error wrapping interface -func (me *multiError) As(target interface{}) bool { - for _, err := range me.errs { - if errors.As(err, target) { - return true - } - } - return false -} - -// Is is the standard error wrapping interface -func (me *multiError) Is(target error) bool { - for _, err := range me.errs { - if errors.Is(err, target) { - return true - } - } - return false -} - -func combine(e1, e2 error) error { - switch { - case e1 == nil: - return e2 - case e2 == nil: - return e1 - } - if me1, ok := e1.(*multiError); ok { - if me2, ok := e2.(*multiError); ok { - me1.errs = append(me1.errs, me2.errs...) - } else { - me1.errs = append(me1.errs, e2) - } - return me1 - } else if me2, ok := e2.(*multiError); ok { - me := &multiError{} - me.errs = make([]error, 1, len(me2.errs)+1) - me.errs[0] = e1 - me.errs = append(me.errs, me2.errs...) - return me - } else { - return &multiError{errs: []error{e1, e2}} - } -} - -var SkipWarnings = ErrLogger( - func(ec ErrorCategory, code int, message string) error { - if ec > CE_Warning { - return errors.New(message) - } - return nil - }) diff --git a/vendor/github.com/airbusgeo/godal/godal.cpp b/vendor/github.com/airbusgeo/godal/godal.cpp deleted file mode 100644 index 26d6a5f..0000000 --- a/vendor/github.com/airbusgeo/godal/godal.cpp +++ /dev/null @@ -1,1916 +0,0 @@ -// Copyright 2021 Airbus Defence and Space -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#define _GNU_SOURCE 1 -#include "godal.h" -#include -#include -#include -#include "cpl_port.h" -#include "cpl_string.h" -#include "cpl_vsi.h" -#include "cpl_vsi_virtual.h" -#include -#include -#include -#include - -#include -#include -#include - -extern "C" { - extern long long int _gogdalSizeCallback(char* key, char** errorString); - extern int _gogdalMultiReadCallback(char* key, int nRanges, void* pocbuffers, void* coffsets, void* clengths, char** errorString); - extern size_t _gogdalReadCallback(char* key, void* buffer, size_t off, size_t clen, char** errorString); - extern int goErrorHandler(int loggerID, CPLErr lvl, int code, const char *msg); -} - -static void godalErrorHandler(CPLErr e, CPLErrorNum n, const char* msg) { - cctx *ctx = (cctx*)CPLGetErrorHandlerUserData(); - assert(ctx!=nullptr); - if (ctx->handlerIdx !=0) { - int ret = goErrorHandler(ctx->handlerIdx, e, n, msg); - if(ret!=0 && ctx->failed==0) { - ctx->failed=1; - } - } else { - //let's be strict and treat all warnings as errors - if (e < CE_Warning) - { - fprintf(stderr, "GDAL: %s\n", msg); - return; - } - if (ctx->errMessage == nullptr) - { - ctx->errMessage = (char *)malloc(strlen(msg) + 1); - strcpy(ctx->errMessage, msg); - } - else - { - ctx->errMessage = (char *)realloc(ctx->errMessage, strlen(ctx->errMessage) + strlen(msg) + 3); - strcat(ctx->errMessage, "\n"); - strcat(ctx->errMessage, msg); - } - } -} - -static void godalWrap(cctx *ctx) { - CPLPushErrorHandlerEx(&godalErrorHandler,ctx); - if(ctx->configOptions!=nullptr) { - char **options = ctx->configOptions; - for(char* option=*options; option; option=*(++options)) { - char *idx = strchr(option,'='); - if(idx) { - *idx='\0'; - CPLSetThreadLocalConfigOption(option,idx+1); - *idx='='; - } - } - } -} - -static void godalUnwrap() { - cctx *ctx = (cctx*)CPLGetErrorHandlerUserData(); - CPLPopErrorHandler(); - if(ctx->configOptions!=nullptr) { - char **options = ctx->configOptions; - for(char* option=*options; option; option=*(++options)) { - char *idx = strchr(option,'='); - if(idx) { - *idx='\0'; - CPLSetThreadLocalConfigOption(option,nullptr); - *idx='='; - } - } - } -} - -inline int failed(cctx *ctx) { - if (ctx->errMessage!=nullptr || ctx->failed!=0) { - return 1; - } - return 0; -} - -inline void forceError(cctx *ctx) { - if (ctx->errMessage == nullptr && ctx->failed==0) { - CPLError(CE_Failure, CPLE_AppDefined, "unknown error"); - } -} -inline void forceCPLError(cctx *ctx, CPLErr err) { - if (ctx->errMessage == nullptr && ctx->failed==0) { - CPLError(CE_Failure, CPLE_AppDefined, "unknown cpl error %d", err); - } -} -inline void forceOGRError(cctx *ctx, OGRErr err) { - if (ctx->errMessage == nullptr && ctx->failed==0) { - CPLError(CE_Failure, CPLE_AppDefined, "unknown ogr error %d", err); - } -} - -void godalSetMetadataItem(cctx *ctx, GDALMajorObjectH mo, char *ckey, char *cval, char *cdom) { - godalWrap(ctx); - CPLErr ret = GDALSetMetadataItem(mo,ckey,cval,cdom); - if(ret!=0) { - forceCPLError(ctx, ret); - } - godalUnwrap(); -} -void godalClearMetadata(cctx *ctx, GDALMajorObjectH mo, char *cdom) { - godalWrap(ctx); - CPLErr ret = GDALSetMetadata(mo,nullptr,cdom); - if(ret!=0) { - forceCPLError(ctx, ret); - } - godalUnwrap(); -} -void godalSetDescription(cctx *ctx, GDALMajorObjectH mo, char *desc) { - godalWrap(ctx); - GDALSetDescription(mo,desc); - godalUnwrap(); -} - -void godalSetRasterColorInterpretation(cctx *ctx, GDALRasterBandH bnd, GDALColorInterp ci) { - godalWrap(ctx); - CPLErr ret = GDALSetRasterColorInterpretation(bnd,ci); - if(ret!=0) { - forceCPLError(ctx, ret); - } - godalUnwrap(); -} - -GDALDatasetH godalOpen(cctx *ctx, const char *name, unsigned int nOpenFlags, const char *const *papszAllowedDrivers, - const char *const *papszOpenOptions, const char *const *papszSiblingFiles) { - godalWrap(ctx); - GDALDatasetH ret = GDALOpenEx(name,nOpenFlags,papszAllowedDrivers,papszOpenOptions,papszSiblingFiles); - if (ret == nullptr) { - forceError(ctx); - } - godalUnwrap(); - return ret; -} - -void godalClose(cctx *ctx, GDALDatasetH ds) { - godalWrap(ctx); - GDALClose(ds); - godalUnwrap(); -} - -typedef void (*fn_def)(void); - -int _go_registerDriver(const char *driver, const char *prefix) { - char *fnname = (char*)calloc(1,strlen(driver)+strlen(prefix)+1); - sprintf(fnname,"%s%s",prefix,driver); - void *fcn = dlsym(RTLD_DEFAULT,fnname); - free(fnname); - if (fcn != nullptr) { - fn_def fnptr = (fn_def)fcn; - fnptr(); - } else { - return 1; - } - return 0; -} - -int godalRegisterDriver(const char *fnname) { - void *fcn = dlsym(RTLD_DEFAULT,fnname); - if (fcn != nullptr) { - fn_def fnptr = (fn_def)fcn; - fnptr(); - return 0; - } - return -1; -} - -void godalRegisterPlugins(){ -#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 8, 0) - GDALRegisterPlugins(); -#endif -} - -void godalRegisterPlugin(cctx *ctx, const char *name){ - godalWrap(ctx); -#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 8, 0) - CPLErr ret = GDALRegisterPlugin(name); - if (ret != 0) { - forceCPLError(ctx, ret); - } -#else - CPLError(CE_Failure, CPLE_NotSupported, "GDALRegisterPlugin is only supported in GDAL version >= 3.8"); -#endif - godalUnwrap(); -} - -GDALDatasetH godalCreate(cctx *ctx, GDALDriverH drv, const char* name, int width, int height, int nbands, - GDALDataType dtype, char **options) { - godalWrap(ctx); - GDALDatasetH ret = GDALCreate(drv,name,width,height,nbands,dtype,options); - if (ret==nullptr) { - forceError(ctx); - } - godalUnwrap(); - return ret; -} - -void godalDatasetSetSpatialRef(cctx *ctx, GDALDatasetH ds, OGRSpatialReferenceH sr) { - godalWrap(ctx); - CPLErr ret = GDALSetSpatialRef(ds,sr); - if (ret!=0) { - forceCPLError(ctx,ret); - } - godalUnwrap(); -} - -char *exportToWKT(cctx *ctx, OGRSpatialReferenceH sr) { - char *pszSRS = nullptr; - OGRErr gret = OSRExportToWkt(sr,&pszSRS); - if (gret!=OGRERR_NONE && !failed(ctx)) { - forceOGRError(ctx, gret); - } - if(failed(ctx)) { - CPLFree(pszSRS); - pszSRS=nullptr; - } - - /*TODO: handle wkt2 retry - if (gret!=OGRERR_NONE || failed(ctx)) { - CPLFree(pszSRS); - pszSRS = nullptr; - const char *const apszOptions[] = {"FORMAT=WKT2", nullptr}; - gret = oOutputSRS.exportToWkt(&pszSRS, apszOptions); - if (gret!=OGRERR_NONE || failed(ctx)) { - forceOGRError(ctx, gret); - godalUnwrap(); - return; - } - } - */ - return pszSRS; -} - -void godalSetProjection(cctx *ctx, GDALDatasetH ds, char *wkt) { - godalWrap(ctx); - if(wkt==nullptr||*wkt==0) { - CPLErr ret = GDALSetSpatialRef(ds,nullptr); - if (ret != 0) - { - forceCPLError(ctx, ret); - } - godalUnwrap(); - return; - } - OGRSpatialReferenceH sr = OSRNewSpatialReference(nullptr); - OSRSetAxisMappingStrategy(sr, OAMS_TRADITIONAL_GIS_ORDER); - - OGRErr gret = OSRSetFromUserInput(sr,wkt); - if (gret!=OGRERR_NONE || failed(ctx)) { - forceOGRError(ctx,gret); - godalUnwrap(); - OSRDestroySpatialReference(sr); - return; - } - CPLErr ret = GDALSetSpatialRef(ds,sr); - if (ret!=0) { - forceCPLError(ctx,ret); - } - godalUnwrap(); - OSRDestroySpatialReference(sr); -} - -char *godalExportToWKT(cctx *ctx, OGRSpatialReferenceH sr) { - godalWrap(ctx); - char *pszSRS = exportToWKT(ctx, sr); - godalUnwrap(); - return pszSRS; -} - -OGRSpatialReferenceH godalCreateWKTSpatialRef(cctx *ctx, char *wkt){ - godalWrap(ctx); - OGRSpatialReferenceH sr = OSRNewSpatialReference(nullptr); - OSRSetAxisMappingStrategy(sr, OAMS_TRADITIONAL_GIS_ORDER); - OGRErr gret = OSRImportFromWkt(sr, &wkt); - if(gret!=0) { - forceOGRError(ctx,gret); - } - godalUnwrap(); - if( failed(ctx) ) { - OSRDestroySpatialReference(sr); - return nullptr; - } - return sr; -} - -OGRSpatialReferenceH godalCreateProj4SpatialRef(cctx *ctx, char *proj) { - godalWrap(ctx); - OGRSpatialReferenceH sr = OSRNewSpatialReference(nullptr); - OSRSetAxisMappingStrategy(sr, OAMS_TRADITIONAL_GIS_ORDER); - OGRErr gret = OSRImportFromProj4(sr, proj); - if(gret!=0) { - forceOGRError(ctx,gret); - } - godalUnwrap(); - if( failed(ctx) ) { - OSRDestroySpatialReference(sr); - return nullptr; - } - return sr; -} - -OGRSpatialReferenceH godalCreateEPSGSpatialRef(cctx *ctx, int epsgCode) { - godalWrap(ctx); - OGRSpatialReferenceH sr = OSRNewSpatialReference(nullptr); - OSRSetAxisMappingStrategy(sr, OAMS_TRADITIONAL_GIS_ORDER); - OGRErr gret = OSRImportFromEPSG(sr, epsgCode); - if(gret!=0) { - forceOGRError(ctx,gret); - } - godalUnwrap(); - if( failed(ctx) ) { - OSRDestroySpatialReference(sr); - return nullptr; - } - return sr; -} - -OGRSpatialReferenceH godalCreateUserSpatialRef(cctx *ctx, char *userInput) { - godalWrap(ctx); - OGRSpatialReferenceH sr = OSRNewSpatialReference(nullptr); - OSRSetAxisMappingStrategy(sr, OAMS_TRADITIONAL_GIS_ORDER); - OGRErr gret = OSRSetFromUserInput(sr, userInput); - if(gret!=0) { - forceOGRError(ctx,gret); - } - godalUnwrap(); - if( failed(ctx) ) { - OSRDestroySpatialReference(sr); - return nullptr; - } - return sr; -} - -void godalValidateSpatialRef(cctx *ctx, OGRSpatialReferenceH sr) { - godalWrap(ctx); - OGRErr gret = OSRValidate(sr); - if(gret!=0) { - forceOGRError(ctx,gret); - } - godalUnwrap(); -} - -OGRCoordinateTransformationH godalNewCoordinateTransformation(cctx *ctx, OGRSpatialReferenceH src, OGRSpatialReferenceH dst) { - godalWrap(ctx); - OGRCoordinateTransformationH tr = OCTNewCoordinateTransformation(src,dst); - if ( tr == nullptr ) { - forceError(ctx); - } - godalUnwrap(); - return tr; -} - -void godalSetGeoTransform(cctx *ctx, GDALDatasetH ds, double *gt){ - godalWrap(ctx); - CPLErr ret = GDALSetGeoTransform(ds,gt); - if( ret != 0 ) { - forceCPLError(ctx,ret); - } - godalUnwrap(); -} - -void godalGetGeoTransform(cctx *ctx, GDALDatasetH ds, double *gt){ - godalWrap(ctx); - CPLErr ret = GDALGetGeoTransform(ds,gt); - if( ret != 0 ) { - forceCPLError(ctx,ret); - } - godalUnwrap(); -} - -void godalRasterSize(GDALDatasetH ds, int *xsize, int *ysize) { - *xsize = GDALGetRasterXSize(ds); - *ysize = GDALGetRasterYSize(ds); -} - -GDALRasterBandH* godalBandOverviews(GDALRasterBandH bnd) { - int count = GDALGetOverviewCount(bnd); - if(count == 0) { - return nullptr; - } - GDALRasterBandH *ret = (GDALRasterBandH*)malloc((count+1)*sizeof(GDALRasterBandH)); - ret[count]=nullptr; - for(int i=0; i 0 ) { - GDALRasterBandH band = GDALGetRasterBand(ds,1); - *dtype = GDALGetRasterDataType(band); - GDALGetBlockSize(band,bsx,bsy); - godalBandScaleOffset(band, scale, offset); - } -} -void godalBandStructure(GDALRasterBandH bnd, int *sx, int *sy, int *bsx, int *bsy, double *scale, double *offset, int *dtype) { - *sx=GDALGetRasterBandXSize(bnd); - *sy=GDALGetRasterBandYSize(bnd); - *dtype=GDT_Unknown; - *bsx=*bsy=0; - *dtype = GDALGetRasterDataType(bnd); - GDALGetBlockSize(bnd, bsx, bsy); - godalBandScaleOffset(bnd, scale, offset); -} - -void godalBandRasterIO(cctx *ctx, GDALRasterBandH bnd, GDALRWFlag rw, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, void *pBuffer, - int nBXSize, int nBYSize, GDALDataType eBDataType, int nPixelSpace, int nLineSpace, GDALRIOResampleAlg alg) { - godalWrap(ctx); - GDALRasterIOExtraArg exargs; - INIT_RASTERIO_EXTRA_ARG(exargs); - if (alg != GRIORA_NearestNeighbour) { - exargs.eResampleAlg = alg; - } - CPLErr ret = GDALRasterIOEx(bnd, rw, nDSXOff, nDSYOff, nDSXSize, nDSYSize, pBuffer, nBXSize, nBYSize, - eBDataType, nPixelSpace, nLineSpace, &exargs); - if(ret!=0){ - forceCPLError(ctx,ret); - } - godalUnwrap(); -} - -void godalDatasetRasterIO(cctx *ctx, GDALDatasetH ds, GDALRWFlag rw, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, void *pBuffer, - int nBXSize, int nBYSize, GDALDataType eBDataType, int nBandCount, int *panBandCount, - int nPixelSpace, int nLineSpace, int nBandSpace, GDALRIOResampleAlg alg) { - godalWrap(ctx); - GDALRasterIOExtraArg exargs; - INIT_RASTERIO_EXTRA_ARG(exargs); - if (alg != GRIORA_NearestNeighbour) { - exargs.eResampleAlg = alg; - } - CPLErr ret = GDALDatasetRasterIOEx(ds, rw, nDSXOff, nDSYOff, nDSXSize, nDSYSize, pBuffer, nBXSize, nBYSize, - eBDataType, nBandCount, panBandCount, nPixelSpace, nLineSpace, nBandSpace, &exargs); - if(ret!=0){ - forceCPLError(ctx,ret); - } - godalUnwrap(); -} - -void godalFillRaster(cctx *ctx, GDALRasterBandH bnd, double real, double imag) { - godalWrap(ctx); - CPLErr ret = GDALFillRaster(bnd,real,imag); - if(ret!=0){ - forceCPLError(ctx,ret); - } - godalUnwrap(); - -} - -void godalPolygonize(cctx *ctx, GDALRasterBandH in, GDALRasterBandH mask, OGRLayerH layer,int fieldIndex, char **opts) { - godalWrap(ctx); - if (fieldIndex >= OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(layer))) { - CPLError(CE_Failure, CPLE_AppDefined, "invalid fieldIndex"); - godalUnwrap(); - return; - } - CPLErr ret = GDALPolygonize(in,mask,layer,fieldIndex,opts,nullptr,nullptr); - if(ret!=0){ - forceCPLError(ctx,ret); - } - godalUnwrap(); -} - -void godalSieveFilter(cctx *ctx, GDALRasterBandH bnd, GDALRasterBandH mask, GDALRasterBandH dst, int sizeThreshold, int connectedNess) { - godalWrap(ctx); - CPLErr ret = GDALSieveFilter(bnd,mask,dst,sizeThreshold,connectedNess,nullptr,nullptr,nullptr); - if(ret!=0){ - forceCPLError(ctx,ret); - } - godalUnwrap(); -} - -void godalFillNoData(cctx *ctx, GDALRasterBandH in, GDALRasterBandH mask, int maxDistance, int iterations, char **opts) { - godalWrap(ctx); - CPLErr ret = GDALFillNodata(in,mask,maxDistance,0,iterations,opts,nullptr,nullptr); - if(ret!=0){ - forceCPLError(ctx,ret); - } - godalUnwrap(); -} - -GDALDatasetH godalRasterize(cctx *ctx, char *dstName, GDALDatasetH dstDS, GDALDatasetH ds, char **switches) { - godalWrap(ctx); - GDALRasterizeOptions *ropts = GDALRasterizeOptionsNew(switches,nullptr); - if(failed(ctx)) { - GDALRasterizeOptionsFree(ropts); - godalUnwrap(); - return nullptr; - } - int usageErr=0; - GDALDatasetH ret = GDALRasterize(dstName, dstDS, ds, ropts, &usageErr); - GDALRasterizeOptionsFree(ropts); - if(ret==nullptr || usageErr!=0) { - forceError(ctx); - } - godalUnwrap(); - return ret; -} - -void godalRasterizeGeometry(cctx *ctx, GDALDatasetH ds, OGRGeometryH geom, int *bands, int nBands, double *vals, int allTouched) { - const char *opts[2] = { "ALL_TOUCHED=TRUE",nullptr }; - char **copts=(char**)opts; - if (!allTouched) { - copts=nullptr; - } - godalWrap(ctx); - CPLErr ret = GDALRasterizeGeometries(ds,nBands,bands,1,&geom,nullptr,nullptr,vals,copts,nullptr,nullptr); - if(ret!=0){ - forceCPLError(ctx,ret); - } - godalUnwrap(); -} - -void godalLayerDeleteFeature(cctx *ctx, OGRLayerH layer, OGRFeatureH feat) { - godalWrap(ctx); - GIntBig fid = OGR_F_GetFID(feat); - if (fid == OGRNullFID) { - CPLError(CE_Failure, CPLE_AppDefined, "cannot delete feature with no FID"); - godalUnwrap(); - return; - } - OGRErr gret = OGR_L_DeleteFeature(layer,fid); - if(gret!=0){ - forceOGRError(ctx,gret); - } - godalUnwrap(); -} - -void godalLayerSetFeature(cctx *ctx, OGRLayerH layer, OGRFeatureH feat) { - godalWrap(ctx); - OGRErr gret = OGR_L_SetFeature(layer,feat); - if(gret!=0){ - forceOGRError(ctx,gret); - } - godalUnwrap(); -} - -void godalLayerSetGeometryColumnName(cctx *ctx, OGRLayerH layer, char *name) { - godalWrap(ctx); -#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 6, 0) - OGRGeomFieldDefnH fieldWithNewName = OGR_GFld_Create(name, OGRwkbGeometryType(0)); - OGRErr gret = OGR_L_AlterGeomFieldDefn(layer, 0, fieldWithNewName, ALTER_GEOM_FIELD_DEFN_NAME_FLAG); - if(gret!=0){ - forceOGRError(ctx,gret); - } -#else - CPLError(CE_Failure, CPLE_NotSupported, "OGR_L_AlterGeomFieldDefn is only supported in GDAL version >= 3.6"); -#endif - godalUnwrap(); -} - -void godalFeatureSetGeometryColumnName(cctx *ctx, OGRFeatureH feat, char *name) { - godalWrap(ctx); - OGRGeomFieldDefnH gfdef = OGR_F_GetGeomFieldDefnRef(feat, 0); - if(gfdef != nullptr){ - OGR_GFld_SetName(gfdef, name); - } - godalUnwrap(); -} - -void godalFeatureSetGeometry(cctx *ctx, OGRFeatureH feat, OGRGeometryH geom) { - godalWrap(ctx); - OGRErr gret = OGR_F_SetGeometry(feat,geom); - if(gret!=0){ - forceOGRError(ctx,gret); - } - godalUnwrap(); -} - -void godalFeatureSetFieldInteger(cctx *ctx, OGRFeatureH feat, int fieldIndex, int value) { - godalWrap(ctx); - OGR_F_SetFieldInteger(feat, fieldIndex, value); - godalUnwrap(); -} - -void godalFeatureSetFieldInteger64(cctx *ctx, OGRFeatureH feat, int fieldIndex, long long value) { - godalWrap(ctx); - OGR_F_SetFieldInteger64(feat, fieldIndex, value); - godalUnwrap(); -} - -void godalFeatureSetFieldDouble(cctx *ctx, OGRFeatureH feat, int fieldIndex, double value) { - godalWrap(ctx); - OGR_F_SetFieldDouble(feat, fieldIndex, value); - godalUnwrap(); -} - -void godalFeatureSetFieldString(cctx *ctx, OGRFeatureH feat, int fieldIndex, char *value) { - godalWrap(ctx); - OGR_F_SetFieldString(feat, fieldIndex, value); - godalUnwrap(); -} - -void godalFeatureSetFieldDateTime(cctx *ctx, OGRFeatureH feat, int fieldIndex, int year, int month, int day, int hour, int minute, int second, int tzFlag) { - godalWrap(ctx); - OGR_F_SetFieldDateTime(feat, fieldIndex, year, month, day, hour, minute, second, tzFlag); - godalUnwrap(); -} - -void godalFeatureSetFieldIntegerList(cctx *ctx, OGRFeatureH feat, int fieldIndex, int nbValues, int *values) { - godalWrap(ctx); - OGR_F_SetFieldIntegerList(feat, fieldIndex, nbValues, values); - godalUnwrap(); -} - -void godalFeatureSetFieldInteger64List(cctx *ctx, OGRFeatureH feat, int fieldIndex, int nbValues, long long *values) { - godalWrap(ctx); - OGR_F_SetFieldInteger64List(feat, fieldIndex, nbValues, values); - godalUnwrap(); -} - -void godalFeatureSetFieldDoubleList(cctx *ctx, OGRFeatureH feat, int fieldIndex, int nbValues, double *values) { - godalWrap(ctx); - OGR_F_SetFieldDoubleList(feat, fieldIndex, nbValues, values); - godalUnwrap(); -} - -void godalFeatureSetFieldStringList(cctx *ctx, OGRFeatureH feat, int fieldIndex, char **values) { - godalWrap(ctx); - OGR_F_SetFieldStringList(feat, fieldIndex, values); - godalUnwrap(); -} - -void godalFeatureSetFieldBinary(cctx *ctx, OGRFeatureH feat, int fieldIndex, int nbBytes, void *value) { - godalWrap(ctx); - OGR_F_SetFieldBinary(feat, fieldIndex, nbBytes, value); - godalUnwrap(); -} - -void godal_OGR_G_AddGeometry(cctx *ctx, OGRGeometryH geom, OGRGeometryH subGeom) { - godalWrap(ctx); - OGRErr gret = OGR_G_AddGeometry(geom,subGeom); - if(gret!=0){ - forceOGRError(ctx,gret); - } - godalUnwrap(); -} - -OGRGeometryH godal_OGR_G_Simplify(cctx *ctx, OGRGeometryH in, double tolerance) { - godalWrap(ctx); - OGRGeometryH ret = OGR_G_Simplify(in,tolerance); - if(ret==nullptr) { - forceError(ctx); - } - godalUnwrap(); - return ret; -} - -OGRGeometryH godal_OGR_G_Buffer(cctx *ctx, OGRGeometryH in, double tolerance, int segments) { - godalWrap(ctx); - OGRGeometryH ret = OGR_G_Buffer(in,tolerance,segments); - if(ret==nullptr) { - forceError(ctx); - } - godalUnwrap(); - return ret; -} - -OGRGeometryH godal_OGR_G_Difference(cctx *ctx, OGRGeometryH geom1, OGRGeometryH geom2) { - godalWrap(ctx); - OGRGeometryH ret = OGR_G_Difference(geom1, geom2); - if(ret==nullptr) { - forceError(ctx); - } - godalUnwrap(); - return ret; -} - -OGRGeometryH godal_OGR_G_GetGeometryRef(cctx *ctx, OGRGeometryH in, int subGeomIndex) { - godalWrap(ctx); - OGRGeometryH ret = OGR_G_GetGeometryRef(in, subGeomIndex); - if(ret==nullptr) { - forceError(ctx); - } - godalUnwrap(); - return ret; -} - -int godal_OGR_G_Intersects(cctx *ctx, OGRGeometryH geom1, OGRGeometryH geom2) { - godalWrap(ctx); - int ret = OGR_G_Intersects(geom1, geom2); - godalUnwrap(); - return ret; -} - -OGRGeometryH godal_OGR_G_Intersection(cctx *ctx, OGRGeometryH geom1, OGRGeometryH geom2) { - godalWrap(ctx); - OGRGeometryH ret = OGR_G_Intersection(geom1, geom2); - if(ret==nullptr) { - forceError(ctx); - } - godalUnwrap(); - return ret; -} - -OGRGeometryH godal_OGR_G_Union(cctx *ctx, OGRGeometryH geom1, OGRGeometryH geom2) { - godalWrap(ctx); - OGRGeometryH ret = OGR_G_Union(geom1, geom2); - if(ret==nullptr) { - forceError(ctx); - } - godalUnwrap(); - return ret; -} - -OGRLayerH godalCreateLayer(cctx *ctx, GDALDatasetH ds, char *name, OGRSpatialReferenceH sr, OGRwkbGeometryType gtype) { - godalWrap(ctx); - OGRLayerH ret = OGR_DS_CreateLayer(ds,name,sr,gtype,nullptr); - if(ret==nullptr) { - forceError(ctx); - } - godalUnwrap(); - return ret; -} - -OGRLayerH godalCopyLayer(cctx *ctx, GDALDatasetH ds, OGRLayerH layer, char *name) { - godalWrap(ctx); - OGRLayerH ret = OGR_DS_CopyLayer(ds,layer, name,nullptr); - if(ret==nullptr) { - forceError(ctx); - } - godalUnwrap(); - return ret; -} - -void godalLayerGetExtent(cctx *ctx, OGRLayerH layer, OGREnvelope *envelope) { - godalWrap(ctx); - OGRErr gret = OGR_L_GetExtent(layer, envelope, 1); - if (gret != OGRERR_NONE) { - forceOGRError(ctx,gret); - } else if(envelope==nullptr) { - forceError(ctx); - } - godalUnwrap(); -} - -void godalLayerFeatureCount(cctx *ctx, OGRLayerH layer, int *count) { - godalWrap(ctx); - GIntBig gcount = OGR_L_GetFeatureCount(layer, 1); - *count=(int)gcount; - godalUnwrap(); -} - -void godalGetColorTable(GDALRasterBandH bnd, GDALPaletteInterp *interp, int *nEntries, short **entries) { - GDALColorTableH ct = GDALGetRasterColorTable(bnd); - if( ct == nullptr ) { - *interp=GPI_Gray; - *nEntries=0; - *entries=nullptr; - return; - } - *interp = GDALGetPaletteInterpretation(ct); - *nEntries = GDALGetColorEntryCount(ct); - *entries = (short*)malloc(*nEntries*4*sizeof(short)); - for (int i=0;i<*nEntries;i++) { - const GDALColorEntry *ce = GDALGetColorEntry(ct,i); - (*entries)[i*4]=ce->c1; - (*entries)[i*4+1]=ce->c2; - (*entries)[i*4+2]=ce->c3; - (*entries)[i*4+3]=ce->c4; - } -} - -void godalSetColorTable(cctx *ctx, GDALRasterBandH bnd, GDALPaletteInterp interp, int nEntries, short *entries) { - godalWrap(ctx); - CPLErr gret; - if (nEntries == 0) - { - gret = GDALSetRasterColorTable(bnd, nullptr); - } - else - { - GDALColorTableH ct = GDALCreateColorTable(interp); - for (int i = nEntries - 1; i >= 0; i--) - { - GDALColorEntry gce = {entries[i * 4], entries[i * 4 + 1], entries[i * 4 + 2], entries[i * 4 + 3]}; - GDALSetColorEntry(ct, i, &gce); - } - gret = GDALSetRasterColorTable(bnd, ct); - GDALDestroyColorTable(ct); - } - if (gret != 0) { - forceOGRError(ctx,gret); - } - godalUnwrap(); -} - -VSILFILE *godalVSIOpen(cctx *ctx, const char *name) { - godalWrap(ctx); - VSILFILE *fp = VSIFOpenExL(name,"r",1); - if(fp==nullptr) { - forceError(ctx); - } - if(failed(ctx)&&fp!=nullptr) { - VSIFCloseL(fp); - fp=nullptr; - } - godalUnwrap(); - return fp; -} - -void godalVSIUnlink(cctx *ctx, const char *fname) { - godalWrap(ctx); - int ret = VSIUnlink(fname); - if(ret!=0) { - forceError(ctx); - } - godalUnwrap(); -} - -char* godalVSIClose(VSILFILE *f) { - cctx ctx{nullptr,0,0,nullptr}; - godalWrap(&ctx); - int ret = VSIFCloseL(f); - if(ret!=0) { - forceError(&ctx); - } - godalUnwrap(); - return ctx.errMessage; -} - -size_t godalVSIRead(VSILFILE *f, void *buf, int len, char **errmsg) { - cctx ctx{nullptr,0,0,nullptr}; - godalWrap(&ctx); - size_t read = VSIFReadL(buf,1,len,f); - godalUnwrap(); - *errmsg=ctx.errMessage; - return read; -} - -void godalRasterHistogram(cctx *ctx, GDALRasterBandH bnd, double *min, double *max, int *buckets, - unsigned long long **values, int bIncludeOutOfRange, int bApproxOK) { - godalWrap(ctx); - CPLErr ret = CE_None; - if (*buckets == 0) { - ret=GDALGetDefaultHistogramEx(bnd,min,max,buckets,values,1,nullptr,nullptr); - } else { - *values = (unsigned long long*) VSIMalloc(*buckets*sizeof(GUIntBig)); - ret=GDALGetRasterHistogramEx(bnd,*min,*max,*buckets,*values,bIncludeOutOfRange,bApproxOK,nullptr,nullptr); - } - if (ret != 0) { - forceCPLError(ctx,ret); - } - godalUnwrap(); -} - -void godalComputeRasterStatistics(cctx *ctx, GDALRasterBandH bnd, int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev){ - godalWrap(ctx); - CPLErr ret = CE_None; - ret = GDALComputeRasterStatistics(bnd, bApproxOK, pdfMin, pdfMax, pdfMean, pdfStdDev, nullptr, nullptr); - if (ret != 0) { - forceCPLError(ctx,ret); - } - godalUnwrap(); -} - -int godalGetRasterStatistics(cctx *ctx, GDALRasterBandH bnd, int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev){ - godalWrap(ctx); - CPLErr ret = CE_None; - ret = GDALGetRasterStatistics(bnd, bApproxOK, 0, pdfMin, pdfMax, pdfMean, pdfStdDev); - if (ret != 0 && ret != CE_Warning) { - forceCPLError(ctx,ret); - } - godalUnwrap(); - return (ret == 0); -} - - -void godalSetRasterStatistics(cctx *ctx, GDALRasterBandH bnd, double dfMin, double dfMax, double dfMean, double dfStdDev){ - godalWrap(ctx); - CPLErr ret = CE_None; - ret = GDALSetRasterStatistics(bnd, dfMin, dfMax, dfMean, dfStdDev); - if (ret != 0) { - forceCPLError(ctx,ret); - } - godalUnwrap(); -} - -void godalClearRasterStatistics(cctx *ctx, GDALDatasetH ds){ - godalWrap(ctx); -#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 2, 0) - GDALDatasetClearStatistics(ds); -#else - CPLError(CE_Failure, CPLE_NotSupported, "GDALDatasetClearStatistics not supported with gdal < 3.2"); -#endif - godalUnwrap(); -} - -OGRGeometryH godalNewGeometryFromGeoJSON(cctx *ctx, char *geoJSON) { - godalWrap(ctx); - OGRGeometryH gptr = OGR_G_CreateGeometryFromJson(geoJSON); - if (gptr == nullptr) { - forceError(ctx); - } - if (failed(ctx) && gptr != nullptr) { - OGR_G_DestroyGeometry(gptr); - gptr = nullptr; - } - godalUnwrap(); - return gptr; -} - -OGRGeometryH godalNewGeometryFromWKT(cctx *ctx, char *wkt, OGRSpatialReferenceH sr) { - godalWrap(ctx); - OGRGeometryH gptr = nullptr; - char **wktPtr = &wkt; - OGRErr gret = OGR_G_CreateFromWkt(wktPtr,sr,&gptr); - if (gret != OGRERR_NONE) { - forceOGRError(ctx,gret); - } else if(gptr==nullptr) { - forceError(ctx); - } - if(failed(ctx) && gptr!=nullptr) { - OGR_G_DestroyGeometry(gptr); - gptr=nullptr; - } - godalUnwrap(); - return gptr; -} - -OGRGeometryH godalNewGeometryFromWKB(cctx *ctx, void *wkb, int wkbLen, OGRSpatialReferenceH sr) { - godalWrap(ctx); - OGRGeometryH gptr=nullptr; - OGRErr gret = OGR_G_CreateFromWkb(wkb,sr,&gptr, wkbLen); - if (gret != OGRERR_NONE) { - forceOGRError(ctx,gret); - } else if(gptr==nullptr) { - forceError(ctx); - } - if(failed(ctx) && gptr!=nullptr) { - OGR_G_DestroyGeometry(gptr); - gptr=nullptr; - } - godalUnwrap(); - return gptr; -} - -char* godalExportGeometryWKT(cctx *ctx, OGRGeometryH in) { - godalWrap(ctx); - char *wkt=nullptr; - OGRErr gret = OGR_G_ExportToWkt(in,&wkt); - if (gret != OGRERR_NONE) { - forceOGRError(ctx,gret); - } else if(wkt==nullptr) { - forceError(ctx); - } - if(failed(ctx) && wkt!=nullptr) { - CPLFree(wkt); - wkt=nullptr; - } - godalUnwrap(); - return wkt; -} - -void godalExportGeometryWKB(cctx *ctx, void **wkb, int *wkbLen, OGRGeometryH in) { - godalWrap(ctx); - *wkbLen=OGR_G_WkbSize(in); - if (*wkbLen == 0) { - *wkb=nullptr; - godalUnwrap(); - return; - } - *wkb = malloc(*wkbLen); - OGRErr gret = OGR_G_ExportToIsoWkb(in,wkbNDR,(unsigned char*)*wkb); - if (gret != 0) { - forceOGRError(ctx,gret); - free(*wkb); - *wkb=nullptr; - } - godalUnwrap(); -} - -char* godalExportGeometryGeoJSON(cctx *ctx, OGRGeometryH in, int precision) { - godalWrap(ctx); - char* opts[2]; - char precOpt[64]; - snprintf(precOpt,64,"COORDINATE_PRECISION=%d",precision); - opts[0]=precOpt; - opts[1]=nullptr; - char *gj = OGR_G_ExportToJsonEx(in,opts); - if (gj==nullptr) { - forceError(ctx); - } - if (failed(ctx) && gj!=nullptr) { - CPLFree(gj); - gj=nullptr; - } - godalUnwrap(); - return gj; -} - -char* godalExportGeometryGML(cctx *ctx, OGRGeometryH in, char **switches) { - godalWrap(ctx); - char *gml = OGR_G_ExportToGMLEx(in, switches); - if(gml==nullptr) { - forceError(ctx); - } - if (failed(ctx) && gml!=nullptr) { - CPLFree(gml); - gml=nullptr; - } - godalUnwrap(); - return gml; -} - -void godalGeometryTransformTo(cctx *ctx, OGRGeometryH geom, OGRSpatialReferenceH sr) { - godalWrap(ctx); - OGRErr gret = OGR_G_TransformTo(geom,sr); - if (gret != 0) { - forceOGRError(ctx,gret); - } - OGR_G_AssignSpatialReference(geom, sr); - godalUnwrap(); -} - -void godalGeometryTransform(cctx *ctx, OGRGeometryH geom, OGRCoordinateTransformationH trn, OGRSpatialReferenceH dst) { - godalWrap(ctx); - OGRErr gret = OGR_G_Transform(geom,trn); - if (gret != 0) { - forceOGRError(ctx,gret); - } - OGR_G_AssignSpatialReference(geom, dst); - godalUnwrap(); -} - -void godalLayerCreateFeature(cctx *ctx, OGRLayerH layer, OGRFeatureH feat) { - godalWrap(ctx); - OGRErr oe = OGR_L_CreateFeature(layer,feat); - if(oe != OGRERR_NONE) { - forceOGRError(ctx,oe); - } - godalUnwrap(); -} - -OGRFeatureH godalLayerNewFeature(cctx *ctx, OGRLayerH layer, OGRGeometryH geom) { - godalWrap(ctx); - OGRFeatureH hFeature = OGR_F_Create( OGR_L_GetLayerDefn( layer ) ); - if(hFeature==nullptr) { - forceError(ctx); - godalUnwrap(); - return nullptr; - } - OGRErr oe=OGRERR_NONE; - if (hFeature!=nullptr && geom!=nullptr) { - oe = OGR_F_SetGeometry(hFeature,geom); - if (oe == OGRERR_NONE) { - oe = OGR_L_CreateFeature(layer,hFeature); - } - } - if(oe != OGRERR_NONE) { - forceOGRError(ctx,oe); - } - if(failed(ctx) && hFeature!=nullptr) { - OGR_F_Destroy(hFeature); - hFeature=nullptr; - } - godalUnwrap(); - return hFeature; -} - -GDALDatasetH godalBuildVRT(cctx *ctx, char *dstName, char **sources, char **switches) { - godalWrap(ctx); - GDALBuildVRTOptions *ropts = GDALBuildVRTOptionsNew(switches,nullptr); - if(failed(ctx)) { - GDALBuildVRTOptionsFree(ropts); - godalUnwrap(); - return nullptr; - } - int usageErr=0; - int nSources = 0; - char **src = sources; - for( char **src = sources; *src; src++) { - nSources++; - } - - GDALDatasetH ret = GDALBuildVRT(dstName, nSources, nullptr, sources, ropts, &usageErr); - GDALBuildVRTOptionsFree(ropts); - if(ret==nullptr || usageErr!=0) { - forceError(ctx); - } - godalUnwrap(); - return ret; -} - -namespace cpl -{ - - /************************************************************************/ - /* VSIGoFilesystemHandler */ - /************************************************************************/ - - class VSIGoFilesystemHandler final : public VSIFilesystemHandler - { - CPL_DISALLOW_COPY_ASSIGN(VSIGoFilesystemHandler) - private: - size_t m_buffer, m_cache; - - public: - VSIGoFilesystemHandler(size_t bufferSize, size_t cacheSize); - ~VSIGoFilesystemHandler() override; - - VSIVirtualHandle *Open(const char *pszFilename, - const char *pszAccess, - bool bSetError -#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 3, 0) - , CSLConstList /*papszOptions*/ -#endif - ) override; - - int Stat(const char *pszFilename, VSIStatBufL *pStatBuf, int nFlags) override; -#if GDAL_VERSION_NUM >= 3020000 - char **SiblingFiles(const char *pszFilename) override; -#endif - int HasOptimizedReadMultiRange(const char *pszPath) override; - }; - - /************************************************************************/ - /* VSIGoHandle */ - /************************************************************************/ - - class VSIGoHandle final : public VSIVirtualHandle - { - CPL_DISALLOW_COPY_ASSIGN(VSIGoHandle) - private: - char *m_filename; - vsi_l_offset m_cur, m_size; - int m_eof; - - public: - VSIGoHandle(const char *filename, vsi_l_offset size); - ~VSIGoHandle() override; - -#if GDAL_VERSION_NUM >= 3060000 - bool HasPRead() const override; - size_t PRead(void * /*pBuffer*/, size_t /* nSize */, vsi_l_offset /*nOffset*/) const override; -#endif - vsi_l_offset Tell() override; - int Seek(vsi_l_offset nOffset, int nWhence) override; - size_t Read(void *pBuffer, size_t nSize, size_t nCount) override; - int ReadMultiRange(int nRanges, void **ppData, const vsi_l_offset *panOffsets, const size_t *panSizes) override; - VSIRangeStatus GetRangeStatus(vsi_l_offset nOffset, vsi_l_offset nLength) override; - int Eof() override; - int Close() override; - size_t Write(const void *pBuffer, size_t nSize, size_t nCount) override; - int Flush() override; - int Truncate(vsi_l_offset nNewSize) override; - }; - - VSIGoHandle::VSIGoHandle(const char *filename, vsi_l_offset size) - { - m_filename = strdup(filename); - m_cur = 0; - m_eof = 0; - m_size = size; - } - - VSIGoHandle::~VSIGoHandle() - { - free(m_filename); - } - - size_t VSIGoHandle::Write(const void *pBuffer, size_t nSize, size_t nCount) - { - CPLError(CE_Failure, CPLE_AppDefined, "Write not implemented for go handlers"); - return -1; - } - int VSIGoHandle::Flush() - { - CPLError(CE_Failure, CPLE_AppDefined, "Flush not implemented for go handlers"); - return -1; - } - int VSIGoHandle::Truncate(vsi_l_offset nNewSize) - { - CPLError(CE_Failure, CPLE_AppDefined, "Truncate not implemented for go handlers"); - return -1; - } - int VSIGoHandle::Seek(vsi_l_offset nOffset, int nWhence) - { - if (nWhence == SEEK_SET) - { - m_cur = nOffset; - } - else if (nWhence == SEEK_CUR) - { - m_cur += nOffset; - } - else - { - m_cur = m_size; - } - m_eof = 0; - return 0; - } - - vsi_l_offset VSIGoHandle::Tell() - { - return m_cur; - } - - int VSIGoHandle::Eof() - { - return m_eof; - } - - int VSIGoHandle::Close() - { - return 0; - } - - size_t VSIGoHandle::Read(void *pBuffer, size_t nSize, size_t nCount) - { - if (nSize * nCount == 0) - { - return 0; - } - char *err = nullptr; - size_t read = _gogdalReadCallback(m_filename, pBuffer, m_cur, nSize * nCount, &err); - if (err) - { - CPLError(CE_Failure, CPLE_AppDefined, "%s", err); - errno = EIO; - free(err); - return 0; - } - if (read != nSize * nCount) - { - m_eof = 1; - } - size_t readblocks = read / nSize; - m_cur += readblocks * nSize; - return readblocks; - } - -#if GDAL_VERSION_NUM >= 3060000 - bool VSIGoHandle::HasPRead() const - { - return true; - } - size_t VSIGoHandle::PRead( void* pBuffer, size_t nSize, vsi_l_offset nOffset ) const - { - char *err = nullptr; - _gogdalMultiReadCallback(m_filename, 1, &pBuffer, (void *)&nOffset, (void *)&nSize, - &err); - if (err) - { - CPLError(CE_Failure, CPLE_AppDefined, "%s", err); - errno = EIO; - free(err); - return 0; - } - return nSize; - } -#endif - - int VSIGoHandle::ReadMultiRange(int nRanges, void **ppData, const vsi_l_offset *panOffsets, const size_t *panSizes) - { - int iRange; - int nMergedRanges = 1; - for (iRange = 0; iRange < nRanges - 1; iRange++) - { - if (panOffsets[iRange] + panSizes[iRange] != panOffsets[iRange + 1]) - { - nMergedRanges++; - } - } - char *err = nullptr; - if (nMergedRanges == nRanges) - { - int ret = _gogdalMultiReadCallback(m_filename, nRanges, (void *)ppData, (void *)panOffsets, (void *)panSizes, &err); - if (err) - { - CPLError(CE_Failure, CPLE_AppDefined, "%s", err); - errno = EIO; - free(err); - return -1; - } - return ret; - } - - vsi_l_offset *mOffsets = new vsi_l_offset[nMergedRanges]; - size_t *mSizes = new size_t[nMergedRanges]; - char **mData = new char *[nMergedRanges]; - - int curRange = 0; - mSizes[curRange] = panSizes[0]; - mOffsets[curRange] = panOffsets[0]; - for (iRange = 0; iRange < nRanges - 1; iRange++) - { - if (panOffsets[iRange] + panSizes[iRange] == panOffsets[iRange + 1]) - { - mSizes[curRange] += panSizes[iRange + 1]; - } - else - { - mData[curRange] = new char[mSizes[curRange]]; - //start a new range - curRange++; - mSizes[curRange] = panSizes[iRange + 1]; - mOffsets[curRange] = panOffsets[iRange + 1]; - } - } - mData[curRange] = new char[mSizes[curRange]]; - - int ret = _gogdalMultiReadCallback(m_filename, nRanges, (void *)ppData, (void *)panOffsets, (void *)panSizes, &err); - - if (err == nullptr) - { - curRange = 0; - size_t curOffset = panSizes[0]; - memcpy(ppData[0], mData[0], panSizes[0]); - for (iRange = 0; iRange < nRanges - 1; iRange++) - { - if (panOffsets[iRange] + panSizes[iRange] == panOffsets[iRange + 1]) - { - memcpy(ppData[iRange + 1], mData[curRange] + curOffset, panSizes[iRange + 1]); - curOffset += panSizes[iRange + 1]; - } - else - { - curRange++; - memcpy(ppData[iRange + 1], mData[curRange], panSizes[iRange + 1]); - curOffset = panSizes[iRange + 1]; - } - } - } - else - { - CPLError(CE_Failure, CPLE_AppDefined, "%s", err); - errno = EIO; - free(err); - ret = -1; - } - - delete[] mOffsets; - delete[] mSizes; - for (int i = 0; i < nMergedRanges; i++) - { - delete[] mData[i]; - } - delete[] mData; - - return ret; - } - - VSIRangeStatus VSIGoHandle::GetRangeStatus(vsi_l_offset nOffset, vsi_l_offset nLength) - { - return VSI_RANGE_STATUS_UNKNOWN; - } - - VSIGoFilesystemHandler::VSIGoFilesystemHandler(size_t bufferSize, size_t cacheSize) - { - m_buffer = bufferSize; - m_cache = (cacheSize < bufferSize) ? bufferSize : cacheSize; - } - VSIGoFilesystemHandler::~VSIGoFilesystemHandler() {} - - VSIVirtualHandle *VSIGoFilesystemHandler::Open(const char *pszFilename, - const char *pszAccess, - bool bSetError -#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 3, 0) - , CSLConstList /*papszOptions*/ -#endif - ) - { - if (strchr(pszAccess, 'w') != NULL || - strchr(pszAccess, '+') != NULL) - { - CPLError(CE_Failure, CPLE_AppDefined, "Only read-only mode is supported"); - return nullptr; - } - char *err = nullptr; - long long s = _gogdalSizeCallback((char *)pszFilename, &err); - - if (s == -1) - { - if (err != nullptr && bSetError) - { - VSIError(VSIE_FileError, "%s", err); - } - errno = ENOENT; - return nullptr; - } - if (m_buffer == 0) - { - return new VSIGoHandle(pszFilename, s); - } - else - { - return VSICreateCachedFile(new VSIGoHandle(pszFilename, s), m_buffer, m_cache); - } - } - - int VSIGoFilesystemHandler::Stat(const char *pszFilename, - VSIStatBufL *pStatBuf, - int nFlags) - { - char *err = nullptr; - long long s = _gogdalSizeCallback((char *)pszFilename, &err); - if (s == -1) - { - if (nFlags & VSI_STAT_SET_ERROR_FLAG) - { - CPLError(CE_Failure, CPLE_AppDefined, "%s", err); - errno = ENOENT; - } - return -1; - } - memset(pStatBuf, 0, sizeof(VSIStatBufL)); - pStatBuf->st_mode = S_IFREG; - - if (nFlags & VSI_STAT_SIZE_FLAG) - { - pStatBuf->st_size = s; - } - return 0; - } - - int VSIGoFilesystemHandler::HasOptimizedReadMultiRange(const char * /*pszPath*/) - { - return TRUE; - } - -#if GDAL_VERSION_NUM >= 3020000 - char **VSIGoFilesystemHandler::SiblingFiles(const char *pszFilename) - { - return (char **)calloc(1, sizeof(char *)); - } -#endif - -} // namespace cpl - -void VSIInstallGoHandler(cctx *ctx, const char *pszPrefix, size_t bufferSize, size_t cacheSize) -{ - godalWrap(ctx); - CSLConstList papszPrefix = VSIFileManager::GetPrefixes(); - for( size_t i = 0; papszPrefix && papszPrefix[i]; ++i ) { - if(strcmp(papszPrefix[i],pszPrefix)==0) { - CPLError(CE_Failure, CPLE_AppDefined, "handler already registered on prefix"); - godalUnwrap(); - return; - } - } - VSIFilesystemHandler *poHandler = new cpl::VSIGoFilesystemHandler(bufferSize, cacheSize); - const std::string sPrefix(pszPrefix); - VSIFileManager::InstallHandler(sPrefix, poHandler); - godalUnwrap(); -} - -void test_godal_error_handling(cctx *ctx) { - godalWrap(ctx); - CPLDebug("godal","this is a debug message"); - CPLError(CE_Warning, CPLE_AppDefined, "this is a warning message"); - CPLError(CE_Failure, CPLE_AppDefined, "this is a failure message"); - godalUnwrap(); -} - -void godalGridCreate(cctx *ctx, char *pszAlgorithm, GDALGridAlgorithm eAlgorithm, GUInt32 nPoints, const double *padfX, const double *padfY, const double *padfZ, double dfXMin, - double dfXMax, double dfYMin, double dfYMax, GUInt32 nXSize, GUInt32 nYSize, GDALDataType eType, void *pData) { - godalWrap(ctx); - CPLErr ret; - - if (!GDALHasTriangulation() && eAlgorithm == GGA_Linear) { - CPLError(CE_Failure, CPLE_AppDefined, "unable to run GGA_Linear algorithm, since GDAL built without QHull support"); - godalUnwrap(); - return; - } - - void *ppOptions; -#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 7, 0) - ret = GDALGridParseAlgorithmAndOptions(pszAlgorithm, &eAlgorithm, &ppOptions); -#else - ret = ParseAlgorithmAndOptions(pszAlgorithm, &eAlgorithm, &ppOptions); -#endif - if(ret!=0) { - forceCPLError(ctx, ret); - godalUnwrap(); - return; - } - - ret = GDALGridCreate(eAlgorithm, ppOptions, nPoints, padfX, padfY, - padfZ, dfXMin, dfXMax, dfYMin, dfYMax, nXSize, nYSize, - eType, pData, nullptr, nullptr); - if(ret!=0) { - forceCPLError(ctx, ret); - } - - godalUnwrap(); -} - -GDALDatasetH godalGrid(cctx *ctx, const char *pszDest, GDALDatasetH hSrcDS, char **switches) { - godalWrap(ctx); - - GDALGridOptions *gridopts = GDALGridOptionsNew(switches,nullptr); - if(failed(ctx)) { - GDALGridOptionsFree(gridopts); - godalUnwrap(); - return nullptr; - } - - - int usageErr=0; - GDALDatasetH ret = GDALGrid(pszDest, hSrcDS, gridopts, &usageErr); - GDALGridOptionsFree(gridopts); - if(ret==nullptr || usageErr!=0) { - forceError(ctx); - } - - godalUnwrap(); - return ret; -} - -GDALDatasetH godalNearblack(cctx *ctx, const char *pszDest, GDALDatasetH hDstDS, GDALDatasetH hSrcDS, char **switches) { - godalWrap(ctx); - - GDALNearblackOptions *nbopts = GDALNearblackOptionsNew(switches,nullptr); - if(failed(ctx)) { - GDALNearblackOptionsFree(nbopts); - godalUnwrap(); - return nullptr; - } - - int usageErr=0; - GDALDatasetH ret = GDALNearblack(pszDest, hDstDS, hSrcDS, nbopts, &usageErr); - GDALNearblackOptionsFree(nbopts); - if(ret==nullptr || usageErr!=0) { - forceError(ctx); - } - - godalUnwrap(); - return ret; -} - -GDALDatasetH godalDem(cctx *ctx, const char *pszDest, const char *pszProcessing, const char *pszColorFilename, GDALDatasetH hSrcDS, char **switches) { - godalWrap(ctx); - - GDALDEMProcessingOptions *demopts = GDALDEMProcessingOptionsNew(switches,nullptr); - if(failed(ctx)) { - GDALDEMProcessingOptionsFree(demopts); - godalUnwrap(); - return nullptr; - } - - int usageErr=0; - GDALDatasetH ret = GDALDEMProcessing(pszDest, hSrcDS, pszProcessing, pszColorFilename, demopts, &usageErr); - GDALDEMProcessingOptionsFree(demopts); - if(ret==nullptr || usageErr!=0) { - forceError(ctx); - } - - godalUnwrap(); - return ret; -} - -OGRSpatialReferenceH godalGetGCPSpatialRef(GDALDatasetH hSrcDS) { - return GDALGetGCPSpatialRef(hSrcDS); -} - -const GCPsAndCount godalGetGCPs(GDALDatasetH hSrcDS) { - return GCPsAndCount { - .gcpList = GDALGetGCPs(hSrcDS), - .numGCPs = GDALGetGCPCount(hSrcDS), - }; -} - -const char *godalGetGCPProjection(GDALDatasetH hSrcDS) { - return GDALGetGCPProjection(hSrcDS); -} - -void godalSetGCPs(cctx *ctx, GDALDatasetH hSrcDS, int numGCPs, goGCPList GCPList, const char *pszGCPProjection) { - godalWrap(ctx); - - GDAL_GCP *GDALGCPList = goGCPListToGDALGCP(GCPList, numGCPs); - - CPLErr ret = GDALSetGCPs(hSrcDS, numGCPs, GDALGCPList, pszGCPProjection); - if(ret!=0) { - forceCPLError(ctx, ret); - } - - GDALDeinitGCPs(numGCPs, GDALGCPList); - CPLFree(GDALGCPList); - - godalUnwrap(); - return; -} - -void godalSetGCPs2(cctx *ctx, GDALDatasetH hSrcDS, int numGCPs, goGCPList GCPList, OGRSpatialReferenceH hSRS) { - godalWrap(ctx); - - GDAL_GCP *GDALGCPList = goGCPListToGDALGCP(GCPList, numGCPs); - - CPLErr ret = GDALSetGCPs2(hSrcDS, numGCPs, GDALGCPList, hSRS); - if(ret!=0) { - forceCPLError(ctx, ret); - } - - GDALDeinitGCPs(numGCPs, GDALGCPList); - CPLFree(GDALGCPList); - - godalUnwrap(); - return; -} - -GDAL_GCP *goGCPListToGDALGCP(goGCPList GCPList, int numGCPs) { - GDAL_GCP *ret = static_cast(CPLCalloc(numGCPs, sizeof(GDAL_GCP))); - GDALInitGCPs(numGCPs, ret); - - for (int i = 0; i < numGCPs; i++) - { - ret[i].pszId = CPLStrdup(GCPList.pszIds[i]); - ret[i].pszInfo = CPLStrdup(GCPList.pszInfos[i]); - ret[i].dfGCPPixel = GCPList.dfGCPPixels[i]; - ret[i].dfGCPLine = GCPList.dfGCPLines[i]; - ret[i].dfGCPX = GCPList.dfGCPXs[i]; - ret[i].dfGCPY = GCPList.dfGCPYs[i]; - ret[i].dfGCPZ = GCPList.dfGCPZs[i]; - } - - return ret; -} - -void godalGCPListToGeoTransform(cctx *ctx, goGCPList GCPList, int numGCPs, double *gt){ - godalWrap(ctx); - - GDAL_GCP *GDALGCPList = goGCPListToGDALGCP(GCPList, numGCPs); - - int ret = GDALGCPsToGeoTransform(numGCPs, GDALGCPList, gt, TRUE); - if(ret!=TRUE) { - forceError(ctx); - } - - GDALDeinitGCPs(numGCPs, GDALGCPList); - CPLFree(GDALGCPList); - - godalUnwrap(); -} \ No newline at end of file diff --git a/vendor/github.com/airbusgeo/godal/godal.go b/vendor/github.com/airbusgeo/godal/godal.go deleted file mode 100644 index 30f25c1..0000000 --- a/vendor/github.com/airbusgeo/godal/godal.go +++ /dev/null @@ -1,4221 +0,0 @@ -// Copyright 2021 Airbus Defence and Space -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package godal - -/* -#include "godal.h" -#include - -#cgo pkg-config: gdal -#cgo CXXFLAGS: -std=c++11 -#cgo LDFLAGS: -ldl -*/ -import "C" -import ( - "errors" - "fmt" - "io" - "path/filepath" - "strconv" - "strings" - "sync" - "time" - "unsafe" -) - -// DataType is a pixel data types -type DataType int - -const ( - //Unknown / Unset Datatype - Unknown = DataType(C.GDT_Unknown) - //Byte / UInt8 - Byte = DataType(C.GDT_Byte) - //UInt16 DataType - UInt16 = DataType(C.GDT_UInt16) - //Int16 DataType - Int16 = DataType(C.GDT_Int16) - //UInt32 DataType - UInt32 = DataType(C.GDT_UInt32) - //Int32 DataType - Int32 = DataType(C.GDT_Int32) - //Float32 DataType - Float32 = DataType(C.GDT_Float32) - //Float64 DataType - Float64 = DataType(C.GDT_Float64) - //CInt16 is a complex Int16 - CInt16 = DataType(C.GDT_CInt16) - //CInt32 is a complex Int32 - CInt32 = DataType(C.GDT_CInt32) - //CFloat32 is a complex Float32 - CFloat32 = DataType(C.GDT_CFloat32) - //CFloat64 is a complex Float64 - CFloat64 = DataType(C.GDT_CFloat64) -) - -// ErrorCategory wraps GDAL's error types -type ErrorCategory int - -const ( - // CE_None is not an error - CE_None = ErrorCategory(C.CE_None) - // CE_Debug is a debug level - CE_Debug = ErrorCategory(C.CE_Debug) - // CE_Warning is a warning levele - CE_Warning = ErrorCategory(C.CE_Warning) - // CE_Failure is an error - CE_Failure = ErrorCategory(C.CE_Failure) - // CE_Fatal is an unrecoverable error - CE_Fatal = ErrorCategory(C.CE_Fatal) -) - -// String implements Stringer -func (dtype DataType) String() string { - return C.GoString(C.GDALGetDataTypeName(C.GDALDataType(dtype))) -} - -// Size retruns the number of bytes needed for one instance of DataType -func (dtype DataType) Size() int { - switch dtype { - case Byte: - return 1 - case Int16, UInt16: - return 2 - case Int32, UInt32, Float32, CInt16: - return 4 - case CInt32, Float64, CFloat32: - return 8 - case CFloat64: - return 16 - default: - panic("unsupported type") - } -} - -// ColorInterp is a band's color interpretation -type ColorInterp int - -const ( - //CIUndefined is an undefined ColorInterp - CIUndefined = ColorInterp(C.GCI_Undefined) - //CIGray is a gray level ColorInterp - CIGray = ColorInterp(C.GCI_GrayIndex) - //CIPalette is an undefined ColorInterp - CIPalette = ColorInterp(C.GCI_PaletteIndex) - //CIRed is a paletted ColorInterp - CIRed = ColorInterp(C.GCI_RedBand) - //CIGreen is a Green ColorInterp - CIGreen = ColorInterp(C.GCI_GreenBand) - //CIBlue is a Blue ColorInterp - CIBlue = ColorInterp(C.GCI_BlueBand) - //CIAlpha is an Alpha/Transparency ColorInterp - CIAlpha = ColorInterp(C.GCI_AlphaBand) - //CIHue is an HSL Hue ColorInterp - CIHue = ColorInterp(C.GCI_HueBand) - //CISaturation is an HSL Saturation ColorInterp - CISaturation = ColorInterp(C.GCI_SaturationBand) - //CILightness is an HSL Lightness ColorInterp - CILightness = ColorInterp(C.GCI_LightnessBand) - //CICyan is an CMYK Cyan ColorInterp - CICyan = ColorInterp(C.GCI_CyanBand) - //CIMagenta is an CMYK Magenta ColorInterp - CIMagenta = ColorInterp(C.GCI_MagentaBand) - //CIYellow is an CMYK Yellow ColorInterp - CIYellow = ColorInterp(C.GCI_YellowBand) - //CIBlack is an CMYK Black ColorInterp - CIBlack = ColorInterp(C.GCI_BlackBand) - //CIY is a YCbCr Y ColorInterp - CIY = ColorInterp(C.GCI_YCbCr_YBand) - //CICb is a YCbCr Cb ColorInterp - CICb = ColorInterp(C.GCI_YCbCr_CbBand) - //CICr is a YCbCr Cr ColorInterp - CICr = ColorInterp(C.GCI_YCbCr_CrBand) - //CIMax is an maximum ColorInterp - CIMax = ColorInterp(C.GCI_Max) -) - -// Name returns the ColorInterp's name -func (colorInterp ColorInterp) Name() string { - return C.GoString(C.GDALGetColorInterpretationName(C.GDALColorInterp(colorInterp))) -} - -// Band is a wrapper around a GDALRasterBandH -type Band struct { - majorObject -} - -// handle() returns a pointer to the underlying GDALRasterBandH -func (band Band) handle() C.GDALRasterBandH { - return C.GDALRasterBandH(band.majorObject.cHandle) -} - -// Structure returns the dataset's Structure -func (band Band) Structure() BandStructure { - var sx, sy, bsx, bsy, dtype C.int - var scale, offset C.double - C.godalBandStructure(band.handle(), &sx, &sy, &bsx, &bsy, &scale, &offset, &dtype) - return BandStructure{ - SizeX: int(sx), - SizeY: int(sy), - BlockSizeX: int(bsx), - BlockSizeY: int(bsy), - Scale: float64(scale), - Offset: float64(offset), - DataType: DataType(int(dtype)), - } -} - -// NoData returns the band's nodata value. if ok is false, the band does not -// have a nodata value set -func (band Band) NoData() (nodata float64, ok bool) { - cok := C.int(0) - cn := C.GDALGetRasterNoDataValue(band.handle(), &cok) - if cok != 0 { - return float64(cn), true - } - return 0, false -} - -// SetNoData sets the band's nodata value -func (band Band) SetNoData(nd float64, opts ...SetNoDataOption) error { - sndo := &setNodataOpts{} - for _, opt := range opts { - opt.setSetNoDataOpt(sndo) - } - cgc := createCGOContext(nil, sndo.errorHandler) - C.godalSetRasterNoDataValue(cgc.cPointer(), band.handle(), C.double(nd)) - return cgc.close() -} - -// ClearNoData clears the band's nodata value -func (band Band) ClearNoData(opts ...SetNoDataOption) error { - sndo := &setNodataOpts{} - for _, opt := range opts { - opt.setSetNoDataOpt(sndo) - } - cgc := createCGOContext(nil, sndo.errorHandler) - C.godalDeleteRasterNoDataValue(cgc.cPointer(), band.handle()) - return cgc.close() -} - -// SetScaleOffset sets the band's scale and offset -func (band Band) SetScaleOffset(scale, offset float64, opts ...SetScaleOffsetOption) error { - setterOpts := &setScaleOffsetOpts{} - for _, opt := range opts { - opt.setSetScaleOffsetOpt(setterOpts) - } - cgc := createCGOContext(nil, setterOpts.errorHandler) - C.godalSetRasterScaleOffset(cgc.cPointer(), band.handle(), C.double(scale), C.double(offset)) - return cgc.close() -} - -// ClearScaleOffset clears the band's scale and offset -func (band Band) ClearScaleOffset(opts ...SetScaleOffsetOption) error { - return band.SetScaleOffset(1.0, 0.0, opts...) -} - -// ColorInterp returns the band's color interpretation (defaults to Gray) -func (band Band) ColorInterp() ColorInterp { - colorInterp := C.GDALGetRasterColorInterpretation(band.handle()) - return ColorInterp(colorInterp) -} - -// SetColorInterp sets the band's color interpretation -func (band Band) SetColorInterp(colorInterp ColorInterp, opts ...SetColorInterpOption) error { - scio := &setColorInterpOpts{} - for _, opt := range opts { - opt.setSetColorInterpOpt(scio) - } - - cgc := createCGOContext(nil, scio.errorHandler) - C.godalSetRasterColorInterpretation(cgc.cPointer(), band.handle(), C.GDALColorInterp(colorInterp)) - return cgc.close() -} - -// MaskFlags returns the mask flags associated with this band. -// -// See https://gdal.org/development/rfc/rfc15_nodatabitmask.html for how this flag -// should be interpreted -func (band Band) MaskFlags() int { - return int(C.GDALGetMaskFlags(band.handle())) -} - -// MaskBand returns the mask (nodata) band for this band. May be generated from nodata values. -func (band Band) MaskBand() Band { - hndl := C.GDALGetMaskBand(band.handle()) - return Band{majorObject{C.GDALMajorObjectH(hndl)}} -} - -// CreateMask creates a mask (nodata) band for this band. -// -// Any handle returned by a previous call to MaskBand() should not be used after a call to CreateMask -// See https://gdal.org/development/rfc/rfc15_nodatabitmask.html for how flag should be used -func (band Band) CreateMask(flags int, opts ...BandCreateMaskOption) (Band, error) { - gopts := bandCreateMaskOpts{} - for _, opt := range opts { - opt.setBandCreateMaskOpt(&gopts) - } - cgc := createCGOContext(gopts.config, gopts.errorHandler) - hndl := C.godalCreateMaskBand(cgc.cPointer(), band.handle(), C.int(flags)) - if err := cgc.close(); err != nil { - return Band{}, err - } - return Band{majorObject{C.GDALMajorObjectH(hndl)}}, nil -} - -// Fill sets the whole band uniformely to (real,imag) -func (band Band) Fill(real, imag float64, opts ...FillBandOption) error { - fo := &fillBandOpts{} - for _, o := range opts { - o.setFillBandOpt(fo) - } - cgc := createCGOContext(nil, fo.errorHandler) - C.godalFillRaster(cgc.cPointer(), band.handle(), C.double(real), C.double(imag)) - return cgc.close() -} - -// Read populates the supplied buffer with the pixels contained in the supplied window -func (band Band) Read(srcX, srcY int, buffer interface{}, bufWidth, bufHeight int, opts ...BandIOOption) error { - return band.IO(IORead, srcX, srcY, buffer, bufWidth, bufHeight, opts...) -} - -// Write sets the dataset's pixels contained in the supplied window to the content of the supplied buffer -func (band Band) Write(srcX, srcY int, buffer interface{}, bufWidth, bufHeight int, opts ...BandIOOption) error { - return band.IO(IOWrite, srcX, srcY, buffer, bufWidth, bufHeight, opts...) -} - -// IO reads or writes the pixels contained in the supplied window -func (band Band) IO(rw IOOperation, srcX, srcY int, buffer interface{}, bufWidth, bufHeight int, opts ...BandIOOption) error { - ro := bandIOOpts{} - for _, opt := range opts { - opt.setBandIOOpt(&ro) - } - if ro.dsHeight == 0 { - ro.dsHeight = bufHeight - } - if ro.dsWidth == 0 { - ro.dsWidth = bufWidth - } - dtype := bufferType(buffer) - dsize := dtype.Size() - - pixelSpacing := dsize - if ro.pixelSpacing > 0 { - pixelSpacing = ro.pixelSpacing - } - if ro.pixelStride > 0 { - pixelSpacing = ro.pixelStride * dsize - } - lineSpacing := bufWidth * pixelSpacing - if ro.lineSpacing > 0 { - lineSpacing = ro.lineSpacing - } - if ro.lineStride > 0 { - lineSpacing = ro.lineStride * dsize - } - - minsize := (lineSpacing*(bufHeight-1) + (bufWidth-1)*pixelSpacing + dsize) / dsize - cBuf := cBuffer(buffer, minsize) - //fmt.Fprintf(os.Stderr, "%v %d %d %d\n", ro.bands, pixelSpacing, lineSpacing, bandSpacing) - ralg, err := ro.resampling.rioAlg() - if err != nil { - return err - } - cgc := createCGOContext(ro.config, ro.errorHandler) - C.godalBandRasterIO(cgc.cPointer(), band.handle(), C.GDALRWFlag(rw), - C.int(srcX), C.int(srcY), C.int(ro.dsWidth), C.int(ro.dsHeight), - cBuf, - C.int(bufWidth), C.int(bufHeight), C.GDALDataType(dtype), - C.int(pixelSpacing), C.int(lineSpacing), ralg) - return cgc.close() -} - -// Polygonize wraps GDALPolygonize -func (band Band) Polygonize(dstLayer Layer, opts ...PolygonizeOption) error { - popt := polygonizeOpts{ - pixFieldIndex: -1, - } - maskBand := band.MaskBand() - popt.mask = &maskBand - - for _, opt := range opts { - opt.setPolygonizeOpt(&popt) - } - copts := sliceToCStringArray(popt.options) - defer copts.free() - var cMaskBand C.GDALRasterBandH = nil - if popt.mask != nil { - cMaskBand = popt.mask.handle() - } - - cgc := createCGOContext(nil, popt.errorHandler) - C.godalPolygonize(cgc.cPointer(), band.handle(), cMaskBand, dstLayer.handle(), C.int(popt.pixFieldIndex), copts.cPointer()) - return cgc.close() -} - -// FillNoData wraps GDALFillNodata() -func (band Band) FillNoData(opts ...FillNoDataOption) error { - popt := fillnodataOpts{ - maxDistance: 100, - iterations: 0, - } - - for _, opt := range opts { - opt.setFillnodataOpt(&popt) - } - //copts := sliceToCStringArray(popt.options) - //defer copts.free() - var cMaskBand C.GDALRasterBandH = nil - if popt.mask != nil { - cMaskBand = popt.mask.handle() - } - - cgc := createCGOContext(nil, popt.errorHandler) - C.godalFillNoData(cgc.cPointer(), band.handle(), cMaskBand, C.int(popt.maxDistance), C.int(popt.iterations), nil) - return cgc.close() -} - -// SieveFilter wraps GDALSieveFilter -func (band Band) SieveFilter(sizeThreshold int, opts ...SieveFilterOption) error { - sfopt := sieveFilterOpts{ - dstBand: &band, - connectedness: 4, - } - maskBand := band.MaskBand() - sfopt.mask = &maskBand - - for _, opt := range opts { - opt.setSieveFilterOpt(&sfopt) - } - var cMaskBand C.GDALRasterBandH = nil - if sfopt.mask != nil { - cMaskBand = sfopt.mask.handle() - } - cgc := createCGOContext(nil, sfopt.errorHandler) - C.godalSieveFilter(cgc.cPointer(), band.handle(), cMaskBand, sfopt.dstBand.handle(), - C.int(sizeThreshold), C.int(sfopt.connectedness)) - return cgc.close() -} - -// Overviews returns all overviews of band -func (band Band) Overviews() []Band { - cbands := C.godalBandOverviews(band.handle()) - if cbands == nil { - return nil - } - defer C.free(unsafe.Pointer(cbands)) - //https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices - sBands := (*[1 << 30]C.GDALRasterBandH)(unsafe.Pointer(cbands)) - bands := []Band{} - i := 0 - for { - if sBands[i] == nil { - return bands - } - bands = append(bands, Band{majorObject{C.GDALMajorObjectH(sBands[i])}}) - i++ - } -} - -// Histogram returns or computes the bands histogram -func (band Band) Histogram(opts ...HistogramOption) (Histogram, error) { - hopt := histogramOpts{} - for _, o := range opts { - o.setHistogramOpt(&hopt) - } - var values *C.ulonglong = nil - defer C.VSIFree(unsafe.Pointer(values)) - - cgc := createCGOContext(nil, hopt.errorHandler) - - C.godalRasterHistogram(cgc.cPointer(), band.handle(), (*C.double)(&hopt.min), (*C.double)(&hopt.max), (*C.int)(&hopt.buckets), - &values, C.int(hopt.includeOutside), C.int(hopt.approx)) - if err := cgc.close(); err != nil { - return Histogram{}, err - } - counts := (*[1 << 30]C.ulonglong)(unsafe.Pointer(values)) - h := Histogram{ - min: hopt.min, - max: hopt.max, - counts: make([]uint64, hopt.buckets), - } - for i := int32(0); i < hopt.buckets; i++ { - h.counts[i] = uint64(counts[i]) - } - return h, nil -} - -// GetStatistics returns if present and flag as true. -// -// Only cached statistics are returned and no new statistics are computed. -// Return false and no error if no statistics are availables. -// Available options are: -// - Aproximate() to allow the satistics to be computed on overviews or a subset of all tiles. -// - ErrLogger -func (band Band) GetStatistics(opts ...StatisticsOption) (Statistics, bool, error) { - sopt := statisticsOpts{} - for _, s := range opts { - s.setStatisticsOpt(&sopt) - } - var min, max, mean, std C.double - cgc := createCGOContext(nil, sopt.errorHandler) - ret := C.godalGetRasterStatistics(cgc.cPointer(), band.handle(), - (C.int)(sopt.approx), &min, &max, &mean, &std) - if err := cgc.close(); err != nil { - return Statistics{}, false, err - } - if ret == 0 { - return Statistics{}, false, nil - } - var ap bool = sopt.approx != 0 - s := Statistics{ - Approximate: ap, - Min: float64(min), - Max: float64(max), - Mean: float64(mean), - Std: float64(std), - } - return s, true, nil -} - -// ComputeStatistics returns from exact computation or approximation. -// -// Band full scan might be necessary. -// Available options are: -// - Aproximate() to allow the satistics to be computed on overviews or a subset of all tiles. -// - ErrLogger -func (band Band) ComputeStatistics(opts ...StatisticsOption) (Statistics, error) { - sopt := statisticsOpts{} - for _, s := range opts { - s.setStatisticsOpt(&sopt) - } - var min, max, mean, std C.double - cgc := createCGOContext(nil, sopt.errorHandler) - C.godalComputeRasterStatistics(cgc.cPointer(), band.handle(), - (C.int)(sopt.approx), &min, &max, &mean, &std) - if err := cgc.close(); err != nil { - return Statistics{}, err - } - var ap bool = sopt.approx != 0 - s := Statistics{ - Min: float64(min), - Max: float64(max), - Mean: float64(mean), - Std: float64(std), - Approximate: ap, - } - return s, nil -} - -// SetStatistics set statistics (Min, Max, Mean & STD). -// -// Available options are: -// -// -ErrLogger -func (band Band) SetStatistics(min, max, mean, std float64, opts ...SetStatisticsOption) error { - stso := setStatisticsOpt{} - for _, opt := range opts { - opt.setSetStatisticsOpt(&stso) - } - cgc := createCGOContext(nil, stso.errorHandler) - C.godalSetRasterStatistics(cgc.cPointer(), band.handle(), C.double(min), - C.double(max), C.double(mean), C.double(std)) - if err := cgc.close(); err != nil { - return err - } - return nil -} - -func cIntArray(in []int) *C.int { - var ptr *C.int - if len(in) > 0 { - ret := make([]C.int, len(in)) - for i := range in { - ret[i] = C.int(in[i]) - } - ptr = (*C.int)(unsafe.Pointer(&ret[0])) - } - return ptr -} - -func cLongArray(in []int64) *C.longlong { - var ptr *C.longlong - if len(in) > 0 { - ret := make([]C.longlong, len(in)) - for i := range in { - ret[i] = C.longlong(in[i]) - } - ptr = (*C.longlong)(unsafe.Pointer(&ret[0])) - } - return ptr -} - -func cDoubleArray(in []float64) *C.double { - var ptr *C.double - if len(in) > 0 { - ret := make([]C.double, len(in)) - for i := range in { - ret[i] = C.double(in[i]) - } - ptr = (*C.double)(unsafe.Pointer(&ret[0])) - } - return ptr -} - -type cStringArray struct { - arr **C.char - l int -} - -func (ca cStringArray) free() { - if ca.l > 0 { - garr := (*[1 << 30]*C.char)(unsafe.Pointer(ca.arr))[0:ca.l:ca.l] - for i := 0; i < ca.l-1; i++ { - C.free(unsafe.Pointer(garr[i])) - } - C.free(unsafe.Pointer(ca.arr)) - } -} - -func (ca cStringArray) cPointer() **C.char { - return ca.arr -} - -func sliceToCStringArray(in []string) cStringArray { - if len(in) > 0 { - csa := cStringArray{l: len(in) + 1} - csa.arr = (**C.char)(C.malloc(C.size_t(csa.l) * C.size_t(unsafe.Sizeof((*C.char)(nil))))) - garr := (*[1 << 30]*C.char)(unsafe.Pointer(csa.arr))[0:csa.l:csa.l] - for i := range in { - garr[i] = C.CString(in[i]) - } - garr[len(in)] = nil - return csa - } - return cStringArray{} -} - -func cStringArrayToSlice(in **C.char) []string { - if in == nil { - return nil - } - //https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices - cStrs := (*[1 << 30]*C.char)(unsafe.Pointer(in)) - i := 0 - ret := []string{} - for { - if cStrs[i] == nil { - return ret - } - ret = append(ret, C.GoString(cStrs[i])) - i++ - } -} - -func cIntArrayToSlice(in *C.int, length C.int) []int64 { - if in == nil { - return nil - } - cSlice := (*[1 << 28]C.int)(unsafe.Pointer(in))[:length:length] - slice := make([]int64, length) - for i, cval := range cSlice { - slice[i] = int64(cval) - } - return slice -} - -func cLongArrayToSlice(in *C.longlong, length C.int) []int64 { - if in == nil { - return nil - } - cSlice := (*[1 << 28]C.longlong)(unsafe.Pointer(in))[:length:length] - slice := make([]int64, length) - for i, cval := range cSlice { - slice[i] = int64(cval) - } - return slice -} - -func cDoubleArrayToSlice(in *C.double, length C.int) []float64 { - if in == nil { - return nil - } - cSlice := (*[1 << 28]C.double)(unsafe.Pointer(in))[:length:length] - slice := make([]float64, length) - for i, cval := range cSlice { - slice[i] = float64(cval) - } - return slice -} - -// PaletteInterp defines the color interpretation of a ColorTable -type PaletteInterp C.GDALPaletteInterp - -const ( - //GrayscalePalette is a grayscale palette with a single component per entry - GrayscalePalette PaletteInterp = C.GPI_Gray - //RGBPalette is a RGBA palette with 4 components per entry - RGBPalette PaletteInterp = C.GPI_RGB - //CMYKPalette is a CMYK palette with 4 components per entry - CMYKPalette PaletteInterp = C.GPI_CMYK - //HLSPalette is a HLS palette with 3 components per entry - HLSPalette PaletteInterp = C.GPI_HLS -) - -// ColorTable is a color table associated with a Band -type ColorTable struct { - PaletteInterp PaletteInterp - Entries [][4]int16 -} - -func cColorTableArray(in [][4]int16) *C.short { - ret := make([]C.short, len(in)*4) - for i := range in { - ret[4*i] = C.short(in[i][0]) - ret[4*i+1] = C.short(in[i][1]) - ret[4*i+2] = C.short(in[i][2]) - ret[4*i+3] = C.short(in[i][3]) - } - return (*C.short)(unsafe.Pointer(&ret[0])) -} - -func ctEntriesFromCshorts(arr *C.short, nEntries int) [][4]int16 { - int16s := (*[1 << 30]C.short)(unsafe.Pointer(arr)) - ret := make([][4]int16, nEntries) - for i := 0; i < nEntries; i++ { - ret[i][0] = int16(int16s[i*4]) - ret[i][1] = int16(int16s[i*4+1]) - ret[i][2] = int16(int16s[i*4+2]) - ret[i][3] = int16(int16s[i*4+3]) - } - return ret -} - -// ColorTable returns the bands color table. The returned ColorTable will have -// a 0-length Entries if the band has no color table assigned -func (band Band) ColorTable() ColorTable { - var interp C.GDALPaletteInterp - var nEntries C.int - var cEntries *C.short - C.godalGetColorTable(band.handle(), &interp, &nEntries, &cEntries) - if cEntries != nil { - defer C.free(unsafe.Pointer(cEntries)) - } - return ColorTable{ - PaletteInterp: PaletteInterp(interp), - Entries: ctEntriesFromCshorts(cEntries, int(nEntries)), - } -} - -// SetColorTable sets the band's color table. if passing in a 0-length ct.Entries, -// the band's color table will be cleared -func (band Band) SetColorTable(ct ColorTable, opts ...SetColorTableOption) error { - cto := &setColorTableOpts{} - for _, o := range opts { - o.setSetColorTableOpt(cto) - } - var cshorts *C.short - if len(ct.Entries) > 0 { - cshorts = cColorTableArray(ct.Entries) - } - cgc := createCGOContext(nil, cto.errorHandler) - C.godalSetColorTable(cgc.cPointer(), band.handle(), C.GDALPaletteInterp(ct.PaletteInterp), C.int(len(ct.Entries)), cshorts) - return cgc.close() -} - -// Bands returns all dataset bands. -func (ds *Dataset) Bands() []Band { - cbands := C.godalRasterBands(ds.handle()) - if cbands == nil { - return nil - } - defer C.free(unsafe.Pointer(cbands)) - //https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices - sBands := (*[1 << 30]C.GDALRasterBandH)(unsafe.Pointer(cbands)) - bands := []Band{} - i := 0 - for { - if sBands[i] == nil { - return bands - } - bands = append(bands, Band{majorObject{C.GDALMajorObjectH(sBands[i])}}) - i++ - } -} - -// Bounds returns the dataset's bounding box in the order -// -// [MinX, MinY, MaxX, MaxY] -func (ds *Dataset) Bounds(opts ...BoundsOption) ([4]float64, error) { - - bo := boundsOpts{} - for _, o := range opts { - o.setBoundsOpt(&bo) - } - ret := [4]float64{} - st := ds.Structure() - gt, err := ds.GeoTransform() - if err != nil { - return ret, fmt.Errorf("get geotransform: %w", err) - } - ret[0] = gt[0] - ret[1] = gt[3] - ret[2] = gt[0] + float64(st.SizeX)*gt[1] + float64(st.SizeY)*gt[2] - ret[3] = gt[3] + float64(st.SizeX)*gt[4] + float64(st.SizeY)*gt[5] - if bo.sr != nil { - srcsr := ds.SpatialRef() - defer srcsr.Close() - ret, err = reprojectBounds(ret, srcsr, bo.sr) - if err != nil { - return ret, err - } - } - if ret[0] > ret[2] { - ret[2], ret[0] = ret[0], ret[2] - } - if ret[1] > ret[3] { - ret[3], ret[1] = ret[1], ret[3] - } - return ret, nil -} - -// CreateMaskBand creates a mask (nodata) band shared for all bands of this dataset. -// -// Any handle returned by a previous call to Band.MaskBand() should not be used after a call to CreateMaskBand -// See https://gdal.org/development/rfc/rfc15_nodatabitmask.html for how flag should be used -func (ds *Dataset) CreateMaskBand(flags int, opts ...DatasetCreateMaskOption) (Band, error) { - gopts := dsCreateMaskOpts{} - for _, opt := range opts { - opt.setDatasetCreateMaskOpt(&gopts) - } - cgc := createCGOContext(gopts.config, gopts.errorHandler) - hndl := C.godalCreateDatasetMaskBand(cgc.cPointer(), ds.handle(), C.int(flags)) - if err := cgc.close(); err != nil { - return Band{}, err - } - return Band{majorObject{C.GDALMajorObjectH(hndl)}}, nil -} - -// Driver returns dataset driver. -func (ds *Dataset) Driver() Driver { - return Driver{majorObject{C.GDALMajorObjectH(C.GDALGetDatasetDriver(ds.handle()))}} -} - -// Projection returns the WKT projection of the dataset. May be empty. -func (ds *Dataset) Projection() string { - str := C.GDALGetProjectionRef(ds.handle()) - return C.GoString(str) -} - -// SetProjection sets the WKT projection of the dataset. May be empty. -func (ds *Dataset) SetProjection(wkt string, opts ...SetProjectionOption) error { - po := &setProjectionOpts{} - for _, o := range opts { - o.setSetProjectionOpt(po) - } - var cwkt = (*C.char)(nil) - if len(wkt) > 0 { - cwkt = C.CString(wkt) - defer C.free(unsafe.Pointer(cwkt)) - } - cgc := createCGOContext(nil, po.errorHandler) - C.godalSetProjection(cgc.cPointer(), ds.handle(), cwkt) - return cgc.close() -} - -// SpatialRef returns dataset projection. -func (ds *Dataset) SpatialRef() *SpatialRef { - hndl := C.GDALGetSpatialRef(ds.handle()) - return &SpatialRef{handle: hndl, isOwned: false} -} - -// SetSpatialRef sets dataset's projection. -// -// sr can be set to nil to clear an existing projection -func (ds *Dataset) SetSpatialRef(sr *SpatialRef, opts ...SetSpatialRefOption) error { - sro := &setSpatialRefOpts{} - for _, o := range opts { - o.setSetSpatialRefOpt(sro) - } - var hndl C.OGRSpatialReferenceH - if sr == nil { - hndl = nil - } else { - hndl = sr.handle - } - cgc := createCGOContext(nil, sro.errorHandler) - C.godalDatasetSetSpatialRef(cgc.cPointer(), ds.handle(), hndl) - return cgc.close() -} - -// GeoTransform returns the affine transformation coefficients -func (ds *Dataset) GeoTransform(opts ...GetGeoTransformOption) ([6]float64, error) { - gto := &getGeoTransformOpts{} - for _, o := range opts { - o.setGetGeoTransformOpt(gto) - } - ret := [6]float64{} - gt := make([]C.double, 6) - cgt := (*C.double)(unsafe.Pointer(>[0])) - cgc := createCGOContext(nil, gto.errorHandler) - C.godalGetGeoTransform(cgc.cPointer(), ds.handle(), cgt) - if err := cgc.close(); err != nil { - return ret, err - } - for i := range ret { - ret[i] = float64(gt[i]) - } - return ret, nil -} - -// SetGeoTransform sets the affine transformation coefficients -func (ds *Dataset) SetGeoTransform(transform [6]float64, opts ...SetGeoTransformOption) error { - gto := &setGeoTransformOpts{} - for _, o := range opts { - o.setSetGeoTransformOpt(gto) - } - gt := cDoubleArray(transform[:]) - cgc := createCGOContext(nil, gto.errorHandler) - C.godalSetGeoTransform(cgc.cPointer(), ds.handle(), gt) - return cgc.close() -} - -// SetNoData sets the band's nodata value -func (ds *Dataset) SetNoData(nd float64, opts ...SetNoDataOption) error { - sndo := &setNodataOpts{} - for _, opt := range opts { - opt.setSetNoDataOpt(sndo) - } - cgc := createCGOContext(nil, sndo.errorHandler) - C.godalSetDatasetNoDataValue(cgc.cPointer(), ds.handle(), C.double(nd)) - return cgc.close() -} - -// SetScaleOffset sets the band's scale and offset -func (ds *Dataset) SetScaleOffset(scale, offset float64, opts ...SetScaleOffsetOption) error { - setterOpts := &setScaleOffsetOpts{} - for _, opt := range opts { - opt.setSetScaleOffsetOpt(setterOpts) - } - cgc := createCGOContext(nil, setterOpts.errorHandler) - C.godalSetDatasetScaleOffset(cgc.cPointer(), ds.handle(), C.double(scale), C.double(offset)) - return cgc.close() -} - -// Translate runs the library version of gdal_translate. -// See the gdal_translate doc page to determine the valid flags/opts that can be set in switches. -// -// Example switches : -// -// []string{ -// "-a_nodata", 0, -// "-a_srs", "epsg:4326"} -// -// Creation options and driver may be set either in the switches slice with -// -// switches:=[]string{"-co","TILED=YES","-of","GTiff"} -// -// or through Options with -// -// ds.Translate(dst, switches, CreationOption("TILED=YES","BLOCKXSIZE=256"), GTiff) -func (ds *Dataset) Translate(dstDS string, switches []string, opts ...DatasetTranslateOption) (*Dataset, error) { - gopts := dsTranslateOpts{} - for _, opt := range opts { - opt.setDatasetTranslateOpt(&gopts) - } - for _, copt := range gopts.creation { - switches = append(switches, "-co", copt) - } - if gopts.driver != "" { - dname := string(gopts.driver) - if dm, ok := driverMappings[gopts.driver]; ok { - dname = dm.rasterName - } - switches = append(switches, "-of", dname) - } - cswitches := sliceToCStringArray(switches) - defer cswitches.free() - cname := unsafe.Pointer(C.CString(dstDS)) - defer C.free(cname) - - cgc := createCGOContext(gopts.config, gopts.errorHandler) - hndl := C.godalTranslate(cgc.cPointer(), (*C.char)(cname), ds.handle(), cswitches.cPointer()) - if err := cgc.close(); err != nil { - return nil, err - } - return &Dataset{majorObject{C.GDALMajorObjectH(hndl)}}, nil -} - -// Warp runs the library version of gdalwarp -// See the gdalwarp doc page to determine the valid flags/opts that can be set in switches. -// -// Example switches : -// -// []string{ -// "-t_srs","epsg:3857", -// "-dstalpha"} -// -// Creation options and driver may be set either in the switches slice with -// -// switches:=[]string{"-co","TILED=YES","-of","GTiff"} -// -// or through Options with -// -// ds.Warp(dst, switches, CreationOption("TILED=YES","BLOCKXSIZE=256"), GTiff) -func (ds *Dataset) Warp(dstDS string, switches []string, opts ...DatasetWarpOption) (*Dataset, error) { - return Warp(dstDS, []*Dataset{ds}, switches, opts...) -} - -// Warp writes provided sourceDS Datasets into new dataset and runs the library version of gdalwarp -// See the gdalwarp doc page to determine the valid flags/opts that can be set in switches. -// -// Example switches : -// -// []string{ -// "-t_srs","epsg:3857", -// "-dstalpha"} -// -// Creation options and driver may be set either in the switches slice with -// -// switches:=[]string{"-co","TILED=YES","-of","GTiff"} -// -// or through Options with -// -// ds.Warp(dst, switches, CreationOption("TILED=YES","BLOCKXSIZE=256"), GTiff) -func Warp(dstDS string, sourceDS []*Dataset, switches []string, opts ...DatasetWarpOption) (*Dataset, error) { - gopts := dsWarpOpts{} - for _, opt := range opts { - opt.setDatasetWarpOpt(&gopts) - } - - for _, copt := range gopts.creation { - switches = append(switches, "-co", copt) - } - - if gopts.driver != "" { - dname := string(gopts.driver) - if dm, ok := driverMappings[gopts.driver]; ok { - dname = dm.rasterName - } - switches = append(switches, "-of", dname) - } - - srcDS := make([]C.GDALDatasetH, len(sourceDS)) - for i, dataset := range sourceDS { - srcDS[i] = dataset.handle() - } - - cswitches := sliceToCStringArray(switches) - defer cswitches.free() - cname := unsafe.Pointer(C.CString(dstDS)) - defer C.free(cname) - - cgc := createCGOContext(gopts.config, gopts.errorHandler) - hndl := C.godalDatasetWarp(cgc.cPointer(), (*C.char)(cname), C.int(len(sourceDS)), (*C.GDALDatasetH)(unsafe.Pointer(&srcDS[0])), cswitches.cPointer()) - if err := cgc.close(); err != nil { - return nil, err - } - return &Dataset{majorObject{C.GDALMajorObjectH(hndl)}}, nil -} - -// WarpInto writes provided sourceDS Datasets into self existing dataset and runs the library version of gdalwarp -// See the gdalwarp doc page to determine the valid flags/opts that can be set in switches. -// -// Example switches : -// -// []string{ -// "-t_srs","epsg:3857", -// "-dstalpha"} -func (ds *Dataset) WarpInto(sourceDS []*Dataset, switches []string, opts ...DatasetWarpIntoOption) error { - gopts := dsWarpIntoOpts{} - for _, opt := range opts { - opt.setDatasetWarpIntoOpt(&gopts) - } - - cswitches := sliceToCStringArray(switches) - defer cswitches.free() - - dstDS := ds.handle() - srcDS := make([]C.GDALDatasetH, len(sourceDS)) - for i, dataset := range sourceDS { - srcDS[i] = dataset.handle() - } - - cgc := createCGOContext(gopts.config, gopts.errorHandler) - C.godalDatasetWarpInto(cgc.cPointer(), - dstDS, - C.int(len(sourceDS)), - (*C.GDALDatasetH)(unsafe.Pointer(&srcDS[0])), - cswitches.cPointer()) - return cgc.close() -} - -// BuildOverviews computes overviews for the dataset. -// -// If neither Levels() or MinSize() is specified, will compute overview -// levels such that the smallest overview is just under the block size. -// -// Not Setting OvrLevels() or OvrMinSize() if the dataset is not internally tiled -// is not an error but will probably not create the expected result (i.e. only a -// single overview will be created). -func (ds *Dataset) BuildOverviews(opts ...BuildOverviewsOption) error { - bands := ds.Bands() - if len(bands) == 0 { - return fmt.Errorf("cannot compute overviews on dataset with no raster bands") - } - oopts := buildOvrOpts{ - resampling: Average, - } - - structure := bands[0].Structure() - - //default size is to stop when just under the blocksize (so the band contains a single block) - if structure.BlockSizeX > structure.BlockSizeY { - oopts.minSize = structure.BlockSizeX - } else { - oopts.minSize = structure.BlockSizeY - } - - for _, opt := range opts { - opt.setBuildOverviewsOpt(&oopts) - } - - if len(oopts.levels) == 0 { //levels need to be computed automatically - lvl := 1 - sx, sy := structure.SizeX, structure.SizeY - for sx > oopts.minSize || sy > oopts.minSize { - lvl *= 2 - oopts.levels = append(oopts.levels, lvl) - sx /= 2 - sy /= 2 - } - } - if len(oopts.levels) == 0 { - return nil //nothing to do - } - for _, l := range oopts.levels { - if l < 2 { - return fmt.Errorf("cannot compute overview of level %d", l) - } - } - nLevels := C.int(len(oopts.levels)) - cLevels := cIntArray(oopts.levels) - nBands := C.int(len(oopts.bands)) - cBands := (*C.int)(nil) - if nBands > 0 { - cBands = cIntArray(oopts.bands) - } - cResample := unsafe.Pointer(C.CString(oopts.resampling.String())) - defer C.free(cResample) - - cgc := createCGOContext(oopts.config, oopts.errorHandler) - C.godalBuildOverviews(cgc.cPointer(), ds.handle(), (*C.char)(cResample), nLevels, cLevels, - nBands, cBands) - return cgc.close() -} - -// ClearOverviews deletes all dataset overviews -func (ds *Dataset) ClearOverviews(opts ...ClearOverviewsOption) error { - co := &clearOvrOpts{} - for _, o := range opts { - o.setClearOverviewsOpt(co) - } - cgc := createCGOContext(nil, co.errorHandler) - C.godalClearOverviews(cgc.cPointer(), ds.handle()) - return cgc.close() -} - -// ClearStatistics delete dataset statisitics -// -// Since GDAL 3.2 -// Available options are: -// -// -ErrLogger -func (ds *Dataset) ClearStatistics(opts ...ClearStatisticsOption) error { - cls := &clearStatisticsOpt{} - for _, o := range opts { - o.setClearStatisticsOpt(cls) - } - cgc := createCGOContext(nil, cls.errorHandler) - C.godalClearRasterStatistics(cgc.cPointer(), ds.handle()) - return cgc.close() -} - -// Structure returns the dataset's Structure -func (ds *Dataset) Structure() DatasetStructure { - var sx, sy, bsx, bsy, bandCount, dtype C.int - var scale, offset C.double - C.godalDatasetStructure(ds.handle(), &sx, &sy, &bsx, &bsy, &scale, &offset, &bandCount, &dtype) - return DatasetStructure{ - BandStructure: BandStructure{ - SizeX: int(sx), - SizeY: int(sy), - BlockSizeX: int(bsx), - BlockSizeY: int(bsy), - Scale: float64(scale), - Offset: float64(offset), - DataType: DataType(int(dtype)), - }, - NBands: int(bandCount), - } -} - -// Read populates the supplied buffer with the pixels contained in the supplied window -func (ds *Dataset) Read(srcX, srcY int, buffer interface{}, bufWidth, bufHeight int, opts ...DatasetIOOption) error { - return ds.IO(IORead, srcX, srcY, buffer, bufWidth, bufHeight, opts...) -} - -// Write sets the dataset's pixels contained in the supplied window to the content of the supplied buffer -func (ds *Dataset) Write(srcX, srcY int, buffer interface{}, bufWidth, bufHeight int, opts ...DatasetIOOption) error { - return ds.IO(IOWrite, srcX, srcY, buffer, bufWidth, bufHeight, opts...) -} - -// IO reads or writes the pixels contained in the supplied window -func (ds *Dataset) IO(rw IOOperation, srcX, srcY int, buffer interface{}, bufWidth, bufHeight int, opts ...DatasetIOOption) error { - var bands []Band - ro := datasetIOOpts{} - for _, opt := range opts { - opt.setDatasetIOOpt(&ro) - } - if ro.dsHeight == 0 { - ro.dsHeight = bufHeight - } - if ro.dsWidth == 0 { - ro.dsWidth = bufWidth - } - if ro.bands == nil { - bands = ds.Bands() - if len(bands) == 0 { - return fmt.Errorf("cannot perform io on dataset with no bands") - } - for i := range bands { - ro.bands = append(ro.bands, i+1) - } - } - dtype := bufferType(buffer) - dsize := dtype.Size() - - pixelSpacing := dsize * len(ro.bands) - if ro.pixelSpacing > 0 { - pixelSpacing = ro.pixelSpacing - } - if ro.pixelStride > 0 { - pixelSpacing = ro.pixelStride * dsize - } - - lineSpacing := bufWidth * pixelSpacing - if ro.lineSpacing > 0 { - lineSpacing = ro.lineSpacing - } - if ro.lineStride > 0 { - lineSpacing = ro.lineStride * dsize - } - - bandSpacing := dsize - if ro.bandSpacing > 0 { - bandSpacing = ro.bandSpacing - } - if ro.bandStride > 0 { - bandSpacing = ro.bandStride * dsize - } - - if ro.bandInterleave { - pixelSpacing = dsize - lineSpacing = bufWidth * dsize - bandSpacing = bufHeight * bufWidth * dsize - } - - minsize := ((len(ro.bands)-1)*bandSpacing + (bufHeight-1)*lineSpacing + (bufWidth-1)*pixelSpacing + dsize) / dsize - cBuf := cBuffer(buffer, minsize) - - ralg, err := ro.resampling.rioAlg() - if err != nil { - return err - } - cgc := createCGOContext(ro.config, ro.errorHandler) - C.godalDatasetRasterIO(cgc.cPointer(), ds.handle(), C.GDALRWFlag(rw), - C.int(srcX), C.int(srcY), C.int(ro.dsWidth), C.int(ro.dsHeight), - cBuf, - C.int(bufWidth), C.int(bufHeight), C.GDALDataType(dtype), - C.int(len(ro.bands)), cIntArray(ro.bands), - C.int(pixelSpacing), C.int(lineSpacing), C.int(bandSpacing), ralg) - return cgc.close() -} - -// RegisterAll calls GDALAllRegister which registers all available raster and vector -// drivers. -// -// Alternatively, you may also register a select number of drivers by calling one or more of -// - godal.RegisterInternal() // MEM, VRT, GTiff and GeoJSON -// - godal.RegisterRaster(godal.GTiff,godal.VRT) -// - godal.RegisterVector(godal.Shapefile) -func RegisterAll() { - C.GDALAllRegister() -} - -func RegisterPlugins() { - C.godalRegisterPlugins() -} - -func RegisterPlugin(name string, opts ...RegisterPluginOption) error { - ro := registerPluginOpts{} - for _, o := range opts { - o.setRegisterPluginOpt(&ro) - } - cgc := createCGOContext(nil, ro.errorHandler) - cname := C.CString(name) - defer C.free(unsafe.Pointer(cname)) - C.godalRegisterPlugin(cgc.cPointer(), cname) - return cgc.close() -} - -// RegisterRaster registers a raster driver by name. -// -// Calling RegisterRaster(DriverName) with one of the predefined DriverNames provided by the library will -// register the corresponding raster driver. -// -// Calling RegisterRaster(DriverName("XXX")) with "XXX" any string will result in calling the function -// GDALRegister_XXX() if it could be found inside the ligdal.so binary. This allows to register any raster driver -// known to gdal but not explicitly defined inside this golang wrapper. Note that "XXX" must be provided -// exactly (i.e. respecting uppercase/lowercase) the same as the names of the C functions GDALRegister_XXX() -// that can be found in gdal.h -func RegisterRaster(drivers ...DriverName) error { - for _, driver := range drivers { - switch driver { - case Memory: - C.GDALRegister_MEM() - case VRT: - C.GDALRegister_VRT() - case HFA: - C.GDALRegister_HFA() - case GTiff: - C.GDALRegister_GTiff() - default: - fnname := fmt.Sprintf("GDALRegister_%s", driver) - drv, ok := driverMappings[driver] - if ok { - fnname = drv.rasterRegister - } - if fnname == "" { - return fmt.Errorf("%s driver does not handle rasters", fnname) - } - if err := registerDriver(fnname); err != nil { - return err - } - } - } - return nil -} - -// RegisterVector registers a vector driver by name. -// -// Calling RegisterVector(DriverName) with one of the predefined DriverNames provided by the library will -// register the corresponding vector driver. -// -// Calling RegisterVector(DriverName("XXX")) with "XXX" any string will result in calling the function -// RegisterOGRXXX() if it could be found inside the ligdal.so binary. This allows to register any vector driver -// known to gdal but not explicitly defined inside this golang wrapper. Note that "XXX" must be provided -// exactly (i.e. respecting uppercase/lowercase) the same as the names of the C functions RegisterOGRXXX() -// that can be found in ogrsf_frmts.h -func RegisterVector(drivers ...DriverName) error { - for _, driver := range drivers { - switch driver { - /* TODO: speedup for OGR drivers - case VRT: - C.RegisterOGRVRT() - case Memory: - C.RegisterOGRMEM() - case Mitab: - C.RegisterOGRTAB() - case GeoJSON: - C.RegisterOGRGeoJSON() - */ - default: - fnname := fmt.Sprintf("RegisterOGR%s", driver) - drv, ok := driverMappings[driver] - if ok { - fnname = drv.vectorRegister - } - if fnname == "" { - return fmt.Errorf("%s driver does not handle vectors", fnname) - } - if err := registerDriver(fnname); err != nil { - return err - } - } - } - return nil -} - -func registerDriver(fnname string) error { - cfnname := C.CString(fnname) - defer C.free(unsafe.Pointer(cfnname)) - ret := C.godalRegisterDriver(cfnname) - if ret != 0 { - return fmt.Errorf("failed to call function %s", fnname) - } - return nil -} - -// RegisterInternalDrivers is a shorthand for registering "essential" gdal/ogr drivers. -// -// It is equivalent to calling RegisterRaster("VRT","MEM","GTiff") and -// RegisterVector("MEM","VRT","GeoJSON") -func RegisterInternalDrivers() { - //These are always build in and should never error - _ = RegisterRaster(VRT, Memory, GTiff) - _ = RegisterVector(VRT, Memory, GeoJSON) -} - -// Driver is a gdal format driver -type Driver struct { - majorObject -} - -// handle() returns a pointer to the underlying GDALDriverH -func (drv Driver) handle() C.GDALDriverH { - return C.GDALDriverH(drv.majorObject.cHandle) -} - -// LongName returns the driver long name. -func (drv Driver) LongName() string { - return C.GoString(C.GDALGetDriverLongName(drv.handle())) -} - -// ShortName returns the driver short name. -func (drv Driver) ShortName() string { - return C.GoString(C.GDALGetDriverShortName(drv.handle())) -} - -// VectorDriver returns a Driver by name. It returns false if the named driver does -// not exist -func VectorDriver(name DriverName) (Driver, bool) { - if dn, ok := driverMappings[name]; ok { - if dn.vectorName == "" { - return Driver{}, false - } - return getDriver(dn.vectorName) - } - return getDriver(string(name)) -} - -// RasterDriver returns a Driver by name. It returns false if the named driver does -// not exist -func RasterDriver(name DriverName) (Driver, bool) { - if dn, ok := driverMappings[name]; ok { - if dn.rasterName == "" { - return Driver{}, false - } - return getDriver(dn.rasterName) - } - return getDriver(string(name)) -} - -func getDriver(name string) (Driver, bool) { - cname := C.CString(string(name)) - defer C.free(unsafe.Pointer(cname)) - hndl := C.GDALGetDriverByName((*C.char)(unsafe.Pointer(cname))) - if hndl != nil { - return Driver{majorObject{C.GDALMajorObjectH(hndl)}}, true - } - return Driver{}, false -} - -// Create wraps GDALCreate and uses driver to creates a new raster dataset with the given name (usually filename), size, type and bands. -func Create(driver DriverName, name string, nBands int, dtype DataType, width, height int, opts ...DatasetCreateOption) (*Dataset, error) { - drvname := string(driver) - if drv, ok := driverMappings[driver]; ok { - if drv.rasterName == "" { - return nil, fmt.Errorf("%s does not support raster creation", driver) - } - drvname = drv.rasterName - } - drv, ok := getDriver(drvname) - if !ok { - return nil, fmt.Errorf("failed to get driver %s", drvname) - } - gopts := dsCreateOpts{} - for _, opt := range opts { - opt.setDatasetCreateOpt(&gopts) - } - createOpts := sliceToCStringArray(gopts.creation) - cname := C.CString(name) - defer createOpts.free() - defer C.free(unsafe.Pointer(cname)) - - cgc := createCGOContext(gopts.config, gopts.errorHandler) - hndl := C.godalCreate(cgc.cPointer(), drv.handle(), (*C.char)(unsafe.Pointer(cname)), - C.int(width), C.int(height), C.int(nBands), C.GDALDataType(dtype), - createOpts.cPointer()) - - if err := cgc.close(); err != nil { - return nil, err - } - return &Dataset{majorObject{C.GDALMajorObjectH(hndl)}}, nil - -} - -// CreateVector wraps GDALCreate and uses driver to create a new vector dataset with the given name -// (usually filename) and options -func CreateVector(driver DriverName, name string, opts ...DatasetCreateOption) (*Dataset, error) { - drvname := string(driver) - if drv, ok := driverMappings[driver]; ok { - if drv.vectorName == "" { - return nil, fmt.Errorf("%s does not support vector creation", driver) - } - drvname = drv.vectorName - } - drv, ok := getDriver(drvname) - if !ok { - return nil, fmt.Errorf("failed to get driver %s", drvname) - } - gopts := dsCreateOpts{} - for _, opt := range opts { - opt.setDatasetCreateOpt(&gopts) - } - createOpts := sliceToCStringArray(gopts.creation) - cname := C.CString(name) - defer createOpts.free() - defer C.free(unsafe.Pointer(cname)) - - cgc := createCGOContext(gopts.config, gopts.errorHandler) - hndl := C.godalCreate(cgc.cPointer(), drv.handle(), (*C.char)(unsafe.Pointer(cname)), - 0, 0, 0, C.GDT_Unknown, createOpts.cPointer()) - if err := cgc.close(); err != nil { - return nil, err - } - return &Dataset{majorObject{C.GDALMajorObjectH(hndl)}}, nil - -} - -type majorObject struct { - cHandle C.GDALMajorObjectH -} - -// Dataset is a wrapper around a GDALDatasetH -type Dataset struct { - majorObject -} - -// handle returns a pointer to the underlying GDALDatasetH -func (ds *Dataset) handle() C.GDALDatasetH { - return C.GDALDatasetH(ds.majorObject.cHandle) -} - -// Open calls GDALOpenEx() with the provided options. It returns nil and an error -// in case there was an error opening the provided dataset name. -// -// name may be a filename or any supported string supported by gdal (e.g. a /vsixxx path, -// the xml string representing a vrt dataset, etc...) -func Open(name string, options ...OpenOption) (*Dataset, error) { - oopts := openOpts{ - flags: C.GDAL_OF_READONLY | C.GDAL_OF_VERBOSE_ERROR, - siblingFiles: []string{filepath.Base(name)}, - } - for _, opt := range options { - opt.setOpenOpt(&oopts) - } - csiblings := sliceToCStringArray(oopts.siblingFiles) - coopts := sliceToCStringArray(oopts.options) - cdrivers := sliceToCStringArray(oopts.drivers) - defer csiblings.free() - defer coopts.free() - defer cdrivers.free() - cname := C.CString(name) - defer C.free(unsafe.Pointer(cname)) - - cgc := createCGOContext(oopts.config, oopts.errorHandler) - - retds := C.godalOpen(cgc.cPointer(), cname, C.uint(oopts.flags), - cdrivers.cPointer(), coopts.cPointer(), csiblings.cPointer()) - - if err := cgc.close(); err != nil { - return nil, err - } - return &Dataset{majorObject{C.GDALMajorObjectH(retds)}}, nil -} - -// Close releases the dataset -func (ds *Dataset) Close(opts ...CloseOption) error { - co := &closeOpts{} - for _, o := range opts { - o.setCloseOpt(co) - } - if ds.cHandle == nil { - return fmt.Errorf("close called more than once") - } - cgc := createCGOContext(nil, co.errorHandler) - C.godalClose(cgc.cPointer(), ds.handle()) - ds.cHandle = nil - return cgc.close() -} - -// LibVersion is the GDAL lib versioning scheme -type LibVersion int - -// Major returns the GDAL major version (e.g. "3" in 3.2.1) -func (lv LibVersion) Major() int { - return int(lv) / 1000000 -} - -// Minor return the GDAL minor version (e.g. "2" in 3.2.1) -func (lv LibVersion) Minor() int { - return (int(lv) - lv.Major()*1000000) / 10000 -} - -// Revision returns the GDAL revision number (e.g. "1" in 3.2.1) -func (lv LibVersion) Revision() int { - return (int(lv) - lv.Major()*1000000 - lv.Minor()*10000) / 100 -} - -// AssertMinVersion will panic if the runtime version is not at least major.minor.revision -func AssertMinVersion(major, minor, revision int) { - runtimeVersion := Version() - if runtimeVersion.Major() < major || - (runtimeVersion.Major() == major && runtimeVersion.Minor() < minor) || - (runtimeVersion.Major() == major && runtimeVersion.Minor() == minor && runtimeVersion.Revision() < revision) { - panic(fmt.Errorf("runtime version %d.%d.%d < %d.%d.%d", - runtimeVersion.Major(), runtimeVersion.Minor(), runtimeVersion.Revision(), major, minor, revision)) - } -} - -func init() { - compiledVersion := LibVersion(C.GDAL_VERSION_NUM) - AssertMinVersion(compiledVersion.Major(), compiledVersion.Minor(), 0) -} - -//export goErrorHandler -func goErrorHandler(loggerID C.int, ec C.int, code C.int, msg *C.char) C.int { - //returns 0 if the received ec/code/msg is not an actual error - //returns !0 if msg should be considered an error - lfn := getErrorHandler(int(loggerID)) - err := lfn.fn(ErrorCategory(ec), int(code), C.GoString(msg)) - if err != nil { - lfn.err = combine(lfn.err, err) - return 1 - } - return 0 -} - -func testErrorAndLogging(opts ...errorAndLoggingOption) error { - ealo := errorAndLoggingOpts{} - for _, o := range opts { - o.setErrorAndLoggingOpt(&ealo) - } - cctx := createCGOContext(ealo.config, ealo.eh) - - C.test_godal_error_handling(cctx.cPointer()) - return cctx.close() -} - -// Version returns the runtime version of the gdal library -func Version() LibVersion { - cstr := C.CString("VERSION_NUM") - defer C.free(unsafe.Pointer(cstr)) - version := C.GoString(C.GDALVersionInfo(cstr)) - iversion, _ := strconv.Atoi(version) - return LibVersion(iversion) -} - -// IOOperation determines wether Band.IO or Dataset.IO will read pixels into the -// provided buffer, or write pixels from the provided buffer -type IOOperation C.GDALRWFlag - -const ( - //IORead makes IO copy pixels from the band/dataset into the provided buffer - IORead IOOperation = C.GF_Read - //IOWrite makes IO copy pixels from the provided buffer into the band/dataset - IOWrite = C.GF_Write -) - -// ResamplingAlg is a resampling method -type ResamplingAlg int - -const ( - //Nearest resampling - Nearest ResamplingAlg = iota - // Bilinear resampling - Bilinear - // Cubic resampling - Cubic - // CubicSpline resampling - CubicSpline - // Lanczos resampling - Lanczos - // Average resampling - Average - // Gauss resampling - Gauss - // Mode resampling - Mode - // Max resampling - Max - // Min resampling - Min - // Median resampling - Median - // Sum resampling - Sum - // Q1 resampling - Q1 - // Q3 resampling - Q3 - //RMS gdal >=3.3 -) - -func (ra ResamplingAlg) String() string { - switch ra { - case Nearest: - return "nearest" - case Average: - return "average" - case Bilinear: - return "bilinear" - case Cubic: - return "cubic" - case CubicSpline: - return "cubicspline" - case Lanczos: - return "lanczos" - case Gauss: - return "gauss" - case Mode: - return "mode" - //case RMS: - // return "rms" - case Q1: - return "Q1" - case Q3: - return "Q3" - case Median: - return "med" - case Max: - return "max" - case Min: - return "min" - case Sum: - return "sum" - default: - panic("unsupported resampling") - } -} - -func (ra ResamplingAlg) rioAlg() (C.GDALRIOResampleAlg, error) { - switch ra { - case Nearest: - return C.GRIORA_NearestNeighbour, nil - case Average: - return C.GRIORA_Average, nil - case Bilinear: - return C.GRIORA_Bilinear, nil - case Cubic: - return C.GRIORA_Cubic, nil - case CubicSpline: - return C.GRIORA_CubicSpline, nil - case Lanczos: - return C.GRIORA_Lanczos, nil - case Gauss: - return C.GRIORA_Gauss, nil - case Mode: - return C.GRIORA_Mode, nil - //case RMS: - // return C.GRIORA_RMS, nil - default: - return C.GRIORA_NearestNeighbour, fmt.Errorf("%s resampling not supported for IO", ra.String()) - - } -} - -func gridAlgFromString(str string) (C.GDALGridAlgorithm, error) { - switch str { - case "invdist": - return C.GGA_InverseDistanceToAPower, nil - case "average": - return C.GGA_MovingAverage, nil - case "nearest": - return C.GGA_NearestNeighbor, nil - case "minimum": - return C.GGA_MetricMinimum, nil - case "maximum": - return C.GGA_MetricMaximum, nil - case "range": - return C.GGA_MetricRange, nil - case "count": - return C.GGA_MetricCount, nil - case "average_distance": - return C.GGA_MetricAverageDistance, nil - case "average_distance_pts": - return C.GGA_MetricAverageDistancePts, nil - case "linear": - return C.GGA_Linear, nil - case "invdistnn": - return C.GGA_InverseDistanceToAPowerNearestNeighbor, nil - default: - return C.GGA_InverseDistanceToAPower, fmt.Errorf("unknown gridding algorithm %s", str) - } -} - -func bufferType(buffer interface{}) DataType { - switch buffer.(type) { - case []byte: - return Byte - case []int16: - return Int16 - case []uint16: - return UInt16 - case []int32: - return Int32 - case []uint32: - return UInt32 - case []float32: - return Float32 - case []float64: - return Float64 - case []complex64: - return CFloat32 - case []complex128: - return CFloat64 - default: - panic("unsupported type") - } -} - -// cBuffer returns the type of an individual element, and a pointer to the -// underlying memory array -func cBuffer(buffer interface{}, minsize int) unsafe.Pointer { - sizecheck := func(size int) { - if size < minsize { - panic(fmt.Sprintf("buffer len=%d less than min=%d", size, minsize)) - } - } - switch buf := buffer.(type) { - case []byte: - sizecheck(len(buf)) - return unsafe.Pointer(&buf[0]) - case []int16: - sizecheck(len(buf)) - return unsafe.Pointer(&buf[0]) - case []uint16: - sizecheck(len(buf)) - return unsafe.Pointer(&buf[0]) - case []int32: - sizecheck(len(buf)) - return unsafe.Pointer(&buf[0]) - case []uint32: - sizecheck(len(buf)) - return unsafe.Pointer(&buf[0]) - case []float32: - sizecheck(len(buf)) - return unsafe.Pointer(&buf[0]) - case []float64: - sizecheck(len(buf)) - return unsafe.Pointer(&buf[0]) - case []complex64: - sizecheck(len(buf)) - return unsafe.Pointer(&buf[0]) - case []complex128: - sizecheck(len(buf)) - return unsafe.Pointer(&buf[0]) - default: - panic("unsupported type") - } -} - -func (mo majorObject) Metadata(key string, opts ...MetadataOption) string { - mopts := metadataOpts{} - for _, opt := range opts { - opt.setMetadataOpt(&mopts) - } - ckey := C.CString(key) - cdom := C.CString(mopts.domain) - defer C.free(unsafe.Pointer(ckey)) - defer C.free(unsafe.Pointer(cdom)) - str := C.GDALGetMetadataItem(mo.cHandle, ckey, cdom) - return C.GoString(str) -} - -func (mo majorObject) Metadatas(opts ...MetadataOption) map[string]string { - mopts := metadataOpts{} - for _, opt := range opts { - opt.setMetadataOpt(&mopts) - } - cdom := C.CString(mopts.domain) - defer C.free(unsafe.Pointer(cdom)) - strs := C.GDALGetMetadata(mo.cHandle, cdom) - strslice := cStringArrayToSlice(strs) - if len(strslice) == 0 { - return nil - } - ret := make(map[string]string) - for _, str := range strslice { - idx := strings.Index(str, "=") - if idx == -1 || idx == len(str)-1 { - ret[str[0:len(str)-1]] = "" - } else { - ret[str[0:idx]] = str[idx+1:] - } - } - return ret -} - -func (mo majorObject) SetMetadata(key, value string, opts ...MetadataOption) error { - mopts := metadataOpts{} - for _, opt := range opts { - opt.setMetadataOpt(&mopts) - } - ckey := C.CString(key) - cval := C.CString(value) - cdom := C.CString(mopts.domain) - defer C.free(unsafe.Pointer(ckey)) - defer C.free(unsafe.Pointer(cdom)) - defer C.free(unsafe.Pointer(cval)) - cgc := createCGOContext(nil, mopts.errorHandler) - C.godalSetMetadataItem(cgc.cPointer(), mo.cHandle, ckey, cval, cdom) - return cgc.close() -} - -func (mo majorObject) ClearMetadata(opts ...MetadataOption) error { - mopts := metadataOpts{} - for _, opt := range opts { - opt.setMetadataOpt(&mopts) - } - cdom := C.CString(mopts.domain) - defer C.free(unsafe.Pointer(cdom)) - cgc := createCGOContext(nil, mopts.errorHandler) - C.godalClearMetadata(cgc.cPointer(), mo.cHandle, cdom) - return cgc.close() -} - -func (mo majorObject) MetadataDomains() []string { - strs := C.GDALGetMetadataDomainList(mo.cHandle) - return cStringArrayToSlice(strs) -} - -// Description returns the description/name -func (mo majorObject) Description() string { - desc := C.GDALGetDescription(mo.cHandle) - return C.GoString(desc) -} - -// SetDescription sets the description -func (mo majorObject) SetDescription(description string, opts ...SetDescriptionOption) error { - scio := &setDescriptionOpts{} - for _, opt := range opts { - opt.setDescriptionOpt(scio) - } - - cgc := createCGOContext(nil, scio.errorHandler) - cname := unsafe.Pointer(C.CString(description)) - defer C.free(cname) - C.godalSetDescription(cgc.cPointer(), mo.cHandle, (*C.char)(cname)) - return cgc.close() -} - -type openUpdateOpt struct{} - -// Update is an OpenOption that instructs gdal to open the dataset for writing/updating -func Update() interface { - OpenOption -} { - return openUpdateOpt{} -} - -func (openUpdateOpt) setOpenOpt(oo *openOpts) { - //unset readonly - oo.flags = oo.flags &^ C.GDAL_OF_READONLY //actually a noop as OF_READONLY is 0 - oo.flags |= C.GDAL_OF_UPDATE -} - -type openSharedOpt struct{} - -// Shared opens the dataset with OF_OPEN_SHARED -func Shared() interface { - OpenOption -} { - return openSharedOpt{} -} - -func (openSharedOpt) setOpenOpt(oo *openOpts) { - oo.flags |= C.GDAL_OF_SHARED -} - -type vectorOnlyOpt struct{} - -// VectorOnly limits drivers to vector ones (incompatible with RasterOnly() ) -func VectorOnly() interface { - OpenOption -} { - return vectorOnlyOpt{} -} -func (vectorOnlyOpt) setOpenOpt(oo *openOpts) { - oo.flags |= C.GDAL_OF_VECTOR -} - -type rasterOnlyOpt struct{} - -// RasterOnly limits drivers to vector ones (incompatible with VectorOnly() ) -func RasterOnly() interface { - OpenOption -} { - return rasterOnlyOpt{} -} -func (rasterOnlyOpt) setOpenOpt(oo *openOpts) { - oo.flags |= C.GDAL_OF_RASTER -} - -// SpatialRef is a wrapper around OGRSpatialReferenceH -type SpatialRef struct { - handle C.OGRSpatialReferenceH - isOwned bool -} - -// WKT returns spatialrefernece as WKT -func (sr *SpatialRef) WKT(opts ...WKTExportOption) (string, error) { - wo := &srWKTOpts{} - for _, o := range opts { - o.setWKTExportOpt(wo) - } - cgc := createCGOContext(nil, wo.errorHandler) - cwkt := C.godalExportToWKT(cgc.cPointer(), sr.handle) - if err := cgc.close(); err != nil { - return "", err - } - wkt := C.GoString(cwkt) - C.CPLFree(unsafe.Pointer(cwkt)) - return wkt, nil -} - -// Close releases memory -func (sr *SpatialRef) Close() { - if sr.handle == nil { - return - //panic("handle already closed") - } - if !sr.isOwned { - sr.handle = nil - return - } - C.OSRRelease(sr.handle) - sr.handle = nil -} - -// NewSpatialRef creates a SpatialRef from any "user" projection string, e.g. -// "epsg:4326", "+proj=lonlat", wkt, wkt2 or projjson (as supported by -// gdal's OSRCreateFromUserInput -func NewSpatialRef(userInput string, opts ...CreateSpatialRefOption) (*SpatialRef, error) { - cso := &createSpatialRefOpts{} - for _, o := range opts { - o.setCreateSpatialRefOpt(cso) - } - cstr := C.CString(userInput) - defer C.free(unsafe.Pointer(cstr)) - cgc := createCGOContext(nil, cso.errorHandler) - hndl := C.godalCreateUserSpatialRef(cgc.cPointer(), (*C.char)(unsafe.Pointer(cstr))) - if err := cgc.close(); err != nil { - return nil, err - } - return &SpatialRef{handle: hndl, isOwned: true}, nil -} - -// NewSpatialRefFromWKT creates a SpatialRef from an opengis WKT description -func NewSpatialRefFromWKT(wkt string, opts ...CreateSpatialRefOption) (*SpatialRef, error) { - cso := &createSpatialRefOpts{} - for _, o := range opts { - o.setCreateSpatialRefOpt(cso) - } - cstr := C.CString(wkt) - defer C.free(unsafe.Pointer(cstr)) - cgc := createCGOContext(nil, cso.errorHandler) - hndl := C.godalCreateWKTSpatialRef(cgc.cPointer(), (*C.char)(unsafe.Pointer(cstr))) - if err := cgc.close(); err != nil { - return nil, err - } - return &SpatialRef{handle: hndl, isOwned: true}, nil -} - -// NewSpatialRefFromProj4 creates a SpatialRef from a proj4 string -func NewSpatialRefFromProj4(proj string, opts ...CreateSpatialRefOption) (*SpatialRef, error) { - cso := &createSpatialRefOpts{} - for _, o := range opts { - o.setCreateSpatialRefOpt(cso) - } - cstr := C.CString(proj) - defer C.free(unsafe.Pointer(cstr)) - cgc := createCGOContext(nil, cso.errorHandler) - hndl := C.godalCreateProj4SpatialRef(cgc.cPointer(), (*C.char)(unsafe.Pointer(cstr))) - if err := cgc.close(); err != nil { - return nil, err - } - return &SpatialRef{handle: hndl, isOwned: true}, nil -} - -// NewSpatialRefFromEPSG creates a SpatialRef from an epsg code -func NewSpatialRefFromEPSG(code int, opts ...CreateSpatialRefOption) (*SpatialRef, error) { - cso := &createSpatialRefOpts{} - for _, o := range opts { - o.setCreateSpatialRefOpt(cso) - } - cgc := createCGOContext(nil, cso.errorHandler) - hndl := C.godalCreateEPSGSpatialRef(cgc.cPointer(), C.int(code)) - if err := cgc.close(); err != nil { - return nil, err - } - return &SpatialRef{handle: hndl, isOwned: true}, nil -} - -// IsSame returns whether two SpatiaRefs describe the same projection. -func (sr *SpatialRef) IsSame(other *SpatialRef) bool { - ret := C.OSRIsSame(sr.handle, other.handle) - return ret != 0 -} - -// Transform transforms coordinates from one SpatialRef to another -type Transform struct { - handle C.OGRCoordinateTransformationH - dst C.OGRSpatialReferenceH //TODO: refcounting/freeing on this? -} - -// NewTransform creates a transformation object from src to dst -func NewTransform(src, dst *SpatialRef, opts ...TransformOption) (*Transform, error) { - to := &trnOpts{} - for _, o := range opts { - o.setTransformOpt(to) - } - cgc := createCGOContext(nil, to.errorHandler) - hndl := C.godalNewCoordinateTransformation(cgc.cPointer(), src.handle, dst.handle) - if err := cgc.close(); err != nil { - return nil, err - } - return &Transform{handle: hndl, dst: dst.handle}, nil -} - -// Close releases the Transform object -func (trn *Transform) Close() { - if trn.handle == nil { - return - //panic("transform already closed") - } - C.OCTDestroyCoordinateTransformation(trn.handle) - trn.handle = nil -} - -// TransformEx reprojects points in place -// -// x and y may not be nil and must be of the same length -// -// z may be nil, or of the same length as x and y -// -// successful may be nil or of the same length as x and y. If non nil, it will contain -// true or false depending on wether the corresponding point succeeded transformation or not. -// -// TODO: create a version of this function that accepts *C.double to avoid allocs? -// TODO: create a Transform() method that accepts z and successful as options -func (trn *Transform) TransformEx(x []float64, y []float64, z []float64, successful []bool) error { - cx := make([]C.double, len(x)) - cy := make([]C.double, len(x)) - pcx, pcy := (*C.double)(unsafe.Pointer(&cx[0])), (*C.double)(unsafe.Pointer(&cy[0])) - pcz := (*C.double)(nil) - pcs := (*C.int)(nil) - var cz []C.double - var cs []C.int - if len(z) > 0 { - cz = make([]C.double, len(x)) - pcz = (*C.double)(unsafe.Pointer(&cz[0])) - } - if len(successful) > 0 { - cs = make([]C.int, len(x)) - pcs = (*C.int)(unsafe.Pointer(&cs[0])) - } - for i := range x { - cx[i] = C.double(x[i]) - cy[i] = C.double(y[i]) - if cz != nil { - cz[i] = C.double(z[i]) - } - } - ret := C.OCTTransformEx(trn.handle, C.int(len(x)), pcx, pcy, pcz, pcs) - for i := range x { - x[i] = float64(cx[i]) - y[i] = float64(cy[i]) - if cz != nil { - z[i] = float64(cz[i]) - } - if cs != nil { - if cs[i] > 0 { - successful[i] = true - } else { - successful[i] = false - } - } - } - if ret == 0 { - return fmt.Errorf("some or all points failed to transform") - } - return nil -} - -// EPSGTreatsAsLatLong returns TRUE if EPSG feels the SpatialRef should be treated as having lat/long coordinate ordering. -func (sr *SpatialRef) EPSGTreatsAsLatLong() bool { - ret := C.OSREPSGTreatsAsLatLong(sr.handle) - return ret != 0 -} - -// Geographic returns wether the SpatialRef is geographic -func (sr *SpatialRef) Geographic() bool { - ret := C.OSRIsGeographic(sr.handle) - return ret != 0 -} - -// Projected returns wether the SpatialRef is projected -func (sr *SpatialRef) Projected() bool { - ret := C.OSRIsProjected(sr.handle) - return ret != 0 -} - -// SemiMajor returns the SpatialRef's Semi Major Axis -func (sr *SpatialRef) SemiMajor() (float64, error) { - var err C.int - sm := C.OSRGetSemiMajor(sr.handle, &err) - if err != 0 { - return float64(sm), fmt.Errorf("ogr error %d", err) - } - return float64(sm), nil -} - -// SemiMinor returns the SpatialRef's Semi Minor Axis -func (sr *SpatialRef) SemiMinor() (float64, error) { - var err C.int - sm := C.OSRGetSemiMinor(sr.handle, &err) - if err != 0 { - return float64(sm), fmt.Errorf("ogr error %d", err) - } - return float64(sm), nil -} - -// AttrValue Fetch indicated attribute of named node from within the WKT tree. -func (sr *SpatialRef) AttrValue(name string, child int) (string, bool) { - cstr := C.CString(name) - defer C.free(unsafe.Pointer(cstr)) - cret := C.OSRGetAttrValue(sr.handle, cstr, C.int(child)) - if cret != nil { - return C.GoString(cret), true - } - return "", false -} - -// AuthorityName is used to query an AUTHORITY[] node from within the WKT tree, and fetch the authority name value. -// -// target is the partial or complete path to the node to get an authority from. i.e. "PROJCS", "GEOGCS", "GEOGCS|UNIT" -// or "" to search for an authority node on the root element. -func (sr *SpatialRef) AuthorityName(target string) string { - cstr := (*C.char)(nil) - if len(target) > 0 { - cstr = C.CString(target) - defer C.free(unsafe.Pointer(cstr)) - } - cret := C.OSRGetAuthorityName(sr.handle, cstr) - if cret != nil { - return C.GoString(cret) - } - return "" -} - -// AuthorityCode is used to query an AUTHORITY[] node from within the WKT tree, and fetch the code value. -// target is the partial or complete path to the node to get an authority from. i.e. "PROJCS", "GEOGCS", "GEOGCS|UNIT" -// or "" to search for an authority node on the root element. -// -// While in theory values may be non-numeric, for the EPSG authority all code values should be integral. -func (sr *SpatialRef) AuthorityCode(target string) string { - cstr := (*C.char)(nil) - if len(target) > 0 { - cstr = C.CString(target) - defer C.free(unsafe.Pointer(cstr)) - } - cret := C.OSRGetAuthorityCode(sr.handle, cstr) - if cret != nil { - return C.GoString(cret) - } - return "" -} - -// AutoIdentifyEPSG sets EPSG authority info if possible. -func (sr *SpatialRef) AutoIdentifyEPSG() error { - ogrerr := C.OSRAutoIdentifyEPSG(sr.handle) - if ogrerr != 0 { - return fmt.Errorf("ogr error %d", ogrerr) - } - return nil -} - -// Validate SRS tokens. -func (sr *SpatialRef) Validate(opts ...SpatialRefValidateOption) error { - vo := spatialRefValidateOpts{} - for _, opt := range opts { - opt.setSpatialRefValidateOpt(&vo) - } - cgc := createCGOContext(nil, vo.errorHandler) - C.godalValidateSpatialRef(cgc.cPointer(), sr.handle) - return cgc.close() -} - -// Rasterize wraps GDALRasterize() -func (ds *Dataset) Rasterize(dstDS string, switches []string, opts ...RasterizeOption) (*Dataset, error) { - gopts := rasterizeOpts{} - for _, opt := range opts { - opt.setRasterizeOpt(&gopts) - } - for _, copt := range gopts.create { - switches = append(switches, "-co", copt) - } - if gopts.driver != "" { - dname := string(gopts.driver) - if dm, ok := driverMappings[gopts.driver]; ok { - dname = dm.rasterName - } - switches = append(switches, "-of", dname) - } - cswitches := sliceToCStringArray(switches) - defer cswitches.free() - cname := unsafe.Pointer(C.CString(dstDS)) - defer C.free(cname) - - cgc := createCGOContext(gopts.config, gopts.errorHandler) - hndl := C.godalRasterize(cgc.cPointer(), (*C.char)(cname), nil, ds.handle(), cswitches.cPointer()) - if err := cgc.close(); err != nil { - return nil, err - } - return &Dataset{majorObject{C.GDALMajorObjectH(hndl)}}, nil -} - -// RasterizeInto wraps GDALRasterize() and rasterizes the provided vectorDataset into the ds Dataset -func (ds *Dataset) RasterizeInto(vectorDS *Dataset, switches []string, opts ...RasterizeIntoOption) error { - gopts := rasterizeIntoOpts{} - for _, opt := range opts { - opt.setRasterizeIntoOpt(&gopts) - } - cswitches := sliceToCStringArray(switches) - defer cswitches.free() - - cgc := createCGOContext(gopts.config, gopts.errorHandler) - C.godalRasterize(cgc.cPointer(), nil, ds.handle(), vectorDS.handle(), cswitches.cPointer()) - if err := cgc.close(); err != nil { - return err - } - return nil -} - -// RasterizeGeometry "burns" the provided geometry onto ds. -// By default, the "0" value is burned into all of ds's bands. This behavior can be modified -// with the following options: -// - Bands(bnd ...int) the list of bands to affect -// - Values(val ...float64) the pixel value to burn. There must be either 1 or len(bands) values -// -// provided -// - AllTouched() pixels touched by lines or polygons will be updated, not just those on the line -// -// render path, or whose center point is within the polygon. -func (ds *Dataset) RasterizeGeometry(g *Geometry, opts ...RasterizeGeometryOption) error { - opt := rasterizeGeometryOpts{} - for _, o := range opts { - o.setRasterizeGeometryOpt(&opt) - } - if len(opt.bands) == 0 { - bnds := ds.Bands() - opt.bands = make([]int, len(bnds)) - for i := range bnds { - opt.bands[i] = i + 1 - } - } - if len(opt.values) == 0 { - opt.values = make([]float64, len(opt.bands)) - for i := range opt.values { - opt.values[i] = 0 - } - } - if len(opt.values) == 1 && len(opt.values) != len(opt.bands) { - for i := 1; i < len(opt.bands); i++ { - opt.values = append(opt.values, opt.values[0]) - } - } - if len(opt.values) != len(opt.bands) { - return fmt.Errorf("must pass in same number of values as bands") - } - cgc := createCGOContext(nil, opt.errorHandler) - C.godalRasterizeGeometry(cgc.cPointer(), ds.handle(), g.handle, - cIntArray(opt.bands), C.int(len(opt.bands)), cDoubleArray(opt.values), C.int(opt.allTouched)) - return cgc.close() -} - -// GeometryType is a geometry type -type GeometryType uint32 - -const ( - //GTUnknown is a GeometryType - GTUnknown = GeometryType(C.wkbUnknown) - //GTPoint is a GeometryType - GTPoint = GeometryType(C.wkbPoint) - //GTPoint25D is a GeometryType - GTPoint25D = GeometryType(C.wkbPoint25D) - //GTLinearRing is a GeometryType - GTLinearRing = GeometryType(C.wkbLinearRing) - //GTLineString is a GeometryType - GTLineString = GeometryType(C.wkbLineString) - //GTLineString25D is a GeometryType - GTLineString25D = GeometryType(C.wkbLineString25D) - //GTPolygon is a GeometryType - GTPolygon = GeometryType(C.wkbPolygon) - //GTPolygon25D is a GeometryType - GTPolygon25D = GeometryType(C.wkbPolygon25D) - //GTMultiPoint is a GeometryType - GTMultiPoint = GeometryType(C.wkbMultiPoint) - //GTMultiPoint25D is a GeometryType - GTMultiPoint25D = GeometryType(C.wkbMultiPoint25D) - //GTMultiLineString is a GeometryType - GTMultiLineString = GeometryType(C.wkbMultiLineString) - //GTMultiLineString25D is a GeometryType - GTMultiLineString25D = GeometryType(C.wkbMultiLineString25D) - //GTMultiPolygon is a GeometryType - GTMultiPolygon = GeometryType(C.wkbMultiPolygon) - //GTMultiPolygon25D is a GeometryType - GTMultiPolygon25D = GeometryType(C.wkbMultiPolygon25D) - //GTGeometryCollection is a GeometryType - GTGeometryCollection = GeometryType(C.wkbGeometryCollection) - //GTGeometryCollection25D is a GeometryType - GTGeometryCollection25D = GeometryType(C.wkbGeometryCollection25D) - //GTNone is a GeometryType - GTNone = GeometryType(C.wkbNone) -) - -// FieldType is a vector field (attribute/column) type -type FieldType C.OGRFieldType - -const ( - //FTInt is a Simple 32bit integer. - FTInt = FieldType(C.OFTInteger) - //FTReal is a Double Precision floating point. - FTReal = FieldType(C.OFTReal) - //FTString is a String of ASCII chars. - FTString = FieldType(C.OFTString) - //FTInt64 is a Single 64bit integer. - FTInt64 = FieldType(C.OFTInteger64) - //FTIntList is a List of 32bit integers. - FTIntList = FieldType(C.OFTIntegerList) - //FTRealList is a List of doubles. - FTRealList = FieldType(C.OFTRealList) - //FTStringList is a Array of strings. - FTStringList = FieldType(C.OFTStringList) - //FTBinary is a Raw Binary data. - FTBinary = FieldType(C.OFTBinary) - //FTDate is a Date. - FTDate = FieldType(C.OFTDate) - //FTTime is a Time. - FTTime = FieldType(C.OFTTime) - //FTDateTime is a Date and Time. - FTDateTime = FieldType(C.OFTDateTime) - //FTInt64List is a List of 64bit integers. - FTInt64List = FieldType(C.OFTInteger64List) - //FTUnknown allow to handle deprecated types like WideString or WideStringList - FTUnknown = FieldType(C.OFTMaxType + 1) -) - -// FieldDefinition defines a single attribute -type FieldDefinition struct { - name string - ftype FieldType -} - -// NewFieldDefinition creates a FieldDefinition -func NewFieldDefinition(name string, fdtype FieldType) *FieldDefinition { - return &FieldDefinition{ - name: name, - ftype: fdtype, - } -} - -func (fd *FieldDefinition) setCreateLayerOpt(o *createLayerOpts) { - o.fields = append(o.fields, fd) -} - -func (fd *FieldDefinition) createHandle() C.OGRFieldDefnH { - cfname := unsafe.Pointer(C.CString(fd.name)) - defer C.free(cfname) - cfd := C.OGR_Fld_Create((*C.char)(cfname), C.OGRFieldType(fd.ftype)) - return cfd -} - -// VectorTranslate runs the library version of ogr2ogr -// See the ogr2ogr doc page to determine the valid flags/opts that can be set in switches. -// -// Example switches : -// -// []string{ -// "-f", "GeoJSON", -// "-t_srs","epsg:3857", -// "-dstalpha"} -// -// Creation options and Driver may be set either in the switches slice with -// -// switches:=[]string{"-dsco","TILED=YES", "-f","GeoJSON"} -// -// or through Options with -// -// ds.VectorTranslate(dst, switches, CreationOption("TILED=YES","BLOCKXSIZE=256"), GeoJSON) -func (ds *Dataset) VectorTranslate(dstDS string, switches []string, opts ...DatasetVectorTranslateOption) (*Dataset, error) { - gopts := dsVectorTranslateOpts{} - for _, opt := range opts { - opt.setDatasetVectorTranslateOpt(&gopts) - } - for _, copt := range gopts.creation { - switches = append(switches, "-dsco", copt) - } - if gopts.driver != "" { - dname := string(gopts.driver) - if dm, ok := driverMappings[gopts.driver]; ok { - dname = dm.vectorName - } - switches = append(switches, "-f", dname) - } - cswitches := sliceToCStringArray(switches) - defer cswitches.free() - cname := unsafe.Pointer(C.CString(dstDS)) - defer C.free(cname) - - cgc := createCGOContext(gopts.config, gopts.errorHandler) - hndl := C.godalDatasetVectorTranslate(cgc.cPointer(), (*C.char)(cname), ds.handle(), cswitches.cPointer()) - if err := cgc.close(); err != nil { - return nil, err - } - return &Dataset{majorObject{C.GDALMajorObjectH(hndl)}}, nil -} - -// Layer wraps an OGRLayerH -type Layer struct { - majorObject -} - -// handle returns a pointer to the underlying GDALRasterBandH -func (layer Layer) handle() C.OGRLayerH { - return C.OGRLayerH(layer.majorObject.cHandle) -} - -// Name returns the layer name -func (layer Layer) Name() string { - return C.GoString(C.OGR_L_GetName(layer.handle())) -} - -// Type returns the layer geometry type. -func (layer Layer) Type() GeometryType { - return GeometryType(C.OGR_L_GetGeomType(layer.handle())) -} - -// Bounds returns the layer's envelope in the order minx,miny,maxx,maxy -func (layer Layer) Bounds(opts ...BoundsOption) ([4]float64, error) { - bo := boundsOpts{} - for _, o := range opts { - o.setBoundsOpt(&bo) - } - var env C.OGREnvelope - cgc := createCGOContext(nil, bo.errorHandler) - C.godalLayerGetExtent(cgc.cPointer(), layer.handle(), &env) - if err := cgc.close(); err != nil { - return [4]float64{}, err - } - bnds := [4]float64{ - float64(env.MinX), - float64(env.MinY), - float64(env.MaxX), - float64(env.MaxY), - } - if bo.sr == nil { - return bnds, nil - } - sr := layer.SpatialRef() - defer sr.Close() - bnds, err := reprojectBounds(bnds, sr, bo.sr) - if err != nil { - return [4]float64{}, err - } - return bnds, nil -} - -// FeatureCount returns the number of features in the layer -func (layer Layer) FeatureCount(opts ...FeatureCountOption) (int, error) { - fco := &featureCountOpts{} - for _, o := range opts { - o.setFeatureCountOpt(fco) - } - var count C.int - cgc := createCGOContext(nil, fco.errorHandler) - C.godalLayerFeatureCount(cgc.cPointer(), layer.handle(), &count) - if err := cgc.close(); err != nil { - return 0, err - } - return int(count), nil -} - -// Layers returns all dataset layers -func (ds *Dataset) Layers() []Layer { - clayers := C.godalVectorLayers(ds.handle()) - if clayers == nil { - return nil - } - defer C.free(unsafe.Pointer(clayers)) - //https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices - sLayers := (*[1 << 30]C.OGRLayerH)(unsafe.Pointer(clayers)) - layers := []Layer{} - i := 0 - for { - if sLayers[i] == nil { - return layers - } - layers = append(layers, Layer{majorObject{C.GDALMajorObjectH(sLayers[i])}}) - i++ - } -} - -// SpatialRef returns dataset projection. -func (layer Layer) SpatialRef() *SpatialRef { - hndl := C.OGR_L_GetSpatialRef(layer.handle()) - return &SpatialRef{handle: hndl, isOwned: false} -} - -// Geometry wraps a OGRGeometryH -type Geometry struct { - isOwned bool - handle C.OGRGeometryH -} - -// Area computes the area for geometries of type LinearRing, Polygon or MultiPolygon (returns zero for other types). -// The area is in square units of the spatial reference system in use. -func (g *Geometry) Area() float64 { - return float64(C.OGR_G_Area(g.handle)) -} - -// Name fetch WKT name for geometry type. -func (g *Geometry) Name() string { - return C.GoString(C.OGR_G_GetGeometryName(g.handle)) -} - -// GeometryCount fetch the number of elements in a geometry or number of geometries in container. -// Only geometries of type Polygon, MultiPoint, MultiLineString, MultiPolygon or GeometryCollection may return a valid value. -// Other geometry types will silently return 0. -// For a polygon, the returned number is the number of rings (exterior ring + interior rings). -func (g *Geometry) GeometryCount() int { - return int(C.OGR_G_GetGeometryCount(g.handle)) -} - -// Type fetch geometry type. -func (g *Geometry) Type() GeometryType { - return GeometryType(C.OGR_G_GetGeometryType(g.handle)) -} - -// Simplify simplifies the geometry with the given tolerance -func (g *Geometry) Simplify(tolerance float64, opts ...SimplifyOption) (*Geometry, error) { - so := &simplifyOpts{} - for _, o := range opts { - o.setSimplifyOpt(so) - } - cgc := createCGOContext(nil, so.errorHandler) - hndl := C.godal_OGR_G_Simplify(cgc.cPointer(), g.handle, C.double(tolerance)) - if err := cgc.close(); err != nil { - return nil, err - } - return &Geometry{ - isOwned: true, - handle: hndl, - }, nil -} - -// Buffer buffers the geometry -func (g *Geometry) Buffer(distance float64, segments int, opts ...BufferOption) (*Geometry, error) { - bo := &bufferOpts{} - for _, o := range opts { - o.setBufferOpt(bo) - } - cgc := createCGOContext(nil, bo.errorHandler) - hndl := C.godal_OGR_G_Buffer(cgc.cPointer(), g.handle, C.double(distance), C.int(segments)) - if err := cgc.close(); err != nil { - return nil, err - } - return &Geometry{ - isOwned: true, - handle: hndl, - }, nil -} - -// Difference generates a new geometry which is the region of this geometry with the region of the other geometry removed. -func (g *Geometry) Difference(other *Geometry, opts ...DifferenceOption) (*Geometry, error) { - // If other geometry is nil, GDAL crashes - if other == nil || other.handle == nil { - return nil, errors.New("other geometry is empty") - } - do := &differenceOpts{} - for _, o := range opts { - o.setDifferenceOpt(do) - } - cgc := createCGOContext(nil, do.errorHandler) - hndl := C.godal_OGR_G_Difference(cgc.cPointer(), g.handle, other.handle) - if err := cgc.close(); err != nil { - return nil, err - } - return &Geometry{ - isOwned: true, - handle: hndl, - }, nil -} - -// AddGeometry add a geometry to a geometry container. -func (g *Geometry) AddGeometry(subGeom *Geometry, opts ...AddGeometryOption) error { - ago := &addGeometryOpts{} - for _, o := range opts { - o.setAddGeometryOpt(ago) - } - cgc := createCGOContext(nil, ago.errorHandler) - C.godal_OGR_G_AddGeometry(cgc.cPointer(), g.handle, subGeom.handle) - return cgc.close() -} - -// ForceToMultiPolygon convert to multipolygon. -func (g *Geometry) ForceToMultiPolygon() *Geometry { - hndl := C.OGR_G_ForceToMultiPolygon(g.handle) - return &Geometry{ - isOwned: true, - handle: hndl, - } -} - -// ForceToPolygon convert to polygon. -func (g *Geometry) ForceToPolygon() *Geometry { - hndl := C.OGR_G_ForceToPolygon(g.handle) - return &Geometry{ - isOwned: true, - handle: hndl, - } -} - -// SubGeometry Fetch geometry from a geometry container. -func (g *Geometry) SubGeometry(subGeomIndex int, opts ...SubGeometryOption) (*Geometry, error) { - so := &subGeometryOpts{} - for _, o := range opts { - o.setSubGeometryOpt(so) - } - cgc := createCGOContext(nil, so.errorHandler) - hndl := C.godal_OGR_G_GetGeometryRef(cgc.cPointer(), g.handle, C.int(subGeomIndex)) - if err := cgc.close(); err != nil { - return nil, err - } - return &Geometry{ - isOwned: false, - handle: hndl, - }, nil -} - -// Intersects determines whether two geometries intersect. If GEOS is enabled, then -// this is done in rigorous fashion otherwise TRUE is returned if the -// envelopes (bounding boxes) of the two geometries overlap. -func (g *Geometry) Intersects(other *Geometry, opts ...IntersectsOption) (bool, error) { - bo := &intersectsOpts{} - for _, o := range opts { - o.setIntersectsOpt(bo) - } - cgc := createCGOContext(nil, bo.errorHandler) - ret := C.godal_OGR_G_Intersects(cgc.cPointer(), g.handle, other.handle) - if err := cgc.close(); err != nil { - return false, err - } - return ret != 0, nil -} - -// Intersection generates a new geometry which is the region of intersection of the two geometries operated on. -func (g *Geometry) Intersection(other *Geometry, opts ...IntersectionOption) (*Geometry, error) { - // If other geometry is nil, GDAL crashes - if other == nil || other.handle == nil { - return nil, errors.New("other geometry is empty") - } - io := &intersectionOpts{} - for _, o := range opts { - o.setIntersectionOpt(io) - } - cgc := createCGOContext(nil, io.errorHandler) - hndl := C.godal_OGR_G_Intersection(cgc.cPointer(), g.handle, other.handle) - if err := cgc.close(); err != nil { - return nil, err - } - return &Geometry{ - isOwned: true, - handle: hndl, - }, nil -} - -// Union generates a new geometry which is the region of union of the two geometries operated on. -func (g *Geometry) Union(other *Geometry, opts ...UnionOption) (*Geometry, error) { - // If other geometry is nil, GDAL crashes - if other == nil || other.handle == nil { - return nil, errors.New("other geometry is empty") - } - uo := &unionOpts{} - for _, o := range opts { - o.setUnionOpt(uo) - } - cgc := createCGOContext(nil, uo.errorHandler) - hndl := C.godal_OGR_G_Union(cgc.cPointer(), g.handle, other.handle) - if err := cgc.close(); err != nil { - return nil, err - } - return &Geometry{ - isOwned: true, - handle: hndl, - }, nil -} - -// Contains tests if this geometry contains the other geometry. -func (g *Geometry) Contains(other *Geometry) bool { - ret := C.OGR_G_Contains(g.handle, other.handle) - return ret != 0 -} - -// Empty returns true if the geometry is empty -func (g *Geometry) Empty() bool { - ret := C.OGR_G_IsEmpty(g.handle) - return ret != 0 -} - -// Valid returns true is the geometry is valid -func (g *Geometry) Valid() bool { - ret := C.OGR_G_IsValid(g.handle) - return ret != 0 -} - -// Bounds returns the geometry's envelope in the order minx,miny,maxx,maxy -func (g *Geometry) Bounds(opts ...BoundsOption) ([4]float64, error) { - bo := boundsOpts{} - for _, o := range opts { - o.setBoundsOpt(&bo) - } - var env C.OGREnvelope - C.OGR_G_GetEnvelope(g.handle, &env) - bnds := [4]float64{ - float64(env.MinX), - float64(env.MinY), - float64(env.MaxX), - float64(env.MaxY), - } - if bo.sr == nil { - return bnds, nil - } - sr := g.SpatialRef() - defer sr.Close() - ret, err := reprojectBounds(bnds, sr, bo.sr) - if err != nil { - return bnds, err - } - return ret, nil -} - -// Close may reclaim memory from geometry. Must be called exactly once. -func (g *Geometry) Close() { - if g.handle == nil { - return - //panic("geometry already closed") - } - if g.isOwned { - C.OGR_G_DestroyGeometry(g.handle) - } - g.handle = nil -} - -// Feature is a Layer feature -type Feature struct { - handle C.OGRFeatureH -} - -// Geometry returns a handle to the feature's geometry -func (f *Feature) Geometry() *Geometry { - hndl := C.OGR_F_GetGeometryRef(f.handle) - return &Geometry{ - isOwned: false, - handle: hndl, - } -} - -// SetGeometry overwrites the feature's geometry -func (f *Feature) SetGeometry(geom *Geometry, opts ...SetGeometryOption) error { - sgo := &setGeometryOpts{} - for _, o := range opts { - o.setSetGeometryOpt(sgo) - } - cgc := createCGOContext(nil, sgo.errorHandler) - C.godalFeatureSetGeometry(cgc.cPointer(), f.handle, geom.handle) - return cgc.close() -} - -// SetGeometryColumnName set the name of feature first geometry field. -// Deprecated when running with GDAL 3.6+, use SetGeometryColumnName on Layer instead. -// No more supported when running with GDAL 3.9+. -func (f *Feature) SetGeometryColumnName(name string, opts ...SetGeometryColumnNameOption) error { - so := &setGeometryColumnNameOpts{} - for _, o := range opts { - o.setGeometryColumnNameOpt(so) - } - cname := C.CString(name) - defer C.free(unsafe.Pointer(cname)) - cgc := createCGOContext(nil, so.errorHandler) - C.godalFeatureSetGeometryColumnName(cgc.cPointer(), f.handle, (*C.char)(cname)) - return cgc.close() -} - -// SetFID set feature identifier -func (f *Feature) SetFID(fid int64) { - // OGR error returned is always none, so we don't handle it - C.OGR_F_SetFID(f.handle, C.GIntBig(fid)) -} - -// SetFieldValue set feature's field value -func (f *Feature) SetFieldValue(field Field, value interface{}, opts ...SetFieldValueOption) error { - sfvo := &setFieldValueOpts{} - for _, o := range opts { - o.setSetFieldValueOpt(sfvo) - } - cgc := createCGOContext(nil, sfvo.errorHandler) - - switch field.ftype { - case FTInt: - intValue, ok := value.(int) - if !ok { - return errors.New("value for this field must be of type 'int'") - } - C.godalFeatureSetFieldInteger(cgc.cPointer(), f.handle, C.int(field.index), C.int(intValue)) - case FTInt64: - int64Value, ok := value.(int64) - if !ok { - return errors.New("value for this field must be of type 'int64'") - } - C.godalFeatureSetFieldInteger64(cgc.cPointer(), f.handle, C.int(field.index), C.longlong(int64Value)) - case FTReal: - floatValue, ok := value.(float64) - if !ok { - return errors.New("value for this field must be of type 'float64'") - } - C.godalFeatureSetFieldDouble(cgc.cPointer(), f.handle, C.int(field.index), C.double(floatValue)) - case FTString: - stringValue, ok := value.(string) - if !ok { - return errors.New("value for this field must be of type 'string'") - } - cval := C.CString(stringValue) - defer C.free(unsafe.Pointer(cval)) - C.godalFeatureSetFieldString(cgc.cPointer(), f.handle, C.int(field.index), cval) - case FTDate, FTTime, FTDateTime: - timeValue, ok := value.(time.Time) - if !ok { - return errors.New("value for this field must be of type 'time.Time'") - } - timeZone := 0 // 0=unknown, 1=localtime, 100=GMT, 101=GMT+15minute, 99=GMT-15minute... - if timeValue.Location() == time.Local { - timeZone = 1 - } else { - _, offset := timeValue.Zone() - timeZone = offset/60/15 + 100 - } - C.godalFeatureSetFieldDateTime( - cgc.cPointer(), - f.handle, - C.int(field.index), - C.int(timeValue.Year()), - C.int(timeValue.Month()), - C.int(timeValue.Day()), - C.int(timeValue.Hour()), - C.int(timeValue.Minute()), - C.int(timeValue.Second()), - C.int(timeZone), - ) - case FTIntList: - intListValue, ok := value.([]int) - if !ok { - return errors.New("value for this field must be of type '[]int'") - } - C.godalFeatureSetFieldIntegerList(cgc.cPointer(), f.handle, C.int(field.index), C.int(len(intListValue)), cIntArray(intListValue)) - case FTInt64List: - int64ListValue, ok := value.([]int64) - if !ok { - return errors.New("value for this field must be of type '[]int64'") - } - C.godalFeatureSetFieldInteger64List(cgc.cPointer(), f.handle, C.int(field.index), C.int(len(int64ListValue)), cLongArray(int64ListValue)) - case FTRealList: - float64ListValue, ok := value.([]float64) - if !ok { - return errors.New("value for this field must be of type '[]float64'") - } - C.godalFeatureSetFieldDoubleList(cgc.cPointer(), f.handle, C.int(field.index), C.int(len(float64ListValue)), cDoubleArray(float64ListValue)) - case FTStringList: - stringListValue, ok := value.([]string) - if !ok { - return errors.New("value for this field must be of type '[]float64'") - } - cArray := sliceToCStringArray(stringListValue) - C.godalFeatureSetFieldStringList(cgc.cPointer(), f.handle, C.int(field.index), cArray.cPointer()) - cArray.free() - case FTBinary: - bytesValue, ok := value.([]byte) - if !ok { - return errors.New("value for this field must be of type '[]byte'") - } - C.godalFeatureSetFieldBinary(cgc.cPointer(), f.handle, C.int(field.index), C.int(len(bytesValue)), unsafe.Pointer(&bytesValue[0])) - default: - cgc.close() //avoid resource leak - return errors.New("setting value is not implemented for this type of field") - } - - return cgc.close() -} - -// Field is a Feature attribute -type Field struct { - index int - isSet bool - ftype FieldType - val interface{} -} - -// IsSet returns if the field has ever been assigned a value or not. -func (fld Field) IsSet() bool { - return fld.isSet -} - -// Type returns the field's native type -func (fld Field) Type() FieldType { - return fld.ftype -} - -// Int returns the Field as an integer -func (fld Field) Int() int64 { - switch fld.ftype { - case FTInt, FTInt64: - return fld.val.(int64) - case FTReal: - return int64(fld.val.(float64)) - case FTString: - ii, _ := strconv.Atoi(fld.val.(string)) - return int64(ii) - default: - return 0 - } -} - -// Float returns the field as a float64 -func (fld Field) Float() float64 { - switch fld.ftype { - case FTInt, FTInt64: - return float64(fld.val.(int64)) - case FTReal: - return fld.val.(float64) - case FTString: - ii, _ := strconv.ParseFloat(fld.val.(string), 64) - return ii - default: - return 0 - } -} - -// String returns the field as a string -func (fld Field) String() string { - switch fld.ftype { - case FTInt, FTInt64: - return fmt.Sprintf("%d", fld.val.(int64)) - case FTReal: - return fmt.Sprintf("%f", fld.val.(float64)) - case FTString: - return fld.val.(string) - default: - return "" - } -} - -// Bytes returns the field as a byte slice -func (fld Field) Bytes() []byte { - switch fld.ftype { - case FTBinary: - return fld.val.([]byte) - default: - return nil - } -} - -// DateTime returns the field as a date time -func (fld Field) DateTime() *time.Time { - switch fld.ftype { - case FTDate, FTTime, FTDateTime: - return fld.val.(*time.Time) - default: - return nil - } -} - -// IntList returns the field as a list of integer -func (fld Field) IntList() []int64 { - switch fld.ftype { - case FTIntList, FTInt64List: - return fld.val.([]int64) - default: - return nil - } -} - -// FloatList returns the field as a list of float64 -func (fld Field) FloatList() []float64 { - switch fld.ftype { - case FTRealList: - return fld.val.([]float64) - default: - return nil - } -} - -// StringList returns the field as a list of string -func (fld Field) StringList() []string { - switch fld.ftype { - case FTStringList: - return fld.val.([]string) - default: - return nil - } -} - -// Fields returns all the Feature's fields -func (f *Feature) Fields() map[string]Field { - fcount := C.OGR_F_GetFieldCount(f.handle) - if fcount == 0 { - return nil - } - retm := make(map[string]Field) - for fid := C.int(0); fid < fcount; fid++ { - fdefn := C.OGR_F_GetFieldDefnRef(f.handle, fid) - fname := C.GoString(C.OGR_Fld_GetNameRef(fdefn)) - ftype := C.OGR_Fld_GetType(fdefn) - fld := Field{ - index: int(fid), - isSet: C.OGR_F_IsFieldSet(f.handle, fid) != 0, - } - switch ftype { - case C.OFTInteger: - fld.ftype = FTInt - fld.val = int64(C.OGR_F_GetFieldAsInteger64(f.handle, fid)) - case C.OFTInteger64: - fld.ftype = FTInt64 - fld.val = int64(C.OGR_F_GetFieldAsInteger64(f.handle, fid)) - case C.OFTReal: - fld.ftype = FTReal - fld.val = float64(C.OGR_F_GetFieldAsDouble(f.handle, fid)) - case C.OFTString: - fld.ftype = FTString - fld.val = C.GoString(C.OGR_F_GetFieldAsString(f.handle, fid)) - case C.OFTDate: - fld.ftype = FTDate - fld.val = f.getFieldAsDateTime(fid) - case C.OFTTime: - fld.ftype = FTTime - fld.val = f.getFieldAsDateTime(fid) - case C.OFTDateTime: - fld.ftype = FTDateTime - fld.val = f.getFieldAsDateTime(fid) - case C.OFTIntegerList: - fld.ftype = FTIntList - var length C.int - cArray := C.OGR_F_GetFieldAsIntegerList(f.handle, fid, &length) - fld.val = cIntArrayToSlice(cArray, length) - case C.OFTInteger64List: - fld.ftype = FTInt64List - var length C.int - cArray := C.OGR_F_GetFieldAsInteger64List(f.handle, fid, &length) - fld.val = cLongArrayToSlice(cArray, length) - case C.OFTRealList: - fld.ftype = FTRealList - var length C.int - cArray := C.OGR_F_GetFieldAsDoubleList(f.handle, fid, &length) - fld.val = cDoubleArrayToSlice(cArray, length) - case C.OFTStringList: - fld.ftype = FTStringList - cArray := C.OGR_F_GetFieldAsStringList(f.handle, fid) - fld.val = cStringArrayToSlice(cArray) - case C.OFTBinary: - fld.ftype = FTBinary - var length C.int - cArray := C.OGR_F_GetFieldAsBinary(f.handle, fid, &length) - var slice []byte - if cArray != nil { - slice = C.GoBytes(unsafe.Pointer(cArray), length) - } - fld.val = slice - default: - // Only deprecated field types like FTWideString & WideStringList should be handled by default case - fld.ftype = FTUnknown - } - retm[fname] = fld - } - return retm -} - -// Fetch field as date and time -func (f *Feature) getFieldAsDateTime(index C.int) *time.Time { - var year, month, day, hour, minute, second, tzFlag int - ret := C.OGR_F_GetFieldAsDateTime( - f.handle, - index, - (*C.int)(unsafe.Pointer(&year)), - (*C.int)(unsafe.Pointer(&month)), - (*C.int)(unsafe.Pointer(&day)), - (*C.int)(unsafe.Pointer(&hour)), - (*C.int)(unsafe.Pointer(&minute)), - (*C.int)(unsafe.Pointer(&second)), - (*C.int)(unsafe.Pointer(&tzFlag)), - ) - if ret != 0 { - var location *time.Location - // 0=unknown, 1=localtime, 100=GMT, 101=GMT+15minute, 99=GMT-15minute... - switch tzFlag { - case 0: - location = &time.Location{} - case 1: - location = time.Local - default: - location = time.FixedZone(fmt.Sprintf("zone_%d", tzFlag), (tzFlag-100)*15*60) - } - t := time.Date(year, time.Month(month), day, hour, minute, second, 0, location) - return &t - } - return nil -} - -// Close releases resources associated to a feature -func (f *Feature) Close() { - if f.handle == nil { - return - //panic("feature closed more than once") - } - C.OGR_F_Destroy(f.handle) - f.handle = nil -} - -// ResetReading makes Layer.NextFeature return the first feature of the layer -func (layer Layer) ResetReading() { - C.OGR_L_ResetReading(layer.handle()) -} - -// NextFeature returns the layer's next feature, or nil if there are no mo features -func (layer Layer) NextFeature() *Feature { - hndl := C.OGR_L_GetNextFeature(layer.handle()) - if hndl == nil { - return nil - } - return &Feature{hndl} -} - -// CreateFeature creates a feature on Layer -func (layer Layer) CreateFeature(feat *Feature, opts ...CreateFeatureOption) error { - cfo := createFeatureOpts{} - for _, opt := range opts { - opt.setCreateFeatureOpt(&cfo) - } - cgc := createCGOContext(nil, cfo.errorHandler) - C.godalLayerCreateFeature(cgc.cPointer(), layer.handle(), feat.handle) - if err := cgc.close(); err != nil { - return err - } - return nil -} - -// NewFeature creates a feature on Layer from a geometry -func (layer Layer) NewFeature(geom *Geometry, opts ...NewFeatureOption) (*Feature, error) { - nfo := newFeatureOpts{} - for _, opt := range opts { - opt.setNewFeatureOpt(&nfo) - } - ghandle := C.OGRGeometryH(nil) - if geom != nil { - ghandle = geom.handle - } - cgc := createCGOContext(nil, nfo.errorHandler) - hndl := C.godalLayerNewFeature(cgc.cPointer(), layer.handle(), ghandle) - if err := cgc.close(); err != nil { - return nil, err - } - return &Feature{hndl}, nil -} - -// UpdateFeature rewrites an updated feature in the Layer -func (layer Layer) UpdateFeature(feat *Feature, opts ...UpdateFeatureOption) error { - uo := &updateFeatureOpts{} - for _, o := range opts { - o.setUpdateFeatureOpt(uo) - } - cgc := createCGOContext(nil, uo.errorHandler) - C.godalLayerSetFeature(cgc.cPointer(), layer.handle(), feat.handle) - return cgc.close() -} - -// DeleteFeature deletes feature from the Layer. -func (layer Layer) DeleteFeature(feat *Feature, opts ...DeleteFeatureOption) error { - do := &deleteFeatureOpts{} - for _, o := range opts { - o.setDeleteFeatureOpt(do) - } - cgc := createCGOContext(nil, do.errorHandler) - C.godalLayerDeleteFeature(cgc.cPointer(), layer.handle(), feat.handle) - return cgc.close() -} - -// SetGeometryColumnName set the name of feature first geometry field. -// Only supported when running with GDAL 3.6+. -func (layer Layer) SetGeometryColumnName(name string, opts ...SetGeometryColumnNameOption) error { - so := &setGeometryColumnNameOpts{} - for _, o := range opts { - o.setGeometryColumnNameOpt(so) - } - cname := C.CString(name) - defer C.free(unsafe.Pointer(cname)) - cgc := createCGOContext(nil, so.errorHandler) - C.godalLayerSetGeometryColumnName(cgc.cPointer(), layer.handle(), (*C.char)(cname)) - return cgc.close() -} - -// CreateLayer creates a new vector layer -// -// Available CreateLayerOptions are -// - FieldDefinition (may be used multiple times) to add attribute fields to the layer -func (ds *Dataset) CreateLayer(name string, sr *SpatialRef, gtype GeometryType, opts ...CreateLayerOption) (Layer, error) { - co := createLayerOpts{} - for _, opt := range opts { - opt.setCreateLayerOpt(&co) - } - srHandle := C.OGRSpatialReferenceH(nil) - if sr != nil { - srHandle = sr.handle - } - cname := C.CString(name) - defer C.free(unsafe.Pointer(cname)) - cgc := createCGOContext(nil, co.errorHandler) - hndl := C.godalCreateLayer(cgc.cPointer(), ds.handle(), (*C.char)(unsafe.Pointer(cname)), srHandle, C.OGRwkbGeometryType(gtype)) - if err := cgc.close(); err != nil { - return Layer{}, err - } - if len(co.fields) > 0 { - for _, fld := range co.fields { - fhndl := fld.createHandle() - //TODO error checking - C.OGR_L_CreateField(hndl, fhndl, C.int(0)) - C.OGR_Fld_Destroy(fhndl) - } - } - return Layer{majorObject{C.GDALMajorObjectH(hndl)}}, nil -} - -// CopyLayer Duplicate an existing layer. -func (ds *Dataset) CopyLayer(source Layer, name string, opts ...CopyLayerOption) (Layer, error) { - co := copyLayerOpts{} - for _, opt := range opts { - opt.setCopyLayerOpt(&co) - } - cname := C.CString(name) - defer C.free(unsafe.Pointer(cname)) - cgc := createCGOContext(nil, co.errorHandler) - hndl := C.godalCopyLayer(cgc.cPointer(), ds.handle(), source.handle(), (*C.char)(unsafe.Pointer(cname))) - if err := cgc.close(); err != nil { - return Layer{}, err - } - return Layer{majorObject{C.GDALMajorObjectH(hndl)}}, nil -} - -// LayerByName fetch a layer by name. Returns nil if not found. -func (ds *Dataset) LayerByName(name string) *Layer { - cname := C.CString(name) - defer C.free(unsafe.Pointer(cname)) - hndl := C.GDALDatasetGetLayerByName(ds.handle(), (*C.char)(unsafe.Pointer(cname))) - if hndl == nil { - return nil - } - return &Layer{majorObject{C.GDALMajorObjectH(hndl)}} -} - -// NewGeometryFromGeoJSON creates a new Geometry from its GeoJSON representation -func NewGeometryFromGeoJSON(geoJSON string, opts ...NewGeometryOption) (*Geometry, error) { - no := &newGeometryOpts{} - for _, o := range opts { - o.setNewGeometryOpt(no) - } - - cgeoJSON := C.CString(geoJSON) - defer C.free(unsafe.Pointer(cgeoJSON)) - cgc := createCGOContext(nil, no.errorHandler) - hndl := C.godalNewGeometryFromGeoJSON(cgc.cPointer(), (*C.char)(unsafe.Pointer(cgeoJSON))) - if err := cgc.close(); err != nil { - return nil, err - } - return &Geometry{isOwned: true, handle: hndl}, nil -} - -// NewGeometryFromWKT creates a new Geometry from its WKT representation -func NewGeometryFromWKT(wkt string, sr *SpatialRef, opts ...NewGeometryOption) (*Geometry, error) { - no := &newGeometryOpts{} - for _, o := range opts { - o.setNewGeometryOpt(no) - } - srHandle := C.OGRSpatialReferenceH(nil) - if sr != nil { - srHandle = sr.handle - } - cwkt := C.CString(wkt) - defer C.free(unsafe.Pointer(cwkt)) - cgc := createCGOContext(nil, no.errorHandler) - hndl := C.godalNewGeometryFromWKT(cgc.cPointer(), (*C.char)(unsafe.Pointer(cwkt)), srHandle) - if err := cgc.close(); err != nil { - return nil, err - } - return &Geometry{isOwned: true, handle: hndl}, nil -} - -// NewGeometryFromWKB creates a new Geometry from its WKB representation -func NewGeometryFromWKB(wkb []byte, sr *SpatialRef, opts ...NewGeometryOption) (*Geometry, error) { - no := &newGeometryOpts{} - for _, o := range opts { - o.setNewGeometryOpt(no) - } - srHandle := C.OGRSpatialReferenceH(nil) - if sr != nil { - srHandle = sr.handle - } - cgc := createCGOContext(nil, no.errorHandler) - hndl := C.godalNewGeometryFromWKB(cgc.cPointer(), unsafe.Pointer(&wkb[0]), C.int(len(wkb)), srHandle) - if err := cgc.close(); err != nil { - return nil, err - } - return &Geometry{isOwned: true, handle: hndl}, nil -} - -// WKT returns the Geomtry's WKT representation -func (g *Geometry) WKT(opts ...GeometryWKTOption) (string, error) { - wo := &geometryWKTOpts{} - for _, o := range opts { - o.setGeometryWKTOpt(wo) - } - cgc := createCGOContext(nil, wo.errorHandler) - cwkt := C.godalExportGeometryWKT(cgc.cPointer(), g.handle) - if err := cgc.close(); err != nil { - return "", err - } - wkt := C.GoString(cwkt) - C.CPLFree(unsafe.Pointer(cwkt)) - return wkt, nil -} - -// WKB returns the Geomtry's WKB representation -func (g *Geometry) WKB(opts ...GeometryWKBOption) ([]byte, error) { - wo := &geometryWKBOpts{} - for _, o := range opts { - o.setGeometryWKBOpt(wo) - } - var cwkb unsafe.Pointer - clen := C.int(0) - cgc := createCGOContext(nil, wo.errorHandler) - C.godalExportGeometryWKB(cgc.cPointer(), &cwkb, &clen, g.handle) - if err := cgc.close(); err != nil { - return nil, err - } - wkb := C.GoBytes(unsafe.Pointer(cwkb), clen) - C.free(unsafe.Pointer(cwkb)) - return wkb, nil -} - -// SpatialRef returns the geometry's SpatialRef -func (g *Geometry) SpatialRef() *SpatialRef { - hndl := C.OGR_G_GetSpatialReference(g.handle) - return &SpatialRef{ - handle: hndl, - isOwned: false, - } -} - -// SetSpatialRef assigns the given SpatialRef to the Geometry. It does not -// perform an actual reprojection. -func (g *Geometry) SetSpatialRef(sr *SpatialRef) { - C.OGR_G_AssignSpatialReference(g.handle, sr.handle) -} - -// Reproject reprojects the given geometry to the given SpatialRef -func (g *Geometry) Reproject(to *SpatialRef, opts ...GeometryReprojectOption) error { - gr := &geometryReprojectOpts{} - for _, o := range opts { - o.setGeometryReprojectOpt(gr) - } - cgc := createCGOContext(nil, gr.errorHandler) - C.godalGeometryTransformTo(cgc.cPointer(), g.handle, to.handle) - return cgc.close() -} - -// Transform transforms the given geometry. g is expected to already be -// in the supplied Transform source SpatialRef. -func (g *Geometry) Transform(trn *Transform, opts ...GeometryTransformOption) error { - gt := &geometryTransformOpts{} - for _, o := range opts { - o.setGeometryTransformOpt(gt) - } - cgc := createCGOContext(nil, gt.errorHandler) - C.godalGeometryTransform(cgc.cPointer(), g.handle, trn.handle, trn.dst) - return cgc.close() -} - -// GeoJSON returns the geometry in geojson format. The geometry is expected to be in epsg:4326 -// projection per RFCxxx -// -// Available GeoJSONOptions are -// - SignificantDigits(n int) to keep n significant digits after the decimal separator (default: 8) -func (g *Geometry) GeoJSON(opts ...GeoJSONOption) (string, error) { - gjo := geojsonOpts{ - precision: 7, - } - for _, opt := range opts { - opt.setGeojsonOpt(&gjo) - } - cgc := createCGOContext(nil, gjo.errorHandler) - gjdata := C.godalExportGeometryGeoJSON(cgc.cPointer(), g.handle, C.int(gjo.precision)) - if err := cgc.close(); err != nil { - return "", err - } - wkt := C.GoString(gjdata) - C.CPLFree(unsafe.Pointer(gjdata)) - return wkt, nil -} - -// GML returns the geometry in GML format. -// See the GDAL exportToGML doc page to determine the GML conversion options that can be set through CreationOption. -// -// Example of conversion options : -// -// g.GML(CreationOption("FORMAT=GML3","GML3_LONGSRS=YES")) -func (g *Geometry) GML(opts ...GMLExportOption) (string, error) { - gmlo := &gmlExportOpts{} - for _, o := range opts { - o.setGMLExportOpt(gmlo) - } - switches := make([]string, len(gmlo.creation)) - for i, copt := range gmlo.creation { - switches[i] = copt - } - cswitches := sliceToCStringArray(switches) - defer cswitches.free() - cgc := createCGOContext(nil, gmlo.errorHandler) - cgml := C.godalExportGeometryGML(cgc.cPointer(), g.handle, cswitches.cPointer()) - if err := cgc.close(); err != nil { - return "", err - } - gml := C.GoString(cgml) - C.CPLFree(unsafe.Pointer(cgml)) - return gml, nil -} - -// VSIFile is a handler around gdal's vsi handlers -type VSIFile struct { - handle *C.VSILFILE -} - -// VSIOpen opens path. path can be virtual, eg beginning with /vsimem/ -func VSIOpen(path string, opts ...VSIOpenOption) (*VSIFile, error) { - vo := &vsiOpenOpts{} - for _, o := range opts { - o.setVSIOpenOpt(vo) - } - cname := unsafe.Pointer(C.CString(path)) - defer C.free(cname) - cgc := createCGOContext(nil, vo.errorHandler) - hndl := C.godalVSIOpen(cgc.cPointer(), (*C.char)(cname)) - if err := cgc.close(); err != nil { - return nil, err - } - return &VSIFile{hndl}, nil -} - -// Close closes the VSIFile. Must be called exactly once. -func (vf *VSIFile) Close() error { - if vf.handle == nil { - return fmt.Errorf("already closed") - } - errmsg := C.godalVSIClose(vf.handle) - vf.handle = nil - if errmsg != nil { - defer C.free(unsafe.Pointer(errmsg)) - return errors.New(C.GoString(errmsg)) - } - return nil -} - -// VSIUnlink deletes path -func VSIUnlink(path string, opts ...VSIUnlinkOption) error { - vo := &vsiUnlinkOpts{} - for _, o := range opts { - o.setVSIUnlinkOpt(vo) - } - cname := unsafe.Pointer(C.CString(path)) - defer C.free(cname) - cgc := createCGOContext(nil, vo.errorHandler) - C.godalVSIUnlink(cgc.cPointer(), (*C.char)(cname)) - return cgc.close() -} - -var _ io.ReadCloser = &VSIFile{} - -// Read is the standard io.Reader interface -func (vf *VSIFile) Read(buf []byte) (int, error) { - if len(buf) == 0 { - return 0, nil - } - var errmsg *C.char - n := C.godalVSIRead(vf.handle, unsafe.Pointer(&buf[0]), C.int(len(buf)), &errmsg) - if errmsg != nil { - defer C.free(unsafe.Pointer(errmsg)) - return int(n), errors.New(C.GoString(errmsg)) - } - if int(n) != len(buf) { - return int(n), io.EOF - } - return int(n), nil -} - -// KeySizerReaderAt is the interface expected when calling RegisterVSIHandler -// -// ReadAt() is a standard io.ReaderAt that takes a key (i.e. filename) as argument. -// -// Size() is used as a probe to determine wether the given key exists, and should return -// an error if no such key exists. The actual file size may or may not be effectively used -// depending on the underlying GDAL driver opening the file -// -// It may also optionally implement KeyMultiReader which will be used (only?) by -// the GTiff driver when reading pixels. If not provided, this -// VSI implementation will concurrently call ReadAt([]byte,int64) -type KeySizerReaderAt interface { - ReadAt(key string, buf []byte, off int64) (int, error) - Size(key string) (int64, error) -} - -// KeyMultiReader is an optional interface that can be implemented by KeyReaderAtSizer that -// will be used (only?) by the GTiff driver when reading pixels. If not provided, this -// VSI implementation will concurrently call ReadAt(key,[]byte,int64) -type KeyMultiReader interface { - ReadAtMulti(key string, bufs [][]byte, offs []int64) ([]int, error) -} - -//export _gogdalSizeCallback -func _gogdalSizeCallback(ckey *C.char, errorString **C.char) C.longlong { - key := C.GoString(ckey) - cbd, err := getGoGDALReader(key) - if err != nil { - *errorString = C.CString(err.Error()) - return -1 - } - - if cbd.prefix > 0 { - key = key[cbd.prefix:] - } - l, err := cbd.Size(key) - if err != nil { - *errorString = C.CString(err.Error()) - } - return C.longlong(l) -} - -//export _gogdalMultiReadCallback -func _gogdalMultiReadCallback(ckey *C.char, nRanges C.int, pocbuffers unsafe.Pointer, coffsets unsafe.Pointer, clengths unsafe.Pointer, errorString **C.char) C.int { - key := C.GoString(ckey) - cbd, err := getGoGDALReader(key) - if err != nil { - *errorString = C.CString(err.Error()) - return -1 - } - /* cbd == nil would be a bug elsewhere */ - if cbd.prefix > 0 { - key = key[cbd.prefix:] - } - n := int(nRanges) - cbuffers := (*[1 << 28]unsafe.Pointer)(unsafe.Pointer(pocbuffers))[:n:n] - lengths := (*[1 << 28]C.size_t)(unsafe.Pointer(clengths))[:n:n] - offsets := (*[1 << 28]C.ulonglong)(unsafe.Pointer(coffsets))[:n:n] - - buffers := make([][]byte, n) - goffsets := make([]int64, n) - ret := int64(0) - for b := range buffers { - l := int(lengths[b]) - buffers[b] = (*[1 << 28]byte)(unsafe.Pointer(cbuffers[b]))[:l:l] - goffsets[b] = int64(offsets[b]) - } - _, err = cbd.ReadAtMulti(key, buffers, goffsets) - if err != nil && err != io.EOF { - *errorString = C.CString(err.Error()) - ret = -1 - } - return C.int(ret) -} - -//export _gogdalReadCallback -func _gogdalReadCallback(ckey *C.char, buffer unsafe.Pointer, off C.size_t, clen C.size_t, errorString **C.char) C.size_t { - l := int(clen) - key := C.GoString(ckey) - cbd, err := getGoGDALReader(key) - if err != nil { - *errorString = C.CString(err.Error()) - return 0 - } - if cbd.prefix > 0 { - key = key[cbd.prefix:] - } - slice := (*[1 << 28]byte)(buffer)[:l:l] - rlen, err := cbd.ReadAt(key, slice, int64(off)) - if err != nil && err != io.EOF { - *errorString = C.CString(err.Error()) - } - return C.size_t(rlen) -} - -var handlers map[string]vsiHandler - -func getGoGDALReader(key string) (vsiHandler, error) { - for prefix, handler := range handlers { - if strings.HasPrefix(key, prefix) { - return handler, nil - } - } - return vsiHandler{}, fmt.Errorf("no handler registered") -} - -type vsiHandler struct { - KeySizerReaderAt - prefix int -} - -func (sp vsiHandler) ReadAtMulti(key string, bufs [][]byte, offs []int64) ([]int, error) { - if mcbd, ok := sp.KeySizerReaderAt.(KeyMultiReader); ok { - return mcbd.ReadAtMulti(key, bufs, offs) - } - var wg sync.WaitGroup - wg.Add(len(bufs)) - lens := make([]int, len(bufs)) - var err error - var errmu sync.Mutex - for b := range bufs { - go func(bidx int) { - var berr error - defer wg.Done() - lens[bidx], berr = sp.ReadAt(key, bufs[bidx], offs[bidx]) - if berr != nil && berr != io.EOF { - errmu.Lock() - if err == nil { - err = berr - } - errmu.Unlock() - } - if lens[bidx] != int(len(bufs[bidx])) { - errmu.Lock() - if err == nil { - if berr != nil { - err = berr - } else { - err = fmt.Errorf("short read") - } - } - errmu.Unlock() - } - }(b) - } - wg.Wait() - return lens, err -} - -// RegisterVSIHandler registers an osio.Adapter on the given prefix. -// When registering an adapter with -// -// RegisterVSIHandler("scheme://",handler) -// -// calling Open("scheme://myfile.txt") will result in godal making calls to -// -// adapter.Reader("myfile.txt").ReadAt(buf,offset) -func RegisterVSIHandler(prefix string, handler KeySizerReaderAt, opts ...VSIHandlerOption) error { - opt := vsiHandlerOpts{ - bufferSize: 64 * 1024, - cacheSize: 2 * 64 * 1024, - stripPrefix: false, - } - for _, o := range opts { - o.setVSIHandlerOpt(&opt) - } - if handlers == nil { - handlers = make(map[string]vsiHandler) - } - if _, ok := handlers[prefix]; ok { - return fmt.Errorf("handler already registered on prefix") - } - cgc := createCGOContext(nil, opt.errorHandler) - C.VSIInstallGoHandler(cgc.cPointer(), C.CString(prefix), C.size_t(opt.bufferSize), C.size_t(opt.cacheSize)) - if err := cgc.close(); err != nil { - return err - } - if opt.stripPrefix { - handlers[prefix] = vsiHandler{handler, len(prefix)} - } else { - handlers[prefix] = vsiHandler{handler, 0} - } - return nil -} - -// BuildVRT runs the GDALBuildVRT function and creates a VRT dataset from a list of datasets -func BuildVRT(dstVRTName string, sourceDatasets []string, switches []string, opts ...BuildVRTOption) (*Dataset, error) { - bvo := buildVRTOpts{} - for _, o := range opts { - o.setBuildVRTOpt(&bvo) - } - if bvo.resampling != Nearest { - switches = append(switches, "-r", bvo.resampling.String()) - } - for _, b := range bvo.bands { - switches = append(switches, "-b", fmt.Sprintf("%d", b)) - } - for _, oo := range bvo.openOptions { - switches = append(switches, "-oo", oo) - } - cswitches := sliceToCStringArray(switches) - defer cswitches.free() - - cname := unsafe.Pointer(C.CString(dstVRTName)) - defer C.free(cname) - - csources := sliceToCStringArray(sourceDatasets) - defer csources.free() - - cgc := createCGOContext(bvo.config, bvo.errorHandler) - hndl := C.godalBuildVRT(cgc.cPointer(), (*C.char)(cname), csources.cPointer(), - cswitches.cPointer()) - if err := cgc.close(); err != nil { - return nil, err - } - return &Dataset{majorObject{C.GDALMajorObjectH(hndl)}}, nil -} - -// GridCreate, creates a grid from scattered data, given provided gridding parameters as a string (pszAlgorithm) -// and the arguments required for `godalGridCreate()` (binding for GDALGridCreate) -// -// NOTE: For valid gridding algorithm strings see: https://gdal.org/programs/gdal_grid.html#interpolation-algorithms -func GridCreate(pszAlgorithm string, - xCoords []float64, - yCoords []float64, - zCoords []float64, - dfXMin float64, - dfXMax float64, - dfYMin float64, - dfYMax float64, - nXSize int, - nYSize int, - buffer interface{}, - opts ...GridCreateOption, -) error { - if len(xCoords) != len(yCoords) || len(yCoords) != len(zCoords) { - return errors.New("`xCoords`, `yCoords` and `zCoords` are not all equal length") - } - - gco := gridCreateOpts{} - for _, o := range opts { - o.setGridCreateOpt(&gco) - } - - griddingAlgStr := strings.Split(pszAlgorithm, ":")[0] - algCEnum, err := gridAlgFromString(griddingAlgStr) - if err != nil { - return err - } - - var ( - params = unsafe.Pointer(C.CString(pszAlgorithm)) - cgc = createCGOContext(nil, gco.errorHandler) - ) - defer C.free(params) - - var ( - dtype = bufferType(buffer) - dsize = dtype.Size() - numGridBytes = C.int(nXSize * nYSize * dsize) - cBuf = cBuffer(buffer, int(numGridBytes)/dsize) - ) - cgc = createCGOContext(nil, gco.errorHandler) - C.godalGridCreate(cgc.cPointer(), (*C.char)(params), algCEnum, C.uint(len(xCoords)), cDoubleArray(xCoords), cDoubleArray(yCoords), cDoubleArray(zCoords), C.double(dfXMin), C.double(dfXMax), C.double(dfYMin), C.double(dfYMax), C.uint(nXSize), C.uint(nYSize), C.GDALDataType(dtype), cBuf) - if err := cgc.close(); err != nil { - return err - } - return nil -} - -// Grid runs the library version of gdal_grid. -// See the gdal_grid doc page to determine the valid flags/opts that can be set in switches. -// -// Example switches : -// -// []string{"-a", "maximum", "-txe", "0", "1"} -// -// Creation options and driver may be set in the switches slice with -// -// switches:=[]string{"-co","TILED=YES","-of","GTiff"} -// -// NOTE: Some switches are NOT compatible with this binding, as a `nullptr` is passed to a later call to -// `GDALGridOptionsNew()` (as the 2nd argument). Those switches are: "-oo", "-q", "-quiet" -func (ds *Dataset) Grid(destPath string, switches []string, opts ...GridOption) (*Dataset, error) { - gridOpts := gridOpts{} - for _, opt := range opts { - opt.setGridOpt(&gridOpts) - } - - cswitches := sliceToCStringArray(switches) - defer cswitches.free() - - dest := unsafe.Pointer(C.CString(destPath)) - cgc := createCGOContext(nil, gridOpts.errorHandler) - var dsRet C.GDALDatasetH - defer C.free(unsafe.Pointer(dest)) - - dsRet = C.godalGrid(cgc.cPointer(), (*C.char)(dest), ds.handle(), cswitches.cPointer()) - if err := cgc.close(); err != nil { - return nil, err - } - - return &Dataset{majorObject{C.GDALMajorObjectH(dsRet)}}, nil -} - -// Dem runs the library version of gdaldem. -// See the gdaldem doc page to determine the valid flags/opts that can be set in switches. -// -// Example switches (for "hillshade", switches differ per mode): -// -// []string{"-s", "111120", "-alt", "45"} -// -// Creation options and driver may be set in the switches slice with -// -// switches:=[]string{"-co","TILED=YES","-of","GTiff"} -// -// NOTE: `colorFilename` is a "text-based color configuration file" that MUST ONLY be -// provided when `processingMode` == "color-relief" -func (ds *Dataset) Dem(destPath, processingMode string, colorFilename string, switches []string, opts ...DemOption) (*Dataset, error) { - demOpts := demOpts{} - for _, opt := range opts { - opt.setDemOpt(&demOpts) - } - - cswitches := sliceToCStringArray(switches) - defer cswitches.free() - - dest := unsafe.Pointer(C.CString(destPath)) - defer C.free(unsafe.Pointer(dest)) - alg := unsafe.Pointer(C.CString(processingMode)) - defer C.free(unsafe.Pointer(alg)) - var colorFn *C.char - if colorFilename != "" { - colorFn = C.CString(colorFilename) - defer C.free(unsafe.Pointer(colorFn)) - } - - cgc := createCGOContext(nil, demOpts.errorHandler) - dsRet := C.godalDem(cgc.cPointer(), (*C.char)(dest), (*C.char)(alg), colorFn, ds.handle(), cswitches.cPointer()) - if err := cgc.close(); err != nil { - return nil, err - } - - return &Dataset{majorObject{C.GDALMajorObjectH(dsRet)}}, nil -} - -// Nearblack runs the library version of nearblack -// -// See the nearblack doc page to determine the valid flags/opts that can be set in switches. -// -// Example switches : -// -// []string{"-white", "-near", "10"} -// -// Creation options and driver may be set in the switches slice with -// -// switches:=[]string{"-co","TILED=YES","-of","GTiff"} -// -// NOTE: Some switches are NOT compatible with this binding, as a `nullptr` is passed to a later call to -// `GDALNearblackOptionsNew()` (as the 2nd argument). Those switches are: "-o", "-q", "-quiet" -func (ds *Dataset) Nearblack(dstDS string, switches []string, opts ...NearblackOption) (*Dataset, error) { - nearBlackOpts := nearBlackOpts{} - for _, opt := range opts { - opt.setNearblackOpt(&nearBlackOpts) - } - - cswitches := sliceToCStringArray(switches) - defer cswitches.free() - - dest := unsafe.Pointer(C.CString(dstDS)) - defer C.free(dest) - - cgc := createCGOContext(nil, nearBlackOpts.errorHandler) - - ret, err := C.godalNearblack(cgc.cPointer(), (*C.char)(dest), nil, ds.handle(), cswitches.cPointer()) - if err = cgc.close(); err != nil { - return nil, err - } - - return &Dataset{majorObject{C.GDALMajorObjectH(ret)}}, nil -} - -// NearblackInto writes the provided `sourceDs` into the Dataset that this method was called on, and -// runs the library version of nearblack. -// -// See the nearblack doc page to determine the valid flags/opts that can be set in switches. -// -// Example switches : -// -// []string{"-white", "-near", "10"} -// -// Creation options and driver may be set in the switches slice with -// -// switches:=[]string{"-co","TILED=YES","-of","GTiff"} -// -// NOTE: Some switches are NOT compatible with this binding, as a `nullptr` is passed to a later call to -// `GDALNearblackOptionsNew()` (as the 2nd argument). Those switches are: "-o", "-q", "-quiet" -func (ds *Dataset) NearblackInto(sourceDs *Dataset, switches []string, opts ...NearblackOption) error { - nearBlackOpts := nearBlackOpts{} - for _, opt := range opts { - opt.setNearblackOpt(&nearBlackOpts) - } - - cswitches := sliceToCStringArray(switches) - defer cswitches.free() - - cgc := createCGOContext(nil, nearBlackOpts.errorHandler) - - var srcDsHandle C.GDALDatasetH = nil - if sourceDs != nil { - srcDsHandle = sourceDs.handle() - } - _ = C.godalNearblack(cgc.cPointer(), nil, ds.handle(), srcDsHandle, cswitches.cPointer()) - if err := cgc.close(); err != nil { - return err - } - - return nil -} - -// GCP mirrors the structure of the GDAL_GCP type -type GCP struct { - PszId string - PszInfo string - DfGCPPixel float64 - DfGCPLine float64 - DfGCPX float64 - DfGCPY float64 - DfGCPZ float64 -} - -// gdalGCPToGoGCPArray is a utility function for conversion from `C.GCPsAndCount` (GDAL) to `[]GCP` (Go) -func gdalGCPToGoGCPArray(gcp C.GCPsAndCount) []GCP { - var ret []GCP - if gcp.gcpList == nil { - return ret - } - - //https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices - gcps := (*[1 << 30]C.GDAL_GCP)(unsafe.Pointer(gcp.gcpList)) - ret = make([]GCP, gcp.numGCPs) - for i := 0; i < len(ret); i++ { - ret[i] = GCP{ - PszId: C.GoString(gcps[i].pszId), - PszInfo: C.GoString(gcps[i].pszInfo), - DfGCPPixel: float64(gcps[i].dfGCPPixel), - DfGCPLine: float64(gcps[i].dfGCPLine), - DfGCPX: float64(gcps[i].dfGCPX), - DfGCPY: float64(gcps[i].dfGCPY), - DfGCPZ: float64(gcps[i].dfGCPZ), - } - } - - return ret -} - -// GetGCPSpatialRef runs the GDALGetGCPSpatialRef function -func (ds *Dataset) GCPSpatialRef() *SpatialRef { - return &SpatialRef{handle: C.godalGetGCPSpatialRef(ds.handle()), isOwned: false} -} - -// GetGCPs runs the GDALGetGCPs function -func (ds *Dataset) GCPs() []GCP { - gcpsAndCount := C.godalGetGCPs(ds.handle()) - return gdalGCPToGoGCPArray(gcpsAndCount) -} - -// GetGCPProjection runs the GDALGetGCPProjection function -func (ds *Dataset) GCPProjection() string { - return C.GoString(C.godalGetGCPProjection(ds.handle())) -} - -// SetGCPs runs the GDALSetGCPs function -func (ds *Dataset) SetGCPs(GCPList []GCP, opts ...SetGCPsOption) error { - setGCPsOpts := setGCPsOpts{} - for _, opt := range opts { - opt.setSetGCPsOpt(&setGCPsOpts) - } - - // Convert `[]GCP` -> `C.goGCPList` - var gcpList C.goGCPList - var ( - ids = make([]string, len(GCPList)) - infos = make([]string, len(GCPList)) - gcpPixels = make([]float64, len(GCPList)) - gcpLines = make([]float64, len(GCPList)) - gcpXs = make([]float64, len(GCPList)) - gcpYs = make([]float64, len(GCPList)) - gcpZs = make([]float64, len(GCPList)) - ) - for i, g := range GCPList { - ids[i] = g.PszId - infos[i] = g.PszInfo - gcpPixels[i] = (g.DfGCPPixel) - gcpLines[i] = (g.DfGCPLine) - gcpXs[i] = (g.DfGCPX) - gcpYs[i] = (g.DfGCPY) - gcpZs[i] = (g.DfGCPZ) - } - cIds := sliceToCStringArray(ids) - defer cIds.free() - cInfos := sliceToCStringArray(infos) - defer cInfos.free() - - gcpList.pszIds = cIds.cPointer() - gcpList.pszInfos = cInfos.cPointer() - gcpList.dfGCPPixels = cDoubleArray(gcpPixels) - gcpList.dfGCPLines = cDoubleArray(gcpLines) - gcpList.dfGCPXs = cDoubleArray(gcpXs) - gcpList.dfGCPYs = cDoubleArray(gcpYs) - gcpList.dfGCPZs = cDoubleArray(gcpZs) - - cgc := createCGOContext(nil, setGCPsOpts.errorHandler) - if setGCPsOpts.sr != nil { - C.godalSetGCPs2(cgc.cPointer(), ds.handle(), C.int(len(GCPList)), gcpList, setGCPsOpts.sr.handle) - } else { - GCPProj := C.CString(setGCPsOpts.projString) - defer C.free(unsafe.Pointer(GCPProj)) - C.godalSetGCPs(cgc.cPointer(), ds.handle(), C.int(len(GCPList)), gcpList, GCPProj) - } - - if err := cgc.close(); err != nil { - return err - } - return nil -} - -// Convert list of GCPs to a GDAL GeoTransorm array -func GCPsToGeoTransform(GCPList []GCP, opts ...GCPsToGeoTransformOption) ([6]float64, error) { - gco := gcpsToGeoTransformOpts{} - for _, opt := range opts { - opt.setGCPsToGeoTransformOpts(&gco) - } - - // Convert `[]GCP` -> `C.goGCPList` - var gcpList C.goGCPList - var ( - ids = make([]string, len(GCPList)) - infos = make([]string, len(GCPList)) - gcpPixels = make([]float64, len(GCPList)) - gcpLines = make([]float64, len(GCPList)) - gcpXs = make([]float64, len(GCPList)) - gcpYs = make([]float64, len(GCPList)) - gcpZs = make([]float64, len(GCPList)) - ) - for i, g := range GCPList { - ids[i] = g.PszId - infos[i] = g.PszInfo - gcpPixels[i] = (g.DfGCPPixel) - gcpLines[i] = (g.DfGCPLine) - gcpXs[i] = (g.DfGCPX) - gcpYs[i] = (g.DfGCPY) - gcpZs[i] = (g.DfGCPZ) - } - cIds := sliceToCStringArray(ids) - defer cIds.free() - cInfos := sliceToCStringArray(infos) - defer cInfos.free() - - gcpList.pszIds = cIds.cPointer() - gcpList.pszInfos = cInfos.cPointer() - gcpList.dfGCPPixels = cDoubleArray(gcpPixels) - gcpList.dfGCPLines = cDoubleArray(gcpLines) - gcpList.dfGCPXs = cDoubleArray(gcpXs) - gcpList.dfGCPYs = cDoubleArray(gcpYs) - gcpList.dfGCPZs = cDoubleArray(gcpZs) - - gt := make([]C.double, 6) - cgt := (*C.double)(unsafe.Pointer(>[0])) - ret := [6]float64{} - var cgc = createCGOContext(nil, gco.errorHandler) - C.godalGCPListToGeoTransform(cgc.cPointer(), gcpList, C.int(len(GCPList)), cgt) - if err := cgc.close(); err != nil { - return ret, err - } - - // Copy the values from the C Array into a Go array - for i := range gt { - ret[i] = float64(gt[i]) - } - - return ret, nil -} - -type cgoContext struct { - cctx *C.cctx - opts cStringArray -} - -func createCGOContext(configOptions []string, eh ErrorHandler) cgoContext { - cgc := cgoContext{ - opts: sliceToCStringArray(configOptions), - cctx: (*C.cctx)(C.malloc(C.size_t(unsafe.Sizeof(C.cctx{})))), - } - cgc.cctx.configOptions = cgc.opts.cPointer() - cgc.cctx.failed = 0 - cgc.cctx.errMessage = nil - if eh != nil { - cgc.cctx.handlerIdx = C.int(registerErrorHandler(eh)) - } else { - cgc.cctx.handlerIdx = 0 - } - return cgc -} - -func (cgc cgoContext) cPointer() *C.cctx { - return cgc.cctx -} - -// frees the context and returns any error it may contain -func (cgc cgoContext) close() error { - cgc.opts.free() - defer C.free(unsafe.Pointer(cgc.cctx)) - if cgc.cctx.errMessage != nil { - /* debug code - if cgc.cctx.handlerIdx != 0 { - panic("bug!") - } - */ - defer C.free(unsafe.Pointer(cgc.cctx.errMessage)) - return errors.New(C.GoString(cgc.cctx.errMessage)) - } - if cgc.cctx.handlerIdx != 0 { - defer unregisterErrorHandler(int(cgc.cctx.handlerIdx)) - return getErrorHandler(int(cgc.cctx.handlerIdx)).err - } - return nil -} diff --git a/vendor/github.com/airbusgeo/godal/godal.h b/vendor/github.com/airbusgeo/godal/godal.h deleted file mode 100644 index f7d5a79..0000000 --- a/vendor/github.com/airbusgeo/godal/godal.h +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2021 Airbus Defence and Space -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _GODAL_H_ -#define _GODAL_H_ - -#define _GNU_SOURCE 1 -#include -#include -#include -#include -#include "cpl_port.h" -#include - -#if GDAL_VERSION_NUM < 3000000 - #error "this code is only compatible with gdal version >= 3.0" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - typedef struct { - char *errMessage; - int handlerIdx; - int failed; - char **configOptions; - } cctx; - void godalSetMetadataItem(cctx *ctx, GDALMajorObjectH mo, char *ckey, char *cval, char *cdom); - void godalSetDescription(cctx *ctx, GDALMajorObjectH mo, char *desc); - void godalClearMetadata(cctx *ctx, GDALMajorObjectH mo, char *cdom); - GDALDatasetH godalOpen(cctx *ctx, const char *name, unsigned int nOpenFlags, const char *const *papszAllowedDrivers, - const char *const *papszOpenOptions, const char *const *papszSiblingFiles); - - GDALDatasetH godalCreate(cctx *ctx, GDALDriverH drv, const char *name, int width, int height, int nbands, - GDALDataType dtype, char **creationOption); - - void godalClose(cctx *ctx, GDALDatasetH ds); - int godalRegisterDriver(const char *funcname); - void godalRegisterPlugins(); - void godalRegisterPlugin(cctx *ctx, const char *name); - void godalRasterSize(GDALDatasetH ds, int *xsize, int *ysize); - - //returns a null terminated list of bands. the caller must free the returned list - GDALRasterBandH *godalRasterBands(GDALDatasetH ds); - OGRLayerH *godalVectorLayers(GDALDatasetH ds); - - GDALRasterBandH* godalBandOverviews(GDALRasterBandH bnd); - - void godalSetRasterNoDataValue(cctx *ctx, GDALRasterBandH bnd, double nd); - void godalSetDatasetNoDataValue(cctx *ctx, GDALDatasetH bnd, double nd); - void godalDeleteRasterNoDataValue(cctx *ctx, GDALRasterBandH bnd); - void godalSetRasterScaleOffset(cctx *ctx, GDALRasterBandH bnd, double scale, double offset); - void godalSetDatasetScaleOffset(cctx *ctx, GDALDatasetH bnd, double scale, double offset); - void godalSetRasterColorInterpretation(cctx *ctx, GDALRasterBandH bnd, GDALColorInterp ci); - GDALRasterBandH godalCreateMaskBand(cctx *ctx, GDALRasterBandH bnd, int flags); - GDALRasterBandH godalCreateDatasetMaskBand(cctx *ctx, GDALDatasetH ds, int flags); - OGRSpatialReferenceH godalCreateUserSpatialRef(cctx *ctx, char *userInput); - OGRSpatialReferenceH godalCreateWKTSpatialRef(cctx *ctx, char *wkt); - OGRSpatialReferenceH godalCreateProj4SpatialRef(cctx *ctx, char *proj); - OGRSpatialReferenceH godalCreateEPSGSpatialRef(cctx *ctx, int epsgCode); - void godalValidateSpatialRef(cctx *ctx, OGRSpatialReferenceH sr); - char* godalExportToWKT(cctx *ctx, OGRSpatialReferenceH sr); - OGRCoordinateTransformationH godalNewCoordinateTransformation(cctx *ctx, OGRSpatialReferenceH src, OGRSpatialReferenceH dst); - void godalDatasetSetSpatialRef(cctx *ctx, GDALDatasetH ds, OGRSpatialReferenceH sr); - void godalSetGeoTransform(cctx *ctx, GDALDatasetH ds, double *gt); - void godalGetGeoTransform(cctx *ctx, GDALDatasetH ds, double *gt); - void godalSetProjection(cctx *ctx, GDALDatasetH ds, char *wkt); - - GDALDatasetH godalTranslate(cctx *ctx, char *dstName, GDALDatasetH ds, char **switches); - GDALDatasetH godalDatasetWarp(cctx *ctx, char *dstName, int nSrcCount, GDALDatasetH *srcDS, char **switches); - void godalDatasetWarpInto(cctx *ctx, GDALDatasetH dstDs, int nSrcCount, GDALDatasetH *srcDS, char **switches); - GDALDatasetH godalDatasetVectorTranslate(cctx *ctx, char *dstName, GDALDatasetH ds, char **switches); - GDALDatasetH godalRasterize(cctx *ctx, char *dstName, GDALDatasetH dstDS, GDALDatasetH ds, char **switches); - void godalRasterizeGeometry(cctx *ctx, GDALDatasetH ds, OGRGeometryH geom, int *bands, int nBands, double *vals, int allTouched); - void godalBuildOverviews(cctx *ctx, GDALDatasetH ds, const char *resampling, int nLevels, int *levels, int nBands, int *bands); - void godalClearOverviews(cctx *ctx, GDALDatasetH ds); - - void godalDatasetStructure(GDALDatasetH ds, int *sx, int *sy, int *bsx, int *bsy, double *scale, double *offset, int *bandCount, int *dtype); - void godalBandStructure(GDALRasterBandH bnd, int *sx, int *sy, int *bsx, int *bsy, double *scale, double *offset, int *dtype); - void godalDatasetRasterIO(cctx *ctx, GDALDatasetH ds, GDALRWFlag rw, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, void *pBuffer, - int nBXSize, int nBYSize, GDALDataType eBDataType, int nBandCount, int *panBandCount, - int nPixelSpace, int nLineSpace, int nBandSpace, GDALRIOResampleAlg alg); - void godalBandRasterIO(cctx *ctx, GDALRasterBandH bnd, GDALRWFlag rw, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, void *pBuffer, - int nBXSize, int nBYSize, GDALDataType eBDataType, int nPixelSpace, int nLineSpace, GDALRIOResampleAlg alg); - void godalFillRaster(cctx *ctx, GDALRasterBandH bnd, double real, double imag); - void godalPolygonize(cctx *ctx, GDALRasterBandH in, GDALRasterBandH mask, OGRLayerH layer, int fieldIndex, char **opts); - void godalFillNoData(cctx *ctx, GDALRasterBandH in, GDALRasterBandH mask, int maxDistance, int iterations, char **opts); - void godalSieveFilter(cctx *ctx, GDALRasterBandH bnd, GDALRasterBandH mask, GDALRasterBandH dst, int sizeThreshold, int connectedNess); - - void godalLayerGetExtent(cctx *ctx, OGRLayerH layer, OGREnvelope *envelope); - void godalLayerFeatureCount(cctx *ctx, OGRLayerH layer, int *count); - void godalLayerSetFeature(cctx *ctx, OGRLayerH layer, OGRFeatureH feat); - void godalLayerCreateFeature(cctx *ctx, OGRLayerH layer, OGRFeatureH feat); - OGRFeatureH godalLayerNewFeature(cctx *ctx, OGRLayerH layer, OGRGeometryH geom); - void godalLayerDeleteFeature(cctx *ctx, OGRLayerH layer, OGRFeatureH feat); - void godalLayerSetGeometryColumnName(cctx *ctx, OGRLayerH layer, char *name); - void godalFeatureSetGeometryColumnName(cctx *ctx, OGRFeatureH feat, char *name); - void godalFeatureSetGeometry(cctx *ctx, OGRFeatureH feat, OGRGeometryH geom); - void godalFeatureSetFieldInteger(cctx *ctx, OGRFeatureH feat, int fieldIndex, int value); - void godalFeatureSetFieldInteger64(cctx *ctx, OGRFeatureH feat, int fieldIndex, long long value); - void godalFeatureSetFieldDouble(cctx *ctx, OGRFeatureH feat, int fieldIndex, double value); - void godalFeatureSetFieldString(cctx *ctx, OGRFeatureH feat, int fieldIndex, char *value); - void godalFeatureSetFieldDateTime(cctx *ctx, OGRFeatureH feat, int fieldIndex, int year, int month, int day, int hour, int minute, int second, int tzFlag); - void godalFeatureSetFieldIntegerList(cctx *ctx, OGRFeatureH feat, int fieldIndex, int nbValues, int *values); - void godalFeatureSetFieldInteger64List(cctx *ctx, OGRFeatureH feat, int fieldIndex, int nbValues, long long *values); - void godalFeatureSetFieldDoubleList(cctx *ctx, OGRFeatureH feat, int fieldIndex, int nbValues, double *values); - void godalFeatureSetFieldStringList(cctx *ctx, OGRFeatureH feat, int fieldIndex, char **values); - void godalFeatureSetFieldBinary(cctx *ctx, OGRFeatureH feat, int fieldIndex, int nbBytes, void *value); - OGRLayerH godalCreateLayer(cctx *ctx, GDALDatasetH ds, char *name, OGRSpatialReferenceH sr, OGRwkbGeometryType gtype); - OGRLayerH godalCopyLayer(cctx *ctx, GDALDatasetH ds, OGRLayerH layer, char *name); - void VSIInstallGoHandler(cctx *ctx, const char *pszPrefix, size_t bufferSize, size_t cacheSize); - - void godalGetColorTable(GDALRasterBandH bnd, GDALPaletteInterp *interp, int *nEntries, short **entries); - void godalSetColorTable(cctx *ctx, GDALRasterBandH bnd, GDALPaletteInterp interp, int nEntries, short *entries); - void godalRasterHistogram(cctx *ctx, GDALRasterBandH bnd, double *min, double *max, int *buckets, - unsigned long long **values, int bIncludeOutOfRange, int bApproxOK); - - VSILFILE *godalVSIOpen(cctx *ctx, const char *name); - void godalVSIUnlink(cctx *ctx, const char *name); - char* godalVSIClose(VSILFILE *f); - size_t godalVSIRead(VSILFILE *f, void *buf, int len, char **errmsg); - void godal_OGR_G_AddGeometry(cctx *ctx, OGRGeometryH geom, OGRGeometryH subGeom); - OGRGeometryH godal_OGR_G_Simplify(cctx *ctx, OGRGeometryH in, double tolerance); - OGRGeometryH godal_OGR_G_Buffer(cctx *ctx, OGRGeometryH in, double tolerance, int segments); - OGRGeometryH godal_OGR_G_Difference(cctx *ctx, OGRGeometryH geom1, OGRGeometryH geom2); - OGRGeometryH godal_OGR_G_GetGeometryRef(cctx *ctx, OGRGeometryH in, int subGeomIndex); - int godal_OGR_G_Intersects(cctx *ctx, OGRGeometryH geom1, OGRGeometryH geom2); - OGRGeometryH godal_OGR_G_Intersection(cctx *ctx, OGRGeometryH geom1, OGRGeometryH geom2); - OGRGeometryH godal_OGR_G_Union(cctx *ctx, OGRGeometryH geom1, OGRGeometryH geom2); - OGRGeometryH godalNewGeometryFromGeoJSON(cctx *ctx, char *geoJSON); - OGRGeometryH godalNewGeometryFromWKT(cctx *ctx, char *wkt, OGRSpatialReferenceH sr); - OGRGeometryH godalNewGeometryFromWKB(cctx *ctx, void *wkb, int wkbLen,OGRSpatialReferenceH sr); - char* godalExportGeometryWKT(cctx *ctx, OGRGeometryH in); - char* godalExportGeometryGeoJSON(cctx *ctx, OGRGeometryH in, int precision); - char* godalExportGeometryGML(cctx *ctx, OGRGeometryH in, char **switches); - void godalExportGeometryWKB(cctx *ctx, void **wkb, int *wkbLen, OGRGeometryH in); - void godalGeometryTransformTo(cctx *ctx, OGRGeometryH geom, OGRSpatialReferenceH sr); - void godalGeometryTransform(cctx *ctx, OGRGeometryH geom, OGRCoordinateTransformationH trn, OGRSpatialReferenceH dst); - - GDALDatasetH godalBuildVRT(cctx *ctx, char *dstname, char **sources, char **switches); - - void test_godal_error_handling(cctx *ctx); - void godalClearRasterStatistics(cctx *ctx, GDALDatasetH ds); - void godalComputeRasterStatistics(cctx *ctx, GDALRasterBandH bnd, int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev); - int godalGetRasterStatistics(cctx *ctx, GDALRasterBandH bnd, int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev); - void godalSetRasterStatistics(cctx *ctx, GDALRasterBandH bnd, double dfMin, double dfMax, double dfMean, double dfStdDev); - void godalGridCreate(cctx *ctx, char *pszAlgorithm, GDALGridAlgorithm eAlgorithm, GUInt32 nPoints, const double *padfX, const double *padfY, const double *padfZ, double dfXMin, double dfXMax, double dfYMin, double dfYMax, GUInt32 nXSize, GUInt32 nYSize, GDALDataType eType, void *pData); - GDALDatasetH godalGrid(cctx *ctx, const char *pszDest, GDALDatasetH hSrcDS, char **switches); - GDALDatasetH godalNearblack(cctx *ctx, const char *pszDest, GDALDatasetH hDstDS, GDALDatasetH hSrcDS, char **switches); - GDALDatasetH godalDem(cctx *ctx, const char *pszDest, const char *pszProcessing, const char *pszColorFilename, GDALDatasetH hSrcDS, char **switches); - - typedef struct { - const GDAL_GCP *gcpList; - int numGCPs; - } GCPsAndCount; - typedef struct { - char **pszIds; - char **pszInfos; - double *dfGCPPixels; - double *dfGCPLines; - double *dfGCPXs; - double *dfGCPYs; - double *dfGCPZs; - } goGCPList; - OGRSpatialReferenceH godalGetGCPSpatialRef(GDALDatasetH hSrcDS); - const GCPsAndCount godalGetGCPs(GDALDatasetH hSrcDS); - const char *godalGetGCPProjection(GDALDatasetH hSrcDS); - void godalSetGCPs(cctx *ctx, GDALDatasetH hSrcDS, int numGCPs, goGCPList GCPList, const char *pszGCPProjection); - void godalSetGCPs2(cctx *ctx, GDALDatasetH hSrcDS, int numGCPs, goGCPList GCPList, OGRSpatialReferenceH hSRS); - GDAL_GCP *goGCPListToGDALGCP(goGCPList GCPList, int numGCPs); - void godalGCPListToGeoTransform(cctx *ctx, goGCPList GCPList, int numGCPs, double *gt); -#ifdef __cplusplus -} -#endif - - -#endif // GO_GDAL_H_ diff --git a/vendor/github.com/airbusgeo/godal/histogram.go b/vendor/github.com/airbusgeo/godal/histogram.go deleted file mode 100644 index cac6deb..0000000 --- a/vendor/github.com/airbusgeo/godal/histogram.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2021 Airbus Defence and Space -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package godal - -// Histogram is a band's histogram. -type Histogram struct { - min, max float64 - counts []uint64 -} - -// Bucket is a histogram entry. It spans [Min,Max] and contains Count entries. -type Bucket struct { - Min, Max float64 - Count uint64 -} - -//Len returns the number of buckets contained in the histogram -func (h Histogram) Len() int { - return len(h.counts) -} - -//Bucket returns the i'th bucket in the histogram. i must be between 0 and Len()-1. -func (h Histogram) Bucket(i int) Bucket { - width := (h.max - h.min) / float64(len(h.counts)) - return Bucket{ - Min: h.min + width*float64(i), - Max: h.min + width*float64(i+1), - Count: h.counts[i], - } -} - -type histogramOpts struct { - approx int - includeOutside int - min, max float64 - buckets int32 - errorHandler ErrorHandler -} - -// HistogramOption is an option that can be passed to Band.Histogram() -// -// Available HistogramOptions are: -// - Approximate() to allow the algorithm to operate on a subset of the full resolution data -// - Intervals(count int, min,max float64) to compute a histogram with count buckets, spanning [min,max]. -// Each bucket will be (max-min)/count wide. If not provided, the default histogram will be returned. -// - IncludeOutOfRange() to populate the first and last bucket with values under/over the specified min/max -// when used in conjuntion with Intervals() -// - ErrLogger -type HistogramOption interface { - setHistogramOpt(ho *histogramOpts) -} - -type includeOutsideOpt struct{} - -func (ioo includeOutsideOpt) setHistogramOpt(ho *histogramOpts) { - ho.includeOutside = 1 -} - -// IncludeOutOfRange populates the first and last bucket with values under/over the specified min/max -// when used in conjuntion with Intervals() -func IncludeOutOfRange() interface { - HistogramOption -} { - return includeOutsideOpt{} -} - -type approximateOkOption struct{} - -func (aoo approximateOkOption) setHistogramOpt(ho *histogramOpts) { - ho.approx = 1 -} - -// Approximate allows the histogram algorithm to operate on a subset of the full resolution data -func Approximate() interface { - HistogramOption - StatisticsOption -} { - return approximateOkOption{} -} - -type intervalsOption struct { - min, max float64 - buckets int32 -} - -func (io intervalsOption) setHistogramOpt(ho *histogramOpts) { - ho.min = io.min - ho.max = io.max - ho.buckets = io.buckets -} - -// Intervals computes a histogram with count buckets, spanning [min,max]. -// Each bucket will be (max-min)/count wide. If not provided, the default histogram will be returned. -func Intervals(count int, min, max float64) interface { - HistogramOption -} { - return intervalsOption{min: min, max: max, buckets: int32(count)} -} diff --git a/vendor/github.com/airbusgeo/godal/options.go b/vendor/github.com/airbusgeo/godal/options.go deleted file mode 100644 index bcb85c4..0000000 --- a/vendor/github.com/airbusgeo/godal/options.go +++ /dev/null @@ -1,1530 +0,0 @@ -// Copyright 2021 Airbus Defence and Space -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package godal - -import "sort" - -// GetGeoTransformOption is an option that can be passed to Dataset.GeoTransform() -// -// Available GetGeoTransformOptions are: -// - ErrLogger -type GetGeoTransformOption interface { - setGetGeoTransformOpt(ndo *getGeoTransformOpts) -} -type getGeoTransformOpts struct { - errorHandler ErrorHandler -} - -// SetGeoTransformOption is an option that can be passed to Dataset.SetGeoTransform() -// -// Available SetGeoTransformOptions are: -// - ErrLogger -type SetGeoTransformOption interface { - setSetGeoTransformOpt(ndo *setGeoTransformOpts) -} -type setGeoTransformOpts struct { - errorHandler ErrorHandler -} - -// SetProjectionOption is an option that can be passed to Dataset.SetProjection -// -// Available SetProjection are: -// - ErrLogger -type SetProjectionOption interface { - setSetProjectionOpt(ndo *setProjectionOpts) -} -type setProjectionOpts struct { - errorHandler ErrorHandler -} - -// SetSpatialRefOption is an option that can be passed to Dataset.SetSpatialRef -// -// Available SetProjection are: -// - ErrLogger -type SetSpatialRefOption interface { - setSetSpatialRefOpt(ndo *setSpatialRefOpts) -} -type setSpatialRefOpts struct { - errorHandler ErrorHandler -} - -// SetNoDataOption is an option that can be passed to Band.SetNodata(), -// Band.ClearNodata(), Dataset.SetNodata() -// -// Available SetNoDataOptions are: -// - ErrLogger -type SetNoDataOption interface { - setSetNoDataOpt(ndo *setNodataOpts) -} -type setNodataOpts struct { - errorHandler ErrorHandler -} - -// SetScaleOffsetOption is an option that can be passed to Band.SetScaleOffset(), -// Band.ClearScaleOffset(), Dataset.SetScaleOffset() -// -// Available SetScaleOffsetOptions are: -// - ErrLogger -type SetScaleOffsetOption interface { - setSetScaleOffsetOpt(so *setScaleOffsetOpts) -} -type setScaleOffsetOpts struct { - errorHandler ErrorHandler -} - -// SetColorInterpOption is an option that can be passed to Band.SetColorInterpretation() -// -// Available SetColorInterpOption are: -// - ErrLogger -type SetColorInterpOption interface { - setSetColorInterpOpt(ndo *setColorInterpOpts) -} -type setColorInterpOpts struct { - errorHandler ErrorHandler -} - -// SetColorTableOption is an option that can be passed to Band.SetColorTable() -// -// Available SetColorTableOption are: -// - ErrLogger -type SetColorTableOption interface { - setSetColorTableOpt(ndo *setColorTableOpts) -} -type setColorTableOpts struct { - errorHandler ErrorHandler -} - -type fillBandOpts struct { - errorHandler ErrorHandler -} - -// FillBandOption is an option that can be passed to Band.Fill() -// -// Available FillBandOptions are: -// - ErrLogger -type FillBandOption interface { - setFillBandOpt(o *fillBandOpts) -} - -type bandCreateMaskOpts struct { - config []string - errorHandler ErrorHandler -} - -// BandCreateMaskOption is an option that can be passed to Band.CreateMask() -// -// Available BandCreateMaskOptions are: -// - ConfigOption -// - ErrLogger -type BandCreateMaskOption interface { - setBandCreateMaskOpt(dcm *bandCreateMaskOpts) -} - -type bandIOOpts struct { - config []string - dsWidth, dsHeight int - resampling ResamplingAlg - pixelSpacing, lineSpacing int - pixelStride, lineStride int - errorHandler ErrorHandler -} - -// BandIOOption is an option to modify the default behavior of band.IO -// -// Available BandIOOptions are: -// - PixelStride -// - LineStride -// - Window -// - Resampling -// - ConfigOption -// - PixelSpacing -// - LineSpacing -type BandIOOption interface { - setBandIOOpt(ro *bandIOOpts) -} - -type fillnodataOpts struct { - mask *Band - //options []string - maxDistance int - iterations int - errorHandler ErrorHandler -} - -// FillNoDataOption is an option that can be passed to band.FillNoData -// -// Available FillNoDataOptions are: -// - MaxDistance(int): The maximum distance (in pixels) that the algorithm will -// search out for values to interpolate. The default is 100 pixels. -// - SmoothIterations(int): The number of 3x3 average filter smoothing iterations -// to run after the interpolation to dampen artifacts. The default is zero smoothing iterations. -// - Mask(band) to use given band as nodata mask. The default uses the internal nodata mask -type FillNoDataOption interface { - setFillnodataOpt(ro *fillnodataOpts) -} - -type sieveFilterOpts struct { - mask *Band - dstBand *Band - connectedness int - errorHandler ErrorHandler -} - -// SieveFilterOption is an option to modify the behavior of Band.SieveFilter -// -// Available SieveFilterOptions are: -// - EightConnected() to enable 8-connectivity. Leave out completely for 4-connectivity (default) -// - Mask(band) to use given band as nodata mask instead of the internal nodata mask -// - NoMask() to ignore the the source band's nodata value or mask band -// - Destination(band) where to output the sieved band, instead of updating in-place -type SieveFilterOption interface { - setSieveFilterOpt(sfo *sieveFilterOpts) -} - -type polygonizeOpts struct { - mask *Band - options []string - pixFieldIndex int - errorHandler ErrorHandler -} - -// PolygonizeOption is an option to modify the default behavior of band.Polygonize -// -// Available PolygonizeOptions are: -// - EightConnected() to enable 8-connectivity. Leave out completely for 4-connectivity (default) -// - PixelValueFieldIndex(fieldidx) to populate the fieldidx'th field of the output -// dataset with the polygon's pixel value -// - Mask(band) to use given band as nodata mask instead of the internal nodata mask -type PolygonizeOption interface { - setPolygonizeOpt(ro *polygonizeOpts) -} - -type dsCreateMaskOpts struct { - config []string - errorHandler ErrorHandler -} - -// DatasetCreateMaskOption is an option that can be passed to Dataset.CreateMaskBand() -// -// Available DatasetCreateMaskOptions are: -// - ConfigOption -type DatasetCreateMaskOption interface { - setDatasetCreateMaskOpt(dcm *dsCreateMaskOpts) -} - -type dsTranslateOpts struct { - config []string - creation []string - driver DriverName - errorHandler ErrorHandler -} - -// DatasetTranslateOption is an option that can be passed to Dataset.Translate() -// -// Available DatasetTranslateOptions are: -// - ConfigOption -// - CreationOption -// - DriverName -type DatasetTranslateOption interface { - setDatasetTranslateOpt(dto *dsTranslateOpts) -} - -type dsWarpOpts struct { - config []string - creation []string - driver DriverName - errorHandler ErrorHandler -} - -// DatasetWarpOption is an option that can be passed to Dataset.Warp() -// -// Available DatasetWarpOptions are: -// - ConfigOption -// - CreationOption -// - DriverName -type DatasetWarpOption interface { - setDatasetWarpOpt(dwo *dsWarpOpts) -} - -// DatasetWarpIntoOption is an option that can be passed to Dataset.WarpInto() -// -// Available DatasetWarpIntoOption is: -// - ConfigOption -type DatasetWarpIntoOption interface { - setDatasetWarpIntoOpt(dwo *dsWarpIntoOpts) -} - -type dsWarpIntoOpts struct { - config []string - errorHandler ErrorHandler -} - -type buildOvrOpts struct { - config []string - minSize int - resampling ResamplingAlg - bands []int - levels []int - errorHandler ErrorHandler -} - -// BuildOverviewsOption is an option to specify how overview building should behave. -// -// Available BuildOverviewsOptions are: -// - ConfigOption -// - Resampling -// - Levels -// - MinSize -// - Bands -type BuildOverviewsOption interface { - setBuildOverviewsOpt(bo *buildOvrOpts) -} -type clearOvrOpts struct { - errorHandler ErrorHandler -} - -// ClearOverviewsOption is an option passed to Dataset.ClearOverviews -// -// Available options are: -// - ErrLogger -type ClearOverviewsOption interface { - setClearOverviewsOpt(bo *clearOvrOpts) -} - -type datasetIOOpts struct { - config []string - bands []int - dsWidth, dsHeight int - resampling ResamplingAlg - bandInterleave bool //return r1r2...rn,g1g2...gn,b1b2...bn instead of r1g1b1,r2g2b2,...,rngnbn - bandSpacing, pixelSpacing, lineSpacing int - bandStride, pixelStride, lineStride int - errorHandler ErrorHandler -} - -// DatasetIOOption is an option to modify the default behavior of dataset.IO -// -// Available DatasetIOOptions are: -// - PixelStride -// - LineStride -// - BandStride -// - Window -// - Resampling -// - ConfigOption -// - Bands -// - BandInterleaved -// - PixelSpacing -// - LineSpacing -// - BandSpacing -type DatasetIOOption interface { - setDatasetIOOpt(ro *datasetIOOpts) -} - -type dsCreateOpts struct { - config []string - creation []string - errorHandler ErrorHandler -} - -// DatasetCreateOption is an option that can be passed to Create() -// -// Available DatasetCreateOptions are: -// - CreationOption -// - ConfigOption -// - ErrLogger -type DatasetCreateOption interface { - setDatasetCreateOpt(dc *dsCreateOpts) -} - -type openOpts struct { - flags uint - drivers []string //list of drivers that can be tried to open the given name - options []string //driver specific open options (see gdal docs for each driver) - siblingFiles []string //list of sidecar files - config []string - errorHandler ErrorHandler -} - -// OpenOption is an option passed to Open() -// -// Available OpenOptions are: -// - Drivers -// - SiblingFiles -// - Shared -// - ConfigOption -// - Update -// - DriverOpenOption -// - RasterOnly -// - VectorOnly -type OpenOption interface { - setOpenOpt(oo *openOpts) -} - -type closeOpts struct { - errorHandler ErrorHandler -} - -// CloseOption is an option passed to Dataset.Close() -// -// Available options are: -// - ErrLogger -type CloseOption interface { - setCloseOpt(o *closeOpts) -} - -type featureCountOpts struct { - errorHandler ErrorHandler -} - -// FeatureCountOption is an option passed to Layer.FeatureCount() -// -// Available options are: -// - ErrLogger -type FeatureCountOption interface { - setFeatureCountOpt(fo *featureCountOpts) -} - -type addGeometryOpts struct { - errorHandler ErrorHandler -} -type simplifyOpts struct { - errorHandler ErrorHandler -} -type bufferOpts struct { - errorHandler ErrorHandler -} -type differenceOpts struct { - errorHandler ErrorHandler -} -type intersectsOpts struct { - errorHandler ErrorHandler -} -type subGeometryOpts struct { - errorHandler ErrorHandler -} -type intersectionOpts struct { - errorHandler ErrorHandler -} -type unionOpts struct { - errorHandler ErrorHandler -} - -// AddGeometryOption is an option passed to Geometry.AddGeometry() -// -// Available options are: -// - ErrLogger -type AddGeometryOption interface { - setAddGeometryOpt(ao *addGeometryOpts) -} - -// SimplifyOption is an option passed to Geometry.Simplify() -// -// Available options are: -// - ErrLogger -type SimplifyOption interface { - setSimplifyOpt(so *simplifyOpts) -} - -// BufferOption is an option passed to Geometry.Buffer() -// -// Available options are: -// - ErrLogger -type BufferOption interface { - setBufferOpt(bo *bufferOpts) -} - -// DifferenceOption is an option passed to Geometry.Difference() -// -// Available options are: -// - ErrLogger -type DifferenceOption interface { - setDifferenceOpt(do *differenceOpts) -} - -// IntersectsOption is an option passed to Geometry.Intersects() -// -// Available options are: -// - ErrLogger -type IntersectsOption interface { - setIntersectsOpt(bo *intersectsOpts) -} - -// SubGeometryOption is an option passed to Geometry.SubGeometry() -// -// Available options are: -// - ErrLogger -type SubGeometryOption interface { - setSubGeometryOpt(so *subGeometryOpts) -} - -// IntersectionOption is an option passed to Geometry.Intersection() -// -// Available options are: -// - ErrLogger -type IntersectionOption interface { - setIntersectionOpt(io *intersectionOpts) -} - -// UnionOption is an option passed to Geometry.Union() -// -// Available options are: -// - ErrLogger -type UnionOption interface { - setUnionOpt(uo *unionOpts) -} - -type setGeometryOpts struct { - errorHandler ErrorHandler -} - -// SetGeometryOption is an option passed to Feature.SetGeometry() -// -// Available options are: -// - ErrLogger -type SetGeometryOption interface { - setSetGeometryOpt(so *setGeometryOpts) -} - -type setFieldValueOpts struct { - errorHandler ErrorHandler -} - -// SetFieldValueOption is an option passed to Feature.SetFieldValue() -// -// Available options are: -// - ErrLogger -type SetFieldValueOption interface { - setSetFieldValueOpt(so *setFieldValueOpts) -} - -type vsiOpenOpts struct { - errorHandler ErrorHandler -} - -// VSIOpenOption is an option passed to VSIOpen() -// -// Available options are: -// - ErrLogger -type VSIOpenOption interface { - setVSIOpenOpt(vo *vsiOpenOpts) -} -type vsiUnlinkOpts struct { - errorHandler ErrorHandler -} - -// VSIUnlinkOption is an option passed to VSIUnlink() -// -// Available options are: -// - ErrLogger -type VSIUnlinkOption interface { - setVSIUnlinkOpt(vo *vsiUnlinkOpts) -} - -type geometryWKTOpts struct { - errorHandler ErrorHandler -} - -// GeometryWKTOption is an option passed to Geometry.WKT() -// -// Available options are: -// - ErrLogger -type GeometryWKTOption interface { - setGeometryWKTOpt(o *geometryWKTOpts) -} -type geometryWKBOpts struct { - errorHandler ErrorHandler -} - -// GeometryWKBOption is an option passed to Geometry.WKB() -// -// Available options are: -// - ErrLogger -type GeometryWKBOption interface { - setGeometryWKBOpt(o *geometryWKBOpts) -} - -type newGeometryOpts struct { - errorHandler ErrorHandler -} - -// NewGeometryOption is an option passed when creating a geometry -// -// Available options are: -// - ErrLogger -type NewGeometryOption interface { - setNewGeometryOpt(o *newGeometryOpts) -} - -type updateFeatureOpts struct { - errorHandler ErrorHandler -} - -// UpdateFeatureOption is an option passed to Layer.UpdateFeature() -// -// Available options are: -// - ErrLogger -type UpdateFeatureOption interface { - setUpdateFeatureOpt(o *updateFeatureOpts) -} - -type deleteFeatureOpts struct { - errorHandler ErrorHandler -} - -// DeleteFeatureOption is an option passed to Layer.DeleteFeature() -// -// Available options are: -// - ErrLogger -type DeleteFeatureOption interface { - setDeleteFeatureOpt(o *deleteFeatureOpts) -} - -type setGeometryColumnNameOpts struct { - errorHandler ErrorHandler -} - -// SetGeometryColumnNameOption is an option passed to Layer.SetGeometryColumnName() or Feature.SetGeometryColumnName() -// -// Available options are: -// - ErrLogger -type SetGeometryColumnNameOption interface { - setGeometryColumnNameOpt(o *setGeometryColumnNameOpts) -} - -type geometryTransformOpts struct { - errorHandler ErrorHandler -} - -// GeometryTransformOption is an option passed to Geometry.Transform() -// -// Available options are: -// - ErrLogger -type GeometryTransformOption interface { - setGeometryTransformOpt(o *geometryTransformOpts) -} -type geometryReprojectOpts struct { - errorHandler ErrorHandler -} - -// GeometryReprojectOption is an option passed to Geometry.Reproject() -// -// Available options are: -// - ErrLogger -type GeometryReprojectOption interface { - setGeometryReprojectOpt(o *geometryReprojectOpts) -} -type siblingFilesOpt struct { - files []string -} - -// SiblingFiles specifies the list of files that may be opened alongside the prinicpal dataset name. -// -// files must not contain a directory component (i.e. are expected to be in the same directory as -// the main dataset) -// -// SiblingFiles may be used in 3 different manners: -// - By default, i.e. by not using the option, godal will consider that there are no sibling files -// at all and will prevent any scanning or probing of specific sibling files by passing a list of -// sibling files to gdal containing only the main file -// - By passing a list of files, only those files will be probed -// - By passing SiblingFiles() (i.e. with an empty list of files), the default gdal behavior of -// -// reading the directory content and/or probing for well-known sidecar filenames will be used. -func SiblingFiles(files ...string) interface { - OpenOption -} { - return siblingFilesOpt{files} -} -func (sf siblingFilesOpt) setOpenOpt(oo *openOpts) { - if len(sf.files) > 0 { - oo.siblingFiles = append(oo.siblingFiles, sf.files...) - } else { - oo.siblingFiles = nil - } -} - -type setDescriptionOpts struct { - errorHandler ErrorHandler -} - -// SetDescriptionOption is an option that can be passed to SetDescription -// Available SetDescriptionOptions are: -// - ErrLogger -type SetDescriptionOption interface { - setDescriptionOpt(mo *setDescriptionOpts) -} - -type metadataOpts struct { - domain string - errorHandler ErrorHandler -} -type domainOpt struct { - domain string -} - -// MetadataOption is an option that can be passed to metadata related calls -// Available MetadataOptions are: -// - Domain -type MetadataOption interface { - setMetadataOpt(mo *metadataOpts) -} - -// Domain specifies the gdal metadata domain to use -func Domain(mdDomain string) interface { - MetadataOption -} { - return domainOpt{mdDomain} -} -func (mdo domainOpt) setMetadataOpt(mo *metadataOpts) { - mo.domain = mdo.domain -} - -type bandOpt struct { - bnds []int -} - -// Bands specifies which dataset bands should be read/written. By default all dataset bands -// are read/written. -// -// Note: bnds is 0-indexed so as to be consistent with Dataset.Bands(), whereas in GDAL terminology, -// bands are 1-indexed. i.e. for a 3 band dataset you should pass Bands(0,1,2) and not Bands(1,2,3). -func Bands(bnds ...int) interface { - DatasetIOOption - BuildOverviewsOption - RasterizeGeometryOption - BuildVRTOption -} { - ib := make([]int, len(bnds)) - for i := range bnds { - ib[i] = bnds[i] + 1 - } - return bandOpt{ib} -} - -func (bo bandOpt) setDatasetIOOpt(ro *datasetIOOpts) { - ro.bands = bo.bnds -} -func (bo bandOpt) setBuildOverviewsOpt(ovr *buildOvrOpts) { - ovr.bands = bo.bnds -} -func (bo bandOpt) setRasterizeGeometryOpt(o *rasterizeGeometryOpts) { - o.bands = bo.bnds -} -func (bo bandOpt) setBuildVRTOpt(bvo *buildVRTOpts) { - bvo.bands = bo.bnds -} - -type bandSpacingOpt struct { - sp int -} -type pixelSpacingOpt struct { - sp int -} -type lineSpacingOpt struct { - sp int -} -type bandStrideOpt struct { - sp int -} -type pixelStrideOpt struct { - sp int -} -type lineStrideOpt struct { - sp int -} - -func (so bandStrideOpt) setDatasetIOOpt(ro *datasetIOOpts) { - ro.bandStride = so.sp -} -func (so pixelStrideOpt) setDatasetIOOpt(ro *datasetIOOpts) { - ro.pixelStride = so.sp -} -func (so lineStrideOpt) setDatasetIOOpt(ro *datasetIOOpts) { - ro.lineStride = so.sp -} -func (so lineStrideOpt) setBandIOOpt(bo *bandIOOpts) { - bo.lineStride = so.sp -} -func (so pixelStrideOpt) setBandIOOpt(bo *bandIOOpts) { - bo.pixelStride = so.sp -} -func (so bandSpacingOpt) setDatasetIOOpt(ro *datasetIOOpts) { - ro.bandSpacing = so.sp -} -func (so pixelSpacingOpt) setDatasetIOOpt(ro *datasetIOOpts) { - ro.pixelSpacing = so.sp -} -func (so lineSpacingOpt) setDatasetIOOpt(ro *datasetIOOpts) { - ro.lineSpacing = so.sp -} -func (so lineSpacingOpt) setBandIOOpt(bo *bandIOOpts) { - bo.lineSpacing = so.sp -} -func (so pixelSpacingOpt) setBandIOOpt(bo *bandIOOpts) { - bo.pixelSpacing = so.sp -} - -// BandSpacing sets the number of bytes from one pixel to the next band of the same pixel. If not -// provided, it will be calculated from the pixel type -// -// Warning: BandSpacing expects a stride given in *bytes*. Use BandStride to supply a stride compatible -// with indexes of the buffer slice -func BandSpacing(stride int) interface { - DatasetIOOption -} { - return bandSpacingOpt{stride} -} - -// PixelSpacing sets the number of bytes from one pixel to the next pixel in the same row. If not -// provided, it will be calculated from the number of bands and pixel type -// -// Warning: PixelSpacing expects a stride given in *bytes*. Use PixelStride to supply a stride compatible -// with indexes of the buffer slice -func PixelSpacing(stride int) interface { - DatasetIOOption - BandIOOption -} { - return pixelSpacingOpt{stride} -} - -// LineSpacing sets the number of bytes from one pixel to the pixel of the same band one row below. If not -// provided, it will be calculated from the number of bands, pixel type and image width -// -// Warning: LineSpacing expects a stride given in *bytes*. Use LineStride to supply a stride compatible -// with indexes of the buffer slice -func LineSpacing(stride int) interface { - DatasetIOOption - BandIOOption -} { - return lineSpacingOpt{stride} -} - -// BandStride sets the offset in the provided buffer from one pixel to the next band of the same pixel. If not -// provided, it will be calculated from the pixel type -func BandStride(stride int) interface { - DatasetIOOption -} { - return bandStrideOpt{stride} -} - -// PixelStride sets the offset in the provided buffer from one pixel to the next pixel in the same row. If not -// provided, it will be calculated from the number of bands and pixel type -func PixelStride(stride int) interface { - DatasetIOOption - BandIOOption -} { - return pixelStrideOpt{stride} -} - -// LineStride sets the offset in the provided buffer from one pixel to the pixel of the same band one row below. If not -// provided, it will be calculated from the number of bands, pixel type and image width -func LineStride(stride int) interface { - DatasetIOOption - BandIOOption -} { - return lineStrideOpt{stride} -} - -type windowOpt struct { - sx, sy int -} - -// Window specifies the size of the dataset window to read/write. By default use the -// size of the input/output buffer (i.e. no resampling) -func Window(sx, sy int) interface { - DatasetIOOption - BandIOOption -} { - return windowOpt{sx, sy} -} - -func (wo windowOpt) setDatasetIOOpt(ro *datasetIOOpts) { - ro.dsWidth = wo.sx - ro.dsHeight = wo.sy -} -func (wo windowOpt) setBandIOOpt(ro *bandIOOpts) { - ro.dsWidth = wo.sx - ro.dsHeight = wo.sy -} - -type bandInterleaveOp struct{} - -// BandInterleaved makes Read return a band interleaved buffer instead of a pixel interleaved one. -// -// For example, pixels of a three band RGB image will be returned in order -// r1r2r3...rn, g1g2g3...gn, b1b2b3...bn instead of the default -// r1g1b1, r2g2b2, r3g3b3, ... rnbngn -// -// BandInterleaved should not be used in conjunction with BandSpacing, LineSpacing, PixelSpacing, -// BandStride, LineStride, or PixelStride -func BandInterleaved() interface { - DatasetIOOption -} { - return bandInterleaveOp{} -} - -func (bio bandInterleaveOp) setDatasetIOOpt(ro *datasetIOOpts) { - ro.bandInterleave = true -} - -type creationOpt struct { - creation []string -} - -// CreationOption are options to pass to a driver when creating a dataset, to be -// passed in the form KEY=VALUE -// -// Examples are: BLOCKXSIZE=256, COMPRESS=LZW, NUM_THREADS=8, etc... -func CreationOption(opts ...string) interface { - DatasetCreateOption - DatasetWarpOption - DatasetTranslateOption - DatasetVectorTranslateOption - GMLExportOption - RasterizeOption -} { - return creationOpt{opts} -} - -func (co creationOpt) setDatasetCreateOpt(dc *dsCreateOpts) { - dc.creation = append(dc.creation, co.creation...) -} -func (co creationOpt) setDatasetWarpOpt(dc *dsWarpOpts) { - dc.creation = append(dc.creation, co.creation...) -} -func (co creationOpt) setDatasetTranslateOpt(dc *dsTranslateOpts) { - dc.creation = append(dc.creation, co.creation...) -} -func (co creationOpt) setDatasetVectorTranslateOpt(dc *dsVectorTranslateOpts) { - dc.creation = append(dc.creation, co.creation...) -} -func (co creationOpt) setGMLExportOpt(gmlo *gmlExportOpts) { - gmlo.creation = append(gmlo.creation, co.creation...) -} -func (co creationOpt) setRasterizeOpt(o *rasterizeOpts) { - o.create = append(o.create, co.creation...) -} - -type configOpt struct { - config []string -} - -// ConfigOption sets a configuration option for a gdal library call. See the -// specific gdal function doc page and specific driver docs for allowed values. -// -// Notable options are GDAL_NUM_THREADS=8 -func ConfigOption(cfgs ...string) interface { - BuildOverviewsOption - DatasetCreateOption - DatasetWarpOption - DatasetWarpIntoOption - DatasetTranslateOption - DatasetCreateMaskOption - DatasetVectorTranslateOption - BandCreateMaskOption - OpenOption - RasterizeOption - RasterizeIntoOption - DatasetIOOption - BandIOOption - BuildVRTOption - errorAndLoggingOption -} { - return configOpt{cfgs} -} - -func (co configOpt) setBuildOverviewsOpt(bo *buildOvrOpts) { - bo.config = append(bo.config, co.config...) -} -func (co configOpt) setDatasetCreateOpt(dc *dsCreateOpts) { - dc.config = append(dc.config, co.config...) -} -func (co configOpt) setDatasetWarpOpt(dc *dsWarpOpts) { - dc.config = append(dc.config, co.config...) -} -func (co configOpt) setDatasetWarpIntoOpt(dc *dsWarpIntoOpts) { - dc.config = append(dc.config, co.config...) -} -func (co configOpt) setDatasetTranslateOpt(dc *dsTranslateOpts) { - dc.config = append(dc.config, co.config...) -} -func (co configOpt) setDatasetVectorTranslateOpt(dc *dsVectorTranslateOpts) { - dc.config = append(dc.config, co.config...) -} -func (co configOpt) setDatasetCreateMaskOpt(dcm *dsCreateMaskOpts) { - dcm.config = append(dcm.config, co.config...) -} -func (co configOpt) setBandCreateMaskOpt(bcm *bandCreateMaskOpts) { - bcm.config = append(bcm.config, co.config...) -} -func (co configOpt) setOpenOpt(oo *openOpts) { - oo.config = append(oo.config, co.config...) -} -func (co configOpt) setRasterizeOpt(oo *rasterizeOpts) { - oo.config = append(oo.config, co.config...) -} -func (co configOpt) setRasterizeIntoOpt(oo *rasterizeIntoOpts) { - oo.config = append(oo.config, co.config...) -} -func (co configOpt) setDatasetIOOpt(oo *datasetIOOpts) { - oo.config = append(oo.config, co.config...) -} -func (co configOpt) setBandIOOpt(oo *bandIOOpts) { - oo.config = append(oo.config, co.config...) -} -func (co configOpt) setBuildVRTOpt(bvo *buildVRTOpts) { - bvo.config = append(bvo.config, co.config...) -} -func (co configOpt) setErrorAndLoggingOpt(elo *errorAndLoggingOpts) { - elo.config = append(elo.config, co.config...) -} - -type minSizeOpt struct { - s int -} - -// MinSize makes BuildOverviews automatically compute the overview levels -// until the smallest overview size is less than s. -// -// Should not be used together with Levels() -func MinSize(s int) interface { - BuildOverviewsOption -} { - return minSizeOpt{s} -} - -func (ms minSizeOpt) setBuildOverviewsOpt(bo *buildOvrOpts) { - bo.minSize = ms.s -} - -type resamplingOpt struct { - m ResamplingAlg -} - -// Resampling defines the resampling algorithm to use. -// If unset will usually default to NEAREST. See gdal docs for which algorithms are -// available. -func Resampling(alg ResamplingAlg) interface { - BuildOverviewsOption - DatasetIOOption - BandIOOption - BuildVRTOption -} { - return resamplingOpt{alg} -} -func (ro resamplingOpt) setBuildOverviewsOpt(bo *buildOvrOpts) { - bo.resampling = ro.m -} -func (ro resamplingOpt) setDatasetIOOpt(io *datasetIOOpts) { - io.resampling = ro.m -} -func (ro resamplingOpt) setBandIOOpt(io *bandIOOpts) { - io.resampling = ro.m -} -func (ro resamplingOpt) setBuildVRTOpt(bvo *buildVRTOpts) { - bvo.resampling = ro.m -} - -type levelsOpt struct { - lvl []int -} - -// Levels set the overview levels to be computed. This is usually: -// -// Levels(2,4,8,16,32) -func Levels(levels ...int) interface { - BuildOverviewsOption -} { - return levelsOpt{levels} -} -func (lo levelsOpt) setBuildOverviewsOpt(bo *buildOvrOpts) { - slevels := make([]int, len(lo.lvl)) - copy(slevels, lo.lvl) - sort.Slice(slevels, func(i, j int) bool { - return slevels[i] < slevels[j] - }) - bo.levels = slevels -} - -type maskBandOpt struct { - band *Band -} - -func (mbo maskBandOpt) setPolygonizeOpt(o *polygonizeOpts) { - o.mask = mbo.band -} -func (mbo maskBandOpt) setFillnodataOpt(o *fillnodataOpts) { - o.mask = mbo.band -} -func (mbo maskBandOpt) setSieveFilterOpt(sfo *sieveFilterOpts) { - sfo.mask = mbo.band -} - -// Mask makes Polygonize or FillNoData use the given band as a nodata mask -// instead of using the source band's nodata mask -func Mask(band Band) interface { - PolygonizeOption - FillNoDataOption - SieveFilterOption -} { - return maskBandOpt{&band} -} - -// NoMask makes Polygonize ignore band nodata mask -func NoMask() interface { - PolygonizeOption - SieveFilterOption -} { - return maskBandOpt{} -} - -type dstBandOpt struct { - band *Band -} - -func (dbo dstBandOpt) setSieveFilterOpt(sfo *sieveFilterOpts) { - sfo.dstBand = dbo.band -} - -// Destination makes SieveFilter output its result to the given band, instead of updating in-place -func Destination(band Band) interface { - SieveFilterOption -} { - return dstBandOpt{&band} -} - -type maxDistanceOpt struct { - d float64 -} - -func (mdo maxDistanceOpt) setFillnodataOpt(o *fillnodataOpts) { - o.maxDistance = int(mdo.d) -} - -// MaxDistance is an option that can be passed to Band.FillNoData which sets the maximum number of -// pixels to search in all directions to find values to interpolate from. -func MaxDistance(d float64) interface { - FillNoDataOption -} { - return maxDistanceOpt{d} -} - -type smoothingIterationsOpt struct { - it int -} - -func (sio smoothingIterationsOpt) setFillnodataOpt(o *fillnodataOpts) { - o.iterations = sio.it -} - -// SmoothingIterations is an option that can be passed to Band.FillNoData which sets the number of -// 3x3 smoothing filter passes to run (0 or more). -func SmoothingIterations(iterations int) interface { - FillNoDataOption -} { - return smoothingIterationsOpt{iterations} -} - -type polyPixField struct { - fld int -} - -func (ppf polyPixField) setPolygonizeOpt(o *polygonizeOpts) { - o.pixFieldIndex = ppf.fld -} - -// PixelValueFieldIndex makes Polygonize write the polygon's pixel -// value into the layer's fld'th field -func PixelValueFieldIndex(fld int) interface { - PolygonizeOption -} { - return polyPixField{fld} -} - -type eightConnected struct{} - -func (ec eightConnected) setPolygonizeOpt(o *polygonizeOpts) { - o.options = append(o.options, "8connected=yes") -} -func (ec eightConnected) setSieveFilterOpt(sfo *sieveFilterOpts) { - sfo.connectedness = 8 -} - -// EightConnected is an option that switches pixel connectivity from 4 to 8 -func EightConnected() interface { - PolygonizeOption - SieveFilterOption -} { - return eightConnected{} -} - -type floatValues struct { - v []float64 -} - -func (v floatValues) setRasterizeGeometryOpt(o *rasterizeGeometryOpts) { - o.values = v.v -} - -// Values sets the value(s) that must be rasterized in the dataset bands. -// vals must either be a single value that will be applied to all bands, or -// exactly match the number of requested bands -func Values(vals ...float64) interface { - RasterizeGeometryOption -} { - return floatValues{vals} -} - -type spatialRefValidateOpts struct { - errorHandler ErrorHandler -} - -// SpatialRefValidateOption is an option that can be passed to SpatialRef.Validate() -// -// Available SpatialRefValidateOptions are: -// - ErrLogger -type SpatialRefValidateOption interface { - setSpatialRefValidateOpt(o *spatialRefValidateOpts) -} - -type rasterizeOpts struct { - create []string - config []string - driver DriverName - errorHandler ErrorHandler -} - -// RasterizeOption is an option that can be passed to Rasterize() -// -// Available RasterizeOptions are: -// - CreationOption -// - ConfigOption -// - DriverName -// - ErrLogger -type RasterizeOption interface { - setRasterizeOpt(ro *rasterizeOpts) -} - -type rasterizeIntoOpts struct { - config []string - errorHandler ErrorHandler -} - -// RasterizeIntoOption is an option that can be passed to DatasetRasterizeInto() -// -// Available RasterizeOptions are: -// - ConfigOption -// - ErrLogger -type RasterizeIntoOption interface { - setRasterizeIntoOpt(ro *rasterizeIntoOpts) -} - -type rasterizeGeometryOpts struct { - bands []int - values []float64 - allTouched int - errorHandler ErrorHandler -} - -type gridCreateOpts struct { - errorHandler ErrorHandler -} - -// GridCreateOption is an option that can be passed to GridCreate -// Available options are: -// - none yet -type GridCreateOption interface { - setGridCreateOpt(mo *gridCreateOpts) -} - -type gridOpts struct { - errorHandler ErrorHandler -} - -// GridOption is an option that can be passed to Dataset.Grid() -type GridOption interface { - setGridOpt(gOpt *gridOpts) -} - -type nearBlackOpts struct { - errorHandler ErrorHandler -} - -// NearblackOption is an option that can be passed to Dataset.Nearblack() -type NearblackOption interface { - setNearblackOpt(nbOpt *nearBlackOpts) -} - -type demOpts struct { - errorHandler ErrorHandler -} - -// DemOption is an option that can be passed to Dataset.Dem() -type DemOption interface { - setDemOpt(demOpt *demOpts) -} - -type setGCPsOpts struct { - errorHandler ErrorHandler - projString string - sr *SpatialRef -} - -// SetGCPsOption is an option that can be passed to Dataset.SetGCPs() -type SetGCPsOption interface { - setSetGCPsOpt(sgOpt *setGCPsOpts) -} - -type gcpsToGeoTransformOpts struct { - errorHandler ErrorHandler -} - -// GCPsToGeoTransformOption is an option that can be passed to GCPsToGeoTransform() -type GCPsToGeoTransformOption interface { - setGCPsToGeoTransformOpts(gcpGtOpt *gcpsToGeoTransformOpts) -} - -type gcpProjStringOpt struct { - projString string -} - -// GCPProjection sets the projection string as an option for SetGCPs -// -// NOTE: A non-nil `sr` takes precedence over `projString` -func GCPProjection(projStr string) interface { - SetGCPsOption -} { - return gcpProjStringOpt{projString: projStr} -} -func (gps gcpProjStringOpt) setSetGCPsOpt(sgOpt *setGCPsOpts) { - sgOpt.projString = gps.projString -} - -type gcpSpatialRefOpt struct { - sr *SpatialRef -} - -// GCPSpatialRef sets the *SpatialRef as an option for SetGCPs -// -// NOTE: A non-nil `sr` takes precedence over `projString -func GCPSpatialRef(sr *SpatialRef) interface { - SetGCPsOption -} { - return gcpSpatialRefOpt{sr: sr} -} -func (gsr gcpSpatialRefOpt) setSetGCPsOpt(sgOpt *setGCPsOpts) { - sgOpt.sr = gsr.sr -} - -type registerPluginOpts struct { - errorHandler ErrorHandler -} - -// RegisterPluginOption is an option that can be passed to RegisterPlugin() -type RegisterPluginOption interface { - setRegisterPluginOpt(rpOpt *registerPluginOpts) -} - -// RasterizeGeometryOption is an option that can be passed tp Dataset.RasterizeGeometry() -type RasterizeGeometryOption interface { - setRasterizeGeometryOpt(o *rasterizeGeometryOpts) -} - -type allTouchedOpt struct{} - -func (at allTouchedOpt) setRasterizeGeometryOpt(o *rasterizeGeometryOpts) { - o.allTouched = 1 -} - -// AllTouched is an option that can be passed to Dataset.RasterizeGeometries() -// where all pixels touched by lines or polygons will be updated, not just those on the line -// render path, or whose center point is within the polygon. -func AllTouched() interface { - RasterizeGeometryOption -} { - return allTouchedOpt{} -} - -type dsVectorTranslateOpts struct { - config []string - creation []string - driver DriverName - errorHandler ErrorHandler -} - -// DatasetVectorTranslateOption is an option that can be passed to Dataset.Warp() -// -// Available Options are: -// - CreationOption -// - ConfigOption -// - DriverName -type DatasetVectorTranslateOption interface { - setDatasetVectorTranslateOpt(dwo *dsVectorTranslateOpts) -} - -type createFeatureOpts struct { - errorHandler ErrorHandler -} - -// CreateFeatureOption is an option that can be passed to Layer.CreateFeature -// -// Available options are: -// - none yet -type CreateFeatureOption interface { - setCreateFeatureOpt(cfo *createFeatureOpts) -} - -type newFeatureOpts struct { - errorHandler ErrorHandler -} - -// NewFeatureOption is an option that can be passed to Layer.NewFeature -// -// Available options are: -// - none yet -type NewFeatureOption interface { - setNewFeatureOpt(nfo *newFeatureOpts) -} - -type createLayerOpts struct { - fields []*FieldDefinition - errorHandler ErrorHandler -} - -// CreateLayerOption is an option that can be passed to Dataset.CreateLayer() -type CreateLayerOption interface { - setCreateLayerOpt(clo *createLayerOpts) -} - -type copyLayerOpts struct { - errorHandler ErrorHandler -} - -// CopyLayerOption is an option that can be passed to Dataset.CreateLayer() -type CopyLayerOption interface { - setCopyLayerOpt(clo *copyLayerOpts) -} - -type geojsonOpts struct { - precision int - errorHandler ErrorHandler -} - -// GeoJSONOption is an option that can be passed to Geometry.GeoJSON -type GeoJSONOption interface { - setGeojsonOpt(gjo *geojsonOpts) -} - -type gmlExportOpts struct { - creation []string - errorHandler ErrorHandler -} - -// GMLExportOption is an option passed to Geometry.GML() -// -// Available options are: -// - CreationOption -// - ErrLogger -type GMLExportOption interface { - setGMLExportOpt(o *gmlExportOpts) -} - -type significantDigits int - -func (sd significantDigits) setGeojsonOpt(o *geojsonOpts) { - o.precision = int(sd) -} - -// SignificantDigits sets the number of significant digits after the decimal separator should -// be kept for geojson output -func SignificantDigits(n int) interface { - GeoJSONOption -} { - return significantDigits(n) -} - -type buildVRTOpts struct { - config []string - openOptions []string - bands []int - resampling ResamplingAlg - errorHandler ErrorHandler -} - -// BuildVRTOption is an option that can be passed to BuildVRT -// -// Available BuildVRTOptions are: -// - ConfigOption -// - DriverOpenOption -// - Bands -// - Resampling -type BuildVRTOption interface { - setBuildVRTOpt(bvo *buildVRTOpts) -} - -type vsiHandlerOpts struct { - bufferSize, cacheSize int - stripPrefix bool - errorHandler ErrorHandler -} - -// VSIHandlerOption is an option that can be passed to RegisterVSIHandler -type VSIHandlerOption interface { - setVSIHandlerOpt(v *vsiHandlerOpts) -} - -type bufferSizeOpt struct { - b int -} - -func (b bufferSizeOpt) setVSIHandlerOpt(v *vsiHandlerOpts) { - v.bufferSize = b.b -} - -type cacheSizeOpt struct { - b int -} - -func (b cacheSizeOpt) setVSIHandlerOpt(v *vsiHandlerOpts) { - v.cacheSize = b.b -} - -type stripPrefixOpt struct { - v bool -} - -func (sp stripPrefixOpt) setVSIHandlerOpt(v *vsiHandlerOpts) { - v.stripPrefix = sp.v -} - -// VSIHandlerBufferSize sets the size of the gdal-native block size used for caching. Must be positive, -// can be set to 0 to disable this behavior (not recommended). -// -// Defaults to 64Kb -func VSIHandlerBufferSize(s int) VSIHandlerOption { - return bufferSizeOpt{s} -} - -// VSIHandlerCacheSize sets the total number of gdal-native bytes used as cache *per handle*. -// Defaults to 128Kb. -func VSIHandlerCacheSize(s int) VSIHandlerOption { - return cacheSizeOpt{s} -} - -// VSIHandlerStripPrefix allows to strip the prefix of the key when calling the underlying -// VSIKeyReader. -func VSIHandlerStripPrefix(v bool) VSIHandlerOption { - return stripPrefixOpt{v} -} diff --git a/vendor/github.com/airbusgeo/godal/srs.go b/vendor/github.com/airbusgeo/godal/srs.go deleted file mode 100644 index c5d930c..0000000 --- a/vendor/github.com/airbusgeo/godal/srs.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2021 Airbus Defence and Space -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package godal - -import "fmt" - -type srWKTOpts struct { - errorHandler ErrorHandler -} - -//WKTExportOption is an option that can be passed to SpatialRef.WKT() -// -// Available WKTExportOptions are: -// - ErrLogger -type WKTExportOption interface { - setWKTExportOpt(sro *srWKTOpts) -} - -type trnOpts struct { - errorHandler ErrorHandler -} - -// TransformOption is an option that can be passed to NewTransform -// -// Available TransformOptions are: -// - ErrLogger -type TransformOption interface { - setTransformOpt(o *trnOpts) -} - -func (sr *SpatialRef) setBoundsOpt(o *boundsOpts) { - o.sr = sr -} - -type boundsOpts struct { - sr *SpatialRef - errorHandler ErrorHandler -} - -// BoundsOption is an option that can be passed to Dataset.Bounds or Geometry.Bounds -// -// Available options are: -// - *SpatialRef -// - ErrLogger -type BoundsOption interface { - setBoundsOpt(o *boundsOpts) -} - -type createSpatialRefOpts struct { - errorHandler ErrorHandler -} - -// CreateSpatialRefOption is an option that can be passed when creating a new spatial -// reference object -// -// Available options are: -// - ErrLogger -type CreateSpatialRefOption interface { - setCreateSpatialRefOpt(so *createSpatialRefOpts) -} - -func reprojectBounds(bnds [4]float64, src, dst *SpatialRef) ([4]float64, error) { - var ret [4]float64 - trn, err := NewTransform(src, dst) - if err != nil { - return ret, fmt.Errorf("create coordinate transform: %w", err) - } - defer trn.Close() - x := []float64{bnds[0], bnds[0], bnds[2], bnds[2]} - y := []float64{bnds[1], bnds[3], bnds[3], bnds[1]} - err = trn.TransformEx(x, y, nil, nil) - if err != nil { - return ret, fmt.Errorf("reproject bounds: %w", err) - } - ret[0] = x[0] - ret[1] = y[0] - ret[2] = x[0] - ret[3] = y[0] - for i := 1; i < 4; i++ { - if x[i] < ret[0] { - ret[0] = x[i] - } - if x[i] > ret[2] { - ret[2] = x[i] - } - if y[i] < ret[1] { - ret[1] = y[i] - } - if y[i] > ret[3] { - ret[3] = y[i] - } - } - return ret, nil -} diff --git a/vendor/github.com/airbusgeo/godal/statistics.go b/vendor/github.com/airbusgeo/godal/statistics.go deleted file mode 100644 index 632d3c6..0000000 --- a/vendor/github.com/airbusgeo/godal/statistics.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2021 Airbus Defence and Space -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package godal - -// Statisitics on a given band. -type Statistics struct { - Min, Max, Mean, Std float64 - Approximate bool -} - -type statisticsOpts struct { - approx int - errorHandler ErrorHandler -} - -//StatisticsOption is an option that can be passed to Band.Statistics -// -//Available Statistics options are: -// - Aproximate() to allow the satistics to be computed on overviews or a subset of all tiles. -// - ErrLogger -type StatisticsOption interface { - setStatisticsOpt(so *statisticsOpts) -} - -func (aoo approximateOkOption) setStatisticsOpt(so *statisticsOpts) { - so.approx = 1 -} - -//SetStatistics is an option that can passed to Band.SetStatistics() -//Available options are: -// -ErrLogger -type SetStatisticsOption interface { - setSetStatisticsOpt(sts *setStatisticsOpt) -} - -type setStatisticsOpt struct { - errorHandler ErrorHandler -} - -//ClearStatistics is an option passed to Dataset.ClearStatistics -//Available options are: -// -ErrLogger -type ClearStatisticsOption interface { - setClearStatisticsOpt(sts *clearStatisticsOpt) -} - -type clearStatisticsOpt struct { - errorHandler ErrorHandler -} diff --git a/vendor/github.com/airbusgeo/godal/structure.go b/vendor/github.com/airbusgeo/godal/structure.go deleted file mode 100644 index 405f28b..0000000 --- a/vendor/github.com/airbusgeo/godal/structure.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2021 Airbus Defence and Space -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package godal - -// Block is a window inside a dataset, starting at pixel X0,Y0 and spanning -// W,H pixels. -type Block struct { - X0, Y0 int - W, H int - bw, bh int //block size - sx, sy int //img size - nx, ny int //num blocks - i, j int //cur -} - -// Next returns the following block in scanline order. It returns Block{},false -// when there are no more blocks in the scanlines -func (b Block) Next() (Block, bool) { - nb := b - nb.i++ - if nb.i >= nb.nx { - nb.i = 0 - nb.j++ - } - if nb.j >= nb.ny { - return Block{}, false - } - nb.X0 = nb.i * nb.bw - nb.Y0 = nb.j * nb.bh - nb.W, nb.H = actualBlockSize(nb.sx, nb.sy, nb.bw, nb.bh, nb.i, nb.j) - - return nb, true -} - -// BlockIterator returns the blocks covering a sizeX,sizeY dataset. -// All sizes must be strictly positive. -func BlockIterator(sizeX, sizeY int, blockSizeX, blockSizeY int) Block { - bl := Block{ - X0: 0, - Y0: 0, - i: 0, - j: 0, - bw: blockSizeX, - bh: blockSizeY, - sx: sizeX, - sy: sizeY, - } - bl.nx, bl.ny = (sizeX+blockSizeX-1)/blockSizeX, - (sizeY+blockSizeY-1)/blockSizeY - bl.W, bl.H = actualBlockSize(sizeX, sizeY, blockSizeX, blockSizeY, 0, 0) - return bl -} - -// BandStructure implements Structure for a Band -type BandStructure struct { - SizeX, SizeY int - BlockSizeX, BlockSizeY int - Scale, Offset float64 - DataType DataType -} - -// DatasetStructure implements Structure for a Dataset -type DatasetStructure struct { - BandStructure - NBands int -} - -// FirstBlock returns the topleft block definition -func (is BandStructure) FirstBlock() Block { - return BlockIterator(is.SizeX, is.SizeY, is.BlockSizeX, is.BlockSizeY) -} - -// BlockCount returns the number of blocks in the x and y dimensions -func (is BandStructure) BlockCount() (int, int) { - return (is.SizeX + is.BlockSizeX - 1) / is.BlockSizeX, - (is.SizeY + is.BlockSizeY - 1) / is.BlockSizeY -} - -// ActualBlockSize returns the number of pixels in the x and y dimensions -// that actually contain data for the given x,y block -func (is BandStructure) ActualBlockSize(blockX, blockY int) (int, int) { - return actualBlockSize(is.SizeX, is.SizeY, is.BlockSizeX, is.BlockSizeY, blockX, blockY) -} - -func actualBlockSize(sizeX, sizeY int, blockSizeX, blockSizeY int, blockX, blockY int) (int, int) { - cx, cy := (sizeX+blockSizeX-1)/blockSizeX, - (sizeY+blockSizeY-1)/blockSizeY - if blockX < 0 || blockY < 0 || blockX >= cx || blockY >= cy { - return 0, 0 - } - retx := blockSizeX - rety := blockSizeY - if blockX == cx-1 { - nXPixelOff := blockX * blockSizeX - retx = sizeX - nXPixelOff - } - if blockY == cy-1 { - nYPixelOff := blockY * blockSizeY - rety = sizeY - nYPixelOff - } - return retx, rety -} diff --git a/vendor/github.com/ajstarks/svgo/LICENSE b/vendor/github.com/ajstarks/svgo/LICENSE deleted file mode 100644 index 306663c..0000000 --- a/vendor/github.com/ajstarks/svgo/LICENSE +++ /dev/null @@ -1,220 +0,0 @@ -Creative Commons Attribution 4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree to -be bound by the terms and conditions of this Creative Commons Attribution -4.0 International Public License ("Public License"). To the extent this -Public License may be interpreted as a contract, You are granted the -Licensed Rights in consideration of Your acceptance of these terms and -conditions, and the Licensor grants You such rights in consideration -of benefits the Licensor receives from making the Licensed Material -available under these terms and conditions. - -Section 1 – Definitions. - -Adapted Material means material subject to Copyright and Similar Rights -that is derived from or based upon the Licensed Material and in which -the Licensed Material is translated, altered, arranged, transformed, or -otherwise modified in a manner requiring permission under the Copyright -and Similar Rights held by the Licensor. For purposes of this Public -License, where the Licensed Material is a musical work, performance, -or sound recording, Adapted Material is always produced where the -Licensed Material is synched in timed relation with a moving image. -Adapter's License means the license You apply to Your Copyright and -Similar Rights in Your contributions to Adapted Material in accordance -with the terms and conditions of this Public License. Copyright and -Similar Rights means copyright and/or similar rights closely related to -copyright including, without limitation, performance, broadcast, sound -recording, and Sui Generis Database Rights, without regard to how the -rights are labeled or categorized. For purposes of this Public License, -the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar -Rights. Effective Technological Measures means those measures that, -in the absence of proper authority, may not be circumvented under laws -fulfilling obligations under Article 11 of the WIPO Copyright Treaty -adopted on December 20, 1996, and/or similar international agreements. -Exceptions and Limitations means fair use, fair dealing, and/or any other -exception or limitation to Copyright and Similar Rights that applies to -Your use of the Licensed Material. Licensed Material means the artistic -or literary work, database, or other material to which the Licensor -applied this Public License. Licensed Rights means the rights granted -to You subject to the terms and conditions of this Public License, which -are limited to all Copyright and Similar Rights that apply to Your use -of the Licensed Material and that the Licensor has authority to license. -Licensor means the individual(s) or entity(ies) granting rights under -this Public License. Share means to provide material to the public by -any means or process that requires permission under the Licensed Rights, -such as reproduction, public display, public performance, distribution, -dissemination, communication, or importation, and to make material -available to the public including in ways that members of the public -may access the material from a place and at a time individually chosen -by them. Sui Generis Database Rights means rights other than copyright -resulting from Directive 96/9/EC of the European Parliament and of the -Council of 11 March 1996 on the legal protection of databases, as amended -and/or succeeded, as well as other essentially equivalent rights anywhere -in the world. You means the individual or entity exercising the Licensed -Rights under this Public License. Your has a corresponding meaning. -Section 2 – Scope. - -License grant. Subject to the terms and conditions of this Public -License, the Licensor hereby grants You a worldwide, royalty-free, -non-sublicensable, non-exclusive, irrevocable license to exercise the -Licensed Rights in the Licensed Material to: reproduce and Share the -Licensed Material, in whole or in part; and produce, reproduce, and -Share Adapted Material. Exceptions and Limitations. For the avoidance -of doubt, where Exceptions and Limitations apply to Your use, this -Public License does not apply, and You do not need to comply with -its terms and conditions. Term. The term of this Public License is -specified in Section 6(a). Media and formats; technical modifications -allowed. The Licensor authorizes You to exercise the Licensed Rights in -all media and formats whether now known or hereafter created, and to make -technical modifications necessary to do so. The Licensor waives and/or -agrees not to assert any right or authority to forbid You from making -technical modifications necessary to exercise the Licensed Rights, -including technical modifications necessary to circumvent Effective -Technological Measures. For purposes of this Public License, simply making -modifications authorized by this Section 2(a)(4) never produces Adapted -Material. Downstream recipients. Offer from the Licensor – Licensed -Material. Every recipient of the Licensed Material automatically receives -an offer from the Licensor to exercise the Licensed Rights under the terms -and conditions of this Public License. No downstream restrictions. You -may not offer or impose any additional or different terms or conditions -on, or apply any Effective Technological Measures to, the Licensed -Material if doing so restricts exercise of the Licensed Rights by any -recipient of the Licensed Material. No endorsement. Nothing in this -Public License constitutes or may be construed as permission to assert -or imply that You are, or that Your use of the Licensed Material is, -connected with, or sponsored, endorsed, or granted official status by, -the Licensor or others designated to receive attribution as provided in -Section 3(a)(1)(A)(i). Other rights. - -Moral rights, such as the right of integrity, are not licensed under -this Public License, nor are publicity, privacy, and/or other similar -personality rights; however, to the extent possible, the Licensor waives -and/or agrees not to assert any such rights held by the Licensor to the -limited extent necessary to allow You to exercise the Licensed Rights, but -not otherwise. Patent and trademark rights are not licensed under this -Public License. To the extent possible, the Licensor waives any right -to collect royalties from You for the exercise of the Licensed Rights, -whether directly or through a collecting society under any voluntary or -waivable statutory or compulsory licensing scheme. In all other cases -the Licensor expressly reserves any right to collect such royalties. -Section 3 – License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - -Attribution. - -If You Share the Licensed Material (including in modified form), You must: - -retain the following if it is supplied by the Licensor with the Licensed -Material: identification of the creator(s) of the Licensed Material and -any others designated to receive attribution, in any reasonable manner -requested by the Licensor (including by pseudonym if designated); a -copyright notice; a notice that refers to this Public License; a notice -that refers to the disclaimer of warranties; a URI or hyperlink to the -Licensed Material to the extent reasonably practicable; indicate if You -modified the Licensed Material and retain an indication of any previous -modifications; and indicate the Licensed Material is licensed under this -Public License, and include the text of, or the URI or hyperlink to, -this Public License. You may satisfy the conditions in Section 3(a)(1) -in any reasonable manner based on the medium, means, and context in which -You Share the Licensed Material. For example, it may be reasonable to -satisfy the conditions by providing a URI or hyperlink to a resource -that includes the required information. If requested by the Licensor, -You must remove any of the information required by Section 3(a)(1)(A) -to the extent reasonably practicable. If You Share Adapted Material You -produce, the Adapter's License You apply must not prevent recipients of -the Adapted Material from complying with this Public License. Section 4 -– Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that apply -to Your use of the Licensed Material: - -for the avoidance of doubt, Section 2(a)(1) grants You the right to -extract, reuse, reproduce, and Share all or a substantial portion of the -contents of the database; if You include all or a substantial portion of -the database contents in a database in which You have Sui Generis Database -Rights, then the database in which You have Sui Generis Database Rights -(but not its individual contents) is Adapted Material; and You must comply -with the conditions in Section 3(a) if You Share all or a substantial -portion of the contents of the database. For the avoidance of doubt, -this Section 4 supplements and does not replace Your obligations under -this Public License where the Licensed Rights include other Copyright and -Similar Rights. Section 5 – Disclaimer of Warranties and Limitation -of Liability. - -Unless otherwise separately undertaken by the Licensor, to the -extent possible, the Licensor offers the Licensed Material as-is and -as-available, and makes no representations or warranties of any kind -concerning the Licensed Material, whether express, implied, statutory, -or other. This includes, without limitation, warranties of title, -merchantability, fitness for a particular purpose, non-infringement, -absence of latent or other defects, accuracy, or the presence or absence -of errors, whether or not known or discoverable. Where disclaimers of -warranties are not allowed in full or in part, this disclaimer may not -apply to You. To the extent possible, in no event will the Licensor -be liable to You on any legal theory (including, without limitation, -negligence) or otherwise for any direct, special, indirect, incidental, -consequential, punitive, exemplary, or other losses, costs, expenses, -or damages arising out of this Public License or use of the Licensed -Material, even if the Licensor has been advised of the possibility of -such losses, costs, expenses, or damages. Where a limitation of liability -is not allowed in full or in part, this limitation may not apply to You. -The disclaimer of warranties and limitation of liability provided above -shall be interpreted in a manner that, to the extent possible, most -closely approximates an absolute disclaimer and waiver of all liability. -Section 6 – Term and Termination. - -This Public License applies for the term of the Copyright and Similar -Rights licensed here. However, if You fail to comply with this -Public License, then Your rights under this Public License terminate -automatically. Where Your right to use the Licensed Material has -terminated under Section 6(a), it reinstates: - -automatically as of the date the violation is cured, provided it is -cured within 30 days of Your discovery of the violation; or upon express -reinstatement by the Licensor. For the avoidance of doubt, this Section -6(b) does not affect any right the Licensor may have to seek remedies -for Your violations of this Public License. For the avoidance of doubt, -the Licensor may also offer the Licensed Material under separate terms -or conditions or stop distributing the Licensed Material at any time; -however, doing so will not terminate this Public License. Sections 1, -5, 6, 7, and 8 survive termination of this Public License. Section 7 -– Other Terms and Conditions. - -The Licensor shall not be bound by any additional or different terms or -conditions communicated by You unless expressly agreed. Any arrangements, -understandings, or agreements regarding the Licensed Material not stated -herein are separate from and independent of the terms and conditions of -this Public License. Section 8 – Interpretation. - -For the avoidance of doubt, this Public License does not, and shall not be -interpreted to, reduce, limit, restrict, or impose conditions on any use -of the Licensed Material that could lawfully be made without permission -under this Public License. To the extent possible, if any provision of -this Public License is deemed unenforceable, it shall be automatically -reformed to the minimum extent necessary to make it enforceable. If -the provision cannot be reformed, it shall be severed from this Public -License without affecting the enforceability of the remaining terms -and conditions. No term or condition of this Public License will be -waived and no failure to comply consented to unless expressly agreed -to by the Licensor. Nothing in this Public License constitutes or may -be interpreted as a limitation upon, or waiver of, any privileges and -immunities that apply to the Licensor or You, including from the legal -processes of any jurisdiction or authority. Creative Commons is not -a party to its public licenses. Notwithstanding, Creative Commons may -elect to apply one of its public licenses to material it publishes and -in those instances will be considered the “Licensor.” The text of -the Creative Commons public licenses is dedicated to the public domain -under the CC0 Public Domain Dedication. Except for the limited purpose of -indicating that material is shared under a Creative Commons public license -or as otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark “Creative Commons” or any other trademark or -logo of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, understandings, -or agreements concerning use of licensed material. For the avoidance of -doubt, this paragraph does not form part of the public licenses. - -Creative Commons may be contacted at creativecommons.org. diff --git a/vendor/github.com/ajstarks/svgo/LICENSE-link.txt b/vendor/github.com/ajstarks/svgo/LICENSE-link.txt deleted file mode 100644 index e7810f1..0000000 --- a/vendor/github.com/ajstarks/svgo/LICENSE-link.txt +++ /dev/null @@ -1,3 +0,0 @@ -The contents of this repository are Licensed under -the Creative Commons Attribution 4.0 International license as described in -https://creativecommons.org/licenses/by/4.0/legalcode diff --git a/vendor/github.com/ajstarks/svgo/README.markdown b/vendor/github.com/ajstarks/svgo/README.markdown deleted file mode 100644 index 0526c06..0000000 --- a/vendor/github.com/ajstarks/svgo/README.markdown +++ /dev/null @@ -1,739 +0,0 @@ -# SVGo: A Go library for SVG generation # - -The library generates SVG as defined by the Scalable Vector Graphics 1.1 Specification (). -Output goes to the specified io.Writer. - -## Supported SVG elements and functions ## - -### Shapes, lines, text - - circle, ellipse, polygon, polyline, rect (including roundrects), line, text - -### Paths - - general, arc, cubic and quadratic bezier paths, - -### Image and Gradients - - image, linearGradient, radialGradient, - -### Transforms ### - - translate, rotate, scale, skewX, skewY - - ### Animation ### - animate, animateMotion, animateTranslate, animateRotate, animateScale, animateSkewX, animateSkewY - -### Filter Effects - - filter, feBlend, feColorMatrix, feColorMatrix, feComponentTransfer, feComposite, feConvolveMatrix, feDiffuseLighting, - feDisplacementMap, feDistantLight, feFlood, feGaussianBlur, feImage, feMerge, feMorphology, feOffset, fePointLight, - feSpecularLighting, feSpotLight,feTile, feTurbulence - - -### Metadata elements ### - - desc, defs, g (style, transform, id), marker, mask, pattern, title, (a)ddress, link, script, use - -## Building and Usage ## - -See svgdef.[svg|png|pdf] for a graphical view of the function calls - - -Usage: (assuming GOPATH is set) - - go get github.com/ajstarks/svgo - go install github.com/ajstarks/svgo/... - - -You can use godoc to browse the documentation from the command line: - - $ go doc github.com/ajstarks/svgo - - -a minimal program, to generate SVG to standard output. - - package main - - import ( - "github.com/ajstarks/svgo" - "os" - ) - - func main() { - width := 500 - height := 500 - canvas := svg.New(os.Stdout) - canvas.Start(width, height) - canvas.Circle(width/2, height/2, 100) - canvas.Text(width/2, height/2, "Hello, SVG", "text-anchor:middle;font-size:30px;fill:white") - canvas.End() - } - -Drawing in a web server: (http://localhost:2003/circle) - - package main - - import ( - "log" - "github.com/ajstarks/svgo" - "net/http" - ) - - func main() { - http.Handle("/circle", http.HandlerFunc(circle)) - err := http.ListenAndServe(":2003", nil) - if err != nil { - log.Fatal("ListenAndServe:", err) - } - } - - func circle(w http.ResponseWriter, req *http.Request) { - w.Header().Set("Content-Type", "image/svg+xml") - s := svg.New(w) - s.Start(500, 500) - s.Circle(250, 250, 125, "fill:none;stroke:black") - s.End() - } - -You may view the SVG output with a browser that supports SVG (tested on Chrome, Opera, Firefox and Safari), or any other SVG user-agent such as Batik Squiggle. - -### Graphics Sketching with SVGo and svgplay ### - -Combined with the svgplay command, SVGo can be used to "sketch" with code in a browser. - -To use svgplay and SVGo, first go to a directory with your code, and run: - - $ svgplay - 2014/06/25 22:05:28 ☠ ☠ ☠ Warning: this server allows a client connecting to 127.0.0.1:1999 to execute code on this computer ☠ ☠ ☠ - -Next open your browser to the svgplay server you just started. -svgplay only listens on localhost, and uses port 1999 (guess which year SVG was first introduced) by default - - http://localhost:1999/ - -Enter your code in the textarea, and when you are ready to run press Shift--Enter. The code will be compiled, with the results -on the right. To update, change the code and repeat. Note that compilation errors are shown in red under the code. In order for svgplay/SVGo to work, make sure that the io.Writer specified with the New function is os.Stdout. - - -If you want to sketch with an existing file, enter its URL: - - http://localhost:1999/foo.go - -![SVGplay](https://farm4.staticflickr.com/3859/14322978157_31c0114850.jpg) - - -### SVGo Papers and presentations ### - -* SVGo paper from SVGOpen 2011 - -* Programming Pictures with SVGo - -* SVGo Workshop - - -### Tutorial Video ### - -A video describing how to use the package can be seen on YouTube at - -## Package contents ## - -* svg.go: Library -* newsvg: Coding template command -* svgdef: Creates a SVG representation of the API -* animate: Animation demo -* am: Animate motion demo -* amt: Animate transformation demo -* android: The Android logo -* bubtrail: Bubble trails -* bulletgraph: Bullet Graphs (via Stephen Few) -* colortab: Display SVG named colors with RGB values -* compx: Component diagrams -* flower: Random "flowers" -* fontcompare: Compare two fonts -* f50: Get 50 photos from Flickr based on a query -* fe: Filter effects -* funnel: Funnel from transparent circles -* gradient: Linear and radial gradients -* html5logo: HTML5 logo with draggable elements -* imfade: Show image fading -* lewitt: Version of Sol Lewitt's Wall Drawing 91 -* ltr: Layer Tennis Remixes -* marker: Test markers -* paths: Demonstrate SVG paths -* pattern: Test patterns -* planets: Show the scale of the Solar system -* pmap: Proportion maps -* randcomp: Compare random number generators -* richter: Gerhard Richter's 256 colors -* rl: Random lines (port of a Processing demo) -* skewabc: Skew ABC -* span: Text span -* stockproduct: Visualize product and stock prices -* svgopher: SVGo Mascot -* svgplay: SVGo sketching server -* svgplot: Plot data -* svgrid: Compose SVG files in a grid -* tsg: Twitter Search Grid -* tumblrgrid: Tumblr picture grid -* turbulence: Turbulence filter effect -* vismem: Visualize data from files -* webfonts: "Hello, World" with Google Web Fonts -* websvg: Generate SVG as a web server - - -## Functions and types ## - -Many functions use x, y to specify an object's location, and w, h to specify the object's width and height. -Where applicable, a final optional argument specifies the style to be applied to the object. -The style strings follow the SVG standard; name:value pairs delimited by semicolons, or a -series of name="value" pairs. For example: `"fill:none; opacity:0.3"` or `fill="none" opacity="0.3"` (see: ) - -The SVG type: - - type SVG struct { - Writer io.Writer - } - -Most operations are methods on this type, specifying the destination io.Writer. - -The Offcolor type: - - type Offcolor struct { - Offset uint8 - Color string - Opacity float64 - } - -is used to specify the offset, color, and opacity of stop colors in linear and radial gradients - -The Filterspec type: - - type Filterspec struct { - In string - In2 string - Result string - } - -is used to specify inputs and results for filter effects - - -### Structure, Scripting, Metadata, Transformation and Links ### - - New(w io.Writer) *SVG - Constructor, Specify the output destination. - - Start(w int, h int, attributes ...string) - begin the SVG document with the width w and height h. Optionally add additional elements - (such as additional namespaces or scripting events) - - - Startview(w, h, minx, miny, vw, vh int) - begin the SVG document with the width w, height h, with a viewBox at minx, miny, vw, vh. - - - Startunit(w int, h int, unit string, ns ...string) - begin the SVG document, with width and height in the specified units. Optionally add additional elements - (such as additional namespaces or scripting events) - - - - Startpercent(w int, h int, ns ...string) - begin the SVG document, with width and height in percent. Optionally add additional elements - (such as additional namespaces or scripting events) - - - - StartviewUnit(w, h int, unit string, minx, miny, vw, vh int) - begin the SVG document with the width w, height h, in the specified unit, with a viewBox at minx, miny, vw, vh. - - - End() - end the SVG document - - Script(scriptype string, data ...string) - Script defines a script with a specified type, (for example "application/javascript"). - if the first variadic argument is a link, use only the link reference. - Otherwise, treat variadic arguments as the text of the script (marked up as CDATA). - if no data is specified, simply close the script element. - - - Style(scriptype string, data ...string) - Style defines a script with a specified type, (for example "text/css"). - if the first variadic argument is a link, use only the link reference. - Otherwise, treat variadic arguments as the text of the script (marked up as CDATA). - if no data is specified, simply close the style element. - - - Group(s ...string) - begin a group, with arbitrary attributes - - - Gstyle(s string) - begin a group, with the specified style. - - - Gid(s string) - begin a group, with the specified id. - - Gtransform(s string) - begin a group, with the specified transform, end with Gend(). - - - Translate(x, y int) - begins coordinate translation to (x,y), end with Gend(). - - - Scale(n float64) - scales the coordinate system by n, end with Gend(). - - - ScaleXY(x, y float64) - scales the coordinate system by x, y. End with Gend(). - - - SkewX(a float64) - SkewX skews the x coordinate system by angle a, end with Gend(). - - - SkewY(a float64) - SkewY skews the y coordinate system by angle a, end with Gend(). - - - SkewXY(ax, ay float64) - SkewXY skews x and y coordinate systems by ax, ay respectively, end with Gend(). - - - Rotate(r float64) - rotates the coordinate system by r degrees, end with Gend(). - - - TranslateRotate(x, y int, r float64) - translates the coordinate system to (x,y), then rotates to r degrees, end with Gend(). - - RotateTranslate(x, y int, r float64) - rotates the coordinate system r degrees, then translates to (x,y), end with Gend(). - - Gend() - end the group (must be paired with Gstyle, Gtransform, Gid). - - ClipPath(s ...string) - Begin a ClipPath - - - ClipEnd() - End a ClipPath - - - Def() - begin a definition block. - - - DefEnd() - end a definition block. - - Marker(id string, x, y, w, h int, s ...string) - define a marker - - - - MarkerEnd() - end a marker - - - Mask(id string, x int, y int, w int, h int, s ...string) - creates a mask with a specified id, dimension, and optional style. - - - MaskEnd() - ends the Mask element. - - - Pattern(id string, x, y, width, height int, putype string, s ...string) - define a Pattern with the specified dimensions, the putype can be either "user" or "obj", which sets the patternUnits - attribute to be either userSpaceOnUse or objectBoundingBox. - - - Desc(s string) - specify the text of the description. - - - Title(s string) - specify the text of the title. - - - Link(href string, title string) - begin a link named "href", with the specified title. - - - LinkEnd() - end the link. - - Use(x int, y int, link string, s ...string) - place the object referenced at link at the location x, y. - - -### Shapes ### - - Circle(x int, y int, r int, s ...string) - draw a circle, centered at x,y with radius r. - - - ![Circle](http://farm5.static.flickr.com/4144/5187953823_01a1741489_m.jpg) - - Ellipse(x int, y int, w int, h int, s ...string) - draw an ellipse, centered at x,y with radii w, and h. - - - ![Ellipse](http://farm2.static.flickr.com/1271/5187953773_a9d1fc406c_m.jpg) - - Polygon(x []int, y []int, s ...string) - draw a series of line segments using an array of x, y coordinates. - - - ![Polygon](http://farm2.static.flickr.com/1006/5187953873_337dc26597_m.jpg) - - Rect(x int, y int, w int, h int, s ...string) - draw a rectangle with upper left-hand corner at x,y, with width w, and height h. - - - ![Rect](http://farm2.static.flickr.com/1233/5188556032_86c90e354b_m.jpg) - - CenterRect(x int, y int, w int, h int, s ...string) - draw a rectangle with its center at x,y, with width w, and height h. - - Roundrect(x int, y int, w int, h int, rx int, ry int, s ...string) - draw a rounded rectangle with upper the left-hand corner at x,y, - with width w, and height h. The radii for the rounded portion - is specified by rx (width), and ry (height). - - ![Roundrect](http://farm2.static.flickr.com/1275/5188556120_e2a9998fee_m.jpg) - - Square(x int, y int, s int, style ...string) - draw a square with upper left corner at x,y with sides of length s. - - ![Square](http://farm5.static.flickr.com/4110/5187953659_54dcce242e_m.jpg) - -### Paths ### - - Path(p string, s ...style) - draw the arbitrary path as specified in p, according to the style specified in s. - - - Arc(sx int, sy int, ax int, ay int, r int, large bool, sweep bool, ex int, ey int, s ...string) - draw an elliptical arc beginning coordinate at sx,sy, ending coordinate at ex, ey - width and height of the arc are specified by ax, ay, the x axis rotation is r - - if sweep is true, then the arc will be drawn in a "positive-angle" direction (clockwise), - if false, the arc is drawn counterclockwise. - - if large is true, the arc sweep angle is greater than or equal to 180 degrees, - otherwise the arc sweep is less than 180 degrees. - - - ![Arc](http://farm2.static.flickr.com/1300/5188556148_df1a176074_m.jpg) - - - - Bezier(sx int, sy int, cx int, cy int, px int, py int, ex int, ey int, s ...string) - draw a cubic bezier curve, beginning at sx,sy, ending at ex,ey - with control points at cx,cy and px,py. - - - ![Bezier](http://farm2.static.flickr.com/1233/5188556246_a03e67d013.jpg) - - - - Qbezier(sx int, sy int, cx int, cy int, ex int, ey int, tx int, ty int, s ...string) - draw a quadratic bezier curve, beginning at sx, sy, ending at tx,ty - with control points are at cx,cy, ex,ey. - - - ![Qbezier](http://farm2.static.flickr.com/1018/5187953917_9a43cf64fb.jpg) - - - Qbez(sx int, sy int, cx int, cy int, ex int, ey int, s...string) - draws a quadratic bezier curver, with optional style beginning at sx,sy, ending at ex, sy - with the control point at cx, cy. - - - ![Qbez](http://farm6.static.flickr.com/5176/5569879349_5f726aab5e.jpg) - -### Lines ### - - Line(x1 int, y1 int, x2 int, y2 int, s ...string) - draw a line segment between x1,y1 and x2,y2. - - - ![Line](http://farm5.static.flickr.com/4154/5188556080_0be19da0bc.jpg) - - - Polyline(x []int, y []int, s ...string) - draw a polygon using coordinates specified in x,y arrays. - - - ![Polyline](http://farm2.static.flickr.com/1266/5188556384_a863273a69.jpg) - -### Image and Text ### - - Image(x int, y int, w int, h int, link string, s ...string) - place at x,y (upper left hand corner), the image with width w, and height h, referenced at link. - - - ![Image](http://farm5.static.flickr.com/4058/5188556346_e5ce3dcbc2_m.jpg) - - Text(x int, y int, t string, s ...string) - Place the specified text, t at x,y according to the optional style specified in s. - - - Textspan(x int, y int, t string, s ...string) -Place specified text, t at x,y according to the optional style specified in s. - -Use this method with Span(...). End with TextEnd() - - Span(t string, s ...string) -Create a text span t, using optional style s - - TextEnd() -End a text span - - Textlines(x, y int, s []string, size, spacing int, fill, align string) - Places lines of text in s, starting at x,y, at the specified size, fill, and alignment, and spacing. - - Textpath(t string, pathid string, s ...string) - places optionally styled text along a previously defined path. - - ![Image](http://farm4.static.flickr.com/3149/5694580737_4b291df768_m.jpg) - -### Color ### - - RGB(r int, g int, b int) string - creates a style string for the fill color designated - by the (r)ed, g(reen), (b)lue components. - - - RGBA(r int, g int, b int, a float64) string - as above, but includes the color's opacity as a value - between 0.0 (fully transparent) and 1.0 (opaque). - -### Gradients ### - - LinearGradient(id string, x1, y1, x2, y2 uint8, sc []Offcolor) - constructs a linear color gradient identified by id, - along the vector defined by (x1,y1), and (x2,y2). - The stop color sequence defined in sc. Coordinates are expressed as percentages. - - ![LinearGradient](http://farm5.static.flickr.com/4153/5187954033_3972f63fa9.jpg) - - RadialGradient(id string, cx, cy, r, fx, fy uint8, sc []Offcolor) - constructs a radial color gradient identified by id, - centered at (cx,cy), with a radius of r. - (fx, fy) define the location of the focal point of the light source. - The stop color sequence defined in sc. - Coordinates are expressed as percentages. - - - ![RadialGradient](http://farm2.static.flickr.com/1302/5187954065_7ddba7b819.jpg) - -### Animation ### - - Animate(link, attr string, from, to int, duration float64, repeat int, s ...string) -Animate animates the item referenced by the link, using the specified attribute -The animation starts at coordinate from, terminates at to, and repeats as specified. -Addtional attributes may be added as needed. - - - AnimateMotion(link, path string, duration float64, repeat int, s ...string) -AnimateMotion animates the referenced object ```link``` along the specified ```path``` - - - - AnimateTranslate(link string, fx, fy, tx, ty int, duration float64, repeat int, s ...string) -AnimateTranslate animates the translation transformation (link refers to the object to animate, fx, fy are from coordinates, tx, ty are the to coordinates) - - - AnimateRotate(link string, fs, fc, fe, ts, tc, te int, duration float64, repeat int, s ...string) -AnimateRotate animates the rotation transformation (link refers to the object to animate, f[s,c,e] are the from start, center, and end angles, t[s,c,e] are the -start, center, and end angles) - - - - AnimateScale(link string, from, to, duration float64, repeat int, s ...string) -AnimateScale animates the scale transformation (link refers to the object to animate, from and to specify the scaling factor) - - - - AnimateSkewX(link string, from, to, duration float64, repeat int, s ...string) -AnimateSkewX animates the skewX transformation ((link refers to the object to animate, from and to specify the skew angle) - - - - AnimateSkewY(link string, from, to, duration float64, repeat int, s ...string) -AnimateSkewY animates the skewY transformation (link refers to the object to animate, and from and to specify the skew angle) - - - -### Filter Effects ### - - Filter(id string, s ...string) - Filter begins a filter set -Standard reference: - - Fend() -Fend ends a filter set -Standard reference: - - FeBlend(fs Filterspec, mode string, s ...string) -FeBlend specifies a Blend filter primitive -Standard reference: - - FeColorMatrix(fs Filterspec, values [20]float64, s ...string) -FeColorMatrix specifies a color matrix filter primitive, with matrix values -Standard reference: - - FeColorMatrixHue(fs Filterspec, value float64, s ...string) -FeColorMatrix specifies a color matrix filter primitive, with hue values -Standard reference: - - FeColorMatrixSaturate(fs Filterspec, value float64, s ...string) -FeColorMatrix specifies a color matrix filter primitive, with saturation values -Standard reference: - - FeColorMatrixLuminence(fs Filterspec, s ...string) -FeColorMatrix specifies a color matrix filter primitive, with luminence values -Standard reference: - - FeComponentTransfer() -FeComponentTransfer begins a feComponent filter Element> -Standard reference: - - FeCompEnd() -FeCompEnd ends a feComponent filter Element> - - FeComposite(fs Filterspec, operator string, k1, k2, k3, k4 int, s ...string) -FeComposite specifies a feComposite filter primitive -Standard reference: - - FeConvolveMatrix(fs Filterspec, matrix [9]int, s ...string) -FeConvolveMatrix specifies a feConvolveMatrix filter primitive -Standard reference: - - - FeDiffuseLighting(fs Filterspec, scale, constant float64, s ...string) -FeDiffuseLighting specifies a diffuse lighting filter primitive, -a container for light source Element>s, end with DiffuseEnd() - - FeDiffEnd() -FeDiffuseEnd ends a diffuse lighting filter primitive container -Standard reference: - - - FeDisplacementMap(fs Filterspec, scale float64, xchannel, ychannel string, s ...string) -FeDisplacementMap specifies a feDisplacementMap filter primitive -Standard reference: - - FeDistantLight(fs Filterspec, azimuth, elevation float64, s ...string) -FeDistantLight specifies a feDistantLight filter primitive -Standard reference: - - FeFlood(fs Filterspec, color string, opacity float64, s ...string) -FeFlood specifies a flood filter primitive -Standard reference: - - FeFuncLinear(channel string, slope, intercept float64) -FeFuncLinear is the linear form of feFunc -Standard reference: - - FeFuncGamma(channel, amplitude, exponent, offset float64) -FeFuncGamma is the gamma curve form of feFunc -Standard reference: - - FeFuncTable(channel string, tv []float64) -FeFuncGamma is the form of feFunc using a table of values -Standard reference: - - FeFuncDiscrete(channel string, tv []float64) -FeFuncGamma is the form of feFunc using discrete values -Standard reference: - - FeGaussianBlur(fs Filterspec, stdx, stdy float64, s ...string) -FeGaussianBlur specifies a Gaussian Blur filter primitive -Standard reference: - - FeImage(href string, result string, s ...string) -FeImage specifies a feImage filter primitive -Standard reference: - - FeMerge(nodes []string, s ...string) -FeMerge specifies a feMerge filter primitive, containing feMerge Element>s -Standard reference: - - FeMorphology(fs Filterspec, operator string, xradius, yradius float64, s ...string) -FeMorphologyLight specifies a feMorphologyLight filter primitive -Standard reference: - - FeOffset(fs Filterspec, dx, dy int, s ...string) -FeOffset specifies the feOffset filter primitive -Standard reference: - - FePointLight(x, y, z float64, s ...string) -FePointLight specifies a fePpointLight filter primitive -Standard reference: - - FeSpecularLighting(fs Filterspec, scale, constant float64, exponent int, color string, s ...string) -FeSpecularLighting specifies a specular lighting filter primitive, -a container for light source elements, end with SpecularEnd() - - - FeSpecEnd() -FeSpecularEnd ends a specular lighting filter primitive container -Standard reference: - - - FeSpotLight(fs Filterspec, x, y, z, px, py, pz float64, s ...string) -FeSpotLight specifies a feSpotLight filter primitive -Standard reference: - - FeTile(fs Filterspec, in string, s ...string) -FeTile specifies the tile utility filter primitive -Standard reference: - - - FeTurbulence(fs Filterspec, ftype string, bfx, bfy float64, octaves int, seed int64, stitch bool, s ...string) -FeTurbulence specifies a turbulence filter primitive -Standard reference: - -### Filter convenience functions (modeled on CSS filter effects) ### - - Blur(p float64) -Blur function by standard deviation - - Brightness(p float64) -Brightness function (0-100) - - Grayscale() -Apply a grayscale filter to the image - - HueRotate(a float64) -Rotate Hues (0-360 degrees) - - Invert() -Invert the image's colors - - Saturate(p float64) -Percent saturation, 0 is grayscale - - Sepia() -Apply sepia tone - - -### Utility ### - - Grid(x int, y int, w int, h int, n int, s ...string) - draws a grid of straight lines starting at x,y, with a width w, and height h, and a size of n. - - ![Grid](http://farm5.static.flickr.com/4133/5190957924_7a31d0db34.jpg) - -### Credits ### - -Thanks to Jonathan Wright for the io.Writer update. diff --git a/vendor/github.com/ajstarks/svgo/doc.go b/vendor/github.com/ajstarks/svgo/doc.go deleted file mode 100644 index c24fc2d..0000000 --- a/vendor/github.com/ajstarks/svgo/doc.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -Package svg generates SVG as defined by the Scalable Vector Graphics 1.1 Specification (). -Output goes to the specified io.Writer. - -Supported SVG elements and functions - -Shapes, lines, text - - circle, ellipse, polygon, polyline, rect (including roundrects), line, text - -Paths - - general, arc, cubic and quadratic bezier paths, - -Image and Gradients - - image, linearGradient, radialGradient, - -Transforms - - translate, rotate, scale, skewX, skewY - -Filter Effects - - filter, feBlend, feColorMatrix, feColorMatrix, feComponentTransfer, feComposite, feConvolveMatrix, feDiffuseLighting, - feDisplacementMap, feDistantLight, feFlood, feGaussianBlur, feImage, feMerge, feMorphology, feOffset, fePointLight, - feSpecularLighting, feSpotLight,feTile, feTurbulence - - -Metadata elements - - desc, defs, g (style, transform, id), mask, marker, pattern, title, (a)ddress, link, script, style, use - -Usage: (assuming GOPATH is set) - - go get github.com/ajstarks/svgo - go install github.com/ajstarks/svgo/... - - -You can use godoc to browse the documentation from the command line: - - $ godoc github.com/ajstarks/svgo - - -a minimal program, to generate SVG to standard output. - - package main - - import ( - "github.com/ajstarks/svgo" - "os" - ) - - func main() { - width := 500 - height := 500 - canvas := svg.New(os.Stdout) - canvas.Start(width, height) - canvas.Circle(width/2, height/2, 100) - canvas.Text(width/2, height/2, "Hello, SVG", "text-anchor:middle;font-size:30px;fill:white") - canvas.End() - } - -Drawing in a web server: (http://localhost:2003/circle) - - package main - - import ( - "log" - "github.com/ajstarks/svgo" - "net/http" - ) - - func main() { - http.Handle("/circle", http.HandlerFunc(circle)) - err := http.ListenAndServe(":2003", nil) - if err != nil { - log.Fatal("ListenAndServe:", err) - } - } - - func circle(w http.ResponseWriter, req *http.Request) { - w.Header().Set("Content-Type", "image/svg+xml") - s := svg.New(w) - s.Start(500, 500) - s.Circle(250, 250, 125, "fill:none;stroke:black") - s.End() - } - -Functions and types - -Many functions use x, y to specify an object's location, and w, h to specify the object's width and height. -Where applicable, a final optional argument specifies the style to be applied to the object. -The style strings follow the SVG standard; name:value pairs delimited by semicolons, or a -series of name="value" pairs. For example: `"fill:none; opacity:0.3"` or `fill="none" opacity="0.3"` (see: ) - -The SVG type: - - type SVG struct { - Writer io.Writer - } - -Most operations are methods on this type, specifying the destination io.Writer. - -The Offcolor type: - - type Offcolor struct { - Offset uint8 - Color string - Opacity float64 - } - -is used to specify the offset, color, and opacity of stop colors in linear and radial gradients - -The Filterspec type: - - type Filterspec struct { - In string - In2 string - Result string - } - -is used to specify inputs and results for filter effects - -*/ -package svg diff --git a/vendor/github.com/ajstarks/svgo/newsvg b/vendor/github.com/ajstarks/svgo/newsvg deleted file mode 100644 index 46c7099..0000000 --- a/vendor/github.com/ajstarks/svgo/newsvg +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -if test $# -lt 1 -then - echo "specify a file" - exit 2 -fi - -if test ! -f $1 -then -cat < $1 -package main - -import ( - "github.com/ajstarks/svgo" - "os" -) - -var ( - width = 500 - height = 500 - canvas = svg.New(os.Stdout) -) - -func background(v int) { canvas.Rect(0, 0, width, height, canvas.RGB(v, v, v)) } - - -func main() { - canvas.Start(width, height) - background(255) - - // your code here - - canvas.Grid(0, 0, width, height, 10, "stroke:black;opacity:0.1") - canvas.End() -} -! -fi -$EDITOR $1 diff --git a/vendor/github.com/ajstarks/svgo/svg.go b/vendor/github.com/ajstarks/svgo/svg.go deleted file mode 100644 index 03af677..0000000 --- a/vendor/github.com/ajstarks/svgo/svg.go +++ /dev/null @@ -1,1080 +0,0 @@ -// Package svg provides an API for generating Scalable Vector Graphics (SVG) -package svg - -// package main -// -// import ( -// "github.com/ajstarks/svgo" -// "os" -// ) -// -// var ( -// width = 500 -// height = 500 -// canvas = svg.New(os.Stdout) -// ) -// -// func main() { -// canvas.Start(width, height) -// canvas.Circle(width/2, height/2, 100) -// canvas.Text(width/2, height/2, "Hello, SVG", -// "text-anchor:middle;font-size:30px;fill:white") -// canvas.End() -// } -// - -import ( - "fmt" - "io" - - "encoding/xml" - "strings" -) - -// SVG defines the location of the generated SVG -type SVG struct { - Writer io.Writer -} - -// Offcolor defines the offset and color for gradients -type Offcolor struct { - Offset uint8 - Color string - Opacity float64 -} - -// Filterspec defines the specification of SVG filters -type Filterspec struct { - In, In2, Result string -} - -const ( - svgtop = ` - -` - vbfmt = `viewBox="%d %d %d %d"` - - emptyclose = "/>\n" -) - -// New is the SVG constructor, specifying the io.Writer where the generated SVG is written. -func New(w io.Writer) *SVG { return &SVG{w} } - -func (svg *SVG) print(a ...interface{}) (n int, errno error) { - return fmt.Fprint(svg.Writer, a...) -} - -func (svg *SVG) println(a ...interface{}) (n int, errno error) { - return fmt.Fprintln(svg.Writer, a...) -} - -func (svg *SVG) printf(format string, a ...interface{}) (n int, errno error) { - return fmt.Fprintf(svg.Writer, format, a...) -} - -func (svg *SVG) genattr(ns []string) { - for _, v := range ns { - svg.printf("\n %s", v) - } - svg.println(svgns) -} - -// Structure, Metadata, Scripting, Style, Transformation, and Links - -// Start begins the SVG document with the width w and height h. -// Other attributes may be optionally added, for example viewbox or additional namespaces -// Standard Reference: http://www.w3.org/TR/SVG11/struct.html#SVGElement -func (svg *SVG) Start(w int, h int, ns ...string) { - svg.printf(svginitfmt, svgtop, w, "", h, "") - svg.genattr(ns) -} - -// Startunit begins the SVG document, with width and height in the specified units -// Other attributes may be optionally added, for example viewbox or additional namespaces -func (svg *SVG) Startunit(w int, h int, unit string, ns ...string) { - svg.printf(svginitfmt, svgtop, w, unit, h, unit) - svg.genattr(ns) -} - -// Startpercent begins the SVG document, with width and height as percentages -// Other attributes may be optionally added, for example viewbox or additional namespaces -func (svg *SVG) Startpercent(w int, h int, ns ...string) { - svg.printf(svginitfmt, svgtop, w, "%", h, "%") - svg.genattr(ns) -} - -// Startview begins the SVG document, with the specified width, height, and viewbox -// Other attributes may be optionally added, for example viewbox or additional namespaces -func (svg *SVG) Startview(w, h, minx, miny, vw, vh int) { - svg.Start(w, h, fmt.Sprintf(vbfmt, minx, miny, vw, vh)) -} - -// StartviewUnit begins the SVG document with the specified width, height, and unit -func (svg *SVG) StartviewUnit(w, h int, unit string, minx, miny, vw, vh int) { - svg.Startunit(w, h, unit, fmt.Sprintf(vbfmt, minx, miny, vw, vh)) -} - -// Startraw begins the SVG document, passing arbitrary attributes -func (svg *SVG) Startraw(ns ...string) { - svg.printf(svgtop) - svg.genattr(ns) -} - -// End the SVG document -func (svg *SVG) End() { svg.println("") } - -// linkembed defines an element with a specified type, -// (for example "application/javascript", or "text/css"). -// if the first variadic argument is a link, use only the link reference. -// Otherwise, treat those arguments as the text of the script (marked up as CDATA). -// if no data is specified, just close the element -func (svg *SVG) linkembed(tag string, scriptype string, data ...string) { - svg.printf(`<%s type="%s"`, tag, scriptype) - switch { - case len(data) == 1 && islink(data[0]): - svg.printf(" %s/>\n", href(data[0])) - - case len(data) > 0: - svg.printf(">\n\n\n", tag) - - default: - svg.println(`/>`) - } -} - -// Script defines a script with a specified type, (for example "application/javascript"). -func (svg *SVG) Script(scriptype string, data ...string) { - svg.linkembed("script", scriptype, data...) -} - -// Style defines the specified style (for example "text/css") -func (svg *SVG) Style(scriptype string, data ...string) { - svg.linkembed("style", scriptype, data...) -} - -// Gstyle begins a group, with the specified style. -// Standard Reference: http://www.w3.org/TR/SVG11/struct.html#GElement -func (svg *SVG) Gstyle(s string) { svg.println(group("style", s)) } - -// Gtransform begins a group, with the specified transform -// Standard Reference: http://www.w3.org/TR/SVG11/coords.html#TransformAttribute -func (svg *SVG) Gtransform(s string) { svg.println(group("transform", s)) } - -// Translate begins coordinate translation, end with Gend() -// Standard Reference: http://www.w3.org/TR/SVG11/coords.html#TransformAttribute -func (svg *SVG) Translate(x, y int) { svg.Gtransform(translate(x, y)) } - -// Scale scales the coordinate system by n, end with Gend() -// Standard Reference: http://www.w3.org/TR/SVG11/coords.html#TransformAttribute -func (svg *SVG) Scale(n float64) { svg.Gtransform(scale(n)) } - -// ScaleXY scales the coordinate system by dx and dy, end with Gend() -// Standard Reference: http://www.w3.org/TR/SVG11/coords.html#TransformAttribute -func (svg *SVG) ScaleXY(dx, dy float64) { svg.Gtransform(scaleXY(dx, dy)) } - -// SkewX skews the x coordinate system by angle a, end with Gend() -// Standard Reference: http://www.w3.org/TR/SVG11/coords.html#TransformAttribute -func (svg *SVG) SkewX(a float64) { svg.Gtransform(skewX(a)) } - -// SkewY skews the y coordinate system by angle a, end with Gend() -// Standard Reference: http://www.w3.org/TR/SVG11/coords.html#TransformAttribute -func (svg *SVG) SkewY(a float64) { svg.Gtransform(skewY(a)) } - -// SkewXY skews x and y coordinates by ax, ay respectively, end with Gend() -// Standard Reference: http://www.w3.org/TR/SVG11/coords.html#TransformAttribute -func (svg *SVG) SkewXY(ax, ay float64) { svg.Gtransform(skewX(ax) + " " + skewY(ay)) } - -// Rotate rotates the coordinate system by r degrees, end with Gend() -// Standard Reference: http://www.w3.org/TR/SVG11/coords.html#TransformAttribute -func (svg *SVG) Rotate(r float64) { svg.Gtransform(rotate(r)) } - -// TranslateRotate translates the coordinate system to (x,y), then rotates to r degrees, end with Gend() -func (svg *SVG) TranslateRotate(x, y int, r float64) { - svg.Gtransform(translate(x, y) + " " + rotate(r)) -} - -// RotateTranslate rotates the coordinate system r degrees, then translates to (x,y), end with Gend() -func (svg *SVG) RotateTranslate(x, y int, r float64) { - svg.Gtransform(rotate(r) + " " + translate(x, y)) -} - -// Group begins a group with arbitrary attributes -func (svg *SVG) Group(s ...string) { svg.printf("`)) } - -// Gid begins a group, with the specified id -func (svg *SVG) Gid(s string) { - svg.print(``) -} - -// Gend ends a group (must be paired with Gsttyle, Gtransform, Gid). -func (svg *SVG) Gend() { svg.println(``) } - -// ClipPath defines a clip path -func (svg *SVG) ClipPath(s ...string) { svg.printf(``)) } - -// ClipEnd ends a ClipPath -func (svg *SVG) ClipEnd() { - svg.println(``) -} - -// Def begins a defintion block. -// Standard Reference: http://www.w3.org/TR/SVG11/struct.html#DefsElement -func (svg *SVG) Def() { svg.println(``) } - -// DefEnd ends a defintion block. -func (svg *SVG) DefEnd() { svg.println(``) } - -// Marker defines a marker -// Standard reference: http://www.w3.org/TR/SVG11/painting.html#MarkerElement -func (svg *SVG) Marker(id string, x, y, width, height int, s ...string) { - svg.printf(`\n")) -} - -// MarkerEnd ends a marker -func (svg *SVG) MarkerEnd() { svg.println(``) } - -// Pattern defines a pattern with the specified dimensions. -// The putype can be either "user" or "obj", which sets the patternUnits -// attribute to be either userSpaceOnUse or objectBoundingBox -// Standard reference: http://www.w3.org/TR/SVG11/pservers.html#Patterns -func (svg *SVG) Pattern(id string, x, y, width, height int, putype string, s ...string) { - puattr := "userSpaceOnUse" - if putype != "user" { - puattr = "objectBoundingBox" - } - svg.printf(`\n")) -} - -// PatternEnd ends a marker -func (svg *SVG) PatternEnd() { svg.println(``) } - -// Desc specified the text of the description tag. -// Standard Reference: http://www.w3.org/TR/SVG11/struct.html#DescElement -func (svg *SVG) Desc(s string) { svg.tt("desc", s) } - -// Title specified the text of the title tag. -// Standard Reference: http://www.w3.org/TR/SVG11/struct.html#TitleElement -func (svg *SVG) Title(s string) { svg.tt("title", s) } - -// Link begins a link named "name", with the specified title. -// Standard Reference: http://www.w3.org/TR/SVG11/linking.html#Links -func (svg *SVG) Link(href string, title string) { - svg.printf("") -} - -// LinkEnd ends a link. -func (svg *SVG) LinkEnd() { svg.println(``) } - -// Use places the object referenced at link at the location x, y, with optional style. -// Standard Reference: http://www.w3.org/TR/SVG11/struct.html#UseElement -func (svg *SVG) Use(x int, y int, link string, s ...string) { - svg.printf(``)) -} - -// MaskEnd ends a Mask. -func (svg *SVG) MaskEnd() { svg.println(``) } - -// Shapes - -// Circle centered at x,y, with radius r, with optional style. -// Standard Reference: http://www.w3.org/TR/SVG11/shapes.html#CircleElement -func (svg *SVG) Circle(x int, y int, r int, s ...string) { - svg.printf(`")) - xml.Escape(svg.Writer, []byte(t)) - svg.println(``) -} - -// Textspan begins text, assuming a tspan will be included, end with TextEnd() -// Standard Reference: https://www.w3.org/TR/SVG11/text.html#TSpanElement -func (svg *SVG) Textspan(x int, y int, t string, s ...string) { - svg.printf(`")) - xml.Escape(svg.Writer, []byte(t)) -} - -// Span makes styled spanned text, should be proceeded by Textspan -// Standard Reference: https://www.w3.org/TR/SVG11/text.html#TSpanElement -func (svg *SVG) Span(t string, s ...string) { - if len(s) == 0 { - xml.Escape(svg.Writer, []byte(t)) - return - } - svg.printf(`")) - xml.Escape(svg.Writer, []byte(t)) - svg.printf(``) -} - -// TextEnd ends spanned text -// Standard Reference: https://www.w3.org/TR/SVG11/text.html#TSpanElement -func (svg *SVG) TextEnd() { - svg.println(``) -} - -// Textpath places text optionally styled text along a previously defined path -// Standard Reference: http://www.w3.org/TR/SVG11/text.html#TextPathElement -func (svg *SVG) Textpath(t string, pathid string, s ...string) { - svg.printf("", endstyle(s, ">"), pathid) - xml.Escape(svg.Writer, []byte(t)) - svg.println(``) -} - -// Textlines places a series of lines of text starting at x,y, at the specified size, fill, and alignment. -// Each line is spaced according to the spacing argument -func (svg *SVG) Textlines(x, y int, s []string, size, spacing int, fill, align string) { - svg.Gstyle(fmt.Sprintf("font-size:%dpx;fill:%s;text-anchor:%s", size, fill, align)) - for _, t := range s { - svg.Text(x, y, t) - y += spacing - } - svg.Gend() -} - -// Colors - -// RGB specifies a fill color in terms of a (r)ed, (g)reen, (b)lue triple. -// Standard reference: http://www.w3.org/TR/css3-color/ -func (svg *SVG) RGB(r int, g int, b int) string { - return fmt.Sprintf(`fill:rgb(%d,%d,%d)`, r, g, b) -} - -// RGBA specifies a fill color in terms of a (r)ed, (g)reen, (b)lue triple and opacity. -func (svg *SVG) RGBA(r int, g int, b int, a float64) string { - return fmt.Sprintf(`fill-opacity:%.2f; %s`, a, svg.RGB(r, g, b)) -} - -// Gradients - -// LinearGradient constructs a linear color gradient identified by id, -// along the vector defined by (x1,y1), and (x2,y2). -// The stop color sequence defined in sc. Coordinates are expressed as percentages. -func (svg *SVG) LinearGradient(id string, x1, y1, x2, y2 uint8, sc []Offcolor) { - svg.printf("\n", - id, pct(x1), pct(y1), pct(x2), pct(y2)) - svg.stopcolor(sc) - svg.println("") -} - -// RadialGradient constructs a radial color gradient identified by id, -// centered at (cx,cy), with a radius of r. -// (fx, fy) define the location of the focal point of the light source. -// The stop color sequence defined in sc. -// Coordinates are expressed as percentages. -func (svg *SVG) RadialGradient(id string, cx, cy, r, fx, fy uint8, sc []Offcolor) { - svg.printf("\n", - id, pct(cx), pct(cy), pct(r), pct(fx), pct(fy)) - svg.stopcolor(sc) - svg.println("") -} - -// stopcolor is a utility function used by the gradient functions -// to define a sequence of offsets (expressed as percentages) and colors -func (svg *SVG) stopcolor(oc []Offcolor) { - for _, v := range oc { - svg.printf("\n", - pct(v.Offset), v.Color, v.Opacity) - } -} - -// Filter Effects: -// Most functions have common attributes (in, in2, result) defined in type Filterspec -// used as a common first argument. - -// Filter begins a filter set -// Standard reference: http://www.w3.org/TR/SVG11/filters.html#FilterElement -func (svg *SVG) Filter(id string, s ...string) { - svg.printf(`\n")) -} - -// Fend ends a filter set -// Standard reference: http://www.w3.org/TR/SVG11/filters.html#FilterElement -func (svg *SVG) Fend() { - svg.println(``) -} - -// FeBlend specifies a Blend filter primitive -// Standard reference: http://www.w3.org/TR/SVG11/filters.html#feBlendElement -func (svg *SVG) FeBlend(fs Filterspec, mode string, s ...string) { - switch mode { - case "normal", "multiply", "screen", "darken", "lighten": - break - default: - mode = "normal" - } - svg.printf(` 360 { - value = 0 - } - svg.printf(` 1 { - value = 1 - } - svg.printf(``) -} - -// FeCompEnd ends a feComponent filter element -// Standard reference: http://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement -func (svg *SVG) FeCompEnd() { - svg.println(``) -} - -// FeComposite specifies a feComposite filter primitive -// Standard reference: http://www.w3.org/TR/SVG11/filters.html#feCompositeElement -func (svg *SVG) FeComposite(fs Filterspec, operator string, k1, k2, k3, k4 int, s ...string) { - switch operator { - case "over", "in", "out", "atop", "xor", "arithmetic": - break - default: - operator = "over" - } - svg.printf(``)) -} - -// FeDiffEnd ends a diffuse lighting filter primitive container -// Standard reference: http://www.w3.org/TR/SVG11/filters.html#feDiffuseLightingElement -func (svg *SVG) FeDiffEnd() { - svg.println(``) -} - -// FeDisplacementMap specifies a feDisplacementMap filter primitive -// Standard reference: http://www.w3.org/TR/SVG11/filters.html#feDisplacementMapElement -func (svg *SVG) FeDisplacementMap(fs Filterspec, scale float64, xchannel, ychannel string, s ...string) { - svg.printf(``) - for _, n := range nodes { - svg.printf("\n", n) - } - svg.println(``) -} - -// FeMorphology specifies a feMorphologyLight filter primitive -// Standard reference: http://www.w3.org/TR/SVG11/filters.html#feMorphologyElement -func (svg *SVG) FeMorphology(fs Filterspec, operator string, xradius, yradius float64, s ...string) { - switch operator { - case "erode", "dilate": - break - default: - operator = "erode" - } - svg.printf(`\n")) -} - -// FeSpecEnd ends a specular lighting filter primitive container -// Standard reference: http://www.w3.org/TR/SVG11/filters.html#feSpecularLightingElement -func (svg *SVG) FeSpecEnd() { - svg.println(``) -} - -// FeSpotLight specifies a feSpotLight filter primitive -// Standard reference: http://www.w3.org/TR/SVG11/filters.html#feSpotLightElement -func (svg *SVG) FeSpotLight(fs Filterspec, x, y, z, px, py, pz float64, s ...string) { - svg.printf(` 1 { - bfx = 0 - } - if bfy < 0 || bfy > 1 { - bfy = 0 - } - switch ftype[0:1] { - case "f", "F": - ftype = "fractalNoise" - case "t", "T": - ftype = "turbulence" - default: - ftype = "turbulence" - } - - var ss string - if stitch { - ss = "stitch" - } else { - ss = "noStitch" - } - svg.printf(` -`, href(link), duration, repeatString(repeat), endstyle(s, ">"), href(path)) -} - -// AnimateTransform animates in the context of SVG transformations -func (svg *SVG) AnimateTransform(link, ttype, from, to string, duration float64, repeat int, s ...string) { - svg.printf(` 0 { - svg.Gstyle(s[0]) - } - for ix := x; ix <= x+w; ix += n { - svg.Line(ix, y, ix, y+h) - } - - for iy := y; iy <= y+h; iy += n { - svg.Line(x, iy, x+w, iy) - } - if len(s) > 0 { - svg.Gend() - } - -} - -// Support functions - -// coordpair returns a coordinate pair as a string -func coordpair(x, y int) string { - return fmt.Sprintf("%d %d", x, y) -} - -// sce makes start, center, end coordinates string for animate transformations -func sce(start, center, end int) string { - return fmt.Sprintf("%d %d %d", start, center, end) -} - -// repeatString computes the repeat string for animation methods -// repeat <= 0 --> "indefinite", otherwise the integer string -func repeatString(n int) string { - if n > 0 { - return fmt.Sprintf("%d", n) - } - return "indefinite" -} - -// style returns a style name,attribute string -func style(s string) string { - if len(s) > 0 { - return fmt.Sprintf(`style="%s"`, s) - } - return s -} - -// pp returns a series of polygon points -func (svg *SVG) pp(x []int, y []int, tag string) { - svg.print(tag) - if len(x) != len(y) { - svg.print(" ") - return - } - lx := len(x) - 1 - for i := 0; i < lx; i++ { - svg.print(coord(x[i], y[i]) + " ") - } - svg.print(coord(x[lx], y[lx])) -} - -// endstyle modifies an SVG object, with either a series of name="value" pairs, -// or a single string containing a style -func endstyle(s []string, endtag string) string { - if len(s) > 0 { - nv := "" - for i := 0; i < len(s); i++ { - if strings.Index(s[i], "=") > 0 { - nv += (s[i]) + " " - } else { - nv += style(s[i]) + " " - } - } - return nv + endtag - } - return endtag - -} - -// tt creates a xml element, tag containing s -func (svg *SVG) tt(tag string, s string) { - svg.print("<" + tag + ">") - xml.Escape(svg.Writer, []byte(s)) - svg.println("") -} - -// poly compiles the polygon element -func (svg *SVG) poly(x []int, y []int, tag string, s ...string) { - svg.pp(x, y, "<"+tag+" points=\"") - svg.print(`" ` + endstyle(s, "/>\n")) -} - -// onezero returns "0" or "1" -func onezero(flag bool) string { - if flag { - return "1" - } - return "0" -} - -// pct returns a percetage, capped at 100 -func pct(n uint8) uint8 { - if n > 100 { - return 100 - } - return n -} - -// islink determines if a string is a script reference -func islink(link string) bool { - return strings.HasPrefix(link, "http://") || strings.HasPrefix(link, "#") || - strings.HasPrefix(link, "../") || strings.HasPrefix(link, "./") -} - -// group returns a group element -func group(tag string, value string) string { return fmt.Sprintf(``, tag, value) } - -// scale return the scale string for the transform -func scale(n float64) string { return fmt.Sprintf(`scale(%g)`, n) } - -// scaleXY return the scale string for the transform -func scaleXY(dx, dy float64) string { return fmt.Sprintf(`scale(%g,%g)`, dx, dy) } - -// skewx returns the skewX string for the transform -func skewX(angle float64) string { return fmt.Sprintf(`skewX(%g)`, angle) } - -// skewx returns the skewX string for the transform -func skewY(angle float64) string { return fmt.Sprintf(`skewY(%g)`, angle) } - -// rotate returns the rotate string for the transform -func rotate(r float64) string { return fmt.Sprintf(`rotate(%g)`, r) } - -// translate returns the translate string for the transform -func translate(x, y int) string { return fmt.Sprintf(`translate(%d,%d)`, x, y) } - -// coord returns a coordinate string -func coord(x int, y int) string { return fmt.Sprintf(`%d,%d`, x, y) } - -// ptag returns the beginning of the path element -func ptag(x int, y int) string { return fmt.Sprintf(` 0 { - attrs += fmt.Sprintf(`in="%s" `, s.In) - } - if len(s.In2) > 0 { - attrs += fmt.Sprintf(`in2="%s" `, s.In2) - } - if len(s.Result) > 0 { - attrs += fmt.Sprintf(`result="%s" `, s.Result) - } - return attrs -} - -// tablevalues outputs a series of values as a XML attribute -func (svg *SVG) tablevalues(s string, t []float64) { - svg.printf(` %s="`, s) - for i := 0; i < len(t)-1; i++ { - svg.printf("%g ", t[i]) - } - svg.printf(`%g"%s`, t[len(t)-1], emptyclose) -} - -// imgchannel validates the image channel indicator -func imgchannel(c string) string { - switch c { - case "R", "G", "B", "A": - return c - case "r", "g", "b", "a": - return strings.ToUpper(c) - case "red", "green", "blue", "alpha": - return strings.ToUpper(c[0:1]) - case "Red", "Green", "Blue", "Alpha": - return c[0:1] - } - return "R" -} diff --git a/vendor/github.com/ajstarks/svgo/svgdef.pdf b/vendor/github.com/ajstarks/svgo/svgdef.pdf deleted file mode 100644 index 66664bd..0000000 Binary files a/vendor/github.com/ajstarks/svgo/svgdef.pdf and /dev/null differ diff --git a/vendor/github.com/ajstarks/svgo/svgdef.svg b/vendor/github.com/ajstarks/svgo/svgdef.svg deleted file mode 100644 index 6318580..0000000 --- a/vendor/github.com/ajstarks/svgo/svgdef.svg +++ /dev/null @@ -1,395 +0,0 @@ - - - -Object Definitions - - - - - - - - - - - - - - - - -x, y - -w -Square(x, y, w int, style ...string) - - - -x, y - -h -w -Rect(x, y, w, h int, style ...string) - - - -x, y - -h -w -CenterRect(x, y, w, h int, style ...string) - - - -x, y - -h -w - - -ry -rx -Roundrect(x, y, w, h, rx, ry int, style ...string) - - - -x, y - -x, y - -x, y - -x, y - -x, y - -x, y - -Polygon(x, y []int, style ...string) - - - - -x, y - - -r -Circle(x, y, r int, style ...string) - - - - - -x, y - - - -rx -ry -Ellipse(x, y, rx, ry int, style ...string) - - - - -x1, y1 - -x2, y2 - -Line(x1, y1, x2, y2 int, style ...string) - - - -x, y - -x, y - -x, y - -x, y - -Polyline(x, y []int, style ...string) - - - -sx, sy - -ex, ey - -Arc(sx, sy, ax, ay, r int, lflag, sflag bool, ex, ey int, style ...string) - - - - - -x, y -Path(s string, style ...string) - - - -sx, sy - -cx, cy - -ex, ey - -Qbez(sx, sy, cx, cy, ex, ey int, style ...string) - - - -sx, sy - -cx, cy - -px, py - -ex, ey - -Bezier(sx, sy, cx, cy, px, py, ex, ey int, style ...string) - - - -x, y - -h -w - -Image(x, y, w, h, int path string, style ...string) - - - - -x1%, y1% - -x2%, y2% -LinearGradient(s string, x1, y1, x2, y2 uint8, oc []Offcolor) - - - - -cx%, cy% - -fx%, fy% -RadialGradient(s string, cx, cy, r, fx, fy uint8, oc []Offcolor) - - - -0, 0 - -x, y -Translate(x, y int) - - - - - - - -x, y -h -w -n - - - - - - - - - - - - - - - - -Grid(x, y, w, h, n int, style ...string) - - - -x, y -hello, this is SVG -Text(x, y int, s string, style ...string) - - - -0, 0 - - - - -Scale(n float64) - - - -0, 0 - - - - -ScaleXY(x, y float64) - - - -0, 0 - - - - -SkewX(a float64) - - - -0, 0 - - - - -SkewY(a float64) - - - -0, 0 - - - - -SkewXY(x, y float64) - - - -0, 0 -Rotate(r float64) - - -r - - - - - -It's "fine" & "dandy" to draw text along a path -Textpath(s, pathid string, style ...string) - - - -New(w io Writer) -Start(w, h int, options ...string)/End() -Startview(w, h, minx, miny, vw, vh int) -Group(s ...string)/Gend() -Gstyle(s string)/Gend() -Gtransform(s string)/Gend() -Gid(id string)/Gend() -ClipPath(s ...string)/ClipEnd() -Def()/DefEnd() -Marker()/MarkerEnd() -Pattern()/PatternEnd() -Desc(s string) -Title(s string) -Script(type, data ...string) -Mask(id string, x,y,w,h int, style ...string)/MaskEnd() -Link(href string, title string)/LinkEnd() -Use(x int, y int, link string, style ...string) - - -specify destination -begin/end the document -begin/end the document with viewport -begin/end group with attributes -begin/end group style -begin/end group transform -begin/end group id -begin/end clip path -begin/end a defintion block -begin/end markers -begin/end pattern -set the description element -set the title element -define a script -begin/end mask element -begin/end link to href, with a title -use defined objects - -Textlines(x, y int, s []string, size, spacing int, fill, align string) - - - - - - - -r -g -b --> - -RGB(r, g, b int) - - - - - - - - -alpha -r -g -b --> - -RGBA(r, g, b int, opacity float64) - - -SVG Go Library Description - - - -SVG Go Library -github.com/ajstarks/svgo - -Object Usage - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/github.com/campoy/embedmd/.gitignore b/vendor/github.com/campoy/embedmd/.gitignore deleted file mode 100644 index 6d343e7..0000000 --- a/vendor/github.com/campoy/embedmd/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.vscode/ -*.test -embed -.DS_Store diff --git a/vendor/github.com/campoy/embedmd/.travis.yml b/vendor/github.com/campoy/embedmd/.travis.yml deleted file mode 100644 index c9b96e5..0000000 --- a/vendor/github.com/campoy/embedmd/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: go - -go: - - 1.7.x - - 1.8.x - - 1.x - - master -script: - - go test ./... diff --git a/vendor/github.com/campoy/embedmd/LICENSE b/vendor/github.com/campoy/embedmd/LICENSE deleted file mode 100644 index e06d208..0000000 --- a/vendor/github.com/campoy/embedmd/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/vendor/github.com/campoy/embedmd/README.md b/vendor/github.com/campoy/embedmd/README.md deleted file mode 100644 index c55fcd6..0000000 --- a/vendor/github.com/campoy/embedmd/README.md +++ /dev/null @@ -1,152 +0,0 @@ -[![Build Status](https://travis-ci.org/campoy/embedmd.svg)](https://travis-ci.org/campoy/embedmd) [![Go Report Card](https://goreportcard.com/badge/github.com/campoy/embedmd)](https://goreportcard.com/report/github.com/campoy/embedmd) - - -# embedmd - -Are you tired of copy pasting your code into your `README.md` file, just to -forget about it later on and have unsynced copies? Or even worse, code -that does not even compile? - -Then `embedmd` is for you! - -`embedmd` embeds files or fractions of files into Markdown files. It does -so by searching `embedmd` commands, which are a subset of the Markdown -syntax for comments. This means they are invisible when Markdown is -rendered, so they can be kept in the file as pointers to the origin of -the embedded text. - -The command receives a list of Markdown files. If no list is given, the command -reads from the standard input. - -The format of an `embedmd` command is: - -```Markdown -[embedmd]:# (pathOrURL language /start regexp/ /end regexp/) -``` - -The embedded code will be extracted from the file at `pathOrURL`, -which can either be a relative path to a file in the local file -system (using always forward slashes as directory separator) or -a URL starting with `http://` or `https://`. -If the `pathOrURL` is a URL the tool will fetch the content in that URL. -The embedded content starts at the first line that matches `/start regexp/` -and finishes at the first line matching `/end regexp/`. - -Omitting the the second regular expression will embed only the piece of text -that matches `/regexp/`: - -```Markdown -[embedmd]:# (pathOrURL language /regexp/) -``` - -To embed the whole line matching a regular expression you can use: - -```Markdown -[embedmd]:# (pathOrURL language /.*regexp.*/) -``` - -To embed from a point to the end you should use: - -```Markdown -[embedmd]:# (pathOrURL language /start regexp/ $) -``` - -To embed a whole file, omit both regular expressions: - -```Markdown -[embedmd]:# (pathOrURL language) -``` - -You can omit the language in any of the previous commands, and the extension -of the file will be used for the snippet syntax highlighting. - -This works when the file extensions matches the name of the language (like Go -files, since `.go` matches `go`). However, this will fail with other files like -`.md` whose language name is `markdown`. - -```Markdown -[embedmd]:# (file.ext) -``` - -## Installation - -> You can install Go by following [these instructions](https://golang.org/doc/install). - -`embedmd` is written in Go, so if you have Go installed you can install it with -`go get`: - -``` -go get github.com/campoy/embedmd -``` - -This will download the code, compile it, and leave an `embedmd` binary -in `$GOPATH/bin`. - -Eventually, and if there's enough interest, I will provide binaries for -every OS and architecture out there ... _eventually_. - -## Usage: - -Given the two files in [sample](sample): - -*hello.go:* - -[embedmd]:# (sample/hello.go) -```go -// Copyright 2016 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package main - -import ( - "fmt" - "time" -) - -func main() { - fmt.Println("Hello, there, it is", time.Now()) -} -``` - -*docs.md:* - -[embedmd]:# (sample/docs.md Markdown /./ /embedmd.*time.*/) -```Markdown -# A hello world in Go - -Go is very simple, here you can see a whole "hello, world" program. - -[embedmd]:# (hello.go) - -We can try to embed a file from a directory. - -[embedmd]:# (test/hello.go /func main/ $) - -You always start with a `package` statement like: - -[embedmd]:# (hello.go /package.*/) - -Followed by an `import` statement: - -[embedmd]:# (hello.go /import/ /\)/) - -You can also see how to get the current time: - -[embedmd]:# (hello.go /time\.[^)]*\)/) -``` - -# Flags - -* `-w`: Executing `embedmd -w docs.md` will modify `docs.md` -and add the corresponding code snippets, as shown in -[sample/result.md](sample/result.md). - -* `-d`: Executing `embedmd -d docs.md` will display the difference -between the contents of `docs.md` and the output of -`embedmd docs.md`. - -### Disclaimer - -This is not an official Google product (experimental or otherwise), it is just -code that happens to be owned by Google. diff --git a/vendor/github.com/campoy/embedmd/embedmd/command.go b/vendor/github.com/campoy/embedmd/embedmd/command.go deleted file mode 100644 index 35ff28e..0000000 --- a/vendor/github.com/campoy/embedmd/embedmd/command.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2016 Google Inc. All rights reserved. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to writing, software distributed -// under the License is distributed on a "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. - -package embedmd - -import ( - "errors" - "path/filepath" - "strings" -) - -type command struct { - path, lang string - start, end *string -} - -func parseCommand(s string) (*command, error) { - s = strings.TrimSpace(s) - if len(s) < 2 || s[0] != '(' || s[len(s)-1] != ')' { - return nil, errors.New("argument list should be in parenthesis") - } - - args, err := fields(s[1 : len(s)-1]) - if err != nil { - return nil, err - } - if len(args) == 0 { - return nil, errors.New("missing file name") - } - - cmd := &command{path: args[0]} - args = args[1:] - if len(args) > 0 && args[0][0] != '/' { - cmd.lang, args = args[0], args[1:] - } else { - ext := filepath.Ext(cmd.path[1:]) - if len(ext) == 0 { - return nil, errors.New("language is required when file has no extension") - } - cmd.lang = ext[1:] - } - - switch { - case len(args) == 1: - cmd.start = &args[0] - case len(args) == 2: - cmd.start, cmd.end = &args[0], &args[1] - case len(args) > 2: - return nil, errors.New("too many arguments") - } - - return cmd, nil -} - -// fields returns a list of the groups of text separated by blanks, -// keeping all text surrounded by / as a group. -func fields(s string) ([]string, error) { - var args []string - - for s = strings.TrimSpace(s); len(s) > 0; s = strings.TrimSpace(s) { - if s[0] == '/' { - sep := nextSlash(s[1:]) - if sep < 0 { - return nil, errors.New("unbalanced /") - } - args, s = append(args, s[:sep+2]), s[sep+2:] - } else { - sep := strings.IndexByte(s[1:], ' ') - if sep < 0 { - return append(args, s), nil - } - args, s = append(args, s[:sep+1]), s[sep+1:] - } - } - - return args, nil -} - -// nextSlash will find the index of the next unescaped slash in a string. -func nextSlash(s string) int { - for sep := 0; ; sep++ { - i := strings.IndexByte(s[sep:], '/') - if i < 0 { - return -1 - } - sep += i - if sep == 0 || s[sep-1] != '\\' { - return sep - } - } -} diff --git a/vendor/github.com/campoy/embedmd/embedmd/content.go b/vendor/github.com/campoy/embedmd/embedmd/content.go deleted file mode 100644 index b9001af..0000000 --- a/vendor/github.com/campoy/embedmd/embedmd/content.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2016 Google Inc. All rights reserved. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to writing, software distributed -// under the License is distributed on a "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. - -package embedmd - -import ( - "fmt" - "io/ioutil" - "net/http" - "path/filepath" - "strings" -) - -// Fetcher provides an abstraction on a file system. -// The Fetch function is called anytime some content needs to be fetched. -// For now this includes files and URLs. -// The first parameter is the base directory that could be used to resolve -// relative paths. This base directory will be ignored for absolute paths, -// such as URLs. -type Fetcher interface { - Fetch(dir, path string) ([]byte, error) -} - -type fetcher struct{} - -func (fetcher) Fetch(dir, path string) ([]byte, error) { - if !strings.HasPrefix(path, "http://") && !strings.HasPrefix(path, "https://") { - path = filepath.Join(dir, filepath.FromSlash(path)) - return ioutil.ReadFile(path) - } - - res, err := http.Get(path) - if err != nil { - return nil, err - } - defer res.Body.Close() - if res.StatusCode != http.StatusOK { - return nil, fmt.Errorf("status %s", res.Status) - } - return ioutil.ReadAll(res.Body) -} diff --git a/vendor/github.com/campoy/embedmd/embedmd/embedmd.go b/vendor/github.com/campoy/embedmd/embedmd/embedmd.go deleted file mode 100644 index 7135f75..0000000 --- a/vendor/github.com/campoy/embedmd/embedmd/embedmd.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2016 Google Inc. All rights reserved. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to writing, software distributed -// under the License is distributed on a "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package embedmd provides a single function, Process, that parses markdown -// searching for markdown comments. -// -// The format of an embedmd command is: -// -// [embedmd]:# (pathOrURL language /start regexp/ /end regexp/) -// -// The embedded code will be extracted from the file at pathOrURL, -// which can either be a relative path to a file in the local file -// system (using always forward slashes as directory separator) or -// a url starting with http:// or https://. -// If the pathOrURL is a url the tool will fetch the content in that url. -// The embedded content starts at the first line that matches /start regexp/ -// and finishes at the first line matching /end regexp/. -// -// Omitting the the second regular expression will embed only the piece of -// text that matches /regexp/: -// -// [embedmd]:# (pathOrURL language /regexp/) -// -// To embed the whole line matching a regular expression you can use: -// -// [embedmd]:# (pathOrURL language /.*regexp.*\n/) -// -// If you want to embed from a point to the end you should use: -// -// [embedmd]:# (pathOrURL language /start regexp/ $) -// -// Finally you can embed a whole file by omitting both regular expressions: -// -// [embedmd]:# (pathOrURL language) -// -// You can ommit the language in any of the previous commands, and the extension -// of the file will be used for the snippet syntax highlighting. Note that while -// this works Go files, since the file extension .go matches the name of the language -// go, this will fail with other files like .md whose language name is markdown. -// -// [embedmd]:# (file.ext) -// -package embedmd - -import ( - "fmt" - "io" - "regexp" -) - -// Process reads markdown from the given io.Reader searching for an embedmd -// command. When a command is found, it is executed and the output is written -// into the given io.Writer with the rest of standard markdown. -func Process(out io.Writer, in io.Reader, opts ...Option) error { - e := embedder{Fetcher: fetcher{}} - for _, opt := range opts { - opt.f(&e) - } - return process(out, in, e.runCommand) -} - -// An Option provides a way to adapt the Process function to your needs. -type Option struct{ f func(*embedder) } - -// WithBaseDir indicates that the given path should be used to resolve relative -// paths. -func WithBaseDir(path string) Option { - return Option{func(e *embedder) { e.baseDir = path }} -} - -// WithFetcher provides a custom Fetcher to be used whenever a path or url needs -// to be fetched. -func WithFetcher(c Fetcher) Option { - return Option{func(e *embedder) { e.Fetcher = c }} -} - -type embedder struct { - Fetcher - baseDir string -} - -func (e *embedder) runCommand(w io.Writer, cmd *command) error { - b, err := e.Fetch(e.baseDir, cmd.path) - if err != nil { - return fmt.Errorf("could not read %s: %v", cmd.path, err) - } - - b, err = extract(b, cmd.start, cmd.end) - if err != nil { - return fmt.Errorf("could not extract content from %s: %v", cmd.path, err) - } - - if len(b) > 0 && b[len(b)-1] != '\n' { - b = append(b, '\n') - } - - fmt.Fprintln(w, "```"+cmd.lang) - w.Write(b) - fmt.Fprintln(w, "```") - return nil -} - -func extract(b []byte, start, end *string) ([]byte, error) { - if start == nil && end == nil { - return b, nil - } - - match := func(s string) ([]int, error) { - if len(s) <= 2 || s[0] != '/' || s[len(s)-1] != '/' { - return nil, fmt.Errorf("missing slashes (/) around %q", s) - } - re, err := regexp.CompilePOSIX(s[1 : len(s)-1]) - if err != nil { - return nil, err - } - loc := re.FindIndex(b) - if loc == nil { - return nil, fmt.Errorf("could not match %q", s) - } - return loc, nil - } - - if *start != "" { - loc, err := match(*start) - if err != nil { - return nil, err - } - if end == nil { - return b[loc[0]:loc[1]], nil - } - b = b[loc[0]:] - } - - if *end != "$" { - loc, err := match(*end) - if err != nil { - return nil, err - } - b = b[:loc[1]] - } - - return b, nil -} diff --git a/vendor/github.com/campoy/embedmd/embedmd/parser.go b/vendor/github.com/campoy/embedmd/embedmd/parser.go deleted file mode 100644 index 02eccf9..0000000 --- a/vendor/github.com/campoy/embedmd/embedmd/parser.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2016 Google Inc. All rights reserved. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to writing, software distributed -// under the License is distributed on a "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. - -package embedmd - -import ( - "bufio" - "fmt" - "io" - "strings" -) - -type commandRunner func(io.Writer, *command) error - -func process(out io.Writer, in io.Reader, run commandRunner) error { - s := &countingScanner{bufio.NewScanner(in), 0} - - state := parsingText - var err error - for state != nil { - state, err = state(out, s, run) - if err != nil { - return fmt.Errorf("%d: %v", s.line, err) - } - } - - if err := s.Err(); err != nil { - return fmt.Errorf("%d: %v", s.line, err) - } - return nil -} - -type countingScanner struct { - *bufio.Scanner - line int -} - -func (c *countingScanner) Scan() bool { - b := c.Scanner.Scan() - if b { - c.line++ - } - return b -} - -type textScanner interface { - Text() string - Scan() bool -} - -type state func(io.Writer, textScanner, commandRunner) (state, error) - -func parsingText(out io.Writer, s textScanner, run commandRunner) (state, error) { - if !s.Scan() { - return nil, nil // end of file, which is fine. - } - switch line := s.Text(); { - case strings.HasPrefix(line, "[embedmd]:#"): - return parsingCmd, nil - case strings.HasPrefix(line, "```"): - return codeParser{print: true}.parse, nil - default: - fmt.Fprintln(out, s.Text()) - return parsingText, nil - } -} - -func parsingCmd(out io.Writer, s textScanner, run commandRunner) (state, error) { - line := s.Text() - fmt.Fprintln(out, line) - args := line[strings.Index(line, "#")+1:] - cmd, err := parseCommand(args) - if err != nil { - return nil, err - } - if err := run(out, cmd); err != nil { - return nil, err - } - if !s.Scan() { - return nil, nil // end of file, which is fine. - } - if strings.HasPrefix(s.Text(), "```") { - return codeParser{print: false}.parse, nil - } - fmt.Fprintln(out, s.Text()) - return parsingText, nil -} - -type codeParser struct{ print bool } - -func (c codeParser) parse(out io.Writer, s textScanner, run commandRunner) (state, error) { - if c.print { - fmt.Fprintln(out, s.Text()) - } - if !s.Scan() { - return nil, fmt.Errorf("unbalanced code section") - } - if !strings.HasPrefix(s.Text(), "```") { - return c.parse, nil - } - - // print the end of the code section if needed and go back to parsing text. - if c.print { - fmt.Fprintln(out, s.Text()) - } - return parsingText, nil -} diff --git a/vendor/github.com/campoy/embedmd/main.go b/vendor/github.com/campoy/embedmd/main.go deleted file mode 100644 index bdbe8d4..0000000 --- a/vendor/github.com/campoy/embedmd/main.go +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright 2016 Google Inc. All rights reserved. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to writing, software distributed -// under the License is distributed on a "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. - -// embedmd -// -// embedmd embeds files or fractions of files into markdown files. -// It does so by searching embedmd commands, which are a subset of the -// markdown syntax for comments. This means they are invisible when -// markdown is rendered, so they can be kept in the file as pointers -// to the origin of the embedded text. -// -// The command receives a list of markdown files, if none is given it -// reads from the standard input. -// -// embedmd supports two flags: -// -d: will print the difference of the input file with what the output -// would have been if executed. -// -w: rewrites the given files rather than writing the output to the standard -// output. -// -// For more information on the format of the commands, read the documentation -// of the github.com/campoy/embedmd/embedmd package. -package main - -import ( - "bytes" - "flag" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - - "github.com/campoy/embedmd/embedmd" - "github.com/pmezard/go-difflib/difflib" -) - -// modified while building by -ldflags. -var version = "unkown" - -func usage() { - fmt.Fprintf(os.Stderr, "usage: embedmd [flags] [path ...]\n") - flag.PrintDefaults() -} - -func main() { - rewrite := flag.Bool("w", false, "write result to (markdown) file instead of stdout") - doDiff := flag.Bool("d", false, "display diffs instead of rewriting files") - printVersion := flag.Bool("v", false, "display embedmd version") - flag.Usage = usage - flag.Parse() - - if *printVersion { - fmt.Println("embedmd version: " + version) - return - } - - diff, err := embed(flag.Args(), *rewrite, *doDiff) - if err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(2) - } - if diff && *doDiff { - os.Exit(2) - } -} - -var ( - stdout io.Writer = os.Stdout - stdin io.Reader = os.Stdin -) - -func embed(paths []string, rewrite, doDiff bool) (foundDiff bool, err error) { - if rewrite && doDiff { - return false, fmt.Errorf("error: cannot use -w and -d simultaneously") - } - - if len(paths) == 0 { - if rewrite { - return false, fmt.Errorf("error: cannot use -w with standard input") - } - if !doDiff { - return false, embedmd.Process(stdout, stdin) - } - - var out, in bytes.Buffer - if err := embedmd.Process(&out, io.TeeReader(stdin, &in)); err != nil { - return false, err - } - d, err := diff(in.String(), out.String()) - if err != nil || len(d) == 0 { - return false, err - } - fmt.Fprintf(stdout, "%s", d) - return true, nil - } - - for _, path := range paths { - d, err := processFile(path, rewrite, doDiff) - if err != nil { - return false, fmt.Errorf("%s:%v", path, err) - } - foundDiff = foundDiff || d - } - return foundDiff, nil -} - -type file interface { - io.ReadCloser - io.WriterAt - Truncate(int64) error -} - -// replaced by testing functions. -var openFile = func(name string) (file, error) { - return os.OpenFile(name, os.O_RDWR, 0666) -} - -func readFile(path string) ([]byte, error) { - f, err := openFile(path) - if err != nil { - return nil, err - } - defer f.Close() - return ioutil.ReadAll(f) -} - -func processFile(path string, rewrite, doDiff bool) (foundDiff bool, err error) { - if filepath.Ext(path) != ".md" { - return false, fmt.Errorf("not a markdown file") - } - - f, err := openFile(path) - if err != nil { - return false, err - } - defer f.Close() - - buf := new(bytes.Buffer) - if err := embedmd.Process(buf, f, embedmd.WithBaseDir(filepath.Dir(path))); err != nil { - return false, err - } - - if doDiff { - f, err := readFile(path) - if err != nil { - return false, fmt.Errorf("could not read %s for diff: %v", path, err) - } - data, err := diff(string(f), buf.String()) - if err != nil || len(data) == 0 { - return false, err - } - fmt.Fprintf(stdout, "%s", data) - return true, nil - } - - if rewrite { - n, err := f.WriteAt(buf.Bytes(), 0) - if err != nil { - return false, fmt.Errorf("could not write: %v", err) - } - return false, f.Truncate(int64(n)) - } - - io.Copy(stdout, buf) - return false, nil -} - -func diff(a, b string) (string, error) { - return difflib.GetUnifiedDiffString(difflib.UnifiedDiff{ - A: difflib.SplitLines(a), - B: difflib.SplitLines(b), - Context: 3, - }) -} diff --git a/vendor/github.com/duke-git/lancet/v2/LICENSE b/vendor/github.com/duke-git/lancet/v2/LICENSE deleted file mode 100644 index d0fd3d9..0000000 --- a/vendor/github.com/duke-git/lancet/v2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 Beyond - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/duke-git/lancet/v2/mathutil/mathutil.go b/vendor/github.com/duke-git/lancet/v2/mathutil/mathutil.go deleted file mode 100644 index dc6b1b1..0000000 --- a/vendor/github.com/duke-git/lancet/v2/mathutil/mathutil.go +++ /dev/null @@ -1,397 +0,0 @@ -// Copyright 2021 dudaodong@gmail.com. All rights reserved. -// Use of this source code is governed by MIT license - -// Package mathutil implements some functions for math calculation. -package mathutil - -import ( - "fmt" - "math" - "strconv" - "strings" - - "golang.org/x/exp/constraints" -) - -// Exponent calculate x^n. -// Play: https://go.dev/play/p/uF3HGNPk8wr -func Exponent(x, n int64) int64 { - if n == 0 { - return 1 - } - - t := Exponent(x, n/2) - - if n%2 == 1 { - return t * t * x - } - - return t * t -} - -// Fibonacci calculate fibonacci number before n. -// Play: https://go.dev/play/p/IscseUNMuUc -func Fibonacci(first, second, n int) int { - if n <= 0 { - return 0 - } - if n < 3 { - return 1 - } else if n == 3 { - return first + second - } else { - return Fibonacci(second, first+second, n-1) - } -} - -// Factorial calculate x!. -// Play: https://go.dev/play/p/tt6LdOK67Nx -func Factorial(x uint) uint { - var f uint = 1 - for ; x > 1; x-- { - f *= x - } - return f -} - -// Percent calculate the percentage of value to total. -// Play: https://go.dev/play/p/s0NdFCtwuyd -func Percent(val, total float64, n int) float64 { - if total == 0 { - return float64(0) - } - tmp := val / total * 100 - result := RoundToFloat(tmp, n) - - return result -} - -// RoundToString round off to n decimal places. -// Play: https://go.dev/play/p/kZwpBRAcllO -func RoundToString[T constraints.Float | constraints.Integer](x T, n int) string { - tmp := math.Pow(10.0, float64(n)) - x *= T(tmp) - r := math.Round(float64(x)) - result := strconv.FormatFloat(r/tmp, 'f', n, 64) - return result -} - -// RoundToFloat round off to n decimal places. -// Play: https://go.dev/play/p/ghyb528JRJL -func RoundToFloat[T constraints.Float | constraints.Integer](x T, n int) float64 { - tmp := math.Pow(10.0, float64(n)) - x *= T(tmp) - r := math.Round(float64(x)) - return r / tmp -} - -// TruncRound round off n decimal places. -// Play: https://go.dev/play/p/aumarSHIGzP -func TruncRound[T constraints.Float | constraints.Integer](x T, n int) T { - floatStr := fmt.Sprintf("%."+strconv.Itoa(n+1)+"f", x) - temp := strings.Split(floatStr, ".") - var newFloat string - if len(temp) < 2 || n >= len(temp[1]) { - newFloat = floatStr - } else { - newFloat = temp[0] + "." + temp[1][:n] - } - result, _ := strconv.ParseFloat(newFloat, 64) - return T(result) -} - -// FloorToFloat round down to n decimal places. -// Play: https://go.dev/play/p/vbCBrQHZEED -func FloorToFloat[T constraints.Float | constraints.Integer](x T, n int) float64 { - tmp := math.Pow(10.0, float64(n)) - x *= T(tmp) - r := math.Floor(float64(x)) - return r / tmp -} - -// FloorToString round down to n decimal places. -// Play: https://go.dev/play/p/Qk9KPd2IdDb -func FloorToString[T constraints.Float | constraints.Integer](x T, n int) string { - tmp := math.Pow(10.0, float64(n)) - x *= T(tmp) - r := math.Floor(float64(x)) - result := strconv.FormatFloat(r/tmp, 'f', n, 64) - return result -} - -// CeilToFloat round up to n decimal places. -// Play: https://go.dev/play/p/8hOeSADZPCo -func CeilToFloat[T constraints.Float | constraints.Integer](x T, n int) float64 { - tmp := math.Pow(10.0, float64(n)) - x *= T(tmp) - r := math.Ceil(float64(x)) - return r / tmp -} - -// CeilToString round up to n decimal places. -// Play: https://go.dev/play/p/wy5bYEyUKKG -func CeilToString[T constraints.Float | constraints.Integer](x T, n int) string { - tmp := math.Pow(10.0, float64(n)) - x *= T(tmp) - r := math.Ceil(float64(x)) - result := strconv.FormatFloat(r/tmp, 'f', n, 64) - return result -} - -// Max return max value of numbers. -// Play: https://go.dev/play/p/cN8DHI0rTkH -func Max[T constraints.Integer | constraints.Float](numbers ...T) T { - max := numbers[0] - - for _, v := range numbers { - if max < v { - max = v - } - } - - return max -} - -// MaxBy return the maximum value of a slice using the given comparator function. -// Play: https://go.dev/play/p/pbe2MT-7DV2 -func MaxBy[T any](slice []T, comparator func(T, T) bool) T { - var max T - - if len(slice) == 0 { - return max - } - - max = slice[0] - - for i := 1; i < len(slice); i++ { - val := slice[i] - - if comparator(val, max) { - max = val - } - } - - return max -} - -// Min return min value of numbers. -// Play: https://go.dev/play/p/21BER_mlGUj -func Min[T constraints.Integer | constraints.Float](numbers ...T) T { - min := numbers[0] - - for _, v := range numbers { - if min > v { - min = v - } - } - - return min -} - -// MinBy return the minimum value of a slice using the given comparator function. -// Play: https://go.dev/play/p/XuJDKrDdglW -func MinBy[T any](slice []T, comparator func(T, T) bool) T { - var min T - - if len(slice) == 0 { - return min - } - - min = slice[0] - - for i := 1; i < len(slice); i++ { - val := slice[i] - - if comparator(val, min) { - min = val - } - } - - return min -} - -// Sum return sum of passed numbers. -// Play: https://go.dev/play/p/1To2ImAMJA7 -func Sum[T constraints.Integer | constraints.Float](numbers ...T) T { - var sum T - - for _, v := range numbers { - sum += v - } - - return sum -} - -// Average return average value of numbers. -// Play: https://go.dev/play/p/Vv7LBwER-pz -func Average[T constraints.Integer | constraints.Float](numbers ...T) T { - var sum T - n := T(len(numbers)) - - for _, v := range numbers { - sum += v - } - return sum / n -} - -// Range creates a slice of numbers from start with specified count, element step is 1. -// Play: https://go.dev/play/p/9ke2opxa8ZP -func Range[T constraints.Integer | constraints.Float](start T, count int) []T { - size := count - if count < 0 { - size = -count - } - - result := make([]T, size) - - for i, j := 0, start; i < size; i, j = i+1, j+1 { - result[i] = j - } - - return result -} - -// RangeWithStep creates a slice of numbers from start to end with specified step. -// Play: https://go.dev/play/p/akLWz0EqOSM -func RangeWithStep[T constraints.Integer | constraints.Float](start, end, step T) []T { - result := []T{} - - if start >= end || step == 0 { - return result - } - - for i := start; i < end; i += step { - result = append(result, i) - } - - return result -} - -// AngleToRadian converts angle value to radian value. -// Play: https://go.dev/play/p/CIvlICqrHql -func AngleToRadian(angle float64) float64 { - radian := angle * (math.Pi / 180) - return radian -} - -// RadianToAngle converts radian value to angle value. -// Play: https://go.dev/play/p/dQtmOTUOMgi -func RadianToAngle(radian float64) float64 { - angle := radian * (180 / math.Pi) - return angle -} - -// PointDistance get two points distance. -// Play: https://go.dev/play/p/RrG4JIaziM8 -func PointDistance(x1, y1, x2, y2 float64) float64 { - a := x1 - x2 - b := y1 - y2 - c := math.Pow(a, 2) + math.Pow(b, 2) - - return math.Sqrt(c) -} - -// IsPrime checks if number is prime number. -// Play: https://go.dev/play/p/Rdd8UTHZJ7u -func IsPrime(n int) bool { - if n < 2 { - return false - } - - for i := 2; i <= int(math.Sqrt(float64(n))); i++ { - if n%i == 0 { - return false - } - } - - return true -} - -// GCD return greatest common divisor (GCD) of integers. -// Play: https://go.dev/play/p/CiEceLSoAKB -func GCD[T constraints.Integer](integers ...T) T { - result := integers[0] - - for k := range integers { - result = gcd(integers[k], result) - - if result == 1 { - return 1 - } - } - - return result -} - -// find greatest common divisor (GCD) -func gcd[T constraints.Integer](a, b T) T { - if b == 0 { - return a - } - - return gcd(b, a%b) -} - -// LCM return Least Common Multiple (LCM) of integers. -// Play: https://go.dev/play/p/EjcZxfY7G_g -func LCM[T constraints.Integer](integers ...T) T { - result := integers[0] - - for k := range integers { - result = lcm(integers[k], result) - } - - return result -} - -// find Least Common Multiple (LCM) via GCD. -func lcm[T constraints.Integer](a, b T) T { - if a == 0 || b == 0 { - panic("lcm function: provide non zero integers only.") - } - return a * b / gcd(a, b) -} - -// Cos returns the cosine of the radian argument. -// Play: https://go.dev/play/p/Sm89LoIfvFq -func Cos(radian float64, precision ...int) float64 { - t := 1.0 / (2.0 * math.Pi) - radian *= t - radian -= 0.25 + math.Floor(radian+0.25) - radian *= 16.0 * (math.Abs(radian) - 0.5) - radian += 0.225 * radian * (math.Abs(radian) - 1.0) - - if len(precision) == 1 { - return TruncRound(radian, precision[0]) - } - - return TruncRound(radian, 3) -} - -// Sin returns the sine of the radian argument. -// Play: https://go.dev/play/p/TWMQlMywDsP -func Sin(radian float64, precision ...int) float64 { - return Cos((math.Pi/2)-radian, precision...) -} - -// Log returns the logarithm of base n. -// Play: https://go.dev/play/p/_d4bi8oyhat -func Log(n, base float64) float64 { - return math.Log(n) / math.Log(base) -} - -// Abs returns the absolute value of x. -// Play: https://go.dev/play/p/fsyBh1Os-1d -func Abs[T constraints.Integer | constraints.Float](x T) T { - if x < 0 { - return (-x) - } - - return x -} - -// Div returns the result of x divided by y. -// Play: https://go.dev/play/p/WLxDdGXXYat -func Div[T constraints.Float | constraints.Integer](x T, y T) float64 { - return float64(x) / float64(y) -} diff --git a/vendor/github.com/dustin/go-humanize/.travis.yml b/vendor/github.com/dustin/go-humanize/.travis.yml deleted file mode 100644 index ac12e48..0000000 --- a/vendor/github.com/dustin/go-humanize/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false -language: go -go_import_path: github.com/dustin/go-humanize -go: - - 1.13.x - - 1.14.x - - 1.15.x - - 1.16.x - - stable - - master -matrix: - allow_failures: - - go: master - fast_finish: true -install: - - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). -script: - - diff -u <(echo -n) <(gofmt -d -s .) - - go vet . - - go install -v -race ./... - - go test -v -race ./... diff --git a/vendor/github.com/dustin/go-humanize/LICENSE b/vendor/github.com/dustin/go-humanize/LICENSE deleted file mode 100644 index 8d9a94a..0000000 --- a/vendor/github.com/dustin/go-humanize/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2005-2008 Dustin Sallings - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - diff --git a/vendor/github.com/dustin/go-humanize/README.markdown b/vendor/github.com/dustin/go-humanize/README.markdown deleted file mode 100644 index 7d0b16b..0000000 --- a/vendor/github.com/dustin/go-humanize/README.markdown +++ /dev/null @@ -1,124 +0,0 @@ -# Humane Units [![Build Status](https://travis-ci.org/dustin/go-humanize.svg?branch=master)](https://travis-ci.org/dustin/go-humanize) [![GoDoc](https://godoc.org/github.com/dustin/go-humanize?status.svg)](https://godoc.org/github.com/dustin/go-humanize) - -Just a few functions for helping humanize times and sizes. - -`go get` it as `github.com/dustin/go-humanize`, import it as -`"github.com/dustin/go-humanize"`, use it as `humanize`. - -See [godoc](https://pkg.go.dev/github.com/dustin/go-humanize) for -complete documentation. - -## Sizes - -This lets you take numbers like `82854982` and convert them to useful -strings like, `83 MB` or `79 MiB` (whichever you prefer). - -Example: - -```go -fmt.Printf("That file is %s.", humanize.Bytes(82854982)) // That file is 83 MB. -``` - -## Times - -This lets you take a `time.Time` and spit it out in relative terms. -For example, `12 seconds ago` or `3 days from now`. - -Example: - -```go -fmt.Printf("This was touched %s.", humanize.Time(someTimeInstance)) // This was touched 7 hours ago. -``` - -Thanks to Kyle Lemons for the time implementation from an IRC -conversation one day. It's pretty neat. - -## Ordinals - -From a [mailing list discussion][odisc] where a user wanted to be able -to label ordinals. - - 0 -> 0th - 1 -> 1st - 2 -> 2nd - 3 -> 3rd - 4 -> 4th - [...] - -Example: - -```go -fmt.Printf("You're my %s best friend.", humanize.Ordinal(193)) // You are my 193rd best friend. -``` - -## Commas - -Want to shove commas into numbers? Be my guest. - - 0 -> 0 - 100 -> 100 - 1000 -> 1,000 - 1000000000 -> 1,000,000,000 - -100000 -> -100,000 - -Example: - -```go -fmt.Printf("You owe $%s.\n", humanize.Comma(6582491)) // You owe $6,582,491. -``` - -## Ftoa - -Nicer float64 formatter that removes trailing zeros. - -```go -fmt.Printf("%f", 2.24) // 2.240000 -fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24 -fmt.Printf("%f", 2.0) // 2.000000 -fmt.Printf("%s", humanize.Ftoa(2.0)) // 2 -``` - -## SI notation - -Format numbers with [SI notation][sinotation]. - -Example: - -```go -humanize.SI(0.00000000223, "M") // 2.23 nM -``` - -## English-specific functions - -The following functions are in the `humanize/english` subpackage. - -### Plurals - -Simple English pluralization - -```go -english.PluralWord(1, "object", "") // object -english.PluralWord(42, "object", "") // objects -english.PluralWord(2, "bus", "") // buses -english.PluralWord(99, "locus", "loci") // loci - -english.Plural(1, "object", "") // 1 object -english.Plural(42, "object", "") // 42 objects -english.Plural(2, "bus", "") // 2 buses -english.Plural(99, "locus", "loci") // 99 loci -``` - -### Word series - -Format comma-separated words lists with conjuctions: - -```go -english.WordSeries([]string{"foo"}, "and") // foo -english.WordSeries([]string{"foo", "bar"}, "and") // foo and bar -english.WordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar and baz - -english.OxfordWordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar, and baz -``` - -[odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion -[sinotation]: http://en.wikipedia.org/wiki/Metric_prefix diff --git a/vendor/github.com/dustin/go-humanize/big.go b/vendor/github.com/dustin/go-humanize/big.go deleted file mode 100644 index f49dc33..0000000 --- a/vendor/github.com/dustin/go-humanize/big.go +++ /dev/null @@ -1,31 +0,0 @@ -package humanize - -import ( - "math/big" -) - -// order of magnitude (to a max order) -func oomm(n, b *big.Int, maxmag int) (float64, int) { - mag := 0 - m := &big.Int{} - for n.Cmp(b) >= 0 { - n.DivMod(n, b, m) - mag++ - if mag == maxmag && maxmag >= 0 { - break - } - } - return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag -} - -// total order of magnitude -// (same as above, but with no upper limit) -func oom(n, b *big.Int) (float64, int) { - mag := 0 - m := &big.Int{} - for n.Cmp(b) >= 0 { - n.DivMod(n, b, m) - mag++ - } - return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag -} diff --git a/vendor/github.com/dustin/go-humanize/bigbytes.go b/vendor/github.com/dustin/go-humanize/bigbytes.go deleted file mode 100644 index 3b015fd..0000000 --- a/vendor/github.com/dustin/go-humanize/bigbytes.go +++ /dev/null @@ -1,189 +0,0 @@ -package humanize - -import ( - "fmt" - "math/big" - "strings" - "unicode" -) - -var ( - bigIECExp = big.NewInt(1024) - - // BigByte is one byte in bit.Ints - BigByte = big.NewInt(1) - // BigKiByte is 1,024 bytes in bit.Ints - BigKiByte = (&big.Int{}).Mul(BigByte, bigIECExp) - // BigMiByte is 1,024 k bytes in bit.Ints - BigMiByte = (&big.Int{}).Mul(BigKiByte, bigIECExp) - // BigGiByte is 1,024 m bytes in bit.Ints - BigGiByte = (&big.Int{}).Mul(BigMiByte, bigIECExp) - // BigTiByte is 1,024 g bytes in bit.Ints - BigTiByte = (&big.Int{}).Mul(BigGiByte, bigIECExp) - // BigPiByte is 1,024 t bytes in bit.Ints - BigPiByte = (&big.Int{}).Mul(BigTiByte, bigIECExp) - // BigEiByte is 1,024 p bytes in bit.Ints - BigEiByte = (&big.Int{}).Mul(BigPiByte, bigIECExp) - // BigZiByte is 1,024 e bytes in bit.Ints - BigZiByte = (&big.Int{}).Mul(BigEiByte, bigIECExp) - // BigYiByte is 1,024 z bytes in bit.Ints - BigYiByte = (&big.Int{}).Mul(BigZiByte, bigIECExp) - // BigRiByte is 1,024 y bytes in bit.Ints - BigRiByte = (&big.Int{}).Mul(BigYiByte, bigIECExp) - // BigQiByte is 1,024 r bytes in bit.Ints - BigQiByte = (&big.Int{}).Mul(BigRiByte, bigIECExp) -) - -var ( - bigSIExp = big.NewInt(1000) - - // BigSIByte is one SI byte in big.Ints - BigSIByte = big.NewInt(1) - // BigKByte is 1,000 SI bytes in big.Ints - BigKByte = (&big.Int{}).Mul(BigSIByte, bigSIExp) - // BigMByte is 1,000 SI k bytes in big.Ints - BigMByte = (&big.Int{}).Mul(BigKByte, bigSIExp) - // BigGByte is 1,000 SI m bytes in big.Ints - BigGByte = (&big.Int{}).Mul(BigMByte, bigSIExp) - // BigTByte is 1,000 SI g bytes in big.Ints - BigTByte = (&big.Int{}).Mul(BigGByte, bigSIExp) - // BigPByte is 1,000 SI t bytes in big.Ints - BigPByte = (&big.Int{}).Mul(BigTByte, bigSIExp) - // BigEByte is 1,000 SI p bytes in big.Ints - BigEByte = (&big.Int{}).Mul(BigPByte, bigSIExp) - // BigZByte is 1,000 SI e bytes in big.Ints - BigZByte = (&big.Int{}).Mul(BigEByte, bigSIExp) - // BigYByte is 1,000 SI z bytes in big.Ints - BigYByte = (&big.Int{}).Mul(BigZByte, bigSIExp) - // BigRByte is 1,000 SI y bytes in big.Ints - BigRByte = (&big.Int{}).Mul(BigYByte, bigSIExp) - // BigQByte is 1,000 SI r bytes in big.Ints - BigQByte = (&big.Int{}).Mul(BigRByte, bigSIExp) -) - -var bigBytesSizeTable = map[string]*big.Int{ - "b": BigByte, - "kib": BigKiByte, - "kb": BigKByte, - "mib": BigMiByte, - "mb": BigMByte, - "gib": BigGiByte, - "gb": BigGByte, - "tib": BigTiByte, - "tb": BigTByte, - "pib": BigPiByte, - "pb": BigPByte, - "eib": BigEiByte, - "eb": BigEByte, - "zib": BigZiByte, - "zb": BigZByte, - "yib": BigYiByte, - "yb": BigYByte, - "rib": BigRiByte, - "rb": BigRByte, - "qib": BigQiByte, - "qb": BigQByte, - // Without suffix - "": BigByte, - "ki": BigKiByte, - "k": BigKByte, - "mi": BigMiByte, - "m": BigMByte, - "gi": BigGiByte, - "g": BigGByte, - "ti": BigTiByte, - "t": BigTByte, - "pi": BigPiByte, - "p": BigPByte, - "ei": BigEiByte, - "e": BigEByte, - "z": BigZByte, - "zi": BigZiByte, - "y": BigYByte, - "yi": BigYiByte, - "r": BigRByte, - "ri": BigRiByte, - "q": BigQByte, - "qi": BigQiByte, -} - -var ten = big.NewInt(10) - -func humanateBigBytes(s, base *big.Int, sizes []string) string { - if s.Cmp(ten) < 0 { - return fmt.Sprintf("%d B", s) - } - c := (&big.Int{}).Set(s) - val, mag := oomm(c, base, len(sizes)-1) - suffix := sizes[mag] - f := "%.0f %s" - if val < 10 { - f = "%.1f %s" - } - - return fmt.Sprintf(f, val, suffix) - -} - -// BigBytes produces a human readable representation of an SI size. -// -// See also: ParseBigBytes. -// -// BigBytes(82854982) -> 83 MB -func BigBytes(s *big.Int) string { - sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", "RB", "QB"} - return humanateBigBytes(s, bigSIExp, sizes) -} - -// BigIBytes produces a human readable representation of an IEC size. -// -// See also: ParseBigBytes. -// -// BigIBytes(82854982) -> 79 MiB -func BigIBytes(s *big.Int) string { - sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB", "RiB", "QiB"} - return humanateBigBytes(s, bigIECExp, sizes) -} - -// ParseBigBytes parses a string representation of bytes into the number -// of bytes it represents. -// -// See also: BigBytes, BigIBytes. -// -// ParseBigBytes("42 MB") -> 42000000, nil -// ParseBigBytes("42 mib") -> 44040192, nil -func ParseBigBytes(s string) (*big.Int, error) { - lastDigit := 0 - hasComma := false - for _, r := range s { - if !(unicode.IsDigit(r) || r == '.' || r == ',') { - break - } - if r == ',' { - hasComma = true - } - lastDigit++ - } - - num := s[:lastDigit] - if hasComma { - num = strings.Replace(num, ",", "", -1) - } - - val := &big.Rat{} - _, err := fmt.Sscanf(num, "%f", val) - if err != nil { - return nil, err - } - - extra := strings.ToLower(strings.TrimSpace(s[lastDigit:])) - if m, ok := bigBytesSizeTable[extra]; ok { - mv := (&big.Rat{}).SetInt(m) - val.Mul(val, mv) - rv := &big.Int{} - rv.Div(val.Num(), val.Denom()) - return rv, nil - } - - return nil, fmt.Errorf("unhandled size name: %v", extra) -} diff --git a/vendor/github.com/dustin/go-humanize/bytes.go b/vendor/github.com/dustin/go-humanize/bytes.go deleted file mode 100644 index 0b498f4..0000000 --- a/vendor/github.com/dustin/go-humanize/bytes.go +++ /dev/null @@ -1,143 +0,0 @@ -package humanize - -import ( - "fmt" - "math" - "strconv" - "strings" - "unicode" -) - -// IEC Sizes. -// kibis of bits -const ( - Byte = 1 << (iota * 10) - KiByte - MiByte - GiByte - TiByte - PiByte - EiByte -) - -// SI Sizes. -const ( - IByte = 1 - KByte = IByte * 1000 - MByte = KByte * 1000 - GByte = MByte * 1000 - TByte = GByte * 1000 - PByte = TByte * 1000 - EByte = PByte * 1000 -) - -var bytesSizeTable = map[string]uint64{ - "b": Byte, - "kib": KiByte, - "kb": KByte, - "mib": MiByte, - "mb": MByte, - "gib": GiByte, - "gb": GByte, - "tib": TiByte, - "tb": TByte, - "pib": PiByte, - "pb": PByte, - "eib": EiByte, - "eb": EByte, - // Without suffix - "": Byte, - "ki": KiByte, - "k": KByte, - "mi": MiByte, - "m": MByte, - "gi": GiByte, - "g": GByte, - "ti": TiByte, - "t": TByte, - "pi": PiByte, - "p": PByte, - "ei": EiByte, - "e": EByte, -} - -func logn(n, b float64) float64 { - return math.Log(n) / math.Log(b) -} - -func humanateBytes(s uint64, base float64, sizes []string) string { - if s < 10 { - return fmt.Sprintf("%d B", s) - } - e := math.Floor(logn(float64(s), base)) - suffix := sizes[int(e)] - val := math.Floor(float64(s)/math.Pow(base, e)*10+0.5) / 10 - f := "%.0f %s" - if val < 10 { - f = "%.1f %s" - } - - return fmt.Sprintf(f, val, suffix) -} - -// Bytes produces a human readable representation of an SI size. -// -// See also: ParseBytes. -// -// Bytes(82854982) -> 83 MB -func Bytes(s uint64) string { - sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"} - return humanateBytes(s, 1000, sizes) -} - -// IBytes produces a human readable representation of an IEC size. -// -// See also: ParseBytes. -// -// IBytes(82854982) -> 79 MiB -func IBytes(s uint64) string { - sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"} - return humanateBytes(s, 1024, sizes) -} - -// ParseBytes parses a string representation of bytes into the number -// of bytes it represents. -// -// See Also: Bytes, IBytes. -// -// ParseBytes("42 MB") -> 42000000, nil -// ParseBytes("42 mib") -> 44040192, nil -func ParseBytes(s string) (uint64, error) { - lastDigit := 0 - hasComma := false - for _, r := range s { - if !(unicode.IsDigit(r) || r == '.' || r == ',') { - break - } - if r == ',' { - hasComma = true - } - lastDigit++ - } - - num := s[:lastDigit] - if hasComma { - num = strings.Replace(num, ",", "", -1) - } - - f, err := strconv.ParseFloat(num, 64) - if err != nil { - return 0, err - } - - extra := strings.ToLower(strings.TrimSpace(s[lastDigit:])) - if m, ok := bytesSizeTable[extra]; ok { - f *= float64(m) - if f >= math.MaxUint64 { - return 0, fmt.Errorf("too large: %v", s) - } - return uint64(f), nil - } - - return 0, fmt.Errorf("unhandled size name: %v", extra) -} diff --git a/vendor/github.com/dustin/go-humanize/comma.go b/vendor/github.com/dustin/go-humanize/comma.go deleted file mode 100644 index 520ae3e..0000000 --- a/vendor/github.com/dustin/go-humanize/comma.go +++ /dev/null @@ -1,116 +0,0 @@ -package humanize - -import ( - "bytes" - "math" - "math/big" - "strconv" - "strings" -) - -// Comma produces a string form of the given number in base 10 with -// commas after every three orders of magnitude. -// -// e.g. Comma(834142) -> 834,142 -func Comma(v int64) string { - sign := "" - - // Min int64 can't be negated to a usable value, so it has to be special cased. - if v == math.MinInt64 { - return "-9,223,372,036,854,775,808" - } - - if v < 0 { - sign = "-" - v = 0 - v - } - - parts := []string{"", "", "", "", "", "", ""} - j := len(parts) - 1 - - for v > 999 { - parts[j] = strconv.FormatInt(v%1000, 10) - switch len(parts[j]) { - case 2: - parts[j] = "0" + parts[j] - case 1: - parts[j] = "00" + parts[j] - } - v = v / 1000 - j-- - } - parts[j] = strconv.Itoa(int(v)) - return sign + strings.Join(parts[j:], ",") -} - -// Commaf produces a string form of the given number in base 10 with -// commas after every three orders of magnitude. -// -// e.g. Commaf(834142.32) -> 834,142.32 -func Commaf(v float64) string { - buf := &bytes.Buffer{} - if v < 0 { - buf.Write([]byte{'-'}) - v = 0 - v - } - - comma := []byte{','} - - parts := strings.Split(strconv.FormatFloat(v, 'f', -1, 64), ".") - pos := 0 - if len(parts[0])%3 != 0 { - pos += len(parts[0]) % 3 - buf.WriteString(parts[0][:pos]) - buf.Write(comma) - } - for ; pos < len(parts[0]); pos += 3 { - buf.WriteString(parts[0][pos : pos+3]) - buf.Write(comma) - } - buf.Truncate(buf.Len() - 1) - - if len(parts) > 1 { - buf.Write([]byte{'.'}) - buf.WriteString(parts[1]) - } - return buf.String() -} - -// CommafWithDigits works like the Commaf but limits the resulting -// string to the given number of decimal places. -// -// e.g. CommafWithDigits(834142.32, 1) -> 834,142.3 -func CommafWithDigits(f float64, decimals int) string { - return stripTrailingDigits(Commaf(f), decimals) -} - -// BigComma produces a string form of the given big.Int in base 10 -// with commas after every three orders of magnitude. -func BigComma(b *big.Int) string { - sign := "" - if b.Sign() < 0 { - sign = "-" - b.Abs(b) - } - - athousand := big.NewInt(1000) - c := (&big.Int{}).Set(b) - _, m := oom(c, athousand) - parts := make([]string, m+1) - j := len(parts) - 1 - - mod := &big.Int{} - for b.Cmp(athousand) >= 0 { - b.DivMod(b, athousand, mod) - parts[j] = strconv.FormatInt(mod.Int64(), 10) - switch len(parts[j]) { - case 2: - parts[j] = "0" + parts[j] - case 1: - parts[j] = "00" + parts[j] - } - j-- - } - parts[j] = strconv.Itoa(int(b.Int64())) - return sign + strings.Join(parts[j:], ",") -} diff --git a/vendor/github.com/dustin/go-humanize/commaf.go b/vendor/github.com/dustin/go-humanize/commaf.go deleted file mode 100644 index 2bc83a0..0000000 --- a/vendor/github.com/dustin/go-humanize/commaf.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.6 -// +build go1.6 - -package humanize - -import ( - "bytes" - "math/big" - "strings" -) - -// BigCommaf produces a string form of the given big.Float in base 10 -// with commas after every three orders of magnitude. -func BigCommaf(v *big.Float) string { - buf := &bytes.Buffer{} - if v.Sign() < 0 { - buf.Write([]byte{'-'}) - v.Abs(v) - } - - comma := []byte{','} - - parts := strings.Split(v.Text('f', -1), ".") - pos := 0 - if len(parts[0])%3 != 0 { - pos += len(parts[0]) % 3 - buf.WriteString(parts[0][:pos]) - buf.Write(comma) - } - for ; pos < len(parts[0]); pos += 3 { - buf.WriteString(parts[0][pos : pos+3]) - buf.Write(comma) - } - buf.Truncate(buf.Len() - 1) - - if len(parts) > 1 { - buf.Write([]byte{'.'}) - buf.WriteString(parts[1]) - } - return buf.String() -} diff --git a/vendor/github.com/dustin/go-humanize/ftoa.go b/vendor/github.com/dustin/go-humanize/ftoa.go deleted file mode 100644 index bce923f..0000000 --- a/vendor/github.com/dustin/go-humanize/ftoa.go +++ /dev/null @@ -1,49 +0,0 @@ -package humanize - -import ( - "strconv" - "strings" -) - -func stripTrailingZeros(s string) string { - if !strings.ContainsRune(s, '.') { - return s - } - offset := len(s) - 1 - for offset > 0 { - if s[offset] == '.' { - offset-- - break - } - if s[offset] != '0' { - break - } - offset-- - } - return s[:offset+1] -} - -func stripTrailingDigits(s string, digits int) string { - if i := strings.Index(s, "."); i >= 0 { - if digits <= 0 { - return s[:i] - } - i++ - if i+digits >= len(s) { - return s - } - return s[:i+digits] - } - return s -} - -// Ftoa converts a float to a string with no trailing zeros. -func Ftoa(num float64) string { - return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64)) -} - -// FtoaWithDigits converts a float to a string but limits the resulting string -// to the given number of decimal places, and no trailing zeros. -func FtoaWithDigits(num float64, digits int) string { - return stripTrailingZeros(stripTrailingDigits(strconv.FormatFloat(num, 'f', 6, 64), digits)) -} diff --git a/vendor/github.com/dustin/go-humanize/humanize.go b/vendor/github.com/dustin/go-humanize/humanize.go deleted file mode 100644 index a2c2da3..0000000 --- a/vendor/github.com/dustin/go-humanize/humanize.go +++ /dev/null @@ -1,8 +0,0 @@ -/* -Package humanize converts boring ugly numbers to human-friendly strings and back. - -Durations can be turned into strings such as "3 days ago", numbers -representing sizes like 82854982 into useful strings like, "83 MB" or -"79 MiB" (whichever you prefer). -*/ -package humanize diff --git a/vendor/github.com/dustin/go-humanize/number.go b/vendor/github.com/dustin/go-humanize/number.go deleted file mode 100644 index 6470d0d..0000000 --- a/vendor/github.com/dustin/go-humanize/number.go +++ /dev/null @@ -1,192 +0,0 @@ -package humanize - -/* -Slightly adapted from the source to fit go-humanize. - -Author: https://github.com/gorhill -Source: https://gist.github.com/gorhill/5285193 - -*/ - -import ( - "math" - "strconv" -) - -var ( - renderFloatPrecisionMultipliers = [...]float64{ - 1, - 10, - 100, - 1000, - 10000, - 100000, - 1000000, - 10000000, - 100000000, - 1000000000, - } - - renderFloatPrecisionRounders = [...]float64{ - 0.5, - 0.05, - 0.005, - 0.0005, - 0.00005, - 0.000005, - 0.0000005, - 0.00000005, - 0.000000005, - 0.0000000005, - } -) - -// FormatFloat produces a formatted number as string based on the following user-specified criteria: -// * thousands separator -// * decimal separator -// * decimal precision -// -// Usage: s := RenderFloat(format, n) -// The format parameter tells how to render the number n. -// -// See examples: http://play.golang.org/p/LXc1Ddm1lJ -// -// Examples of format strings, given n = 12345.6789: -// "#,###.##" => "12,345.67" -// "#,###." => "12,345" -// "#,###" => "12345,678" -// "#\u202F###,##" => "12 345,68" -// "#.###,###### => 12.345,678900 -// "" (aka default format) => 12,345.67 -// -// The highest precision allowed is 9 digits after the decimal symbol. -// There is also a version for integer number, FormatInteger(), -// which is convenient for calls within template. -func FormatFloat(format string, n float64) string { - // Special cases: - // NaN = "NaN" - // +Inf = "+Infinity" - // -Inf = "-Infinity" - if math.IsNaN(n) { - return "NaN" - } - if n > math.MaxFloat64 { - return "Infinity" - } - if n < (0.0 - math.MaxFloat64) { - return "-Infinity" - } - - // default format - precision := 2 - decimalStr := "." - thousandStr := "," - positiveStr := "" - negativeStr := "-" - - if len(format) > 0 { - format := []rune(format) - - // If there is an explicit format directive, - // then default values are these: - precision = 9 - thousandStr = "" - - // collect indices of meaningful formatting directives - formatIndx := []int{} - for i, char := range format { - if char != '#' && char != '0' { - formatIndx = append(formatIndx, i) - } - } - - if len(formatIndx) > 0 { - // Directive at index 0: - // Must be a '+' - // Raise an error if not the case - // index: 0123456789 - // +0.000,000 - // +000,000.0 - // +0000.00 - // +0000 - if formatIndx[0] == 0 { - if format[formatIndx[0]] != '+' { - panic("RenderFloat(): invalid positive sign directive") - } - positiveStr = "+" - formatIndx = formatIndx[1:] - } - - // Two directives: - // First is thousands separator - // Raise an error if not followed by 3-digit - // 0123456789 - // 0.000,000 - // 000,000.00 - if len(formatIndx) == 2 { - if (formatIndx[1] - formatIndx[0]) != 4 { - panic("RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers") - } - thousandStr = string(format[formatIndx[0]]) - formatIndx = formatIndx[1:] - } - - // One directive: - // Directive is decimal separator - // The number of digit-specifier following the separator indicates wanted precision - // 0123456789 - // 0.00 - // 000,0000 - if len(formatIndx) == 1 { - decimalStr = string(format[formatIndx[0]]) - precision = len(format) - formatIndx[0] - 1 - } - } - } - - // generate sign part - var signStr string - if n >= 0.000000001 { - signStr = positiveStr - } else if n <= -0.000000001 { - signStr = negativeStr - n = -n - } else { - signStr = "" - n = 0.0 - } - - // split number into integer and fractional parts - intf, fracf := math.Modf(n + renderFloatPrecisionRounders[precision]) - - // generate integer part string - intStr := strconv.FormatInt(int64(intf), 10) - - // add thousand separator if required - if len(thousandStr) > 0 { - for i := len(intStr); i > 3; { - i -= 3 - intStr = intStr[:i] + thousandStr + intStr[i:] - } - } - - // no fractional part, we can leave now - if precision == 0 { - return signStr + intStr - } - - // generate fractional part - fracStr := strconv.Itoa(int(fracf * renderFloatPrecisionMultipliers[precision])) - // may need padding - if len(fracStr) < precision { - fracStr = "000000000000000"[:precision-len(fracStr)] + fracStr - } - - return signStr + intStr + decimalStr + fracStr -} - -// FormatInteger produces a formatted number as string. -// See FormatFloat. -func FormatInteger(format string, n int) string { - return FormatFloat(format, float64(n)) -} diff --git a/vendor/github.com/dustin/go-humanize/ordinals.go b/vendor/github.com/dustin/go-humanize/ordinals.go deleted file mode 100644 index 43d88a8..0000000 --- a/vendor/github.com/dustin/go-humanize/ordinals.go +++ /dev/null @@ -1,25 +0,0 @@ -package humanize - -import "strconv" - -// Ordinal gives you the input number in a rank/ordinal format. -// -// Ordinal(3) -> 3rd -func Ordinal(x int) string { - suffix := "th" - switch x % 10 { - case 1: - if x%100 != 11 { - suffix = "st" - } - case 2: - if x%100 != 12 { - suffix = "nd" - } - case 3: - if x%100 != 13 { - suffix = "rd" - } - } - return strconv.Itoa(x) + suffix -} diff --git a/vendor/github.com/dustin/go-humanize/si.go b/vendor/github.com/dustin/go-humanize/si.go deleted file mode 100644 index 8b85019..0000000 --- a/vendor/github.com/dustin/go-humanize/si.go +++ /dev/null @@ -1,127 +0,0 @@ -package humanize - -import ( - "errors" - "math" - "regexp" - "strconv" -) - -var siPrefixTable = map[float64]string{ - -30: "q", // quecto - -27: "r", // ronto - -24: "y", // yocto - -21: "z", // zepto - -18: "a", // atto - -15: "f", // femto - -12: "p", // pico - -9: "n", // nano - -6: "µ", // micro - -3: "m", // milli - 0: "", - 3: "k", // kilo - 6: "M", // mega - 9: "G", // giga - 12: "T", // tera - 15: "P", // peta - 18: "E", // exa - 21: "Z", // zetta - 24: "Y", // yotta - 27: "R", // ronna - 30: "Q", // quetta -} - -var revSIPrefixTable = revfmap(siPrefixTable) - -// revfmap reverses the map and precomputes the power multiplier -func revfmap(in map[float64]string) map[string]float64 { - rv := map[string]float64{} - for k, v := range in { - rv[v] = math.Pow(10, k) - } - return rv -} - -var riParseRegex *regexp.Regexp - -func init() { - ri := `^([\-0-9.]+)\s?([` - for _, v := range siPrefixTable { - ri += v - } - ri += `]?)(.*)` - - riParseRegex = regexp.MustCompile(ri) -} - -// ComputeSI finds the most appropriate SI prefix for the given number -// and returns the prefix along with the value adjusted to be within -// that prefix. -// -// See also: SI, ParseSI. -// -// e.g. ComputeSI(2.2345e-12) -> (2.2345, "p") -func ComputeSI(input float64) (float64, string) { - if input == 0 { - return 0, "" - } - mag := math.Abs(input) - exponent := math.Floor(logn(mag, 10)) - exponent = math.Floor(exponent/3) * 3 - - value := mag / math.Pow(10, exponent) - - // Handle special case where value is exactly 1000.0 - // Should return 1 M instead of 1000 k - if value == 1000.0 { - exponent += 3 - value = mag / math.Pow(10, exponent) - } - - value = math.Copysign(value, input) - - prefix := siPrefixTable[exponent] - return value, prefix -} - -// SI returns a string with default formatting. -// -// SI uses Ftoa to format float value, removing trailing zeros. -// -// See also: ComputeSI, ParseSI. -// -// e.g. SI(1000000, "B") -> 1 MB -// e.g. SI(2.2345e-12, "F") -> 2.2345 pF -func SI(input float64, unit string) string { - value, prefix := ComputeSI(input) - return Ftoa(value) + " " + prefix + unit -} - -// SIWithDigits works like SI but limits the resulting string to the -// given number of decimal places. -// -// e.g. SIWithDigits(1000000, 0, "B") -> 1 MB -// e.g. SIWithDigits(2.2345e-12, 2, "F") -> 2.23 pF -func SIWithDigits(input float64, decimals int, unit string) string { - value, prefix := ComputeSI(input) - return FtoaWithDigits(value, decimals) + " " + prefix + unit -} - -var errInvalid = errors.New("invalid input") - -// ParseSI parses an SI string back into the number and unit. -// -// See also: SI, ComputeSI. -// -// e.g. ParseSI("2.2345 pF") -> (2.2345e-12, "F", nil) -func ParseSI(input string) (float64, string, error) { - found := riParseRegex.FindStringSubmatch(input) - if len(found) != 4 { - return 0, "", errInvalid - } - mag := revSIPrefixTable[found[2]] - unit := found[3] - - base, err := strconv.ParseFloat(found[1], 64) - return base * mag, unit, err -} diff --git a/vendor/github.com/dustin/go-humanize/times.go b/vendor/github.com/dustin/go-humanize/times.go deleted file mode 100644 index dd3fbf5..0000000 --- a/vendor/github.com/dustin/go-humanize/times.go +++ /dev/null @@ -1,117 +0,0 @@ -package humanize - -import ( - "fmt" - "math" - "sort" - "time" -) - -// Seconds-based time units -const ( - Day = 24 * time.Hour - Week = 7 * Day - Month = 30 * Day - Year = 12 * Month - LongTime = 37 * Year -) - -// Time formats a time into a relative string. -// -// Time(someT) -> "3 weeks ago" -func Time(then time.Time) string { - return RelTime(then, time.Now(), "ago", "from now") -} - -// A RelTimeMagnitude struct contains a relative time point at which -// the relative format of time will switch to a new format string. A -// slice of these in ascending order by their "D" field is passed to -// CustomRelTime to format durations. -// -// The Format field is a string that may contain a "%s" which will be -// replaced with the appropriate signed label (e.g. "ago" or "from -// now") and a "%d" that will be replaced by the quantity. -// -// The DivBy field is the amount of time the time difference must be -// divided by in order to display correctly. -// -// e.g. if D is 2*time.Minute and you want to display "%d minutes %s" -// DivBy should be time.Minute so whatever the duration is will be -// expressed in minutes. -type RelTimeMagnitude struct { - D time.Duration - Format string - DivBy time.Duration -} - -var defaultMagnitudes = []RelTimeMagnitude{ - {time.Second, "now", time.Second}, - {2 * time.Second, "1 second %s", 1}, - {time.Minute, "%d seconds %s", time.Second}, - {2 * time.Minute, "1 minute %s", 1}, - {time.Hour, "%d minutes %s", time.Minute}, - {2 * time.Hour, "1 hour %s", 1}, - {Day, "%d hours %s", time.Hour}, - {2 * Day, "1 day %s", 1}, - {Week, "%d days %s", Day}, - {2 * Week, "1 week %s", 1}, - {Month, "%d weeks %s", Week}, - {2 * Month, "1 month %s", 1}, - {Year, "%d months %s", Month}, - {18 * Month, "1 year %s", 1}, - {2 * Year, "2 years %s", 1}, - {LongTime, "%d years %s", Year}, - {math.MaxInt64, "a long while %s", 1}, -} - -// RelTime formats a time into a relative string. -// -// It takes two times and two labels. In addition to the generic time -// delta string (e.g. 5 minutes), the labels are used applied so that -// the label corresponding to the smaller time is applied. -// -// RelTime(timeInPast, timeInFuture, "earlier", "later") -> "3 weeks earlier" -func RelTime(a, b time.Time, albl, blbl string) string { - return CustomRelTime(a, b, albl, blbl, defaultMagnitudes) -} - -// CustomRelTime formats a time into a relative string. -// -// It takes two times two labels and a table of relative time formats. -// In addition to the generic time delta string (e.g. 5 minutes), the -// labels are used applied so that the label corresponding to the -// smaller time is applied. -func CustomRelTime(a, b time.Time, albl, blbl string, magnitudes []RelTimeMagnitude) string { - lbl := albl - diff := b.Sub(a) - - if a.After(b) { - lbl = blbl - diff = a.Sub(b) - } - - n := sort.Search(len(magnitudes), func(i int) bool { - return magnitudes[i].D > diff - }) - - if n >= len(magnitudes) { - n = len(magnitudes) - 1 - } - mag := magnitudes[n] - args := []interface{}{} - escaped := false - for _, ch := range mag.Format { - if escaped { - switch ch { - case 's': - args = append(args, lbl) - case 'd': - args = append(args, diff/mag.DivBy) - } - escaped = false - } else { - escaped = ch == '%' - } - } - return fmt.Sprintf(mag.Format, args...) -} diff --git a/vendor/github.com/fsnotify/fsnotify/.cirrus.yml b/vendor/github.com/fsnotify/fsnotify/.cirrus.yml deleted file mode 100644 index ffc7b99..0000000 --- a/vendor/github.com/fsnotify/fsnotify/.cirrus.yml +++ /dev/null @@ -1,13 +0,0 @@ -freebsd_task: - name: 'FreeBSD' - freebsd_instance: - image_family: freebsd-13-2 - install_script: - - pkg update -f - - pkg install -y go - test_script: - # run tests as user "cirrus" instead of root - - pw useradd cirrus -m - - chown -R cirrus:cirrus . - - FSNOTIFY_BUFFER=4096 sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race ./... - - sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race ./... diff --git a/vendor/github.com/fsnotify/fsnotify/.editorconfig b/vendor/github.com/fsnotify/fsnotify/.editorconfig deleted file mode 100644 index fad8958..0000000 --- a/vendor/github.com/fsnotify/fsnotify/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -root = true - -[*.go] -indent_style = tab -indent_size = 4 -insert_final_newline = true - -[*.{yml,yaml}] -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/vendor/github.com/fsnotify/fsnotify/.gitattributes b/vendor/github.com/fsnotify/fsnotify/.gitattributes deleted file mode 100644 index 32f1001..0000000 --- a/vendor/github.com/fsnotify/fsnotify/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -go.sum linguist-generated diff --git a/vendor/github.com/fsnotify/fsnotify/.gitignore b/vendor/github.com/fsnotify/fsnotify/.gitignore deleted file mode 100644 index 391cc07..0000000 --- a/vendor/github.com/fsnotify/fsnotify/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# go test -c output -*.test -*.test.exe - -# Output of go build ./cmd/fsnotify -/fsnotify -/fsnotify.exe diff --git a/vendor/github.com/fsnotify/fsnotify/.mailmap b/vendor/github.com/fsnotify/fsnotify/.mailmap deleted file mode 100644 index a04f290..0000000 --- a/vendor/github.com/fsnotify/fsnotify/.mailmap +++ /dev/null @@ -1,2 +0,0 @@ -Chris Howey -Nathan Youngman <4566+nathany@users.noreply.github.com> diff --git a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md deleted file mode 100644 index e0e5757..0000000 --- a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md +++ /dev/null @@ -1,541 +0,0 @@ -# Changelog - -Unreleased ----------- -Nothing yet. - -1.7.0 - 2023-10-22 ------------------- -This version of fsnotify needs Go 1.17. - -### Additions - -- illumos: add FEN backend to support illumos and Solaris. ([#371]) - -- all: add `NewBufferedWatcher()` to use a buffered channel, which can be useful - in cases where you can't control the kernel buffer and receive a large number - of events in bursts. ([#550], [#572]) - -- all: add `AddWith()`, which is identical to `Add()` but allows passing - options. ([#521]) - -- windows: allow setting the ReadDirectoryChangesW() buffer size with - `fsnotify.WithBufferSize()`; the default of 64K is the highest value that - works on all platforms and is enough for most purposes, but in some cases a - highest buffer is needed. ([#521]) - -### Changes and fixes - -- inotify: remove watcher if a watched path is renamed ([#518]) - - After a rename the reported name wasn't updated, or even an empty string. - Inotify doesn't provide any good facilities to update it, so just remove the - watcher. This is already how it worked on kqueue and FEN. - - On Windows this does work, and remains working. - -- windows: don't listen for file attribute changes ([#520]) - - File attribute changes are sent as `FILE_ACTION_MODIFIED` by the Windows API, - with no way to see if they're a file write or attribute change, so would show - up as a fsnotify.Write event. This is never useful, and could result in many - spurious Write events. - -- windows: return `ErrEventOverflow` if the buffer is full ([#525]) - - Before it would merely return "short read", making it hard to detect this - error. - -- kqueue: make sure events for all files are delivered properly when removing a - watched directory ([#526]) - - Previously they would get sent with `""` (empty string) or `"."` as the path - name. - -- kqueue: don't emit spurious Create events for symbolic links ([#524]) - - The link would get resolved but kqueue would "forget" it already saw the link - itself, resulting on a Create for every Write event for the directory. - -- all: return `ErrClosed` on `Add()` when the watcher is closed ([#516]) - -- other: add `Watcher.Errors` and `Watcher.Events` to the no-op `Watcher` in - `backend_other.go`, making it easier to use on unsupported platforms such as - WASM, AIX, etc. ([#528]) - -- other: use the `backend_other.go` no-op if the `appengine` build tag is set; - Google AppEngine forbids usage of the unsafe package so the inotify backend - won't compile there. - -[#371]: https://github.com/fsnotify/fsnotify/pull/371 -[#516]: https://github.com/fsnotify/fsnotify/pull/516 -[#518]: https://github.com/fsnotify/fsnotify/pull/518 -[#520]: https://github.com/fsnotify/fsnotify/pull/520 -[#521]: https://github.com/fsnotify/fsnotify/pull/521 -[#524]: https://github.com/fsnotify/fsnotify/pull/524 -[#525]: https://github.com/fsnotify/fsnotify/pull/525 -[#526]: https://github.com/fsnotify/fsnotify/pull/526 -[#528]: https://github.com/fsnotify/fsnotify/pull/528 -[#537]: https://github.com/fsnotify/fsnotify/pull/537 -[#550]: https://github.com/fsnotify/fsnotify/pull/550 -[#572]: https://github.com/fsnotify/fsnotify/pull/572 - -1.6.0 - 2022-10-13 ------------------- -This version of fsnotify needs Go 1.16 (this was already the case since 1.5.1, -but not documented). It also increases the minimum Linux version to 2.6.32. - -### Additions - -- all: add `Event.Has()` and `Op.Has()` ([#477]) - - This makes checking events a lot easier; for example: - - if event.Op&Write == Write && !(event.Op&Remove == Remove) { - } - - Becomes: - - if event.Has(Write) && !event.Has(Remove) { - } - -- all: add cmd/fsnotify ([#463]) - - A command-line utility for testing and some examples. - -### Changes and fixes - -- inotify: don't ignore events for files that don't exist ([#260], [#470]) - - Previously the inotify watcher would call `os.Lstat()` to check if a file - still exists before emitting events. - - This was inconsistent with other platforms and resulted in inconsistent event - reporting (e.g. when a file is quickly removed and re-created), and generally - a source of confusion. It was added in 2013 to fix a memory leak that no - longer exists. - -- all: return `ErrNonExistentWatch` when `Remove()` is called on a path that's - not watched ([#460]) - -- inotify: replace epoll() with non-blocking inotify ([#434]) - - Non-blocking inotify was not generally available at the time this library was - written in 2014, but now it is. As a result, the minimum Linux version is - bumped from 2.6.27 to 2.6.32. This hugely simplifies the code and is faster. - -- kqueue: don't check for events every 100ms ([#480]) - - The watcher would wake up every 100ms, even when there was nothing to do. Now - it waits until there is something to do. - -- macos: retry opening files on EINTR ([#475]) - -- kqueue: skip unreadable files ([#479]) - - kqueue requires a file descriptor for every file in a directory; this would - fail if a file was unreadable by the current user. Now these files are simply - skipped. - -- windows: fix renaming a watched directory if the parent is also watched ([#370]) - -- windows: increase buffer size from 4K to 64K ([#485]) - -- windows: close file handle on Remove() ([#288]) - -- kqueue: put pathname in the error if watching a file fails ([#471]) - -- inotify, windows: calling Close() more than once could race ([#465]) - -- kqueue: improve Close() performance ([#233]) - -- all: various documentation additions and clarifications. - -[#233]: https://github.com/fsnotify/fsnotify/pull/233 -[#260]: https://github.com/fsnotify/fsnotify/pull/260 -[#288]: https://github.com/fsnotify/fsnotify/pull/288 -[#370]: https://github.com/fsnotify/fsnotify/pull/370 -[#434]: https://github.com/fsnotify/fsnotify/pull/434 -[#460]: https://github.com/fsnotify/fsnotify/pull/460 -[#463]: https://github.com/fsnotify/fsnotify/pull/463 -[#465]: https://github.com/fsnotify/fsnotify/pull/465 -[#470]: https://github.com/fsnotify/fsnotify/pull/470 -[#471]: https://github.com/fsnotify/fsnotify/pull/471 -[#475]: https://github.com/fsnotify/fsnotify/pull/475 -[#477]: https://github.com/fsnotify/fsnotify/pull/477 -[#479]: https://github.com/fsnotify/fsnotify/pull/479 -[#480]: https://github.com/fsnotify/fsnotify/pull/480 -[#485]: https://github.com/fsnotify/fsnotify/pull/485 - -## [1.5.4] - 2022-04-25 - -* Windows: add missing defer to `Watcher.WatchList` [#447](https://github.com/fsnotify/fsnotify/pull/447) -* go.mod: use latest x/sys [#444](https://github.com/fsnotify/fsnotify/pull/444) -* Fix compilation for OpenBSD [#443](https://github.com/fsnotify/fsnotify/pull/443) - -## [1.5.3] - 2022-04-22 - -* This version is retracted. An incorrect branch is published accidentally [#445](https://github.com/fsnotify/fsnotify/issues/445) - -## [1.5.2] - 2022-04-21 - -* Add a feature to return the directories and files that are being monitored [#374](https://github.com/fsnotify/fsnotify/pull/374) -* Fix potential crash on windows if `raw.FileNameLength` exceeds `syscall.MAX_PATH` [#361](https://github.com/fsnotify/fsnotify/pull/361) -* Allow build on unsupported GOOS [#424](https://github.com/fsnotify/fsnotify/pull/424) -* Don't set `poller.fd` twice in `newFdPoller` [#406](https://github.com/fsnotify/fsnotify/pull/406) -* fix go vet warnings: call to `(*T).Fatalf` from a non-test goroutine [#416](https://github.com/fsnotify/fsnotify/pull/416) - -## [1.5.1] - 2021-08-24 - -* Revert Add AddRaw to not follow symlinks [#394](https://github.com/fsnotify/fsnotify/pull/394) - -## [1.5.0] - 2021-08-20 - -* Go: Increase minimum required version to Go 1.12 [#381](https://github.com/fsnotify/fsnotify/pull/381) -* Feature: Add AddRaw method which does not follow symlinks when adding a watch [#289](https://github.com/fsnotify/fsnotify/pull/298) -* Windows: Follow symlinks by default like on all other systems [#289](https://github.com/fsnotify/fsnotify/pull/289) -* CI: Use GitHub Actions for CI and cover go 1.12-1.17 - [#378](https://github.com/fsnotify/fsnotify/pull/378) - [#381](https://github.com/fsnotify/fsnotify/pull/381) - [#385](https://github.com/fsnotify/fsnotify/pull/385) -* Go 1.14+: Fix unsafe pointer conversion [#325](https://github.com/fsnotify/fsnotify/pull/325) - -## [1.4.9] - 2020-03-11 - -* Move example usage to the readme #329. This may resolve #328. - -## [1.4.8] - 2020-03-10 - -* CI: test more go versions (@nathany 1d13583d846ea9d66dcabbfefbfb9d8e6fb05216) -* Tests: Queued inotify events could have been read by the test before max_queued_events was hit (@matthias-stone #265) -* Tests: t.Fatalf -> t.Errorf in go routines (@gdey #266) -* CI: Less verbosity (@nathany #267) -* Tests: Darwin: Exchangedata is deprecated on 10.13 (@nathany #267) -* Tests: Check if channels are closed in the example (@alexeykazakov #244) -* CI: Only run golint on latest version of go and fix issues (@cpuguy83 #284) -* CI: Add windows to travis matrix (@cpuguy83 #284) -* Docs: Remover appveyor badge (@nathany 11844c0959f6fff69ba325d097fce35bd85a8e93) -* Linux: create epoll and pipe fds with close-on-exec (@JohannesEbke #219) -* Linux: open files with close-on-exec (@linxiulei #273) -* Docs: Plan to support fanotify (@nathany ab058b44498e8b7566a799372a39d150d9ea0119 ) -* Project: Add go.mod (@nathany #309) -* Project: Revise editor config (@nathany #309) -* Project: Update copyright for 2019 (@nathany #309) -* CI: Drop go1.8 from CI matrix (@nathany #309) -* Docs: Updating the FAQ section for supportability with NFS & FUSE filesystems (@Pratik32 4bf2d1fec78374803a39307bfb8d340688f4f28e ) - -## [1.4.7] - 2018-01-09 - -* BSD/macOS: Fix possible deadlock on closing the watcher on kqueue (thanks @nhooyr and @glycerine) -* Tests: Fix missing verb on format string (thanks @rchiossi) -* Linux: Fix deadlock in Remove (thanks @aarondl) -* Linux: Watch.Add improvements (avoid race, fix consistency, reduce garbage) (thanks @twpayne) -* Docs: Moved FAQ into the README (thanks @vahe) -* Linux: Properly handle inotify's IN_Q_OVERFLOW event (thanks @zeldovich) -* Docs: replace references to OS X with macOS - -## [1.4.2] - 2016-10-10 - -* Linux: use InotifyInit1 with IN_CLOEXEC to stop leaking a file descriptor to a child process when using fork/exec [#178](https://github.com/fsnotify/fsnotify/pull/178) (thanks @pattyshack) - -## [1.4.1] - 2016-10-04 - -* Fix flaky inotify stress test on Linux [#177](https://github.com/fsnotify/fsnotify/pull/177) (thanks @pattyshack) - -## [1.4.0] - 2016-10-01 - -* add a String() method to Event.Op [#165](https://github.com/fsnotify/fsnotify/pull/165) (thanks @oozie) - -## [1.3.1] - 2016-06-28 - -* Windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc) - -## [1.3.0] - 2016-04-19 - -* Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135) - -## [1.2.10] - 2016-03-02 - -* Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj) - -## [1.2.9] - 2016-01-13 - -kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsnotify/pull/111) (thanks @bep) - -## [1.2.8] - 2015-12-17 - -* kqueue: fix race condition in Close [#105](https://github.com/fsnotify/fsnotify/pull/105) (thanks @djui for reporting the issue and @ppknap for writing a failing test) -* inotify: fix race in test -* enable race detection for continuous integration (Linux, Mac, Windows) - -## [1.2.5] - 2015-10-17 - -* inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/fsnotify/fsnotify/pull/100) (thanks @suihkulokki) -* inotify: fix path leaks [#73](https://github.com/fsnotify/fsnotify/pull/73) (thanks @chamaken) -* kqueue: watch for rename events on subdirectories [#83](https://github.com/fsnotify/fsnotify/pull/83) (thanks @guotie) -* kqueue: avoid infinite loops from symlinks cycles [#101](https://github.com/fsnotify/fsnotify/pull/101) (thanks @illicitonion) - -## [1.2.1] - 2015-10-14 - -* kqueue: don't watch named pipes [#98](https://github.com/fsnotify/fsnotify/pull/98) (thanks @evanphx) - -## [1.2.0] - 2015-02-08 - -* inotify: use epoll to wake up readEvents [#66](https://github.com/fsnotify/fsnotify/pull/66) (thanks @PieterD) -* inotify: closing watcher should now always shut down goroutine [#63](https://github.com/fsnotify/fsnotify/pull/63) (thanks @PieterD) -* kqueue: close kqueue after removing watches, fixes [#59](https://github.com/fsnotify/fsnotify/issues/59) - -## [1.1.1] - 2015-02-05 - -* inotify: Retry read on EINTR [#61](https://github.com/fsnotify/fsnotify/issues/61) (thanks @PieterD) - -## [1.1.0] - 2014-12-12 - -* kqueue: rework internals [#43](https://github.com/fsnotify/fsnotify/pull/43) - * add low-level functions - * only need to store flags on directories - * less mutexes [#13](https://github.com/fsnotify/fsnotify/issues/13) - * done can be an unbuffered channel - * remove calls to os.NewSyscallError -* More efficient string concatenation for Event.String() [#52](https://github.com/fsnotify/fsnotify/pull/52) (thanks @mdlayher) -* kqueue: fix regression in rework causing subdirectories to be watched [#48](https://github.com/fsnotify/fsnotify/issues/48) -* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) - -## [1.0.4] - 2014-09-07 - -* kqueue: add dragonfly to the build tags. -* Rename source code files, rearrange code so exported APIs are at the top. -* Add done channel to example code. [#37](https://github.com/fsnotify/fsnotify/pull/37) (thanks @chenyukang) - -## [1.0.3] - 2014-08-19 - -* [Fix] Windows MOVED_TO now translates to Create like on BSD and Linux. [#36](https://github.com/fsnotify/fsnotify/issues/36) - -## [1.0.2] - 2014-08-17 - -* [Fix] Missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) -* [Fix] Make ./path and path equivalent. (thanks @zhsso) - -## [1.0.0] - 2014-08-15 - -* [API] Remove AddWatch on Windows, use Add. -* Improve documentation for exported identifiers. [#30](https://github.com/fsnotify/fsnotify/issues/30) -* Minor updates based on feedback from golint. - -## dev / 2014-07-09 - -* Moved to [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify). -* Use os.NewSyscallError instead of returning errno (thanks @hariharan-uno) - -## dev / 2014-07-04 - -* kqueue: fix incorrect mutex used in Close() -* Update example to demonstrate usage of Op. - -## dev / 2014-06-28 - -* [API] Don't set the Write Op for attribute notifications [#4](https://github.com/fsnotify/fsnotify/issues/4) -* Fix for String() method on Event (thanks Alex Brainman) -* Don't build on Plan 9 or Solaris (thanks @4ad) - -## dev / 2014-06-21 - -* Events channel of type Event rather than *Event. -* [internal] use syscall constants directly for inotify and kqueue. -* [internal] kqueue: rename events to kevents and fileEvent to event. - -## dev / 2014-06-19 - -* Go 1.3+ required on Windows (uses syscall.ERROR_MORE_DATA internally). -* [internal] remove cookie from Event struct (unused). -* [internal] Event struct has the same definition across every OS. -* [internal] remove internal watch and removeWatch methods. - -## dev / 2014-06-12 - -* [API] Renamed Watch() to Add() and RemoveWatch() to Remove(). -* [API] Pluralized channel names: Events and Errors. -* [API] Renamed FileEvent struct to Event. -* [API] Op constants replace methods like IsCreate(). - -## dev / 2014-06-12 - -* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) - -## dev / 2014-05-23 - -* [API] Remove current implementation of WatchFlags. - * current implementation doesn't take advantage of OS for efficiency - * provides little benefit over filtering events as they are received, but has extra bookkeeping and mutexes - * no tests for the current implementation - * not fully implemented on Windows [#93](https://github.com/howeyc/fsnotify/issues/93#issuecomment-39285195) - -## [0.9.3] - 2014-12-31 - -* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) - -## [0.9.2] - 2014-08-17 - -* [Backport] Fix missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) - -## [0.9.1] - 2014-06-12 - -* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) - -## [0.9.0] - 2014-01-17 - -* IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany) -* [Fix] kqueue: fix deadlock [#77][] (thanks @cespare) -* [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library. - -## [0.8.12] - 2013-11-13 - -* [API] Remove FD_SET and friends from Linux adapter - -## [0.8.11] - 2013-11-02 - -* [Doc] Add Changelog [#72][] (thanks @nathany) -* [Doc] Spotlight and double modify events on macOS [#62][] (reported by @paulhammond) - -## [0.8.10] - 2013-10-19 - -* [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott) -* [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer) -* [Doc] specify OS-specific limits in README (thanks @debrando) - -## [0.8.9] - 2013-09-08 - -* [Doc] Contributing (thanks @nathany) -* [Doc] update package path in example code [#63][] (thanks @paulhammond) -* [Doc] GoCI badge in README (Linux only) [#60][] -* [Doc] Cross-platform testing with Vagrant [#59][] (thanks @nathany) - -## [0.8.8] - 2013-06-17 - -* [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie) - -## [0.8.7] - 2013-06-03 - -* [API] Make syscall flags internal -* [Fix] inotify: ignore event changes -* [Fix] race in symlink test [#45][] (reported by @srid) -* [Fix] tests on Windows -* lower case error messages - -## [0.8.6] - 2013-05-23 - -* kqueue: Use EVT_ONLY flag on Darwin -* [Doc] Update README with full example - -## [0.8.5] - 2013-05-09 - -* [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg) - -## [0.8.4] - 2013-04-07 - -* [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz) - -## [0.8.3] - 2013-03-13 - -* [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin) -* [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin) - -## [0.8.2] - 2013-02-07 - -* [Doc] add Authors -* [Fix] fix data races for map access [#29][] (thanks @fsouza) - -## [0.8.1] - 2013-01-09 - -* [Fix] Windows path separators -* [Doc] BSD License - -## [0.8.0] - 2012-11-09 - -* kqueue: directory watching improvements (thanks @vmirage) -* inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto) -* [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr) - -## [0.7.4] - 2012-10-09 - -* [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji) -* [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig) -* [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig) -* [Fix] kqueue: modify after recreation of file - -## [0.7.3] - 2012-09-27 - -* [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage) -* [Fix] kqueue: no longer get duplicate CREATE events - -## [0.7.2] - 2012-09-01 - -* kqueue: events for created directories - -## [0.7.1] - 2012-07-14 - -* [Fix] for renaming files - -## [0.7.0] - 2012-07-02 - -* [Feature] FSNotify flags -* [Fix] inotify: Added file name back to event path - -## [0.6.0] - 2012-06-06 - -* kqueue: watch files after directory created (thanks @tmc) - -## [0.5.1] - 2012-05-22 - -* [Fix] inotify: remove all watches before Close() - -## [0.5.0] - 2012-05-03 - -* [API] kqueue: return errors during watch instead of sending over channel -* kqueue: match symlink behavior on Linux -* inotify: add `DELETE_SELF` (requested by @taralx) -* [Fix] kqueue: handle EINTR (reported by @robfig) -* [Doc] Godoc example [#1][] (thanks @davecheney) - -## [0.4.0] - 2012-03-30 - -* Go 1 released: build with go tool -* [Feature] Windows support using winfsnotify -* Windows does not have attribute change notifications -* Roll attribute notifications into IsModify - -## [0.3.0] - 2012-02-19 - -* kqueue: add files when watch directory - -## [0.2.0] - 2011-12-30 - -* update to latest Go weekly code - -## [0.1.0] - 2011-10-19 - -* kqueue: add watch on file creation to match inotify -* kqueue: create file event -* inotify: ignore `IN_IGNORED` events -* event String() -* linux: common FileEvent functions -* initial commit - -[#79]: https://github.com/howeyc/fsnotify/pull/79 -[#77]: https://github.com/howeyc/fsnotify/pull/77 -[#72]: https://github.com/howeyc/fsnotify/issues/72 -[#71]: https://github.com/howeyc/fsnotify/issues/71 -[#70]: https://github.com/howeyc/fsnotify/issues/70 -[#63]: https://github.com/howeyc/fsnotify/issues/63 -[#62]: https://github.com/howeyc/fsnotify/issues/62 -[#60]: https://github.com/howeyc/fsnotify/issues/60 -[#59]: https://github.com/howeyc/fsnotify/issues/59 -[#49]: https://github.com/howeyc/fsnotify/issues/49 -[#45]: https://github.com/howeyc/fsnotify/issues/45 -[#40]: https://github.com/howeyc/fsnotify/issues/40 -[#36]: https://github.com/howeyc/fsnotify/issues/36 -[#33]: https://github.com/howeyc/fsnotify/issues/33 -[#29]: https://github.com/howeyc/fsnotify/issues/29 -[#25]: https://github.com/howeyc/fsnotify/issues/25 -[#24]: https://github.com/howeyc/fsnotify/issues/24 -[#21]: https://github.com/howeyc/fsnotify/issues/21 diff --git a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md deleted file mode 100644 index ea37975..0000000 --- a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -Thank you for your interest in contributing to fsnotify! We try to review and -merge PRs in a reasonable timeframe, but please be aware that: - -- To avoid "wasted" work, please discus changes on the issue tracker first. You - can just send PRs, but they may end up being rejected for one reason or the - other. - -- fsnotify is a cross-platform library, and changes must work reasonably well on - all supported platforms. - -- Changes will need to be compatible; old code should still compile, and the - runtime behaviour can't change in ways that are likely to lead to problems for - users. - -Testing -------- -Just `go test ./...` runs all the tests; the CI runs this on all supported -platforms. Testing different platforms locally can be done with something like -[goon] or [Vagrant], but this isn't super-easy to set up at the moment. - -Use the `-short` flag to make the "stress test" run faster. - - -[goon]: https://github.com/arp242/goon -[Vagrant]: https://www.vagrantup.com/ -[integration_test.go]: /integration_test.go diff --git a/vendor/github.com/fsnotify/fsnotify/LICENSE b/vendor/github.com/fsnotify/fsnotify/LICENSE deleted file mode 100644 index fb03ade..0000000 --- a/vendor/github.com/fsnotify/fsnotify/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright © 2012 The Go Authors. All rights reserved. -Copyright © fsnotify Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. -* Neither the name of Google Inc. nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/fsnotify/fsnotify/README.md b/vendor/github.com/fsnotify/fsnotify/README.md deleted file mode 100644 index e480733..0000000 --- a/vendor/github.com/fsnotify/fsnotify/README.md +++ /dev/null @@ -1,184 +0,0 @@ -fsnotify is a Go library to provide cross-platform filesystem notifications on -Windows, Linux, macOS, BSD, and illumos. - -Go 1.17 or newer is required; the full documentation is at -https://pkg.go.dev/github.com/fsnotify/fsnotify - ---- - -Platform support: - -| Backend | OS | Status | -| :-------------------- | :--------- | :------------------------------------------------------------------------ | -| inotify | Linux | Supported | -| kqueue | BSD, macOS | Supported | -| ReadDirectoryChangesW | Windows | Supported | -| FEN | illumos | Supported | -| fanotify | Linux 5.9+ | [Not yet](https://github.com/fsnotify/fsnotify/issues/114) | -| AHAFS | AIX | [aix branch]; experimental due to lack of maintainer and test environment | -| FSEvents | macOS | [Needs support in x/sys/unix][fsevents] | -| USN Journals | Windows | [Needs support in x/sys/windows][usn] | -| Polling | *All* | [Not yet](https://github.com/fsnotify/fsnotify/issues/9) | - -Linux and illumos should include Android and Solaris, but these are currently -untested. - -[fsevents]: https://github.com/fsnotify/fsnotify/issues/11#issuecomment-1279133120 -[usn]: https://github.com/fsnotify/fsnotify/issues/53#issuecomment-1279829847 -[aix branch]: https://github.com/fsnotify/fsnotify/issues/353#issuecomment-1284590129 - -Usage ------ -A basic example: - -```go -package main - -import ( - "log" - - "github.com/fsnotify/fsnotify" -) - -func main() { - // Create new watcher. - watcher, err := fsnotify.NewWatcher() - if err != nil { - log.Fatal(err) - } - defer watcher.Close() - - // Start listening for events. - go func() { - for { - select { - case event, ok := <-watcher.Events: - if !ok { - return - } - log.Println("event:", event) - if event.Has(fsnotify.Write) { - log.Println("modified file:", event.Name) - } - case err, ok := <-watcher.Errors: - if !ok { - return - } - log.Println("error:", err) - } - } - }() - - // Add a path. - err = watcher.Add("/tmp") - if err != nil { - log.Fatal(err) - } - - // Block main goroutine forever. - <-make(chan struct{}) -} -``` - -Some more examples can be found in [cmd/fsnotify](cmd/fsnotify), which can be -run with: - - % go run ./cmd/fsnotify - -Further detailed documentation can be found in godoc: -https://pkg.go.dev/github.com/fsnotify/fsnotify - -FAQ ---- -### Will a file still be watched when it's moved to another directory? -No, not unless you are watching the location it was moved to. - -### Are subdirectories watched? -No, you must add watches for any directory you want to watch (a recursive -watcher is on the roadmap: [#18]). - -[#18]: https://github.com/fsnotify/fsnotify/issues/18 - -### Do I have to watch the Error and Event channels in a goroutine? -Yes. You can read both channels in the same goroutine using `select` (you don't -need a separate goroutine for both channels; see the example). - -### Why don't notifications work with NFS, SMB, FUSE, /proc, or /sys? -fsnotify requires support from underlying OS to work. The current NFS and SMB -protocols does not provide network level support for file notifications, and -neither do the /proc and /sys virtual filesystems. - -This could be fixed with a polling watcher ([#9]), but it's not yet implemented. - -[#9]: https://github.com/fsnotify/fsnotify/issues/9 - -### Why do I get many Chmod events? -Some programs may generate a lot of attribute changes; for example Spotlight on -macOS, anti-virus programs, backup applications, and some others are known to do -this. As a rule, it's typically best to ignore Chmod events. They're often not -useful, and tend to cause problems. - -Spotlight indexing on macOS can result in multiple events (see [#15]). A -temporary workaround is to add your folder(s) to the *Spotlight Privacy -settings* until we have a native FSEvents implementation (see [#11]). - -[#11]: https://github.com/fsnotify/fsnotify/issues/11 -[#15]: https://github.com/fsnotify/fsnotify/issues/15 - -### Watching a file doesn't work well -Watching individual files (rather than directories) is generally not recommended -as many programs (especially editors) update files atomically: it will write to -a temporary file which is then moved to to destination, overwriting the original -(or some variant thereof). The watcher on the original file is now lost, as that -no longer exists. - -The upshot of this is that a power failure or crash won't leave a half-written -file. - -Watch the parent directory and use `Event.Name` to filter out files you're not -interested in. There is an example of this in `cmd/fsnotify/file.go`. - -Platform-specific notes ------------------------ -### Linux -When a file is removed a REMOVE event won't be emitted until all file -descriptors are closed; it will emit a CHMOD instead: - - fp := os.Open("file") - os.Remove("file") // CHMOD - fp.Close() // REMOVE - -This is the event that inotify sends, so not much can be changed about this. - -The `fs.inotify.max_user_watches` sysctl variable specifies the upper limit for -the number of watches per user, and `fs.inotify.max_user_instances` specifies -the maximum number of inotify instances per user. Every Watcher you create is an -"instance", and every path you add is a "watch". - -These are also exposed in `/proc` as `/proc/sys/fs/inotify/max_user_watches` and -`/proc/sys/fs/inotify/max_user_instances` - -To increase them you can use `sysctl` or write the value to proc file: - - # The default values on Linux 5.18 - sysctl fs.inotify.max_user_watches=124983 - sysctl fs.inotify.max_user_instances=128 - -To make the changes persist on reboot edit `/etc/sysctl.conf` or -`/usr/lib/sysctl.d/50-default.conf` (details differ per Linux distro; check your -distro's documentation): - - fs.inotify.max_user_watches=124983 - fs.inotify.max_user_instances=128 - -Reaching the limit will result in a "no space left on device" or "too many open -files" error. - -### kqueue (macOS, all BSD systems) -kqueue requires opening a file descriptor for every file that's being watched; -so if you're watching a directory with five files then that's six file -descriptors. You will run in to your system's "max open files" limit faster on -these platforms. - -The sysctl variables `kern.maxfiles` and `kern.maxfilesperproc` can be used to -control the maximum number of open files. diff --git a/vendor/github.com/fsnotify/fsnotify/backend_fen.go b/vendor/github.com/fsnotify/fsnotify/backend_fen.go deleted file mode 100644 index 28497f1..0000000 --- a/vendor/github.com/fsnotify/fsnotify/backend_fen.go +++ /dev/null @@ -1,640 +0,0 @@ -//go:build solaris -// +build solaris - -// Note: the documentation on the Watcher type and methods is generated from -// mkdoc.zsh - -package fsnotify - -import ( - "errors" - "fmt" - "os" - "path/filepath" - "sync" - - "golang.org/x/sys/unix" -) - -// Watcher watches a set of paths, delivering events on a channel. -// -// A watcher should not be copied (e.g. pass it by pointer, rather than by -// value). -// -// # Linux notes -// -// When a file is removed a Remove event won't be emitted until all file -// descriptors are closed, and deletes will always emit a Chmod. For example: -// -// fp := os.Open("file") -// os.Remove("file") // Triggers Chmod -// fp.Close() // Triggers Remove -// -// This is the event that inotify sends, so not much can be changed about this. -// -// The fs.inotify.max_user_watches sysctl variable specifies the upper limit -// for the number of watches per user, and fs.inotify.max_user_instances -// specifies the maximum number of inotify instances per user. Every Watcher you -// create is an "instance", and every path you add is a "watch". -// -// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and -// /proc/sys/fs/inotify/max_user_instances -// -// To increase them you can use sysctl or write the value to the /proc file: -// -// # Default values on Linux 5.18 -// sysctl fs.inotify.max_user_watches=124983 -// sysctl fs.inotify.max_user_instances=128 -// -// To make the changes persist on reboot edit /etc/sysctl.conf or -// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check -// your distro's documentation): -// -// fs.inotify.max_user_watches=124983 -// fs.inotify.max_user_instances=128 -// -// Reaching the limit will result in a "no space left on device" or "too many open -// files" error. -// -// # kqueue notes (macOS, BSD) -// -// kqueue requires opening a file descriptor for every file that's being watched; -// so if you're watching a directory with five files then that's six file -// descriptors. You will run in to your system's "max open files" limit faster on -// these platforms. -// -// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to -// control the maximum number of open files, as well as /etc/login.conf on BSD -// systems. -// -// # Windows notes -// -// Paths can be added as "C:\path\to\dir", but forward slashes -// ("C:/path/to/dir") will also work. -// -// When a watched directory is removed it will always send an event for the -// directory itself, but may not send events for all files in that directory. -// Sometimes it will send events for all times, sometimes it will send no -// events, and often only for some files. -// -// The default ReadDirectoryChangesW() buffer size is 64K, which is the largest -// value that is guaranteed to work with SMB filesystems. If you have many -// events in quick succession this may not be enough, and you will have to use -// [WithBufferSize] to increase the value. -type Watcher struct { - // Events sends the filesystem change events. - // - // fsnotify can send the following events; a "path" here can refer to a - // file, directory, symbolic link, or special file like a FIFO. - // - // fsnotify.Create A new path was created; this may be followed by one - // or more Write events if data also gets written to a - // file. - // - // fsnotify.Remove A path was removed. - // - // fsnotify.Rename A path was renamed. A rename is always sent with the - // old path as Event.Name, and a Create event will be - // sent with the new name. Renames are only sent for - // paths that are currently watched; e.g. moving an - // unmonitored file into a monitored directory will - // show up as just a Create. Similarly, renaming a file - // to outside a monitored directory will show up as - // only a Rename. - // - // fsnotify.Write A file or named pipe was written to. A Truncate will - // also trigger a Write. A single "write action" - // initiated by the user may show up as one or multiple - // writes, depending on when the system syncs things to - // disk. For example when compiling a large Go program - // you may get hundreds of Write events, and you may - // want to wait until you've stopped receiving them - // (see the dedup example in cmd/fsnotify). - // - // Some systems may send Write event for directories - // when the directory content changes. - // - // fsnotify.Chmod Attributes were changed. On Linux this is also sent - // when a file is removed (or more accurately, when a - // link to an inode is removed). On kqueue it's sent - // when a file is truncated. On Windows it's never - // sent. - Events chan Event - - // Errors sends any errors. - // - // ErrEventOverflow is used to indicate there are too many events: - // - // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) - // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. - // - kqueue, fen: Not used. - Errors chan error - - mu sync.Mutex - port *unix.EventPort - done chan struct{} // Channel for sending a "quit message" to the reader goroutine - dirs map[string]struct{} // Explicitly watched directories - watches map[string]struct{} // Explicitly watched non-directories -} - -// NewWatcher creates a new Watcher. -func NewWatcher() (*Watcher, error) { - return NewBufferedWatcher(0) -} - -// NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events -// channel. -// -// The main use case for this is situations with a very large number of events -// where the kernel buffer size can't be increased (e.g. due to lack of -// permissions). An unbuffered Watcher will perform better for almost all use -// cases, and whenever possible you will be better off increasing the kernel -// buffers instead of adding a large userspace buffer. -func NewBufferedWatcher(sz uint) (*Watcher, error) { - w := &Watcher{ - Events: make(chan Event, sz), - Errors: make(chan error), - dirs: make(map[string]struct{}), - watches: make(map[string]struct{}), - done: make(chan struct{}), - } - - var err error - w.port, err = unix.NewEventPort() - if err != nil { - return nil, fmt.Errorf("fsnotify.NewWatcher: %w", err) - } - - go w.readEvents() - return w, nil -} - -// sendEvent attempts to send an event to the user, returning true if the event -// was put in the channel successfully and false if the watcher has been closed. -func (w *Watcher) sendEvent(name string, op Op) (sent bool) { - select { - case w.Events <- Event{Name: name, Op: op}: - return true - case <-w.done: - return false - } -} - -// sendError attempts to send an error to the user, returning true if the error -// was put in the channel successfully and false if the watcher has been closed. -func (w *Watcher) sendError(err error) (sent bool) { - select { - case w.Errors <- err: - return true - case <-w.done: - return false - } -} - -func (w *Watcher) isClosed() bool { - select { - case <-w.done: - return true - default: - return false - } -} - -// Close removes all watches and closes the Events channel. -func (w *Watcher) Close() error { - // Take the lock used by associateFile to prevent lingering events from - // being processed after the close - w.mu.Lock() - defer w.mu.Unlock() - if w.isClosed() { - return nil - } - close(w.done) - return w.port.Close() -} - -// Add starts monitoring the path for changes. -// -// A path can only be watched once; watching it more than once is a no-op and will -// not return an error. Paths that do not yet exist on the filesystem cannot be -// watched. -// -// A watch will be automatically removed if the watched path is deleted or -// renamed. The exception is the Windows backend, which doesn't remove the -// watcher on renames. -// -// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special -// filesystems (/proc, /sys, etc.) generally don't work. -// -// Returns [ErrClosed] if [Watcher.Close] was called. -// -// See [Watcher.AddWith] for a version that allows adding options. -// -// # Watching directories -// -// All files in a directory are monitored, including new files that are created -// after the watcher is started. Subdirectories are not watched (i.e. it's -// non-recursive). -// -// # Watching files -// -// Watching individual files (rather than directories) is generally not -// recommended as many programs (especially editors) update files atomically: it -// will write to a temporary file which is then moved to to destination, -// overwriting the original (or some variant thereof). The watcher on the -// original file is now lost, as that no longer exists. -// -// The upshot of this is that a power failure or crash won't leave a -// half-written file. -// -// Watch the parent directory and use Event.Name to filter out files you're not -// interested in. There is an example of this in cmd/fsnotify/file.go. -func (w *Watcher) Add(name string) error { return w.AddWith(name) } - -// AddWith is like [Watcher.Add], but allows adding options. When using Add() -// the defaults described below are used. -// -// Possible options are: -// -// - [WithBufferSize] sets the buffer size for the Windows backend; no-op on -// other platforms. The default is 64K (65536 bytes). -func (w *Watcher) AddWith(name string, opts ...addOpt) error { - if w.isClosed() { - return ErrClosed - } - if w.port.PathIsWatched(name) { - return nil - } - - _ = getOptions(opts...) - - // Currently we resolve symlinks that were explicitly requested to be - // watched. Otherwise we would use LStat here. - stat, err := os.Stat(name) - if err != nil { - return err - } - - // Associate all files in the directory. - if stat.IsDir() { - err := w.handleDirectory(name, stat, true, w.associateFile) - if err != nil { - return err - } - - w.mu.Lock() - w.dirs[name] = struct{}{} - w.mu.Unlock() - return nil - } - - err = w.associateFile(name, stat, true) - if err != nil { - return err - } - - w.mu.Lock() - w.watches[name] = struct{}{} - w.mu.Unlock() - return nil -} - -// Remove stops monitoring the path for changes. -// -// Directories are always removed non-recursively. For example, if you added -// /tmp/dir and /tmp/dir/subdir then you will need to remove both. -// -// Removing a path that has not yet been added returns [ErrNonExistentWatch]. -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) Remove(name string) error { - if w.isClosed() { - return nil - } - if !w.port.PathIsWatched(name) { - return fmt.Errorf("%w: %s", ErrNonExistentWatch, name) - } - - // The user has expressed an intent. Immediately remove this name from - // whichever watch list it might be in. If it's not in there the delete - // doesn't cause harm. - w.mu.Lock() - delete(w.watches, name) - delete(w.dirs, name) - w.mu.Unlock() - - stat, err := os.Stat(name) - if err != nil { - return err - } - - // Remove associations for every file in the directory. - if stat.IsDir() { - err := w.handleDirectory(name, stat, false, w.dissociateFile) - if err != nil { - return err - } - return nil - } - - err = w.port.DissociatePath(name) - if err != nil { - return err - } - - return nil -} - -// readEvents contains the main loop that runs in a goroutine watching for events. -func (w *Watcher) readEvents() { - // If this function returns, the watcher has been closed and we can close - // these channels - defer func() { - close(w.Errors) - close(w.Events) - }() - - pevents := make([]unix.PortEvent, 8) - for { - count, err := w.port.Get(pevents, 1, nil) - if err != nil && err != unix.ETIME { - // Interrupted system call (count should be 0) ignore and continue - if errors.Is(err, unix.EINTR) && count == 0 { - continue - } - // Get failed because we called w.Close() - if errors.Is(err, unix.EBADF) && w.isClosed() { - return - } - // There was an error not caused by calling w.Close() - if !w.sendError(err) { - return - } - } - - p := pevents[:count] - for _, pevent := range p { - if pevent.Source != unix.PORT_SOURCE_FILE { - // Event from unexpected source received; should never happen. - if !w.sendError(errors.New("Event from unexpected source received")) { - return - } - continue - } - - err = w.handleEvent(&pevent) - if err != nil { - if !w.sendError(err) { - return - } - } - } - } -} - -func (w *Watcher) handleDirectory(path string, stat os.FileInfo, follow bool, handler func(string, os.FileInfo, bool) error) error { - files, err := os.ReadDir(path) - if err != nil { - return err - } - - // Handle all children of the directory. - for _, entry := range files { - finfo, err := entry.Info() - if err != nil { - return err - } - err = handler(filepath.Join(path, finfo.Name()), finfo, false) - if err != nil { - return err - } - } - - // And finally handle the directory itself. - return handler(path, stat, follow) -} - -// handleEvent might need to emit more than one fsnotify event if the events -// bitmap matches more than one event type (e.g. the file was both modified and -// had the attributes changed between when the association was created and the -// when event was returned) -func (w *Watcher) handleEvent(event *unix.PortEvent) error { - var ( - events = event.Events - path = event.Path - fmode = event.Cookie.(os.FileMode) - reRegister = true - ) - - w.mu.Lock() - _, watchedDir := w.dirs[path] - _, watchedPath := w.watches[path] - w.mu.Unlock() - isWatched := watchedDir || watchedPath - - if events&unix.FILE_DELETE != 0 { - if !w.sendEvent(path, Remove) { - return nil - } - reRegister = false - } - if events&unix.FILE_RENAME_FROM != 0 { - if !w.sendEvent(path, Rename) { - return nil - } - // Don't keep watching the new file name - reRegister = false - } - if events&unix.FILE_RENAME_TO != 0 { - // We don't report a Rename event for this case, because Rename events - // are interpreted as referring to the _old_ name of the file, and in - // this case the event would refer to the new name of the file. This - // type of rename event is not supported by fsnotify. - - // inotify reports a Remove event in this case, so we simulate this - // here. - if !w.sendEvent(path, Remove) { - return nil - } - // Don't keep watching the file that was removed - reRegister = false - } - - // The file is gone, nothing left to do. - if !reRegister { - if watchedDir { - w.mu.Lock() - delete(w.dirs, path) - w.mu.Unlock() - } - if watchedPath { - w.mu.Lock() - delete(w.watches, path) - w.mu.Unlock() - } - return nil - } - - // If we didn't get a deletion the file still exists and we're going to have - // to watch it again. Let's Stat it now so that we can compare permissions - // and have what we need to continue watching the file - - stat, err := os.Lstat(path) - if err != nil { - // This is unexpected, but we should still emit an event. This happens - // most often on "rm -r" of a subdirectory inside a watched directory We - // get a modify event of something happening inside, but by the time we - // get here, the sudirectory is already gone. Clearly we were watching - // this path but now it is gone. Let's tell the user that it was - // removed. - if !w.sendEvent(path, Remove) { - return nil - } - // Suppress extra write events on removed directories; they are not - // informative and can be confusing. - return nil - } - - // resolve symlinks that were explicitly watched as we would have at Add() - // time. this helps suppress spurious Chmod events on watched symlinks - if isWatched { - stat, err = os.Stat(path) - if err != nil { - // The symlink still exists, but the target is gone. Report the - // Remove similar to above. - if !w.sendEvent(path, Remove) { - return nil - } - // Don't return the error - } - } - - if events&unix.FILE_MODIFIED != 0 { - if fmode.IsDir() { - if watchedDir { - if err := w.updateDirectory(path); err != nil { - return err - } - } else { - if !w.sendEvent(path, Write) { - return nil - } - } - } else { - if !w.sendEvent(path, Write) { - return nil - } - } - } - if events&unix.FILE_ATTRIB != 0 && stat != nil { - // Only send Chmod if perms changed - if stat.Mode().Perm() != fmode.Perm() { - if !w.sendEvent(path, Chmod) { - return nil - } - } - } - - if stat != nil { - // If we get here, it means we've hit an event above that requires us to - // continue watching the file or directory - return w.associateFile(path, stat, isWatched) - } - return nil -} - -func (w *Watcher) updateDirectory(path string) error { - // The directory was modified, so we must find unwatched entities and watch - // them. If something was removed from the directory, nothing will happen, - // as everything else should still be watched. - files, err := os.ReadDir(path) - if err != nil { - return err - } - - for _, entry := range files { - path := filepath.Join(path, entry.Name()) - if w.port.PathIsWatched(path) { - continue - } - - finfo, err := entry.Info() - if err != nil { - return err - } - err = w.associateFile(path, finfo, false) - if err != nil { - if !w.sendError(err) { - return nil - } - } - if !w.sendEvent(path, Create) { - return nil - } - } - return nil -} - -func (w *Watcher) associateFile(path string, stat os.FileInfo, follow bool) error { - if w.isClosed() { - return ErrClosed - } - // This is primarily protecting the call to AssociatePath but it is - // important and intentional that the call to PathIsWatched is also - // protected by this mutex. Without this mutex, AssociatePath has been seen - // to error out that the path is already associated. - w.mu.Lock() - defer w.mu.Unlock() - - if w.port.PathIsWatched(path) { - // Remove the old association in favor of this one If we get ENOENT, - // then while the x/sys/unix wrapper still thought that this path was - // associated, the underlying event port did not. This call will have - // cleared up that discrepancy. The most likely cause is that the event - // has fired but we haven't processed it yet. - err := w.port.DissociatePath(path) - if err != nil && err != unix.ENOENT { - return err - } - } - // FILE_NOFOLLOW means we watch symlinks themselves rather than their - // targets. - events := unix.FILE_MODIFIED | unix.FILE_ATTRIB | unix.FILE_NOFOLLOW - if follow { - // We *DO* follow symlinks for explicitly watched entries. - events = unix.FILE_MODIFIED | unix.FILE_ATTRIB - } - return w.port.AssociatePath(path, stat, - events, - stat.Mode()) -} - -func (w *Watcher) dissociateFile(path string, stat os.FileInfo, unused bool) error { - if !w.port.PathIsWatched(path) { - return nil - } - return w.port.DissociatePath(path) -} - -// WatchList returns all paths explicitly added with [Watcher.Add] (and are not -// yet removed). -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) WatchList() []string { - if w.isClosed() { - return nil - } - - w.mu.Lock() - defer w.mu.Unlock() - - entries := make([]string, 0, len(w.watches)+len(w.dirs)) - for pathname := range w.dirs { - entries = append(entries, pathname) - } - for pathname := range w.watches { - entries = append(entries, pathname) - } - - return entries -} diff --git a/vendor/github.com/fsnotify/fsnotify/backend_inotify.go b/vendor/github.com/fsnotify/fsnotify/backend_inotify.go deleted file mode 100644 index 921c1c1..0000000 --- a/vendor/github.com/fsnotify/fsnotify/backend_inotify.go +++ /dev/null @@ -1,594 +0,0 @@ -//go:build linux && !appengine -// +build linux,!appengine - -// Note: the documentation on the Watcher type and methods is generated from -// mkdoc.zsh - -package fsnotify - -import ( - "errors" - "fmt" - "io" - "os" - "path/filepath" - "strings" - "sync" - "unsafe" - - "golang.org/x/sys/unix" -) - -// Watcher watches a set of paths, delivering events on a channel. -// -// A watcher should not be copied (e.g. pass it by pointer, rather than by -// value). -// -// # Linux notes -// -// When a file is removed a Remove event won't be emitted until all file -// descriptors are closed, and deletes will always emit a Chmod. For example: -// -// fp := os.Open("file") -// os.Remove("file") // Triggers Chmod -// fp.Close() // Triggers Remove -// -// This is the event that inotify sends, so not much can be changed about this. -// -// The fs.inotify.max_user_watches sysctl variable specifies the upper limit -// for the number of watches per user, and fs.inotify.max_user_instances -// specifies the maximum number of inotify instances per user. Every Watcher you -// create is an "instance", and every path you add is a "watch". -// -// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and -// /proc/sys/fs/inotify/max_user_instances -// -// To increase them you can use sysctl or write the value to the /proc file: -// -// # Default values on Linux 5.18 -// sysctl fs.inotify.max_user_watches=124983 -// sysctl fs.inotify.max_user_instances=128 -// -// To make the changes persist on reboot edit /etc/sysctl.conf or -// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check -// your distro's documentation): -// -// fs.inotify.max_user_watches=124983 -// fs.inotify.max_user_instances=128 -// -// Reaching the limit will result in a "no space left on device" or "too many open -// files" error. -// -// # kqueue notes (macOS, BSD) -// -// kqueue requires opening a file descriptor for every file that's being watched; -// so if you're watching a directory with five files then that's six file -// descriptors. You will run in to your system's "max open files" limit faster on -// these platforms. -// -// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to -// control the maximum number of open files, as well as /etc/login.conf on BSD -// systems. -// -// # Windows notes -// -// Paths can be added as "C:\path\to\dir", but forward slashes -// ("C:/path/to/dir") will also work. -// -// When a watched directory is removed it will always send an event for the -// directory itself, but may not send events for all files in that directory. -// Sometimes it will send events for all times, sometimes it will send no -// events, and often only for some files. -// -// The default ReadDirectoryChangesW() buffer size is 64K, which is the largest -// value that is guaranteed to work with SMB filesystems. If you have many -// events in quick succession this may not be enough, and you will have to use -// [WithBufferSize] to increase the value. -type Watcher struct { - // Events sends the filesystem change events. - // - // fsnotify can send the following events; a "path" here can refer to a - // file, directory, symbolic link, or special file like a FIFO. - // - // fsnotify.Create A new path was created; this may be followed by one - // or more Write events if data also gets written to a - // file. - // - // fsnotify.Remove A path was removed. - // - // fsnotify.Rename A path was renamed. A rename is always sent with the - // old path as Event.Name, and a Create event will be - // sent with the new name. Renames are only sent for - // paths that are currently watched; e.g. moving an - // unmonitored file into a monitored directory will - // show up as just a Create. Similarly, renaming a file - // to outside a monitored directory will show up as - // only a Rename. - // - // fsnotify.Write A file or named pipe was written to. A Truncate will - // also trigger a Write. A single "write action" - // initiated by the user may show up as one or multiple - // writes, depending on when the system syncs things to - // disk. For example when compiling a large Go program - // you may get hundreds of Write events, and you may - // want to wait until you've stopped receiving them - // (see the dedup example in cmd/fsnotify). - // - // Some systems may send Write event for directories - // when the directory content changes. - // - // fsnotify.Chmod Attributes were changed. On Linux this is also sent - // when a file is removed (or more accurately, when a - // link to an inode is removed). On kqueue it's sent - // when a file is truncated. On Windows it's never - // sent. - Events chan Event - - // Errors sends any errors. - // - // ErrEventOverflow is used to indicate there are too many events: - // - // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) - // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. - // - kqueue, fen: Not used. - Errors chan error - - // Store fd here as os.File.Read() will no longer return on close after - // calling Fd(). See: https://github.com/golang/go/issues/26439 - fd int - inotifyFile *os.File - watches *watches - done chan struct{} // Channel for sending a "quit message" to the reader goroutine - closeMu sync.Mutex - doneResp chan struct{} // Channel to respond to Close -} - -type ( - watches struct { - mu sync.RWMutex - wd map[uint32]*watch // wd → watch - path map[string]uint32 // pathname → wd - } - watch struct { - wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall) - flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags) - path string // Watch path. - } -) - -func newWatches() *watches { - return &watches{ - wd: make(map[uint32]*watch), - path: make(map[string]uint32), - } -} - -func (w *watches) len() int { - w.mu.RLock() - defer w.mu.RUnlock() - return len(w.wd) -} - -func (w *watches) add(ww *watch) { - w.mu.Lock() - defer w.mu.Unlock() - w.wd[ww.wd] = ww - w.path[ww.path] = ww.wd -} - -func (w *watches) remove(wd uint32) { - w.mu.Lock() - defer w.mu.Unlock() - delete(w.path, w.wd[wd].path) - delete(w.wd, wd) -} - -func (w *watches) removePath(path string) (uint32, bool) { - w.mu.Lock() - defer w.mu.Unlock() - - wd, ok := w.path[path] - if !ok { - return 0, false - } - - delete(w.path, path) - delete(w.wd, wd) - - return wd, true -} - -func (w *watches) byPath(path string) *watch { - w.mu.RLock() - defer w.mu.RUnlock() - return w.wd[w.path[path]] -} - -func (w *watches) byWd(wd uint32) *watch { - w.mu.RLock() - defer w.mu.RUnlock() - return w.wd[wd] -} - -func (w *watches) updatePath(path string, f func(*watch) (*watch, error)) error { - w.mu.Lock() - defer w.mu.Unlock() - - var existing *watch - wd, ok := w.path[path] - if ok { - existing = w.wd[wd] - } - - upd, err := f(existing) - if err != nil { - return err - } - if upd != nil { - w.wd[upd.wd] = upd - w.path[upd.path] = upd.wd - - if upd.wd != wd { - delete(w.wd, wd) - } - } - - return nil -} - -// NewWatcher creates a new Watcher. -func NewWatcher() (*Watcher, error) { - return NewBufferedWatcher(0) -} - -// NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events -// channel. -// -// The main use case for this is situations with a very large number of events -// where the kernel buffer size can't be increased (e.g. due to lack of -// permissions). An unbuffered Watcher will perform better for almost all use -// cases, and whenever possible you will be better off increasing the kernel -// buffers instead of adding a large userspace buffer. -func NewBufferedWatcher(sz uint) (*Watcher, error) { - // Need to set nonblocking mode for SetDeadline to work, otherwise blocking - // I/O operations won't terminate on close. - fd, errno := unix.InotifyInit1(unix.IN_CLOEXEC | unix.IN_NONBLOCK) - if fd == -1 { - return nil, errno - } - - w := &Watcher{ - fd: fd, - inotifyFile: os.NewFile(uintptr(fd), ""), - watches: newWatches(), - Events: make(chan Event, sz), - Errors: make(chan error), - done: make(chan struct{}), - doneResp: make(chan struct{}), - } - - go w.readEvents() - return w, nil -} - -// Returns true if the event was sent, or false if watcher is closed. -func (w *Watcher) sendEvent(e Event) bool { - select { - case w.Events <- e: - return true - case <-w.done: - return false - } -} - -// Returns true if the error was sent, or false if watcher is closed. -func (w *Watcher) sendError(err error) bool { - select { - case w.Errors <- err: - return true - case <-w.done: - return false - } -} - -func (w *Watcher) isClosed() bool { - select { - case <-w.done: - return true - default: - return false - } -} - -// Close removes all watches and closes the Events channel. -func (w *Watcher) Close() error { - w.closeMu.Lock() - if w.isClosed() { - w.closeMu.Unlock() - return nil - } - close(w.done) - w.closeMu.Unlock() - - // Causes any blocking reads to return with an error, provided the file - // still supports deadline operations. - err := w.inotifyFile.Close() - if err != nil { - return err - } - - // Wait for goroutine to close - <-w.doneResp - - return nil -} - -// Add starts monitoring the path for changes. -// -// A path can only be watched once; watching it more than once is a no-op and will -// not return an error. Paths that do not yet exist on the filesystem cannot be -// watched. -// -// A watch will be automatically removed if the watched path is deleted or -// renamed. The exception is the Windows backend, which doesn't remove the -// watcher on renames. -// -// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special -// filesystems (/proc, /sys, etc.) generally don't work. -// -// Returns [ErrClosed] if [Watcher.Close] was called. -// -// See [Watcher.AddWith] for a version that allows adding options. -// -// # Watching directories -// -// All files in a directory are monitored, including new files that are created -// after the watcher is started. Subdirectories are not watched (i.e. it's -// non-recursive). -// -// # Watching files -// -// Watching individual files (rather than directories) is generally not -// recommended as many programs (especially editors) update files atomically: it -// will write to a temporary file which is then moved to to destination, -// overwriting the original (or some variant thereof). The watcher on the -// original file is now lost, as that no longer exists. -// -// The upshot of this is that a power failure or crash won't leave a -// half-written file. -// -// Watch the parent directory and use Event.Name to filter out files you're not -// interested in. There is an example of this in cmd/fsnotify/file.go. -func (w *Watcher) Add(name string) error { return w.AddWith(name) } - -// AddWith is like [Watcher.Add], but allows adding options. When using Add() -// the defaults described below are used. -// -// Possible options are: -// -// - [WithBufferSize] sets the buffer size for the Windows backend; no-op on -// other platforms. The default is 64K (65536 bytes). -func (w *Watcher) AddWith(name string, opts ...addOpt) error { - if w.isClosed() { - return ErrClosed - } - - name = filepath.Clean(name) - _ = getOptions(opts...) - - var flags uint32 = unix.IN_MOVED_TO | unix.IN_MOVED_FROM | - unix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY | - unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF - - return w.watches.updatePath(name, func(existing *watch) (*watch, error) { - if existing != nil { - flags |= existing.flags | unix.IN_MASK_ADD - } - - wd, err := unix.InotifyAddWatch(w.fd, name, flags) - if wd == -1 { - return nil, err - } - - if existing == nil { - return &watch{ - wd: uint32(wd), - path: name, - flags: flags, - }, nil - } - - existing.wd = uint32(wd) - existing.flags = flags - return existing, nil - }) -} - -// Remove stops monitoring the path for changes. -// -// Directories are always removed non-recursively. For example, if you added -// /tmp/dir and /tmp/dir/subdir then you will need to remove both. -// -// Removing a path that has not yet been added returns [ErrNonExistentWatch]. -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) Remove(name string) error { - if w.isClosed() { - return nil - } - return w.remove(filepath.Clean(name)) -} - -func (w *Watcher) remove(name string) error { - wd, ok := w.watches.removePath(name) - if !ok { - return fmt.Errorf("%w: %s", ErrNonExistentWatch, name) - } - - success, errno := unix.InotifyRmWatch(w.fd, wd) - if success == -1 { - // TODO: Perhaps it's not helpful to return an error here in every case; - // The only two possible errors are: - // - // - EBADF, which happens when w.fd is not a valid file descriptor - // of any kind. - // - EINVAL, which is when fd is not an inotify descriptor or wd - // is not a valid watch descriptor. Watch descriptors are - // invalidated when they are removed explicitly or implicitly; - // explicitly by inotify_rm_watch, implicitly when the file they - // are watching is deleted. - return errno - } - return nil -} - -// WatchList returns all paths explicitly added with [Watcher.Add] (and are not -// yet removed). -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) WatchList() []string { - if w.isClosed() { - return nil - } - - entries := make([]string, 0, w.watches.len()) - w.watches.mu.RLock() - for pathname := range w.watches.path { - entries = append(entries, pathname) - } - w.watches.mu.RUnlock() - - return entries -} - -// readEvents reads from the inotify file descriptor, converts the -// received events into Event objects and sends them via the Events channel -func (w *Watcher) readEvents() { - defer func() { - close(w.doneResp) - close(w.Errors) - close(w.Events) - }() - - var ( - buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events - errno error // Syscall errno - ) - for { - // See if we have been closed. - if w.isClosed() { - return - } - - n, err := w.inotifyFile.Read(buf[:]) - switch { - case errors.Unwrap(err) == os.ErrClosed: - return - case err != nil: - if !w.sendError(err) { - return - } - continue - } - - if n < unix.SizeofInotifyEvent { - var err error - if n == 0 { - err = io.EOF // If EOF is received. This should really never happen. - } else if n < 0 { - err = errno // If an error occurred while reading. - } else { - err = errors.New("notify: short read in readEvents()") // Read was too short. - } - if !w.sendError(err) { - return - } - continue - } - - var offset uint32 - // We don't know how many events we just read into the buffer - // While the offset points to at least one whole event... - for offset <= uint32(n-unix.SizeofInotifyEvent) { - var ( - // Point "raw" to the event in the buffer - raw = (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset])) - mask = uint32(raw.Mask) - nameLen = uint32(raw.Len) - ) - - if mask&unix.IN_Q_OVERFLOW != 0 { - if !w.sendError(ErrEventOverflow) { - return - } - } - - // If the event happened to the watched directory or the watched file, the kernel - // doesn't append the filename to the event, but we would like to always fill the - // the "Name" field with a valid filename. We retrieve the path of the watch from - // the "paths" map. - watch := w.watches.byWd(uint32(raw.Wd)) - - // inotify will automatically remove the watch on deletes; just need - // to clean our state here. - if watch != nil && mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF { - w.watches.remove(watch.wd) - } - // We can't really update the state when a watched path is moved; - // only IN_MOVE_SELF is sent and not IN_MOVED_{FROM,TO}. So remove - // the watch. - if watch != nil && mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF { - err := w.remove(watch.path) - if err != nil && !errors.Is(err, ErrNonExistentWatch) { - if !w.sendError(err) { - return - } - } - } - - var name string - if watch != nil { - name = watch.path - } - if nameLen > 0 { - // Point "bytes" at the first byte of the filename - bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent]))[:nameLen:nameLen] - // The filename is padded with NULL bytes. TrimRight() gets rid of those. - name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000") - } - - event := w.newEvent(name, mask) - - // Send the events that are not ignored on the events channel - if mask&unix.IN_IGNORED == 0 { - if !w.sendEvent(event) { - return - } - } - - // Move to the next event in the buffer - offset += unix.SizeofInotifyEvent + nameLen - } - } -} - -// newEvent returns an platform-independent Event based on an inotify mask. -func (w *Watcher) newEvent(name string, mask uint32) Event { - e := Event{Name: name} - if mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO { - e.Op |= Create - } - if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF || mask&unix.IN_DELETE == unix.IN_DELETE { - e.Op |= Remove - } - if mask&unix.IN_MODIFY == unix.IN_MODIFY { - e.Op |= Write - } - if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM { - e.Op |= Rename - } - if mask&unix.IN_ATTRIB == unix.IN_ATTRIB { - e.Op |= Chmod - } - return e -} diff --git a/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go b/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go deleted file mode 100644 index 063a091..0000000 --- a/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go +++ /dev/null @@ -1,782 +0,0 @@ -//go:build freebsd || openbsd || netbsd || dragonfly || darwin -// +build freebsd openbsd netbsd dragonfly darwin - -// Note: the documentation on the Watcher type and methods is generated from -// mkdoc.zsh - -package fsnotify - -import ( - "errors" - "fmt" - "os" - "path/filepath" - "sync" - - "golang.org/x/sys/unix" -) - -// Watcher watches a set of paths, delivering events on a channel. -// -// A watcher should not be copied (e.g. pass it by pointer, rather than by -// value). -// -// # Linux notes -// -// When a file is removed a Remove event won't be emitted until all file -// descriptors are closed, and deletes will always emit a Chmod. For example: -// -// fp := os.Open("file") -// os.Remove("file") // Triggers Chmod -// fp.Close() // Triggers Remove -// -// This is the event that inotify sends, so not much can be changed about this. -// -// The fs.inotify.max_user_watches sysctl variable specifies the upper limit -// for the number of watches per user, and fs.inotify.max_user_instances -// specifies the maximum number of inotify instances per user. Every Watcher you -// create is an "instance", and every path you add is a "watch". -// -// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and -// /proc/sys/fs/inotify/max_user_instances -// -// To increase them you can use sysctl or write the value to the /proc file: -// -// # Default values on Linux 5.18 -// sysctl fs.inotify.max_user_watches=124983 -// sysctl fs.inotify.max_user_instances=128 -// -// To make the changes persist on reboot edit /etc/sysctl.conf or -// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check -// your distro's documentation): -// -// fs.inotify.max_user_watches=124983 -// fs.inotify.max_user_instances=128 -// -// Reaching the limit will result in a "no space left on device" or "too many open -// files" error. -// -// # kqueue notes (macOS, BSD) -// -// kqueue requires opening a file descriptor for every file that's being watched; -// so if you're watching a directory with five files then that's six file -// descriptors. You will run in to your system's "max open files" limit faster on -// these platforms. -// -// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to -// control the maximum number of open files, as well as /etc/login.conf on BSD -// systems. -// -// # Windows notes -// -// Paths can be added as "C:\path\to\dir", but forward slashes -// ("C:/path/to/dir") will also work. -// -// When a watched directory is removed it will always send an event for the -// directory itself, but may not send events for all files in that directory. -// Sometimes it will send events for all times, sometimes it will send no -// events, and often only for some files. -// -// The default ReadDirectoryChangesW() buffer size is 64K, which is the largest -// value that is guaranteed to work with SMB filesystems. If you have many -// events in quick succession this may not be enough, and you will have to use -// [WithBufferSize] to increase the value. -type Watcher struct { - // Events sends the filesystem change events. - // - // fsnotify can send the following events; a "path" here can refer to a - // file, directory, symbolic link, or special file like a FIFO. - // - // fsnotify.Create A new path was created; this may be followed by one - // or more Write events if data also gets written to a - // file. - // - // fsnotify.Remove A path was removed. - // - // fsnotify.Rename A path was renamed. A rename is always sent with the - // old path as Event.Name, and a Create event will be - // sent with the new name. Renames are only sent for - // paths that are currently watched; e.g. moving an - // unmonitored file into a monitored directory will - // show up as just a Create. Similarly, renaming a file - // to outside a monitored directory will show up as - // only a Rename. - // - // fsnotify.Write A file or named pipe was written to. A Truncate will - // also trigger a Write. A single "write action" - // initiated by the user may show up as one or multiple - // writes, depending on when the system syncs things to - // disk. For example when compiling a large Go program - // you may get hundreds of Write events, and you may - // want to wait until you've stopped receiving them - // (see the dedup example in cmd/fsnotify). - // - // Some systems may send Write event for directories - // when the directory content changes. - // - // fsnotify.Chmod Attributes were changed. On Linux this is also sent - // when a file is removed (or more accurately, when a - // link to an inode is removed). On kqueue it's sent - // when a file is truncated. On Windows it's never - // sent. - Events chan Event - - // Errors sends any errors. - // - // ErrEventOverflow is used to indicate there are too many events: - // - // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) - // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. - // - kqueue, fen: Not used. - Errors chan error - - done chan struct{} - kq int // File descriptor (as returned by the kqueue() syscall). - closepipe [2]int // Pipe used for closing. - mu sync.Mutex // Protects access to watcher data - watches map[string]int // Watched file descriptors (key: path). - watchesByDir map[string]map[int]struct{} // Watched file descriptors indexed by the parent directory (key: dirname(path)). - userWatches map[string]struct{} // Watches added with Watcher.Add() - dirFlags map[string]uint32 // Watched directories to fflags used in kqueue. - paths map[int]pathInfo // File descriptors to path names for processing kqueue events. - fileExists map[string]struct{} // Keep track of if we know this file exists (to stop duplicate create events). - isClosed bool // Set to true when Close() is first called -} - -type pathInfo struct { - name string - isDir bool -} - -// NewWatcher creates a new Watcher. -func NewWatcher() (*Watcher, error) { - return NewBufferedWatcher(0) -} - -// NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events -// channel. -// -// The main use case for this is situations with a very large number of events -// where the kernel buffer size can't be increased (e.g. due to lack of -// permissions). An unbuffered Watcher will perform better for almost all use -// cases, and whenever possible you will be better off increasing the kernel -// buffers instead of adding a large userspace buffer. -func NewBufferedWatcher(sz uint) (*Watcher, error) { - kq, closepipe, err := newKqueue() - if err != nil { - return nil, err - } - - w := &Watcher{ - kq: kq, - closepipe: closepipe, - watches: make(map[string]int), - watchesByDir: make(map[string]map[int]struct{}), - dirFlags: make(map[string]uint32), - paths: make(map[int]pathInfo), - fileExists: make(map[string]struct{}), - userWatches: make(map[string]struct{}), - Events: make(chan Event, sz), - Errors: make(chan error), - done: make(chan struct{}), - } - - go w.readEvents() - return w, nil -} - -// newKqueue creates a new kernel event queue and returns a descriptor. -// -// This registers a new event on closepipe, which will trigger an event when -// it's closed. This way we can use kevent() without timeout/polling; without -// the closepipe, it would block forever and we wouldn't be able to stop it at -// all. -func newKqueue() (kq int, closepipe [2]int, err error) { - kq, err = unix.Kqueue() - if kq == -1 { - return kq, closepipe, err - } - - // Register the close pipe. - err = unix.Pipe(closepipe[:]) - if err != nil { - unix.Close(kq) - return kq, closepipe, err - } - - // Register changes to listen on the closepipe. - changes := make([]unix.Kevent_t, 1) - // SetKevent converts int to the platform-specific types. - unix.SetKevent(&changes[0], closepipe[0], unix.EVFILT_READ, - unix.EV_ADD|unix.EV_ENABLE|unix.EV_ONESHOT) - - ok, err := unix.Kevent(kq, changes, nil, nil) - if ok == -1 { - unix.Close(kq) - unix.Close(closepipe[0]) - unix.Close(closepipe[1]) - return kq, closepipe, err - } - return kq, closepipe, nil -} - -// Returns true if the event was sent, or false if watcher is closed. -func (w *Watcher) sendEvent(e Event) bool { - select { - case w.Events <- e: - return true - case <-w.done: - return false - } -} - -// Returns true if the error was sent, or false if watcher is closed. -func (w *Watcher) sendError(err error) bool { - select { - case w.Errors <- err: - return true - case <-w.done: - return false - } -} - -// Close removes all watches and closes the Events channel. -func (w *Watcher) Close() error { - w.mu.Lock() - if w.isClosed { - w.mu.Unlock() - return nil - } - w.isClosed = true - - // copy paths to remove while locked - pathsToRemove := make([]string, 0, len(w.watches)) - for name := range w.watches { - pathsToRemove = append(pathsToRemove, name) - } - w.mu.Unlock() // Unlock before calling Remove, which also locks - for _, name := range pathsToRemove { - w.Remove(name) - } - - // Send "quit" message to the reader goroutine. - unix.Close(w.closepipe[1]) - close(w.done) - - return nil -} - -// Add starts monitoring the path for changes. -// -// A path can only be watched once; watching it more than once is a no-op and will -// not return an error. Paths that do not yet exist on the filesystem cannot be -// watched. -// -// A watch will be automatically removed if the watched path is deleted or -// renamed. The exception is the Windows backend, which doesn't remove the -// watcher on renames. -// -// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special -// filesystems (/proc, /sys, etc.) generally don't work. -// -// Returns [ErrClosed] if [Watcher.Close] was called. -// -// See [Watcher.AddWith] for a version that allows adding options. -// -// # Watching directories -// -// All files in a directory are monitored, including new files that are created -// after the watcher is started. Subdirectories are not watched (i.e. it's -// non-recursive). -// -// # Watching files -// -// Watching individual files (rather than directories) is generally not -// recommended as many programs (especially editors) update files atomically: it -// will write to a temporary file which is then moved to to destination, -// overwriting the original (or some variant thereof). The watcher on the -// original file is now lost, as that no longer exists. -// -// The upshot of this is that a power failure or crash won't leave a -// half-written file. -// -// Watch the parent directory and use Event.Name to filter out files you're not -// interested in. There is an example of this in cmd/fsnotify/file.go. -func (w *Watcher) Add(name string) error { return w.AddWith(name) } - -// AddWith is like [Watcher.Add], but allows adding options. When using Add() -// the defaults described below are used. -// -// Possible options are: -// -// - [WithBufferSize] sets the buffer size for the Windows backend; no-op on -// other platforms. The default is 64K (65536 bytes). -func (w *Watcher) AddWith(name string, opts ...addOpt) error { - _ = getOptions(opts...) - - w.mu.Lock() - w.userWatches[name] = struct{}{} - w.mu.Unlock() - _, err := w.addWatch(name, noteAllEvents) - return err -} - -// Remove stops monitoring the path for changes. -// -// Directories are always removed non-recursively. For example, if you added -// /tmp/dir and /tmp/dir/subdir then you will need to remove both. -// -// Removing a path that has not yet been added returns [ErrNonExistentWatch]. -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) Remove(name string) error { - return w.remove(name, true) -} - -func (w *Watcher) remove(name string, unwatchFiles bool) error { - name = filepath.Clean(name) - w.mu.Lock() - if w.isClosed { - w.mu.Unlock() - return nil - } - watchfd, ok := w.watches[name] - w.mu.Unlock() - if !ok { - return fmt.Errorf("%w: %s", ErrNonExistentWatch, name) - } - - err := w.register([]int{watchfd}, unix.EV_DELETE, 0) - if err != nil { - return err - } - - unix.Close(watchfd) - - w.mu.Lock() - isDir := w.paths[watchfd].isDir - delete(w.watches, name) - delete(w.userWatches, name) - - parentName := filepath.Dir(name) - delete(w.watchesByDir[parentName], watchfd) - - if len(w.watchesByDir[parentName]) == 0 { - delete(w.watchesByDir, parentName) - } - - delete(w.paths, watchfd) - delete(w.dirFlags, name) - delete(w.fileExists, name) - w.mu.Unlock() - - // Find all watched paths that are in this directory that are not external. - if unwatchFiles && isDir { - var pathsToRemove []string - w.mu.Lock() - for fd := range w.watchesByDir[name] { - path := w.paths[fd] - if _, ok := w.userWatches[path.name]; !ok { - pathsToRemove = append(pathsToRemove, path.name) - } - } - w.mu.Unlock() - for _, name := range pathsToRemove { - // Since these are internal, not much sense in propagating error to - // the user, as that will just confuse them with an error about a - // path they did not explicitly watch themselves. - w.Remove(name) - } - } - return nil -} - -// WatchList returns all paths explicitly added with [Watcher.Add] (and are not -// yet removed). -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) WatchList() []string { - w.mu.Lock() - defer w.mu.Unlock() - if w.isClosed { - return nil - } - - entries := make([]string, 0, len(w.userWatches)) - for pathname := range w.userWatches { - entries = append(entries, pathname) - } - - return entries -} - -// Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE) -const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME - -// addWatch adds name to the watched file set; the flags are interpreted as -// described in kevent(2). -// -// Returns the real path to the file which was added, with symlinks resolved. -func (w *Watcher) addWatch(name string, flags uint32) (string, error) { - var isDir bool - name = filepath.Clean(name) - - w.mu.Lock() - if w.isClosed { - w.mu.Unlock() - return "", ErrClosed - } - watchfd, alreadyWatching := w.watches[name] - // We already have a watch, but we can still override flags. - if alreadyWatching { - isDir = w.paths[watchfd].isDir - } - w.mu.Unlock() - - if !alreadyWatching { - fi, err := os.Lstat(name) - if err != nil { - return "", err - } - - // Don't watch sockets or named pipes - if (fi.Mode()&os.ModeSocket == os.ModeSocket) || (fi.Mode()&os.ModeNamedPipe == os.ModeNamedPipe) { - return "", nil - } - - // Follow Symlinks. - if fi.Mode()&os.ModeSymlink == os.ModeSymlink { - link, err := os.Readlink(name) - if err != nil { - // Return nil because Linux can add unresolvable symlinks to the - // watch list without problems, so maintain consistency with - // that. There will be no file events for broken symlinks. - // TODO: more specific check; returns os.PathError; ENOENT? - return "", nil - } - - w.mu.Lock() - _, alreadyWatching = w.watches[link] - w.mu.Unlock() - - if alreadyWatching { - // Add to watches so we don't get spurious Create events later - // on when we diff the directories. - w.watches[name] = 0 - w.fileExists[name] = struct{}{} - return link, nil - } - - name = link - fi, err = os.Lstat(name) - if err != nil { - return "", nil - } - } - - // Retry on EINTR; open() can return EINTR in practice on macOS. - // See #354, and Go issues 11180 and 39237. - for { - watchfd, err = unix.Open(name, openMode, 0) - if err == nil { - break - } - if errors.Is(err, unix.EINTR) { - continue - } - - return "", err - } - - isDir = fi.IsDir() - } - - err := w.register([]int{watchfd}, unix.EV_ADD|unix.EV_CLEAR|unix.EV_ENABLE, flags) - if err != nil { - unix.Close(watchfd) - return "", err - } - - if !alreadyWatching { - w.mu.Lock() - parentName := filepath.Dir(name) - w.watches[name] = watchfd - - watchesByDir, ok := w.watchesByDir[parentName] - if !ok { - watchesByDir = make(map[int]struct{}, 1) - w.watchesByDir[parentName] = watchesByDir - } - watchesByDir[watchfd] = struct{}{} - w.paths[watchfd] = pathInfo{name: name, isDir: isDir} - w.mu.Unlock() - } - - if isDir { - // Watch the directory if it has not been watched before, or if it was - // watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles) - w.mu.Lock() - - watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE && - (!alreadyWatching || (w.dirFlags[name]&unix.NOTE_WRITE) != unix.NOTE_WRITE) - // Store flags so this watch can be updated later - w.dirFlags[name] = flags - w.mu.Unlock() - - if watchDir { - if err := w.watchDirectoryFiles(name); err != nil { - return "", err - } - } - } - return name, nil -} - -// readEvents reads from kqueue and converts the received kevents into -// Event values that it sends down the Events channel. -func (w *Watcher) readEvents() { - defer func() { - close(w.Events) - close(w.Errors) - _ = unix.Close(w.kq) - unix.Close(w.closepipe[0]) - }() - - eventBuffer := make([]unix.Kevent_t, 10) - for closed := false; !closed; { - kevents, err := w.read(eventBuffer) - // EINTR is okay, the syscall was interrupted before timeout expired. - if err != nil && err != unix.EINTR { - if !w.sendError(fmt.Errorf("fsnotify.readEvents: %w", err)) { - closed = true - } - continue - } - - // Flush the events we received to the Events channel - for _, kevent := range kevents { - var ( - watchfd = int(kevent.Ident) - mask = uint32(kevent.Fflags) - ) - - // Shut down the loop when the pipe is closed, but only after all - // other events have been processed. - if watchfd == w.closepipe[0] { - closed = true - continue - } - - w.mu.Lock() - path := w.paths[watchfd] - w.mu.Unlock() - - event := w.newEvent(path.name, mask) - - if event.Has(Rename) || event.Has(Remove) { - w.remove(event.Name, false) - w.mu.Lock() - delete(w.fileExists, event.Name) - w.mu.Unlock() - } - - if path.isDir && event.Has(Write) && !event.Has(Remove) { - w.sendDirectoryChangeEvents(event.Name) - } else { - if !w.sendEvent(event) { - closed = true - continue - } - } - - if event.Has(Remove) { - // Look for a file that may have overwritten this; for example, - // mv f1 f2 will delete f2, then create f2. - if path.isDir { - fileDir := filepath.Clean(event.Name) - w.mu.Lock() - _, found := w.watches[fileDir] - w.mu.Unlock() - if found { - err := w.sendDirectoryChangeEvents(fileDir) - if err != nil { - if !w.sendError(err) { - closed = true - } - } - } - } else { - filePath := filepath.Clean(event.Name) - if fi, err := os.Lstat(filePath); err == nil { - err := w.sendFileCreatedEventIfNew(filePath, fi) - if err != nil { - if !w.sendError(err) { - closed = true - } - } - } - } - } - } - } -} - -// newEvent returns an platform-independent Event based on kqueue Fflags. -func (w *Watcher) newEvent(name string, mask uint32) Event { - e := Event{Name: name} - if mask&unix.NOTE_DELETE == unix.NOTE_DELETE { - e.Op |= Remove - } - if mask&unix.NOTE_WRITE == unix.NOTE_WRITE { - e.Op |= Write - } - if mask&unix.NOTE_RENAME == unix.NOTE_RENAME { - e.Op |= Rename - } - if mask&unix.NOTE_ATTRIB == unix.NOTE_ATTRIB { - e.Op |= Chmod - } - // No point sending a write and delete event at the same time: if it's gone, - // then it's gone. - if e.Op.Has(Write) && e.Op.Has(Remove) { - e.Op &^= Write - } - return e -} - -// watchDirectoryFiles to mimic inotify when adding a watch on a directory -func (w *Watcher) watchDirectoryFiles(dirPath string) error { - // Get all files - files, err := os.ReadDir(dirPath) - if err != nil { - return err - } - - for _, f := range files { - path := filepath.Join(dirPath, f.Name()) - - fi, err := f.Info() - if err != nil { - return fmt.Errorf("%q: %w", path, err) - } - - cleanPath, err := w.internalWatch(path, fi) - if err != nil { - // No permission to read the file; that's not a problem: just skip. - // But do add it to w.fileExists to prevent it from being picked up - // as a "new" file later (it still shows up in the directory - // listing). - switch { - case errors.Is(err, unix.EACCES) || errors.Is(err, unix.EPERM): - cleanPath = filepath.Clean(path) - default: - return fmt.Errorf("%q: %w", path, err) - } - } - - w.mu.Lock() - w.fileExists[cleanPath] = struct{}{} - w.mu.Unlock() - } - - return nil -} - -// Search the directory for new files and send an event for them. -// -// This functionality is to have the BSD watcher match the inotify, which sends -// a create event for files created in a watched directory. -func (w *Watcher) sendDirectoryChangeEvents(dir string) error { - files, err := os.ReadDir(dir) - if err != nil { - // Directory no longer exists: we can ignore this safely. kqueue will - // still give us the correct events. - if errors.Is(err, os.ErrNotExist) { - return nil - } - return fmt.Errorf("fsnotify.sendDirectoryChangeEvents: %w", err) - } - - for _, f := range files { - fi, err := f.Info() - if err != nil { - return fmt.Errorf("fsnotify.sendDirectoryChangeEvents: %w", err) - } - - err = w.sendFileCreatedEventIfNew(filepath.Join(dir, fi.Name()), fi) - if err != nil { - // Don't need to send an error if this file isn't readable. - if errors.Is(err, unix.EACCES) || errors.Is(err, unix.EPERM) { - return nil - } - return fmt.Errorf("fsnotify.sendDirectoryChangeEvents: %w", err) - } - } - return nil -} - -// sendFileCreatedEvent sends a create event if the file isn't already being tracked. -func (w *Watcher) sendFileCreatedEventIfNew(filePath string, fi os.FileInfo) (err error) { - w.mu.Lock() - _, doesExist := w.fileExists[filePath] - w.mu.Unlock() - if !doesExist { - if !w.sendEvent(Event{Name: filePath, Op: Create}) { - return - } - } - - // like watchDirectoryFiles (but without doing another ReadDir) - filePath, err = w.internalWatch(filePath, fi) - if err != nil { - return err - } - - w.mu.Lock() - w.fileExists[filePath] = struct{}{} - w.mu.Unlock() - - return nil -} - -func (w *Watcher) internalWatch(name string, fi os.FileInfo) (string, error) { - if fi.IsDir() { - // mimic Linux providing delete events for subdirectories, but preserve - // the flags used if currently watching subdirectory - w.mu.Lock() - flags := w.dirFlags[name] - w.mu.Unlock() - - flags |= unix.NOTE_DELETE | unix.NOTE_RENAME - return w.addWatch(name, flags) - } - - // watch file to mimic Linux inotify - return w.addWatch(name, noteAllEvents) -} - -// Register events with the queue. -func (w *Watcher) register(fds []int, flags int, fflags uint32) error { - changes := make([]unix.Kevent_t, len(fds)) - for i, fd := range fds { - // SetKevent converts int to the platform-specific types. - unix.SetKevent(&changes[i], fd, unix.EVFILT_VNODE, flags) - changes[i].Fflags = fflags - } - - // Register the events. - success, err := unix.Kevent(w.kq, changes, nil, nil) - if success == -1 { - return err - } - return nil -} - -// read retrieves pending events, or waits until an event occurs. -func (w *Watcher) read(events []unix.Kevent_t) ([]unix.Kevent_t, error) { - n, err := unix.Kevent(w.kq, nil, events, nil) - if err != nil { - return nil, err - } - return events[0:n], nil -} diff --git a/vendor/github.com/fsnotify/fsnotify/backend_other.go b/vendor/github.com/fsnotify/fsnotify/backend_other.go deleted file mode 100644 index d34a23c..0000000 --- a/vendor/github.com/fsnotify/fsnotify/backend_other.go +++ /dev/null @@ -1,205 +0,0 @@ -//go:build appengine || (!darwin && !dragonfly && !freebsd && !openbsd && !linux && !netbsd && !solaris && !windows) -// +build appengine !darwin,!dragonfly,!freebsd,!openbsd,!linux,!netbsd,!solaris,!windows - -// Note: the documentation on the Watcher type and methods is generated from -// mkdoc.zsh - -package fsnotify - -import "errors" - -// Watcher watches a set of paths, delivering events on a channel. -// -// A watcher should not be copied (e.g. pass it by pointer, rather than by -// value). -// -// # Linux notes -// -// When a file is removed a Remove event won't be emitted until all file -// descriptors are closed, and deletes will always emit a Chmod. For example: -// -// fp := os.Open("file") -// os.Remove("file") // Triggers Chmod -// fp.Close() // Triggers Remove -// -// This is the event that inotify sends, so not much can be changed about this. -// -// The fs.inotify.max_user_watches sysctl variable specifies the upper limit -// for the number of watches per user, and fs.inotify.max_user_instances -// specifies the maximum number of inotify instances per user. Every Watcher you -// create is an "instance", and every path you add is a "watch". -// -// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and -// /proc/sys/fs/inotify/max_user_instances -// -// To increase them you can use sysctl or write the value to the /proc file: -// -// # Default values on Linux 5.18 -// sysctl fs.inotify.max_user_watches=124983 -// sysctl fs.inotify.max_user_instances=128 -// -// To make the changes persist on reboot edit /etc/sysctl.conf or -// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check -// your distro's documentation): -// -// fs.inotify.max_user_watches=124983 -// fs.inotify.max_user_instances=128 -// -// Reaching the limit will result in a "no space left on device" or "too many open -// files" error. -// -// # kqueue notes (macOS, BSD) -// -// kqueue requires opening a file descriptor for every file that's being watched; -// so if you're watching a directory with five files then that's six file -// descriptors. You will run in to your system's "max open files" limit faster on -// these platforms. -// -// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to -// control the maximum number of open files, as well as /etc/login.conf on BSD -// systems. -// -// # Windows notes -// -// Paths can be added as "C:\path\to\dir", but forward slashes -// ("C:/path/to/dir") will also work. -// -// When a watched directory is removed it will always send an event for the -// directory itself, but may not send events for all files in that directory. -// Sometimes it will send events for all times, sometimes it will send no -// events, and often only for some files. -// -// The default ReadDirectoryChangesW() buffer size is 64K, which is the largest -// value that is guaranteed to work with SMB filesystems. If you have many -// events in quick succession this may not be enough, and you will have to use -// [WithBufferSize] to increase the value. -type Watcher struct { - // Events sends the filesystem change events. - // - // fsnotify can send the following events; a "path" here can refer to a - // file, directory, symbolic link, or special file like a FIFO. - // - // fsnotify.Create A new path was created; this may be followed by one - // or more Write events if data also gets written to a - // file. - // - // fsnotify.Remove A path was removed. - // - // fsnotify.Rename A path was renamed. A rename is always sent with the - // old path as Event.Name, and a Create event will be - // sent with the new name. Renames are only sent for - // paths that are currently watched; e.g. moving an - // unmonitored file into a monitored directory will - // show up as just a Create. Similarly, renaming a file - // to outside a monitored directory will show up as - // only a Rename. - // - // fsnotify.Write A file or named pipe was written to. A Truncate will - // also trigger a Write. A single "write action" - // initiated by the user may show up as one or multiple - // writes, depending on when the system syncs things to - // disk. For example when compiling a large Go program - // you may get hundreds of Write events, and you may - // want to wait until you've stopped receiving them - // (see the dedup example in cmd/fsnotify). - // - // Some systems may send Write event for directories - // when the directory content changes. - // - // fsnotify.Chmod Attributes were changed. On Linux this is also sent - // when a file is removed (or more accurately, when a - // link to an inode is removed). On kqueue it's sent - // when a file is truncated. On Windows it's never - // sent. - Events chan Event - - // Errors sends any errors. - // - // ErrEventOverflow is used to indicate there are too many events: - // - // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) - // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. - // - kqueue, fen: Not used. - Errors chan error -} - -// NewWatcher creates a new Watcher. -func NewWatcher() (*Watcher, error) { - return nil, errors.New("fsnotify not supported on the current platform") -} - -// NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events -// channel. -// -// The main use case for this is situations with a very large number of events -// where the kernel buffer size can't be increased (e.g. due to lack of -// permissions). An unbuffered Watcher will perform better for almost all use -// cases, and whenever possible you will be better off increasing the kernel -// buffers instead of adding a large userspace buffer. -func NewBufferedWatcher(sz uint) (*Watcher, error) { return NewWatcher() } - -// Close removes all watches and closes the Events channel. -func (w *Watcher) Close() error { return nil } - -// WatchList returns all paths explicitly added with [Watcher.Add] (and are not -// yet removed). -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) WatchList() []string { return nil } - -// Add starts monitoring the path for changes. -// -// A path can only be watched once; watching it more than once is a no-op and will -// not return an error. Paths that do not yet exist on the filesystem cannot be -// watched. -// -// A watch will be automatically removed if the watched path is deleted or -// renamed. The exception is the Windows backend, which doesn't remove the -// watcher on renames. -// -// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special -// filesystems (/proc, /sys, etc.) generally don't work. -// -// Returns [ErrClosed] if [Watcher.Close] was called. -// -// See [Watcher.AddWith] for a version that allows adding options. -// -// # Watching directories -// -// All files in a directory are monitored, including new files that are created -// after the watcher is started. Subdirectories are not watched (i.e. it's -// non-recursive). -// -// # Watching files -// -// Watching individual files (rather than directories) is generally not -// recommended as many programs (especially editors) update files atomically: it -// will write to a temporary file which is then moved to to destination, -// overwriting the original (or some variant thereof). The watcher on the -// original file is now lost, as that no longer exists. -// -// The upshot of this is that a power failure or crash won't leave a -// half-written file. -// -// Watch the parent directory and use Event.Name to filter out files you're not -// interested in. There is an example of this in cmd/fsnotify/file.go. -func (w *Watcher) Add(name string) error { return nil } - -// AddWith is like [Watcher.Add], but allows adding options. When using Add() -// the defaults described below are used. -// -// Possible options are: -// -// - [WithBufferSize] sets the buffer size for the Windows backend; no-op on -// other platforms. The default is 64K (65536 bytes). -func (w *Watcher) AddWith(name string, opts ...addOpt) error { return nil } - -// Remove stops monitoring the path for changes. -// -// Directories are always removed non-recursively. For example, if you added -// /tmp/dir and /tmp/dir/subdir then you will need to remove both. -// -// Removing a path that has not yet been added returns [ErrNonExistentWatch]. -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) Remove(name string) error { return nil } diff --git a/vendor/github.com/fsnotify/fsnotify/backend_windows.go b/vendor/github.com/fsnotify/fsnotify/backend_windows.go deleted file mode 100644 index 9bc91e5..0000000 --- a/vendor/github.com/fsnotify/fsnotify/backend_windows.go +++ /dev/null @@ -1,827 +0,0 @@ -//go:build windows -// +build windows - -// Windows backend based on ReadDirectoryChangesW() -// -// https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-readdirectorychangesw -// -// Note: the documentation on the Watcher type and methods is generated from -// mkdoc.zsh - -package fsnotify - -import ( - "errors" - "fmt" - "os" - "path/filepath" - "reflect" - "runtime" - "strings" - "sync" - "unsafe" - - "golang.org/x/sys/windows" -) - -// Watcher watches a set of paths, delivering events on a channel. -// -// A watcher should not be copied (e.g. pass it by pointer, rather than by -// value). -// -// # Linux notes -// -// When a file is removed a Remove event won't be emitted until all file -// descriptors are closed, and deletes will always emit a Chmod. For example: -// -// fp := os.Open("file") -// os.Remove("file") // Triggers Chmod -// fp.Close() // Triggers Remove -// -// This is the event that inotify sends, so not much can be changed about this. -// -// The fs.inotify.max_user_watches sysctl variable specifies the upper limit -// for the number of watches per user, and fs.inotify.max_user_instances -// specifies the maximum number of inotify instances per user. Every Watcher you -// create is an "instance", and every path you add is a "watch". -// -// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and -// /proc/sys/fs/inotify/max_user_instances -// -// To increase them you can use sysctl or write the value to the /proc file: -// -// # Default values on Linux 5.18 -// sysctl fs.inotify.max_user_watches=124983 -// sysctl fs.inotify.max_user_instances=128 -// -// To make the changes persist on reboot edit /etc/sysctl.conf or -// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check -// your distro's documentation): -// -// fs.inotify.max_user_watches=124983 -// fs.inotify.max_user_instances=128 -// -// Reaching the limit will result in a "no space left on device" or "too many open -// files" error. -// -// # kqueue notes (macOS, BSD) -// -// kqueue requires opening a file descriptor for every file that's being watched; -// so if you're watching a directory with five files then that's six file -// descriptors. You will run in to your system's "max open files" limit faster on -// these platforms. -// -// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to -// control the maximum number of open files, as well as /etc/login.conf on BSD -// systems. -// -// # Windows notes -// -// Paths can be added as "C:\path\to\dir", but forward slashes -// ("C:/path/to/dir") will also work. -// -// When a watched directory is removed it will always send an event for the -// directory itself, but may not send events for all files in that directory. -// Sometimes it will send events for all times, sometimes it will send no -// events, and often only for some files. -// -// The default ReadDirectoryChangesW() buffer size is 64K, which is the largest -// value that is guaranteed to work with SMB filesystems. If you have many -// events in quick succession this may not be enough, and you will have to use -// [WithBufferSize] to increase the value. -type Watcher struct { - // Events sends the filesystem change events. - // - // fsnotify can send the following events; a "path" here can refer to a - // file, directory, symbolic link, or special file like a FIFO. - // - // fsnotify.Create A new path was created; this may be followed by one - // or more Write events if data also gets written to a - // file. - // - // fsnotify.Remove A path was removed. - // - // fsnotify.Rename A path was renamed. A rename is always sent with the - // old path as Event.Name, and a Create event will be - // sent with the new name. Renames are only sent for - // paths that are currently watched; e.g. moving an - // unmonitored file into a monitored directory will - // show up as just a Create. Similarly, renaming a file - // to outside a monitored directory will show up as - // only a Rename. - // - // fsnotify.Write A file or named pipe was written to. A Truncate will - // also trigger a Write. A single "write action" - // initiated by the user may show up as one or multiple - // writes, depending on when the system syncs things to - // disk. For example when compiling a large Go program - // you may get hundreds of Write events, and you may - // want to wait until you've stopped receiving them - // (see the dedup example in cmd/fsnotify). - // - // Some systems may send Write event for directories - // when the directory content changes. - // - // fsnotify.Chmod Attributes were changed. On Linux this is also sent - // when a file is removed (or more accurately, when a - // link to an inode is removed). On kqueue it's sent - // when a file is truncated. On Windows it's never - // sent. - Events chan Event - - // Errors sends any errors. - // - // ErrEventOverflow is used to indicate there are too many events: - // - // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) - // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. - // - kqueue, fen: Not used. - Errors chan error - - port windows.Handle // Handle to completion port - input chan *input // Inputs to the reader are sent on this channel - quit chan chan<- error - - mu sync.Mutex // Protects access to watches, closed - watches watchMap // Map of watches (key: i-number) - closed bool // Set to true when Close() is first called -} - -// NewWatcher creates a new Watcher. -func NewWatcher() (*Watcher, error) { - return NewBufferedWatcher(50) -} - -// NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events -// channel. -// -// The main use case for this is situations with a very large number of events -// where the kernel buffer size can't be increased (e.g. due to lack of -// permissions). An unbuffered Watcher will perform better for almost all use -// cases, and whenever possible you will be better off increasing the kernel -// buffers instead of adding a large userspace buffer. -func NewBufferedWatcher(sz uint) (*Watcher, error) { - port, err := windows.CreateIoCompletionPort(windows.InvalidHandle, 0, 0, 0) - if err != nil { - return nil, os.NewSyscallError("CreateIoCompletionPort", err) - } - w := &Watcher{ - port: port, - watches: make(watchMap), - input: make(chan *input, 1), - Events: make(chan Event, sz), - Errors: make(chan error), - quit: make(chan chan<- error, 1), - } - go w.readEvents() - return w, nil -} - -func (w *Watcher) isClosed() bool { - w.mu.Lock() - defer w.mu.Unlock() - return w.closed -} - -func (w *Watcher) sendEvent(name string, mask uint64) bool { - if mask == 0 { - return false - } - - event := w.newEvent(name, uint32(mask)) - select { - case ch := <-w.quit: - w.quit <- ch - case w.Events <- event: - } - return true -} - -// Returns true if the error was sent, or false if watcher is closed. -func (w *Watcher) sendError(err error) bool { - select { - case w.Errors <- err: - return true - case <-w.quit: - } - return false -} - -// Close removes all watches and closes the Events channel. -func (w *Watcher) Close() error { - if w.isClosed() { - return nil - } - - w.mu.Lock() - w.closed = true - w.mu.Unlock() - - // Send "quit" message to the reader goroutine - ch := make(chan error) - w.quit <- ch - if err := w.wakeupReader(); err != nil { - return err - } - return <-ch -} - -// Add starts monitoring the path for changes. -// -// A path can only be watched once; watching it more than once is a no-op and will -// not return an error. Paths that do not yet exist on the filesystem cannot be -// watched. -// -// A watch will be automatically removed if the watched path is deleted or -// renamed. The exception is the Windows backend, which doesn't remove the -// watcher on renames. -// -// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special -// filesystems (/proc, /sys, etc.) generally don't work. -// -// Returns [ErrClosed] if [Watcher.Close] was called. -// -// See [Watcher.AddWith] for a version that allows adding options. -// -// # Watching directories -// -// All files in a directory are monitored, including new files that are created -// after the watcher is started. Subdirectories are not watched (i.e. it's -// non-recursive). -// -// # Watching files -// -// Watching individual files (rather than directories) is generally not -// recommended as many programs (especially editors) update files atomically: it -// will write to a temporary file which is then moved to to destination, -// overwriting the original (or some variant thereof). The watcher on the -// original file is now lost, as that no longer exists. -// -// The upshot of this is that a power failure or crash won't leave a -// half-written file. -// -// Watch the parent directory and use Event.Name to filter out files you're not -// interested in. There is an example of this in cmd/fsnotify/file.go. -func (w *Watcher) Add(name string) error { return w.AddWith(name) } - -// AddWith is like [Watcher.Add], but allows adding options. When using Add() -// the defaults described below are used. -// -// Possible options are: -// -// - [WithBufferSize] sets the buffer size for the Windows backend; no-op on -// other platforms. The default is 64K (65536 bytes). -func (w *Watcher) AddWith(name string, opts ...addOpt) error { - if w.isClosed() { - return ErrClosed - } - - with := getOptions(opts...) - if with.bufsize < 4096 { - return fmt.Errorf("fsnotify.WithBufferSize: buffer size cannot be smaller than 4096 bytes") - } - - in := &input{ - op: opAddWatch, - path: filepath.Clean(name), - flags: sysFSALLEVENTS, - reply: make(chan error), - bufsize: with.bufsize, - } - w.input <- in - if err := w.wakeupReader(); err != nil { - return err - } - return <-in.reply -} - -// Remove stops monitoring the path for changes. -// -// Directories are always removed non-recursively. For example, if you added -// /tmp/dir and /tmp/dir/subdir then you will need to remove both. -// -// Removing a path that has not yet been added returns [ErrNonExistentWatch]. -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) Remove(name string) error { - if w.isClosed() { - return nil - } - - in := &input{ - op: opRemoveWatch, - path: filepath.Clean(name), - reply: make(chan error), - } - w.input <- in - if err := w.wakeupReader(); err != nil { - return err - } - return <-in.reply -} - -// WatchList returns all paths explicitly added with [Watcher.Add] (and are not -// yet removed). -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) WatchList() []string { - if w.isClosed() { - return nil - } - - w.mu.Lock() - defer w.mu.Unlock() - - entries := make([]string, 0, len(w.watches)) - for _, entry := range w.watches { - for _, watchEntry := range entry { - entries = append(entries, watchEntry.path) - } - } - - return entries -} - -// These options are from the old golang.org/x/exp/winfsnotify, where you could -// add various options to the watch. This has long since been removed. -// -// The "sys" in the name is misleading as they're not part of any "system". -// -// This should all be removed at some point, and just use windows.FILE_NOTIFY_* -const ( - sysFSALLEVENTS = 0xfff - sysFSCREATE = 0x100 - sysFSDELETE = 0x200 - sysFSDELETESELF = 0x400 - sysFSMODIFY = 0x2 - sysFSMOVE = 0xc0 - sysFSMOVEDFROM = 0x40 - sysFSMOVEDTO = 0x80 - sysFSMOVESELF = 0x800 - sysFSIGNORED = 0x8000 -) - -func (w *Watcher) newEvent(name string, mask uint32) Event { - e := Event{Name: name} - if mask&sysFSCREATE == sysFSCREATE || mask&sysFSMOVEDTO == sysFSMOVEDTO { - e.Op |= Create - } - if mask&sysFSDELETE == sysFSDELETE || mask&sysFSDELETESELF == sysFSDELETESELF { - e.Op |= Remove - } - if mask&sysFSMODIFY == sysFSMODIFY { - e.Op |= Write - } - if mask&sysFSMOVE == sysFSMOVE || mask&sysFSMOVESELF == sysFSMOVESELF || mask&sysFSMOVEDFROM == sysFSMOVEDFROM { - e.Op |= Rename - } - return e -} - -const ( - opAddWatch = iota - opRemoveWatch -) - -const ( - provisional uint64 = 1 << (32 + iota) -) - -type input struct { - op int - path string - flags uint32 - bufsize int - reply chan error -} - -type inode struct { - handle windows.Handle - volume uint32 - index uint64 -} - -type watch struct { - ov windows.Overlapped - ino *inode // i-number - recurse bool // Recursive watch? - path string // Directory path - mask uint64 // Directory itself is being watched with these notify flags - names map[string]uint64 // Map of names being watched and their notify flags - rename string // Remembers the old name while renaming a file - buf []byte // buffer, allocated later -} - -type ( - indexMap map[uint64]*watch - watchMap map[uint32]indexMap -) - -func (w *Watcher) wakeupReader() error { - err := windows.PostQueuedCompletionStatus(w.port, 0, 0, nil) - if err != nil { - return os.NewSyscallError("PostQueuedCompletionStatus", err) - } - return nil -} - -func (w *Watcher) getDir(pathname string) (dir string, err error) { - attr, err := windows.GetFileAttributes(windows.StringToUTF16Ptr(pathname)) - if err != nil { - return "", os.NewSyscallError("GetFileAttributes", err) - } - if attr&windows.FILE_ATTRIBUTE_DIRECTORY != 0 { - dir = pathname - } else { - dir, _ = filepath.Split(pathname) - dir = filepath.Clean(dir) - } - return -} - -func (w *Watcher) getIno(path string) (ino *inode, err error) { - h, err := windows.CreateFile(windows.StringToUTF16Ptr(path), - windows.FILE_LIST_DIRECTORY, - windows.FILE_SHARE_READ|windows.FILE_SHARE_WRITE|windows.FILE_SHARE_DELETE, - nil, windows.OPEN_EXISTING, - windows.FILE_FLAG_BACKUP_SEMANTICS|windows.FILE_FLAG_OVERLAPPED, 0) - if err != nil { - return nil, os.NewSyscallError("CreateFile", err) - } - - var fi windows.ByHandleFileInformation - err = windows.GetFileInformationByHandle(h, &fi) - if err != nil { - windows.CloseHandle(h) - return nil, os.NewSyscallError("GetFileInformationByHandle", err) - } - ino = &inode{ - handle: h, - volume: fi.VolumeSerialNumber, - index: uint64(fi.FileIndexHigh)<<32 | uint64(fi.FileIndexLow), - } - return ino, nil -} - -// Must run within the I/O thread. -func (m watchMap) get(ino *inode) *watch { - if i := m[ino.volume]; i != nil { - return i[ino.index] - } - return nil -} - -// Must run within the I/O thread. -func (m watchMap) set(ino *inode, watch *watch) { - i := m[ino.volume] - if i == nil { - i = make(indexMap) - m[ino.volume] = i - } - i[ino.index] = watch -} - -// Must run within the I/O thread. -func (w *Watcher) addWatch(pathname string, flags uint64, bufsize int) error { - //pathname, recurse := recursivePath(pathname) - recurse := false - - dir, err := w.getDir(pathname) - if err != nil { - return err - } - - ino, err := w.getIno(dir) - if err != nil { - return err - } - w.mu.Lock() - watchEntry := w.watches.get(ino) - w.mu.Unlock() - if watchEntry == nil { - _, err := windows.CreateIoCompletionPort(ino.handle, w.port, 0, 0) - if err != nil { - windows.CloseHandle(ino.handle) - return os.NewSyscallError("CreateIoCompletionPort", err) - } - watchEntry = &watch{ - ino: ino, - path: dir, - names: make(map[string]uint64), - recurse: recurse, - buf: make([]byte, bufsize), - } - w.mu.Lock() - w.watches.set(ino, watchEntry) - w.mu.Unlock() - flags |= provisional - } else { - windows.CloseHandle(ino.handle) - } - if pathname == dir { - watchEntry.mask |= flags - } else { - watchEntry.names[filepath.Base(pathname)] |= flags - } - - err = w.startRead(watchEntry) - if err != nil { - return err - } - - if pathname == dir { - watchEntry.mask &= ^provisional - } else { - watchEntry.names[filepath.Base(pathname)] &= ^provisional - } - return nil -} - -// Must run within the I/O thread. -func (w *Watcher) remWatch(pathname string) error { - pathname, recurse := recursivePath(pathname) - - dir, err := w.getDir(pathname) - if err != nil { - return err - } - ino, err := w.getIno(dir) - if err != nil { - return err - } - - w.mu.Lock() - watch := w.watches.get(ino) - w.mu.Unlock() - - if recurse && !watch.recurse { - return fmt.Errorf("can't use \\... with non-recursive watch %q", pathname) - } - - err = windows.CloseHandle(ino.handle) - if err != nil { - w.sendError(os.NewSyscallError("CloseHandle", err)) - } - if watch == nil { - return fmt.Errorf("%w: %s", ErrNonExistentWatch, pathname) - } - if pathname == dir { - w.sendEvent(watch.path, watch.mask&sysFSIGNORED) - watch.mask = 0 - } else { - name := filepath.Base(pathname) - w.sendEvent(filepath.Join(watch.path, name), watch.names[name]&sysFSIGNORED) - delete(watch.names, name) - } - - return w.startRead(watch) -} - -// Must run within the I/O thread. -func (w *Watcher) deleteWatch(watch *watch) { - for name, mask := range watch.names { - if mask&provisional == 0 { - w.sendEvent(filepath.Join(watch.path, name), mask&sysFSIGNORED) - } - delete(watch.names, name) - } - if watch.mask != 0 { - if watch.mask&provisional == 0 { - w.sendEvent(watch.path, watch.mask&sysFSIGNORED) - } - watch.mask = 0 - } -} - -// Must run within the I/O thread. -func (w *Watcher) startRead(watch *watch) error { - err := windows.CancelIo(watch.ino.handle) - if err != nil { - w.sendError(os.NewSyscallError("CancelIo", err)) - w.deleteWatch(watch) - } - mask := w.toWindowsFlags(watch.mask) - for _, m := range watch.names { - mask |= w.toWindowsFlags(m) - } - if mask == 0 { - err := windows.CloseHandle(watch.ino.handle) - if err != nil { - w.sendError(os.NewSyscallError("CloseHandle", err)) - } - w.mu.Lock() - delete(w.watches[watch.ino.volume], watch.ino.index) - w.mu.Unlock() - return nil - } - - // We need to pass the array, rather than the slice. - hdr := (*reflect.SliceHeader)(unsafe.Pointer(&watch.buf)) - rdErr := windows.ReadDirectoryChanges(watch.ino.handle, - (*byte)(unsafe.Pointer(hdr.Data)), uint32(hdr.Len), - watch.recurse, mask, nil, &watch.ov, 0) - if rdErr != nil { - err := os.NewSyscallError("ReadDirectoryChanges", rdErr) - if rdErr == windows.ERROR_ACCESS_DENIED && watch.mask&provisional == 0 { - // Watched directory was probably removed - w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) - err = nil - } - w.deleteWatch(watch) - w.startRead(watch) - return err - } - return nil -} - -// readEvents reads from the I/O completion port, converts the -// received events into Event objects and sends them via the Events channel. -// Entry point to the I/O thread. -func (w *Watcher) readEvents() { - var ( - n uint32 - key uintptr - ov *windows.Overlapped - ) - runtime.LockOSThread() - - for { - // This error is handled after the watch == nil check below. - qErr := windows.GetQueuedCompletionStatus(w.port, &n, &key, &ov, windows.INFINITE) - - watch := (*watch)(unsafe.Pointer(ov)) - if watch == nil { - select { - case ch := <-w.quit: - w.mu.Lock() - var indexes []indexMap - for _, index := range w.watches { - indexes = append(indexes, index) - } - w.mu.Unlock() - for _, index := range indexes { - for _, watch := range index { - w.deleteWatch(watch) - w.startRead(watch) - } - } - - err := windows.CloseHandle(w.port) - if err != nil { - err = os.NewSyscallError("CloseHandle", err) - } - close(w.Events) - close(w.Errors) - ch <- err - return - case in := <-w.input: - switch in.op { - case opAddWatch: - in.reply <- w.addWatch(in.path, uint64(in.flags), in.bufsize) - case opRemoveWatch: - in.reply <- w.remWatch(in.path) - } - default: - } - continue - } - - switch qErr { - case nil: - // No error - case windows.ERROR_MORE_DATA: - if watch == nil { - w.sendError(errors.New("ERROR_MORE_DATA has unexpectedly null lpOverlapped buffer")) - } else { - // The i/o succeeded but the buffer is full. - // In theory we should be building up a full packet. - // In practice we can get away with just carrying on. - n = uint32(unsafe.Sizeof(watch.buf)) - } - case windows.ERROR_ACCESS_DENIED: - // Watched directory was probably removed - w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) - w.deleteWatch(watch) - w.startRead(watch) - continue - case windows.ERROR_OPERATION_ABORTED: - // CancelIo was called on this handle - continue - default: - w.sendError(os.NewSyscallError("GetQueuedCompletionPort", qErr)) - continue - } - - var offset uint32 - for { - if n == 0 { - w.sendError(ErrEventOverflow) - break - } - - // Point "raw" to the event in the buffer - raw := (*windows.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset])) - - // Create a buf that is the size of the path name - size := int(raw.FileNameLength / 2) - var buf []uint16 - // TODO: Use unsafe.Slice in Go 1.17; https://stackoverflow.com/questions/51187973 - sh := (*reflect.SliceHeader)(unsafe.Pointer(&buf)) - sh.Data = uintptr(unsafe.Pointer(&raw.FileName)) - sh.Len = size - sh.Cap = size - name := windows.UTF16ToString(buf) - fullname := filepath.Join(watch.path, name) - - var mask uint64 - switch raw.Action { - case windows.FILE_ACTION_REMOVED: - mask = sysFSDELETESELF - case windows.FILE_ACTION_MODIFIED: - mask = sysFSMODIFY - case windows.FILE_ACTION_RENAMED_OLD_NAME: - watch.rename = name - case windows.FILE_ACTION_RENAMED_NEW_NAME: - // Update saved path of all sub-watches. - old := filepath.Join(watch.path, watch.rename) - w.mu.Lock() - for _, watchMap := range w.watches { - for _, ww := range watchMap { - if strings.HasPrefix(ww.path, old) { - ww.path = filepath.Join(fullname, strings.TrimPrefix(ww.path, old)) - } - } - } - w.mu.Unlock() - - if watch.names[watch.rename] != 0 { - watch.names[name] |= watch.names[watch.rename] - delete(watch.names, watch.rename) - mask = sysFSMOVESELF - } - } - - sendNameEvent := func() { - w.sendEvent(fullname, watch.names[name]&mask) - } - if raw.Action != windows.FILE_ACTION_RENAMED_NEW_NAME { - sendNameEvent() - } - if raw.Action == windows.FILE_ACTION_REMOVED { - w.sendEvent(fullname, watch.names[name]&sysFSIGNORED) - delete(watch.names, name) - } - - w.sendEvent(fullname, watch.mask&w.toFSnotifyFlags(raw.Action)) - if raw.Action == windows.FILE_ACTION_RENAMED_NEW_NAME { - fullname = filepath.Join(watch.path, watch.rename) - sendNameEvent() - } - - // Move to the next event in the buffer - if raw.NextEntryOffset == 0 { - break - } - offset += raw.NextEntryOffset - - // Error! - if offset >= n { - //lint:ignore ST1005 Windows should be capitalized - w.sendError(errors.New( - "Windows system assumed buffer larger than it is, events have likely been missed")) - break - } - } - - if err := w.startRead(watch); err != nil { - w.sendError(err) - } - } -} - -func (w *Watcher) toWindowsFlags(mask uint64) uint32 { - var m uint32 - if mask&sysFSMODIFY != 0 { - m |= windows.FILE_NOTIFY_CHANGE_LAST_WRITE - } - if mask&(sysFSMOVE|sysFSCREATE|sysFSDELETE) != 0 { - m |= windows.FILE_NOTIFY_CHANGE_FILE_NAME | windows.FILE_NOTIFY_CHANGE_DIR_NAME - } - return m -} - -func (w *Watcher) toFSnotifyFlags(action uint32) uint64 { - switch action { - case windows.FILE_ACTION_ADDED: - return sysFSCREATE - case windows.FILE_ACTION_REMOVED: - return sysFSDELETE - case windows.FILE_ACTION_MODIFIED: - return sysFSMODIFY - case windows.FILE_ACTION_RENAMED_OLD_NAME: - return sysFSMOVEDFROM - case windows.FILE_ACTION_RENAMED_NEW_NAME: - return sysFSMOVEDTO - } - return 0 -} diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify.go b/vendor/github.com/fsnotify/fsnotify/fsnotify.go deleted file mode 100644 index 24c99cc..0000000 --- a/vendor/github.com/fsnotify/fsnotify/fsnotify.go +++ /dev/null @@ -1,146 +0,0 @@ -// Package fsnotify provides a cross-platform interface for file system -// notifications. -// -// Currently supported systems: -// -// Linux 2.6.32+ via inotify -// BSD, macOS via kqueue -// Windows via ReadDirectoryChangesW -// illumos via FEN -package fsnotify - -import ( - "errors" - "fmt" - "path/filepath" - "strings" -) - -// Event represents a file system notification. -type Event struct { - // Path to the file or directory. - // - // Paths are relative to the input; for example with Add("dir") the Name - // will be set to "dir/file" if you create that file, but if you use - // Add("/path/to/dir") it will be "/path/to/dir/file". - Name string - - // File operation that triggered the event. - // - // This is a bitmask and some systems may send multiple operations at once. - // Use the Event.Has() method instead of comparing with ==. - Op Op -} - -// Op describes a set of file operations. -type Op uint32 - -// The operations fsnotify can trigger; see the documentation on [Watcher] for a -// full description, and check them with [Event.Has]. -const ( - // A new pathname was created. - Create Op = 1 << iota - - // The pathname was written to; this does *not* mean the write has finished, - // and a write can be followed by more writes. - Write - - // The path was removed; any watches on it will be removed. Some "remove" - // operations may trigger a Rename if the file is actually moved (for - // example "remove to trash" is often a rename). - Remove - - // The path was renamed to something else; any watched on it will be - // removed. - Rename - - // File attributes were changed. - // - // It's generally not recommended to take action on this event, as it may - // get triggered very frequently by some software. For example, Spotlight - // indexing on macOS, anti-virus software, backup software, etc. - Chmod -) - -// Common errors that can be reported. -var ( - ErrNonExistentWatch = errors.New("fsnotify: can't remove non-existent watch") - ErrEventOverflow = errors.New("fsnotify: queue or buffer overflow") - ErrClosed = errors.New("fsnotify: watcher already closed") -) - -func (o Op) String() string { - var b strings.Builder - if o.Has(Create) { - b.WriteString("|CREATE") - } - if o.Has(Remove) { - b.WriteString("|REMOVE") - } - if o.Has(Write) { - b.WriteString("|WRITE") - } - if o.Has(Rename) { - b.WriteString("|RENAME") - } - if o.Has(Chmod) { - b.WriteString("|CHMOD") - } - if b.Len() == 0 { - return "[no events]" - } - return b.String()[1:] -} - -// Has reports if this operation has the given operation. -func (o Op) Has(h Op) bool { return o&h != 0 } - -// Has reports if this event has the given operation. -func (e Event) Has(op Op) bool { return e.Op.Has(op) } - -// String returns a string representation of the event with their path. -func (e Event) String() string { - return fmt.Sprintf("%-13s %q", e.Op.String(), e.Name) -} - -type ( - addOpt func(opt *withOpts) - withOpts struct { - bufsize int - } -) - -var defaultOpts = withOpts{ - bufsize: 65536, // 64K -} - -func getOptions(opts ...addOpt) withOpts { - with := defaultOpts - for _, o := range opts { - o(&with) - } - return with -} - -// WithBufferSize sets the [ReadDirectoryChangesW] buffer size. -// -// This only has effect on Windows systems, and is a no-op for other backends. -// -// The default value is 64K (65536 bytes) which is the highest value that works -// on all filesystems and should be enough for most applications, but if you -// have a large burst of events it may not be enough. You can increase it if -// you're hitting "queue or buffer overflow" errors ([ErrEventOverflow]). -// -// [ReadDirectoryChangesW]: https://learn.microsoft.com/en-gb/windows/win32/api/winbase/nf-winbase-readdirectorychangesw -func WithBufferSize(bytes int) addOpt { - return func(opt *withOpts) { opt.bufsize = bytes } -} - -// Check if this path is recursive (ends with "/..." or "\..."), and return the -// path with the /... stripped. -func recursivePath(path string) (string, bool) { - if filepath.Base(path) == "..." { - return filepath.Dir(path), true - } - return path, false -} diff --git a/vendor/github.com/fsnotify/fsnotify/mkdoc.zsh b/vendor/github.com/fsnotify/fsnotify/mkdoc.zsh deleted file mode 100644 index 99012ae..0000000 --- a/vendor/github.com/fsnotify/fsnotify/mkdoc.zsh +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/env zsh -[ "${ZSH_VERSION:-}" = "" ] && echo >&2 "Only works with zsh" && exit 1 -setopt err_exit no_unset pipefail extended_glob - -# Simple script to update the godoc comments on all watchers so you don't need -# to update the same comment 5 times. - -watcher=$(</tmp/x - print -r -- $cmt >>/tmp/x - tail -n+$(( end + 1 )) $file >>/tmp/x - mv /tmp/x $file - done -} - -set-cmt '^type Watcher struct ' $watcher -set-cmt '^func NewWatcher(' $new -set-cmt '^func NewBufferedWatcher(' $newbuffered -set-cmt '^func (w \*Watcher) Add(' $add -set-cmt '^func (w \*Watcher) AddWith(' $addwith -set-cmt '^func (w \*Watcher) Remove(' $remove -set-cmt '^func (w \*Watcher) Close(' $close -set-cmt '^func (w \*Watcher) WatchList(' $watchlist -set-cmt '^[[:space:]]*Events *chan Event$' $events -set-cmt '^[[:space:]]*Errors *chan error$' $errors diff --git a/vendor/github.com/fsnotify/fsnotify/system_bsd.go b/vendor/github.com/fsnotify/fsnotify/system_bsd.go deleted file mode 100644 index 4322b0b..0000000 --- a/vendor/github.com/fsnotify/fsnotify/system_bsd.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build freebsd || openbsd || netbsd || dragonfly -// +build freebsd openbsd netbsd dragonfly - -package fsnotify - -import "golang.org/x/sys/unix" - -const openMode = unix.O_NONBLOCK | unix.O_RDONLY | unix.O_CLOEXEC diff --git a/vendor/github.com/fsnotify/fsnotify/system_darwin.go b/vendor/github.com/fsnotify/fsnotify/system_darwin.go deleted file mode 100644 index 5da5ffa..0000000 --- a/vendor/github.com/fsnotify/fsnotify/system_darwin.go +++ /dev/null @@ -1,9 +0,0 @@ -//go:build darwin -// +build darwin - -package fsnotify - -import "golang.org/x/sys/unix" - -// note: this constant is not defined on BSD -const openMode = unix.O_EVTONLY | unix.O_CLOEXEC diff --git a/vendor/github.com/go-fonts/liberation/LICENSE b/vendor/github.com/go-fonts/liberation/LICENSE deleted file mode 100644 index aca0ff0..0000000 --- a/vendor/github.com/go-fonts/liberation/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright ©2020 The go-fonts Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the go-fonts project nor the names of its authors and - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/go-fonts/liberation/LICENSE-SIL b/vendor/github.com/go-fonts/liberation/LICENSE-SIL deleted file mode 100644 index 5c5b989..0000000 --- a/vendor/github.com/go-fonts/liberation/LICENSE-SIL +++ /dev/null @@ -1,101 +0,0 @@ -Digitized data copyright (c) 2010 Google Corporation - with Reserved Font Arimo, Tinos and Cousine. -Copyright (c) 2012 Red Hat, Inc. - with Reserved Font Name Liberation. - -This Font Software is licensed under the SIL Open Font License, -Version 1.1. - -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 - -PREAMBLE The goals of the Open Font License (OFL) are to stimulate -worldwide development of collaborative font projects, to support the font -creation efforts of academic and linguistic communities, and to provide -a free and open framework in which fonts may be shared and improved in -partnership with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. -The fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply to -any document created using the fonts or their derivatives. - - - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. -This may include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components -as distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting ? in part or in whole ? -any of the components of the Original Version, by changing formats or -by porting the Font Software to a new environment. - -"Author" refers to any designer, engineer, programmer, technical writer -or other person who contributed to the Font Software. - - -PERMISSION & CONDITIONS - -Permission is hereby granted, free of charge, to any person obtaining a -copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components,in - Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, - redistributed and/or sold with any software, provided that each copy - contains the above copyright notice and this license. These can be - included either as stand-alone text files, human-readable headers or - in the appropriate machine-readable metadata fields within text or - binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font - Name(s) unless explicit written permission is granted by the - corresponding Copyright Holder. This restriction only applies to the - primary font name as presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font - Software shall not be used to promote, endorse or advertise any - Modified Version, except to acknowledge the contribution(s) of the - Copyright Holder(s) and the Author(s) or with their explicit written - permission. - -5) The Font Software, modified or unmodified, in part or in whole, must - be distributed entirely under this license, and must not be distributed - under any other license. The requirement for fonts to remain under - this license does not apply to any document created using the Font - Software. - - - -TERMINATION -This license becomes null and void if any of the above conditions are not met. - - - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER -DEALINGS IN THE FONT SOFTWARE. diff --git a/vendor/github.com/go-fonts/liberation/liberationmonobold/LiberationMono-Bold.ttf b/vendor/github.com/go-fonts/liberation/liberationmonobold/LiberationMono-Bold.ttf deleted file mode 100644 index bf6d450..0000000 Binary files a/vendor/github.com/go-fonts/liberation/liberationmonobold/LiberationMono-Bold.ttf and /dev/null differ diff --git a/vendor/github.com/go-fonts/liberation/liberationmonobold/data.go b/vendor/github.com/go-fonts/liberation/liberationmonobold/data.go deleted file mode 100644 index 9a80a79..0000000 --- a/vendor/github.com/go-fonts/liberation/liberationmonobold/data.go +++ /dev/null @@ -1,12 +0,0 @@ -// generated by go run gen-fonts.go; DO NOT EDIT - -// Package liberationmonobold provides the "LiberationMono Bold" TrueType font -// from the Liberation font family. -package liberationmonobold // import "github.com/go-fonts/liberation/liberationmonobold" - -import _ "embed" - -// TTF is the data for the "LiberationMono Bold" TrueType font. -// -//go:embed LiberationMono-Bold.ttf -var TTF []byte diff --git a/vendor/github.com/go-fonts/liberation/liberationmonobolditalic/LiberationMono-BoldItalic.ttf b/vendor/github.com/go-fonts/liberation/liberationmonobolditalic/LiberationMono-BoldItalic.ttf deleted file mode 100644 index ef2da0b..0000000 Binary files a/vendor/github.com/go-fonts/liberation/liberationmonobolditalic/LiberationMono-BoldItalic.ttf and /dev/null differ diff --git a/vendor/github.com/go-fonts/liberation/liberationmonobolditalic/data.go b/vendor/github.com/go-fonts/liberation/liberationmonobolditalic/data.go deleted file mode 100644 index 66d051e..0000000 --- a/vendor/github.com/go-fonts/liberation/liberationmonobolditalic/data.go +++ /dev/null @@ -1,12 +0,0 @@ -// generated by go run gen-fonts.go; DO NOT EDIT - -// Package liberationmonobolditalic provides the "LiberationMono BoldItalic" TrueType font -// from the Liberation font family. -package liberationmonobolditalic // import "github.com/go-fonts/liberation/liberationmonobolditalic" - -import _ "embed" - -// TTF is the data for the "LiberationMono BoldItalic" TrueType font. -// -//go:embed LiberationMono-BoldItalic.ttf -var TTF []byte diff --git a/vendor/github.com/go-fonts/liberation/liberationmonoitalic/LiberationMono-Italic.ttf b/vendor/github.com/go-fonts/liberation/liberationmonoitalic/LiberationMono-Italic.ttf deleted file mode 100644 index acfc318..0000000 Binary files a/vendor/github.com/go-fonts/liberation/liberationmonoitalic/LiberationMono-Italic.ttf and /dev/null differ diff --git a/vendor/github.com/go-fonts/liberation/liberationmonoitalic/data.go b/vendor/github.com/go-fonts/liberation/liberationmonoitalic/data.go deleted file mode 100644 index b736062..0000000 --- a/vendor/github.com/go-fonts/liberation/liberationmonoitalic/data.go +++ /dev/null @@ -1,12 +0,0 @@ -// generated by go run gen-fonts.go; DO NOT EDIT - -// Package liberationmonoitalic provides the "LiberationMono Italic" TrueType font -// from the Liberation font family. -package liberationmonoitalic // import "github.com/go-fonts/liberation/liberationmonoitalic" - -import _ "embed" - -// TTF is the data for the "LiberationMono Italic" TrueType font. -// -//go:embed LiberationMono-Italic.ttf -var TTF []byte diff --git a/vendor/github.com/go-fonts/liberation/liberationmonoregular/LiberationMono-Regular.ttf b/vendor/github.com/go-fonts/liberation/liberationmonoregular/LiberationMono-Regular.ttf deleted file mode 100644 index c6117a6..0000000 Binary files a/vendor/github.com/go-fonts/liberation/liberationmonoregular/LiberationMono-Regular.ttf and /dev/null differ diff --git a/vendor/github.com/go-fonts/liberation/liberationmonoregular/data.go b/vendor/github.com/go-fonts/liberation/liberationmonoregular/data.go deleted file mode 100644 index 6b5b2e9..0000000 --- a/vendor/github.com/go-fonts/liberation/liberationmonoregular/data.go +++ /dev/null @@ -1,12 +0,0 @@ -// generated by go run gen-fonts.go; DO NOT EDIT - -// Package liberationmonoregular provides the "LiberationMono Regular" TrueType font -// from the Liberation font family. -package liberationmonoregular // import "github.com/go-fonts/liberation/liberationmonoregular" - -import _ "embed" - -// TTF is the data for the "LiberationMono Regular" TrueType font. -// -//go:embed LiberationMono-Regular.ttf -var TTF []byte diff --git a/vendor/github.com/go-fonts/liberation/liberationsansbold/LiberationSans-Bold.ttf b/vendor/github.com/go-fonts/liberation/liberationsansbold/LiberationSans-Bold.ttf deleted file mode 100644 index 528271f..0000000 Binary files a/vendor/github.com/go-fonts/liberation/liberationsansbold/LiberationSans-Bold.ttf and /dev/null differ diff --git a/vendor/github.com/go-fonts/liberation/liberationsansbold/data.go b/vendor/github.com/go-fonts/liberation/liberationsansbold/data.go deleted file mode 100644 index 64fe4ef..0000000 --- a/vendor/github.com/go-fonts/liberation/liberationsansbold/data.go +++ /dev/null @@ -1,12 +0,0 @@ -// generated by go run gen-fonts.go; DO NOT EDIT - -// Package liberationsansbold provides the "LiberationSans Bold" TrueType font -// from the Liberation font family. -package liberationsansbold // import "github.com/go-fonts/liberation/liberationsansbold" - -import _ "embed" - -// TTF is the data for the "LiberationSans Bold" TrueType font. -// -//go:embed LiberationSans-Bold.ttf -var TTF []byte diff --git a/vendor/github.com/go-fonts/liberation/liberationsansbolditalic/LiberationSans-BoldItalic.ttf b/vendor/github.com/go-fonts/liberation/liberationsansbolditalic/LiberationSans-BoldItalic.ttf deleted file mode 100644 index d491a23..0000000 Binary files a/vendor/github.com/go-fonts/liberation/liberationsansbolditalic/LiberationSans-BoldItalic.ttf and /dev/null differ diff --git a/vendor/github.com/go-fonts/liberation/liberationsansbolditalic/data.go b/vendor/github.com/go-fonts/liberation/liberationsansbolditalic/data.go deleted file mode 100644 index 6c6a9bf..0000000 --- a/vendor/github.com/go-fonts/liberation/liberationsansbolditalic/data.go +++ /dev/null @@ -1,12 +0,0 @@ -// generated by go run gen-fonts.go; DO NOT EDIT - -// Package liberationsansbolditalic provides the "LiberationSans BoldItalic" TrueType font -// from the Liberation font family. -package liberationsansbolditalic // import "github.com/go-fonts/liberation/liberationsansbolditalic" - -import _ "embed" - -// TTF is the data for the "LiberationSans BoldItalic" TrueType font. -// -//go:embed LiberationSans-BoldItalic.ttf -var TTF []byte diff --git a/vendor/github.com/go-fonts/liberation/liberationsansitalic/LiberationSans-Italic.ttf b/vendor/github.com/go-fonts/liberation/liberationsansitalic/LiberationSans-Italic.ttf deleted file mode 100644 index e38d5aa..0000000 Binary files a/vendor/github.com/go-fonts/liberation/liberationsansitalic/LiberationSans-Italic.ttf and /dev/null differ diff --git a/vendor/github.com/go-fonts/liberation/liberationsansitalic/data.go b/vendor/github.com/go-fonts/liberation/liberationsansitalic/data.go deleted file mode 100644 index ac22326..0000000 --- a/vendor/github.com/go-fonts/liberation/liberationsansitalic/data.go +++ /dev/null @@ -1,12 +0,0 @@ -// generated by go run gen-fonts.go; DO NOT EDIT - -// Package liberationsansitalic provides the "LiberationSans Italic" TrueType font -// from the Liberation font family. -package liberationsansitalic // import "github.com/go-fonts/liberation/liberationsansitalic" - -import _ "embed" - -// TTF is the data for the "LiberationSans Italic" TrueType font. -// -//go:embed LiberationSans-Italic.ttf -var TTF []byte diff --git a/vendor/github.com/go-fonts/liberation/liberationsansregular/LiberationSans-Regular.ttf b/vendor/github.com/go-fonts/liberation/liberationsansregular/LiberationSans-Regular.ttf deleted file mode 100644 index 9ec3450..0000000 Binary files a/vendor/github.com/go-fonts/liberation/liberationsansregular/LiberationSans-Regular.ttf and /dev/null differ diff --git a/vendor/github.com/go-fonts/liberation/liberationsansregular/data.go b/vendor/github.com/go-fonts/liberation/liberationsansregular/data.go deleted file mode 100644 index 625d80f..0000000 --- a/vendor/github.com/go-fonts/liberation/liberationsansregular/data.go +++ /dev/null @@ -1,12 +0,0 @@ -// generated by go run gen-fonts.go; DO NOT EDIT - -// Package liberationsansregular provides the "LiberationSans Regular" TrueType font -// from the Liberation font family. -package liberationsansregular // import "github.com/go-fonts/liberation/liberationsansregular" - -import _ "embed" - -// TTF is the data for the "LiberationSans Regular" TrueType font. -// -//go:embed LiberationSans-Regular.ttf -var TTF []byte diff --git a/vendor/github.com/go-fonts/liberation/liberationserifbold/LiberationSerif-Bold.ttf b/vendor/github.com/go-fonts/liberation/liberationserifbold/LiberationSerif-Bold.ttf deleted file mode 100644 index 6c17b00..0000000 Binary files a/vendor/github.com/go-fonts/liberation/liberationserifbold/LiberationSerif-Bold.ttf and /dev/null differ diff --git a/vendor/github.com/go-fonts/liberation/liberationserifbold/data.go b/vendor/github.com/go-fonts/liberation/liberationserifbold/data.go deleted file mode 100644 index 4666104..0000000 --- a/vendor/github.com/go-fonts/liberation/liberationserifbold/data.go +++ /dev/null @@ -1,12 +0,0 @@ -// generated by go run gen-fonts.go; DO NOT EDIT - -// Package liberationserifbold provides the "LiberationSerif Bold" TrueType font -// from the Liberation font family. -package liberationserifbold // import "github.com/go-fonts/liberation/liberationserifbold" - -import _ "embed" - -// TTF is the data for the "LiberationSerif Bold" TrueType font. -// -//go:embed LiberationSerif-Bold.ttf -var TTF []byte diff --git a/vendor/github.com/go-fonts/liberation/liberationserifbolditalic/LiberationSerif-BoldItalic.ttf b/vendor/github.com/go-fonts/liberation/liberationserifbolditalic/LiberationSerif-BoldItalic.ttf deleted file mode 100644 index 7c2b002..0000000 Binary files a/vendor/github.com/go-fonts/liberation/liberationserifbolditalic/LiberationSerif-BoldItalic.ttf and /dev/null differ diff --git a/vendor/github.com/go-fonts/liberation/liberationserifbolditalic/data.go b/vendor/github.com/go-fonts/liberation/liberationserifbolditalic/data.go deleted file mode 100644 index 29d1751..0000000 --- a/vendor/github.com/go-fonts/liberation/liberationserifbolditalic/data.go +++ /dev/null @@ -1,12 +0,0 @@ -// generated by go run gen-fonts.go; DO NOT EDIT - -// Package liberationserifbolditalic provides the "LiberationSerif BoldItalic" TrueType font -// from the Liberation font family. -package liberationserifbolditalic // import "github.com/go-fonts/liberation/liberationserifbolditalic" - -import _ "embed" - -// TTF is the data for the "LiberationSerif BoldItalic" TrueType font. -// -//go:embed LiberationSerif-BoldItalic.ttf -var TTF []byte diff --git a/vendor/github.com/go-fonts/liberation/liberationserifitalic/LiberationSerif-Italic.ttf b/vendor/github.com/go-fonts/liberation/liberationserifitalic/LiberationSerif-Italic.ttf deleted file mode 100644 index ffddef5..0000000 Binary files a/vendor/github.com/go-fonts/liberation/liberationserifitalic/LiberationSerif-Italic.ttf and /dev/null differ diff --git a/vendor/github.com/go-fonts/liberation/liberationserifitalic/data.go b/vendor/github.com/go-fonts/liberation/liberationserifitalic/data.go deleted file mode 100644 index b058c63..0000000 --- a/vendor/github.com/go-fonts/liberation/liberationserifitalic/data.go +++ /dev/null @@ -1,12 +0,0 @@ -// generated by go run gen-fonts.go; DO NOT EDIT - -// Package liberationserifitalic provides the "LiberationSerif Italic" TrueType font -// from the Liberation font family. -package liberationserifitalic // import "github.com/go-fonts/liberation/liberationserifitalic" - -import _ "embed" - -// TTF is the data for the "LiberationSerif Italic" TrueType font. -// -//go:embed LiberationSerif-Italic.ttf -var TTF []byte diff --git a/vendor/github.com/go-fonts/liberation/liberationserifregular/LiberationSerif-Regular.ttf b/vendor/github.com/go-fonts/liberation/liberationserifregular/LiberationSerif-Regular.ttf deleted file mode 100644 index 2039644..0000000 Binary files a/vendor/github.com/go-fonts/liberation/liberationserifregular/LiberationSerif-Regular.ttf and /dev/null differ diff --git a/vendor/github.com/go-fonts/liberation/liberationserifregular/data.go b/vendor/github.com/go-fonts/liberation/liberationserifregular/data.go deleted file mode 100644 index b9525f9..0000000 --- a/vendor/github.com/go-fonts/liberation/liberationserifregular/data.go +++ /dev/null @@ -1,12 +0,0 @@ -// generated by go run gen-fonts.go; DO NOT EDIT - -// Package liberationserifregular provides the "LiberationSerif Regular" TrueType font -// from the Liberation font family. -package liberationserifregular // import "github.com/go-fonts/liberation/liberationserifregular" - -import _ "embed" - -// TTF is the data for the "LiberationSerif Regular" TrueType font. -// -//go:embed LiberationSerif-Regular.ttf -var TTF []byte diff --git a/vendor/github.com/go-latex/latex/.travis.yml b/vendor/github.com/go-latex/latex/.travis.yml deleted file mode 100644 index 043757b..0000000 --- a/vendor/github.com/go-latex/latex/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -sudo: false -go_import_path: github.com/go-latex/latex - -language: go - -go: - - 1.14.x - - 1.13.x - - master - -os: - - linux - -arch: - - amd64 - -env: - global: - - GO111MODULE=on - - GOFLAGS="-mod=readonly" - -cache: - directories: - - $HOME/.cache/go-build - - $HOME/gopath/pkg/mod - -git: - depth: 1 - autocrlf: input - -matrix: - fast_finish: true - allow_failures: - - go: master - -script: - - go install -v ./... - - go run ./ci/run-tests.go -coverpkg=github.com/go-latex/latex/... -race - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/go-latex/latex/AUTHORS b/vendor/github.com/go-latex/latex/AUTHORS deleted file mode 100644 index a2f1096..0000000 --- a/vendor/github.com/go-latex/latex/AUTHORS +++ /dev/null @@ -1,12 +0,0 @@ -# This is the official list of go-latex authors for copyright purposes. -# This file is distinct from the CONTRIBUTORS files. -# See the latter for an explanation. - -# Names should be added to this file as -# Name or Organization -# The email address is not required for organizations. - -# Please keep the list sorted. - -Google Inc -Sebastien Binet diff --git a/vendor/github.com/go-latex/latex/CONTRIBUTORS b/vendor/github.com/go-latex/latex/CONTRIBUTORS deleted file mode 100644 index ec9c78e..0000000 --- a/vendor/github.com/go-latex/latex/CONTRIBUTORS +++ /dev/null @@ -1,19 +0,0 @@ -# This is the official list of people who can contribute -# (and typically have contributed) code to the go-latex -# project. -# -# The AUTHORS file lists the copyright holders; this file -# lists people. For example, Google employees would be listed here -# but not in AUTHORS, because Google would hold the copyright. -# -# When adding J Random Contributor's name to this file, -# either J's name or J's organization's name should be -# added to the AUTHORS file. -# -# Names should be added to this file like so: -# Name -# -# Please keep the list sorted. - -Dan Lorenc -Sebastien Binet diff --git a/vendor/github.com/go-latex/latex/LICENSE b/vendor/github.com/go-latex/latex/LICENSE deleted file mode 100644 index bb5aec7..0000000 --- a/vendor/github.com/go-latex/latex/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright ©2020 The go-latex Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the go-latex project nor the names of its authors and - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/go-latex/latex/README.md b/vendor/github.com/go-latex/latex/README.md deleted file mode 100644 index 8dabb1e..0000000 --- a/vendor/github.com/go-latex/latex/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# latex - -[![go.dev reference](https://pkg.go.dev/badge/github.com/go-latex/latex)](https://pkg.go.dev/github.com/go-latex/latex) -[![GitHub release](https://img.shields.io/github/release/go-latex/latex.svg)](https://github.com/go-latex/latex/releases) -[![CI](https://github.com/go-latex/latex/workflows/CI/badge.svg)](https://github.com/go-latex/latex/actions) -[![codecov](https://codecov.io/gh/go-latex/latex/branch/master/graph/badge.svg)](https://codecov.io/gh/go-latex/latex) -[![GoDoc](https://godoc.org/github.com/go-latex/latex?status.svg)](https://godoc.org/github.com/go-latex/latex) -[![License](https://img.shields.io/badge/License-BSD--3-blue.svg)](https://github.com/go-latex/latex/raw/master/LICENSE) - -`latex` is a package holding Go tools for [LaTeX](https://www.latex-project.org/). - -`latex` is supposed to provide features akin to `MathJax` or `matplotlib`'s `TeX` capabilities. -_ie:_ it is supposed to be able to draw mathematical equations, in pure-Go. - -`latex` is *NOT SUPPOSED* to be a complete typesetting system like `LaTeX` or `TeX`. - -For this, please take look at: - -- [Star-TeX](https://star-tex.org) -- [Star-TeX (git repo)](https://git.sr.ht/~sbinet/star-tex) - -Eventually, `go-latex/latex` might just use `star-tex.org/...` to provide the `MathJax`-like capabilities. -(once `star-tex.org/...` is ready and exports a nice Go API.) - -## Installation - -``` -$> go get github.com/go-latex/latex/... -``` - -## Documentation - -Documentation is served by [godoc](https://godoc.org), here: - -- [godoc.org/github.com/go-latex/latex](https://godoc.org/github.com/go-latex/latex) - -The main use case for `go-latex/latex` is to draw a mathematical equation. -This is typically achieved via the `latex/mtex.Render` function that knows how to render mathematical `TeX` equations to a renderer interface. - -### Example - -```go -package main - -import ( - "os" - - "github.com/go-latex/latex/drawtex/drawimg" - "github.com/go-latex/latex/mtex" -) - -func main() { - f, err := os.Create("output.png") - if err != nil { - panic(err) - } - defer f.Close() - - dst := drawimg.NewRenderer(f) - err = mtex.Render(dst, `$f(x) = \frac{\sqrt{x +20}}{2\pi} +\hbar \sum y\partial y$`, 12, 72, nil) - if err != nil { - panic(err) - } - - err = f.Close() - if err != nil { - panic(err) - } -} -``` - -## LICENSE - -BSD-3. diff --git a/vendor/github.com/go-latex/latex/ast/ast.go b/vendor/github.com/go-latex/latex/ast/ast.go deleted file mode 100644 index 4205a29..0000000 --- a/vendor/github.com/go-latex/latex/ast/ast.go +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package ast declares the types used to represent syntax trees for -// LaTeX documents. -package ast // import "github.com/go-latex/latex/ast" - -import ( - "fmt" - "io" - - "github.com/go-latex/latex/token" -) - -// Node is a node in a LaTeX document. -type Node interface { - Pos() token.Pos // position of first character belonging to the node. - End() token.Pos // position of first character immediately after the node. - - isNode() -} - -// List is a collection of nodes. -type List []Node - -func (x List) isNode() {} -func (x List) Pos() token.Pos { - if len(x) == 0 { - return -1 - } - return x[0].Pos() -} - -func (x List) End() token.Pos { - if len(x) == 0 { - return -1 - } - return x[len(x)-1].End() -} - -// Macro is a LaTeX macro. -// ex: -// \sqrt{a} -// \frac{num}{den} -type Macro struct { - Name *Ident - Args List -} - -func (x *Macro) isNode() {} -func (x *Macro) Pos() token.Pos { return x.Name.Pos() } -func (x *Macro) End() token.Pos { - if len(x.Args) > 0 { - return x.Args[len(x.Args)-1].End() - } - return x.Name.End() -} - -// Arg is an argument of a macro. -// ex: -// {a} in \sqrt{a} -type Arg struct { - Lbrace token.Pos // position of '{' - List List // or stmt? - Rbrace token.Pos // position of '}' -} - -func (x *Arg) Pos() token.Pos { return x.Lbrace } -func (x *Arg) End() token.Pos { return x.Rbrace } -func (x *Arg) isNode() {} - -// OptArg is an optional argument of a macro -// ex: -// [n] in \sqrt[n]{a} -type OptArg struct { - Lbrack token.Pos // position of '[' - List List - Rbrack token.Pos // position of ']' -} - -func (x *OptArg) Pos() token.Pos { return x.Lbrack } -func (x *OptArg) End() token.Pos { return x.Rbrack } -func (x *OptArg) isNode() {} - -type Ident struct { - NamePos token.Pos // identifier position - Name string // identifier name -} - -func (x *Ident) Pos() token.Pos { return x.NamePos } -func (x *Ident) End() token.Pos { return token.Pos(int(x.NamePos) + len(x.Name)) } -func (x *Ident) isNode() {} - -// MathExpr is a math expression. -// ex: -// $f(x) \doteq \sqrt[n]{x}$ -// \[ x^n + y^n = z^n \] -type MathExpr struct { - Delim string // delimiter used for this math expression. - Left token.Pos // position of opening '$', '\(', '\[' or '\begin{math}' - List List - Right token.Pos // position of closing '$', '\)', '\]' or '\end{math}' -} - -func (x *MathExpr) isNode() {} -func (x *MathExpr) Pos() token.Pos { return x.Left } -func (x *MathExpr) End() token.Pos { return x.Right } - -type Word struct { - WordPos token.Pos - Text string -} - -func (x *Word) isNode() {} -func (x *Word) Pos() token.Pos { return x.WordPos } -func (x *Word) End() token.Pos { return token.Pos(int(x.WordPos) + len(x.Text)) } - -type Literal struct { - LitPos token.Pos - Text string -} - -func (x *Literal) isNode() {} -func (x *Literal) Pos() token.Pos { return x.LitPos } -func (x *Literal) End() token.Pos { return token.Pos(int(x.LitPos) + len(x.Text)) } - -type Symbol struct { - SymPos token.Pos - Text string -} - -func (x *Symbol) isNode() {} -func (x *Symbol) Pos() token.Pos { return x.SymPos } -func (x *Symbol) End() token.Pos { return token.Pos(int(x.SymPos) + len(x.Text)) } - -// Sub is a subscript node. -// -// e.g.: \sum_{i=0} -type Sub struct { - UnderPos token.Pos - Node Node -} - -func (x *Sub) isNode() {} -func (x *Sub) Pos() token.Pos { return x.UnderPos } -func (x *Sub) End() token.Pos { return x.Node.End() } - -// Sup is a superscript node. -// -// e.g.: \sum^{n} -type Sup struct { - HatPos token.Pos - Node Node -} - -func (x *Sup) isNode() {} -func (x *Sup) Pos() token.Pos { return x.HatPos } -func (x *Sup) End() token.Pos { return x.Node.End() } - -// Print prints node to w. -func Print(o io.Writer, node Node) { - switch node := node.(type) { - case *Arg: - fmt.Fprintf(o, "{") - for i, n := range node.List { - if i > 0 { - fmt.Fprintf(o, ", ") - } - Print(o, n) - } - fmt.Fprintf(o, "}") - - case *Ident: - fmt.Fprintf(o, "ast.Ident{%q}", node.Name) - - case *Macro: - fmt.Fprintf(o, "ast.Macro{%q", node.Name.Name) - switch len(node.Args) { - case 0: - // no-op - default: - fmt.Fprintf(o, ", Args:") - for i, n := range node.Args { - if i > 0 { - fmt.Fprintf(o, ", ") - } - Print(o, n) - } - } - fmt.Fprintf(o, "}") - case *MathExpr: - fmt.Fprintf(o, "ast.MathExpr{") - switch len(node.List) { - case 0: - // no-op - default: - fmt.Fprintf(o, "List:") - for i, n := range node.List { - if i > 0 { - fmt.Fprintf(o, ", ") - } - Print(o, n) - } - } - fmt.Fprintf(o, "}") - case *OptArg: - fmt.Fprintf(o, "[") - for i, n := range node.List { - if i > 0 { - fmt.Fprintf(o, ", ") - } - Print(o, n) - } - fmt.Fprintf(o, "]") - case *Word: - fmt.Fprintf(o, "ast.Word{%q}", node.Text) - case *Literal: - fmt.Fprintf(o, "ast.Lit{%q}", node.Text) - case List: - fmt.Fprintf(o, "ast.List{") - for i, n := range node { - if i > 0 { - fmt.Fprintf(o, ", ") - } - Print(o, n) - } - fmt.Fprintf(o, "}") - - case *Sub: - fmt.Fprintf(o, "ast.Sub{") - Print(o, node.Node) - fmt.Fprintf(o, "}") - - case *Sup: - fmt.Fprintf(o, "ast.Sup{") - Print(o, node.Node) - fmt.Fprintf(o, "}") - - case *Symbol: - fmt.Fprintf(o, "ast.Symbol{%q}", node.Text) - - // case *Op: - // fmt.Fprintf(o, "ast.Op{%q}", node.Text) - - case nil: - fmt.Fprintf(o, "") - - default: - panic(fmt.Errorf("unknown node %T", node)) - } -} - -var ( - _ Node = (*List)(nil) - _ Node = (*Arg)(nil) - _ Node = (*Ident)(nil) - _ Node = (*Macro)(nil) - _ Node = (*MathExpr)(nil) - _ Node = (*OptArg)(nil) - _ Node = (*Word)(nil) - _ Node = (*Literal)(nil) - _ Node = (*Sup)(nil) - _ Node = (*Sub)(nil) - _ Node = (*Symbol)(nil) -) diff --git a/vendor/github.com/go-latex/latex/ast/walk.go b/vendor/github.com/go-latex/latex/ast/walk.go deleted file mode 100644 index 7c95cb2..0000000 --- a/vendor/github.com/go-latex/latex/ast/walk.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ast - -import "fmt" - -// A Visitor's Visit method is invoked for each node encountered by Walk. -// If the result visitor w is not nil, Walk visits each of the children -// of node with the visitor w, followed by a call of w.Visit(nil). -type Visitor interface { - Visit(node Node) (w Visitor) -} - -// Walk traverses an AST in depth-first order: It starts by calling -// v.Visit(node); node must not be nil. If the visitor w returned by -// v.Visit(node) is not nil, Walk is invoked recursively with visitor -// w for each of the non-nil children of node, followed by a call of -// w.Visit(nil). -func Walk(v Visitor, node Node) { - if v = v.Visit(node); v == nil { - return - } - - switch n := node.(type) { - case List: - for _, x := range n { - Walk(v, x) - } - - case *Macro: - if n.Name != nil { - Walk(v, n.Name) - } - walkNodes(v, n.Args) - - case *Arg: - walkNodes(v, n.List) - - case *OptArg: - walkNodes(v, n.List) - - case *Ident: - // nothing to do. - - case *MathExpr: - walkNodes(v, n.List) - - case *Word, *Literal, *Symbol: - // nothing to do. - - case *Sub: - Walk(v, n.Node) - - case *Sup: - Walk(v, n.Node) - - default: - panic(fmt.Errorf("unknown ast node %#v (type=%T)", n, n)) - } - - v.Visit(nil) -} - -func walkNodes(v Visitor, nodes []Node) { - for _, x := range nodes { - Walk(v, x) - } -} - -type inspector func(Node) bool - -func (f inspector) Visit(node Node) Visitor { - if f(node) { - return f - } - return nil -} - -// Inspect traverses an AST in depth-first order: It starts by calling -// f(node); node must not be nil. If f returns true, Inspect invokes f -// recursively for each of the non-nil children of node, followed by a -// call of f(nil). -// -func Inspect(node Node, f func(Node) bool) { - Walk(inspector(f), node) -} diff --git a/vendor/github.com/go-latex/latex/drawtex/canvas.go b/vendor/github.com/go-latex/latex/drawtex/canvas.go deleted file mode 100644 index d9f70ac..0000000 --- a/vendor/github.com/go-latex/latex/drawtex/canvas.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package drawtex describes the graphics interface for drawing LaTeX. -package drawtex // import "github.com/go-latex/latex/drawtex" - -import ( - "github.com/go-latex/latex/font" - "golang.org/x/image/font/sfnt" -) - -type Canvas struct { - ops []Op -} - -func New() *Canvas { - return &Canvas{} -} - -func (c *Canvas) RenderGlyph(x, y float64, infos Glyph) { - c.ops = append(c.ops, GlyphOp{x, y, infos}) -} - -func (c *Canvas) RenderRectFilled(x1, y1, x2, y2 float64) { - c.ops = append(c.ops, RectOp{x1, y1, x2, y2}) -} - -func (c *Canvas) Ops() []Op { return c.ops } - -type Op interface { - isOp() -} - -type GlyphOp struct { - X, Y float64 - Glyph Glyph -} - -func (GlyphOp) isOp() {} - -type RectOp struct { - X1, Y1 float64 - X2, Y2 float64 -} - -func (RectOp) isOp() {} - -type Glyph struct { - Font *sfnt.Font - Size float64 - Postscript string - Metrics font.Metrics - Symbol string - Num sfnt.GlyphIndex - Offset float64 -} - -var ( - _ Op = (*GlyphOp)(nil) - _ Op = (*RectOp)(nil) -) diff --git a/vendor/github.com/go-latex/latex/font/font.go b/vendor/github.com/go-latex/latex/font/font.go deleted file mode 100644 index 970862b..0000000 --- a/vendor/github.com/go-latex/latex/font/font.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package font holds types to handle and abstract away font management. -package font - -// Font represents a font. -type Font struct { - Name string // Name is the LaTeX name of the font (regular, default, it, ...) - Type string // Type is the LaTeX class of the font (it, rm, ...) - Size float64 // Size is the font size in points. -} - -// Backend is the interface that allows to render math expressions. -type Backend interface { - // RenderGlyphs renders the glyph g at the reference point (x,y). - RenderGlyph(x, y float64, font Font, symbol string, dpi float64) - - // RenderRectFilled draws a filled black rectangle from (x1,y1) to (x2,y2). - RenderRectFilled(x1, y1, x2, y2 float64) - - // Kern returns the kerning distance between two symbols. - Kern(ft1 Font, sym1 string, ft2 Font, sym2 string, dpi float64) float64 - - // Metrics returns the metrics. - Metrics(symbol string, font Font, dpi float64, math bool) Metrics - - // XHeight returns the xheight for the given font and dpi. - XHeight(font Font, dpi float64) float64 - - // UnderlineThickness returns the line thickness that matches the given font. - // It is used as a base unit for drawing lines such as in a fraction or radical. - UnderlineThickness(font Font, dpi float64) float64 -} - -// Metrics represents the metrics of a glyph in a given font. -type Metrics struct { - Advance float64 // Advance distance of the glyph, in points. - Height float64 // Height of the glyph in points. - Width float64 // Width of the glyph in points. - - // Ink rectangle of the glyph. - XMin, XMax, YMin, YMax float64 - - // Iceberg is the distance from the baseline to the top of the glyph. - // Iceberg corresponds to TeX's definition of "height". - Iceberg float64 - - // Slanted indicates whether the glyph is slanted. - Slanted bool -} diff --git a/vendor/github.com/go-latex/latex/font/ttf/ttf.go b/vendor/github.com/go-latex/latex/font/ttf/ttf.go deleted file mode 100644 index ef16811..0000000 --- a/vendor/github.com/go-latex/latex/font/ttf/ttf.go +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package ttf provides a truetype font Backend -package ttf // import "github.com/go-latex/latex/font/ttf" - -import ( - "errors" - "fmt" - "unicode" - - "github.com/go-latex/latex/drawtex" - "github.com/go-latex/latex/font" - "github.com/go-latex/latex/internal/tex2unicode" - stdfont "golang.org/x/image/font" - "golang.org/x/image/font/gofont/gobold" - "golang.org/x/image/font/gofont/gobolditalic" - "golang.org/x/image/font/gofont/goitalic" - "golang.org/x/image/font/gofont/goregular" - "golang.org/x/image/font/opentype" - "golang.org/x/image/font/sfnt" - "golang.org/x/image/math/fixed" -) - -type Fonts struct { - Default *sfnt.Font - - Rm *sfnt.Font - It *sfnt.Font - Bf *sfnt.Font - BfIt *sfnt.Font -} - -type Backend struct { - canvas *drawtex.Canvas - glyphs map[ttfKey]ttfVal - fonts map[string]*sfnt.Font -} - -func New(cnv *drawtex.Canvas) *Backend { - return NewFrom(cnv, &defaultFonts) -} - -func NewFrom(cnv *drawtex.Canvas, fnts *Fonts) *Backend { - be := &Backend{ - canvas: cnv, - glyphs: make(map[ttfKey]ttfVal), - fonts: make(map[string]*sfnt.Font), - } - - be.fonts["default"] = fnts.Default - be.fonts["regular"] = fnts.Rm - be.fonts["rm"] = fnts.Rm - be.fonts["it"] = fnts.It - be.fonts["bf"] = fnts.Bf - - return be -} - -// RenderGlyphs renders the glyph g at the reference point (x,y). -func (be *Backend) RenderGlyph(x, y float64, font font.Font, symbol string, dpi float64) { - glyph := be.getInfo(symbol, font, dpi, true) - be.canvas.RenderGlyph(x, y, drawtex.Glyph{ - Font: glyph.font, - Size: glyph.size, - Postscript: glyph.postscript, - Metrics: glyph.metrics, - Symbol: string(glyph.rune), - Num: glyph.glyph, - Offset: glyph.offset, - }) -} - -// RenderRectFilled draws a filled black rectangle from (x1,y1) to (x2,y2). -func (be *Backend) RenderRectFilled(x1, y1, x2, y2 float64) { - be.canvas.RenderRectFilled(x1, y1, x2, y2) -} - -// Metrics returns the metrics. -func (be *Backend) Metrics(symbol string, fnt font.Font, dpi float64, math bool) font.Metrics { - return be.getInfo(symbol, fnt, dpi, math).metrics -} - -func (be *Backend) getInfo(symbol string, fnt font.Font, dpi float64, math bool) ttfVal { - key := ttfKey{symbol, fnt, dpi} - val, ok := be.glyphs[key] - if ok { - return val - } - - var ( - buf sfnt.Buffer - hinting = hintingNone - ) - - ft, rn, _ /*symbol*/, fontSize, slanted := be.getGlyph(symbol, fnt, math) - - postscript, err := ft.Name(&buf, sfnt.NameIDPostScript) - if err != nil { - panic(fmt.Errorf("could not retrieve postscript name of font: %+v", err)) - } - - idx, err := ft.GlyphIndex(&buf, rn) - if err != nil { - panic(fmt.Errorf("could not retrieve glyph index for %q: %+v", rn, err)) - } - - symName, err := ft.GlyphName(&buf, idx) - if err != nil { - panic(fmt.Errorf("could not retrieve glyph name of %q: %+v", rn, err)) - } - - var ppem = int(ft.UnitsPerEm() * 6) - _, err = ft.LoadGlyph(&buf, idx, fixed.I(ppem), nil) - if err != nil { - panic(fmt.Errorf("could not load glyph %q: %+v", rn, err)) - } - - adv, err := ft.GlyphAdvance(&buf, idx, fixed.I(ppem), hinting) - if err != nil { - panic(fmt.Errorf("could not retrieve glyph advance for %q: %+v", rn, err)) - } - - fupe := fixed.Int26_6(ft.UnitsPerEm()) - _, err = ft.LoadGlyph(&buf, idx, fupe, nil) - if err != nil { - panic(fmt.Errorf("could not load glyph %q: %+v", rn, err)) - } - - bnds, _, err := ft.GlyphBounds(&buf, idx, fixed.I(12), hinting) - if err != nil { - panic(err) - } - - var ( - scale = fontSize / 12 - xmin = scale * float64(bnds.Min.X) / 64 - xmax = scale * float64(bnds.Max.X) / 64 - ymin = scale * float64(-bnds.Max.Y) / 64 // FIXME - ymax = scale * float64(-bnds.Min.Y) / 64 // FIXME - width = xmax - xmin - height = ymax - ymin - ) - - offset := 0.0 - if postscript == "Cmex10" { - offset = height/2 + (fnt.Size / 3 * dpi / 72) - } - - me := font.Metrics{ - Advance: float64(adv) / 65536 * fnt.Size / 12, - Height: height, - Width: width, - XMin: xmin, - XMax: xmax, - YMin: ymin + offset, - YMax: ymax + offset, - Iceberg: ymax + offset, - Slanted: slanted, - } - - be.glyphs[key] = ttfVal{ - font: ft, - size: fnt.Size, - postscript: postscript, - metrics: me, - symbolName: symName, - rune: rn, - glyph: idx, - offset: offset, - } - return be.glyphs[key] -} - -// XHeight returns the xheight for the given font and dpi. -func (be *Backend) XHeight(fnt font.Font, dpi float64) float64 { - ft := be.getFont(fnt.Type) - face, err := opentype.NewFace(ft, &opentype.FaceOptions{ - DPI: dpi, - Size: fnt.Size, - Hinting: stdfont.HintingNone, - }) - if err != nil { - panic(fmt.Errorf("could not open font face for font=%s,%g,%s: %+v", - fnt.Name, fnt.Size, fnt.Type, err, - )) - } - defer face.Close() - - return float64(-face.Metrics().XHeight) / 64 -} - -const ( - hintingNone = stdfont.HintingNone - //hintingFull = stdfont.HintingFull -) - -func (be *Backend) getGlyph(symbol string, font font.Font, math bool) (*sfnt.Font, rune, string, float64, bool) { - var ( - fontType = font.Type - idx = tex2unicode.Index(symbol, math) - ) - - // only characters in the "Letter" class should be italicized in "it" mode. - // Greek capital letters should be roman. - if font.Type == "it" && idx < 0x10000 { - if !unicode.Is(unicode.L, idx) { - fontType = "rm" - } - } - slanted := (fontType == "it") || be.isSlanted(symbol) - ft := be.getFont(fontType) - if ft == nil { - panic("could not find TTF font for [" + fontType + "]") - } - - // FIXME(sbinet): - // \sigma -> sigma, A->A, \infty->infinity, \nabla->gradient - // etc... - symbolName := symbol - return ft, idx, symbolName, font.Size, slanted -} - -func (*Backend) isSlanted(symbol string) bool { - switch symbol { - case `\int`, `\oint`: - return true - default: - return false - } -} - -func (be *Backend) getFont(fontType string) *sfnt.Font { - return be.fonts[fontType] -} - -// UnderlineThickness returns the line thickness that matches the given font. -// It is used as a base unit for drawing lines such as in a fraction or radical. -func (*Backend) UnderlineThickness(font font.Font, dpi float64) float64 { - // theoretically, we could grab the underline thickness from the font - // metrics. - // but that information is just too un-reliable. - // so, it is hardcoded. - return (0.75 / 12 * font.Size * dpi) / 72 -} - -// Kern returns the kerning distance between two symbols. -func (be *Backend) Kern(ft1 font.Font, sym1 string, ft2 font.Font, sym2 string, dpi float64) float64 { - if ft1.Name == ft2.Name && ft1.Size == ft2.Size { - const math = true - info1 := be.getInfo(sym1, ft1, dpi, math) - info2 := be.getInfo(sym2, ft2, dpi, math) - scale := fixed.Int26_6(info1.font.UnitsPerEm()) - var buf sfnt.Buffer - k, err := info1.font.Kern(&buf, info1.glyph, info2.glyph, scale, hintingNone) - if err != nil { - if errors.Is(err, sfnt.ErrNotFound) { - return 0 - } - panic(fmt.Errorf("could not compute kerning for %q/%q: %+v", - sym1, sym2, err, - )) - } - return float64(k) / 64 - } - return 0 -} - -type ttfKey struct { - symbol string - font font.Font - dpi float64 -} - -type ttfVal struct { - font *sfnt.Font - size float64 - postscript string - metrics font.Metrics - symbolName string - rune rune - glyph sfnt.GlyphIndex - offset float64 -} - -var defaultFonts = Fonts{ - Rm: mustParseTTF(goregular.TTF), - It: mustParseTTF(goitalic.TTF), - Bf: mustParseTTF(gobold.TTF), - BfIt: mustParseTTF(gobolditalic.TTF), -} - -func mustParseTTF(raw []byte) *sfnt.Font { - ft, err := sfnt.Parse(raw) - if err != nil { - panic(fmt.Errorf("could not parse raw TTF data: %+v", err)) - } - return ft -} - -func init() { - defaultFonts.Default = defaultFonts.Rm -} - -var ( - _ font.Backend = (*Backend)(nil) -) diff --git a/vendor/github.com/go-latex/latex/internal/tex2unicode/utf8.go b/vendor/github.com/go-latex/latex/internal/tex2unicode/utf8.go deleted file mode 100644 index 9ce7822..0000000 --- a/vendor/github.com/go-latex/latex/internal/tex2unicode/utf8.go +++ /dev/null @@ -1,634 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package tex2unicode provides tools for associating TeX symbols to UTF-8. -package tex2unicode // import "github.com/go-latex/latex/internal/tex2unicode" - -import ( - "fmt" - "strings" - "unicode/utf8" -) - -// Index associates a LaTeX symbol or unicode letter to a unicode rune. -func Index(v string, math bool) rune { - if !math { - r, _ := utf8.DecodeRune([]byte(v)) - if r == utf8.RuneError { - panic(fmt.Errorf("tex: invalid rune %q", v)) - } - return r - } - // From UTF #25: U+2212 minus sign is the preferred - // representation of the unary and binary minus sign rather than - // the ASCII-derived U+002D hyphen-minus, because minus sign is - // unambiguous and because it is rendered with a more desirable - // length, usually longer than a hyphen. - if v == "-" { - return 0x2212 - } - - if len(v) == 1 { - r, _ := utf8.DecodeRune([]byte(v)) - if r != utf8.RuneError { - return r - } - } - - r, ok := tex2uni[strings.Replace(v, `\`, "", 1)] - if ok { - return r - } - - panic(fmt.Errorf("%q is not a valid unicode character nor a known TeX symbol", v)) -} - -func HasSymbol(v string) bool { - _, ok := tex2uni[v] - return ok -} - -func Symbols() []string { - names := make([]string, 0, len(tex2uni)) - for k := range tex2uni { - names = append(names, k) - } - return names -} - -var ( - tex2uni = map[string]rune{ - `widehat`: 0x0302, - `widetilde`: 0x0303, - `widebar`: 0x0305, - `langle`: 0x27e8, - `rangle`: 0x27e9, - `perp`: 0x27c2, - `neq`: 0x2260, - `Join`: 0x2a1d, - `leqslant`: 0x2a7d, - `geqslant`: 0x2a7e, - `lessapprox`: 0x2a85, - `gtrapprox`: 0x2a86, - `lesseqqgtr`: 0x2a8b, - `gtreqqless`: 0x2a8c, - `triangleeq`: 0x225c, - `eqslantless`: 0x2a95, - `eqslantgtr`: 0x2a96, - `backepsilon`: 0x03f6, - `precapprox`: 0x2ab7, - `succapprox`: 0x2ab8, - `fallingdotseq`: 0x2252, - `subseteqq`: 0x2ac5, - `supseteqq`: 0x2ac6, - `varpropto`: 0x221d, - `precnapprox`: 0x2ab9, - `succnapprox`: 0x2aba, - `subsetneqq`: 0x2acb, - `supsetneqq`: 0x2acc, - `lnapprox`: 0x2ab9, - `gnapprox`: 0x2aba, - `longleftarrow`: 0x27f5, - `longrightarrow`: 0x27f6, - `longleftrightarrow`: 0x27f7, - `Longleftarrow`: 0x27f8, - `Longrightarrow`: 0x27f9, - `Longleftrightarrow`: 0x27fa, - `longmapsto`: 0x27fc, - `leadsto`: 0x21dd, - `dashleftarrow`: 0x290e, - `dashrightarrow`: 0x290f, - `circlearrowleft`: 0x21ba, - `circlearrowright`: 0x21bb, - `leftrightsquigarrow`: 0x21ad, - `leftsquigarrow`: 0x219c, - `rightsquigarrow`: 0x219d, - `Game`: 0x2141, - `hbar`: 0x0127, - `hslash`: 0x210f, - `ldots`: 0x2026, - `vdots`: 0x22ee, - `doteqdot`: 0x2251, - `doteq`: 8784, - `partial`: 8706, - `gg`: 8811, - `asymp`: 8781, - `blacktriangledown`: 9662, - `otimes`: 8855, - `nearrow`: 8599, - `varpi`: 982, - `vee`: 8744, - `vec`: 8407, - `smile`: 8995, - `succnsim`: 8937, - `gimel`: 8503, - `vert`: 124, - `|`: 124, - `varrho`: 1009, - `P`: 182, - `approxident`: 8779, - `Swarrow`: 8665, - `textasciicircum`: 94, - `imageof`: 8887, - `ntriangleleft`: 8938, - `nleq`: 8816, - `div`: 247, - `nparallel`: 8742, - `Leftarrow`: 8656, - `lll`: 8920, - `oiint`: 8751, - `ngeq`: 8817, - `Theta`: 920, - `origof`: 8886, - `blacksquare`: 9632, - `solbar`: 9023, - `neg`: 172, - `sum`: 8721, - `Vdash`: 8873, - `coloneq`: 8788, - `degree`: 176, - `bowtie`: 8904, - `blacktriangleright`: 9654, - `varsigma`: 962, - `leq`: 8804, - `ggg`: 8921, - `lneqq`: 8808, - `scurel`: 8881, - `stareq`: 8795, - `BbbN`: 8469, - `nLeftarrow`: 8653, - `nLeftrightarrow`: 8654, - `k`: 808, - `bot`: 8869, - `BbbC`: 8450, - `Lsh`: 8624, - `leftleftarrows`: 8647, - `BbbZ`: 8484, - `digamma`: 989, - `BbbR`: 8477, - `BbbP`: 8473, - `BbbQ`: 8474, - `vartriangleright`: 8883, - `succsim`: 8831, - `wedge`: 8743, - `lessgtr`: 8822, - `veebar`: 8891, - `mapsdown`: 8615, - `Rsh`: 8625, - `chi`: 967, - `prec`: 8826, - `nsubseteq`: 8840, - `therefore`: 8756, - `eqcirc`: 8790, - `textexclamdown`: 161, - `nRightarrow`: 8655, - `flat`: 9837, - `notin`: 8713, - `llcorner`: 8990, - `varepsilon`: 949, - `bigtriangleup`: 9651, - `aleph`: 8501, - `dotminus`: 8760, - `upsilon`: 965, - `Lambda`: 923, - `cap`: 8745, - `barleftarrow`: 8676, - `mu`: 956, - `boxplus`: 8862, - `mp`: 8723, - `circledast`: 8859, - `tau`: 964, - `in`: 8712, - `backslash`: 92, - `varnothing`: 8709, - `sharp`: 9839, - `eqsim`: 8770, - `gnsim`: 8935, - `Searrow`: 8664, - `updownarrows`: 8645, - `heartsuit`: 9825, - `trianglelefteq`: 8884, - `ddag`: 8225, - `sqsubseteq`: 8849, - `mapsfrom`: 8612, - `boxbar`: 9707, - `sim`: 8764, - `Nwarrow`: 8662, - `nequiv`: 8802, - `succ`: 8827, - `vdash`: 8866, - `Leftrightarrow`: 8660, - `parallel`: 8741, - `invnot`: 8976, - `natural`: 9838, - `ss`: 223, - `uparrow`: 8593, - `nsim`: 8769, - `hookrightarrow`: 8618, - `Equiv`: 8803, - `approx`: 8776, - `Vvdash`: 8874, - `nsucc`: 8833, - `leftrightharpoons`: 8651, - `Re`: 8476, - `boxminus`: 8863, - `equiv`: 8801, - `Lleftarrow`: 8666, - `ll`: 8810, - `Cup`: 8915, - `measeq`: 8798, - `upharpoonleft`: 8639, - `lq`: 8216, - `Upsilon`: 933, - `subsetneq`: 8842, - `greater`: 62, - `supsetneq`: 8843, - `Cap`: 8914, - `L`: 321, - `spadesuit`: 9824, - `lrcorner`: 8991, - `not`: 824, - `bar`: 772, - `rightharpoonaccent`: 8401, - `boxdot`: 8865, - `l`: 322, - `leftharpoondown`: 8637, - `bigcup`: 8899, - `iint`: 8748, - `bigwedge`: 8896, - `downharpoonleft`: 8643, - `textasciitilde`: 126, - `subset`: 8834, - `leqq`: 8806, - `mapsup`: 8613, - `nvDash`: 8877, - `looparrowleft`: 8619, - `nless`: 8814, - `rightarrowbar`: 8677, - `Vert`: 8214, - `downdownarrows`: 8650, - `uplus`: 8846, - `simeq`: 8771, - `napprox`: 8777, - `ast`: 8727, - `twoheaduparrow`: 8607, - `doublebarwedge`: 8966, - `Sigma`: 931, - `leftharpoonaccent`: 8400, - `ntrianglelefteq`: 8940, - `nexists`: 8708, - `times`: 215, - `measuredangle`: 8737, - `bumpeq`: 8783, - `carriagereturn`: 8629, - `adots`: 8944, - `checkmark`: 10003, - `lambda`: 955, - `xi`: 958, - `rbrace`: 125, - `rbrack`: 93, - `Nearrow`: 8663, - `maltese`: 10016, - `clubsuit`: 9827, - `top`: 8868, - `overarc`: 785, - `varphi`: 966, - `Delta`: 916, - `iota`: 953, - `nleftarrow`: 8602, - `candra`: 784, - `supset`: 8835, - `triangleleft`: 9665, - `gtreqless`: 8923, - `ntrianglerighteq`: 8941, - `quad`: 8195, - `Xi`: 926, - `gtrdot`: 8919, - `leftthreetimes`: 8907, - `minus`: 8722, - `preccurlyeq`: 8828, - `nleftrightarrow`: 8622, - `lambdabar`: 411, - `blacktriangle`: 9652, - `kernelcontraction`: 8763, - `Phi`: 934, - `angle`: 8736, - `spadesuitopen`: 9828, - `eqless`: 8924, - `mid`: 8739, - `varkappa`: 1008, - `Ldsh`: 8626, - `updownarrow`: 8597, - `beta`: 946, - `textquotedblleft`: 8220, - `rho`: 961, - `alpha`: 945, - `intercal`: 8890, - `beth`: 8502, - `grave`: 768, - `acwopencirclearrow`: 8634, - `nmid`: 8740, - `nsupset`: 8837, - `sigma`: 963, - `dot`: 775, - `Rightarrow`: 8658, - `turnednot`: 8985, - `backsimeq`: 8909, - `leftarrowtail`: 8610, - `approxeq`: 8778, - `curlyeqsucc`: 8927, - `rightarrowtail`: 8611, - `Psi`: 936, - `copyright`: 169, - `yen`: 165, - `vartriangleleft`: 8882, - `rasp`: 700, - `triangleright`: 9655, - `precsim`: 8830, - `infty`: 8734, - `geq`: 8805, - `updownarrowbar`: 8616, - `precnsim`: 8936, - `H`: 779, - `ulcorner`: 8988, - `looparrowright`: 8620, - `ncong`: 8775, - `downarrow`: 8595, - `circeq`: 8791, - `subseteq`: 8838, - `bigstar`: 9733, - `prime`: 8242, - `lceil`: 8968, - `Rrightarrow`: 8667, - `oiiint`: 8752, - `curlywedge`: 8911, - `vDash`: 8872, - `lfloor`: 8970, - `ddots`: 8945, - `exists`: 8707, - `underbar`: 817, - `Pi`: 928, - `leftrightarrows`: 8646, - `sphericalangle`: 8738, - `coprod`: 8720, - `circledcirc`: 8858, - `gtrsim`: 8819, - `gneqq`: 8809, - `between`: 8812, - `theta`: 952, - `complement`: 8705, - `arceq`: 8792, - `nVdash`: 8878, - `S`: 167, - `wr`: 8768, - `wp`: 8472, - `backcong`: 8780, - `lasp`: 701, - `c`: 807, - `nabla`: 8711, - `dotplus`: 8724, - `eta`: 951, - `forall`: 8704, - `eth`: 240, - `colon`: 58, - `sqcup`: 8852, - `rightrightarrows`: 8649, - `sqsupset`: 8848, - `mapsto`: 8614, - `bigtriangledown`: 9661, - `sqsupseteq`: 8850, - `propto`: 8733, - `pi`: 960, - `pm`: 177, - `dots`: 0x2026, - `nrightarrow`: 8603, - `textasciiacute`: 180, - `Doteq`: 8785, - `breve`: 774, - `sqcap`: 8851, - `twoheadrightarrow`: 8608, - `kappa`: 954, - `vartriangle`: 9653, - `diamondsuit`: 9826, - `pitchfork`: 8916, - `blacktriangleleft`: 9664, - `nprec`: 8832, - `curvearrowright`: 8631, - `barwedge`: 8892, - `multimap`: 8888, - `textquestiondown`: 191, - `cong`: 8773, - `rtimes`: 8906, - `rightzigzagarrow`: 8669, - `rightarrow`: 8594, - `leftarrow`: 8592, - `__sqrt__`: 8730, - `twoheaddownarrow`: 8609, - `oint`: 8750, - `bigvee`: 8897, - `eqdef`: 8797, - `sterling`: 163, - `phi`: 981, - `Updownarrow`: 8661, - `backprime`: 8245, - `emdash`: 8212, - `Gamma`: 915, - `i`: 305, - `rceil`: 8969, - `leftharpoonup`: 8636, - `Im`: 8465, - `curvearrowleft`: 8630, - `wedgeq`: 8793, - `curlyeqprec`: 8926, - `questeq`: 8799, - `less`: 60, - `upuparrows`: 8648, - `tilde`: 771, - `textasciigrave`: 96, - `smallsetminus`: 8726, - `ell`: 8467, - `cup`: 8746, - `danger`: 9761, - `nVDash`: 8879, - `cdotp`: 183, - `cdots`: 8943, - `hat`: 770, - `eqgtr`: 8925, - `psi`: 968, - `frown`: 8994, - `acute`: 769, - `downzigzagarrow`: 8623, - `ntriangleright`: 8939, - `cupdot`: 8845, - `circleddash`: 8861, - `oslash`: 8856, - `mho`: 8487, - `d`: 803, - `sqsubset`: 8847, - `cdot`: 8901, - `Omega`: 937, - `OE`: 338, - `veeeq`: 8794, - `Finv`: 8498, - `t`: 865, - `leftrightarrow`: 8596, - `swarrow`: 8601, - `rightthreetimes`: 8908, - `rightleftharpoons`: 8652, - `lesssim`: 8818, - `searrow`: 8600, - `because`: 8757, - `gtrless`: 8823, - `star`: 8902, - `nsubset`: 8836, - `zeta`: 950, - `dddot`: 8411, - `bigcirc`: 9675, - `Supset`: 8913, - `circ`: 8728, - `slash`: 8725, - `ocirc`: 778, - `prod`: 8719, - `twoheadleftarrow`: 8606, - `daleth`: 8504, - `upharpoonright`: 8638, - `odot`: 8857, - `Uparrow`: 8657, - `O`: 216, - `hookleftarrow`: 8617, - `trianglerighteq`: 8885, - `nsime`: 8772, - `oe`: 339, - `nwarrow`: 8598, - `o`: 248, - `ddddot`: 8412, - `downharpoonright`: 8642, - `succcurlyeq`: 8829, - `gamma`: 947, - `scrR`: 8475, - `dag`: 8224, - `thickspace`: 8197, - `frakZ`: 8488, - `lessdot`: 8918, - `triangledown`: 9663, - `ltimes`: 8905, - `scrB`: 8492, - `endash`: 8211, - `scrE`: 8496, - `scrF`: 8497, - `scrH`: 8459, - `scrI`: 8464, - `rightharpoondown`: 8641, - `scrL`: 8466, - `scrM`: 8499, - `frakC`: 8493, - `nsupseteq`: 8841, - `circledR`: 174, - `circledS`: 9416, - `ngtr`: 8815, - `bigcap`: 8898, - `scre`: 8495, - `Downarrow`: 8659, - `scrg`: 8458, - `overleftrightarrow`: 8417, - `scro`: 8500, - `lnsim`: 8934, - `eqcolon`: 8789, - `curlyvee`: 8910, - `urcorner`: 8989, - `lbrace`: 123, - `Bumpeq`: 8782, - `delta`: 948, - `boxtimes`: 8864, - `overleftarrow`: 8406, - `prurel`: 8880, - `clubsuitopen`: 9831, - `cwopencirclearrow`: 8635, - `geqq`: 8807, - `rightleftarrows`: 8644, - `ac`: 8766, - `ae`: 230, - `int`: 8747, - `rfloor`: 8971, - `risingdotseq`: 8787, - `nvdash`: 8876, - `diamond`: 8900, - `ddot`: 776, - `backsim`: 8765, - `oplus`: 8853, - `triangleq`: 8796, - `check`: 780, - `ni`: 8715, - `iiint`: 8749, - `ne`: 8800, - `lesseqgtr`: 8922, - `obar`: 9021, - `supseteq`: 8839, - `nu`: 957, - `AA`: 197, - `AE`: 198, - `models`: 8871, - `ominus`: 8854, - `dashv`: 8867, - `omega`: 969, - `rq`: 8217, - `Subset`: 8912, - `rightharpoonup`: 8640, - `Rdsh`: 8627, - `bullet`: 8729, - `divideontimes`: 8903, - `lbrack`: 91, - `textquotedblright`: 8221, - `Colon`: 8759, - `%`: 37, - `$`: 36, - `{`: 123, - `}`: 125, - `_`: 95, - `#`: 35, - `imath`: 0x131, - `circumflexaccent`: 770, - `combiningbreve`: 774, - `combiningoverline`: 772, - `combininggraveaccent`: 768, - `combiningacuteaccent`: 769, - `combiningdiaeresis`: 776, - `combiningtilde`: 771, - `combiningrightarrowabove`: 8407, - `combiningdotabove`: 775, - `to`: 8594, - `succeq`: 8829, - `emptyset`: 8709, - `(`: 40, - `)`: 41, - `leftparen`: 40, - `rightparen`: 41, - `bigoplus`: 10753, - `leftangle`: 10216, - `rightangle`: 10217, - `leftbrace`: 124, - `rightbrace`: 125, - `jmath`: 567, - `bigodot`: 10752, - `preceq`: 8828, - `biguplus`: 10756, - `epsilon`: 949, - `vartheta`: 977, - `bigotimes`: 10754, - `guillemotleft`: 171, - `ring`: 730, - `Thorn`: 222, - `guilsinglright`: 8250, - `perthousand`: 8240, - `macron`: 175, - `cent`: 162, - `guillemotright`: 187, - `equal`: 61, - `asterisk`: 42, - `guilsinglleft`: 8249, - `plus`: 43, - `thorn`: 254, - `dagger`: 8224, - } -) diff --git a/vendor/github.com/go-latex/latex/latex.go b/vendor/github.com/go-latex/latex/latex.go deleted file mode 100644 index 0691d24..0000000 --- a/vendor/github.com/go-latex/latex/latex.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package latex provides types and functions to work with LaTeX. -package latex // import "github.com/go-latex/latex" diff --git a/vendor/github.com/go-latex/latex/macros.go b/vendor/github.com/go-latex/latex/macros.go deleted file mode 100644 index 82a7335..0000000 --- a/vendor/github.com/go-latex/latex/macros.go +++ /dev/null @@ -1,361 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package latex - -import ( - "strings" - - "github.com/go-latex/latex/ast" - "github.com/go-latex/latex/internal/tex2unicode" -) - -type macroParser interface { - parseMacro(p *parser) ast.Node -} - -func (p *parser) addBuiltinMacros() { - p.macros = map[string]macroParser{ - // binary operators - `\amalg`: builtinMacro(""), - `\ast`: builtinMacro(""), - `\bigcirc`: builtinMacro(""), - `\bigtriangledown`: builtinMacro(""), - `\bigtriangleup`: builtinMacro(""), - `\bullet`: builtinMacro(""), - `\cdot`: builtinMacro(""), - `\circ`: builtinMacro(""), - `\cap`: builtinMacro(""), - `\cup`: builtinMacro(""), - `\dagger`: builtinMacro(""), - `\ddagger`: builtinMacro(""), - `\diamond`: builtinMacro(""), - `\div`: builtinMacro(""), - `\lhd`: builtinMacro(""), - `\mp`: builtinMacro(""), - `\odot`: builtinMacro(""), - `\ominus`: builtinMacro(""), - `\oplus`: builtinMacro(""), - `\oslash`: builtinMacro(""), - `\otimes`: builtinMacro(""), - `\pm`: builtinMacro(""), - `\rhd`: builtinMacro(""), - `\setminus`: builtinMacro(""), - `\sqcap`: builtinMacro(""), - `\sqcup`: builtinMacro(""), - `\star`: builtinMacro(""), - `\times`: builtinMacro(""), - `\triangleleft`: builtinMacro(""), - `\triangleright`: builtinMacro(""), - `\uplus`: builtinMacro(""), - `\unlhd`: builtinMacro(""), - `\unrhd`: builtinMacro(""), - `\vee`: builtinMacro(""), - `\wedge`: builtinMacro(""), - `\wr`: builtinMacro(""), - - // arithmetic operators - `\binom`: builtinMacro("AA"), - `\dfrac`: builtinMacro("AA"), - `\frac`: builtinMacro("AA"), - `\stackrel`: builtinMacro("AA"), - `\tfrac`: builtinMacro("AA"), - `\genfrac`: nil, // FIXME(sbinet) - - // relation symbols - `\approx`: builtinMacro(""), - `\asymp`: builtinMacro(""), - `\bowtie`: builtinMacro(""), - `\cong`: builtinMacro(""), - `\dashv`: builtinMacro(""), - `\doteq`: builtinMacro(""), - `\doteqdot`: builtinMacro(""), - `\dotplus`: builtinMacro(""), - `\dots`: builtinMacro(""), - `\equiv`: builtinMacro(""), - `\frown`: builtinMacro(""), - `\geq`: builtinMacro(""), - `\gg`: builtinMacro(""), - `\in`: builtinMacro(""), - `\leq`: builtinMacro(""), - `\ll`: builtinMacro(""), - `\mid`: builtinMacro(""), - `\models`: builtinMacro(""), - `\neq`: builtinMacro(""), - `\ni`: builtinMacro(""), - `\parallel`: builtinMacro(""), - `\perp`: builtinMacro(""), - `\prec`: builtinMacro(""), - `\preceq`: builtinMacro(""), - `\propto`: builtinMacro(""), - `\sim`: builtinMacro(""), - `\simeq`: builtinMacro(""), - `\smile`: builtinMacro(""), - `\sqsubset`: builtinMacro(""), - `\sqsubseteq`: builtinMacro(""), - `\sqsupset`: builtinMacro(""), - `\sqsupseteq`: builtinMacro(""), - `\subset`: builtinMacro(""), - `\subseteq`: builtinMacro(""), - `\succ`: builtinMacro(""), - `\succeq`: builtinMacro(""), - `\supset`: builtinMacro(""), - `\supseteq`: builtinMacro(""), - `\vdash`: builtinMacro(""), - `\Join`: builtinMacro(""), - - // arrow symbols - `\downarrow`: builtinMacro(""), - `\hookleftarrow`: builtinMacro(""), - `\hookrightarrow`: builtinMacro(""), - `\leadsto`: builtinMacro(""), - `\leftarrow`: builtinMacro(""), - `\leftharpoondown`: builtinMacro(""), - `\leftharpoonup`: builtinMacro(""), - `\leftrightarrow`: builtinMacro(""), - `\longleftarrow`: builtinMacro(""), - `\longleftrightarrow`: builtinMacro(""), - `\longmapsto`: builtinMacro(""), - `\longrightarrow`: builtinMacro(""), - `\rightarrow`: builtinMacro(""), - `\mapsto`: builtinMacro(""), - `\nearrow`: builtinMacro(""), - `\nwarrow`: builtinMacro(""), - `\rightharpoondown`: builtinMacro(""), - `\rightharpoonup`: builtinMacro(""), - `\rightleftharpoons`: builtinMacro(""), - `\searrow`: builtinMacro(""), - `\swarrow`: builtinMacro(""), - `\uparrow`: builtinMacro(""), - `\updownarrow`: builtinMacro(""), - `\Downarrow`: builtinMacro(""), - `\Leftarrow`: builtinMacro(""), - `\Leftrightarrow`: builtinMacro(""), - `\Longleftarrow`: builtinMacro(""), - `\Longleftrightarrow`: builtinMacro(""), - `\Longrightarrow`: builtinMacro(""), - `\Rightarrow`: builtinMacro(""), - `\Uparrow`: builtinMacro(""), - `\Updownarrow`: builtinMacro(""), - - // punctuation symbols - `\ldotp`: builtinMacro(""), - `\cdotp`: builtinMacro(""), - - // over-under symbols - `\bigcap`: builtinMacro(""), - `\bigcup`: builtinMacro(""), - `\bigodot`: builtinMacro(""), - `\bigoplus`: builtinMacro(""), - `\bigotimes`: builtinMacro(""), - `\bigsqcup`: builtinMacro(""), - `\biguplus`: builtinMacro(""), - `\bigvee`: builtinMacro(""), - `\bigwedge`: builtinMacro(""), - `\coprod`: builtinMacro(""), - `\prod`: builtinMacro(""), - `\sum`: builtinMacro(""), - - // over-under functions - `\lim`: builtinMacro(""), - `\liminf`: builtinMacro(""), - `\limsup`: builtinMacro(""), - `\max`: builtinMacro(""), - `\min`: builtinMacro(""), - `\sup`: builtinMacro(""), - - // dropsub symbols - `\int`: builtinMacro(""), - `\oint`: builtinMacro(""), - - // font names - `\rm`: builtinMacro(""), - `\cal`: builtinMacro(""), - `\it`: builtinMacro(""), - `\tt`: builtinMacro(""), - `\sf`: builtinMacro(""), - `\bf`: builtinMacro(""), - `\default`: builtinMacro(""), - `\bb`: builtinMacro(""), - `\frak`: builtinMacro(""), - `\scr`: builtinMacro(""), - `\regular`: builtinMacro(""), - - // function names - `\arccos`: builtinMacro(""), - `\arcsin`: builtinMacro(""), - `\arctan`: builtinMacro(""), - `\arg`: builtinMacro(""), - `\cos`: builtinMacro(""), - `\cosh`: builtinMacro(""), - `\cot`: builtinMacro(""), - `\coth`: builtinMacro(""), - `\csc`: builtinMacro(""), - `\deg`: builtinMacro(""), - `\det`: builtinMacro(""), - `\dim`: builtinMacro(""), - `\exp`: builtinMacro("A"), - `\gcd`: builtinMacro(""), - `\hom`: builtinMacro(""), - `\inf`: builtinMacro(""), - `\ker`: builtinMacro(""), - `\lg`: builtinMacro(""), - `\ln`: builtinMacro(""), - `\log`: builtinMacro(""), - `\sec`: builtinMacro(""), - `\sin`: builtinMacro(""), - `\sinh`: builtinMacro(""), - `\sqrt`: builtinMacro("OA"), - `\tan`: builtinMacro(""), - `\tanh`: builtinMacro(""), - `\Pr`: builtinMacro(""), - - // ambi delim - `\backslash`: builtinMacro(""), - `\vert`: builtinMacro(""), - `\Vert`: builtinMacro(""), - - // left delim - `\{`: builtinMacro(""), - `\(`: builtinMacro(""), - `\langle`: builtinMacro(""), - `\lceil`: builtinMacro(""), - `\lfloor`: builtinMacro(""), - - // right delim - `\}`: builtinMacro(""), - `\)`: builtinMacro(""), - `\rangle`: builtinMacro(""), - `\rceil`: builtinMacro(""), - `\rfloor`: builtinMacro(""), - - // symbols - `\alpha`: builtinMacro(""), - `\beta`: builtinMacro(""), - `\gamma`: builtinMacro(""), - `\delta`: builtinMacro(""), - `\iota`: builtinMacro(""), - `\epsilon`: builtinMacro(""), - `\eta`: builtinMacro(""), - `\kappa`: builtinMacro(""), - `\lambda`: builtinMacro(""), - `\mu`: builtinMacro(""), - `\nu`: builtinMacro(""), - `\omicron`: builtinMacro(""), - `\pi`: builtinMacro(""), - `\theta`: builtinMacro(""), - `\xi`: builtinMacro(""), - `\rho`: builtinMacro(""), - `\sigma`: builtinMacro(""), - `\tau`: builtinMacro(""), - `\upsilon`: builtinMacro(""), - `\phi`: builtinMacro(""), - `\chi`: builtinMacro(""), - `\psi`: builtinMacro(""), - `\omega`: builtinMacro(""), - `\zeta`: builtinMacro(""), - `\Alpha`: builtinMacro(""), - `\Beta`: builtinMacro(""), - `\Gamma`: builtinMacro(""), - `\Delta`: builtinMacro(""), - `\Epsilon`: builtinMacro(""), - `\Zeta`: builtinMacro(""), - `\Eta`: builtinMacro(""), - `\Theta`: builtinMacro(""), - `\Iota`: builtinMacro(""), - `\Kappa`: builtinMacro(""), - `\Lambda`: builtinMacro(""), - `\Mu`: builtinMacro(""), - `\Nu`: builtinMacro(""), - `\Xi`: builtinMacro(""), - `\Omicron`: builtinMacro(""), - `\Pi`: builtinMacro(""), - `\Rho`: builtinMacro(""), - `\Sigma`: builtinMacro(""), - `\Tau`: builtinMacro(""), - `\Upsilon`: builtinMacro(""), - `\Phi`: builtinMacro(""), - `\Chi`: builtinMacro(""), - `\Psi`: builtinMacro(""), - `\Omega`: builtinMacro(""), - `\hbar`: builtinMacro(""), - `\nabla`: builtinMacro(""), - - // math font - `\mathbf`: builtinMacro("A"), - `\mathit`: builtinMacro("A"), - `\mathsf`: builtinMacro("A"), - `\mathtt`: builtinMacro("A"), - `\mathcal`: builtinMacro("A"), - `\mathdefault`: builtinMacro("A"), - `\mathbb`: builtinMacro("A"), - `\mathfrak`: builtinMacro("A"), - `\mathscr`: builtinMacro("A"), - `\mathregular`: builtinMacro("A"), - - // text - `\textbf`: builtinMacro("A"), - `\textit`: builtinMacro("A"), - `\textsf`: builtinMacro("A"), - `\texttt`: builtinMacro("A"), - `\textcal`: builtinMacro("A"), - `\textdefault`: builtinMacro("A"), - `\textbb`: builtinMacro("A"), - `\textfrak`: builtinMacro("A"), - `\textscr`: builtinMacro("A"), - `\textregular`: builtinMacro("A"), - - // space, symbols - `\ `: builtinMacro(""), - `\,`: builtinMacro(""), - `\;`: builtinMacro(""), - `\!`: builtinMacro(""), - `\quad`: builtinMacro(""), - `\qquad`: builtinMacro(""), - `\:`: builtinMacro(""), - `\cdots`: builtinMacro(""), - `\ddots`: builtinMacro(""), - `\ldots`: builtinMacro(""), - `\vdots`: builtinMacro(""), - `\hspace`: builtinMacro("A"), - - // catch-all - // - `\overline`: builtinMacro("A"), - `\operatorname`: builtinMacro("A"), - } - - // add all known UTF-8 symbols - for _, k := range tex2unicode.Symbols() { - _, ok := p.macros[`\`+k] - if ok { - continue - } - p.macros[`\`+k] = builtinMacro("") - } -} - -type builtinMacro string - -func (m builtinMacro) parseMacro(p *parser) ast.Node { - node := &ast.Macro{ - Name: &ast.Ident{ - NamePos: p.s.tok.Pos, - Name: p.s.tok.Text, - }, - } - - for _, typ := range strings.ToLower(string(m)) { - switch typ { - case 'a': - p.parseMacroArg(node) - case 'o': - p.parseOptMacroArg(node) - case 'v': - p.parseVerbatimMacroArg(node) - } - } - - return node -} diff --git a/vendor/github.com/go-latex/latex/mtex/README.md b/vendor/github.com/go-latex/latex/mtex/README.md deleted file mode 100644 index f95c29a..0000000 --- a/vendor/github.com/go-latex/latex/mtex/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# mtex - -`mtex` provides a Go implementation of a naive LaTeX-like math expression parser and renderer. - -## Example - -``` -$> mtex-render -font-size=48 -dpi=100 "$\sum\sqrt{\frac{a+b}{2\pi}}\cos\omega\binom{a+b}{\beta}\prod \alpha x\int\frac{\partial x}{x}\hbar$" -``` - -![mtex-example](https://github.com/go-latex/latex/raw/master/mtex/testdata/mtex-example.png) diff --git a/vendor/github.com/go-latex/latex/mtex/macros.go b/vendor/github.com/go-latex/latex/mtex/macros.go deleted file mode 100644 index 38a83fd..0000000 --- a/vendor/github.com/go-latex/latex/mtex/macros.go +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mtex - -import ( - "strings" - - "github.com/go-latex/latex/ast" - "github.com/go-latex/latex/tex" -) - -type handlerFunc func(p *parser, node ast.Node, state tex.State, math bool) tex.Node - -func (h handlerFunc) Handle(p *parser, node ast.Node, state tex.State, math bool) tex.Node { - return h(p, node, state, math) -} - -type handler interface { - Handle(p *parser, node ast.Node, state tex.State, math bool) tex.Node -} - -var ( - builtinMacros = map[string]handler{ - // binary operators - `\amalg`: builtinMacro(""), - `\ast`: builtinMacro(""), - `\bigcirc`: builtinMacro(""), - `\bigtriangledown`: builtinMacro(""), - `\bigtriangleup`: builtinMacro(""), - `\bullet`: builtinMacro(""), - `\cdot`: builtinMacro(""), - `\circ`: builtinMacro(""), - `\cap`: builtinMacro(""), - `\cup`: builtinMacro(""), - `\dagger`: builtinMacro(""), - `\ddagger`: builtinMacro(""), - `\diamond`: builtinMacro(""), - `\div`: builtinMacro(""), - `\lhd`: builtinMacro(""), - `\mp`: builtinMacro(""), - `\odot`: builtinMacro(""), - `\ominus`: builtinMacro(""), - `\oplus`: builtinMacro(""), - `\oslash`: builtinMacro(""), - `\otimes`: builtinMacro(""), - `\pm`: builtinMacro(""), - `\rhd`: builtinMacro(""), - `\setminus`: builtinMacro(""), - `\sqcap`: builtinMacro(""), - `\sqcup`: builtinMacro(""), - `\star`: builtinMacro(""), - `\times`: builtinMacro(""), - `\triangleleft`: builtinMacro(""), - `\triangleright`: builtinMacro(""), - `\uplus`: builtinMacro(""), - `\unlhd`: builtinMacro(""), - `\unrhd`: builtinMacro(""), - `\vee`: builtinMacro(""), - `\wedge`: builtinMacro(""), - `\wr`: builtinMacro(""), - - // arithmetic operators - `\binom`: builtinMacro("AA"), - `\dfrac`: builtinMacro("AA"), - `\frac`: builtinMacro("AA"), - `\stackrel`: builtinMacro("AA"), - `\tfrac`: builtinMacro("AA"), - `\genfrac`: nil, // FIXME(sbinet) - - // relation symbols - `\approx`: builtinMacro(""), - `\asymp`: builtinMacro(""), - `\bowtie`: builtinMacro(""), - `\cong`: builtinMacro(""), - `\dashv`: builtinMacro(""), - `\doteq`: builtinMacro(""), - `\doteqdot`: builtinMacro(""), - `\dotplus`: builtinMacro(""), - `\dots`: builtinMacro(""), - `\equiv`: builtinMacro(""), - `\frown`: builtinMacro(""), - `\geq`: builtinMacro(""), - `\gg`: builtinMacro(""), - `\in`: builtinMacro(""), - `\leq`: builtinMacro(""), - `\ll`: builtinMacro(""), - `\mid`: builtinMacro(""), - `\models`: builtinMacro(""), - `\neq`: builtinMacro(""), - `\ni`: builtinMacro(""), - `\parallel`: builtinMacro(""), - `\perp`: builtinMacro(""), - `\prec`: builtinMacro(""), - `\preceq`: builtinMacro(""), - `\propto`: builtinMacro(""), - `\sim`: builtinMacro(""), - `\simeq`: builtinMacro(""), - `\smile`: builtinMacro(""), - `\sqsubset`: builtinMacro(""), - `\sqsubseteq`: builtinMacro(""), - `\sqsupset`: builtinMacro(""), - `\sqsupseteq`: builtinMacro(""), - `\subset`: builtinMacro(""), - `\subseteq`: builtinMacro(""), - `\succ`: builtinMacro(""), - `\succeq`: builtinMacro(""), - `\supset`: builtinMacro(""), - `\supseteq`: builtinMacro(""), - `\vdash`: builtinMacro(""), - `\Join`: builtinMacro(""), - - // arrow symbols - `\downarrow`: builtinMacro(""), - `\hookleftarrow`: builtinMacro(""), - `\hookrightarrow`: builtinMacro(""), - `\leadsto`: builtinMacro(""), - `\leftarrow`: builtinMacro(""), - `\leftharpoondown`: builtinMacro(""), - `\leftharpoonup`: builtinMacro(""), - `\leftrightarrow`: builtinMacro(""), - `\longleftarrow`: builtinMacro(""), - `\longleftrightarrow`: builtinMacro(""), - `\longmapsto`: builtinMacro(""), - `\longrightarrow`: builtinMacro(""), - `\rightarrow`: builtinMacro(""), - `\mapsto`: builtinMacro(""), - `\nearrow`: builtinMacro(""), - `\nwarrow`: builtinMacro(""), - `\rightharpoondown`: builtinMacro(""), - `\rightharpoonup`: builtinMacro(""), - `\rightleftharpoons`: builtinMacro(""), - `\searrow`: builtinMacro(""), - `\swarrow`: builtinMacro(""), - `\uparrow`: builtinMacro(""), - `\updownarrow`: builtinMacro(""), - `\Downarrow`: builtinMacro(""), - `\Leftarrow`: builtinMacro(""), - `\Leftrightarrow`: builtinMacro(""), - `\Longleftarrow`: builtinMacro(""), - `\Longleftrightarrow`: builtinMacro(""), - `\Longrightarrow`: builtinMacro(""), - `\Rightarrow`: builtinMacro(""), - `\Uparrow`: builtinMacro(""), - `\Updownarrow`: builtinMacro(""), - - // punctuation symbols - `\ldotp`: builtinMacro(""), - `\cdotp`: builtinMacro(""), - - // over-under symbols - `\bigcap`: builtinMacro(""), - `\bigcup`: builtinMacro(""), - `\bigodot`: builtinMacro(""), - `\bigoplus`: builtinMacro(""), - `\bigotimes`: builtinMacro(""), - `\bigsqcup`: builtinMacro(""), - `\biguplus`: builtinMacro(""), - `\bigvee`: builtinMacro(""), - `\bigwedge`: builtinMacro(""), - `\coprod`: builtinMacro(""), - `\prod`: builtinMacro(""), - `\sum`: builtinMacro(""), - - // over-under functions - `\lim`: builtinMacro(""), - `\liminf`: builtinMacro(""), - `\limsup`: builtinMacro(""), - `\max`: builtinMacro(""), - `\min`: builtinMacro(""), - `\sup`: builtinMacro(""), - - // dropsub symbols - `\int`: builtinMacro(""), - `\oint`: builtinMacro(""), - - // font names - `\rm`: builtinMacro(""), - `\cal`: builtinMacro(""), - `\it`: builtinMacro(""), - `\tt`: builtinMacro(""), - `\sf`: builtinMacro(""), - `\bf`: builtinMacro(""), - `\default`: builtinMacro(""), - `\bb`: builtinMacro(""), - `\frak`: builtinMacro(""), - `\scr`: builtinMacro(""), - `\regular`: builtinMacro(""), - - // function names - `\arccos`: builtinMacro(""), - `\arcsin`: builtinMacro(""), - `\arctan`: builtinMacro(""), - `\arg`: builtinMacro(""), - `\cos`: builtinMacro(""), - `\cosh`: builtinMacro(""), - `\cot`: builtinMacro(""), - `\coth`: builtinMacro(""), - `\csc`: builtinMacro(""), - `\deg`: builtinMacro(""), - `\det`: builtinMacro(""), - `\dim`: builtinMacro(""), - `\exp`: builtinMacro("A"), - `\gcd`: builtinMacro(""), - `\hom`: builtinMacro(""), - `\inf`: builtinMacro(""), - `\ker`: builtinMacro(""), - `\lg`: builtinMacro(""), - `\ln`: builtinMacro(""), - `\log`: builtinMacro(""), - `\sec`: builtinMacro(""), - `\sin`: builtinMacro(""), - `\sinh`: builtinMacro(""), - `\sqrt`: builtinMacro("OA"), - `\tan`: builtinMacro(""), - `\tanh`: builtinMacro(""), - `\Pr`: builtinMacro(""), - - // ambi delim - `\backslash`: builtinMacro(""), - `\vert`: builtinMacro(""), - `\Vert`: builtinMacro(""), - - // left delim - `\{`: builtinMacro(""), - `\(`: builtinMacro(""), - `(`: builtinMacro(""), - `\langle`: builtinMacro(""), - `\lceil`: builtinMacro(""), - `\lfloor`: builtinMacro(""), - - // right delim - `\}`: builtinMacro(""), - `\)`: builtinMacro(""), - `)`: builtinMacro(""), - `\rangle`: builtinMacro(""), - `\rceil`: builtinMacro(""), - `\rfloor`: builtinMacro(""), - - // symbols - `\alpha`: builtinMacro(""), - `\beta`: builtinMacro(""), - `\gamma`: builtinMacro(""), - `\delta`: builtinMacro(""), - `\iota`: builtinMacro(""), - `\epsilon`: builtinMacro(""), - `\eta`: builtinMacro(""), - `\kappa`: builtinMacro(""), - `\lambda`: builtinMacro(""), - `\mu`: builtinMacro(""), - `\nu`: builtinMacro(""), - `\omicron`: builtinMacro(""), - `\pi`: builtinMacro(""), - `\theta`: builtinMacro(""), - `\xi`: builtinMacro(""), - `\rho`: builtinMacro(""), - `\sigma`: builtinMacro(""), - `\tau`: builtinMacro(""), - `\upsilon`: builtinMacro(""), - `\phi`: builtinMacro(""), - `\chi`: builtinMacro(""), - `\psi`: builtinMacro(""), - `\omega`: builtinMacro(""), - `\zeta`: builtinMacro(""), - `\Alpha`: builtinMacro(""), - `\Beta`: builtinMacro(""), - `\Gamma`: builtinMacro(""), - `\Delta`: builtinMacro(""), - `\Epsilon`: builtinMacro(""), - `\Zeta`: builtinMacro(""), - `\Eta`: builtinMacro(""), - `\Theta`: builtinMacro(""), - `\Iota`: builtinMacro(""), - `\Kappa`: builtinMacro(""), - `\Lambda`: builtinMacro(""), - `\Mu`: builtinMacro(""), - `\Nu`: builtinMacro(""), - `\Xi`: builtinMacro(""), - `\Omicron`: builtinMacro(""), - `\Pi`: builtinMacro(""), - `\Rho`: builtinMacro(""), - `\Sigma`: builtinMacro(""), - `\Tau`: builtinMacro(""), - `\Upsilon`: builtinMacro(""), - `\Phi`: builtinMacro(""), - `\Chi`: builtinMacro(""), - `\Psi`: builtinMacro(""), - `\Omega`: builtinMacro(""), - `\hbar`: builtinMacro(""), - `\nabla`: builtinMacro(""), - - // math font - `\mathbf`: builtinMacro("A"), - `\mathit`: builtinMacro("A"), - `\mathsf`: builtinMacro("A"), - `\mathtt`: builtinMacro("A"), - `\mathcal`: builtinMacro("A"), - `\mathdefault`: builtinMacro("A"), - `\mathbb`: builtinMacro("A"), - `\mathfrak`: builtinMacro("A"), - `\mathscr`: builtinMacro("A"), - `\mathregular`: builtinMacro("A"), - - // text - `\textbf`: builtinMacro("A"), - `\textit`: builtinMacro("A"), - `\textsf`: builtinMacro("A"), - `\texttt`: builtinMacro("A"), - `\textcal`: builtinMacro("A"), - `\textdefault`: builtinMacro("A"), - `\textbb`: builtinMacro("A"), - `\textfrak`: builtinMacro("A"), - `\textscr`: builtinMacro("A"), - `\textregular`: builtinMacro("A"), - - // space, symbols - `\ `: builtinMacro(""), - `\,`: builtinMacro(""), - `\;`: builtinMacro(""), - `\!`: builtinMacro(""), - `\quad`: builtinMacro(""), - `\qquad`: builtinMacro(""), - `\:`: builtinMacro(""), - `\cdots`: builtinMacro(""), - `\ddots`: builtinMacro(""), - `\ldots`: builtinMacro(""), - `\vdots`: builtinMacro(""), - `\hspace`: builtinMacro("A"), - - // catch-all - // - `\overline`: builtinMacro("A"), - `\operatorname`: builtinMacro("A"), - } -) - -type builtinMacro string - -func (m builtinMacro) Handle(p *parser, n ast.Node, state tex.State, math bool) tex.Node { - node := n.(*ast.Macro) - if m == "" { - return tex.NewChar(node.Name.Name, state, math) - } - - for _, typ := range strings.ToLower(string(m)) { - switch typ { - case 'a': - panic("not implemented") - case 'o': - panic("not implemented") - case 'v': - panic("not implemented") - } - } - - return nil -} diff --git a/vendor/github.com/go-latex/latex/mtex/mtex.go b/vendor/github.com/go-latex/latex/mtex/mtex.go deleted file mode 100644 index 30705d4..0000000 --- a/vendor/github.com/go-latex/latex/mtex/mtex.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package mtex provides tools to render LaTeX math expressions. -package mtex diff --git a/vendor/github.com/go-latex/latex/mtex/parser.go b/vendor/github.com/go-latex/latex/mtex/parser.go deleted file mode 100644 index fd53aad..0000000 --- a/vendor/github.com/go-latex/latex/mtex/parser.go +++ /dev/null @@ -1,573 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mtex - -import ( - "fmt" - "math" - "strconv" - "strings" - - "github.com/go-latex/latex" - "github.com/go-latex/latex/ast" - "github.com/go-latex/latex/font" - "github.com/go-latex/latex/internal/tex2unicode" - "github.com/go-latex/latex/mtex/symbols" - "github.com/go-latex/latex/tex" -) - -// Parse parses a LaTeX math expression and returns the TeX-like box model -// and an error if any. -func Parse(expr string, fontSize, DPI float64, backend font.Backend) (tex.Node, error) { - p := newParser(backend) - return p.parse(expr, fontSize, DPI) -} - -type parser struct { - be font.Backend - - expr string - macros map[string]handler -} - -func newParser(be font.Backend) *parser { - p := &parser{ - be: be, - macros: make(map[string]handler), - } - p.init() - - return p -} - -func (p *parser) parse(x string, size, dpi float64) (tex.Node, error) { - p.expr = x - node, err := latex.ParseExpr(x) - if err != nil { - return nil, fmt.Errorf("could not parse latex expression %q: %w", x, err) - } - - state := tex.NewState(p.be, font.Font{ - Name: "default", - Size: size, - Type: "rm", - }, dpi) - - v := visitor{p: p, state: state} - ast.Walk(&v, node) - nodes := tex.HListOf(v.nodes, true) - - return nodes, nil -} - -type visitor struct { - p *parser - nodes []tex.Node - state tex.State - math bool -} - -func (v *visitor) Visit(n ast.Node) ast.Visitor { - switch n := n.(type) { - case ast.List: - case *ast.Symbol: - switch { - case v.math: - h := v.p.handler(n.Text) - if h == nil { - panic("no handler for symbol [" + n.Text + "]") - } - v.nodes = append(v.nodes, h.Handle(v.p, n, v.state, v.math)) - default: - v.nodes = append(v.nodes, tex.NewChar(string(n.Text), v.state, v.math)) - } - case *ast.Word: - var nodes []tex.Node - for _, x := range n.Text { - nodes = append(nodes, tex.NewChar(string(x), v.state, v.math)) - } - v.nodes = append(v.nodes, tex.HListOf(nodes, true)) - case *ast.Literal: - h := handlerFunc(handleSymbol) - for _, c := range n.Text { - n := &ast.Literal{Text: string(c)} - v.nodes = append(v.nodes, h.Handle(v.p, n, v.state, v.math)) - } - - case *ast.MathExpr: - oldm := v.math - oldt := v.state.Font.Type - v.math = true - v.state.Font.Type = rcparams("mathtext.default").(string) - - for _, x := range n.List { - v.Visit(x) - } - v.math = oldm - v.state.Font.Type = oldt - return nil - - case *ast.Macro: - if n.Name == nil { - panic("macro with nil identifier") - } - macro := n.Name.Name - h := v.p.handler(macro) - if h == nil { - panic(fmt.Errorf("unknown macro %q", macro)) - } - v.nodes = append(v.nodes, h.Handle(v.p, n, v.state, v.math)) - return nil - - case nil: - return v - - default: - panic(fmt.Errorf("unknown ast node %T", n)) - } - return v -} - -func (p *parser) handleNode(node ast.Node, state tex.State, math bool) tex.Node { - v := visitor{p: p, state: state, math: math} - ast.Walk(&v, node) - return tex.HListOf(v.nodes, true) -} - -func (p *parser) handler(name string) handler { - if _, ok := spaceWidth[name]; ok { - return handlerFunc(handleSpace) - } - if symbols.IsSpaced(name) || symbols.PunctuationSymbols.Has(name) { - return handlerFunc(handleSymbol) - } - if name == `\hspace` { - return handlerFunc(handleCustomSpace) - } - if symbols.FunctionNames.Has(name[1:]) { // drop leading `\` - return handlerFunc(handleFunction) - } - switch name { - case `\frac`: - return handlerFunc(handleFrac) - case `\dfrac`: - return handlerFunc(handleDFrac) - case `\tfrac`: - return handlerFunc(handleTFrac) - case `\binom`: - return handlerFunc(handleBinom) - // case `\genfrac`: - // return handlerFunc(handleGenFrac) - case `\sqrt`: - return handlerFunc(handleSqrt) - case `\overline`: - return handlerFunc(handleOverline) - } - _, ok := p.macros[name] - if ok { - return handlerFunc(handleSymbol) - } - return nil -} - -func (p *parser) init() { - for _, k := range tex2unicode.Symbols() { - p.macros[`\`+k] = builtinMacro("") - } - for k, v := range builtinMacros { - p.macros[k] = v - } -} - -func handleSymbol(p *parser, node ast.Node, state tex.State, math bool) tex.Node { - pos := int(node.Pos()) - sym := "" - switch node := node.(type) { - case *ast.Macro: - sym = node.Name.Name - case *ast.Symbol: - sym = node.Text - case *ast.Word: - sym = node.Text - case *ast.Literal: - sym = node.Text - default: - panic("invalid ast Node") - } - ch := tex.NewChar(sym, state, math) - switch { - case symbols.IsSpaced(sym): - i := strings.LastIndexFunc(p.expr[:pos], func(r rune) bool { - return r != ' ' - }) - prev := "" - if i >= 0 { - prev = string(p.expr[i]) - } - switch { - case symbols.BinaryOperators.Has(sym) && (len(strings.Split(p.expr[:pos], " ")) == 0 || - prev == "{" || - symbols.LeftDelim.Has(prev)): - // binary operators at start of string should not be spaced - return ch - default: - return tex.HListOf([]tex.Node{ - p.makeSpace(state, 0.2), - ch, - p.makeSpace(state, 0.2), - }, true) - } - - case symbols.PunctuationSymbols.Has(sym): - switch sym { - case ".": - pos := strings.Index(p.expr[pos:], sym) - if (pos > 0 && isdigit(p.expr[pos-1])) && - (pos < len(p.expr)-1 && isdigit(p.expr[pos+1])) { - // do not space dots as decimal separators. - return ch - } - return tex.HListOf([]tex.Node{ - ch, - p.makeSpace(state, 0.2), - }, true) - } - panic("not implemented") - } - return ch -} - -var spaceWidth = map[string]float64{ - `\,`: 0.16667, // 3/18 em = 3 mu - `\thinspace`: 0.16667, // 3/18 em = 3 mu - `\/`: 0.16667, // 3/18 em = 3 mu - `\>`: 0.22222, // 4/18 em = 4 mu - `\:`: 0.22222, // 4/18 em = 4 mu - `\;`: 0.27778, // 5/18 em = 5 mu - `\ `: 0.33333, // 6/18 em = 6 mu - `~`: 0.33333, // 6/18 em = 6 mu, nonbreakable - `\enspace`: 0.5, // 9/18 em = 9 mu - `\quad`: 1, // 1 em = 18 mu - `\qquad`: 2, // 2 em = 36 mu - `\!`: -0.16667, // -3/18 em = -3 mu - -} - -func handleSpace(p *parser, node ast.Node, state tex.State, math bool) tex.Node { - var ( - width float64 - ok bool - ) - switch node := node.(type) { - case *ast.Symbol: - width, ok = spaceWidth[node.Text] - case *ast.Macro: - width, ok = spaceWidth[node.Name.Name] - default: - panic(fmt.Errorf("invalid ast node %#v (%T)", node, node)) - } - if !ok { - panic(fmt.Errorf("could not find a width for %#v (%T)", node, node)) - } - - return p.makeSpace(state, width) -} - -func handleCustomSpace(p *parser, node ast.Node, state tex.State, math bool) tex.Node { - macro := node.(*ast.Macro) - arg := macro.Args[0].(*ast.Arg).List[0].(*ast.Literal).Text - val, err := strconv.ParseFloat(arg, 64) - if err != nil { - panic(fmt.Errorf("could not parse customspace: %+v", err)) - } - return p.makeSpace(state, val) -} - -func handleFunction(p *parser, node ast.Node, state tex.State, math bool) tex.Node { - macro := node.(*ast.Macro) - state.Font.Type = "rm" - fun := macro.Name.Name[1:] // drop leading `\` - nodes := make([]tex.Node, 0, len(fun)) - for _, c := range fun { - nodes = append(nodes, tex.NewChar(string(c), state, math)) - } - return tex.HListOf(nodes, true) -} - -func handleFrac(p *parser, node ast.Node, state tex.State, math bool) tex.Node { - var ( - macro = node.(*ast.Macro) - thickness = state.Backend().UnderlineThickness(state.Font, state.DPI) - numNode = ast.List(macro.Args[0].(*ast.Arg).List) - denNode = ast.List(macro.Args[1].(*ast.Arg).List) - ) - - num := p.handleNode(numNode, state, math) - den := p.handleNode(denNode, state, math) - - // FIXME(sbinet): this should be infered from the context. - // ie: textStyle when in $ $ environment. - // displayStyle when in \[\] environment. - sty := textStyle - - return p.genfrac("", "", thickness, sty, num, den, state) -} - -func handleDFrac(p *parser, node ast.Node, state tex.State, math bool) tex.Node { - var ( - macro = node.(*ast.Macro) - thickness = state.Backend().UnderlineThickness(state.Font, state.DPI) - numNode = ast.List(macro.Args[0].(*ast.Arg).List) - denNode = ast.List(macro.Args[1].(*ast.Arg).List) - ) - - num := p.handleNode(numNode, state, math) - den := p.handleNode(denNode, state, math) - - return p.genfrac("", "", thickness, displayStyle, num, den, state) -} - -func handleTFrac(p *parser, node ast.Node, state tex.State, math bool) tex.Node { - var ( - macro = node.(*ast.Macro) - thickness = state.Backend().UnderlineThickness(state.Font, state.DPI) - numNode = ast.List(macro.Args[0].(*ast.Arg).List) - denNode = ast.List(macro.Args[1].(*ast.Arg).List) - ) - - num := p.handleNode(numNode, state, math) - den := p.handleNode(denNode, state, math) - - return p.genfrac("", "", thickness, textStyle, num, den, state) -} - -func handleBinom(p *parser, node ast.Node, state tex.State, math bool) tex.Node { - var ( - macro = node.(*ast.Macro) - numNode = ast.List(macro.Args[0].(*ast.Arg).List) - denNode = ast.List(macro.Args[1].(*ast.Arg).List) - ) - - num := p.handleNode(numNode, state, math) - den := p.handleNode(denNode, state, math) - - return p.genfrac("(", ")", 0, textStyle, num, den, state) -} - -func (p *parser) genfrac(ldelim, rdelim string, rule float64, style mathStyleKind, num, den tex.Node, state tex.State) tex.Node { - thickness := state.Backend().UnderlineThickness(state.Font, state.DPI) - - if style != displayStyle { - num.Shrink() - den.Shrink() - } - - cnum := tex.HCentered([]tex.Node{num}) - cden := tex.HCentered([]tex.Node{den}) - width := math.Max(num.Width(), den.Width()) - - const additional = false // i.e.: exactly - cnum.HPack(width, additional) - cden.HPack(width, additional) - - vlist := tex.VListOf([]tex.Node{ - cnum, // numerator - tex.VBox(0, thickness*2), // space - tex.HRule(state, rule), // rule - tex.VBox(0, thickness*2), // space - cden, // denominator - }) - - // shift so the fraction line sits in the middle of the '=' sign - fnt := state.Font - fnt.Type = rcparams("mathtext.default").(string) - metrics := state.Backend().Metrics("=", fnt, state.DPI, true) - shift := cden.Height() - ((metrics.YMax+metrics.YMin)/2 - 3*thickness) - vlist.SetShift(shift) - - box := tex.HListOf([]tex.Node{vlist, tex.HBox(2 * thickness)}, true) - if ldelim != "" || rdelim != "" { - if ldelim == "" { - ldelim = "." - } - if rdelim == "" { - rdelim = "." - } - return p.autoSizedDelimiter(ldelim, []tex.Node{box}, rdelim, state) - } - - return box -} - -func handleSqrt(p *parser, node ast.Node, state tex.State, math bool) tex.Node { - var ( - macro = node.(*ast.Macro) - root tex.Node - body *tex.HList - ) - switch len(macro.Args) { - case 2: - root = p.handleNode( - ast.List(macro.Args[0].(*ast.OptArg).List), - state, math, - ) - body = p.handleNode( - ast.List(macro.Args[1].(*ast.Arg).List), - state, math, - ).(*tex.HList) - case 1: - // ok - body = p.handleNode( - ast.List(macro.Args[0].(*ast.Arg).List), - state, math, - ).(*tex.HList) - default: - panic("invalid sqrt") - } - - thickness := state.Backend().UnderlineThickness(state.Font, state.DPI) - - // determine the height of the body, add a little extra to it so - // it doesn't seem too cramped. - height := body.Height() - body.Shift() + 5*thickness - depth := body.Depth() + body.Shift() - check := tex.AutoHeightChar(`\__sqrt__`, height, depth, state, 0) - height = check.Height() - check.Shift() - depth = check.Depth() + check.Shift() - - // put a little extra space to the left and right of the body - padded := tex.HListOf([]tex.Node{ - tex.HBox(2 * thickness), - body, - tex.HBox(2 * thickness), - }, true) - rhs := tex.VListOf([]tex.Node{ - tex.HRule(state, -1), - tex.NewGlue("fill"), - padded, - }) - - // stretch the glue between the HRule and the body - const additional = false - rhs.VPack(height+(state.Font.Size*state.DPI)/(100*12), additional, depth) - - // add the root and shift it upward so it is above the tick. - switch root { - case nil: - root = tex.HBox(check.Width() * 0.5) - default: - root.Shrink() - root.Shrink() - } - - vl := tex.VListOf([]tex.Node{ - tex.HListOf([]tex.Node{ - root, - }, true), - }) - vl.SetShift(-height * 0.6) - - hl := tex.HListOf([]tex.Node{ - vl, // root - // negative kerning to put root over tick - tex.NewKern(-check.Width() * 0.5), - check, - rhs, - }, true) - - return hl -} - -func handleOverline(p *parser, node ast.Node, state tex.State, math bool) tex.Node { - macro := node.(*ast.Macro) - body := p.handleNode( - ast.List(macro.Args[0].(*ast.Arg).List), - state, math, - ).(*tex.HList) - - thickness := state.Backend().UnderlineThickness(state.Font, state.DPI) - - height := body.Height() - body.Shift() + 3*thickness - depth := body.Depth() + body.Shift() - - // place overline above body - rhs := tex.VListOf([]tex.Node{ - tex.HRule(state, -1), - tex.NewGlue("fill"), - tex.HListOf([]tex.Node{body}, true), - }) - - // stretch the glue between the HRule and the body - const additional = false - rhs.VPack(height+(state.Font.Size*state.DPI)/(100*12), additional, depth) - - hl := tex.HListOf([]tex.Node{rhs}, true) - return hl -} - -func (p *parser) makeSpace(state tex.State, percentage float64) *tex.Kern { - const math = true - fnt := state.Font - fnt.Name = "it" - fnt.Type = rcparams("mathtext.default").(string) - width := p.be.Metrics("m", fnt, state.DPI, math).Advance - return tex.NewKern(width * percentage) -} - -func (p *parser) autoSizedDelimiter(left string, middle []tex.Node, right string, state tex.State) tex.Node { - var ( - height float64 - depth float64 - factor float64 = 1 - ) - - if len(middle) > 0 { - for _, node := range middle { - height = math.Max(height, node.Height()) - depth = math.Max(depth, node.Depth()) - } - factor = 0 - } - - var parts []tex.Node - if left != "." { - // \left. isn't supposed to produce any symbol - ahc := tex.AutoHeightChar(left, height, depth, state, factor) - parts = append(parts, ahc) - } - parts = append(parts, middle...) - if right != "." { - // \right. isn't supposed to produce any symbol - ahc := tex.AutoHeightChar(right, height, depth, state, factor) - parts = append(parts, ahc) - } - return tex.HListOf(parts, true) -} - -type mathStyleKind int - -const ( - displayStyle mathStyleKind = iota - textStyle - //scriptStyle // FIXME - //scriptScriptStyle // FIXME -) - -func rcparams(k string) interface{} { - switch k { - case "mathtext.default": - return "it" - default: - panic("unknown rc.params key [" + k + "]") - } -} - -func isdigit(v byte) bool { - switch v { - case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': - return true - } - return false -} diff --git a/vendor/github.com/go-latex/latex/mtex/render.go b/vendor/github.com/go-latex/latex/mtex/render.go deleted file mode 100644 index d4bc351..0000000 --- a/vendor/github.com/go-latex/latex/mtex/render.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package mtex - -import ( - "fmt" - "math" - - "github.com/go-latex/latex/drawtex" - "github.com/go-latex/latex/font/ttf" - "github.com/go-latex/latex/tex" -) - -type Renderer interface { - Render(w, h, dpi float64, cnv *drawtex.Canvas) error -} - -func Render(dst Renderer, expr string, size, dpi float64, fonts *ttf.Fonts) error { - var ( - canvas = drawtex.New() - backend *ttf.Backend - ) - switch fonts { - case nil: - backend = ttf.New(canvas) - default: - backend = ttf.NewFrom(canvas, fonts) - } - - box, err := Parse(expr, size, 72, backend) - if err != nil { - return fmt.Errorf("could not parse math expression: %w", err) - } - - var sh tex.Ship - sh.Call(0, 0, box.(tex.Tree)) - - w := box.Width() - h := box.Height() - d := box.Depth() - - err = dst.Render(w/72, math.Ceil(h+math.Max(d, 0))/72, dpi, canvas) - if err != nil { - return fmt.Errorf("could not render math expression: %w", err) - } - - return nil -} diff --git a/vendor/github.com/go-latex/latex/mtex/symbols/set.go b/vendor/github.com/go-latex/latex/mtex/symbols/set.go deleted file mode 100644 index f8df9cb..0000000 --- a/vendor/github.com/go-latex/latex/mtex/symbols/set.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package symbols - -import ( - "sort" -) - -type Set map[string]struct{} - -func NewSet(vs ...string) Set { - o := make(Set, len(vs)) - for _, k := range vs { - o[k] = struct{}{} - } - return o -} - -func (set Set) Has(k string) bool { - _, ok := set[k] - return ok -} - -func (set Set) Keys() []string { - keys := make([]string, 0, len(set)) - for k := range set { - keys = append(keys, k) - } - sort.Strings(keys) - return keys -} - -func UnionOf(sets ...Set) Set { - o := make(Set, len(sets)) - for _, set := range sets { - for k := range set { - o[k] = struct{}{} - } - } - return o -} diff --git a/vendor/github.com/go-latex/latex/mtex/symbols/symbols.go b/vendor/github.com/go-latex/latex/mtex/symbols/symbols.go deleted file mode 100644 index 2dc1a52..0000000 --- a/vendor/github.com/go-latex/latex/mtex/symbols/symbols.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package symbols contains logic about TeX symbols. -package symbols // import "github.com/go-latex/latex/mtex/symbols" - -//go:generate go run ./gen-symbols.go - -var ( - SpacedSymbols = UnionOf(BinaryOperators, RelationSymbols, ArrowSymbols) -) - -func IsSpaced(s string) bool { - return SpacedSymbols.Has(s) -} diff --git a/vendor/github.com/go-latex/latex/mtex/symbols/symbols_gen.go b/vendor/github.com/go-latex/latex/mtex/symbols/symbols_gen.go deleted file mode 100644 index 7180d08..0000000 --- a/vendor/github.com/go-latex/latex/mtex/symbols/symbols_gen.go +++ /dev/null @@ -1,254 +0,0 @@ -// Autogenerated. DO NOT EDIT. - -package symbols - -var ( - AmbiDelim = NewSet( - "\\downarrow", - "\\Uparrow", - "\\|", - "\\updownarrow", - "\\vert", - "\\Vert", - "\\backslash", - ".", - "\\Updownarrow", - "/", - "\\Downarrow", - "|", - "\\\\|", - "\\uparrow", - ) - - ArrowSymbols = NewSet( - "\\Uparrow", - "\\searrow", - "\\hookleftarrow", - "\\longleftrightarrow", - "\\longrightarrow", - "\\rightarrow", - "\\leadsto", - "\\nearrow", - "\\Updownarrow", - "\\rightharpoonup", - "\\Longrightarrow", - "\\leftrightarrow", - "\\downarrow", - "\\nwarrow", - "\\leftarrow", - "\\leftharpoondown", - "\\swarrow", - "\\Longleftarrow", - "\\Leftarrow", - "\\Longleftrightarrow", - "\\uparrow", - "\\hookrightarrow", - "\\rightleftharpoons", - "\\mapsto", - "\\Leftrightarrow", - "\\leftharpoonup", - "\\rightharpoondown", - "\\updownarrow", - "\\Rightarrow", - "\\longleftarrow", - "\\Downarrow", - "\\longmapsto", - ) - - BinaryOperators = NewSet( - "\\triangleleft", - "\\cup", - "+", - "\\oplus", - "*", - "\\bullet", - "\\star", - "\\diamond", - "\\div", - "\\bigtriangledown", - "\\unrhd", - "\\wr", - "\\bigtriangleup", - "\\sqcup", - "\\vee", - "\\sqcap", - "\\dagger", - "\\cdot", - "\\unlhd", - "\\triangleright", - "\\ddagger", - "\\amalg", - "\\circ", - "\\odot", - "\\cap", - "\\bigcirc", - "\\lhd", - "\\times", - "-", - "\\wedge", - "\\mp", - "\\otimes", - "\\ominus", - "\\ast", - "\\pm", - "\\oslash", - "\\rhd", - "\\setminus", - "\\uplus", - ) - - DropSubSymbols = NewSet( - "\\oint", - "\\int", - ) - - FontNames = NewSet( - "circled", - "default", - "cal", - "bf", - "regular", - "tt", - "scr", - "sf", - "frak", - "rm", - "it", - "bb", - ) - - FunctionNames = NewSet( - "lim", - "arccos", - "min", - "arcsin", - "gcd", - "arctan", - "sup", - "sec", - "max", - "cos", - "deg", - "arg", - "sin", - "log", - "sinh", - "ker", - "liminf", - "coth", - "exp", - "det", - "ln", - "lg", - "Pr", - "tan", - "tanh", - "csc", - "hom", - "cosh", - "cot", - "dim", - "limsup", - "inf", - ) - - LeftDelim = NewSet( - "\\lfloor", - "<", - "\\{", - "\\langle", - "[", - "(", - "\\lceil", - ) - - OverUnderFunctions = NewSet( - "sup", - "max", - "lim", - "limsup", - "min", - "liminf", - ) - - OverUnderSymbols = NewSet( - "\\biguplus", - "\\bigoplus", - "\\prod", - "\\bigcap", - "\\bigsqcup", - "\\bigodot", - "\\bigvee", - "\\bigwedge", - "\\sum", - "\\bigcup", - "\\coprod", - "\\bigotimes", - ) - - PunctuationSymbols = NewSet( - "!", - ";", - "\\cdotp", - ",", - ".", - "\\ldotp", - ) - - RelationSymbols = NewSet( - "\\ni", - "\\leq", - "\\ll", - "\\supseteq", - "\\succ", - "=", - "\\neq", - "\\parallel", - "\\geq", - "\\prec", - "\\frown", - "\\in", - "\\Join", - "\\sqsubset", - "\\dashv", - "\\vdash", - "\\dots", - "\\asymp", - "\\subset", - "\\subseteq", - "\\sqsupseteq", - "<", - "\\models", - "\\bowtie", - "\\equiv", - ":", - "\\sqsupset", - "\\smile", - "\\propto", - "\\dotplus", - "\\preceq", - "\\cong", - "\\simeq", - ">", - "\\mid", - "\\approx", - "\\supset", - "\\gg", - "\\doteq", - "\\sqsubseteq", - "\\doteqdot", - "\\succeq", - "\\perp", - "\\sim", - ) - - RightDelim = NewSet( - "\\rceil", - "]", - "\\rangle", - ">", - "\\}", - "\\rfloor", - ")", - ) -) diff --git a/vendor/github.com/go-latex/latex/parser.go b/vendor/github.com/go-latex/latex/parser.go deleted file mode 100644 index 7cee11f..0000000 --- a/vendor/github.com/go-latex/latex/parser.go +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package latex // import "github.com/go-latex/latex" - -import ( - "fmt" - "strings" - - "github.com/go-latex/latex/ast" - "github.com/go-latex/latex/token" -) - -// ParseExpr parses a simple LaTeX expression. -func ParseExpr(x string) (ast.Node, error) { - p := newParser(x) - return p.parse() -} - -type state int - -const ( - normalState state = iota - mathState -) - -type parser struct { - s *texScanner - state state - - macros map[string]macroParser -} - -func newParser(x string) *parser { - p := &parser{ - s: newScanner(strings.NewReader(x)), - state: normalState, - } - p.addBuiltinMacros() - return p -} - -func (p *parser) parse() (ast.Node, error) { - var nodes ast.List - for p.s.Next() { - tok := p.s.Token() - node := p.parseNode(tok) - if node == nil { - continue - } - nodes = append(nodes, node) - } - - return nodes, nil -} - -func (p *parser) next() token.Token { - if !p.s.Next() { - return token.Token{Kind: token.EOF} - } - return p.s.tok -} - -func (p *parser) expect(v rune) { - p.next() - if p.s.tok.Text != string(v) { - panic(fmt.Errorf("expected %q, got %q", v, p.s.tok.Text)) - } -} - -func (p *parser) parseNode(tok token.Token) ast.Node { - switch tok.Kind { - case token.Comment: - return nil - case token.Macro: - return p.parseMacro(tok) - case token.Word: - return p.parseWord(tok) - case token.Number: - return p.parseNumber(tok) - case token.Symbol: - switch tok.Text { - case "$": - return p.parseMathExpr(tok) - case "^": - return p.parseSup(tok) - case "_": - return p.parseSub(tok) - default: - return p.parseSymbol(tok) - } - case token.Lbrace: - switch p.state { - case mathState: - return p.parseMathLbrace(tok) - default: - panic("not implemented") - } - case token.Other: - switch tok.Text { - default: - panic("not implemented: " + tok.String()) - } - case token.Space: - switch p.state { - case mathState: - return nil - default: - return p.parseSymbol(tok) - } - - case token.Lparen, token.Rparen, - token.Lbrack, token.Rbrack: - return p.parseSymbol(tok) - - default: - panic(fmt.Errorf("impossible: %v (%v)", tok, tok.Kind)) - } -} - -func (p *parser) parseMathExpr(tok token.Token) ast.Node { - state := p.state - p.state = mathState - defer func() { - p.state = state - }() - - math := &ast.MathExpr{ - Delim: tok.Text, - Left: tok.Pos, - } - var end string - switch tok.Text { - case "$": - end = "$" - case `\(`: - end = `\)` - case `\[`: - end = `\]` - case `\begin`: - panic("not implemented") - default: - panic(fmt.Errorf("opening math-expression delimiter %q not supported", tok.Text)) - } - -loop: - for p.s.Next() { - switch p.s.tok.Text { - case end: - math.Right = p.s.tok.Pos - break loop - default: - node := p.parseNode(p.s.tok) - if node == nil { - continue - } - math.List = append(math.List, node) - } - } - - return math -} - -func (p *parser) parseMacro(tok token.Token) ast.Node { - name := tok.Text - macro, ok := p.macros[name] - if !ok { - panic("unknown macro " + name) - //return nil - } - return macro.parseMacro(p) -} - -func (p *parser) parseWord(tok token.Token) ast.Node { - return &ast.Word{ - WordPos: tok.Pos, - Text: tok.Text, - } -} - -func (p *parser) parseNumber(tok token.Token) ast.Node { - return &ast.Literal{ - LitPos: tok.Pos, - Text: tok.Text, - } -} - -func (p *parser) parseMacroArg(macro *ast.Macro) { - var arg ast.Arg - p.expect('{') - arg.Lbrace = p.s.tok.Pos - -loop: - for p.s.Next() { - switch p.s.tok.Kind { - case token.Rbrace: - arg.Rbrace = p.s.tok.Pos - break loop - default: - node := p.parseNode(p.s.tok) - if node == nil { - continue - } - arg.List = append(arg.List, node) - } - } - macro.Args = append(macro.Args, &arg) -} - -func (p *parser) parseOptMacroArg(macro *ast.Macro) { - nxt := p.s.sc.Peek() - if nxt != '[' { - return - } - - var opt ast.OptArg - - p.expect('[') - opt.Lbrack = p.s.tok.Pos - -loop: - for p.s.Next() { - switch p.s.tok.Kind { - case token.Rbrack: - opt.Rbrack = p.s.tok.Pos - break loop - default: - node := p.parseNode(p.s.tok) - if node == nil { - continue - } - opt.List = append(opt.List, node) - } - } - macro.Args = append(macro.Args, &opt) -} - -func (p *parser) parseVerbatimMacroArg(macro *ast.Macro) { -} - -func (p *parser) parseSup(tok token.Token) ast.Node { - hat := &ast.Sup{ - HatPos: tok.Pos, - } - - switch next := p.s.sc.Peek(); next { - case '{': - p.expect('{') - var list ast.List - loop: - for p.s.Next() { - switch p.s.tok.Kind { - case token.Rbrace: - break loop - default: - node := p.parseNode(p.s.tok) - if node == nil { - continue - } - list = append(list, node) - } - } - hat.Node = list - default: - hat.Node = p.parseNode(p.next()) - } - - return hat -} - -func (p *parser) parseSub(tok token.Token) ast.Node { - sub := &ast.Sub{ - UnderPos: tok.Pos, - } - - switch next := p.s.sc.Peek(); next { - case '{': - p.expect('{') - var list ast.List - loop: - for p.s.Next() { - switch p.s.tok.Kind { - case token.Rbrace: - break loop - default: - node := p.parseNode(p.s.tok) - if node == nil { - continue - } - list = append(list, node) - } - } - sub.Node = list - default: - sub.Node = p.parseNode(p.next()) - } - - return sub -} - -func (p *parser) parseSymbol(tok token.Token) ast.Node { - return &ast.Symbol{ - SymPos: tok.Pos, - Text: tok.Text, - } -} - -func (p *parser) parseMathLbrace(tok token.Token) ast.Node { - var ( - lst ast.List - ldelim = tok.Kind - rdelim = map[token.Kind]token.Kind{ - token.Lbrace: token.Rbrace, - token.Lparen: token.Rparen, - }[ldelim] - ) - - if rdelim == token.Invalid { - panic("impossible: no matching right-delim for: " + tok.String()) - } - -loop: - for p.s.Next() { - switch p.s.tok.Kind { - case rdelim: - break loop - default: - node := p.parseNode(p.s.tok) - if node == nil { - continue - } - lst = append(lst, node) - } - } - return lst -} diff --git a/vendor/github.com/go-latex/latex/scanner.go b/vendor/github.com/go-latex/latex/scanner.go deleted file mode 100644 index d524ec1..0000000 --- a/vendor/github.com/go-latex/latex/scanner.go +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package latex - -import ( - "fmt" - "io" - "strings" - "text/scanner" - "unicode" - - "github.com/go-latex/latex/token" -) - -type texScanner struct { - sc scanner.Scanner - - r rune - tok token.Token -} - -func newScanner(r io.Reader) *texScanner { - sc := &texScanner{} - sc.sc.Init(r) - sc.sc.Mode = (scanner.ScanIdents | scanner.ScanInts | scanner.ScanFloats) - sc.sc.Mode |= scanner.ScanStrings - //scanner.ScanRawStrings) - // sc.sc.Error = func(s *scanner.Scanner, msg string) {} - sc.sc.IsIdentRune = func(ch rune, i int) bool { - return unicode.IsLetter(ch) //|| unicode.IsDigit(ch) && i > 0 - } - sc.sc.Whitespace = 1<<'\t' | 1<<'\n' | 1<<'\r' - return sc -} - -// Token returns the most recently parsed token -func (s *texScanner) Token() token.Token { - return s.tok -} - -// Next iterates over all tokens. -// Next retrieves the most recent token with Token(). -// It returns false once it reaches token.EOF. -func (s *texScanner) Next() bool { - s.tok = s.scan() - return s.tok.Kind != token.EOF -} - -func (s *texScanner) scan() token.Token { - s.next() - pos := s.pos() - switch s.r { - case scanner.Ident: - return token.Token{ - Kind: token.Word, - Pos: pos, - Text: s.sc.TokenText(), - } - case '\\': - nxt := s.sc.Peek() - switch nxt { - case ' ': - s.next() - return token.Token{ - Kind: token.Space, - Pos: pos, - Text: `\ `, - } - default: - return s.scanMacro() - } - case ' ': - return token.Token{ - Kind: token.Space, - Pos: pos, - Text: ` `, - } - - case '%': - line := s.scanComment() - return token.Token{ - Kind: token.Comment, - Pos: pos, - Text: line, - } - - case '$', '_', '=', '<', '>', '^', '/', '*', '-', '+', - '!', '?', '\'', ':', ',', ';', '.': - return token.Token{ - Kind: token.Symbol, - Pos: pos, - Text: s.sc.TokenText(), - } - - case '[': - return token.Token{ - Kind: token.Lbrack, - Pos: pos, - Text: s.sc.TokenText(), - } - case ']': - return token.Token{ - Kind: token.Rbrack, - Pos: pos, - Text: s.sc.TokenText(), - } - case '{': - return token.Token{ - Kind: token.Lbrace, - Pos: pos, - Text: s.sc.TokenText(), - } - case '}': - return token.Token{ - Kind: token.Rbrace, - Pos: pos, - Text: s.sc.TokenText(), - } - case '(': - return token.Token{ - Kind: token.Lparen, - Pos: pos, - Text: s.sc.TokenText(), - } - case ')': - return token.Token{ - Kind: token.Rparen, - Pos: pos, - Text: s.sc.TokenText(), - } - case scanner.Int, scanner.Float: - return token.Token{ - Kind: token.Number, - Pos: pos, - Text: s.sc.TokenText(), - } - case scanner.String, scanner.Char: - return token.Token{ - Kind: token.Other, - Pos: pos, - Text: s.sc.TokenText(), - } - case scanner.EOF: - return token.Token{ - Kind: token.EOF, - Pos: pos, - } - default: - panic(fmt.Errorf("unhandled token: %v %v", scanner.TokenString(s.r), s.r)) - } -} - -func (s *texScanner) next() { - s.r = s.sc.Scan() -} - -func (s *texScanner) scanMacro() token.Token { - var ( - macro = new(strings.Builder) - pos = s.pos() - ) - s.next() - macro.WriteString(`\` + s.sc.TokenText()) - - return token.Token{ - Kind: token.Macro, - Pos: pos, - Text: macro.String(), - } -} - -func (s *texScanner) scanComment() string { - comment := new(strings.Builder) - comment.WriteString("%") - wsp := s.sc.Whitespace - defer func() { - s.sc.Whitespace = wsp - }() - s.sc.Whitespace = 0 - - for { - s.next() - if s.r == '\r' { - continue - } - if s.r == '\n' || s.r == scanner.EOF { - break - } - comment.WriteString(s.sc.TokenText()) - } - return comment.String() -} - -// func (s *texScanner) expect(want rune) { -// s.next() -// if s.r != want { -// panic(fmt.Errorf("invalid rune: got=%q, want=%q", s.r, want)) -// } -// } - -func (s *texScanner) pos() token.Pos { - return token.Pos(s.sc.Position.Offset) -} diff --git a/vendor/github.com/go-latex/latex/tex/box.go b/vendor/github.com/go-latex/latex/tex/box.go deleted file mode 100644 index e433113..0000000 --- a/vendor/github.com/go-latex/latex/tex/box.go +++ /dev/null @@ -1,1226 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package tex - -import ( - "fmt" - "log" - "math" - - "github.com/go-latex/latex/font" -) - -const ( - // How much text shrinks when going to the next-smallest level. growFactor - // must be the inverse of shrinkFactor. - shrinkFactor = 0.7 - growFactor = 1.0 / shrinkFactor - - // The number of different sizes of chars to use, beyond which they will not - // get any smaller - numSizeLevels = 6 -) - -// FontConstants is a set of magical values that control how certain things, -// such as sub- and superscripts are laid out. -// These are all metrics that can't be reliably retrieved from the font metrics -// in the font itself. -type FontConstants struct { - // Percentage of x-height of additional horiz. space after sub/superscripts - ScriptSpace float64 - - // Percentage of x-height that sub/superscripts drop below the baseline - SubDrop float64 - - // Percentage of x-height that superscripts are raised from the baseline - Sup1 float64 - - // Percentage of x-height that subscripts drop below the baseline - Sub1 float64 - - // Percentage of x-height that subscripts drop below the baseline when a - // superscript is present - Sub2 float64 - - // Percentage of x-height that sub/supercripts are offset relative to the - // nucleus edge for non-slanted nuclei - Delta float64 - - // Additional percentage of last character height above 2/3 of the - // x-height that supercripts are offset relative to the subscript - // for slanted nuclei - DeltaSlanted float64 - - // Percentage of x-height that supercripts and subscripts are offset for - // integrals - DeltaIntegral float64 -} - -var DefaultFontConstants = FontConstants{ - ScriptSpace: 0.05, - SubDrop: 0.4, - Sup1: 0.7, - Sub1: 0.3, - Sub2: 0.5, - Delta: 0.025, - DeltaSlanted: 0.2, - DeltaIntegral: 0.1, -} - -// Node represents a node in the TeX box model. -type Node interface { - // Kerning returns the amount of kerning between this and the next node. - Kerning(next Node) float64 - - // Shrinks one level smaller. - // There are only three levels of sizes, after which things - // will no longer get smaller. - Shrink() - - // Grows one level larger. - // There is no limit to how big something can get. - Grow() - - // Render renders the node at (x,y) on the canvas. - Render(x, y float64) - - // Width returns the width of this node. - Width() float64 - - // Height returns the height of this node. - Height() float64 - - // Depth returns the depth of this node. - Depth() float64 -} - -// Box is a node with a physical location -type Box struct { - size int - width float64 - height float64 - depth float64 -} - -func newBox(w, h, d float64) *Box { - return &Box{width: w, height: h, depth: d} -} - -func (*Box) Kerning(next Node) float64 { return 0 } - -func (box *Box) Shrink() { - box.size-- - if box.size < numSizeLevels { - box.width *= shrinkFactor - box.height *= shrinkFactor - box.depth *= shrinkFactor - } -} - -func (box *Box) Grow() { - box.size++ - box.width *= growFactor - box.height *= growFactor - box.depth *= growFactor -} - -func (*Box) Render(x, y float64) {} - -// Width returns the width of this node. -func (box *Box) Width() float64 { return box.width } - -// Height returns the height of this node. -func (box *Box) Height() float64 { return box.height } - -// Depth returns the depth of this node. -func (box *Box) Depth() float64 { return box.depth } - -func (box *Box) hpackDims(width, height, depth *float64, stretch, shrink []float64) { - *width += box.width - if math.IsInf(box.height, 0) || math.IsInf(box.depth, 0) { - return - } - *height = math.Max(*height, box.height) - *depth = math.Max(*depth, box.depth) -} - -func (box *Box) vpackDims(width, height, depth *float64, stretch, shrink []float64) { - *height += *depth + box.height - *depth = box.depth - if math.IsInf(box.width, 0) { - return - } - *width = math.Max(*width, box.width) -} - -// VBox is a box with a height but no width. -func VBox(h, d float64) *Box { - return newBox(0, h, d) -} - -// HBox is a box with a width but no height nor depth. -func HBox(w float64) *Box { - return newBox(w, 0, 0) -} - -// Char is a single character. -// -// Unlike TeX, the font information and metrics are stored with each `Char` -// to make it easier to lookup the font metrics when needed. Note that TeX -// boxes have a width, height, and depth, unlike Type1 and TrueType which use -// a full bounding box and an advance in the x-direction. The metrics must -// be converted to the TeX model, and the advance (if different from width) -// must be converted into a `Kern` node when the `Char` is added to its parent -// `HList`. -type Char struct { - c string - - size int - width float64 - height float64 - depth float64 - metrics font.Metrics - - be font.Backend - font font.Font - dpi float64 - math bool -} - -func NewChar(c string, state State, math bool) *Char { - ch := &Char{ - c: c, - be: state.Backend(), - font: state.Font, - dpi: state.DPI, - math: math, - } - ch.updateMetrics() - return ch -} - -func (ch *Char) updateMetrics() { - ch.metrics = ch.be.Metrics( - ch.c, ch.font, ch.dpi, - ch.math, - ) - switch ch.c { - case " ": - ch.width = ch.metrics.Advance - default: - ch.width = ch.metrics.Width - } - ch.height = ch.metrics.Iceberg - ch.depth = -(ch.metrics.Iceberg - ch.metrics.Height) -} - -func (c *Char) String() string { return c.c } - -func (c *Char) Kerning(next Node) float64 { - adv := c.metrics.Advance - c.Width() - kern := 0.0 - switch next := next.(type) { - case *Char: - kern = c.be.Kern(c.font, c.c, next.font, next.c, c.dpi) - case *Accent: - kern = c.be.Kern(c.font, c.c, next.char.font, next.char.c, c.dpi) - } - return adv + kern -} - -func (box *Char) Shrink() { - box.size-- - if box.size < numSizeLevels { - box.font.Size *= shrinkFactor - box.width *= shrinkFactor - box.height *= shrinkFactor - box.depth *= shrinkFactor - } -} - -func (box *Char) Grow() { - box.size++ - box.font.Size *= growFactor - box.width *= growFactor - box.height *= growFactor - box.depth *= growFactor -} - -func (c *Char) Render(x, y float64) { - c.be.RenderGlyph(x, y, c.font, c.c, c.dpi) -} - -// Width returns the width of this node. -func (c *Char) Width() float64 { return c.width } - -// Height returns the height of this node. -func (c *Char) Height() float64 { return c.height } - -// Depth returns the depth of this node. -func (c *Char) Depth() float64 { return c.depth } - -func (c Char) hpackDims(width, height, depth *float64, stretch, shrink []float64) { - *width += c.width - *height = math.Max(*height, c.height) - *depth = math.Max(*depth, c.depth) -} - -func (*Char) vpackDims(width, height, depth *float64, stretch, shrink []float64) { - panic("Char node in VList") -} - -// Accent is a character with an accent. -// Accents need to be dealt with separately as they are already offset -// from the baseline in TrueType fonts. -type Accent struct { - char Char -} - -func NewAccent(c string, state State, math bool) *Accent { - acc := &Accent{ - char: Char{ - c: c, - be: state.Backend(), - font: state.Font, - dpi: state.DPI, - math: math, - }, - } - acc.updateMetrics() - return acc -} - -func (acc *Accent) updateMetrics() { - acc.char.metrics = acc.char.be.Metrics( - acc.char.c, acc.char.font, acc.char.dpi, - acc.char.math, - ) - acc.char.width = acc.char.metrics.XMax - acc.char.metrics.XMin - acc.char.height = acc.char.metrics.YMax - acc.char.metrics.YMin - acc.char.depth = 0 -} - -func (acc *Accent) String() string { return acc.char.String() } -func (acc *Accent) Kerning(next Node) float64 { return acc.char.Kerning(next) } - -func (acc *Accent) Shrink() { - acc.char.Shrink() - acc.updateMetrics() -} - -func (acc *Accent) Grow() { - acc.char.Grow() - acc.updateMetrics() -} - -func (acc *Accent) Render(x, y float64) { - acc.char.be.RenderGlyph( - x-acc.char.metrics.XMin, - y+acc.char.metrics.YMin, - acc.char.font, - acc.char.c, - acc.char.dpi, - ) -} - -// Width returns the width of this node. -func (acc *Accent) Width() float64 { return acc.char.width } - -// Height returns the height of this node. -func (acc *Accent) Height() float64 { return acc.char.height } - -// Depth returns the depth of this node. -func (acc *Accent) Depth() float64 { return acc.char.depth } - -func (acc *Accent) hpackDims(width, height, depth *float64, stretch, shrink []float64) { - acc.char.hpackDims(width, height, depth, stretch, shrink) -} - -func (*Accent) vpackDims(width, height, depth *float64, stretch, shrink []float64) { - panic("Accent node in VList") -} - -// List is a list of vertical or horizontal nodes. -type List struct { - box Box - shift float64 // shift is an arbitrary offset. - children []Node // children nodes of this list. - - glue struct { - set float64 // glue setting of this list - sign int // 0: normal, -1: shrinking, 1: stretching - order int // the order of infinity (0 - 3) for the glue. - ratio float64 - } -} - -func ListOf(elements []Node) *List { - list := &List{children: make([]Node, len(elements))} - copy(list.children, elements) - return list -} - -// determineOrder determines the highest order of glue used by the members -// of a List. -// -// used by VPack and HPack. -func determineOrder(totals []float64) int { - for i := len(totals) - 1; i >= 0; i-- { - if totals[i] != 0 { - return i - } - } - return 0 -} - -func (lst *List) setGlue(x float64, sign int, totals []float64, errMsg, typ string) { - o := determineOrder(totals) - lst.glue.order = o - lst.glue.sign = sign - switch { - case totals[o] != 0: - lst.glue.set = x / totals[o] - default: - lst.glue.sign = 0 - lst.glue.ratio = 0 - } - if o == 0 { - if len(lst.children) > 0 { - log.Printf("%s %s: %v", errMsg, typ, lst.children) - } - } -} - -func (lst *List) Kerning(next Node) float64 { - return lst.box.Kerning(next) -} - -func (lst *List) Shrink() { - for _, node := range lst.children { - node.Shrink() - } - lst.box.Shrink() - if lst.box.size < numSizeLevels { - lst.shift *= shrinkFactor - lst.glue.set *= shrinkFactor - } -} - -func (lst *List) Grow() { - for _, node := range lst.children { - node.Grow() - } - lst.box.Grow() - lst.shift *= growFactor - lst.glue.set *= growFactor -} - -func (lst *List) Render(x, y float64) { - lst.box.Render(x, y) -} - -// Width returns the width of this node. -func (lst *List) Width() float64 { return lst.box.Width() } - -// Height returns the height of this node. -func (lst *List) Height() float64 { return lst.box.Height() } - -// Depth returns the depth of this node. -func (lst *List) Depth() float64 { return lst.box.Depth() } - -func (lst *List) Nodes() []Node { return lst.children } -func (lst *List) GlueOrder() int { return lst.glue.order } -func (lst *List) GlueSign() int { return lst.glue.sign } -func (lst *List) GlueSet() float64 { return lst.glue.set } - -func (lst *List) hpackDims(width, height, depth *float64, stretch, shrink []float64) { - *width += lst.box.width - if math.IsInf(lst.box.height, 0) || math.IsInf(lst.box.depth, 0) { - return - } - *height = math.Max(*height, lst.box.height-lst.shift) - *depth = math.Max(*depth, lst.box.depth+lst.shift) -} - -func (lst *List) vpackDims(width, height, depth *float64, stretch, shrink []float64) { - *height += *depth + lst.box.height - *depth = lst.box.depth - if math.IsInf(lst.box.width, 0) { - return - } - *width = math.Max(*width, lst.box.width) -} - -// HList is a horizontal list of boxes. -type HList struct { - lst List -} - -func HListOf(elements []Node, doKern bool) *HList { - lst := &HList{ - lst: *ListOf(elements), - } - if doKern { - lst.kern() - } - const ( - width = 0 - additional = true - ) - lst.HPack(width, additional) - return lst -} - -// kern inserts Kern nodes between Char nodes to set kerning. -// -// The Char nodes themselves determine the amount of kerning they need. -// This method just creates the correct list. -func (lst *HList) kern() { - if len(lst.lst.children) == 0 { - return - } - var ( - n = len(lst.lst.children) - children = make([]Node, 0, n) - ) - for i := range lst.lst.children { - var ( - elem = lst.lst.children[i] - next Node - dist float64 - ) - if i < n-1 { - next = lst.lst.children[i+1] - } - dist = elem.Kerning(next) - children = append(children, elem) - if dist != 0 { - children = append(children, NewKern(dist)) - } - } - lst.lst.children = children -} - -// HPack computes the dimensions of the resulting boxes, and adjusts the glue -// if one of those dimensions is pre-specified. -// -// The computed sizes normally enclose all of the material inside the new box; -// but some items may stick out if negative glue is used, if the box is -// overfull, or if a `\vbox` includes other boxes that have been shifted left. -// -// If additional is false, HPack will produce a box whose width is exactly as -// wide as the given 'width'. -// Otherwise, HPack will produce a box with the natural width of the contents, -// plus the given 'width'. -func (lst *HList) HPack(width float64, additional bool) { - var ( - h float64 - d float64 - x float64 - - totStretch = make([]float64, 4) - totShrink = make([]float64, 4) - ) - - for _, node := range lst.lst.children { - switch node := node.(type) { - case hpacker: - node.hpackDims(&x, &h, &d, totStretch, totShrink) - default: - panic(fmt.Errorf("unknown node type %T", node)) - } - } - lst.lst.box.height = h - lst.lst.box.depth = d - - if additional { - width += x - } - lst.lst.box.width = width - x = width - x - switch { - case x == 0: - lst.lst.glue.sign = 0 - lst.lst.glue.order = 0 - lst.lst.glue.ratio = 0 - case x > 0: - lst.lst.setGlue(x, 1, totStretch, "overfull", "HList") - default: - lst.lst.setGlue(x, -1, totShrink, "underfull", "HList") - } -} - -func (lst *HList) Kerning(next Node) float64 { return lst.lst.Kerning(next) } -func (lst *HList) Shrink() { lst.lst.Shrink() } -func (lst *HList) Grow() { lst.lst.Grow() } -func (lst *HList) Render(x, y float64) { lst.lst.Render(x, x) } - -// Width returns the width of this node. -func (lst *HList) Width() float64 { return lst.lst.Width() } - -// Height returns the height of this node. -func (lst *HList) Height() float64 { return lst.lst.Height() } - -// Depth returns the depth of this node. -func (lst *HList) Depth() float64 { return lst.lst.Depth() } - -func (lst *HList) Nodes() []Node { return lst.lst.Nodes() } -func (lst *HList) GlueOrder() int { return lst.lst.GlueOrder() } -func (lst *HList) GlueSign() int { return lst.lst.GlueSign() } -func (lst *HList) GlueSet() float64 { return lst.lst.GlueSet() } -func (lst *HList) Shift() float64 { return lst.lst.shift } - -func (lst *HList) hpackDims(width, height, depth *float64, stretch, shrink []float64) { - lst.lst.hpackDims(width, height, depth, stretch, shrink) -} - -func (lst *HList) vpackDims(width, height, depth *float64, stretch, shrink []float64) { - lst.lst.vpackDims(width, height, depth, stretch, shrink) -} - -// VList is a vertical list of boxes. -type VList struct { - lst List -} - -func (lst *VList) SetShift(s float64) { lst.lst.shift = s } - -func VListOf(elements []Node) *VList { - lst := &VList{lst: *ListOf(elements)} - var ( - height float64 - additional = true - max = math.Inf(+1) - ) - lst.VPack(height, additional, max) - return lst -} - -// VPack computes the dimensions of the resulting boxes, and adjusts the -// glue if one of those dimensions is pre-specified. -// -// If additional is false, VPack will produce a box whose height is exactly as -// tall as the given 'height'. -// Otherwise, VPack will produce a box with the natural height of the contents, -// plus the given 'height'. -func (lst *VList) VPack(height float64, additional bool, l float64) { - var ( - w float64 - d float64 - x float64 - - totStretch = make([]float64, 4) - totShrink = make([]float64, 4) - ) - - for _, node := range lst.lst.children { - switch node := node.(type) { - case vpacker: - node.vpackDims(&w, &x, &d, totStretch, totShrink) - } - } - - lst.lst.box.width = w - switch { - case d > l: - x += d - l - lst.lst.box.depth = l - default: - lst.lst.box.depth = d - } - - if additional { - height += x - } - lst.lst.box.height = height - x = height - x - - switch { - case x == 0: - lst.lst.glue.sign = 0 - lst.lst.glue.order = 0 - lst.lst.glue.ratio = 0 - case x > 0: - lst.lst.setGlue(x, +1, totStretch, "overfull", "VList") - default: - lst.lst.setGlue(x, -1, totShrink, "underfull", "VList") - } -} - -func (lst *VList) Kerning(next Node) float64 { return lst.lst.Kerning(next) } -func (lst *VList) Shrink() { lst.lst.Shrink() } -func (lst *VList) Grow() { lst.lst.Grow() } -func (lst *VList) Render(x, y float64) { lst.lst.Render(x, y) } - -// Width returns the width of this node. -func (lst *VList) Width() float64 { return lst.lst.Width() } - -// Height returns the height of this node. -func (lst *VList) Height() float64 { return lst.lst.Height() } - -// Depth returns the depth of this node. -func (lst *VList) Depth() float64 { return lst.lst.Depth() } - -func (lst *VList) Nodes() []Node { return lst.lst.Nodes() } -func (lst *VList) GlueOrder() int { return lst.lst.GlueOrder() } -func (lst *VList) GlueSign() int { return lst.lst.GlueSign() } -func (lst *VList) GlueSet() float64 { return lst.lst.GlueSet() } - -func (lst *VList) hpackDims(width, height, depth *float64, stretch, shrink []float64) { - lst.lst.hpackDims(width, height, depth, stretch, shrink) -} - -func (lst *VList) vpackDims(width, height, depth *float64, stretch, shrink []float64) { - lst.lst.vpackDims(width, height, depth, stretch, shrink) -} - -// Rule is a solid black rectangle. -// -// Like a HList, Rule has a width, a depth and a height. -// However, if any of these dimensions is ∞, the actual value will be -// determined by running the rule up to the boundary of the innermost -// enclosing box. -// This is called a "running dimension". -// The width is never running in an HList; the height and depth are never -// running in a VList. -type Rule struct { - box Box - out font.Backend -} - -func NewRule(w, h, d float64, state State) *Rule { - return &Rule{ - box: *newBox(w, h, d), - out: state.Backend(), - } -} - -func (rule *Rule) String() string { - return fmt.Sprintf( - "Rule{w=%g, h=%g, d=%g}", - rule.Width(), rule.Height(), rule.Depth(), - ) -} - -func (rule *Rule) render(x, y, w, h float64) { - rule.out.RenderRectFilled(x, y, x+w, y+h) -} - -func (rule *Rule) Kerning(next Node) float64 { return rule.box.Kerning(next) } -func (rule *Rule) Shrink() { rule.box.Shrink() } -func (rule *Rule) Grow() { rule.box.Grow() } -func (rule *Rule) Render(x, y float64) { rule.box.Render(x, y) } - -// Width returns the width of this node. -func (rule *Rule) Width() float64 { return rule.box.Width() } - -// Height returns the height of this node. -func (rule *Rule) Height() float64 { return rule.box.Height() } - -// Depth returns the depth of this node. -func (rule *Rule) Depth() float64 { return rule.box.Depth() } - -func (rule *Rule) hpackDims(width, height, depth *float64, stretch, shrink []float64) { - rule.box.hpackDims(width, height, depth, stretch, shrink) -} - -func (rule *Rule) vpackDims(width, height, depth *float64, stretch, shrink []float64) { - rule.box.vpackDims(width, height, depth, stretch, shrink) -} - -// HRule is a horizontal rule. -func HRule(state State, thickness float64) *Rule { - if thickness < 0 { - thickness = state.Backend().UnderlineThickness(state.Font, state.DPI) - } - var ( - height = 0.5 * thickness - depth = 0.5 * thickness - ) - return NewRule(math.Inf(+1), height, depth, state) -} - -// VRule is a vertical rule. -func VRule(state State) *Rule { - thickness := state.Backend().UnderlineThickness(state.Font, state.DPI) - return NewRule(thickness, math.Inf(+1), math.Inf(+1), state) -} - -type Glue struct { - size int - width float64 - stretch float64 - stretchOrder int - shrink float64 - shrinkOrder int -} - -func NewGlue(typ string) *Glue { - switch typ { - case "fil": - return newGlue(0, 1, 1, 0, 0) - case "fill": - return newGlue(0, 1, 2, 0, 0) - case "filll": - return newGlue(0, 1, 3, 0, 0) - case "neg_fil": - return newGlue(0, 0, 0, 1, 1) - case "neg_fill": - return newGlue(0, 0, 0, 1, 2) - case "neg_filll": - return newGlue(0, 0, 0, 1, 3) - case "empty": - return &Glue{} - case "ss": - return newGlue(0, 1, 1, -1, 1) - default: - panic(fmt.Errorf("tex: unknown Glue spec %q", typ)) - } -} - -func newGlue(w, st float64, sto int, sh float64, sho int) *Glue { - return &Glue{ - size: 0, - width: w, - stretch: st, - stretchOrder: sto, - shrink: sh, - shrinkOrder: sho, - } -} - -func (g *Glue) Kerning(next Node) float64 { return 0 } - -func (g *Glue) Shrink() { - g.size-- - if g.size < numSizeLevels { - g.width *= shrinkFactor - } -} - -func (g *Glue) Grow() { - g.size++ - g.width *= growFactor -} - -func (g *Glue) Render(x, y float64) {} - -// Width returns the width of this node. -func (g *Glue) Width() float64 { return g.width } - -// Height returns the height of this node. -func (g *Glue) Height() float64 { return 0 } - -// Depth returns the depth of this node. -func (g *Glue) Depth() float64 { return 0 } - -func (g *Glue) hpackDims(width, height, depth *float64, stretch, shrink []float64) { - *width += g.width - stretch[g.stretchOrder] += g.stretch - shrink[g.shrinkOrder] += g.shrink -} - -func (g *Glue) vpackDims(width, height, depth *float64, stretch, shrink []float64) { - *height += *depth - *depth = 0 - *height += g.width - stretch[g.stretchOrder] += g.stretch - shrink[g.shrinkOrder] += g.shrink -} - -// HCentered creates an HList whose contents are centered within -// its enclosing box. -func HCentered(elements []Node) *HList { - const doKern = false - nodes := make([]Node, 0, len(elements)+2) - nodes = append(nodes, NewGlue("ss")) - nodes = append(nodes, elements...) - nodes = append(nodes, NewGlue("ss")) - return HListOf(nodes, doKern) -} - -// VCentered creates a VList whose contents are centered within -// its enclosing box. -func VCentered(elements []Node) *VList { - nodes := make([]Node, 0, len(elements)+2) - nodes = append(nodes, NewGlue("ss")) - nodes = append(nodes, elements...) - nodes = append(nodes, NewGlue("ss")) - return VListOf(nodes) -} - -// Kern is a node with a width to specify a (normally negative) amount of spacing. -// -// This spacing correction appears in horizontal lists between letters -// like A and V, when the font designer decided it looks better to move them -// closer together or further apart. -// A Kern node can also appear in a vertical list, when its width denotes -// spacing in the vertical direction. -type Kern struct { - size int - width float64 -} - -func NewKern(width float64) *Kern { - return &Kern{width: width} -} - -func (k *Kern) String() string { return fmt.Sprintf("k%.02f", k.width) } - -func (k *Kern) Kerning(next Node) float64 { return 0 } - -func (k *Kern) Shrink() { - k.size-- - if k.size < numSizeLevels { - k.width *= shrinkFactor - } -} - -func (k *Kern) Grow() { - k.size++ - k.width *= growFactor -} - -func (k *Kern) Render(x, y float64) {} - -// Width returns the width of this node. -func (k *Kern) Width() float64 { return k.width } - -// Height returns the height of this node. -func (k *Kern) Height() float64 { return 0 } - -// Depth returns the depth of this node. -func (k *Kern) Depth() float64 { return 0 } - -func (k *Kern) hpackDims(width, height, depth *float64, stretch, shrink []float64) { - *width += k.width -} - -func (k *Kern) vpackDims(width, height, depth *float64, stretch, shrink []float64) { - *height += *depth + k.width - *depth = 0 -} - -type SubSuperCluster struct { - *HList - // nucleus interface{} // FIXME - // sub interface{} // FIXME - // super interface{} // FIXME -} - -// AutoHeightChar creats a character as close to the given height and depth -// as possible. -func AutoHeightChar(c string, height, depth float64, state State, factor float64) *HList { - // FIXME(sbinet): implement sized-alternatives-for-symbol - alts := []struct { - font string - sym string - }{ - {state.Font.Name, c}, - } - - const math = true - var ( - xheight = state.Backend().XHeight(state.Font, state.DPI) - target = height + depth - - ch *Char - shift float64 - ) - - for _, v := range alts { - state.Font.Name = v.font - ch = NewChar(c, state, math) - // ensure that size 0 is chosen when the text is regular sized - // but with descender glyphs by subtracting 0.2*xheight - if ch.Height()+ch.Depth() >= target-0.2*xheight { - break - } - } - - if state.Font.Name != "" { - if factor == 0 { - factor = target / (ch.Height() + ch.Depth()) - } - state.Font.Size *= factor - - ch = NewChar(c, state, math) - shift = depth - ch.Depth() - } - - hlist := HListOf([]Node{ch}, true) - hlist.lst.shift = shift - - return hlist -} - -// Ship boxes to output once boxes have been set up. -// -// Since boxes can be inside of boxes inside of boxes... the main work of -// Ship is done by two mutually recursive routines, hlistOut and vlistOut, -// which traverse the HList and VList nodes inside of horizontal and vertical -// boxes. -type Ship struct { - maxPush int // deepest nesting of push commands, so far. - cur struct { - s int - v float64 - h float64 - } - off struct { - h float64 - v float64 - } -} - -func (ship *Ship) Call(ox, oy float64, box Tree) { - ship.maxPush = 0 - ship.cur.s = 0 - ship.cur.v = 0 - ship.cur.h = 0 - ship.off.h = ox - ship.off.v = oy + box.Height() - ship.hlistOut(box) -} - -func (ship *Ship) hlistOut(box Tree) { - var ( - curG int - curGlue float64 - glueOrder = box.GlueOrder() - glueSign = box.GlueSign() - baseLine = ship.cur.v - ) - - ship.cur.s++ - ship.maxPush = maxInt(ship.cur.s, ship.maxPush) - - for _, node := range box.Nodes() { - switch node := node.(type) { - case *Char: - node.Render(ship.cur.h+ship.off.h, ship.cur.v+ship.off.v) - ship.cur.h += node.Width() - case *Accent: - node.Render(ship.cur.h+ship.off.h, ship.cur.v+ship.off.v) - ship.cur.h += node.Width() - case *Kern: - ship.cur.h += node.Width() - case *HList: - // node623 - switch len(node.Nodes()) { - case 0: - ship.cur.h += node.Width() - default: - edge := ship.cur.h - ship.cur.v = baseLine + node.lst.shift - ship.hlistOut(node) - ship.cur.h = edge + node.Width() - ship.cur.v = baseLine - } - case *VList: - // node623 - switch len(node.Nodes()) { - case 0: - ship.cur.h += node.Width() - default: - edge := ship.cur.h - ship.cur.v = baseLine + node.lst.shift - ship.vlistOut(node) - ship.cur.h = edge + node.Width() - ship.cur.v = baseLine - } - case *Glue: - // node625 - ruleWidth := node.width - float64(curG) - if glueSign != 0 { // normal - switch { - case glueSign == 1: // stretching - if node.stretchOrder == glueOrder { - curGlue += node.stretch - curG = int(math.Round(clamp(box.GlueSet() * curGlue))) - } - case node.shrinkOrder == glueOrder: // shrinking - curGlue += node.shrink - curG = int(math.Round(clamp(box.GlueSet() * curGlue))) - } - } - ruleWidth += float64(curG) - ship.cur.h += ruleWidth - case Node: - // node624 - ruleHeight := node.Height() - ruleDepth := node.Depth() - ruleWidth := node.Width() - if math.IsInf(ruleHeight, 0) { - ruleHeight = box.Height() - } - if math.IsInf(ruleDepth, 0) { - ruleDepth = box.Depth() - } - if ruleHeight > 0 && ruleWidth > 0 { - ship.cur.v = baseLine + ruleDepth - type renderXYWH interface { - render(x, y, w, h float64) - } - node.(renderXYWH).render( - ship.cur.h+ship.off.h, - ship.cur.v+ship.off.v, - ruleWidth, ruleHeight, - ) - ship.cur.v = baseLine - } - ship.cur.h += ruleWidth - } - } - ship.cur.s-- -} - -func (ship *Ship) vlistOut(box Tree) { - var ( - curG int - curGlue float64 - glueOrder = box.GlueOrder() - glueSign = box.GlueSign() - leftEdge = ship.cur.h - ) - - ship.cur.s++ - ship.maxPush = maxInt(ship.cur.s, ship.maxPush) - ship.cur.v -= box.Height() - - for _, node := range box.Nodes() { - switch node := node.(type) { - case *Kern: - ship.cur.v += node.Width() - case *HList: - switch len(node.Nodes()) { - case 0: - ship.cur.v += node.Height() + node.Depth() - default: - ship.cur.v += node.Height() - ship.cur.h = leftEdge + node.lst.shift - curV := ship.cur.v - node.lst.box.width = box.Width() - ship.hlistOut(node) - ship.cur.v = curV + node.Depth() - ship.cur.h = leftEdge - } - case *VList: - switch len(node.Nodes()) { - case 0: - ship.cur.v += node.Height() + node.Depth() - default: - ship.cur.v += node.Height() - ship.cur.h = leftEdge + node.lst.shift - curV := ship.cur.v - node.lst.box.width = box.Width() - ship.vlistOut(node) - ship.cur.v = curV + node.Depth() - ship.cur.h = leftEdge - } - - case *Glue: - ruleHeight := node.width - float64(curG) - if glueSign != 0 { // normal - switch { - case glueSign == 1: // stretching - if node.stretchOrder == glueOrder { - curGlue += node.stretch - curG = int(math.Round(clamp(box.GlueSet() * curGlue))) - } - case glueOrder == node.shrinkOrder: // shrinking - curGlue += node.shrink - curG = int(math.Round(clamp(box.GlueSet() * curGlue))) - } - } - ruleHeight += float64(curG) - ship.cur.v += ruleHeight - case *Char: - panic("tex: Char node found in vlist") - case *Accent: - panic("tex: Accent node found in vlist") - case Node: - var ( - ruleHeight = node.Height() - ruleDepth = node.Depth() - ruleWidth = node.Width() - ) - if math.IsInf(ruleWidth, 0) { - ruleWidth = box.Width() - } - ruleHeight += ruleDepth - if ruleHeight > 0 && ruleDepth > 0 { - ship.cur.v += ruleHeight - type renderXYWH interface { - render(x, y, w, h float64) - } - if p, ok := node.(renderXYWH); ok { - p.render( - ship.cur.h+ship.off.h, - ship.cur.v+ship.off.v, - ruleWidth, ruleHeight, - ) - } - } - } - } - ship.cur.s-- -} - -type hpacker interface { - hpackDims(width, height, depth *float64, stretch, shrink []float64) -} - -type vpacker interface { - vpackDims(width, height, depth *float64, stretch, shrink []float64) -} - -type Tree interface { - Node - - Nodes() []Node - GlueOrder() int - GlueSign() int - GlueSet() float64 -} - -var ( - _ Node = (*Box)(nil) - _ Node = (*Char)(nil) - _ Node = (*Accent)(nil) - _ Node = (*List)(nil) - _ Node = (*HList)(nil) - _ Node = (*VList)(nil) - _ Node = (*Rule)(nil) - _ Node = (*Glue)(nil) - _ Node = (*Kern)(nil) - _ Node = (*SubSuperCluster)(nil) - - _ hpacker = (*Box)(nil) - _ hpacker = (*Char)(nil) - _ hpacker = (*Accent)(nil) - _ hpacker = (*List)(nil) - _ hpacker = (*HList)(nil) - _ hpacker = (*VList)(nil) - _ hpacker = (*Rule)(nil) - _ hpacker = (*Glue)(nil) - _ hpacker = (*Kern)(nil) - _ hpacker = (*SubSuperCluster)(nil) - - _ vpacker = (*Box)(nil) - _ vpacker = (*Char)(nil) - _ vpacker = (*Accent)(nil) - _ vpacker = (*List)(nil) - _ vpacker = (*HList)(nil) - _ vpacker = (*VList)(nil) - _ vpacker = (*Rule)(nil) - _ vpacker = (*Glue)(nil) - _ vpacker = (*Kern)(nil) - _ vpacker = (*SubSuperCluster)(nil) - - _ Tree = (*List)(nil) - _ Tree = (*HList)(nil) - _ Tree = (*VList)(nil) -) diff --git a/vendor/github.com/go-latex/latex/tex/state.go b/vendor/github.com/go-latex/latex/tex/state.go deleted file mode 100644 index f9efc78..0000000 --- a/vendor/github.com/go-latex/latex/tex/state.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package tex - -import ( - "github.com/go-latex/latex/font" -) - -type State struct { - be font.Backend - Font font.Font - DPI float64 -} - -func NewState(be font.Backend, font font.Font, dpi float64) State { - return State{ - be: be, - Font: font, - DPI: dpi, - } -} - -func (state State) Backend() font.Backend { return state.be } diff --git a/vendor/github.com/go-latex/latex/tex/tex.go b/vendor/github.com/go-latex/latex/tex/tex.go deleted file mode 100644 index f97dc80..0000000 --- a/vendor/github.com/go-latex/latex/tex/tex.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package tex provides a TeX-like box model. -// -// The following is based directly on the document 'woven' from the -// TeX82 source code. This information is also available in printed -// form: -// -// Knuth, Donald E.. 1986. Computers and Typesetting, Volume B: -// TeX: The Program. Addison-Wesley Professional. -// -// An electronic version is also available from: -// -// http://brokestream.com/tex.pdf -// -// The most relevant "chapters" are: -// Data structures for boxes and their friends -// Shipping pages out (Ship class) -// Packaging (hpack and vpack) -// Data structures for math mode -// Subroutines for math mode -// Typesetting math formulas -// -// Many of the docstrings below refer to a numbered "node" in that -// book, e.g., node123 -// -// Note that (as TeX) y increases downward. -package tex // import "github.com/go-latex/latex/tex" diff --git a/vendor/github.com/go-latex/latex/tex/utils.go b/vendor/github.com/go-latex/latex/tex/utils.go deleted file mode 100644 index 18aee37..0000000 --- a/vendor/github.com/go-latex/latex/tex/utils.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package tex - -func maxInt(a, b int) int { - if a > b { - return a - } - return b -} - -func clamp(v float64) float64 { - const ( - min = -1000000000. - max = +1000000000. - ) - switch { - case v < min: - return min - case v > max: - return max - } - return v -} diff --git a/vendor/github.com/go-latex/latex/token/kind_string.go b/vendor/github.com/go-latex/latex/token/kind_string.go deleted file mode 100644 index e3ae594..0000000 --- a/vendor/github.com/go-latex/latex/token/kind_string.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by "stringer -type Kind"; DO NOT EDIT. - -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package token - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[Invalid-0] - _ = x[Macro-1] - _ = x[EmptyLine-2] - _ = x[Comment-3] - _ = x[Space-4] - _ = x[Word-5] - _ = x[Number-6] - _ = x[Symbol-7] - _ = x[Lbrace-8] - _ = x[Rbrace-9] - _ = x[Lbrack-10] - _ = x[Rbrack-11] - _ = x[Lparen-12] - _ = x[Rparen-13] - _ = x[Other-14] - _ = x[Verbatim-15] - _ = x[EOF-16] -} - -const _Kind_name = "InvalidMacroEmptyLineCommentSpaceWordNumberSymbolLbraceRbraceLbrackRbrackLparenRparenOtherVerbatimEOF" - -var _Kind_index = [...]uint8{0, 7, 12, 21, 28, 33, 37, 43, 49, 55, 61, 67, 73, 79, 85, 90, 98, 101} - -func (i Kind) String() string { - if i < 0 || i >= Kind(len(_Kind_index)-1) { - return "Kind(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _Kind_name[_Kind_index[i]:_Kind_index[i+1]] -} diff --git a/vendor/github.com/go-latex/latex/token/token.go b/vendor/github.com/go-latex/latex/token/token.go deleted file mode 100644 index 813ef4e..0000000 --- a/vendor/github.com/go-latex/latex/token/token.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright ©2020 The go-latex Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package token defines constants representing the lexical tokens of -// LaTeX documents. -package token // import "github.com/go-latex/latex/token" - -//go:generate stringer -type Kind - -import ( - "go/token" -) - -// Kind is a kind of LaTeX token. -type Kind int - -const ( - Invalid Kind = iota - Macro - EmptyLine - Comment - Space - Word - Number - Symbol // +,-,?,>,>=,... - Lbrace - Rbrace - Lbrack - Rbrack - Lparen - Rparen - Other - Verbatim - EOF -) - -// Token holds informations about a token. -type Token struct { - Kind Kind // Kind is the kind of token. - Pos Pos // Pos is the position of a token. - Text string -} - -func (t Token) String() string { return t.Text } - -// Pos is a compact encoding of a source position within a file set. -// -// Aliased from go/token.Pos -type Pos = token.Pos diff --git a/vendor/github.com/go-pdf/fpdf/.gitattribute b/vendor/github.com/go-pdf/fpdf/.gitattribute deleted file mode 100644 index d72fd52..0000000 --- a/vendor/github.com/go-pdf/fpdf/.gitattribute +++ /dev/null @@ -1 +0,0 @@ -*.pdf binary diff --git a/vendor/github.com/go-pdf/fpdf/.gitignore b/vendor/github.com/go-pdf/fpdf/.gitignore deleted file mode 100644 index 1fae316..0000000 --- a/vendor/github.com/go-pdf/fpdf/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -*.0 -coverage -font/CalligrapherRegular.json -font/CalligrapherRegular.z -font/Ubuntu-* -internal/files/bin/bin -look -makefont/makefont -open -**/*.out -pdf/*.pdf -pdf.txt -private -*.sublime* -*.swp -**/*.test -.idea/ -doc/body.html -doc/body.md -doc/index.html -doc/index.html.ok -coverage.html - -# macOS -.DS_Store \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/.travis.yml b/vendor/github.com/go-pdf/fpdf/.travis.yml deleted file mode 100644 index 32bd6fd..0000000 --- a/vendor/github.com/go-pdf/fpdf/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: go - -sudo: false - -go: - - master - -os: - - linux - -script: go test -v - -notifications: - email: false diff --git a/vendor/github.com/go-pdf/fpdf/LICENSE b/vendor/github.com/go-pdf/fpdf/LICENSE deleted file mode 100644 index 46efa3e..0000000 --- a/vendor/github.com/go-pdf/fpdf/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -Copyright (c) 2021 The Go-PDF authors -Copyright (c) 2020 David Barnes -Copyright (c) 2017 Kurt Jung and contributors acknowledged in the documentation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/go-pdf/fpdf/Makefile b/vendor/github.com/go-pdf/fpdf/Makefile deleted file mode 100644 index 90624c5..0000000 --- a/vendor/github.com/go-pdf/fpdf/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -all : documentation - -documentation : doc/index.html doc.go README.md - -cov : all - go test -v -coverprofile=coverage && go tool cover -html=coverage -o=coverage.html - -check : - golint . - go vet -all . - gofmt -s -l . - goreportcard-cli -v | grep -v cyclomatic - -README.md : doc/document.md - pandoc --read=markdown --write=gfm < $< > $@ - -doc/index.html : doc/document.md doc/html.txt - pandoc --read=markdown --write=html --template=doc/html.txt \ - --metadata pagetitle="GoFPDF Document Generator" < $< > $@ - -doc.go : doc/document.md doc/go.awk - pandoc --read=markdown --write=plain $< | awk --assign=package_name=gofpdf --file=doc/go.awk > $@ - gofmt -s -w $@ - -build : - go build -v - -clean : - rm -f coverage.html coverage doc/index.html doc.go README.md diff --git a/vendor/github.com/go-pdf/fpdf/README.md b/vendor/github.com/go-pdf/fpdf/README.md deleted file mode 100644 index 0a2ad1d..0000000 --- a/vendor/github.com/go-pdf/fpdf/README.md +++ /dev/null @@ -1,261 +0,0 @@ -# GoFPDF document generator - -[![GitHub release](https://img.shields.io/github/release/go-pdf/fpdf.svg)](https://github.com/go-pdf/fpdf/releases) -[![CI](https://github.com/go-pdf/fpdf/workflows/CI/badge.svg)](https://github.com/go-pdf/fpdf/actions) -[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/go-pdf/fpdf/master/LICENSE) -[![Report](https://goreportcard.com/badge/github.com/go-pdf/fpdf)](https://goreportcard.com/report/github.com/go-pdf/fpdf) -[![GoDoc](https://img.shields.io/badge/godoc-GoFPDF-blue.svg)](https://godoc.org/github.com/go-pdf/fpdf) - -![](https://github.com/go-pdf/fpdf/raw/master/image/logo_gofpdf.jpg) - -Package `go-pdf/fpdf` implements a PDF document generator with high level -support for text, drawing and images. - -## Features - - - UTF-8 support - - Choice of measurement unit, page format and margins - - Page header and footer management - - Automatic page breaks, line breaks, and text justification - - Inclusion of JPEG, PNG, GIF, TIFF and basic path-only SVG images - - Colors, gradients and alpha channel transparency - - Outline bookmarks - - Internal and external links - - TrueType, Type1 and encoding support - - Page compression - - Lines, Bézier curves, arcs, and ellipses - - Rotation, scaling, skewing, translation, and mirroring - - Clipping - - Document protection - - Layers - - Templates - - Barcodes - - Charting facility - - Import PDFs as templates - -gofpdf has no dependencies other than the Go standard library. All tests -pass on Linux, Mac and Windows platforms. - -gofpdf supports UTF-8 TrueType fonts and “right-to-left” languages. Note -that Chinese, Japanese, and Korean characters may not be included in -many general purpose fonts. For these languages, a specialized font (for -example, -[NotoSansSC](https://github.com/jsntn/webfonts/blob/master/NotoSansSC-Regular.ttf) -for simplified Chinese) can be used. - -Also, support is provided to automatically translate UTF-8 runes to code -page encodings for languages that have fewer than 256 glyphs. - -## Installation - -To install the package on your system, run - -``` shell -go get github.com/go-pdf/fpdf -``` - -Later, to receive updates, run - -``` shell -go get -u -v github.com/go-pdf/fpdf/... -``` - -## Quick Start - -The following Go code generates a simple PDF file. - -``` go -pdf := fpdf.New("P", "mm", "A4", "") -pdf.AddPage() -pdf.SetFont("Arial", "B", 16) -pdf.Cell(40, 10, "Hello, world") -err := pdf.OutputFileAndClose("hello.pdf") -``` - -See the functions in the -[fpdf\_test.go](https://github.com/go-pdf/fpdf/blob/master/fpdf_test.go) -file (shown as examples in this documentation) for more advanced PDF -examples. - -## Errors - -If an error occurs in an Fpdf method, an internal error field is set. -After this occurs, Fpdf method calls typically return without performing -any operations and the error state is retained. This error management -scheme facilitates PDF generation since individual method calls do not -need to be examined for failure; it is generally sufficient to wait -until after `Output()` is called. For the same reason, if an error -occurs in the calling application during PDF generation, it may be -desirable for the application to transfer the error to the Fpdf instance -by calling the `SetError()` method or the `SetErrorf()` method. At any -time during the life cycle of the Fpdf instance, the error state can be -determined with a call to `Ok()` or `Err()`. The error itself can be -retrieved with a call to `Error()`. - -## Conversion Notes - -This package is a relatively straightforward translation from the -original [FPDF](http://www.fpdf.org/) library written in PHP (despite -the caveat in the introduction to [Effective -Go](https://golang.org/doc/effective_go.html)). The API names have been -retained even though the Go idiom would suggest otherwise (for example, -`pdf.GetX()` is used rather than simply `pdf.X()`). The similarity of -the two libraries makes the original FPDF website a good source of -information. It includes a forum and FAQ. - -However, some internal changes have been made. Page content is built up -using buffers (of type bytes.Buffer) rather than repeated string -concatenation. Errors are handled as explained above rather than -panicking. Output is generated through an interface of type io.Writer or -io.WriteCloser. A number of the original PHP methods behave differently -based on the type of the arguments that are passed to them; in these -cases additional methods have been exported to provide similar -functionality. Font definition files are produced in JSON rather than -PHP. - -## Example PDFs - -A side effect of running `go test ./...` is the production of a number -of example PDFs. These can be found in the gofpdf/pdf directory after -the tests complete. - -Please note that these examples run in the context of a test. In order -run an example as a standalone application, you’ll need to examine -[fpdf\_test.go](https://github.com/go-pdf/fpdf/blob/master/fpdf_test.go) -for some helper routines, for example `exampleFilename()` and -`summary()`. - -Example PDFs can be compared with reference copies in order to verify -that they have been generated as expected. This comparison will be -performed if a PDF with the same name as the example PDF is placed in -the fpdf/pdf/reference directory and if the third argument to -`ComparePDFFiles()` in internal/example/example.go is true. (By default -it is false.) The routine that summarizes an example will look for this -file and, if found, will call `ComparePDFFiles()` to check the example -PDF for equality with its reference PDF. If differences exist between -the two files they will be printed to standard output and the test will -fail. If the reference file is missing, the comparison is considered to -succeed. In order to successfully compare two PDFs, the placement of -internal resources must be consistent and the internal creation -timestamps must be the same. To do this, the methods `SetCatalogSort()` -and `SetCreationDate()` need to be called for both files. This is done -automatically for all examples. - -## Nonstandard Fonts - -Nothing special is required to use the standard PDF fonts (courier, -helvetica, times, zapfdingbats) in your documents other than calling -`SetFont()`. - -You should use `AddUTF8Font()` or `AddUTF8FontFromBytes()` to add a -TrueType UTF-8 encoded font. Use `RTL()` and `LTR()` methods switch -between “right-to-left” and “left-to-right” mode. - -In order to use a different non-UTF-8 TrueType or Type1 font, you will -need to generate a font definition file and, if the font will be -embedded into PDFs, a compressed version of the font file. This is done -by calling the MakeFont function or using the included makefont command -line utility. To create the utility, cd into the makefont subdirectory -and run “go build”. This will produce a standalone executable named -makefont. Select the appropriate encoding file from the font -subdirectory and run the command as in the following example. - -``` shell -./makefont --embed --enc=../font/cp1252.map --dst=../font ../font/calligra.ttf -``` - -In your PDF generation code, call `AddFont()` to load the font and, as -with the standard fonts, SetFont() to begin using it. Most examples, -including the package example, demonstrate this method. Good sources of -free, open-source fonts include [Google -Fonts](https://fonts.google.com/) and [DejaVu -Fonts](http://dejavu-fonts.org/). - -## Related Packages - -The [draw2d](https://github.com/llgcode/draw2d) package is a two -dimensional vector graphics library that can generate output in -different forms. It uses `go-pdf/fpdf` for its document production mode. - -## Contributing Changes - -`go-pdf/fpdf` is a global community effort and you are invited to make it even -better. If you have implemented a new feature or corrected a problem, -please consider contributing your change to the project. A contribution -that does not directly pertain to the core functionality of `go-pdf/fpdf` -should be placed in its own directory directly beneath the `contrib` -directory. - -Here are guidelines for making submissions. Your change should - - - be compatible with the MIT License - - be properly documented - - be formatted with `go fmt` - - include an example in - [fpdf\_test.go](https://github.com/go-pdf/fpdf/blob/master/fpdf_test.go) - if appropriate - - conform to the standards of [golint](https://github.com/golang/lint) - and [go vet](https://golang.org/cmd/vet/), that is, `golint .` and - `go vet .` should not generate any warnings - - not diminish [test coverage](https://blog.golang.org/cover) - -[Pull requests](https://help.github.com/articles/using-pull-requests/) -are the preferred means of accepting your changes. - -## License - -`go-pdf/fpdf` is released under the MIT License. It is copyrighted by Kurt Jung and the contributors acknowledged below. - -## Acknowledgments - -Thank you to Kurt Jung who originally wrote [gofpdf](https://github.com/jung-kurt/gofpdf) in 2013 - 2019. -This package’s code and documentation are closely derived from the -[FPDF](http://www.fpdf.org/) library created by Olivier Plathey, and a -number of font and image resources are copied directly from it. Bruno -Michel has provided valuable assistance with the code. Drawing support -is adapted from the FPDF geometric figures script by David Hernández -Sanz. Transparency support is adapted from the FPDF transparency script -by Martin Hall-May. Support for gradients and clipping is adapted from -FPDF scripts by Andreas Würmser. Support for outline bookmarks is -adapted from Olivier Plathey by Manuel Cornes. Layer support is adapted -from Olivier Plathey. Support for transformations is adapted from the -FPDF transformation script by Moritz Wagner and Andreas Würmser. PDF -protection is adapted from the work of Klemen Vodopivec for the FPDF -product. Lawrence Kesteloot provided code to allow an image’s extent to -be determined prior to placement. Support for vertical alignment within -a cell was provided by Stefan Schroeder. Ivan Daniluk generalized the -font and image loading code to use the Reader interface while -maintaining backward compatibility. Anthony Starks provided code for the -Polygon function. Robert Lillack provided the Beziergon function and -corrected some naming issues with the internal curve function. Claudio -Felber provided implementations for dashed line drawing and generalized -font loading. Stani Michiels provided support for multi-segment path -drawing with smooth line joins, line join styles, enhanced fill modes, -and has helped greatly with package presentation and tests. Templating -is adapted by Marcus Downing from the FPDF\_Tpl library created by Jan -Slabon and Setasign. Jelmer Snoeck contributed packages that generate a -variety of barcodes and help with registering images on the web. Jelmer -Snoek and Guillermo Pascual augmented the basic HTML functionality with -aligned text. Kent Quirk implemented backwards-compatible support for -reading DPI from images that support it, and for setting DPI manually -and then having it properly taken into account when calculating image -size. Paulo Coutinho provided support for static embedded fonts. Dan -Meyers added support for embedded JavaScript. David Fish added a generic -alias-replacement function to enable, among other things, table of -contents functionality. Andy Bakun identified and corrected a problem in -which the internal catalogs were not sorted stably. Paul Montag added -encoding and decoding functionality for templates, including images that -are embedded in templates; this allows templates to be stored -independently of gofpdf. Paul also added support for page boxes used in -printing PDF documents. Wojciech Matusiak added supported for word -spacing. Artem Korotkiy added support of UTF-8 fonts. Dave Barnes added -support for imported objects and templates. Brigham Thompson added -support for rounded rectangles. Joe Westcott added underline -functionality and optimized image storage. Benoit KUGLER contributed -support for rectangles with corners of unequal radius, modification -times, and for file attachments and annotations. - -## Roadmap - - - Remove all legacy code page font support; use UTF-8 exclusively - - Improve test coverage as reported by the coverage tool. diff --git a/vendor/github.com/go-pdf/fpdf/attachments.go b/vendor/github.com/go-pdf/fpdf/attachments.go deleted file mode 100644 index 8b75b90..0000000 --- a/vendor/github.com/go-pdf/fpdf/attachments.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package fpdf - -import ( - "crypto/md5" - "encoding/hex" - "fmt" - "strings" -) - -// Attachment defines a content to be included in the pdf, in one -// of the following ways : -// - associated with the document as a whole : see SetAttachments() -// - accessible via a link localized on a page : see AddAttachmentAnnotation() -type Attachment struct { - Content []byte - - // Filename is the displayed name of the attachment - Filename string - - // Description is only displayed when using AddAttachmentAnnotation(), - // and might be modified by the pdf reader. - Description string - - objectNumber int // filled when content is included -} - -// return the hex encoded checksum of `data` -func checksum(data []byte) string { - sl := md5.Sum(data) - return hex.EncodeToString(sl[:]) -} - -// Writes a compressed file like object as "/EmbeddedFile". Compressing is -// done with deflate. Includes length, compressed length and MD5 checksum. -func (f *Fpdf) writeCompressedFileObject(content []byte) { - lenUncompressed := len(content) - sum := checksum(content) - mem := xmem.compress(content) - defer mem.release() - compressed := mem.bytes() - lenCompressed := len(compressed) - f.newobj() - f.outf("<< /Type /EmbeddedFile /Length %d /Filter /FlateDecode /Params << /CheckSum <%s> /Size %d >> >>\n", - lenCompressed, sum, lenUncompressed) - f.putstream(compressed) - f.out("endobj") -} - -// Embed includes the content of `a`, and update its internal reference. -func (f *Fpdf) embed(a *Attachment) { - if a.objectNumber != 0 { // already embedded (objectNumber start at 2) - return - } - oldState := f.state - f.state = 1 // we write file content in the main buffer - f.writeCompressedFileObject(a.Content) - streamID := f.n - f.newobj() - f.outf("<< /Type /Filespec /F () /UF %s /EF << /F %d 0 R >> /Desc %s\n>>", - f.textstring(utf8toutf16(a.Filename)), - streamID, - f.textstring(utf8toutf16(a.Description))) - f.out("endobj") - a.objectNumber = f.n - f.state = oldState -} - -// SetAttachments writes attachments as embedded files (document attachment). -// These attachments are global, see AddAttachmentAnnotation() for a link -// anchored in a page. Note that only the last call of SetAttachments is -// useful, previous calls are discarded. Be aware that not all PDF readers -// support document attachments. See the SetAttachment example for a -// demonstration of this method. -func (f *Fpdf) SetAttachments(as []Attachment) { - f.attachments = as -} - -// embed current attachments. store object numbers -// for later use by getEmbeddedFiles() -func (f *Fpdf) putAttachments() { - for i, a := range f.attachments { - f.embed(&a) - f.attachments[i] = a - } -} - -// return /EmbeddedFiles tree name catalog entry. -func (f Fpdf) getEmbeddedFiles() string { - names := make([]string, len(f.attachments)) - for i, as := range f.attachments { - names[i] = fmt.Sprintf("(Attachement%d) %d 0 R ", i+1, as.objectNumber) - } - nameTree := fmt.Sprintf("<< /Names [\n %s \n] >>", strings.Join(names, "\n")) - return nameTree -} - -// ---------------------------------- Annotations ---------------------------------- - -type annotationAttach struct { - *Attachment - - x, y, w, h float64 // fpdf coordinates (y diff and scaling done) -} - -// AddAttachmentAnnotation puts a link on the current page, on the rectangle -// defined by `x`, `y`, `w`, `h`. This link points towards the content defined -// in `a`, which is embedded in the document. Note than no drawing is done by -// this method : a method like `Cell()` or `Rect()` should be called to -// indicate to the reader that there is a link here. Requiring a pointer to an -// Attachment avoids useless copies in the resulting pdf: attachment pointing -// to the same data will have their content only be included once, and be -// shared amongst all links. Be aware that not all PDF readers support -// annotated attachments. See the AddAttachmentAnnotation example for a -// demonstration of this method. -func (f *Fpdf) AddAttachmentAnnotation(a *Attachment, x, y, w, h float64) { - if a == nil { - return - } - f.pageAttachments[f.page] = append(f.pageAttachments[f.page], annotationAttach{ - Attachment: a, - x: x * f.k, y: f.hPt - y*f.k, w: w * f.k, h: h * f.k, - }) -} - -// embed current annotations attachments. store object numbers -// for later use by putAttachmentAnnotationLinks(), which is -// called for each page. -func (f *Fpdf) putAnnotationsAttachments() { - // avoid duplication - m := map[*Attachment]bool{} - for _, l := range f.pageAttachments { - for _, an := range l { - if m[an.Attachment] { // already embedded - continue - } - f.embed(an.Attachment) - } - } -} - -func (f *Fpdf) putAttachmentAnnotationLinks(out *fmtBuffer, page int) { - for _, an := range f.pageAttachments[page] { - x1, y1, x2, y2 := an.x, an.y, an.x+an.w, an.y-an.h - as := fmt.Sprintf("<< /Type /XObject /Subtype /Form /BBox [%.2f %.2f %.2f %.2f] /Length 0 >>", - x1, y1, x2, y2) - as += "\nstream\nendstream" - - out.printf("<< /Type /Annot /Subtype /FileAttachment /Rect [%.2f %.2f %.2f %.2f] /Border [0 0 0]\n", - x1, y1, x2, y2) - out.printf("/Contents %s ", f.textstring(utf8toutf16(an.Description))) - out.printf("/T %s ", f.textstring(utf8toutf16(an.Filename))) - out.printf("/AP << /N %s>>", as) - out.printf("/FS %d 0 R >>\n", an.objectNumber) - } -} diff --git a/vendor/github.com/go-pdf/fpdf/compare.go b/vendor/github.com/go-pdf/fpdf/compare.go deleted file mode 100644 index 861c56c..0000000 --- a/vendor/github.com/go-pdf/fpdf/compare.go +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2015 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -import ( - "bytes" - "fmt" - "io" - "os" - "sort" -) - -type sortType struct { - length int - less func(int, int) bool - swap func(int, int) -} - -func (s *sortType) Len() int { - return s.length -} - -func (s *sortType) Less(i, j int) bool { - return s.less(i, j) -} - -func (s *sortType) Swap(i, j int) { - s.swap(i, j) -} - -func gensort(Len int, Less func(int, int) bool, Swap func(int, int)) { - sort.Sort(&sortType{length: Len, less: Less, swap: Swap}) -} - -func writeBytes(leadStr string, startPos int, sl []byte) { - var pos, max int - var b byte - fmt.Printf("%s %07x", leadStr, startPos) - max = len(sl) - for pos < max { - fmt.Printf(" ") - for k := 0; k < 8; k++ { - if pos < max { - fmt.Printf(" %02x", sl[pos]) - } else { - fmt.Printf(" ") - } - pos++ - } - } - fmt.Printf(" |") - pos = 0 - for pos < max { - b = sl[pos] - if b < 32 || b >= 128 { - b = '.' - } - fmt.Printf("%c", b) - pos++ - } - fmt.Printf("|\n") -} - -func checkBytes(pos int, sl1, sl2 []byte, printDiff bool) (eq bool) { - eq = bytes.Equal(sl1, sl2) - if !eq && printDiff { - writeBytes("<", pos, sl1) - writeBytes(">", pos, sl2) - } - return -} - -// CompareBytes compares the bytes referred to by sl1 with those referred to by -// sl2. Nil is returned if the buffers are equal, otherwise an error. -func CompareBytes(sl1, sl2 []byte, printDiff bool) (err error) { - var posStart, posEnd, len1, len2, length int - var diffs bool - - len1 = len(sl1) - len2 = len(sl2) - length = len1 - if length > len2 { - length = len2 - } - for posStart < length-1 { - posEnd = posStart + 16 - if posEnd > length { - posEnd = length - } - if !checkBytes(posStart, sl1[posStart:posEnd], sl2[posStart:posEnd], printDiff) { - diffs = true - } - posStart = posEnd - } - if diffs { - err = fmt.Errorf("documents are different") - } - return -} - -// ComparePDFs reads and compares the full contents of the two specified -// readers byte-for-byte. Nil is returned if the buffers are equal, otherwise -// an error. -func ComparePDFs(rdr1, rdr2 io.Reader, printDiff bool) (err error) { - var b1, b2 *bytes.Buffer - _, err = b1.ReadFrom(rdr1) - if err == nil { - _, err = b2.ReadFrom(rdr2) - if err == nil { - err = CompareBytes(b1.Bytes(), b2.Bytes(), printDiff) - } - } - return -} - -// ComparePDFFiles reads and compares the full contents of the two specified -// files byte-for-byte. Nil is returned if the file contents are equal, or if -// the second file is missing, otherwise an error. -func ComparePDFFiles(file1Str, file2Str string, printDiff bool) (err error) { - var sl1, sl2 []byte - sl1, err = os.ReadFile(file1Str) - if err == nil { - sl2, err = os.ReadFile(file2Str) - if err == nil { - err = CompareBytes(sl1, sl2, printDiff) - } else { - // Second file is missing; treat this as success - err = nil - } - } - return -} diff --git a/vendor/github.com/go-pdf/fpdf/def.go b/vendor/github.com/go-pdf/fpdf/def.go deleted file mode 100644 index 4d9655b..0000000 --- a/vendor/github.com/go-pdf/fpdf/def.go +++ /dev/null @@ -1,833 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2013-2014 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -import ( - "bytes" - "crypto/sha1" - "encoding/binary" - "encoding/gob" - "encoding/json" - "fmt" - "io" - "math" - "strconv" - "time" -) - -// Version of FPDF from which this package is derived -const ( - cnFpdfVersion = "1.7" -) - -type blendModeType struct { - strokeStr, fillStr, modeStr string - objNum int -} - -type gradientType struct { - tp int // 2: linear, 3: radial - clr1Str, clr2Str string - x1, y1, x2, y2, r float64 - objNum int -} - -const ( - // OrientationPortrait represents the portrait orientation. - OrientationPortrait = "portrait" - - // OrientationLandscape represents the landscape orientation. - OrientationLandscape = "landscape" -) - -const ( - // UnitPoint represents the size unit point - UnitPoint = "pt" - // UnitMillimeter represents the size unit millimeter - UnitMillimeter = "mm" - // UnitCentimeter represents the size unit centimeter - UnitCentimeter = "cm" - // UnitInch represents the size unit inch - UnitInch = "inch" -) - -const ( - // PageSizeA3 represents DIN/ISO A3 page size - PageSizeA3 = "A3" - // PageSizeA4 represents DIN/ISO A4 page size - PageSizeA4 = "A4" - // PageSizeA5 represents DIN/ISO A5 page size - PageSizeA5 = "A5" - // PageSizeLetter represents US Letter page size - PageSizeLetter = "Letter" - // PageSizeLegal represents US Legal page size - PageSizeLegal = "Legal" -) - -const ( - // BorderNone set no border - BorderNone = "" - // BorderFull sets a full border - BorderFull = "1" - // BorderLeft sets the border on the left side - BorderLeft = "L" - // BorderTop sets the border at the top - BorderTop = "T" - // BorderRight sets the border on the right side - BorderRight = "R" - // BorderBottom sets the border on the bottom - BorderBottom = "B" -) - -const ( - // LineBreakNone disables linebreak - LineBreakNone = 0 - // LineBreakNormal enables normal linebreak - LineBreakNormal = 1 - // LineBreakBelow enables linebreak below - LineBreakBelow = 2 -) - -const ( - // AlignLeft left aligns the cell - AlignLeft = "L" - // AlignRight right aligns the cell - AlignRight = "R" - // AlignCenter centers the cell - AlignCenter = "C" - // AlignTop aligns the cell to the top - AlignTop = "T" - // AlignBottom aligns the cell to the bottom - AlignBottom = "B" - // AlignMiddle aligns the cell to the middle - AlignMiddle = "M" - // AlignBaseline aligns the cell to the baseline - AlignBaseline = "B" -) - -type colorMode int - -const ( - colorModeRGB colorMode = iota - colorModeSpot -) - -type colorType struct { - r, g, b float64 - ir, ig, ib int - mode colorMode - spotStr string // name of current spot color - gray bool - str string -} - -// SpotColorType specifies a named spot color value -type spotColorType struct { - id, objID int - val cmykColorType -} - -// cmykColorType specifies an ink-based CMYK color value -type cmykColorType struct { - c, m, y, k byte // 0% to 100% -} - -// SizeType fields Wd and Ht specify the horizontal and vertical extents of a -// document element such as a page. -type SizeType struct { - Wd, Ht float64 -} - -// PointType fields X and Y specify the horizontal and vertical coordinates of -// a point, typically used in drawing. -type PointType struct { - X, Y float64 -} - -// XY returns the X and Y components of the receiver point. -func (p PointType) XY() (float64, float64) { - return p.X, p.Y -} - -// ImageInfoType contains size, color and other information about an image. -// Changes to this structure should be reflected in its GobEncode and GobDecode -// methods. -type ImageInfoType struct { - data []byte // Raw image data - smask []byte // Soft Mask, an 8bit per-pixel transparency mask - n int // Image object number - w float64 // Width - h float64 // Height - cs string // Color space - pal []byte // Image color palette - bpc int // Bits Per Component - f string // Image filter - dp string // DecodeParms - trns []int // Transparency mask - scale float64 // Document scale factor - dpi float64 // Dots-per-inch found from image file (png only) - i string // SHA-1 checksum of the above values. -} - -type idEncoder struct { - w io.Writer - buf []byte - err error -} - -func newIDEncoder(w io.Writer) *idEncoder { - return &idEncoder{ - w: w, - buf: make([]byte, 8), - } -} - -func (enc *idEncoder) i64(v int64) { - if enc.err != nil { - return - } - binary.LittleEndian.PutUint64(enc.buf, uint64(v)) - _, enc.err = enc.w.Write(enc.buf) -} - -func (enc *idEncoder) f64(v float64) { - if enc.err != nil { - return - } - binary.LittleEndian.PutUint64(enc.buf, math.Float64bits(v)) - _, enc.err = enc.w.Write(enc.buf) -} - -func (enc *idEncoder) str(v string) { - if enc.err != nil { - return - } - _, enc.err = enc.w.Write([]byte(v)) -} - -func (enc *idEncoder) bytes(v []byte) { - if enc.err != nil { - return - } - _, enc.err = enc.w.Write(v) -} - -func generateImageID(info *ImageInfoType) (string, error) { - sha := sha1.New() - enc := newIDEncoder(sha) - enc.bytes(info.data) - enc.bytes(info.smask) - enc.i64(int64(info.n)) - enc.f64(info.w) - enc.f64(info.h) - enc.str(info.cs) - enc.bytes(info.pal) - enc.i64(int64(info.bpc)) - enc.str(info.f) - enc.str(info.dp) - for _, v := range info.trns { - enc.i64(int64(v)) - } - enc.f64(info.scale) - enc.f64(info.dpi) - enc.str(info.i) - - return fmt.Sprintf("%x", sha.Sum(nil)), nil -} - -// GobEncode encodes the receiving image to a byte slice. -func (info *ImageInfoType) GobEncode() (buf []byte, err error) { - fields := []interface{}{info.data, info.smask, info.n, info.w, info.h, info.cs, - info.pal, info.bpc, info.f, info.dp, info.trns, info.scale, info.dpi} - w := new(bytes.Buffer) - encoder := gob.NewEncoder(w) - for j := 0; j < len(fields) && err == nil; j++ { - err = encoder.Encode(fields[j]) - } - if err == nil { - buf = w.Bytes() - } - return -} - -// GobDecode decodes the specified byte buffer (generated by GobEncode) into -// the receiving image. -func (info *ImageInfoType) GobDecode(buf []byte) (err error) { - fields := []interface{}{&info.data, &info.smask, &info.n, &info.w, &info.h, - &info.cs, &info.pal, &info.bpc, &info.f, &info.dp, &info.trns, &info.scale, &info.dpi} - r := bytes.NewBuffer(buf) - decoder := gob.NewDecoder(r) - for j := 0; j < len(fields) && err == nil; j++ { - err = decoder.Decode(fields[j]) - } - - info.i, err = generateImageID(info) - return -} - -// PointConvert returns the value of pt, expressed in points (1/72 inch), as a -// value expressed in the unit of measure specified in New(). Since font -// management in Fpdf uses points, this method can help with line height -// calculations and other methods that require user units. -func (f *Fpdf) PointConvert(pt float64) (u float64) { - return pt / f.k -} - -// PointToUnitConvert is an alias for PointConvert. -func (f *Fpdf) PointToUnitConvert(pt float64) (u float64) { - return pt / f.k -} - -// UnitToPointConvert returns the value of u, expressed in the unit of measure -// specified in New(), as a value expressed in points (1/72 inch). Since font -// management in Fpdf uses points, this method can help with setting font sizes -// based on the sizes of other non-font page elements. -func (f *Fpdf) UnitToPointConvert(u float64) (pt float64) { - return u * f.k -} - -// Extent returns the width and height of the image in the units of the Fpdf -// object. -func (info *ImageInfoType) Extent() (wd, ht float64) { - return info.Width(), info.Height() -} - -// Width returns the width of the image in the units of the Fpdf object. -func (info *ImageInfoType) Width() float64 { - return info.w / (info.scale * info.dpi / 72) -} - -// Height returns the height of the image in the units of the Fpdf object. -func (info *ImageInfoType) Height() float64 { - return info.h / (info.scale * info.dpi / 72) -} - -// SetDpi sets the dots per inch for an image. PNG images MAY have their dpi -// set automatically, if the image specifies it. DPI information is not -// currently available automatically for JPG and GIF images, so if it's -// important to you, you can set it here. It defaults to 72 dpi. -func (info *ImageInfoType) SetDpi(dpi float64) { - info.dpi = dpi -} - -type fontFileType struct { - length1, length2 int64 - n int - embedded bool - content []byte - fontType string -} - -type linkType struct { - x, y, wd, ht float64 - link int // Auto-generated internal link ID or... - linkStr string // ...application-provided external link string -} - -type intLinkType struct { - page int - y float64 -} - -// outlineType is used for a sidebar outline of bookmarks -type outlineType struct { - text string - level, parent, first, last, next, prev int - y float64 - p int -} - -// InitType is used with NewCustom() to customize an Fpdf instance. -// OrientationStr, UnitStr, SizeStr and FontDirStr correspond to the arguments -// accepted by New(). If the Wd and Ht fields of Size are each greater than -// zero, Size will be used to set the default page size rather than SizeStr. Wd -// and Ht are specified in the units of measure indicated by UnitStr. -type InitType struct { - OrientationStr string - UnitStr string - SizeStr string - Size SizeType - FontDirStr string -} - -// FontLoader is used to read fonts (JSON font specification and zlib compressed font binaries) -// from arbitrary locations (e.g. files, zip files, embedded font resources). -// -// Open provides an io.Reader for the specified font file (.json or .z). The file name -// never includes a path. Open returns an error if the specified file cannot be opened. -type FontLoader interface { - Open(name string) (io.Reader, error) -} - -// Pdf defines the interface used for various methods. It is implemented by the -// main FPDF instance as well as templates. -type Pdf interface { - AddFont(familyStr, styleStr, fileStr string) - AddFontFromBytes(familyStr, styleStr string, jsonFileBytes, zFileBytes []byte) - AddFontFromReader(familyStr, styleStr string, r io.Reader) - AddLayer(name string, visible bool) (layerID int) - AddLink() int - AddPage() - AddPageFormat(orientationStr string, size SizeType) - AddSpotColor(nameStr string, c, m, y, k byte) - AliasNbPages(aliasStr string) - ArcTo(x, y, rx, ry, degRotate, degStart, degEnd float64) - Arc(x, y, rx, ry, degRotate, degStart, degEnd float64, styleStr string) - BeginLayer(id int) - Beziergon(points []PointType, styleStr string) - Bookmark(txtStr string, level int, y float64) - CellFormat(w, h float64, txtStr, borderStr string, ln int, alignStr string, fill bool, link int, linkStr string) - Cellf(w, h float64, fmtStr string, args ...interface{}) - Cell(w, h float64, txtStr string) - Circle(x, y, r float64, styleStr string) - ClearError() - ClipCircle(x, y, r float64, outline bool) - ClipEllipse(x, y, rx, ry float64, outline bool) - ClipEnd() - ClipPolygon(points []PointType, outline bool) - ClipRect(x, y, w, h float64, outline bool) - ClipRoundedRect(x, y, w, h, r float64, outline bool) - ClipText(x, y float64, txtStr string, outline bool) - Close() - ClosePath() - CreateTemplateCustom(corner PointType, size SizeType, fn func(*Tpl)) Template - CreateTemplate(fn func(*Tpl)) Template - CurveBezierCubicTo(cx0, cy0, cx1, cy1, x, y float64) - CurveBezierCubic(x0, y0, cx0, cy0, cx1, cy1, x1, y1 float64, styleStr string) - CurveCubic(x0, y0, cx0, cy0, x1, y1, cx1, cy1 float64, styleStr string) - CurveTo(cx, cy, x, y float64) - Curve(x0, y0, cx, cy, x1, y1 float64, styleStr string) - DrawPath(styleStr string) - Ellipse(x, y, rx, ry, degRotate float64, styleStr string) - EndLayer() - Err() bool - Error() error - GetAlpha() (alpha float64, blendModeStr string) - GetAutoPageBreak() (auto bool, margin float64) - GetCellMargin() float64 - GetConversionRatio() float64 - GetDrawColor() (int, int, int) - GetDrawSpotColor() (name string, c, m, y, k byte) - GetFillColor() (int, int, int) - GetFillSpotColor() (name string, c, m, y, k byte) - GetFontDesc(familyStr, styleStr string) FontDescType - GetFontSize() (ptSize, unitSize float64) - GetImageInfo(imageStr string) (info *ImageInfoType) - GetLineWidth() float64 - GetMargins() (left, top, right, bottom float64) - GetPageSizeStr(sizeStr string) (size SizeType) - GetPageSize() (width, height float64) - GetStringWidth(s string) float64 - GetTextColor() (int, int, int) - GetTextSpotColor() (name string, c, m, y, k byte) - GetX() float64 - GetXY() (float64, float64) - GetY() float64 - HTMLBasicNew() (html HTMLBasicType) - Image(imageNameStr string, x, y, w, h float64, flow bool, tp string, link int, linkStr string) - ImageOptions(imageNameStr string, x, y, w, h float64, flow bool, options ImageOptions, link int, linkStr string) - ImageTypeFromMime(mimeStr string) (tp string) - LinearGradient(x, y, w, h float64, r1, g1, b1, r2, g2, b2 int, x1, y1, x2, y2 float64) - LineTo(x, y float64) - Line(x1, y1, x2, y2 float64) - LinkString(x, y, w, h float64, linkStr string) - Link(x, y, w, h float64, link int) - Ln(h float64) - MoveTo(x, y float64) - MultiCell(w, h float64, txtStr, borderStr, alignStr string, fill bool) - Ok() bool - OpenLayerPane() - OutputAndClose(w io.WriteCloser) error - OutputFileAndClose(fileStr string) error - Output(w io.Writer) error - PageCount() int - PageNo() int - PageSize(pageNum int) (wd, ht float64, unitStr string) - PointConvert(pt float64) (u float64) - PointToUnitConvert(pt float64) (u float64) - Polygon(points []PointType, styleStr string) - RadialGradient(x, y, w, h float64, r1, g1, b1, r2, g2, b2 int, x1, y1, x2, y2, r float64) - RawWriteBuf(r io.Reader) - RawWriteStr(str string) - Rect(x, y, w, h float64, styleStr string) - RegisterAlias(alias, replacement string) - RegisterImage(fileStr, tp string) (info *ImageInfoType) - RegisterImageOptions(fileStr string, options ImageOptions) (info *ImageInfoType) - RegisterImageOptionsReader(imgName string, options ImageOptions, r io.Reader) (info *ImageInfoType) - RegisterImageReader(imgName, tp string, r io.Reader) (info *ImageInfoType) - SetAcceptPageBreakFunc(fnc func() bool) - SetAlpha(alpha float64, blendModeStr string) - SetAuthor(authorStr string, isUTF8 bool) - SetAutoPageBreak(auto bool, margin float64) - SetCatalogSort(flag bool) - SetCellMargin(margin float64) - SetCompression(compress bool) - SetCreationDate(tm time.Time) - SetCreator(creatorStr string, isUTF8 bool) - SetDashPattern(dashArray []float64, dashPhase float64) - SetDisplayMode(zoomStr, layoutStr string) - SetLang(lang string) - SetDrawColor(r, g, b int) - SetDrawSpotColor(nameStr string, tint byte) - SetError(err error) - SetErrorf(fmtStr string, args ...interface{}) - SetFillColor(r, g, b int) - SetFillSpotColor(nameStr string, tint byte) - SetFont(familyStr, styleStr string, size float64) - SetFontLoader(loader FontLoader) - SetFontLocation(fontDirStr string) - SetFontSize(size float64) - SetFontStyle(styleStr string) - SetFontUnitSize(size float64) - SetFooterFunc(fnc func()) - SetFooterFuncLpi(fnc func(lastPage bool)) - SetHeaderFunc(fnc func()) - SetHeaderFuncMode(fnc func(), homeMode bool) - SetHomeXY() - SetJavascript(script string) - SetKeywords(keywordsStr string, isUTF8 bool) - SetLeftMargin(margin float64) - SetLineCapStyle(styleStr string) - SetLineJoinStyle(styleStr string) - SetLineWidth(width float64) - SetLink(link int, y float64, page int) - SetMargins(left, top, right float64) - SetPageBoxRec(t string, pb PageBox) - SetPageBox(t string, x, y, wd, ht float64) - SetPage(pageNum int) - SetProtection(actionFlag byte, userPassStr, ownerPassStr string) - SetRightMargin(margin float64) - SetSubject(subjectStr string, isUTF8 bool) - SetTextColor(r, g, b int) - SetTextSpotColor(nameStr string, tint byte) - SetTitle(titleStr string, isUTF8 bool) - SetTopMargin(margin float64) - SetUnderlineThickness(thickness float64) - SetXmpMetadata(xmpStream []byte) - SetX(x float64) - SetXY(x, y float64) - SetY(y float64) - SplitLines(txt []byte, w float64) [][]byte - String() string - SVGBasicWrite(sb *SVGBasicType, scale float64) - Text(x, y float64, txtStr string) - TransformBegin() - TransformEnd() - TransformMirrorHorizontal(x float64) - TransformMirrorLine(angle, x, y float64) - TransformMirrorPoint(x, y float64) - TransformMirrorVertical(y float64) - TransformRotate(angle, x, y float64) - TransformScale(scaleWd, scaleHt, x, y float64) - TransformScaleX(scaleWd, x, y float64) - TransformScaleXY(s, x, y float64) - TransformScaleY(scaleHt, x, y float64) - TransformSkew(angleX, angleY, x, y float64) - TransformSkewX(angleX, x, y float64) - TransformSkewY(angleY, x, y float64) - Transform(tm TransformMatrix) - TransformTranslate(tx, ty float64) - TransformTranslateX(tx float64) - TransformTranslateY(ty float64) - UnicodeTranslatorFromDescriptor(cpStr string) (rep func(string) string) - UnitToPointConvert(u float64) (pt float64) - UseTemplateScaled(t Template, corner PointType, size SizeType) - UseTemplate(t Template) - WriteAligned(width, lineHeight float64, textStr, alignStr string) - Writef(h float64, fmtStr string, args ...interface{}) - Write(h float64, txtStr string) - WriteLinkID(h float64, displayStr string, linkID int) - WriteLinkString(h float64, displayStr, targetStr string) -} - -// PageBox defines the coordinates and extent of the various page box types -type PageBox struct { - SizeType - PointType -} - -// Fpdf is the principal structure for creating a single PDF document -type Fpdf struct { - isCurrentUTF8 bool // is current font used in utf-8 mode - isRTL bool // is is right to left mode enabled - page int // current page number - n int // current object number - offsets []int // array of object offsets - templates map[string]Template // templates used in this document - templateObjects map[string]int // template object IDs within this document - importedObjs map[string][]byte // imported template objects (gofpdi) - importedObjPos map[string]map[int]string // imported template objects hashes and their positions (gofpdi) - importedTplObjs map[string]string // imported template names and IDs (hashed) (gofpdi) - importedTplIDs map[string]int // imported template ids hash to object id int (gofpdi) - buffer fmtBuffer // buffer holding in-memory PDF - pages []*bytes.Buffer // slice[page] of page content; 1-based - state int // current document state - compress bool // compression flag - k float64 // scale factor (number of points in user unit) - defOrientation string // default orientation - curOrientation string // current orientation - stdPageSizes map[string]SizeType // standard page sizes - defPageSize SizeType // default page size - defPageBoxes map[string]PageBox // default page size - curPageSize SizeType // current page size - pageSizes map[int]SizeType // used for pages with non default sizes or orientations - pageBoxes map[int]map[string]PageBox // used to define the crop, trim, bleed and art boxes - unitStr string // unit of measure for all rendered objects except fonts - wPt, hPt float64 // dimensions of current page in points - w, h float64 // dimensions of current page in user unit - lMargin float64 // left margin - tMargin float64 // top margin - rMargin float64 // right margin - bMargin float64 // page break margin - cMargin float64 // cell margin - x, y float64 // current position in user unit - lasth float64 // height of last printed cell - lineWidth float64 // line width in user unit - fontpath string // path containing fonts - fontLoader FontLoader // used to load font files from arbitrary locations - coreFonts map[string]bool // array of core font names - fonts map[string]fontDefType // array of used fonts - fontFiles map[string]fontFileType // array of font files - diffs []string // array of encoding differences - fontFamily string // current font family - fontStyle string // current font style - underline bool // underlining flag - strikeout bool // strike out flag - currentFont fontDefType // current font info - fontSizePt float64 // current font size in points - fontSize float64 // current font size in user unit - ws float64 // word spacing - images map[string]*ImageInfoType // array of used images - aliasMap map[string]string // map of alias->replacement - pageLinks [][]linkType // pageLinks[page][link], both 1-based - links []intLinkType // array of internal links - attachments []Attachment // slice of content to embed globally - pageAttachments [][]annotationAttach // 1-based array of annotation for file attachments (per page) - outlines []outlineType // array of outlines - outlineRoot int // root of outlines - autoPageBreak bool // automatic page breaking - acceptPageBreak func() bool // returns true to accept page break - pageBreakTrigger float64 // threshold used to trigger page breaks - inHeader bool // flag set when processing header - headerFnc func() // function provided by app and called to write header - headerHomeMode bool // set position to home after headerFnc is called - inFooter bool // flag set when processing footer - footerFnc func() // function provided by app and called to write footer - footerFncLpi func(bool) // function provided by app and called to write footer with last page flag - zoomMode string // zoom display mode - layoutMode string // layout display mode - xmp []byte // XMP metadata - producer string // producer - title string // title - subject string // subject - author string // author - lang string // lang - keywords string // keywords - creator string // creator - creationDate time.Time // override for document CreationDate value - modDate time.Time // override for document ModDate value - aliasNbPagesStr string // alias for total number of pages - pdfVersion pdfVersion // PDF version number - fontDirStr string // location of font definition files - capStyle int // line cap style: butt 0, round 1, square 2 - joinStyle int // line segment join style: miter 0, round 1, bevel 2 - dashArray []float64 // dash array - dashPhase float64 // dash phase - blendList []blendModeType // slice[idx] of alpha transparency modes, 1-based - blendMap map[string]int // map into blendList - blendMode string // current blend mode - alpha float64 // current transpacency - gradientList []gradientType // slice[idx] of gradient records - clipNest int // Number of active clipping contexts - transformNest int // Number of active transformation contexts - err error // Set if error occurs during life cycle of instance - protect protectType // document protection structure - layer layerRecType // manages optional layers in document - catalogSort bool // sort resource catalogs in document - nJs int // JavaScript object number - javascript *string // JavaScript code to include in the PDF - colorFlag bool // indicates whether fill and text colors are different - color struct { - // Composite values of colors - draw, fill, text colorType - } - spotColorMap map[string]spotColorType // Map of named ink-based colors - userUnderlineThickness float64 // A custom user underline thickness multiplier. - - fmt struct { - buf []byte // buffer used to format numbers. - col bytes.Buffer // buffer used to build color strings. - } -} - -const ( - pdfVers1_3 = pdfVersion(uint16(1)<<8 | uint16(3)) - pdfVers1_4 = pdfVersion(uint16(1)<<8 | uint16(4)) - pdfVers1_5 = pdfVersion(uint16(1)<<8 | uint16(5)) -) - -type pdfVersion uint16 - -func pdfVersionFrom(maj, min uint) pdfVersion { - if min > 255 { - panic(fmt.Errorf("fpdf: invalid PDF version %d.%d", maj, min)) - } - return pdfVersion(uint16(maj)<<8 | uint16(min)) -} - -func (v pdfVersion) String() string { - maj := int64(byte(v >> 8)) - min := int64(byte(v)) - return strconv.FormatInt(maj, 10) + "." + strconv.FormatInt(min, 10) -} - -type encType struct { - uv int - name string -} - -type encListType [256]encType - -type fontBoxType struct { - Xmin, Ymin, Xmax, Ymax int -} - -// Font flags for FontDescType.Flags as defined in the pdf specification. -const ( - // FontFlagFixedPitch is set if all glyphs have the same width (as - // opposed to proportional or variable-pitch fonts, which have - // different widths). - FontFlagFixedPitch = 1 << 0 - // FontFlagSerif is set if glyphs have serifs, which are short - // strokes drawn at an angle on the top and bottom of glyph stems. - // (Sans serif fonts do not have serifs.) - FontFlagSerif = 1 << 1 - // FontFlagSymbolic is set if font contains glyphs outside the - // Adobe standard Latin character set. This flag and the - // Nonsymbolic flag shall not both be set or both be clear. - FontFlagSymbolic = 1 << 2 - // FontFlagScript is set if glyphs resemble cursive handwriting. - FontFlagScript = 1 << 3 - // FontFlagNonsymbolic is set if font uses the Adobe standard - // Latin character set or a subset of it. - FontFlagNonsymbolic = 1 << 5 - // FontFlagItalic is set if glyphs have dominant vertical strokes - // that are slanted. - FontFlagItalic = 1 << 6 - // FontFlagAllCap is set if font contains no lowercase letters; - // typically used for display purposes, such as for titles or - // headlines. - FontFlagAllCap = 1 << 16 - // SmallCap is set if font contains both uppercase and lowercase - // letters. The uppercase letters are similar to those in the - // regular version of the same typeface family. The glyphs for the - // lowercase letters have the same shapes as the corresponding - // uppercase letters, but they are sized and their proportions - // adjusted so that they have the same size and stroke weight as - // lowercase glyphs in the same typeface family. - SmallCap = 1 << 18 - // ForceBold determines whether bold glyphs shall be painted with - // extra pixels even at very small text sizes by a conforming - // reader. If the ForceBold flag is set, features of bold glyphs - // may be thickened at small text sizes. - ForceBold = 1 << 18 -) - -// FontDescType (font descriptor) specifies metrics and other -// attributes of a font, as distinct from the metrics of individual -// glyphs (as defined in the pdf specification). -type FontDescType struct { - // The maximum height above the baseline reached by glyphs in this - // font (for example for "S"). The height of glyphs for accented - // characters shall be excluded. - Ascent int - // The maximum depth below the baseline reached by glyphs in this - // font. The value shall be a negative number. - Descent int - // The vertical coordinate of the top of flat capital letters, - // measured from the baseline (for example "H"). - CapHeight int - // A collection of flags defining various characteristics of the - // font. (See the FontFlag* constants.) - Flags int - // A rectangle, expressed in the glyph coordinate system, that - // shall specify the font bounding box. This should be the smallest - // rectangle enclosing the shape that would result if all of the - // glyphs of the font were placed with their origins coincident - // and then filled. - FontBBox fontBoxType - // The angle, expressed in degrees counterclockwise from the - // vertical, of the dominant vertical strokes of the font. (The - // 9-o’clock position is 90 degrees, and the 3-o’clock position - // is –90 degrees.) The value shall be negative for fonts that - // slope to the right, as almost all italic fonts do. - ItalicAngle int - // The thickness, measured horizontally, of the dominant vertical - // stems of glyphs in the font. - StemV int - // The width to use for character codes whose widths are not - // specified in a font dictionary’s Widths array. This shall have - // a predictable effect only if all such codes map to glyphs whose - // actual widths are the same as the value of the MissingWidth - // entry. (Default value: 0.) - MissingWidth int -} - -type fontDefType struct { - Tp string // "Core", "TrueType", ... - Name string // "Courier-Bold", ... - Desc FontDescType // Font descriptor - Up int // Underline position - Ut int // Underline thickness - Cw []int // Character width by ordinal - Enc string // "cp1252", ... - Diff string // Differences from reference encoding - File string // "Redressed.z" - Size1, Size2 int // Type1 values - OriginalSize int // Size of uncompressed font file - N int // Set by font loader - DiffN int // Position of diff in app array, set by font loader - i string // 1-based position in font list, set by font loader, not this program - utf8File *utf8FontFile // UTF-8 font - usedRunes map[int]int // Array of used runes -} - -// generateFontID generates a font Id from the font definition -func generateFontID(fdt fontDefType) (string, error) { - // file can be different if generated in different instance - fdt.File = "" - b, err := json.Marshal(&fdt) - return fmt.Sprintf("%x", sha1.Sum(b)), err -} - -type fontInfoType struct { - Data []byte - File string - OriginalSize int - FontName string - Bold bool - IsFixedPitch bool - UnderlineThickness int - UnderlinePosition int - Widths []int - Size1, Size2 uint32 - Desc FontDescType -} diff --git a/vendor/github.com/go-pdf/fpdf/doc.go b/vendor/github.com/go-pdf/fpdf/doc.go deleted file mode 100644 index c5b809e..0000000 --- a/vendor/github.com/go-pdf/fpdf/doc.go +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* -Package fpdf implements a PDF document generator with high level -support for text, drawing and images. - -# Features - -- UTF-8 support - -- Choice of measurement unit, page format and margins - -- Page header and footer management - -- Automatic page breaks, line breaks, and text justification - -- Inclusion of JPEG, PNG, GIF, TIFF and basic path-only SVG images - -- Colors, gradients and alpha channel transparency - -- Outline bookmarks - -- Internal and external links - -- TrueType, Type1 and encoding support - -- Page compression - -- Lines, Bézier curves, arcs, and ellipses - -- Rotation, scaling, skewing, translation, and mirroring - -- Clipping - -- Document protection - -- Layers - -- Templates - -- Barcodes - -- Charting facility - -- Import PDFs as templates - -go-pdf/fpdf has no dependencies other than the Go standard library. All tests -pass on Linux, Mac and Windows platforms. - -go-pdf/fpdf supports UTF-8 TrueType fonts and “right-to-left” languages. Note -that Chinese, Japanese, and Korean characters may not be included in -many general purpose fonts. For these languages, a specialized font (for -example, NotoSansSC for simplified Chinese) can be used. - -Also, support is provided to automatically translate UTF-8 runes to code -page encodings for languages that have fewer than 256 glyphs. - -# Installation - -To install the package on your system, run - - go get github.com/go-pdf/fpdf - -Later, to receive updates, run - - go get -u -v github.com/go-pdf/fpdf/... - -# Quick Start - -The following Go code generates a simple PDF file. - - pdf := fpdf.New("P", "mm", "A4", "") - pdf.AddPage() - pdf.SetFont("Arial", "B", 16) - pdf.Cell(40, 10, "Hello, world") - err := pdf.OutputFileAndClose("hello.pdf") - -See the functions in the fpdf_test.go file (shown as examples in this -documentation) for more advanced PDF examples. - -# Errors - -If an error occurs in an Fpdf method, an internal error field is set. -After this occurs, Fpdf method calls typically return without performing -any operations and the error state is retained. This error management -scheme facilitates PDF generation since individual method calls do not -need to be examined for failure; it is generally sufficient to wait -until after Output() is called. For the same reason, if an error occurs -in the calling application during PDF generation, it may be desirable -for the application to transfer the error to the Fpdf instance by -calling the SetError() method or the SetErrorf() method. At any time -during the life cycle of the Fpdf instance, the error state can be -determined with a call to Ok() or Err(). The error itself can be -retrieved with a call to Error(). - -# Conversion Notes - -This package is a relatively straightforward translation from the -original FPDF library written in PHP (despite the caveat in the -introduction to Effective Go). The API names have been retained even -though the Go idiom would suggest otherwise (for example, pdf.GetX() is -used rather than simply pdf.X()). The similarity of the two libraries -makes the original FPDF website a good source of information. It -includes a forum and FAQ. - -However, some internal changes have been made. Page content is built up -using buffers (of type bytes.Buffer) rather than repeated string -concatenation. Errors are handled as explained above rather than -panicking. Output is generated through an interface of type io.Writer or -io.WriteCloser. A number of the original PHP methods behave differently -based on the type of the arguments that are passed to them; in these -cases additional methods have been exported to provide similar -functionality. Font definition files are produced in JSON rather than -PHP. - -# Example PDFs - -A side effect of running go test ./... is the production of a number of -example PDFs. These can be found in the go-pdf/fpdf/pdf directory after the -tests complete. - -Please note that these examples run in the context of a test. In order -run an example as a standalone application, you’ll need to examine -fpdf_test.go for some helper routines, for example exampleFilename() and -summary(). - -Example PDFs can be compared with reference copies in order to verify -that they have been generated as expected. This comparison will be -performed if a PDF with the same name as the example PDF is placed in -the go-pdf/fpdf/pdf/reference directory and if the third argument to -ComparePDFFiles() in internal/example/example.go is true. (By default it -is false.) The routine that summarizes an example will look for this -file and, if found, will call ComparePDFFiles() to check the example PDF -for equality with its reference PDF. If differences exist between the -two files they will be printed to standard output and the test will -fail. If the reference file is missing, the comparison is considered to -succeed. In order to successfully compare two PDFs, the placement of -internal resources must be consistent and the internal creation -timestamps must be the same. To do this, the methods SetCatalogSort() -and SetCreationDate() need to be called for both files. This is done -automatically for all examples. - -# Nonstandard Fonts - -Nothing special is required to use the standard PDF fonts (courier, -helvetica, times, zapfdingbats) in your documents other than calling -SetFont(). - -You should use AddUTF8Font() or AddUTF8FontFromBytes() to add a TrueType -UTF-8 encoded font. Use RTL() and LTR() methods switch between -“right-to-left” and “left-to-right” mode. - -In order to use a different non-UTF-8 TrueType or Type1 font, you will -need to generate a font definition file and, if the font will be -embedded into PDFs, a compressed version of the font file. This is done -by calling the MakeFont function or using the included makefont command -line utility. To create the utility, cd into the makefont subdirectory -and run “go build”. This will produce a standalone executable named -makefont. Select the appropriate encoding file from the font -subdirectory and run the command as in the following example. - - ./makefont --embed --enc=../font/cp1252.map --dst=../font ../font/calligra.ttf - -In your PDF generation code, call AddFont() to load the font and, as -with the standard fonts, SetFont() to begin using it. Most examples, -including the package example, demonstrate this method. Good sources of -free, open-source fonts include Google Fonts and DejaVu Fonts. - -# Related Packages - -The draw2d package is a two dimensional vector graphics library that can -generate output in different forms. It uses gofpdf for its document -production mode. - -# Contributing Changes - -gofpdf is a global community effort and you are invited to make it even -better. If you have implemented a new feature or corrected a problem, -please consider contributing your change to the project. A contribution -that does not directly pertain to the core functionality of gofpdf -should be placed in its own directory directly beneath the contrib -directory. - -Here are guidelines for making submissions. Your change should - -- be compatible with the MIT License - -- be properly documented - -- be formatted with go fmt - -- include an example in fpdf_test.go if appropriate - -- conform to the standards of golint and go vet, that is, golint . and -go vet . should not generate any warnings - -- not diminish test coverage - -Pull requests are the preferred means of accepting your changes. - -# License - -gofpdf is released under the MIT License. It is copyrighted by Kurt Jung -and the contributors acknowledged below. - -# Acknowledgments - -This package’s code and documentation are closely derived from the FPDF -library created by Olivier Plathey, and a number of font and image -resources are copied directly from it. Bruno Michel has provided -valuable assistance with the code. Drawing support is adapted from the -FPDF geometric figures script by David Hernández Sanz. Transparency -support is adapted from the FPDF transparency script by Martin Hall-May. -Support for gradients and clipping is adapted from FPDF scripts by -Andreas Würmser. Support for outline bookmarks is adapted from Olivier -Plathey by Manuel Cornes. Layer support is adapted from Olivier Plathey. -Support for transformations is adapted from the FPDF transformation -script by Moritz Wagner and Andreas Würmser. PDF protection is adapted -from the work of Klemen Vodopivec for the FPDF product. Lawrence -Kesteloot provided code to allow an image’s extent to be determined -prior to placement. Support for vertical alignment within a cell was -provided by Stefan Schroeder. Ivan Daniluk generalized the font and -image loading code to use the Reader interface while maintaining -backward compatibility. Anthony Starks provided code for the Polygon -function. Robert Lillack provided the Beziergon function and corrected -some naming issues with the internal curve function. Claudio Felber -provided implementations for dashed line drawing and generalized font -loading. Stani Michiels provided support for multi-segment path drawing -with smooth line joins, line join styles, enhanced fill modes, and has -helped greatly with package presentation and tests. Templating is -adapted by Marcus Downing from the FPDF_Tpl library created by Jan -Slabon and Setasign. Jelmer Snoeck contributed packages that generate a -variety of barcodes and help with registering images on the web. Jelmer -Snoek and Guillermo Pascual augmented the basic HTML functionality with -aligned text. Kent Quirk implemented backwards-compatible support for -reading DPI from images that support it, and for setting DPI manually -and then having it properly taken into account when calculating image -size. Paulo Coutinho provided support for static embedded fonts. Dan -Meyers added support for embedded JavaScript. David Fish added a generic -alias-replacement function to enable, among other things, table of -contents functionality. Andy Bakun identified and corrected a problem in -which the internal catalogs were not sorted stably. Paul Montag added -encoding and decoding functionality for templates, including images that -are embedded in templates; this allows templates to be stored -independently of gofpdf. Paul also added support for page boxes used in -printing PDF documents. Wojciech Matusiak added supported for word -spacing. Artem Korotkiy added support of UTF-8 fonts. Dave Barnes added -support for imported objects and templates. Brigham Thompson added -support for rounded rectangles. Joe Westcott added underline -functionality and optimized image storage. Benoit KUGLER contributed -support for rectangles with corners of unequal radius, modification -times, and for file attachments and annotations. - -# Roadmap - -- Remove all legacy code page font support; use UTF-8 exclusively - -- Improve test coverage as reported by the coverage tool. -*/ -package fpdf // import "github.com/go-pdf/fpdf" diff --git a/vendor/github.com/go-pdf/fpdf/embedded.go b/vendor/github.com/go-pdf/fpdf/embedded.go deleted file mode 100644 index 6566969..0000000 --- a/vendor/github.com/go-pdf/fpdf/embedded.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2014 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -// Embedded standard fonts - -import ( - "embed" - "io" - "strings" -) - -//go:embed font_embed/*.json font_embed/*.map -var embFS embed.FS - -func (f *Fpdf) coreFontReader(familyStr, styleStr string) (r io.ReadCloser) { - key := familyStr + styleStr - key = strings.ToLower(key) - emb, err := embFS.Open("font_embed/" + key + ".json") - if err == nil { - r = emb - } else { - f.SetErrorf("could not locate \"%s\" among embedded core font definition files", key) - } - return -} diff --git a/vendor/github.com/go-pdf/fpdf/font.go b/vendor/github.com/go-pdf/fpdf/font.go deleted file mode 100644 index 33aa54f..0000000 --- a/vendor/github.com/go-pdf/fpdf/font.go +++ /dev/null @@ -1,478 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2013 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -// Utility to generate font definition files - -// Version: 1.2 -// Date: 2011-06-18 -// Author: Olivier PLATHEY -// Port to Go: Kurt Jung, 2013-07-15 - -import ( - "bufio" - "compress/zlib" - "encoding/binary" - "encoding/json" - "fmt" - "io" - "os" - "path/filepath" - "strconv" - "strings" -) - -func baseNoExt(fileStr string) string { - str := filepath.Base(fileStr) - extLen := len(filepath.Ext(str)) - if extLen > 0 { - str = str[:len(str)-extLen] - } - return str -} - -func loadMap(encodingFileStr string) (encList encListType, err error) { - // printf("Encoding file string [%s]\n", encodingFileStr) - var f *os.File - // f, err = os.Open(encodingFilepath(encodingFileStr)) - f, err = os.Open(encodingFileStr) - if err == nil { - defer f.Close() - for j := range encList { - encList[j].uv = -1 - encList[j].name = ".notdef" - } - scanner := bufio.NewScanner(f) - var enc encType - var pos int - for scanner.Scan() { - // "!3F U+003F question" - _, err = fmt.Sscanf(scanner.Text(), "!%x U+%x %s", &pos, &enc.uv, &enc.name) - if err == nil { - if pos < 256 { - encList[pos] = enc - } else { - err = fmt.Errorf("map position 0x%2X exceeds 0xFF", pos) - return - } - } else { - return - } - } - if err = scanner.Err(); err != nil { - return - } - } - return -} - -// getInfoFromTrueType returns information from a TrueType font -func getInfoFromTrueType(fileStr string, msgWriter io.Writer, embed bool, encList encListType) (info fontInfoType, err error) { - info.Widths = make([]int, 256) - var ttf TtfType - ttf, err = TtfParse(fileStr) - if err != nil { - return - } - if embed { - if !ttf.Embeddable { - err = fmt.Errorf("font license does not allow embedding") - return - } - info.Data, err = os.ReadFile(fileStr) - if err != nil { - return - } - info.OriginalSize = len(info.Data) - } - k := 1000.0 / float64(ttf.UnitsPerEm) - info.FontName = ttf.PostScriptName - info.Bold = ttf.Bold - info.Desc.ItalicAngle = int(ttf.ItalicAngle) - info.IsFixedPitch = ttf.IsFixedPitch - info.Desc.Ascent = round(k * float64(ttf.TypoAscender)) - info.Desc.Descent = round(k * float64(ttf.TypoDescender)) - info.UnderlineThickness = round(k * float64(ttf.UnderlineThickness)) - info.UnderlinePosition = round(k * float64(ttf.UnderlinePosition)) - info.Desc.FontBBox = fontBoxType{ - round(k * float64(ttf.Xmin)), - round(k * float64(ttf.Ymin)), - round(k * float64(ttf.Xmax)), - round(k * float64(ttf.Ymax)), - } - // printf("FontBBox\n") - // dump(info.Desc.FontBBox) - info.Desc.CapHeight = round(k * float64(ttf.CapHeight)) - info.Desc.MissingWidth = round(k * float64(ttf.Widths[0])) - var wd int - for j := 0; j < len(info.Widths); j++ { - wd = info.Desc.MissingWidth - if encList[j].name != ".notdef" { - uv := encList[j].uv - pos, ok := ttf.Chars[uint16(uv)] - if ok { - wd = round(k * float64(ttf.Widths[pos])) - } else { - fmt.Fprintf(msgWriter, "Character %s is missing\n", encList[j].name) - } - } - info.Widths[j] = wd - } - // printf("getInfoFromTrueType/FontBBox\n") - // dump(info.Desc.FontBBox) - return -} - -type segmentType struct { - marker uint8 - tp uint8 - size uint32 - data []byte -} - -func segmentRead(r io.Reader) (s segmentType, err error) { - if err = binary.Read(r, binary.LittleEndian, &s.marker); err != nil { - return - } - if s.marker != 128 { - err = fmt.Errorf("font file is not a valid binary Type1") - return - } - if err = binary.Read(r, binary.LittleEndian, &s.tp); err != nil { - return - } - if err = binary.Read(r, binary.LittleEndian, &s.size); err != nil { - return - } - s.data = make([]byte, s.size) - _, err = r.Read(s.data) - return -} - -// -rw-r--r-- 1 root root 9532 2010-04-22 11:27 /usr/share/fonts/type1/mathml/Symbol.afm -// -rw-r--r-- 1 root root 37744 2010-04-22 11:27 /usr/share/fonts/type1/mathml/Symbol.pfb - -// getInfoFromType1 return information from a Type1 font -func getInfoFromType1(fileStr string, msgWriter io.Writer, embed bool, encList encListType) (info fontInfoType, err error) { - info.Widths = make([]int, 256) - if embed { - var f *os.File - f, err = os.Open(fileStr) - if err != nil { - return - } - defer f.Close() - // Read first segment - var s1, s2 segmentType - s1, err = segmentRead(f) - if err != nil { - return - } - s2, err = segmentRead(f) - if err != nil { - return - } - info.Data = s1.data - info.Data = append(info.Data, s2.data...) - info.Size1 = s1.size - info.Size2 = s2.size - } - afmFileStr := fileStr[0:len(fileStr)-3] + "afm" - size, ok := fileSize(afmFileStr) - if !ok { - err = fmt.Errorf("font file (ATM) %s not found", afmFileStr) - return - } else if size == 0 { - err = fmt.Errorf("font file (AFM) %s empty or not readable", afmFileStr) - return - } - var f *os.File - f, err = os.Open(afmFileStr) - if err != nil { - return - } - defer f.Close() - scanner := bufio.NewScanner(f) - var fields []string - var wd int - var wt, name string - wdMap := make(map[string]int) - for scanner.Scan() { - fields = strings.Fields(strings.TrimSpace(scanner.Text())) - // Comment Generated by FontForge 20080203 - // FontName Symbol - // C 32 ; WX 250 ; N space ; B 0 0 0 0 ; - if len(fields) >= 2 { - switch fields[0] { - case "C": - if wd, err = strconv.Atoi(fields[4]); err == nil { - name = fields[7] - wdMap[name] = wd - } - case "FontName": - info.FontName = fields[1] - case "Weight": - wt = strings.ToLower(fields[1]) - case "ItalicAngle": - info.Desc.ItalicAngle, err = strconv.Atoi(fields[1]) - case "Ascender": - info.Desc.Ascent, err = strconv.Atoi(fields[1]) - case "Descender": - info.Desc.Descent, err = strconv.Atoi(fields[1]) - case "UnderlineThickness": - info.UnderlineThickness, err = strconv.Atoi(fields[1]) - case "UnderlinePosition": - info.UnderlinePosition, err = strconv.Atoi(fields[1]) - case "IsFixedPitch": - info.IsFixedPitch = fields[1] == "true" - case "FontBBox": - if info.Desc.FontBBox.Xmin, err = strconv.Atoi(fields[1]); err == nil { - if info.Desc.FontBBox.Ymin, err = strconv.Atoi(fields[2]); err == nil { - if info.Desc.FontBBox.Xmax, err = strconv.Atoi(fields[3]); err == nil { - info.Desc.FontBBox.Ymax, err = strconv.Atoi(fields[4]) - } - } - } - case "CapHeight": - info.Desc.CapHeight, err = strconv.Atoi(fields[1]) - case "StdVW": - info.Desc.StemV, err = strconv.Atoi(fields[1]) - } - } - if err != nil { - return - } - } - if err = scanner.Err(); err != nil { - return - } - if info.FontName == "" { - err = fmt.Errorf("the field FontName missing in AFM file %s", afmFileStr) - return - } - info.Bold = wt == "bold" || wt == "black" - var missingWd int - missingWd, ok = wdMap[".notdef"] - if ok { - info.Desc.MissingWidth = missingWd - } - for j := 0; j < len(info.Widths); j++ { - info.Widths[j] = info.Desc.MissingWidth - } - for j := 0; j < len(info.Widths); j++ { - name = encList[j].name - if name != ".notdef" { - wd, ok = wdMap[name] - if ok { - info.Widths[j] = wd - } else { - fmt.Fprintf(msgWriter, "Character %s is missing\n", name) - } - } - } - // printf("getInfoFromType1/FontBBox\n") - // dump(info.Desc.FontBBox) - return -} - -func makeFontDescriptor(info *fontInfoType) { - if info.Desc.CapHeight == 0 { - info.Desc.CapHeight = info.Desc.Ascent - } - info.Desc.Flags = 1 << 5 - if info.IsFixedPitch { - info.Desc.Flags |= 1 - } - if info.Desc.ItalicAngle != 0 { - info.Desc.Flags |= 1 << 6 - } - if info.Desc.StemV == 0 { - if info.Bold { - info.Desc.StemV = 120 - } else { - info.Desc.StemV = 70 - } - } - // printf("makeFontDescriptor/FontBBox\n") - // dump(info.Desc.FontBBox) -} - -// makeFontEncoding builds differences from reference encoding -func makeFontEncoding(encList encListType, refEncFileStr string) (diffStr string, err error) { - var refList encListType - if refList, err = loadMap(refEncFileStr); err != nil { - return - } - var buf fmtBuffer - last := 0 - for j := 32; j < 256; j++ { - if encList[j].name != refList[j].name { - if j != last+1 { - buf.printf("%d ", j) - } - last = j - buf.printf("/%s ", encList[j].name) - } - } - diffStr = strings.TrimSpace(buf.String()) - return -} - -func makeDefinitionFile(fileStr, tpStr, encodingFileStr string, embed bool, encList encListType, info fontInfoType) error { - var err error - var def fontDefType - def.Tp = tpStr - def.Name = info.FontName - makeFontDescriptor(&info) - def.Desc = info.Desc - // printf("makeDefinitionFile/FontBBox\n") - // dump(def.Desc.FontBBox) - def.Up = info.UnderlinePosition - def.Ut = info.UnderlineThickness - def.Cw = info.Widths - def.Enc = baseNoExt(encodingFileStr) - // fmt.Printf("encodingFileStr [%s], def.Enc [%s]\n", encodingFileStr, def.Enc) - // fmt.Printf("reference [%s]\n", filepath.Join(filepath.Dir(encodingFileStr), "cp1252.map")) - def.Diff, err = makeFontEncoding(encList, filepath.Join(filepath.Dir(encodingFileStr), "cp1252.map")) - if err != nil { - return err - } - def.File = info.File - def.Size1 = int(info.Size1) - def.Size2 = int(info.Size2) - def.OriginalSize = info.OriginalSize - // printf("Font definition file [%s]\n", fileStr) - var buf []byte - buf, err = json.Marshal(def) - if err != nil { - return err - } - var f *os.File - f, err = os.Create(fileStr) - if err != nil { - return err - } - defer f.Close() - _, err = f.Write(buf) - if err != nil { - return err - } - - err = f.Close() - if err != nil { - return err - } - - return nil -} - -// MakeFont generates a font definition file in JSON format. A definition file -// of this type is required to use non-core fonts in the PDF documents that -// gofpdf generates. See the makefont utility in the gofpdf package for a -// command line interface to this function. -// -// fontFileStr is the name of the TrueType file (extension .ttf), OpenType file -// (extension .otf) or binary Type1 file (extension .pfb) from which to -// generate a definition file. If an OpenType file is specified, it must be one -// that is based on TrueType outlines, not PostScript outlines; this cannot be -// determined from the file extension alone. If a Type1 file is specified, a -// metric file with the same pathname except with the extension .afm must be -// present. -// -// encodingFileStr is the name of the encoding file that corresponds to the -// font. -// -// dstDirStr is the name of the directory in which to save the definition file -// and, if embed is true, the compressed font file. -// -// msgWriter is the writer that is called to display messages throughout the -// process. Use nil to turn off messages. -// -// embed is true if the font is to be embedded in the PDF files. -func MakeFont(fontFileStr, encodingFileStr, dstDirStr string, msgWriter io.Writer, embed bool) error { - if msgWriter == nil { - msgWriter = io.Discard - } - if !fileExist(fontFileStr) { - return fmt.Errorf("font file not found: %s", fontFileStr) - } - extStr := strings.ToLower(fontFileStr[len(fontFileStr)-3:]) - // printf("Font file extension [%s]\n", extStr) - var tpStr string - switch extStr { - case "ttf": - fallthrough - case "otf": - tpStr = "TrueType" - case "pfb": - tpStr = "Type1" - default: - return fmt.Errorf("unrecognized font file extension: %s", extStr) - } - - var info fontInfoType - encList, err := loadMap(encodingFileStr) - if err != nil { - return err - } - // printf("Encoding table\n") - // dump(encList) - if tpStr == "TrueType" { - info, err = getInfoFromTrueType(fontFileStr, msgWriter, embed, encList) - if err != nil { - return err - } - } else { - info, err = getInfoFromType1(fontFileStr, msgWriter, embed, encList) - if err != nil { - return err - } - } - baseStr := baseNoExt(fontFileStr) - // fmt.Printf("Base [%s]\n", baseStr) - if embed { - var f *os.File - info.File = baseStr + ".z" - zFileStr := filepath.Join(dstDirStr, info.File) - f, err = os.Create(zFileStr) - if err != nil { - return err - } - defer f.Close() - cmp := zlib.NewWriter(f) - _, err = cmp.Write(info.Data) - if err != nil { - return err - } - err = cmp.Close() - if err != nil { - return err - } - fmt.Fprintf(msgWriter, "Font file compressed: %s\n", zFileStr) - } - defFileStr := filepath.Join(dstDirStr, baseStr+".json") - err = makeDefinitionFile(defFileStr, tpStr, encodingFileStr, embed, encList, info) - if err != nil { - return err - } - fmt.Fprintf(msgWriter, "Font definition file successfully generated: %s\n", defFileStr) - return nil -} diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/courier.json b/vendor/github.com/go-pdf/fpdf/font_embed/courier.json deleted file mode 100644 index d979da5..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/courier.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"Courier","Up":-100,"Ut":50,"I":256,"Cw":[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/courierb.json b/vendor/github.com/go-pdf/fpdf/font_embed/courierb.json deleted file mode 100644 index ab15c59..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/courierb.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"Courier-Bold","Up":-100,"Ut":50,"I":256,"Cw":[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/courierbi.json b/vendor/github.com/go-pdf/fpdf/font_embed/courierbi.json deleted file mode 100644 index 535b2a2..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/courierbi.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"Courier-BoldOblique","Up":-100,"Ut":50,"I":256,"Cw":[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/courieri.json b/vendor/github.com/go-pdf/fpdf/font_embed/courieri.json deleted file mode 100644 index 9624d6e..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/courieri.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"Courier-Oblique","Up":-100,"Ut":50,"I":256,"Cw":[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/cp1250.map b/vendor/github.com/go-pdf/fpdf/font_embed/cp1250.map deleted file mode 100644 index ec110af..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/cp1250.map +++ /dev/null @@ -1,251 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!89 U+2030 perthousand -!8A U+0160 Scaron -!8B U+2039 guilsinglleft -!8C U+015A Sacute -!8D U+0164 Tcaron -!8E U+017D Zcaron -!8F U+0179 Zacute -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!99 U+2122 trademark -!9A U+0161 scaron -!9B U+203A guilsinglright -!9C U+015B sacute -!9D U+0165 tcaron -!9E U+017E zcaron -!9F U+017A zacute -!A0 U+00A0 space -!A1 U+02C7 caron -!A2 U+02D8 breve -!A3 U+0141 Lslash -!A4 U+00A4 currency -!A5 U+0104 Aogonek -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+015E Scedilla -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+017B Zdotaccent -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+02DB ogonek -!B3 U+0142 lslash -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+0105 aogonek -!BA U+015F scedilla -!BB U+00BB guillemotright -!BC U+013D Lcaron -!BD U+02DD hungarumlaut -!BE U+013E lcaron -!BF U+017C zdotaccent -!C0 U+0154 Racute -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+0102 Abreve -!C4 U+00C4 Adieresis -!C5 U+0139 Lacute -!C6 U+0106 Cacute -!C7 U+00C7 Ccedilla -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0118 Eogonek -!CB U+00CB Edieresis -!CC U+011A Ecaron -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+010E Dcaron -!D0 U+0110 Dcroat -!D1 U+0143 Nacute -!D2 U+0147 Ncaron -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+0150 Ohungarumlaut -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+0158 Rcaron -!D9 U+016E Uring -!DA U+00DA Uacute -!DB U+0170 Uhungarumlaut -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+0162 Tcommaaccent -!DF U+00DF germandbls -!E0 U+0155 racute -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+0103 abreve -!E4 U+00E4 adieresis -!E5 U+013A lacute -!E6 U+0107 cacute -!E7 U+00E7 ccedilla -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+0119 eogonek -!EB U+00EB edieresis -!EC U+011B ecaron -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+010F dcaron -!F0 U+0111 dcroat -!F1 U+0144 nacute -!F2 U+0148 ncaron -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+0151 ohungarumlaut -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+0159 rcaron -!F9 U+016F uring -!FA U+00FA uacute -!FB U+0171 uhungarumlaut -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+0163 tcommaaccent -!FF U+02D9 dotaccent diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/cp1252.map b/vendor/github.com/go-pdf/fpdf/font_embed/cp1252.map deleted file mode 100644 index dd490e5..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/cp1252.map +++ /dev/null @@ -1,251 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+02C6 circumflex -!89 U+2030 perthousand -!8A U+0160 Scaron -!8B U+2039 guilsinglleft -!8C U+0152 OE -!8E U+017D Zcaron -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!98 U+02DC tilde -!99 U+2122 trademark -!9A U+0161 scaron -!9B U+203A guilsinglright -!9C U+0153 oe -!9E U+017E zcaron -!9F U+0178 Ydieresis -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+00D0 Eth -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+00DE Thorn -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+00F0 eth -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+00FE thorn -!FF U+00FF ydieresis diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/helvetica.json b/vendor/github.com/go-pdf/fpdf/font_embed/helvetica.json deleted file mode 100644 index 2a8a93f..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/helvetica.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"Helvetica","Up":-100,"Ut":50,"Cw":[278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,350,556,350,222,556,333,1000,556,556,333,1000,667,333,1000,350,611,350,350,222,222,333,333,350,556,1000,333,1000,500,333,944,350,500,667,278,333,556,556,556,556,260,556,333,737,370,556,584,333,737,333,400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/helveticab.json b/vendor/github.com/go-pdf/fpdf/font_embed/helveticab.json deleted file mode 100644 index 198c2a2..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/helveticab.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"Helvetica-Bold","Up":-100,"Ut":50,"Cw":[278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,350,556,350,278,556,500,1000,556,556,333,1000,667,333,1000,350,611,350,350,278,278,500,500,350,556,1000,333,1000,556,333,944,350,500,667,278,333,556,556,556,556,280,556,333,737,370,556,584,333,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/helveticabi.json b/vendor/github.com/go-pdf/fpdf/font_embed/helveticabi.json deleted file mode 100644 index afc3024..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/helveticabi.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"Helvetica-BoldOblique","Up":-100,"Ut":50,"Cw":[278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,350,556,350,278,556,500,1000,556,556,333,1000,667,333,1000,350,611,350,350,278,278,500,500,350,556,1000,333,1000,556,333,944,350,500,667,278,333,556,556,556,556,280,556,333,737,370,556,584,333,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/helveticai.json b/vendor/github.com/go-pdf/fpdf/font_embed/helveticai.json deleted file mode 100644 index 502f938..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/helveticai.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"Helvetica-Oblique","Up":-100,"Ut":50,"Cw":[278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,350,556,350,222,556,333,1000,556,556,333,1000,667,333,1000,350,611,350,350,222,222,333,333,350,556,1000,333,1000,500,333,944,350,500,667,278,333,556,556,556,556,260,556,333,737,370,556,584,333,737,333,400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/times.json b/vendor/github.com/go-pdf/fpdf/font_embed/times.json deleted file mode 100644 index 6b99ae0..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/times.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"Times-Roman","Up":-100,"Ut":50,"Cw":[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,333,408,500,500,833,778,180,333,333,500,564,250,333,250,278,500,500,500,500,500,500,500,500,500,500,278,278,564,564,564,444,921,722,667,667,722,611,556,722,722,333,389,722,611,889,722,722,556,722,667,556,611,722,722,944,722,722,611,333,278,333,469,500,333,444,500,444,500,444,333,500,500,278,278,500,278,778,500,500,500,500,333,389,278,500,500,722,500,500,444,480,200,480,541,350,500,350,333,500,444,1000,500,500,333,1000,556,333,889,350,611,350,350,333,333,444,444,350,500,1000,333,980,389,333,722,350,444,722,250,333,500,500,500,500,200,500,333,760,276,500,564,333,760,333,400,564,300,300,333,500,453,250,333,300,310,500,750,750,750,444,722,722,722,722,722,722,889,667,611,611,611,611,333,333,333,333,722,722,722,722,722,722,722,564,722,722,722,722,722,722,556,500,444,444,444,444,444,444,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,564,500,500,500,500,500,500,500,500]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/timesb.json b/vendor/github.com/go-pdf/fpdf/font_embed/timesb.json deleted file mode 100644 index 727970f..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/timesb.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"Times-Bold","Up":-100,"Ut":50,"Cw":[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,333,555,500,500,1000,833,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,930,722,667,722,722,667,611,778,778,389,500,778,667,944,722,778,611,778,722,556,667,722,722,1000,722,722,667,333,278,333,581,500,333,500,556,444,556,444,333,500,556,278,333,556,278,833,556,500,556,556,444,389,333,556,500,722,500,500,444,394,220,394,520,350,500,350,333,500,500,1000,500,500,333,1000,556,333,1000,350,667,350,350,333,333,500,500,350,500,1000,333,1000,389,333,722,350,444,722,250,333,500,500,500,500,220,500,333,747,300,500,570,333,747,333,400,570,300,300,333,556,540,250,333,300,330,500,750,750,750,500,722,722,722,722,722,722,1000,722,667,667,667,667,389,389,389,389,722,722,778,778,778,778,778,570,778,722,722,722,722,722,611,556,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,500,556,500]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/timesbi.json b/vendor/github.com/go-pdf/fpdf/font_embed/timesbi.json deleted file mode 100644 index e49b917..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/timesbi.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"Times-BoldItalic","Up":-100,"Ut":50,"Cw":[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,389,555,500,500,833,778,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,832,667,667,667,722,667,667,722,778,389,500,667,611,889,722,722,611,722,667,556,611,722,667,889,667,611,611,333,278,333,570,500,333,500,500,444,500,444,333,500,556,278,278,500,278,778,556,500,500,500,389,389,278,556,444,667,500,444,389,348,220,348,570,350,500,350,333,500,500,1000,500,500,333,1000,556,333,944,350,611,350,350,333,333,500,500,350,500,1000,333,1000,389,333,722,350,389,611,250,389,500,500,500,500,220,500,333,747,266,500,606,333,747,333,400,570,300,300,333,576,500,250,333,300,300,500,750,750,750,500,667,667,667,667,667,667,944,667,667,667,667,667,389,389,389,389,722,722,722,722,722,722,722,570,722,722,722,722,722,611,611,500,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,444,500,444]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/timesi.json b/vendor/github.com/go-pdf/fpdf/font_embed/timesi.json deleted file mode 100644 index 19cae41..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/timesi.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"Times-Italic","Up":-100,"Ut":50,"Cw":[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,333,420,500,500,833,778,214,333,333,500,675,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,675,675,675,500,920,611,611,667,722,611,611,722,722,333,444,667,556,833,667,722,611,722,611,500,556,722,611,833,611,556,556,389,278,389,422,500,333,500,500,444,500,444,278,500,500,278,278,444,278,722,500,500,500,500,389,389,278,500,444,667,444,444,389,400,275,400,541,350,500,350,333,500,556,889,500,500,333,1000,500,333,944,350,556,350,350,333,333,556,556,350,500,889,333,980,389,333,667,350,389,556,250,389,500,500,500,500,275,500,333,760,276,500,675,333,760,333,400,675,300,300,333,500,523,250,333,300,310,500,750,750,750,500,611,611,611,611,611,611,889,667,611,611,611,611,333,333,333,333,722,667,722,722,722,722,722,675,722,722,722,722,722,556,611,500,500,500,500,500,500,500,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,675,500,500,500,500,500,444,500,444]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/font_embed/zapfdingbats.json b/vendor/github.com/go-pdf/fpdf/font_embed/zapfdingbats.json deleted file mode 100644 index f65f7b2..0000000 --- a/vendor/github.com/go-pdf/fpdf/font_embed/zapfdingbats.json +++ /dev/null @@ -1 +0,0 @@ -{"Tp":"Core","Name":"ZapfDingbats","Up":-100,"Ut":50,"Cw":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,278,974,961,974,980,719,789,790,791,690,960,939,549,855,911,933,911,945,974,755,846,762,761,571,677,763,760,759,754,494,552,537,577,692,786,788,788,790,793,794,816,823,789,841,823,833,816,831,923,744,723,749,790,792,695,776,768,792,759,707,708,682,701,826,815,789,789,707,687,696,689,786,787,713,791,785,791,873,761,762,762,759,759,892,892,788,784,438,138,277,415,392,392,668,668,0,390,390,317,317,276,276,509,509,410,410,234,234,334,334,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,732,544,544,910,667,760,760,776,595,694,626,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,894,838,1016,458,748,924,748,918,927,928,928,834,873,828,924,924,917,930,931,463,883,836,836,867,867,696,696,874,0,874,760,946,771,865,771,888,967,888,831,873,927,970,918,0]} \ No newline at end of file diff --git a/vendor/github.com/go-pdf/fpdf/fpdf.go b/vendor/github.com/go-pdf/fpdf/fpdf.go deleted file mode 100644 index b4d75b2..0000000 --- a/vendor/github.com/go-pdf/fpdf/fpdf.go +++ /dev/null @@ -1,5283 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2013-2014 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -// Version: 1.7 -// Date: 2011-06-18 -// Author: Olivier PLATHEY -// Port to Go: Kurt Jung, 2013-07-15 - -import ( - "bytes" - "encoding/json" - "fmt" - "image" - "image/color" - "image/gif" - "image/jpeg" - "image/png" - "io" - "math" - "os" - "path" - "sort" - "strconv" - "strings" - "time" -) - -var gl struct { - catalogSort bool - noCompress bool // Initial zero value indicates compression - creationDate time.Time - modDate time.Time -} - -type fmtBuffer struct { - bytes.Buffer -} - -func (b *fmtBuffer) printf(fmtStr string, args ...interface{}) { - b.Buffer.WriteString(fmt.Sprintf(fmtStr, args...)) -} - -func fpdfNew(orientationStr, unitStr, sizeStr, fontDirStr string, size SizeType) (f *Fpdf) { - f = new(Fpdf) - if orientationStr == "" { - orientationStr = "p" - } else { - orientationStr = strings.ToLower(orientationStr) - } - if unitStr == "" { - unitStr = "mm" - } - if sizeStr == "" { - sizeStr = "A4" - } - if fontDirStr == "" { - fontDirStr = "." - } - f.page = 0 - f.n = 2 - f.pages = make([]*bytes.Buffer, 0, 8) - f.pages = append(f.pages, bytes.NewBufferString("")) // pages[0] is unused (1-based) - f.pageSizes = make(map[int]SizeType) - f.pageBoxes = make(map[int]map[string]PageBox) - f.defPageBoxes = make(map[string]PageBox) - f.state = 0 - f.fonts = make(map[string]fontDefType) - f.fontFiles = make(map[string]fontFileType) - f.diffs = make([]string, 0, 8) - f.templates = make(map[string]Template) - f.templateObjects = make(map[string]int) - f.importedObjs = make(map[string][]byte) - f.importedObjPos = make(map[string]map[int]string) - f.importedTplObjs = make(map[string]string) - f.importedTplIDs = make(map[string]int) - f.images = make(map[string]*ImageInfoType) - f.pageLinks = make([][]linkType, 0, 8) - f.pageLinks = append(f.pageLinks, make([]linkType, 0)) // pageLinks[0] is unused (1-based) - f.links = make([]intLinkType, 0, 8) - f.links = append(f.links, intLinkType{}) // links[0] is unused (1-based) - f.pageAttachments = make([][]annotationAttach, 0, 8) - f.pageAttachments = append(f.pageAttachments, []annotationAttach{}) // - f.aliasMap = make(map[string]string) - f.inHeader = false - f.inFooter = false - f.lasth = 0 - f.fontFamily = "" - f.fontStyle = "" - f.SetFontSize(12) - f.underline = false - f.strikeout = false - f.setDrawColor(0, 0, 0) - f.setFillColor(0, 0, 0) - f.setTextColor(0, 0, 0) - f.colorFlag = false - f.ws = 0 - f.fontpath = fontDirStr - // Core fonts - f.coreFonts = map[string]bool{ - "courier": true, - "helvetica": true, - "times": true, - "symbol": true, - "zapfdingbats": true, - } - // Scale factor - switch unitStr { - case "pt", "point": - f.k = 1.0 - case "mm": - f.k = 72.0 / 25.4 - case "cm": - f.k = 72.0 / 2.54 - case "in", "inch": - f.k = 72.0 - default: - f.err = fmt.Errorf("incorrect unit %s", unitStr) - return - } - f.unitStr = unitStr - // Page sizes - f.stdPageSizes = make(map[string]SizeType) - f.stdPageSizes["a3"] = SizeType{841.89, 1190.55} - f.stdPageSizes["a4"] = SizeType{595.28, 841.89} - f.stdPageSizes["a5"] = SizeType{420.94, 595.28} - f.stdPageSizes["a6"] = SizeType{297.64, 420.94} - f.stdPageSizes["a2"] = SizeType{1190.55, 1683.78} - f.stdPageSizes["a1"] = SizeType{1683.78, 2383.94} - f.stdPageSizes["letter"] = SizeType{612, 792} - f.stdPageSizes["legal"] = SizeType{612, 1008} - f.stdPageSizes["tabloid"] = SizeType{792, 1224} - if size.Wd > 0 && size.Ht > 0 { - f.defPageSize = size - } else { - f.defPageSize = f.getpagesizestr(sizeStr) - if f.err != nil { - return - } - } - f.curPageSize = f.defPageSize - // Page orientation - switch orientationStr { - case "p", "portrait": - f.defOrientation = "P" - f.w = f.defPageSize.Wd - f.h = f.defPageSize.Ht - // dbg("Assign h: %8.2f", f.h) - case "l", "landscape": - f.defOrientation = "L" - f.w = f.defPageSize.Ht - f.h = f.defPageSize.Wd - default: - f.err = fmt.Errorf("incorrect orientation: %s", orientationStr) - return - } - f.curOrientation = f.defOrientation - f.wPt = f.w * f.k - f.hPt = f.h * f.k - // Page margins (1 cm) - margin := 28.35 / f.k - f.SetMargins(margin, margin, margin) - // Interior cell margin (1 mm) - f.cMargin = margin / 10 - // Line width (0.2 mm) - f.lineWidth = 0.567 / f.k - // Automatic page break - f.SetAutoPageBreak(true, 2*margin) - // Default display mode - f.SetDisplayMode("default", "default") - if f.err != nil { - return - } - f.acceptPageBreak = func() bool { - return f.autoPageBreak - } - // Enable compression - f.SetCompression(!gl.noCompress) - f.spotColorMap = make(map[string]spotColorType) - f.blendList = make([]blendModeType, 0, 8) - f.blendList = append(f.blendList, blendModeType{}) // blendList[0] is unused (1-based) - f.blendMap = make(map[string]int) - f.blendMode = "Normal" - f.alpha = 1 - f.gradientList = make([]gradientType, 0, 8) - f.gradientList = append(f.gradientList, gradientType{}) // gradientList[0] is unused - // Set default PDF version number - f.pdfVersion = pdfVers1_3 - f.SetProducer("FPDF "+cnFpdfVersion, true) - f.layerInit() - f.catalogSort = gl.catalogSort - f.creationDate = gl.creationDate - f.modDate = gl.modDate - f.userUnderlineThickness = 1 - - // create a large enough buffer for formatting float64s. - // math.MaxInt64 needs 19. - // math.MaxUint64 needs 20. - f.fmt.buf = make([]byte, 24) - return -} - -// NewCustom returns a pointer to a new Fpdf instance. Its methods are -// subsequently called to produce a single PDF document. NewCustom() is an -// alternative to New() that provides additional customization. The PageSize() -// example demonstrates this method. -func NewCustom(init *InitType) (f *Fpdf) { - return fpdfNew(init.OrientationStr, init.UnitStr, init.SizeStr, init.FontDirStr, init.Size) -} - -// New returns a pointer to a new Fpdf instance. Its methods are subsequently -// called to produce a single PDF document. -// -// orientationStr specifies the default page orientation. For portrait mode, -// specify "P" or "Portrait". For landscape mode, specify "L" or "Landscape". -// An empty string will be replaced with "P". -// -// unitStr specifies the unit of length used in size parameters for elements -// other than fonts, which are always measured in points. Specify "pt" for -// point, "mm" for millimeter, "cm" for centimeter, or "in" for inch. An empty -// string will be replaced with "mm". -// -// sizeStr specifies the page size. Acceptable values are "A3", "A4", "A5", -// "Letter", "Legal", or "Tabloid". An empty string will be replaced with "A4". -// -// fontDirStr specifies the file system location in which font resources will -// be found. An empty string is replaced with ".". This argument only needs to -// reference an actual directory if a font other than one of the core -// fonts is used. The core fonts are "courier", "helvetica" (also called -// "arial"), "times", and "zapfdingbats" (also called "symbol"). -func New(orientationStr, unitStr, sizeStr, fontDirStr string) (f *Fpdf) { - return fpdfNew(orientationStr, unitStr, sizeStr, fontDirStr, SizeType{0, 0}) -} - -// Ok returns true if no processing errors have occurred. -func (f *Fpdf) Ok() bool { - return f.err == nil -} - -// Err returns true if a processing error has occurred. -func (f *Fpdf) Err() bool { - return f.err != nil -} - -// ClearError unsets the internal Fpdf error. This method should be used with -// care, as an internal error condition usually indicates an unrecoverable -// problem with the generation of a document. It is intended to deal with cases -// in which an error is used to select an alternate form of the document. -func (f *Fpdf) ClearError() { - f.err = nil -} - -// SetErrorf sets the internal Fpdf error with formatted text to halt PDF -// generation; this may facilitate error handling by application. If an error -// condition is already set, this call is ignored. -// -// See the documentation for printing in the standard fmt package for details -// about fmtStr and args. -func (f *Fpdf) SetErrorf(fmtStr string, args ...interface{}) { - if f.err == nil { - f.err = fmt.Errorf(fmtStr, args...) - } -} - -// String satisfies the fmt.Stringer interface and summarizes the Fpdf -// instance. -func (f *Fpdf) String() string { - return "Fpdf " + cnFpdfVersion -} - -// SetError sets an error to halt PDF generation. This may facilitate error -// handling by application. See also Ok(), Err() and Error(). -func (f *Fpdf) SetError(err error) { - if f.err == nil && err != nil { - f.err = err - } -} - -// Error returns the internal Fpdf error; this will be nil if no error has occurred. -func (f *Fpdf) Error() error { - return f.err -} - -// GetPageSize returns the current page's width and height. This is the paper's -// size. To compute the size of the area being used, subtract the margins (see -// GetMargins()). -func (f *Fpdf) GetPageSize() (width, height float64) { - width = f.w - height = f.h - return -} - -// GetMargins returns the left, top, right, and bottom margins. The first three -// are set with the SetMargins() method. The bottom margin is set with the -// SetAutoPageBreak() method. -func (f *Fpdf) GetMargins() (left, top, right, bottom float64) { - left = f.lMargin - top = f.tMargin - right = f.rMargin - bottom = f.bMargin - return -} - -// SetMargins defines the left, top and right margins. By default, they equal 1 -// cm. Call this method to change them. If the value of the right margin is -// less than zero, it is set to the same as the left margin. -func (f *Fpdf) SetMargins(left, top, right float64) { - f.lMargin = left - f.tMargin = top - if right < 0 { - right = left - } - f.rMargin = right -} - -// SetLeftMargin defines the left margin. The method can be called before -// creating the first page. If the current abscissa gets out of page, it is -// brought back to the margin. -func (f *Fpdf) SetLeftMargin(margin float64) { - f.lMargin = margin - if f.page > 0 && f.x < margin { - f.x = margin - } -} - -// GetCellMargin returns the cell margin. This is the amount of space before -// and after the text within a cell that's left blank, and is in units passed -// to New(). It defaults to 1mm. -func (f *Fpdf) GetCellMargin() float64 { - return f.cMargin -} - -// SetCellMargin sets the cell margin. This is the amount of space before and -// after the text within a cell that's left blank, and is in units passed to -// New(). -func (f *Fpdf) SetCellMargin(margin float64) { - f.cMargin = margin -} - -// SetPageBoxRec sets the page box for the current page, and any following -// pages. Allowable types are trim, trimbox, crop, cropbox, bleed, bleedbox, -// art and artbox box types are case insensitive. See SetPageBox() for a method -// that specifies the coordinates and extent of the page box individually. -func (f *Fpdf) SetPageBoxRec(t string, pb PageBox) { - switch strings.ToLower(t) { - case "trim": - fallthrough - case "trimbox": - t = "TrimBox" - case "crop": - fallthrough - case "cropbox": - t = "CropBox" - case "bleed": - fallthrough - case "bleedbox": - t = "BleedBox" - case "art": - fallthrough - case "artbox": - t = "ArtBox" - default: - f.err = fmt.Errorf("%s is not a valid page box type", t) - return - } - - pb.X = pb.X * f.k - pb.Y = pb.Y * f.k - pb.Wd = (pb.Wd * f.k) + pb.X - pb.Ht = (pb.Ht * f.k) + pb.Y - - if f.page > 0 { - f.pageBoxes[f.page][t] = pb - } - - // always override. page defaults are supplied in addPage function - f.defPageBoxes[t] = pb -} - -// SetPageBox sets the page box for the current page, and any following pages. -// Allowable types are trim, trimbox, crop, cropbox, bleed, bleedbox, art and -// artbox box types are case insensitive. -func (f *Fpdf) SetPageBox(t string, x, y, wd, ht float64) { - f.SetPageBoxRec(t, PageBox{SizeType{Wd: wd, Ht: ht}, PointType{X: x, Y: y}}) -} - -// SetPage sets the current page to that of a valid page in the PDF document. -// pageNum is one-based. The SetPage() example demonstrates this method. -func (f *Fpdf) SetPage(pageNum int) { - if (pageNum > 0) && (pageNum < len(f.pages)) { - f.page = pageNum - } -} - -// PageCount returns the number of pages currently in the document. Since page -// numbers in gofpdf are one-based, the page count is the same as the page -// number of the current last page. -func (f *Fpdf) PageCount() int { - return len(f.pages) - 1 -} - -// SetFontLocation sets the location in the file system of the font and font -// definition files. -func (f *Fpdf) SetFontLocation(fontDirStr string) { - f.fontpath = fontDirStr -} - -// SetFontLoader sets a loader used to read font files (.json and .z) from an -// arbitrary source. If a font loader has been specified, it is used to load -// the named font resources when AddFont() is called. If this operation fails, -// an attempt is made to load the resources from the configured font directory -// (see SetFontLocation()). -func (f *Fpdf) SetFontLoader(loader FontLoader) { - f.fontLoader = loader -} - -// SetHeaderFuncMode sets the function that lets the application render the -// page header. See SetHeaderFunc() for more details. The value for homeMode -// should be set to true to have the current position set to the left and top -// margin after the header function is called. -func (f *Fpdf) SetHeaderFuncMode(fnc func(), homeMode bool) { - f.headerFnc = fnc - f.headerHomeMode = homeMode -} - -// SetHeaderFunc sets the function that lets the application render the page -// header. The specified function is automatically called by AddPage() and -// should not be called directly by the application. The implementation in Fpdf -// is empty, so you have to provide an appropriate function if you want page -// headers. fnc will typically be a closure that has access to the Fpdf -// instance and other document generation variables. -// -// A header is a convenient place to put background content that repeats on -// each page such as a watermark. When this is done, remember to reset the X -// and Y values so the normal content begins where expected. Including a -// watermark on each page is demonstrated in the example for TransformRotate. -// -// This method is demonstrated in the example for AddPage(). -func (f *Fpdf) SetHeaderFunc(fnc func()) { - f.headerFnc = fnc -} - -// SetFooterFunc sets the function that lets the application render the page -// footer. The specified function is automatically called by AddPage() and -// Close() and should not be called directly by the application. The -// implementation in Fpdf is empty, so you have to provide an appropriate -// function if you want page footers. fnc will typically be a closure that has -// access to the Fpdf instance and other document generation variables. See -// SetFooterFuncLpi for a similar function that passes a last page indicator. -// -// This method is demonstrated in the example for AddPage(). -func (f *Fpdf) SetFooterFunc(fnc func()) { - f.footerFnc = fnc - f.footerFncLpi = nil -} - -// SetFooterFuncLpi sets the function that lets the application render the page -// footer. The specified function is automatically called by AddPage() and -// Close() and should not be called directly by the application. It is passed a -// boolean that is true if the last page of the document is being rendered. The -// implementation in Fpdf is empty, so you have to provide an appropriate -// function if you want page footers. fnc will typically be a closure that has -// access to the Fpdf instance and other document generation variables. -func (f *Fpdf) SetFooterFuncLpi(fnc func(lastPage bool)) { - f.footerFncLpi = fnc - f.footerFnc = nil -} - -// SetTopMargin defines the top margin. The method can be called before -// creating the first page. -func (f *Fpdf) SetTopMargin(margin float64) { - f.tMargin = margin -} - -// SetRightMargin defines the right margin. The method can be called before -// creating the first page. -func (f *Fpdf) SetRightMargin(margin float64) { - f.rMargin = margin -} - -// GetAutoPageBreak returns true if automatic pages breaks are enabled, false -// otherwise. This is followed by the triggering limit from the bottom of the -// page. This value applies only if automatic page breaks are enabled. -func (f *Fpdf) GetAutoPageBreak() (auto bool, margin float64) { - auto = f.autoPageBreak - margin = f.bMargin - return -} - -// SetAutoPageBreak enables or disables the automatic page breaking mode. When -// enabling, the second parameter is the distance from the bottom of the page -// that defines the triggering limit. By default, the mode is on and the margin -// is 2 cm. -func (f *Fpdf) SetAutoPageBreak(auto bool, margin float64) { - f.autoPageBreak = auto - f.bMargin = margin - f.pageBreakTrigger = f.h - margin -} - -// SetDisplayMode sets advisory display directives for the document viewer. -// Pages can be displayed entirely on screen, occupy the full width of the -// window, use real size, be scaled by a specific zooming factor or use viewer -// default (configured in the Preferences menu of Adobe Reader). The page -// layout can be specified so that pages are displayed individually or in -// pairs. -// -// zoomStr can be "fullpage" to display the entire page on screen, "fullwidth" -// to use maximum width of window, "real" to use real size (equivalent to 100% -// zoom) or "default" to use viewer default mode. -// -// layoutStr can be "single" (or "SinglePage") to display one page at once, -// "continuous" (or "OneColumn") to display pages continuously, "two" (or -// "TwoColumnLeft") to display two pages on two columns with odd-numbered pages -// on the left, or "TwoColumnRight" to display two pages on two columns with -// odd-numbered pages on the right, or "TwoPageLeft" to display pages two at a -// time with odd-numbered pages on the left, or "TwoPageRight" to display pages -// two at a time with odd-numbered pages on the right, or "default" to use -// viewer default mode. -func (f *Fpdf) SetDisplayMode(zoomStr, layoutStr string) { - if f.err != nil { - return - } - if layoutStr == "" { - layoutStr = "default" - } - switch zoomStr { - case "fullpage", "fullwidth", "real", "default": - f.zoomMode = zoomStr - default: - f.err = fmt.Errorf("incorrect zoom display mode: %s", zoomStr) - return - } - switch layoutStr { - case "single", "continuous", "two", "default", "SinglePage", "OneColumn", - "TwoColumnLeft", "TwoColumnRight", "TwoPageLeft", "TwoPageRight": - f.layoutMode = layoutStr - default: - f.err = fmt.Errorf("incorrect layout display mode: %s", layoutStr) - return - } -} - -// SetDefaultCompression controls the default setting of the internal -// compression flag. See SetCompression() for more details. Compression is on -// by default. -func SetDefaultCompression(compress bool) { - gl.noCompress = !compress -} - -// SetCompression activates or deactivates page compression with zlib. When -// activated, the internal representation of each page is compressed, which -// leads to a compression ratio of about 2 for the resulting document. -// Compression is on by default. -func (f *Fpdf) SetCompression(compress bool) { - f.compress = compress -} - -// SetProducer defines the producer of the document. isUTF8 indicates if the string -// is encoded in ISO-8859-1 (false) or UTF-8 (true). -func (f *Fpdf) SetProducer(producerStr string, isUTF8 bool) { - if isUTF8 { - producerStr = utf8toutf16(producerStr) - } - f.producer = producerStr -} - -// SetTitle defines the title of the document. isUTF8 indicates if the string -// is encoded in ISO-8859-1 (false) or UTF-8 (true). -func (f *Fpdf) SetTitle(titleStr string, isUTF8 bool) { - if isUTF8 { - titleStr = utf8toutf16(titleStr) - } - f.title = titleStr -} - -// SetSubject defines the subject of the document. isUTF8 indicates if the -// string is encoded in ISO-8859-1 (false) or UTF-8 (true). -func (f *Fpdf) SetSubject(subjectStr string, isUTF8 bool) { - if isUTF8 { - subjectStr = utf8toutf16(subjectStr) - } - f.subject = subjectStr -} - -// SetAuthor defines the author of the document. isUTF8 indicates if the string -// is encoded in ISO-8859-1 (false) or UTF-8 (true). -func (f *Fpdf) SetAuthor(authorStr string, isUTF8 bool) { - if isUTF8 { - authorStr = utf8toutf16(authorStr) - } - f.author = authorStr -} - -// SetLang defines the natural language of the document (e.g. "de-CH"). -func (f *Fpdf) SetLang(lang string) { - f.lang = lang -} - -// SetKeywords defines the keywords of the document. keywordStr is a -// space-delimited string, for example "invoice August". isUTF8 indicates if -// the string is encoded -func (f *Fpdf) SetKeywords(keywordsStr string, isUTF8 bool) { - if isUTF8 { - keywordsStr = utf8toutf16(keywordsStr) - } - f.keywords = keywordsStr -} - -// SetCreator defines the creator of the document. isUTF8 indicates if the -// string is encoded in ISO-8859-1 (false) or UTF-8 (true). -func (f *Fpdf) SetCreator(creatorStr string, isUTF8 bool) { - if isUTF8 { - creatorStr = utf8toutf16(creatorStr) - } - f.creator = creatorStr -} - -// SetXmpMetadata defines XMP metadata that will be embedded with the document. -func (f *Fpdf) SetXmpMetadata(xmpStream []byte) { - f.xmp = xmpStream -} - -// AliasNbPages defines an alias for the total number of pages. It will be -// substituted as the document is closed. An empty string is replaced with the -// string "{nb}". -// -// See the example for AddPage() for a demonstration of this method. -func (f *Fpdf) AliasNbPages(aliasStr string) { - if aliasStr == "" { - aliasStr = "{nb}" - } - f.aliasNbPagesStr = aliasStr -} - -// RTL enables right-to-left mode -func (f *Fpdf) RTL() { - f.isRTL = true -} - -// LTR disables right-to-left mode -func (f *Fpdf) LTR() { - f.isRTL = false -} - -// open begins a document -func (f *Fpdf) open() { - f.state = 1 -} - -// Close terminates the PDF document. It is not necessary to call this method -// explicitly because Output(), OutputAndClose() and OutputFileAndClose() do it -// automatically. If the document contains no page, AddPage() is called to -// prevent the generation of an invalid document. -func (f *Fpdf) Close() { - if f.err == nil { - if f.clipNest > 0 { - f.err = fmt.Errorf("clip procedure must be explicitly ended") - } else if f.transformNest > 0 { - f.err = fmt.Errorf("transformation procedure must be explicitly ended") - } - } - if f.err != nil { - return - } - if f.state == 3 { - return - } - if f.page == 0 { - f.AddPage() - if f.err != nil { - return - } - } - // Page footer - f.inFooter = true - if f.footerFnc != nil { - f.footerFnc() - } else if f.footerFncLpi != nil { - f.footerFncLpi(true) - } - f.inFooter = false - - // Close page - f.endpage() - // Close document - f.enddoc() -} - -// PageSize returns the width and height of the specified page in the units -// established in New(). These return values are followed by the unit of -// measure itself. If pageNum is zero or otherwise out of bounds, it returns -// the default page size, that is, the size of the page that would be added by -// AddPage(). -func (f *Fpdf) PageSize(pageNum int) (wd, ht float64, unitStr string) { - sz, ok := f.pageSizes[pageNum] - if ok { - sz.Wd, sz.Ht = sz.Wd/f.k, sz.Ht/f.k - } else { - sz = f.defPageSize // user units - } - return sz.Wd, sz.Ht, f.unitStr -} - -// AddPageFormat adds a new page with non-default orientation or size. See -// AddPage() for more details. -// -// See New() for a description of orientationStr. -// -// size specifies the size of the new page in the units established in New(). -// -// The PageSize() example demonstrates this method. -func (f *Fpdf) AddPageFormat(orientationStr string, size SizeType) { - if f.err != nil { - return - } - if f.page != len(f.pages)-1 { - f.page = len(f.pages) - 1 - } - if f.state == 0 { - f.open() - } - familyStr := f.fontFamily - style := f.fontStyle - if f.underline { - style += "U" - } - if f.strikeout { - style += "S" - } - fontsize := f.fontSizePt - lw := f.lineWidth - dc := f.color.draw - fc := f.color.fill - tc := f.color.text - cf := f.colorFlag - - if f.page > 0 { - f.inFooter = true - // Page footer avoid double call on footer. - if f.footerFnc != nil { - f.footerFnc() - - } else if f.footerFncLpi != nil { - f.footerFncLpi(false) // not last page. - } - f.inFooter = false - // Close page - f.endpage() - } - // Start new page - f.beginpage(orientationStr, size) - // Set line cap style to current value - // f.out("2 J") - f.outf("%d J", f.capStyle) - // Set line join style to current value - f.outf("%d j", f.joinStyle) - // Set line width - f.lineWidth = lw - f.outf("%.2f w", lw*f.k) - // Set dash pattern - if len(f.dashArray) > 0 { - f.outputDashPattern() - } - // Set font - if familyStr != "" { - f.SetFont(familyStr, style, fontsize) - if f.err != nil { - return - } - } - // Set colors - f.color.draw = dc - if dc.str != "0 G" { - f.out(dc.str) - } - f.color.fill = fc - if fc.str != "0 g" { - f.out(fc.str) - } - f.color.text = tc - f.colorFlag = cf - // Page header - if f.headerFnc != nil { - f.inHeader = true - f.headerFnc() - f.inHeader = false - if f.headerHomeMode { - f.SetHomeXY() - } - } - // Restore line width - if f.lineWidth != lw { - f.lineWidth = lw - f.outf("%.2f w", lw*f.k) - } - // Restore font - if familyStr != "" { - f.SetFont(familyStr, style, fontsize) - if f.err != nil { - return - } - } - // Restore colors - if f.color.draw.str != dc.str { - f.color.draw = dc - f.out(dc.str) - } - if f.color.fill.str != fc.str { - f.color.fill = fc - f.out(fc.str) - } - f.color.text = tc - f.colorFlag = cf -} - -// AddPage adds a new page to the document. If a page is already present, the -// Footer() method is called first to output the footer. Then the page is -// added, the current position set to the top-left corner according to the left -// and top margins, and Header() is called to display the header. -// -// The font which was set before calling is automatically restored. There is no -// need to call SetFont() again if you want to continue with the same font. The -// same is true for colors and line width. -// -// The origin of the coordinate system is at the top-left corner and increasing -// ordinates go downwards. -// -// See AddPageFormat() for a version of this method that allows the page size -// and orientation to be different than the default. -func (f *Fpdf) AddPage() { - if f.err != nil { - return - } - // dbg("AddPage") - f.AddPageFormat(f.defOrientation, f.defPageSize) -} - -// PageNo returns the current page number. -// -// See the example for AddPage() for a demonstration of this method. -func (f *Fpdf) PageNo() int { - return f.page -} - -func colorComp(v int) (int, float64) { - if v < 0 { - v = 0 - } else if v > 255 { - v = 255 - } - return v, float64(v) / 255.0 -} - -func (f *Fpdf) rgbColorValue(r, g, b int, grayStr, fullStr string) (clr colorType) { - clr.ir, clr.r = colorComp(r) - clr.ig, clr.g = colorComp(g) - clr.ib, clr.b = colorComp(b) - clr.mode = colorModeRGB - clr.gray = clr.ir == clr.ig && clr.r == clr.b - const prec = 3 - if len(grayStr) > 0 { - if clr.gray { - // clr.str = sprintf("%.3f %s", clr.r, grayStr) - f.fmt.col.Reset() - f.fmt.col.WriteString(f.fmtF64(clr.r, prec)) - f.fmt.col.WriteString(" ") - f.fmt.col.WriteString(grayStr) - clr.str = f.fmt.col.String() - } else { - // clr.str = sprintf("%.3f %.3f %.3f %s", clr.r, clr.g, clr.b, fullStr) - f.fmt.col.Reset() - f.fmt.col.WriteString(f.fmtF64(clr.r, prec)) - f.fmt.col.WriteString(" ") - f.fmt.col.WriteString(f.fmtF64(clr.g, prec)) - f.fmt.col.WriteString(" ") - f.fmt.col.WriteString(f.fmtF64(clr.b, prec)) - f.fmt.col.WriteString(" ") - f.fmt.col.WriteString(fullStr) - clr.str = f.fmt.col.String() - } - } else { - // clr.str = sprintf("%.3f %.3f %.3f", clr.r, clr.g, clr.b) - f.fmt.col.Reset() - f.fmt.col.WriteString(f.fmtF64(clr.r, prec)) - f.fmt.col.WriteString(" ") - f.fmt.col.WriteString(f.fmtF64(clr.g, prec)) - f.fmt.col.WriteString(" ") - f.fmt.col.WriteString(f.fmtF64(clr.b, prec)) - clr.str = f.fmt.col.String() - } - return -} - -// SetDrawColor defines the color used for all drawing operations (lines, -// rectangles and cell borders). It is expressed in RGB components (0 - 255). -// The method can be called before the first page is created. The value is -// retained from page to page. -func (f *Fpdf) SetDrawColor(r, g, b int) { - f.setDrawColor(r, g, b) -} - -func (f *Fpdf) setDrawColor(r, g, b int) { - f.color.draw = f.rgbColorValue(r, g, b, "G", "RG") - if f.page > 0 { - f.out(f.color.draw.str) - } -} - -// GetDrawColor returns the most recently set draw color as RGB components (0 - -// 255). This will not be the current value if a draw color of some other type -// (for example, spot) has been more recently set. -func (f *Fpdf) GetDrawColor() (int, int, int) { - return f.color.draw.ir, f.color.draw.ig, f.color.draw.ib -} - -// SetFillColor defines the color used for all filling operations (filled -// rectangles and cell backgrounds). It is expressed in RGB components (0 -// -255). The method can be called before the first page is created and the -// value is retained from page to page. -func (f *Fpdf) SetFillColor(r, g, b int) { - f.setFillColor(r, g, b) -} - -func (f *Fpdf) setFillColor(r, g, b int) { - f.color.fill = f.rgbColorValue(r, g, b, "g", "rg") - f.colorFlag = f.color.fill.str != f.color.text.str - if f.page > 0 { - f.out(f.color.fill.str) - } -} - -// GetFillColor returns the most recently set fill color as RGB components (0 - -// 255). This will not be the current value if a fill color of some other type -// (for example, spot) has been more recently set. -func (f *Fpdf) GetFillColor() (int, int, int) { - return f.color.fill.ir, f.color.fill.ig, f.color.fill.ib -} - -// SetTextColor defines the color used for text. It is expressed in RGB -// components (0 - 255). The method can be called before the first page is -// created. The value is retained from page to page. -func (f *Fpdf) SetTextColor(r, g, b int) { - f.setTextColor(r, g, b) -} - -func (f *Fpdf) setTextColor(r, g, b int) { - f.color.text = f.rgbColorValue(r, g, b, "g", "rg") - f.colorFlag = f.color.fill.str != f.color.text.str -} - -// GetTextColor returns the most recently set text color as RGB components (0 - -// 255). This will not be the current value if a text color of some other type -// (for example, spot) has been more recently set. -func (f *Fpdf) GetTextColor() (int, int, int) { - return f.color.text.ir, f.color.text.ig, f.color.text.ib -} - -// GetStringWidth returns the length of a string in user units. A font must be -// currently selected. -func (f *Fpdf) GetStringWidth(s string) float64 { - if f.err != nil { - return 0 - } - w := f.GetStringSymbolWidth(s) - return float64(w) * f.fontSize / 1000 -} - -// GetStringSymbolWidth returns the length of a string in glyf units. A font must be -// currently selected. -func (f *Fpdf) GetStringSymbolWidth(s string) int { - if f.err != nil { - return 0 - } - w := 0 - if f.isCurrentUTF8 { - for _, char := range s { - intChar := int(char) - if len(f.currentFont.Cw) >= intChar && f.currentFont.Cw[intChar] > 0 { - if f.currentFont.Cw[intChar] != 65535 { - w += f.currentFont.Cw[intChar] - } - } else if f.currentFont.Desc.MissingWidth != 0 { - w += f.currentFont.Desc.MissingWidth - } else { - w += 500 - } - } - } else { - for _, ch := range []byte(s) { - if ch == 0 { - break - } - w += f.currentFont.Cw[ch] - } - } - return w -} - -// SetLineWidth defines the line width. By default, the value equals 0.2 mm. -// The method can be called before the first page is created. The value is -// retained from page to page. -func (f *Fpdf) SetLineWidth(width float64) { - f.setLineWidth(width) -} - -func (f *Fpdf) setLineWidth(width float64) { - f.lineWidth = width - if f.page > 0 { - f.out(f.fmtF64(width*f.k, 2) + " w") - } -} - -// GetLineWidth returns the current line thickness. -func (f *Fpdf) GetLineWidth() float64 { - return f.lineWidth -} - -// SetLineCapStyle defines the line cap style. styleStr should be "butt", -// "round" or "square". A square style projects from the end of the line. The -// method can be called before the first page is created. The value is -// retained from page to page. -func (f *Fpdf) SetLineCapStyle(styleStr string) { - var capStyle int - switch styleStr { - case "round": - capStyle = 1 - case "square": - capStyle = 2 - default: - capStyle = 0 - } - f.capStyle = capStyle - if f.page > 0 { - f.outf("%d J", f.capStyle) - } -} - -// SetLineJoinStyle defines the line cap style. styleStr should be "miter", -// "round" or "bevel". The method can be called before the first page -// is created. The value is retained from page to page. -func (f *Fpdf) SetLineJoinStyle(styleStr string) { - var joinStyle int - switch styleStr { - case "round": - joinStyle = 1 - case "bevel": - joinStyle = 2 - default: - joinStyle = 0 - } - f.joinStyle = joinStyle - if f.page > 0 { - f.outf("%d j", f.joinStyle) - } -} - -// SetDashPattern sets the dash pattern that is used to draw lines. The -// dashArray elements are numbers that specify the lengths, in units -// established in New(), of alternating dashes and gaps. The dash phase -// specifies the distance into the dash pattern at which to start the dash. The -// dash pattern is retained from page to page. Call this method with an empty -// array to restore solid line drawing. -// -// The Beziergon() example demonstrates this method. -func (f *Fpdf) SetDashPattern(dashArray []float64, dashPhase float64) { - scaled := make([]float64, len(dashArray)) - for i, value := range dashArray { - scaled[i] = value * f.k - } - dashPhase *= f.k - - f.dashArray = scaled - f.dashPhase = dashPhase - if f.page > 0 { - f.outputDashPattern() - } - -} - -func (f *Fpdf) outputDashPattern() { - var buf bytes.Buffer - buf.WriteByte('[') - for i, value := range f.dashArray { - if i > 0 { - buf.WriteByte(' ') - } - buf.WriteString(strconv.FormatFloat(value, 'f', 2, 64)) - } - buf.WriteString("] ") - buf.WriteString(strconv.FormatFloat(f.dashPhase, 'f', 2, 64)) - buf.WriteString(" d") - f.outbuf(&buf) -} - -// Line draws a line between points (x1, y1) and (x2, y2) using the current -// draw color, line width and cap style. -func (f *Fpdf) Line(x1, y1, x2, y2 float64) { - // f.outf("%.2f %.2f m %.2f %.2f l S", x1*f.k, (f.h-y1)*f.k, x2*f.k, (f.h-y2)*f.k) - const prec = 2 - f.putF64(x1*f.k, prec) - f.put(" ") - f.putF64((f.h-y1)*f.k, prec) - f.put(" m ") - f.putF64(x2*f.k, prec) - f.put(" ") - f.putF64((f.h-y2)*f.k, prec) - f.put(" l S\n") -} - -// fillDrawOp corrects path painting operators -func fillDrawOp(styleStr string) (opStr string) { - switch strings.ToUpper(styleStr) { - case "", "D": - // Stroke the path. - opStr = "S" - case "F": - // fill the path, using the nonzero winding number rule - opStr = "f" - case "F*": - // fill the path, using the even-odd rule - opStr = "f*" - case "FD", "DF": - // fill and then stroke the path, using the nonzero winding number rule - opStr = "B" - case "FD*", "DF*": - // fill and then stroke the path, using the even-odd rule - opStr = "B*" - default: - opStr = styleStr - } - return -} - -// Rect outputs a rectangle of width w and height h with the upper left corner -// positioned at point (x, y). -// -// It can be drawn (border only), filled (with no border) or both. styleStr can -// be "F" for filled, "D" for outlined only, or "DF" or "FD" for outlined and -// filled. An empty string will be replaced with "D". Drawing uses the current -// draw color and line width centered on the rectangle's perimeter. Filling -// uses the current fill color. -func (f *Fpdf) Rect(x, y, w, h float64, styleStr string) { - // f.outf("%.2f %.2f %.2f %.2f re %s", x*f.k, (f.h-y)*f.k, w*f.k, -h*f.k, fillDrawOp(styleStr)) - const prec = 2 - f.putF64(x*f.k, prec) - f.put(" ") - f.putF64((f.h-y)*f.k, prec) - f.put(" ") - f.putF64(w*f.k, prec) - f.put(" ") - f.putF64(-h*f.k, prec) - f.put(" re " + fillDrawOp(styleStr) + "\n") -} - -// RoundedRect outputs a rectangle of width w and height h with the upper left -// corner positioned at point (x, y). It can be drawn (border only), filled -// (with no border) or both. styleStr can be "F" for filled, "D" for outlined -// only, or "DF" or "FD" for outlined and filled. An empty string will be -// replaced with "D". Drawing uses the current draw color and line width -// centered on the rectangle's perimeter. Filling uses the current fill color. -// The rounded corners of the rectangle are specified by radius r. corners is a -// string that includes "1" to round the upper left corner, "2" to round the -// upper right corner, "3" to round the lower right corner, and "4" to round -// the lower left corner. The RoundedRect example demonstrates this method. -func (f *Fpdf) RoundedRect(x, y, w, h, r float64, corners string, stylestr string) { - // This routine was adapted by Brigham Thompson from a script by Christophe Prugnaud - var rTL, rTR, rBR, rBL float64 // zero means no rounded corner - if strings.Contains(corners, "1") { - rTL = r - } - if strings.Contains(corners, "2") { - rTR = r - } - if strings.Contains(corners, "3") { - rBR = r - } - if strings.Contains(corners, "4") { - rBL = r - } - f.RoundedRectExt(x, y, w, h, rTL, rTR, rBR, rBL, stylestr) -} - -// RoundedRectExt behaves the same as RoundedRect() but supports a different -// radius for each corner. A zero radius means squared corner. See -// RoundedRect() for more details. This method is demonstrated in the -// RoundedRect() example. -func (f *Fpdf) RoundedRectExt(x, y, w, h, rTL, rTR, rBR, rBL float64, stylestr string) { - f.roundedRectPath(x, y, w, h, rTL, rTR, rBR, rBL) - f.out(fillDrawOp(stylestr)) -} - -// Circle draws a circle centered on point (x, y) with radius r. -// -// styleStr can be "F" for filled, "D" for outlined only, or "DF" or "FD" for -// outlined and filled. An empty string will be replaced with "D". Drawing uses -// the current draw color and line width centered on the circle's perimeter. -// Filling uses the current fill color. -func (f *Fpdf) Circle(x, y, r float64, styleStr string) { - f.Ellipse(x, y, r, r, 0, styleStr) -} - -// Ellipse draws an ellipse centered at point (x, y). rx and ry specify its -// horizontal and vertical radii. -// -// degRotate specifies the counter-clockwise angle in degrees that the ellipse -// will be rotated. -// -// styleStr can be "F" for filled, "D" for outlined only, or "DF" or "FD" for -// outlined and filled. An empty string will be replaced with "D". Drawing uses -// the current draw color and line width centered on the ellipse's perimeter. -// Filling uses the current fill color. -// -// The Circle() example demonstrates this method. -func (f *Fpdf) Ellipse(x, y, rx, ry, degRotate float64, styleStr string) { - f.arc(x, y, rx, ry, degRotate, 0, 360, styleStr, false) -} - -// Polygon draws a closed figure defined by a series of vertices specified by -// points. The x and y fields of the points use the units established in New(). -// The last point in the slice will be implicitly joined to the first to close -// the polygon. -// -// styleStr can be "F" for filled, "D" for outlined only, or "DF" or "FD" for -// outlined and filled. An empty string will be replaced with "D". Drawing uses -// the current draw color and line width centered on the ellipse's perimeter. -// Filling uses the current fill color. -func (f *Fpdf) Polygon(points []PointType, styleStr string) { - if len(points) > 2 { - const prec = 5 - for j, pt := range points { - if j == 0 { - f.point(pt.X, pt.Y) - } else { - // f.outf("%.5f %.5f l ", pt.X*f.k, (f.h-pt.Y)*f.k) - f.putF64(pt.X*f.k, prec) - f.put(" ") - f.putF64((f.h-pt.Y)*f.k, prec) - f.put(" l \n") - } - } - // f.outf("%.5f %.5f l ", points[0].X*f.k, (f.h-points[0].Y)*f.k) - f.putF64(points[0].X*f.k, prec) - f.put(" ") - f.putF64((f.h-points[0].Y)*f.k, prec) - f.put(" l \n") - f.DrawPath(styleStr) - } -} - -// Beziergon draws a closed figure defined by a series of cubic Bézier curve -// segments. The first point in the slice defines the starting point of the -// figure. Each three following points p1, p2, p3 represent a curve segment to -// the point p3 using p1 and p2 as the Bézier control points. -// -// The x and y fields of the points use the units established in New(). -// -// styleStr can be "F" for filled, "D" for outlined only, or "DF" or "FD" for -// outlined and filled. An empty string will be replaced with "D". Drawing uses -// the current draw color and line width centered on the ellipse's perimeter. -// Filling uses the current fill color. -func (f *Fpdf) Beziergon(points []PointType, styleStr string) { - - // Thanks, Robert Lillack, for contributing this function. - - if len(points) < 4 { - return - } - f.point(points[0].XY()) - - points = points[1:] - for len(points) >= 3 { - cx0, cy0 := points[0].XY() - cx1, cy1 := points[1].XY() - x1, y1 := points[2].XY() - f.curve(cx0, cy0, cx1, cy1, x1, y1) - points = points[3:] - } - - f.DrawPath(styleStr) -} - -// point outputs current point -func (f *Fpdf) point(x, y float64) { - // f.outf("%.2f %.2f m", x*f.k, (f.h-y)*f.k) - f.putF64(x*f.k, 2) - f.put(" ") - f.putF64((f.h-y)*f.k, 2) - f.put(" m\n") -} - -// curve outputs a single cubic Bézier curve segment from current point -func (f *Fpdf) curve(cx0, cy0, cx1, cy1, x, y float64) { - // Thanks, Robert Lillack, for straightening this out - // f.outf("%.5f %.5f %.5f %.5f %.5f %.5f c", cx0*f.k, (f.h-cy0)*f.k, cx1*f.k, - // (f.h-cy1)*f.k, x*f.k, (f.h-y)*f.k) - const prec = 5 - f.putF64(cx0*f.k, prec) - f.put(" ") - f.putF64((f.h-cy0)*f.k, prec) - f.put(" ") - f.putF64(cx1*f.k, prec) - f.put(" ") - f.putF64((f.h-cy1)*f.k, prec) - f.put(" ") - f.putF64(x*f.k, prec) - f.put(" ") - f.putF64((f.h-y)*f.k, prec) - f.put(" c\n") -} - -// Curve draws a single-segment quadratic Bézier curve. The curve starts at -// the point (x0, y0) and ends at the point (x1, y1). The control point (cx, -// cy) specifies the curvature. At the start point, the curve is tangent to the -// straight line between the start point and the control point. At the end -// point, the curve is tangent to the straight line between the end point and -// the control point. -// -// styleStr can be "F" for filled, "D" for outlined only, or "DF" or "FD" for -// outlined and filled. An empty string will be replaced with "D". Drawing uses -// the current draw color, line width, and cap style centered on the curve's -// path. Filling uses the current fill color. -// -// The Circle() example demonstrates this method. -func (f *Fpdf) Curve(x0, y0, cx, cy, x1, y1 float64, styleStr string) { - f.point(x0, y0) - // f.outf("%.5f %.5f %.5f %.5f v %s", cx*f.k, (f.h-cy)*f.k, x1*f.k, (f.h-y1)*f.k, - // fillDrawOp(styleStr)) - const prec = 5 - f.putF64(cx*f.k, prec) - f.put(" ") - f.putF64((f.h-cy)*f.k, prec) - f.put(" ") - f.putF64(x1*f.k, prec) - f.put(" ") - f.putF64((f.h-y1)*f.k, prec) - f.put(" v " + fillDrawOp(styleStr) + "\n") -} - -// CurveCubic draws a single-segment cubic Bézier curve. This routine performs -// the same function as CurveBezierCubic() but has a nonstandard argument order. -// It is retained to preserve backward compatibility. -func (f *Fpdf) CurveCubic(x0, y0, cx0, cy0, x1, y1, cx1, cy1 float64, styleStr string) { - // f.point(x0, y0) - // f.outf("%.5f %.5f %.5f %.5f %.5f %.5f c %s", cx0*f.k, (f.h-cy0)*f.k, - // cx1*f.k, (f.h-cy1)*f.k, x1*f.k, (f.h-y1)*f.k, fillDrawOp(styleStr)) - f.CurveBezierCubic(x0, y0, cx0, cy0, cx1, cy1, x1, y1, styleStr) -} - -// CurveBezierCubic draws a single-segment cubic Bézier curve. The curve starts at -// the point (x0, y0) and ends at the point (x1, y1). The control points (cx0, -// cy0) and (cx1, cy1) specify the curvature. At the start point, the curve is -// tangent to the straight line between the start point and the control point -// (cx0, cy0). At the end point, the curve is tangent to the straight line -// between the end point and the control point (cx1, cy1). -// -// styleStr can be "F" for filled, "D" for outlined only, or "DF" or "FD" for -// outlined and filled. An empty string will be replaced with "D". Drawing uses -// the current draw color, line width, and cap style centered on the curve's -// path. Filling uses the current fill color. -// -// This routine performs the same function as CurveCubic() but uses standard -// argument order. -// -// The Circle() example demonstrates this method. -func (f *Fpdf) CurveBezierCubic(x0, y0, cx0, cy0, cx1, cy1, x1, y1 float64, styleStr string) { - f.point(x0, y0) - // f.outf("%.5f %.5f %.5f %.5f %.5f %.5f c %s", cx0*f.k, (f.h-cy0)*f.k, - // cx1*f.k, (f.h-cy1)*f.k, x1*f.k, (f.h-y1)*f.k, fillDrawOp(styleStr)) - const prec = 5 - f.putF64(cx0*f.k, prec) - f.put(" ") - f.putF64((f.h-cy0)*f.k, prec) - f.put(" ") - f.putF64(cx1*f.k, prec) - f.put(" ") - f.putF64((f.h-cy1)*f.k, prec) - f.put(" ") - f.putF64(x1*f.k, prec) - f.put(" ") - f.putF64((f.h-y1)*f.k, prec) - f.put(" c " + fillDrawOp(styleStr) + "\n") -} - -// Arc draws an elliptical arc centered at point (x, y). rx and ry specify its -// horizontal and vertical radii. -// -// degRotate specifies the angle that the arc will be rotated. degStart and -// degEnd specify the starting and ending angle of the arc. All angles are -// specified in degrees and measured counter-clockwise from the 3 o'clock -// position. -// -// styleStr can be "F" for filled, "D" for outlined only, or "DF" or "FD" for -// outlined and filled. An empty string will be replaced with "D". Drawing uses -// the current draw color, line width, and cap style centered on the arc's -// path. Filling uses the current fill color. -// -// The Circle() example demonstrates this method. -func (f *Fpdf) Arc(x, y, rx, ry, degRotate, degStart, degEnd float64, styleStr string) { - f.arc(x, y, rx, ry, degRotate, degStart, degEnd, styleStr, false) -} - -// GetAlpha returns the alpha blending channel, which consists of the -// alpha transparency value and the blend mode. See SetAlpha for more -// details. -func (f *Fpdf) GetAlpha() (alpha float64, blendModeStr string) { - return f.alpha, f.blendMode -} - -// SetAlpha sets the alpha blending channel. The blending effect applies to -// text, drawings and images. -// -// alpha must be a value between 0.0 (fully transparent) to 1.0 (fully opaque). -// Values outside of this range result in an error. -// -// blendModeStr must be one of "Normal", "Multiply", "Screen", "Overlay", -// "Darken", "Lighten", "ColorDodge", "ColorBurn","HardLight", "SoftLight", -// "Difference", "Exclusion", "Hue", "Saturation", "Color", or "Luminosity". An -// empty string is replaced with "Normal". -// -// To reset normal rendering after applying a blending mode, call this method -// with alpha set to 1.0 and blendModeStr set to "Normal". -func (f *Fpdf) SetAlpha(alpha float64, blendModeStr string) { - if f.err != nil { - return - } - var bl blendModeType - switch blendModeStr { - case "Normal", "Multiply", "Screen", "Overlay", - "Darken", "Lighten", "ColorDodge", "ColorBurn", "HardLight", "SoftLight", - "Difference", "Exclusion", "Hue", "Saturation", "Color", "Luminosity": - bl.modeStr = blendModeStr - case "": - bl.modeStr = "Normal" - default: - f.err = fmt.Errorf("unrecognized blend mode \"%s\"", blendModeStr) - return - } - if alpha < 0.0 || alpha > 1.0 { - f.err = fmt.Errorf("alpha value (0.0 - 1.0) is out of range: %.3f", alpha) - return - } - f.alpha = alpha - f.blendMode = blendModeStr - alphaStr := sprintf("%.3f", alpha) - keyStr := sprintf("%s %s", alphaStr, blendModeStr) - pos, ok := f.blendMap[keyStr] - if !ok { - pos = len(f.blendList) // at least 1 - f.blendList = append(f.blendList, blendModeType{alphaStr, alphaStr, blendModeStr, 0}) - f.blendMap[keyStr] = pos - } - if len(f.blendMap) > 0 && f.pdfVersion < pdfVers1_4 { - f.pdfVersion = pdfVers1_4 - } - f.outf("/GS%d gs", pos) -} - -func (f *Fpdf) gradientClipStart(x, y, w, h float64) { - { - const prec = 2 - // Save current graphic state and set clipping area - // f.outf("q %.2f %.2f %.2f %.2f re W n", x*f.k, (f.h-y)*f.k, w*f.k, -h*f.k) - f.put("q ") - f.putF64(x*f.k, prec) - f.put(" ") - f.putF64((f.h-y)*f.k, prec) - f.put(" ") - f.putF64(w*f.k, prec) - f.put(" ") - f.putF64(-h*f.k, prec) - f.put(" re W n\n") - } - { - const prec = 5 - // Set up transformation matrix for gradient - // f.outf("%.5f 0 0 %.5f %.5f %.5f cm", w*f.k, h*f.k, x*f.k, (f.h-(y+h))*f.k) - f.putF64(w*f.k, prec) - f.put(" 0 0 ") - f.putF64(h*f.k, prec) - f.put(" ") - f.putF64(x*f.k, prec) - f.put(" ") - f.putF64((f.h-(y+h))*f.k, prec) - f.put(" cm\n") - } -} - -func (f *Fpdf) gradientClipEnd() { - // Restore previous graphic state - f.out("Q") -} - -func (f *Fpdf) gradient(tp, r1, g1, b1, r2, g2, b2 int, x1, y1, x2, y2, r float64) { - pos := len(f.gradientList) - clr1 := f.rgbColorValue(r1, g1, b1, "", "") - clr2 := f.rgbColorValue(r2, g2, b2, "", "") - f.gradientList = append(f.gradientList, gradientType{tp, clr1.str, clr2.str, - x1, y1, x2, y2, r, 0}) - f.outf("/Sh%d sh", pos) -} - -// LinearGradient draws a rectangular area with a blending of one color to -// another. The rectangle is of width w and height h. Its upper left corner is -// positioned at point (x, y). -// -// Each color is specified with three component values, one each for red, green -// and blue. The values range from 0 to 255. The first color is specified by -// (r1, g1, b1) and the second color by (r2, g2, b2). -// -// The blending is controlled with a gradient vector that uses normalized -// coordinates in which the lower left corner is position (0, 0) and the upper -// right corner is (1, 1). The vector's origin and destination are specified by -// the points (x1, y1) and (x2, y2). In a linear gradient, blending occurs -// perpendicularly to the vector. The vector does not necessarily need to be -// anchored on the rectangle edge. Color 1 is used up to the origin of the -// vector and color 2 is used beyond the vector's end point. Between the points -// the colors are gradually blended. -func (f *Fpdf) LinearGradient(x, y, w, h float64, r1, g1, b1, r2, g2, b2 int, x1, y1, x2, y2 float64) { - f.gradientClipStart(x, y, w, h) - f.gradient(2, r1, g1, b1, r2, g2, b2, x1, y1, x2, y2, 0) - f.gradientClipEnd() -} - -// RadialGradient draws a rectangular area with a blending of one color to -// another. The rectangle is of width w and height h. Its upper left corner is -// positioned at point (x, y). -// -// Each color is specified with three component values, one each for red, green -// and blue. The values range from 0 to 255. The first color is specified by -// (r1, g1, b1) and the second color by (r2, g2, b2). -// -// The blending is controlled with a point and a circle, both specified with -// normalized coordinates in which the lower left corner of the rendered -// rectangle is position (0, 0) and the upper right corner is (1, 1). Color 1 -// begins at the origin point specified by (x1, y1). Color 2 begins at the -// circle specified by the center point (x2, y2) and radius r. Colors are -// gradually blended from the origin to the circle. The origin and the circle's -// center do not necessarily have to coincide, but the origin must be within -// the circle to avoid rendering problems. -// -// The LinearGradient() example demonstrates this method. -func (f *Fpdf) RadialGradient(x, y, w, h float64, r1, g1, b1, r2, g2, b2 int, x1, y1, x2, y2, r float64) { - f.gradientClipStart(x, y, w, h) - f.gradient(3, r1, g1, b1, r2, g2, b2, x1, y1, x2, y2, r) - f.gradientClipEnd() -} - -// ClipRect begins a rectangular clipping operation. The rectangle is of width -// w and height h. Its upper left corner is positioned at point (x, y). outline -// is true to draw a border with the current draw color and line width centered -// on the rectangle's perimeter. Only the outer half of the border will be -// shown. After calling this method, all rendering operations (for example, -// Image(), LinearGradient(), etc) will be clipped by the specified rectangle. -// Call ClipEnd() to restore unclipped operations. -// -// This ClipText() example demonstrates this method. -func (f *Fpdf) ClipRect(x, y, w, h float64, outline bool) { - f.clipNest++ - // f.outf("q %.2f %.2f %.2f %.2f re W %s", x*f.k, (f.h-y)*f.k, w*f.k, -h*f.k, strIf(outline, "S", "n")) - const prec = 2 - f.put("q ") - f.putF64(x*f.k, prec) - f.put(" ") - f.putF64((f.h-y)*f.k, prec) - f.put(" ") - f.putF64(w*f.k, prec) - f.put(" ") - f.putF64(-h*f.k, prec) - f.put(" re W " + strIf(outline, "S", "n") + "\n") -} - -// ClipText begins a clipping operation in which rendering is confined to the -// character string specified by txtStr. The origin (x, y) is on the left of -// the first character at the baseline. The current font is used. outline is -// true to draw a border with the current draw color and line width centered on -// the perimeters of the text characters. Only the outer half of the border -// will be shown. After calling this method, all rendering operations (for -// example, Image(), LinearGradient(), etc) will be clipped. Call ClipEnd() to -// restore unclipped operations. -func (f *Fpdf) ClipText(x, y float64, txtStr string, outline bool) { - f.clipNest++ - // f.outf("q BT %.5f %.5f Td %d Tr (%s) Tj ET", x*f.k, (f.h-y)*f.k, intIf(outline, 5, 7), f.escape(txtStr)) - const prec = 5 - f.put("q BT ") - f.putF64(x*f.k, prec) - f.put(" ") - f.putF64((f.h-y)*f.k, prec) - f.put(" Td ") - f.putInt(intIf(outline, 5, 7)) - f.put(" Tr (") - f.put(f.escape(txtStr)) - f.put(") Tj ET\n") -} - -func (f *Fpdf) clipArc(x1, y1, x2, y2, x3, y3 float64) { - h := f.h - // f.outf("%.5f %.5f %.5f %.5f %.5f %.5f c ", x1*f.k, (h-y1)*f.k, - // x2*f.k, (h-y2)*f.k, x3*f.k, (h-y3)*f.k) - const prec = 5 - f.putF64(x1*f.k, prec) - f.put(" ") - f.putF64((h-y1)*f.k, prec) - f.put(" ") - f.putF64(x2*f.k, prec) - f.put(" ") - f.putF64((h-y2)*f.k, prec) - f.put(" ") - f.putF64(x3*f.k, prec) - f.put(" ") - f.putF64((h-y3)*f.k, prec) - f.put(" c \n") -} - -// ClipRoundedRect begins a rectangular clipping operation. The rectangle is of -// width w and height h. Its upper left corner is positioned at point (x, y). -// The rounded corners of the rectangle are specified by radius r. outline is -// true to draw a border with the current draw color and line width centered on -// the rectangle's perimeter. Only the outer half of the border will be shown. -// After calling this method, all rendering operations (for example, Image(), -// LinearGradient(), etc) will be clipped by the specified rectangle. Call -// ClipEnd() to restore unclipped operations. -// -// This ClipText() example demonstrates this method. -func (f *Fpdf) ClipRoundedRect(x, y, w, h, r float64, outline bool) { - f.ClipRoundedRectExt(x, y, w, h, r, r, r, r, outline) -} - -// ClipRoundedRectExt behaves the same as ClipRoundedRect() but supports a -// different radius for each corner, given by rTL (top-left), rTR (top-right) -// rBR (bottom-right), rBL (bottom-left). See ClipRoundedRect() for more -// details. This method is demonstrated in the ClipText() example. -func (f *Fpdf) ClipRoundedRectExt(x, y, w, h, rTL, rTR, rBR, rBL float64, outline bool) { - f.clipNest++ - f.roundedRectPath(x, y, w, h, rTL, rTR, rBR, rBL) - f.outf(" W %s", strIf(outline, "S", "n")) -} - -// add a rectangle path with rounded corners. -// routine shared by RoundedRect() and ClipRoundedRect(), which add the -// drawing operation -func (f *Fpdf) roundedRectPath(x, y, w, h, rTL, rTR, rBR, rBL float64) { - k := f.k - hp := f.h - myArc := (4.0 / 3.0) * (math.Sqrt2 - 1.0) - // f.outf("q %.5f %.5f m", (x+rTL)*k, (hp-y)*k) - const prec = 5 - f.put("q ") - f.putF64((x+rTL)*k, prec) - f.put(" ") - f.putF64((hp-y)*k, prec) - f.put(" m\n") - xc := x + w - rTR - yc := y + rTR - // f.outf("%.5f %.5f l", xc*k, (hp-y)*k) - f.putF64(xc*k, prec) - f.put(" ") - f.putF64((hp-y)*k, prec) - f.put(" l\n") - if rTR != 0 { - f.clipArc(xc+rTR*myArc, yc-rTR, xc+rTR, yc-rTR*myArc, xc+rTR, yc) - } - xc = x + w - rBR - yc = y + h - rBR - // f.outf("%.5f %.5f l", (x+w)*k, (hp-yc)*k) - f.putF64((x+w)*k, prec) - f.put(" ") - f.putF64((hp-yc)*k, prec) - f.put(" l\n") - if rBR != 0 { - f.clipArc(xc+rBR, yc+rBR*myArc, xc+rBR*myArc, yc+rBR, xc, yc+rBR) - } - xc = x + rBL - yc = y + h - rBL - // f.outf("%.5f %.5f l", xc*k, (hp-(y+h))*k) - f.putF64(xc*k, prec) - f.put(" ") - f.putF64((hp-(y+h))*k, prec) - f.put(" l\n") - if rBL != 0 { - f.clipArc(xc-rBL*myArc, yc+rBL, xc-rBL, yc+rBL*myArc, xc-rBL, yc) - } - xc = x + rTL - yc = y + rTL - // f.outf("%.5f %.5f l", x*k, (hp-yc)*k) - f.putF64(x*k, prec) - f.put(" ") - f.putF64((hp-yc)*k, prec) - f.put(" l\n") - if rTL != 0 { - f.clipArc(xc-rTL, yc-rTL*myArc, xc-rTL*myArc, yc-rTL, xc, yc-rTL) - } -} - -// ClipEllipse begins an elliptical clipping operation. The ellipse is centered -// at (x, y). Its horizontal and vertical radii are specified by rx and ry. -// outline is true to draw a border with the current draw color and line width -// centered on the ellipse's perimeter. Only the outer half of the border will -// be shown. After calling this method, all rendering operations (for example, -// Image(), LinearGradient(), etc) will be clipped by the specified ellipse. -// Call ClipEnd() to restore unclipped operations. -// -// This ClipText() example demonstrates this method. -func (f *Fpdf) ClipEllipse(x, y, rx, ry float64, outline bool) { - f.clipNest++ - lx := (4.0 / 3.0) * rx * (math.Sqrt2 - 1) - ly := (4.0 / 3.0) * ry * (math.Sqrt2 - 1) - k := f.k - h := f.h - // f.outf("q %.5f %.5f m %.5f %.5f %.5f %.5f %.5f %.5f c", - // (x+rx)*k, (h-y)*k, - // (x+rx)*k, (h-(y-ly))*k, - // (x+lx)*k, (h-(y-ry))*k, - // x*k, (h-(y-ry))*k) - const prec = 5 - f.put("q ") - f.putF64((x+rx)*k, prec) - f.put(" ") - f.putF64((h-y)*k, prec) - f.put(" m ") - f.putF64((x+rx)*k, prec) - f.put(" ") - f.putF64((h-(y-ly))*k, prec) - f.put(" ") - f.putF64((x+lx)*k, prec) - f.put(" ") - f.putF64((h-(y-ry))*k, prec) - f.put(" ") - f.putF64(x*k, prec) - f.put(" ") - f.putF64((h-(y-ry))*k, prec) - f.put(" c\n") - - // f.outf("%.5f %.5f %.5f %.5f %.5f %.5f c", - // (x-lx)*k, (h-(y-ry))*k, - // (x-rx)*k, (h-(y-ly))*k, - // (x-rx)*k, (h-y)*k) - f.putF64((x-lx)*k, prec) - f.put(" ") - f.putF64((h-(y-ry))*k, prec) - f.put(" ") - f.putF64((x-rx)*k, prec) - f.put(" ") - f.putF64((h-(y-ly))*k, prec) - f.put(" ") - f.putF64((x-rx)*k, prec) - f.put(" ") - f.putF64((h-y)*k, prec) - f.put(" c\n") - - // f.outf("%.5f %.5f %.5f %.5f %.5f %.5f c", - // (x-rx)*k, (h-(y+ly))*k, - // (x-lx)*k, (h-(y+ry))*k, - // x*k, (h-(y+ry))*k) - f.putF64((x-rx)*k, prec) - f.put(" ") - f.putF64((h-(y+ly))*k, prec) - f.put(" ") - f.putF64((x-lx)*k, prec) - f.put(" ") - f.putF64((h-(y+ry))*k, prec) - f.put(" ") - f.putF64(x*k, prec) - f.put(" ") - f.putF64((h-(y+ry))*k, prec) - f.put(" c\n") - - // f.outf("%.5f %.5f %.5f %.5f %.5f %.5f c W %s", - // (x+lx)*k, (h-(y+ry))*k, - // (x+rx)*k, (h-(y+ly))*k, - // (x+rx)*k, (h-y)*k, - // strIf(outline, "S", "n")) - f.putF64((x+lx)*k, prec) - f.put(" ") - f.putF64((h-(y+ry))*k, prec) - f.put(" ") - f.putF64((x+rx)*k, prec) - f.put(" ") - f.putF64((h-(y+ly))*k, prec) - f.put(" ") - f.putF64((x+rx)*k, prec) - f.put(" ") - f.putF64((h-y)*k, prec) - f.put(" c W " + strIf(outline, "S", "n") + "\n") -} - -// ClipCircle begins a circular clipping operation. The circle is centered at -// (x, y) and has radius r. outline is true to draw a border with the current -// draw color and line width centered on the circle's perimeter. Only the outer -// half of the border will be shown. After calling this method, all rendering -// operations (for example, Image(), LinearGradient(), etc) will be clipped by -// the specified circle. Call ClipEnd() to restore unclipped operations. -// -// The ClipText() example demonstrates this method. -func (f *Fpdf) ClipCircle(x, y, r float64, outline bool) { - f.ClipEllipse(x, y, r, r, outline) -} - -// ClipPolygon begins a clipping operation within a polygon. The figure is -// defined by a series of vertices specified by points. The x and y fields of -// the points use the units established in New(). The last point in the slice -// will be implicitly joined to the first to close the polygon. outline is true -// to draw a border with the current draw color and line width centered on the -// polygon's perimeter. Only the outer half of the border will be shown. After -// calling this method, all rendering operations (for example, Image(), -// LinearGradient(), etc) will be clipped by the specified polygon. Call -// ClipEnd() to restore unclipped operations. -// -// The ClipText() example demonstrates this method. -func (f *Fpdf) ClipPolygon(points []PointType, outline bool) { - f.clipNest++ - var s fmtBuffer - h := f.h - k := f.k - s.printf("q ") - for j, pt := range points { - s.printf("%.5f %.5f %s ", pt.X*k, (h-pt.Y)*k, strIf(j == 0, "m", "l")) - } - s.printf("h W %s", strIf(outline, "S", "n")) - f.out(s.String()) -} - -// ClipEnd ends a clipping operation that was started with a call to -// ClipRect(), ClipRoundedRect(), ClipText(), ClipEllipse(), ClipCircle() or -// ClipPolygon(). Clipping operations can be nested. The document cannot be -// successfully output while a clipping operation is active. -// -// The ClipText() example demonstrates this method. -func (f *Fpdf) ClipEnd() { - if f.err == nil { - if f.clipNest > 0 { - f.clipNest-- - f.out("Q") - } else { - f.err = fmt.Errorf("error attempting to end clip operation out of sequence") - } - } -} - -// AddFont imports a TrueType, OpenType or Type1 font and makes it available. -// It is necessary to generate a font definition file first with the makefont -// utility. It is not necessary to call this function for the core PDF fonts -// (courier, helvetica, times, zapfdingbats). -// -// The JSON definition file (and the font file itself when embedding) must be -// present in the font directory. If it is not found, the error "Could not -// include font definition file" is set. -// -// family specifies the font family. The name can be chosen arbitrarily. If it -// is a standard family name, it will override the corresponding font. This -// string is used to subsequently set the font with the SetFont method. -// -// style specifies the font style. Acceptable values are (case insensitive) the -// empty string for regular style, "B" for bold, "I" for italic, or "BI" or -// "IB" for bold and italic combined. -// -// fileStr specifies the base name with ".json" extension of the font -// definition file to be added. The file will be loaded from the font directory -// specified in the call to New() or SetFontLocation(). -func (f *Fpdf) AddFont(familyStr, styleStr, fileStr string) { - f.addFont(fontFamilyEscape(familyStr), styleStr, fileStr, false) -} - -// AddUTF8Font imports a TrueType font with utf-8 symbols and makes it available. -// It is necessary to generate a font definition file first with the makefont -// utility. It is not necessary to call this function for the core PDF fonts -// (courier, helvetica, times, zapfdingbats). -// -// The JSON definition file (and the font file itself when embedding) must be -// present in the font directory. If it is not found, the error "Could not -// include font definition file" is set. -// -// family specifies the font family. The name can be chosen arbitrarily. If it -// is a standard family name, it will override the corresponding font. This -// string is used to subsequently set the font with the SetFont method. -// -// style specifies the font style. Acceptable values are (case insensitive) the -// empty string for regular style, "B" for bold, "I" for italic, or "BI" or -// "IB" for bold and italic combined. -// -// fileStr specifies the base name with ".json" extension of the font -// definition file to be added. The file will be loaded from the font directory -// specified in the call to New() or SetFontLocation(). -func (f *Fpdf) AddUTF8Font(familyStr, styleStr, fileStr string) { - f.addFont(fontFamilyEscape(familyStr), styleStr, fileStr, true) -} - -func (f *Fpdf) addFont(familyStr, styleStr, fileStr string, isUTF8 bool) { - if fileStr == "" { - if isUTF8 { - fileStr = strings.Replace(familyStr, " ", "", -1) + strings.ToLower(styleStr) + ".ttf" - } else { - fileStr = strings.Replace(familyStr, " ", "", -1) + strings.ToLower(styleStr) + ".json" - } - } - if isUTF8 { - fontKey := getFontKey(familyStr, styleStr) - _, ok := f.fonts[fontKey] - if ok { - return - } - var ttfStat os.FileInfo - var err error - fileStr = path.Join(f.fontpath, fileStr) - ttfStat, err = os.Stat(fileStr) - if err != nil { - f.SetError(err) - return - } - originalSize := ttfStat.Size() - Type := "UTF8" - var utf8Bytes []byte - utf8Bytes, err = os.ReadFile(fileStr) - if err != nil { - f.SetError(err) - return - } - reader := fileReader{readerPosition: 0, array: utf8Bytes} - utf8File := newUTF8Font(&reader) - err = utf8File.parseFile() - if err != nil { - f.SetError(err) - return - } - - desc := FontDescType{ - Ascent: int(utf8File.Ascent), - Descent: int(utf8File.Descent), - CapHeight: utf8File.CapHeight, - Flags: utf8File.Flags, - FontBBox: utf8File.Bbox, - ItalicAngle: utf8File.ItalicAngle, - StemV: utf8File.StemV, - MissingWidth: round(utf8File.DefaultWidth), - } - - var sbarr map[int]int - if f.aliasNbPagesStr == "" { - sbarr = makeSubsetRange(57) - } else { - sbarr = makeSubsetRange(32) - } - def := fontDefType{ - Tp: Type, - Name: fontKey, - Desc: desc, - Up: int(round(utf8File.UnderlinePosition)), - Ut: round(utf8File.UnderlineThickness), - Cw: utf8File.CharWidths, - usedRunes: sbarr, - File: fileStr, - utf8File: utf8File, - } - def.i, _ = generateFontID(def) - f.fonts[fontKey] = def - f.fontFiles[fontKey] = fontFileType{ - length1: originalSize, - fontType: "UTF8", - } - f.fontFiles[fileStr] = fontFileType{ - fontType: "UTF8", - } - } else { - if f.fontLoader != nil { - reader, err := f.fontLoader.Open(fileStr) - if err == nil { - f.AddFontFromReader(familyStr, styleStr, reader) - if closer, ok := reader.(io.Closer); ok { - closer.Close() - } - return - } - } - - fileStr = path.Join(f.fontpath, fileStr) - file, err := os.Open(fileStr) - if err != nil { - f.err = err - return - } - defer file.Close() - - f.AddFontFromReader(familyStr, styleStr, file) - } -} - -func makeSubsetRange(end int) map[int]int { - answer := make(map[int]int) - for i := 0; i < end; i++ { - answer[i] = 0 - } - return answer -} - -// AddFontFromBytes imports a TrueType, OpenType or Type1 font from static -// bytes within the executable and makes it available for use in the generated -// document. -// -// family specifies the font family. The name can be chosen arbitrarily. If it -// is a standard family name, it will override the corresponding font. This -// string is used to subsequently set the font with the SetFont method. -// -// style specifies the font style. Acceptable values are (case insensitive) the -// empty string for regular style, "B" for bold, "I" for italic, or "BI" or -// "IB" for bold and italic combined. -// -// jsonFileBytes contain all bytes of JSON file. -// -// zFileBytes contain all bytes of Z file. -func (f *Fpdf) AddFontFromBytes(familyStr, styleStr string, jsonFileBytes, zFileBytes []byte) { - f.addFontFromBytes(fontFamilyEscape(familyStr), styleStr, jsonFileBytes, zFileBytes, nil) -} - -// AddUTF8FontFromBytes imports a TrueType font with utf-8 symbols from static -// bytes within the executable and makes it available for use in the generated -// document. -// -// family specifies the font family. The name can be chosen arbitrarily. If it -// is a standard family name, it will override the corresponding font. This -// string is used to subsequently set the font with the SetFont method. -// -// style specifies the font style. Acceptable values are (case insensitive) the -// empty string for regular style, "B" for bold, "I" for italic, or "BI" or -// "IB" for bold and italic combined. -// -// jsonFileBytes contain all bytes of JSON file. -// -// zFileBytes contain all bytes of Z file. -func (f *Fpdf) AddUTF8FontFromBytes(familyStr, styleStr string, utf8Bytes []byte) { - f.addFontFromBytes(fontFamilyEscape(familyStr), styleStr, nil, nil, utf8Bytes) -} - -func (f *Fpdf) addFontFromBytes(familyStr, styleStr string, jsonFileBytes, zFileBytes, utf8Bytes []byte) { - if f.err != nil { - return - } - - // load font key - var ok bool - fontkey := getFontKey(familyStr, styleStr) - _, ok = f.fonts[fontkey] - - if ok { - return - } - - if utf8Bytes != nil { - - // if styleStr == "IB" { - // styleStr = "BI" - // } - - Type := "UTF8" - reader := fileReader{readerPosition: 0, array: utf8Bytes} - - utf8File := newUTF8Font(&reader) - - err := utf8File.parseFile() - if err != nil { - fmt.Printf("get metrics Error: %e\n", err) - return - } - desc := FontDescType{ - Ascent: int(utf8File.Ascent), - Descent: int(utf8File.Descent), - CapHeight: utf8File.CapHeight, - Flags: utf8File.Flags, - FontBBox: utf8File.Bbox, - ItalicAngle: utf8File.ItalicAngle, - StemV: utf8File.StemV, - MissingWidth: round(utf8File.DefaultWidth), - } - - var sbarr map[int]int - if f.aliasNbPagesStr == "" { - sbarr = makeSubsetRange(57) - } else { - sbarr = makeSubsetRange(32) - } - def := fontDefType{ - Tp: Type, - Name: fontkey, - Desc: desc, - Up: int(round(utf8File.UnderlinePosition)), - Ut: round(utf8File.UnderlineThickness), - Cw: utf8File.CharWidths, - utf8File: utf8File, - usedRunes: sbarr, - } - def.i, _ = generateFontID(def) - f.fonts[fontkey] = def - } else { - // load font definitions - var info fontDefType - err := json.Unmarshal(jsonFileBytes, &info) - - if err != nil { - f.err = err - } - - if f.err != nil { - return - } - - if info.i, err = generateFontID(info); err != nil { - f.err = err - return - } - - // search existing encodings - if len(info.Diff) > 0 { - n := -1 - - for j, str := range f.diffs { - if str == info.Diff { - n = j + 1 - break - } - } - - if n < 0 { - f.diffs = append(f.diffs, info.Diff) - n = len(f.diffs) - } - - info.DiffN = n - } - - // embed font - if len(info.File) > 0 { - if info.Tp == "TrueType" { - f.fontFiles[info.File] = fontFileType{ - length1: int64(info.OriginalSize), - embedded: true, - content: zFileBytes, - } - } else { - f.fontFiles[info.File] = fontFileType{ - length1: int64(info.Size1), - length2: int64(info.Size2), - embedded: true, - content: zFileBytes, - } - } - } - - f.fonts[fontkey] = info - } -} - -// getFontKey is used by AddFontFromReader and GetFontDesc -func getFontKey(familyStr, styleStr string) string { - familyStr = strings.ToLower(familyStr) - styleStr = strings.ToUpper(styleStr) - if styleStr == "IB" { - styleStr = "BI" - } - return familyStr + styleStr -} - -// AddFontFromReader imports a TrueType, OpenType or Type1 font and makes it -// available using a reader that satisifies the io.Reader interface. See -// AddFont for details about familyStr and styleStr. -func (f *Fpdf) AddFontFromReader(familyStr, styleStr string, r io.Reader) { - if f.err != nil { - return - } - // dbg("Adding family [%s], style [%s]", familyStr, styleStr) - familyStr = fontFamilyEscape(familyStr) - var ok bool - fontkey := getFontKey(familyStr, styleStr) - _, ok = f.fonts[fontkey] - if ok { - return - } - info := f.loadfont(r) - if f.err != nil { - return - } - if len(info.Diff) > 0 { - // Search existing encodings - n := -1 - for j, str := range f.diffs { - if str == info.Diff { - n = j + 1 - break - } - } - if n < 0 { - f.diffs = append(f.diffs, info.Diff) - n = len(f.diffs) - } - info.DiffN = n - } - // dbg("font [%s], type [%s]", info.File, info.Tp) - if len(info.File) > 0 { - // Embedded font - if info.Tp == "TrueType" { - f.fontFiles[info.File] = fontFileType{length1: int64(info.OriginalSize)} - } else { - f.fontFiles[info.File] = fontFileType{length1: int64(info.Size1), length2: int64(info.Size2)} - } - } - f.fonts[fontkey] = info -} - -// GetFontDesc returns the font descriptor, which can be used for -// example to find the baseline of a font. If familyStr is empty -// current font descriptor will be returned. -// See FontDescType for documentation about the font descriptor. -// See AddFont for details about familyStr and styleStr. -func (f *Fpdf) GetFontDesc(familyStr, styleStr string) FontDescType { - if familyStr == "" { - return f.currentFont.Desc - } - return f.fonts[getFontKey(fontFamilyEscape(familyStr), styleStr)].Desc -} - -// SetFont sets the font used to print character strings. It is mandatory to -// call this method at least once before printing text or the resulting -// document will not be valid. -// -// The font can be either a standard one or a font added via the AddFont() -// method or AddFontFromReader() method. Standard fonts use the Windows -// encoding cp1252 (Western Europe). -// -// The method can be called before the first page is created and the font is -// kept from page to page. If you just wish to change the current font size, it -// is simpler to call SetFontSize(). -// -// Note: the font definition file must be accessible. An error is set if the -// file cannot be read. -// -// familyStr specifies the font family. It can be either a name defined by -// AddFont(), AddFontFromReader() or one of the standard families (case -// insensitive): "Courier" for fixed-width, "Helvetica" or "Arial" for sans -// serif, "Times" for serif, "Symbol" or "ZapfDingbats" for symbolic. -// -// styleStr can be "B" (bold), "I" (italic), "U" (underscore), "S" (strike-out) -// or any combination. The default value (specified with an empty string) is -// regular. Bold and italic styles do not apply to Symbol and ZapfDingbats. -// -// size is the font size measured in points. The default value is the current -// size. If no size has been specified since the beginning of the document, the -// value taken is 12. -func (f *Fpdf) SetFont(familyStr, styleStr string, size float64) { - // dbg("SetFont x %.2f, lMargin %.2f", f.x, f.lMargin) - - if f.err != nil { - return - } - // dbg("SetFont") - familyStr = fontFamilyEscape(familyStr) - var ok bool - if familyStr == "" { - familyStr = f.fontFamily - } else { - familyStr = strings.ToLower(familyStr) - } - styleStr = strings.ToUpper(styleStr) - f.underline = strings.Contains(styleStr, "U") - if f.underline { - styleStr = strings.Replace(styleStr, "U", "", -1) - } - f.strikeout = strings.Contains(styleStr, "S") - if f.strikeout { - styleStr = strings.Replace(styleStr, "S", "", -1) - } - if styleStr == "IB" { - styleStr = "BI" - } - if size == 0.0 { - size = f.fontSizePt - } - - // Test if font is already loaded - fontKey := familyStr + styleStr - _, ok = f.fonts[fontKey] - if !ok { - // Test if one of the core fonts - if familyStr == "arial" { - familyStr = "helvetica" - } - _, ok = f.coreFonts[familyStr] - if ok { - if familyStr == "symbol" { - familyStr = "zapfdingbats" - } - if familyStr == "zapfdingbats" { - styleStr = "" - } - fontKey = familyStr + styleStr - _, ok = f.fonts[fontKey] - if !ok { - rdr := f.coreFontReader(familyStr, styleStr) - if f.err == nil { - defer rdr.Close() - f.AddFontFromReader(familyStr, styleStr, rdr) - } - if f.err != nil { - return - } - } - } else { - f.err = fmt.Errorf("undefined font: %s %s", familyStr, styleStr) - return - } - } - // Select it - f.fontFamily = familyStr - f.fontStyle = styleStr - f.fontSizePt = size - f.fontSize = size / f.k - f.currentFont = f.fonts[fontKey] - if f.currentFont.Tp == "UTF8" { - f.isCurrentUTF8 = true - } else { - f.isCurrentUTF8 = false - } - if f.page > 0 { - f.outf("BT /F%s %.2f Tf ET", f.currentFont.i, f.fontSizePt) - } -} - -// SetFontStyle sets the style of the current font. See also SetFont() -func (f *Fpdf) SetFontStyle(styleStr string) { - f.SetFont(f.fontFamily, styleStr, f.fontSizePt) -} - -// SetFontSize defines the size of the current font. Size is specified in -// points (1/ 72 inch). See also SetFontUnitSize(). -func (f *Fpdf) SetFontSize(size float64) { - f.fontSizePt = size - f.fontSize = size / f.k - if f.page > 0 { - f.outf("BT /F%s %.2f Tf ET", f.currentFont.i, f.fontSizePt) - } -} - -// SetFontUnitSize defines the size of the current font. Size is specified in -// the unit of measure specified in New(). See also SetFontSize(). -func (f *Fpdf) SetFontUnitSize(size float64) { - f.fontSizePt = size * f.k - f.fontSize = size - if f.page > 0 { - f.outf("BT /F%s %.2f Tf ET", f.currentFont.i, f.fontSizePt) - } -} - -// GetFontSize returns the size of the current font in points followed by the -// size in the unit of measure specified in New(). The second value can be used -// as a line height value in drawing operations. -func (f *Fpdf) GetFontSize() (ptSize, unitSize float64) { - return f.fontSizePt, f.fontSize -} - -// AddLink creates a new internal link and returns its identifier. An internal -// link is a clickable area which directs to another place within the document. -// The identifier can then be passed to Cell(), Write(), Image() or Link(). The -// destination is defined with SetLink(). -func (f *Fpdf) AddLink() int { - f.links = append(f.links, intLinkType{}) - return len(f.links) - 1 -} - -// SetLink defines the page and position a link points to. See AddLink(). -func (f *Fpdf) SetLink(link int, y float64, page int) { - if y == -1 { - y = f.y - } - if page == -1 { - page = f.page - } - f.links[link] = intLinkType{page, y} -} - -// newLink adds a new clickable link on current page -func (f *Fpdf) newLink(x, y, w, h float64, link int, linkStr string) { - // linkList, ok := f.pageLinks[f.page] - // if !ok { - // linkList = make([]linkType, 0, 8) - // f.pageLinks[f.page] = linkList - // } - f.pageLinks[f.page] = append(f.pageLinks[f.page], - linkType{x * f.k, f.hPt - y*f.k, w * f.k, h * f.k, link, linkStr}) -} - -// Link puts a link on a rectangular area of the page. Text or image links are -// generally put via Cell(), Write() or Image(), but this method can be useful -// for instance to define a clickable area inside an image. link is the value -// returned by AddLink(). -func (f *Fpdf) Link(x, y, w, h float64, link int) { - f.newLink(x, y, w, h, link, "") -} - -// LinkString puts a link on a rectangular area of the page. Text or image -// links are generally put via Cell(), Write() or Image(), but this method can -// be useful for instance to define a clickable area inside an image. linkStr -// is the target URL. -func (f *Fpdf) LinkString(x, y, w, h float64, linkStr string) { - f.newLink(x, y, w, h, 0, linkStr) -} - -// Bookmark sets a bookmark that will be displayed in a sidebar outline. txtStr -// is the title of the bookmark. level specifies the level of the bookmark in -// the outline; 0 is the top level, 1 is just below, and so on. y specifies the -// vertical position of the bookmark destination in the current page; -1 -// indicates the current position. -func (f *Fpdf) Bookmark(txtStr string, level int, y float64) { - if y == -1 { - y = f.y - } - if f.isCurrentUTF8 { - txtStr = utf8toutf16(txtStr) - } - f.outlines = append(f.outlines, outlineType{text: txtStr, level: level, y: y, p: f.PageNo(), prev: -1, last: -1, next: -1, first: -1}) -} - -// Text prints a character string. The origin (x, y) is on the left of the -// first character at the baseline. This method permits a string to be placed -// precisely on the page, but it is usually easier to use Cell(), MultiCell() -// or Write() which are the standard methods to print text. -func (f *Fpdf) Text(x, y float64, txtStr string) { - var txt2 string - if f.isCurrentUTF8 { - if f.isRTL { - txtStr = reverseText(txtStr) - x -= f.GetStringWidth(txtStr) - } - txt2 = f.escape(utf8toutf16(txtStr, false)) - for _, uni := range txtStr { - f.currentFont.usedRunes[int(uni)] = int(uni) - } - } else { - txt2 = f.escape(txtStr) - } - s := sprintf("BT %.2f %.2f Td (%s) Tj ET", x*f.k, (f.h-y)*f.k, txt2) - if f.underline && txtStr != "" { - s += " " + f.dounderline(x, y, txtStr) - } - if f.strikeout && txtStr != "" { - s += " " + f.dostrikeout(x, y, txtStr) - } - if f.colorFlag { - s = sprintf("q %s %s Q", f.color.text.str, s) - } - f.out(s) -} - -// SetWordSpacing sets spacing between words of following text. See the -// WriteAligned() example for a demonstration of its use. -func (f *Fpdf) SetWordSpacing(space float64) { - f.out(sprintf("%.5f Tw", space*f.k)) -} - -// SetTextRenderingMode sets the rendering mode of following text. -// The mode can be as follows: -// 0: Fill text -// 1: Stroke text -// 2: Fill, then stroke text -// 3: Neither fill nor stroke text (invisible) -// 4: Fill text and add to path for clipping -// 5: Stroke text and add to path for clipping -// 6: Fills then stroke text and add to path for clipping -// 7: Add text to path for clipping -// This method is demonstrated in the SetTextRenderingMode example. -func (f *Fpdf) SetTextRenderingMode(mode int) { - if mode >= 0 && mode <= 7 { - f.out(sprintf("%d Tr", mode)) - } -} - -// SetAcceptPageBreakFunc allows the application to control where page breaks -// occur. -// -// fnc is an application function (typically a closure) that is called by the -// library whenever a page break condition is met. The break is issued if true -// is returned. The default implementation returns a value according to the -// mode selected by SetAutoPageBreak. The function provided should not be -// called by the application. -// -// See the example for SetLeftMargin() to see how this function can be used to -// manage multiple columns. -func (f *Fpdf) SetAcceptPageBreakFunc(fnc func() bool) { - f.acceptPageBreak = fnc -} - -// CellFormat prints a rectangular cell with optional borders, background color -// and character string. The upper-left corner of the cell corresponds to the -// current position. The text can be aligned or centered. After the call, the -// current position moves to the right or to the next line. It is possible to -// put a link on the text. -// -// An error will be returned if a call to SetFont() has not already taken -// place before this method is called. -// -// If automatic page breaking is enabled and the cell goes beyond the limit, a -// page break is done before outputting. -// -// w and h specify the width and height of the cell. If w is 0, the cell -// extends up to the right margin. Specifying 0 for h will result in no output, -// but the current position will be advanced by w. -// -// txtStr specifies the text to display. -// -// borderStr specifies how the cell border will be drawn. An empty string -// indicates no border, "1" indicates a full border, and one or more of "L", -// "T", "R" and "B" indicate the left, top, right and bottom sides of the -// border. -// -// ln indicates where the current position should go after the call. Possible -// values are 0 (to the right), 1 (to the beginning of the next line), and 2 -// (below). Putting 1 is equivalent to putting 0 and calling Ln() just after. -// -// alignStr specifies how the text is to be positioned within the cell. -// Horizontal alignment is controlled by including "L", "C" or "R" (left, -// center, right) in alignStr. Vertical alignment is controlled by including -// "T", "M", "B" or "A" (top, middle, bottom, baseline) in alignStr. The default -// alignment is left middle. -// -// fill is true to paint the cell background or false to leave it transparent. -// -// link is the identifier returned by AddLink() or 0 for no internal link. -// -// linkStr is a target URL or empty for no external link. A non--zero value for -// link takes precedence over linkStr. -func (f *Fpdf) CellFormat(w, h float64, txtStr, borderStr string, ln int, - alignStr string, fill bool, link int, linkStr string) { - // dbg("CellFormat. h = %.2f, borderStr = %s", h, borderStr) - if f.err != nil { - return - } - - if f.currentFont.Name == "" { - f.err = fmt.Errorf("font has not been set; unable to render text") - return - } - - borderStr = strings.ToUpper(borderStr) - k := f.k - if f.y+h > f.pageBreakTrigger && !f.inHeader && !f.inFooter && f.acceptPageBreak() { - // Automatic page break - x := f.x - ws := f.ws - // dbg("auto page break, x %.2f, ws %.2f", x, ws) - if ws > 0 { - f.ws = 0 - f.out("0 Tw") - } - f.AddPageFormat(f.curOrientation, f.curPageSize) - if f.err != nil { - return - } - f.x = x - if ws > 0 { - f.ws = ws - // f.outf("%.3f Tw", ws*k) - f.putF64(ws*k, 3) - f.put(" Tw\n") - } - } - if w == 0 { - w = f.w - f.rMargin - f.x - } - var s fmtBuffer - if h > 0 && (fill || borderStr == "1") { - var op string - if fill { - if borderStr == "1" { - op = "B" - // dbg("border is '1', fill") - } else { - op = "f" - // dbg("border is empty, fill") - } - } else { - // dbg("border is '1', no fill") - op = "S" - } - /// dbg("(CellFormat) f.x %.2f f.k %.2f", f.x, f.k) - s.printf("%.2f %.2f %.2f %.2f re %s ", f.x*k, (f.h-f.y)*k, w*k, -h*k, op) - } - if len(borderStr) > 0 && borderStr != "1" { - // fmt.Printf("border is '%s', no fill\n", borderStr) - x := f.x - y := f.y - left := x * k - top := (f.h - y) * k - right := (x + w) * k - bottom := (f.h - (y + h)) * k - if strings.Contains(borderStr, "L") { - s.printf("%.2f %.2f m %.2f %.2f l S ", left, top, left, bottom) - } - if strings.Contains(borderStr, "T") { - s.printf("%.2f %.2f m %.2f %.2f l S ", left, top, right, top) - } - if strings.Contains(borderStr, "R") { - s.printf("%.2f %.2f m %.2f %.2f l S ", right, top, right, bottom) - } - if strings.Contains(borderStr, "B") { - s.printf("%.2f %.2f m %.2f %.2f l S ", left, bottom, right, bottom) - } - } - if len(txtStr) > 0 { - var dx, dy float64 - // Horizontal alignment - switch { - case strings.Contains(alignStr, "R"): - dx = w - f.cMargin - f.GetStringWidth(txtStr) - case strings.Contains(alignStr, "C"): - dx = (w - f.GetStringWidth(txtStr)) / 2 - default: - dx = f.cMargin - } - - // Vertical alignment - switch { - case strings.Contains(alignStr, "T"): - dy = (f.fontSize - h) / 2.0 - case strings.Contains(alignStr, "B"): - dy = (h - f.fontSize) / 2.0 - case strings.Contains(alignStr, "A"): - var descent float64 - d := f.currentFont.Desc - if d.Descent == 0 { - // not defined (standard font?), use average of 19% - descent = -0.19 * f.fontSize - } else { - descent = float64(d.Descent) * f.fontSize / float64(d.Ascent-d.Descent) - } - dy = (h-f.fontSize)/2.0 - descent - default: - dy = 0 - } - if f.colorFlag { - s.printf("q %s ", f.color.text.str) - } - //If multibyte, Tw has no effect - do word spacing using an adjustment before each space - if (f.ws != 0 || alignStr == "J") && f.isCurrentUTF8 { // && f.ws != 0 - if f.isRTL { - txtStr = reverseText(txtStr) - } - wmax := int(math.Ceil((w - 2*f.cMargin) * 1000 / f.fontSize)) - for _, uni := range txtStr { - f.currentFont.usedRunes[int(uni)] = int(uni) - } - space := f.escape(utf8toutf16(" ", false)) - strSize := f.GetStringSymbolWidth(txtStr) - s.printf("BT 0 Tw %.2f %.2f Td [", (f.x+dx)*k, (f.h-(f.y+.5*h+.3*f.fontSize))*k) - t := strings.Split(txtStr, " ") - shift := float64((wmax - strSize)) / float64(len(t)-1) - numt := len(t) - for i := 0; i < numt; i++ { - tx := t[i] - tx = "(" + f.escape(utf8toutf16(tx, false)) + ")" - s.printf("%s ", tx) - if (i + 1) < numt { - s.printf("%.3f(%s) ", -shift, space) - } - } - s.printf("] TJ ET") - } else { - var txt2 string - if f.isCurrentUTF8 { - if f.isRTL { - txtStr = reverseText(txtStr) - } - txt2 = f.escape(utf8toutf16(txtStr, false)) - for _, uni := range txtStr { - f.currentFont.usedRunes[int(uni)] = int(uni) - } - } else { - - txt2 = strings.Replace(txtStr, "\\", "\\\\", -1) - txt2 = strings.Replace(txt2, "(", "\\(", -1) - txt2 = strings.Replace(txt2, ")", "\\)", -1) - } - bt := (f.x + dx) * k - td := (f.h - (f.y + dy + .5*h + .3*f.fontSize)) * k - s.printf("BT %.2f %.2f Td (%s)Tj ET", bt, td, txt2) - //BT %.2F %.2F Td (%s) Tj ET',(f.x+dx)*k,(f.h-(f.y+.5*h+.3*f.FontSize))*k,txt2); - } - - if f.underline { - s.printf(" %s", f.dounderline(f.x+dx, f.y+dy+.5*h+.3*f.fontSize, txtStr)) - } - if f.strikeout { - s.printf(" %s", f.dostrikeout(f.x+dx, f.y+dy+.5*h+.3*f.fontSize, txtStr)) - } - if f.colorFlag { - s.printf(" Q") - } - if link > 0 || len(linkStr) > 0 { - f.newLink(f.x+dx, f.y+dy+.5*h-.5*f.fontSize, f.GetStringWidth(txtStr), f.fontSize, link, linkStr) - } - } - str := s.String() - if len(str) > 0 { - f.out(str) - } - f.lasth = h - if ln > 0 { - // Go to next line - f.y += h - if ln == 1 { - f.x = f.lMargin - } - } else { - f.x += w - } -} - -// Revert string to use in RTL languages -func reverseText(text string) string { - oldText := []rune(text) - newText := make([]rune, len(oldText)) - length := len(oldText) - 1 - for i, r := range oldText { - newText[length-i] = r - } - return string(newText) -} - -// Cell is a simpler version of CellFormat with no fill, border, links or -// special alignment. The Cell_strikeout() example demonstrates this method. -func (f *Fpdf) Cell(w, h float64, txtStr string) { - f.CellFormat(w, h, txtStr, "", 0, "L", false, 0, "") -} - -// Cellf is a simpler printf-style version of CellFormat with no fill, border, -// links or special alignment. See documentation for the fmt package for -// details on fmtStr and args. -func (f *Fpdf) Cellf(w, h float64, fmtStr string, args ...interface{}) { - f.CellFormat(w, h, sprintf(fmtStr, args...), "", 0, "L", false, 0, "") -} - -// SplitLines splits text into several lines using the current font. Each line -// has its length limited to a maximum width given by w. This function can be -// used to determine the total height of wrapped text for vertical placement -// purposes. -// -// This method is useful for codepage-based fonts only. For UTF-8 encoded text, -// use SplitText(). -// -// You can use MultiCell if you want to print a text on several lines in a -// simple way. -func (f *Fpdf) SplitLines(txt []byte, w float64) [][]byte { - // Function contributed by Bruno Michel - lines := [][]byte{} - cw := f.currentFont.Cw - wmax := int(math.Ceil((w - 2*f.cMargin) * 1000 / f.fontSize)) - s := bytes.Replace(txt, []byte("\r"), []byte{}, -1) - nb := len(s) - for nb > 0 && s[nb-1] == '\n' { - nb-- - } - s = s[0:nb] - sep := -1 - i := 0 - j := 0 - l := 0 - for i < nb { - c := s[i] - l += cw[c] - if c == ' ' || c == '\t' || c == '\n' { - sep = i - } - if c == '\n' || l > wmax { - if sep == -1 { - if i == j { - i++ - } - sep = i - } else { - i = sep + 1 - } - lines = append(lines, s[j:sep]) - sep = -1 - j = i - l = 0 - } else { - i++ - } - } - if i != j { - lines = append(lines, s[j:i]) - } - return lines -} - -// MultiCell supports printing text with line breaks. They can be automatic (as -// soon as the text reaches the right border of the cell) or explicit (via the -// \n character). As many cells as necessary are output, one below the other. -// -// Text can be aligned, centered or justified. The cell block can be framed and -// the background painted. See CellFormat() for more details. -// -// The current position after calling MultiCell() is the beginning of the next -// line, equivalent to calling CellFormat with ln equal to 1. -// -// w is the width of the cells. A value of zero indicates cells that reach to -// the right margin. -// -// h indicates the line height of each cell in the unit of measure specified in New(). -// -// Note: this method has a known bug that treats UTF-8 fonts differently than -// non-UTF-8 fonts. With UTF-8 fonts, all trailing newlines in txtStr are -// removed. With a non-UTF-8 font, if txtStr has one or more trailing newlines, -// only the last is removed. In the next major module version, the UTF-8 logic -// will be changed to match the non-UTF-8 logic. To prepare for that change, -// applications that use UTF-8 fonts and depend on having all trailing newlines -// removed should call strings.TrimRight(txtStr, "\r\n") before calling this -// method. -func (f *Fpdf) MultiCell(w, h float64, txtStr, borderStr, alignStr string, fill bool) { - if f.err != nil { - return - } - // dbg("MultiCell") - if alignStr == "" { - alignStr = "J" - } - cw := f.currentFont.Cw - if w == 0 { - w = f.w - f.rMargin - f.x - } - wmax := int(math.Ceil((w - 2*f.cMargin) * 1000 / f.fontSize)) - s := strings.Replace(txtStr, "\r", "", -1) - srune := []rune(s) - - // remove extra line breaks - var nb int - if f.isCurrentUTF8 { - nb = len(srune) - for nb > 0 && srune[nb-1] == '\n' { - nb-- - } - srune = srune[0:nb] - } else { - nb = len(s) - bytes2 := []byte(s) - - // for nb > 0 && bytes2[nb-1] == '\n' { - - // Prior to August 2019, if s ended with a newline, this code stripped it. - // After that date, to be compatible with the UTF-8 code above, *all* - // trailing newlines were removed. Because this regression caused at least - // one application to break (see issue #333), the original behavior has been - // reinstated with a caveat included in the documentation. - if nb > 0 && bytes2[nb-1] == '\n' { - nb-- - } - s = s[0:nb] - } - // dbg("[%s]\n", s) - var b, b2 string - b = "0" - if len(borderStr) > 0 { - if borderStr == "1" { - borderStr = "LTRB" - b = "LRT" - b2 = "LR" - } else { - b2 = "" - if strings.Contains(borderStr, "L") { - b2 += "L" - } - if strings.Contains(borderStr, "R") { - b2 += "R" - } - if strings.Contains(borderStr, "T") { - b = b2 + "T" - } else { - b = b2 - } - } - } - sep := -1 - i := 0 - j := 0 - l := 0 - ls := 0 - ns := 0 - nl := 1 - for i < nb { - // Get next character - var c rune - if f.isCurrentUTF8 { - c = srune[i] - } else { - c = rune(s[i]) - } - if c == '\n' { - // Explicit line break - if f.ws > 0 { - f.ws = 0 - f.out("0 Tw") - } - - if f.isCurrentUTF8 { - newAlignStr := alignStr - if newAlignStr == "J" { - if f.isRTL { - newAlignStr = "R" - } else { - newAlignStr = "L" - } - } - f.CellFormat(w, h, string(srune[j:i]), b, 2, newAlignStr, fill, 0, "") - } else { - f.CellFormat(w, h, s[j:i], b, 2, alignStr, fill, 0, "") - } - i++ - sep = -1 - j = i - l = 0 - ns = 0 - nl++ - if len(borderStr) > 0 && nl == 2 { - b = b2 - } - continue - } - if c == ' ' || isChinese(c) { - sep = i - ls = l - ns++ - } - if int(c) >= len(cw) { - f.err = fmt.Errorf("character outside the supported range: %s", string(c)) - return - } - if cw[int(c)] == 0 { //Marker width 0 used for missing symbols - l += f.currentFont.Desc.MissingWidth - } else if cw[int(c)] != 65535 { //Marker width 65535 used for zero width symbols - l += cw[int(c)] - } - if l > wmax { - // Automatic line break - if sep == -1 { - if i == j { - i++ - } - if f.ws > 0 { - f.ws = 0 - f.out("0 Tw") - } - if f.isCurrentUTF8 { - f.CellFormat(w, h, string(srune[j:i]), b, 2, alignStr, fill, 0, "") - } else { - f.CellFormat(w, h, s[j:i], b, 2, alignStr, fill, 0, "") - } - } else { - if alignStr == "J" { - if ns > 1 { - f.ws = float64((wmax-ls)/1000) * f.fontSize / float64(ns-1) - } else { - f.ws = 0 - } - // f.outf("%.3f Tw", f.ws*f.k) - f.putF64(f.ws*f.k, 3) - f.put(" Tw\n") - } - if f.isCurrentUTF8 { - f.CellFormat(w, h, string(srune[j:sep]), b, 2, alignStr, fill, 0, "") - } else { - f.CellFormat(w, h, s[j:sep], b, 2, alignStr, fill, 0, "") - } - i = sep + 1 - } - sep = -1 - j = i - l = 0 - ns = 0 - nl++ - if len(borderStr) > 0 && nl == 2 { - b = b2 - } - } else { - i++ - } - } - // Last chunk - if f.ws > 0 { - f.ws = 0 - f.out("0 Tw") - } - if len(borderStr) > 0 && strings.Contains(borderStr, "B") { - b += "B" - } - if f.isCurrentUTF8 { - if alignStr == "J" { - if f.isRTL { - alignStr = "R" - } else { - alignStr = "" - } - } - f.CellFormat(w, h, string(srune[j:i]), b, 2, alignStr, fill, 0, "") - } else { - f.CellFormat(w, h, s[j:i], b, 2, alignStr, fill, 0, "") - } - f.x = f.lMargin -} - -// write outputs text in flowing mode -func (f *Fpdf) write(h float64, txtStr string, link int, linkStr string) { - // dbg("Write") - cw := f.currentFont.Cw - w := f.w - f.rMargin - f.x - wmax := (w - 2*f.cMargin) * 1000 / f.fontSize - s := strings.Replace(txtStr, "\r", "", -1) - var nb int - if f.isCurrentUTF8 { - nb = len([]rune(s)) - if nb == 1 && s == " " { - f.x += f.GetStringWidth(s) - return - } - } else { - nb = len(s) - } - sep := -1 - i := 0 - j := 0 - l := 0.0 - nl := 1 - for i < nb { - // Get next character - var c rune - if f.isCurrentUTF8 { - c = []rune(s)[i] - } else { - c = rune(byte(s[i])) - } - if c == '\n' { - // Explicit line break - if f.isCurrentUTF8 { - f.CellFormat(w, h, string([]rune(s)[j:i]), "", 2, "", false, link, linkStr) - } else { - f.CellFormat(w, h, s[j:i], "", 2, "", false, link, linkStr) - } - i++ - sep = -1 - j = i - l = 0.0 - if nl == 1 { - f.x = f.lMargin - w = f.w - f.rMargin - f.x - wmax = (w - 2*f.cMargin) * 1000 / f.fontSize - } - nl++ - continue - } - if c == ' ' { - sep = i - } - l += float64(cw[int(c)]) - if l > wmax { - // Automatic line break - if sep == -1 { - if f.x > f.lMargin { - // Move to next line - f.x = f.lMargin - f.y += h - w = f.w - f.rMargin - f.x - wmax = (w - 2*f.cMargin) * 1000 / f.fontSize - i++ - nl++ - continue - } - if i == j { - i++ - } - if f.isCurrentUTF8 { - f.CellFormat(w, h, string([]rune(s)[j:i]), "", 2, "", false, link, linkStr) - } else { - f.CellFormat(w, h, s[j:i], "", 2, "", false, link, linkStr) - } - } else { - if f.isCurrentUTF8 { - f.CellFormat(w, h, string([]rune(s)[j:sep]), "", 2, "", false, link, linkStr) - } else { - f.CellFormat(w, h, s[j:sep], "", 2, "", false, link, linkStr) - } - i = sep + 1 - } - sep = -1 - j = i - l = 0.0 - if nl == 1 { - f.x = f.lMargin - w = f.w - f.rMargin - f.x - wmax = (w - 2*f.cMargin) * 1000 / f.fontSize - } - nl++ - } else { - i++ - } - } - // Last chunk - if i != j { - if f.isCurrentUTF8 { - f.CellFormat(l/1000*f.fontSize, h, string([]rune(s)[j:]), "", 0, "", false, link, linkStr) - } else { - f.CellFormat(l/1000*f.fontSize, h, s[j:], "", 0, "", false, link, linkStr) - } - } -} - -// Write prints text from the current position. When the right margin is -// reached (or the \n character is met) a line break occurs and text continues -// from the left margin. Upon method exit, the current position is left just at -// the end of the text. -// -// It is possible to put a link on the text. -// -// h indicates the line height in the unit of measure specified in New(). -func (f *Fpdf) Write(h float64, txtStr string) { - f.write(h, txtStr, 0, "") -} - -// Writef is like Write but uses printf-style formatting. See the documentation -// for package fmt for more details on fmtStr and args. -func (f *Fpdf) Writef(h float64, fmtStr string, args ...interface{}) { - f.write(h, sprintf(fmtStr, args...), 0, "") -} - -// WriteLinkString writes text that when clicked launches an external URL. See -// Write() for argument details. -func (f *Fpdf) WriteLinkString(h float64, displayStr, targetStr string) { - f.write(h, displayStr, 0, targetStr) -} - -// WriteLinkID writes text that when clicked jumps to another location in the -// PDF. linkID is an identifier returned by AddLink(). See Write() for argument -// details. -func (f *Fpdf) WriteLinkID(h float64, displayStr string, linkID int) { - f.write(h, displayStr, linkID, "") -} - -// WriteAligned is an implementation of Write that makes it possible to align -// text. -// -// width indicates the width of the box the text will be drawn in. This is in -// the unit of measure specified in New(). If it is set to 0, the bounding box -// of the page will be taken (pageWidth - leftMargin - rightMargin). -// -// lineHeight indicates the line height in the unit of measure specified in -// New(). -// -// alignStr sees to horizontal alignment of the given textStr. The options are -// "L", "C" and "R" (Left, Center, Right). The default is "L". -func (f *Fpdf) WriteAligned(width, lineHeight float64, textStr, alignStr string) { - lMargin, _, rMargin, _ := f.GetMargins() - - pageWidth, _ := f.GetPageSize() - if width == 0 { - width = pageWidth - (lMargin + rMargin) - } - - var lines []string - - if f.isCurrentUTF8 { - lines = f.SplitText(textStr, width) - } else { - for _, line := range f.SplitLines([]byte(textStr), width) { - lines = append(lines, string(line)) - } - } - - for _, lineBt := range lines { - lineStr := string(lineBt) - lineWidth := f.GetStringWidth(lineStr) - - switch alignStr { - case "C": - f.SetLeftMargin(lMargin + ((width - lineWidth) / 2)) - f.Write(lineHeight, lineStr) - f.SetLeftMargin(lMargin) - case "R": - f.SetLeftMargin(lMargin + (width - lineWidth) - 2.01*f.cMargin) - f.Write(lineHeight, lineStr) - f.SetLeftMargin(lMargin) - default: - f.SetRightMargin(pageWidth - lMargin - width) - f.Write(lineHeight, lineStr) - f.SetRightMargin(rMargin) - } - } -} - -// Ln performs a line break. The current abscissa goes back to the left margin -// and the ordinate increases by the amount passed in parameter. A negative -// value of h indicates the height of the last printed cell. -// -// This method is demonstrated in the example for MultiCell. -func (f *Fpdf) Ln(h float64) { - f.x = f.lMargin - if h < 0 { - f.y += f.lasth - } else { - f.y += h - } -} - -// ImageTypeFromMime returns the image type used in various image-related -// functions (for example, Image()) that is associated with the specified MIME -// type. For example, "jpg" is returned if mimeStr is "image/jpeg". An error is -// set if the specified MIME type is not supported. -func (f *Fpdf) ImageTypeFromMime(mimeStr string) (tp string) { - switch mimeStr { - case "image/png": - tp = "png" - case "image/jpg": - tp = "jpg" - case "image/jpeg": - tp = "jpg" - case "image/gif": - tp = "gif" - default: - f.SetErrorf("unsupported image type: %s", mimeStr) - } - return -} - -func (f *Fpdf) imageOut(info *ImageInfoType, x, y, w, h float64, allowNegativeX, flow bool, link int, linkStr string) { - // Automatic width and height calculation if needed - if w == 0 && h == 0 { - // Put image at 96 dpi - w = -96 - h = -96 - } - if w == -1 { - // Set image width to whatever value for dpi we read - // from the image or that was set manually - w = -info.dpi - } - if h == -1 { - // Set image height to whatever value for dpi we read - // from the image or that was set manually - h = -info.dpi - } - if w < 0 { - w = -info.w * 72.0 / w / f.k - } - if h < 0 { - h = -info.h * 72.0 / h / f.k - } - if w == 0 { - w = h * info.w / info.h - } - if h == 0 { - h = w * info.h / info.w - } - // Flowing mode - if flow { - if f.y+h > f.pageBreakTrigger && !f.inHeader && !f.inFooter && f.acceptPageBreak() { - // Automatic page break - x2 := f.x - f.AddPageFormat(f.curOrientation, f.curPageSize) - if f.err != nil { - return - } - f.x = x2 - } - y = f.y - f.y += h - } - if !allowNegativeX { - if x < 0 { - x = f.x - } - } - // dbg("h %.2f", h) - // q 85.04 0 0 NaN 28.35 NaN cm /I2 Do Q - // f.outf("q %.5f 0 0 %.5f %.5f %.5f cm /I%s Do Q", w*f.k, h*f.k, x*f.k, (f.h-(y+h))*f.k, info.i) - const prec = 5 - f.put("q ") - f.putF64(w*f.k, prec) - f.put(" 0 0 ") - f.putF64(h*f.k, prec) - f.put(" ") - f.putF64(x*f.k, prec) - f.put(" ") - f.putF64((f.h-(y+h))*f.k, prec) - f.put(" cm /I" + info.i + " Do Q\n") - if link > 0 || len(linkStr) > 0 { - f.newLink(x, y, w, h, link, linkStr) - } -} - -// Image puts a JPEG, PNG or GIF image in the current page. -// -// Deprecated in favor of ImageOptions -- see that function for -// details on the behavior of arguments -func (f *Fpdf) Image(imageNameStr string, x, y, w, h float64, flow bool, tp string, link int, linkStr string) { - options := ImageOptions{ - ReadDpi: false, - ImageType: tp, - } - f.ImageOptions(imageNameStr, x, y, w, h, flow, options, link, linkStr) -} - -// ImageOptions puts a JPEG, PNG or GIF image in the current page. The size it -// will take on the page can be specified in different ways. If both w and h -// are 0, the image is rendered at 96 dpi. If either w or h is zero, it will be -// calculated from the other dimension so that the aspect ratio is maintained. -// If w and/or h are -1, the dpi for that dimension will be read from the -// ImageInfoType object. PNG files can contain dpi information, and if present, -// this information will be populated in the ImageInfoType object and used in -// Width, Height, and Extent calculations. Otherwise, the SetDpi function can -// be used to change the dpi from the default of 72. -// -// If w and h are any other negative value, their absolute values -// indicate their dpi extents. -// -// Supported JPEG formats are 24 bit, 32 bit and gray scale. Supported PNG -// formats are 24 bit, indexed color, and 8 bit indexed gray scale. If a GIF -// image is animated, only the first frame is rendered. Transparency is -// supported. It is possible to put a link on the image. -// -// imageNameStr may be the name of an image as registered with a call to either -// RegisterImageReader() or RegisterImage(). In the first case, the image is -// loaded using an io.Reader. This is generally useful when the image is -// obtained from some other means than as a disk-based file. In the second -// case, the image is loaded as a file. Alternatively, imageNameStr may -// directly specify a sufficiently qualified filename. -// -// However the image is loaded, if it is used more than once only one copy is -// embedded in the file. -// -// If x is negative, the current abscissa is used. -// -// If flow is true, the current y value is advanced after placing the image and -// a page break may be made if necessary. -// -// If link refers to an internal page anchor (that is, it is non-zero; see -// AddLink()), the image will be a clickable internal link. Otherwise, if -// linkStr specifies a URL, the image will be a clickable external link. -func (f *Fpdf) ImageOptions(imageNameStr string, x, y, w, h float64, flow bool, options ImageOptions, link int, linkStr string) { - if f.err != nil { - return - } - info := f.RegisterImageOptions(imageNameStr, options) - if f.err != nil { - return - } - f.imageOut(info, x, y, w, h, options.AllowNegativePosition, flow, link, linkStr) -} - -// RegisterImageReader registers an image, reading it from Reader r, adding it -// to the PDF file but not adding it to the page. -// -// This function is now deprecated in favor of RegisterImageOptionsReader -func (f *Fpdf) RegisterImageReader(imgName, tp string, r io.Reader) (info *ImageInfoType) { - options := ImageOptions{ - ReadDpi: false, - ImageType: tp, - } - return f.RegisterImageOptionsReader(imgName, options, r) -} - -// ImageOptions provides a place to hang any options we want to use while -// parsing an image. -// -// ImageType's possible values are (case insensitive): -// "JPG", "JPEG", "PNG" and "GIF". If empty, the type is inferred from -// the file extension. -// -// ReadDpi defines whether to attempt to automatically read the image -// dpi information from the image file. Normally, this should be set -// to true (understanding that not all images will have this info -// available). However, for backwards compatibility with previous -// versions of the API, it defaults to false. -// -// AllowNegativePosition can be set to true in order to prevent the default -// coercion of negative x values to the current x position. -type ImageOptions struct { - ImageType string - ReadDpi bool - AllowNegativePosition bool -} - -// RegisterImageOptionsReader registers an image, reading it from Reader r, adding it -// to the PDF file but not adding it to the page. Use Image() with the same -// name to add the image to the page. Note that tp should be specified in this -// case. -// -// See Image() for restrictions on the image and the options parameters. -func (f *Fpdf) RegisterImageOptionsReader(imgName string, options ImageOptions, r io.Reader) (info *ImageInfoType) { - // Thanks, Ivan Daniluk, for generalizing this code to use the Reader interface. - if f.err != nil { - return - } - info, ok := f.images[imgName] - if ok { - return - } - - // First use of this image, get info - if options.ImageType == "" { - f.err = fmt.Errorf("image type should be specified if reading from custom reader") - return - } - options.ImageType = strings.ToLower(options.ImageType) - if options.ImageType == "jpeg" { - options.ImageType = "jpg" - } - switch options.ImageType { - case "jpg": - info = f.parsejpg(r) - case "png": - info = f.parsepng(r, options.ReadDpi) - case "gif": - info = f.parsegif(r) - default: - f.err = fmt.Errorf("unsupported image type: %s", options.ImageType) - } - if f.err != nil { - return - } - - if info.i, f.err = generateImageID(info); f.err != nil { - return - } - f.images[imgName] = info - - return -} - -// RegisterImage registers an image, adding it to the PDF file but not adding -// it to the page. Use Image() with the same filename to add the image to the -// page. Note that Image() calls this function, so this function is only -// necessary if you need information about the image before placing it. -// -// This function is now deprecated in favor of RegisterImageOptions. -// See Image() for restrictions on the image and the "tp" parameters. -func (f *Fpdf) RegisterImage(fileStr, tp string) (info *ImageInfoType) { - options := ImageOptions{ - ReadDpi: false, - ImageType: tp, - } - return f.RegisterImageOptions(fileStr, options) -} - -// RegisterImageOptions registers an image, adding it to the PDF file but not -// adding it to the page. Use Image() with the same filename to add the image -// to the page. Note that Image() calls this function, so this function is only -// necessary if you need information about the image before placing it. See -// Image() for restrictions on the image and the "tp" parameters. -func (f *Fpdf) RegisterImageOptions(fileStr string, options ImageOptions) (info *ImageInfoType) { - info, ok := f.images[fileStr] - if ok { - return - } - - file, err := os.Open(fileStr) - if err != nil { - f.err = err - return - } - defer file.Close() - - // First use of this image, get info - if options.ImageType == "" { - pos := strings.LastIndex(fileStr, ".") - if pos < 0 { - f.err = fmt.Errorf("image file has no extension and no type was specified: %s", fileStr) - return - } - options.ImageType = fileStr[pos+1:] - } - - return f.RegisterImageOptionsReader(fileStr, options, file) -} - -// GetImageInfo returns information about the registered image specified by -// imageStr. If the image has not been registered, nil is returned. The -// internal error is not modified by this method. -func (f *Fpdf) GetImageInfo(imageStr string) (info *ImageInfoType) { - return f.images[imageStr] -} - -// ImportObjects imports objects from gofpdi into current document -func (f *Fpdf) ImportObjects(objs map[string][]byte) { - for k, v := range objs { - f.importedObjs[k] = v - } -} - -// ImportObjPos imports object hash positions from gofpdi -func (f *Fpdf) ImportObjPos(objPos map[string]map[int]string) { - for k, v := range objPos { - f.importedObjPos[k] = v - } -} - -// putImportedTemplates writes the imported template objects to the PDF -func (f *Fpdf) putImportedTemplates() { - nOffset := f.n + 1 - - // keep track of list of sha1 hashes (to be replaced with integers) - objsIDHash := make([]string, len(f.importedObjs)) - - // actual object data with new id - objsIDData := make([][]byte, len(f.importedObjs)) - - // Populate hash slice and data slice - i := 0 - for k, v := range f.importedObjs { - objsIDHash[i] = k - objsIDData[i] = v - - i++ - } - - // Populate a lookup table to get an object id from a hash - hashToObjID := make(map[string]int, len(f.importedObjs)) - for i = 0; i < len(objsIDHash); i++ { - hashToObjID[objsIDHash[i]] = i + nOffset - } - - // Now, replace hashes inside data with %040d object id - for i = 0; i < len(objsIDData); i++ { - // get hash - hash := objsIDHash[i] - - for pos, h := range f.importedObjPos[hash] { - // Convert object id into a 40 character string padded with spaces - objIDPadded := fmt.Sprintf("%40s", fmt.Sprintf("%d", hashToObjID[h])) - - // Convert objIDPadded into []byte - objIDBytes := []byte(objIDPadded) - - // Replace sha1 hash with object id padded - for j := pos; j < pos+40; j++ { - objsIDData[i][j] = objIDBytes[j-pos] - } - } - - // Save objsIDHash so that procset dictionary has the correct object ids - f.importedTplIDs[hash] = i + nOffset - } - - // Now, put objects - for i = 0; i < len(objsIDData); i++ { - f.newobj() - f.out(string(objsIDData[i])) - } -} - -// UseImportedTemplate uses imported template from gofpdi. It draws imported -// PDF page onto page. -func (f *Fpdf) UseImportedTemplate(tplName string, scaleX float64, scaleY float64, tX float64, tY float64) { - f.outf("q 0 J 1 w 0 j 0 G 0 g q %.4F 0 0 %.4F %.4F %.4F cm %s Do Q Q\n", scaleX*f.k, scaleY*f.k, tX*f.k, (tY+f.h)*f.k, tplName) -} - -// ImportTemplates imports gofpdi template names into importedTplObjs for -// inclusion in the procset dictionary -func (f *Fpdf) ImportTemplates(tpls map[string]string) { - for tplName, tplID := range tpls { - f.importedTplObjs[tplName] = tplID - } -} - -// GetConversionRatio returns the conversion ratio based on the unit given when -// creating the PDF. -func (f *Fpdf) GetConversionRatio() float64 { - return f.k -} - -// GetXY returns the abscissa and ordinate of the current position. -// -// Note: the value returned for the abscissa will be affected by the current -// cell margin. To account for this, you may need to either add the value -// returned by GetCellMargin() to it or call SetCellMargin(0) to remove the -// cell margin. -func (f *Fpdf) GetXY() (float64, float64) { - return f.x, f.y -} - -// GetX returns the abscissa of the current position. -// -// Note: the value returned will be affected by the current cell margin. To -// account for this, you may need to either add the value returned by -// GetCellMargin() to it or call SetCellMargin(0) to remove the cell margin. -func (f *Fpdf) GetX() float64 { - return f.x -} - -// SetX defines the abscissa of the current position. If the passed value is -// negative, it is relative to the right of the page. -func (f *Fpdf) SetX(x float64) { - if x >= 0 { - f.x = x - } else { - f.x = f.w + x - } -} - -// GetY returns the ordinate of the current position. -func (f *Fpdf) GetY() float64 { - return f.y -} - -// SetY moves the current abscissa back to the left margin and sets the -// ordinate. If the passed value is negative, it is relative to the bottom of -// the page. -func (f *Fpdf) SetY(y float64) { - // dbg("SetY x %.2f, lMargin %.2f", f.x, f.lMargin) - f.x = f.lMargin - if y >= 0 { - f.y = y - } else { - f.y = f.h + y - } -} - -// SetHomeXY is a convenience method that sets the current position to the left -// and top margins. -func (f *Fpdf) SetHomeXY() { - f.SetY(f.tMargin) - f.SetX(f.lMargin) -} - -// SetXY defines the abscissa and ordinate of the current position. If the -// passed values are negative, they are relative respectively to the right and -// bottom of the page. -func (f *Fpdf) SetXY(x, y float64) { - f.SetY(y) - f.SetX(x) -} - -// SetProtection applies certain constraints on the finished PDF document. -// -// actionFlag is a bitflag that controls various document operations. -// CnProtectPrint allows the document to be printed. CnProtectModify allows a -// document to be modified by a PDF editor. CnProtectCopy allows text and -// images to be copied into the system clipboard. CnProtectAnnotForms allows -// annotations and forms to be added by a PDF editor. These values can be -// combined by or-ing them together, for example, -// CnProtectCopy|CnProtectModify. This flag is advisory; not all PDF readers -// implement the constraints that this argument attempts to control. -// -// userPassStr specifies the password that will need to be provided to view the -// contents of the PDF. The permissions specified by actionFlag will apply. -// -// ownerPassStr specifies the password that will need to be provided to gain -// full access to the document regardless of the actionFlag value. An empty -// string for this argument will be replaced with a random value, effectively -// prohibiting full access to the document. -func (f *Fpdf) SetProtection(actionFlag byte, userPassStr, ownerPassStr string) { - if f.err != nil { - return - } - f.protect.setProtection(actionFlag, userPassStr, ownerPassStr) -} - -// OutputAndClose sends the PDF document to the writer specified by w. This -// method will close both f and w, even if an error is detected and no document -// is produced. -func (f *Fpdf) OutputAndClose(w io.WriteCloser) error { - _ = f.Output(w) - err := w.Close() - if err != nil { - return fmt.Errorf("could not close writer: %w", err) - } - return f.err -} - -// OutputFileAndClose creates or truncates the file specified by fileStr and -// writes the PDF document to it. This method will close f and the newly -// written file, even if an error is detected and no document is produced. -// -// Most examples demonstrate the use of this method. -func (f *Fpdf) OutputFileAndClose(fileStr string) error { - if f.err != nil { - return f.err - } - - pdfFile, err := os.Create(fileStr) - if err != nil { - f.err = err - return f.err - } - - _ = f.Output(pdfFile) - - err = pdfFile.Close() - if err != nil { - return fmt.Errorf("could not close output file: %w", err) - } - - return f.err -} - -// Output sends the PDF document to the writer specified by w. No output will -// take place if an error has occurred in the document generation process. w -// remains open after this function returns. After returning, f is in a closed -// state and its methods should not be called. -func (f *Fpdf) Output(w io.Writer) error { - if f.err != nil { - return f.err - } - // dbg("Output") - if f.state < 3 { - f.Close() - } - _, err := f.buffer.WriteTo(w) - if err != nil { - f.err = err - } - return f.err -} - -func (f *Fpdf) getpagesizestr(sizeStr string) (size SizeType) { - if f.err != nil { - return - } - sizeStr = strings.ToLower(sizeStr) - // dbg("Size [%s]", sizeStr) - var ok bool - size, ok = f.stdPageSizes[sizeStr] - if ok { - // dbg("found %s", sizeStr) - size.Wd /= f.k - size.Ht /= f.k - - } else { - f.err = fmt.Errorf("unknown page size %s", sizeStr) - } - return -} - -// GetPageSizeStr returns the SizeType for the given sizeStr (that is A4, A3, etc..) -func (f *Fpdf) GetPageSizeStr(sizeStr string) (size SizeType) { - return f.getpagesizestr(sizeStr) -} - -func (f *Fpdf) beginpage(orientationStr string, size SizeType) { - if f.err != nil { - return - } - f.page++ - // add the default page boxes, if any exist, to the page - f.pageBoxes[f.page] = make(map[string]PageBox) - for box, pb := range f.defPageBoxes { - f.pageBoxes[f.page][box] = pb - } - f.pages = append(f.pages, bytes.NewBufferString("")) - f.pageLinks = append(f.pageLinks, make([]linkType, 0)) - f.pageAttachments = append(f.pageAttachments, []annotationAttach{}) - f.state = 2 - f.x = f.lMargin - f.y = f.tMargin - f.fontFamily = "" - // Check page size and orientation - if orientationStr == "" { - orientationStr = f.defOrientation - } else { - orientationStr = strings.ToUpper(orientationStr[0:1]) - } - if orientationStr != f.curOrientation || size.Wd != f.curPageSize.Wd || size.Ht != f.curPageSize.Ht { - // New size or orientation - if orientationStr == "P" { - f.w = size.Wd - f.h = size.Ht - } else { - f.w = size.Ht - f.h = size.Wd - } - f.wPt = f.w * f.k - f.hPt = f.h * f.k - f.pageBreakTrigger = f.h - f.bMargin - f.curOrientation = orientationStr - f.curPageSize = size - } - if orientationStr != f.defOrientation || size.Wd != f.defPageSize.Wd || size.Ht != f.defPageSize.Ht { - f.pageSizes[f.page] = SizeType{f.wPt, f.hPt} - } -} - -func (f *Fpdf) endpage() { - f.EndLayer() - f.state = 1 -} - -// Load a font definition file from the given Reader -func (f *Fpdf) loadfont(r io.Reader) (def fontDefType) { - if f.err != nil { - return - } - // dbg("Loading font [%s]", fontStr) - var buf bytes.Buffer - _, err := buf.ReadFrom(r) - if err != nil { - f.err = err - return - } - err = json.Unmarshal(buf.Bytes(), &def) - if err != nil { - f.err = err - return - } - - if def.i, err = generateFontID(def); err != nil { - f.err = err - } - // dump(def) - return -} - -// Escape special characters in strings -func (f *Fpdf) escape(s string) string { - s = strings.Replace(s, "\\", "\\\\", -1) - s = strings.Replace(s, "(", "\\(", -1) - s = strings.Replace(s, ")", "\\)", -1) - s = strings.Replace(s, "\r", "\\r", -1) - return s -} - -// textstring formats a text string -func (f *Fpdf) textstring(s string) string { - if f.protect.encrypted { - b := []byte(s) - f.protect.rc4(uint32(f.n), &b) - s = string(b) - } - return "(" + f.escape(s) + ")" -} - -func blankCount(str string) (count int) { - l := len(str) - for j := 0; j < l; j++ { - if byte(' ') == str[j] { - count++ - } - } - return -} - -// SetUnderlineThickness accepts a multiplier for adjusting the text underline -// thickness, defaulting to 1. See SetUnderlineThickness example. -func (f *Fpdf) SetUnderlineThickness(thickness float64) { - f.userUnderlineThickness = thickness -} - -// Underline text -func (f *Fpdf) dounderline(x, y float64, txt string) string { - up := float64(f.currentFont.Up) - ut := float64(f.currentFont.Ut) * f.userUnderlineThickness - w := f.GetStringWidth(txt) + f.ws*float64(blankCount(txt)) - return sprintf("%.2f %.2f %.2f %.2f re f", x*f.k, - (f.h-(y-up/1000*f.fontSize))*f.k, w*f.k, -ut/1000*f.fontSizePt) -} - -func (f *Fpdf) dostrikeout(x, y float64, txt string) string { - up := float64(f.currentFont.Up) - ut := float64(f.currentFont.Ut) - w := f.GetStringWidth(txt) + f.ws*float64(blankCount(txt)) - return sprintf("%.2f %.2f %.2f %.2f re f", x*f.k, - (f.h-(y+4*up/1000*f.fontSize))*f.k, w*f.k, -ut/1000*f.fontSizePt) -} - -func (f *Fpdf) newImageInfo() *ImageInfoType { - // default dpi to 72 unless told otherwise - return &ImageInfoType{scale: f.k, dpi: 72} -} - -// parsejpg extracts info from io.Reader with JPEG data -// Thank you, Bruno Michel, for providing this code. -func (f *Fpdf) parsejpg(r io.Reader) (info *ImageInfoType) { - info = f.newImageInfo() - var ( - data bytes.Buffer - err error - ) - _, err = data.ReadFrom(r) - if err != nil { - f.err = err - return - } - info.data = data.Bytes() - - config, err := jpeg.DecodeConfig(bytes.NewReader(info.data)) - if err != nil { - f.err = err - return - } - info.w = float64(config.Width) - info.h = float64(config.Height) - info.f = "DCTDecode" - info.bpc = 8 - switch config.ColorModel { - case color.GrayModel: - info.cs = "DeviceGray" - case color.YCbCrModel: - info.cs = "DeviceRGB" - case color.CMYKModel: - info.cs = "DeviceCMYK" - default: - f.err = fmt.Errorf("image JPEG buffer has unsupported color space (%v)", config.ColorModel) - return - } - return -} - -// parsepng extracts info from a PNG data -func (f *Fpdf) parsepng(r io.Reader, readdpi bool) (info *ImageInfoType) { - buf, err := newRBuffer(r) - if err != nil { - f.err = err - return - } - return f.parsepngstream(buf, readdpi) -} - -// parsegif extracts info from a GIF data (via PNG conversion) -func (f *Fpdf) parsegif(r io.Reader) (info *ImageInfoType) { - data, err := newRBuffer(r) - if err != nil { - f.err = err - return - } - var img image.Image - img, err = gif.Decode(data) - if err != nil { - f.err = err - return - } - pngBuf := new(bytes.Buffer) - err = png.Encode(pngBuf, img) - if err != nil { - f.err = err - return - } - return f.parsepngstream(&rbuffer{p: pngBuf.Bytes()}, false) -} - -// newobj begins a new object -func (f *Fpdf) newobj() { - // dbg("newobj") - f.n++ - for j := len(f.offsets); j <= f.n; j++ { - f.offsets = append(f.offsets, 0) - } - f.offsets[f.n] = f.buffer.Len() - f.outf("%d 0 obj", f.n) -} - -func (f *Fpdf) putstream(b []byte) { - // dbg("putstream") - if f.protect.encrypted { - f.protect.rc4(uint32(f.n), &b) - } - f.out("stream") - f.out(string(b)) - f.out("endstream") -} - -// out; Add a line to the document -func (f *Fpdf) out(s string) { - if f.state == 2 { - must(f.pages[f.page].WriteString(s)) - must(f.pages[f.page].WriteString("\n")) - } else { - must(f.buffer.WriteString(s)) - must(f.buffer.WriteString("\n")) - } -} - -func (f *Fpdf) put(s string) { - if f.state == 2 { - f.pages[f.page].WriteString(s) - } else { - f.buffer.WriteString(s) - } -} - -// outbuf adds a buffered line to the document -func (f *Fpdf) outbuf(r io.Reader) { - if f.state == 2 { - must64(f.pages[f.page].ReadFrom(r)) - must(f.pages[f.page].WriteString("\n")) - } else { - must64(f.buffer.ReadFrom(r)) - must(f.buffer.WriteString("\n")) - } -} - -// RawWriteStr writes a string directly to the PDF generation buffer. This is a -// low-level function that is not required for normal PDF construction. An -// understanding of the PDF specification is needed to use this method -// correctly. -func (f *Fpdf) RawWriteStr(str string) { - f.out(str) -} - -// RawWriteBuf writes the contents of the specified buffer directly to the PDF -// generation buffer. This is a low-level function that is not required for -// normal PDF construction. An understanding of the PDF specification is needed -// to use this method correctly. -func (f *Fpdf) RawWriteBuf(r io.Reader) { - f.outbuf(r) -} - -// outf adds a formatted line to the document -func (f *Fpdf) outf(fmtStr string, args ...interface{}) { - f.out(sprintf(fmtStr, args...)) -} - -func (f *Fpdf) putF64(v float64, prec int) { - f.put(f.fmtF64(v, prec)) -} - -// fmtF64 converts the floating-point number f to a string with precision prec. -func (f *Fpdf) fmtF64(v float64, prec int) string { - return string(strconv.AppendFloat(f.fmt.buf[:0], v, 'f', prec, 64)) -} - -func (f *Fpdf) putInt(v int) { - f.put(f.fmtInt(v)) -} - -func (f *Fpdf) fmtInt(v int) string { - return string(strconv.AppendInt(f.fmt.buf[:0], int64(v), 10)) -} - -// SetDefaultCatalogSort sets the default value of the catalog sort flag that -// will be used when initializing a new Fpdf instance. See SetCatalogSort() for -// more details. -func SetDefaultCatalogSort(flag bool) { - gl.catalogSort = flag -} - -// SetCatalogSort sets a flag that will be used, if true, to consistently order -// the document's internal resource catalogs. This method is typically only -// used for test purposes to facilitate PDF comparison. -func (f *Fpdf) SetCatalogSort(flag bool) { - f.catalogSort = flag -} - -// SetDefaultCreationDate sets the default value of the document creation date -// that will be used when initializing a new Fpdf instance. See -// SetCreationDate() for more details. -func SetDefaultCreationDate(tm time.Time) { - gl.creationDate = tm -} - -// SetDefaultModificationDate sets the default value of the document modification date -// that will be used when initializing a new Fpdf instance. See -// SetCreationDate() for more details. -func SetDefaultModificationDate(tm time.Time) { - gl.modDate = tm -} - -// SetCreationDate fixes the document's internal CreationDate value. By -// default, the time when the document is generated is used for this value. -// This method is typically only used for testing purposes to facilitate PDF -// comparison. Specify a zero-value time to revert to the default behavior. -func (f *Fpdf) SetCreationDate(tm time.Time) { - f.creationDate = tm -} - -// SetModificationDate fixes the document's internal ModDate value. -// See `SetCreationDate` for more details. -func (f *Fpdf) SetModificationDate(tm time.Time) { - f.modDate = tm -} - -// SetJavascript adds Adobe JavaScript to the document. -func (f *Fpdf) SetJavascript(script string) { - f.javascript = &script -} - -// RegisterAlias adds an (alias, replacement) pair to the document so we can -// replace all occurrences of that alias after writing but before the document -// is closed. Functions ExampleFpdf_RegisterAlias() and -// ExampleFpdf_RegisterAlias_utf8() in fpdf_test.go demonstrate this method. -func (f *Fpdf) RegisterAlias(alias, replacement string) { - // Note: map[string]string assignments embed literal escape ("\00") sequences - // into utf16 key and value strings. Consequently, subsequent search/replace - // operations will fail unexpectedly if utf8toutf16() conversions take place - // here. Instead, conversions are deferred until the actual search/replace - // operation takes place when the PDF output is generated. - f.aliasMap[alias] = replacement -} - -func (f *Fpdf) replaceAliases() { - for mode := 0; mode < 2; mode++ { - for alias, replacement := range f.aliasMap { - if mode == 1 { - alias = utf8toutf16(alias, false) - replacement = utf8toutf16(replacement, false) - } - for n := 1; n <= f.page; n++ { - s := f.pages[n].String() - if strings.Contains(s, alias) { - s = strings.Replace(s, alias, replacement, -1) - f.pages[n].Truncate(0) - f.pages[n].WriteString(s) - } - } - } - } -} - -func (f *Fpdf) putpages() { - var wPt, hPt float64 - var pageSize SizeType - var ok bool - nb := f.page - if len(f.aliasNbPagesStr) > 0 { - // Replace number of pages - f.RegisterAlias(f.aliasNbPagesStr, sprintf("%d", nb)) - } - f.replaceAliases() - if f.defOrientation == "P" { - wPt = f.defPageSize.Wd * f.k - hPt = f.defPageSize.Ht * f.k - } else { - wPt = f.defPageSize.Ht * f.k - hPt = f.defPageSize.Wd * f.k - } - pagesObjectNumbers := make([]int, nb+1) // 1-based - for n := 1; n <= nb; n++ { - // Page - f.newobj() - pagesObjectNumbers[n] = f.n // save for /Kids - f.out("< 0 { - var annots fmtBuffer - annots.printf("/Annots [") - for _, pl := range f.pageLinks[n] { - annots.printf("<>>>", f.textstring(pl.linkStr)) - } else { - l := f.links[pl.link] - var sz SizeType - var h float64 - sz, ok = f.pageSizes[l.page] - if ok { - h = sz.Ht - } else { - h = hPt - } - // dbg("h [%.2f], l.y [%.2f] f.k [%.2f]\n", h, l.y, f.k) - annots.printf("/Dest [%d 0 R /XYZ 0 %.2f null]>>", 1+2*l.page, h-l.y*f.k) - } - } - f.putAttachmentAnnotationLinks(&annots, n) - annots.printf("]") - f.out(annots.String()) - } - if f.pdfVersion > pdfVers1_3 { - f.out("/Group <>") - } - f.outf("/Contents %d 0 R>>", f.n+1) - f.out("endobj") - // Page content - f.newobj() - if f.compress { - mem := xmem.compress(f.pages[n].Bytes()) - data := mem.bytes() - f.outf("<>", len(data)) - f.putstream(data) - mem.release() - } else { - f.outf("<>", f.pages[n].Len()) - f.putstream(f.pages[n].Bytes()) - } - f.out("endobj") - } - // Pages root - f.offsets[1] = f.buffer.Len() - f.out("1 0 obj") - f.out("<>") - f.out("endobj") -} - -func (f *Fpdf) putfonts() { - if f.err != nil { - return - } - nf := f.n - for _, diff := range f.diffs { - // Encodings - f.newobj() - f.outf("<>", diff) - f.out("endobj") - } - { - var fileList []string - var info fontFileType - var file string - for file = range f.fontFiles { - fileList = append(fileList, file) - } - if f.catalogSort { - sort.SliceStable(fileList, func(i, j int) bool { return fileList[i] < fileList[j] }) - } - for _, file = range fileList { - info = f.fontFiles[file] - if info.fontType != "UTF8" { - f.newobj() - info.n = f.n - f.fontFiles[file] = info - - var font []byte - - if info.embedded { - font = info.content - } else { - var err error - font, err = f.loadFontFile(file) - if err != nil { - f.err = err - return - } - } - compressed := file[len(file)-2:] == ".z" - if !compressed && info.length2 > 0 { - buf := font[6:info.length1] - buf = append(buf, font[6+info.length1+6:info.length2]...) - font = buf - } - f.outf("< 0 { - f.outf("/Length2 %d /Length3 0", info.length2) - } - f.out(">>") - f.putstream(font) - f.out("endobj") - } - } - } - { - var keyList []string - var font fontDefType - var key string - for key = range f.fonts { - keyList = append(keyList, key) - } - if f.catalogSort { - sort.SliceStable(keyList, func(i, j int) bool { return keyList[i] < keyList[j] }) - } - for _, key = range keyList { - font = f.fonts[key] - // Font objects - font.N = f.n + 1 - f.fonts[key] = font - tp := font.Tp - name := font.Name - switch tp { - case "Core": - // Core font - f.newobj() - f.out("<>") - f.out("endobj") - case "Type1": - fallthrough - case "TrueType": - // Additional Type1 or TrueType/OpenType font - f.newobj() - f.out("< 0 { - f.outf("/Encoding %d 0 R", nf+font.DiffN) - } else { - f.out("/Encoding /WinAnsiEncoding") - } - f.out(">>") - f.out("endobj") - // Widths - f.newobj() - var s fmtBuffer - s.WriteString("[") - for j := 32; j < 256; j++ { - s.printf("%d ", font.Cw[j]) - } - s.WriteString("]") - f.out(s.String()) - f.out("endobj") - // Descriptor - f.newobj() - s.Truncate(0) - s.printf("<>", suffix, f.fontFiles[font.File].n) - f.out(s.String()) - f.out("endobj") - case "UTF8": - fontName := "utf8" + font.Name - usedRunes := font.usedRunes - delete(usedRunes, 0) - utf8FontStream := font.utf8File.GenerateCutFont(usedRunes) - utf8FontSize := len(utf8FontStream) - CodeSignDictionary := font.utf8File.CodeSymbolDictionary - delete(CodeSignDictionary, 0) - - f.newobj() - f.out(fmt.Sprintf("<>\n"+"endobj", fontName, f.n+1, f.n+2)) - - f.newobj() - f.out("<>") - f.out("endobj") - - f.newobj() - f.out("<>") - f.putstream([]byte(toUnicode)) - f.out("endobj") - - // CIDInfo - f.newobj() - f.out("<>") - f.out("endobj") - - // Font descriptor - f.newobj() - var s fmtBuffer - s.printf("<>") - f.out(s.String()) - f.out("endobj") - - // Embed CIDToGIDMap - cidToGidMap := make([]byte, 256*256*2) - - for cc, glyph := range CodeSignDictionary { - cidToGidMap[cc*2] = byte(glyph >> 8) - cidToGidMap[cc*2+1] = byte(glyph & 0xFF) - } - - mem := xmem.compress(cidToGidMap) - cidToGidMap = mem.bytes() - f.newobj() - f.out("<>") - f.putstream(cidToGidMap) - f.out("endobj") - mem.release() - - //Font file - mem = xmem.compress(utf8FontStream) - compressedFontStream := mem.bytes() - f.newobj() - f.out("<>") - f.putstream(compressedFontStream) - f.out("endobj") - mem.release() - default: - f.err = fmt.Errorf("unsupported font type: %s", tp) - return - } - } - } -} - -func (f *Fpdf) generateCIDFontMap(font *fontDefType, LastRune int) { - rangeID := 0 - cidArray := make(map[int]*untypedKeyMap) - cidArrayKeys := make([]int, 0) - prevCid := -2 - prevWidth := -1 - interval := false - startCid := 1 - cwLen := LastRune + 1 - - // for each character - for cid := startCid; cid < cwLen; cid++ { - if font.Cw[cid] == 0x00 { - continue - } - width := font.Cw[cid] - if width == 65535 { - width = 0 - } - if numb, OK := font.usedRunes[cid]; cid > 255 && (!OK || numb == 0) { - continue - } - - if cid == prevCid+1 { - if width == prevWidth { - - if width == cidArray[rangeID].get(0) { - cidArray[rangeID].put(nil, width) - } else { - cidArray[rangeID].pop() - rangeID = prevCid - r := untypedKeyMap{ - valueSet: make([]int, 0), - keySet: make([]interface{}, 0), - } - cidArray[rangeID] = &r - cidArrayKeys = append(cidArrayKeys, rangeID) - cidArray[rangeID].put(nil, prevWidth) - cidArray[rangeID].put(nil, width) - } - interval = true - cidArray[rangeID].put("interval", 1) - } else { - if interval { - // new range - rangeID = cid - r := untypedKeyMap{ - valueSet: make([]int, 0), - keySet: make([]interface{}, 0), - } - cidArray[rangeID] = &r - cidArrayKeys = append(cidArrayKeys, rangeID) - cidArray[rangeID].put(nil, width) - } else { - cidArray[rangeID].put(nil, width) - } - interval = false - } - } else { - rangeID = cid - r := untypedKeyMap{ - valueSet: make([]int, 0), - keySet: make([]interface{}, 0), - } - cidArray[rangeID] = &r - cidArrayKeys = append(cidArrayKeys, rangeID) - cidArray[rangeID].put(nil, width) - interval = false - } - prevCid = cid - prevWidth = width - - } - previousKey := -1 - nextKey := -1 - isInterval := false - for g := 0; g < len(cidArrayKeys); { - key := cidArrayKeys[g] - ws := *cidArray[key] - cws := len(ws.keySet) - if (key == nextKey) && (!isInterval) && (ws.getIndex("interval") < 0 || cws < 4) { - if cidArray[key].getIndex("interval") >= 0 { - cidArray[key].delete("interval") - } - cidArray[previousKey] = arrayMerge(cidArray[previousKey], cidArray[key]) - cidArrayKeys = remove(cidArrayKeys, key) - } else { - g++ - previousKey = key - } - nextKey = key + cws - // ui := ws.getIndex("interval") - // ui = ui + 1 - if ws.getIndex("interval") >= 0 { - if cws > 3 { - isInterval = true - } else { - isInterval = false - } - cidArray[key].delete("interval") - nextKey-- - } else { - isInterval = false - } - } - var w fmtBuffer - for _, k := range cidArrayKeys { - ws := cidArray[k] - if len(arrayCountValues(ws.valueSet)) == 1 { - w.printf(" %d %d %d", k, k+len(ws.valueSet)-1, ws.get(0)) - } else { - w.printf(" %d [ %s ]\n", k, implode(" ", ws.valueSet)) - } - } - f.out("/W [" + w.String() + " ]") -} - -func implode(sep string, arr []int) string { - var s fmtBuffer - for i := 0; i < len(arr)-1; i++ { - s.printf("%v", arr[i]) - s.printf(sep) - } - if len(arr) > 0 { - s.printf("%v", arr[len(arr)-1]) - } - return s.String() -} - -// arrayCountValues counts the occurrences of each item in the $mp array. -func arrayCountValues(mp []int) map[int]int { - answer := make(map[int]int) - for _, v := range mp { - answer[v] = answer[v] + 1 - } - return answer -} - -func (f *Fpdf) loadFontFile(name string) ([]byte, error) { - if f.fontLoader != nil { - reader, err := f.fontLoader.Open(name) - if err == nil { - data, err := io.ReadAll(reader) - if closer, ok := reader.(io.Closer); ok { - closer.Close() - } - return data, err - } - } - return os.ReadFile(path.Join(f.fontpath, name)) -} - -func (f *Fpdf) putimages() { - var keyList []string - var key string - for key = range f.images { - keyList = append(keyList, key) - } - - // Sort the keyList []string by the corresponding image's width. - if f.catalogSort { - sort.SliceStable(keyList, func(i, j int) bool { return f.images[keyList[i]].w < f.images[keyList[j]].w }) - } - - // Maintain a list of inserted image SHA-1 hashes, with their - // corresponding object ID number. - insertedImages := map[string]int{} - - for _, key = range keyList { - image := f.images[key] - - // Check if this image has already been inserted using it's SHA-1 hash. - insertedImageObjN, isFound := insertedImages[image.i] - - // If found, skip inserting the image as a new object, and - // use the object ID from the insertedImages map. - // If not, insert the image into the PDF and store the object ID. - if isFound { - image.n = insertedImageObjN - } else { - f.putimage(image) - insertedImages[image.i] = image.n - } - } -} - -func (f *Fpdf) putimage(info *ImageInfoType) { - f.newobj() - info.n = f.n - f.out("< 0 { - f.outf("/Filter /%s", info.f) - } - if len(info.dp) > 0 { - f.outf("/DecodeParms <<%s>>", info.dp) - } - if len(info.trns) > 0 { - var trns fmtBuffer - for _, v := range info.trns { - trns.printf("%d %d ", v, v) - } - f.outf("/Mask [%s]", trns.String()) - } - if info.smask != nil { - f.outf("/SMask %d 0 R", f.n+1) - } - f.outf("/Length %d>>", len(info.data)) - f.putstream(info.data) - f.out("endobj") - // Soft mask - if len(info.smask) > 0 { - smask := &ImageInfoType{ - w: info.w, - h: info.h, - cs: "DeviceGray", - bpc: 8, - f: info.f, - dp: sprintf("/Predictor 15 /Colors 1 /BitsPerComponent 8 /Columns %d", int(info.w)), - data: info.smask, - scale: f.k, - } - f.putimage(smask) - } - // Palette - if info.cs == "Indexed" { - f.newobj() - if f.compress { - mem := xmem.compress(info.pal) - pal := mem.bytes() - f.outf("<>", len(pal)) - f.putstream(pal) - mem.release() - } else { - f.outf("<>", len(info.pal)) - f.putstream(info.pal) - } - f.out("endobj") - } -} - -func (f *Fpdf) putxobjectdict() { - { - var image *ImageInfoType - var key string - var keyList []string - for key = range f.images { - keyList = append(keyList, key) - } - if f.catalogSort { - sort.SliceStable(keyList, func(i, j int) bool { return f.images[keyList[i]].i < f.images[keyList[j]].i }) - } - for _, key = range keyList { - image = f.images[key] - f.outf("/I%s %d 0 R", image.i, image.n) - } - } - { - var keyList []string - var key string - var tpl Template - keyList = templateKeyList(f.templates, f.catalogSort) - for _, key = range keyList { - tpl = f.templates[key] - // for _, tpl := range f.templates { - id := tpl.ID() - if objID, ok := f.templateObjects[id]; ok { - f.outf("/TPL%s %d 0 R", id, objID) - } - } - } - { - for tplName, objID := range f.importedTplObjs { - // here replace obj id hash with n - f.outf("%s %d 0 R", tplName, f.importedTplIDs[objID]) - } - } -} - -func (f *Fpdf) putresourcedict() { - f.out("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]") - f.out("/Font <<") - { - var keyList []string - var font fontDefType - var key string - for key = range f.fonts { - keyList = append(keyList, key) - } - if f.catalogSort { - sort.SliceStable(keyList, func(i, j int) bool { return f.fonts[keyList[i]].i < f.fonts[keyList[j]].i }) - } - for _, key = range keyList { - font = f.fonts[key] - f.outf("/F%s %d 0 R", font.i, font.N) - } - } - f.out(">>") - f.out("/XObject <<") - f.putxobjectdict() - f.out(">>") - count := len(f.blendList) - if count > 1 { - f.out("/ExtGState <<") - for j := 1; j < count; j++ { - f.outf("/GS%d %d 0 R", j, f.blendList[j].objNum) - } - f.out(">>") - } - count = len(f.gradientList) - if count > 1 { - f.out("/Shading <<") - for j := 1; j < count; j++ { - f.outf("/Sh%d %d 0 R", j, f.gradientList[j].objNum) - } - f.out(">>") - } - // Layers - f.layerPutResourceDict() - f.spotColorPutResourceDict() -} - -func (f *Fpdf) putBlendModes() { - count := len(f.blendList) - for j := 1; j < count; j++ { - bl := f.blendList[j] - f.newobj() - f.blendList[j].objNum = f.n - f.outf("<>", - bl.fillStr, bl.strokeStr, bl.modeStr) - f.out("endobj") - } -} - -func (f *Fpdf) putGradients() { - count := len(f.gradientList) - for j := 1; j < count; j++ { - var f1 int - gr := f.gradientList[j] - if gr.tp == 2 || gr.tp == 3 { - f.newobj() - f.outf("<>", gr.clr1Str, gr.clr2Str) - f.out("endobj") - f1 = f.n - } - f.newobj() - f.outf("<>", - gr.x1, gr.y1, gr.x2, gr.y2, f1) - } else if gr.tp == 3 { - f.outf("/Coords [%.5f %.5f 0 %.5f %.5f %.5f] /Function %d 0 R /Extend [true true]>>", - gr.x1, gr.y1, gr.x2, gr.y2, gr.r, f1) - } - f.out("endobj") - f.gradientList[j].objNum = f.n - } -} - -func (f *Fpdf) putjavascript() { - if f.javascript == nil { - return - } - - f.newobj() - f.nJs = f.n - f.out("<<") - f.outf("/Names [(EmbeddedJS) %d 0 R]", f.n+1) - f.out(">>") - f.out("endobj") - f.newobj() - f.out("<<") - f.out("/S /JavaScript") - f.outf("/JS %s", f.textstring(*f.javascript)) - f.out(">>") - f.out("endobj") -} - -func (f *Fpdf) putresources() { - if f.err != nil { - return - } - f.layerPutLayers() - f.putBlendModes() - f.putGradients() - f.putSpotColors() - f.putfonts() - if f.err != nil { - return - } - f.putimages() - f.putTemplates() - f.putImportedTemplates() // gofpdi - // Resource dictionary - f.offsets[2] = f.buffer.Len() - f.out("2 0 obj") - f.out("<<") - f.putresourcedict() - f.out(">>") - f.out("endobj") - f.putjavascript() - if f.protect.encrypted { - f.newobj() - f.protect.objNum = f.n - f.out("<<") - f.out("/Filter /Standard") - f.out("/V 1") - f.out("/R 2") - f.outf("/O (%s)", f.escape(string(f.protect.oValue))) - f.outf("/U (%s)", f.escape(string(f.protect.uValue))) - f.outf("/P %d", f.protect.pValue) - f.out(">>") - f.out("endobj") - } -} - -// returns Now() if tm is zero -func timeOrNow(tm time.Time) time.Time { - if tm.IsZero() { - return time.Now() - } - return tm -} - -func (f *Fpdf) putinfo() { - if len(f.producer) > 0 { - f.outf("/Producer %s", f.textstring(f.producer)) - } - if len(f.title) > 0 { - f.outf("/Title %s", f.textstring(f.title)) - } - if len(f.subject) > 0 { - f.outf("/Subject %s", f.textstring(f.subject)) - } - if len(f.author) > 0 { - f.outf("/Author %s", f.textstring(f.author)) - } - if len(f.keywords) > 0 { - f.outf("/Keywords %s", f.textstring(f.keywords)) - } - if len(f.creator) > 0 { - f.outf("/Creator %s", f.textstring(f.creator)) - } - creation := timeOrNow(f.creationDate) - f.outf("/CreationDate %s", f.textstring("D:"+creation.Format("20060102150405"))) - mod := timeOrNow(f.modDate) - f.outf("/ModDate %s", f.textstring("D:"+mod.Format("20060102150405"))) -} - -func (f *Fpdf) putcatalog() { - f.out("/Type /Catalog") - f.out("/Pages 1 0 R") - if f.lang != "" { - f.outf("/Lang (%s)", f.lang) - } - switch f.zoomMode { - case "fullpage": - f.out("/OpenAction [3 0 R /Fit]") - case "fullwidth": - f.out("/OpenAction [3 0 R /FitH null]") - case "real": - f.out("/OpenAction [3 0 R /XYZ null null 1]") - } - // } else if !is_string($this->zoomMode)) - // $this->out('/OpenAction [3 0 R /XYZ null null '.sprintf('%.2f',$this->zoomMode/100).']'); - switch f.layoutMode { - case "single", "SinglePage": - f.out("/PageLayout /SinglePage") - case "continuous", "OneColumn": - f.out("/PageLayout /OneColumn") - case "two", "TwoColumnLeft": - f.out("/PageLayout /TwoColumnLeft") - case "TwoColumnRight": - f.out("/PageLayout /TwoColumnRight") - case "TwoPageLeft", "TwoPageRight": - if f.pdfVersion < pdfVers1_5 { - f.pdfVersion = pdfVers1_5 - } - f.out("/PageLayout /" + f.layoutMode) - } - // Bookmarks - if len(f.outlines) > 0 { - f.outf("/Outlines %d 0 R", f.outlineRoot) - f.out("/PageMode /UseOutlines") - } - // Layers - f.layerPutCatalog() - // Name dictionary : - // -> Javascript - // -> Embedded files - f.out("/Names <<") - // JavaScript - if f.javascript != nil { - f.outf("/JavaScript %d 0 R", f.nJs) - } - // Embedded files - f.outf("/EmbeddedFiles %s", f.getEmbeddedFiles()) - f.out(">>") -} - -func (f *Fpdf) putheader() { - f.outf("%%PDF-%s", f.pdfVersion) -} - -func (f *Fpdf) puttrailer() { - f.outf("/Size %d", f.n+1) - f.outf("/Root %d 0 R", f.n) - f.outf("/Info %d 0 R", f.n-1) - if f.protect.encrypted { - f.outf("/Encrypt %d 0 R", f.protect.objNum) - f.out("/ID [()()]") - } -} - -func (f *Fpdf) putxmp() { - if len(f.xmp) == 0 { - return - } - f.newobj() - f.outf("<< /Type /Metadata /Subtype /XML /Length %d >>", len(f.xmp)) - f.putstream(f.xmp) - f.out("endobj") -} - -func (f *Fpdf) putbookmarks() { - nb := len(f.outlines) - if nb > 0 { - lru := make(map[int]int) - level := 0 - for i, o := range f.outlines { - if o.level > 0 { - parent := lru[o.level-1] - f.outlines[i].parent = parent - f.outlines[parent].last = i - if o.level > level { - f.outlines[parent].first = i - } - } else { - f.outlines[i].parent = nb - } - if o.level <= level && i > 0 { - prev := lru[o.level] - f.outlines[prev].next = i - f.outlines[i].prev = prev - } - lru[o.level] = i - level = o.level - } - n := f.n + 1 - for _, o := range f.outlines { - f.newobj() - f.outf("<>") - f.out("endobj") - } - f.newobj() - f.outlineRoot = f.n - f.outf("<>", n+lru[0]) - f.out("endobj") - } -} - -func (f *Fpdf) enddoc() { - if f.err != nil { - return - } - f.layerEndDoc() - f.putheader() - // Embedded files - f.putAttachments() - f.putAnnotationsAttachments() - f.putpages() - f.putresources() - if f.err != nil { - return - } - // Bookmarks - f.putbookmarks() - // Metadata - f.putxmp() - // Info - f.newobj() - f.out("<<") - f.putinfo() - f.out(">>") - f.out("endobj") - // Catalog - f.newobj() - f.out("<<") - f.putcatalog() - f.out(">>") - f.out("endobj") - // Cross-ref - o := f.buffer.Len() - f.out("xref") - f.outf("0 %d", f.n+1) - f.out("0000000000 65535 f ") - for j := 1; j <= f.n; j++ { - f.outf("%010d 00000 n ", f.offsets[j]) - } - // Trailer - f.out("trailer") - f.out("<<") - f.puttrailer() - f.out(">>") - f.out("startxref") - f.outf("%d", o) - f.out("%%EOF") - f.state = 3 -} - -// Path Drawing - -// MoveTo moves the stylus to (x, y) without drawing the path from the -// previous point. Paths must start with a MoveTo to set the original -// stylus location or the result is undefined. -// -// Create a "path" by moving a virtual stylus around the page (with -// MoveTo, LineTo, CurveTo, CurveBezierCubicTo, ArcTo & ClosePath) -// then draw it or fill it in (with DrawPath). The main advantage of -// using the path drawing routines rather than multiple Fpdf.Line is -// that PDF creates nice line joins at the angles, rather than just -// overlaying the lines. -func (f *Fpdf) MoveTo(x, y float64) { - f.point(x, y) - f.x, f.y = x, y -} - -// LineTo creates a line from the current stylus location to (x, y), which -// becomes the new stylus location. Note that this only creates the line in -// the path; it does not actually draw the line on the page. -// -// The MoveTo() example demonstrates this method. -func (f *Fpdf) LineTo(x, y float64) { - // f.outf("%.2f %.2f l", x*f.k, (f.h-y)*f.k) - const prec = 2 - f.putF64(x*f.k, prec) - f.put(" ") - - f.putF64((f.h-y)*f.k, prec) - f.put(" l\n") - - f.x, f.y = x, y -} - -// CurveTo creates a single-segment quadratic Bézier curve. The curve starts at -// the current stylus location and ends at the point (x, y). The control point -// (cx, cy) specifies the curvature. At the start point, the curve is tangent -// to the straight line between the current stylus location and the control -// point. At the end point, the curve is tangent to the straight line between -// the end point and the control point. -// -// The MoveTo() example demonstrates this method. -func (f *Fpdf) CurveTo(cx, cy, x, y float64) { - // f.outf("%.5f %.5f %.5f %.5f v", cx*f.k, (f.h-cy)*f.k, x*f.k, (f.h-y)*f.k) - const prec = 5 - f.putF64(cx*f.k, prec) - f.put(" ") - f.putF64((f.h-cy)*f.k, prec) - f.put(" ") - f.putF64(x*f.k, prec) - f.put(" ") - f.putF64((f.h-y)*f.k, prec) - f.put(" v\n") - f.x, f.y = x, y -} - -// CurveBezierCubicTo creates a single-segment cubic Bézier curve. The curve -// starts at the current stylus location and ends at the point (x, y). The -// control points (cx0, cy0) and (cx1, cy1) specify the curvature. At the -// current stylus, the curve is tangent to the straight line between the -// current stylus location and the control point (cx0, cy0). At the end point, -// the curve is tangent to the straight line between the end point and the -// control point (cx1, cy1). -// -// The MoveTo() example demonstrates this method. -func (f *Fpdf) CurveBezierCubicTo(cx0, cy0, cx1, cy1, x, y float64) { - f.curve(cx0, cy0, cx1, cy1, x, y) - f.x, f.y = x, y -} - -// ClosePath creates a line from the current location to the last MoveTo point -// (if not the same) and mark the path as closed so the first and last lines -// join nicely. -// -// The MoveTo() example demonstrates this method. -func (f *Fpdf) ClosePath() { - f.outf("h") -} - -// DrawPath actually draws the path on the page. -// -// styleStr can be "F" for filled, "D" for outlined only, or "DF" or "FD" for -// outlined and filled. An empty string will be replaced with "D". -// Path-painting operators as defined in the PDF specification are also -// allowed: "S" (Stroke the path), "s" (Close and stroke the path), -// "f" (fill the path, using the nonzero winding number), "f*" -// (Fill the path, using the even-odd rule), "B" (Fill and then stroke -// the path, using the nonzero winding number rule), "B*" (Fill and -// then stroke the path, using the even-odd rule), "b" (Close, fill, -// and then stroke the path, using the nonzero winding number rule) and -// "b*" (Close, fill, and then stroke the path, using the even-odd -// rule). -// Drawing uses the current draw color, line width, and cap style -// centered on the -// path. Filling uses the current fill color. -// -// The MoveTo() example demonstrates this method. -func (f *Fpdf) DrawPath(styleStr string) { - f.outf(fillDrawOp(styleStr)) -} - -// ArcTo draws an elliptical arc centered at point (x, y). rx and ry specify its -// horizontal and vertical radii. If the start of the arc is not at -// the current position, a connecting line will be drawn. -// -// degRotate specifies the angle that the arc will be rotated. degStart and -// degEnd specify the starting and ending angle of the arc. All angles are -// specified in degrees and measured counter-clockwise from the 3 o'clock -// position. -// -// styleStr can be "F" for filled, "D" for outlined only, or "DF" or "FD" for -// outlined and filled. An empty string will be replaced with "D". Drawing uses -// the current draw color, line width, and cap style centered on the arc's -// path. Filling uses the current fill color. -// -// The MoveTo() example demonstrates this method. -func (f *Fpdf) ArcTo(x, y, rx, ry, degRotate, degStart, degEnd float64) { - f.arc(x, y, rx, ry, degRotate, degStart, degEnd, "", true) -} - -func (f *Fpdf) arc(x, y, rx, ry, degRotate, degStart, degEnd float64, - styleStr string, path bool) { - x *= f.k - y = (f.h - y) * f.k - rx *= f.k - ry *= f.k - segments := int(degEnd-degStart) / 60 - if segments < 2 { - segments = 2 - } - angleStart := degStart * math.Pi / 180 - angleEnd := degEnd * math.Pi / 180 - angleTotal := angleEnd - angleStart - dt := angleTotal / float64(segments) - dtm := dt / 3 - if degRotate != 0 { - a := -degRotate * math.Pi / 180 - sin, cos := math.Sincos(a) - // f.outf("q %.5f %.5f %.5f %.5f %.5f %.5f cm", - // math.Cos(a), -1*math.Sin(a), - // math.Sin(a), math.Cos(a), x, y) - const prec = 5 - f.put("q ") - f.putF64(cos, prec) - f.put(" ") - f.putF64(-1*sin, prec) - f.put(" ") - f.putF64(sin, prec) - f.put(" ") - f.putF64(cos, prec) - f.put(" ") - f.putF64(x, prec) - f.put(" ") - f.putF64(y, prec) - f.put(" cm\n") - - x = 0 - y = 0 - } - t := angleStart - a0 := x + rx*math.Cos(t) - b0 := y + ry*math.Sin(t) - c0 := -rx * math.Sin(t) - d0 := ry * math.Cos(t) - sx := a0 / f.k // start point of arc - sy := f.h - (b0 / f.k) - if path { - if f.x != sx || f.y != sy { - // Draw connecting line to start point - f.LineTo(sx, sy) - } - } else { - f.point(sx, sy) - } - for j := 1; j <= segments; j++ { - // Draw this bit of the total curve - t = (float64(j) * dt) + angleStart - a1 := x + rx*math.Cos(t) - b1 := y + ry*math.Sin(t) - c1 := -rx * math.Sin(t) - d1 := ry * math.Cos(t) - f.curve((a0+(c0*dtm))/f.k, - f.h-((b0+(d0*dtm))/f.k), - (a1-(c1*dtm))/f.k, - f.h-((b1-(d1*dtm))/f.k), - a1/f.k, - f.h-(b1/f.k)) - a0 = a1 - b0 = b1 - c0 = c1 - d0 = d1 - if path { - f.x = a1 / f.k - f.y = f.h - (b1 / f.k) - } - } - if !path { - f.out(fillDrawOp(styleStr)) - } - if degRotate != 0 { - f.out("Q") - } -} diff --git a/vendor/github.com/go-pdf/fpdf/fpdftrans.go b/vendor/github.com/go-pdf/fpdf/fpdftrans.go deleted file mode 100644 index f319ad6..0000000 --- a/vendor/github.com/go-pdf/fpdf/fpdftrans.go +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package fpdf - -import ( - "fmt" - "math" -) - -// Routines in this file are translated from the work of Moritz Wagner and -// Andreas Würmser. - -// TransformMatrix is used for generalized transformations of text, drawings -// and images. -type TransformMatrix struct { - A, B, C, D, E, F float64 -} - -// TransformBegin sets up a transformation context for subsequent text, -// drawings and images. The typical usage is to immediately follow a call to -// this method with a call to one or more of the transformation methods such as -// TransformScale(), TransformSkew(), etc. This is followed by text, drawing or -// image output and finally a call to TransformEnd(). All transformation -// contexts must be properly ended prior to outputting the document. -func (f *Fpdf) TransformBegin() { - f.transformNest++ - f.out("q") -} - -// TransformScaleX scales the width of the following text, drawings and images. -// scaleWd is the percentage scaling factor. (x, y) is center of scaling. -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformScaleX(scaleWd, x, y float64) { - f.TransformScale(scaleWd, 100, x, y) -} - -// TransformScaleY scales the height of the following text, drawings and -// images. scaleHt is the percentage scaling factor. (x, y) is center of -// scaling. -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformScaleY(scaleHt, x, y float64) { - f.TransformScale(100, scaleHt, x, y) -} - -// TransformScaleXY uniformly scales the width and height of the following -// text, drawings and images. s is the percentage scaling factor for both width -// and height. (x, y) is center of scaling. -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformScaleXY(s, x, y float64) { - f.TransformScale(s, s, x, y) -} - -// TransformScale generally scales the following text, drawings and images. -// scaleWd and scaleHt are the percentage scaling factors for width and height. -// (x, y) is center of scaling. -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformScale(scaleWd, scaleHt, x, y float64) { - if scaleWd == 0 || scaleHt == 0 { - f.err = fmt.Errorf("scale factor cannot be zero") - return - } - y = (f.h - y) * f.k - x *= f.k - scaleWd /= 100 - scaleHt /= 100 - f.Transform(TransformMatrix{scaleWd, 0, 0, - scaleHt, x * (1 - scaleWd), y * (1 - scaleHt)}) -} - -// TransformMirrorHorizontal horizontally mirrors the following text, drawings -// and images. x is the axis of reflection. -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformMirrorHorizontal(x float64) { - f.TransformScale(-100, 100, x, f.y) -} - -// TransformMirrorVertical vertically mirrors the following text, drawings and -// images. y is the axis of reflection. -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformMirrorVertical(y float64) { - f.TransformScale(100, -100, f.x, y) -} - -// TransformMirrorPoint symmetrically mirrors the following text, drawings and -// images on the point specified by (x, y). -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformMirrorPoint(x, y float64) { - f.TransformScale(-100, -100, x, y) -} - -// TransformMirrorLine symmetrically mirrors the following text, drawings and -// images on the line defined by angle and the point (x, y). angles is -// specified in degrees and measured counter-clockwise from the 3 o'clock -// position. -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformMirrorLine(angle, x, y float64) { - f.TransformScale(-100, 100, x, y) - f.TransformRotate(-2*(angle-90), x, y) -} - -// TransformTranslateX moves the following text, drawings and images -// horizontally by the amount specified by tx. -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformTranslateX(tx float64) { - f.TransformTranslate(tx, 0) -} - -// TransformTranslateY moves the following text, drawings and images vertically -// by the amount specified by ty. -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformTranslateY(ty float64) { - f.TransformTranslate(0, ty) -} - -// TransformTranslate moves the following text, drawings and images -// horizontally and vertically by the amounts specified by tx and ty. -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformTranslate(tx, ty float64) { - f.Transform(TransformMatrix{1, 0, 0, 1, tx * f.k, -ty * f.k}) -} - -// TransformRotate rotates the following text, drawings and images around the -// center point (x, y). angle is specified in degrees and measured -// counter-clockwise from the 3 o'clock position. -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformRotate(angle, x, y float64) { - y = (f.h - y) * f.k - x *= f.k - angle = angle * math.Pi / 180 - var tm TransformMatrix - tm.A = math.Cos(angle) - tm.B = math.Sin(angle) - tm.C = -tm.B - tm.D = tm.A - tm.E = x + tm.B*y - tm.A*x - tm.F = y - tm.A*y - tm.B*x - f.Transform(tm) -} - -// TransformSkewX horizontally skews the following text, drawings and images -// keeping the point (x, y) stationary. angleX ranges from -90 degrees (skew to -// the left) to 90 degrees (skew to the right). -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformSkewX(angleX, x, y float64) { - f.TransformSkew(angleX, 0, x, y) -} - -// TransformSkewY vertically skews the following text, drawings and images -// keeping the point (x, y) stationary. angleY ranges from -90 degrees (skew to -// the bottom) to 90 degrees (skew to the top). -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformSkewY(angleY, x, y float64) { - f.TransformSkew(0, angleY, x, y) -} - -// TransformSkew generally skews the following text, drawings and images -// keeping the point (x, y) stationary. angleX ranges from -90 degrees (skew to -// the left) to 90 degrees (skew to the right). angleY ranges from -90 degrees -// (skew to the bottom) to 90 degrees (skew to the top). -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformSkew(angleX, angleY, x, y float64) { - if angleX <= -90 || angleX >= 90 || angleY <= -90 || angleY >= 90 { - f.err = fmt.Errorf("skew values must be between -90° and 90°") - return - } - x *= f.k - y = (f.h - y) * f.k - var tm TransformMatrix - tm.A = 1 - tm.B = math.Tan(angleY * math.Pi / 180) - tm.C = math.Tan(angleX * math.Pi / 180) - tm.D = 1 - tm.E = -tm.C * y - tm.F = -tm.B * x - f.Transform(tm) -} - -// Transform generally transforms the following text, drawings and images -// according to the specified matrix. It is typically easier to use the various -// methods such as TransformRotate() and TransformMirrorVertical() instead. -func (f *Fpdf) Transform(tm TransformMatrix) { - if f.transformNest > 0 { - f.outf("%.5f %.5f %.5f %.5f %.5f %.5f cm", - tm.A, tm.B, tm.C, tm.D, tm.E, tm.F) - } else if f.err == nil { - f.err = fmt.Errorf("transformation context is not active") - } -} - -// TransformEnd applies a transformation that was begun with a call to TransformBegin(). -// -// The TransformBegin() example demonstrates this method. -func (f *Fpdf) TransformEnd() { - if f.transformNest > 0 { - f.transformNest-- - f.out("Q") - } else { - f.err = fmt.Errorf("error attempting to end transformation operation out of sequence") - } -} diff --git a/vendor/github.com/go-pdf/fpdf/grid.go b/vendor/github.com/go-pdf/fpdf/grid.go deleted file mode 100644 index 5ab37e9..0000000 --- a/vendor/github.com/go-pdf/fpdf/grid.go +++ /dev/null @@ -1,447 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package fpdf - -import ( - "math" - "strconv" -) - -// RGBType holds fields for red, green and blue color components (0..255) -type RGBType struct { - R, G, B int -} - -// RGBAType holds fields for red, green and blue color components (0..255) and -// an alpha transparency value (0..1) -type RGBAType struct { - R, G, B int - Alpha float64 -} - -// StateType holds various commonly used drawing values for convenient -// retrieval (StateGet()) and restore (Put) methods. -type StateType struct { - clrDraw, clrText, clrFill RGBType - lineWd float64 - fontSize float64 - alpha float64 - blendStr string - cellMargin float64 -} - -// StateGet returns a variable that contains common state values. -func StateGet(pdf *Fpdf) (st StateType) { - st.clrDraw.R, st.clrDraw.G, st.clrDraw.B = pdf.GetDrawColor() - st.clrFill.R, st.clrFill.G, st.clrFill.B = pdf.GetFillColor() - st.clrText.R, st.clrText.G, st.clrText.B = pdf.GetTextColor() - st.lineWd = pdf.GetLineWidth() - _, st.fontSize = pdf.GetFontSize() - st.alpha, st.blendStr = pdf.GetAlpha() - st.cellMargin = pdf.GetCellMargin() - return -} - -// Put sets the common state values contained in the state structure -// specified by st. -func (st StateType) Put(pdf *Fpdf) { - pdf.SetDrawColor(st.clrDraw.R, st.clrDraw.G, st.clrDraw.B) - pdf.SetFillColor(st.clrFill.R, st.clrFill.G, st.clrFill.B) - pdf.SetTextColor(st.clrText.R, st.clrText.G, st.clrText.B) - pdf.SetLineWidth(st.lineWd) - pdf.SetFontUnitSize(st.fontSize) - pdf.SetAlpha(st.alpha, st.blendStr) - pdf.SetCellMargin(st.cellMargin) -} - -// TickFormatFncType defines a callback for label drawing. -type TickFormatFncType func(val float64, precision int) string - -// defaultFormatter returns the string form of val with precision decimal places. -func defaultFormatter(val float64, precision int) string { - return strconv.FormatFloat(val, 'f', precision, 64) -} - -// GridType assists with the generation of graphs. It allows the application to -// work with logical data coordinates rather than page coordinates and assists -// with the drawing of a background grid. -type GridType struct { - // Chart coordinates in page units - x, y, w, h float64 - // X, Y, Wd, Ht float64 - // Slopes and intercepts scale data points to graph coordinates linearly - xm, xb, ym, yb float64 - // Tickmarks - xTicks, yTicks []float64 - // Labels are inside of graph boundary - XLabelIn, YLabelIn bool - // Labels on X-axis should be rotated - XLabelRotate bool - // Formatters; use nil to eliminate labels - XTickStr, YTickStr TickFormatFncType - // Subdivisions between tickmarks - XDiv, YDiv int - // Formatting precision - xPrecision, yPrecision int - // Line and label colors - ClrText, ClrMain, ClrSub RGBAType - // Line thickness - WdMain, WdSub float64 - // Label height in points - TextSize float64 -} - -// linear returns the slope and y-intercept of the straight line joining the -// two specified points. For scaling purposes, associate the arguments as -// follows: x1: observed low value, y1: desired low value, x2: observed high -// value, y2: desired high value. -func linear(x1, y1, x2, y2 float64) (slope, intercept float64) { - if x2 != x1 { - slope = (y2 - y1) / (x2 - x1) - intercept = y2 - x2*slope - } - return -} - -// linearTickmark returns the slope and intercept that will linearly map data -// values (the range of which is specified by the tickmark slice tm) to page -// values (the range of which is specified by lo and hi). -func linearTickmark(tm []float64, lo, hi float64) (slope, intercept float64) { - ln := len(tm) - if ln > 0 { - slope, intercept = linear(tm[0], lo, tm[ln-1], hi) - } - return -} - -// NewGrid returns a variable of type GridType that is initialized to draw on a -// rectangle of width w and height h with the upper left corner positioned at -// point (x, y). The coordinates are in page units, that is, the same as those -// specified in New(). -// -// The returned variable is initialized with a very simple default tickmark -// layout that ranges from 0 to 1 in both axes. Prior to calling Grid(), the -// application may establish a more suitable tickmark layout by calling the -// methods TickmarksContainX() and TickmarksContainY(). These methods bound the -// data range with appropriate boundaries and divisions. Alternatively, if the -// exact extent and divisions of the tickmark layout are known, the methods -// TickmarksExtentX() and TickmarksExtentY may be called instead. -func NewGrid(x, y, w, h float64) (grid GridType) { - grid.x = x - grid.y = y - grid.w = w - grid.h = h - grid.TextSize = 7 // Points - grid.TickmarksExtentX(0, 1, 1) - grid.TickmarksExtentY(0, 1, 1) - grid.XLabelIn = false - grid.YLabelIn = false - grid.XLabelRotate = false - grid.XDiv = 10 - grid.YDiv = 10 - grid.ClrText = RGBAType{R: 0, G: 0, B: 0, Alpha: 1} - grid.ClrMain = RGBAType{R: 128, G: 160, B: 128, Alpha: 1} - grid.ClrSub = RGBAType{R: 192, G: 224, B: 192, Alpha: 1} - grid.WdMain = 0.1 - grid.WdSub = 0.1 - grid.YTickStr = defaultFormatter - grid.XTickStr = defaultFormatter - return -} - -// WdAbs returns the absolute value of dataWd, specified in logical data units, -// that has been converted to the unit of measure specified in New(). -func (g GridType) WdAbs(dataWd float64) float64 { - return math.Abs(g.xm * dataWd) -} - -// Wd converts dataWd, specified in logical data units, to the unit of measure -// specified in New(). -func (g GridType) Wd(dataWd float64) float64 { - return g.xm * dataWd -} - -// XY converts dataX and dataY, specified in logical data units, to the X and Y -// position on the current page. -func (g GridType) XY(dataX, dataY float64) (x, y float64) { - return g.xm*dataX + g.xb, g.ym*dataY + g.yb -} - -// Pos returns the point, in page units, indicated by the relative positions -// xRel and yRel. These are values between 0 and 1. xRel specifies the relative -// position between the grid's left and right edges. yRel specifies the -// relative position between the grid's bottom and top edges. -func (g GridType) Pos(xRel, yRel float64) (x, y float64) { - x = g.w*xRel + g.x - y = g.h*(1-yRel) + g.y - return -} - -// X converts dataX, specified in logical data units, to the X position on the -// current page. -func (g GridType) X(dataX float64) float64 { - return g.xm*dataX + g.xb -} - -// HtAbs returns the absolute value of dataHt, specified in logical data units, -// that has been converted to the unit of measure specified in New(). -func (g GridType) HtAbs(dataHt float64) float64 { - return math.Abs(g.ym * dataHt) -} - -// Ht converts dataHt, specified in logical data units, to the unit of measure -// specified in New(). -func (g GridType) Ht(dataHt float64) float64 { - return g.ym * dataHt -} - -// Y converts dataY, specified in logical data units, to the Y position on the -// current page. -func (g GridType) Y(dataY float64) float64 { - return g.ym*dataY + g.yb -} - -// XRange returns the minimum and maximum values for the current tickmark -// sequence. These correspond to the data values of the graph's left and right -// edges. -func (g GridType) XRange() (min, max float64) { - min = g.xTicks[0] - max = g.xTicks[len(g.xTicks)-1] - return -} - -// YRange returns the minimum and maximum values for the current tickmark -// sequence. These correspond to the data values of the graph's bottom and top -// edges. -func (g GridType) YRange() (min, max float64) { - min = g.yTicks[0] - max = g.yTicks[len(g.yTicks)-1] - return -} - -// TickmarksContainX sets the tickmarks to be shown by Grid() in the horizontal -// dimension. The argument min and max specify the minimum and maximum values -// to be contained within the grid. The tickmark values that are generated are -// suitable for general purpose graphs. -// -// See TickmarkExtentX() for an alternative to this method to be used when the -// exact values of the tickmarks are to be set by the application. -func (g *GridType) TickmarksContainX(min, max float64) { - g.xTicks, g.xPrecision = Tickmarks(min, max) - g.xm, g.xb = linearTickmark(g.xTicks, g.x, g.x+g.w) -} - -// TickmarksContainY sets the tickmarks to be shown by Grid() in the vertical -// dimension. The argument min and max specify the minimum and maximum values -// to be contained within the grid. The tickmark values that are generated are -// suitable for general purpose graphs. -// -// See TickmarkExtentY() for an alternative to this method to be used when the -// exact values of the tickmarks are to be set by the application. -func (g *GridType) TickmarksContainY(min, max float64) { - g.yTicks, g.yPrecision = Tickmarks(min, max) - g.ym, g.yb = linearTickmark(g.yTicks, g.y+g.h, g.y) -} - -func extent(min, div float64, count int) (tm []float64, precision int) { - tm = make([]float64, count+1) - for j := 0; j <= count; j++ { - tm[j] = min - min += div - } - precision = TickmarkPrecision(div) - return -} - -// TickmarksExtentX sets the tickmarks to be shown by Grid() in the horizontal -// dimension. count specifies number of major tickmark subdivisions to be -// graphed. min specifies the leftmost data value. div specifies, in data -// units, the extent of each major tickmark subdivision. -// -// See TickmarkContainX() for an alternative to this method to be used when -// viewer-friendly tickmarks are to be determined automatically. -func (g *GridType) TickmarksExtentX(min, div float64, count int) { - g.xTicks, g.xPrecision = extent(min, div, count) - g.xm, g.xb = linearTickmark(g.xTicks, g.x, g.x+g.w) -} - -// TickmarksExtentY sets the tickmarks to be shown by Grid() in the vertical -// dimension. count specifies number of major tickmark subdivisions to be -// graphed. min specifies the bottommost data value. div specifies, in data -// units, the extent of each major tickmark subdivision. -// -// See TickmarkContainY() for an alternative to this method to be used when -// viewer-friendly tickmarks are to be determined automatically. -func (g *GridType) TickmarksExtentY(min, div float64, count int) { - g.yTicks, g.yPrecision = extent(min, div, count) - g.ym, g.yb = linearTickmark(g.yTicks, g.y+g.h, g.y) -} - -// func (g *GridType) SetXExtent(dataLf, paperLf, dataRt, paperRt float64) { -// g.xm, g.xb = linear(dataLf, paperLf, dataRt, paperRt) -// } - -// func (g *GridType) SetYExtent(dataTp, paperTp, dataBt, paperBt float64) { -// g.ym, g.yb = linear(dataTp, paperTp, dataBt, paperBt) -// } - -func lineAttr(pdf *Fpdf, clr RGBAType, lineWd float64) { - pdf.SetLineWidth(lineWd) - pdf.SetAlpha(clr.Alpha, "Normal") - pdf.SetDrawColor(clr.R, clr.G, clr.B) -} - -// Grid generates a graph-paperlike set of grid lines on the current page. -func (g GridType) Grid(pdf *Fpdf) { - var st StateType - var yLen, xLen int - var textSz, halfTextSz, yMin, yMax, xMin, xMax, yDiv, xDiv float64 - var str string - var strOfs, strWd, tp, bt, lf, rt, drawX, drawY float64 - - xLen = len(g.xTicks) - yLen = len(g.yTicks) - if xLen > 1 && yLen > 1 { - - st = StateGet(pdf) - - line := func(x1, y1, x2, y2 float64, heavy bool) { - if heavy { - lineAttr(pdf, g.ClrMain, g.WdMain) - } else { - lineAttr(pdf, g.ClrSub, g.WdSub) - } - pdf.Line(x1, y1, x2, y2) - } - - textSz = pdf.PointToUnitConvert(g.TextSize) - halfTextSz = textSz / 2 - - pdf.SetAutoPageBreak(false, 0) - pdf.SetFontUnitSize(textSz) - strOfs = pdf.GetStringWidth("0") - pdf.SetFillColor(255, 255, 255) - pdf.SetCellMargin(0) - - xMin = g.xTicks[0] - xMax = g.xTicks[xLen-1] - - yMin = g.yTicks[0] - yMax = g.yTicks[yLen-1] - - lf = g.X(xMin) - rt = g.X(xMax) - bt = g.Y(yMin) - tp = g.Y(yMax) - - // Verticals along X axis - xDiv = g.xTicks[1] - g.xTicks[0] - if g.XDiv > 0 { - xDiv = xDiv / float64(g.XDiv) - } - xDiv = g.Wd(xDiv) - for j, x := range g.xTicks { - drawX = g.X(x) - line(drawX, tp, drawX, bt, true) - if j < xLen-1 { - for k := 1; k < g.XDiv; k++ { - drawX += xDiv - line(drawX, tp, drawX, bt, false) - } - } - } - - // Horizontals along Y axis - yDiv = g.yTicks[1] - g.yTicks[0] - if g.YDiv > 0 { - yDiv = yDiv / float64(g.YDiv) - } - yDiv = g.Ht(yDiv) - for j, y := range g.yTicks { - drawY = g.Y(y) - line(lf, drawY, rt, drawY, true) - if j < yLen-1 { - for k := 1; k < g.YDiv; k++ { - drawY += yDiv - line(lf, drawY, rt, drawY, false) - } - } - } - - // X labels - if g.XTickStr != nil { - drawY = bt - for _, x := range g.xTicks { - str = g.XTickStr(x, g.xPrecision) - strWd = pdf.GetStringWidth(str) - drawX = g.X(x) - if g.XLabelRotate { - pdf.TransformBegin() - pdf.TransformRotate(90, drawX, drawY) - if g.XLabelIn { - pdf.SetXY(drawX+strOfs, drawY-halfTextSz) - } else { - pdf.SetXY(drawX-strOfs-strWd, drawY-halfTextSz) - } - pdf.CellFormat(strWd, textSz, str, "", 0, "L", true, 0, "") - pdf.TransformEnd() - } else { - drawX -= strWd / 2.0 - if g.XLabelIn { - pdf.SetXY(drawX, drawY-textSz-strOfs) - } else { - pdf.SetXY(drawX, drawY+strOfs) - } - pdf.CellFormat(strWd, textSz, str, "", 0, "L", true, 0, "") - } - } - } - - // Y labels - if g.YTickStr != nil { - drawX = lf - for _, y := range g.yTicks { - // str = strconv.FormatFloat(y, 'f', g.yPrecision, 64) - str = g.YTickStr(y, g.yPrecision) - strWd = pdf.GetStringWidth(str) - if g.YLabelIn { - pdf.SetXY(drawX+strOfs, g.Y(y)-halfTextSz) - } else { - pdf.SetXY(lf-strOfs-strWd, g.Y(y)-halfTextSz) - } - pdf.CellFormat(strWd, textSz, str, "", 0, "L", true, 0, "") - } - } - - // Restore drawing attributes - st.Put(pdf) - - } - -} - -// Plot plots a series of count line segments from xMin to xMax. It repeatedly -// calls fnc(x) to retrieve the y value associate with x. The currently -// selected line drawing attributes are used. -func (g GridType) Plot(pdf *Fpdf, xMin, xMax float64, count int, fnc func(x float64) (y float64)) { - if count > 0 { - var x, delta, drawX0, drawY0, drawX1, drawY1 float64 - delta = (xMax - xMin) / float64(count) - x = xMin - for j := 0; j <= count; j++ { - if j == 0 { - drawX1 = g.X(x) - drawY1 = g.Y(fnc(x)) - } else { - pdf.Line(drawX0, drawY0, drawX1, drawY1) - } - x += delta - drawX0 = drawX1 - drawY0 = drawY1 - drawX1 = g.X(x) - drawY1 = g.Y(fnc(x)) - } - } -} diff --git a/vendor/github.com/go-pdf/fpdf/htmlbasic.go b/vendor/github.com/go-pdf/fpdf/htmlbasic.go deleted file mode 100644 index 82b16ec..0000000 --- a/vendor/github.com/go-pdf/fpdf/htmlbasic.go +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2014 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -import ( - "regexp" - "strings" -) - -// HTMLBasicSegmentType defines a segment of literal text in which the current -// attributes do not vary, or an open tag or a close tag. -type HTMLBasicSegmentType struct { - Cat byte // 'O' open tag, 'C' close tag, 'T' text - Str string // Literal text unchanged, tags are lower case - Attr map[string]string // Attribute keys are lower case -} - -// HTMLBasicTokenize returns a list of HTML tags and literal elements. This is -// done with regular expressions, so the result is only marginally better than -// useless. -func HTMLBasicTokenize(htmlStr string) (list []HTMLBasicSegmentType) { - // This routine is adapted from http://www.fpdf.org/ - list = make([]HTMLBasicSegmentType, 0, 16) - htmlStr = strings.Replace(htmlStr, "\n", " ", -1) - htmlStr = strings.Replace(htmlStr, "\r", "", -1) - tagRe, _ := regexp.Compile(`(?U)<.*>`) - attrRe, _ := regexp.Compile(`([^=]+)=["']?([^"']+)`) - capList := tagRe.FindAllStringIndex(htmlStr, -1) - if capList != nil { - var seg HTMLBasicSegmentType - var parts []string - pos := 0 - for _, cap := range capList { - if pos < cap[0] { - seg.Cat = 'T' - seg.Str = htmlStr[pos:cap[0]] - seg.Attr = nil - list = append(list, seg) - } - if htmlStr[cap[0]+1] == '/' { - seg.Cat = 'C' - seg.Str = strings.ToLower(htmlStr[cap[0]+2 : cap[1]-1]) - seg.Attr = nil - list = append(list, seg) - } else { - // Extract attributes - parts = strings.Split(htmlStr[cap[0]+1:cap[1]-1], " ") - if len(parts) > 0 { - for j, part := range parts { - if j == 0 { - seg.Cat = 'O' - seg.Str = strings.ToLower(parts[0]) - seg.Attr = make(map[string]string) - } else { - attrList := attrRe.FindAllStringSubmatch(part, -1) - for _, attr := range attrList { - seg.Attr[strings.ToLower(attr[1])] = attr[2] - } - } - } - list = append(list, seg) - } - } - pos = cap[1] - } - if len(htmlStr) > pos { - seg.Cat = 'T' - seg.Str = htmlStr[pos:] - seg.Attr = nil - list = append(list, seg) - } - } else { - list = append(list, HTMLBasicSegmentType{Cat: 'T', Str: htmlStr, Attr: nil}) - } - return -} - -// HTMLBasicType is used for rendering a very basic subset of HTML. It supports -// only hyperlinks and bold, italic and underscore attributes. In the Link -// structure, the ClrR, ClrG and ClrB fields (0 through 255) define the color -// of hyperlinks. The Bold, Italic and Underscore values define the hyperlink -// style. -type HTMLBasicType struct { - pdf *Fpdf - Link struct { - ClrR, ClrG, ClrB int - Bold, Italic, Underscore bool - } -} - -// HTMLBasicNew returns an instance that facilitates writing basic HTML in the -// specified PDF file. -func (f *Fpdf) HTMLBasicNew() (html HTMLBasicType) { - html.pdf = f - html.Link.ClrR, html.Link.ClrG, html.Link.ClrB = 0, 0, 128 - html.Link.Bold, html.Link.Italic, html.Link.Underscore = false, false, true - return -} - -// Write prints text from the current position using the currently selected -// font. See HTMLBasicNew() to create a receiver that is associated with the -// PDF document instance. The text can be encoded with a basic subset of HTML -// that includes hyperlinks and tags for italic (I), bold (B), underscore -// (U) and center (CENTER) attributes. When the right margin is reached a line -// break occurs and text continues from the left margin. Upon method exit, the -// current position is left at the end of the text. -// -// lineHt indicates the line height in the unit of measure specified in New(). -func (html *HTMLBasicType) Write(lineHt float64, htmlStr string) { - var boldLvl, italicLvl, underscoreLvl, linkBold, linkItalic, linkUnderscore int - var textR, textG, textB = html.pdf.GetTextColor() - var hrefStr string - if html.Link.Bold { - linkBold = 1 - } - if html.Link.Italic { - linkItalic = 1 - } - if html.Link.Underscore { - linkUnderscore = 1 - } - setStyle := func(boldAdj, italicAdj, underscoreAdj int) { - styleStr := "" - boldLvl += boldAdj - if boldLvl > 0 { - styleStr += "B" - } - italicLvl += italicAdj - if italicLvl > 0 { - styleStr += "I" - } - underscoreLvl += underscoreAdj - if underscoreLvl > 0 { - styleStr += "U" - } - html.pdf.SetFont("", styleStr, 0) - } - putLink := func(urlStr, txtStr string) { - // Put a hyperlink - html.pdf.SetTextColor(html.Link.ClrR, html.Link.ClrG, html.Link.ClrB) - setStyle(linkBold, linkItalic, linkUnderscore) - html.pdf.WriteLinkString(lineHt, txtStr, urlStr) - setStyle(-linkBold, -linkItalic, -linkUnderscore) - html.pdf.SetTextColor(textR, textG, textB) - } - list := HTMLBasicTokenize(htmlStr) - var ok bool - alignStr := "L" - for _, el := range list { - switch el.Cat { - case 'T': - if len(hrefStr) > 0 { - putLink(hrefStr, el.Str) - hrefStr = "" - } else { - if alignStr == "C" || alignStr == "R" { - html.pdf.WriteAligned(0, lineHt, el.Str, alignStr) - } else { - html.pdf.Write(lineHt, el.Str) - } - } - case 'O': - switch el.Str { - case "b": - setStyle(1, 0, 0) - case "i": - setStyle(0, 1, 0) - case "u": - setStyle(0, 0, 1) - case "br": - html.pdf.Ln(lineHt) - case "center": - html.pdf.Ln(lineHt) - alignStr = "C" - case "right": - html.pdf.Ln(lineHt) - alignStr = "R" - case "left": - html.pdf.Ln(lineHt) - alignStr = "L" - case "a": - hrefStr, ok = el.Attr["href"] - if !ok { - hrefStr = "" - } - } - case 'C': - switch el.Str { - case "b": - setStyle(-1, 0, 0) - case "i": - setStyle(0, -1, 0) - case "u": - setStyle(0, 0, -1) - case "center": - html.pdf.Ln(lineHt) - alignStr = "L" - case "right": - html.pdf.Ln(lineHt) - alignStr = "L" - } - } - } -} diff --git a/vendor/github.com/go-pdf/fpdf/label.go b/vendor/github.com/go-pdf/fpdf/label.go deleted file mode 100644 index 1024c1d..0000000 --- a/vendor/github.com/go-pdf/fpdf/label.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package fpdf - -// Adapted from Nice Numbers for Graph Labels by Paul Heckbert from "Graphics -// Gems", Academic Press, 1990 - -// Paul Heckbert 2 Dec 88 - -// https://github.com/erich666/GraphicsGems - -// LICENSE - -// This code repository predates the concept of Open Source, and predates most -// licenses along such lines. As such, the official license truly is: - -// EULA: The Graphics Gems code is copyright-protected. In other words, you -// cannot claim the text of the code as your own and resell it. Using the code -// is permitted in any program, product, or library, non-commercial or -// commercial. Giving credit is not required, though is a nice gesture. The -// code comes as-is, and if there are any flaws or problems with any Gems code, -// nobody involved with Gems - authors, editors, publishers, or webmasters - -// are to be held responsible. Basically, don't be a jerk, and remember that -// anything free comes with no guarantee. - -import ( - "math" -) - -// niceNum returns a "nice" number approximately equal to x. The number is -// rounded if round is true, converted to its ceiling otherwise. -func niceNum(val float64, round bool) float64 { - var nf float64 - - exp := int(math.Floor(math.Log10(val))) - f := val / math.Pow10(exp) - if round { - switch { - case f < 1.5: - nf = 1 - case f < 3.0: - nf = 2 - case f < 7.0: - nf = 5 - default: - nf = 10 - } - } else { - switch { - case f <= 1: - nf = 1 - case f <= 2.0: - nf = 2 - case f <= 5.0: - nf = 5 - default: - nf = 10 - } - } - return nf * math.Pow10(exp) -} - -// TickmarkPrecision returns an appropriate precision value for label -// formatting. -func TickmarkPrecision(div float64) int { - return int(math.Max(-math.Floor(math.Log10(div)), 0)) -} - -// Tickmarks returns a slice of tickmarks appropriate for a chart axis and an -// appropriate precision for formatting purposes. The values min and max will -// be contained within the tickmark range. -func Tickmarks(min, max float64) (list []float64, precision int) { - if max > min { - spread := niceNum(max-min, false) - d := niceNum((spread / 4), true) - graphMin := math.Floor(min/d) * d - graphMax := math.Ceil(max/d) * d - precision = TickmarkPrecision(d) - for x := graphMin; x < graphMax+0.5*d; x += d { - list = append(list, x) - } - } - return -} diff --git a/vendor/github.com/go-pdf/fpdf/layer.go b/vendor/github.com/go-pdf/fpdf/layer.go deleted file mode 100644 index db215eb..0000000 --- a/vendor/github.com/go-pdf/fpdf/layer.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2014 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -// Routines in this file are translated from -// http://www.fpdf.org/en/script/script97.php - -type layerType struct { - name string - visible bool - objNum int // object number -} - -type layerRecType struct { - list []layerType - currentLayer int - openLayerPane bool -} - -func (f *Fpdf) layerInit() { - f.layer.list = make([]layerType, 0) - f.layer.currentLayer = -1 - f.layer.openLayerPane = false -} - -// AddLayer defines a layer that can be shown or hidden when the document is -// displayed. name specifies the layer name that the document reader will -// display in the layer list. visible specifies whether the layer will be -// initially visible. The return value is an integer ID that is used in a call -// to BeginLayer(). -func (f *Fpdf) AddLayer(name string, visible bool) (layerID int) { - layerID = len(f.layer.list) - f.layer.list = append(f.layer.list, layerType{name: name, visible: visible}) - return -} - -// BeginLayer is called to begin adding content to the specified layer. All -// content added to the page between a call to BeginLayer and a call to -// EndLayer is added to the layer specified by id. See AddLayer for more -// details. -func (f *Fpdf) BeginLayer(id int) { - f.EndLayer() - if id >= 0 && id < len(f.layer.list) { - f.outf("/OC /OC%d BDC", id) - f.layer.currentLayer = id - } -} - -// EndLayer is called to stop adding content to the currently active layer. See -// BeginLayer for more details. -func (f *Fpdf) EndLayer() { - if f.layer.currentLayer >= 0 { - f.out("EMC") - f.layer.currentLayer = -1 - } -} - -// OpenLayerPane advises the document reader to open the layer pane when the -// document is initially displayed. -func (f *Fpdf) OpenLayerPane() { - f.layer.openLayerPane = true -} - -func (f *Fpdf) layerEndDoc() { - if len(f.layer.list) == 0 { - return - } - if f.pdfVersion < pdfVers1_5 { - f.pdfVersion = pdfVers1_5 - } -} - -func (f *Fpdf) layerPutLayers() { - for j, l := range f.layer.list { - f.newobj() - f.layer.list[j].objNum = f.n - f.outf("<>", f.textstring(utf8toutf16(l.name))) - f.out("endobj") - } -} - -func (f *Fpdf) layerPutResourceDict() { - if len(f.layer.list) > 0 { - f.out("/Properties <<") - for j, layer := range f.layer.list { - f.outf("/OC%d %d 0 R", j, layer.objNum) - } - f.out(">>") - } - -} - -func (f *Fpdf) layerPutCatalog() { - if len(f.layer.list) > 0 { - onStr := "" - offStr := "" - for _, layer := range f.layer.list { - onStr += sprintf("%d 0 R ", layer.objNum) - if !layer.visible { - offStr += sprintf("%d 0 R ", layer.objNum) - } - } - f.outf("/OCProperties <>>>", onStr, offStr, onStr) - if f.layer.openLayerPane { - f.out("/PageMode /UseOC") - } - } -} diff --git a/vendor/github.com/go-pdf/fpdf/png.go b/vendor/github.com/go-pdf/fpdf/png.go deleted file mode 100644 index 32a8b2d..0000000 --- a/vendor/github.com/go-pdf/fpdf/png.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2013-2016 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -import ( - "fmt" - "strings" -) - -func (f *Fpdf) pngColorSpace(ct byte) (colspace string, colorVal int) { - colorVal = 1 - switch ct { - case 0, 4: - colspace = "DeviceGray" - case 2, 6: - colspace = "DeviceRGB" - colorVal = 3 - case 3: - colspace = "Indexed" - default: - f.err = fmt.Errorf("unknown color type in PNG buffer: %d", ct) - } - return -} - -func (f *Fpdf) parsepngstream(r *rbuffer, readdpi bool) (info *ImageInfoType) { - info = f.newImageInfo() - // Check signature - if string(r.Next(8)) != "\x89PNG\x0d\x0a\x1a\x0a" { - f.err = fmt.Errorf("not a PNG buffer") - return - } - // Read header chunk - _ = r.Next(4) - if string(r.Next(4)) != "IHDR" { - f.err = fmt.Errorf("incorrect PNG buffer") - return - } - w := r.i32() - h := r.i32() - bpc := r.u8() - if bpc > 8 { - if f.pdfVersion < pdfVers1_5 { - f.pdfVersion = pdfVers1_5 - } - } - ct := r.u8() - var colspace string - var colorVal int - colspace, colorVal = f.pngColorSpace(ct) - if f.err != nil { - return - } - if r.u8() != 0 { - f.err = fmt.Errorf("'unknown compression method in PNG buffer") - return - } - if r.u8() != 0 { - f.err = fmt.Errorf("'unknown filter method in PNG buffer") - return - } - if r.u8() != 0 { - f.err = fmt.Errorf("interlacing not supported in PNG buffer") - return - } - _ = r.Next(4) - dp := sprintf("/Predictor 15 /Colors %d /BitsPerComponent %d /Columns %d", colorVal, bpc, w) - // Scan chunks looking for palette, transparency and image data - var ( - pal []byte - trns []int - npix = w * h - data = make([]byte, 0, npix/8) - loop = true - ) - for loop { - n := int(r.i32()) - // dbg("Loop [%d]", n) - switch string(r.Next(4)) { - case "PLTE": - // dbg("PLTE") - // Read palette - pal = r.Next(n) - _ = r.Next(4) - case "tRNS": - // dbg("tRNS") - // Read transparency info - t := r.Next(n) - switch ct { - case 0: - trns = []int{int(t[1])} // ord(substr($t,1,1))); - case 2: - trns = []int{int(t[1]), int(t[3]), int(t[5])} // array(ord(substr($t,1,1)), ord(substr($t,3,1)), ord(substr($t,5,1))); - default: - pos := strings.Index(string(t), "\x00") - if pos >= 0 { - trns = []int{pos} // array($pos); - } - } - _ = r.Next(4) - case "IDAT": - // dbg("IDAT") - // Read image data block - data = append(data, r.Next(n)...) - _ = r.Next(4) - case "IEND": - // dbg("IEND") - loop = false - case "pHYs": - // dbg("pHYs") - // png files theoretically support different x/y dpi - // but we ignore files like this - // but if they're the same then we can stamp our info - // object with it - x := int(r.i32()) - y := int(r.i32()) - units := r.u8() - // fmt.Printf("got a pHYs block, x=%d, y=%d, u=%d, readdpi=%t\n", - // x, y, int(units), readdpi) - // only modify the info block if the user wants us to - if x == y && readdpi { - switch units { - // if units is 1 then measurement is px/meter - case 1: - info.dpi = float64(x) / 39.3701 // inches per meter - default: - info.dpi = float64(x) - } - } - _ = r.Next(4) - default: - // dbg("default") - _ = r.Next(n + 4) - } - if loop { - loop = n > 0 - } - } - if colspace == "Indexed" && len(pal) == 0 { - f.err = fmt.Errorf("missing palette in PNG buffer") - } - info.w = float64(w) - info.h = float64(h) - info.cs = colspace - info.bpc = int(bpc) - info.f = "FlateDecode" - info.dp = dp - info.pal = pal - info.trns = trns - // dbg("ct [%d]", ct) - if ct >= 4 { - // Separate alpha and color channels - mem, err := xmem.uncompress(data) - if err != nil { - f.err = err - return - } - data = mem.bytes() - var ( - color wbuffer - alpha wbuffer - ) - if ct == 4 { - // Gray image - width := int(w) - height := int(h) - length := 2 * width - sz := height * (width + 1) - color.p = data[:sz] // reuse decompressed data buffer. - alpha.p = make([]byte, sz) - var pos, elPos int - for i := 0; i < height; i++ { - pos = (1 + length) * i - color.u8(data[pos]) - alpha.u8(data[pos]) - elPos = pos + 1 - for k := 0; k < width; k++ { - color.u8(data[elPos]) - alpha.u8(data[elPos+1]) - elPos += 2 - } - } - } else { - // RGB image - width := int(w) - height := int(h) - length := 4 * width - sz := width * height - color.p = data[:sz*3+height] // reuse decompressed data buffer. - alpha.p = make([]byte, sz+height) - var pos, elPos int - for i := 0; i < height; i++ { - pos = (1 + length) * i - color.u8(data[pos]) - alpha.u8(data[pos]) - elPos = pos + 1 - for k := 0; k < width; k++ { - tmp := data[elPos : elPos+4] - color.u8(tmp[0]) - color.u8(tmp[1]) - color.u8(tmp[2]) - alpha.u8(tmp[3]) - elPos += 4 - } - } - } - - xc := xmem.compress(color.bytes()) - data = xc.copy() - xc.release() - - // release uncompressed data buffer, after the color buffer - // has been compressed. - mem.release() - - xa := xmem.compress(alpha.bytes()) - info.smask = xa.copy() - xa.release() - - if f.pdfVersion < pdfVers1_4 { - f.pdfVersion = pdfVers1_4 - } - } - info.data = data - return -} diff --git a/vendor/github.com/go-pdf/fpdf/protect.go b/vendor/github.com/go-pdf/fpdf/protect.go deleted file mode 100644 index b1ce620..0000000 --- a/vendor/github.com/go-pdf/fpdf/protect.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2013-2014 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -// PDF protection is adapted from the work of Klemen VODOPIVEC for the fpdf -// product. - -package fpdf - -import ( - "crypto/md5" - "crypto/rc4" - "encoding/binary" - "math/rand" -) - -// Advisory bitflag constants that control document activities -const ( - CnProtectPrint = 4 - CnProtectModify = 8 - CnProtectCopy = 16 - CnProtectAnnotForms = 32 -) - -type protectType struct { - encrypted bool - uValue []byte - oValue []byte - pValue int - padding []byte - encryptionKey []byte - objNum int - rc4cipher *rc4.Cipher - rc4n uint32 // Object number associated with rc4 cipher -} - -func (p *protectType) rc4(n uint32, buf *[]byte) { - if p.rc4cipher == nil || p.rc4n != n { - p.rc4cipher, _ = rc4.NewCipher(p.objectKey(n)) - p.rc4n = n - } - p.rc4cipher.XORKeyStream(*buf, *buf) -} - -func (p *protectType) objectKey(n uint32) []byte { - var nbuf, b []byte - nbuf = make([]byte, 8) - binary.LittleEndian.PutUint32(nbuf, n) - b = append(b, p.encryptionKey...) - b = append(b, nbuf[0], nbuf[1], nbuf[2], 0, 0) - s := md5.Sum(b) - return s[0:10] -} - -func oValueGen(userPass, ownerPass []byte) (v []byte) { - var c *rc4.Cipher - tmp := md5.Sum(ownerPass) - c, _ = rc4.NewCipher(tmp[0:5]) - size := len(userPass) - v = make([]byte, size) - c.XORKeyStream(v, userPass) - return -} - -func (p *protectType) uValueGen() (v []byte) { - var c *rc4.Cipher - c, _ = rc4.NewCipher(p.encryptionKey) - size := len(p.padding) - v = make([]byte, size) - c.XORKeyStream(v, p.padding) - return -} - -func (p *protectType) setProtection(privFlag byte, userPassStr, ownerPassStr string) { - privFlag = 192 | (privFlag & (CnProtectCopy | CnProtectModify | CnProtectPrint | CnProtectAnnotForms)) - p.padding = []byte{ - 0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41, - 0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08, - 0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80, - 0x2F, 0x0C, 0xA9, 0xFE, 0x64, 0x53, 0x69, 0x7A, - } - userPass := []byte(userPassStr) - var ownerPass []byte - if ownerPassStr == "" { - ownerPass = make([]byte, 8) - binary.LittleEndian.PutUint64(ownerPass, uint64(rand.Int63())) - } else { - ownerPass = []byte(ownerPassStr) - } - userPass = append(userPass, p.padding...)[0:32] - ownerPass = append(ownerPass, p.padding...)[0:32] - p.encrypted = true - p.oValue = oValueGen(userPass, ownerPass) - var buf []byte - buf = append(buf, userPass...) - buf = append(buf, p.oValue...) - buf = append(buf, privFlag, 0xff, 0xff, 0xff) - sum := md5.Sum(buf) - p.encryptionKey = sum[0:5] - p.uValue = p.uValueGen() - p.pValue = -(int(privFlag^255) + 1) -} diff --git a/vendor/github.com/go-pdf/fpdf/rbuf.go b/vendor/github.com/go-pdf/fpdf/rbuf.go deleted file mode 100644 index cbcc9cc..0000000 --- a/vendor/github.com/go-pdf/fpdf/rbuf.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright ©2021 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package fpdf - -import ( - "bytes" - "encoding/binary" - "io" -) - -type rbuffer struct { - p []byte - c int -} - -// newRBuffer returns a new buffer populated with the contents of the specified Reader -func newRBuffer(r io.Reader) (b *rbuffer, err error) { - buf := new(bytes.Buffer) - _, err = buf.ReadFrom(r) - b = &rbuffer{p: buf.Bytes()} - return -} - -func (r *rbuffer) Read(p []byte) (int, error) { - if r.c >= len(r.p) { - return 0, io.EOF - } - n := copy(p, r.p[r.c:]) - r.c += n - return n, nil -} - -func (r *rbuffer) ReadByte() (byte, error) { - if r.c >= len(r.p) { - return 0, io.EOF - } - v := r.p[r.c] - r.c++ - return v, nil -} - -func (r *rbuffer) u8() uint8 { - if r.c >= len(r.p) { - panic(io.ErrShortBuffer) - } - v := r.p[r.c] - r.c++ - return v -} - -func (r *rbuffer) u32() uint32 { - const n = 4 - if r.c+n >= len(r.p) { - panic(io.ErrShortBuffer) - } - beg := r.c - r.c += n - v := binary.BigEndian.Uint32(r.p[beg:]) - return v -} - -func (r *rbuffer) i32() int32 { - return int32(r.u32()) -} - -func (r *rbuffer) Next(n int) []byte { - c := r.c - r.c += n - return r.p[c:r.c] -} diff --git a/vendor/github.com/go-pdf/fpdf/splittext.go b/vendor/github.com/go-pdf/fpdf/splittext.go deleted file mode 100644 index 9c56d4a..0000000 --- a/vendor/github.com/go-pdf/fpdf/splittext.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package fpdf - -import ( - "math" - "unicode" -) - -// SplitText splits UTF-8 encoded text into several lines using the current -// font. Each line has its length limited to a maximum width given by w. This -// function can be used to determine the total height of wrapped text for -// vertical placement purposes. -func (f *Fpdf) SplitText(txt string, w float64) (lines []string) { - cw := f.currentFont.Cw - wmax := int(math.Ceil((w - 2*f.cMargin) * 1000 / f.fontSize)) - s := []rune(txt) // Return slice of UTF-8 runes - nb := len(s) - for nb > 0 && s[nb-1] == '\n' { - nb-- - } - s = s[0:nb] - sep := -1 - i := 0 - j := 0 - l := 0 - for i < nb { - c := s[i] - l += cw[c] - if unicode.IsSpace(c) || isChinese(c) { - sep = i - } - if c == '\n' || l > wmax { - if sep == -1 { - if i == j { - i++ - } - sep = i - } else { - i = sep + 1 - } - lines = append(lines, string(s[j:sep])) - sep = -1 - j = i - l = 0 - } else { - i++ - } - } - if i != j { - lines = append(lines, string(s[j:i])) - } - return lines -} diff --git a/vendor/github.com/go-pdf/fpdf/spotcolor.go b/vendor/github.com/go-pdf/fpdf/spotcolor.go deleted file mode 100644 index 422f3bd..0000000 --- a/vendor/github.com/go-pdf/fpdf/spotcolor.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -// Copyright (c) Kurt Jung (Gmail: kurt.w.jung) -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -// Adapted from http://www.fpdf.org/en/script/script89.php by Olivier PLATHEY - -package fpdf - -import ( - "fmt" - "strings" -) - -func byteBound(v byte) byte { - if v > 100 { - return 100 - } - return v -} - -// AddSpotColor adds an ink-based CMYK color to the gofpdf instance and -// associates it with the specified name. The individual components specify -// percentages ranging from 0 to 100. Values above this are quietly capped to -// 100. An error occurs if the specified name is already associated with a -// color. -func (f *Fpdf) AddSpotColor(nameStr string, c, m, y, k byte) { - if f.err == nil { - _, ok := f.spotColorMap[nameStr] - if !ok { - id := len(f.spotColorMap) + 1 - f.spotColorMap[nameStr] = spotColorType{ - id: id, - val: cmykColorType{ - c: byteBound(c), - m: byteBound(m), - y: byteBound(y), - k: byteBound(k), - }, - } - } else { - f.err = fmt.Errorf("name \"%s\" is already associated with a spot color", nameStr) - } - } -} - -func (f *Fpdf) getSpotColor(nameStr string) (clr spotColorType, ok bool) { - if f.err == nil { - clr, ok = f.spotColorMap[nameStr] - if !ok { - f.err = fmt.Errorf("spot color name \"%s\" is not registered", nameStr) - } - } - return -} - -// SetDrawSpotColor sets the current draw color to the spot color associated -// with nameStr. An error occurs if the name is not associated with a color. -// The value for tint ranges from 0 (no intensity) to 100 (full intensity). It -// is quietly bounded to this range. -func (f *Fpdf) SetDrawSpotColor(nameStr string, tint byte) { - var clr spotColorType - var ok bool - - clr, ok = f.getSpotColor(nameStr) - if ok { - f.color.draw.mode = colorModeSpot - f.color.draw.spotStr = nameStr - f.color.draw.str = sprintf("/CS%d CS %.3f SCN", clr.id, float64(byteBound(tint))/100) - if f.page > 0 { - f.out(f.color.draw.str) - } - } -} - -// SetFillSpotColor sets the current fill color to the spot color associated -// with nameStr. An error occurs if the name is not associated with a color. -// The value for tint ranges from 0 (no intensity) to 100 (full intensity). It -// is quietly bounded to this range. -func (f *Fpdf) SetFillSpotColor(nameStr string, tint byte) { - var clr spotColorType - var ok bool - - clr, ok = f.getSpotColor(nameStr) - if ok { - f.color.fill.mode = colorModeSpot - f.color.fill.spotStr = nameStr - f.color.fill.str = sprintf("/CS%d cs %.3f scn", clr.id, float64(byteBound(tint))/100) - f.colorFlag = f.color.fill.str != f.color.text.str - if f.page > 0 { - f.out(f.color.fill.str) - } - } -} - -// SetTextSpotColor sets the current text color to the spot color associated -// with nameStr. An error occurs if the name is not associated with a color. -// The value for tint ranges from 0 (no intensity) to 100 (full intensity). It -// is quietly bounded to this range. -func (f *Fpdf) SetTextSpotColor(nameStr string, tint byte) { - var clr spotColorType - var ok bool - - clr, ok = f.getSpotColor(nameStr) - if ok { - f.color.text.mode = colorModeSpot - f.color.text.spotStr = nameStr - f.color.text.str = sprintf("/CS%d cs %.3f scn", clr.id, float64(byteBound(tint))/100) - f.colorFlag = f.color.fill.str != f.color.text.str - } -} - -func (f *Fpdf) returnSpotColor(clr colorType) (name string, c, m, y, k byte) { - var spotClr spotColorType - var ok bool - - name = clr.spotStr - if name != "" { - spotClr, ok = f.getSpotColor(name) - if ok { - c = spotClr.val.c - m = spotClr.val.m - y = spotClr.val.y - k = spotClr.val.k - } - } - return -} - -// GetDrawSpotColor returns the most recently used spot color information for -// drawing. This will not be the current drawing color if some other color type -// such as RGB is active. If no spot color has been set for drawing, zero -// values are returned. -func (f *Fpdf) GetDrawSpotColor() (name string, c, m, y, k byte) { - return f.returnSpotColor(f.color.draw) -} - -// GetTextSpotColor returns the most recently used spot color information for -// text output. This will not be the current text color if some other color -// type such as RGB is active. If no spot color has been set for text, zero -// values are returned. -func (f *Fpdf) GetTextSpotColor() (name string, c, m, y, k byte) { - return f.returnSpotColor(f.color.text) -} - -// GetFillSpotColor returns the most recently used spot color information for -// fill output. This will not be the current fill color if some other color -// type such as RGB is active. If no fill spot color has been set, zero values -// are returned. -func (f *Fpdf) GetFillSpotColor() (name string, c, m, y, k byte) { - return f.returnSpotColor(f.color.fill) -} - -func (f *Fpdf) putSpotColors() { - for k, v := range f.spotColorMap { - f.newobj() - f.outf("[/Separation /%s", strings.Replace(k, " ", "#20", -1)) - f.out("/DeviceCMYK <<") - f.out("/Range [0 1 0 1 0 1 0 1] /C0 [0 0 0 0] ") - f.outf("/C1 [%.3f %.3f %.3f %.3f] ", float64(v.val.c)/100, float64(v.val.m)/100, - float64(v.val.y)/100, float64(v.val.k)/100) - f.out("/FunctionType 2 /Domain [0 1] /N 1>>]") - f.out("endobj") - v.objID = f.n - f.spotColorMap[k] = v - } -} - -func (f *Fpdf) spotColorPutResourceDict() { - f.out("/ColorSpace <<") - for _, clr := range f.spotColorMap { - f.outf("/CS%d %d 0 R", clr.id, clr.objID) - } - f.out(">>") -} diff --git a/vendor/github.com/go-pdf/fpdf/subwrite.go b/vendor/github.com/go-pdf/fpdf/subwrite.go deleted file mode 100644 index 8d48094..0000000 --- a/vendor/github.com/go-pdf/fpdf/subwrite.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package fpdf - -// Adapted from http://www.fpdf.org/en/script/script61.php by Wirus and released with the FPDF license. - -// SubWrite prints text from the current position in the same way as Write(). -// ht is the line height in the unit of measure specified in New(). str -// specifies the text to write. subFontSize is the size of the font in points. -// subOffset is the vertical offset of the text in points; a positive value -// indicates a superscript, a negative value indicates a subscript. link is the -// identifier returned by AddLink() or 0 for no internal link. linkStr is a -// target URL or empty for no external link. A non--zero value for link takes -// precedence over linkStr. -// -// The SubWrite example demonstrates this method. -func (f *Fpdf) SubWrite(ht float64, str string, subFontSize, subOffset float64, link int, linkStr string) { - if f.err != nil { - return - } - // resize font - subFontSizeOld := f.fontSizePt - f.SetFontSize(subFontSize) - // reposition y - subOffset = (((subFontSize - subFontSizeOld) / f.k) * 0.3) + (subOffset / f.k) - subX := f.x - subY := f.y - f.SetXY(subX, subY-subOffset) - //Output text - f.write(ht, str, link, linkStr) - // restore y position - subX = f.x - subY = f.y - f.SetXY(subX, subY+subOffset) - // restore font size - f.SetFontSize(subFontSizeOld) -} diff --git a/vendor/github.com/go-pdf/fpdf/svgbasic.go b/vendor/github.com/go-pdf/fpdf/svgbasic.go deleted file mode 100644 index a80bf5f..0000000 --- a/vendor/github.com/go-pdf/fpdf/svgbasic.go +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2014 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -import ( - "encoding/xml" - "fmt" - "os" - "strconv" - "strings" -) - -var pathCmdSub *strings.Replacer - -func init() { - // Handle permitted constructions like "100L200,230" - pathCmdSub = strings.NewReplacer(",", " ", - "L", " L ", "l", " l ", - "C", " C ", "c", " c ", - "M", " M ", "m", " m ", - "H", " H ", "h", " h ", - "V", " V ", "v", " v ", - "Q", " Q ", "q", " q ", - "Z", " Z ", "z", " z ") -} - -// SVGBasicSegmentType describes a single curve or position segment -type SVGBasicSegmentType struct { - Cmd byte // See http://www.w3.org/TR/SVG/paths.html for path command structure - Arg [6]float64 -} - -func absolutizePath(segs []SVGBasicSegmentType) { - var x, y float64 - var segPtr *SVGBasicSegmentType - adjust := func(pos int, adjX, adjY float64) { - segPtr.Arg[pos] += adjX - segPtr.Arg[pos+1] += adjY - } - for j, seg := range segs { - segPtr = &segs[j] - if j == 0 && seg.Cmd == 'm' { - segPtr.Cmd = 'M' - } - switch segPtr.Cmd { - case 'M': - x = seg.Arg[0] - y = seg.Arg[1] - case 'm': - adjust(0, x, y) - segPtr.Cmd = 'M' - x = segPtr.Arg[0] - y = segPtr.Arg[1] - case 'L': - x = seg.Arg[0] - y = seg.Arg[1] - case 'l': - adjust(0, x, y) - segPtr.Cmd = 'L' - x = segPtr.Arg[0] - y = segPtr.Arg[1] - case 'C': - x = seg.Arg[4] - y = seg.Arg[5] - case 'c': - adjust(0, x, y) - adjust(2, x, y) - adjust(4, x, y) - segPtr.Cmd = 'C' - x = segPtr.Arg[4] - y = segPtr.Arg[5] - case 'Q': - x = seg.Arg[2] - y = seg.Arg[3] - case 'q': - adjust(0, x, y) - adjust(2, x, y) - segPtr.Cmd = 'Q' - x = segPtr.Arg[2] - y = segPtr.Arg[3] - case 'H': - x = seg.Arg[0] - case 'h': - segPtr.Arg[0] += x - segPtr.Cmd = 'H' - x += seg.Arg[0] - case 'V': - y = seg.Arg[0] - case 'v': - segPtr.Arg[0] += y - segPtr.Cmd = 'V' - y += seg.Arg[0] - case 'z': - segPtr.Cmd = 'Z' - } - } -} - -func pathParse(pathStr string) (segs []SVGBasicSegmentType, err error) { - var seg SVGBasicSegmentType - var j, argJ, argCount, prevArgCount int - setup := func(n int) { - // It is not strictly necessary to clear arguments, but result may be clearer - // to caller - for j := 0; j < len(seg.Arg); j++ { - seg.Arg[j] = 0.0 - } - argJ = 0 - argCount = n - prevArgCount = n - } - var str string - var c byte - pathStr = pathCmdSub.Replace(pathStr) - strList := strings.Fields(pathStr) - count := len(strList) - for j = 0; j < count && err == nil; j++ { - str = strList[j] - if argCount == 0 { // Look for path command or argument continuation - c = str[0] - if c == '-' || (c >= '0' && c <= '9') { // More arguments - if j > 0 { - setup(prevArgCount) - // Repeat previous action - if seg.Cmd == 'M' { - seg.Cmd = 'L' - } else if seg.Cmd == 'm' { - seg.Cmd = 'l' - } - } else { - err = fmt.Errorf("expecting SVG path command at first position, got %s", str) - } - } - } - if err == nil { - if argCount == 0 { - seg.Cmd = str[0] - switch seg.Cmd { - case 'M', 'm': // Absolute/relative moveto: x, y - setup(2) - case 'C', 'c': // Absolute/relative Bézier curve: cx0, cy0, cx1, cy1, x1, y1 - setup(6) - case 'H', 'h': // Absolute/relative horizontal line to: x - setup(1) - case 'L', 'l': // Absolute/relative lineto: x, y - setup(2) - case 'Q', 'q': // Absolute/relative quadratic curve: x0, y0, x1, y1 - setup(4) - case 'V', 'v': // Absolute/relative vertical line to: y - setup(1) - case 'Z', 'z': // closepath instruction (takes no arguments) - segs = append(segs, seg) - default: - err = fmt.Errorf("expecting SVG path command at position %d, got %s", j, str) - } - } else { - seg.Arg[argJ], err = strconv.ParseFloat(str, 64) - if err == nil { - argJ++ - argCount-- - if argCount == 0 { - segs = append(segs, seg) - } - } - } - } - } - if err == nil { - if argCount == 0 { - absolutizePath(segs) - } else { - err = fmt.Errorf("expecting additional (%d) numeric arguments", argCount) - } - } - return -} - -// SVGBasicType aggregates the information needed to describe a multi-segment -// basic vector image -type SVGBasicType struct { - Wd, Ht float64 - Segments [][]SVGBasicSegmentType -} - -// SVGBasicParse parses a simple scalable vector graphics (SVG) buffer into a -// descriptor. Only a small subset of the SVG standard, in particular the path -// information generated by jSignature, is supported. The returned path data -// includes only the commands 'M' (absolute moveto: x, y), 'L' (absolute -// lineto: x, y), 'C' (absolute cubic Bézier curve: cx0, cy0, cx1, cy1, -// x1,y1), 'Q' (absolute quadratic Bézier curve: x0, y0, x1, y1) and 'Z' -// (closepath). -func SVGBasicParse(buf []byte) (sig SVGBasicType, err error) { - type pathType struct { - D string `xml:"d,attr"` - } - type srcType struct { - Wd float64 `xml:"width,attr"` - Ht float64 `xml:"height,attr"` - Paths []pathType `xml:"path"` - } - var src srcType - err = xml.Unmarshal(buf, &src) - if err == nil { - if src.Wd > 0 && src.Ht > 0 { - sig.Wd, sig.Ht = src.Wd, src.Ht - var segs []SVGBasicSegmentType - for _, path := range src.Paths { - if err == nil { - segs, err = pathParse(path.D) - if err == nil { - sig.Segments = append(sig.Segments, segs) - } - } - } - } else { - err = fmt.Errorf("unacceptable values for basic SVG extent: %.2f x %.2f", - sig.Wd, sig.Ht) - } - } - return -} - -// SVGBasicFileParse parses a simple scalable vector graphics (SVG) file into a -// basic descriptor. The SVGBasicWrite() example demonstrates this method. -func SVGBasicFileParse(svgFileStr string) (sig SVGBasicType, err error) { - var buf []byte - buf, err = os.ReadFile(svgFileStr) - if err == nil { - sig, err = SVGBasicParse(buf) - } - return -} diff --git a/vendor/github.com/go-pdf/fpdf/svgwrite.go b/vendor/github.com/go-pdf/fpdf/svgwrite.go deleted file mode 100644 index 0cb386c..0000000 --- a/vendor/github.com/go-pdf/fpdf/svgwrite.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2014 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -// SVGBasicWrite renders the paths encoded in the basic SVG image specified by -// sb. The scale value is used to convert the coordinates in the path to the -// unit of measure specified in New(). The current position (as set with a call -// to SetXY()) is used as the origin of the image. The current line cap style -// (as set with SetLineCapStyle()), line width (as set with SetLineWidth()), -// and draw color (as set with SetDrawColor()) are used in drawing the image -// paths. -func (f *Fpdf) SVGBasicWrite(sb *SVGBasicType, scale float64) { - originX, originY := f.GetXY() - var x, y, newX, newY float64 - var cx0, cy0, cx1, cy1 float64 - var path []SVGBasicSegmentType - var seg SVGBasicSegmentType - var startX, startY float64 - sval := func(origin float64, arg int) float64 { - return origin + scale*seg.Arg[arg] - } - xval := func(arg int) float64 { - return sval(originX, arg) - } - yval := func(arg int) float64 { - return sval(originY, arg) - } - val := func(arg int) (float64, float64) { - return xval(arg), yval(arg + 1) - } - for j := 0; j < len(sb.Segments) && f.Ok(); j++ { - path = sb.Segments[j] - for k := 0; k < len(path) && f.Ok(); k++ { - seg = path[k] - switch seg.Cmd { - case 'M': - x, y = val(0) - startX, startY = x, y - f.SetXY(x, y) - case 'L': - newX, newY = val(0) - f.Line(x, y, newX, newY) - x, y = newX, newY - case 'C': - cx0, cy0 = val(0) - cx1, cy1 = val(2) - newX, newY = val(4) - f.CurveCubic(x, y, cx0, cy0, newX, newY, cx1, cy1, "D") - x, y = newX, newY - case 'Q': - cx0, cy0 = val(0) - newX, newY = val(2) - f.Curve(x, y, cx0, cy0, newX, newY, "D") - x, y = newX, newY - case 'H': - newX = xval(0) - f.Line(x, y, newX, y) - x = newX - case 'V': - newY = yval(0) - f.Line(x, y, x, newY) - y = newY - case 'Z': - f.Line(x, y, startX, startY) - x, y = startX, startY - default: - f.SetErrorf("Unexpected path command '%c'", seg.Cmd) - } - } - } -} diff --git a/vendor/github.com/go-pdf/fpdf/template.go b/vendor/github.com/go-pdf/fpdf/template.go deleted file mode 100644 index d6fdbe8..0000000 --- a/vendor/github.com/go-pdf/fpdf/template.go +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2015 Kurt Jung (Gmail: kurt.w.jung), - * Marcus Downing, Jan Slabon (Setasign) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -import ( - "encoding/gob" - "sort" -) - -// CreateTemplate defines a new template using the current page size. -func (f *Fpdf) CreateTemplate(fn func(*Tpl)) Template { - return newTpl(PointType{0, 0}, f.curPageSize, f.defOrientation, f.unitStr, f.fontDirStr, fn, f) -} - -// CreateTemplateCustom starts a template, using the given bounds. -func (f *Fpdf) CreateTemplateCustom(corner PointType, size SizeType, fn func(*Tpl)) Template { - return newTpl(corner, size, f.defOrientation, f.unitStr, f.fontDirStr, fn, f) -} - -// CreateTemplate creates a template that is not attached to any document. -// -// This function is deprecated; it incorrectly assumes that a page with a width -// smaller than its height is oriented in portrait mode, otherwise it assumes -// landscape mode. This causes problems when placing the template in a master -// document where this condition does not apply. CreateTpl() is a similar -// function that lets you specify the orientation to avoid this problem. -func CreateTemplate(corner PointType, size SizeType, unitStr, fontDirStr string, fn func(*Tpl)) Template { - orientationStr := "p" - if size.Wd > size.Ht { - orientationStr = "l" - } - - return CreateTpl(corner, size, orientationStr, unitStr, fontDirStr, fn) -} - -// CreateTpl creates a template not attached to any document -func CreateTpl(corner PointType, size SizeType, orientationStr, unitStr, fontDirStr string, fn func(*Tpl)) Template { - return newTpl(corner, size, orientationStr, unitStr, fontDirStr, fn, nil) -} - -// UseTemplate adds a template to the current page or another template, -// using the size and position at which it was originally written. -func (f *Fpdf) UseTemplate(t Template) { - if t == nil { - f.SetErrorf("template is nil") - return - } - corner, size := t.Size() - f.UseTemplateScaled(t, corner, size) -} - -// UseTemplateScaled adds a template to the current page or another template, -// using the given page coordinates. -func (f *Fpdf) UseTemplateScaled(t Template, corner PointType, size SizeType) { - if t == nil { - f.SetErrorf("template is nil") - return - } - - // You have to add at least a page first - if f.page <= 0 { - f.SetErrorf("cannot use a template without first adding a page") - return - } - - // make a note of the fact that we actually use this template, as well as any other templates, - // images or fonts it uses - f.templates[t.ID()] = t - for _, tt := range t.Templates() { - f.templates[tt.ID()] = tt - } - - // Create a list of existing image SHA-1 hashes. - existingImages := map[string]bool{} - for _, image := range f.images { - existingImages[image.i] = true - } - - // Add each template image to $f, unless already present. - for name, ti := range t.Images() { - if _, found := existingImages[ti.i]; found { - continue - } - name = sprintf("t%s-%s", t.ID(), name) - f.images[name] = ti - } - - // template data - _, templateSize := t.Size() - scaleX := size.Wd / templateSize.Wd - scaleY := size.Ht / templateSize.Ht - tx := corner.X * f.k - ty := (f.curPageSize.Ht - corner.Y - size.Ht) * f.k - - f.outf("q %.4f 0 0 %.4f %.4f %.4f cm", scaleX, scaleY, tx, ty) // Translate - f.outf("/TPL%s Do Q", t.ID()) -} - -// Template is an object that can be written to, then used and re-used any number of times within a document. -type Template interface { - ID() string - Size() (PointType, SizeType) - Bytes() []byte - Images() map[string]*ImageInfoType - Templates() []Template - NumPages() int - FromPage(int) (Template, error) - FromPages() []Template - Serialize() ([]byte, error) - gob.GobDecoder - gob.GobEncoder -} - -func (f *Fpdf) templateFontCatalog() { - var keyList []string - var font fontDefType - var key string - f.out("/Font <<") - for key = range f.fonts { - keyList = append(keyList, key) - } - if f.catalogSort { - sort.Strings(keyList) - } - for _, key = range keyList { - font = f.fonts[key] - f.outf("/F%s %d 0 R", font.i, font.N) - } - f.out(">>") -} - -// putTemplates writes the templates to the PDF -func (f *Fpdf) putTemplates() { - filter := "" - if f.compress { - filter = "/Filter /FlateDecode " - } - - templates := sortTemplates(f.templates, f.catalogSort) - var t Template - for _, t = range templates { - corner, size := t.Size() - - f.newobj() - f.templateObjects[t.ID()] = f.n - f.outf("<<%s/Type /XObject", filter) - f.out("/Subtype /Form") - f.out("/Formtype 1") - f.outf("/BBox [%.2f %.2f %.2f %.2f]", corner.X*f.k, corner.Y*f.k, (corner.X+size.Wd)*f.k, (corner.Y+size.Ht)*f.k) - if corner.X != 0 || corner.Y != 0 { - f.outf("/Matrix [1 0 0 1 %.5f %.5f]", -corner.X*f.k*2, corner.Y*f.k*2) - } - - // Template's resource dictionary - f.out("/Resources ") - f.out("< 0 || len(tTemplates) > 0 { - f.out("/XObject <<") - { - var key string - var keyList []string - var ti *ImageInfoType - for key = range tImages { - keyList = append(keyList, key) - } - if gl.catalogSort { - sort.Strings(keyList) - } - for _, key = range keyList { - // for _, ti := range tImages { - ti = tImages[key] - f.outf("/I%s %d 0 R", ti.i, ti.n) - } - } - for _, tt := range tTemplates { - id := tt.ID() - if objID, ok := f.templateObjects[id]; ok { - f.outf("/TPL%s %d 0 R", id, objID) - } - } - f.out(">>") - } - - f.out(">>") - - // Write the template's byte stream - buffer := t.Bytes() - var mem *membuffer - // fmt.Println("Put template bytes", string(buffer[:])) - if f.compress { - mem = xmem.compress(buffer) - buffer = mem.bytes() - } - f.outf("/Length %d >>", len(buffer)) - f.putstream(buffer) - f.out("endobj") - if mem != nil { - mem.release() - } - } -} - -func templateKeyList(mp map[string]Template, sort bool) (keyList []string) { - var key string - for key = range mp { - keyList = append(keyList, key) - } - if sort { - gensort(len(keyList), - func(a, b int) bool { - return keyList[a] < keyList[b] - }, - func(a, b int) { - keyList[a], keyList[b] = keyList[b], keyList[a] - }) - } - return -} - -// sortTemplates puts templates in a suitable order based on dependices -func sortTemplates(templates map[string]Template, catalogSort bool) []Template { - chain := make([]Template, 0, len(templates)*2) - - // build a full set of dependency chains - var keyList []string - var key string - var t Template - keyList = templateKeyList(templates, catalogSort) - for _, key = range keyList { - t = templates[key] - tlist := templateChainDependencies(t) - for _, tt := range tlist { - if tt != nil { - chain = append(chain, tt) - } - } - } - - // reduce that to make a simple list - sorted := make([]Template, 0, len(templates)) -chain: - for _, t := range chain { - for _, already := range sorted { - if t == already { - continue chain - } - } - sorted = append(sorted, t) - } - - return sorted -} - -// templateChainDependencies is a recursive function for determining the full chain of template dependencies -func templateChainDependencies(template Template) []Template { - requires := template.Templates() - chain := make([]Template, len(requires)*2) - for _, req := range requires { - chain = append(chain, templateChainDependencies(req)...) - } - chain = append(chain, template) - return chain -} - -// < 0002640 31 20 31 32 20 30 20 52 0a 2f 54 50 4c 32 20 31 |1 12 0 R./TPL2 1| -// < 0002650 35 20 30 20 52 0a 2f 54 50 4c 31 20 31 34 20 30 |5 0 R./TPL1 14 0| - -// > 0002640 31 20 31 32 20 30 20 52 0a 2f 54 50 4c 31 20 31 |1 12 0 R./TPL1 1| -// > 0002650 34 20 30 20 52 0a 2f 54 50 4c 32 20 31 35 20 30 |4 0 R./TPL2 15 0| diff --git a/vendor/github.com/go-pdf/fpdf/template_impl.go b/vendor/github.com/go-pdf/fpdf/template_impl.go deleted file mode 100644 index 1653edd..0000000 --- a/vendor/github.com/go-pdf/fpdf/template_impl.go +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2015 Kurt Jung (Gmail: kurt.w.jung), - * Marcus Downing, Jan Slabon (Setasign) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -import ( - "bytes" - "crypto/sha1" - "encoding/gob" - "errors" - "fmt" -) - -// newTpl creates a template, copying graphics settings from a template if one is given -func newTpl(corner PointType, size SizeType, orientationStr, unitStr, fontDirStr string, fn func(*Tpl), copyFrom *Fpdf) Template { - sizeStr := "" - - fpdf := fpdfNew(orientationStr, unitStr, sizeStr, fontDirStr, size) - tpl := Tpl{*fpdf} - if copyFrom != nil { - tpl.loadParamsFromFpdf(copyFrom) - } - tpl.Fpdf.AddPage() - fn(&tpl) - - bytes := make([][]byte, len(tpl.Fpdf.pages)) - // skip the first page as it will always be empty - for x := 1; x < len(bytes); x++ { - bytes[x] = tpl.Fpdf.pages[x].Bytes() - } - - templates := make([]Template, 0, len(tpl.Fpdf.templates)) - for _, key := range templateKeyList(tpl.Fpdf.templates, true) { - templates = append(templates, tpl.Fpdf.templates[key]) - } - images := tpl.Fpdf.images - - template := FpdfTpl{corner, size, bytes, images, templates, tpl.Fpdf.page} - return &template -} - -// FpdfTpl is a concrete implementation of the Template interface. -type FpdfTpl struct { - corner PointType - size SizeType - bytes [][]byte - images map[string]*ImageInfoType - templates []Template - page int -} - -// ID returns the global template identifier -func (t *FpdfTpl) ID() string { - return fmt.Sprintf("%x", sha1.Sum(t.Bytes())) -} - -// Size gives the bounding dimensions of this template -func (t *FpdfTpl) Size() (corner PointType, size SizeType) { - return t.corner, t.size -} - -// Bytes returns the actual template data, not including resources -func (t *FpdfTpl) Bytes() []byte { - return t.bytes[t.page] -} - -// FromPage creates a new template from a specific Page -func (t *FpdfTpl) FromPage(page int) (Template, error) { - // pages start at 1 - if page == 0 { - return nil, errors.New("fpdf: pages start at 1 No template will have a page 0") - } - - if page > t.NumPages() { - return nil, fmt.Errorf("fpdf: the template does not have a page %d", page) - } - // if it is already pointing to the correct page - // there is no need to create a new template - if t.page == page { - return t, nil - } - - t2 := *t - t2.page = page - return &t2, nil -} - -// FromPages creates a template slice with all the pages within a template. -func (t *FpdfTpl) FromPages() []Template { - p := make([]Template, t.NumPages()) - for x := 1; x <= t.NumPages(); x++ { - // the only error is when accessing a - // non existing template... that can't happen - // here - p[x-1], _ = t.FromPage(x) - } - - return p -} - -// Images returns a list of the images used in this template -func (t *FpdfTpl) Images() map[string]*ImageInfoType { - return t.images -} - -// Templates returns a list of templates used in this template -func (t *FpdfTpl) Templates() []Template { - return t.templates -} - -// NumPages returns the number of available pages within the template. Look at FromPage and FromPages on access to that content. -func (t *FpdfTpl) NumPages() int { - // the first page is empty to - // make the pages begin at one - return len(t.bytes) - 1 -} - -// Serialize turns a template into a byte string for later deserialization -func (t *FpdfTpl) Serialize() ([]byte, error) { - b := new(bytes.Buffer) - enc := gob.NewEncoder(b) - err := enc.Encode(t) - - return b.Bytes(), err -} - -// DeserializeTemplate creaties a template from a previously serialized -// template -func DeserializeTemplate(b []byte) (Template, error) { - tpl := new(FpdfTpl) - dec := gob.NewDecoder(bytes.NewBuffer(b)) - err := dec.Decode(tpl) - return tpl, err -} - -// childrenImages returns the next layer of children images, it doesn't dig into -// children of children. Applies template namespace to keys to ensure -// no collisions. See UseTemplateScaled -func (t *FpdfTpl) childrenImages() map[string]*ImageInfoType { - childrenImgs := make(map[string]*ImageInfoType) - - for x := 0; x < len(t.templates); x++ { - imgs := t.templates[x].Images() - for key, val := range imgs { - name := sprintf("t%s-%s", t.templates[x].ID(), key) - childrenImgs[name] = val - } - } - - return childrenImgs -} - -// childrensTemplates returns the next layer of children templates, it doesn't dig into -// children of children. -func (t *FpdfTpl) childrensTemplates() []Template { - childrenTmpls := make([]Template, 0) - - for x := 0; x < len(t.templates); x++ { - tmpls := t.templates[x].Templates() - childrenTmpls = append(childrenTmpls, tmpls...) - } - - return childrenTmpls -} - -// GobEncode encodes the receiving template into a byte buffer. Use GobDecode -// to decode the byte buffer back to a template. -func (t *FpdfTpl) GobEncode() ([]byte, error) { - w := new(bytes.Buffer) - encoder := gob.NewEncoder(w) - - childrensTemplates := t.childrensTemplates() - firstClassTemplates := make([]Template, 0) - -found_continue: - for x := 0; x < len(t.templates); x++ { - for y := 0; y < len(childrensTemplates); y++ { - if childrensTemplates[y].ID() == t.templates[x].ID() { - continue found_continue - } - } - - firstClassTemplates = append(firstClassTemplates, t.templates[x]) - } - err := encoder.Encode(firstClassTemplates) - - childrenImgs := t.childrenImages() - firstClassImgs := make(map[string]*ImageInfoType) - - for key, img := range t.images { - if _, ok := childrenImgs[key]; !ok { - firstClassImgs[key] = img - } - } - - if err == nil { - err = encoder.Encode(firstClassImgs) - } - if err == nil { - err = encoder.Encode(t.corner) - } - if err == nil { - err = encoder.Encode(t.size) - } - if err == nil { - err = encoder.Encode(t.bytes) - } - if err == nil { - err = encoder.Encode(t.page) - } - - return w.Bytes(), err -} - -// GobDecode decodes the specified byte buffer into the receiving template. -func (t *FpdfTpl) GobDecode(buf []byte) error { - r := bytes.NewBuffer(buf) - decoder := gob.NewDecoder(r) - - firstClassTemplates := make([]*FpdfTpl, 0) - err := decoder.Decode(&firstClassTemplates) - t.templates = make([]Template, len(firstClassTemplates)) - - for x := 0; x < len(t.templates); x++ { - t.templates[x] = Template(firstClassTemplates[x]) - } - - firstClassImages := t.childrenImages() - - t.templates = append(t.childrensTemplates(), t.templates...) - - t.images = make(map[string]*ImageInfoType) - if err == nil { - err = decoder.Decode(&t.images) - } - - for k, v := range firstClassImages { - t.images[k] = v - } - - if err == nil { - err = decoder.Decode(&t.corner) - } - if err == nil { - err = decoder.Decode(&t.size) - } - if err == nil { - err = decoder.Decode(&t.bytes) - } - if err == nil { - err = decoder.Decode(&t.page) - } - - return err -} - -// Tpl is an Fpdf used for writing a template. It has most of the facilities of -// an Fpdf, but cannot add more pages. Tpl is used directly only during the -// limited time a template is writable. -type Tpl struct { - Fpdf -} - -func (t *Tpl) loadParamsFromFpdf(f *Fpdf) { - t.Fpdf.compress = false - - t.Fpdf.k = f.k - t.Fpdf.x = f.x - t.Fpdf.y = f.y - t.Fpdf.lineWidth = f.lineWidth - t.Fpdf.capStyle = f.capStyle - t.Fpdf.joinStyle = f.joinStyle - - t.Fpdf.color.draw = f.color.draw - t.Fpdf.color.fill = f.color.fill - t.Fpdf.color.text = f.color.text - - t.Fpdf.fonts = f.fonts - t.Fpdf.currentFont = f.currentFont - t.Fpdf.fontFamily = f.fontFamily - t.Fpdf.fontSize = f.fontSize - t.Fpdf.fontSizePt = f.fontSizePt - t.Fpdf.fontStyle = f.fontStyle - t.Fpdf.ws = f.ws - - for key, value := range f.images { - t.Fpdf.images[key] = value - } -} diff --git a/vendor/github.com/go-pdf/fpdf/ttfparser.go b/vendor/github.com/go-pdf/fpdf/ttfparser.go deleted file mode 100644 index 33c14e8..0000000 --- a/vendor/github.com/go-pdf/fpdf/ttfparser.go +++ /dev/null @@ -1,404 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2013 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -// Utility to parse TTF font files -// Version: 1.0 -// Date: 2011-06-18 -// Author: Olivier PLATHEY -// Port to Go: Kurt Jung, 2013-07-15 - -import ( - "encoding/binary" - "fmt" - "io" - "os" - "regexp" - "strings" -) - -// TtfType contains metrics of a TrueType font. -type TtfType struct { - Embeddable bool - UnitsPerEm uint16 - PostScriptName string - Bold bool - ItalicAngle int16 - IsFixedPitch bool - TypoAscender int16 - TypoDescender int16 - UnderlinePosition int16 - UnderlineThickness int16 - Xmin, Ymin, Xmax, Ymax int16 - CapHeight int16 - Widths []uint16 - Chars map[uint16]uint16 -} - -type ttfParser struct { - rec TtfType - f *os.File - tables map[string]uint32 - numberOfHMetrics uint16 - numGlyphs uint16 -} - -// TtfParse extracts various metrics from a TrueType font file. -func TtfParse(fileStr string) (TtfRec TtfType, err error) { - var t ttfParser - t.f, err = os.Open(fileStr) - if err != nil { - return - } - version, err := t.ReadStr(4) - if err != nil { - return - } - if version == "OTTO" { - err = fmt.Errorf("fonts based on PostScript outlines are not supported") - return - } - if version != "\x00\x01\x00\x00" { - err = fmt.Errorf("unrecognized file format") - return - } - numTables := int(t.ReadUShort()) - t.Skip(3 * 2) // searchRange, entrySelector, rangeShift - t.tables = make(map[string]uint32) - var tag string - for j := 0; j < numTables; j++ { - tag, err = t.ReadStr(4) - if err != nil { - return - } - t.Skip(4) // checkSum - offset := t.ReadULong() - t.Skip(4) // length - t.tables[tag] = offset - } - err = t.ParseComponents() - if err != nil { - return - } - t.f.Close() - TtfRec = t.rec - return -} - -func (t *ttfParser) ParseComponents() (err error) { - err = t.ParseHead() - if err == nil { - err = t.ParseHhea() - if err == nil { - err = t.ParseMaxp() - if err == nil { - err = t.ParseHmtx() - if err == nil { - err = t.ParseCmap() - if err == nil { - err = t.ParseName() - if err == nil { - err = t.ParseOS2() - if err == nil { - err = t.ParsePost() - } - } - } - } - } - } - } - return -} - -func (t *ttfParser) ParseHead() (err error) { - err = t.Seek("head") - t.Skip(3 * 4) // version, fontRevision, checkSumAdjustment - magicNumber := t.ReadULong() - if magicNumber != 0x5F0F3CF5 { - err = fmt.Errorf("incorrect magic number") - return - } - t.Skip(2) // flags - t.rec.UnitsPerEm = t.ReadUShort() - t.Skip(2 * 8) // created, modified - t.rec.Xmin = t.ReadShort() - t.rec.Ymin = t.ReadShort() - t.rec.Xmax = t.ReadShort() - t.rec.Ymax = t.ReadShort() - return -} - -func (t *ttfParser) ParseHhea() (err error) { - err = t.Seek("hhea") - if err == nil { - t.Skip(4 + 15*2) - t.numberOfHMetrics = t.ReadUShort() - } - return -} - -func (t *ttfParser) ParseMaxp() (err error) { - err = t.Seek("maxp") - if err == nil { - t.Skip(4) - t.numGlyphs = t.ReadUShort() - } - return -} - -func (t *ttfParser) ParseHmtx() (err error) { - err = t.Seek("hmtx") - if err == nil { - t.rec.Widths = make([]uint16, 0, 8) - for j := uint16(0); j < t.numberOfHMetrics; j++ { - t.rec.Widths = append(t.rec.Widths, t.ReadUShort()) - t.Skip(2) // lsb - } - if t.numberOfHMetrics < t.numGlyphs { - lastWidth := t.rec.Widths[t.numberOfHMetrics-1] - for j := t.numberOfHMetrics; j < t.numGlyphs; j++ { - t.rec.Widths = append(t.rec.Widths, lastWidth) - } - } - } - return -} - -func (t *ttfParser) ParseCmap() (err error) { - var offset int64 - if err = t.Seek("cmap"); err != nil { - return - } - t.Skip(2) // version - numTables := int(t.ReadUShort()) - offset31 := int64(0) - for j := 0; j < numTables; j++ { - platformID := t.ReadUShort() - encodingID := t.ReadUShort() - offset = int64(t.ReadULong()) - if platformID == 3 && encodingID == 1 { - offset31 = offset - } - } - if offset31 == 0 { - err = fmt.Errorf("no Unicode encoding found") - return - } - startCount := make([]uint16, 0, 8) - endCount := make([]uint16, 0, 8) - idDelta := make([]int16, 0, 8) - idRangeOffset := make([]uint16, 0, 8) - t.rec.Chars = make(map[uint16]uint16) - _, err = t.f.Seek(int64(t.tables["cmap"])+offset31, io.SeekStart) - if err != nil { - err = fmt.Errorf("could not seek to cmap table: %w", err) - return - } - format := t.ReadUShort() - if format != 4 { - err = fmt.Errorf("unexpected subtable format: %d", format) - return - } - t.Skip(2 * 2) // length, language - segCount := int(t.ReadUShort() / 2) - t.Skip(3 * 2) // searchRange, entrySelector, rangeShift - for j := 0; j < segCount; j++ { - endCount = append(endCount, t.ReadUShort()) - } - t.Skip(2) // reservedPad - for j := 0; j < segCount; j++ { - startCount = append(startCount, t.ReadUShort()) - } - for j := 0; j < segCount; j++ { - idDelta = append(idDelta, t.ReadShort()) - } - offset, _ = t.f.Seek(int64(0), io.SeekCurrent) - for j := 0; j < segCount; j++ { - idRangeOffset = append(idRangeOffset, t.ReadUShort()) - } - for j := 0; j < segCount; j++ { - c1 := startCount[j] - c2 := endCount[j] - d := idDelta[j] - ro := idRangeOffset[j] - if ro > 0 { - _, err = t.f.Seek(offset+2*int64(j)+int64(ro), io.SeekStart) - if err != nil { - return fmt.Errorf("could not seek to id range offset: %w", err) - } - } - for c := c1; c <= c2; c++ { - if c == 0xFFFF { - break - } - var gid int32 - if ro > 0 { - gid = int32(t.ReadUShort()) - if gid > 0 { - gid += int32(d) - } - } else { - gid = int32(c) + int32(d) - } - if gid >= 65536 { - gid -= 65536 - } - if gid > 0 { - t.rec.Chars[c] = uint16(gid) - } - } - } - return -} - -func (t *ttfParser) ParseName() (err error) { - err = t.Seek("name") - if err == nil { - tableOffset, _ := t.f.Seek(0, io.SeekCurrent) - t.rec.PostScriptName = "" - t.Skip(2) // format - count := t.ReadUShort() - stringOffset := t.ReadUShort() - for j := uint16(0); j < count && t.rec.PostScriptName == ""; j++ { - t.Skip(3 * 2) // platformID, encodingID, languageID - nameID := t.ReadUShort() - length := t.ReadUShort() - offset := t.ReadUShort() - if nameID == 6 { - // PostScript name - _, err = t.f.Seek(int64(tableOffset)+int64(stringOffset)+int64(offset), io.SeekStart) - if err != nil { - return - } - var s string - s, err = t.ReadStr(int(length)) - if err != nil { - return - } - s = strings.Replace(s, "\x00", "", -1) - var re *regexp.Regexp - if re, err = regexp.Compile(`[(){}<> /%[\]]`); err != nil { - return - } - t.rec.PostScriptName = re.ReplaceAllString(s, "") - } - } - if t.rec.PostScriptName == "" { - err = fmt.Errorf("the name PostScript was not found") - } - } - return -} - -func (t *ttfParser) ParseOS2() (err error) { - err = t.Seek("OS/2") - if err == nil { - version := t.ReadUShort() - t.Skip(3 * 2) // xAvgCharWidth, usWeightClass, usWidthClass - fsType := t.ReadUShort() - t.rec.Embeddable = (fsType != 2) && (fsType&0x200) == 0 - t.Skip(11*2 + 10 + 4*4 + 4) - fsSelection := t.ReadUShort() - t.rec.Bold = (fsSelection & 32) != 0 - t.Skip(2 * 2) // usFirstCharIndex, usLastCharIndex - t.rec.TypoAscender = t.ReadShort() - t.rec.TypoDescender = t.ReadShort() - if version >= 2 { - t.Skip(3*2 + 2*4 + 2) - t.rec.CapHeight = t.ReadShort() - } else { - t.rec.CapHeight = 0 - } - } - return -} - -func (t *ttfParser) ParsePost() (err error) { - err = t.Seek("post") - if err == nil { - t.Skip(4) // version - t.rec.ItalicAngle = t.ReadShort() - t.Skip(2) // Skip decimal part - t.rec.UnderlinePosition = t.ReadShort() - t.rec.UnderlineThickness = t.ReadShort() - t.rec.IsFixedPitch = t.ReadULong() != 0 - } - return -} - -func (t *ttfParser) Seek(tag string) (err error) { - ofs, ok := t.tables[tag] - if !ok { - return fmt.Errorf("table not found: %s", tag) - } - - _, err = t.f.Seek(int64(ofs), io.SeekStart) - if err != nil { - return fmt.Errorf("could not seek to table %q: %w", tag, err) - } - return -} - -func (t *ttfParser) Skip(n int) { - _, err := t.f.Seek(int64(n), io.SeekCurrent) - if err != nil { - panic(fmt.Errorf("could not skip %d bytes: %w", n, err)) - } -} - -func (t *ttfParser) ReadStr(length int) (str string, err error) { - var n int - buf := make([]byte, length) - n, err = t.f.Read(buf) - if err == nil { - if n == length { - str = string(buf) - } else { - err = fmt.Errorf("unable to read %d bytes", length) - } - } - return -} - -func (t *ttfParser) ReadUShort() (val uint16) { - err := binary.Read(t.f, binary.BigEndian, &val) - if err != nil { - panic(fmt.Errorf("could not read u16: %w", err)) - } - return -} - -func (t *ttfParser) ReadShort() (val int16) { - err := binary.Read(t.f, binary.BigEndian, &val) - if err != nil { - panic(fmt.Errorf("could not read i16: %w", err)) - } - return -} - -func (t *ttfParser) ReadULong() (val uint32) { - err := binary.Read(t.f, binary.BigEndian, &val) - if err != nil { - panic(fmt.Errorf("could not read u32: %w", err)) - } - return -} diff --git a/vendor/github.com/go-pdf/fpdf/utf8fontfile.go b/vendor/github.com/go-pdf/fpdf/utf8fontfile.go deleted file mode 100644 index ebaf41c..0000000 --- a/vendor/github.com/go-pdf/fpdf/utf8fontfile.go +++ /dev/null @@ -1,1158 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2019 Arteom Korotkiy (Gmail: arteomkorotkiy) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -import ( - "bytes" - "encoding/binary" - "fmt" - "math" - "sort" -) - -// flags -const symbolWords = 1 << 0 -const symbolScale = 1 << 3 -const symbolContinue = 1 << 5 -const symbolAllScale = 1 << 6 -const symbol2x2 = 1 << 7 - -// CID map Init -const toUnicode = "/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo\n<> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000> \nendcodespacerange\n1 beginbfrange\n<0000> <0000>\nendbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend" - -type utf8FontFile struct { - fileReader *fileReader - LastRune int - tableDescriptions map[string]*tableDescription - outTablesData map[string][]byte - symbolPosition []int - charSymbolDictionary map[int]int - Ascent int - Descent int - fontElementSize int - Bbox fontBoxType - CapHeight int - StemV int - ItalicAngle int - Flags int - UnderlinePosition float64 - UnderlineThickness float64 - CharWidths []int - DefaultWidth float64 - symbolData map[int]map[string][]int - CodeSymbolDictionary map[int]int -} - -type tableDescription struct { - name string - checksum []int - position int - size int -} - -type fileReader struct { - readerPosition int64 - array []byte -} - -func (fr *fileReader) Read(s int) []byte { - b := fr.array[fr.readerPosition : fr.readerPosition+int64(s)] - fr.readerPosition += int64(s) - return b -} - -func (fr *fileReader) seek(shift int64, flag int) (int64, error) { - if flag == 0 { - fr.readerPosition = shift - } else if flag == 1 { - fr.readerPosition += shift - } else if flag == 2 { - fr.readerPosition = int64(len(fr.array)) - shift - } - return int64(fr.readerPosition), nil -} - -func newUTF8Font(reader *fileReader) *utf8FontFile { - utf := utf8FontFile{ - fileReader: reader, - } - return &utf -} - -func (utf *utf8FontFile) parseFile() error { - utf.fileReader.readerPosition = 0 - utf.symbolPosition = make([]int, 0) - utf.charSymbolDictionary = make(map[int]int) - utf.tableDescriptions = make(map[string]*tableDescription) - utf.outTablesData = make(map[string][]byte) - utf.Ascent = 0 - utf.Descent = 0 - codeType := uint32(utf.readUint32()) - if codeType == 0x4F54544F { - return fmt.Errorf("not supported\n ") - } - if codeType == 0x74746366 { - return fmt.Errorf("not supported\n ") - } - if codeType != 0x00010000 && codeType != 0x74727565 { - return fmt.Errorf("not a TrueType font: codeType=%v\n ", codeType) - } - utf.generateTableDescriptions() - utf.parseTables() - return nil -} - -func (utf *utf8FontFile) generateTableDescriptions() { - - tablesCount := utf.readUint16() - _ = utf.readUint16() - _ = utf.readUint16() - _ = utf.readUint16() - utf.tableDescriptions = make(map[string]*tableDescription) - - for i := 0; i < tablesCount; i++ { - record := tableDescription{ - name: utf.readTableName(), - checksum: []int{utf.readUint16(), utf.readUint16()}, - position: utf.readUint32(), - size: utf.readUint32(), - } - utf.tableDescriptions[record.name] = &record - } -} - -func (utf *utf8FontFile) readTableName() string { - return string(utf.fileReader.Read(4)) -} - -func (utf *utf8FontFile) readUint16() int { - s := utf.fileReader.Read(2) - return (int(s[0]) << 8) + int(s[1]) -} - -func (utf *utf8FontFile) readUint32() int { - s := utf.fileReader.Read(4) - return (int(s[0]) * 16777216) + (int(s[1]) << 16) + (int(s[2]) << 8) + int(s[3]) // 16777216 = 1<<24 -} - -func (utf *utf8FontFile) calcInt32(x, y []int) []int { - answer := make([]int, 2) - if y[1] > x[1] { - x[1] += 1 << 16 - x[0]++ - } - answer[1] = x[1] - y[1] - if y[0] > x[0] { - x[0] += 1 << 16 - } - answer[0] = x[0] - y[0] - answer[0] = answer[0] & 0xFFFF - return answer -} - -func (utf *utf8FontFile) generateChecksum(data []byte) []int { - if (len(data) % 4) != 0 { - for i := 0; (len(data) % 4) != 0; i++ { - data = append(data, 0) - } - } - answer := []int{0x0000, 0x0000} - for i := 0; i < len(data); i += 4 { - answer[0] += (int(data[i]) << 8) + int(data[i+1]) - answer[1] += (int(data[i+2]) << 8) + int(data[i+3]) - answer[0] += answer[1] >> 16 - answer[1] = answer[1] & 0xFFFF - answer[0] = answer[0] & 0xFFFF - } - return answer -} - -func (utf *utf8FontFile) seek(shift int) { - _, _ = utf.fileReader.seek(int64(shift), 0) -} - -func (utf *utf8FontFile) skip(delta int) { - _, _ = utf.fileReader.seek(int64(delta), 1) -} - -// SeekTable position -func (utf *utf8FontFile) SeekTable(name string) int { - return utf.seekTable(name, 0) -} - -func (utf *utf8FontFile) seekTable(name string, offsetInTable int) int { - _, _ = utf.fileReader.seek(int64(utf.tableDescriptions[name].position+offsetInTable), 0) - return int(utf.fileReader.readerPosition) -} - -func (utf *utf8FontFile) readInt16() int16 { - s := utf.fileReader.Read(2) - a := (int16(s[0]) << 8) + int16(s[1]) - if (int(a) & (1 << 15)) == 0 { - a = int16(int(a) - (1 << 16)) - } - return a -} - -func (utf *utf8FontFile) getUint16(pos int) int { - _, _ = utf.fileReader.seek(int64(pos), 0) - s := utf.fileReader.Read(2) - return (int(s[0]) << 8) + int(s[1]) -} - -func (utf *utf8FontFile) splice(stream []byte, offset int, value []byte) []byte { - stream = append([]byte{}, stream...) - return append(append(stream[:offset], value...), stream[offset+len(value):]...) -} - -func (utf *utf8FontFile) insertUint16(stream []byte, offset int, value int) []byte { - up := make([]byte, 2) - binary.BigEndian.PutUint16(up, uint16(value)) - return utf.splice(stream, offset, up) -} - -func (utf *utf8FontFile) getRange(pos, length int) []byte { - _, _ = utf.fileReader.seek(int64(pos), 0) - if length < 1 { - return make([]byte, 0) - } - s := utf.fileReader.Read(length) - return s -} - -func (utf *utf8FontFile) getTableData(name string) []byte { - desckrip := utf.tableDescriptions[name] - if desckrip == nil { - return nil - } - if desckrip.size == 0 { - return nil - } - _, _ = utf.fileReader.seek(int64(desckrip.position), 0) - s := utf.fileReader.Read(desckrip.size) - return s -} - -func (utf *utf8FontFile) setOutTable(name string, data []byte) { - if data == nil { - return - } - if name == "head" { - data = utf.splice(data, 8, []byte{0, 0, 0, 0}) - } - utf.outTablesData[name] = data -} - -func arrayKeys(arr map[int]string) []int { - answer := make([]int, len(arr)) - i := 0 - for key := range arr { - answer[i] = key - i++ - } - return answer -} - -func inArray(s int, arr []int) bool { - for _, i := range arr { - if s == i { - return true - } - } - return false -} - -func (utf *utf8FontFile) parseNAMETable() int { - namePosition := utf.SeekTable("name") - format := utf.readUint16() - if format != 0 { - fmt.Printf("Illegal format %d\n", format) - return format - } - nameCount := utf.readUint16() - stringDataPosition := namePosition + utf.readUint16() - names := map[int]string{1: "", 2: "", 3: "", 4: "", 6: ""} - keys := arrayKeys(names) - counter := len(names) - for i := 0; i < nameCount; i++ { - system := utf.readUint16() - code := utf.readUint16() - local := utf.readUint16() - nameID := utf.readUint16() - size := utf.readUint16() - position := utf.readUint16() - if !inArray(nameID, keys) { - continue - } - currentName := "" - if system == 3 && code == 1 && local == 0x409 { - oldPos := utf.fileReader.readerPosition - utf.seek(stringDataPosition + position) - if size%2 != 0 { - fmt.Printf("name is not binar byte format\n") - return format - } - size /= 2 - currentName = "" - for size > 0 { - char := utf.readUint16() - currentName += string(rune(char)) - size-- - } - utf.fileReader.readerPosition = oldPos - utf.seek(int(oldPos)) - } else if system == 1 && code == 0 && local == 0 { - oldPos := utf.fileReader.readerPosition - currentName = string(utf.getRange(stringDataPosition+position, size)) - utf.fileReader.readerPosition = oldPos - utf.seek(int(oldPos)) - } - if currentName != "" && names[nameID] == "" { - names[nameID] = currentName - counter-- - if counter == 0 { - break - } - } - } - return format -} - -func (utf *utf8FontFile) parseHEADTable() { - utf.SeekTable("head") - utf.skip(18) - utf.fontElementSize = utf.readUint16() - scale := 1000.0 / float64(utf.fontElementSize) - utf.skip(16) - xMin := utf.readInt16() - yMin := utf.readInt16() - xMax := utf.readInt16() - yMax := utf.readInt16() - utf.Bbox = fontBoxType{int(float64(xMin) * scale), int(float64(yMin) * scale), int(float64(xMax) * scale), int(float64(yMax) * scale)} - utf.skip(3 * 2) - _ = utf.readUint16() - symbolDataFormat := utf.readUint16() - if symbolDataFormat != 0 { - fmt.Printf("Unknown symbol data format %d\n", symbolDataFormat) - return - } -} - -func (utf *utf8FontFile) parseHHEATable() int { - metricsCount := 0 - if _, OK := utf.tableDescriptions["hhea"]; OK { - scale := 1000.0 / float64(utf.fontElementSize) - utf.SeekTable("hhea") - utf.skip(4) - hheaAscender := utf.readInt16() - hheaDescender := utf.readInt16() - utf.Ascent = int(float64(hheaAscender) * scale) - utf.Descent = int(float64(hheaDescender) * scale) - utf.skip(24) - metricDataFormat := utf.readUint16() - if metricDataFormat != 0 { - fmt.Printf("Unknown horizontal metric data format %d\n", metricDataFormat) - return 0 - } - metricsCount = utf.readUint16() - if metricsCount == 0 { - fmt.Printf("Number of horizontal metrics is 0\n") - return 0 - } - } - return metricsCount -} - -func (utf *utf8FontFile) parseOS2Table() int { - var weightType int - scale := 1000.0 / float64(utf.fontElementSize) - if _, OK := utf.tableDescriptions["OS/2"]; OK { - utf.SeekTable("OS/2") - version := utf.readUint16() - utf.skip(2) - weightType = utf.readUint16() - utf.skip(2) - fsType := utf.readUint16() - if fsType == 0x0002 || (fsType&0x0300) != 0 { - fmt.Printf("ERROR - copyright restrictions.\n") - return 0 - } - utf.skip(20) - _ = utf.readInt16() - - utf.skip(36) - sTypoAscender := utf.readInt16() - sTypoDescender := utf.readInt16() - if utf.Ascent == 0 { - utf.Ascent = int(float64(sTypoAscender) * scale) - } - if utf.Descent == 0 { - utf.Descent = int(float64(sTypoDescender) * scale) - } - if version > 1 { - utf.skip(16) - sCapHeight := utf.readInt16() - utf.CapHeight = int(float64(sCapHeight) * scale) - } else { - utf.CapHeight = utf.Ascent - } - } else { - weightType = 500 - if utf.Ascent == 0 { - utf.Ascent = int(float64(utf.Bbox.Ymax) * scale) - } - if utf.Descent == 0 { - utf.Descent = int(float64(utf.Bbox.Ymin) * scale) - } - utf.CapHeight = utf.Ascent - } - utf.StemV = 50 + int(math.Pow(float64(weightType)/65.0, 2)) - return weightType -} - -func (utf *utf8FontFile) parsePOSTTable(weight int) { - utf.SeekTable("post") - utf.skip(4) - utf.ItalicAngle = int(utf.readInt16()) + utf.readUint16()/65536.0 - scale := 1000.0 / float64(utf.fontElementSize) - utf.UnderlinePosition = float64(utf.readInt16()) * scale - utf.UnderlineThickness = float64(utf.readInt16()) * scale - fixed := utf.readUint32() - - utf.Flags = 4 - - if utf.ItalicAngle != 0 { - utf.Flags = utf.Flags | 64 - } - if weight >= 600 { - utf.Flags = utf.Flags | 262144 - } - if fixed != 0 { - utf.Flags = utf.Flags | 1 - } -} - -func (utf *utf8FontFile) parseCMAPTable(format int) int { - cmapPosition := utf.SeekTable("cmap") - utf.skip(2) - cmapTableCount := utf.readUint16() - cidCMAPPosition := 0 - for i := 0; i < cmapTableCount; i++ { - system := utf.readUint16() - coded := utf.readUint16() - position := utf.readUint32() - oldReaderPosition := utf.fileReader.readerPosition - if (system == 3 && coded == 1) || system == 0 { // Microsoft, Unicode - v := utf.getUint16(cmapPosition + position) - if v == 4 { - if cidCMAPPosition == 0 { - cidCMAPPosition = cmapPosition + position - } - break - } - } - utf.seek(int(oldReaderPosition)) - } - if cidCMAPPosition == 0 { - fmt.Printf("Font does not have cmap for Unicode\n") - return cidCMAPPosition - } - return cidCMAPPosition -} - -func (utf *utf8FontFile) parseTables() { - f := utf.parseNAMETable() - utf.parseHEADTable() - n := utf.parseHHEATable() - w := utf.parseOS2Table() - utf.parsePOSTTable(w) - runeCMAPPosition := utf.parseCMAPTable(f) - - utf.SeekTable("maxp") - utf.skip(4) - numSymbols := utf.readUint16() - - symbolCharDictionary := make(map[int][]int) - charSymbolDictionary := make(map[int]int) - utf.generateSCCSDictionaries(runeCMAPPosition, symbolCharDictionary, charSymbolDictionary) - - scale := 1000.0 / float64(utf.fontElementSize) - utf.parseHMTXTable(n, numSymbols, symbolCharDictionary, scale) -} - -func (utf *utf8FontFile) generateCMAP() map[int][]int { - cmapPosition := utf.SeekTable("cmap") - utf.skip(2) - cmapTableCount := utf.readUint16() - runeCmapPosition := 0 - for i := 0; i < cmapTableCount; i++ { - system := utf.readUint16() - coder := utf.readUint16() - position := utf.readUint32() - oldPosition := utf.fileReader.readerPosition - if (system == 3 && coder == 1) || system == 0 { - format := utf.getUint16(cmapPosition + position) - if format == 4 { - runeCmapPosition = cmapPosition + position - break - } - } - utf.seek(int(oldPosition)) - } - - if runeCmapPosition == 0 { - fmt.Printf("Font does not have cmap for Unicode\n") - return nil - } - - symbolCharDictionary := make(map[int][]int) - charSymbolDictionary := make(map[int]int) - utf.generateSCCSDictionaries(runeCmapPosition, symbolCharDictionary, charSymbolDictionary) - - utf.charSymbolDictionary = charSymbolDictionary - - return symbolCharDictionary -} - -func (utf *utf8FontFile) parseSymbols(usedRunes map[int]int) (map[int]int, map[int]int, map[int]int, []int) { - symbolCollection := map[int]int{0: 0} - charSymbolPairCollection := make(map[int]int) - for _, char := range usedRunes { - if _, OK := utf.charSymbolDictionary[char]; OK { - symbolCollection[utf.charSymbolDictionary[char]] = char - charSymbolPairCollection[char] = utf.charSymbolDictionary[char] - - } - utf.LastRune = max(utf.LastRune, char) - } - - begin := utf.tableDescriptions["glyf"].position - - symbolArray := make(map[int]int) - symbolCollectionKeys := keySortInt(symbolCollection) - - symbolCounter := 0 - maxRune := 0 - for _, oldSymbolIndex := range symbolCollectionKeys { - maxRune = max(maxRune, symbolCollection[oldSymbolIndex]) - symbolArray[oldSymbolIndex] = symbolCounter - symbolCounter++ - } - charSymbolPairCollectionKeys := keySortInt(charSymbolPairCollection) - runeSymbolPairCollection := make(map[int]int) - for _, runa := range charSymbolPairCollectionKeys { - runeSymbolPairCollection[runa] = symbolArray[charSymbolPairCollection[runa]] - } - utf.CodeSymbolDictionary = runeSymbolPairCollection - - symbolCollectionKeys = keySortInt(symbolCollection) - for _, oldSymbolIndex := range symbolCollectionKeys { - _, symbolArray, symbolCollection, symbolCollectionKeys = utf.getSymbols(oldSymbolIndex, &begin, symbolArray, symbolCollection, symbolCollectionKeys) - } - - return runeSymbolPairCollection, symbolArray, symbolCollection, symbolCollectionKeys -} - -func (utf *utf8FontFile) generateCMAPTable(cidSymbolPairCollection map[int]int, numSymbols int) []byte { - cidSymbolPairCollectionKeys := keySortInt(cidSymbolPairCollection) - cidID := 0 - cidArray := make(map[int][]int) - prevCid := -2 - prevSymbol := -1 - for _, cid := range cidSymbolPairCollectionKeys { - if cid == (prevCid+1) && cidSymbolPairCollection[cid] == (prevSymbol+1) { - if n, OK := cidArray[cidID]; !OK || n == nil { - cidArray[cidID] = make([]int, 0) - } - cidArray[cidID] = append(cidArray[cidID], cidSymbolPairCollection[cid]) - } else { - cidID = cid - cidArray[cidID] = make([]int, 0) - cidArray[cidID] = append(cidArray[cidID], cidSymbolPairCollection[cid]) - } - prevCid = cid - prevSymbol = cidSymbolPairCollection[cid] - } - cidArrayKeys := keySortArrayRangeMap(cidArray) - segCount := len(cidArray) + 1 - - searchRange := 1 - entrySelector := 0 - for searchRange*2 <= segCount { - searchRange = searchRange * 2 - entrySelector = entrySelector + 1 - } - searchRange = searchRange * 2 - rangeShift := segCount*2 - searchRange - length := 16 + (8 * segCount) + (numSymbols + 1) - cmap := []int{0, 1, 3, 1, 0, 12, 4, length, 0, segCount * 2, searchRange, entrySelector, rangeShift} - - for _, start := range cidArrayKeys { - endCode := start + (len(cidArray[start]) - 1) - cmap = append(cmap, endCode) - } - cmap = append(cmap, 0xFFFF) - cmap = append(cmap, 0) - - cmap = append(cmap, cidArrayKeys...) - cmap = append(cmap, 0xFFFF) - for _, cidKey := range cidArrayKeys { - idDelta := -(cidKey - cidArray[cidKey][0]) - cmap = append(cmap, idDelta) - } - cmap = append(cmap, 1) - for range cidArray { - cmap = append(cmap, 0) - - } - cmap = append(cmap, 0) - for _, start := range cidArrayKeys { - cmap = append(cmap, cidArray[start]...) - } - cmap = append(cmap, 0) - cmapstr := make([]byte, 0) - for _, cm := range cmap { - cmapstr = append(cmapstr, packUint16(cm)...) - } - return cmapstr -} - -// GenerateCutFont fill utf8FontFile from .utf file, only with runes from usedRunes -func (utf *utf8FontFile) GenerateCutFont(usedRunes map[int]int) []byte { - utf.fileReader.readerPosition = 0 - utf.symbolPosition = make([]int, 0) - utf.charSymbolDictionary = make(map[int]int) - utf.tableDescriptions = make(map[string]*tableDescription) - utf.outTablesData = make(map[string][]byte) - utf.Ascent = 0 - utf.Descent = 0 - utf.skip(4) - utf.LastRune = 0 - utf.generateTableDescriptions() - - utf.SeekTable("head") - utf.skip(50) - LocaFormat := utf.readUint16() - - utf.SeekTable("hhea") - utf.skip(34) - metricsCount := utf.readUint16() - oldMetrics := metricsCount - - utf.SeekTable("maxp") - utf.skip(4) - numSymbols := utf.readUint16() - - symbolCharDictionary := utf.generateCMAP() - if symbolCharDictionary == nil { - return nil - } - - utf.parseHMTXTable(metricsCount, numSymbols, symbolCharDictionary, 1.0) - - utf.parseLOCATable(LocaFormat, numSymbols) - - cidSymbolPairCollection, symbolArray, symbolCollection, symbolCollectionKeys := utf.parseSymbols(usedRunes) - - metricsCount = len(symbolCollection) - numSymbols = metricsCount - - utf.setOutTable("name", utf.getTableData("name")) - utf.setOutTable("cvt ", utf.getTableData("cvt ")) - utf.setOutTable("fpgm", utf.getTableData("fpgm")) - utf.setOutTable("prep", utf.getTableData("prep")) - utf.setOutTable("gasp", utf.getTableData("gasp")) - - postTable := utf.getTableData("post") - postTable = append(append([]byte{0x00, 0x03, 0x00, 0x00}, postTable[4:16]...), []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}...) - utf.setOutTable("post", postTable) - - delete(cidSymbolPairCollection, 0) - - utf.setOutTable("cmap", utf.generateCMAPTable(cidSymbolPairCollection, numSymbols)) - - symbolData := utf.getTableData("glyf") - - offsets := make([]int, 0) - glyfData := make([]byte, 0) - pos := 0 - hmtxData := make([]byte, 0) - utf.symbolData = make(map[int]map[string][]int) - - for _, originalSymbolIdx := range symbolCollectionKeys { - hm := utf.getMetrics(oldMetrics, originalSymbolIdx) - hmtxData = append(hmtxData, hm...) - - offsets = append(offsets, pos) - symbolPos := utf.symbolPosition[originalSymbolIdx] - symbolLen := utf.symbolPosition[originalSymbolIdx+1] - symbolPos - data := symbolData[symbolPos : symbolPos+symbolLen] - var up int - if symbolLen > 0 { - up = unpackUint16(data[0:2]) - } - - if symbolLen > 2 && (up&(1<<15)) != 0 { - posInSymbol := 10 - flags := symbolContinue - nComponentElements := 0 - for (flags & symbolContinue) != 0 { - nComponentElements++ - up = unpackUint16(data[posInSymbol : posInSymbol+2]) - flags = up - up = unpackUint16(data[posInSymbol+2 : posInSymbol+4]) - symbolIdx := up - if _, OK := utf.symbolData[originalSymbolIdx]; !OK { - utf.symbolData[originalSymbolIdx] = make(map[string][]int) - } - if _, OK := utf.symbolData[originalSymbolIdx]["compSymbols"]; !OK { - utf.symbolData[originalSymbolIdx]["compSymbols"] = make([]int, 0) - } - utf.symbolData[originalSymbolIdx]["compSymbols"] = append(utf.symbolData[originalSymbolIdx]["compSymbols"], symbolIdx) - data = utf.insertUint16(data, posInSymbol+2, symbolArray[symbolIdx]) - posInSymbol += 4 - if (flags & symbolWords) != 0 { - posInSymbol += 4 - } else { - posInSymbol += 2 - } - if (flags & symbolScale) != 0 { - posInSymbol += 2 - } else if (flags & symbolAllScale) != 0 { - posInSymbol += 4 - } else if (flags & symbol2x2) != 0 { - posInSymbol += 8 - } - } - } - - glyfData = append(glyfData, data...) - pos += symbolLen - if pos%4 != 0 { - padding := 4 - (pos % 4) - glyfData = append(glyfData, make([]byte, padding)...) - pos += padding - } - } - - offsets = append(offsets, pos) - utf.setOutTable("glyf", glyfData) - - utf.setOutTable("hmtx", hmtxData) - - locaData := make([]byte, 0) - if ((pos + 1) >> 1) > 0xFFFF { - LocaFormat = 1 - for _, offset := range offsets { - locaData = append(locaData, packUint32(offset)...) - } - } else { - LocaFormat = 0 - for _, offset := range offsets { - locaData = append(locaData, packUint16(offset/2)...) - } - } - utf.setOutTable("loca", locaData) - - headData := utf.getTableData("head") - headData = utf.insertUint16(headData, 50, LocaFormat) - utf.setOutTable("head", headData) - - hheaData := utf.getTableData("hhea") - hheaData = utf.insertUint16(hheaData, 34, metricsCount) - utf.setOutTable("hhea", hheaData) - - maxp := utf.getTableData("maxp") - maxp = utf.insertUint16(maxp, 4, numSymbols) - utf.setOutTable("maxp", maxp) - - os2Data := utf.getTableData("OS/2") - utf.setOutTable("OS/2", os2Data) - - return utf.assembleTables() -} - -func (utf *utf8FontFile) getSymbols(originalSymbolIdx int, start *int, symbolSet map[int]int, SymbolsCollection map[int]int, SymbolsCollectionKeys []int) (*int, map[int]int, map[int]int, []int) { - symbolPos := utf.symbolPosition[originalSymbolIdx] - symbolSize := utf.symbolPosition[originalSymbolIdx+1] - symbolPos - if symbolSize == 0 { - return start, symbolSet, SymbolsCollection, SymbolsCollectionKeys - } - utf.seek(*start + symbolPos) - - lineCount := utf.readInt16() - - if lineCount < 0 { - utf.skip(8) - flags := symbolContinue - for flags&symbolContinue != 0 { - flags = utf.readUint16() - symbolIndex := utf.readUint16() - if _, OK := symbolSet[symbolIndex]; !OK { - symbolSet[symbolIndex] = len(SymbolsCollection) - SymbolsCollection[symbolIndex] = 1 - SymbolsCollectionKeys = append(SymbolsCollectionKeys, symbolIndex) - } - oldPosition, _ := utf.fileReader.seek(0, 1) - _, _, _, SymbolsCollectionKeys = utf.getSymbols(symbolIndex, start, symbolSet, SymbolsCollection, SymbolsCollectionKeys) - utf.seek(int(oldPosition)) - if flags&symbolWords != 0 { - utf.skip(4) - } else { - utf.skip(2) - } - if flags&symbolScale != 0 { - utf.skip(2) - } else if flags&symbolAllScale != 0 { - utf.skip(4) - } else if flags&symbol2x2 != 0 { - utf.skip(8) - } - } - } - return start, symbolSet, SymbolsCollection, SymbolsCollectionKeys -} - -func (utf *utf8FontFile) parseHMTXTable(numberOfHMetrics, numSymbols int, symbolToChar map[int][]int, scale float64) { - var widths int - start := utf.SeekTable("hmtx") - arrayWidths := 0 - var arr []int - utf.CharWidths = make([]int, 256*256) - charCount := 0 - arr = unpackUint16Array(utf.getRange(start, numberOfHMetrics*4)) - for symbol := 0; symbol < numberOfHMetrics; symbol++ { - arrayWidths = arr[(symbol*2)+1] - if _, OK := symbolToChar[symbol]; OK || symbol == 0 { - - if arrayWidths >= (1 << 15) { - arrayWidths = 0 - } - if symbol == 0 { - utf.DefaultWidth = scale * float64(arrayWidths) - continue - } - for _, char := range symbolToChar[symbol] { - if char != 0 && char != 65535 { - widths = int(math.Round(scale * float64(arrayWidths))) - if widths == 0 { - widths = 65535 - } - if char < 196608 { - utf.CharWidths[char] = widths - charCount++ - } - } - } - } - } - diff := numSymbols - numberOfHMetrics - for pos := 0; pos < diff; pos++ { - symbol := pos + numberOfHMetrics - if _, OK := symbolToChar[symbol]; OK { - for _, char := range symbolToChar[symbol] { - if char != 0 && char != 65535 { - widths = int(math.Round(scale * float64(arrayWidths))) - if widths == 0 { - widths = 65535 - } - if char < 196608 { - utf.CharWidths[char] = widths - charCount++ - } - } - } - } - } - utf.CharWidths[0] = charCount -} - -func (utf *utf8FontFile) getMetrics(metricCount, gid int) []byte { - start := utf.SeekTable("hmtx") - var metrics []byte - if gid < metricCount { - utf.seek(start + (gid * 4)) - metrics = utf.fileReader.Read(4) - } else { - utf.seek(start + ((metricCount - 1) * 4)) - metrics = utf.fileReader.Read(2) - utf.seek(start + (metricCount * 2) + (gid * 2)) - metrics = append(metrics, utf.fileReader.Read(2)...) - } - return metrics -} - -func (utf *utf8FontFile) parseLOCATable(format, numSymbols int) { - start := utf.SeekTable("loca") - utf.symbolPosition = make([]int, 0) - if format == 0 { - data := utf.getRange(start, (numSymbols*2)+2) - arr := unpackUint16Array(data) - for n := 0; n <= numSymbols; n++ { - utf.symbolPosition = append(utf.symbolPosition, arr[n+1]*2) - } - } else if format == 1 { - data := utf.getRange(start, (numSymbols*4)+4) - arr := unpackUint32Array(data) - for n := 0; n <= numSymbols; n++ { - utf.symbolPosition = append(utf.symbolPosition, arr[n+1]) - } - } else { - fmt.Printf("Unknown loca table format %d\n", format) - return - } -} - -func (utf *utf8FontFile) generateSCCSDictionaries(runeCmapPosition int, symbolCharDictionary map[int][]int, charSymbolDictionary map[int]int) { - maxRune := 0 - utf.seek(runeCmapPosition + 2) - size := utf.readUint16() - rim := runeCmapPosition + size - utf.skip(2) - - segmentSize := utf.readUint16() / 2 - utf.skip(6) - completers := make([]int, 0) - for i := 0; i < segmentSize; i++ { - completers = append(completers, utf.readUint16()) - } - utf.skip(2) - beginners := make([]int, 0) - for i := 0; i < segmentSize; i++ { - beginners = append(beginners, utf.readUint16()) - } - sizes := make([]int, 0) - for i := 0; i < segmentSize; i++ { - sizes = append(sizes, int(utf.readInt16())) - } - readerPositionStart := utf.fileReader.readerPosition - positions := make([]int, 0) - for i := 0; i < segmentSize; i++ { - positions = append(positions, utf.readUint16()) - } - var symbol int - for n := 0; n < segmentSize; n++ { - completePosition := completers[n] + 1 - for char := beginners[n]; char < completePosition; char++ { - if positions[n] == 0 { - symbol = (char + sizes[n]) & 0xFFFF - } else { - position := (char-beginners[n])*2 + positions[n] - position = int(readerPositionStart) + 2*n + position - if position >= rim { - symbol = 0 - } else { - symbol = utf.getUint16(position) - if symbol != 0 { - symbol = (symbol + sizes[n]) & 0xFFFF - } - } - } - charSymbolDictionary[char] = symbol - if char < 196608 { - maxRune = max(char, maxRune) - } - symbolCharDictionary[symbol] = append(symbolCharDictionary[symbol], char) - } - } -} - -func max(i, n int) int { - if n > i { - return n - } - return i -} - -func (utf *utf8FontFile) assembleTables() []byte { - answer := make([]byte, 0) - tablesCount := len(utf.outTablesData) - findSize := 1 - writer := 0 - for findSize*2 <= tablesCount { - findSize = findSize * 2 - writer = writer + 1 - } - findSize = findSize * 16 - rOffset := tablesCount*16 - findSize - - answer = append(answer, packHeader(0x00010000, tablesCount, findSize, writer, rOffset)...) - - tables := make(map[string][]byte, len(utf.outTablesData)) - for k, v := range utf.outTablesData { - tables[k] = make([]byte, len(v)) - copy(tables[k], v) - } - tablesNames := keySortStrings(tables) - - offset := 12 + tablesCount*16 - begin := 0 - - for _, name := range tablesNames { - if name == "head" { - begin = offset - } - answer = append(answer, []byte(name)...) - checksum := utf.generateChecksum(tables[name]) - answer = append(answer, pack2Uint16(checksum[0], checksum[1])...) - answer = append(answer, pack2Uint32(offset, len(tables[name]))...) - paddedLength := (len(tables[name]) + 3) &^ 3 - offset = offset + paddedLength - } - - for _, key := range tablesNames { - data := append([]byte{}, tables[key]...) - data = append(data, []byte{0, 0, 0}...) - answer = append(answer, data[:(len(data)&^3)]...) - } - - checksum := utf.generateChecksum([]byte(answer)) - checksum = utf.calcInt32([]int{0xB1B0, 0xAFBA}, checksum) - answer = utf.splice(answer, (begin + 8), pack2Uint16(checksum[0], checksum[1])) - return answer -} - -func unpackUint16Array(data []byte) []int { - answer := make([]int, 1) - r := bytes.NewReader(data) - bs := make([]byte, 2) - var e error - var c int - c, e = r.Read(bs) - for e == nil && c > 0 { - answer = append(answer, int(binary.BigEndian.Uint16(bs))) - c, e = r.Read(bs) - } - return answer -} - -func unpackUint32Array(data []byte) []int { - answer := make([]int, 1) - r := bytes.NewReader(data) - bs := make([]byte, 4) - var e error - var c int - c, e = r.Read(bs) - for e == nil && c > 0 { - answer = append(answer, int(binary.BigEndian.Uint32(bs))) - c, e = r.Read(bs) - } - return answer -} - -func unpackUint16(data []byte) int { - return int(binary.BigEndian.Uint16(data)) -} - -func packHeader(N uint32, n1, n2, n3, n4 int) []byte { - answer := make([]byte, 0) - bs4 := make([]byte, 4) - binary.BigEndian.PutUint32(bs4, N) - answer = append(answer, bs4...) - bs := make([]byte, 2) - binary.BigEndian.PutUint16(bs, uint16(n1)) - answer = append(answer, bs...) - binary.BigEndian.PutUint16(bs, uint16(n2)) - answer = append(answer, bs...) - binary.BigEndian.PutUint16(bs, uint16(n3)) - answer = append(answer, bs...) - binary.BigEndian.PutUint16(bs, uint16(n4)) - answer = append(answer, bs...) - return answer -} - -func pack2Uint16(n1, n2 int) []byte { - answer := make([]byte, 0) - bs := make([]byte, 2) - binary.BigEndian.PutUint16(bs, uint16(n1)) - answer = append(answer, bs...) - binary.BigEndian.PutUint16(bs, uint16(n2)) - answer = append(answer, bs...) - return answer -} - -func pack2Uint32(n1, n2 int) []byte { - answer := make([]byte, 0) - bs := make([]byte, 4) - binary.BigEndian.PutUint32(bs, uint32(n1)) - answer = append(answer, bs...) - binary.BigEndian.PutUint32(bs, uint32(n2)) - answer = append(answer, bs...) - return answer -} - -func packUint32(n1 int) []byte { - bs := make([]byte, 4) - binary.BigEndian.PutUint32(bs, uint32(n1)) - return bs -} - -func packUint16(n1 int) []byte { - bs := make([]byte, 2) - binary.BigEndian.PutUint16(bs, uint16(n1)) - return bs -} - -func keySortStrings(s map[string][]byte) []string { - keys := make([]string, len(s)) - i := 0 - for key := range s { - keys[i] = key - i++ - } - sort.Strings(keys) - return keys -} - -func keySortInt(s map[int]int) []int { - keys := make([]int, len(s)) - i := 0 - for key := range s { - keys[i] = key - i++ - } - sort.Ints(keys) - return keys -} - -func keySortArrayRangeMap(s map[int][]int) []int { - keys := make([]int, len(s)) - i := 0 - for key := range s { - keys[i] = key - i++ - } - sort.Ints(keys) - return keys -} - -// UTF8CutFont is a utility function that generates a TrueType font composed -// only of the runes included in cutset. The rune glyphs are copied from This -// function is demonstrated in ExampleUTF8CutFont(). -func UTF8CutFont(inBuf []byte, cutset string) (outBuf []byte) { - f := newUTF8Font(&fileReader{readerPosition: 0, array: inBuf}) - runes := map[int]int{} - for i, r := range cutset { - runes[i] = int(r) - } - outBuf = f.GenerateCutFont(runes) - return -} diff --git a/vendor/github.com/go-pdf/fpdf/util.go b/vendor/github.com/go-pdf/fpdf/util.go deleted file mode 100644 index 96d7d7c..0000000 --- a/vendor/github.com/go-pdf/fpdf/util.go +++ /dev/null @@ -1,432 +0,0 @@ -// Copyright ©2023 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -/* - * Copyright (c) 2013 Kurt Jung (Gmail: kurt.w.jung) - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fpdf - -import ( - "bufio" - "bytes" - "fmt" - "io" - "math" - "os" - "path/filepath" - "strings" -) - -func must(n int, err error) { - if err != nil { - panic(err) - } -} - -func must64(n int64, err error) { - if err != nil { - panic(err) - } -} - -func round(f float64) int { - if f < 0 { - return -int(math.Floor(-f + 0.5)) - } - return int(math.Floor(f + 0.5)) -} - -func sprintf(fmtStr string, args ...interface{}) string { - return fmt.Sprintf(fmtStr, args...) -} - -// fileExist returns true if the specified normal file exists -func fileExist(filename string) (ok bool) { - info, err := os.Stat(filename) - if err == nil { - if ^os.ModePerm&info.Mode() == 0 { - ok = true - } - } - return ok -} - -// fileSize returns the size of the specified file; ok will be false -// if the file does not exist or is not an ordinary file -func fileSize(filename string) (size int64, ok bool) { - info, err := os.Stat(filename) - ok = err == nil - if ok { - size = info.Size() - } - return -} - -// utf8toutf16 converts UTF-8 to UTF-16BE; from http://www.fpdf.org/ -func utf8toutf16(s string, withBOM ...bool) string { - bom := true - if len(withBOM) > 0 { - bom = withBOM[0] - } - res := make([]byte, 0, 8) - if bom { - res = append(res, 0xFE, 0xFF) - } - nb := len(s) - i := 0 - for i < nb { - c1 := byte(s[i]) - i++ - switch { - case c1 >= 224: - // 3-byte character - c2 := byte(s[i]) - i++ - c3 := byte(s[i]) - i++ - res = append(res, ((c1&0x0F)<<4)+((c2&0x3C)>>2), - ((c2&0x03)<<6)+(c3&0x3F)) - case c1 >= 192: - // 2-byte character - c2 := byte(s[i]) - i++ - res = append(res, ((c1 & 0x1C) >> 2), - ((c1&0x03)<<6)+(c2&0x3F)) - default: - // Single-byte character - res = append(res, 0, c1) - } - } - return string(res) -} - -// intIf returns a if cnd is true, otherwise b -func intIf(cnd bool, a, b int) int { - if cnd { - return a - } - return b -} - -// strIf returns aStr if cnd is true, otherwise bStr -func strIf(cnd bool, aStr, bStr string) string { - if cnd { - return aStr - } - return bStr -} - -// doNothing returns the passed string with no translation. -func doNothing(s string) string { - return s -} - -// Dump the internals of the specified values -// func dump(fileStr string, a ...interface{}) { -// fl, err := os.OpenFile(fileStr, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600) -// if err == nil { -// fmt.Fprintf(fl, "----------------\n") -// spew.Fdump(fl, a...) -// fl.Close() -// } -// } - -func repClosure(m map[rune]byte) func(string) string { - var buf bytes.Buffer - return func(str string) string { - var ch byte - var ok bool - buf.Truncate(0) - for _, r := range str { - if r < 0x80 { - ch = byte(r) - } else { - ch, ok = m[r] - if !ok { - ch = byte('.') - } - } - buf.WriteByte(ch) - } - return buf.String() - } -} - -// UnicodeTranslator returns a function that can be used to translate, where -// possible, utf-8 strings to a form that is compatible with the specified code -// page. The returned function accepts a string and returns a string. -// -// r is a reader that should read a buffer made up of content lines that -// pertain to the code page of interest. Each line is made up of three -// whitespace separated fields. The first begins with "!" and is followed by -// two hexadecimal digits that identify the glyph position in the code page of -// interest. The second field begins with "U+" and is followed by the unicode -// code point value. The third is the glyph name. A number of these code page -// map files are packaged with the gfpdf library in the font directory. -// -// An error occurs only if a line is read that does not conform to the expected -// format. In this case, the returned function is valid but does not perform -// any rune translation. -func UnicodeTranslator(r io.Reader) (f func(string) string, err error) { - m := make(map[rune]byte) - var uPos, cPos uint32 - var lineStr, nameStr string - sc := bufio.NewScanner(r) - for sc.Scan() { - lineStr = sc.Text() - lineStr = strings.TrimSpace(lineStr) - if len(lineStr) > 0 { - _, err = fmt.Sscanf(lineStr, "!%2X U+%4X %s", &cPos, &uPos, &nameStr) - if err == nil { - if cPos >= 0x80 { - m[rune(uPos)] = byte(cPos) - } - } - } - } - if err == nil { - f = repClosure(m) - } else { - f = doNothing - } - return -} - -// UnicodeTranslatorFromFile returns a function that can be used to translate, -// where possible, utf-8 strings to a form that is compatible with the -// specified code page. See UnicodeTranslator for more details. -// -// fileStr identifies a font descriptor file that maps glyph positions to names. -// -// If an error occurs reading the file, the returned function is valid but does -// not perform any rune translation. -func UnicodeTranslatorFromFile(fileStr string) (f func(string) string, err error) { - var fl *os.File - fl, err = os.Open(fileStr) - if err == nil { - f, err = UnicodeTranslator(fl) - fl.Close() - } else { - f = doNothing - } - return -} - -// UnicodeTranslatorFromDescriptor returns a function that can be used to -// translate, where possible, utf-8 strings to a form that is compatible with -// the specified code page. See UnicodeTranslator for more details. -// -// cpStr identifies a code page. A descriptor file in the font directory, set -// with the fontDirStr argument in the call to New(), should have this name -// plus the extension ".map". If cpStr is empty, it will be replaced with -// "cp1252", the gofpdf code page default. -// -// If an error occurs reading the descriptor, the returned function is valid -// but does not perform any rune translation. -// -// The CellFormat_codepage example demonstrates this method. -func (f *Fpdf) UnicodeTranslatorFromDescriptor(cpStr string) (rep func(string) string) { - if f.err == nil { - if len(cpStr) == 0 { - cpStr = "cp1252" - } - emb, err := embFS.Open("font_embed/" + cpStr + ".map") - if err == nil { - defer emb.Close() - rep, f.err = UnicodeTranslator(emb) - } else { - rep, f.err = UnicodeTranslatorFromFile(filepath.Join(f.fontpath, cpStr) + ".map") - } - } else { - rep = doNothing - } - return -} - -// Transform moves a point by given X, Y offset -func (p *PointType) Transform(x, y float64) PointType { - return PointType{p.X + x, p.Y + y} -} - -// Orientation returns the orientation of a given size: -// "P" for portrait, "L" for landscape -func (s *SizeType) Orientation() string { - if s == nil || s.Ht == s.Wd { - return "" - } - if s.Wd > s.Ht { - return "L" - } - return "P" -} - -// ScaleBy expands a size by a certain factor -func (s *SizeType) ScaleBy(factor float64) SizeType { - return SizeType{s.Wd * factor, s.Ht * factor} -} - -// ScaleToWidth adjusts the height of a size to match the given width -func (s *SizeType) ScaleToWidth(width float64) SizeType { - height := s.Ht * width / s.Wd - return SizeType{width, height} -} - -// ScaleToHeight adjusts the width of a size to match the given height -func (s *SizeType) ScaleToHeight(height float64) SizeType { - width := s.Wd * height / s.Ht - return SizeType{width, height} -} - -// The untypedKeyMap structure and its methods are copyrighted 2019 by Arteom Korotkiy (Gmail: arteomkorotkiy). -// Imitation of untyped Map Array -type untypedKeyMap struct { - keySet []interface{} - valueSet []int -} - -// Get position of key=>value in PHP Array -func (pa *untypedKeyMap) getIndex(key interface{}) int { - if key != nil { - for i, mKey := range pa.keySet { - if mKey == key { - return i - } - } - return -1 - } - return -1 -} - -// Put key=>value in PHP Array -func (pa *untypedKeyMap) put(key interface{}, value int) { - if key == nil { - var i int - for n := 0; ; n++ { - i = pa.getIndex(n) - if i < 0 { - key = n - break - } - } - pa.keySet = append(pa.keySet, key) - pa.valueSet = append(pa.valueSet, value) - } else { - i := pa.getIndex(key) - if i < 0 { - pa.keySet = append(pa.keySet, key) - pa.valueSet = append(pa.valueSet, value) - } else { - pa.valueSet[i] = value - } - } -} - -// Delete value in PHP Array -func (pa *untypedKeyMap) delete(key interface{}) { - if pa == nil || pa.keySet == nil || pa.valueSet == nil { - return - } - i := pa.getIndex(key) - if i >= 0 { - if i == 0 { - pa.keySet = pa.keySet[1:] - pa.valueSet = pa.valueSet[1:] - } else if i == len(pa.keySet)-1 { - pa.keySet = pa.keySet[:len(pa.keySet)-1] - pa.valueSet = pa.valueSet[:len(pa.valueSet)-1] - } else { - pa.keySet = append(pa.keySet[:i], pa.keySet[i+1:]...) - pa.valueSet = append(pa.valueSet[:i], pa.valueSet[i+1:]...) - } - } -} - -// Get value from PHP Array -func (pa *untypedKeyMap) get(key interface{}) int { - i := pa.getIndex(key) - if i >= 0 { - return pa.valueSet[i] - } - return 0 -} - -// Imitation of PHP function pop() -func (pa *untypedKeyMap) pop() { - pa.keySet = pa.keySet[:len(pa.keySet)-1] - pa.valueSet = pa.valueSet[:len(pa.valueSet)-1] -} - -// Imitation of PHP function array_merge() -func arrayMerge(arr1, arr2 *untypedKeyMap) *untypedKeyMap { - answer := untypedKeyMap{} - if arr1 == nil && arr2 == nil { - answer = untypedKeyMap{ - make([]interface{}, 0), - make([]int, 0), - } - } else if arr2 == nil { - answer.keySet = arr1.keySet[:] - answer.valueSet = arr1.valueSet[:] - } else if arr1 == nil { - answer.keySet = arr2.keySet[:] - answer.valueSet = arr2.valueSet[:] - } else { - answer.keySet = arr1.keySet[:] - answer.valueSet = arr1.valueSet[:] - for i := 0; i < len(arr2.keySet); i++ { - if arr2.keySet[i] == "interval" { - if arr1.getIndex("interval") < 0 { - answer.put("interval", arr2.valueSet[i]) - } - } else { - answer.put(nil, arr2.valueSet[i]) - } - } - } - return &answer -} - -func remove(arr []int, key int) []int { - n := 0 - for i, mKey := range arr { - if mKey == key { - n = i - } - } - if n == 0 { - return arr[1:] - } else if n == len(arr)-1 { - return arr[:len(arr)-1] - } - return append(arr[:n], arr[n+1:]...) -} - -func isChinese(rune2 rune) bool { - // chinese unicode: 4e00-9fa5 - if rune2 >= rune(0x4e00) && rune2 <= rune(0x9fa5) { - return true - } - return false -} - -// Condition font family string to PDF name compliance. See section 5.3 (Names) -// in https://resources.infosecinstitute.com/pdf-file-format-basic-structure/ -func fontFamilyEscape(familyStr string) (escStr string) { - escStr = strings.Replace(familyStr, " ", "#20", -1) - // Additional replacements can take place here - return -} diff --git a/vendor/github.com/go-pdf/fpdf/wbuf.go b/vendor/github.com/go-pdf/fpdf/wbuf.go deleted file mode 100644 index a3df0bd..0000000 --- a/vendor/github.com/go-pdf/fpdf/wbuf.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright ©2021 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package fpdf - -type wbuffer struct { - p []byte - c int -} - -func (w *wbuffer) u8(v uint8) { - w.p[w.c] = v - w.c++ -} - -func (w *wbuffer) bytes() []byte { return w.p } diff --git a/vendor/github.com/go-pdf/fpdf/xcompr.go b/vendor/github.com/go-pdf/fpdf/xcompr.go deleted file mode 100644 index 399c8ba..0000000 --- a/vendor/github.com/go-pdf/fpdf/xcompr.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright ©2021 The go-pdf Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package fpdf - -import ( - "bytes" - "compress/zlib" - "fmt" - "sync" -) - -var xmem = xmempool{ - Pool: sync.Pool{ - New: func() interface{} { - var m membuffer - return &m - }, - }, -} - -type xmempool struct{ sync.Pool } - -func (pool *xmempool) compress(data []byte) *membuffer { - mem := pool.Get().(*membuffer) - buf := &mem.buf - buf.Grow(len(data)) - - zw, err := zlib.NewWriterLevel(buf, zlib.BestSpeed) - if err != nil { - panic(fmt.Errorf("could not create zlib writer: %w", err)) - } - _, err = zw.Write(data) - if err != nil { - panic(fmt.Errorf("could not zlib-compress slice: %w", err)) - } - - err = zw.Close() - if err != nil { - panic(fmt.Errorf("could not close zlib writer: %w", err)) - } - return mem -} - -func (pool *xmempool) uncompress(data []byte) (*membuffer, error) { - zr, err := zlib.NewReader(bytes.NewReader(data)) - if err != nil { - return nil, err - } - - mem := pool.Get().(*membuffer) - mem.buf.Reset() - - _, err = mem.buf.ReadFrom(zr) - if err != nil { - mem.release() - return nil, err - } - - return mem, nil -} - -type membuffer struct { - buf bytes.Buffer -} - -func (mem *membuffer) bytes() []byte { return mem.buf.Bytes() } -func (mem *membuffer) release() { - mem.buf.Reset() - xmem.Put(mem) -} - -func (mem *membuffer) copy() []byte { - src := mem.bytes() - dst := make([]byte, len(src)) - copy(dst, src) - return dst -} diff --git a/vendor/github.com/golang/freetype/AUTHORS b/vendor/github.com/golang/freetype/AUTHORS deleted file mode 100644 index 5773ac7..0000000 --- a/vendor/github.com/golang/freetype/AUTHORS +++ /dev/null @@ -1,20 +0,0 @@ -# This is the official list of Freetype-Go authors for copyright purposes. -# This file is distinct from the CONTRIBUTORS files. -# See the latter for an explanation. -# -# Freetype-Go is derived from Freetype, which is written in C. The latter -# is copyright 1996-2010 David Turner, Robert Wilhelm, and Werner Lemberg. - -# Names should be added to this file as -# Name or Organization -# The email address is not required for organizations. - -# Please keep the list sorted. - -Google Inc. -Jeff R. Allen -Maksim Kochkin -Michael Fogleman -Rémy Oudompheng -Roger Peppe -Steven Edwards diff --git a/vendor/github.com/golang/freetype/CONTRIBUTORS b/vendor/github.com/golang/freetype/CONTRIBUTORS deleted file mode 100644 index 7a1b0a2..0000000 --- a/vendor/github.com/golang/freetype/CONTRIBUTORS +++ /dev/null @@ -1,38 +0,0 @@ -# This is the official list of people who can contribute -# (and typically have contributed) code to the Freetype-Go repository. -# The AUTHORS file lists the copyright holders; this file -# lists people. For example, Google employees are listed here -# but not in AUTHORS, because Google holds the copyright. -# -# The submission process automatically checks to make sure -# that people submitting code are listed in this file (by email address). -# -# Names should be added to this file only after verifying that -# the individual or the individual's organization has agreed to -# the appropriate Contributor License Agreement, found here: -# -# http://code.google.com/legal/individual-cla-v1.0.html -# http://code.google.com/legal/corporate-cla-v1.0.html -# -# The agreement for individuals can be filled out on the web. -# -# When adding J Random Contributor's name to this file, -# either J's name or J's organization's name should be -# added to the AUTHORS file, depending on whether the -# individual or corporate CLA was used. - -# Names should be added to this file like so: -# Name - -# Please keep the list sorted. - -Andrew Gerrand -Jeff R. Allen -Maksim Kochkin -Michael Fogleman -Nigel Tao -Rémy Oudompheng -Rob Pike -Roger Peppe -Russ Cox -Steven Edwards diff --git a/vendor/github.com/golang/freetype/LICENSE b/vendor/github.com/golang/freetype/LICENSE deleted file mode 100644 index e854ba5..0000000 --- a/vendor/github.com/golang/freetype/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Use of the Freetype-Go software is subject to your choice of exactly one of -the following two licenses: - * The FreeType License, which is similar to the original BSD license with - an advertising clause, or - * The GNU General Public License (GPL), version 2 or later. - -The text of these licenses are available in the licenses/ftl.txt and the -licenses/gpl.txt files respectively. They are also available at -http://freetype.sourceforge.net/license.html - -The Luxi fonts in the testdata directory are licensed separately. See the -testdata/COPYING file for details. diff --git a/vendor/github.com/golang/freetype/raster/geom.go b/vendor/github.com/golang/freetype/raster/geom.go deleted file mode 100644 index f3696ea..0000000 --- a/vendor/github.com/golang/freetype/raster/geom.go +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright 2010 The Freetype-Go Authors. All rights reserved. -// Use of this source code is governed by your choice of either the -// FreeType License or the GNU General Public License version 2 (or -// any later version), both of which can be found in the LICENSE file. - -package raster - -import ( - "fmt" - "math" - - "golang.org/x/image/math/fixed" -) - -// maxAbs returns the maximum of abs(a) and abs(b). -func maxAbs(a, b fixed.Int26_6) fixed.Int26_6 { - if a < 0 { - a = -a - } - if b < 0 { - b = -b - } - if a < b { - return b - } - return a -} - -// pNeg returns the vector -p, or equivalently p rotated by 180 degrees. -func pNeg(p fixed.Point26_6) fixed.Point26_6 { - return fixed.Point26_6{-p.X, -p.Y} -} - -// pDot returns the dot product p·q. -func pDot(p fixed.Point26_6, q fixed.Point26_6) fixed.Int52_12 { - px, py := int64(p.X), int64(p.Y) - qx, qy := int64(q.X), int64(q.Y) - return fixed.Int52_12(px*qx + py*qy) -} - -// pLen returns the length of the vector p. -func pLen(p fixed.Point26_6) fixed.Int26_6 { - // TODO(nigeltao): use fixed point math. - x := float64(p.X) - y := float64(p.Y) - return fixed.Int26_6(math.Sqrt(x*x + y*y)) -} - -// pNorm returns the vector p normalized to the given length, or zero if p is -// degenerate. -func pNorm(p fixed.Point26_6, length fixed.Int26_6) fixed.Point26_6 { - d := pLen(p) - if d == 0 { - return fixed.Point26_6{} - } - s, t := int64(length), int64(d) - x := int64(p.X) * s / t - y := int64(p.Y) * s / t - return fixed.Point26_6{fixed.Int26_6(x), fixed.Int26_6(y)} -} - -// pRot45CW returns the vector p rotated clockwise by 45 degrees. -// -// Note that the Y-axis grows downwards, so {1, 0}.Rot45CW is {1/√2, 1/√2}. -func pRot45CW(p fixed.Point26_6) fixed.Point26_6 { - // 181/256 is approximately 1/√2, or sin(π/4). - px, py := int64(p.X), int64(p.Y) - qx := (+px - py) * 181 / 256 - qy := (+px + py) * 181 / 256 - return fixed.Point26_6{fixed.Int26_6(qx), fixed.Int26_6(qy)} -} - -// pRot90CW returns the vector p rotated clockwise by 90 degrees. -// -// Note that the Y-axis grows downwards, so {1, 0}.Rot90CW is {0, 1}. -func pRot90CW(p fixed.Point26_6) fixed.Point26_6 { - return fixed.Point26_6{-p.Y, p.X} -} - -// pRot135CW returns the vector p rotated clockwise by 135 degrees. -// -// Note that the Y-axis grows downwards, so {1, 0}.Rot135CW is {-1/√2, 1/√2}. -func pRot135CW(p fixed.Point26_6) fixed.Point26_6 { - // 181/256 is approximately 1/√2, or sin(π/4). - px, py := int64(p.X), int64(p.Y) - qx := (-px - py) * 181 / 256 - qy := (+px - py) * 181 / 256 - return fixed.Point26_6{fixed.Int26_6(qx), fixed.Int26_6(qy)} -} - -// pRot45CCW returns the vector p rotated counter-clockwise by 45 degrees. -// -// Note that the Y-axis grows downwards, so {1, 0}.Rot45CCW is {1/√2, -1/√2}. -func pRot45CCW(p fixed.Point26_6) fixed.Point26_6 { - // 181/256 is approximately 1/√2, or sin(π/4). - px, py := int64(p.X), int64(p.Y) - qx := (+px + py) * 181 / 256 - qy := (-px + py) * 181 / 256 - return fixed.Point26_6{fixed.Int26_6(qx), fixed.Int26_6(qy)} -} - -// pRot90CCW returns the vector p rotated counter-clockwise by 90 degrees. -// -// Note that the Y-axis grows downwards, so {1, 0}.Rot90CCW is {0, -1}. -func pRot90CCW(p fixed.Point26_6) fixed.Point26_6 { - return fixed.Point26_6{p.Y, -p.X} -} - -// pRot135CCW returns the vector p rotated counter-clockwise by 135 degrees. -// -// Note that the Y-axis grows downwards, so {1, 0}.Rot135CCW is {-1/√2, -1/√2}. -func pRot135CCW(p fixed.Point26_6) fixed.Point26_6 { - // 181/256 is approximately 1/√2, or sin(π/4). - px, py := int64(p.X), int64(p.Y) - qx := (-px + py) * 181 / 256 - qy := (-px - py) * 181 / 256 - return fixed.Point26_6{fixed.Int26_6(qx), fixed.Int26_6(qy)} -} - -// An Adder accumulates points on a curve. -type Adder interface { - // Start starts a new curve at the given point. - Start(a fixed.Point26_6) - // Add1 adds a linear segment to the current curve. - Add1(b fixed.Point26_6) - // Add2 adds a quadratic segment to the current curve. - Add2(b, c fixed.Point26_6) - // Add3 adds a cubic segment to the current curve. - Add3(b, c, d fixed.Point26_6) -} - -// A Path is a sequence of curves, and a curve is a start point followed by a -// sequence of linear, quadratic or cubic segments. -type Path []fixed.Int26_6 - -// String returns a human-readable representation of a Path. -func (p Path) String() string { - s := "" - for i := 0; i < len(p); { - if i != 0 { - s += " " - } - switch p[i] { - case 0: - s += "S0" + fmt.Sprint([]fixed.Int26_6(p[i+1:i+3])) - i += 4 - case 1: - s += "A1" + fmt.Sprint([]fixed.Int26_6(p[i+1:i+3])) - i += 4 - case 2: - s += "A2" + fmt.Sprint([]fixed.Int26_6(p[i+1:i+5])) - i += 6 - case 3: - s += "A3" + fmt.Sprint([]fixed.Int26_6(p[i+1:i+7])) - i += 8 - default: - panic("freetype/raster: bad path") - } - } - return s -} - -// Clear cancels any previous calls to p.Start or p.AddXxx. -func (p *Path) Clear() { - *p = (*p)[:0] -} - -// Start starts a new curve at the given point. -func (p *Path) Start(a fixed.Point26_6) { - *p = append(*p, 0, a.X, a.Y, 0) -} - -// Add1 adds a linear segment to the current curve. -func (p *Path) Add1(b fixed.Point26_6) { - *p = append(*p, 1, b.X, b.Y, 1) -} - -// Add2 adds a quadratic segment to the current curve. -func (p *Path) Add2(b, c fixed.Point26_6) { - *p = append(*p, 2, b.X, b.Y, c.X, c.Y, 2) -} - -// Add3 adds a cubic segment to the current curve. -func (p *Path) Add3(b, c, d fixed.Point26_6) { - *p = append(*p, 3, b.X, b.Y, c.X, c.Y, d.X, d.Y, 3) -} - -// AddPath adds the Path q to p. -func (p *Path) AddPath(q Path) { - *p = append(*p, q...) -} - -// AddStroke adds a stroked Path. -func (p *Path) AddStroke(q Path, width fixed.Int26_6, cr Capper, jr Joiner) { - Stroke(p, q, width, cr, jr) -} - -// firstPoint returns the first point in a non-empty Path. -func (p Path) firstPoint() fixed.Point26_6 { - return fixed.Point26_6{p[1], p[2]} -} - -// lastPoint returns the last point in a non-empty Path. -func (p Path) lastPoint() fixed.Point26_6 { - return fixed.Point26_6{p[len(p)-3], p[len(p)-2]} -} - -// addPathReversed adds q reversed to p. -// For example, if q consists of a linear segment from A to B followed by a -// quadratic segment from B to C to D, then the values of q looks like: -// index: 01234567890123 -// value: 0AA01BB12CCDD2 -// So, when adding q backwards to p, we want to Add2(C, B) followed by Add1(A). -func addPathReversed(p Adder, q Path) { - if len(q) == 0 { - return - } - i := len(q) - 1 - for { - switch q[i] { - case 0: - return - case 1: - i -= 4 - p.Add1( - fixed.Point26_6{q[i-2], q[i-1]}, - ) - case 2: - i -= 6 - p.Add2( - fixed.Point26_6{q[i+2], q[i+3]}, - fixed.Point26_6{q[i-2], q[i-1]}, - ) - case 3: - i -= 8 - p.Add3( - fixed.Point26_6{q[i+4], q[i+5]}, - fixed.Point26_6{q[i+2], q[i+3]}, - fixed.Point26_6{q[i-2], q[i-1]}, - ) - default: - panic("freetype/raster: bad path") - } - } -} diff --git a/vendor/github.com/golang/freetype/raster/paint.go b/vendor/github.com/golang/freetype/raster/paint.go deleted file mode 100644 index 652256c..0000000 --- a/vendor/github.com/golang/freetype/raster/paint.go +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright 2010 The Freetype-Go Authors. All rights reserved. -// Use of this source code is governed by your choice of either the -// FreeType License or the GNU General Public License version 2 (or -// any later version), both of which can be found in the LICENSE file. - -package raster - -import ( - "image" - "image/color" - "image/draw" - "math" -) - -// A Span is a horizontal segment of pixels with constant alpha. X0 is an -// inclusive bound and X1 is exclusive, the same as for slices. A fully opaque -// Span has Alpha == 0xffff. -type Span struct { - Y, X0, X1 int - Alpha uint32 -} - -// A Painter knows how to paint a batch of Spans. Rasterization may involve -// Painting multiple batches, and done will be true for the final batch. The -// Spans' Y values are monotonically increasing during a rasterization. Paint -// may use all of ss as scratch space during the call. -type Painter interface { - Paint(ss []Span, done bool) -} - -// The PainterFunc type adapts an ordinary function to the Painter interface. -type PainterFunc func(ss []Span, done bool) - -// Paint just delegates the call to f. -func (f PainterFunc) Paint(ss []Span, done bool) { f(ss, done) } - -// An AlphaOverPainter is a Painter that paints Spans onto a *image.Alpha using -// the Over Porter-Duff composition operator. -type AlphaOverPainter struct { - Image *image.Alpha -} - -// Paint satisfies the Painter interface. -func (r AlphaOverPainter) Paint(ss []Span, done bool) { - b := r.Image.Bounds() - for _, s := range ss { - if s.Y < b.Min.Y { - continue - } - if s.Y >= b.Max.Y { - return - } - if s.X0 < b.Min.X { - s.X0 = b.Min.X - } - if s.X1 > b.Max.X { - s.X1 = b.Max.X - } - if s.X0 >= s.X1 { - continue - } - base := (s.Y-r.Image.Rect.Min.Y)*r.Image.Stride - r.Image.Rect.Min.X - p := r.Image.Pix[base+s.X0 : base+s.X1] - a := int(s.Alpha >> 8) - for i, c := range p { - v := int(c) - p[i] = uint8((v*255 + (255-v)*a) / 255) - } - } -} - -// NewAlphaOverPainter creates a new AlphaOverPainter for the given image. -func NewAlphaOverPainter(m *image.Alpha) AlphaOverPainter { - return AlphaOverPainter{m} -} - -// An AlphaSrcPainter is a Painter that paints Spans onto a *image.Alpha using -// the Src Porter-Duff composition operator. -type AlphaSrcPainter struct { - Image *image.Alpha -} - -// Paint satisfies the Painter interface. -func (r AlphaSrcPainter) Paint(ss []Span, done bool) { - b := r.Image.Bounds() - for _, s := range ss { - if s.Y < b.Min.Y { - continue - } - if s.Y >= b.Max.Y { - return - } - if s.X0 < b.Min.X { - s.X0 = b.Min.X - } - if s.X1 > b.Max.X { - s.X1 = b.Max.X - } - if s.X0 >= s.X1 { - continue - } - base := (s.Y-r.Image.Rect.Min.Y)*r.Image.Stride - r.Image.Rect.Min.X - p := r.Image.Pix[base+s.X0 : base+s.X1] - color := uint8(s.Alpha >> 8) - for i := range p { - p[i] = color - } - } -} - -// NewAlphaSrcPainter creates a new AlphaSrcPainter for the given image. -func NewAlphaSrcPainter(m *image.Alpha) AlphaSrcPainter { - return AlphaSrcPainter{m} -} - -// An RGBAPainter is a Painter that paints Spans onto a *image.RGBA. -type RGBAPainter struct { - // Image is the image to compose onto. - Image *image.RGBA - // Op is the Porter-Duff composition operator. - Op draw.Op - // cr, cg, cb and ca are the 16-bit color to paint the spans. - cr, cg, cb, ca uint32 -} - -// Paint satisfies the Painter interface. -func (r *RGBAPainter) Paint(ss []Span, done bool) { - b := r.Image.Bounds() - for _, s := range ss { - if s.Y < b.Min.Y { - continue - } - if s.Y >= b.Max.Y { - return - } - if s.X0 < b.Min.X { - s.X0 = b.Min.X - } - if s.X1 > b.Max.X { - s.X1 = b.Max.X - } - if s.X0 >= s.X1 { - continue - } - // This code mimics drawGlyphOver in $GOROOT/src/image/draw/draw.go. - ma := s.Alpha - const m = 1<<16 - 1 - i0 := (s.Y-r.Image.Rect.Min.Y)*r.Image.Stride + (s.X0-r.Image.Rect.Min.X)*4 - i1 := i0 + (s.X1-s.X0)*4 - if r.Op == draw.Over { - for i := i0; i < i1; i += 4 { - dr := uint32(r.Image.Pix[i+0]) - dg := uint32(r.Image.Pix[i+1]) - db := uint32(r.Image.Pix[i+2]) - da := uint32(r.Image.Pix[i+3]) - a := (m - (r.ca * ma / m)) * 0x101 - r.Image.Pix[i+0] = uint8((dr*a + r.cr*ma) / m >> 8) - r.Image.Pix[i+1] = uint8((dg*a + r.cg*ma) / m >> 8) - r.Image.Pix[i+2] = uint8((db*a + r.cb*ma) / m >> 8) - r.Image.Pix[i+3] = uint8((da*a + r.ca*ma) / m >> 8) - } - } else { - for i := i0; i < i1; i += 4 { - r.Image.Pix[i+0] = uint8(r.cr * ma / m >> 8) - r.Image.Pix[i+1] = uint8(r.cg * ma / m >> 8) - r.Image.Pix[i+2] = uint8(r.cb * ma / m >> 8) - r.Image.Pix[i+3] = uint8(r.ca * ma / m >> 8) - } - } - } -} - -// SetColor sets the color to paint the spans. -func (r *RGBAPainter) SetColor(c color.Color) { - r.cr, r.cg, r.cb, r.ca = c.RGBA() -} - -// NewRGBAPainter creates a new RGBAPainter for the given image. -func NewRGBAPainter(m *image.RGBA) *RGBAPainter { - return &RGBAPainter{Image: m} -} - -// A MonochromePainter wraps another Painter, quantizing each Span's alpha to -// be either fully opaque or fully transparent. -type MonochromePainter struct { - Painter Painter - y, x0, x1 int -} - -// Paint delegates to the wrapped Painter after quantizing each Span's alpha -// value and merging adjacent fully opaque Spans. -func (m *MonochromePainter) Paint(ss []Span, done bool) { - // We compact the ss slice, discarding any Spans whose alpha quantizes to zero. - j := 0 - for _, s := range ss { - if s.Alpha >= 0x8000 { - if m.y == s.Y && m.x1 == s.X0 { - m.x1 = s.X1 - } else { - ss[j] = Span{m.y, m.x0, m.x1, 1<<16 - 1} - j++ - m.y, m.x0, m.x1 = s.Y, s.X0, s.X1 - } - } - } - if done { - // Flush the accumulated Span. - finalSpan := Span{m.y, m.x0, m.x1, 1<<16 - 1} - if j < len(ss) { - ss[j] = finalSpan - j++ - m.Painter.Paint(ss[:j], true) - } else if j == len(ss) { - m.Painter.Paint(ss, false) - if cap(ss) > 0 { - ss = ss[:1] - } else { - ss = make([]Span, 1) - } - ss[0] = finalSpan - m.Painter.Paint(ss, true) - } else { - panic("unreachable") - } - // Reset the accumulator, so that this Painter can be re-used. - m.y, m.x0, m.x1 = 0, 0, 0 - } else { - m.Painter.Paint(ss[:j], false) - } -} - -// NewMonochromePainter creates a new MonochromePainter that wraps the given -// Painter. -func NewMonochromePainter(p Painter) *MonochromePainter { - return &MonochromePainter{Painter: p} -} - -// A GammaCorrectionPainter wraps another Painter, performing gamma-correction -// on each Span's alpha value. -type GammaCorrectionPainter struct { - // Painter is the wrapped Painter. - Painter Painter - // a is the precomputed alpha values for linear interpolation, with fully - // opaque == 0xffff. - a [256]uint16 - // gammaIsOne is whether gamma correction is a no-op. - gammaIsOne bool -} - -// Paint delegates to the wrapped Painter after performing gamma-correction on -// each Span. -func (g *GammaCorrectionPainter) Paint(ss []Span, done bool) { - if !g.gammaIsOne { - const n = 0x101 - for i, s := range ss { - if s.Alpha == 0 || s.Alpha == 0xffff { - continue - } - p, q := s.Alpha/n, s.Alpha%n - // The resultant alpha is a linear interpolation of g.a[p] and g.a[p+1]. - a := uint32(g.a[p])*(n-q) + uint32(g.a[p+1])*q - ss[i].Alpha = (a + n/2) / n - } - } - g.Painter.Paint(ss, done) -} - -// SetGamma sets the gamma value. -func (g *GammaCorrectionPainter) SetGamma(gamma float64) { - g.gammaIsOne = gamma == 1 - if g.gammaIsOne { - return - } - for i := 0; i < 256; i++ { - a := float64(i) / 0xff - a = math.Pow(a, gamma) - g.a[i] = uint16(0xffff * a) - } -} - -// NewGammaCorrectionPainter creates a new GammaCorrectionPainter that wraps -// the given Painter. -func NewGammaCorrectionPainter(p Painter, gamma float64) *GammaCorrectionPainter { - g := &GammaCorrectionPainter{Painter: p} - g.SetGamma(gamma) - return g -} diff --git a/vendor/github.com/golang/freetype/raster/raster.go b/vendor/github.com/golang/freetype/raster/raster.go deleted file mode 100644 index 7e6cd4e..0000000 --- a/vendor/github.com/golang/freetype/raster/raster.go +++ /dev/null @@ -1,601 +0,0 @@ -// Copyright 2010 The Freetype-Go Authors. All rights reserved. -// Use of this source code is governed by your choice of either the -// FreeType License or the GNU General Public License version 2 (or -// any later version), both of which can be found in the LICENSE file. - -// Package raster provides an anti-aliasing 2-D rasterizer. -// -// It is part of the larger Freetype suite of font-related packages, but the -// raster package is not specific to font rasterization, and can be used -// standalone without any other Freetype package. -// -// Rasterization is done by the same area/coverage accumulation algorithm as -// the Freetype "smooth" module, and the Anti-Grain Geometry library. A -// description of the area/coverage algorithm is at -// http://projects.tuxee.net/cl-vectors/section-the-cl-aa-algorithm -package raster // import "github.com/golang/freetype/raster" - -import ( - "strconv" - - "golang.org/x/image/math/fixed" -) - -// A cell is part of a linked list (for a given yi co-ordinate) of accumulated -// area/coverage for the pixel at (xi, yi). -type cell struct { - xi int - area, cover int - next int -} - -type Rasterizer struct { - // If false, the default behavior is to use the even-odd winding fill - // rule during Rasterize. - UseNonZeroWinding bool - // An offset (in pixels) to the painted spans. - Dx, Dy int - - // The width of the Rasterizer. The height is implicit in len(cellIndex). - width int - // splitScaleN is the scaling factor used to determine how many times - // to decompose a quadratic or cubic segment into a linear approximation. - splitScale2, splitScale3 int - - // The current pen position. - a fixed.Point26_6 - // The current cell and its area/coverage being accumulated. - xi, yi int - area, cover int - - // Saved cells. - cell []cell - // Linked list of cells, one per row. - cellIndex []int - // Buffers. - cellBuf [256]cell - cellIndexBuf [64]int - spanBuf [64]Span -} - -// findCell returns the index in r.cell for the cell corresponding to -// (r.xi, r.yi). The cell is created if necessary. -func (r *Rasterizer) findCell() int { - if r.yi < 0 || r.yi >= len(r.cellIndex) { - return -1 - } - xi := r.xi - if xi < 0 { - xi = -1 - } else if xi > r.width { - xi = r.width - } - i, prev := r.cellIndex[r.yi], -1 - for i != -1 && r.cell[i].xi <= xi { - if r.cell[i].xi == xi { - return i - } - i, prev = r.cell[i].next, i - } - c := len(r.cell) - if c == cap(r.cell) { - buf := make([]cell, c, 4*c) - copy(buf, r.cell) - r.cell = buf[0 : c+1] - } else { - r.cell = r.cell[0 : c+1] - } - r.cell[c] = cell{xi, 0, 0, i} - if prev == -1 { - r.cellIndex[r.yi] = c - } else { - r.cell[prev].next = c - } - return c -} - -// saveCell saves any accumulated r.area/r.cover for (r.xi, r.yi). -func (r *Rasterizer) saveCell() { - if r.area != 0 || r.cover != 0 { - i := r.findCell() - if i != -1 { - r.cell[i].area += r.area - r.cell[i].cover += r.cover - } - r.area = 0 - r.cover = 0 - } -} - -// setCell sets the (xi, yi) cell that r is accumulating area/coverage for. -func (r *Rasterizer) setCell(xi, yi int) { - if r.xi != xi || r.yi != yi { - r.saveCell() - r.xi, r.yi = xi, yi - } -} - -// scan accumulates area/coverage for the yi'th scanline, going from -// x0 to x1 in the horizontal direction (in 26.6 fixed point co-ordinates) -// and from y0f to y1f fractional vertical units within that scanline. -func (r *Rasterizer) scan(yi int, x0, y0f, x1, y1f fixed.Int26_6) { - // Break the 26.6 fixed point X co-ordinates into integral and fractional parts. - x0i := int(x0) / 64 - x0f := x0 - fixed.Int26_6(64*x0i) - x1i := int(x1) / 64 - x1f := x1 - fixed.Int26_6(64*x1i) - - // A perfectly horizontal scan. - if y0f == y1f { - r.setCell(x1i, yi) - return - } - dx, dy := x1-x0, y1f-y0f - // A single cell scan. - if x0i == x1i { - r.area += int((x0f + x1f) * dy) - r.cover += int(dy) - return - } - // There are at least two cells. Apart from the first and last cells, - // all intermediate cells go through the full width of the cell, - // or 64 units in 26.6 fixed point format. - var ( - p, q, edge0, edge1 fixed.Int26_6 - xiDelta int - ) - if dx > 0 { - p, q = (64-x0f)*dy, dx - edge0, edge1, xiDelta = 0, 64, 1 - } else { - p, q = x0f*dy, -dx - edge0, edge1, xiDelta = 64, 0, -1 - } - yDelta, yRem := p/q, p%q - if yRem < 0 { - yDelta -= 1 - yRem += q - } - // Do the first cell. - xi, y := x0i, y0f - r.area += int((x0f + edge1) * yDelta) - r.cover += int(yDelta) - xi, y = xi+xiDelta, y+yDelta - r.setCell(xi, yi) - if xi != x1i { - // Do all the intermediate cells. - p = 64 * (y1f - y + yDelta) - fullDelta, fullRem := p/q, p%q - if fullRem < 0 { - fullDelta -= 1 - fullRem += q - } - yRem -= q - for xi != x1i { - yDelta = fullDelta - yRem += fullRem - if yRem >= 0 { - yDelta += 1 - yRem -= q - } - r.area += int(64 * yDelta) - r.cover += int(yDelta) - xi, y = xi+xiDelta, y+yDelta - r.setCell(xi, yi) - } - } - // Do the last cell. - yDelta = y1f - y - r.area += int((edge0 + x1f) * yDelta) - r.cover += int(yDelta) -} - -// Start starts a new curve at the given point. -func (r *Rasterizer) Start(a fixed.Point26_6) { - r.setCell(int(a.X/64), int(a.Y/64)) - r.a = a -} - -// Add1 adds a linear segment to the current curve. -func (r *Rasterizer) Add1(b fixed.Point26_6) { - x0, y0 := r.a.X, r.a.Y - x1, y1 := b.X, b.Y - dx, dy := x1-x0, y1-y0 - // Break the 26.6 fixed point Y co-ordinates into integral and fractional - // parts. - y0i := int(y0) / 64 - y0f := y0 - fixed.Int26_6(64*y0i) - y1i := int(y1) / 64 - y1f := y1 - fixed.Int26_6(64*y1i) - - if y0i == y1i { - // There is only one scanline. - r.scan(y0i, x0, y0f, x1, y1f) - - } else if dx == 0 { - // This is a vertical line segment. We avoid calling r.scan and instead - // manipulate r.area and r.cover directly. - var ( - edge0, edge1 fixed.Int26_6 - yiDelta int - ) - if dy > 0 { - edge0, edge1, yiDelta = 0, 64, 1 - } else { - edge0, edge1, yiDelta = 64, 0, -1 - } - x0i, yi := int(x0)/64, y0i - x0fTimes2 := (int(x0) - (64 * x0i)) * 2 - // Do the first pixel. - dcover := int(edge1 - y0f) - darea := int(x0fTimes2 * dcover) - r.area += darea - r.cover += dcover - yi += yiDelta - r.setCell(x0i, yi) - // Do all the intermediate pixels. - dcover = int(edge1 - edge0) - darea = int(x0fTimes2 * dcover) - for yi != y1i { - r.area += darea - r.cover += dcover - yi += yiDelta - r.setCell(x0i, yi) - } - // Do the last pixel. - dcover = int(y1f - edge0) - darea = int(x0fTimes2 * dcover) - r.area += darea - r.cover += dcover - - } else { - // There are at least two scanlines. Apart from the first and last - // scanlines, all intermediate scanlines go through the full height of - // the row, or 64 units in 26.6 fixed point format. - var ( - p, q, edge0, edge1 fixed.Int26_6 - yiDelta int - ) - if dy > 0 { - p, q = (64-y0f)*dx, dy - edge0, edge1, yiDelta = 0, 64, 1 - } else { - p, q = y0f*dx, -dy - edge0, edge1, yiDelta = 64, 0, -1 - } - xDelta, xRem := p/q, p%q - if xRem < 0 { - xDelta -= 1 - xRem += q - } - // Do the first scanline. - x, yi := x0, y0i - r.scan(yi, x, y0f, x+xDelta, edge1) - x, yi = x+xDelta, yi+yiDelta - r.setCell(int(x)/64, yi) - if yi != y1i { - // Do all the intermediate scanlines. - p = 64 * dx - fullDelta, fullRem := p/q, p%q - if fullRem < 0 { - fullDelta -= 1 - fullRem += q - } - xRem -= q - for yi != y1i { - xDelta = fullDelta - xRem += fullRem - if xRem >= 0 { - xDelta += 1 - xRem -= q - } - r.scan(yi, x, edge0, x+xDelta, edge1) - x, yi = x+xDelta, yi+yiDelta - r.setCell(int(x)/64, yi) - } - } - // Do the last scanline. - r.scan(yi, x, edge0, x1, y1f) - } - // The next lineTo starts from b. - r.a = b -} - -// Add2 adds a quadratic segment to the current curve. -func (r *Rasterizer) Add2(b, c fixed.Point26_6) { - // Calculate nSplit (the number of recursive decompositions) based on how - // 'curvy' it is. Specifically, how much the middle point b deviates from - // (a+c)/2. - dev := maxAbs(r.a.X-2*b.X+c.X, r.a.Y-2*b.Y+c.Y) / fixed.Int26_6(r.splitScale2) - nsplit := 0 - for dev > 0 { - dev /= 4 - nsplit++ - } - // dev is 32-bit, and nsplit++ every time we shift off 2 bits, so maxNsplit - // is 16. - const maxNsplit = 16 - if nsplit > maxNsplit { - panic("freetype/raster: Add2 nsplit too large: " + strconv.Itoa(nsplit)) - } - // Recursively decompose the curve nSplit levels deep. - var ( - pStack [2*maxNsplit + 3]fixed.Point26_6 - sStack [maxNsplit + 1]int - i int - ) - sStack[0] = nsplit - pStack[0] = c - pStack[1] = b - pStack[2] = r.a - for i >= 0 { - s := sStack[i] - p := pStack[2*i:] - if s > 0 { - // Split the quadratic curve p[:3] into an equivalent set of two - // shorter curves: p[:3] and p[2:5]. The new p[4] is the old p[2], - // and p[0] is unchanged. - mx := p[1].X - p[4].X = p[2].X - p[3].X = (p[4].X + mx) / 2 - p[1].X = (p[0].X + mx) / 2 - p[2].X = (p[1].X + p[3].X) / 2 - my := p[1].Y - p[4].Y = p[2].Y - p[3].Y = (p[4].Y + my) / 2 - p[1].Y = (p[0].Y + my) / 2 - p[2].Y = (p[1].Y + p[3].Y) / 2 - // The two shorter curves have one less split to do. - sStack[i] = s - 1 - sStack[i+1] = s - 1 - i++ - } else { - // Replace the level-0 quadratic with a two-linear-piece - // approximation. - midx := (p[0].X + 2*p[1].X + p[2].X) / 4 - midy := (p[0].Y + 2*p[1].Y + p[2].Y) / 4 - r.Add1(fixed.Point26_6{midx, midy}) - r.Add1(p[0]) - i-- - } - } -} - -// Add3 adds a cubic segment to the current curve. -func (r *Rasterizer) Add3(b, c, d fixed.Point26_6) { - // Calculate nSplit (the number of recursive decompositions) based on how - // 'curvy' it is. - dev2 := maxAbs(r.a.X-3*(b.X+c.X)+d.X, r.a.Y-3*(b.Y+c.Y)+d.Y) / fixed.Int26_6(r.splitScale2) - dev3 := maxAbs(r.a.X-2*b.X+d.X, r.a.Y-2*b.Y+d.Y) / fixed.Int26_6(r.splitScale3) - nsplit := 0 - for dev2 > 0 || dev3 > 0 { - dev2 /= 8 - dev3 /= 4 - nsplit++ - } - // devN is 32-bit, and nsplit++ every time we shift off 2 bits, so - // maxNsplit is 16. - const maxNsplit = 16 - if nsplit > maxNsplit { - panic("freetype/raster: Add3 nsplit too large: " + strconv.Itoa(nsplit)) - } - // Recursively decompose the curve nSplit levels deep. - var ( - pStack [3*maxNsplit + 4]fixed.Point26_6 - sStack [maxNsplit + 1]int - i int - ) - sStack[0] = nsplit - pStack[0] = d - pStack[1] = c - pStack[2] = b - pStack[3] = r.a - for i >= 0 { - s := sStack[i] - p := pStack[3*i:] - if s > 0 { - // Split the cubic curve p[:4] into an equivalent set of two - // shorter curves: p[:4] and p[3:7]. The new p[6] is the old p[3], - // and p[0] is unchanged. - m01x := (p[0].X + p[1].X) / 2 - m12x := (p[1].X + p[2].X) / 2 - m23x := (p[2].X + p[3].X) / 2 - p[6].X = p[3].X - p[5].X = m23x - p[1].X = m01x - p[2].X = (m01x + m12x) / 2 - p[4].X = (m12x + m23x) / 2 - p[3].X = (p[2].X + p[4].X) / 2 - m01y := (p[0].Y + p[1].Y) / 2 - m12y := (p[1].Y + p[2].Y) / 2 - m23y := (p[2].Y + p[3].Y) / 2 - p[6].Y = p[3].Y - p[5].Y = m23y - p[1].Y = m01y - p[2].Y = (m01y + m12y) / 2 - p[4].Y = (m12y + m23y) / 2 - p[3].Y = (p[2].Y + p[4].Y) / 2 - // The two shorter curves have one less split to do. - sStack[i] = s - 1 - sStack[i+1] = s - 1 - i++ - } else { - // Replace the level-0 cubic with a two-linear-piece approximation. - midx := (p[0].X + 3*(p[1].X+p[2].X) + p[3].X) / 8 - midy := (p[0].Y + 3*(p[1].Y+p[2].Y) + p[3].Y) / 8 - r.Add1(fixed.Point26_6{midx, midy}) - r.Add1(p[0]) - i-- - } - } -} - -// AddPath adds the given Path. -func (r *Rasterizer) AddPath(p Path) { - for i := 0; i < len(p); { - switch p[i] { - case 0: - r.Start( - fixed.Point26_6{p[i+1], p[i+2]}, - ) - i += 4 - case 1: - r.Add1( - fixed.Point26_6{p[i+1], p[i+2]}, - ) - i += 4 - case 2: - r.Add2( - fixed.Point26_6{p[i+1], p[i+2]}, - fixed.Point26_6{p[i+3], p[i+4]}, - ) - i += 6 - case 3: - r.Add3( - fixed.Point26_6{p[i+1], p[i+2]}, - fixed.Point26_6{p[i+3], p[i+4]}, - fixed.Point26_6{p[i+5], p[i+6]}, - ) - i += 8 - default: - panic("freetype/raster: bad path") - } - } -} - -// AddStroke adds a stroked Path. -func (r *Rasterizer) AddStroke(q Path, width fixed.Int26_6, cr Capper, jr Joiner) { - Stroke(r, q, width, cr, jr) -} - -// areaToAlpha converts an area value to a uint32 alpha value. A completely -// filled pixel corresponds to an area of 64*64*2, and an alpha of 0xffff. The -// conversion of area values greater than this depends on the winding rule: -// even-odd or non-zero. -func (r *Rasterizer) areaToAlpha(area int) uint32 { - // The C Freetype implementation (version 2.3.12) does "alpha := area>>1" - // without the +1. Round-to-nearest gives a more symmetric result than - // round-down. The C implementation also returns 8-bit alpha, not 16-bit - // alpha. - a := (area + 1) >> 1 - if a < 0 { - a = -a - } - alpha := uint32(a) - if r.UseNonZeroWinding { - if alpha > 0x0fff { - alpha = 0x0fff - } - } else { - alpha &= 0x1fff - if alpha > 0x1000 { - alpha = 0x2000 - alpha - } else if alpha == 0x1000 { - alpha = 0x0fff - } - } - // alpha is now in the range [0x0000, 0x0fff]. Convert that 12-bit alpha to - // 16-bit alpha. - return alpha<<4 | alpha>>8 -} - -// Rasterize converts r's accumulated curves into Spans for p. The Spans passed -// to p are non-overlapping, and sorted by Y and then X. They all have non-zero -// width (and 0 <= X0 < X1 <= r.width) and non-zero A, except for the final -// Span, which has Y, X0, X1 and A all equal to zero. -func (r *Rasterizer) Rasterize(p Painter) { - r.saveCell() - s := 0 - for yi := 0; yi < len(r.cellIndex); yi++ { - xi, cover := 0, 0 - for c := r.cellIndex[yi]; c != -1; c = r.cell[c].next { - if cover != 0 && r.cell[c].xi > xi { - alpha := r.areaToAlpha(cover * 64 * 2) - if alpha != 0 { - xi0, xi1 := xi, r.cell[c].xi - if xi0 < 0 { - xi0 = 0 - } - if xi1 >= r.width { - xi1 = r.width - } - if xi0 < xi1 { - r.spanBuf[s] = Span{yi + r.Dy, xi0 + r.Dx, xi1 + r.Dx, alpha} - s++ - } - } - } - cover += r.cell[c].cover - alpha := r.areaToAlpha(cover*64*2 - r.cell[c].area) - xi = r.cell[c].xi + 1 - if alpha != 0 { - xi0, xi1 := r.cell[c].xi, xi - if xi0 < 0 { - xi0 = 0 - } - if xi1 >= r.width { - xi1 = r.width - } - if xi0 < xi1 { - r.spanBuf[s] = Span{yi + r.Dy, xi0 + r.Dx, xi1 + r.Dx, alpha} - s++ - } - } - if s > len(r.spanBuf)-2 { - p.Paint(r.spanBuf[:s], false) - s = 0 - } - } - } - p.Paint(r.spanBuf[:s], true) -} - -// Clear cancels any previous calls to r.Start or r.AddXxx. -func (r *Rasterizer) Clear() { - r.a = fixed.Point26_6{} - r.xi = 0 - r.yi = 0 - r.area = 0 - r.cover = 0 - r.cell = r.cell[:0] - for i := 0; i < len(r.cellIndex); i++ { - r.cellIndex[i] = -1 - } -} - -// SetBounds sets the maximum width and height of the rasterized image and -// calls Clear. The width and height are in pixels, not fixed.Int26_6 units. -func (r *Rasterizer) SetBounds(width, height int) { - if width < 0 { - width = 0 - } - if height < 0 { - height = 0 - } - // Use the same ssN heuristic as the C Freetype (version 2.4.0) - // implementation. - ss2, ss3 := 32, 16 - if width > 24 || height > 24 { - ss2, ss3 = 2*ss2, 2*ss3 - if width > 120 || height > 120 { - ss2, ss3 = 2*ss2, 2*ss3 - } - } - r.width = width - r.splitScale2 = ss2 - r.splitScale3 = ss3 - r.cell = r.cellBuf[:0] - if height > len(r.cellIndexBuf) { - r.cellIndex = make([]int, height) - } else { - r.cellIndex = r.cellIndexBuf[:height] - } - r.Clear() -} - -// NewRasterizer creates a new Rasterizer with the given bounds. -func NewRasterizer(width, height int) *Rasterizer { - r := new(Rasterizer) - r.SetBounds(width, height) - return r -} diff --git a/vendor/github.com/golang/freetype/raster/stroke.go b/vendor/github.com/golang/freetype/raster/stroke.go deleted file mode 100644 index bcc66b2..0000000 --- a/vendor/github.com/golang/freetype/raster/stroke.go +++ /dev/null @@ -1,483 +0,0 @@ -// Copyright 2010 The Freetype-Go Authors. All rights reserved. -// Use of this source code is governed by your choice of either the -// FreeType License or the GNU General Public License version 2 (or -// any later version), both of which can be found in the LICENSE file. - -package raster - -import ( - "golang.org/x/image/math/fixed" -) - -// Two points are considered practically equal if the square of the distance -// between them is less than one quarter (i.e. 1024 / 4096). -const epsilon = fixed.Int52_12(1024) - -// A Capper signifies how to begin or end a stroked path. -type Capper interface { - // Cap adds a cap to p given a pivot point and the normal vector of a - // terminal segment. The normal's length is half of the stroke width. - Cap(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) -} - -// The CapperFunc type adapts an ordinary function to be a Capper. -type CapperFunc func(Adder, fixed.Int26_6, fixed.Point26_6, fixed.Point26_6) - -func (f CapperFunc) Cap(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) { - f(p, halfWidth, pivot, n1) -} - -// A Joiner signifies how to join interior nodes of a stroked path. -type Joiner interface { - // Join adds a join to the two sides of a stroked path given a pivot - // point and the normal vectors of the trailing and leading segments. - // Both normals have length equal to half of the stroke width. - Join(lhs, rhs Adder, halfWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) -} - -// The JoinerFunc type adapts an ordinary function to be a Joiner. -type JoinerFunc func(lhs, rhs Adder, halfWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) - -func (f JoinerFunc) Join(lhs, rhs Adder, halfWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) { - f(lhs, rhs, halfWidth, pivot, n0, n1) -} - -// RoundCapper adds round caps to a stroked path. -var RoundCapper Capper = CapperFunc(roundCapper) - -func roundCapper(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) { - // The cubic Bézier approximation to a circle involves the magic number - // (√2 - 1) * 4/3, which is approximately 35/64. - const k = 35 - e := pRot90CCW(n1) - side := pivot.Add(e) - start, end := pivot.Sub(n1), pivot.Add(n1) - d, e := n1.Mul(k), e.Mul(k) - p.Add3(start.Add(e), side.Sub(d), side) - p.Add3(side.Add(d), end.Add(e), end) -} - -// ButtCapper adds butt caps to a stroked path. -var ButtCapper Capper = CapperFunc(buttCapper) - -func buttCapper(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) { - p.Add1(pivot.Add(n1)) -} - -// SquareCapper adds square caps to a stroked path. -var SquareCapper Capper = CapperFunc(squareCapper) - -func squareCapper(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) { - e := pRot90CCW(n1) - side := pivot.Add(e) - p.Add1(side.Sub(n1)) - p.Add1(side.Add(n1)) - p.Add1(pivot.Add(n1)) -} - -// RoundJoiner adds round joins to a stroked path. -var RoundJoiner Joiner = JoinerFunc(roundJoiner) - -func roundJoiner(lhs, rhs Adder, haflWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) { - dot := pDot(pRot90CW(n0), n1) - if dot >= 0 { - addArc(lhs, pivot, n0, n1) - rhs.Add1(pivot.Sub(n1)) - } else { - lhs.Add1(pivot.Add(n1)) - addArc(rhs, pivot, pNeg(n0), pNeg(n1)) - } -} - -// BevelJoiner adds bevel joins to a stroked path. -var BevelJoiner Joiner = JoinerFunc(bevelJoiner) - -func bevelJoiner(lhs, rhs Adder, haflWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) { - lhs.Add1(pivot.Add(n1)) - rhs.Add1(pivot.Sub(n1)) -} - -// addArc adds a circular arc from pivot+n0 to pivot+n1 to p. The shorter of -// the two possible arcs is taken, i.e. the one spanning <= 180 degrees. The -// two vectors n0 and n1 must be of equal length. -func addArc(p Adder, pivot, n0, n1 fixed.Point26_6) { - // r2 is the square of the length of n0. - r2 := pDot(n0, n0) - if r2 < epsilon { - // The arc radius is so small that we collapse to a straight line. - p.Add1(pivot.Add(n1)) - return - } - // We approximate the arc by 0, 1, 2 or 3 45-degree quadratic segments plus - // a final quadratic segment from s to n1. Each 45-degree segment has - // control points {1, 0}, {1, tan(π/8)} and {1/√2, 1/√2} suitably scaled, - // rotated and translated. tan(π/8) is approximately 27/64. - const tpo8 = 27 - var s fixed.Point26_6 - // We determine which octant the angle between n0 and n1 is in via three - // dot products. m0, m1 and m2 are n0 rotated clockwise by 45, 90 and 135 - // degrees. - m0 := pRot45CW(n0) - m1 := pRot90CW(n0) - m2 := pRot90CW(m0) - if pDot(m1, n1) >= 0 { - if pDot(n0, n1) >= 0 { - if pDot(m2, n1) <= 0 { - // n1 is between 0 and 45 degrees clockwise of n0. - s = n0 - } else { - // n1 is between 45 and 90 degrees clockwise of n0. - p.Add2(pivot.Add(n0).Add(m1.Mul(tpo8)), pivot.Add(m0)) - s = m0 - } - } else { - pm1, n0t := pivot.Add(m1), n0.Mul(tpo8) - p.Add2(pivot.Add(n0).Add(m1.Mul(tpo8)), pivot.Add(m0)) - p.Add2(pm1.Add(n0t), pm1) - if pDot(m0, n1) >= 0 { - // n1 is between 90 and 135 degrees clockwise of n0. - s = m1 - } else { - // n1 is between 135 and 180 degrees clockwise of n0. - p.Add2(pm1.Sub(n0t), pivot.Add(m2)) - s = m2 - } - } - } else { - if pDot(n0, n1) >= 0 { - if pDot(m0, n1) >= 0 { - // n1 is between 0 and 45 degrees counter-clockwise of n0. - s = n0 - } else { - // n1 is between 45 and 90 degrees counter-clockwise of n0. - p.Add2(pivot.Add(n0).Sub(m1.Mul(tpo8)), pivot.Sub(m2)) - s = pNeg(m2) - } - } else { - pm1, n0t := pivot.Sub(m1), n0.Mul(tpo8) - p.Add2(pivot.Add(n0).Sub(m1.Mul(tpo8)), pivot.Sub(m2)) - p.Add2(pm1.Add(n0t), pm1) - if pDot(m2, n1) <= 0 { - // n1 is between 90 and 135 degrees counter-clockwise of n0. - s = pNeg(m1) - } else { - // n1 is between 135 and 180 degrees counter-clockwise of n0. - p.Add2(pm1.Sub(n0t), pivot.Sub(m0)) - s = pNeg(m0) - } - } - } - // The final quadratic segment has two endpoints s and n1 and the middle - // control point is a multiple of s.Add(n1), i.e. it is on the angle - // bisector of those two points. The multiple ranges between 128/256 and - // 150/256 as the angle between s and n1 ranges between 0 and 45 degrees. - // - // When the angle is 0 degrees (i.e. s and n1 are coincident) then - // s.Add(n1) is twice s and so the middle control point of the degenerate - // quadratic segment should be half s.Add(n1), and half = 128/256. - // - // When the angle is 45 degrees then 150/256 is the ratio of the lengths of - // the two vectors {1, tan(π/8)} and {1 + 1/√2, 1/√2}. - // - // d is the normalized dot product between s and n1. Since the angle ranges - // between 0 and 45 degrees then d ranges between 256/256 and 181/256. - d := 256 * pDot(s, n1) / r2 - multiple := fixed.Int26_6(150-(150-128)*(d-181)/(256-181)) >> 2 - p.Add2(pivot.Add(s.Add(n1).Mul(multiple)), pivot.Add(n1)) -} - -// midpoint returns the midpoint of two Points. -func midpoint(a, b fixed.Point26_6) fixed.Point26_6 { - return fixed.Point26_6{(a.X + b.X) / 2, (a.Y + b.Y) / 2} -} - -// angleGreaterThan45 returns whether the angle between two vectors is more -// than 45 degrees. -func angleGreaterThan45(v0, v1 fixed.Point26_6) bool { - v := pRot45CCW(v0) - return pDot(v, v1) < 0 || pDot(pRot90CW(v), v1) < 0 -} - -// interpolate returns the point (1-t)*a + t*b. -func interpolate(a, b fixed.Point26_6, t fixed.Int52_12) fixed.Point26_6 { - s := 1<<12 - t - x := s*fixed.Int52_12(a.X) + t*fixed.Int52_12(b.X) - y := s*fixed.Int52_12(a.Y) + t*fixed.Int52_12(b.Y) - return fixed.Point26_6{fixed.Int26_6(x >> 12), fixed.Int26_6(y >> 12)} -} - -// curviest2 returns the value of t for which the quadratic parametric curve -// (1-t)²*a + 2*t*(1-t).b + t²*c has maximum curvature. -// -// The curvature of the parametric curve f(t) = (x(t), y(t)) is -// |x′y″-y′x″| / (x′²+y′²)^(3/2). -// -// Let d = b-a and e = c-2*b+a, so that f′(t) = 2*d+2*e*t and f″(t) = 2*e. -// The curvature's numerator is (2*dx+2*ex*t)*(2*ey)-(2*dy+2*ey*t)*(2*ex), -// which simplifies to 4*dx*ey-4*dy*ex, which is constant with respect to t. -// -// Thus, curvature is extreme where the denominator is extreme, i.e. where -// (x′²+y′²) is extreme. The first order condition is that -// 2*x′*x″+2*y′*y″ = 0, or (dx+ex*t)*ex + (dy+ey*t)*ey = 0. -// Solving for t gives t = -(dx*ex+dy*ey) / (ex*ex+ey*ey). -func curviest2(a, b, c fixed.Point26_6) fixed.Int52_12 { - dx := int64(b.X - a.X) - dy := int64(b.Y - a.Y) - ex := int64(c.X - 2*b.X + a.X) - ey := int64(c.Y - 2*b.Y + a.Y) - if ex == 0 && ey == 0 { - return 2048 - } - return fixed.Int52_12(-4096 * (dx*ex + dy*ey) / (ex*ex + ey*ey)) -} - -// A stroker holds state for stroking a path. -type stroker struct { - // p is the destination that records the stroked path. - p Adder - // u is the half-width of the stroke. - u fixed.Int26_6 - // cr and jr specify how to end and connect path segments. - cr Capper - jr Joiner - // r is the reverse path. Stroking a path involves constructing two - // parallel paths 2*u apart. The first path is added immediately to p, - // the second path is accumulated in r and eventually added in reverse. - r Path - // a is the most recent segment point. anorm is the segment normal of - // length u at that point. - a, anorm fixed.Point26_6 -} - -// addNonCurvy2 adds a quadratic segment to the stroker, where the segment -// defined by (k.a, b, c) achieves maximum curvature at either k.a or c. -func (k *stroker) addNonCurvy2(b, c fixed.Point26_6) { - // We repeatedly divide the segment at its middle until it is straight - // enough to approximate the stroke by just translating the control points. - // ds and ps are stacks of depths and points. t is the top of the stack. - const maxDepth = 5 - var ( - ds [maxDepth + 1]int - ps [2*maxDepth + 3]fixed.Point26_6 - t int - ) - // Initially the ps stack has one quadratic segment of depth zero. - ds[0] = 0 - ps[2] = k.a - ps[1] = b - ps[0] = c - anorm := k.anorm - var cnorm fixed.Point26_6 - - for { - depth := ds[t] - a := ps[2*t+2] - b := ps[2*t+1] - c := ps[2*t+0] - ab := b.Sub(a) - bc := c.Sub(b) - abIsSmall := pDot(ab, ab) < fixed.Int52_12(1<<12) - bcIsSmall := pDot(bc, bc) < fixed.Int52_12(1<<12) - if abIsSmall && bcIsSmall { - // Approximate the segment by a circular arc. - cnorm = pRot90CCW(pNorm(bc, k.u)) - mac := midpoint(a, c) - addArc(k.p, mac, anorm, cnorm) - addArc(&k.r, mac, pNeg(anorm), pNeg(cnorm)) - } else if depth < maxDepth && angleGreaterThan45(ab, bc) { - // Divide the segment in two and push both halves on the stack. - mab := midpoint(a, b) - mbc := midpoint(b, c) - t++ - ds[t+0] = depth + 1 - ds[t-1] = depth + 1 - ps[2*t+2] = a - ps[2*t+1] = mab - ps[2*t+0] = midpoint(mab, mbc) - ps[2*t-1] = mbc - continue - } else { - // Translate the control points. - bnorm := pRot90CCW(pNorm(c.Sub(a), k.u)) - cnorm = pRot90CCW(pNorm(bc, k.u)) - k.p.Add2(b.Add(bnorm), c.Add(cnorm)) - k.r.Add2(b.Sub(bnorm), c.Sub(cnorm)) - } - if t == 0 { - k.a, k.anorm = c, cnorm - return - } - t-- - anorm = cnorm - } - panic("unreachable") -} - -// Add1 adds a linear segment to the stroker. -func (k *stroker) Add1(b fixed.Point26_6) { - bnorm := pRot90CCW(pNorm(b.Sub(k.a), k.u)) - if len(k.r) == 0 { - k.p.Start(k.a.Add(bnorm)) - k.r.Start(k.a.Sub(bnorm)) - } else { - k.jr.Join(k.p, &k.r, k.u, k.a, k.anorm, bnorm) - } - k.p.Add1(b.Add(bnorm)) - k.r.Add1(b.Sub(bnorm)) - k.a, k.anorm = b, bnorm -} - -// Add2 adds a quadratic segment to the stroker. -func (k *stroker) Add2(b, c fixed.Point26_6) { - ab := b.Sub(k.a) - bc := c.Sub(b) - abnorm := pRot90CCW(pNorm(ab, k.u)) - if len(k.r) == 0 { - k.p.Start(k.a.Add(abnorm)) - k.r.Start(k.a.Sub(abnorm)) - } else { - k.jr.Join(k.p, &k.r, k.u, k.a, k.anorm, abnorm) - } - - // Approximate nearly-degenerate quadratics by linear segments. - abIsSmall := pDot(ab, ab) < epsilon - bcIsSmall := pDot(bc, bc) < epsilon - if abIsSmall || bcIsSmall { - acnorm := pRot90CCW(pNorm(c.Sub(k.a), k.u)) - k.p.Add1(c.Add(acnorm)) - k.r.Add1(c.Sub(acnorm)) - k.a, k.anorm = c, acnorm - return - } - - // The quadratic segment (k.a, b, c) has a point of maximum curvature. - // If this occurs at an end point, we process the segment as a whole. - t := curviest2(k.a, b, c) - if t <= 0 || 4096 <= t { - k.addNonCurvy2(b, c) - return - } - - // Otherwise, we perform a de Casteljau decomposition at the point of - // maximum curvature and process the two straighter parts. - mab := interpolate(k.a, b, t) - mbc := interpolate(b, c, t) - mabc := interpolate(mab, mbc, t) - - // If the vectors ab and bc are close to being in opposite directions, - // then the decomposition can become unstable, so we approximate the - // quadratic segment by two linear segments joined by an arc. - bcnorm := pRot90CCW(pNorm(bc, k.u)) - if pDot(abnorm, bcnorm) < -fixed.Int52_12(k.u)*fixed.Int52_12(k.u)*2047/2048 { - pArc := pDot(abnorm, bc) < 0 - - k.p.Add1(mabc.Add(abnorm)) - if pArc { - z := pRot90CW(abnorm) - addArc(k.p, mabc, abnorm, z) - addArc(k.p, mabc, z, bcnorm) - } - k.p.Add1(mabc.Add(bcnorm)) - k.p.Add1(c.Add(bcnorm)) - - k.r.Add1(mabc.Sub(abnorm)) - if !pArc { - z := pRot90CW(abnorm) - addArc(&k.r, mabc, pNeg(abnorm), z) - addArc(&k.r, mabc, z, pNeg(bcnorm)) - } - k.r.Add1(mabc.Sub(bcnorm)) - k.r.Add1(c.Sub(bcnorm)) - - k.a, k.anorm = c, bcnorm - return - } - - // Process the decomposed parts. - k.addNonCurvy2(mab, mabc) - k.addNonCurvy2(mbc, c) -} - -// Add3 adds a cubic segment to the stroker. -func (k *stroker) Add3(b, c, d fixed.Point26_6) { - panic("freetype/raster: stroke unimplemented for cubic segments") -} - -// stroke adds the stroked Path q to p, where q consists of exactly one curve. -func (k *stroker) stroke(q Path) { - // Stroking is implemented by deriving two paths each k.u apart from q. - // The left-hand-side path is added immediately to k.p; the right-hand-side - // path is accumulated in k.r. Once we've finished adding the LHS to k.p, - // we add the RHS in reverse order. - k.r = make(Path, 0, len(q)) - k.a = fixed.Point26_6{q[1], q[2]} - for i := 4; i < len(q); { - switch q[i] { - case 1: - k.Add1( - fixed.Point26_6{q[i+1], q[i+2]}, - ) - i += 4 - case 2: - k.Add2( - fixed.Point26_6{q[i+1], q[i+2]}, - fixed.Point26_6{q[i+3], q[i+4]}, - ) - i += 6 - case 3: - k.Add3( - fixed.Point26_6{q[i+1], q[i+2]}, - fixed.Point26_6{q[i+3], q[i+4]}, - fixed.Point26_6{q[i+5], q[i+6]}, - ) - i += 8 - default: - panic("freetype/raster: bad path") - } - } - if len(k.r) == 0 { - return - } - // TODO(nigeltao): if q is a closed curve then we should join the first and - // last segments instead of capping them. - k.cr.Cap(k.p, k.u, q.lastPoint(), pNeg(k.anorm)) - addPathReversed(k.p, k.r) - pivot := q.firstPoint() - k.cr.Cap(k.p, k.u, pivot, pivot.Sub(fixed.Point26_6{k.r[1], k.r[2]})) -} - -// Stroke adds q stroked with the given width to p. The result is typically -// self-intersecting and should be rasterized with UseNonZeroWinding. -// cr and jr may be nil, which defaults to a RoundCapper or RoundJoiner. -func Stroke(p Adder, q Path, width fixed.Int26_6, cr Capper, jr Joiner) { - if len(q) == 0 { - return - } - if cr == nil { - cr = RoundCapper - } - if jr == nil { - jr = RoundJoiner - } - if q[0] != 0 { - panic("freetype/raster: bad path") - } - s := stroker{p: p, u: width / 2, cr: cr, jr: jr} - i := 0 - for j := 4; j < len(q); { - switch q[j] { - case 0: - s.stroke(q[i:j]) - i, j = j, j+4 - case 1: - j += 4 - case 2: - j += 6 - case 3: - j += 8 - default: - panic("freetype/raster: bad path") - } - } - s.stroke(q[i:]) -} diff --git a/vendor/github.com/hashicorp/hcl/.gitignore b/vendor/github.com/hashicorp/hcl/.gitignore deleted file mode 100644 index 15586a2..0000000 --- a/vendor/github.com/hashicorp/hcl/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -y.output - -# ignore intellij files -.idea -*.iml -*.ipr -*.iws - -*.test diff --git a/vendor/github.com/hashicorp/hcl/.travis.yml b/vendor/github.com/hashicorp/hcl/.travis.yml deleted file mode 100644 index cb63a32..0000000 --- a/vendor/github.com/hashicorp/hcl/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -sudo: false - -language: go - -go: - - 1.x - - tip - -branches: - only: - - master - -script: make test diff --git a/vendor/github.com/hashicorp/hcl/LICENSE b/vendor/github.com/hashicorp/hcl/LICENSE deleted file mode 100644 index c33dcc7..0000000 --- a/vendor/github.com/hashicorp/hcl/LICENSE +++ /dev/null @@ -1,354 +0,0 @@ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. “Contributor” - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. “Contributor Version” - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor’s Contribution. - -1.3. “Contribution” - - means Covered Software of a particular Contributor. - -1.4. “Covered Software” - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. “Incompatible With Secondary Licenses” - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of version - 1.1 or earlier of the License, but not also under the terms of a - Secondary License. - -1.6. “Executable Form” - - means any form of the work other than Source Code Form. - -1.7. “Larger Work” - - means a work that combines Covered Software with other material, in a separate - file or files, that is not Covered Software. - -1.8. “License” - - means this document. - -1.9. “Licensable” - - means having the right to grant, to the maximum extent possible, whether at the - time of the initial grant or subsequently, any and all of the rights conveyed by - this License. - -1.10. “Modifications” - - means any of the following: - - a. any file in Source Code Form that results from an addition to, deletion - from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. “Patent Claims” of a Contributor - - means any patent claim(s), including without limitation, method, process, - and apparatus claims, in any patent Licensable by such Contributor that - would be infringed, but for the grant of the License, by the making, - using, selling, offering for sale, having made, import, or transfer of - either its Contributions or its Contributor Version. - -1.12. “Secondary License” - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. “Source Code Form” - - means the form of the work preferred for making modifications. - -1.14. “You” (or “Your”) - - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, “control” means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or as - part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its Contributions - or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution become - effective for each Contribution on the date the Contributor first distributes - such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under this - License. No additional rights or licenses will be implied from the distribution - or licensing of Covered Software under this License. Notwithstanding Section - 2.1(b) above, no patent license is granted by a Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party’s - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of its - Contributions. - - This License does not grant any rights in the trademarks, service marks, or - logos of any Contributor (except as may be necessary to comply with the - notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this License - (see Section 10.2) or under the terms of a Secondary License (if permitted - under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its Contributions - are its original creation(s) or it has sufficient rights to grant the - rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under applicable - copyright doctrines of fair use, fair dealing, or other equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under the - terms of this License. You must inform recipients that the Source Code Form - of the Covered Software is governed by the terms of this License, and how - they can obtain a copy of this License. You may not attempt to alter or - restrict the recipients’ rights in the Source Code Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this License, - or sublicense it under different terms, provided that the license for - the Executable Form does not attempt to limit or alter the recipients’ - rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for the - Covered Software. If the Larger Work is a combination of Covered Software - with a work governed by one or more Secondary Licenses, and the Covered - Software is not Incompatible With Secondary Licenses, this License permits - You to additionally distribute such Covered Software under the terms of - such Secondary License(s), so that the recipient of the Larger Work may, at - their option, further distribute the Covered Software under the terms of - either this License or such Secondary License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices (including - copyright notices, patent notices, disclaimers of warranty, or limitations - of liability) contained within the Source Code Form of the Covered - Software, except that You may alter any license notices to the extent - required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on behalf - of any Contributor. You must make it absolutely clear that any such - warranty, support, indemnity, or liability obligation is offered by You - alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, judicial - order, or regulation then You must: (a) comply with the terms of this License - to the maximum extent possible; and (b) describe the limitations and the code - they affect. Such description must be placed in a text file included with all - distributions of the Covered Software under this License. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing basis, - if such Contributor fails to notify You of the non-compliance by some - reasonable means prior to 60 days after You have come back into compliance. - Moreover, Your grants from a particular Contributor are reinstated on an - ongoing basis if such Contributor notifies You of the non-compliance by - some reasonable means, this is the first time You have received notice of - non-compliance with this License from such Contributor, and You become - compliant prior to 30 days after Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, counter-claims, - and cross-claims) alleging that a Contributor Version directly or - indirectly infringes any patent, then the rights granted to You by any and - all Contributors for the Covered Software under Section 2.1 of this License - shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an “as is” basis, without - warranty of any kind, either expressed, implied, or statutory, including, - without limitation, warranties that the Covered Software is free of defects, - merchantable, fit for a particular purpose or non-infringing. The entire - risk as to the quality and performance of the Covered Software is with You. - Should any Covered Software prove defective in any respect, You (not any - Contributor) assume the cost of any necessary servicing, repair, or - correction. This disclaimer of warranty constitutes an essential part of this - License. No use of any Covered Software is authorized under this License - except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from such - party’s negligence to the extent applicable law prohibits such limitation. - Some jurisdictions do not allow the exclusion or limitation of incidental or - consequential damages, so this exclusion and limitation may not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts of - a jurisdiction where the defendant maintains its principal place of business - and such litigation shall be governed by laws of that jurisdiction, without - reference to its conflict-of-law provisions. Nothing in this Section shall - prevent a party’s ability to bring cross-claims or counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject matter - hereof. If any provision of this License is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. Any law or regulation which provides that the language of a - contract shall be construed against the drafter shall not be used to construe - this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version of - the License under which You originally received the Covered Software, or - under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a modified - version of this License if you rename the license and remove any - references to the name of the license steward (except to note that such - modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - If You choose to distribute Source Code Form that is Incompatible With - Secondary Licenses under the terms of this version of the License, the - notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, then -You may include the notice in a location (such as a LICENSE file in a relevant -directory) where a recipient would be likely to look for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is “Incompatible - With Secondary Licenses”, as defined by - the Mozilla Public License, v. 2.0. - diff --git a/vendor/github.com/hashicorp/hcl/Makefile b/vendor/github.com/hashicorp/hcl/Makefile deleted file mode 100644 index 84fd743..0000000 --- a/vendor/github.com/hashicorp/hcl/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -TEST?=./... - -default: test - -fmt: generate - go fmt ./... - -test: generate - go get -t ./... - go test $(TEST) $(TESTARGS) - -generate: - go generate ./... - -updatedeps: - go get -u golang.org/x/tools/cmd/stringer - -.PHONY: default generate test updatedeps diff --git a/vendor/github.com/hashicorp/hcl/README.md b/vendor/github.com/hashicorp/hcl/README.md deleted file mode 100644 index c822332..0000000 --- a/vendor/github.com/hashicorp/hcl/README.md +++ /dev/null @@ -1,125 +0,0 @@ -# HCL - -[![GoDoc](https://godoc.org/github.com/hashicorp/hcl?status.png)](https://godoc.org/github.com/hashicorp/hcl) [![Build Status](https://travis-ci.org/hashicorp/hcl.svg?branch=master)](https://travis-ci.org/hashicorp/hcl) - -HCL (HashiCorp Configuration Language) is a configuration language built -by HashiCorp. The goal of HCL is to build a structured configuration language -that is both human and machine friendly for use with command-line tools, but -specifically targeted towards DevOps tools, servers, etc. - -HCL is also fully JSON compatible. That is, JSON can be used as completely -valid input to a system expecting HCL. This helps makes systems -interoperable with other systems. - -HCL is heavily inspired by -[libucl](https://github.com/vstakhov/libucl), -nginx configuration, and others similar. - -## Why? - -A common question when viewing HCL is to ask the question: why not -JSON, YAML, etc.? - -Prior to HCL, the tools we built at [HashiCorp](http://www.hashicorp.com) -used a variety of configuration languages from full programming languages -such as Ruby to complete data structure languages such as JSON. What we -learned is that some people wanted human-friendly configuration languages -and some people wanted machine-friendly languages. - -JSON fits a nice balance in this, but is fairly verbose and most -importantly doesn't support comments. With YAML, we found that beginners -had a really hard time determining what the actual structure was, and -ended up guessing more often than not whether to use a hyphen, colon, etc. -in order to represent some configuration key. - -Full programming languages such as Ruby enable complex behavior -a configuration language shouldn't usually allow, and also forces -people to learn some set of Ruby. - -Because of this, we decided to create our own configuration language -that is JSON-compatible. Our configuration language (HCL) is designed -to be written and modified by humans. The API for HCL allows JSON -as an input so that it is also machine-friendly (machines can generate -JSON instead of trying to generate HCL). - -Our goal with HCL is not to alienate other configuration languages. -It is instead to provide HCL as a specialized language for our tools, -and JSON as the interoperability layer. - -## Syntax - -For a complete grammar, please see the parser itself. A high-level overview -of the syntax and grammar is listed here. - - * Single line comments start with `#` or `//` - - * Multi-line comments are wrapped in `/*` and `*/`. Nested block comments - are not allowed. A multi-line comment (also known as a block comment) - terminates at the first `*/` found. - - * Values are assigned with the syntax `key = value` (whitespace doesn't - matter). The value can be any primitive: a string, number, boolean, - object, or list. - - * Strings are double-quoted and can contain any UTF-8 characters. - Example: `"Hello, World"` - - * Multi-line strings start with `<- - echo %Path% - - go version - - go env - - go get -t ./... - -build_script: -- cmd: go test -v ./... diff --git a/vendor/github.com/hashicorp/hcl/decoder.go b/vendor/github.com/hashicorp/hcl/decoder.go deleted file mode 100644 index bed9ebb..0000000 --- a/vendor/github.com/hashicorp/hcl/decoder.go +++ /dev/null @@ -1,729 +0,0 @@ -package hcl - -import ( - "errors" - "fmt" - "reflect" - "sort" - "strconv" - "strings" - - "github.com/hashicorp/hcl/hcl/ast" - "github.com/hashicorp/hcl/hcl/parser" - "github.com/hashicorp/hcl/hcl/token" -) - -// This is the tag to use with structures to have settings for HCL -const tagName = "hcl" - -var ( - // nodeType holds a reference to the type of ast.Node - nodeType reflect.Type = findNodeType() -) - -// Unmarshal accepts a byte slice as input and writes the -// data to the value pointed to by v. -func Unmarshal(bs []byte, v interface{}) error { - root, err := parse(bs) - if err != nil { - return err - } - - return DecodeObject(v, root) -} - -// Decode reads the given input and decodes it into the structure -// given by `out`. -func Decode(out interface{}, in string) error { - obj, err := Parse(in) - if err != nil { - return err - } - - return DecodeObject(out, obj) -} - -// DecodeObject is a lower-level version of Decode. It decodes a -// raw Object into the given output. -func DecodeObject(out interface{}, n ast.Node) error { - val := reflect.ValueOf(out) - if val.Kind() != reflect.Ptr { - return errors.New("result must be a pointer") - } - - // If we have the file, we really decode the root node - if f, ok := n.(*ast.File); ok { - n = f.Node - } - - var d decoder - return d.decode("root", n, val.Elem()) -} - -type decoder struct { - stack []reflect.Kind -} - -func (d *decoder) decode(name string, node ast.Node, result reflect.Value) error { - k := result - - // If we have an interface with a valid value, we use that - // for the check. - if result.Kind() == reflect.Interface { - elem := result.Elem() - if elem.IsValid() { - k = elem - } - } - - // Push current onto stack unless it is an interface. - if k.Kind() != reflect.Interface { - d.stack = append(d.stack, k.Kind()) - - // Schedule a pop - defer func() { - d.stack = d.stack[:len(d.stack)-1] - }() - } - - switch k.Kind() { - case reflect.Bool: - return d.decodeBool(name, node, result) - case reflect.Float32, reflect.Float64: - return d.decodeFloat(name, node, result) - case reflect.Int, reflect.Int32, reflect.Int64: - return d.decodeInt(name, node, result) - case reflect.Interface: - // When we see an interface, we make our own thing - return d.decodeInterface(name, node, result) - case reflect.Map: - return d.decodeMap(name, node, result) - case reflect.Ptr: - return d.decodePtr(name, node, result) - case reflect.Slice: - return d.decodeSlice(name, node, result) - case reflect.String: - return d.decodeString(name, node, result) - case reflect.Struct: - return d.decodeStruct(name, node, result) - default: - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: unknown kind to decode into: %s", name, k.Kind()), - } - } -} - -func (d *decoder) decodeBool(name string, node ast.Node, result reflect.Value) error { - switch n := node.(type) { - case *ast.LiteralType: - if n.Token.Type == token.BOOL { - v, err := strconv.ParseBool(n.Token.Text) - if err != nil { - return err - } - - result.Set(reflect.ValueOf(v)) - return nil - } - } - - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: unknown type %T", name, node), - } -} - -func (d *decoder) decodeFloat(name string, node ast.Node, result reflect.Value) error { - switch n := node.(type) { - case *ast.LiteralType: - if n.Token.Type == token.FLOAT || n.Token.Type == token.NUMBER { - v, err := strconv.ParseFloat(n.Token.Text, 64) - if err != nil { - return err - } - - result.Set(reflect.ValueOf(v).Convert(result.Type())) - return nil - } - } - - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: unknown type %T", name, node), - } -} - -func (d *decoder) decodeInt(name string, node ast.Node, result reflect.Value) error { - switch n := node.(type) { - case *ast.LiteralType: - switch n.Token.Type { - case token.NUMBER: - v, err := strconv.ParseInt(n.Token.Text, 0, 0) - if err != nil { - return err - } - - if result.Kind() == reflect.Interface { - result.Set(reflect.ValueOf(int(v))) - } else { - result.SetInt(v) - } - return nil - case token.STRING: - v, err := strconv.ParseInt(n.Token.Value().(string), 0, 0) - if err != nil { - return err - } - - if result.Kind() == reflect.Interface { - result.Set(reflect.ValueOf(int(v))) - } else { - result.SetInt(v) - } - return nil - } - } - - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: unknown type %T", name, node), - } -} - -func (d *decoder) decodeInterface(name string, node ast.Node, result reflect.Value) error { - // When we see an ast.Node, we retain the value to enable deferred decoding. - // Very useful in situations where we want to preserve ast.Node information - // like Pos - if result.Type() == nodeType && result.CanSet() { - result.Set(reflect.ValueOf(node)) - return nil - } - - var set reflect.Value - redecode := true - - // For testing types, ObjectType should just be treated as a list. We - // set this to a temporary var because we want to pass in the real node. - testNode := node - if ot, ok := node.(*ast.ObjectType); ok { - testNode = ot.List - } - - switch n := testNode.(type) { - case *ast.ObjectList: - // If we're at the root or we're directly within a slice, then we - // decode objects into map[string]interface{}, otherwise we decode - // them into lists. - if len(d.stack) == 0 || d.stack[len(d.stack)-1] == reflect.Slice { - var temp map[string]interface{} - tempVal := reflect.ValueOf(temp) - result := reflect.MakeMap( - reflect.MapOf( - reflect.TypeOf(""), - tempVal.Type().Elem())) - - set = result - } else { - var temp []map[string]interface{} - tempVal := reflect.ValueOf(temp) - result := reflect.MakeSlice( - reflect.SliceOf(tempVal.Type().Elem()), 0, len(n.Items)) - set = result - } - case *ast.ObjectType: - // If we're at the root or we're directly within a slice, then we - // decode objects into map[string]interface{}, otherwise we decode - // them into lists. - if len(d.stack) == 0 || d.stack[len(d.stack)-1] == reflect.Slice { - var temp map[string]interface{} - tempVal := reflect.ValueOf(temp) - result := reflect.MakeMap( - reflect.MapOf( - reflect.TypeOf(""), - tempVal.Type().Elem())) - - set = result - } else { - var temp []map[string]interface{} - tempVal := reflect.ValueOf(temp) - result := reflect.MakeSlice( - reflect.SliceOf(tempVal.Type().Elem()), 0, 1) - set = result - } - case *ast.ListType: - var temp []interface{} - tempVal := reflect.ValueOf(temp) - result := reflect.MakeSlice( - reflect.SliceOf(tempVal.Type().Elem()), 0, 0) - set = result - case *ast.LiteralType: - switch n.Token.Type { - case token.BOOL: - var result bool - set = reflect.Indirect(reflect.New(reflect.TypeOf(result))) - case token.FLOAT: - var result float64 - set = reflect.Indirect(reflect.New(reflect.TypeOf(result))) - case token.NUMBER: - var result int - set = reflect.Indirect(reflect.New(reflect.TypeOf(result))) - case token.STRING, token.HEREDOC: - set = reflect.Indirect(reflect.New(reflect.TypeOf(""))) - default: - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: cannot decode into interface: %T", name, node), - } - } - default: - return fmt.Errorf( - "%s: cannot decode into interface: %T", - name, node) - } - - // Set the result to what its supposed to be, then reset - // result so we don't reflect into this method anymore. - result.Set(set) - - if redecode { - // Revisit the node so that we can use the newly instantiated - // thing and populate it. - if err := d.decode(name, node, result); err != nil { - return err - } - } - - return nil -} - -func (d *decoder) decodeMap(name string, node ast.Node, result reflect.Value) error { - if item, ok := node.(*ast.ObjectItem); ok { - node = &ast.ObjectList{Items: []*ast.ObjectItem{item}} - } - - if ot, ok := node.(*ast.ObjectType); ok { - node = ot.List - } - - n, ok := node.(*ast.ObjectList) - if !ok { - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: not an object type for map (%T)", name, node), - } - } - - // If we have an interface, then we can address the interface, - // but not the slice itself, so get the element but set the interface - set := result - if result.Kind() == reflect.Interface { - result = result.Elem() - } - - resultType := result.Type() - resultElemType := resultType.Elem() - resultKeyType := resultType.Key() - if resultKeyType.Kind() != reflect.String { - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: map must have string keys", name), - } - } - - // Make a map if it is nil - resultMap := result - if result.IsNil() { - resultMap = reflect.MakeMap( - reflect.MapOf(resultKeyType, resultElemType)) - } - - // Go through each element and decode it. - done := make(map[string]struct{}) - for _, item := range n.Items { - if item.Val == nil { - continue - } - - // github.com/hashicorp/terraform/issue/5740 - if len(item.Keys) == 0 { - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: map must have string keys", name), - } - } - - // Get the key we're dealing with, which is the first item - keyStr := item.Keys[0].Token.Value().(string) - - // If we've already processed this key, then ignore it - if _, ok := done[keyStr]; ok { - continue - } - - // Determine the value. If we have more than one key, then we - // get the objectlist of only these keys. - itemVal := item.Val - if len(item.Keys) > 1 { - itemVal = n.Filter(keyStr) - done[keyStr] = struct{}{} - } - - // Make the field name - fieldName := fmt.Sprintf("%s.%s", name, keyStr) - - // Get the key/value as reflection values - key := reflect.ValueOf(keyStr) - val := reflect.Indirect(reflect.New(resultElemType)) - - // If we have a pre-existing value in the map, use that - oldVal := resultMap.MapIndex(key) - if oldVal.IsValid() { - val.Set(oldVal) - } - - // Decode! - if err := d.decode(fieldName, itemVal, val); err != nil { - return err - } - - // Set the value on the map - resultMap.SetMapIndex(key, val) - } - - // Set the final map if we can - set.Set(resultMap) - return nil -} - -func (d *decoder) decodePtr(name string, node ast.Node, result reflect.Value) error { - // Create an element of the concrete (non pointer) type and decode - // into that. Then set the value of the pointer to this type. - resultType := result.Type() - resultElemType := resultType.Elem() - val := reflect.New(resultElemType) - if err := d.decode(name, node, reflect.Indirect(val)); err != nil { - return err - } - - result.Set(val) - return nil -} - -func (d *decoder) decodeSlice(name string, node ast.Node, result reflect.Value) error { - // If we have an interface, then we can address the interface, - // but not the slice itself, so get the element but set the interface - set := result - if result.Kind() == reflect.Interface { - result = result.Elem() - } - // Create the slice if it isn't nil - resultType := result.Type() - resultElemType := resultType.Elem() - if result.IsNil() { - resultSliceType := reflect.SliceOf(resultElemType) - result = reflect.MakeSlice( - resultSliceType, 0, 0) - } - - // Figure out the items we'll be copying into the slice - var items []ast.Node - switch n := node.(type) { - case *ast.ObjectList: - items = make([]ast.Node, len(n.Items)) - for i, item := range n.Items { - items[i] = item - } - case *ast.ObjectType: - items = []ast.Node{n} - case *ast.ListType: - items = n.List - default: - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("unknown slice type: %T", node), - } - } - - for i, item := range items { - fieldName := fmt.Sprintf("%s[%d]", name, i) - - // Decode - val := reflect.Indirect(reflect.New(resultElemType)) - - // if item is an object that was decoded from ambiguous JSON and - // flattened, make sure it's expanded if it needs to decode into a - // defined structure. - item := expandObject(item, val) - - if err := d.decode(fieldName, item, val); err != nil { - return err - } - - // Append it onto the slice - result = reflect.Append(result, val) - } - - set.Set(result) - return nil -} - -// expandObject detects if an ambiguous JSON object was flattened to a List which -// should be decoded into a struct, and expands the ast to properly deocode. -func expandObject(node ast.Node, result reflect.Value) ast.Node { - item, ok := node.(*ast.ObjectItem) - if !ok { - return node - } - - elemType := result.Type() - - // our target type must be a struct - switch elemType.Kind() { - case reflect.Ptr: - switch elemType.Elem().Kind() { - case reflect.Struct: - //OK - default: - return node - } - case reflect.Struct: - //OK - default: - return node - } - - // A list value will have a key and field name. If it had more fields, - // it wouldn't have been flattened. - if len(item.Keys) != 2 { - return node - } - - keyToken := item.Keys[0].Token - item.Keys = item.Keys[1:] - - // we need to un-flatten the ast enough to decode - newNode := &ast.ObjectItem{ - Keys: []*ast.ObjectKey{ - &ast.ObjectKey{ - Token: keyToken, - }, - }, - Val: &ast.ObjectType{ - List: &ast.ObjectList{ - Items: []*ast.ObjectItem{item}, - }, - }, - } - - return newNode -} - -func (d *decoder) decodeString(name string, node ast.Node, result reflect.Value) error { - switch n := node.(type) { - case *ast.LiteralType: - switch n.Token.Type { - case token.NUMBER: - result.Set(reflect.ValueOf(n.Token.Text).Convert(result.Type())) - return nil - case token.STRING, token.HEREDOC: - result.Set(reflect.ValueOf(n.Token.Value()).Convert(result.Type())) - return nil - } - } - - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: unknown type for string %T", name, node), - } -} - -func (d *decoder) decodeStruct(name string, node ast.Node, result reflect.Value) error { - var item *ast.ObjectItem - if it, ok := node.(*ast.ObjectItem); ok { - item = it - node = it.Val - } - - if ot, ok := node.(*ast.ObjectType); ok { - node = ot.List - } - - // Handle the special case where the object itself is a literal. Previously - // the yacc parser would always ensure top-level elements were arrays. The new - // parser does not make the same guarantees, thus we need to convert any - // top-level literal elements into a list. - if _, ok := node.(*ast.LiteralType); ok && item != nil { - node = &ast.ObjectList{Items: []*ast.ObjectItem{item}} - } - - list, ok := node.(*ast.ObjectList) - if !ok { - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: not an object type for struct (%T)", name, node), - } - } - - // This slice will keep track of all the structs we'll be decoding. - // There can be more than one struct if there are embedded structs - // that are squashed. - structs := make([]reflect.Value, 1, 5) - structs[0] = result - - // Compile the list of all the fields that we're going to be decoding - // from all the structs. - type field struct { - field reflect.StructField - val reflect.Value - } - fields := []field{} - for len(structs) > 0 { - structVal := structs[0] - structs = structs[1:] - - structType := structVal.Type() - for i := 0; i < structType.NumField(); i++ { - fieldType := structType.Field(i) - tagParts := strings.Split(fieldType.Tag.Get(tagName), ",") - - // Ignore fields with tag name "-" - if tagParts[0] == "-" { - continue - } - - if fieldType.Anonymous { - fieldKind := fieldType.Type.Kind() - if fieldKind != reflect.Struct { - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: unsupported type to struct: %s", - fieldType.Name, fieldKind), - } - } - - // We have an embedded field. We "squash" the fields down - // if specified in the tag. - squash := false - for _, tag := range tagParts[1:] { - if tag == "squash" { - squash = true - break - } - } - - if squash { - structs = append( - structs, result.FieldByName(fieldType.Name)) - continue - } - } - - // Normal struct field, store it away - fields = append(fields, field{fieldType, structVal.Field(i)}) - } - } - - usedKeys := make(map[string]struct{}) - decodedFields := make([]string, 0, len(fields)) - decodedFieldsVal := make([]reflect.Value, 0) - unusedKeysVal := make([]reflect.Value, 0) - for _, f := range fields { - field, fieldValue := f.field, f.val - if !fieldValue.IsValid() { - // This should never happen - panic("field is not valid") - } - - // If we can't set the field, then it is unexported or something, - // and we just continue onwards. - if !fieldValue.CanSet() { - continue - } - - fieldName := field.Name - - tagValue := field.Tag.Get(tagName) - tagParts := strings.SplitN(tagValue, ",", 2) - if len(tagParts) >= 2 { - switch tagParts[1] { - case "decodedFields": - decodedFieldsVal = append(decodedFieldsVal, fieldValue) - continue - case "key": - if item == nil { - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: %s asked for 'key', impossible", - name, fieldName), - } - } - - fieldValue.SetString(item.Keys[0].Token.Value().(string)) - continue - case "unusedKeys": - unusedKeysVal = append(unusedKeysVal, fieldValue) - continue - } - } - - if tagParts[0] != "" { - fieldName = tagParts[0] - } - - // Determine the element we'll use to decode. If it is a single - // match (only object with the field), then we decode it exactly. - // If it is a prefix match, then we decode the matches. - filter := list.Filter(fieldName) - - prefixMatches := filter.Children() - matches := filter.Elem() - if len(matches.Items) == 0 && len(prefixMatches.Items) == 0 { - continue - } - - // Track the used key - usedKeys[fieldName] = struct{}{} - - // Create the field name and decode. We range over the elements - // because we actually want the value. - fieldName = fmt.Sprintf("%s.%s", name, fieldName) - if len(prefixMatches.Items) > 0 { - if err := d.decode(fieldName, prefixMatches, fieldValue); err != nil { - return err - } - } - for _, match := range matches.Items { - var decodeNode ast.Node = match.Val - if ot, ok := decodeNode.(*ast.ObjectType); ok { - decodeNode = &ast.ObjectList{Items: ot.List.Items} - } - - if err := d.decode(fieldName, decodeNode, fieldValue); err != nil { - return err - } - } - - decodedFields = append(decodedFields, field.Name) - } - - if len(decodedFieldsVal) > 0 { - // Sort it so that it is deterministic - sort.Strings(decodedFields) - - for _, v := range decodedFieldsVal { - v.Set(reflect.ValueOf(decodedFields)) - } - } - - return nil -} - -// findNodeType returns the type of ast.Node -func findNodeType() reflect.Type { - var nodeContainer struct { - Node ast.Node - } - value := reflect.ValueOf(nodeContainer).FieldByName("Node") - return value.Type() -} diff --git a/vendor/github.com/hashicorp/hcl/hcl.go b/vendor/github.com/hashicorp/hcl/hcl.go deleted file mode 100644 index 575a20b..0000000 --- a/vendor/github.com/hashicorp/hcl/hcl.go +++ /dev/null @@ -1,11 +0,0 @@ -// Package hcl decodes HCL into usable Go structures. -// -// hcl input can come in either pure HCL format or JSON format. -// It can be parsed into an AST, and then decoded into a structure, -// or it can be decoded directly from a string into a structure. -// -// If you choose to parse HCL into a raw AST, the benefit is that you -// can write custom visitor implementations to implement custom -// semantic checks. By default, HCL does not perform any semantic -// checks. -package hcl diff --git a/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go b/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go deleted file mode 100644 index 6e5ef65..0000000 --- a/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go +++ /dev/null @@ -1,219 +0,0 @@ -// Package ast declares the types used to represent syntax trees for HCL -// (HashiCorp Configuration Language) -package ast - -import ( - "fmt" - "strings" - - "github.com/hashicorp/hcl/hcl/token" -) - -// Node is an element in the abstract syntax tree. -type Node interface { - node() - Pos() token.Pos -} - -func (File) node() {} -func (ObjectList) node() {} -func (ObjectKey) node() {} -func (ObjectItem) node() {} -func (Comment) node() {} -func (CommentGroup) node() {} -func (ObjectType) node() {} -func (LiteralType) node() {} -func (ListType) node() {} - -// File represents a single HCL file -type File struct { - Node Node // usually a *ObjectList - Comments []*CommentGroup // list of all comments in the source -} - -func (f *File) Pos() token.Pos { - return f.Node.Pos() -} - -// ObjectList represents a list of ObjectItems. An HCL file itself is an -// ObjectList. -type ObjectList struct { - Items []*ObjectItem -} - -func (o *ObjectList) Add(item *ObjectItem) { - o.Items = append(o.Items, item) -} - -// Filter filters out the objects with the given key list as a prefix. -// -// The returned list of objects contain ObjectItems where the keys have -// this prefix already stripped off. This might result in objects with -// zero-length key lists if they have no children. -// -// If no matches are found, an empty ObjectList (non-nil) is returned. -func (o *ObjectList) Filter(keys ...string) *ObjectList { - var result ObjectList - for _, item := range o.Items { - // If there aren't enough keys, then ignore this - if len(item.Keys) < len(keys) { - continue - } - - match := true - for i, key := range item.Keys[:len(keys)] { - key := key.Token.Value().(string) - if key != keys[i] && !strings.EqualFold(key, keys[i]) { - match = false - break - } - } - if !match { - continue - } - - // Strip off the prefix from the children - newItem := *item - newItem.Keys = newItem.Keys[len(keys):] - result.Add(&newItem) - } - - return &result -} - -// Children returns further nested objects (key length > 0) within this -// ObjectList. This should be used with Filter to get at child items. -func (o *ObjectList) Children() *ObjectList { - var result ObjectList - for _, item := range o.Items { - if len(item.Keys) > 0 { - result.Add(item) - } - } - - return &result -} - -// Elem returns items in the list that are direct element assignments -// (key length == 0). This should be used with Filter to get at elements. -func (o *ObjectList) Elem() *ObjectList { - var result ObjectList - for _, item := range o.Items { - if len(item.Keys) == 0 { - result.Add(item) - } - } - - return &result -} - -func (o *ObjectList) Pos() token.Pos { - // always returns the uninitiliazed position - return o.Items[0].Pos() -} - -// ObjectItem represents a HCL Object Item. An item is represented with a key -// (or keys). It can be an assignment or an object (both normal and nested) -type ObjectItem struct { - // keys is only one length long if it's of type assignment. If it's a - // nested object it can be larger than one. In that case "assign" is - // invalid as there is no assignments for a nested object. - Keys []*ObjectKey - - // assign contains the position of "=", if any - Assign token.Pos - - // val is the item itself. It can be an object,list, number, bool or a - // string. If key length is larger than one, val can be only of type - // Object. - Val Node - - LeadComment *CommentGroup // associated lead comment - LineComment *CommentGroup // associated line comment -} - -func (o *ObjectItem) Pos() token.Pos { - // I'm not entirely sure what causes this, but removing this causes - // a test failure. We should investigate at some point. - if len(o.Keys) == 0 { - return token.Pos{} - } - - return o.Keys[0].Pos() -} - -// ObjectKeys are either an identifier or of type string. -type ObjectKey struct { - Token token.Token -} - -func (o *ObjectKey) Pos() token.Pos { - return o.Token.Pos -} - -// LiteralType represents a literal of basic type. Valid types are: -// token.NUMBER, token.FLOAT, token.BOOL and token.STRING -type LiteralType struct { - Token token.Token - - // comment types, only used when in a list - LeadComment *CommentGroup - LineComment *CommentGroup -} - -func (l *LiteralType) Pos() token.Pos { - return l.Token.Pos -} - -// ListStatement represents a HCL List type -type ListType struct { - Lbrack token.Pos // position of "[" - Rbrack token.Pos // position of "]" - List []Node // the elements in lexical order -} - -func (l *ListType) Pos() token.Pos { - return l.Lbrack -} - -func (l *ListType) Add(node Node) { - l.List = append(l.List, node) -} - -// ObjectType represents a HCL Object Type -type ObjectType struct { - Lbrace token.Pos // position of "{" - Rbrace token.Pos // position of "}" - List *ObjectList // the nodes in lexical order -} - -func (o *ObjectType) Pos() token.Pos { - return o.Lbrace -} - -// Comment node represents a single //, # style or /*- style commment -type Comment struct { - Start token.Pos // position of / or # - Text string -} - -func (c *Comment) Pos() token.Pos { - return c.Start -} - -// CommentGroup node represents a sequence of comments with no other tokens and -// no empty lines between. -type CommentGroup struct { - List []*Comment // len(List) > 0 -} - -func (c *CommentGroup) Pos() token.Pos { - return c.List[0].Pos() -} - -//------------------------------------------------------------------- -// GoStringer -//------------------------------------------------------------------- - -func (o *ObjectKey) GoString() string { return fmt.Sprintf("*%#v", *o) } -func (o *ObjectList) GoString() string { return fmt.Sprintf("*%#v", *o) } diff --git a/vendor/github.com/hashicorp/hcl/hcl/ast/walk.go b/vendor/github.com/hashicorp/hcl/hcl/ast/walk.go deleted file mode 100644 index ba07ad4..0000000 --- a/vendor/github.com/hashicorp/hcl/hcl/ast/walk.go +++ /dev/null @@ -1,52 +0,0 @@ -package ast - -import "fmt" - -// WalkFunc describes a function to be called for each node during a Walk. The -// returned node can be used to rewrite the AST. Walking stops the returned -// bool is false. -type WalkFunc func(Node) (Node, bool) - -// Walk traverses an AST in depth-first order: It starts by calling fn(node); -// node must not be nil. If fn returns true, Walk invokes fn recursively for -// each of the non-nil children of node, followed by a call of fn(nil). The -// returned node of fn can be used to rewrite the passed node to fn. -func Walk(node Node, fn WalkFunc) Node { - rewritten, ok := fn(node) - if !ok { - return rewritten - } - - switch n := node.(type) { - case *File: - n.Node = Walk(n.Node, fn) - case *ObjectList: - for i, item := range n.Items { - n.Items[i] = Walk(item, fn).(*ObjectItem) - } - case *ObjectKey: - // nothing to do - case *ObjectItem: - for i, k := range n.Keys { - n.Keys[i] = Walk(k, fn).(*ObjectKey) - } - - if n.Val != nil { - n.Val = Walk(n.Val, fn) - } - case *LiteralType: - // nothing to do - case *ListType: - for i, l := range n.List { - n.List[i] = Walk(l, fn) - } - case *ObjectType: - n.List = Walk(n.List, fn).(*ObjectList) - default: - // should we panic here? - fmt.Printf("unknown type: %T\n", n) - } - - fn(nil) - return rewritten -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/error.go b/vendor/github.com/hashicorp/hcl/hcl/parser/error.go deleted file mode 100644 index 5c99381..0000000 --- a/vendor/github.com/hashicorp/hcl/hcl/parser/error.go +++ /dev/null @@ -1,17 +0,0 @@ -package parser - -import ( - "fmt" - - "github.com/hashicorp/hcl/hcl/token" -) - -// PosError is a parse error that contains a position. -type PosError struct { - Pos token.Pos - Err error -} - -func (e *PosError) Error() string { - return fmt.Sprintf("At %s: %s", e.Pos, e.Err) -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go deleted file mode 100644 index 64c83bc..0000000 --- a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go +++ /dev/null @@ -1,532 +0,0 @@ -// Package parser implements a parser for HCL (HashiCorp Configuration -// Language) -package parser - -import ( - "bytes" - "errors" - "fmt" - "strings" - - "github.com/hashicorp/hcl/hcl/ast" - "github.com/hashicorp/hcl/hcl/scanner" - "github.com/hashicorp/hcl/hcl/token" -) - -type Parser struct { - sc *scanner.Scanner - - // Last read token - tok token.Token - commaPrev token.Token - - comments []*ast.CommentGroup - leadComment *ast.CommentGroup // last lead comment - lineComment *ast.CommentGroup // last line comment - - enableTrace bool - indent int - n int // buffer size (max = 1) -} - -func newParser(src []byte) *Parser { - return &Parser{ - sc: scanner.New(src), - } -} - -// Parse returns the fully parsed source and returns the abstract syntax tree. -func Parse(src []byte) (*ast.File, error) { - // normalize all line endings - // since the scanner and output only work with "\n" line endings, we may - // end up with dangling "\r" characters in the parsed data. - src = bytes.Replace(src, []byte("\r\n"), []byte("\n"), -1) - - p := newParser(src) - return p.Parse() -} - -var errEofToken = errors.New("EOF token found") - -// Parse returns the fully parsed source and returns the abstract syntax tree. -func (p *Parser) Parse() (*ast.File, error) { - f := &ast.File{} - var err, scerr error - p.sc.Error = func(pos token.Pos, msg string) { - scerr = &PosError{Pos: pos, Err: errors.New(msg)} - } - - f.Node, err = p.objectList(false) - if scerr != nil { - return nil, scerr - } - if err != nil { - return nil, err - } - - f.Comments = p.comments - return f, nil -} - -// objectList parses a list of items within an object (generally k/v pairs). -// The parameter" obj" tells this whether to we are within an object (braces: -// '{', '}') or just at the top level. If we're within an object, we end -// at an RBRACE. -func (p *Parser) objectList(obj bool) (*ast.ObjectList, error) { - defer un(trace(p, "ParseObjectList")) - node := &ast.ObjectList{} - - for { - if obj { - tok := p.scan() - p.unscan() - if tok.Type == token.RBRACE { - break - } - } - - n, err := p.objectItem() - if err == errEofToken { - break // we are finished - } - - // we don't return a nil node, because might want to use already - // collected items. - if err != nil { - return node, err - } - - node.Add(n) - - // object lists can be optionally comma-delimited e.g. when a list of maps - // is being expressed, so a comma is allowed here - it's simply consumed - tok := p.scan() - if tok.Type != token.COMMA { - p.unscan() - } - } - return node, nil -} - -func (p *Parser) consumeComment() (comment *ast.Comment, endline int) { - endline = p.tok.Pos.Line - - // count the endline if it's multiline comment, ie starting with /* - if len(p.tok.Text) > 1 && p.tok.Text[1] == '*' { - // don't use range here - no need to decode Unicode code points - for i := 0; i < len(p.tok.Text); i++ { - if p.tok.Text[i] == '\n' { - endline++ - } - } - } - - comment = &ast.Comment{Start: p.tok.Pos, Text: p.tok.Text} - p.tok = p.sc.Scan() - return -} - -func (p *Parser) consumeCommentGroup(n int) (comments *ast.CommentGroup, endline int) { - var list []*ast.Comment - endline = p.tok.Pos.Line - - for p.tok.Type == token.COMMENT && p.tok.Pos.Line <= endline+n { - var comment *ast.Comment - comment, endline = p.consumeComment() - list = append(list, comment) - } - - // add comment group to the comments list - comments = &ast.CommentGroup{List: list} - p.comments = append(p.comments, comments) - - return -} - -// objectItem parses a single object item -func (p *Parser) objectItem() (*ast.ObjectItem, error) { - defer un(trace(p, "ParseObjectItem")) - - keys, err := p.objectKey() - if len(keys) > 0 && err == errEofToken { - // We ignore eof token here since it is an error if we didn't - // receive a value (but we did receive a key) for the item. - err = nil - } - if len(keys) > 0 && err != nil && p.tok.Type == token.RBRACE { - // This is a strange boolean statement, but what it means is: - // We have keys with no value, and we're likely in an object - // (since RBrace ends an object). For this, we set err to nil so - // we continue and get the error below of having the wrong value - // type. - err = nil - - // Reset the token type so we don't think it completed fine. See - // objectType which uses p.tok.Type to check if we're done with - // the object. - p.tok.Type = token.EOF - } - if err != nil { - return nil, err - } - - o := &ast.ObjectItem{ - Keys: keys, - } - - if p.leadComment != nil { - o.LeadComment = p.leadComment - p.leadComment = nil - } - - switch p.tok.Type { - case token.ASSIGN: - o.Assign = p.tok.Pos - o.Val, err = p.object() - if err != nil { - return nil, err - } - case token.LBRACE: - o.Val, err = p.objectType() - if err != nil { - return nil, err - } - default: - keyStr := make([]string, 0, len(keys)) - for _, k := range keys { - keyStr = append(keyStr, k.Token.Text) - } - - return nil, &PosError{ - Pos: p.tok.Pos, - Err: fmt.Errorf( - "key '%s' expected start of object ('{') or assignment ('=')", - strings.Join(keyStr, " ")), - } - } - - // key=#comment - // val - if p.lineComment != nil { - o.LineComment, p.lineComment = p.lineComment, nil - } - - // do a look-ahead for line comment - p.scan() - if len(keys) > 0 && o.Val.Pos().Line == keys[0].Pos().Line && p.lineComment != nil { - o.LineComment = p.lineComment - p.lineComment = nil - } - p.unscan() - return o, nil -} - -// objectKey parses an object key and returns a ObjectKey AST -func (p *Parser) objectKey() ([]*ast.ObjectKey, error) { - keyCount := 0 - keys := make([]*ast.ObjectKey, 0) - - for { - tok := p.scan() - switch tok.Type { - case token.EOF: - // It is very important to also return the keys here as well as - // the error. This is because we need to be able to tell if we - // did parse keys prior to finding the EOF, or if we just found - // a bare EOF. - return keys, errEofToken - case token.ASSIGN: - // assignment or object only, but not nested objects. this is not - // allowed: `foo bar = {}` - if keyCount > 1 { - return nil, &PosError{ - Pos: p.tok.Pos, - Err: fmt.Errorf("nested object expected: LBRACE got: %s", p.tok.Type), - } - } - - if keyCount == 0 { - return nil, &PosError{ - Pos: p.tok.Pos, - Err: errors.New("no object keys found!"), - } - } - - return keys, nil - case token.LBRACE: - var err error - - // If we have no keys, then it is a syntax error. i.e. {{}} is not - // allowed. - if len(keys) == 0 { - err = &PosError{ - Pos: p.tok.Pos, - Err: fmt.Errorf("expected: IDENT | STRING got: %s", p.tok.Type), - } - } - - // object - return keys, err - case token.IDENT, token.STRING: - keyCount++ - keys = append(keys, &ast.ObjectKey{Token: p.tok}) - case token.ILLEGAL: - return keys, &PosError{ - Pos: p.tok.Pos, - Err: fmt.Errorf("illegal character"), - } - default: - return keys, &PosError{ - Pos: p.tok.Pos, - Err: fmt.Errorf("expected: IDENT | STRING | ASSIGN | LBRACE got: %s", p.tok.Type), - } - } - } -} - -// object parses any type of object, such as number, bool, string, object or -// list. -func (p *Parser) object() (ast.Node, error) { - defer un(trace(p, "ParseType")) - tok := p.scan() - - switch tok.Type { - case token.NUMBER, token.FLOAT, token.BOOL, token.STRING, token.HEREDOC: - return p.literalType() - case token.LBRACE: - return p.objectType() - case token.LBRACK: - return p.listType() - case token.COMMENT: - // implement comment - case token.EOF: - return nil, errEofToken - } - - return nil, &PosError{ - Pos: tok.Pos, - Err: fmt.Errorf("Unknown token: %+v", tok), - } -} - -// objectType parses an object type and returns a ObjectType AST -func (p *Parser) objectType() (*ast.ObjectType, error) { - defer un(trace(p, "ParseObjectType")) - - // we assume that the currently scanned token is a LBRACE - o := &ast.ObjectType{ - Lbrace: p.tok.Pos, - } - - l, err := p.objectList(true) - - // if we hit RBRACE, we are good to go (means we parsed all Items), if it's - // not a RBRACE, it's an syntax error and we just return it. - if err != nil && p.tok.Type != token.RBRACE { - return nil, err - } - - // No error, scan and expect the ending to be a brace - if tok := p.scan(); tok.Type != token.RBRACE { - return nil, &PosError{ - Pos: tok.Pos, - Err: fmt.Errorf("object expected closing RBRACE got: %s", tok.Type), - } - } - - o.List = l - o.Rbrace = p.tok.Pos // advanced via parseObjectList - return o, nil -} - -// listType parses a list type and returns a ListType AST -func (p *Parser) listType() (*ast.ListType, error) { - defer un(trace(p, "ParseListType")) - - // we assume that the currently scanned token is a LBRACK - l := &ast.ListType{ - Lbrack: p.tok.Pos, - } - - needComma := false - for { - tok := p.scan() - if needComma { - switch tok.Type { - case token.COMMA, token.RBRACK: - default: - return nil, &PosError{ - Pos: tok.Pos, - Err: fmt.Errorf( - "error parsing list, expected comma or list end, got: %s", - tok.Type), - } - } - } - switch tok.Type { - case token.BOOL, token.NUMBER, token.FLOAT, token.STRING, token.HEREDOC: - node, err := p.literalType() - if err != nil { - return nil, err - } - - // If there is a lead comment, apply it - if p.leadComment != nil { - node.LeadComment = p.leadComment - p.leadComment = nil - } - - l.Add(node) - needComma = true - case token.COMMA: - // get next list item or we are at the end - // do a look-ahead for line comment - p.scan() - if p.lineComment != nil && len(l.List) > 0 { - lit, ok := l.List[len(l.List)-1].(*ast.LiteralType) - if ok { - lit.LineComment = p.lineComment - l.List[len(l.List)-1] = lit - p.lineComment = nil - } - } - p.unscan() - - needComma = false - continue - case token.LBRACE: - // Looks like a nested object, so parse it out - node, err := p.objectType() - if err != nil { - return nil, &PosError{ - Pos: tok.Pos, - Err: fmt.Errorf( - "error while trying to parse object within list: %s", err), - } - } - l.Add(node) - needComma = true - case token.LBRACK: - node, err := p.listType() - if err != nil { - return nil, &PosError{ - Pos: tok.Pos, - Err: fmt.Errorf( - "error while trying to parse list within list: %s", err), - } - } - l.Add(node) - case token.RBRACK: - // finished - l.Rbrack = p.tok.Pos - return l, nil - default: - return nil, &PosError{ - Pos: tok.Pos, - Err: fmt.Errorf("unexpected token while parsing list: %s", tok.Type), - } - } - } -} - -// literalType parses a literal type and returns a LiteralType AST -func (p *Parser) literalType() (*ast.LiteralType, error) { - defer un(trace(p, "ParseLiteral")) - - return &ast.LiteralType{ - Token: p.tok, - }, nil -} - -// scan returns the next token from the underlying scanner. If a token has -// been unscanned then read that instead. In the process, it collects any -// comment groups encountered, and remembers the last lead and line comments. -func (p *Parser) scan() token.Token { - // If we have a token on the buffer, then return it. - if p.n != 0 { - p.n = 0 - return p.tok - } - - // Otherwise read the next token from the scanner and Save it to the buffer - // in case we unscan later. - prev := p.tok - p.tok = p.sc.Scan() - - if p.tok.Type == token.COMMENT { - var comment *ast.CommentGroup - var endline int - - // fmt.Printf("p.tok.Pos.Line = %+v prev: %d endline %d \n", - // p.tok.Pos.Line, prev.Pos.Line, endline) - if p.tok.Pos.Line == prev.Pos.Line { - // The comment is on same line as the previous token; it - // cannot be a lead comment but may be a line comment. - comment, endline = p.consumeCommentGroup(0) - if p.tok.Pos.Line != endline { - // The next token is on a different line, thus - // the last comment group is a line comment. - p.lineComment = comment - } - } - - // consume successor comments, if any - endline = -1 - for p.tok.Type == token.COMMENT { - comment, endline = p.consumeCommentGroup(1) - } - - if endline+1 == p.tok.Pos.Line && p.tok.Type != token.RBRACE { - switch p.tok.Type { - case token.RBRACE, token.RBRACK: - // Do not count for these cases - default: - // The next token is following on the line immediately after the - // comment group, thus the last comment group is a lead comment. - p.leadComment = comment - } - } - - } - - return p.tok -} - -// unscan pushes the previously read token back onto the buffer. -func (p *Parser) unscan() { - p.n = 1 -} - -// ---------------------------------------------------------------------------- -// Parsing support - -func (p *Parser) printTrace(a ...interface{}) { - if !p.enableTrace { - return - } - - const dots = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " - const n = len(dots) - fmt.Printf("%5d:%3d: ", p.tok.Pos.Line, p.tok.Pos.Column) - - i := 2 * p.indent - for i > n { - fmt.Print(dots) - i -= n - } - // i <= n - fmt.Print(dots[0:i]) - fmt.Println(a...) -} - -func trace(p *Parser, msg string) *Parser { - p.printTrace(msg, "(") - p.indent++ - return p -} - -// Usage pattern: defer un(trace(p, "...")) -func un(p *Parser) { - p.indent-- - p.printTrace(")") -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go b/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go deleted file mode 100644 index 7c038d1..0000000 --- a/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go +++ /dev/null @@ -1,789 +0,0 @@ -package printer - -import ( - "bytes" - "fmt" - "sort" - - "github.com/hashicorp/hcl/hcl/ast" - "github.com/hashicorp/hcl/hcl/token" -) - -const ( - blank = byte(' ') - newline = byte('\n') - tab = byte('\t') - infinity = 1 << 30 // offset or line -) - -var ( - unindent = []byte("\uE123") // in the private use space -) - -type printer struct { - cfg Config - prev token.Pos - - comments []*ast.CommentGroup // may be nil, contains all comments - standaloneComments []*ast.CommentGroup // contains all standalone comments (not assigned to any node) - - enableTrace bool - indentTrace int -} - -type ByPosition []*ast.CommentGroup - -func (b ByPosition) Len() int { return len(b) } -func (b ByPosition) Swap(i, j int) { b[i], b[j] = b[j], b[i] } -func (b ByPosition) Less(i, j int) bool { return b[i].Pos().Before(b[j].Pos()) } - -// collectComments comments all standalone comments which are not lead or line -// comment -func (p *printer) collectComments(node ast.Node) { - // first collect all comments. This is already stored in - // ast.File.(comments) - ast.Walk(node, func(nn ast.Node) (ast.Node, bool) { - switch t := nn.(type) { - case *ast.File: - p.comments = t.Comments - return nn, false - } - return nn, true - }) - - standaloneComments := make(map[token.Pos]*ast.CommentGroup, 0) - for _, c := range p.comments { - standaloneComments[c.Pos()] = c - } - - // next remove all lead and line comments from the overall comment map. - // This will give us comments which are standalone, comments which are not - // assigned to any kind of node. - ast.Walk(node, func(nn ast.Node) (ast.Node, bool) { - switch t := nn.(type) { - case *ast.LiteralType: - if t.LeadComment != nil { - for _, comment := range t.LeadComment.List { - if _, ok := standaloneComments[comment.Pos()]; ok { - delete(standaloneComments, comment.Pos()) - } - } - } - - if t.LineComment != nil { - for _, comment := range t.LineComment.List { - if _, ok := standaloneComments[comment.Pos()]; ok { - delete(standaloneComments, comment.Pos()) - } - } - } - case *ast.ObjectItem: - if t.LeadComment != nil { - for _, comment := range t.LeadComment.List { - if _, ok := standaloneComments[comment.Pos()]; ok { - delete(standaloneComments, comment.Pos()) - } - } - } - - if t.LineComment != nil { - for _, comment := range t.LineComment.List { - if _, ok := standaloneComments[comment.Pos()]; ok { - delete(standaloneComments, comment.Pos()) - } - } - } - } - - return nn, true - }) - - for _, c := range standaloneComments { - p.standaloneComments = append(p.standaloneComments, c) - } - - sort.Sort(ByPosition(p.standaloneComments)) -} - -// output prints creates b printable HCL output and returns it. -func (p *printer) output(n interface{}) []byte { - var buf bytes.Buffer - - switch t := n.(type) { - case *ast.File: - // File doesn't trace so we add the tracing here - defer un(trace(p, "File")) - return p.output(t.Node) - case *ast.ObjectList: - defer un(trace(p, "ObjectList")) - - var index int - for { - // Determine the location of the next actual non-comment - // item. If we're at the end, the next item is at "infinity" - var nextItem token.Pos - if index != len(t.Items) { - nextItem = t.Items[index].Pos() - } else { - nextItem = token.Pos{Offset: infinity, Line: infinity} - } - - // Go through the standalone comments in the file and print out - // the comments that we should be for this object item. - for _, c := range p.standaloneComments { - // Go through all the comments in the group. The group - // should be printed together, not separated by double newlines. - printed := false - newlinePrinted := false - for _, comment := range c.List { - // We only care about comments after the previous item - // we've printed so that comments are printed in the - // correct locations (between two objects for example). - // And before the next item. - if comment.Pos().After(p.prev) && comment.Pos().Before(nextItem) { - // if we hit the end add newlines so we can print the comment - // we don't do this if prev is invalid which means the - // beginning of the file since the first comment should - // be at the first line. - if !newlinePrinted && p.prev.IsValid() && index == len(t.Items) { - buf.Write([]byte{newline, newline}) - newlinePrinted = true - } - - // Write the actual comment. - buf.WriteString(comment.Text) - buf.WriteByte(newline) - - // Set printed to true to note that we printed something - printed = true - } - } - - // If we're not at the last item, write a new line so - // that there is a newline separating this comment from - // the next object. - if printed && index != len(t.Items) { - buf.WriteByte(newline) - } - } - - if index == len(t.Items) { - break - } - - buf.Write(p.output(t.Items[index])) - if index != len(t.Items)-1 { - // Always write a newline to separate us from the next item - buf.WriteByte(newline) - - // Need to determine if we're going to separate the next item - // with a blank line. The logic here is simple, though there - // are a few conditions: - // - // 1. The next object is more than one line away anyways, - // so we need an empty line. - // - // 2. The next object is not a "single line" object, so - // we need an empty line. - // - // 3. This current object is not a single line object, - // so we need an empty line. - current := t.Items[index] - next := t.Items[index+1] - if next.Pos().Line != t.Items[index].Pos().Line+1 || - !p.isSingleLineObject(next) || - !p.isSingleLineObject(current) { - buf.WriteByte(newline) - } - } - index++ - } - case *ast.ObjectKey: - buf.WriteString(t.Token.Text) - case *ast.ObjectItem: - p.prev = t.Pos() - buf.Write(p.objectItem(t)) - case *ast.LiteralType: - buf.Write(p.literalType(t)) - case *ast.ListType: - buf.Write(p.list(t)) - case *ast.ObjectType: - buf.Write(p.objectType(t)) - default: - fmt.Printf(" unknown type: %T\n", n) - } - - return buf.Bytes() -} - -func (p *printer) literalType(lit *ast.LiteralType) []byte { - result := []byte(lit.Token.Text) - switch lit.Token.Type { - case token.HEREDOC: - // Clear the trailing newline from heredocs - if result[len(result)-1] == '\n' { - result = result[:len(result)-1] - } - - // Poison lines 2+ so that we don't indent them - result = p.heredocIndent(result) - case token.STRING: - // If this is a multiline string, poison lines 2+ so we don't - // indent them. - if bytes.IndexRune(result, '\n') >= 0 { - result = p.heredocIndent(result) - } - } - - return result -} - -// objectItem returns the printable HCL form of an object item. An object type -// starts with one/multiple keys and has a value. The value might be of any -// type. -func (p *printer) objectItem(o *ast.ObjectItem) []byte { - defer un(trace(p, fmt.Sprintf("ObjectItem: %s", o.Keys[0].Token.Text))) - var buf bytes.Buffer - - if o.LeadComment != nil { - for _, comment := range o.LeadComment.List { - buf.WriteString(comment.Text) - buf.WriteByte(newline) - } - } - - // If key and val are on different lines, treat line comments like lead comments. - if o.LineComment != nil && o.Val.Pos().Line != o.Keys[0].Pos().Line { - for _, comment := range o.LineComment.List { - buf.WriteString(comment.Text) - buf.WriteByte(newline) - } - } - - for i, k := range o.Keys { - buf.WriteString(k.Token.Text) - buf.WriteByte(blank) - - // reach end of key - if o.Assign.IsValid() && i == len(o.Keys)-1 && len(o.Keys) == 1 { - buf.WriteString("=") - buf.WriteByte(blank) - } - } - - buf.Write(p.output(o.Val)) - - if o.LineComment != nil && o.Val.Pos().Line == o.Keys[0].Pos().Line { - buf.WriteByte(blank) - for _, comment := range o.LineComment.List { - buf.WriteString(comment.Text) - } - } - - return buf.Bytes() -} - -// objectType returns the printable HCL form of an object type. An object type -// begins with a brace and ends with a brace. -func (p *printer) objectType(o *ast.ObjectType) []byte { - defer un(trace(p, "ObjectType")) - var buf bytes.Buffer - buf.WriteString("{") - - var index int - var nextItem token.Pos - var commented, newlinePrinted bool - for { - // Determine the location of the next actual non-comment - // item. If we're at the end, the next item is the closing brace - if index != len(o.List.Items) { - nextItem = o.List.Items[index].Pos() - } else { - nextItem = o.Rbrace - } - - // Go through the standalone comments in the file and print out - // the comments that we should be for this object item. - for _, c := range p.standaloneComments { - printed := false - var lastCommentPos token.Pos - for _, comment := range c.List { - // We only care about comments after the previous item - // we've printed so that comments are printed in the - // correct locations (between two objects for example). - // And before the next item. - if comment.Pos().After(p.prev) && comment.Pos().Before(nextItem) { - // If there are standalone comments and the initial newline has not - // been printed yet, do it now. - if !newlinePrinted { - newlinePrinted = true - buf.WriteByte(newline) - } - - // add newline if it's between other printed nodes - if index > 0 { - commented = true - buf.WriteByte(newline) - } - - // Store this position - lastCommentPos = comment.Pos() - - // output the comment itself - buf.Write(p.indent(p.heredocIndent([]byte(comment.Text)))) - - // Set printed to true to note that we printed something - printed = true - - /* - if index != len(o.List.Items) { - buf.WriteByte(newline) // do not print on the end - } - */ - } - } - - // Stuff to do if we had comments - if printed { - // Always write a newline - buf.WriteByte(newline) - - // If there is another item in the object and our comment - // didn't hug it directly, then make sure there is a blank - // line separating them. - if nextItem != o.Rbrace && nextItem.Line != lastCommentPos.Line+1 { - buf.WriteByte(newline) - } - } - } - - if index == len(o.List.Items) { - p.prev = o.Rbrace - break - } - - // At this point we are sure that it's not a totally empty block: print - // the initial newline if it hasn't been printed yet by the previous - // block about standalone comments. - if !newlinePrinted { - buf.WriteByte(newline) - newlinePrinted = true - } - - // check if we have adjacent one liner items. If yes we'll going to align - // the comments. - var aligned []*ast.ObjectItem - for _, item := range o.List.Items[index:] { - // we don't group one line lists - if len(o.List.Items) == 1 { - break - } - - // one means a oneliner with out any lead comment - // two means a oneliner with lead comment - // anything else might be something else - cur := lines(string(p.objectItem(item))) - if cur > 2 { - break - } - - curPos := item.Pos() - - nextPos := token.Pos{} - if index != len(o.List.Items)-1 { - nextPos = o.List.Items[index+1].Pos() - } - - prevPos := token.Pos{} - if index != 0 { - prevPos = o.List.Items[index-1].Pos() - } - - // fmt.Println("DEBUG ----------------") - // fmt.Printf("prev = %+v prevPos: %s\n", prev, prevPos) - // fmt.Printf("cur = %+v curPos: %s\n", cur, curPos) - // fmt.Printf("next = %+v nextPos: %s\n", next, nextPos) - - if curPos.Line+1 == nextPos.Line { - aligned = append(aligned, item) - index++ - continue - } - - if curPos.Line-1 == prevPos.Line { - aligned = append(aligned, item) - index++ - - // finish if we have a new line or comment next. This happens - // if the next item is not adjacent - if curPos.Line+1 != nextPos.Line { - break - } - continue - } - - break - } - - // put newlines if the items are between other non aligned items. - // newlines are also added if there is a standalone comment already, so - // check it too - if !commented && index != len(aligned) { - buf.WriteByte(newline) - } - - if len(aligned) >= 1 { - p.prev = aligned[len(aligned)-1].Pos() - - items := p.alignedItems(aligned) - buf.Write(p.indent(items)) - } else { - p.prev = o.List.Items[index].Pos() - - buf.Write(p.indent(p.objectItem(o.List.Items[index]))) - index++ - } - - buf.WriteByte(newline) - } - - buf.WriteString("}") - return buf.Bytes() -} - -func (p *printer) alignedItems(items []*ast.ObjectItem) []byte { - var buf bytes.Buffer - - // find the longest key and value length, needed for alignment - var longestKeyLen int // longest key length - var longestValLen int // longest value length - for _, item := range items { - key := len(item.Keys[0].Token.Text) - val := len(p.output(item.Val)) - - if key > longestKeyLen { - longestKeyLen = key - } - - if val > longestValLen { - longestValLen = val - } - } - - for i, item := range items { - if item.LeadComment != nil { - for _, comment := range item.LeadComment.List { - buf.WriteString(comment.Text) - buf.WriteByte(newline) - } - } - - for i, k := range item.Keys { - keyLen := len(k.Token.Text) - buf.WriteString(k.Token.Text) - for i := 0; i < longestKeyLen-keyLen+1; i++ { - buf.WriteByte(blank) - } - - // reach end of key - if i == len(item.Keys)-1 && len(item.Keys) == 1 { - buf.WriteString("=") - buf.WriteByte(blank) - } - } - - val := p.output(item.Val) - valLen := len(val) - buf.Write(val) - - if item.Val.Pos().Line == item.Keys[0].Pos().Line && item.LineComment != nil { - for i := 0; i < longestValLen-valLen+1; i++ { - buf.WriteByte(blank) - } - - for _, comment := range item.LineComment.List { - buf.WriteString(comment.Text) - } - } - - // do not print for the last item - if i != len(items)-1 { - buf.WriteByte(newline) - } - } - - return buf.Bytes() -} - -// list returns the printable HCL form of an list type. -func (p *printer) list(l *ast.ListType) []byte { - if p.isSingleLineList(l) { - return p.singleLineList(l) - } - - var buf bytes.Buffer - buf.WriteString("[") - buf.WriteByte(newline) - - var longestLine int - for _, item := range l.List { - // for now we assume that the list only contains literal types - if lit, ok := item.(*ast.LiteralType); ok { - lineLen := len(lit.Token.Text) - if lineLen > longestLine { - longestLine = lineLen - } - } - } - - haveEmptyLine := false - for i, item := range l.List { - // If we have a lead comment, then we want to write that first - leadComment := false - if lit, ok := item.(*ast.LiteralType); ok && lit.LeadComment != nil { - leadComment = true - - // Ensure an empty line before every element with a - // lead comment (except the first item in a list). - if !haveEmptyLine && i != 0 { - buf.WriteByte(newline) - } - - for _, comment := range lit.LeadComment.List { - buf.Write(p.indent([]byte(comment.Text))) - buf.WriteByte(newline) - } - } - - // also indent each line - val := p.output(item) - curLen := len(val) - buf.Write(p.indent(val)) - - // if this item is a heredoc, then we output the comma on - // the next line. This is the only case this happens. - comma := []byte{','} - if lit, ok := item.(*ast.LiteralType); ok && lit.Token.Type == token.HEREDOC { - buf.WriteByte(newline) - comma = p.indent(comma) - } - - buf.Write(comma) - - if lit, ok := item.(*ast.LiteralType); ok && lit.LineComment != nil { - // if the next item doesn't have any comments, do not align - buf.WriteByte(blank) // align one space - for i := 0; i < longestLine-curLen; i++ { - buf.WriteByte(blank) - } - - for _, comment := range lit.LineComment.List { - buf.WriteString(comment.Text) - } - } - - buf.WriteByte(newline) - - // Ensure an empty line after every element with a - // lead comment (except the first item in a list). - haveEmptyLine = leadComment && i != len(l.List)-1 - if haveEmptyLine { - buf.WriteByte(newline) - } - } - - buf.WriteString("]") - return buf.Bytes() -} - -// isSingleLineList returns true if: -// * they were previously formatted entirely on one line -// * they consist entirely of literals -// * there are either no heredoc strings or the list has exactly one element -// * there are no line comments -func (printer) isSingleLineList(l *ast.ListType) bool { - for _, item := range l.List { - if item.Pos().Line != l.Lbrack.Line { - return false - } - - lit, ok := item.(*ast.LiteralType) - if !ok { - return false - } - - if lit.Token.Type == token.HEREDOC && len(l.List) != 1 { - return false - } - - if lit.LineComment != nil { - return false - } - } - - return true -} - -// singleLineList prints a simple single line list. -// For a definition of "simple", see isSingleLineList above. -func (p *printer) singleLineList(l *ast.ListType) []byte { - buf := &bytes.Buffer{} - - buf.WriteString("[") - for i, item := range l.List { - if i != 0 { - buf.WriteString(", ") - } - - // Output the item itself - buf.Write(p.output(item)) - - // The heredoc marker needs to be at the end of line. - if lit, ok := item.(*ast.LiteralType); ok && lit.Token.Type == token.HEREDOC { - buf.WriteByte(newline) - } - } - - buf.WriteString("]") - return buf.Bytes() -} - -// indent indents the lines of the given buffer for each non-empty line -func (p *printer) indent(buf []byte) []byte { - var prefix []byte - if p.cfg.SpacesWidth != 0 { - for i := 0; i < p.cfg.SpacesWidth; i++ { - prefix = append(prefix, blank) - } - } else { - prefix = []byte{tab} - } - - var res []byte - bol := true - for _, c := range buf { - if bol && c != '\n' { - res = append(res, prefix...) - } - - res = append(res, c) - bol = c == '\n' - } - return res -} - -// unindent removes all the indentation from the tombstoned lines -func (p *printer) unindent(buf []byte) []byte { - var res []byte - for i := 0; i < len(buf); i++ { - skip := len(buf)-i <= len(unindent) - if !skip { - skip = !bytes.Equal(unindent, buf[i:i+len(unindent)]) - } - if skip { - res = append(res, buf[i]) - continue - } - - // We have a marker. we have to backtrace here and clean out - // any whitespace ahead of our tombstone up to a \n - for j := len(res) - 1; j >= 0; j-- { - if res[j] == '\n' { - break - } - - res = res[:j] - } - - // Skip the entire unindent marker - i += len(unindent) - 1 - } - - return res -} - -// heredocIndent marks all the 2nd and further lines as unindentable -func (p *printer) heredocIndent(buf []byte) []byte { - var res []byte - bol := false - for _, c := range buf { - if bol && c != '\n' { - res = append(res, unindent...) - } - res = append(res, c) - bol = c == '\n' - } - return res -} - -// isSingleLineObject tells whether the given object item is a single -// line object such as "obj {}". -// -// A single line object: -// -// * has no lead comments (hence multi-line) -// * has no assignment -// * has no values in the stanza (within {}) -// -func (p *printer) isSingleLineObject(val *ast.ObjectItem) bool { - // If there is a lead comment, can't be one line - if val.LeadComment != nil { - return false - } - - // If there is assignment, we always break by line - if val.Assign.IsValid() { - return false - } - - // If it isn't an object type, then its not a single line object - ot, ok := val.Val.(*ast.ObjectType) - if !ok { - return false - } - - // If the object has no items, it is single line! - return len(ot.List.Items) == 0 -} - -func lines(txt string) int { - endline := 1 - for i := 0; i < len(txt); i++ { - if txt[i] == '\n' { - endline++ - } - } - return endline -} - -// ---------------------------------------------------------------------------- -// Tracing support - -func (p *printer) printTrace(a ...interface{}) { - if !p.enableTrace { - return - } - - const dots = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " - const n = len(dots) - i := 2 * p.indentTrace - for i > n { - fmt.Print(dots) - i -= n - } - // i <= n - fmt.Print(dots[0:i]) - fmt.Println(a...) -} - -func trace(p *printer, msg string) *printer { - p.printTrace(msg, "(") - p.indentTrace++ - return p -} - -// Usage pattern: defer un(trace(p, "...")) -func un(p *printer) { - p.indentTrace-- - p.printTrace(")") -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go b/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go deleted file mode 100644 index 6617ab8..0000000 --- a/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go +++ /dev/null @@ -1,66 +0,0 @@ -// Package printer implements printing of AST nodes to HCL format. -package printer - -import ( - "bytes" - "io" - "text/tabwriter" - - "github.com/hashicorp/hcl/hcl/ast" - "github.com/hashicorp/hcl/hcl/parser" -) - -var DefaultConfig = Config{ - SpacesWidth: 2, -} - -// A Config node controls the output of Fprint. -type Config struct { - SpacesWidth int // if set, it will use spaces instead of tabs for alignment -} - -func (c *Config) Fprint(output io.Writer, node ast.Node) error { - p := &printer{ - cfg: *c, - comments: make([]*ast.CommentGroup, 0), - standaloneComments: make([]*ast.CommentGroup, 0), - // enableTrace: true, - } - - p.collectComments(node) - - if _, err := output.Write(p.unindent(p.output(node))); err != nil { - return err - } - - // flush tabwriter, if any - var err error - if tw, _ := output.(*tabwriter.Writer); tw != nil { - err = tw.Flush() - } - - return err -} - -// Fprint "pretty-prints" an HCL node to output -// It calls Config.Fprint with default settings. -func Fprint(output io.Writer, node ast.Node) error { - return DefaultConfig.Fprint(output, node) -} - -// Format formats src HCL and returns the result. -func Format(src []byte) ([]byte, error) { - node, err := parser.Parse(src) - if err != nil { - return nil, err - } - - var buf bytes.Buffer - if err := DefaultConfig.Fprint(&buf, node); err != nil { - return nil, err - } - - // Add trailing newline to result - buf.WriteString("\n") - return buf.Bytes(), nil -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go b/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go deleted file mode 100644 index 624a18f..0000000 --- a/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go +++ /dev/null @@ -1,652 +0,0 @@ -// Package scanner implements a scanner for HCL (HashiCorp Configuration -// Language) source text. -package scanner - -import ( - "bytes" - "fmt" - "os" - "regexp" - "unicode" - "unicode/utf8" - - "github.com/hashicorp/hcl/hcl/token" -) - -// eof represents a marker rune for the end of the reader. -const eof = rune(0) - -// Scanner defines a lexical scanner -type Scanner struct { - buf *bytes.Buffer // Source buffer for advancing and scanning - src []byte // Source buffer for immutable access - - // Source Position - srcPos token.Pos // current position - prevPos token.Pos // previous position, used for peek() method - - lastCharLen int // length of last character in bytes - lastLineLen int // length of last line in characters (for correct column reporting) - - tokStart int // token text start position - tokEnd int // token text end position - - // Error is called for each error encountered. If no Error - // function is set, the error is reported to os.Stderr. - Error func(pos token.Pos, msg string) - - // ErrorCount is incremented by one for each error encountered. - ErrorCount int - - // tokPos is the start position of most recently scanned token; set by - // Scan. The Filename field is always left untouched by the Scanner. If - // an error is reported (via Error) and Position is invalid, the scanner is - // not inside a token. - tokPos token.Pos -} - -// New creates and initializes a new instance of Scanner using src as -// its source content. -func New(src []byte) *Scanner { - // even though we accept a src, we read from a io.Reader compatible type - // (*bytes.Buffer). So in the future we might easily change it to streaming - // read. - b := bytes.NewBuffer(src) - s := &Scanner{ - buf: b, - src: src, - } - - // srcPosition always starts with 1 - s.srcPos.Line = 1 - return s -} - -// next reads the next rune from the bufferred reader. Returns the rune(0) if -// an error occurs (or io.EOF is returned). -func (s *Scanner) next() rune { - ch, size, err := s.buf.ReadRune() - if err != nil { - // advance for error reporting - s.srcPos.Column++ - s.srcPos.Offset += size - s.lastCharLen = size - return eof - } - - // remember last position - s.prevPos = s.srcPos - - s.srcPos.Column++ - s.lastCharLen = size - s.srcPos.Offset += size - - if ch == utf8.RuneError && size == 1 { - s.err("illegal UTF-8 encoding") - return ch - } - - if ch == '\n' { - s.srcPos.Line++ - s.lastLineLen = s.srcPos.Column - s.srcPos.Column = 0 - } - - if ch == '\x00' { - s.err("unexpected null character (0x00)") - return eof - } - - if ch == '\uE123' { - s.err("unicode code point U+E123 reserved for internal use") - return utf8.RuneError - } - - // debug - // fmt.Printf("ch: %q, offset:column: %d:%d\n", ch, s.srcPos.Offset, s.srcPos.Column) - return ch -} - -// unread unreads the previous read Rune and updates the source position -func (s *Scanner) unread() { - if err := s.buf.UnreadRune(); err != nil { - panic(err) // this is user fault, we should catch it - } - s.srcPos = s.prevPos // put back last position -} - -// peek returns the next rune without advancing the reader. -func (s *Scanner) peek() rune { - peek, _, err := s.buf.ReadRune() - if err != nil { - return eof - } - - s.buf.UnreadRune() - return peek -} - -// Scan scans the next token and returns the token. -func (s *Scanner) Scan() token.Token { - ch := s.next() - - // skip white space - for isWhitespace(ch) { - ch = s.next() - } - - var tok token.Type - - // token text markings - s.tokStart = s.srcPos.Offset - s.lastCharLen - - // token position, initial next() is moving the offset by one(size of rune - // actually), though we are interested with the starting point - s.tokPos.Offset = s.srcPos.Offset - s.lastCharLen - if s.srcPos.Column > 0 { - // common case: last character was not a '\n' - s.tokPos.Line = s.srcPos.Line - s.tokPos.Column = s.srcPos.Column - } else { - // last character was a '\n' - // (we cannot be at the beginning of the source - // since we have called next() at least once) - s.tokPos.Line = s.srcPos.Line - 1 - s.tokPos.Column = s.lastLineLen - } - - switch { - case isLetter(ch): - tok = token.IDENT - lit := s.scanIdentifier() - if lit == "true" || lit == "false" { - tok = token.BOOL - } - case isDecimal(ch): - tok = s.scanNumber(ch) - default: - switch ch { - case eof: - tok = token.EOF - case '"': - tok = token.STRING - s.scanString() - case '#', '/': - tok = token.COMMENT - s.scanComment(ch) - case '.': - tok = token.PERIOD - ch = s.peek() - if isDecimal(ch) { - tok = token.FLOAT - ch = s.scanMantissa(ch) - ch = s.scanExponent(ch) - } - case '<': - tok = token.HEREDOC - s.scanHeredoc() - case '[': - tok = token.LBRACK - case ']': - tok = token.RBRACK - case '{': - tok = token.LBRACE - case '}': - tok = token.RBRACE - case ',': - tok = token.COMMA - case '=': - tok = token.ASSIGN - case '+': - tok = token.ADD - case '-': - if isDecimal(s.peek()) { - ch := s.next() - tok = s.scanNumber(ch) - } else { - tok = token.SUB - } - default: - s.err("illegal char") - } - } - - // finish token ending - s.tokEnd = s.srcPos.Offset - - // create token literal - var tokenText string - if s.tokStart >= 0 { - tokenText = string(s.src[s.tokStart:s.tokEnd]) - } - s.tokStart = s.tokEnd // ensure idempotency of tokenText() call - - return token.Token{ - Type: tok, - Pos: s.tokPos, - Text: tokenText, - } -} - -func (s *Scanner) scanComment(ch rune) { - // single line comments - if ch == '#' || (ch == '/' && s.peek() != '*') { - if ch == '/' && s.peek() != '/' { - s.err("expected '/' for comment") - return - } - - ch = s.next() - for ch != '\n' && ch >= 0 && ch != eof { - ch = s.next() - } - if ch != eof && ch >= 0 { - s.unread() - } - return - } - - // be sure we get the character after /* This allows us to find comment's - // that are not erminated - if ch == '/' { - s.next() - ch = s.next() // read character after "/*" - } - - // look for /* - style comments - for { - if ch < 0 || ch == eof { - s.err("comment not terminated") - break - } - - ch0 := ch - ch = s.next() - if ch0 == '*' && ch == '/' { - break - } - } -} - -// scanNumber scans a HCL number definition starting with the given rune -func (s *Scanner) scanNumber(ch rune) token.Type { - if ch == '0' { - // check for hexadecimal, octal or float - ch = s.next() - if ch == 'x' || ch == 'X' { - // hexadecimal - ch = s.next() - found := false - for isHexadecimal(ch) { - ch = s.next() - found = true - } - - if !found { - s.err("illegal hexadecimal number") - } - - if ch != eof { - s.unread() - } - - return token.NUMBER - } - - // now it's either something like: 0421(octal) or 0.1231(float) - illegalOctal := false - for isDecimal(ch) { - ch = s.next() - if ch == '8' || ch == '9' { - // this is just a possibility. For example 0159 is illegal, but - // 0159.23 is valid. So we mark a possible illegal octal. If - // the next character is not a period, we'll print the error. - illegalOctal = true - } - } - - if ch == 'e' || ch == 'E' { - ch = s.scanExponent(ch) - return token.FLOAT - } - - if ch == '.' { - ch = s.scanFraction(ch) - - if ch == 'e' || ch == 'E' { - ch = s.next() - ch = s.scanExponent(ch) - } - return token.FLOAT - } - - if illegalOctal { - s.err("illegal octal number") - } - - if ch != eof { - s.unread() - } - return token.NUMBER - } - - s.scanMantissa(ch) - ch = s.next() // seek forward - if ch == 'e' || ch == 'E' { - ch = s.scanExponent(ch) - return token.FLOAT - } - - if ch == '.' { - ch = s.scanFraction(ch) - if ch == 'e' || ch == 'E' { - ch = s.next() - ch = s.scanExponent(ch) - } - return token.FLOAT - } - - if ch != eof { - s.unread() - } - return token.NUMBER -} - -// scanMantissa scans the mantissa beginning from the rune. It returns the next -// non decimal rune. It's used to determine wheter it's a fraction or exponent. -func (s *Scanner) scanMantissa(ch rune) rune { - scanned := false - for isDecimal(ch) { - ch = s.next() - scanned = true - } - - if scanned && ch != eof { - s.unread() - } - return ch -} - -// scanFraction scans the fraction after the '.' rune -func (s *Scanner) scanFraction(ch rune) rune { - if ch == '.' { - ch = s.peek() // we peek just to see if we can move forward - ch = s.scanMantissa(ch) - } - return ch -} - -// scanExponent scans the remaining parts of an exponent after the 'e' or 'E' -// rune. -func (s *Scanner) scanExponent(ch rune) rune { - if ch == 'e' || ch == 'E' { - ch = s.next() - if ch == '-' || ch == '+' { - ch = s.next() - } - ch = s.scanMantissa(ch) - } - return ch -} - -// scanHeredoc scans a heredoc string -func (s *Scanner) scanHeredoc() { - // Scan the second '<' in example: '<= len(identBytes) && identRegexp.Match(s.src[lineStart:s.srcPos.Offset-s.lastCharLen]) { - break - } - - // Not an anchor match, record the start of a new line - lineStart = s.srcPos.Offset - } - - if ch == eof { - s.err("heredoc not terminated") - return - } - } - - return -} - -// scanString scans a quoted string -func (s *Scanner) scanString() { - braces := 0 - for { - // '"' opening already consumed - // read character after quote - ch := s.next() - - if (ch == '\n' && braces == 0) || ch < 0 || ch == eof { - s.err("literal not terminated") - return - } - - if ch == '"' && braces == 0 { - break - } - - // If we're going into a ${} then we can ignore quotes for awhile - if braces == 0 && ch == '$' && s.peek() == '{' { - braces++ - s.next() - } else if braces > 0 && ch == '{' { - braces++ - } - if braces > 0 && ch == '}' { - braces-- - } - - if ch == '\\' { - s.scanEscape() - } - } - - return -} - -// scanEscape scans an escape sequence -func (s *Scanner) scanEscape() rune { - // http://en.cppreference.com/w/cpp/language/escape - ch := s.next() // read character after '/' - switch ch { - case 'a', 'b', 'f', 'n', 'r', 't', 'v', '\\', '"': - // nothing to do - case '0', '1', '2', '3', '4', '5', '6', '7': - // octal notation - ch = s.scanDigits(ch, 8, 3) - case 'x': - // hexademical notation - ch = s.scanDigits(s.next(), 16, 2) - case 'u': - // universal character name - ch = s.scanDigits(s.next(), 16, 4) - case 'U': - // universal character name - ch = s.scanDigits(s.next(), 16, 8) - default: - s.err("illegal char escape") - } - return ch -} - -// scanDigits scans a rune with the given base for n times. For example an -// octal notation \184 would yield in scanDigits(ch, 8, 3) -func (s *Scanner) scanDigits(ch rune, base, n int) rune { - start := n - for n > 0 && digitVal(ch) < base { - ch = s.next() - if ch == eof { - // If we see an EOF, we halt any more scanning of digits - // immediately. - break - } - - n-- - } - if n > 0 { - s.err("illegal char escape") - } - - if n != start && ch != eof { - // we scanned all digits, put the last non digit char back, - // only if we read anything at all - s.unread() - } - - return ch -} - -// scanIdentifier scans an identifier and returns the literal string -func (s *Scanner) scanIdentifier() string { - offs := s.srcPos.Offset - s.lastCharLen - ch := s.next() - for isLetter(ch) || isDigit(ch) || ch == '-' || ch == '.' { - ch = s.next() - } - - if ch != eof { - s.unread() // we got identifier, put back latest char - } - - return string(s.src[offs:s.srcPos.Offset]) -} - -// recentPosition returns the position of the character immediately after the -// character or token returned by the last call to Scan. -func (s *Scanner) recentPosition() (pos token.Pos) { - pos.Offset = s.srcPos.Offset - s.lastCharLen - switch { - case s.srcPos.Column > 0: - // common case: last character was not a '\n' - pos.Line = s.srcPos.Line - pos.Column = s.srcPos.Column - case s.lastLineLen > 0: - // last character was a '\n' - // (we cannot be at the beginning of the source - // since we have called next() at least once) - pos.Line = s.srcPos.Line - 1 - pos.Column = s.lastLineLen - default: - // at the beginning of the source - pos.Line = 1 - pos.Column = 1 - } - return -} - -// err prints the error of any scanning to s.Error function. If the function is -// not defined, by default it prints them to os.Stderr -func (s *Scanner) err(msg string) { - s.ErrorCount++ - pos := s.recentPosition() - - if s.Error != nil { - s.Error(pos, msg) - return - } - - fmt.Fprintf(os.Stderr, "%s: %s\n", pos, msg) -} - -// isHexadecimal returns true if the given rune is a letter -func isLetter(ch rune) bool { - return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch == '_' || ch >= 0x80 && unicode.IsLetter(ch) -} - -// isDigit returns true if the given rune is a decimal digit -func isDigit(ch rune) bool { - return '0' <= ch && ch <= '9' || ch >= 0x80 && unicode.IsDigit(ch) -} - -// isDecimal returns true if the given rune is a decimal number -func isDecimal(ch rune) bool { - return '0' <= ch && ch <= '9' -} - -// isHexadecimal returns true if the given rune is an hexadecimal number -func isHexadecimal(ch rune) bool { - return '0' <= ch && ch <= '9' || 'a' <= ch && ch <= 'f' || 'A' <= ch && ch <= 'F' -} - -// isWhitespace returns true if the rune is a space, tab, newline or carriage return -func isWhitespace(ch rune) bool { - return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' -} - -// digitVal returns the integer value of a given octal,decimal or hexadecimal rune -func digitVal(ch rune) int { - switch { - case '0' <= ch && ch <= '9': - return int(ch - '0') - case 'a' <= ch && ch <= 'f': - return int(ch - 'a' + 10) - case 'A' <= ch && ch <= 'F': - return int(ch - 'A' + 10) - } - return 16 // larger than any legal digit val -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go b/vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go deleted file mode 100644 index 5f981ea..0000000 --- a/vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go +++ /dev/null @@ -1,241 +0,0 @@ -package strconv - -import ( - "errors" - "unicode/utf8" -) - -// ErrSyntax indicates that a value does not have the right syntax for the target type. -var ErrSyntax = errors.New("invalid syntax") - -// Unquote interprets s as a single-quoted, double-quoted, -// or backquoted Go string literal, returning the string value -// that s quotes. (If s is single-quoted, it would be a Go -// character literal; Unquote returns the corresponding -// one-character string.) -func Unquote(s string) (t string, err error) { - n := len(s) - if n < 2 { - return "", ErrSyntax - } - quote := s[0] - if quote != s[n-1] { - return "", ErrSyntax - } - s = s[1 : n-1] - - if quote != '"' { - return "", ErrSyntax - } - if !contains(s, '$') && !contains(s, '{') && contains(s, '\n') { - return "", ErrSyntax - } - - // Is it trivial? Avoid allocation. - if !contains(s, '\\') && !contains(s, quote) && !contains(s, '$') { - switch quote { - case '"': - return s, nil - case '\'': - r, size := utf8.DecodeRuneInString(s) - if size == len(s) && (r != utf8.RuneError || size != 1) { - return s, nil - } - } - } - - var runeTmp [utf8.UTFMax]byte - buf := make([]byte, 0, 3*len(s)/2) // Try to avoid more allocations. - for len(s) > 0 { - // If we're starting a '${}' then let it through un-unquoted. - // Specifically: we don't unquote any characters within the `${}` - // section. - if s[0] == '$' && len(s) > 1 && s[1] == '{' { - buf = append(buf, '$', '{') - s = s[2:] - - // Continue reading until we find the closing brace, copying as-is - braces := 1 - for len(s) > 0 && braces > 0 { - r, size := utf8.DecodeRuneInString(s) - if r == utf8.RuneError { - return "", ErrSyntax - } - - s = s[size:] - - n := utf8.EncodeRune(runeTmp[:], r) - buf = append(buf, runeTmp[:n]...) - - switch r { - case '{': - braces++ - case '}': - braces-- - } - } - if braces != 0 { - return "", ErrSyntax - } - if len(s) == 0 { - // If there's no string left, we're done! - break - } else { - // If there's more left, we need to pop back up to the top of the loop - // in case there's another interpolation in this string. - continue - } - } - - if s[0] == '\n' { - return "", ErrSyntax - } - - c, multibyte, ss, err := unquoteChar(s, quote) - if err != nil { - return "", err - } - s = ss - if c < utf8.RuneSelf || !multibyte { - buf = append(buf, byte(c)) - } else { - n := utf8.EncodeRune(runeTmp[:], c) - buf = append(buf, runeTmp[:n]...) - } - if quote == '\'' && len(s) != 0 { - // single-quoted must be single character - return "", ErrSyntax - } - } - return string(buf), nil -} - -// contains reports whether the string contains the byte c. -func contains(s string, c byte) bool { - for i := 0; i < len(s); i++ { - if s[i] == c { - return true - } - } - return false -} - -func unhex(b byte) (v rune, ok bool) { - c := rune(b) - switch { - case '0' <= c && c <= '9': - return c - '0', true - case 'a' <= c && c <= 'f': - return c - 'a' + 10, true - case 'A' <= c && c <= 'F': - return c - 'A' + 10, true - } - return -} - -func unquoteChar(s string, quote byte) (value rune, multibyte bool, tail string, err error) { - // easy cases - switch c := s[0]; { - case c == quote && (quote == '\'' || quote == '"'): - err = ErrSyntax - return - case c >= utf8.RuneSelf: - r, size := utf8.DecodeRuneInString(s) - return r, true, s[size:], nil - case c != '\\': - return rune(s[0]), false, s[1:], nil - } - - // hard case: c is backslash - if len(s) <= 1 { - err = ErrSyntax - return - } - c := s[1] - s = s[2:] - - switch c { - case 'a': - value = '\a' - case 'b': - value = '\b' - case 'f': - value = '\f' - case 'n': - value = '\n' - case 'r': - value = '\r' - case 't': - value = '\t' - case 'v': - value = '\v' - case 'x', 'u', 'U': - n := 0 - switch c { - case 'x': - n = 2 - case 'u': - n = 4 - case 'U': - n = 8 - } - var v rune - if len(s) < n { - err = ErrSyntax - return - } - for j := 0; j < n; j++ { - x, ok := unhex(s[j]) - if !ok { - err = ErrSyntax - return - } - v = v<<4 | x - } - s = s[n:] - if c == 'x' { - // single-byte string, possibly not UTF-8 - value = v - break - } - if v > utf8.MaxRune { - err = ErrSyntax - return - } - value = v - multibyte = true - case '0', '1', '2', '3', '4', '5', '6', '7': - v := rune(c) - '0' - if len(s) < 2 { - err = ErrSyntax - return - } - for j := 0; j < 2; j++ { // one digit already; two more - x := rune(s[j]) - '0' - if x < 0 || x > 7 { - err = ErrSyntax - return - } - v = (v << 3) | x - } - s = s[2:] - if v > 255 { - err = ErrSyntax - return - } - value = v - case '\\': - value = '\\' - case '\'', '"': - if c != quote { - err = ErrSyntax - return - } - value = rune(c) - default: - err = ErrSyntax - return - } - tail = s - return -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/token/position.go b/vendor/github.com/hashicorp/hcl/hcl/token/position.go deleted file mode 100644 index 59c1bb7..0000000 --- a/vendor/github.com/hashicorp/hcl/hcl/token/position.go +++ /dev/null @@ -1,46 +0,0 @@ -package token - -import "fmt" - -// Pos describes an arbitrary source position -// including the file, line, and column location. -// A Position is valid if the line number is > 0. -type Pos struct { - Filename string // filename, if any - Offset int // offset, starting at 0 - Line int // line number, starting at 1 - Column int // column number, starting at 1 (character count) -} - -// IsValid returns true if the position is valid. -func (p *Pos) IsValid() bool { return p.Line > 0 } - -// String returns a string in one of several forms: -// -// file:line:column valid position with file name -// line:column valid position without file name -// file invalid position with file name -// - invalid position without file name -func (p Pos) String() string { - s := p.Filename - if p.IsValid() { - if s != "" { - s += ":" - } - s += fmt.Sprintf("%d:%d", p.Line, p.Column) - } - if s == "" { - s = "-" - } - return s -} - -// Before reports whether the position p is before u. -func (p Pos) Before(u Pos) bool { - return u.Offset > p.Offset || u.Line > p.Line -} - -// After reports whether the position p is after u. -func (p Pos) After(u Pos) bool { - return u.Offset < p.Offset || u.Line < p.Line -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/token/token.go b/vendor/github.com/hashicorp/hcl/hcl/token/token.go deleted file mode 100644 index e37c066..0000000 --- a/vendor/github.com/hashicorp/hcl/hcl/token/token.go +++ /dev/null @@ -1,219 +0,0 @@ -// Package token defines constants representing the lexical tokens for HCL -// (HashiCorp Configuration Language) -package token - -import ( - "fmt" - "strconv" - "strings" - - hclstrconv "github.com/hashicorp/hcl/hcl/strconv" -) - -// Token defines a single HCL token which can be obtained via the Scanner -type Token struct { - Type Type - Pos Pos - Text string - JSON bool -} - -// Type is the set of lexical tokens of the HCL (HashiCorp Configuration Language) -type Type int - -const ( - // Special tokens - ILLEGAL Type = iota - EOF - COMMENT - - identifier_beg - IDENT // literals - literal_beg - NUMBER // 12345 - FLOAT // 123.45 - BOOL // true,false - STRING // "abc" - HEREDOC // < 0 { - // Pop the current item - n := len(frontier) - item := frontier[n-1] - frontier = frontier[:n-1] - - switch v := item.Val.(type) { - case *ast.ObjectType: - items, frontier = flattenObjectType(v, item, items, frontier) - case *ast.ListType: - items, frontier = flattenListType(v, item, items, frontier) - default: - items = append(items, item) - } - } - - // Reverse the list since the frontier model runs things backwards - for i := len(items)/2 - 1; i >= 0; i-- { - opp := len(items) - 1 - i - items[i], items[opp] = items[opp], items[i] - } - - // Done! Set the original items - list.Items = items - return n, true - }) -} - -func flattenListType( - ot *ast.ListType, - item *ast.ObjectItem, - items []*ast.ObjectItem, - frontier []*ast.ObjectItem) ([]*ast.ObjectItem, []*ast.ObjectItem) { - // If the list is empty, keep the original list - if len(ot.List) == 0 { - items = append(items, item) - return items, frontier - } - - // All the elements of this object must also be objects! - for _, subitem := range ot.List { - if _, ok := subitem.(*ast.ObjectType); !ok { - items = append(items, item) - return items, frontier - } - } - - // Great! We have a match go through all the items and flatten - for _, elem := range ot.List { - // Add it to the frontier so that we can recurse - frontier = append(frontier, &ast.ObjectItem{ - Keys: item.Keys, - Assign: item.Assign, - Val: elem, - LeadComment: item.LeadComment, - LineComment: item.LineComment, - }) - } - - return items, frontier -} - -func flattenObjectType( - ot *ast.ObjectType, - item *ast.ObjectItem, - items []*ast.ObjectItem, - frontier []*ast.ObjectItem) ([]*ast.ObjectItem, []*ast.ObjectItem) { - // If the list has no items we do not have to flatten anything - if ot.List.Items == nil { - items = append(items, item) - return items, frontier - } - - // All the elements of this object must also be objects! - for _, subitem := range ot.List.Items { - if _, ok := subitem.Val.(*ast.ObjectType); !ok { - items = append(items, item) - return items, frontier - } - } - - // Great! We have a match go through all the items and flatten - for _, subitem := range ot.List.Items { - // Copy the new key - keys := make([]*ast.ObjectKey, len(item.Keys)+len(subitem.Keys)) - copy(keys, item.Keys) - copy(keys[len(item.Keys):], subitem.Keys) - - // Add it to the frontier so that we can recurse - frontier = append(frontier, &ast.ObjectItem{ - Keys: keys, - Assign: item.Assign, - Val: subitem.Val, - LeadComment: item.LeadComment, - LineComment: item.LineComment, - }) - } - - return items, frontier -} diff --git a/vendor/github.com/hashicorp/hcl/json/parser/parser.go b/vendor/github.com/hashicorp/hcl/json/parser/parser.go deleted file mode 100644 index 125a5f0..0000000 --- a/vendor/github.com/hashicorp/hcl/json/parser/parser.go +++ /dev/null @@ -1,313 +0,0 @@ -package parser - -import ( - "errors" - "fmt" - - "github.com/hashicorp/hcl/hcl/ast" - hcltoken "github.com/hashicorp/hcl/hcl/token" - "github.com/hashicorp/hcl/json/scanner" - "github.com/hashicorp/hcl/json/token" -) - -type Parser struct { - sc *scanner.Scanner - - // Last read token - tok token.Token - commaPrev token.Token - - enableTrace bool - indent int - n int // buffer size (max = 1) -} - -func newParser(src []byte) *Parser { - return &Parser{ - sc: scanner.New(src), - } -} - -// Parse returns the fully parsed source and returns the abstract syntax tree. -func Parse(src []byte) (*ast.File, error) { - p := newParser(src) - return p.Parse() -} - -var errEofToken = errors.New("EOF token found") - -// Parse returns the fully parsed source and returns the abstract syntax tree. -func (p *Parser) Parse() (*ast.File, error) { - f := &ast.File{} - var err, scerr error - p.sc.Error = func(pos token.Pos, msg string) { - scerr = fmt.Errorf("%s: %s", pos, msg) - } - - // The root must be an object in JSON - object, err := p.object() - if scerr != nil { - return nil, scerr - } - if err != nil { - return nil, err - } - - // We make our final node an object list so it is more HCL compatible - f.Node = object.List - - // Flatten it, which finds patterns and turns them into more HCL-like - // AST trees. - flattenObjects(f.Node) - - return f, nil -} - -func (p *Parser) objectList() (*ast.ObjectList, error) { - defer un(trace(p, "ParseObjectList")) - node := &ast.ObjectList{} - - for { - n, err := p.objectItem() - if err == errEofToken { - break // we are finished - } - - // we don't return a nil node, because might want to use already - // collected items. - if err != nil { - return node, err - } - - node.Add(n) - - // Check for a followup comma. If it isn't a comma, then we're done - if tok := p.scan(); tok.Type != token.COMMA { - break - } - } - - return node, nil -} - -// objectItem parses a single object item -func (p *Parser) objectItem() (*ast.ObjectItem, error) { - defer un(trace(p, "ParseObjectItem")) - - keys, err := p.objectKey() - if err != nil { - return nil, err - } - - o := &ast.ObjectItem{ - Keys: keys, - } - - switch p.tok.Type { - case token.COLON: - pos := p.tok.Pos - o.Assign = hcltoken.Pos{ - Filename: pos.Filename, - Offset: pos.Offset, - Line: pos.Line, - Column: pos.Column, - } - - o.Val, err = p.objectValue() - if err != nil { - return nil, err - } - } - - return o, nil -} - -// objectKey parses an object key and returns a ObjectKey AST -func (p *Parser) objectKey() ([]*ast.ObjectKey, error) { - keyCount := 0 - keys := make([]*ast.ObjectKey, 0) - - for { - tok := p.scan() - switch tok.Type { - case token.EOF: - return nil, errEofToken - case token.STRING: - keyCount++ - keys = append(keys, &ast.ObjectKey{ - Token: p.tok.HCLToken(), - }) - case token.COLON: - // If we have a zero keycount it means that we never got - // an object key, i.e. `{ :`. This is a syntax error. - if keyCount == 0 { - return nil, fmt.Errorf("expected: STRING got: %s", p.tok.Type) - } - - // Done - return keys, nil - case token.ILLEGAL: - return nil, errors.New("illegal") - default: - return nil, fmt.Errorf("expected: STRING got: %s", p.tok.Type) - } - } -} - -// object parses any type of object, such as number, bool, string, object or -// list. -func (p *Parser) objectValue() (ast.Node, error) { - defer un(trace(p, "ParseObjectValue")) - tok := p.scan() - - switch tok.Type { - case token.NUMBER, token.FLOAT, token.BOOL, token.NULL, token.STRING: - return p.literalType() - case token.LBRACE: - return p.objectType() - case token.LBRACK: - return p.listType() - case token.EOF: - return nil, errEofToken - } - - return nil, fmt.Errorf("Expected object value, got unknown token: %+v", tok) -} - -// object parses any type of object, such as number, bool, string, object or -// list. -func (p *Parser) object() (*ast.ObjectType, error) { - defer un(trace(p, "ParseType")) - tok := p.scan() - - switch tok.Type { - case token.LBRACE: - return p.objectType() - case token.EOF: - return nil, errEofToken - } - - return nil, fmt.Errorf("Expected object, got unknown token: %+v", tok) -} - -// objectType parses an object type and returns a ObjectType AST -func (p *Parser) objectType() (*ast.ObjectType, error) { - defer un(trace(p, "ParseObjectType")) - - // we assume that the currently scanned token is a LBRACE - o := &ast.ObjectType{} - - l, err := p.objectList() - - // if we hit RBRACE, we are good to go (means we parsed all Items), if it's - // not a RBRACE, it's an syntax error and we just return it. - if err != nil && p.tok.Type != token.RBRACE { - return nil, err - } - - o.List = l - return o, nil -} - -// listType parses a list type and returns a ListType AST -func (p *Parser) listType() (*ast.ListType, error) { - defer un(trace(p, "ParseListType")) - - // we assume that the currently scanned token is a LBRACK - l := &ast.ListType{} - - for { - tok := p.scan() - switch tok.Type { - case token.NUMBER, token.FLOAT, token.STRING: - node, err := p.literalType() - if err != nil { - return nil, err - } - - l.Add(node) - case token.COMMA: - continue - case token.LBRACE: - node, err := p.objectType() - if err != nil { - return nil, err - } - - l.Add(node) - case token.BOOL: - // TODO(arslan) should we support? not supported by HCL yet - case token.LBRACK: - // TODO(arslan) should we support nested lists? Even though it's - // written in README of HCL, it's not a part of the grammar - // (not defined in parse.y) - case token.RBRACK: - // finished - return l, nil - default: - return nil, fmt.Errorf("unexpected token while parsing list: %s", tok.Type) - } - - } -} - -// literalType parses a literal type and returns a LiteralType AST -func (p *Parser) literalType() (*ast.LiteralType, error) { - defer un(trace(p, "ParseLiteral")) - - return &ast.LiteralType{ - Token: p.tok.HCLToken(), - }, nil -} - -// scan returns the next token from the underlying scanner. If a token has -// been unscanned then read that instead. -func (p *Parser) scan() token.Token { - // If we have a token on the buffer, then return it. - if p.n != 0 { - p.n = 0 - return p.tok - } - - p.tok = p.sc.Scan() - return p.tok -} - -// unscan pushes the previously read token back onto the buffer. -func (p *Parser) unscan() { - p.n = 1 -} - -// ---------------------------------------------------------------------------- -// Parsing support - -func (p *Parser) printTrace(a ...interface{}) { - if !p.enableTrace { - return - } - - const dots = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " - const n = len(dots) - fmt.Printf("%5d:%3d: ", p.tok.Pos.Line, p.tok.Pos.Column) - - i := 2 * p.indent - for i > n { - fmt.Print(dots) - i -= n - } - // i <= n - fmt.Print(dots[0:i]) - fmt.Println(a...) -} - -func trace(p *Parser, msg string) *Parser { - p.printTrace(msg, "(") - p.indent++ - return p -} - -// Usage pattern: defer un(trace(p, "...")) -func un(p *Parser) { - p.indent-- - p.printTrace(")") -} diff --git a/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go b/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go deleted file mode 100644 index fe3f0f0..0000000 --- a/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go +++ /dev/null @@ -1,451 +0,0 @@ -package scanner - -import ( - "bytes" - "fmt" - "os" - "unicode" - "unicode/utf8" - - "github.com/hashicorp/hcl/json/token" -) - -// eof represents a marker rune for the end of the reader. -const eof = rune(0) - -// Scanner defines a lexical scanner -type Scanner struct { - buf *bytes.Buffer // Source buffer for advancing and scanning - src []byte // Source buffer for immutable access - - // Source Position - srcPos token.Pos // current position - prevPos token.Pos // previous position, used for peek() method - - lastCharLen int // length of last character in bytes - lastLineLen int // length of last line in characters (for correct column reporting) - - tokStart int // token text start position - tokEnd int // token text end position - - // Error is called for each error encountered. If no Error - // function is set, the error is reported to os.Stderr. - Error func(pos token.Pos, msg string) - - // ErrorCount is incremented by one for each error encountered. - ErrorCount int - - // tokPos is the start position of most recently scanned token; set by - // Scan. The Filename field is always left untouched by the Scanner. If - // an error is reported (via Error) and Position is invalid, the scanner is - // not inside a token. - tokPos token.Pos -} - -// New creates and initializes a new instance of Scanner using src as -// its source content. -func New(src []byte) *Scanner { - // even though we accept a src, we read from a io.Reader compatible type - // (*bytes.Buffer). So in the future we might easily change it to streaming - // read. - b := bytes.NewBuffer(src) - s := &Scanner{ - buf: b, - src: src, - } - - // srcPosition always starts with 1 - s.srcPos.Line = 1 - return s -} - -// next reads the next rune from the bufferred reader. Returns the rune(0) if -// an error occurs (or io.EOF is returned). -func (s *Scanner) next() rune { - ch, size, err := s.buf.ReadRune() - if err != nil { - // advance for error reporting - s.srcPos.Column++ - s.srcPos.Offset += size - s.lastCharLen = size - return eof - } - - if ch == utf8.RuneError && size == 1 { - s.srcPos.Column++ - s.srcPos.Offset += size - s.lastCharLen = size - s.err("illegal UTF-8 encoding") - return ch - } - - // remember last position - s.prevPos = s.srcPos - - s.srcPos.Column++ - s.lastCharLen = size - s.srcPos.Offset += size - - if ch == '\n' { - s.srcPos.Line++ - s.lastLineLen = s.srcPos.Column - s.srcPos.Column = 0 - } - - // debug - // fmt.Printf("ch: %q, offset:column: %d:%d\n", ch, s.srcPos.Offset, s.srcPos.Column) - return ch -} - -// unread unreads the previous read Rune and updates the source position -func (s *Scanner) unread() { - if err := s.buf.UnreadRune(); err != nil { - panic(err) // this is user fault, we should catch it - } - s.srcPos = s.prevPos // put back last position -} - -// peek returns the next rune without advancing the reader. -func (s *Scanner) peek() rune { - peek, _, err := s.buf.ReadRune() - if err != nil { - return eof - } - - s.buf.UnreadRune() - return peek -} - -// Scan scans the next token and returns the token. -func (s *Scanner) Scan() token.Token { - ch := s.next() - - // skip white space - for isWhitespace(ch) { - ch = s.next() - } - - var tok token.Type - - // token text markings - s.tokStart = s.srcPos.Offset - s.lastCharLen - - // token position, initial next() is moving the offset by one(size of rune - // actually), though we are interested with the starting point - s.tokPos.Offset = s.srcPos.Offset - s.lastCharLen - if s.srcPos.Column > 0 { - // common case: last character was not a '\n' - s.tokPos.Line = s.srcPos.Line - s.tokPos.Column = s.srcPos.Column - } else { - // last character was a '\n' - // (we cannot be at the beginning of the source - // since we have called next() at least once) - s.tokPos.Line = s.srcPos.Line - 1 - s.tokPos.Column = s.lastLineLen - } - - switch { - case isLetter(ch): - lit := s.scanIdentifier() - if lit == "true" || lit == "false" { - tok = token.BOOL - } else if lit == "null" { - tok = token.NULL - } else { - s.err("illegal char") - } - case isDecimal(ch): - tok = s.scanNumber(ch) - default: - switch ch { - case eof: - tok = token.EOF - case '"': - tok = token.STRING - s.scanString() - case '.': - tok = token.PERIOD - ch = s.peek() - if isDecimal(ch) { - tok = token.FLOAT - ch = s.scanMantissa(ch) - ch = s.scanExponent(ch) - } - case '[': - tok = token.LBRACK - case ']': - tok = token.RBRACK - case '{': - tok = token.LBRACE - case '}': - tok = token.RBRACE - case ',': - tok = token.COMMA - case ':': - tok = token.COLON - case '-': - if isDecimal(s.peek()) { - ch := s.next() - tok = s.scanNumber(ch) - } else { - s.err("illegal char") - } - default: - s.err("illegal char: " + string(ch)) - } - } - - // finish token ending - s.tokEnd = s.srcPos.Offset - - // create token literal - var tokenText string - if s.tokStart >= 0 { - tokenText = string(s.src[s.tokStart:s.tokEnd]) - } - s.tokStart = s.tokEnd // ensure idempotency of tokenText() call - - return token.Token{ - Type: tok, - Pos: s.tokPos, - Text: tokenText, - } -} - -// scanNumber scans a HCL number definition starting with the given rune -func (s *Scanner) scanNumber(ch rune) token.Type { - zero := ch == '0' - pos := s.srcPos - - s.scanMantissa(ch) - ch = s.next() // seek forward - if ch == 'e' || ch == 'E' { - ch = s.scanExponent(ch) - return token.FLOAT - } - - if ch == '.' { - ch = s.scanFraction(ch) - if ch == 'e' || ch == 'E' { - ch = s.next() - ch = s.scanExponent(ch) - } - return token.FLOAT - } - - if ch != eof { - s.unread() - } - - // If we have a larger number and this is zero, error - if zero && pos != s.srcPos { - s.err("numbers cannot start with 0") - } - - return token.NUMBER -} - -// scanMantissa scans the mantissa beginning from the rune. It returns the next -// non decimal rune. It's used to determine wheter it's a fraction or exponent. -func (s *Scanner) scanMantissa(ch rune) rune { - scanned := false - for isDecimal(ch) { - ch = s.next() - scanned = true - } - - if scanned && ch != eof { - s.unread() - } - return ch -} - -// scanFraction scans the fraction after the '.' rune -func (s *Scanner) scanFraction(ch rune) rune { - if ch == '.' { - ch = s.peek() // we peek just to see if we can move forward - ch = s.scanMantissa(ch) - } - return ch -} - -// scanExponent scans the remaining parts of an exponent after the 'e' or 'E' -// rune. -func (s *Scanner) scanExponent(ch rune) rune { - if ch == 'e' || ch == 'E' { - ch = s.next() - if ch == '-' || ch == '+' { - ch = s.next() - } - ch = s.scanMantissa(ch) - } - return ch -} - -// scanString scans a quoted string -func (s *Scanner) scanString() { - braces := 0 - for { - // '"' opening already consumed - // read character after quote - ch := s.next() - - if ch == '\n' || ch < 0 || ch == eof { - s.err("literal not terminated") - return - } - - if ch == '"' { - break - } - - // If we're going into a ${} then we can ignore quotes for awhile - if braces == 0 && ch == '$' && s.peek() == '{' { - braces++ - s.next() - } else if braces > 0 && ch == '{' { - braces++ - } - if braces > 0 && ch == '}' { - braces-- - } - - if ch == '\\' { - s.scanEscape() - } - } - - return -} - -// scanEscape scans an escape sequence -func (s *Scanner) scanEscape() rune { - // http://en.cppreference.com/w/cpp/language/escape - ch := s.next() // read character after '/' - switch ch { - case 'a', 'b', 'f', 'n', 'r', 't', 'v', '\\', '"': - // nothing to do - case '0', '1', '2', '3', '4', '5', '6', '7': - // octal notation - ch = s.scanDigits(ch, 8, 3) - case 'x': - // hexademical notation - ch = s.scanDigits(s.next(), 16, 2) - case 'u': - // universal character name - ch = s.scanDigits(s.next(), 16, 4) - case 'U': - // universal character name - ch = s.scanDigits(s.next(), 16, 8) - default: - s.err("illegal char escape") - } - return ch -} - -// scanDigits scans a rune with the given base for n times. For example an -// octal notation \184 would yield in scanDigits(ch, 8, 3) -func (s *Scanner) scanDigits(ch rune, base, n int) rune { - for n > 0 && digitVal(ch) < base { - ch = s.next() - n-- - } - if n > 0 { - s.err("illegal char escape") - } - - // we scanned all digits, put the last non digit char back - s.unread() - return ch -} - -// scanIdentifier scans an identifier and returns the literal string -func (s *Scanner) scanIdentifier() string { - offs := s.srcPos.Offset - s.lastCharLen - ch := s.next() - for isLetter(ch) || isDigit(ch) || ch == '-' { - ch = s.next() - } - - if ch != eof { - s.unread() // we got identifier, put back latest char - } - - return string(s.src[offs:s.srcPos.Offset]) -} - -// recentPosition returns the position of the character immediately after the -// character or token returned by the last call to Scan. -func (s *Scanner) recentPosition() (pos token.Pos) { - pos.Offset = s.srcPos.Offset - s.lastCharLen - switch { - case s.srcPos.Column > 0: - // common case: last character was not a '\n' - pos.Line = s.srcPos.Line - pos.Column = s.srcPos.Column - case s.lastLineLen > 0: - // last character was a '\n' - // (we cannot be at the beginning of the source - // since we have called next() at least once) - pos.Line = s.srcPos.Line - 1 - pos.Column = s.lastLineLen - default: - // at the beginning of the source - pos.Line = 1 - pos.Column = 1 - } - return -} - -// err prints the error of any scanning to s.Error function. If the function is -// not defined, by default it prints them to os.Stderr -func (s *Scanner) err(msg string) { - s.ErrorCount++ - pos := s.recentPosition() - - if s.Error != nil { - s.Error(pos, msg) - return - } - - fmt.Fprintf(os.Stderr, "%s: %s\n", pos, msg) -} - -// isHexadecimal returns true if the given rune is a letter -func isLetter(ch rune) bool { - return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch == '_' || ch >= 0x80 && unicode.IsLetter(ch) -} - -// isHexadecimal returns true if the given rune is a decimal digit -func isDigit(ch rune) bool { - return '0' <= ch && ch <= '9' || ch >= 0x80 && unicode.IsDigit(ch) -} - -// isHexadecimal returns true if the given rune is a decimal number -func isDecimal(ch rune) bool { - return '0' <= ch && ch <= '9' -} - -// isHexadecimal returns true if the given rune is an hexadecimal number -func isHexadecimal(ch rune) bool { - return '0' <= ch && ch <= '9' || 'a' <= ch && ch <= 'f' || 'A' <= ch && ch <= 'F' -} - -// isWhitespace returns true if the rune is a space, tab, newline or carriage return -func isWhitespace(ch rune) bool { - return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' -} - -// digitVal returns the integer value of a given octal,decimal or hexadecimal rune -func digitVal(ch rune) int { - switch { - case '0' <= ch && ch <= '9': - return int(ch - '0') - case 'a' <= ch && ch <= 'f': - return int(ch - 'a' + 10) - case 'A' <= ch && ch <= 'F': - return int(ch - 'A' + 10) - } - return 16 // larger than any legal digit val -} diff --git a/vendor/github.com/hashicorp/hcl/json/token/position.go b/vendor/github.com/hashicorp/hcl/json/token/position.go deleted file mode 100644 index 59c1bb7..0000000 --- a/vendor/github.com/hashicorp/hcl/json/token/position.go +++ /dev/null @@ -1,46 +0,0 @@ -package token - -import "fmt" - -// Pos describes an arbitrary source position -// including the file, line, and column location. -// A Position is valid if the line number is > 0. -type Pos struct { - Filename string // filename, if any - Offset int // offset, starting at 0 - Line int // line number, starting at 1 - Column int // column number, starting at 1 (character count) -} - -// IsValid returns true if the position is valid. -func (p *Pos) IsValid() bool { return p.Line > 0 } - -// String returns a string in one of several forms: -// -// file:line:column valid position with file name -// line:column valid position without file name -// file invalid position with file name -// - invalid position without file name -func (p Pos) String() string { - s := p.Filename - if p.IsValid() { - if s != "" { - s += ":" - } - s += fmt.Sprintf("%d:%d", p.Line, p.Column) - } - if s == "" { - s = "-" - } - return s -} - -// Before reports whether the position p is before u. -func (p Pos) Before(u Pos) bool { - return u.Offset > p.Offset || u.Line > p.Line -} - -// After reports whether the position p is after u. -func (p Pos) After(u Pos) bool { - return u.Offset < p.Offset || u.Line < p.Line -} diff --git a/vendor/github.com/hashicorp/hcl/json/token/token.go b/vendor/github.com/hashicorp/hcl/json/token/token.go deleted file mode 100644 index 95a0c3e..0000000 --- a/vendor/github.com/hashicorp/hcl/json/token/token.go +++ /dev/null @@ -1,118 +0,0 @@ -package token - -import ( - "fmt" - "strconv" - - hcltoken "github.com/hashicorp/hcl/hcl/token" -) - -// Token defines a single HCL token which can be obtained via the Scanner -type Token struct { - Type Type - Pos Pos - Text string -} - -// Type is the set of lexical tokens of the HCL (HashiCorp Configuration Language) -type Type int - -const ( - // Special tokens - ILLEGAL Type = iota - EOF - - identifier_beg - literal_beg - NUMBER // 12345 - FLOAT // 123.45 - BOOL // true,false - STRING // "abc" - NULL // null - literal_end - identifier_end - - operator_beg - LBRACK // [ - LBRACE // { - COMMA // , - PERIOD // . - COLON // : - - RBRACK // ] - RBRACE // } - - operator_end -) - -var tokens = [...]string{ - ILLEGAL: "ILLEGAL", - - EOF: "EOF", - - NUMBER: "NUMBER", - FLOAT: "FLOAT", - BOOL: "BOOL", - STRING: "STRING", - NULL: "NULL", - - LBRACK: "LBRACK", - LBRACE: "LBRACE", - COMMA: "COMMA", - PERIOD: "PERIOD", - COLON: "COLON", - - RBRACK: "RBRACK", - RBRACE: "RBRACE", -} - -// String returns the string corresponding to the token tok. -func (t Type) String() string { - s := "" - if 0 <= t && t < Type(len(tokens)) { - s = tokens[t] - } - if s == "" { - s = "token(" + strconv.Itoa(int(t)) + ")" - } - return s -} - -// IsIdentifier returns true for tokens corresponding to identifiers and basic -// type literals; it returns false otherwise. -func (t Type) IsIdentifier() bool { return identifier_beg < t && t < identifier_end } - -// IsLiteral returns true for tokens corresponding to basic type literals; it -// returns false otherwise. -func (t Type) IsLiteral() bool { return literal_beg < t && t < literal_end } - -// IsOperator returns true for tokens corresponding to operators and -// delimiters; it returns false otherwise. -func (t Type) IsOperator() bool { return operator_beg < t && t < operator_end } - -// String returns the token's literal text. Note that this is only -// applicable for certain token types, such as token.IDENT, -// token.STRING, etc.. -func (t Token) String() string { - return fmt.Sprintf("%s %s %s", t.Pos.String(), t.Type.String(), t.Text) -} - -// HCLToken converts this token to an HCL token. -// -// The token type must be a literal type or this will panic. -func (t Token) HCLToken() hcltoken.Token { - switch t.Type { - case BOOL: - return hcltoken.Token{Type: hcltoken.BOOL, Text: t.Text} - case FLOAT: - return hcltoken.Token{Type: hcltoken.FLOAT, Text: t.Text} - case NULL: - return hcltoken.Token{Type: hcltoken.STRING, Text: ""} - case NUMBER: - return hcltoken.Token{Type: hcltoken.NUMBER, Text: t.Text} - case STRING: - return hcltoken.Token{Type: hcltoken.STRING, Text: t.Text, JSON: true} - default: - panic(fmt.Sprintf("unimplemented HCLToken for type: %s", t.Type)) - } -} diff --git a/vendor/github.com/hashicorp/hcl/lex.go b/vendor/github.com/hashicorp/hcl/lex.go deleted file mode 100644 index d9993c2..0000000 --- a/vendor/github.com/hashicorp/hcl/lex.go +++ /dev/null @@ -1,38 +0,0 @@ -package hcl - -import ( - "unicode" - "unicode/utf8" -) - -type lexModeValue byte - -const ( - lexModeUnknown lexModeValue = iota - lexModeHcl - lexModeJson -) - -// lexMode returns whether we're going to be parsing in JSON -// mode or HCL mode. -func lexMode(v []byte) lexModeValue { - var ( - r rune - w int - offset int - ) - - for { - r, w = utf8.DecodeRune(v[offset:]) - offset += w - if unicode.IsSpace(r) { - continue - } - if r == '{' { - return lexModeJson - } - break - } - - return lexModeHcl -} diff --git a/vendor/github.com/hashicorp/hcl/parse.go b/vendor/github.com/hashicorp/hcl/parse.go deleted file mode 100644 index 1fca53c..0000000 --- a/vendor/github.com/hashicorp/hcl/parse.go +++ /dev/null @@ -1,39 +0,0 @@ -package hcl - -import ( - "fmt" - - "github.com/hashicorp/hcl/hcl/ast" - hclParser "github.com/hashicorp/hcl/hcl/parser" - jsonParser "github.com/hashicorp/hcl/json/parser" -) - -// ParseBytes accepts as input byte slice and returns ast tree. -// -// Input can be either JSON or HCL -func ParseBytes(in []byte) (*ast.File, error) { - return parse(in) -} - -// ParseString accepts input as a string and returns ast tree. -func ParseString(input string) (*ast.File, error) { - return parse([]byte(input)) -} - -func parse(in []byte) (*ast.File, error) { - switch lexMode(in) { - case lexModeHcl: - return hclParser.Parse(in) - case lexModeJson: - return jsonParser.Parse(in) - } - - return nil, fmt.Errorf("unknown config format") -} - -// Parse parses the given input and returns the root object. -// -// The input format can be either HCL or JSON. -func Parse(input string) (*ast.File, error) { - return parse([]byte(input)) -} diff --git a/vendor/github.com/hebl/gofa/LICENSE b/vendor/github.com/hebl/gofa/LICENSE deleted file mode 100644 index a71b615..0000000 --- a/vendor/github.com/hebl/gofa/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 HE Boliang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/hebl/gofa/README-zh_CN.md b/vendor/github.com/hebl/gofa/README-zh_CN.md deleted file mode 100644 index bde6701..0000000 --- a/vendor/github.com/hebl/gofa/README-zh_CN.md +++ /dev/null @@ -1,85 +0,0 @@ -Go Reference - -[英文](README.md) - -# GoFA (基础天文标准库,Golang standards Of Fundamental Astronomy) - -GoFA 是一个纯Go实现的基础天文计算库,基于国际天文联合会官方的`基础天文标准库`【`Standards Of Fundamental Astronomy (SOFA)`, [http://iausofa.org](http://iausofa.org)】实现。 - -GoFA 开发文档: 。 - -GoFA 当前版本为`v1.19`,与SOFA `v19`([2023-10-11](http://iausofa.org/2023_1011_C/)) -保持同步。 - -官方文档中的示例程序在目录[examples](examples)下。 - -所有的函数已经通过测试,[测试](test)程序参考自`t_sofa_c.c`。 - -## 安装 - -```shell -go get -u github.com/hebl/gofa -``` - -或者 - -```shell -go install github.com/hebl/gofa@latest -``` - -## 函数 - -### 向量/矩阵函数库 [vml.go](vml.go) - -- 初始化 (4) -- 拷贝/扩展等 (5) -- 构建旋转函数 (3) -- 向量操作 (17) -- 矩阵操作 (2) -- 矩阵-向量乘法 (4) -- 旋转向量 (2) - -### 角度计算 [angle.go](angle.go) - -- 球面/笛卡儿坐标转换 (6) -- 球面角距离 (4) -- 角度运算 (8) - -### 天体测量 (38) [astrometry.go](astrometry.go) - -### 日历 (7) [jd.go](jd.go) - -### 时间尺度 (20) [ts.go](ts.go) - -### 坐标系 [coord.go](coord.go) - -- 黄道坐标系 (6) -- 银道坐标系 (2) -- 地平/赤道坐标系 (3) -- 地心坐标与大地坐标转换 (5) - -### 地球转动与恒星时 (15) [erast.go](erast.go) - -### 星历 (3) [ephem.go](ephem.go) - -### 基础参数 (14) [fundargs.go](fundargs.go) - -### 球心投影 (6) [projection.go](projection.go) - -### 岁差/章动/极移 (64) [pn.go](pn.go) - -### 星表转换 (9) [catalog.go](catalog.go) - -## 版本 - -### v1.19 - -Version 1.19 包含有192个天文函数(包括时间、地球转动、恒星时、星历、岁差、岁差/章动、天体测量和坐标转换等),55个向量/矩阵函数。 - -## 许可证 - -- [SOFA License](sofa_copyr.txt) -- [MIT License](LICENSE) - -2023-10-23 - diff --git a/vendor/github.com/hebl/gofa/README.md b/vendor/github.com/hebl/gofa/README.md deleted file mode 100644 index c2441e8..0000000 --- a/vendor/github.com/hebl/gofa/README.md +++ /dev/null @@ -1,85 +0,0 @@ -Go Reference - -[中文](README-zh_CN.md) - -# GoFA (Golang standards Of Fundamental Astronomy) - -GoFA is a pure Golang implementation derived from the International Astronomical -Union's (*IAU*) "`Standards Of Fundamental Astronomy (SOFA)` [http://iausofa.org](http://iausofa.org)" library -official C release. . - -Reference documents are in: - -GoFA Current version is 1.19. It is based on SOFA version `19` ([2023-10-11](http://iausofa.org/2023_1011_C/)). - -Examples in manuals are in the subdirectory: [examples](examples) - -All function are tested. The [test](test) functions are derived from `t_sofa_c.c` . - -## Installation - -```shell -go get -u github.com/hebl/gofa -``` - -or - -```shell -go install github.com/hebl/gofa@latest -``` - -## Functions - -### Vector/Matrix Library [vml.go](vml.go) - -- Initialization (4) -- Copy/Extend/Extract (5) -- Build rotations (3) -- Operations on vectors (17) -- Operations on matrices (2) -- Matrix-vector products (4) -- Rotation vectors (2) - -### Angle [angle.go](angle.go) - -- Spherical/Cartesian conversions (6) -- Separation and position-angle (4) -- Operations on angles (8) - -### Astrometry (38) [astrometry.go](astrometry.go) - -### Calendars (7) [jd.go](jd.go) - -### Time Scales (20) [ts.go](ts.go) - -### Coordinates [coord.go](coord.go) - -- Ecliptic Coordinates (6) -- Galactic Coordinates (2) -- Horizon/Equatorial Coordinates (3) -- Geocentric/Geodetic Transformations (5) - -### Earth Rotation and Sidereal Time (15) [erast.go](erast.go) - -### Ephemerides (3) [ephem.go](ephem.go) - -### Fundamental Arguments (14) [fundargs.go](fundargs.go) - -### Gnomonic Projections (6) [projection.go](projection.go) - -### Precession/Nutation/Polar Motion (64) [pn.go](pn.go) - -### Star Catalog Conversions (9) [catalog.go](catalog.go) - -## Versions - -### v1.19 - -Version 1.19 offers 192 routines for astronomy library (including time scales, earth rotation, sidereal time, precession, nutation, polar motion, ephemerides, astrometry and transforms between various reference systems.), 55 routines for vector/matrix library. - -## License - -- [SOFA License](sofa_copyr.txt) -- [MIT License](LICENSE) - -2023-10-23 diff --git a/vendor/github.com/hebl/gofa/angle.go b/vendor/github.com/hebl/gofa/angle.go deleted file mode 100644 index 7e1c88b..0000000 --- a/vendor/github.com/hebl/gofa/angle.go +++ /dev/null @@ -1,606 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -// Angle - -// Operations on Angles - -/* -Anp Normalize angle into the range 0 <= a < 2pi. - -Given: - a float64 angle (radians) - -Returned (function value): - float64 angle in range 0-2pi -*/ -func Anp(a float64) float64 { - var w float64 - - w = fmod(a, D2PI) - if w < 0 { - w += D2PI - } - - return w - -} - -/* -Anpm Normalize angle into the range -pi <= a < +pi. - -Given: - a float64 angle (radians) - -Returned (function value): - float64 angle in range +/-pi -*/ -func Anpm(a float64) float64 { - var w float64 - - w = fmod(a, D2PI) - if fabs(w) >= DPI { - w -= dsign(D2PI, a) - } - - return w -} - -/* -A2af Decompose radians into degrees, arcminutes, arcseconds, fraction. - -Given: - ndp int resolution (Note 1) - angle float64 angle in radians - -Returned: - sign byte '+' or '-' - idmsf [4]int degrees, arcminutes, arcseconds, fraction - -Notes: - - 1) The argument ndp is interpreted as follows: - - ndp resolution - : ...0000 00 00 - -7 1000 00 00 - -6 100 00 00 - -5 10 00 00 - -4 1 00 00 - -3 0 10 00 - -2 0 01 00 - -1 0 00 10 - 0 0 00 01 - 1 0 00 00.1 - 2 0 00 00.01 - 3 0 00 00.001 - : 0 00 00.000... - - 2) The largest positive useful value for ndp is determined by the - size of angle, the format of float64s on the target platform, and - the risk of overflowing idmsf[3]. On a typical platform, for - angle up to 2pi, the available floating-point precision might - correspond to ndp=12. However, the practical limit is typically - ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is - only 16 bits. - - 3) The absolute value of angle may exceed 2pi. In cases where it - does not, it is up to the caller to test for and handle the - case where angle is very nearly 2pi and rounds up to 360 degrees, - by testing for idmsf[0]=360 and setting idmsf[0-3] to zero. - -Called: - D2tf decompose days to hms - -*/ -func A2af(ndp int, angle float64, sign *byte, idmsf *[4]int) { - /* Hours to degrees * radians to turns */ - F := 15.0 / D2PI - - /* Scale then use days to h,m,s function. */ - D2tf(ndp, angle*F, sign, idmsf) - -} - -/* -A2tf Decompose radians into hours, minutes, seconds, fraction. - -Given: - ndp int resolution (Note 1) - angle float64 angle in radians - -Returned: - sign byte '+' or '-' - ihmsf [4]int hours, minutes, seconds, fraction - -Notes: - - 1) The argument ndp is interpreted as follows: - - ndp resolution - : ...0000 00 00 - -7 1000 00 00 - -6 100 00 00 - -5 10 00 00 - -4 1 00 00 - -3 0 10 00 - -2 0 01 00 - -1 0 00 10 - 0 0 00 01 - 1 0 00 00.1 - 2 0 00 00.01 - 3 0 00 00.001 - : 0 00 00.000... - - 2) The largest positive useful value for ndp is determined by the - size of angle, the format of float64s on the target platform, and - the risk of overflowing ihmsf[3]. On a typical platform, for - angle up to 2pi, the available floating-point precision might - correspond to ndp=12. However, the practical limit is typically - ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is - only 16 bits. - - 3) The absolute value of angle may exceed 2pi. In cases where it - does not, it is up to the caller to test for and handle the - case where angle is very nearly 2pi and rounds up to 24 hours, - by testing for ihmsf[0]=24 and setting ihmsf[0-3] to zero. - -Called: - D2tf decompose days to hms -*/ -func A2tf(ndp int, angle float64, sign *byte, ihmsf *[4]int) { - D2tf(ndp, angle/D2PI, sign, ihmsf) -} - -/* -D2tf Decompose days to hours, minutes, seconds, fraction. - -Given: - ndp int resolution (Note 1) - days float64 interval in days - -Returned: - sign byte '+' or '-' - ihmsf [4]int hours, minutes, seconds, fraction - -Notes: - - 1) The argument ndp is interpreted as follows: - - ndp resolution - : ...0000 00 00 - -7 1000 00 00 - -6 100 00 00 - -5 10 00 00 - -4 1 00 00 - -3 0 10 00 - -2 0 01 00 - -1 0 00 10 - 0 0 00 01 - 1 0 00 00.1 - 2 0 00 00.01 - 3 0 00 00.001 - : 0 00 00.000... - - 2) The largest positive useful value for ndp is determined by the - size of days, the format of float64 on the target platform, and - the risk of overflowing ihmsf[3]. On a typical platform, for - days up to 1.0, the available floating-point precision might - correspond to ndp=12. However, the practical limit is typically - ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is - only 16 bits. - - 3) The absolute value of days may exceed 1.0. In cases where it - does not, it is up to the caller to test for and handle the - case where days is very nearly 1.0 and rounds up to 24 hours, - by testing for ihmsf[0]=24 and setting ihmsf[0-3] to zero. -*/ -func D2tf(ndp int, days float64, sign *byte, ihmsf *[4]int) { - var nrs, n int - var rs, rm, rh, a, w, ah, am, as, af float64 - - /* Handle sign. */ - if days >= 0.0 { - *sign = '+' - - } else { - *sign = '-' - } - - /* Interval in seconds. */ - a = DAYSEC * fabs(days) - - /* Pre-round if resolution coarser than 1s (then pretend ndp=1). */ - if ndp < 0 { - nrs = 1 - for n = 1; n <= -ndp; n++ { - if n == 2 || n == 4 { - nrs *= 6 - } else { - nrs *= 4 - } - - } - rs = float64(nrs) - w = a / rs - a = rs * dnint(w) - } - - /* Express the unit of each field in resolution units. */ - nrs = 1 - for n = 1; n <= ndp; n++ { - nrs *= 10 - } - rs = float64(nrs) - rm = rs * 60.0 - rh = rm * 60.0 - - /* Round the interval and express in resolution units. */ - a = dnint(rs * a) - - /* Break into fields. */ - ah = a / rh - ah = dint(ah) - a -= ah * rh - am = a / rm - am = dint(am) - a -= am * rm - as = a / rs - as = dint(as) - af = a - as*rs - - /* Return results. */ - ihmsf[0] = int(ah) - ihmsf[1] = int(am) - ihmsf[2] = int(as) - ihmsf[3] = int(af) -} - -/* -Af2a Convert degrees, arcminutes, arcseconds to radians. - -Given: - s byte sign: '-' = negative, otherwise positive - ideg int degrees - iamin int arcminutes - asec float64 arcseconds - -Returned: - rad float64 angle in radians - -Returned (function value): - int status: 0 = OK - 1 = ideg outside range 0-359 - 2 = iamin outside range 0-59 - 3 = asec outside range 0-59.999... - -Notes: - - 1) The result is computed even if any of the range checks fail. - - 2) Negative ideg, iamin and/or asec produce a warning status, but - the absolute value is used in the conversion. - - 3) If there are multiple errors, the status value reflects only the - first, the smallest taking precedence. -*/ -func Af2a(s byte, ideg, iamin int, asec float64, rad *float64) int { - /* Compute the interval. */ - if s == '-' { - *rad = -1.0 - } else { - *rad = 1.0 - } - *rad *= (60.0*(60.0*(fabs(float64(ideg)))+(fabs(float64(iamin)))) + fabs(asec)) * DAS2R - - /* Validate arguments and return status. */ - if ideg < 0 || ideg > 359 { - return 1 - } - if iamin < 0 || iamin > 59 { - return 2 - } - if asec < 0.0 || asec >= 60.0 { - return 3 - } - return 0 -} - -/* -Tf2a Convert hours, minutes, seconds to radians. - -Given: - s byte sign: '-' = negative, otherwise positive - ihour int hours - imin int minutes - sec float64 seconds - -Returned: - rad float64 angle in radians - -Returned (function value): - int status: 0 = OK - 1 = ihour outside range 0-23 - 2 = imin outside range 0-59 - 3 = sec outside range 0-59.999... - -Notes: - - 1) The result is computed even if any of the range checks fail. - - 2) Negative ihour, imin and/or sec produce a warning status, but - the absolute value is used in the conversion. - - 3) If there are multiple errors, the status value reflects only the - first, the smallest taking precedence. -*/ -func Tf2a(s byte, ihour, imin int, sec float64, rad *float64) int { - /* Compute the interval. */ - if s == '-' { - *rad = -1.0 - } else { - *rad = 1.0 - } - - *rad *= (60.0*(60.0*(fabs(float64(ihour)))+(fabs(float64(imin)))) + fabs(sec)) * DS2R - - /* Validate arguments and return status. */ - if ihour < 0 || ihour > 23 { - return 1 - } - if imin < 0 || imin > 59 { - return 2 - } - if sec < 0.0 || sec >= 60.0 { - return 3 - } - return 0 -} - -/* -Tf2d Convert hours, minutes, seconds to days. - -Given: - s byte sign: '-' = negative, otherwise positive - ihour int hours - imin int minutes - sec float64 seconds - -Returned: - days float64 interval in days - -Returned (function value): - int status: 0 = OK - 1 = ihour outside range 0-23 - 2 = imin outside range 0-59 - 3 = sec outside range 0-59.999... - -Notes: - - 1) The result is computed even if any of the range checks fail. - - 2) Negative ihour, imin and/or sec produce a warning status, but - the absolute value is used in the conversion. - - 3) If there are multiple errors, the status value reflects only the - first, the smallest taking precedence. -*/ -func Tf2d(s byte, ihour, imin int, sec float64, days *float64) int { - /* Compute the interval. */ - // *days = ( s == '-' ? -1.0 : 1.0 ) * - if s == '-' { - *days = -1.0 - } else { - *days = 1.0 - } - *days *= (60.0*(60.0*(fabs(float64(ihour)))+(fabs(float64(imin)))) + fabs(sec)) / DAYSEC - - /* Validate arguments and return status. */ - - if ihour < 0 || ihour > 23 { - return 1 - } - if imin < 0 || imin > 59 { - return 2 - } - if sec < 0.0 || sec >= 60.0 { - return 3 - } - return 0 - -} - -// Separation and position-angle - -/* -Sepp Angular separation between two p-vectors. - -Given: - a [3]float64 first p-vector (not necessarily unit length) - b [3]float64 second p-vector (not necessarily unit length) - -Returned (function value): - float64 angular separation (radians, always positive) - -Notes: - - 1) If either vector is null, a zero result is returned. - - 2) The angular separation is most simply formulated in terms of - scalar product. However, this gives poor accuracy for angles - near zero and pi. The present algorithm uses both cross product - and dot product, to deliver full accuracy whatever the size of - the angle. - -Called: - Pxp vector product of two p-vectors - Pm modulus of p-vector - Pdp scalar product of two p-vectors -*/ -func Sepp(a, b [3]float64) float64 { - var axb [3]float64 - var ss, cs, s float64 - - /* Sine of angle between the vectors, multiplied by the two moduli. */ - Pxp(a, b, &axb) - ss = Pm(axb) - - /* Cosine of the angle, multiplied by the two moduli. */ - cs = Pdp(a, b) - - /* The angle. */ - if (ss != 0.0) || (cs != 0.0) { - s = atan2(ss, cs) - } else { - s = 0.0 - } - - return s -} - -/* -Seps Angular separation between two sets of spherical coordinates. - -Given: - al float64 first longitude (radians) - ap float64 first latitude (radians) - bl float64 second longitude (radians) - bp float64 second latitude (radians) - -Returned (function value): - float64 angular separation (radians) - -Called: - S2c spherical coordinates to unit vector - Sepp angular separation between two p-vectors -*/ -func Seps(al, ap, bl, bp float64) float64 { - var ac, bc [3]float64 - var s float64 - - /* Spherical to Cartesian. */ - S2c(al, ap, &ac) - S2c(bl, bp, &bc) - - /* Angle between the vectors. */ - s = Sepp(ac, bc) - - return s -} - -/* -Pap Position-angle from two p-vectors. - -Given: - a [3]float64 direction of reference point - b [3]float64 direction of point whose PA is required - -Returned (function value): - float64 position angle of b with respect to a (radians) - -Notes: - - 1) The result is the position angle, in radians, of direction b with - respect to direction a. It is in the range -pi to +pi. The - sense is such that if b is a small distance "north" of a the - position angle is approximately zero, and if b is a small - distance "east" of a the position angle is approximately +pi/2. - - 2) The vectors a and b need not be of unit length. - - 3) Zero is returned if the two directions are the same or if either - vector is null. - - 4) If vector a is at a pole, the result is ill-defined. - -Called: - Pn decompose p-vector into modulus and direction - Pm modulus of p-vector - Pxp vector product of two p-vectors - Pmp p-vector minus p-vector - Pdp scalar product of two p-vectors -*/ -func Pap(a, b [3]float64) float64 { - var am, bm, st, ct, xa, ya, za, pa float64 - var au, eta, xi, a2b [3]float64 - - /* Modulus and direction of the a vector. */ - Pn(a, &am, &au) - - /* Modulus of the b vector. */ - bm = Pm(b) - - /* Deal with the case of a null vector. */ - if (am == 0.0) || (bm == 0.0) { - st = 0.0 - ct = 1.0 - } else { - - /* The "north" axis tangential from a (arbitrary length). */ - xa = a[0] - ya = a[1] - za = a[2] - eta[0] = -xa * za - eta[1] = -ya * za - eta[2] = xa*xa + ya*ya - - /* The "east" axis tangential from a (same length). */ - Pxp(eta, au, &xi) - - /* The vector from a to b. */ - Pmp(b, a, &a2b) - - /* Resolve into components along the north and east axes. */ - st = Pdp(a2b, xi) - ct = Pdp(a2b, eta) - - /* Deal with degenerate cases. */ - if (st == 0.0) && (ct == 0.0) { - ct = 1.0 - } - } - - /* Position angle. */ - pa = atan2(st, ct) - - return pa -} - -/* -Pas Position-angle from spherical coordinates. - -Given: - al float64 longitude of point A (e.g. RA) in radians - ap float64 latitude of point A (e.g. Dec) in radians - bl float64 longitude of point B - bp float64 latitude of point B - -Returned (function value): - float64 position angle of B with respect to A - -Notes: - - 1) The result is the bearing (position angle), in radians, of point - B with respect to point A. It is in the range -pi to +pi. The - sense is such that if B is a small distance "east" of point A, - the bearing is approximately +pi/2. - - 2) Zero is returned if the two points are coincident. -*/ -func Pas(al, ap, bl, bp float64) float64 { - var dl, x, y, pa float64 - - dl = bl - al - y = sin(dl) * cos(bp) - x = sin(bp)*cos(ap) - cos(bp)*sin(ap)*cos(dl) - // pa = ((x != 0.0) || (y != 0.0)) ? atan2(y, x) : 0.0; - if (x != 0.0) || (y != 0.0) { - pa = atan2(y, x) - } else { - pa = 0.0 - } - - return pa -} diff --git a/vendor/github.com/hebl/gofa/astrometry.go b/vendor/github.com/hebl/gofa/astrometry.go deleted file mode 100644 index 38a9c39..0000000 --- a/vendor/github.com/hebl/gofa/astrometry.go +++ /dev/null @@ -1,5049 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -// SOFA Astrometry Tools - -/* -Ab Apply stellar aberration - -Apply aberration to transform natural direction into proper -direction. - -Given: - - pnat [3]float64 natural direction to the source (unit vector) - v [3]float64 observer barycentric velocity in units of c - s float64 distance between the Sun and the observer (au) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - -Returned: - - ppr [3]float64 proper direction to source (unit vector) - -Notes: - - 1. The algorithm is based on Expr. (7.40) in the Explanatory - Supplement (Urban & Seidelmann 2013), but with the following - changes: - - o Rigorous rather than approximate normalization is applied. - - o The gravitational potential term from Expr. (7) in - Klioner (2003) is added, taking into account only the Sun's - contribution. This has a maximum effect of about - 0.4 microarcsecond. - - 2. In almost all cases, the maximum accuracy will be limited by the - supplied velocity. For example, if the SOFA Epv00 function is - used, errors of up to 5 microarcseconds could occur. - -References: - - Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to - the Astronomical Almanac, 3rd ed., University Science Books - (2013). - - Klioner, Sergei A., "A practical relativistic model for micro- - arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003). - -Called: - - Pdp scalar product of two p-vectors -*/ -func Ab(pnat, v [3]float64, s, bm1 float64, ppr *[3]float64) { - var i int - var pdv, w1, w2, r2, w, r float64 - var p [3]float64 - - pdv = Pdp(pnat, v) - w1 = 1.0 + pdv/(1.0+bm1) - w2 = SRS / s - r2 = 0.0 - for i = 0; i < 3; i++ { - w = pnat[i]*bm1 + w1*v[i] + w2*(v[i]-pdv*pnat[i]) - p[i] = w - r2 = r2 + w*w - } - r = sqrt(r2) - for i = 0; i < 3; i++ { - ppr[i] = p[i] / r - } -} - -/* -Apcg Prepare for ICRS <-> GCRS, geocentric, special - -For a geocentric observer, prepare star-independent astrometry -parameters for transformations between ICRS and GCRS coordinates. -The Earth ephemeris is supplied by the caller. - -The parameters produced by this function are required in the -parallax, light deflection and aberration parts of the astrometric -transformation chain. - -Given: - - date1 float64 TDB as a 2-part... - date2 float64 ...Julian Date (Note 1) - ebpv [2][3]float64 Earth barycentric pos/vel (au, au/day) - ehp [3]float64 Earth heliocentric position (au) - -Returned: - - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 unchanged - xpl float64 unchanged - ypl float64 unchanged - sphi float64 unchanged - cphi float64 unchanged - diurab float64 unchanged - eral float64 unchanged - refa float64 unchanged - refb float64 unchanged - -Notes: - - 1. The TDB date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TDB)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. For most - applications of this function the choice will not be at all - critical. - - TT can be used instead of TDB without any significant impact on - accuracy. - - 2. All the vectors are with respect to BCRS axes. - - 3. This is one of several functions that inserts into the astrom - structure star-independent parameters needed for the chain of - astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. - - The various functions support different classes of observer and - portions of the transformation chain: - - functions observer transformation - - Apcg Apcg13 geocentric ICRS <-> GCRS - Apci Apci13 terrestrial ICRS <-> CIRS - Apco Apco13 terrestrial ICRS <-> observed - Apcs Apcs13 space ICRS <-> GCRS - Aper Aper13 terrestrial update Earth rotation - Apio Apio13 terrestrial CIRS <-> observed - - Those with names ending in "13" use contemporary SOFA models to - compute the various ephemerides. The others accept ephemerides - supplied by the caller. - - The transformation from ICRS to GCRS covers space motion, - parallax, light deflection, and aberration. From GCRS to CIRS - comprises frame bias and precession-nutation. From CIRS to - observed takes account of Earth rotation, polar motion, diurnal - aberration and parallax (unless subsumed into the ICRS <-> GCRS - transformation), and atmospheric refraction. - - 4. The context structure astrom produced by this function is used by - Atciq* and Aticq*. - -Called: - - Apcs astrometry parameters, ICRS-GCRS, space observer -*/ -func Apcg(date1, date2 float64, ebpv [2][3]float64, ehp [3]float64, astrom *ASTROM) { - /* Geocentric observer */ - pv := [2][3]float64{ - {0.0, 0.0, 0.0}, - {0.0, 0.0, 0.0}, - } - - /* Compute the star-independent astrometry parameters. */ - Apcs(date1, date2, pv, ebpv, ehp, astrom) -} - -/* -Apcg13 Prepare for ICRS <-> GCRS, geocentric - -For a geocentric observer, prepare star-independent astrometry -parameters for transformations between ICRS and GCRS coordinates. -The caller supplies the date, and SOFA models are used to predict -the Earth ephemeris. - -The parameters produced by this function are required in the -parallax, light deflection and aberration parts of the astrometric -transformation chain. - -Given: - - date1 float64 TDB as a 2-part... - date2 float64 ...Julian Date (Note 1) - -Returned: - - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 unchanged - xpl float64 unchanged - ypl float64 unchanged - sphi float64 unchanged - cphi float64 unchanged - diurab float64 unchanged - eral float64 unchanged - refa float64 unchanged - refb float64 unchanged - -Notes: - - 1. The TDB date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TDB)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. For most - applications of this function the choice will not be at all - critical. - - TT can be used instead of TDB without any significant impact on - accuracy. - - 2. All the vectors are with respect to BCRS axes. - - 3. In cases where the caller wishes to supply his own Earth - ephemeris, the function Apcg can be used instead of the present - function. - - 4. This is one of several functions that inserts into the astrom - structure star-independent parameters needed for the chain of - astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. - - The various functions support different classes of observer and - portions of the transformation chain: - - functions observer transformation - - Apcg Apcg13 geocentric ICRS <-> GCRS - Apci Apci13 terrestrial ICRS <-> CIRS - Apco Apco13 terrestrial ICRS <-> observed - Apcs Apcs13 space ICRS <-> GCRS - Aper Aper13 terrestrial update Earth rotation - Apio Apio13 terrestrial CIRS <-> observed - - Those with names ending in "13" use contemporary SOFA models to - compute the various ephemerides. The others accept ephemerides - supplied by the caller. - - The transformation from ICRS to GCRS covers space motion, - parallax, light deflection, and aberration. From GCRS to CIRS - comprises frame bias and precession-nutation. From CIRS to - observed takes account of Earth rotation, polar motion, diurnal - aberration and parallax (unless subsumed into the ICRS <-> GCRS - transformation), and atmospheric refraction. - - 5. The context structure astrom produced by this function is used by - Atciq* and Aticq*. - -Called: - - Epv00 Earth position and velocity - Apcg astrometry parameters, ICRS-GCRS, geocenter -*/ -func Apcg13(date1, date2 float64, astrom *ASTROM) { - var ehpv, ebpv [2][3]float64 - - /* Earth barycentric & heliocentric position/velocity (au, au/d). */ - Epv00(date1, date2, &ehpv, &ebpv) - - /* Compute the star-independent astrometry parameters. */ - Apcg(date1, date2, ebpv, ehpv[0], astrom) -} - -/* -Apci Prepare for ICRS <-> CIRS, terrestrial, special - -For a terrestrial observer, prepare star-independent astrometry -parameters for transformations between ICRS and geocentric CIRS -coordinates. The Earth ephemeris and CIP/CIO are supplied by the -caller. - -The parameters produced by this function are required in the -parallax, light deflection, aberration, and bias-precession-nutation -parts of the astrometric transformation chain. - -Given: - - date1 float64 TDB as a 2-part... - date2 float64 ...Julian Date (Note 1) - ebpv [2][3]float64 Earth barycentric position/velocity (au, au/day) - ehp [3]float64 Earth heliocentric position (au) - x,y float64 CIP X,Y (components of unit vector) - s float64 the CIO locator s (radians) - -Returned: - - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 unchanged - xpl float64 unchanged - ypl float64 unchanged - sphi float64 unchanged - cphi float64 unchanged - diurab float64 unchanged - eral float64 unchanged - refa float64 unchanged - refb float64 unchanged - -Notes: - - 1. The TDB date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TDB)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. For most - applications of this function the choice will not be at all - critical. - - TT can be used instead of TDB without any significant impact on - accuracy. - - 2. All the vectors are with respect to BCRS axes. - - 3. In cases where the caller does not wish to provide the Earth - ephemeris and CIP/CIO, the function Apci13 can be used instead - of the present function. This computes the required quantities - using other SOFA functions. - - 4. This is one of several functions that inserts into the astrom - structure star-independent parameters needed for the chain of - astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. - - The various functions support different classes of observer and - portions of the transformation chain: - - functions observer transformation - - Apcg Apcg13 geocentric ICRS <-> GCRS - Apci Apci13 terrestrial ICRS <-> CIRS - Apco Apco13 terrestrial ICRS <-> observed - Apcs Apcs13 space ICRS <-> GCRS - Aper Aper13 terrestrial update Earth rotation - Apio Apio13 terrestrial CIRS <-> observed - - Those with names ending in "13" use contemporary SOFA models to - compute the various ephemerides. The others accept ephemerides - supplied by the caller. - - The transformation from ICRS to GCRS covers space motion, - parallax, light deflection, and aberration. From GCRS to CIRS - comprises frame bias and precession-nutation. From CIRS to - observed takes account of Earth rotation, polar motion, diurnal - aberration and parallax (unless subsumed into the ICRS <-> GCRS - transformation), and atmospheric refraction. - - 5. The context structure astrom produced by this function is used by - Atciq* and Aticq*. - -Called: - - Apcg astrometry parameters, ICRS-GCRS, geocenter - C2ixys celestial-to-intermediate matrix, given X,Y and s -*/ -func Apci(date1, date2 float64, ebpv [2][3]float64, ehp [3]float64, x, y, s float64, astrom *ASTROM) { - /* Star-independent astrometry parameters for geocenter. */ - Apcg(date1, date2, ebpv, ehp, astrom) - - /* CIO based BPN matrix. */ - C2ixys(x, y, s, &astrom.Bpn) -} - -/* -Apci13 Prepare for ICRS <-> CIRS, terrestrial - -For a terrestrial observer, prepare star-independent astrometry -parameters for transformations between ICRS and geocentric CIRS -coordinates. The caller supplies the date, and SOFA models are used -to predict the Earth ephemeris and CIP/CIO. - -The parameters produced by this function are required in the -parallax, light deflection, aberration, and bias-precession-nutation -parts of the astrometric transformation chain. - -Given: - - date1 float64 TDB as a 2-part... - date2 float64 ...Julian Date (Note 1) - -Returned: - - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 unchanged - xpl float64 unchanged - ypl float64 unchanged - sphi float64 unchanged - cphi float64 unchanged - diurab float64 unchanged - eral float64 unchanged - refa float64 unchanged - refb float64 unchanged - eo float64 equation of the origins (ERA-GST) - -Notes: - - 1. The TDB date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TDB)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. For most - applications of this function the choice will not be at all - critical. - - TT can be used instead of TDB without any significant impact on - accuracy. - - 2. All the vectors are with respect to BCRS axes. - - 3. In cases where the caller wishes to supply his own Earth - ephemeris and CIP/CIO, the function Apci can be used instead - of the present function. - - 4. This is one of several functions that inserts into the astrom - structure star-independent parameters needed for the chain of - astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. - - The various functions support different classes of observer and - portions of the transformation chain: - - functions observer transformation - - Apcg Apcg13 geocentric ICRS <-> GCRS - Apci Apci13 terrestrial ICRS <-> CIRS - Apco Apco13 terrestrial ICRS <-> observed - Apcs Apcs13 space ICRS <-> GCRS - Aper Aper13 terrestrial update Earth rotation - Apio Apio13 terrestrial CIRS <-> observed - - Those with names ending in "13" use contemporary SOFA models to - compute the various ephemerides. The others accept ephemerides - supplied by the caller. - - The transformation from ICRS to GCRS covers space motion, - parallax, light deflection, and aberration. From GCRS to CIRS - comprises frame bias and precession-nutation. From CIRS to - observed takes account of Earth rotation, polar motion, diurnal - aberration and parallax (unless subsumed into the ICRS <-> GCRS - transformation), and atmospheric refraction. - - 5. The context structure astrom produced by this function is used by - Atciq* and Aticq*. - -Called: - - Epv00 Earth position and velocity - Pnm06a classical NPB matrix, IAU 2006/2000A - Bpn2xy extract CIP X,Y coordinates from NPB matrix - S06 the CIO locator s, given X,Y, IAU 2006 - Apci astrometry parameters, ICRS-CIRS - Eors equation of the origins, given NPB matrix and s -*/ -func Apci13(date1, date2 float64, astrom *ASTROM, eo *float64) { - var ehpv, ebpv [2][3]float64 - var r [3][3]float64 - var x, y, s float64 - - /* Earth barycentric & heliocentric position/velocity (au, au/d). */ - Epv00(date1, date2, &ehpv, &ebpv) - - /* Form the equinox based BPN matrix, IAU 2006/2000A. */ - Pnm06a(date1, date2, &r) - - /* Extract CIP X,Y. */ - Bpn2xy(r, &x, &y) - - /* Obtain CIO locator s. */ - s = S06(date1, date2, x, y) - - /* Compute the star-independent astrometry parameters. */ - Apci(date1, date2, ebpv, ehpv[0], x, y, s, astrom) - - /* Equation of the origins. */ - *eo = Eors(r, s) -} - -/* -Apco Prepare for ICRS <-> observed, terrestrial, special - -For a terrestrial observer, prepare star-independent astrometry -parameters for transformations between ICRS and observed -coordinates. The caller supplies the Earth ephemeris, the Earth -rotation information and the refraction constants as well as the -site coordinates. - -Given: - - date1 float64 TDB as a 2-part... - date2 float64 ...Julian Date (Note 1) - ebpv [2][3]float64 Earth barycentric PV (au, au/day, Note 2) - ehp [3]float64 Earth heliocentric P (au, Note 2) - x,y float64 CIP X,Y (components of unit vector) - s float64 the CIO locator s (radians) - theta float64 Earth rotation angle (radians) - elong float64 longitude (radians, east +ve, Note 3) - phi float64 latitude (geodetic, radians, Note 3) - hm float64 height above ellipsoid (m, geodetic, Note 3) - xp,yp float64 polar motion coordinates (radians, Note 4) - sp float64 the TIO locator s' (radians, Note 4) - refa float64 refraction constant A (radians, Note 5) - refb float64 refraction constant B (radians, Note 5) - -Returned: - - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 adjusted longitude (radians) - xpl float64 polar motion xp wrt local meridian (radians) - ypl float64 polar motion yp wrt local meridian (radians) - sphi float64 sine of geodetic latitude - cphi float64 cosine of geodetic latitude - diurab float64 magnitude of diurnal aberration vector - eral float64 "local" Earth rotation angle (radians) - refa float64 refraction constant A (radians) - refb float64 refraction constant B (radians) - -Notes: - - 1. The TDB date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TDB)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. For most - applications of this function the choice will not be at all - critical. - - TT can be used instead of TDB without any significant impact on - accuracy. - - 2. The vectors eb, eh, and all the astrom vectors, are with respect - to BCRS axes. - - 3. The geographical coordinates are with respect to the WGS84 - reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN - CONVENTION: the longitude required by the present function is - right-handed, i.e. east-positive, in accordance with geographical - convention. - - The adjusted longitude stored in the astrom array takes into - account the TIO locator and polar motion. - - 4. xp and yp are the coordinates (in radians) of the Celestial - Intermediate Pole with respect to the International Terrestrial - Reference System (see IERS Conventions), measured along the - meridians 0 and 90 deg west respectively. sp is the TIO locator - s', in radians, which positions the Terrestrial Intermediate - Origin on the equator. For many applications, xp, yp and - (especially) sp can be set to zero. - - Internally, the polar motion is stored in a form rotated onto the - local meridian. - - 5. The refraction constants refa and refb are for use in a - dZ = A*tan(Z)+B*tan^3(Z) model, where Z is the observed - (i.e. refracted) zenith distance and dZ is the amount of - refraction. - - 6. It is advisable to take great care with units, as even unlikely - values of the input parameters are accepted and processed in - accordance with the models used. - - 7. In cases where the caller does not wish to provide the Earth - Ephemeris, the Earth rotation information and refraction - constants, the function Apco13 can be used instead of the - present function. This starts from UTC and weather readings etc. - and computes suitable values using other SOFA functions. - - 8. This is one of several functions that inserts into the astrom - structure star-independent parameters needed for the chain of - astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. - - The various functions support different classes of observer and - portions of the transformation chain: - - functions observer transformation - - Apcg Apcg13 geocentric ICRS <-> GCRS - Apci Apci13 terrestrial ICRS <-> CIRS - Apco Apco13 terrestrial ICRS <-> observed - Apcs Apcs13 space ICRS <-> GCRS - Aper Aper13 terrestrial update Earth rotation - Apio Apio13 terrestrial CIRS <-> observed - - Those with names ending in "13" use contemporary SOFA models to - compute the various ephemerides. The others accept ephemerides - supplied by the caller. - - The transformation from ICRS to GCRS covers space motion, - parallax, light deflection, and aberration. From GCRS to CIRS - comprises frame bias and precession-nutation. From CIRS to - observed takes account of Earth rotation, polar motion, diurnal - aberration and parallax (unless subsumed into the ICRS <-> GCRS - transformation), and atmospheric refraction. - - 9. The context structure astrom produced by this function is used by - Atioq, Atoiq, Atciq* and Aticq*. - -Called: - - Ir initialize r-matrix to identity - Rz rotate around Z-axis - Ry rotate around Y-axis - Rx rotate around X-axis - Anpm normalize angle into range +/- pi - C2ixys celestial-to-intermediate matrix, given X,Y and s - Pvtob position/velocity of terrestrial station - Trxpv product of transpose of r-matrix and pv-vector - Apcs astrometry parameters, ICRS-GCRS, space observer - Cr copy r-matrix -*/ -func Apco(date1, date2 float64, ebpv [2][3]float64, ehp [3]float64, x, y, s float64, theta, - elong, phi float64, hm, xp, yp, sp float64, refa, refb float64, astrom *ASTROM) { - var r [3][3]float64 - var a, b, eral, c float64 - var pvc, pv [2][3]float64 - - /* Form the rotation matrix, CIRS to apparent [HA,Dec]. */ - Ir(&r) - Rz(theta+sp, &r) - Ry(-xp, &r) - Rx(-yp, &r) - Rz(elong, &r) - - /* Solve for local Earth rotation angle. */ - a = r[0][0] - b = r[0][1] - // eral = ( a != 0.0 || b != 0.0 ) ? atan2(b, a) : 0.0; - if a != 0.0 || b != 0.0 { - eral = atan2(b, a) - } else { - eral = 0.0 - } - astrom.Eral = eral - - /* Solve for polar motion [X,Y] with respect to local meridian. */ - a = r[0][0] - c = r[0][2] - astrom.Xpl = atan2(c, sqrt(a*a+b*b)) - a = r[1][2] - b = r[2][2] - // astrom.Ypl = ( a != 0.0 || b != 0.0 ) ? -atan2(a, b) : 0.0; - if a != 0.0 || b != 0.0 { - astrom.Ypl = -atan2(a, b) - } else { - astrom.Ypl = 0.0 - } - - /* Adjusted longitude. */ - astrom.Along = Anpm(eral - theta) - - /* Functions of latitude. */ - astrom.Sphi = sin(phi) - astrom.Cphi = cos(phi) - - /* Refraction constants. */ - astrom.Refa = refa - astrom.Refb = refb - - /* Disable the (redundant) diurnal aberration step. */ - astrom.Diurab = 0.0 - - /* CIO based BPN matrix. */ - C2ixys(x, y, s, &r) - - /* Observer's geocentric position and velocity (m, m/s, CIRS). */ - Pvtob(elong, phi, hm, xp, yp, sp, theta, &pvc) - - /* Rotate into GCRS. */ - Trxpv(r, pvc, &pv) - - /* ICRS <-> GCRS parameters. */ - Apcs(date1, date2, pv, ebpv, ehp, astrom) - - /* Store the CIO based BPN matrix. */ - Cr(r, &astrom.Bpn) - -} - -/* -Apco13 Prepare for ICRS <-> observed, terrestrial - -For a terrestrial observer, prepare star-independent astrometry -parameters for transformations between ICRS and observed -coordinates. The caller supplies UTC, site coordinates, ambient air -conditions and observing wavelength, and SOFA models are used to -obtain the Earth ephemeris, CIP/CIO and refraction constants. - -The parameters produced by this function are required in the -parallax, light deflection, aberration, and bias-precession-nutation -parts of the ICRS/CIRS transformations. - -Given: - - utc1 float64 UTC as a 2-part... - utc2 float64 ...quasi Julian Date (Notes 1,2) - dut1 float64 UT1-UTC (seconds, Note 3) - elong float64 longitude (radians, east +ve, Note 4) - phi float64 latitude (geodetic, radians, Note 4) - hm float64 height above ellipsoid (m, geodetic, Notes 4,6) - xp,yp float64 polar motion coordinates (radians, Note 5) - phpa float64 pressure at the observer (hPa = mB, Note 6) - tc float64 ambient temperature at the observer (deg C) - rh float64 relative humidity at the observer (range 0-1) - wl float64 wavelength (micrometers, Note 7) - -Returned: - - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 adjusted longitude (radians) - xpl float64 polar motion xp wrt local meridian (radians) - ypl float64 polar motion yp wrt local meridian (radians) - sphi float64 sine of geodetic latitude - cphi float64 cosine of geodetic latitude - diurab float64 magnitude of diurnal aberration vector - eral float64 "local" Earth rotation angle (radians) - refa float64 refraction constant A (radians) - refb float64 refraction constant B (radians) - eo float64 equation of the origins (ERA-GST) - -Returned (function value): - - int status: +1 = dubious year (Note 2) - 0 = OK - -1 = unacceptable date - -Notes: - - 1. utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any - convenient way between the two arguments, for example where utc1 - is the Julian Day Number and utc2 is the fraction of a day. - - However, JD cannot unambiguously represent UTC during a leap - second unless special measures are taken. The convention in the - present function is that the JD day represents UTC days whether - the length is 86399, 86400 or 86401 SI seconds. - - Applications should use the function Dtf2d to convert from - calendar date and time of day into 2-part quasi Julian Date, as - it implements the leap-second-ambiguity convention just - described. - - 2. The warning status "dubious year" flags UTCs that predate the - introduction of the time scale or that are too far in the - future to be trusted. See Dat for further details. - - 3. UT1-UTC is tabulated in IERS bulletins. It increases by exactly - one second at the end of each positive UTC leap second, - introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This - practice is under review, and in the future UT1-UTC may grow - essentially without limit. - - 4. The geographical coordinates are with respect to the WGS84 - reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the - longitude required by the present function is east-positive - (i.e. right-handed), in accordance with geographical convention. - - 5. The polar motion xp,yp can be obtained from IERS bulletins. The - values are the coordinates (in radians) of the Celestial - Intermediate Pole with respect to the International Terrestrial - Reference System (see IERS Conventions 2003), measured along the - meridians 0 and 90 deg west respectively. For many - applications, xp and yp can be set to zero. - - Internally, the polar motion is stored in a form rotated onto - the local meridian. - - 6. If hm, the height above the ellipsoid of the observing station - in meters, is not known but phpa, the pressure in hPa (=mB), is - available, an adequate estimate of hm can be obtained from the - expression - - hm = -29.3 * tsl * log ( phpa / 1013.25 ); - - where tsl is the approximate sea-level air temperature in K - (See Astrophysical Quantities, C.W.Allen, 3rd edition, section - 52). Similarly, if the pressure phpa is not known, it can be - estimated from the height of the observing station, hm, as - follows: - - phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) ); - - Note, however, that the refraction is nearly proportional to - the pressure and that an accurate phpa value is important for - precise work. - - 7. The argument wl specifies the observing wavelength in - micrometers. The transition from optical to radio is assumed to - occur at 100 micrometers (about 3000 GHz). - - 8. It is advisable to take great care with units, as even unlikely - values of the input parameters are accepted and processed in - accordance with the models used. - - 9. In cases where the caller wishes to supply his own Earth - ephemeris, Earth rotation information and refraction constants, - the function Apco can be used instead of the present function. - - 10)This is one of several functions that inserts into the astrom - structure star-independent parameters needed for the chain of - astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. - - The various functions support different classes of observer and - portions of the transformation chain: - - functions observer transformation - - Apcg Apcg13 geocentric ICRS <-> GCRS - Apci Apci13 terrestrial ICRS <-> CIRS - Apco Apco13 terrestrial ICRS <-> observed - Apcs Apcs13 space ICRS <-> GCRS - Aper Aper13 terrestrial update Earth rotation - Apio Apio13 terrestrial CIRS <-> observed - - Those with names ending in "13" use contemporary SOFA models to - compute the various ephemerides. The others accept ephemerides - supplied by the caller. - - The transformation from ICRS to GCRS covers space motion, - parallax, light deflection, and aberration. From GCRS to CIRS - comprises frame bias and precession-nutation. From CIRS to - observed takes account of Earth rotation, polar motion, diurnal - aberration and parallax (unless subsumed into the ICRS <-> GCRS - transformation), and atmospheric refraction. - - 11)The context structure astrom produced by this function is used - by Atioq, Atoiq, Atciq* and Aticq*. - -Called: - - Utctai UTC to TAI - Taitt TAI to TT - Utcut1 UTC to UT1 - Epv00 Earth position and velocity - Pnm06a classical NPB matrix, IAU 2006/2000A - Bpn2xy extract CIP X,Y coordinates from NPB matrix - S06 the CIO locator s, given X,Y, IAU 2006 - Era00 Earth rotation angle, IAU 2000 - Sp00 the TIO locator s', IERS 2000 - Refco refraction constants for given ambient conditions - Apco astrometry parameters, ICRS-observed - Eors equation of the origins, given NPB matrix and s -*/ -func Apco13(utc1, utc2, dut1 float64, elong, phi, hm, xp, yp float64, phpa, tc, rh, wl float64, astrom *ASTROM, eo *float64) int { - var j int - var tai1, tai2, tt1, tt2, ut11, ut12 float64 - var ehpv, ebpv [2][3]float64 - var r [3][3]float64 - var x, y, s, theta, sp, refa, refb float64 - - /* UTC to other time scales. */ - j = Utctai(utc1, utc2, &tai1, &tai2) - if j < 0 { - return -1 - } - - Taitt(tai1, tai2, &tt1, &tt2) - - j = Utcut1(utc1, utc2, dut1, &ut11, &ut12) - if j < 0 { - return -1 - } - - /* Earth barycentric & heliocentric position/velocity (au, au/d). */ - Epv00(tt1, tt2, &ehpv, &ebpv) - - /* Form the equinox based BPN matrix, IAU 2006/2000A. */ - Pnm06a(tt1, tt2, &r) - - /* Extract CIP X,Y. */ - Bpn2xy(r, &x, &y) - - /* Obtain CIO locator s. */ - s = S06(tt1, tt2, x, y) - - /* Earth rotation angle. */ - theta = Era00(ut11, ut12) - - /* TIO locator s'. */ - sp = Sp00(tt1, tt2) - - /* Refraction constants A and B. */ - Refco(phpa, tc, rh, wl, &refa, &refb) - - /* Compute the star-independent astrometry parameters. */ - Apco(tt1, tt2, ebpv, ehpv[0], x, y, s, theta, - elong, phi, hm, xp, yp, sp, refa, refb, astrom) - - /* Equation of the origins. */ - *eo = Eors(r, s) - - /* Return any warning status. */ - return j - -} - -/* -Apcs Prepare for ICRS <-> CIRS, space, special - -For an observer whose geocentric position and velocity are known, -prepare star-independent astrometry parameters for transformations -between ICRS and GCRS. The Earth ephemeris is supplied by the -caller. - -The parameters produced by this function are required in the space -motion, parallax, light deflection and aberration parts of the -astrometric transformation chain. - -Given: - - date1 float64 TDB as a 2-part... - date2 float64 ...Julian Date (Note 1) - pv [2][3]float64 observer's geocentric pos/vel (m, m/s) - ebpv [2][3]float64 Earth barycentric PV (au, au/day) - ehp [3]float64 Earth heliocentric P (au) - -Returned: - - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 unchanged - xpl float64 unchanged - ypl float64 unchanged - sphi float64 unchanged - cphi float64 unchanged - diurab float64 unchanged - eral float64 unchanged - refa float64 unchanged - refb float64 unchanged - -Notes: - - 1. The TDB date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TDB)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. For most - applications of this function the choice will not be at all - critical. - - TT can be used instead of TDB without any significant impact on - accuracy. - - 2. All the vectors are with respect to BCRS axes. - - 3. Providing separate arguments for (i) the observer's geocentric - position and velocity and (ii) the Earth ephemeris is done for - convenience in the geocentric, terrestrial and Earth orbit cases. - For deep space applications it maybe more convenient to specify - zero geocentric position and velocity and to supply the - observer's position and velocity information directly instead of - with respect to the Earth. However, note the different units: - m and m/s for the geocentric vectors, au and au/day for the - heliocentric and barycentric vectors. - - 4. In cases where the caller does not wish to provide the Earth - ephemeris, the function Apcs13 can be used instead of the - present function. This computes the Earth ephemeris using the - SOFA function Epv00. - - 5. This is one of several functions that inserts into the astrom - structure star-independent parameters needed for the chain of - astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. - - The various functions support different classes of observer and - portions of the transformation chain: - - functions observer transformation - - Apcg Apcg13 geocentric ICRS <-> GCRS - Apci Apci13 terrestrial ICRS <-> CIRS - Apco Apco13 terrestrial ICRS <-> observed - Apcs Apcs13 space ICRS <-> GCRS - Aper Aper13 terrestrial update Earth rotation - Apio Apio13 terrestrial CIRS <-> observed - - Those with names ending in "13" use contemporary SOFA models to - compute the various ephemerides. The others accept ephemerides - supplied by the caller. - - The transformation from ICRS to GCRS covers space motion, - parallax, light deflection, and aberration. From GCRS to CIRS - comprises frame bias and precession-nutation. From CIRS to - observed takes account of Earth rotation, polar motion, diurnal - aberration and parallax (unless subsumed into the ICRS <-> GCRS - transformation), and atmospheric refraction. - - 6. The context structure astrom produced by this function is used by - Atciq* and Aticq*. - -Called: - - Cp copy p-vector - Pm modulus of p-vector - Pn decompose p-vector into modulus and direction - Ir initialize r-matrix to identity -*/ -func Apcs(date1, date2 float64, pv, ebpv [2][3]float64, ehp [3]float64, astrom *ASTROM) { - /* au/d to m/s */ - const AUDMS = DAU / DAYSEC - - /* Light time for 1 au (day) */ - const CR = AULT / DAYSEC - - var i int - var dp, dv float64 - var pb, vb, ph [3]float64 - var v2, w float64 - - /* Time since reference epoch, years (for proper motion calculation). */ - astrom.Pmt = ((date1 - DJ00) + date2) / DJY - - /* Adjust Earth ephemeris to observer. */ - for i = 0; i < 3; i++ { - dp = pv[0][i] / DAU - dv = pv[1][i] / AUDMS - pb[i] = ebpv[0][i] + dp - vb[i] = ebpv[1][i] + dv - ph[i] = ehp[i] + dp - } - - /* Barycentric position of observer (au). */ - Cp(pb, &astrom.Eb) - - /* Heliocentric direction and distance (unit vector and au). */ - Pn(ph, &astrom.Em, &astrom.Eh) - - /* Barycentric vel. in units of c, and reciprocal of Lorenz factor. */ - v2 = 0.0 - for i = 0; i < 3; i++ { - w = vb[i] * CR - astrom.V[i] = w - v2 += w * w - } - astrom.Bm1 = sqrt(1.0 - v2) - - /* Reset the NPB matrix. */ - Ir(&astrom.Bpn) -} - -/* -Apcs13 Prepare for ICRS <-> CIRS, space - -For an observer whose geocentric position and velocity are known, -prepare star-independent astrometry parameters for transformations -between ICRS and GCRS. The Earth ephemeris is from SOFA models. - -The parameters produced by this function are required in the space -motion, parallax, light deflection and aberration parts of the -astrometric transformation chain. - -Given: - - date1 float64 TDB as a 2-part... - date2 float64 ...Julian Date (Note 1) - pv [2][3]float64 observer's geocentric pos/vel (Note 3) - -Returned: - - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 unchanged - xpl float64 unchanged - ypl float64 unchanged - sphi float64 unchanged - cphi float64 unchanged - diurab float64 unchanged - eral float64 unchanged - refa float64 unchanged - refb float64 unchanged - -Notes: - - 1. The TDB date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TDB)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. For most - applications of this function the choice will not be at all - critical. - - TT can be used instead of TDB without any significant impact on - accuracy. - - 2. All the vectors are with respect to BCRS axes. - - 3. The observer's position and velocity pv are geocentric but with - respect to BCRS axes, and in units of m and m/s. No assumptions - are made about proximity to the Earth, and the function can be - used for deep space applications as well as Earth orbit and - terrestrial. - - 4. In cases where the caller wishes to supply his own Earth - ephemeris, the function Apcs can be used instead of the present - function. - - 5. This is one of several functions that inserts into the astrom - structure star-independent parameters needed for the chain of - astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. - - The various functions support different classes of observer and - portions of the transformation chain: - - functions observer transformation - - Apcg Apcg13 geocentric ICRS <-> GCRS - Apci Apci13 terrestrial ICRS <-> CIRS - Apco Apco13 terrestrial ICRS <-> observed - Apcs Apcs13 space ICRS <-> GCRS - Aper Aper13 terrestrial update Earth rotation - Apio Apio13 terrestrial CIRS <-> observed - - Those with names ending in "13" use contemporary SOFA models to - compute the various ephemerides. The others accept ephemerides - supplied by the caller. - - The transformation from ICRS to GCRS covers space motion, - parallax, light deflection, and aberration. From GCRS to CIRS - comprises frame bias and precession-nutation. From CIRS to - observed takes account of Earth rotation, polar motion, diurnal - aberration and parallax (unless subsumed into the ICRS <-> GCRS - transformation), and atmospheric refraction. - - 6. The context structure astrom produced by this function is used by - Atciq* and Aticq*. - -Called: - - Epv00 Earth position and velocity - Apcs astrometry parameters, ICRS-GCRS, space observer -*/ -func Apcs13(date1, date2 float64, pv [2][3]float64, astrom *ASTROM) { - var ehpv, ebpv [2][3]float64 - - /* Earth barycentric & heliocentric position/velocity (au, au/d). */ - Epv00(date1, date2, &ehpv, &ebpv) - - /* Compute the star-independent astrometry parameters. */ - Apcs(date1, date2, pv, ebpv, ehpv[0], astrom) -} - -/* -Aper Insert ERA into context - -In the star-independent astrometry parameters, update only the -Earth rotation angle, supplied by the caller explicitly. - -Given: - - theta float64 Earth rotation angle (radians, Note 2) - astrom ASTROM star-independent astrometry parameters: - pmt float64 not used - eb [3]float64 not used - eh [3]float64 not used - em float64 not used - v [3]float64 not used - bm1 float64 not used - bpn [3][3]float64 not used - along float64 longitude + s' (radians) - xpl float64 not used - ypl float64 not used - sphi float64 not used - cphi float64 not used - diurab float64 not used - eral float64 not used - refa float64 not used - refb float64 not used - -Returned: - - astrom ASTROM star-independent astrometry parameters: - pmt float64 unchanged - eb [3]float64 unchanged - eh [3]float64 unchanged - em float64 unchanged - v [3]float64 unchanged - bm1 float64 unchanged - bpn [3][3]float64 unchanged - along float64 unchanged - xpl float64 unchanged - ypl float64 unchanged - sphi float64 unchanged - cphi float64 unchanged - diurab float64 unchanged - eral float64 "local" Earth rotation angle (radians) - refa float64 unchanged - refb float64 unchanged - -Notes: - - 1. This function exists to enable sidereal-tracking applications to - avoid wasteful recomputation of the bulk of the astrometry - parameters: only the Earth rotation is updated. - - 2. For targets expressed as equinox based positions, such as - classical geocentric apparent (RA,Dec), the supplied theta can be - Greenwich apparent sidereal time rather than Earth rotation - angle. - - 3. The function Aper13 can be used instead of the present - function, and starts from UT1 rather than ERA itself. - - 4. This is one of several functions that inserts into the astrom - structure star-independent parameters needed for the chain of - astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. - - The various functions support different classes of observer and - portions of the transformation chain: - - functions observer transformation - - Apcg Apcg13 geocentric ICRS <-> GCRS - Apci Apci13 terrestrial ICRS <-> CIRS - Apco Apco13 terrestrial ICRS <-> observed - Apcs Apcs13 space ICRS <-> GCRS - Aper Aper13 terrestrial update Earth rotation - Apio Apio13 terrestrial CIRS <-> observed - - Those with names ending in "13" use contemporary SOFA models to - compute the various ephemerides. The others accept ephemerides - supplied by the caller. - - The transformation from ICRS to GCRS covers space motion, - parallax, light deflection, and aberration. From GCRS to CIRS - comprises frame bias and precession-nutation. From CIRS to - observed takes account of Earth rotation, polar motion, diurnal - aberration and parallax (unless subsumed into the ICRS <-> GCRS - transformation), and atmospheric refraction. -*/ -func Aper(theta float64, astrom *ASTROM) { - astrom.Eral = theta + astrom.Along -} - -/* -Aper13 Update context for Earth rotation - -In the star-independent astrometry parameters, update only the -Earth rotation angle. The caller provides UT1, (n.b. not UTC). - -Given: - - ut11 float64 UT1 as a 2-part... - ut12 float64 ...Julian Date (Note 1) - astrom ASTROM star-independent astrometry parameters: - pmt float64 not used - eb [3]float64 not used - eh [3]float64 not used - em float64 not used - v [3]float64 not used - bm1 float64 not used - bpn [3][3]float64 not used - along float64 longitude + s' (radians) - xpl float64 not used - ypl float64 not used - sphi float64 not used - cphi float64 not used - diurab float64 not used - eral float64 not used - refa float64 not used - refb float64 not used - -Returned: - - astrom ASTROM star-independent astrometry parameters: - pmt float64 unchanged - eb [3]float64 unchanged - eh [3]float64 unchanged - em float64 unchanged - v [3]float64 unchanged - bm1 float64 unchanged - bpn [3][3]float64 unchanged - along float64 unchanged - xpl float64 unchanged - ypl float64 unchanged - sphi float64 unchanged - cphi float64 unchanged - diurab float64 unchanged - eral float64 "local" Earth rotation angle (radians) - refa float64 unchanged - refb float64 unchanged - -Notes: - - 1. The UT1 date (n.b. not UTC) ut11+ut12 is a Julian Date, - apportioned in any convenient way between the arguments ut11 and - ut12. For example, JD(UT1)=2450123.7 could be expressed in any - of these ways, among others: - - ut11 ut12 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 and MJD methods are good compromises - between resolution and convenience. The date & time method is - best matched to the algorithm used: maximum precision is - delivered when the ut11 argument is for 0hrs UT1 on the day in - question and the ut12 argument lies in the range 0 to 1, or vice - versa. - - 2. If the caller wishes to provide the Earth rotation angle itself, - the function Aper can be used instead. One use of this - technique is to substitute Greenwich apparent sidereal time and - thereby to support equinox based transformations directly. - - 3. This is one of several functions that inserts into the astrom - structure star-independent parameters needed for the chain of - astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. - - The various functions support different classes of observer and - portions of the transformation chain: - - functions observer transformation - - Apcg Apcg13 geocentric ICRS <-> GCRS - Apci Apci13 terrestrial ICRS <-> CIRS - Apco Apco13 terrestrial ICRS <-> observed - Apcs Apcs13 space ICRS <-> GCRS - Aper Aper13 terrestrial update Earth rotation - Apio Apio13 terrestrial CIRS <-> observed - - Those with names ending in "13" use contemporary SOFA models to - compute the various ephemerides. The others accept ephemerides - supplied by the caller. - - The transformation from ICRS to GCRS covers space motion, - parallax, light deflection, and aberration. From GCRS to CIRS - comprises frame bias and precession-nutation. From CIRS to - observed takes account of Earth rotation, polar motion, diurnal - aberration and parallax (unless subsumed into the ICRS <-> GCRS - transformation), and atmospheric refraction. - -Called: - - Aper astrometry parameters: update ERA - Era00 Earth rotation angle, IAU 2000 -*/ -func Aper13(ut11, ut12 float64, astrom *ASTROM) { - Aper(Era00(ut11, ut12), astrom) -} - -/* -Apio Prepare for CIRS <-> observed, terrestrial, special - -For a terrestrial observer, prepare star-independent astrometry -parameters for transformations between CIRS and observed -coordinates. The caller supplies the Earth orientation information -and the refraction constants as well as the site coordinates. - -Given: - - sp float64 the TIO locator s' (radians, Note 1) - theta float64 Earth rotation angle (radians) - elong float64 longitude (radians, east +ve, Note 2) - phi float64 geodetic latitude (radians, Note 2) - hm float64 height above ellipsoid (m, geodetic Note 2) - xp,yp float64 polar motion coordinates (radians, Note 3) - refa float64 refraction constant A (radians, Note 4) - refb float64 refraction constant B (radians, Note 4) - -Returned: - - astrom ASTROM star-independent astrometry parameters: - pmt float64 unchanged - eb [3]float64 unchanged - eh [3]float64 unchanged - em float64 unchanged - v [3]float64 unchanged - bm1 float64 unchanged - bpn [3][3]float64 unchanged - along float64 adjusted longitude (radians) - xpl float64 polar motion xp wrt local meridian (radians) - ypl float64 polar motion yp wrt local meridian (radians) - sphi float64 sine of geodetic latitude - cphi float64 cosine of geodetic latitude - diurab float64 magnitude of diurnal aberration vector - eral float64 "local" Earth rotation angle (radians) - refa float64 refraction constant A (radians) - refb float64 refraction constant B (radians) - -Notes: - - 1. sp, the TIO locator s', is a tiny quantity needed only by the - most precise applications. It can either be set to zero or - predicted using the SOFA function Sp00. - - 2. The geographical coordinates are with respect to the WGS84 - reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the - longitude required by the present function is east-positive - (i.e. right-handed), in accordance with geographical convention. - - 3. The polar motion xp,yp can be obtained from IERS bulletins. The - values are the coordinates (in radians) of the Celestial - Intermediate Pole with respect to the International Terrestrial - Reference System (see IERS Conventions 2003), measured along the - meridians 0 and 90 deg west respectively. For many applications, - xp and yp can be set to zero. - - Internally, the polar motion is stored in a form rotated onto the - local meridian. - - 4. The refraction constants refa and refb are for use in a - dZ = A*tan(Z)+B*tan^3(Z) model, where Z is the observed - (i.e. refracted) zenith distance and dZ is the amount of - refraction. - - 5. It is advisable to take great care with units, as even unlikely - values of the input parameters are accepted and processed in - accordance with the models used. - - 6. In cases where the caller does not wish to provide the Earth - rotation information and refraction constants, the function - Apio13 can be used instead of the present function. This - starts from UTC and weather readings etc. and computes suitable - values using other SOFA functions. - - 7. This is one of several functions that inserts into the astrom - structure star-independent parameters needed for the chain of - astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. - - The various functions support different classes of observer and - portions of the transformation chain: - - functions observer transformation - - Apcg Apcg13 geocentric ICRS <-> GCRS - Apci Apci13 terrestrial ICRS <-> CIRS - Apco Apco13 terrestrial ICRS <-> observed - Apcs Apcs13 space ICRS <-> GCRS - Aper Aper13 terrestrial update Earth rotation - Apio Apio13 terrestrial CIRS <-> observed - - Those with names ending in "13" use contemporary SOFA models to - compute the various ephemerides. The others accept ephemerides - supplied by the caller. - - The transformation from ICRS to GCRS covers space motion, - parallax, light deflection, and aberration. From GCRS to CIRS - comprises frame bias and precession-nutation. From CIRS to - observed takes account of Earth rotation, polar motion, diurnal - aberration and parallax (unless subsumed into the ICRS <-> GCRS - transformation), and atmospheric refraction. - - 8. The context structure astrom produced by this function is used by - Atioq and Atoiq. - -Called: - - Ir initialize r-matrix to identity - Rz rotate around Z-axis - Ry rotate around Y-axis - Rx rotate around X-axis - Anpm normalize angle into range +/- pi - Pvtob position/velocity of terrestrial station -*/ -func Apio(sp, theta float64, elong, phi, hm, xp, yp float64, refa, refb float64, astrom *ASTROM) { - var r [3][3]float64 - var a, b, eral, c float64 - var pv [2][3]float64 - - /* Form the rotation matrix, CIRS to apparent [HA,Dec]. */ - Ir(&r) - Rz(theta+sp, &r) - Ry(-xp, &r) - Rx(-yp, &r) - Rz(elong, &r) - - /* Solve for local Earth rotation angle. */ - a = r[0][0] - b = r[0][1] - // eral = ( a != 0.0 || b != 0.0 ) ? atan2(b, a) : 0.0; - if a != 0.0 || b != 0.0 { - eral = atan2(b, a) - } else { - eral = 0.0 - } - astrom.Eral = eral - - /* Solve for polar motion [X,Y] with respect to local meridian. */ - a = r[0][0] - c = r[0][2] - astrom.Xpl = atan2(c, sqrt(a*a+b*b)) - a = r[1][2] - b = r[2][2] - // astrom.Ypl = ( a != 0.0 || b != 0.0 ) ? -atan2(a, b) : 0.0; - if a != 0.0 || b != 0.0 { - astrom.Ypl = -atan2(a, b) - } else { - astrom.Ypl = 0.0 - } - - /* Adjusted longitude. */ - astrom.Along = Anpm(eral - theta) - - /* Functions of latitude. */ - astrom.Sphi = sin(phi) - astrom.Cphi = cos(phi) - - /* Observer's geocentric position and velocity (m, m/s, CIRS). */ - Pvtob(elong, phi, hm, xp, yp, sp, theta, &pv) - - /* Magnitude of diurnal aberration vector. */ - astrom.Diurab = sqrt(pv[1][0]*pv[1][0]+pv[1][1]*pv[1][1]) / CMPS - - /* Refraction constants. */ - astrom.Refa = refa - astrom.Refb = refb -} - -/* -Apio13 Prepare for CIRS <-> observed, terrestrial - -For a terrestrial observer, prepare star-independent astrometry -parameters for transformations between CIRS and observed -coordinates. The caller supplies UTC, site coordinates, ambient air -conditions and observing wavelength. - -Given: - - utc1 float64 UTC as a 2-part... - utc2 float64 ...quasi Julian Date (Notes 1,2) - dut1 float64 UT1-UTC (seconds) - elong float64 longitude (radians, east +ve, Note 3) - phi float64 geodetic latitude (radians, Note 3) - hm float64 height above ellipsoid (m, geodetic Notes 4,6) - xp,yp float64 polar motion coordinates (radians, Note 5) - phpa float64 pressure at the observer (hPa = mB, Note 6) - tc float64 ambient temperature at the observer (deg C) - rh float64 relative humidity at the observer (range 0-1) - wl float64 wavelength (micrometers, Note 7) - -Returned: - - astrom ASTROM star-independent astrometry parameters: - pmt float64 unchanged - eb [3]float64 unchanged - eh [3]float64 unchanged - em float64 unchanged - v [3]float64 unchanged - bm1 float64 unchanged - bpn [3][3]float64 unchanged - along float64 longitude + s' (radians) - xpl float64 polar motion xp wrt local meridian (radians) - ypl float64 polar motion yp wrt local meridian (radians) - sphi float64 sine of geodetic latitude - cphi float64 cosine of geodetic latitude - diurab float64 magnitude of diurnal aberration vector - eral float64 "local" Earth rotation angle (radians) - refa float64 refraction constant A (radians) - refb float64 refraction constant B (radians) - -Returned (function value): - - int status: +1 = dubious year (Note 2) - 0 = OK - -1 = unacceptable date - -Notes: - - 1. utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any - convenient way between the two arguments, for example where utc1 - is the Julian Day Number and utc2 is the fraction of a day. - - However, JD cannot unambiguously represent UTC during a leap - second unless special measures are taken. The convention in the - present function is that the JD day represents UTC days whether - the length is 86399, 86400 or 86401 SI seconds. - - Applications should use the function Dtf2d to convert from - calendar date and time of day into 2-part quasi Julian Date, as - it implements the leap-second-ambiguity convention just - described. - - 2. The warning status "dubious year" flags UTCs that predate the - introduction of the time scale or that are too far in the future - to be trusted. See Dat for further details. - - 3. UT1-UTC is tabulated in IERS bulletins. It increases by exactly - one second at the end of each positive UTC leap second, - introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This - practice is under review, and in the future UT1-UTC may grow - essentially without limit. - - 4. The geographical coordinates are with respect to the WGS84 - reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the - longitude required by the present function is east-positive - (i.e. right-handed), in accordance with geographical convention. - - 5. The polar motion xp,yp can be obtained from IERS bulletins. The - values are the coordinates (in radians) of the Celestial - Intermediate Pole with respect to the International Terrestrial - Reference System (see IERS Conventions 2003), measured along the - meridians 0 and 90 deg west respectively. For many applications, - xp and yp can be set to zero. - - Internally, the polar motion is stored in a form rotated onto - the local meridian. - - 6. If hm, the height above the ellipsoid of the observing station - in meters, is not known but phpa, the pressure in hPa (=mB), is - available, an adequate estimate of hm can be obtained from the - expression - - hm = -29.3 * tsl * log ( phpa / 1013.25 ); - - where tsl is the approximate sea-level air temperature in K - (See Astrophysical Quantities, C.W.Allen, 3rd edition, section - 52). Similarly, if the pressure phpa is not known, it can be - estimated from the height of the observing station, hm, as - follows: - - phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) ); - - Note, however, that the refraction is nearly proportional to the - pressure and that an accurate phpa value is important for - precise work. - - 7. The argument wl specifies the observing wavelength in - micrometers. The transition from optical to radio is assumed to - occur at 100 micrometers (about 3000 GHz). - - 8. It is advisable to take great care with units, as even unlikely - values of the input parameters are accepted and processed in - accordance with the models used. - - 9. In cases where the caller wishes to supply his own Earth - rotation information and refraction constants, the function - Apc can be used instead of the present function. - - 10)This is one of several functions that inserts into the astrom - structure star-independent parameters needed for the chain of - astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. - - The various functions support different classes of observer and - portions of the transformation chain: - - functions observer transformation - - Apcg Apcg13 geocentric ICRS <-> GCRS - Apci Apci13 terrestrial ICRS <-> CIRS - Apco Apco13 terrestrial ICRS <-> observed - Apcs Apcs13 space ICRS <-> GCRS - Aper Aper13 terrestrial update Earth rotation - Apio Apio13 terrestrial CIRS <-> observed - - Those with names ending in "13" use contemporary SOFA models to - compute the various ephemerides. The others accept ephemerides - supplied by the caller. - - The transformation from ICRS to GCRS covers space motion, - parallax, light deflection, and aberration. From GCRS to CIRS - comprises frame bias and precession-nutation. From CIRS to - observed takes account of Earth rotation, polar motion, diurnal - aberration and parallax (unless subsumed into the ICRS <-> GCRS - transformation), and atmospheric refraction. - - 11)The context structure astrom produced by this function is used - by Atioq and Atoiq. - -Called: - - Utctai UTC to TAI - Taitt TAI to TT - Utcut1 UTC to UT1 - Sp00 the TIO locator s', IERS 2000 - Era00 Earth rotation angle, IAU 2000 - Refco refraction constants for given ambient conditions - Apio astrometry parameters, CIRS-observed -*/ -func Apio13(utc1, utc2, dut1 float64, elong, phi, hm, xp, yp float64, phpa, tc, rh, wl float64, astrom *ASTROM) int { - var j int - var tai1, tai2, tt1, tt2, ut11, ut12, sp, theta, refa, refb float64 - - /* UTC to other time scales. */ - j = Utctai(utc1, utc2, &tai1, &tai2) - if j < 0 { - return -1 - } - Taitt(tai1, tai2, &tt1, &tt2) - j = Utcut1(utc1, utc2, dut1, &ut11, &ut12) - if j < 0 { - return -1 - } - - /* TIO locator s'. */ - sp = Sp00(tt1, tt2) - - /* Earth rotation angle. */ - theta = Era00(ut11, ut12) - - /* Refraction constants A and B. */ - Refco(phpa, tc, rh, wl, &refa, &refb) - - /* CIRS <-> observed astrometry parameters. */ - Apio(sp, theta, elong, phi, hm, xp, yp, refa, refb, astrom) - - /* Return any warning status. */ - return j -} - -/* -Atcc13 J2000.0 catalog ICRS -> astrometric ICRS - -Transform a star's ICRS catalog entry (epoch J2000.0) into ICRS -astrometric place. - -Given: - - rc float64 ICRS right ascension at J2000.0 (radians, Note 1) - dc float64 ICRS declination at J2000.0 (radians, Note 1) - pr float64 RA proper motion (radians/year, Note 2) - pd float64 Dec proper motion (radians/year) - px float64 parallax (arcsec) - rv float64 radial velocity (km/s, +ve if receding) - date1 float64 TDB as a 2-part... - date2 float64 ...Julian Date (Note 3) - -Returned: - - ra,da float64 ICRS astrometric RA,Dec (radians) - -Notes: - - 1. Star data for an epoch other than J2000.0 (for example from the - Hipparcos catalog, which has an epoch of J1991.25) will require a - preliminary call to Pmsafe before use. - - 2. The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. - - 3. The TDB date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TDB)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. For most - applications of this function the choice will not be at all - critical. - - TT can be used instead of TDB without any significant impact on - accuracy. - -Called: - - Apci13 astrometry parameters, ICRS-CIRS, 2013 - Atccq quick catalog ICRS to astrometric -*/ -func Atcc13(rc, dc float64, pr, pd, px, rv float64, date1, date2 float64, ra, da *float64) { - /* Star-independent astrometry parameters */ - var astrom ASTROM - - var w float64 - - /* The transformation parameters. */ - Apci13(date1, date2, &astrom, &w) - - /* Catalog ICRS (epoch J2000.0) to astrometric. */ - Atccq(rc, dc, pr, pd, px, rv, &astrom, ra, da) -} - -/* -Atccq Astrometric ICRS -> J2000.0 catalog ICRS - -Quick transformation of a star's ICRS catalog entry (epoch J2000.0) -into ICRS astrometric place, given precomputed star-independent -astrometry parameters. - -Use of this function is appropriate when efficiency is important and -where many star positions are to be transformed for one date. The -star-independent parameters can be obtained by calling one of the -functions Apci[13], Apcg[13], Apco[13] or Apcs[13]. - -If the parallax and proper motions are zero the transformation has -no effect. - -Given: - - rc,dc float64 ICRS RA,Dec at J2000.0 (radians) - pr float64 RA proper motion (radians/year, Note 3) - pd float64 Dec proper motion (radians/year) - px float64 parallax (arcsec) - rv float64 radial velocity (km/s, +ve if receding) - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 longitude + s' (radians) - xpl float64 polar motion xp wrt local meridian (radians) - ypl float64 polar motion yp wrt local meridian (radians) - sphi float64 sine of geodetic latitude - cphi float64 cosine of geodetic latitude - diurab float64 magnitude of diurnal aberration vector - eral float64 "local" Earth rotation angle (radians) - refa float64 refraction constant A (radians) - refb float64 refraction constant B (radians) - -Returned: - - ra,da float64 ICRS astrometric RA,Dec (radians) - -Notes: - - 1. All the vectors are with respect to BCRS axes. - - 2. Star data for an epoch other than J2000.0 (for example from the - Hipparcos catalog, which has an epoch of J1991.25) will require a - preliminary call to Pmsafe before use. - - 3. The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. - -Called: - - Pmpx proper motion and parallax - C2s p-vector to spherical - Anp normalize angle into range 0 to 2pi -*/ -func Atccq(rc, dc float64, pr, pd, px, rv float64, astrom *ASTROM, ra, da *float64) { - var p [3]float64 - var w float64 - - /* Proper motion and parallax, giving BCRS coordinate direction. */ - Pmpx(rc, dc, pr, pd, px, rv, astrom.Pmt, astrom.Eb, &p) - - /* ICRS astrometric RA,Dec. */ - C2s(p, &w, da) - *ra = Anp(w) -} - -/* -Atci13 Catalog -> CIRS - -Transform ICRS star data, epoch J2000.0, to CIRS. - -Given: - - rc float64 ICRS right ascension at J2000.0 (radians, Note 1) - dc float64 ICRS declination at J2000.0 (radians, Note 1) - pr float64 RA proper motion (radians/year, Note 2) - pd float64 Dec proper motion (radians/year) - px float64 parallax (arcsec) - rv float64 radial velocity (km/s, +ve if receding) - date1 float64 TDB as a 2-part... - date2 float64 ...Julian Date (Note 3) - -Returned: - - ri,di float64 CIRS geocentric RA,Dec (radians) - eo float64 equation of the origins (ERA-GST, Note 5) - -Notes: - - 1. Star data for an epoch other than J2000.0 (for example from the - Hipparcos catalog, which has an epoch of J1991.25) will require a - preliminary call to Pmsafe before use. - - 2. The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. - - 3. The TDB date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TDB)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. For most - applications of this function the choice will not be at all - critical. - - TT can be used instead of TDB without any significant impact on - accuracy. - - 4. The available accuracy is better than 1 milliarcsecond, limited - mainly by the precession-nutation model that is used, namely - 2000A/2006. Very close to solar system bodies, additional - errors of up to several milliarcseconds can occur because of - unmodeled light deflection; however, the Sun's contribution is - taken into account, to first order. The accuracy limitations of - the SOFA function Epv00 (used to compute Earth position and - velocity) can contribute aberration errors of up to - 5 microarcseconds. Light deflection at the Sun's limb is - uncertain at the 0.4 mas level. - - 5. Should the transformation to (equinox based) apparent place be - required rather than (CIO based) intermediate place, subtract the - equation of the origins from the returned right ascension: - RA = RI - EO. (The Anp function can then be applied, as - required, to keep the result in the conventional 0-2pi range.) - -Called: - - Apci13 astrometry parameters, ICRS-CIRS, 2013 - Atciq quick ICRS to CIRS -*/ -func Atci13(rc, dc float64, pr, pd, px, rv float64, date1, date2 float64, ri, di, eo *float64) { - /* Star-independent astrometry parameters */ - var astrom ASTROM - - /* The transformation parameters. */ - Apci13(date1, date2, &astrom, eo) - - /* ICRS (epoch J2000.0) to CIRS. */ - Atciq(rc, dc, pr, pd, px, rv, &astrom, ri, di) -} - -/* -Atciq Quick ICRS -> CIRS - -Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed -star-independent astrometry parameters. - -Use of this function is appropriate when efficiency is important and -where many star positions are to be transformed for one date. The -star-independent parameters can be obtained by calling one of the -functions Apci[13], Apcg[13], Apco[13] or Apcs[13]. - -If the parallax and proper motions are zero the Atciqz function -can be used instead. - -Given: - - rc,dc float64 ICRS RA,Dec at J2000.0 (radians) - pr float64 RA proper motion (radians/year, Note 3) - pd float64 Dec proper motion (radians/year) - px float64 parallax (arcsec) - rv float64 radial velocity (km/s, +ve if receding) - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 longitude + s' (radians) - xpl float64 polar motion xp wrt local meridian (radians) - ypl float64 polar motion yp wrt local meridian (radians) - sphi float64 sine of geodetic latitude - cphi float64 cosine of geodetic latitude - diurab float64 magnitude of diurnal aberration vector - eral float64 "local" Earth rotation angle (radians) - refa float64 refraction constant A (radians) - refb float64 refraction constant B (radians) - -Returned: - - ri,di float64 CIRS RA,Dec (radians) - -Notes: - - 1. Star data for an epoch other than J2000.0 (for example from the - Hipparcos catalog, which has an epoch of J1991.25) will require a - preliminary call to Pmsafe before use. - - 2. The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. - -Called: - - Pmpx proper motion and parallax - Ldsun light deflection by the Sun - Ab stellar aberration - Rxp product of r-matrix and pv-vector - C2s p-vector to spherical - Anp normalize angle into range 0 to 2pi -*/ -func Atciq(rc, dc float64, pr, pd, px, rv float64, astrom *ASTROM, ri, di *float64) { - var pco, pnat, ppr, pi [3]float64 - var w float64 - - /* Proper motion and parallax, giving BCRS coordinate direction. */ - Pmpx(rc, dc, pr, pd, px, rv, astrom.Pmt, astrom.Eb, &pco) - - /* Light deflection by the Sun, giving BCRS natural direction. */ - Ldsun(pco, astrom.Eh, astrom.Em, &pnat) - - /* Aberration, giving GCRS proper direction. */ - Ab(pnat, astrom.V, astrom.Em, astrom.Bm1, &ppr) - - /* Bias-precession-nutation, giving CIRS proper direction. */ - Rxp(astrom.Bpn, ppr, &pi) - - /* CIRS RA,Dec. */ - C2s(pi, &w, di) - *ri = Anp(w) -} - -/* -Atciqn Quick ICRS -> CIRS, multiple deflections - -Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed -star-independent astrometry parameters plus a list of light- -deflecting bodies. - -Use of this function is appropriate when efficiency is important and -where many star positions are to be transformed for one date. The -star-independent parameters can be obtained by calling one of the -functions Apci[13], Apcg[13], Apco[13] or Apcs[13]. - -If the only light-deflecting body to be taken into account is the -Sun, the Atciq function can be used instead. If in addition the -parallax and proper motions are zero, the Atciqz function can be -used. - -Given: - - rc,dc float64 ICRS RA,Dec at J2000.0 (radians) - pr float64 RA proper motion (radians/year, Note 3) - pd float64 Dec proper motion (radians/year) - px float64 parallax (arcsec) - rv float64 radial velocity (km/s, +ve if receding) - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 longitude + s' (radians) - xpl float64 polar motion xp wrt local meridian (radians) - ypl float64 polar motion yp wrt local meridian (radians) - sphi float64 sine of geodetic latitude - cphi float64 cosine of geodetic latitude - diurab float64 magnitude of diurnal aberration vector - eral float64 "local" Earth rotation angle (radians) - refa float64 refraction constant A (radians) - refb float64 refraction constant B (radians) - n int number of bodies (Note 3) - b LDBODY[n] data for each of the n bodies (Notes 3,4): - bm float64 mass of the body (solar masses, Note 5) - dl float64 deflection limiter (Note 6) - pv [2][3]float64 barycentric PV of the body (au, au/day) - -Returned: - - ri,di float64 CIRS RA,Dec (radians) - -Notes: - - 1. Star data for an epoch other than J2000.0 (for example from the - Hipparcos catalog, which has an epoch of J1991.25) will require a - preliminary call to Pmsafe before use. - - 2. The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. - - 3. The struct b contains n entries, one for each body to be - considered. If n = 0, no gravitational light deflection will be - applied, not even for the Sun. - - 4. The struct b should include an entry for the Sun as well as for - any planet or other body to be taken into account. The entries - should be in the order in which the light passes the body. - - 5. In the entry in the b struct for body i, the mass parameter - b[i].bm can, as required, be adjusted in order to allow for such - effects as quadrupole field. - - 6. The deflection limiter parameter b[i].dl is phi^2/2, where phi is - the angular separation (in radians) between star and body at - which limiting is applied. As phi shrinks below the chosen - threshold, the deflection is artificially reduced, reaching zero - for phi = 0. Example values suitable for a terrestrial - observer, together with masses, are as follows: - - body i b[i].bm b[i].dl - - Sun 1.0 6e-6 - Jupiter 0.00095435 3e-9 - Saturn 0.00028574 3e-10 - - 7. For efficiency, validation of the contents of the b array is - omitted. The supplied masses must be greater than zero, the - position and velocity vectors must be right, and the deflection - limiter greater than zero. - -Called: - - Pmpx proper motion and parallax - Ldn light deflection by n bodies - Ab stellar aberration - Rxp product of r-matrix and pv-vector - C2s p-vector to spherical - Anp normalize angle into range 0 to 2pi -*/ -func Atciqn(rc, dc float64, pr, pd, px, rv float64, astrom *ASTROM, n int, b []LDBODY, ri, di *float64) { - var pco, pnat, ppr, pi [3]float64 - var w float64 - - /* Proper motion and parallax, giving BCRS coordinate direction. */ - Pmpx(rc, dc, pr, pd, px, rv, astrom.Pmt, astrom.Eb, &pco) - - /* Light deflection, giving BCRS natural direction. */ - Ldn(n, b, astrom.Eb, pco, &pnat) - - /* Aberration, giving GCRS proper direction. */ - Ab(pnat, astrom.V, astrom.Em, astrom.Bm1, &ppr) - - /* Bias-precession-nutation, giving CIRS proper direction. */ - Rxp(astrom.Bpn, ppr, &pi) - - /* CIRS RA,Dec. */ - C2s(pi, &w, di) - *ri = Anp(w) -} - -/* -Atciqz Quick astrometric ICRS -> CIRS - -Quick ICRS to CIRS transformation, given precomputed star- -independent astrometry parameters, and assuming zero parallax and -proper motion. - -Use of this function is appropriate when efficiency is important and -where many star positions are to be transformed for one date. The -star-independent parameters can be obtained by calling one of the -functions Apci[13], Apcg[13], Apco[13] or Apcs[13]. - -The corresponding function for the case of non-zero parallax and -proper motion is Atciq. - -Given: - - rc,dc float64 ICRS astrometric RA,Dec (radians) - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 longitude + s' (radians) - xpl float64 polar motion xp wrt local meridian (radians) - ypl float64 polar motion yp wrt local meridian (radians) - sphi float64 sine of geodetic latitude - cphi float64 cosine of geodetic latitude - diurab float64 magnitude of diurnal aberration vector - eral float64 "local" Earth rotation angle (radians) - refa float64 refraction constant A (radians) - refb float64 refraction constant B (radians) - -Returned: - - ri,di float64 CIRS RA,Dec (radians) - -Note: - - All the vectors are with respect to BCRS axes. - -References: - - Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to - the Astronomical Almanac, 3rd ed., University Science Books - (2013). - - Klioner, Sergei A., "A practical relativistic model for micro- - arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003). - -Called: - - S2c spherical coordinates to unit vector - Ldsun light deflection due to Sun - Ab stellar aberration - Rxp product of r-matrix and p-vector - C2s p-vector to spherical - Anp normalize angle into range +/- pi -*/ -func Atciqz(rc, dc float64, astrom *ASTROM, ri, di *float64) { - var pco, pnat, ppr, pi [3]float64 - var w float64 - - /* BCRS coordinate direction (unit vector). */ - S2c(rc, dc, &pco) - - /* Light deflection by the Sun, giving BCRS natural direction. */ - Ldsun(pco, astrom.Eh, astrom.Em, &pnat) - - /* Aberration, giving GCRS proper direction. */ - Ab(pnat, astrom.V, astrom.Em, astrom.Bm1, &ppr) - - /* Bias-precession-nutation, giving CIRS proper direction. */ - Rxp(astrom.Bpn, ppr, &pi) - - /* CIRS RA,Dec. */ - C2s(pi, &w, di) - *ri = Anp(w) -} - -/* -Atco13 ICRS -> observed - -ICRS RA,Dec to observed place. The caller supplies UTC, site -coordinates, ambient air conditions and observing wavelength. - -SOFA models are used for the Earth ephemeris, bias-precession- -nutation, Earth orientation and refraction. - -Given: - - rc,dc float64 ICRS right ascension at J2000.0 (radians, Note 1) - pr float64 RA proper motion (radians/year, Note 2) - pd float64 Dec proper motion (radians/year) - px float64 parallax (arcsec) - rv float64 radial velocity (km/s, +ve if receding) - utc1 float64 UTC as a 2-part... - utc2 float64 ...quasi Julian Date (Notes 3-4) - dut1 float64 UT1-UTC (seconds, Note 5) - elong float64 longitude (radians, east +ve, Note 6) - phi float64 latitude (geodetic, radians, Note 6) - hm float64 height above ellipsoid (m, geodetic, Notes 6,8) - xp,yp float64 polar motion coordinates (radians, Note 7) - phpa float64 pressure at the observer (hPa = mB, Note 8) - tc float64 ambient temperature at the observer (deg C) - rh float64 relative humidity at the observer (range 0-1) - wl float64 wavelength (micrometers, Note 9) - -Returned: - - aob float64 observed azimuth (radians: N=0,E=90) - zob float64 observed zenith distance (radians) - hob float64 observed hour angle (radians) - dob float64 observed declination (radians) - rob float64 observed right ascension (CIO-based, radians) - eo float64 equation of the origins (ERA-GST) - -Returned (function value): - - int status: +1 = dubious year (Note 4) - 0 = OK - -1 = unacceptable date - -Notes: - - 1. Star data for an epoch other than J2000.0 (for example from the - Hipparcos catalog, which has an epoch of J1991.25) will require - a preliminary call to Pmsafe before use. - - 2. The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. - - 3. utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any - convenient way between the two arguments, for example where utc1 - is the Julian Day Number and utc2 is the fraction of a day. - - However, JD cannot unambiguously represent UTC during a leap - second unless special measures are taken. The convention in the - present function is that the JD day represents UTC days whether - the length is 86399, 86400 or 86401 SI seconds. - - Applications should use the function Dtf2d to convert from - calendar date and time of day into 2-part quasi Julian Date, as - it implements the leap-second-ambiguity convention just - described. - - 4. The warning status "dubious year" flags UTCs that predate the - introduction of the time scale or that are too far in the - future to be trusted. See Dat for further details. - - 5. UT1-UTC is tabulated in IERS bulletins. It increases by exactly - one second at the end of each positive UTC leap second, - introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This - practice is under review, and in the future UT1-UTC may grow - essentially without limit. - - 6. The geographical coordinates are with respect to the WGS84 - reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the - longitude required by the present function is east-positive - (i.e. right-handed), in accordance with geographical convention. - - 7. The polar motion xp,yp can be obtained from IERS bulletins. The - values are the coordinates (in radians) of the Celestial - Intermediate Pole with respect to the International Terrestrial - Reference System (see IERS Conventions 2003), measured along the - meridians 0 and 90 deg west respectively. For many - applications, xp and yp can be set to zero. - - 8. If hm, the height above the ellipsoid of the observing station - in meters, is not known but phpa, the pressure in hPa (=mB), - is available, an adequate estimate of hm can be obtained from - the expression - - hm = -29.3 * tsl * log ( phpa / 1013.25 ); - - where tsl is the approximate sea-level air temperature in K - (See Astrophysical Quantities, C.W.Allen, 3rd edition, section - 52). Similarly, if the pressure phpa is not known, it can be - estimated from the height of the observing station, hm, as - follows: - - phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) ); - - Note, however, that the refraction is nearly proportional to - the pressure and that an accurate phpa value is important for - precise work. - - 9. The argument wl specifies the observing wavelength in - micrometers. The transition from optical to radio is assumed to - occur at 100 micrometers (about 3000 GHz). - - 10)The accuracy of the result is limited by the corrections for - refraction, which use a simple A*tan(z) + B*tan^3(z) model. - Providing the meteorological parameters are known accurately and - there are no gross local effects, the predicted observed - coordinates should be within 0.05 arcsec (optical) or 1 arcsec - (radio) for a zenith distance of less than 70 degrees, better - than 30 arcsec (optical or radio) at 85 degrees and better - than 20 arcmin (optical) or 30 arcmin (radio) at the horizon. - - Without refraction, the complementary functions Atco13 and - Atoc13 are self-consistent to better than 1 microarcsecond - all over the celestial sphere. With refraction included, - consistency falls off at high zenith distances, but is still - better than 0.05 arcsec at 85 degrees. - - 11)"Observed" Az,ZD means the position that would be seen by a - perfect geodetically aligned theodolite. (Zenith distance is - used rather than altitude in order to reflect the fact that no - allowance is made for depression of the horizon.) This is - related to the observed HA,Dec via the standard rotation, using - the geodetic latitude (corrected for polar motion), while the - observed HA and RA are related simply through the Earth rotation - angle and the site longitude. "Observed" RA,Dec or HA,Dec thus - means the position that would be seen by a perfect equatorial - with its polar axis aligned to the Earth's axis of rotation. - - 12)It is advisable to take great care with units, as even unlikely - values of the input parameters are accepted and processed in - accordance with the models used. - -Called: - - Apco13 astrometry parameters, ICRS-observed, 2013 - Atciq quick ICRS to CIRS - Atioq quick CIRS to observed -*/ -func Atco13(rc, dc float64, pr, pd, px, rv float64, utc1, utc2, dut1 float64, - elong, phi, hm, xp, yp float64, phpa, tc, rh, wl float64, - aob, zob, hob *float64, dob, rob, eo *float64) int { - var j int - var astrom ASTROM - var ri, di float64 - - /* Star-independent astrometry parameters. */ - j = Apco13(utc1, utc2, dut1, elong, phi, hm, xp, yp, - phpa, tc, rh, wl, &astrom, eo) - - /* Abort if bad UTC. */ - if j < 0 { - return j - } - - /* Transform ICRS to CIRS. */ - Atciq(rc, dc, pr, pd, px, rv, &astrom, &ri, &di) - - /* Transform CIRS to observed. */ - Atioq(ri, di, &astrom, aob, zob, hob, dob, rob) - - /* Return OK/warning status. */ - return j -} - -/* -Atic13 CIRS -> ICRS - -Transform star RA,Dec from geocentric CIRS to ICRS astrometric. - -Given: - - ri,di float64 CIRS geocentric RA,Dec (radians) - date1 float64 TDB as a 2-part... - date2 float64 ...Julian Date (Note 1) - -Returned: - - rc,dc float64 ICRS astrometric RA,Dec (radians) - eo float64 equation of the origins (ERA-GST, Note 4) - -Notes: - - 1. The TDB date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TDB)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. For most - applications of this function the choice will not be at all - critical. - - TT can be used instead of TDB without any significant impact on - accuracy. - - 2. Iterative techniques are used for the aberration and light - deflection corrections so that the functions Atic13 (or - Aticq) and Atci13 (or Atciq) are accurate inverses; - even at the edge of the Sun's disk the discrepancy is only about - 1 nanoarcsecond. - - 3. The available accuracy is better than 1 milliarcsecond, limited - mainly by the precession-nutation model that is used, namely - 2000A/2006. Very close to solar system bodies, additional - errors of up to several milliarcseconds can occur because of - unmodeled light deflection; however, the Sun's contribution is - taken into account, to first order. The accuracy limitations of - the SOFA function Epv00 (used to compute Earth position and - velocity) can contribute aberration errors of up to - 5 microarcseconds. Light deflection at the Sun's limb is - uncertain at the 0.4 mas level. - - 4. Should the transformation to (equinox based) J2000.0 mean place - be required rather than (CIO based) ICRS coordinates, subtract the - equation of the origins from the returned right ascension: - RA = RI - EO. (The Anp function can then be applied, as - required, to keep the result in the conventional 0-2pi range.) - -Called: - - Apci13 astrometry parameters, ICRS-CIRS, 2013 - Aticq quick CIRS to ICRS astrometric -*/ -func Atic13(ri, di float64, date1, date2 float64, rc, dc, eo *float64) { - /* Star-independent astrometry parameters */ - var astrom ASTROM - - /* Star-independent astrometry parameters. */ - Apci13(date1, date2, &astrom, eo) - - /* CIRS to ICRS astrometric. */ - Aticq(ri, di, &astrom, rc, dc) -} - -/* -Aticq Quick CIRS -> ICRS - -Quick CIRS RA,Dec to ICRS astrometric place, given the star- -independent astrometry parameters. - -Use of this function is appropriate when efficiency is important and -where many star positions are all to be transformed for one date. -The star-independent astrometry parameters can be obtained by -calling one of the functions Apci[13], Apcg[13], Apco[13] -or Apcs[13]. - -Given: - - ri,di float64 CIRS RA,Dec (radians) - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 longitude + s' (radians) - xpl float64 polar motion xp wrt local meridian (radians) - ypl float64 polar motion yp wrt local meridian (radians) - sphi float64 sine of geodetic latitude - cphi float64 cosine of geodetic latitude - diurab float64 magnitude of diurnal aberration vector - eral float64 "local" Earth rotation angle (radians) - refa float64 refraction constant A (radians) - refb float64 refraction constant B (radians) - -Returned: - - rc,dc float64 ICRS astrometric RA,Dec (radians) - -Notes: - - 1. Only the Sun is taken into account in the light deflection - correction. - - 2. Iterative techniques are used for the aberration and light - deflection corrections so that the functions Atic13 (or - Aticq) and Atci13 (or Atciq) are accurate inverses; - even at the edge of the Sun's disk the discrepancy is only about - 1 nanoarcsecond. - -Called: - - S2c spherical coordinates to unit vector - Trxp product of transpose of r-matrix and p-vector - Zp zero p-vector - Ab stellar aberration - Ldsun light deflection by the Sun - C2s p-vector to spherical - Anp normalize angle into range +/- pi -*/ -func Aticq(ri, di float64, astrom *ASTROM, rc, dc *float64) { - var j, i int - var pi, ppr, pnat, pco, d, before, after [3]float64 - var w, r2, r float64 - - /* CIRS RA,Dec to Cartesian. */ - S2c(ri, di, &pi) - - /* Bias-precession-nutation, giving GCRS proper direction. */ - Trxp(astrom.Bpn, pi, &ppr) - - /* Aberration, giving GCRS natural direction. */ - Zp(&d) - for j = 0; j < 2; j++ { - r2 = 0.0 - for i = 0; i < 3; i++ { - w = ppr[i] - d[i] - before[i] = w - r2 += w * w - } - r = sqrt(r2) - for i = 0; i < 3; i++ { - before[i] /= r - } - Ab(before, astrom.V, astrom.Em, astrom.Bm1, &after) - r2 = 0.0 - for i = 0; i < 3; i++ { - d[i] = after[i] - before[i] - w = ppr[i] - d[i] - pnat[i] = w - r2 += w * w - } - r = sqrt(r2) - for i = 0; i < 3; i++ { - pnat[i] /= r - } - } - - /* Light deflection by the Sun, giving BCRS coordinate direction. */ - Zp(&d) - for j = 0; j < 5; j++ { - r2 = 0.0 - for i = 0; i < 3; i++ { - w = pnat[i] - d[i] - before[i] = w - r2 += w * w - } - r = sqrt(r2) - for i = 0; i < 3; i++ { - before[i] /= r - } - Ldsun(before, astrom.Eh, astrom.Em, &after) - r2 = 0.0 - for i = 0; i < 3; i++ { - d[i] = after[i] - before[i] - w = pnat[i] - d[i] - pco[i] = w - r2 += w * w - } - r = sqrt(r2) - for i = 0; i < 3; i++ { - pco[i] /= r - } - } - - /* ICRS astrometric RA,Dec. */ - C2s(pco, &w, dc) - *rc = Anp(w) -} - -/* -Aticqn Quick CIRS -> ICRS, multiple deflections - -Quick CIRS to ICRS astrometric place transformation, given the star- -independent astrometry parameters plus a list of light-deflecting -bodies. - -Use of this function is appropriate when efficiency is important and -where many star positions are all to be transformed for one date. -The star-independent astrometry parameters can be obtained by -calling one of the functions Apci[13], Apcg[13], Apco[13] -or Apcs[13]. - -If the only light-deflecting body to be taken into account is the -Sun, the Aticq function can be used instead. - -Given: - - ri,di double CIRS RA,Dec (radians) - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 longitude + s' (radians) - xpl float64 polar motion xp wrt local meridian (radians) - ypl float64 polar motion yp wrt local meridian (radians) - sphi float64 sine of geodetic latitude - cphi float64 cosine of geodetic latitude - diurab float64 magnitude of diurnal aberration vector - eral float64 "local" Earth rotation angle (radians) - refa float64 refraction constant A (radians) - refb float64 refraction constant B (radians) - n int number of bodies (Note 3) - b LDBODY[n] data for each of the n bodies (Notes 3,4): - bm float64 mass of the body (solar masses, Note 5) - dl float64 deflection limiter (Note 6) - pv [2][3]float64 barycentric PV of the body (au, au/day) - -Returned: - - rc,dc float64 ICRS astrometric RA,Dec (radians) - -Notes: - - 1. Iterative techniques are used for the aberration and light - deflection corrections so that the functions Aticqn and - Atciqn are accurate inverses; even at the edge of the Sun's - disk the discrepancy is only about 1 nanoarcsecond. - - 2. If the only light-deflecting body to be taken into account is the - Sun, the Aticq function can be used instead. - - 3. The struct b contains n entries, one for each body to be - considered. If n = 0, no gravitational light deflection will be - applied, not even for the Sun. - - 4. The struct b should include an entry for the Sun as well as for - any planet or other body to be taken into account. The entries - should be in the order in which the light passes the body. - - 5. In the entry in the b struct for body i, the mass parameter - b[i].bm can, as required, be adjusted in order to allow for such - effects as quadrupole field. - - 6. The deflection limiter parameter b[i].dl is phi^2/2, where phi is - the angular separation (in radians) between star and body at - which limiting is applied. As phi shrinks below the chosen - threshold, the deflection is artificially reduced, reaching zero - for phi = 0. Example values suitable for a terrestrial - observer, together with masses, are as follows: - - body i b[i].bm b[i].dl - - Sun 1.0 6e-6 - Jupiter 0.00095435 3e-9 - Saturn 0.00028574 3e-10 - - 7. For efficiency, validation of the contents of the b array is - omitted. The supplied masses must be greater than zero, the - position and velocity vectors must be right, and the deflection - limiter greater than zero. - -Called: - - S2c spherical coordinates to unit vector - Trxp product of transpose of r-matrix and p-vector - Zp zero p-vector - Ab stellar aberration - Ldn light deflection by n bodies - C2s p-vector to spherical - Anp normalize angle into range +/- pi -*/ -func Aticqn(ri, di float64, astrom *ASTROM, n int, b []LDBODY, rc, dc *float64) { - var j, i int - var pi, ppr, pnat, pco, d, before, after [3]float64 - var w, r2, r float64 - - /* CIRS RA,Dec to Cartesian. */ - S2c(ri, di, &pi) - - /* Bias-precession-nutation, giving GCRS proper direction. */ - Trxp(astrom.Bpn, pi, &ppr) - - /* Aberration, giving GCRS natural direction. */ - Zp(&d) - for j = 0; j < 2; j++ { - r2 = 0.0 - for i = 0; i < 3; i++ { - w = ppr[i] - d[i] - before[i] = w - r2 += w * w - } - r = sqrt(r2) - for i = 0; i < 3; i++ { - before[i] /= r - } - Ab(before, astrom.V, astrom.Em, astrom.Bm1, &after) - r2 = 0.0 - for i = 0; i < 3; i++ { - d[i] = after[i] - before[i] - w = ppr[i] - d[i] - pnat[i] = w - r2 += w * w - } - r = sqrt(r2) - for i = 0; i < 3; i++ { - pnat[i] /= r - } - } - - /* Light deflection, giving BCRS coordinate direction. */ - Zp(&d) - for j = 0; j < 5; j++ { - r2 = 0.0 - for i = 0; i < 3; i++ { - w = pnat[i] - d[i] - before[i] = w - r2 += w * w - } - r = sqrt(r2) - for i = 0; i < 3; i++ { - before[i] /= r - } - Ldn(n, b, astrom.Eb, before, &after) - r2 = 0.0 - for i = 0; i < 3; i++ { - d[i] = after[i] - before[i] - w = pnat[i] - d[i] - pco[i] = w - r2 += w * w - } - r = sqrt(r2) - for i = 0; i < 3; i++ { - pco[i] /= r - } - } - - /* ICRS astrometric RA,Dec. */ - C2s(pco, &w, dc) - *rc = Anp(w) -} - -/* -Atio13 CIRS -> observed - -CIRS RA,Dec to observed place. The caller supplies UTC, site -coordinates, ambient air conditions and observing wavelength. - -Given: - - ri float64 CIRS right ascension (CIO-based, radians) - di float64 CIRS declination (radians) - utc1 float64 UTC as a 2-part... - utc2 float64 ...quasi Julian Date (Notes 1,2) - dut1 float64 UT1-UTC (seconds, Note 3) - elong float64 longitude (radians, east +ve, Note 4) - phi float64 geodetic latitude (radians, Note 4) - hm float64 height above ellipsoid (m, geodetic Notes 4,6) - xp,yp float64 polar motion coordinates (radians, Note 5) - phpa float64 pressure at the observer (hPa = mB, Note 6) - tc float64 ambient temperature at the observer (deg C) - rh float64 relative humidity at the observer (range 0-1) - wl float64 wavelength (micrometers, Note 7) - -Returned: - - aob float64 observed azimuth (radians: N=0,E=90) - zob float64 observed zenith distance (radians) - hob float64 observed hour angle (radians) - dob float64 observed declination (radians) - rob float64 observed right ascension (CIO-based, radians) - -Returned (function value): - - int status: +1 = dubious year (Note 2) - 0 = OK - -1 = unacceptable date - -Notes: - - 1. utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any - convenient way between the two arguments, for example where utc1 - is the Julian Day Number and utc2 is the fraction of a day. - - However, JD cannot unambiguously represent UTC during a leap - second unless special measures are taken. The convention in the - present function is that the JD day represents UTC days whether - the length is 86399, 86400 or 86401 SI seconds. - - Applications should use the function Dtf2d to convert from - calendar date and time of day into 2-part quasi Julian Date, as - it implements the leap-second-ambiguity convention just - described. - - 2. The warning status "dubious year" flags UTCs that predate the - introduction of the time scale or that are too far in the - future to be trusted. See Dat for further details. - - 3. UT1-UTC is tabulated in IERS bulletins. It increases by exactly - one second at the end of each positive UTC leap second, - introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This - practice is under review, and in the future UT1-UTC may grow - essentially without limit. - - 4. The geographical coordinates are with respect to the WGS84 - reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the - longitude required by the present function is east-positive - (i.e. right-handed), in accordance with geographical convention. - - 5. The polar motion xp,yp can be obtained from IERS bulletins. The - values are the coordinates (in radians) of the Celestial - Intermediate Pole with respect to the International Terrestrial - Reference System (see IERS Conventions 2003), measured along the - meridians 0 and 90 deg west respectively. For many - applications, xp and yp can be set to zero. - - 6. If hm, the height above the ellipsoid of the observing station - in meters, is not known but phpa, the pressure in hPa (=mB), is - available, an adequate estimate of hm can be obtained from the - expression - - hm = -29.3 * tsl * log ( phpa / 1013.25 ); - - where tsl is the approximate sea-level air temperature in K - (See Astrophysical Quantities, C.W.Allen, 3rd edition, section - 52). Similarly, if the pressure phpa is not known, it can be - estimated from the height of the observing station, hm, as - follows: - - phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) ); - - Note, however, that the refraction is nearly proportional to - the pressure and that an accurate phpa value is important for - precise work. - - 7. The argument wl specifies the observing wavelength in - micrometers. The transition from optical to radio is assumed to - occur at 100 micrometers (about 3000 GHz). - - 8. "Observed" Az,ZD means the position that would be seen by a - perfect geodetically aligned theodolite. (Zenith distance is - used rather than altitude in order to reflect the fact that no - allowance is made for depression of the horizon.) This is - related to the observed HA,Dec via the standard rotation, using - the geodetic latitude (corrected for polar motion), while the - observed HA and RA are related simply through the Earth rotation - angle and the site longitude. "Observed" RA,Dec or HA,Dec thus - means the position that would be seen by a perfect equatorial - with its polar axis aligned to the Earth's axis of rotation. - - 9. The accuracy of the result is limited by the corrections for - refraction, which use a simple A*tan(z) + B*tan^3(z) model. - Providing the meteorological parameters are known accurately and - there are no gross local effects, the predicted astrometric - coordinates should be within 0.05 arcsec (optical) or 1 arcsec - (radio) for a zenith distance of less than 70 degrees, better - than 30 arcsec (optical or radio) at 85 degrees and better - than 20 arcmin (optical) or 30 arcmin (radio) at the horizon. - - 10)The complementary functions Atio13 and Atoi13 are self- - consistent to better than 1 microarcsecond all over the - celestial sphere. - - 11)It is advisable to take great care with units, as even unlikely - values of the input parameters are accepted and processed in - accordance with the models used. - -Called: - - Apio13 astrometry parameters, CIRS-observed, 2013 - Atioq quick CIRS to observed -*/ -func Atio13(ri, di float64, utc1, utc2, dut1 float64, elong, phi, hm, xp, yp float64, phpa, tc, rh, wl float64, - aob, zob, hob *float64, dob, rob *float64) int { - var j int - var astrom ASTROM - - /* Star-independent astrometry parameters for CIRS->observed. */ - j = Apio13(utc1, utc2, dut1, elong, phi, hm, xp, yp, - phpa, tc, rh, wl, &astrom) - - /* Abort if bad UTC. */ - if j < 0 { - return j - } - - /* Transform CIRS to observed. */ - Atioq(ri, di, &astrom, aob, zob, hob, dob, rob) - - /* Return OK/warning status. */ - return j -} - -/* -Atioq Quick CIRS -> observed - -Quick CIRS to observed place transformation. - -Use of this function is appropriate when efficiency is important and -where many star positions are all to be transformed for one date. -The star-independent astrometry parameters can be obtained by -calling Apio[13] or Apco[13]. - -Given: - - ri float64 CIRS right ascension - di float64 CIRS declination - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 longitude + s' (radians) - xpl float64 polar motion xp wrt local meridian (radians) - ypl float64 polar motion yp wrt local meridian (radians) - sphi float64 sine of geodetic latitude - cphi float64 cosine of geodetic latitude - diurab float64 magnitude of diurnal aberration vector - eral float64 "local" Earth rotation angle (radians) - refa float64 refraction constant A (radians) - refb float64 refraction constant B (radians) - -Returned: - - aob float64 observed azimuth (radians: N=0,E=90) - zob float64 observed zenith distance (radians) - hob float64 observed hour angle (radians) - dob float64 observed declination (radians) - rob float64 observed right ascension (CIO-based, radians) - -Notes: - - 1. This function returns zenith distance rather than altitude in - order to reflect the fact that no allowance is made for - depression of the horizon. - - 2. The accuracy of the result is limited by the corrections for - refraction, which use a simple A*tan(z) + B*tan^3(z) model. - Providing the meteorological parameters are known accurately and - there are no gross local effects, the predicted observed - coordinates should be within 0.05 arcsec (optical) or 1 arcsec - (radio) for a zenith distance of less than 70 degrees, better - than 30 arcsec (optical or radio) at 85 degrees and better - than 20 arcmin (optical) or 30 arcmin (radio) at the horizon. - - Without refraction, the complementary functions Atioq and - Atoiq are self-consistent to better than 1 microarcsecond all - over the celestial sphere. With refraction included, consistency - falls off at high zenith distances, but is still better than - 0.05 arcsec at 85 degrees. - - 3. It is advisable to take great care with units, as even unlikely - values of the input parameters are accepted and processed in - accordance with the models used. - - 4. The CIRS RA,Dec is obtained from a star catalog mean place by - allowing for space motion, parallax, the Sun's gravitational lens - effect, annual aberration and precession-nutation. For star - positions in the ICRS, these effects can be applied by means of - the Atci13 (etc.) functions. Starting from classical "mean - place" systems, additional transformations will be needed first. - - 5. "Observed" Az,El means the position that would be seen by a - perfect geodetically aligned theodolite. This is obtained from - the CIRS RA,Dec by allowing for Earth orientation and diurnal - aberration, rotating from equator to horizon coordinates, and - then adjusting for refraction. The HA,Dec is obtained by - rotating back into equatorial coordinates, and is the position - that would be seen by a perfect equatorial with its polar axis - aligned to the Earth's axis of rotation. Finally, the RA is - obtained by subtracting the HA from the local ERA. - - 6. The star-independent CIRS-to-observed-place parameters in ASTROM - may be computed with Apio[13] or Apco[13]. If nothing has - changed significantly except the time, Aper[13] may be used to - perform the requisite adjustment to the astrom structure. - -Called: - - S2c spherical coordinates to unit vector - C2s p-vector to spherical - Anp normalize angle into range 0 to 2pi -*/ -func Atioq(ri, di float64, astrom *ASTROM, aob, zob *float64, hob, dob, rob *float64) { - /* Minimum cos(alt) and sin(alt) for refraction purposes */ - const CELMIN = 1e-6 - const SELMIN = 0.05 - - var v [3]float64 - var x, y, z, sx, cx, sy, cy, xhd, yhd, zhd, f, - xhdt, yhdt, zhdt, xaet, yaet, zaet, azobs, r, tz, w, del, - cosdel, xaeo, yaeo, zaeo, zdobs, hmobs, dcobs, raobs float64 - - /* CIRS RA,Dec to Cartesian -HA,Dec. */ - S2c(ri-astrom.Eral, di, &v) - x = v[0] - y = v[1] - z = v[2] - - /* Polar motion. */ - sx = sin(astrom.Xpl) - cx = cos(astrom.Xpl) - sy = sin(astrom.Ypl) - cy = cos(astrom.Ypl) - xhd = cx*x + sx*z - yhd = sx*sy*x + cy*y - cx*sy*z - zhd = -sx*cy*x + sy*y + cx*cy*z - - /* Diurnal aberration. */ - f = (1.0 - astrom.Diurab*yhd) - xhdt = f * xhd - yhdt = f * (yhd + astrom.Diurab) - zhdt = f * zhd - - /* Cartesian -HA,Dec to Cartesian Az,El (S=0,E=90). */ - xaet = astrom.Sphi*xhdt - astrom.Cphi*zhdt - yaet = yhdt - zaet = astrom.Cphi*xhdt + astrom.Sphi*zhdt - - /* Azimuth (N=0,E=90). */ - // azobs = ( xaet != 0.0 || yaet != 0.0 ) ? atan2(yaet,-xaet) : 0.0; - if xaet != 0.0 || yaet != 0.0 { - azobs = atan2(yaet, -xaet) - } else { - azobs = 0.0 - } - - /* ---------- */ - /* Refraction */ - /* ---------- */ - - /* Cosine and sine of altitude, with precautions. */ - r = sqrt(xaet*xaet + yaet*yaet) - // r = r > CELMIN ? r : CELMIN; - if r <= CELMIN { - r = CELMIN - } - // z = zaet > SELMIN ? zaet : SELMIN; - if zaet > SELMIN { - z = zaet - } else { - z = SELMIN - } - - /* A*tan(z)+B*tan^3(z) model, with Newton-Raphson correction. */ - tz = r / z - w = astrom.Refb * tz * tz - del = (astrom.Refa + w) * tz / - (1.0 + (astrom.Refa+3.0*w)/(z*z)) - - /* Apply the change, giving observed vector. */ - cosdel = 1.0 - del*del/2.0 - f = cosdel - del*z/r - xaeo = xaet * f - yaeo = yaet * f - zaeo = cosdel*zaet + del*r - - /* Observed ZD. */ - zdobs = atan2(sqrt(xaeo*xaeo+yaeo*yaeo), zaeo) - - /* Az/El vector to HA,Dec vector (both right-handed). */ - v[0] = astrom.Sphi*xaeo + astrom.Cphi*zaeo - v[1] = yaeo - v[2] = -astrom.Cphi*xaeo + astrom.Sphi*zaeo - - /* To spherical -HA,Dec. */ - C2s(v, &hmobs, &dcobs) - - /* Right ascension (with respect to CIO). */ - raobs = astrom.Eral + hmobs - - /* Return the results. */ - *aob = Anp(azobs) - *zob = zdobs - *hob = -hmobs - *dob = dcobs - *rob = Anp(raobs) -} - -/* -Atoc13 Observed -> astrometric ICRS - -Observed place at a groundbased site to to ICRS astrometric RA,Dec. -The caller supplies UTC, site coordinates, ambient air conditions -and observing wavelength. - -Given: - - typ string type of coordinates - "R", "H" or "A" (Notes 1,2) - ob1 float64 observed Az, HA or RA (radians; Az is N=0,E=90) - ob2 float64 observed ZD or Dec (radians) - utc1 float64 UTC as a 2-part... - utc2 float64 ...quasi Julian Date (Notes 3,4) - dut1 float64 UT1-UTC (seconds, Note 5) - elong float64 longitude (radians, east +ve, Note 6) - phi float64 geodetic latitude (radians, Note 6) - hm float64 height above ellipsoid (m, geodetic Notes 6,8) - xp,yp float64 polar motion coordinates (radians, Note 7) - phpa float64 pressure at the observer (hPa = mB, Note 8) - tc float64 ambient temperature at the observer (deg C) - rh float64 relative humidity at the observer (range 0-1) - wl float64 wavelength (micrometers, Note 9) - -Returned: - - rc,dc float64 ICRS astrometric RA,Dec (radians) - -Returned (function value): - - int status: +1 = dubious year (Note 4) - 0 = OK - -1 = unacceptable date - -Notes: - - 1. "Observed" Az,ZD means the position that would be seen by a - perfect geodetically aligned theodolite. (Zenith distance is - used rather than altitude in order to reflect the fact that no - allowance is made for depression of the horizon.) This is - related to the observed HA,Dec via the standard rotation, using - the geodetic latitude (corrected for polar motion), while the - observed HA and RA are related simply through the Earth rotation - angle and the site longitude. "Observed" RA,Dec or HA,Dec thus - means the position that would be seen by a perfect equatorial - with its polar axis aligned to the Earth's axis of rotation. - - 2. Only the first character of the type argument is significant. - "R" or "r" indicates that ob1 and ob2 are the observed right - ascension and declination; "H" or "h" indicates that they are - hour angle (west +ve) and declination; anything else ("A" or - "a" is recommended) indicates that ob1 and ob2 are azimuth - (north zero, east 90 deg) and zenith distance. - - 3. utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any - convenient way between the two arguments, for example where utc1 - is the Julian Day Number and utc2 is the fraction of a day. - - However, JD cannot unambiguously represent UTC during a leap - second unless special measures are taken. The convention in the - present function is that the JD day represents UTC days whether - the length is 86399, 86400 or 86401 SI seconds. - - Applications should use the function Dtf2d to convert from - calendar date and time of day into 2-part quasi Julian Date, as - it implements the leap-second-ambiguity convention just - described. - - 4. The warning status "dubious year" flags UTCs that predate the - introduction of the time scale or that are too far in the - future to be trusted. See Dat for further details. - - 5. UT1-UTC is tabulated in IERS bulletins. It increases by exactly - one second at the end of each positive UTC leap second, - introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This - practice is under review, and in the future UT1-UTC may grow - essentially without limit. - - 6. The geographical coordinates are with respect to the WGS84 - reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the - longitude required by the present function is east-positive - (i.e. right-handed), in accordance with geographical convention. - - 7. The polar motion xp,yp can be obtained from IERS bulletins. The - values are the coordinates (in radians) of the Celestial - Intermediate Pole with respect to the International Terrestrial - Reference System (see IERS Conventions 2003), measured along the - meridians 0 and 90 deg west respectively. For many - applications, xp and yp can be set to zero. - - 8. If hm, the height above the ellipsoid of the observing station - in meters, is not known but phpa, the pressure in hPa (=mB), is - available, an adequate estimate of hm can be obtained from the - expression - - hm = -29.3 * tsl * log ( phpa / 1013.25 ); - - where tsl is the approximate sea-level air temperature in K - (See Astrophysical Quantities, C.W.Allen, 3rd edition, section - 52). Similarly, if the pressure phpa is not known, it can be - estimated from the height of the observing station, hm, as - follows: - - phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) ); - - Note, however, that the refraction is nearly proportional to - the pressure and that an accurate phpa value is important for - precise work. - - 9. The argument wl specifies the observing wavelength in - micrometers. The transition from optical to radio is assumed to - occur at 100 micrometers (about 3000 GHz). - - 10)The accuracy of the result is limited by the corrections for - refraction, which use a simple A*tan(z) + B*tan^3(z) model. - Providing the meteorological parameters are known accurately and - there are no gross local effects, the predicted astrometric - coordinates should be within 0.05 arcsec (optical) or 1 arcsec - (radio) for a zenith distance of less than 70 degrees, better - than 30 arcsec (optical or radio) at 85 degrees and better - than 20 arcmin (optical) or 30 arcmin (radio) at the horizon. - - Without refraction, the complementary functions Atco13 and - Atoc13 are self-consistent to better than 1 microarcsecond - all over the celestial sphere. With refraction included, - consistency falls off at high zenith distances, but is still - better than 0.05 arcsec at 85 degrees. - - 11)It is advisable to take great care with units, as even unlikely - values of the input parameters are accepted and processed in - accordance with the models used. - -Called: - - Apco13 astrometry parameters, ICRS-observed - Atoiq quick observed to CIRS - Aticq quick CIRS to ICRS -*/ -func Atoc13(typ string, ob1, ob2 float64, utc1, utc2, dut1 float64, - elong, phi, hm, xp, yp float64, phpa, tc, rh, wl float64, - rc, dc *float64) int { - var j int - var astrom ASTROM - var eo, ri, di float64 - - /* Star-independent astrometry parameters. */ - j = Apco13(utc1, utc2, dut1, elong, phi, hm, xp, yp, - phpa, tc, rh, wl, &astrom, &eo) - - /* Abort if bad UTC. */ - if j < 0 { - return j - } - - /* Transform observed to CIRS. */ - Atoiq(typ, ob1, ob2, &astrom, &ri, &di) - - /* Transform CIRS to ICRS. */ - Aticq(ri, di, &astrom, rc, dc) - - /* Return OK/warning status. */ - return j -} - -/* -Atoi13 Observed -> CIRS - -Observed place to CIRS. The caller supplies UTC, site coordinates, -ambient air conditions and observing wavelength. - -Given: - - typ string type of coordinates - "R", "H" or "A" (Notes 1,2) - ob1 float64 observed Az, HA or RA (radians; Az is N=0,E=90) - ob2 float64 observed ZD or Dec (radians) - utc1 float64 UTC as a 2-part... - utc2 float64 ...quasi Julian Date (Notes 3,4) - dut1 float64 UT1-UTC (seconds, Note 5) - elong float64 longitude (radians, east +ve, Note 6) - phi float64 geodetic latitude (radians, Note 6) - hm float64 height above the ellipsoid (meters, Notes 6,8) - xp,yp float64 polar motion coordinates (radians, Note 7) - phpa float64 pressure at the observer (hPa = mB, Note 8) - tc float64 ambient temperature at the observer (deg C) - rh float64 relative humidity at the observer (range 0-1) - wl float64 wavelength (micrometers, Note 9) - -Returned: - - ri float64 CIRS right ascension (CIO-based, radians) - di float64 CIRS declination (radians) - -Returned (function value): - - int status: +1 = dubious year (Note 2) - 0 = OK - -1 = unacceptable date - -Notes: - - 1. "Observed" Az,ZD means the position that would be seen by a - perfect geodetically aligned theodolite. (Zenith distance is - used rather than altitude in order to reflect the fact that no - allowance is made for depression of the horizon.) This is - related to the observed HA,Dec via the standard rotation, using - the geodetic latitude (corrected for polar motion), while the - observed HA and RA are related simply through the Earth rotation - angle and the site longitude. "Observed" RA,Dec or HA,Dec thus - means the position that would be seen by a perfect equatorial - with its polar axis aligned to the Earth's axis of rotation. - - 2. Only the first character of the type argument is significant. - "R" or "r" indicates that ob1 and ob2 are the observed right - ascension and declination; "H" or "h" indicates that they are - hour angle (west +ve) and declination; anything else ("A" or - "a" is recommended) indicates that ob1 and ob2 are azimuth - (north zero, east 90 deg) and zenith distance. - - 3. utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any - convenient way between the two arguments, for example where utc1 - is the Julian Day Number and utc2 is the fraction of a day. - - However, JD cannot unambiguously represent UTC during a leap - second unless special measures are taken. The convention in the - present function is that the JD day represents UTC days whether - the length is 86399, 86400 or 86401 SI seconds. - - Applications should use the function Dtf2d to convert from - calendar date and time of day into 2-part quasi Julian Date, as - it implements the leap-second-ambiguity convention just - described. - - 4. The warning status "dubious year" flags UTCs that predate the - introduction of the time scale or that are too far in the - future to be trusted. See Dat for further details. - - 5. UT1-UTC is tabulated in IERS bulletins. It increases by exactly - one second at the end of each positive UTC leap second, - introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This - practice is under review, and in the future UT1-UTC may grow - essentially without limit. - - 6. The geographical coordinates are with respect to the WGS84 - reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the - longitude required by the present function is east-positive - (i.e. right-handed), in accordance with geographical convention. - - 7. The polar motion xp,yp can be obtained from IERS bulletins. The - values are the coordinates (in radians) of the Celestial - Intermediate Pole with respect to the International Terrestrial - Reference System (see IERS Conventions 2003), measured along the - meridians 0 and 90 deg west respectively. For many - applications, xp and yp can be set to zero. - - 8. If hm, the height above the ellipsoid of the observing station - in meters, is not known but phpa, the pressure in hPa (=mB), is - available, an adequate estimate of hm can be obtained from the - expression - - hm = -29.3 * tsl * log ( phpa / 1013.25 ); - - where tsl is the approximate sea-level air temperature in K - (See Astrophysical Quantities, C.W.Allen, 3rd edition, section - 52). Similarly, if the pressure phpa is not known, it can be - estimated from the height of the observing station, hm, as - follows: - - phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) ); - - Note, however, that the refraction is nearly proportional to - the pressure and that an accurate phpa value is important for - precise work. - - 9. The argument wl specifies the observing wavelength in - micrometers. The transition from optical to radio is assumed to - occur at 100 micrometers (about 3000 GHz). - - 10)The accuracy of the result is limited by the corrections for - refraction, which use a simple A*tan(z) + B*tan^3(z) model. - Providing the meteorological parameters are known accurately and - there are no gross local effects, the predicted astrometric - coordinates should be within 0.05 arcsec (optical) or 1 arcsec - (radio) for a zenith distance of less than 70 degrees, better - than 30 arcsec (optical or radio) at 85 degrees and better - than 20 arcmin (optical) or 30 arcmin (radio) at the horizon. - - Without refraction, the complementary functions Atio13 and - Atoi13 are self-consistent to better than 1 microarcsecond - all over the celestial sphere. With refraction included, - consistency falls off at high zenith distances, but is still - better than 0.05 arcsec at 85 degrees. - - 12)It is advisable to take great care with units, as even unlikely - values of the input parameters are accepted and processed in - accordance with the models used. - -Called: - - Apio13 astrometry parameters, CIRS-observed, 2013 - Atoiq quick observed to CIRS -*/ -func Atoi13(typ string, ob1, ob2 float64, utc1, utc2, dut1 float64, - elong, phi, hm, xp, yp float64, phpa, tc, rh, wl float64, - ri, di *float64) int { - var j int - var astrom ASTROM - - /* Star-independent astrometry parameters for CIRS->observed. */ - j = Apio13(utc1, utc2, dut1, elong, phi, hm, xp, yp, - phpa, tc, rh, wl, &astrom) - - /* Abort if bad UTC. */ - if j < 0 { - return j - } - - /* Transform observed to CIRS. */ - Atoiq(typ, ob1, ob2, &astrom, ri, di) - - /* Return OK/warning status. */ - return j -} - -/* -Atoiq Quick observed -> CIRS - -Quick observed place to CIRS, given the star-independent astrometry -parameters. - -Use of this function is appropriate when efficiency is important and -where many star positions are all to be transformed for one date. -The star-independent astrometry parameters can be obtained by -calling Apio[13] or Apco[13]. - -Given: - - typ string type of coordinates: "R", "H" or "A" (Note 1) - ob1 float64 observed Az, HA or RA (radians; Az is N=0,E=90) - ob2 float64 observed ZD or Dec (radians) - astrom ASTROM star-independent astrometry parameters: - pmt float64 PM time interval (SSB, Julian years) - eb [3]float64 SSB to observer (vector, au) - eh [3]float64 Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - v [3]float64 barycentric observer velocity (vector, c) - bm1 float64 sqrt(1-|v|^2): reciprocal of Lorenz factor - bpn [3][3]float64 bias-precession-nutation matrix - along float64 longitude + s' (radians) - xpl float64 polar motion xp wrt local meridian (radians) - ypl float64 polar motion yp wrt local meridian (radians) - sphi float64 sine of geodetic latitude - cphi float64 cosine of geodetic latitude - diurab float64 magnitude of diurnal aberration vector - eral float64 "local" Earth rotation angle (radians) - refa float64 refraction constant A (radians) - refb float64 refraction constant B (radians) - -Returned: - - ri float64 CIRS right ascension (CIO-based, radians) - di float64 CIRS declination (radians) - -Notes: - - 1. "Observed" Az,ZD means the position that would be seen by a - perfect geodetically aligned theodolite. This is related to - the observed HA,Dec via the standard rotation, using the geodetic - latitude (corrected for polar motion), while the observed HA and - RA are related simply through the Earth rotation angle and the - site longitude. "Observed" RA,Dec or HA,Dec thus means the - position that would be seen by a perfect equatorial with its - polar axis aligned to the Earth's axis of rotation. By removing - from the observed place the effects of atmospheric refraction and - diurnal aberration, the CIRS RA,Dec is obtained. - - 2. Only the first character of the type argument is significant. - "R" or "r" indicates that ob1 and ob2 are the observed right - ascension and declination; "H" or "h" indicates that they are - hour angle (west +ve) and declination; anything else ("A" or - "a" is recommended) indicates that ob1 and ob2 are azimuth (north - zero, east 90 deg) and zenith distance. (Zenith distance is used - rather than altitude in order to reflect the fact that no - allowance is made for depression of the horizon.) - - 3. The accuracy of the result is limited by the corrections for - refraction, which use a simple A*tan(z) + B*tan^3(z) model. - Providing the meteorological parameters are known accurately and - there are no gross local effects, the predicted intermediate - coordinates should be within 0.05 arcsec (optical) or 1 arcsec - (radio) for a zenith distance of less than 70 degrees, better - than 30 arcsec (optical or radio) at 85 degrees and better than - 20 arcmin (optical) or 25 arcmin (radio) at the horizon. - - Without refraction, the complementary functions Atioq and - Atoiq are self-consistent to better than 1 microarcsecond all - over the celestial sphere. With refraction included, consistency - falls off at high zenith distances, but is still better than - 0.05 arcsec at 85 degrees. - - 4. It is advisable to take great care with units, as even unlikely - values of the input parameters are accepted and processed in - accordance with the models used. - -Called: - - S2c spherical coordinates to unit vector - C2s p-vector to spherical - Anp normalize angle into range 0 to 2pi -*/ -func Atoiq(typ string, ob1, ob2 float64, astrom *ASTROM, ri, di *float64) { - /* Minimum sin(alt) for refraction purposes */ - const SELMIN = 0.05 - - var c byte - var c1, c2, sphi, cphi, ce, xaeo, yaeo, zaeo, - xmhdo, ymhdo, zmhdo, az, sz, zdo, refa, refb, tz, dref, - zdt, xaet, yaet, zaet, xmhda, ymhda, zmhda, - f, xhd, yhd, zhd, sx, cx, sy, cy, hma float64 - var v [3]float64 - - /* Coordinate type. */ - c = typ[0] - - /* Coordinates. */ - c1 = ob1 - c2 = ob2 - - /* Sin, cos of latitude. */ - sphi = astrom.Sphi - cphi = astrom.Cphi - - /* Standardize coordinate type. */ - if c == 'r' || c == 'R' { - c = 'R' - } else if c == 'h' || c == 'H' { - c = 'H' - } else { - c = 'A' - } - - /* If Az,ZD, convert to Cartesian (S=0,E=90). */ - if c == 'A' { - ce = sin(c2) - xaeo = -cos(c1) * ce - yaeo = sin(c1) * ce - zaeo = cos(c2) - - } else { - - /* If RA,Dec, convert to HA,Dec. */ - if c == 'R' { - c1 = astrom.Eral - c1 - } - - /* To Cartesian -HA,Dec. */ - S2c(-c1, c2, &v) - xmhdo = v[0] - ymhdo = v[1] - zmhdo = v[2] - - /* To Cartesian Az,El (S=0,E=90). */ - xaeo = sphi*xmhdo - cphi*zmhdo - yaeo = ymhdo - zaeo = cphi*xmhdo + sphi*zmhdo - } - - /* Azimuth (S=0,E=90). */ - // az = ( xaeo != 0.0 || yaeo != 0.0 ) ? atan2(yaeo,xaeo) : 0.0; - if xaeo != 0.0 || yaeo != 0.0 { - az = atan2(yaeo, xaeo) - } else { - az = 0.0 - } - - /* Sine of observed ZD, and observed ZD. */ - sz = sqrt(xaeo*xaeo + yaeo*yaeo) - zdo = atan2(sz, zaeo) - - /* - Refraction - ---------- - */ - - /* Fast algorithm using two constant model. */ - refa = astrom.Refa - refb = astrom.Refb - // tz = sz / ( zaeo > SELMIN ? zaeo : SELMIN ); - if zaeo > SELMIN { - tz = sz / zaeo - } else { - tz = sz / SELMIN - } - dref = (refa + refb*tz*tz) * tz - zdt = zdo + dref - - /* To Cartesian Az,ZD. */ - ce = sin(zdt) - xaet = cos(az) * ce - yaet = sin(az) * ce - zaet = cos(zdt) - - /* Cartesian Az,ZD to Cartesian -HA,Dec. */ - xmhda = sphi*xaet + cphi*zaet - ymhda = yaet - zmhda = -cphi*xaet + sphi*zaet - - /* Diurnal aberration. */ - f = (1.0 + astrom.Diurab*ymhda) - xhd = f * xmhda - yhd = f * (ymhda - astrom.Diurab) - zhd = f * zmhda - - /* Polar motion. */ - sx = sin(astrom.Xpl) - cx = cos(astrom.Xpl) - sy = sin(astrom.Ypl) - cy = cos(astrom.Ypl) - v[0] = cx*xhd + sx*sy*yhd - sx*cy*zhd - v[1] = cy*yhd + sy*zhd - v[2] = sx*xhd - cx*sy*yhd + cx*cy*zhd - - /* To spherical -HA,Dec. */ - C2s(v, &hma, di) - - /* Right ascension. */ - *ri = Anp(astrom.Eral + hma) -} - -/* -Ld Light deflection by a single solar-system body - -Apply light deflection by a solar-system body, as part of -transforming coordinate direction into natural direction. - -Given: - - bm float64 mass of the gravitating body (solar masses) - p [3]float64 direction from observer to source (unit vector) - q [3]float64 direction from body to source (unit vector) - e [3]float64 direction from body to observer (unit vector) - em float64 distance from body to observer (au) - dlim float64 deflection limiter (Note 4) - -Returned: - - p1 [3]float64 observer to deflected source (unit vector) - -Notes: - - 1. The algorithm is based on Expr. (70) in Klioner (2003) and - Expr. (7.63) in the Explanatory Supplement (Urban & Seidelmann - 2013), with some rearrangement to minimize the effects of machine - precision. - - 2. The mass parameter bm can, as required, be adjusted in order to - allow for such effects as quadrupole field. - - 3. The barycentric position of the deflecting body should ideally - correspond to the time of closest approach of the light ray to - the body. - - 4. The deflection limiter parameter dlim is phi^2/2, where phi is - the angular separation (in radians) between source and body at - which limiting is applied. As phi shrinks below the chosen - threshold, the deflection is artificially reduced, reaching zero - for phi = 0. - - 5. The returned vector p1 is not normalized, but the consequential - departure from unit magnitude is always negligible. - - 6. The arguments p and p1 can be the same array. - - 7. To accumulate total light deflection taking into account the - contributions from several bodies, call the present function for - each body in succession, in decreasing order of distance from the - observer. - - 8. For efficiency, validation is omitted. The supplied vectors must - be of unit magnitude, and the deflection limiter non-zero and - positive. - -References: - - Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to - the Astronomical Almanac, 3rd ed., University Science Books - (2013). - - Klioner, Sergei A., "A practical relativistic model for micro- - arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003). - -Called: - - Pdp scalar product of two p-vectors - Pxp vector product of two p-vectors -*/ -func Ld(bm float64, p, q, e [3]float64, em, dlim float64, p1 *[3]float64) { - - var i int - var qpe, eq, peq [3]float64 - var qdqpe, w float64 - - /* q . (q + e). */ - for i = 0; i < 3; i++ { - qpe[i] = q[i] + e[i] - } - qdqpe = Pdp(q, qpe) - - /* 2 x G x bm / ( em x c^2 x ( q . (q + e) ) ). */ - w = bm * SRS / em / gmax(qdqpe, dlim) - - /* p x (e x q). */ - Pxp(e, q, &eq) - Pxp(p, eq, &peq) - - /* Apply the deflection. */ - for i = 0; i < 3; i++ { - p1[i] = p[i] + w*peq[i] - } -} - -/* -Ldn Light deflection by multiple solar-system bodies - -For a star, apply light deflection by multiple solar-system bodies, -as part of transforming coordinate direction into natural direction. - -Given: - - n int number of bodies (note 1) - b LDBODY[n] data for each of the n bodies (Notes 1,2): - bm float64 mass of the body (solar masses, Note 3) - dl float64 deflection limiter (Note 4) - pv [2][3]float64 barycentric PV of the body (au, au/day) - ob [3]float64 barycentric position of the observer (au) - sc [3]float64 observer to star coord direction (unit vector) - -Returned: - - sn [3]float64 observer to deflected star (unit vector) - -Notes: - - 1. The array b contains n entries, one for each body to be - considered. If n = 0, no gravitational light deflection will be - applied, not even for the Sun. - - 2. The array b should include an entry for the Sun as well as for - any planet or other body to be taken into account. The entries - should be in the order in which the light passes the body. - - 3. In the entry in the b array for body i, the mass parameter - b[i].bm can, as required, be adjusted in order to allow for such - effects as quadrupole field. - - 4. The deflection limiter parameter b[i].dl is phi^2/2, where phi is - the angular separation (in radians) between star and body at - which limiting is applied. As phi shrinks below the chosen - threshold, the deflection is artificially reduced, reaching zero - for phi = 0. Example values suitable for a terrestrial - observer, together with masses, are as follows: - - body i b[i].bm b[i].dl - - Sun 1.0 6e-6 - Jupiter 0.00095435 3e-9 - Saturn 0.00028574 3e-10 - - 5. For cases where the starlight passes the body before reaching the - observer, the body is placed back along its barycentric track by - the light time from that point to the observer. For cases where - the body is "behind" the observer no such shift is applied. If - a different treatment is preferred, the user has the option of - instead using the Ld function. Similarly, Ld can be used - for cases where the source is nearby, not a star. - - 6. The returned vector sn is not normalized, but the consequential - departure from unit magnitude is always negligible. - - 7. The arguments sc and sn can be the same array. - - 8. For efficiency, validation is omitted. The supplied masses must - be greater than zero, the position and velocity vectors must be - right, and the deflection limiter greater than zero. - -Reference: - - Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to - the Astronomical Almanac, 3rd ed., University Science Books - (2013), Section 7.2.4. - -Called: - - Cp copy p-vector - Pdp scalar product of two p-vectors - Pmp p-vector minus p-vector - Ppsp p-vector plus scaled p-vector - Pn decompose p-vector into modulus and direction - Ld light deflection by a solar-system body -*/ -func Ldn(n int, b []LDBODY, ob, sc [3]float64, sn *[3]float64) { - /* Light time for 1 au (days) */ - const CR = AULT / DAYSEC - - var i int - var v, ev, e [3]float64 - var dt, em float64 - - /* Star direction prior to deflection. */ - Cp(sc, sn) - - /* Body by body. */ - for i = 0; i < n; i++ { - - /* Body to observer vector at epoch of observation (au). */ - Pmp(ob, b[i].Pv[0], &v) - - /* Minus the time since the light passed the body (days). */ - dt = Pdp(*sn, v) * CR - - /* Neutralize if the star is "behind" the observer. */ - dt = gmin(dt, 0.0) - - /* Backtrack the body to the time the light was passing the body. */ - Ppsp(v, -dt, b[i].Pv[1], &ev) - - /* Body to observer vector as magnitude and direction. */ - Pn(ev, &em, &e) - - /* Apply light deflection for this body. */ - Ld(b[i].Bm, *sn, *sn, e, em, b[i].Dl, sn) - - /* Next body. */ - } -} - -/* -Ldsun Light deflection by the Sun - -Deflection of starlight by the Sun. - -Given: - - p [3]float64 direction from observer to star (unit vector) - e [3]float64 direction from Sun to observer (unit vector) - em float64 distance from Sun to observer (au) - -Returned: - - p1 [3]float64 observer to deflected star (unit vector) - -Notes: - - 1. The source is presumed to be sufficiently distant that its - directions seen from the Sun and the observer are essentially - the same. - - 2. The deflection is restrained when the angle between the star and - the center of the Sun is less than a threshold value, falling to - zero deflection for zero separation. The chosen threshold value - is within the solar limb for all solar-system applications, and - is about 5 arcminutes for the case of a terrestrial observer. - - 3. The arguments p and p1 can be the same array. - -Called: - - Ld light deflection by a solar-system body -*/ -func Ldsun(p, e [3]float64, em float64, p1 *[3]float64) { - var em2, dlim float64 - - /* Deflection limiter (smaller for distant observers). */ - em2 = em * em - if em2 < 1.0 { - em2 = 1.0 - } - // dlim = 1e-6 / (em2 > 1.0 ? em2 : 1.0); - if em2 > 1.0 { - dlim = 1e-6 / em2 - } else { - dlim = 1e-6 - } - - /* Apply the deflection. */ - Ld(1.0, p, p, e, em, dlim, p1) -} - -/* -Pmpx Apply proper motion and parallax - -Given: - - rc,dc float64 ICRS RA,Dec at catalog epoch (radians) - pr float64 RA proper motion (radians/year, Note 1) - pd float64 Dec proper motion (radians/year) - px float64 parallax (arcsec) - rv float64 radial velocity (km/s, +ve if receding) - pmt float64 proper motion time interval (SSB, Julian years) - pob [3]float64 SSB to observer vector (au) - -Returned: - - pco [3]float64 coordinate direction (BCRS unit vector) - -Notes: - - 1. The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. - - 2. The proper motion time interval is for when the starlight - reaches the solar system barycenter. - - 3. To avoid the need for iteration, the Roemer effect (i.e. the - small annual modulation of the proper motion coming from the - changing light time) is applied approximately, using the - direction of the star at the catalog epoch. - -References: - - 1984 Astronomical Almanac, pp B39-B41. - - Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to - the Astronomical Almanac, 3rd ed., University Science Books - (2013), Section 7.2. - -Called: - - Pdp scalar product of two p-vectors - Pn decompose p-vector into modulus and direction -*/ -func Pmpx(rc, dc float64, pr, pd, px, rv, pmt float64, pob [3]float64, pco *[3]float64) { - /* Km/s to au/year */ - const VF = DAYSEC * DJM / DAU - - /* Light time for 1 au, Julian years */ - const AULTY = AULT / DAYSEC / DJY - - var i int - var sr, cr, sd, cd, x, y, z, dt, pxr, w, pdz float64 - var p, pm [3]float64 - - /* Spherical coordinates to unit vector (and useful functions). */ - sr = sin(rc) - cr = cos(rc) - sd = sin(dc) - cd = cos(dc) - x = cr * cd - p[0] = x - y = sr * cd - p[1] = y - z = sd - p[2] = z - - /* Proper motion time interval (y) including Roemer effect. */ - dt = pmt + Pdp(p, pob)*AULTY - - /* Space motion (radians per year). */ - pxr = px * DAS2R - w = VF * rv * pxr - pdz = pd * z - pm[0] = -pr*y - pdz*cr + w*x - pm[1] = pr*x - pdz*sr + w*y - pm[2] = pd*cd + w*z - - /* Coordinate direction of star (unit vector, BCRS). */ - for i = 0; i < 3; i++ { - p[i] += dt*pm[i] - pxr*pob[i] - } - Pn(p, &w, pco) -} - -/* -Pmsafe Apply proper motion, with zero-parallax precautions - -Star proper motion: update star catalog data for space motion, with -special handling to handle the zero parallax case. - -Given: - - ra1 float64 right ascension (radians), before - dec1 float64 declination (radians), before - pmr1 float64 RA proper motion (radians/year), before - pmd1 float64 Dec proper motion (radians/year), before - px1 float64 parallax (arcseconds), before - rv1 float64 radial velocity (km/s, +ve = receding), before - ep1a float64 "before" epoch, part A (Note 1) - ep1b float64 "before" epoch, part B (Note 1) - ep2a float64 "after" epoch, part A (Note 1) - ep2b float64 "after" epoch, part B (Note 1) - -Returned: - - ra2 float64 right ascension (radians), after - dec2 float64 declination (radians), after - pmr2 float64 RA proper motion (radians/year), after - pmd2 float64 Dec proper motion (radians/year), after - px2 float64 parallax (arcseconds), after - rv2 float64 radial velocity (km/s, +ve = receding), after - -Returned (function value): - - int status: - -1 = system error (should not occur) - 0 = no warnings or errors - 1 = distance overridden (Note 6) - 2 = excessive velocity (Note 7) - 4 = solution didn't converge (Note 8) - else = binary logical OR of the above warnings - -Notes: - - 1. The starting and ending TDB epochs ep1a+ep1b and ep2a+ep2b are - Julian Dates, apportioned in any convenient way between the two - parts (A and B). For example, JD(TDB)=2450123.7 could be - expressed in any of these ways, among others: - - epNa epNb - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. - - 2. In accordance with normal star-catalog conventions, the object's - right ascension and declination are freed from the effects of - secular aberration. The frame, which is aligned to the catalog - equator and equinox, is Lorentzian and centered on the SSB. - - The proper motions are the rate of change of the right ascension - and declination at the catalog epoch and are in radians per TDB - Julian year. - - The parallax and radial velocity are in the same frame. - - 3. Care is needed with units. The star coordinates are in radians - and the proper motions in radians per Julian year, but the - parallax is in arcseconds. - - 4. The RA proper motion is in terms of coordinate angle, not true - angle. If the catalog uses arcseconds for both RA and Dec proper - motions, the RA proper motion will need to be divided by cos(Dec) - before use. - - 5. Straight-line motion at constant speed, in the inertial frame, is - assumed. - - 6. An extremely small (or zero or negative) parallax is overridden - to ensure that the object is at a finite but very large distance, - but not so large that the proper motion is equivalent to a large - but safe speed (about 0.1c using the chosen constant). A warning - status of 1 is added to the status if this action has been taken. - - 7. If the space velocity is a significant fraction of c (see the - constant VMAX in the function Starpv), it is arbitrarily set - to zero. When this action occurs, 2 is added to the status. - - 8. The relativistic adjustment carried out in the Starpv function - involves an iterative calculation. If the process fails to - converge within a set number of iterations, 4 is added to the - status. - -Called: - - Seps angle between two points - Starpm update star catalog data for space motion -*/ -func Pmsafe(ra1, dec1, pmr1, pmd1, px1, rv1 float64, - ep1a, ep1b, ep2a, ep2b float64, - ra2, dec2, pmr2, pmd2, px2, rv2 *float64) int { - - /* Minimum allowed parallax (arcsec) */ - const PXMIN = 5e-7 - - /* Factor giving maximum allowed transverse speed of about 1% c */ - const F = 326.0 - - var jpx, j int - var pm, px1a float64 - - /* Proper motion in one year (radians). */ - pm = Seps(ra1, dec1, ra1+pmr1, dec1+pmd1) - - /* Override the parallax to reduce the chances of a warning status. */ - jpx = 0 - px1a = px1 - pm *= F - if px1a < pm { - jpx = 1 - px1a = pm - } - if px1a < PXMIN { - jpx = 1 - px1a = PXMIN - } - - /* Carry out the transformation using the modified parallax. */ - j = Starpm(ra1, dec1, pmr1, pmd1, px1a, rv1, - ep1a, ep1b, ep2a, ep2b, - ra2, dec2, pmr2, pmd2, px2, rv2) - - /* Revise and return the status. */ - if (j % 2) != 1 { - j += jpx - } - return j -} - -/* -Pvstar Star position+velocity vector to catalog coordinates - -Convert star position+velocity vector to catalog coordinates. - -Given (Note 1): - - pv [2][3]float64 pv-vector (au, au/day) - -Returned (Note 2): - - ra float64 right ascension (radians) - dec float64 declination (radians) - pmr float64 RA proper motion (radians/year) - pmd float64 Dec proper motion (radians/year) - px float64 parallax (arcsec) - rv float64 radial velocity (km/s, positive = receding) - -Returned (function value): - - int status: - 0 = OK - -1 = superluminal speed (Note 5) - -2 = null position vector - -Notes: - - 1. The specified pv-vector is the coordinate direction (and its rate - of change) for the date at which the light leaving the star - reached the solar-system barycenter. - - 2. The star data returned by this function are "observables" for an - imaginary observer at the solar-system barycenter. Proper motion - and radial velocity are, strictly, in terms of barycentric - coordinate time, TCB. For most practical applications, it is - permissible to neglect the distinction between TCB and ordinary - "proper" time on Earth (TT/TAI). The result will, as a rule, be - limited by the intrinsic accuracy of the proper-motion and - radial-velocity data; moreover, the supplied pv-vector is likely - to be merely an intermediate result (for example generated by the - function Starpv), so that a change of time unit will cancel - out overall. - - In accordance with normal star-catalog conventions, the object's - right ascension and declination are freed from the effects of - secular aberration. The frame, which is aligned to the catalog - equator and equinox, is Lorentzian and centered on the SSB. - - Summarizing, the specified pv-vector is for most stars almost - identical to the result of applying the standard geometrical - "space motion" transformation to the catalog data. The - differences, which are the subject of the Stumpff paper cited - below, are: - - (i) In stars with significant radial velocity and proper motion, - the constantly changing light-time distorts the apparent proper - motion. Note that this is a classical, not a relativistic, - effect. - - (ii) The transformation complies with special relativity. - - 3. Care is needed with units. The star coordinates are in radians - and the proper motions in radians per Julian year, but the - parallax is in arcseconds; the radial velocity is in km/s, but - the pv-vector result is in au and au/day. - - 4. The proper motions are the rate of change of the right ascension - and declination at the catalog epoch and are in radians per Julian - year. The RA proper motion is in terms of coordinate angle, not - true angle, and will thus be numerically larger at high - declinations. - - 5. Straight-line motion at constant speed in the inertial frame is - assumed. If the speed is greater than or equal to the speed of - light, the function aborts with an error status. - - 6. The inverse transformation is performed by the function Starpv. - -Called: - - Pn decompose p-vector into modulus and direction - Pdp scalar product of two p-vectors - Sxp multiply p-vector by scalar - Pmp p-vector minus p-vector - Pm modulus of p-vector - Ppp p-vector plus p-vector - Pv2s pv-vector to spherical - Anp normalize angle into range 0 to 2pi - -Reference: - - Stumpff, P., 1985, Astron.Astrophys. 144, 232-240. -*/ -func Pvstar(pv [2][3]float64, ra, dec, pmr, pmd, px, rv *float64) int { - - var r, vr, vt, bett, betr, d, w, del, a, rad, decd, rd float64 - - var pu, ur, ut, usr, ust [3]float64 - - /* Isolate the radial component of the velocity (au/day, inertial). */ - Pn(pv[0], &r, &pu) - vr = Pdp(pu, pv[1]) - Sxp(vr, pu, &ur) - - /* Isolate the transverse component of the velocity (au/day, inertial). */ - Pmp(pv[1], ur, &ut) - vt = Pm(ut) - - /* Special-relativity dimensionless parameters. */ - bett = vt / DC - betr = vr / DC - - /* The observed-to-inertial correction terms. */ - d = 1.0 + betr - w = betr*betr + bett*bett - if d == 0.0 || w > 1.0 { - return -1 - } - del = -w / (sqrt(1.0-w) + 1.0) - - /* Scale inertial tangential velocity vector into observed (au/d). */ - Sxp(1.0/d, ut, &ust) - - /* Compute observed radial velocity vector (au/d). */ - Sxp(DC*(betr-del)/d, pu, &usr) - - /* Combine the two to obtain the observed velocity vector (au/day). */ - Ppp(usr, ust, &pv[1]) - - /* Cartesian to spherical. */ - Pv2s(pv, &a, dec, &r, &rad, &decd, &rd) - if r == 0.0 { - return -2 - } - - /* Return RA in range 0 to 2pi. */ - *ra = Anp(a) - - /* Return proper motions in radians per year. */ - *pmr = rad * DJY - *pmd = decd * DJY - - /* Return parallax in arcsec. */ - *px = DR2AS / r - - /* Return radial velocity in km/s. */ - *rv = 1e-3 * rd * DAU / DAYSEC - - /* Success. */ - return 0 -} - -/* -Pvtob Observatory position and velocity - -Position and velocity of a terrestrial observing station. - -Given: - - elong float64 longitude (radians, east +ve, Note 1) - phi float64 latitude (geodetic, radians, Note 1) - hm float64 height above ref. ellipsoid (geodetic, m) - xp,yp float64 coordinates of the pole (radians, Note 2) - sp float64 the TIO locator s' (radians, Note 2) - theta float64 Earth rotation angle (radians, Note 3) - -Returned: - - pv [2][3]float64 position/velocity vector (m, m/s, CIRS) - -Notes: - - 1. The terrestrial coordinates are with respect to the WGS84 - reference ellipsoid. - - 2. xp and yp are the coordinates (in radians) of the Celestial - Intermediate Pole with respect to the International Terrestrial - Reference System (see IERS Conventions), measured along the - meridians 0 and 90 deg west respectively. sp is the TIO locator - s', in radians, which positions the Terrestrial Intermediate - Origin on the equator. For many applications, xp, yp and - (especially) sp can be set to zero. - - 3. If theta is Greenwich apparent sidereal time instead of Earth - rotation angle, the result is with respect to the true equator - and equinox of date, i.e. with the x-axis at the equinox rather - than the celestial intermediate origin. - - 4. The velocity units are meters per UT1 second, not per SI second. - This is unlikely to have any practical consequences in the modern - era. - - 5. No validation is performed on the arguments. Error cases that - could lead to arithmetic exceptions are trapped by the Gd2gc - function, and the result set to zeros. - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to - the Astronomical Almanac, 3rd ed., University Science Books - (2013), Section 7.4.3.3. - -Called: - - Gd2gc geodetic to geocentric transformation - Pom00 polar motion matrix - Trxp product of transpose of r-matrix and p-vector -*/ -func Pvtob(elong, phi, hm float64, xp, yp, sp, theta float64, pv *[2][3]float64) { - /* Earth rotation rate in radians per UT1 second */ - const OM = 1.00273781191135448 * D2PI / DAYSEC - - var xyz, xyzm [3]float64 - var rpm [3][3]float64 - var x, y, z, s, c float64 - - /* Geodetic to geocentric transformation (WGS84). */ - Gd2gc(1, elong, phi, hm, &xyzm) - - /* Polar motion and TIO position. */ - Pom00(xp, yp, sp, &rpm) - Trxp(rpm, xyzm, &xyz) - x = xyz[0] - y = xyz[1] - z = xyz[2] - - /* Functions of ERA. */ - s = sin(theta) - c = cos(theta) - - /* Position. */ - pv[0][0] = c*x - s*y - pv[0][1] = s*x + c*y - pv[0][2] = z - - /* Velocity. */ - pv[1][0] = OM * (-s*x - c*y) - pv[1][1] = OM * (c*x - s*y) - pv[1][2] = 0.0 -} - -/* -Refco Refraction constants - -Determine the constants A and B in the atmospheric refraction model -dZ = A tan Z + B tan^3 Z. - -Z is the "observed" zenith distance (i.e. affected by refraction) -and dZ is what to add to Z to give the "topocentric" (i.e. in vacuo) -zenith distance. - -Given: - - phpa float64 pressure at the observer (hPa = millibar) - tc float64 ambient temperature at the observer (deg C) - rh float64 relative humidity at the observer (range 0-1) - wl float64 wavelength (micrometers) - -Returned: - - refa float64 tan Z coefficient (radians) - refb float64 tan^3 Z coefficient (radians) - -Notes: - - 1. The model balances speed and accuracy to give good results in - applications where performance at low altitudes is not paramount. - Performance is maintained across a range of conditions, and - applies to both optical/IR and radio. - - 2. The model omits the effects of (i) height above sea level (apart - from the reduced pressure itself), (ii) latitude (i.e. the - flattening of the Earth), (iii) variations in tropospheric lapse - rate and (iv) dispersive effects in the radio. - - The model was tested using the following range of conditions: - - lapse rates 0.0055, 0.0065, 0.0075 deg/meter - latitudes 0, 25, 50, 75 degrees - heights 0, 2500, 5000 meters ASL - pressures mean for height -10% to +5% in steps of 5% - temperatures -10 deg to +20 deg with respect to 280 deg at SL - relative humidity 0, 0.5, 1 - wavelengths 0.4, 0.6, ... 2 micron, + radio - zenith distances 15, 45, 75 degrees - - The accuracy with respect to raytracing through a model - atmosphere was as follows: - - worst RMS - - optical/IR 62 mas 8 mas - radio 319 mas 49 mas - - For this particular set of conditions: - - lapse rate 0.0065 K/meter - latitude 50 degrees - sea level - pressure 1005 mb - temperature 280.15 K - humidity 80% - wavelength 5740 Angstroms - - the results were as follows: - - ZD raytrace Refco Saastamoinen - - 10 10.27 10.27 10.27 - 20 21.19 21.20 21.19 - 30 33.61 33.61 33.60 - 40 48.82 48.83 48.81 - 45 58.16 58.18 58.16 - 50 69.28 69.30 69.27 - 55 82.97 82.99 82.95 - 60 100.51 100.54 100.50 - 65 124.23 124.26 124.20 - 70 158.63 158.68 158.61 - 72 177.32 177.37 177.31 - 74 200.35 200.38 200.32 - 76 229.45 229.43 229.42 - 78 267.44 267.29 267.41 - 80 319.13 318.55 319.10 - - deg arcsec arcsec arcsec - - The values for Saastamoinen's formula (which includes terms - up to tan^5) are taken from Hohenkerk and Sinclair (1985). - - 3. A wl value in the range 0-100 selects the optical/IR case and is - wavelength in micrometers. Any value outside this range selects - the radio case. - - 4. Outlandish input parameters are silently limited to - mathematically safe values. Zero pressure is permissible, and - causes zeroes to be returned. - - 5. The algorithm draws on several sources, as follows: - - a) The formula for the saturation vapour pressure of water as - a function of temperature and temperature is taken from - Equations (A4.5-A4.7) of Gill (1982). - - b) The formula for the water vapour pressure, given the - saturation pressure and the relative humidity, is from - Crane (1976), Equation (2.5.5). - - c) The refractivity of air is a function of temperature, - total pressure, water-vapour pressure and, in the case - of optical/IR, wavelength. The formulae for the two cases are - developed from Hohenkerk & Sinclair (1985) and Rueger (2002). - The IAG (1999) optical refractivity for dry air is used. - - d) The formula for beta, the ratio of the scale height of the - atmosphere to the geocentric distance of the observer, is - an adaption of Equation (9) from Stone (1996). The - adaptations, arrived at empirically, consist of (i) a small - adjustment to the coefficient and (ii) a humidity term for the - radio case only. - - e) The formulae for the refraction constants as a function of - n-1 and beta are from Green (1987), Equation (4.31). - -References: - - Crane, R.K., Meeks, M.L. (ed), "Refraction Effects in the Neutral - Atmosphere", Methods of Experimental Physics: Astrophysics 12B, - Academic Press, 1976. - - Gill, Adrian E., "Atmosphere-Ocean Dynamics", Academic Press, - 1982. - - Green, R.M., "Spherical Astronomy", Cambridge University Press, - 1987. - - Hohenkerk, C.Y., & Sinclair, A.T., NAO Technical Note No. 63, - 1985. - - IAG Resolutions adopted at the XXIIth General Assembly in - Birmingham, 1999, Resolution 3. - - Rueger, J.M., "Refractive Index Formulae for Electronic Distance - Measurement with Radio and Millimetre Waves", in Unisurv Report - S-68, School of Surveying and Spatial Information Systems, - University of New South Wales, Sydney, Australia, 2002. - - Stone, Ronald C., P.A.S.P. 108, 1051-1058, 1996. -*/ -func Refco(phpa, tc, rh, wl float64, refa, refb *float64) { - var optic bool - var p, t, r, w, ps, pw, tk, wlsq, gamma, beta float64 - - /* Decide whether optical/IR or radio case: switch at 100 microns. */ - optic = (wl <= 100.0) - - /* Restrict parameters to safe values. */ - t = gmax(tc, -150.0) - t = gmin(t, 200.0) - p = gmax(phpa, 0.0) - p = gmin(p, 10000.0) - r = gmax(rh, 0.0) - r = gmin(r, 1.0) - w = gmax(wl, 0.1) - w = gmin(w, 1e6) - - /* Water vapour pressure at the observer. */ - if p > 0.0 { - ps = pow(10.0, (0.7859+0.03477*t)/ - (1.0+0.00412*t)) * - (1.0 + p*(4.5e-6+6e-10*t*t)) - pw = r * ps / (1.0 - (1.0-r)*ps/p) - } else { - pw = 0.0 - } - - /* Refractive index minus 1 at the observer. */ - tk = t + 273.15 - if optic { - wlsq = w * w - gamma = ((77.53484e-6+ - (4.39108e-7+3.666e-9/wlsq)/wlsq)*p - - 11.2684e-6*pw) / tk - } else { - gamma = (77.6890e-6*p - (6.3938e-6-0.375463/tk)*pw) / tk - } - - /* Formula for beta from Stone, with empirical adjustments. */ - beta = 4.4474e-6 * tk - if !optic { - beta -= 0.0074 * pw * beta - } - - /* Refraction constants from Green. */ - *refa = gamma * (1.0 - beta) - *refb = -gamma * (beta - gamma/2.0) -} - -/* -Starpm Proper motion between two epochs - -Star proper motion: update star catalog data for space motion. - -Given: - - ra1 float64 right ascension (radians), before - dec1 float64 declination (radians), before - pmr1 float64 RA proper motion (radians/year), before - pmd1 float64 Dec proper motion (radians/year), before - px1 float64 parallax (arcseconds), before - rv1 float64 radial velocity (km/s, +ve = receding), before - ep1a float64 "before" epoch, part A (Note 1) - ep1b float64 "before" epoch, part B (Note 1) - ep2a float64 "after" epoch, part A (Note 1) - ep2b float64 "after" epoch, part B (Note 1) - -Returned: - - ra2 float64 right ascension (radians), after - dec2 float64 declination (radians), after - pmr2 float64 RA proper motion (radians/year), after - pmd2 float64 Dec proper motion (radians/year), after - px2 float64 parallax (arcseconds), after - rv2 float64 radial velocity (km/s, +ve = receding), after - -Returned (function value): - - int status: - -1 = system error (should not occur) - 0 = no warnings or errors - 1 = distance overridden (Note 6) - 2 = excessive velocity (Note 7) - 4 = solution didn't converge (Note 8) - else = binary logical OR of the above warnings - -Notes: - - 1. The starting and ending TDB dates ep1a+ep1b and ep2a+ep2b are - Julian Dates, apportioned in any convenient way between the two - parts (A and B). For example, JD(TDB)=2450123.7 could be - expressed in any of these ways, among others: - - epna epnb - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2. In accordance with normal star-catalog conventions, the object's - right ascension and declination are freed from the effects of - secular aberration. The frame, which is aligned to the catalog - equator and equinox, is Lorentzian and centered on the SSB. - - The proper motions are the rate of change of the right ascension - and declination at the catalog epoch and are in radians per TDB - Julian year. - - The parallax and radial velocity are in the same frame. - - 3. Care is needed with units. The star coordinates are in radians - and the proper motions in radians per Julian year, but the - parallax is in arcseconds. - - 4. The RA proper motion is in terms of coordinate angle, not true - angle. If the catalog uses arcseconds for both RA and Dec proper - motions, the RA proper motion will need to be divided by cos(Dec) - before use. - - 5. Straight-line motion at constant speed, in the inertial frame, - is assumed. - - 6. An extremely small (or zero or negative) parallax is interpreted - to mean that the object is on the "celestial sphere", the radius - of which is an arbitrary (large) value (see the Starpv - function for the value used). When the distance is overridden in - this way, the status, initially zero, has 1 added to it. - - 7. If the space velocity is a significant fraction of c (see the - constant VMAX in the function Starpv), it is arbitrarily set - to zero. When this action occurs, 2 is added to the status. - - 8. The relativistic adjustment carried out in the Starpv function - involves an iterative calculation. If the process fails to - converge within a set number of iterations, 4 is added to the - status. - -Called: - - Starpv star catalog data to space motion pv-vector - Pvu update a pv-vector - Pdp scalar product of two p-vectors - Pvstar space motion pv-vector to star catalog data -*/ -func Starpm(ra1, dec1, pmr1, pmd1, px1, rv1 float64, ep1a, ep1b, ep2a, ep2b float64, - ra2, dec2, pmr2, pmd2, px2, rv2 *float64) int { - - var pv1, pv, pv2 [2][3]float64 - var tl1, dt, r2, rdv, v2, c2mv2, tl2 float64 - - var j1, j2 int - - /* RA,Dec etc. at the "before" epoch to space motion pv-vector. */ - j1 = Starpv(ra1, dec1, pmr1, pmd1, px1, rv1, &pv1) - - /* Light time when observed (days). */ - tl1 = Pm(pv1[0]) / DC - - /* Time interval, "before" to "after" (days). */ - dt = (ep2a - ep1a) + (ep2b - ep1b) - - /* Move star along track from the "before" observed position to the */ - /* "after" geometric position. */ - Pvu(dt+tl1, pv1, &pv) - - /* From this geometric position, deduce the observed light time (days) */ - /* at the "after" epoch (with theoretically unneccessary error check). */ - r2 = Pdp(pv[0], pv[0]) - rdv = Pdp(pv[0], pv[1]) - v2 = Pdp(pv[1], pv[1]) - c2mv2 = DC*DC - v2 - if c2mv2 <= 0 { - return -1 - } - tl2 = (-rdv + sqrt(rdv*rdv+c2mv2*r2)) / c2mv2 - - /* Move the position along track from the observed place at the */ - /* "before" epoch to the observed place at the "after" epoch. */ - Pvu(dt+(tl1-tl2), pv1, &pv2) - - /* Space motion pv-vector to RA,Dec etc. at the "after" epoch. */ - j2 = Pvstar(pv2, ra2, dec2, pmr2, pmd2, px2, rv2) - - /* Final status. */ - - if j2 == 0 { - return j1 - } - return -1 -} - -/* -Starpv Star catalog coordinates to position+velocity vector - -Convert star catalog coordinates to position+velocity vector. - -Given (Note 1): - - ra float64 right ascension (radians) - dec float64 declination (radians) - pmr float64 RA proper motion (radians/year) - pmd float64 Dec proper motion (radians/year) - px float64 parallax (arcseconds) - rv float64 radial velocity (km/s, positive = receding) - -Returned (Note 2): - - pv [2][3]float64 pv-vector (au, au/day) - -Returned (function value): - - int status: - 0 = no warnings - 1 = distance overridden (Note 6) - 2 = excessive speed (Note 7) - 4 = solution didn't converge (Note 8) - else = binary logical OR of the above - -Notes: - - 1. The star data accepted by this function are "observables" for an - imaginary observer at the solar-system barycenter. Proper motion - and radial velocity are, strictly, in terms of barycentric - coordinate time, TCB. For most practical applications, it is - permissible to neglect the distinction between TCB and ordinary - "proper" time on Earth (TT/TAI). The result will, as a rule, be - limited by the intrinsic accuracy of the proper-motion and - radial-velocity data; moreover, the pv-vector is likely to be - merely an intermediate result, so that a change of time unit - would cancel out overall. - - In accordance with normal star-catalog conventions, the object's - right ascension and declination are freed from the effects of - secular aberration. The frame, which is aligned to the catalog - equator and equinox, is Lorentzian and centered on the SSB. - - 2. The resulting position and velocity pv-vector is with respect to - the same frame and, like the catalog coordinates, is freed from - the effects of secular aberration. Should the "coordinate - direction", where the object was located at the catalog epoch, be - required, it may be obtained by calculating the magnitude of the - position vector pv[0][0-2] dividing by the speed of light in - au/day to give the light-time, and then multiplying the space - velocity pv[1][0-2] by this light-time and adding the result to - pv[0][0-2]. - - Summarizing, the pv-vector returned is for most stars almost - identical to the result of applying the standard geometrical - "space motion" transformation. The differences, which are the - subject of the Stumpff paper referenced below, are: - - (i) In stars with significant radial velocity and proper motion, - the constantly changing light-time distorts the apparent proper - motion. Note that this is a classical, not a relativistic, - effect. - - (ii) The transformation complies with special relativity. - - 3. Care is needed with units. The star coordinates are in radians - and the proper motions in radians per Julian year, but the - parallax is in arcseconds; the radial velocity is in km/s, but - the pv-vector result is in au and au/day. - - 4. The RA proper motion is in terms of coordinate angle, not true - angle. If the catalog uses arcseconds for both RA and Dec proper - motions, the RA proper motion will need to be divided by cos(Dec) - before use. - - 5. Straight-line motion at constant speed, in the inertial frame, - is assumed. - - 6. An extremely small (or zero or negative) parallax is interpreted - to mean that the object is on the "celestial sphere", the radius - of which is an arbitrary (large) value (see the constant PXMIN). - When the distance is overridden in this way, the status, - initially zero, has 1 added to it. - - 7. If the space velocity is a significant fraction of c (see the - constant VMAX), it is arbitrarily set to zero. When this action - occurs, 2 is added to the status. - - 8. The relativistic adjustment involves an iterative calculation. - If the process fails to converge within a set number (IMAX) of - iterations, 4 is added to the status. - - 9. The inverse transformation is performed by the function - Pvstar. - -Called: - - S2pv spherical coordinates to pv-vector - Pm modulus of p-vector - Zp zero p-vector - Pn decompose p-vector into modulus and direction - Pdp scalar product of two p-vectors - Sxp multiply p-vector by scalar - Pmp p-vector minus p-vector - Ppp p-vector plus p-vector -*/ -func Starpv(ra, dec, pmr, pmd, px, rv float64, pv *[2][3]float64) int { - /* Smallest allowed parallax */ - const PXMIN = 1e-7 - - /* Largest allowed speed (fraction of c) */ - const VMAX = 0.5 - - /* Maximum number of iterations for relativistic solution */ - const IMAX = 100 - - var i, iwarn int - var w, r, rd, rad, decd, v, - vsr, vst, betst, betsr, bett, betr, - dd, ddel, - d, del, - odd, oddel, - od, odel float64 - d, del = 0.0, 0.0 /* to prevent */ - odd, oddel = 0.0, 0.0 /* compiler */ - od, odel = 0.0, 0.0 /* warnings */ - var pu, usr, ust, ur, ut [3]float64 - - /* Distance (au). */ - if px >= PXMIN { - w = px - iwarn = 0 - } else { - w = PXMIN - iwarn = 1 - } - r = DR2AS / w - - /* Radial speed (au/day). */ - rd = DAYSEC * rv * 1e3 / DAU - - /* Proper motion (radian/day). */ - rad = pmr / DJY - decd = pmd / DJY - - /* To pv-vector (au,au/day). */ - S2pv(ra, dec, r, rad, decd, rd, pv) - - /* If excessive velocity, arbitrarily set it to zero. */ - v = Pm(pv[1]) - if (v / DC) > VMAX { - Zp(&pv[1]) - iwarn += 2 - } - - /* Isolate the radial component of the velocity (au/day). */ - Pn(pv[0], &w, &pu) - vsr = Pdp(pu, pv[1]) - Sxp(vsr, pu, &usr) - - /* Isolate the transverse component of the velocity (au/day). */ - Pmp(pv[1], usr, &ust) - vst = Pm(ust) - - /* Special-relativity dimensionless parameters. */ - betsr = vsr / DC - betst = vst / DC - - /* Determine the observed-to-inertial relativistic correction terms. */ - bett = betst - betr = betsr - for i = 0; i < IMAX; i++ { - d = 1.0 + betr - w = betr*betr + bett*bett - del = -w / (sqrt(1.0-w) + 1.0) - betr = d*betsr + del - bett = d * betst - if i > 0 { - dd = fabs(d - od) - ddel = fabs(del - odel) - if (i > 1) && (dd >= odd) && (ddel >= oddel) { - break - } - odd = dd - oddel = ddel - } - od = d - odel = del - } - if i >= IMAX { - iwarn += 4 - } - - // Scale observed tangential velocity vector into inertial (au/d). */ - Sxp(d, ust, &ut) - - /* Compute inertial radial velocity vector (au/d). */ - Sxp(DC*(d*betsr+del), pu, &ur) - - /* Combine the two to obtain the inertial space velocity vector. */ - Ppp(ur, ut, &pv[1]) - - /* Return the status. */ - return iwarn -} diff --git a/vendor/github.com/hebl/gofa/catalog.go b/vendor/github.com/hebl/gofa/catalog.go deleted file mode 100644 index c8b0b2b..0000000 --- a/vendor/github.com/hebl/gofa/catalog.go +++ /dev/null @@ -1,1092 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -/* -Fk425 Convert B1950.0 FK4 star catalog data to J2000.0 FK5 - -This function converts a star's catalog data from the old FK4 -(Bessel-Newcomb) system to the later IAU 1976 FK5 (Fricke) system. - -Given: (all B1950.0, FK4) - - r1950,d1950 float64 B1950.0 RA,Dec (rad) - dr1950,dd1950 float64 B1950.0 proper motions (rad/trop.yr) - p1950 float64 parallax (arcsec) - v1950 float64 radial velocity (km/s, +ve = moving away) - -Returned: (all J2000.0, FK5) - - r2000,d2000 float64 J2000.0 RA,Dec (rad) - dr2000,dd2000 float64 J2000.0 proper motions (rad/Jul.yr) - p2000 float64 parallax (arcsec) - v2000 float64 radial velocity (km/s, +ve = moving away) - -Notes: - - 1. The proper motions in RA are dRA/dt rather than cos(Dec)*dRA/dt, - and are per year rather than per century. - - 2. The conversion is somewhat complicated, for several reasons: - - . Change of standard epoch from B1950.0 to J2000.0. - - . An intermediate transition date of 1984 January 1.0 TT. - - . A change of precession model. - - . Change of time unit for proper motion (tropical to Julian). - - . FK4 positions include the E-terms of aberration, to simplify - the hand computation of annual aberration. FK5 positions - assume a rigorous aberration computation based on the Earth's - barycentric velocity. - - . The E-terms also affect proper motions, and in particular cause - objects at large distances to exhibit fictitious proper - motions. - - The algorithm is based on Smith et al. (1989) and Yallop et al. - (1989), which presented a matrix method due to Standish (1982) as - developed by Aoki et al. (1983), using Kinoshita's development of - Andoyer's post-Newcomb precession. The numerical constants from - Seidelmann (1992) are used canonically. - - 3. Conversion from B1950.0 FK4 to J2000.0 FK5 only is provided for. - Conversions for different epochs and equinoxes would require - additional treatment for precession, proper motion and E-terms. - - 4. In the FK4 catalog the proper motions of stars within 10 degrees - of the poles do not embody differential E-terms effects and - should, strictly speaking, be handled in a different manner from - stars outside these regions. However, given the general lack of - homogeneity of the star data available for routine astrometry, - the difficulties of handling positions that may have been - determined from astrometric fields spanning the polar and non- - polar regions, the likelihood that the differential E-terms - effect was not taken into account when allowing for proper motion - in past astrometry, and the undesirability of a discontinuity in - the algorithm, the decision has been made in this SOFA algorithm - to include the effects of differential E-terms on the proper - motions for all stars, whether polar or not. At epoch J2000.0, - and measuring "on the sky" rather than in terms of RA change, the - errors resulting from this simplification are less than - 1 milliarcsecond in position and 1 milliarcsecond per century in - proper motion. - -Called: - - Anp normalize angle into range 0 to 2pi - Pv2s pv-vector to spherical coordinates - Pdp scalar product of two p-vectors - Pvmpv pv-vector minus pv_vector - Pvppv pv-vector plus pv_vector - S2pv spherical coordinates to pv-vector - Sxp multiply p-vector by scalar - -References: - - Aoki, S. et al., 1983, "Conversion matrix of epoch B1950.0 - FK4-based positions of stars to epoch J2000.0 positions in - accordance with the new IAU resolutions". Astron.Astrophys. - 128, 263-267. - - Seidelmann, P.K. (ed), 1992, "Explanatory Supplement to the - Astronomical Almanac", ISBN 0-935702-68-7. - - Smith, C.A. et al., 1989, "The transformation of astrometric - catalog systems to the equinox J2000.0". Astron.J. 97, 265. - - Standish, E.M., 1982, "Conversion of positions and proper motions - from B1950.0 to the IAU system at J2000.0". Astron.Astrophys., - 115, 1, 20-22. - - Yallop, B.D. et al., 1989, "Transformation of mean star places - from FK4 B1950.0 to FK5 J2000.0 using matrices in 6-space". - Astron.J. 97, 274. -*/ -func Fk425(r1950, d1950 float64, dr1950, dd1950 float64, p1950, v1950 float64, - r2000, d2000 *float64, dr2000, dd2000 *float64, p2000, v2000 *float64) { - /* Radians per year to arcsec per century */ - const PMF = 100.0 * DR2AS - - /* Small number to avoid arithmetic problems */ - const TINY = 1e-30 - - /* Miscellaneous */ - var r, d, ur, ud, px, rv, pxvf, w, rd float64 - var i, j, k, l int - - /* Pv-vectors */ - var r0, pv1, pv2 [2][3]float64 - - /* - CANONICAL CONSTANTS (Seidelmann 1992) - */ - - /* Km per sec to AU per tropical century */ - /* = 86400 * 36524.2198782 / 149597870.7 */ - const VF = 21.095 - - /* Constant pv-vector (cf. Seidelmann 3.591-2, vectors A and Adot) */ - a := [2][3]float64{ - {-1.62557e-6, -0.31919e-6, -0.13843e-6}, - {+1.245e-3, -1.580e-3, -0.659e-3}, - } - - /* 3x2 matrix of pv-vectors (cf. Seidelmann 3.591-4, matrix M) */ - em := [2][3][2][3]float64{ - - {{{+0.9999256782, -0.0111820611, -0.0048579477}, - {+0.00000242395018, -0.00000002710663, -0.00000001177656}}, - - {{+0.0111820610, +0.9999374784, -0.0000271765}, - {+0.00000002710663, +0.00000242397878, -0.00000000006587}}, - - {{+0.0048579479, -0.0000271474, +0.9999881997}, - {+0.00000001177656, -0.00000000006582, +0.00000242410173}}}, - - {{{-0.000551, -0.238565, +0.435739}, - {+0.99994704, -0.01118251, -0.00485767}}, - - {{+0.238514, -0.002667, -0.008541}, - {+0.01118251, +0.99995883, -0.00002718}}, - - {{-0.435623, +0.012254, +0.002117}, - {+0.00485767, -0.00002714, +1.00000956}}}, - } - - /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ - - /* The FK4 data (units radians and arcsec per tropical century). */ - r = r1950 - d = d1950 - ur = dr1950 * PMF - ud = dd1950 * PMF - px = p1950 - rv = v1950 - - /* Express as a pv-vector. */ - pxvf = px * VF - w = rv * pxvf - S2pv(r, d, 1.0, ur, ud, w, &r0) - - /* Allow for E-terms (cf. Seidelmann 3.591-2). */ - Pvmpv(r0, a, &pv1) - Sxp(Pdp(r0[0], a[0]), r0[0], &pv2[0]) - Sxp(Pdp(r0[0], a[1]), r0[0], &pv2[1]) - Pvppv(pv1, pv2, &pv1) - - /* Convert pv-vector to Fricke system (cf. Seidelmann 3.591-3). */ - for i = 0; i < 2; i++ { - for j = 0; j < 3; j++ { - w = 0.0 - for k = 0; k < 2; k++ { - for l = 0; l < 3; l++ { - w += em[i][j][k][l] * pv1[k][l] - } - } - pv2[i][j] = w - } - } - - /* Revert to catalog form. */ - Pv2s(pv2, &r, &d, &w, &ur, &ud, &rd) - if px > TINY { - rv = rd / pxvf - px = px / w - } - - /* Return the results. */ - *r2000 = Anp(r) - *d2000 = d - *dr2000 = ur / PMF - *dd2000 = ud / PMF - *v2000 = rv - *p2000 = px -} - -/* -Fk45z Convert a B1950.0 FK4 star position to J2000.0 FK5, assuming zero proper motion in the FK5 system - -This function converts a star's catalog data from the old FK4 -(Bessel-Newcomb) system to the later IAU 1976 FK5 (Fricke) system, -in such a way that the FK5 proper motion is zero. Because such a -star has, in general, a non-zero proper motion in the FK4 system, -the function requires the epoch at which the position in the FK4 -system was determined. - -Given: - - r1950,d1950 float64 B1950.0 FK4 RA,Dec at epoch (rad) - bepoch float64 Besselian epoch (e.g. 1979.3) - -Returned: - - r2000,d2000 float64 J2000.0 FK5 RA,Dec (rad) - -Notes: - - 1. The epoch bepoch is strictly speaking Besselian, but if a - Julian epoch is supplied the result will be affected only to a - negligible extent. - - 2. The method is from Appendix 2 of Aoki et al. (1983), but using - the constants of Seidelmann (1992). See the function Fk425 - for a general introduction to the FK4 to FK5 conversion. - - 3. Conversion from equinox B1950.0 FK4 to equinox J2000.0 FK5 only - is provided for. Conversions for different starting and/or - ending epochs would require additional treatment for precession, - proper motion and E-terms. - - 4. In the FK4 catalog the proper motions of stars within 10 degrees - of the poles do not embody differential E-terms effects and - should, strictly speaking, be handled in a different manner from - stars outside these regions. However, given the general lack of - homogeneity of the star data available for routine astrometry, - the difficulties of handling positions that may have been - determined from astrometric fields spanning the polar and non- - polar regions, the likelihood that the differential E-terms - effect was not taken into account when allowing for proper motion - in past astrometry, and the undesirability of a discontinuity in - the algorithm, the decision has been made in this SOFA algorithm - to include the effects of differential E-terms on the proper - motions for all stars, whether polar or not. At epoch J2000.0, - and measuring "on the sky" rather than in terms of RA change, the - errors resulting from this simplification are less than - 1 milliarcsecond in position and 1 milliarcsecond per century in - proper motion. - -References: - - Aoki, S. et al., 1983, "Conversion matrix of epoch B1950.0 - FK4-based positions of stars to epoch J2000.0 positions in - accordance with the new IAU resolutions". Astron.Astrophys. - 128, 263-267. - - Seidelmann, P.K. (ed), 1992, "Explanatory Supplement to the - Astronomical Almanac", ISBN 0-935702-68-7. - -Called: - - Anp normalize angle into range 0 to 2pi - C2s p-vector to spherical - Epb2jd Besselian epoch to Julian date - Epj Julian date to Julian epoch - Pdp scalar product of two p-vectors - Pmp p-vector minus p-vector - Ppsp p-vector plus scaled p-vector - Pvu update a pv-vector - S2c spherical to p-vector -*/ -func Fk45z(r1950, d1950, bepoch float64, r2000, d2000 *float64) { - /* Radians per year to arcsec per century */ - const PMF = 100.0 * DR2AS - - /* Position and position+velocity vectors */ - var r0, p [3]float64 - var pv [2][3]float64 - - /* Miscellaneous */ - var w, djm0, djm float64 - var i, j, k int - - /* - CANONICAL CONSTANTS (Seidelmann 1992) - */ - - /* Vectors A and Adot (Seidelmann 3.591-2) */ - a := [3]float64{-1.62557e-6, -0.31919e-6, -0.13843e-6} - ad := [3]float64{+1.245e-3, -1.580e-3, -0.659e-3} - - /* 3x2 matrix of p-vectors (cf. Seidelmann 3.591-4, matrix M) */ - em := [2][3][3]float64{ - {{+0.9999256782, -0.0111820611, -0.0048579477}, - {+0.0111820610, +0.9999374784, -0.0000271765}, - {+0.0048579479, -0.0000271474, +0.9999881997}}, - {{-0.000551, -0.238565, +0.435739}, - {+0.238514, -0.002667, -0.008541}, - {-0.435623, +0.012254, +0.002117}}, - } - - /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ - - /* Spherical coordinates to p-vector. */ - S2c(r1950, d1950, &r0) - - /* Adjust p-vector A to give zero proper motion in FK5. */ - w = (bepoch - 1950) / PMF - Ppsp(a, w, ad, &p) - - /* Remove E-terms. */ - Ppsp(p, -Pdp(r0, p), r0, &p) - Pmp(r0, p, &p) - - /* Convert to Fricke system pv-vector (cf. Seidelmann 3.591-3). */ - for i = 0; i < 2; i++ { - for j = 0; j < 3; j++ { - w = 0.0 - for k = 0; k < 3; k++ { - w += em[i][j][k] * p[k] - } - pv[i][j] = w - } - } - - /* Allow for fictitious proper motion. */ - Epb2jd(bepoch, &djm0, &djm) - w = (Epj(djm0, djm) - 2000.0) / PMF - Pvu(w, pv, &pv) - - /* Revert to spherical coordinates. */ - C2s(pv[0], &w, d2000) - *r2000 = Anp(w) -} - -/* -Fk524 Convert J2000.0 FK5 star catalog data to B1950.0 FK4 - -Given: (all J2000.0, FK5) - - r2000,d2000 float64 J2000.0 RA,Dec (rad) - dr2000,dd2000 float64 J2000.0 proper motions (rad/Jul.yr) - p2000 float64 parallax (arcsec) - v2000 float64 radial velocity (km/s, +ve = moving away) - -Returned: (all B1950.0, FK4) - - r1950,d1950 float64 B1950.0 RA,Dec (rad) - dr1950,dd1950 float64 B1950.0 proper motions (rad/trop.yr) - p1950 float64 parallax (arcsec) - v1950 float64 radial velocity (km/s, +ve = moving away) - -Notes: - - 1. The proper motions in RA are dRA/dt rather than cos(Dec)*dRA/dt, - and are per year rather than per century. - - 2. The conversion is somewhat complicated, for several reasons: - - . Change of standard epoch from J2000.0 to B1950.0. - - . An intermediate transition date of 1984 January 1.0 TT. - - . A change of precession model. - - . Change of time unit for proper motion (Julian to tropical). - - . FK4 positions include the E-terms of aberration, to simplify - the hand computation of annual aberration. FK5 positions - assume a rigorous aberration computation based on the Earth's - barycentric velocity. - - . The E-terms also affect proper motions, and in particular cause - objects at large distances to exhibit fictitious proper - motions. - - 3. The algorithm is based on Smith et al. (1989) and Yallop et al. - (1989), which presented a matrix method due to Standish (1982) as - developed by Aoki et al. (1983), using Kinoshita's development of - Andoyer's post-Newcomb precession. The numerical constants from - Seidelmann (1992) are used canonically. - - 4. In the FK4 catalog the proper motions of stars within 10 degrees - of the poles do not embody differential E-terms effects and - should, strictly speaking, be handled in a different manner from - stars outside these regions. However, given the general lack of - homogeneity of the star data available for routine astrometry, - the difficulties of handling positions that may have been - determined from astrometric fields spanning the polar and non- - polar regions, the likelihood that the differential E-terms - effect was not taken into account when allowing for proper motion - in past astrometry, and the undesirability of a discontinuity in - the algorithm, the decision has been made in this SOFA algorithm - to include the effects of differential E-terms on the proper - motions for all stars, whether polar or not. At epoch J2000.0, - and measuring "on the sky" rather than in terms of RA change, the - errors resulting from this simplification are less than - 1 milliarcsecond in position and 1 milliarcsecond per century in - proper motion. - -Called: - - Anp normalize angle into range 0 to 2pi - Pdp scalar product of two p-vectors - Pm modulus of p-vector - Pmp p-vector minus p-vector - Ppp p-vector pluus p-vector - Pv2s pv-vector to spherical coordinates - S2pv spherical coordinates to pv-vector - Sxp multiply p-vector by scalar - -References: - - Aoki, S. et al., 1983, "Conversion matrix of epoch B1950.0 - FK4-based positions of stars to epoch J2000.0 positions in - accordance with the new IAU resolutions". Astron.Astrophys. - 128, 263-267. - - Seidelmann, P.K. (ed), 1992, "Explanatory Supplement to the - Astronomical Almanac", ISBN 0-935702-68-7. - - Smith, C.A. et al., 1989, "The transformation of astrometric - catalog systems to the equinox J2000.0". Astron.J. 97, 265. - - Standish, E.M., 1982, "Conversion of positions and proper motions - from B1950.0 to the IAU system at J2000.0". Astron.Astrophys., - 115, 1, 20-22. - - Yallop, B.D. et al., 1989, "Transformation of mean star places - from FK4 B1950.0 to FK5 J2000.0 using matrices in 6-space". - Astron.J. 97, 274. -*/ -func Fk524(r2000, d2000 float64, dr2000, dd2000 float64, p2000, v2000 float64, - r1950, d1950 *float64, dr1950, dd1950 *float64, p1950, v1950 *float64) { - /* Radians per year to arcsec per century */ - const PMF = 100.0 * DR2AS - - /* Small number to avoid arithmetic problems */ - const TINY = 1e-30 - - /* Miscellaneous */ - var r, d, ur, ud, px, rv, pxvf, w, rd float64 - var i, j, k, l int - - /* Vectors, p and pv */ - var r0, r1, pv [2][3]float64 - var p1, p2 [3]float64 - - /* - CANONICAL CONSTANTS (Seidelmann 1992) - */ - - /* Km per sec to AU per tropical century */ - /* = 86400 * 36524.2198782 / 149597870.7 */ - const VF = 21.095 - - /* Constant pv-vector (cf. Seidelmann 3.591-2, vectors A and Adot) */ - a := [2][3]float64{ - {-1.62557e-6, -0.31919e-6, -0.13843e-6}, - {+1.245e-3, -1.580e-3, -0.659e-3}, - } - - /* 3x2 matrix of pv-vectors (cf. Seidelmann 3.592-1, matrix M^-1) */ - em := [2][3][2][3]float64{ - - {{ - {+0.9999256795, +0.0111814828, +0.0048590039}, - {-0.00000242389840, -0.00000002710544, -0.00000001177742}, - }, { - {-0.0111814828, +0.9999374849, -0.0000271771}, - {+0.00000002710544, -0.00000242392702, +0.00000000006585}, - }, { - {-0.0048590040, -0.0000271557, +0.9999881946}, - {+0.00000001177742, +0.00000000006585, -0.00000242404995}, - }, - }, - - {{ - {-0.000551, +0.238509, -0.435614}, - {+0.99990432, +0.01118145, +0.00485852}, - }, { - {-0.238560, -0.002667, +0.012254}, - {-0.01118145, +0.99991613, -0.00002717}, - }, { - {+0.435730, -0.008541, +0.002117}, - {-0.00485852, -0.00002716, +0.99996684}, - }}, - } - - /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ - - /* The FK5 data (units radians and arcsec per Julian century). */ - r = r2000 - d = d2000 - ur = dr2000 * PMF - ud = dd2000 * PMF - px = p2000 - rv = v2000 - - /* Express as a pv-vector. */ - pxvf = px * VF - w = rv * pxvf - S2pv(r, d, 1.0, ur, ud, w, &r0) - - /* Convert pv-vector to Bessel-Newcomb system (cf. Seidelmann 3.592-1). */ - for i = 0; i < 2; i++ { - for j = 0; j < 3; j++ { - w = 0.0 - for k = 0; k < 2; k++ { - for l = 0; l < 3; l++ { - w += em[i][j][k][l] * r0[k][l] - } - } - r1[i][j] = w - } - } - - /* Apply E-terms (equivalent to Seidelmann 3.592-3, one iteration). */ - - /* Direction. */ - w = Pm(r1[0]) - Sxp(Pdp(r1[0], a[0]), r1[0], &p1) - Sxp(w, a[0], &p2) - Pmp(p2, p1, &p1) - Ppp(r1[0], p1, &p1) - - /* Recompute length. */ - w = Pm(p1) - - /* Direction. */ - Sxp(Pdp(r1[0], a[0]), r1[0], &p1) - Sxp(w, a[0], &p2) - Pmp(p2, p1, &p1) - Ppp(r1[0], p1, &pv[0]) - - /* Derivative. */ - Sxp(Pdp(r1[0], a[1]), pv[0], &p1) - Sxp(w, a[1], &p2) - Pmp(p2, p1, &p1) - Ppp(r1[1], p1, &pv[1]) - - /* Revert to catalog form. */ - Pv2s(pv, &r, &d, &w, &ur, &ud, &rd) - if px > TINY { - rv = rd / pxvf - px = px / w - } - - /* Return the results. */ - *r1950 = Anp(r) - *d1950 = d - *dr1950 = ur / PMF - *dd1950 = ud / PMF - *p1950 = px - *v1950 = rv -} - -/* -Fk52h Transform FK5 (J2000.0) star data into the Hipparcos frame - -Given (all FK5, equinox J2000.0, epoch J2000.0): - - r5 float64 RA (radians) - d5 float64 Dec (radians) - dr5 float64 proper motion in RA (dRA/dt, rad/Jyear) - dd5 float64 proper motion in Dec (dDec/dt, rad/Jyear) - px5 float64 parallax (arcsec) - rv5 float64 radial velocity (km/s, positive = receding) - -Returned (all Hipparcos, epoch J2000.0): - - rh float64 RA (radians) - dh float64 Dec (radians) - drh float64 proper motion in RA (dRA/dt, rad/Jyear) - ddh float64 proper motion in Dec (dDec/dt, rad/Jyear) - pxh float64 parallax (arcsec) - rvh float64 radial velocity (km/s, positive = receding) - -Notes: - - 1. This function transforms FK5 star positions and proper motions - into the system of the Hipparcos catalog. - - 2. The proper motions in RA are dRA/dt rather than - cos(Dec)*dRA/dt, and are per year rather than per century. - - 3. The FK5 to Hipparcos transformation is modeled as a pure - rotation and spin; zonal errors in the FK5 catalog are not - taken into account. - - 4. See also H2fk5, Fk5hz, Hfk5z. - -Called: - - Starpv star catalog data to space motion pv-vector - Fk5hip FK5 to Hipparcos rotation and spin - Rxp product of r-matrix and p-vector - Pxp vector product of two p-vectors - Ppp p-vector plus p-vector - Pvstar space motion pv-vector to star catalog data - -Reference: - - F.Mignard & M.Froeschle, Astron.Astrophys., 354, 732-739 (2000). -*/ -func Fk52h(r5, d5 float64, dr5, dd5, px5, rv5 float64, - rh, dh *float64, drh, ddh, pxh, rvh *float64) { - - var i int - var pv5, pvh [2][3]float64 - var r5h [3][3]float64 - var s5h, wxp, vv [3]float64 - - /* FK5 barycentric position/velocity pv-vector (normalized). */ - Starpv(r5, d5, dr5, dd5, px5, rv5, &pv5) - - /* FK5 to Hipparcos orientation matrix and spin vector. */ - Fk5hip(&r5h, &s5h) - - /* Make spin units per day instead of per year. */ - for i = 0; i < 3; i++ { - s5h[i] /= 365.25 - } - - /* Orient the FK5 position into the Hipparcos system. */ - Rxp(r5h, pv5[0], &pvh[0]) - - /* Apply spin to the position giving an extra space motion component. */ - Pxp(pv5[0], s5h, &wxp) - - /* Add this component to the FK5 space motion. */ - Ppp(wxp, pv5[1], &vv) - - /* Orient the FK5 space motion into the Hipparcos system. */ - Rxp(r5h, vv, &pvh[1]) - - /* Hipparcos pv-vector to spherical. */ - Pvstar(pvh, rh, dh, drh, ddh, pxh, rvh) -} - -/* -Fk54z Convert a J2000.0 FK5 star position to B1950.0 FK4, assuming zero proper motion in FK5 system and zero parallax - -Given: - - r2000,d2000 float64 J2000.0 FK5 RA,Dec (rad) - bepoch float64 Besselian epoch (e.g. 1950.0) - -Returned: - - r1950,d1950 float64 B1950.0 FK4 RA,Dec (rad) at epoch BEPOCH - dr1950,dd1950 float64 B1950.0 FK4 proper motions (rad/trop.yr) - -Notes: - - 1. In contrast to the Fk524 function, here the FK5 proper - motions, the parallax and the radial velocity are presumed zero. - - 2. This function converts a star position from the IAU 1976 FK5 - (Fricke) system to the former FK4 (Bessel-Newcomb) system, for - cases such as distant radio sources where it is presumed there is - zero parallax and no proper motion. Because of the E-terms of - aberration, such objects have (in general) non-zero proper motion - in FK4, and the present function returns those fictitious proper - motions. - - 3. Conversion from J2000.0 FK5 to B1950.0 FK4 only is provided for. - Conversions involving other equinoxes would require additional - treatment for precession. - - 4. The position returned by this function is in the B1950.0 FK4 - reference system but at Besselian epoch BEPOCH. For comparison - with catalogs the BEPOCH argument will frequently be 1950.0. (In - this context the distinction between Besselian and Julian epoch - is insignificant.) - - 5. The RA component of the returned (fictitious) proper motion is - dRA/dt rather than cos(Dec)*dRA/dt. - -Called: - - Anp normalize angle into range 0 to 2pi - C2s p-vector to spherical - Fk524 FK4 to FK5 - S2c spherical to p-vector -*/ -func Fk54z(r2000, d2000, bepoch float64, r1950, d1950 *float64, dr1950, dd1950 *float64) { - var r, d, pr, pd, px, rv, w float64 - var p, v [3]float64 - var i int - - /* FK5 equinox J2000.0 to FK4 equinox B1950.0. */ - Fk524(r2000, d2000, 0.0, 0.0, 0.0, 0.0, - &r, &d, &pr, &pd, &px, &rv) - - /* Spherical to Cartesian. */ - S2c(r, d, &p) - - /* Fictitious proper motion (radians per year). */ - v[0] = -pr*p[1] - pd*cos(r)*sin(d) - v[1] = pr*p[0] - pd*sin(r)*sin(d) - v[2] = pd * cos(d) - - /* Apply the motion. */ - w = bepoch - 1950.0 - for i = 0; i < 3; i++ { - p[i] += w * v[i] - } - - /* Cartesian to spherical. */ - C2s(p, &w, d1950) - *r1950 = Anp(w) - - /* Fictitious proper motion. */ - *dr1950 = pr - *dd1950 = pd -} - -/* -Fk5hip FK5 orientation and spin with respect to Hipparcos - -Returned: - - r5h [3][3]float64 r-matrix: FK5 rotation wrt Hipparcos (Note 2) - s5h [3]float64 r-vector: FK5 spin wrt Hipparcos (Note 3) - -Notes: - - 1. This function models the FK5 to Hipparcos transformation as a - pure rotation and spin; zonal errors in the FK5 catalogue are - not taken into account. - - 2. The r-matrix r5h operates in the sense: - - P_Hipparcos = r5h x P_FK5 - - where P_FK5 is a p-vector in the FK5 frame, and P_Hipparcos is - the equivalent Hipparcos p-vector. - - 3. The r-vector s5h represents the time derivative of the FK5 to - Hipparcos rotation. The units are radians per year (Julian, - TDB). - -Called: - - Rv2m r-vector to r-matrix - -Reference: - - F.Mignard & M.Froeschle, Astron.Astrophys., 354, 732-739 (2000). -*/ -func Fk5hip(r5h *[3][3]float64, s5h *[3]float64) { - var v [3]float64 - - /* FK5 wrt Hipparcos orientation and spin (radians, radians/year) */ - var epx, epy, epz float64 - var omx, omy, omz float64 - - epx = -19.9e-3 * DAS2R - epy = -9.1e-3 * DAS2R - epz = 22.9e-3 * DAS2R - - omx = -0.30e-3 * DAS2R - omy = 0.60e-3 * DAS2R - omz = 0.70e-3 * DAS2R - - /* FK5 to Hipparcos orientation expressed as an r-vector. */ - v[0] = epx - v[1] = epy - v[2] = epz - - /* Re-express as an r-matrix. */ - Rv2m(v, r5h) - - /* Hipparcos wrt FK5 spin expressed as an r-vector. */ - s5h[0] = omx - s5h[1] = omy - s5h[2] = omz -} - -/* -Fk5hz FK5 to Hipparcos assuming zero Hipparcos proper motion - -Transform an FK5 (J2000.0) star position into the system of the -Hipparcos catalogue, assuming zero Hipparcos proper motion. - -Given: - - r5 float64 FK5 RA (radians), equinox J2000.0, at date - d5 float64 FK5 Dec (radians), equinox J2000.0, at date - date1,date2 float64 TDB date (Notes 1,2) - -Returned: - - rh float64 Hipparcos RA (radians) - dh float64 Hipparcos Dec (radians) - -Notes: - - 1. This function converts a star position from the FK5 system to - the Hipparcos system, in such a way that the Hipparcos proper - motion is zero. Because such a star has, in general, a non-zero - proper motion in the FK5 system, the function requires the date - at which the position in the FK5 system was determined. - - 2. The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 3. The FK5 to Hipparcos transformation is modeled as a pure - rotation and spin; zonal errors in the FK5 catalogue are not - taken into account. - - 4. The position returned by this function is in the Hipparcos - reference system but at date date1+date2. - - 5. See also Fk52h, H2fk5, Hfk5z. - -Called: - - S2c spherical coordinates to unit vector - Fk5hip FK5 to Hipparcos rotation and spin - Sxp multiply p-vector by scalar - Rv2m r-vector to r-matrix - Trxp product of transpose of r-matrix and p-vector - Pxp vector product of two p-vectors - C2s p-vector to spherical - Anp normalize angle into range 0 to 2pi - -Reference: - - F.Mignard & M.Froeschle, 2000, Astron.Astrophys. 354, 732-739. -*/ -func Fk5hz(r5, d5 float64, date1, date2 float64, rh, dh *float64) { - var t, w float64 - var p5e, s5h, vst, p5, ph [3]float64 - var r5h, rst [3][3]float64 - - /* Interval from given date to fundamental epoch J2000.0 (JY). */ - t = -((date1 - DJ00) + date2) / DJY - - /* FK5 barycentric position vector. */ - S2c(r5, d5, &p5e) - - /* FK5 to Hipparcos orientation matrix and spin vector. */ - Fk5hip(&r5h, &s5h) - - /* Accumulated Hipparcos wrt FK5 spin over that interval. */ - Sxp(t, s5h, &vst) - - /* Express the accumulated spin as a rotation matrix. */ - Rv2m(vst, &rst) - - /* Derotate the vector's FK5 axes back to date. */ - Trxp(rst, p5e, &p5) - - /* Rotate the vector into the Hipparcos system. */ - Rxp(r5h, p5, &ph) - - /* Hipparcos vector to spherical. */ - C2s(ph, &w, dh) - *rh = Anp(w) -} - -/* -H2fk5 Transform Hipparcos star data into the FK5 (J2000.0) frame - -Given (all Hipparcos, epoch J2000.0): - - rh float64 RA (radians) - dh float64 Dec (radians) - drh float64 proper motion in RA (dRA/dt, rad/Jyear) - ddh float64 proper motion in Dec (dDec/dt, rad/Jyear) - pxh float64 parallax (arcsec) - rvh float64 radial velocity (km/s, positive = receding) - -Returned (all FK5, equinox J2000.0, epoch J2000.0): - - r5 float64 RA (radians) - d5 float64 Dec (radians) - dr5 float64 proper motion in RA (dRA/dt, rad/Jyear) - dd5 float64 proper motion in Dec (dDec/dt, rad/Jyear) - px5 float64 parallax (arcsec) - rv5 float64 radial velocity (km/s, positive = receding) - -Notes: - - 1. This function transforms Hipparcos star positions and proper - motions into FK5 J2000.0. - - 2. The proper motions in RA are dRA/dt rather than - cos(Dec)*dRA/dt, and are per year rather than per century. - - 3. The FK5 to Hipparcos transformation is modeled as a pure - rotation and spin; zonal errors in the FK5 catalog are not - taken into account. - - 4. See also Fk52h, Fk5hz, Hfk5z. - -Called: - - Starpv star catalog data to space motion pv-vector - Fk5hip FK5 to Hipparcos rotation and spin - Rv2m r-vector to r-matrix - Rxp product of r-matrix and p-vector - Trxp product of transpose of r-matrix and p-vector - Pxp vector product of two p-vectors - Pmp p-vector minus p-vector - Pvstar space motion pv-vector to star catalog data - -Reference: - - F.Mignard & M.Froeschle, Astron.Astrophys., 354, 732-739 (2000). -*/ -func H2fk5(rh, dh float64, drh, ddh, pxh, rvh float64, - r5, d5 *float64, dr5, dd5, px5, rv5 *float64) { - - var i int - var pvh, pv5 [2][3]float64 - var r5h [3][3]float64 - var s5h, sh, wxp, vv [3]float64 - - /* Hipparcos barycentric position/velocity pv-vector (normalized). */ - Starpv(rh, dh, drh, ddh, pxh, rvh, &pvh) - - /* FK5 to Hipparcos orientation matrix and spin vector. */ - Fk5hip(&r5h, &s5h) - - /* Make spin units per day instead of per year. */ - for i = 0; i < 3; i++ { - s5h[i] /= 365.25 - } - - /* Orient the spin into the Hipparcos system. */ - Rxp(r5h, s5h, &sh) - - /* De-orient the Hipparcos position into the FK5 system. */ - Trxp(r5h, pvh[0], &pv5[0]) - - /* Apply spin to the position giving an extra space motion component. */ - Pxp(pvh[0], sh, &wxp) - - /* Subtract this component from the Hipparcos space motion. */ - Pmp(pvh[1], wxp, &vv) - - /* De-orient the Hipparcos space motion into the FK5 system. */ - Trxp(r5h, vv, &pv5[1]) - - /* FK5 pv-vector to spherical. */ - Pvstar(pv5, r5, d5, dr5, dd5, px5, rv5) -} - -/* -Hfk5z Hipparcos to FK5 assuming zero Hipparcos proper motion - -Transform a Hipparcos star position into FK5 J2000.0, assuming -zero Hipparcos proper motion. - -Given: - - rh float64 Hipparcos RA (radians) - dh float64 Hipparcos Dec (radians) - date1,date2 float64 TDB date (Note 1) - -Returned (all FK5, equinox J2000.0, date date1+date2): - - r5 float64 RA (radians) - d5 float64 Dec (radians) - dr5 float64 FK5 RA proper motion (rad/year, Note 4) - dd5 float64 Dec proper motion (rad/year, Note 4) - -Notes: - - 1. The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2. The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. - - 3. The FK5 to Hipparcos transformation is modeled as a pure rotation - and spin; zonal errors in the FK5 catalogue are not taken into - account. - - 4. It was the intention that Hipparcos should be a close - approximation to an inertial frame, so that distant objects have - zero proper motion; such objects have (in general) non-zero - proper motion in FK5, and this function returns those fictitious - proper motions. - - 5. The position returned by this function is in the FK5 J2000.0 - reference system but at date date1+date2. - - 6. See also Fk52h, H2fk5, Fk5hz. - -Called: - - S2c spherical coordinates to unit vector - Fk5hip FK5 to Hipparcos rotation and spin - Rxp product of r-matrix and p-vector - Sxp multiply p-vector by scalar - Rxr product of two r-matrices - Trxp product of transpose of r-matrix and p-vector - Pxp vector product of two p-vectors - Pv2s pv-vector to spherical - Anp normalize angle into range 0 to 2pi - -Reference: - - F.Mignard & M.Froeschle, 2000, Astron.Astrophys. 354, 732-739. -*/ -func Hfk5z(rh, dh float64, date1, date2 float64, r5, d5, dr5, dd5 *float64) { - var t, w, r, v float64 - var ph, s5h, sh, vst, vv [3]float64 - var pv5e [2][3]float64 - var r5h, rst, r5ht [3][3]float64 - - /* Time interval from fundamental epoch J2000.0 to given date (JY). */ - t = ((date1 - DJ00) + date2) / DJY - - /* Hipparcos barycentric position vector (normalized). */ - S2c(rh, dh, &ph) - - /* FK5 to Hipparcos orientation matrix and spin vector. */ - Fk5hip(&r5h, &s5h) - - /* Rotate the spin into the Hipparcos system. */ - Rxp(r5h, s5h, &sh) - - /* Accumulated Hipparcos wrt FK5 spin over that interval. */ - Sxp(t, s5h, &vst) - - /* Express the accumulated spin as a rotation matrix. */ - Rv2m(vst, &rst) - - /* Rotation matrix: accumulated spin, then FK5 to Hipparcos. */ - Rxr(r5h, rst, &r5ht) - - /* De-orient & de-spin the Hipparcos position into FK5 J2000.0. */ - Trxp(r5ht, ph, &pv5e[0]) - - /* Apply spin to the position giving a space motion. */ - Pxp(sh, ph, &vv) - - /* De-orient & de-spin the Hipparcos space motion into FK5 J2000.0. */ - Trxp(r5ht, vv, &pv5e[1]) - - /* FK5 position/velocity pv-vector to spherical. */ - Pv2s(pv5e, &w, d5, &r, dr5, dd5, &v) - *r5 = Anp(w) -} diff --git a/vendor/github.com/hebl/gofa/coord.go b/vendor/github.com/hebl/gofa/coord.go deleted file mode 100644 index c1739f4..0000000 --- a/vendor/github.com/hebl/gofa/coord.go +++ /dev/null @@ -1,1272 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -// Coord - -// Galactic Coordinates - -/* -Icrs2g Transformation from ICRS to Galactic Coordinates. - -Given: - dr float64 ICRS right ascension (radians) - dd float64 ICRS declination (radians) - -Returned: - dl float64 galactic longitude (radians) - db float64 galactic latitude (radians) - -Notes: - - 1) The IAU 1958 system of Galactic coordinates was defined with - respect to the now obsolete reference system FK4 B1950.0. When - interpreting the system in a modern context, several factors have - to be taken into account: - - . The inclusion in FK4 positions of the E-terms of aberration. - . The distortion of the FK4 proper motion system by differential - Galactic rotation. - . The use of the B1950.0 equinox rather than the now-standard - J2000.0. - . The frame bias between ICRS and the J2000.0 mean place system. - - The Hipparcos Catalogue (Perryman & ESA 1997) provides a rotation - matrix that transforms directly between ICRS and Galactic - coordinates with the above factors taken into account. The - matrix is derived from three angles, namely the ICRS coordinates - of the Galactic pole and the longitude of the ascending node of - the galactic equator on the ICRS equator. They are given in - degrees to five decimal places and for canonical purposes are - regarded as exact. In the Hipparcos Catalogue the matrix - elements are given to 10 decimal places (about 20 microarcsec). - In the present SOFA function the matrix elements have been - recomputed from the canonical three angles and are given to 30 - decimal places. - - 2) The inverse transformation is performed by the function G2icrs. - -Called: - Anp normalize angle into range 0 to 2pi - Anpm normalize angle into range +/- pi - S2c spherical coordinates to unit vector - Rxp product of r-matrix and p-vector - C2s p-vector to spherical - -Reference: - Perryman M.A.C. & ESA, 1997, ESA SP-1200, The Hipparcos and Tycho - catalogues. Astrometric and photometric star catalogues - derived from the ESA Hipparcos Space Astrometry Mission. ESA - Publications Division, Noordwijk, Netherlands. -*/ -func Icrs2g(dr, dd float64, dl, db *float64) { - var v1, v2 [3]float64 - - /* - L2,B2 system of galactic coordinates in the form presented in the - Hipparcos Catalogue. In degrees: - - P = 192.85948 right ascension of the Galactic north pole in ICRS - Q = 27.12825 declination of the Galactic north pole in ICRS - R = 32.93192 Galactic longitude of the ascending node of - the Galactic equator on the ICRS equator - - ICRS to galactic rotation matrix, obtained by computing - R_3(-R) R_1(pi/2-Q) R_3(pi/2+P) to the full precision shown: - */ - r := [3][3]float64{ - {-0.054875560416215368492398900454, -0.873437090234885048760383168409, -0.483835015548713226831774175116}, - {+0.494109427875583673525222371358, -0.444829629960011178146614061616, +0.746982244497218890527388004556}, - {-0.867666149019004701181616534570, -0.198076373431201528180486091412, +0.455983776175066922272100478348}, - } - - /* Spherical to Cartesian. */ - S2c(dr, dd, &v1) - - /* ICRS to Galactic. */ - Rxp(r, v1, &v2) - - /* Cartesian to spherical. */ - C2s(v2, dl, db) - - /* Express in conventional ranges. */ - *dl = Anp(*dl) - *db = Anpm(*db) -} - -/* -G2icrsTransformation from Galactic Coordinates to ICRS. - -Given: - dl float64 galactic longitude (radians) - db float64 galactic latitude (radians) - -Returned: - dr float64 ICRS right ascension (radians) - dd float64 ICRS declination (radians) - -Notes: - - 1) The IAU 1958 system of Galactic coordinates was defined with - respect to the now obsolete reference system FK4 B1950.0. When - interpreting the system in a modern context, several factors have - to be taken into account: - - . The inclusion in FK4 positions of the E-terms of aberration. - . The distortion of the FK4 proper motion system by differential - Galactic rotation. - . The use of the B1950.0 equinox rather than the now-standard - J2000.0. - . The frame bias between ICRS and the J2000.0 mean place system. - - The Hipparcos Catalogue (Perryman & ESA 1997) provides a rotation - matrix that transforms directly between ICRS and Galactic - coordinates with the above factors taken into account. The - matrix is derived from three angles, namely the ICRS coordinates - of the Galactic pole and the longitude of the ascending node of - the galactic equator on the ICRS equator. They are given in - degrees to five decimal places and for canonical purposes are - regarded as exact. In the Hipparcos Catalogue the matrix - elements are given to 10 decimal places (about 20 microarcsec). - In the present SOFA function the matrix elements have been - recomputed from the canonical three angles and are given to 30 - decimal places. - - 2) The inverse transformation is performed by the function Icrs2g. - -Called: - Anp normalize angle into range 0 to 2pi - Anpm normalize angle into range +/- pi - S2c spherical coordinates to unit vector - Trxp product of transpose of r-matrix and p-vector - C2s p-vector to spherical - -Reference: - Perryman M.A.C. & ESA, 1997, ESA SP-1200, The Hipparcos and Tycho - catalogues. Astrometric and photometric star catalogues - derived from the ESA Hipparcos Space Astrometry Mission. ESA - Publications Division, Noordwijk, Netherlands. -*/ -func G2icrs(dl, db float64, dr, dd *float64) { - var v1, v2 [3]float64 - - /* - L2,B2 system of galactic coordinates in the form presented in the - Hipparcos Catalogue. In degrees: - - P = 192.85948 right ascension of the Galactic north pole in ICRS - Q = 27.12825 declination of the Galactic north pole in ICRS - R = 32.93192 Galactic longitude of the ascending node of - the Galactic equator on the ICRS equator - - ICRS to galactic rotation matrix, obtained by computing - R_3(-R) R_1(pi/2-Q) R_3(pi/2+P) to the full precision shown: - */ - r := [3][3]float64{ - {-0.054875560416215368492398900454, -0.873437090234885048760383168409, -0.483835015548713226831774175116}, - {+0.494109427875583673525222371358, -0.444829629960011178146614061616, +0.746982244497218890527388004556}, - {-0.867666149019004701181616534570, -0.198076373431201528180486091412, +0.455983776175066922272100478348}, - } - - /* Spherical to Cartesian. */ - S2c(dl, db, &v1) - - /* Galactic to ICRS. */ - Trxp(r, v1, &v2) - - /* Cartesian to spherical. */ - C2s(v2, dr, dd) - - /* Express in conventional ranges. */ - *dr = Anp(*dr) - *dd = Anpm(*dd) -} - -/* -Ae2hd Horizon to equatorial coordinates, transform azimuth and altitude to hour angle and declination. - -Given: - az float64 azimuth - el float64 altitude (informally, elevation) - phi float64 site latitude - -Returned: - ha float64 hour angle (local) - dec float64 declination - -Notes: - - 1) All the arguments are angles in radians. - - 2) The sign convention for azimuth is north zero, east +pi/2. - - 3) HA is returned in the range +/-pi. Declination is returned in - the range +/-pi/2. - - 4) The latitude phi is pi/2 minus the angle between the Earth's - rotation axis and the adopted zenith. In many applications it - will be sufficient to use the published geodetic latitude of the - site. In very precise (sub-arcsecond) applications, phi can be - corrected for polar motion. - - 5) The azimuth az must be with respect to the rotational north pole, - as opposed to the ITRS pole, and an azimuth with respect to north - on a map of the Earth's surface will need to be adjusted for - polar motion if sub-arcsecond accuracy is required. - - 6) Should the user wish to work with respect to the astronomical - zenith rather than the geodetic zenith, phi will need to be - adjusted for deflection of the vertical (often tens of - arcseconds), and the zero point of ha will also be affected. - - 7) The transformation is the same as Ve = Ry(phi-pi/2)*Rz(pi)*Vh, - where Ve and Vh are lefthanded unit vectors in the (ha,dec) and - (az,el) systems respectively and Rz and Ry are rotations about - first the z-axis and then the y-axis. (n.b. Rz(pi) simply - reverses the signs of the x and y components.) For efficiency, - the algorithm is written out rather than calling other utility - functions. For applications that require even greater - efficiency, additional savings are possible if constant terms - such as functions of latitude are computed once and for all. - - 8) Again for efficiency, no range checking of arguments is carried - out. -*/ -func Ae2hd(az, el, phi float64, ha, dec *float64) { - var sa, ca, se, ce, sp, cp, x, y, z, r float64 - - /* Useful trig functions. */ - sa = sin(az) - ca = cos(az) - se = sin(el) - ce = cos(el) - sp = sin(phi) - cp = cos(phi) - - /* HA,Dec unit vector. */ - x = -ca*ce*sp + se*cp - y = -sa * ce - z = ca*ce*cp + se*sp - - /* To spherical. */ - r = sqrt(x*x + y*y) - if r != 0.0 { - *ha = atan2(y, x) - } else { - *ha = 0.0 - } - *dec = atan2(z, r) -} - -/* -Hd2ae Equatorial to horizon coordinates: transform hour angle and declination to azimuth and altitude. - -Given: - ha float64 hour angle (local) - dec float64 declination - phi float64 site latitude - -Returned: - az float64 azimuth - el float64 altitude (informally, elevation) - -Notes: - - 1) All the arguments are angles in radians. - - 2) Azimuth is returned in the range 0-2pi; north is zero, and east - is +pi/2. Altitude is returned in the range +/- pi/2. - - 3) The latitude phi is pi/2 minus the angle between the Earth's - rotation axis and the adopted zenith. In many applications it - will be sufficient to use the published geodetic latitude of the - site. In very precise (sub-arcsecond) applications, phi can be - corrected for polar motion. - - 4) The returned azimuth az is with respect to the rotational north - pole, as opposed to the ITRS pole, and for sub-arcsecond - accuracy will need to be adjusted for polar motion if it is to - be with respect to north on a map of the Earth's surface. - - 5) Should the user wish to work with respect to the astronomical - zenith rather than the geodetic zenith, phi will need to be - adjusted for deflection of the vertical (often tens of - arcseconds), and the zero point of the hour angle ha will also - be affected. - - 6) The transformation is the same as Vh = Rz(pi)*Ry(pi/2-phi)*Ve, - where Vh and Ve are lefthanded unit vectors in the (az,el) and - (ha,dec) systems respectively and Ry and Rz are rotations about - first the y-axis and then the z-axis. (n.b. Rz(pi) simply - reverses the signs of the x and y components.) For efficiency, - the algorithm is written out rather than calling other utility - functions. For applications that require even greater - efficiency, additional savings are possible if constant terms - such as functions of latitude are computed once and for all. - - 7) Again for efficiency, no range checking of arguments is carried - out. -*/ -func Hd2ae(ha, dec, phi float64, az, el *float64) { - var sh, ch, sd, cd, sp, cp, x, y, z, r, a float64 - - /* Useful trig functions. */ - sh = sin(ha) - ch = cos(ha) - sd = sin(dec) - cd = cos(dec) - sp = sin(phi) - cp = cos(phi) - - /* Az,Alt unit vector. */ - x = -ch*cd*sp + sd*cp - y = -sh * cd - z = ch*cd*cp + sd*sp - - /* To spherical. */ - r = sqrt(x*x + y*y) - if r != 0.0 { - a = atan2(y, x) - } else { - a = 0.0 - } - if a < 0.0 { - *az = a + D2PI - } else { - *az = a - } - - *el = atan2(z, r) -} - -/* -Hd2pa Parallactic angle for a given hour angle and declination. - -Given: - ha float64 hour angle - dec float64 declination - phi float64 site latitude - -Returned (function value): - float64 parallactic angle - -Notes: - - 1) All the arguments are angles in radians. - - 2) The parallactic angle at a point in the sky is the position - angle of the vertical, i.e. the angle between the directions to - the north celestial pole and to the zenith respectively. - - 3) The result is returned in the range -pi to +pi. - - 4) At the pole itself a zero result is returned. - - 5) The latitude phi is pi/2 minus the angle between the Earth's - rotation axis and the adopted zenith. In many applications it - will be sufficient to use the published geodetic latitude of the - site. In very precise (sub-arcsecond) applications, phi can be - corrected for polar motion. - - 6) Should the user wish to work with respect to the astronomical - zenith rather than the geodetic zenith, phi will need to be - adjusted for deflection of the vertical (often tens of - arcseconds), and the zero point of the hour angle ha will also - be affected. - -Reference: - Smart, W.M., "Spherical Astronomy", Cambridge University Press, - 6th edition (Green, 1977), p49. -*/ -func Hd2pa(ha, dec, phi float64) float64 { - var cp, cqsz, sqsz float64 - - cp = cos(phi) - sqsz = cp * sin(ha) - cqsz = sin(phi)*cos(dec) - cp*sin(dec)*cos(ha) - if sqsz != 0.0 || cqsz != 0.0 { - return atan2(sqsz, cqsz) - } - return 0.0 -} - -/* -Ecm06 ICRS equatorial to ecliptic rotation matrix, IAU 2006. - -Given: - date1,date2 float64 TT as a 2-part Julian date (Note 1) - -Returned: - rm [3][3]float64 ICRS to ecliptic rotation matrix - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix is in the sense - - E_ep = rm x P_ICRS, - - where P_ICRS is a vector with respect to ICRS right ascension - and declination axes and E_ep is the same vector with respect to - the (inertial) ecliptic and equinox of date. - - 3) P_ICRS is a free vector, merely a direction, typically of unit - magnitude, and not bound to any particular spatial origin, such - as the Earth, Sun or SSB. No assumptions are made about whether - it represents starlight and embodies astrometric effects such as - parallax or aberration. The transformation is approximately that - between mean J2000.0 right ascension and declination and ecliptic - longitude and latitude, with only frame bias (always less than - 25 mas) to disturb this classical picture. - -Called: - Obl06 mean obliquity, IAU 2006 - Pmat06 PB matrix, IAU 2006 - Ir initialize r-matrix to identity - Rx rotate around X-axis - Rxr product of two r-matrices -*/ -func Ecm06(date1, date2 float64, rm *[3][3]float64) { - var ob float64 - var bp, e [3][3]float64 - - /* Obliquity, IAU 2006. */ - ob = Obl06(date1, date2) - - /* Precession-bias matrix, IAU 2006. */ - Pmat06(date1, date2, &bp) - - /* Equatorial of date to ecliptic matrix. */ - Ir(&e) - Rx(ob, &e) - - /* ICRS to ecliptic coordinates rotation matrix, IAU 2006. */ - Rxr(e, bp, rm) - -} - -/* -Eqec06 Transformation from ICRS equatorial coordinates to ecliptic coordinates -(mean equinox and ecliptic of date) using IAU 2006 precession model. - -Given: - date1,date2 float64 TT as a 2-part Julian date (Note 1) - dr,dd float64 ICRS right ascension and declination (radians) - -Returned: - dl,db float64 ecliptic longitude and latitude (radians) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) No assumptions are made about whether the coordinates represent - starlight and embody astrometric effects such as parallax or - aberration. - - 3) The transformation is approximately that from mean J2000.0 right - ascension and declination to ecliptic longitude and latitude - (mean equinox and ecliptic of date), with only frame bias (always - less than 25 mas) to disturb this classical picture. - -Called: - S2c spherical coordinates to unit vector - Ecm06 J2000.0 to ecliptic rotation matrix, IAU 2006 - Rxp product of r-matrix and p-vector - C2s unit vector to spherical coordinates - Anp normalize angle into range 0 to 2pi - Anpm normalize angle into range +/- pi -*/ -func Eqec06(date1, date2 float64, dr, dd float64, dl, db *float64) { - var rm [3][3]float64 - var v1, v2 [3]float64 - var a, b float64 - - /* Spherical to Cartesian. */ - S2c(dr, dd, &v1) - - /* Rotation matrix, ICRS equatorial to ecliptic. */ - Ecm06(date1, date2, &rm) - - /* The transformation from ICRS to ecliptic. */ - Rxp(rm, v1, &v2) - - /* Cartesian to spherical. */ - C2s(v2, &a, &b) - - /* Express in conventional ranges. */ - *dl = Anp(a) - *db = Anpm(b) -} - -/* -Eceq06 Transformation from ecliptic coordinates (mean equinox and ecliptic -of date) to ICRS RA,Dec, using the IAU 2006 precession model. - -Given: - date1,date2 float64 TT as a 2-part Julian date (Note 1) - dl,db float64 ecliptic longitude and latitude (radians) - -Returned: - dr,dd float64 ICRS right ascension and declination (radians) - -Notes: - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) No assumptions are made about whether the coordinates represent - starlight and embody astrometric effects such as parallax or - aberration. - - 3) The transformation is approximately that from ecliptic longitude - and latitude (mean equinox and ecliptic of date) to mean J2000.0 - right ascension and declination, with only frame bias (always - less than 25 mas) to disturb this classical picture. - -Called: - S2c spherical coordinates to unit vector - Ecm06 J2000.0 to ecliptic rotation matrix, IAU 2006 - Trxp product of transpose of r-matrix and p-vector - C2s unit vector to spherical coordinates - Anp normalize angle into range 0 to 2pi - Anpm normalize angle into range +/- pi -*/ -func Eceq06(date1, date2 float64, dl, db float64, dr, dd *float64) { - var rm [3][3]float64 - var v1, v2 [3]float64 - var a, b float64 - - /* Spherical to Cartesian. */ - S2c(dl, db, &v1) - - /* Rotation matrix, ICRS equatorial to ecliptic. */ - Ecm06(date1, date2, &rm) - - /* The transformation from ecliptic to ICRS. */ - Trxp(rm, v1, &v2) - - /* Cartesian to spherical. */ - C2s(v2, &a, &b) - - /* Express in conventional ranges. */ - *dr = Anp(a) - *dd = Anpm(b) -} - -/* -Ltecm ICRS equatorial to ecliptic rotation matrix, long-term. - -Given: - epj float64 Julian epoch (TT) - -Returned: - rm [3][3]float64 ICRS to ecliptic rotation matrix - -Notes: - - 1) The matrix is in the sense - - E_ep = rm x P_ICRS, - - where P_ICRS is a vector with respect to ICRS right ascension - and declination axes and E_ep is the same vector with respect to - the (inertial) ecliptic and equinox of epoch epj. - - 2) P_ICRS is a free vector, merely a direction, typically of unit - magnitude, and not bound to any particular spatial origin, such - as the Earth, Sun or SSB. No assumptions are made about whether - it represents starlight and embodies astrometric effects such as - parallax or aberration. The transformation is approximately that - between mean J2000.0 right ascension and declination and ecliptic - longitude and latitude, with only frame bias (always less than - 25 mas) to disturb this classical picture. - - 3) The Vondrak et al. (2011, 2012) 400 millennia precession model - agrees with the IAU 2006 precession at J2000.0 and stays within - 100 microarcseconds during the 20th and 21st centuries. It is - accurate to a few arcseconds throughout the historical period, - worsening to a few tenths of a degree at the end of the - +/- 200,000 year time span. - -Called: - Ltpequ equator pole, long term - Ltpecl ecliptic pole, long term - Pxp vector product - Pn normalize vector - -References: - - Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession - expressions, valid for long time intervals, Astron.Astrophys. 534, - A22 - - Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession - expressions, valid for long time intervals (Corrigendum), - Astron.Astrophys. 541, C1 -*/ -func Ltecm(epj float64, rm *[3][3]float64) { - /* Frame bias (IERS Conventions 2010, Eqs. 5.21 and 5.33) */ - dx := -0.016617 * DAS2R - de := -0.0068192 * DAS2R - dr := -0.0146 * DAS2R - - var p, z, w, x, y [3]float64 - var s float64 - - /* Equator pole. */ - Ltpequ(epj, &p) - - /* Ecliptic pole (bottom row of equatorial to ecliptic matrix). */ - Ltpecl(epj, &z) - - /* Equinox (top row of matrix). */ - Pxp(p, z, &w) - Pn(w, &s, &x) - - /* Middle row of matrix. */ - Pxp(z, x, &y) - - /* Combine with frame bias. */ - rm[0][0] = x[0] - x[1]*dr + x[2]*dx - rm[0][1] = x[0]*dr + x[1] + x[2]*de - rm[0][2] = -x[0]*dx - x[1]*de + x[2] - rm[1][0] = y[0] - y[1]*dr + y[2]*dx - rm[1][1] = y[0]*dr + y[1] + y[2]*de - rm[1][2] = -y[0]*dx - y[1]*de + y[2] - rm[2][0] = z[0] - z[1]*dr + z[2]*dx - rm[2][1] = z[0]*dr + z[1] + z[2]*de - rm[2][2] = -z[0]*dx - z[1]*de + z[2] -} - -/* -Lteqec Transformation from ICRS equatorial coordinates to ecliptic coordinates -(mean equinox and ecliptic of date) using a long-term precession model. - -Given: - epj float64 Julian epoch (TT) - dr,dd float64 ICRS right ascension and declination (radians) - -Returned: - dl,db float64 ecliptic longitude and latitude (radians) - -Notes: - 1) No assumptions are made about whether the coordinates represent - starlight and embody astrometric effects such as parallax or - aberration. - - 2) The transformation is approximately that from mean J2000.0 right - ascension and declination to ecliptic longitude and latitude - (mean equinox and ecliptic of date), with only frame bias (always - less than 25 mas) to disturb this classical picture. - - 3) The Vondrak et al. (2011, 2012) 400 millennia precession model - agrees with the IAU 2006 precession at J2000.0 and stays within - 100 microarcseconds during the 20th and 21st centuries. It is - accurate to a few arcseconds throughout the historical period, - worsening to a few tenths of a degree at the end of the - +/- 200,000 year time span. - -Called: - S2c spherical coordinates to unit vector - Ltecm J2000.0 to ecliptic rotation matrix, long term - Rxp product of r-matrix and p-vector - C2s unit vector to spherical coordinates - Anp normalize angle into range 0 to 2pi - Anpm normalize angle into range +/- pi - -References: - - Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession - expressions, valid for long time intervals, Astron.Astrophys. 534, - A22 - - Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession - expressions, valid for long time intervals (Corrigendum), - Astron.Astrophys. 541, C1 -*/ -func Lteqec(epj float64, dr, dd float64, dl, db *float64) { - var rm [3][3]float64 - var v1, v2 [3]float64 - var a, b float64 - - /* Spherical to Cartesian. */ - S2c(dr, dd, &v1) - - /* Rotation matrix, ICRS equatorial to ecliptic. */ - Ltecm(epj, &rm) - - /* The transformation from ICRS to ecliptic. */ - Rxp(rm, v1, &v2) - - /* Cartesian to spherical. */ - C2s(v2, &a, &b) - - /* Express in conventional ranges. */ - *dl = Anp(a) - *db = Anpm(b) -} - -/* -Lteceq Transformation from ecliptic coordinates (mean equinox and ecliptic -of date) to ICRS RA,Dec, using a long-term precession model. - -Given: - epj float64 Julian epoch (TT) - dl,db float64 ecliptic longitude and latitude (radians) - -Returned: - dr,dd float64 ICRS right ascension and declination (radians) - -Notes: - 1) No assumptions are made about whether the coordinates represent - starlight and embody astrometric effects such as parallax or - aberration. - - 2) The transformation is approximately that from ecliptic longitude - and latitude (mean equinox and ecliptic of date) to mean J2000.0 - right ascension and declination, with only frame bias (always - less than 25 mas) to disturb this classical picture. - - 3) The Vondrak et al. (2011, 2012) 400 millennia precession model - agrees with the IAU 2006 precession at J2000.0 and stays within - 100 microarcseconds during the 20th and 21st centuries. It is - accurate to a few arcseconds throughout the historical period, - worsening to a few tenths of a degree at the end of the - +/- 200,000 year time span. - -Called: - S2c spherical coordinates to unit vector - Ltecm J2000.0 to ecliptic rotation matrix, long term - Trxp product of transpose of r-matrix and p-vector - C2s unit vector to spherical coordinates - Anp normalize angle into range 0 to 2pi - Anpm normalize angle into range +/- pi - -References: - - Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession - expressions, valid for long time intervals, Astron.Astrophys. 534, - A22 - - Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession - expressions, valid for long time intervals (Corrigendum), - Astron.Astrophys. 541, C1 -*/ -func Lteceq(epj float64, dl, db float64, dr, dd *float64) { - var rm [3][3]float64 - var v1, v2 [3]float64 - var a, b float64 - - /* Spherical to Cartesian. */ - S2c(dl, db, &v1) - - /* Rotation matrix, ICRS equatorial to ecliptic. */ - Ltecm(epj, &rm) - - /* The transformation from ecliptic to ICRS. */ - Trxp(rm, v1, &v2) - - /* Cartesian to spherical. */ - C2s(v2, &a, &b) - - /* Express in conventional ranges. */ - *dr = Anp(a) - *dd = Anpm(b) -} - -/* -Eform a,f for a nominated Earth reference ellipsoid - -Given: - n int ellipsoid identifier (Note 1) - -Returned: - a float64 equatorial radius (meters, Note 2) - f float64 flattening (Note 2) - -Returned (function value): - int status: 0 = OK - -1 = illegal identifier (Note 3) - -Notes: - - 1) The identifier n is a number that specifies the choice of - reference ellipsoid. The following are supported: - - n ellipsoid - - 1 WGS84 - 2 GRS80 - 3 WGS72 - - The n value has no significance outside the SOFA software. For - convenience, symbols WGS84 etc. are defined in sofam.h. - - 2) The ellipsoid parameters are returned in the form of equatorial - radius in meters (a) and flattening (f). The latter is a number - around 0.00335, i.e. around 1/298. - - 3) For the case where an unsupported n value is supplied, zero a and - f are returned, as well as error status. - -References: - - Department of Defense World Geodetic System 1984, National - Imagery and Mapping Agency Technical Report 8350.2, Third - Edition, p3-2. - - Moritz, H., Bull. Geodesique 66-2, 187 (1992). - - The Department of Defense World Geodetic System 1972, World - Geodetic System Committee, May 1974. - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992), - p220. -*/ -func Eform(n int, a, f *float64) int { - /* Look up a and f for the specified reference ellipsoid. */ - switch n { - - case WGS84: - *a = 6378137.0 - *f = 1.0 / 298.257223563 - break - - case GRS80: - *a = 6378137.0 - *f = 1.0 / 298.257222101 - break - - case WGS72: - *a = 6378135.0 - *f = 1.0 / 298.26 - break - - default: - - /* Invalid identifier. */ - *a = 0.0 - *f = 0.0 - return -1 - - } - - /* OK status. */ - return 0 -} - -/* -Gc2gd Transform geocentric coordinates to geodetic using the specified -reference ellipsoid. - -Given: - n int ellipsoid identifier (Note 1) - xyz [3]float64 geocentric vector (Note 2) - -Returned: - elong float64 longitude (radians, east +ve, Note 3) - phi float64 latitude (geodetic, radians, Note 3) - height float64 height above ellipsoid (geodetic, Notes 2,3) - -Returned (function value): - int status: 0 = OK - -1 = illegal identifier (Note 3) - -2 = internal error (Note 3) - -Notes: - - 1) The identifier n is a number that specifies the choice of - reference ellipsoid. The following are supported: - - n ellipsoid - - 1 WGS84 - 2 GRS80 - 3 WGS72 - - The n value has no significance outside the SOFA software. For - convenience, symbols WGS84 etc. are defined in sofam.h. - - 2) The geocentric vector (xyz, given) and height (height, returned) - are in meters. - - 3) An error status -1 means that the identifier n is illegal. An - error status -2 is theoretically impossible. In all error cases, - all three results are set to -1e9. - - 4) The inverse transformation is performed in the function iauGd2gc. - -Called: - Eform Earth reference ellipsoids - Gc2gde geocentric to geodetic transformation, general -*/ -func Gc2gd(n int, xyz [3]float64, elong, phi, height *float64) int { - var j int - var a, f float64 - - /* Obtain reference ellipsoid parameters. */ - j = Eform(n, &a, &f) - - /* If OK, transform x,y,z to longitude, geodetic latitude, height. */ - if j == 0 { - j = Gc2gde(a, f, xyz, elong, phi, height) - if j < 0 { - j = -2 - } - } - - /* Deal with any errors. */ - if j < 0 { - *elong = -1e9 - *phi = -1e9 - *height = -1e9 - } - - /* Return the status. */ - return j -} - -/* -Gc2gde Transform geocentric coordinates to geodetic for a reference -ellipsoid of specified form. - -Given: - a float64 equatorial radius (Notes 2,4) - f float64 flattening (Note 3) - xyz [3]float64 geocentric vector (Note 4) - -Returned: - elong float64 longitude (radians, east +ve) - phi float64 latitude (geodetic, radians) - height float64 height above ellipsoid (geodetic, Note 4) - -Returned (function value): - int status: 0 = OK - -1 = illegal f - -2 = illegal a - -Notes: - - 1) This function is based on the GCONV2H Fortran subroutine by - Toshio Fukushima (see reference). - - 2) The equatorial radius, a, can be in any units, but meters is - the conventional choice. - - 3) The flattening, f, is (for the Earth) a value around 0.00335, - i.e. around 1/298. - - 4) The equatorial radius, a, and the geocentric vector, xyz, - must be given in the same units, and determine the units of - the returned height, height. - - 5) If an error occurs (status < 0), elong, phi and height are - unchanged. - - 6) The inverse transformation is performed in the function - iauGd2gce. - - 7) The transformation for a standard ellipsoid (such as WGS84) can - more conveniently be performed by calling iauGc2gd, which uses a - numerical code to identify the required A and F values. - -Reference: - - Fukushima, T., "Transformation from Cartesian to geodetic - coordinates accelerated by Halley's method", J.Geodesy (2006) - 79: 689-693 -*/ -func Gc2gde(a, f float64, xyz [3]float64, elong, phi, height *float64) int { - var aeps2, e2, e4t, ec2, ec, b, x, y, z, p2, absz, p, s0, pn, zc, - c0, c02, c03, s02, s03, a02, a0, a03, d0, f0, b0, s1, - cc, s12, cc2 float64 - - /* ------------- */ - /* Preliminaries */ - /* ------------- */ - - /* Validate ellipsoid parameters. */ - if f < 0.0 || f >= 1.0 { - return -1 - } - if a <= 0.0 { - return -2 - } - - /* Functions of ellipsoid parameters (with further validation of f). */ - aeps2 = a * a * 1e-32 - e2 = (2.0 - f) * f - e4t = e2 * e2 * 1.5 - ec2 = 1.0 - e2 - if ec2 <= 0.0 { - return -1 - } - ec = sqrt(ec2) - b = a * ec - - /* Cartesian components. */ - x = xyz[0] - y = xyz[1] - z = xyz[2] - - /* Distance from polar axis squared. */ - p2 = x*x + y*y - - /* Longitude. */ - // *elong = p2 > 0.0 ? atan2(y, x) : 0.0; - if p2 > 0.0 { - *elong = atan2(y, x) - } else { - *elong = 0.0 - } - - /* Unsigned z-coordinate. */ - absz = fabs(z) - - /* Proceed unless polar case. */ - if p2 > aeps2 { - - /* Distance from polar axis. */ - p = sqrt(p2) - - /* Normalization. */ - s0 = absz / a - pn = p / a - zc = ec * s0 - - /* Prepare Newton correction factors. */ - c0 = ec * pn - c02 = c0 * c0 - c03 = c02 * c0 - s02 = s0 * s0 - s03 = s02 * s0 - a02 = c02 + s02 - a0 = sqrt(a02) - a03 = a02 * a0 - d0 = zc*a03 + e2*s03 - f0 = pn*a03 - e2*c03 - - /* Prepare Halley correction factor. */ - b0 = e4t * s02 * c02 * pn * (a0 - ec) - s1 = d0*f0 - b0*s0 - cc = ec * (f0*f0 - b0*c0) - - /* Evaluate latitude and height. */ - *phi = atan(s1 / cc) - s12 = s1 * s1 - cc2 = cc * cc - *height = (p*cc + absz*s1 - a*sqrt(ec2*s12+cc2)) / sqrt(s12+cc2) - } else { - - /* Exception: pole. */ - *phi = DPI / 2.0 - *height = absz - b - } - - /* Restore sign of latitude. */ - if z < 0 { - *phi = -*phi - } - - /* OK status. */ - return 0 -} - -/* -Gd2gc Transform geodetic coordinates to geocentric using the specified -reference ellipsoid. - -Given: - n int ellipsoid identifier (Note 1) - elong float64 longitude (radians, east +ve) - phi float64 latitude (geodetic, radians, Note 3) - height float64 height above ellipsoid (geodetic, Notes 2,3) - -Returned: - xyz [3]float64 geocentric vector (Note 2) - -Returned (function value): - int status: 0 = OK - -1 = illegal identifier (Note 3) - -2 = illegal case (Note 3) - -Notes: - - 1) The identifier n is a number that specifies the choice of - reference ellipsoid. The following are supported: - - n ellipsoid - - 1 WGS84 - 2 GRS80 - 3 WGS72 - - The n value has no significance outside the SOFA software. For - convenience, symbols WGS84 etc. are defined in sofam.h. - - 2) The height (height, given) and the geocentric vector (xyz, - returned) are in meters. - - 3) No validation is performed on the arguments elong, phi and - height. An error status -1 means that the identifier n is - illegal. An error status -2 protects against cases that would - lead to arithmetic exceptions. In all error cases, xyz is set - to zeros. - - 4) The inverse transformation is performed in the function iauGc2gd. - -Called: - Eform Earth reference ellipsoids - Gd2gce geodetic to geocentric transformation, general - Zp zero p-vector -*/ -func Gd2gc(n int, elong, phi, height float64, xyz *[3]float64) int { - var j int - var a, f float64 - - /* Obtain reference ellipsoid parameters. */ - j = Eform(n, &a, &f) - - /* If OK, transform longitude, geodetic latitude, height to x,y,z. */ - if j == 0 { - j = Gd2gce(a, f, elong, phi, height, xyz) - if j != 0 { - j = -2 - } - } - - /* Deal with any errors. */ - if j != 0 { - Zp(xyz) - } - - /* Return the status. */ - return j -} - -/* -Gd2gce Transform geodetic coordinates to geocentric for a reference -ellipsoid of specified form. - -Given: - a float64 equatorial radius (Notes 1,4) - f float64 flattening (Notes 2,4) - elong float64 longitude (radians, east +ve) - phi float64 latitude (geodetic, radians, Note 4) - height float64 height above ellipsoid (geodetic, Notes 3,4) - -Returned: - xyz [3]float64 geocentric vector (Note 3) - -Returned (function value): - int status: 0 = OK - -1 = illegal case (Note 4) -Notes: - - 1) The equatorial radius, a, can be in any units, but meters is - the conventional choice. - - 2) The flattening, f, is (for the Earth) a value around 0.00335, - i.e. around 1/298. - - 3) The equatorial radius, a, and the height, height, must be - given in the same units, and determine the units of the - returned geocentric vector, xyz. - - 4) No validation is performed on individual arguments. The error - status -1 protects against (unrealistic) cases that would lead - to arithmetic exceptions. If an error occurs, xyz is unchanged. - - 5) The inverse transformation is performed in the function - iauGc2gde. - - 6) The transformation for a standard ellipsoid (such as WGS84) can - more conveniently be performed by calling iauGd2gc, which uses a - numerical code to identify the required a and f values. - -References: - - Green, R.M., Spherical Astronomy, Cambridge University Press, - (1985) Section 4.5, p96. - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992), - Section 4.22, p202. -*/ -func Gd2gce(a, f float64, elong, phi, height float64, xyz *[3]float64) int { - var sp, cp, w, d, ac, as, r float64 - - /* Functions of geodetic latitude. */ - sp = sin(phi) - cp = cos(phi) - w = 1.0 - f - w = w * w - d = cp*cp + w*sp*sp - if d <= 0.0 { - return -1 - } - ac = a / sqrt(d) - as = w * ac - - /* Geocentric vector. */ - r = (ac + height) * cp - xyz[0] = r * cos(elong) - xyz[1] = r * sin(elong) - xyz[2] = (as + height) * sp - - /* Success. */ - return 0 -} diff --git a/vendor/github.com/hebl/gofa/ephem.go b/vendor/github.com/hebl/gofa/ephem.go deleted file mode 100644 index 6144869..0000000 --- a/vendor/github.com/hebl/gofa/ephem.go +++ /dev/null @@ -1,3529 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -// Ephemeride - -/* -Epv00 Earth position and velocity, heliocentric and barycentric, with -respect to the Barycentric Celestial Reference System. - -Given: - date1,date2 float64 TDB date (Note 1) - -Returned: - pvh [2][3]float64 heliocentric Earth position/velocity - pvb [2][3]float64 barycentric Earth position/velocity - -Returned (function value): - int status: 0 = OK - +1 = warning: date outside the range 1900-2100 AD - -Notes: - - 1) The TDB date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TDB)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. However, - the accuracy of the result is more likely to be limited by the - algorithm itself than the way the date has been expressed. - - n.b. TT can be used instead of TDB in most applications. - - 2) On return, the arrays pvh and pvb contain the following: - - pvh[0][0] x } - pvh[0][1] y } heliocentric position, au - pvh[0][2] z } - - pvh[1][0] xdot } - pvh[1][1] ydot } heliocentric velocity, au/d - pvh[1][2] zdot } - - pvb[0][0] x } - pvb[0][1] y } barycentric position, au - pvb[0][2] z } - - pvb[1][0] xdot } - pvb[1][1] ydot } barycentric velocity, au/d - pvb[1][2] zdot } - - The vectors are with respect to the Barycentric Celestial - Reference System. The time unit is one day in TDB. - - 3) The function is a SIMPLIFIED SOLUTION from the planetary theory - VSOP2000 (X. Moisson, P. Bretagnon, 2001, Celes. Mechanics & - Dyn. Astron., 80, 3/4, 205-213) and is an adaptation of original - Fortran code supplied by P. Bretagnon (private comm., 2000). - - 4) Comparisons over the time span 1900-2100 with this simplified - solution and the JPL DE405 ephemeris give the following results: - - RMS max - Heliocentric: - position error 3.7 11.2 km - velocity error 1.4 5.0 mm/s - - Barycentric: - position error 4.6 13.4 km - velocity error 1.4 4.9 mm/s - - Comparisons with the JPL DE406 ephemeris show that by 1800 and - 2200 the position errors are approximately double their 1900-2100 - size. By 1500 and 2500 the deterioration is a factor of 10 and - by 1000 and 3000 a factor of 60. The velocity accuracy falls off - at about half that rate. - - 5) It is permissible to use the same array for pvh and pvb, which - will receive the barycentric values. -*/ -func Epv00(date1, date2 float64, pvh, pvb *[2][3]float64) int { - /* - Matrix elements for orienting the analytical model to DE405. - - The corresponding Euler angles are: - - d ' " - 1st rotation - 23 26 21.4091 about the x-axis (obliquity) - 2nd rotation + 0.0475 about the z-axis (RA offset) - - These were obtained empirically, by comparisons with DE405 over - 1900-2100. - */ - const ( - am12 = 0.000000211284 - am13 = -0.000000091603 - am21 = -0.000000230286 - am22 = 0.917482137087 - am23 = -0.397776982902 - am32 = 0.397776982902 - am33 = 0.917482137087 - ) - - /* - ---------------------- - Ephemeris Coefficients - ---------------------- - - The ephemeris consists of harmonic terms for predicting (i) the Sun - to Earth vector and (ii) the Solar-System-barycenter to Sun vector - respectively. The coefficients are stored in arrays which, although - 1-demensional, contain groups of three. Each triplet of - coefficients is the amplitude, phase and frequency for one term in - the model, and each array contains the number of terms called for by - the model. - - There are eighteen such arrays, named as follows: - - array model power of T component - - e0x Sun-to-Earth 0 x - e0y Sun-to-Earth 0 y - e0z Sun-to-Earth 0 z - - e1x Sun-to-Earth 1 x - e1y Sun-to-Earth 1 y - e1z Sun-to-Earth 1 z - - e2x Sun-to-Earth 2 x - e2y Sun-to-Earth 2 y - e2z Sun-to-Earth 2 z - - s0x SSB-to-Sun 0 x - s0y SSB-to-Sun 0 y - s0z SSB-to-Sun 0 z - - s1x SSB-to-Sun 1 x - s1y SSB-to-Sun 1 y - s1z SSB-to-Sun 1 z - - s2x SSB-to-Sun 2 x - s2y SSB-to-Sun 2 y - s2z SSB-to-Sun 2 z - */ - - /* Sun-to-Earth, T^0, X */ - e0x := []float64{ - 0.9998292878132e+00, 0.1753485171504e+01, 0.6283075850446e+01, - 0.8352579567414e-02, 0.1710344404582e+01, 0.1256615170089e+02, - 0.5611445335148e-02, 0.0000000000000e+00, 0.0000000000000e+00, - 0.1046664295572e-03, 0.1667225416770e+01, 0.1884922755134e+02, - 0.3110842534677e-04, 0.6687513390251e+00, 0.8399684731857e+02, - 0.2552413503550e-04, 0.5830637358413e+00, 0.5296909721118e+00, - 0.2137207845781e-04, 0.1092330954011e+01, 0.1577343543434e+01, - 0.1680240182951e-04, 0.4955366134987e+00, 0.6279552690824e+01, - 0.1679012370795e-04, 0.6153014091901e+01, 0.6286599010068e+01, - 0.1445526946777e-04, 0.3472744100492e+01, 0.2352866153506e+01, - - 0.1091038246184e-04, 0.3689845786119e+01, 0.5223693906222e+01, - 0.9344399733932e-05, 0.6073934645672e+01, 0.1203646072878e+02, - 0.8993182910652e-05, 0.3175705249069e+01, 0.1021328554739e+02, - 0.5665546034116e-05, 0.2152484672246e+01, 0.1059381944224e+01, - 0.6844146703035e-05, 0.1306964099750e+01, 0.5753384878334e+01, - 0.7346610905565e-05, 0.4354980070466e+01, 0.3981490189893e+00, - 0.6815396474414e-05, 0.2218229211267e+01, 0.4705732307012e+01, - 0.6112787253053e-05, 0.5384788425458e+01, 0.6812766822558e+01, - 0.4518120711239e-05, 0.6087604012291e+01, 0.5884926831456e+01, - 0.4521963430706e-05, 0.1279424524906e+01, 0.6256777527156e+01, - - 0.4497426764085e-05, 0.5369129144266e+01, 0.6309374173736e+01, - 0.4062190566959e-05, 0.5436473303367e+00, 0.6681224869435e+01, - 0.5412193480192e-05, 0.7867838528395e+00, 0.7755226100720e+00, - 0.5469839049386e-05, 0.1461440311134e+01, 0.1414349524433e+02, - 0.5205264083477e-05, 0.4432944696116e+01, 0.7860419393880e+01, - 0.2149759935455e-05, 0.4502237496846e+01, 0.1150676975667e+02, - 0.2279109618501e-05, 0.1239441308815e+01, 0.7058598460518e+01, - 0.2259282939683e-05, 0.3272430985331e+01, 0.4694002934110e+01, - 0.2558950271319e-05, 0.2265471086404e+01, 0.1216800268190e+02, - 0.2561581447555e-05, 0.1454740653245e+01, 0.7099330490126e+00, - - 0.1781441115440e-05, 0.2962068630206e+01, 0.7962980379786e+00, - 0.1612005874644e-05, 0.1473255041006e+01, 0.5486777812467e+01, - 0.1818630667105e-05, 0.3743903293447e+00, 0.6283008715021e+01, - 0.1818601377529e-05, 0.6274174354554e+01, 0.6283142985870e+01, - 0.1554475925257e-05, 0.1624110906816e+01, 0.2513230340178e+02, - 0.2090948029241e-05, 0.5852052276256e+01, 0.1179062909082e+02, - 0.2000176345460e-05, 0.4072093298513e+01, 0.1778984560711e+02, - 0.1289535917759e-05, 0.5217019331069e+01, 0.7079373888424e+01, - 0.1281135307881e-05, 0.4802054538934e+01, 0.3738761453707e+01, - 0.1518229005692e-05, 0.8691914742502e+00, 0.2132990797783e+00, - - 0.9450128579027e-06, 0.4601859529950e+01, 0.1097707878456e+02, - 0.7781119494996e-06, 0.1844352816694e+01, 0.8827390247185e+01, - 0.7733407759912e-06, 0.3582790154750e+01, 0.5507553240374e+01, - 0.7350644318120e-06, 0.2695277788230e+01, 0.1589072916335e+01, - 0.6535928827023e-06, 0.3651327986142e+01, 0.1176985366291e+02, - 0.6324624183656e-06, 0.2241302375862e+01, 0.6262300422539e+01, - 0.6298565300557e-06, 0.4407122406081e+01, 0.6303851278352e+01, - 0.8587037089179e-06, 0.3024307223119e+01, 0.1672837615881e+03, - 0.8299954491035e-06, 0.6192539428237e+01, 0.3340612434717e+01, - 0.6311263503401e-06, 0.2014758795416e+01, 0.7113454667900e-02, - - 0.6005646745452e-06, 0.3399500503397e+01, 0.4136910472696e+01, - 0.7917715109929e-06, 0.2493386877837e+01, 0.6069776770667e+01, - 0.7556958099685e-06, 0.4159491740143e+01, 0.6496374930224e+01, - 0.6773228244949e-06, 0.4034162934230e+01, 0.9437762937313e+01, - 0.5370708577847e-06, 0.1562219163734e+01, 0.1194447056968e+01, - 0.5710804266203e-06, 0.2662730803386e+01, 0.6282095334605e+01, - 0.5709824583726e-06, 0.3985828430833e+01, 0.6284056366286e+01, - 0.5143950896447e-06, 0.1308144688689e+01, 0.6290189305114e+01, - 0.5088010604546e-06, 0.5352817214804e+01, 0.6275962395778e+01, - 0.4960369085172e-06, 0.2644267922349e+01, 0.6127655567643e+01, - - 0.4803137891183e-06, 0.4008844192080e+01, 0.6438496133249e+01, - 0.5731747768225e-06, 0.3794550174597e+01, 0.3154687086868e+01, - 0.4735947960579e-06, 0.6107118308982e+01, 0.3128388763578e+01, - 0.4808348796625e-06, 0.4771458618163e+01, 0.8018209333619e+00, - 0.4115073743137e-06, 0.3327111335159e+01, 0.8429241228195e+01, - 0.5230575889287e-06, 0.5305708551694e+01, 0.1336797263425e+02, - 0.5133977889215e-06, 0.5784230738814e+01, 0.1235285262111e+02, - 0.5065815825327e-06, 0.2052064793679e+01, 0.1185621865188e+02, - 0.4339831593868e-06, 0.3644994195830e+01, 0.1726015463500e+02, - 0.3952928638953e-06, 0.4930376436758e+01, 0.5481254917084e+01, - - 0.4898498111942e-06, 0.4542084219731e+00, 0.9225539266174e+01, - 0.4757490209328e-06, 0.3161126388878e+01, 0.5856477690889e+01, - 0.4727701669749e-06, 0.6214993845446e+00, 0.2544314396739e+01, - 0.3800966681863e-06, 0.3040132339297e+01, 0.4265981595566e+00, - 0.3257301077939e-06, 0.8064977360087e+00, 0.3930209696940e+01, - 0.3255810528674e-06, 0.1974147981034e+01, 0.2146165377750e+01, - 0.3252029748187e-06, 0.2845924913135e+01, 0.4164311961999e+01, - 0.3255505635308e-06, 0.3017900824120e+01, 0.5088628793478e+01, - 0.2801345211990e-06, 0.6109717793179e+01, 0.1256967486051e+02, - 0.3688987740970e-06, 0.2911550235289e+01, 0.1807370494127e+02, - - 0.2475153429458e-06, 0.2179146025856e+01, 0.2629832328990e-01, - 0.3033457749150e-06, 0.1994161050744e+01, 0.4535059491685e+01, - 0.2186743763110e-06, 0.5125687237936e+01, 0.1137170464392e+02, - 0.2764777032774e-06, 0.4822646860252e+00, 0.1256262854127e+02, - 0.2199028768592e-06, 0.4637633293831e+01, 0.1255903824622e+02, - 0.2046482824760e-06, 0.1467038733093e+01, 0.7084896783808e+01, - 0.2611209147507e-06, 0.3044718783485e+00, 0.7143069561767e+02, - 0.2286079656818e-06, 0.4764220356805e+01, 0.8031092209206e+01, - 0.1855071202587e-06, 0.3383637774428e+01, 0.1748016358760e+01, - 0.2324669506784e-06, 0.6189088449251e+01, 0.1831953657923e+02, - - 0.1709528015688e-06, 0.5874966729774e+00, 0.4933208510675e+01, - 0.2168156875828e-06, 0.4302994009132e+01, 0.1044738781244e+02, - 0.2106675556535e-06, 0.3800475419891e+01, 0.7477522907414e+01, - 0.1430213830465e-06, 0.1294660846502e+01, 0.2942463415728e+01, - 0.1388396901944e-06, 0.4594797202114e+01, 0.8635942003952e+01, - 0.1922258844190e-06, 0.4943044543591e+00, 0.1729818233119e+02, - 0.1888460058292e-06, 0.2426943912028e+01, 0.1561374759853e+03, - 0.1789449386107e-06, 0.1582973303499e+00, 0.1592596075957e+01, - 0.1360803685374e-06, 0.5197240440504e+01, 0.1309584267300e+02, - 0.1504038014709e-06, 0.3120360916217e+01, 0.1649636139783e+02, - - 0.1382769533389e-06, 0.6164702888205e+01, 0.7632943190217e+01, - 0.1438059769079e-06, 0.1437423770979e+01, 0.2042657109477e+02, - 0.1326303260037e-06, 0.3609688799679e+01, 0.1213955354133e+02, - 0.1159244950540e-06, 0.5463018167225e+01, 0.5331357529664e+01, - 0.1433118149136e-06, 0.6028909912097e+01, 0.7342457794669e+01, - 0.1234623148594e-06, 0.3109645574997e+01, 0.6279485555400e+01, - 0.1233949875344e-06, 0.3539359332866e+01, 0.6286666145492e+01, - 0.9927196061299e-07, 0.1259321569772e+01, 0.7234794171227e+01, - 0.1242302191316e-06, 0.1065949392609e+01, 0.1511046609763e+02, - 0.1098402195201e-06, 0.2192508743837e+01, 0.1098880815746e+02, - - 0.1158191395315e-06, 0.4054411278650e+01, 0.5729506548653e+01, - 0.9048475596241e-07, 0.5429764748518e+01, 0.9623688285163e+01, - 0.8889853269023e-07, 0.5046586206575e+01, 0.6148010737701e+01, - 0.1048694242164e-06, 0.2628858030806e+01, 0.6836645152238e+01, - 0.1112308378646e-06, 0.4177292719907e+01, 0.1572083878776e+02, - 0.8631729709901e-07, 0.1601345232557e+01, 0.6418140963190e+01, - 0.8527816951664e-07, 0.2463888997513e+01, 0.1471231707864e+02, - 0.7892139456991e-07, 0.3154022088718e+01, 0.2118763888447e+01, - 0.1051782905236e-06, 0.4795035816088e+01, 0.1349867339771e+01, - 0.1048219943164e-06, 0.2952983395230e+01, 0.5999216516294e+01, - - 0.7435760775143e-07, 0.5420547991464e+01, 0.6040347114260e+01, - 0.9869574106949e-07, 0.3695646753667e+01, 0.6566935184597e+01, - 0.9156886364226e-07, 0.3922675306609e+01, 0.5643178611111e+01, - 0.7006834356188e-07, 0.1233968624861e+01, 0.6525804586632e+01, - 0.9806170182601e-07, 0.1919542280684e+01, 0.2122839202813e+02, - 0.9052289673607e-07, 0.4615902724369e+01, 0.4690479774488e+01, - 0.7554200867893e-07, 0.1236863719072e+01, 0.1253985337760e+02, - 0.8215741286498e-07, 0.3286800101559e+00, 0.1097355562493e+02, - 0.7185178575397e-07, 0.5880942158367e+01, 0.6245048154254e+01, - 0.7130726476180e-07, 0.7674871987661e+00, 0.6321103546637e+01, - - 0.6650894461162e-07, 0.6987129150116e+00, 0.5327476111629e+01, - 0.7396888823688e-07, 0.3576824794443e+01, 0.5368044267797e+00, - 0.7420588884775e-07, 0.5033615245369e+01, 0.2354323048545e+02, - 0.6141181642908e-07, 0.9449927045673e+00, 0.1296430071988e+02, - 0.6373557924058e-07, 0.6206342280341e+01, 0.9517183207817e+00, - 0.6359474329261e-07, 0.5036079095757e+01, 0.1990745094947e+01, - 0.5740173582646e-07, 0.6105106371350e+01, 0.9555997388169e+00, - 0.7019864084602e-07, 0.7237747359018e+00, 0.5225775174439e+00, - 0.6398054487042e-07, 0.3976367969666e+01, 0.2407292145756e+02, - 0.7797092650498e-07, 0.4305423910623e+01, 0.2200391463820e+02, - - 0.6466760000900e-07, 0.3500136825200e+01, 0.5230807360890e+01, - 0.7529417043890e-07, 0.3514779246100e+01, 0.1842262939178e+02, - 0.6924571140892e-07, 0.2743457928679e+01, 0.1554202828031e+00, - 0.6220798650222e-07, 0.2242598118209e+01, 0.1845107853235e+02, - 0.5870209391853e-07, 0.2332832707527e+01, 0.6398972393349e+00, - 0.6263953473888e-07, 0.2191105358956e+01, 0.6277552955062e+01, - 0.6257781390012e-07, 0.4457559396698e+01, 0.6288598745829e+01, - 0.5697304945123e-07, 0.3499234761404e+01, 0.1551045220144e+01, - 0.6335438746791e-07, 0.6441691079251e+00, 0.5216580451554e+01, - 0.6377258441152e-07, 0.2252599151092e+01, 0.5650292065779e+01, - - 0.6484841818165e-07, 0.1992812417646e+01, 0.1030928125552e+00, - 0.4735551485250e-07, 0.3744672082942e+01, 0.1431416805965e+02, - 0.4628595996170e-07, 0.1334226211745e+01, 0.5535693017924e+00, - 0.6258152336933e-07, 0.4395836159154e+01, 0.2608790314060e+02, - 0.6196171366594e-07, 0.2587043007997e+01, 0.8467247584405e+02, - 0.6159556952126e-07, 0.4782499769128e+01, 0.2394243902548e+03, - 0.4987741172394e-07, 0.7312257619924e+00, 0.7771377146812e+02, - 0.5459280703142e-07, 0.3001376372532e+01, 0.6179983037890e+01, - 0.4863461189999e-07, 0.3767222128541e+01, 0.9027992316901e+02, - 0.5349912093158e-07, 0.3663594450273e+01, 0.6386168663001e+01, - - 0.5673725607806e-07, 0.4331187919049e+01, 0.6915859635113e+01, - 0.4745485060512e-07, 0.5816195745518e+01, 0.6282970628506e+01, - 0.4745379005326e-07, 0.8323672435672e+00, 0.6283181072386e+01, - 0.4049002796321e-07, 0.3785023976293e+01, 0.6254626709878e+01, - 0.4247084014515e-07, 0.2378220728783e+01, 0.7875671926403e+01, - 0.4026912363055e-07, 0.2864103423269e+01, 0.6311524991013e+01, - 0.4062935011774e-07, 0.2415408595975e+01, 0.3634620989887e+01, - 0.5347771048509e-07, 0.3343479309801e+01, 0.2515860172507e+02, - 0.4829494136505e-07, 0.2821742398262e+01, 0.5760498333002e+01, - 0.4342554404599e-07, 0.5624662458712e+01, 0.7238675589263e+01, - - 0.4021599184361e-07, 0.5557250275009e+00, 0.1101510648075e+02, - 0.4104900474558e-07, 0.3296691780005e+01, 0.6709674010002e+01, - 0.4376532905131e-07, 0.3814443999443e+01, 0.6805653367890e+01, - 0.3314590480650e-07, 0.3560229189250e+01, 0.1259245002418e+02, - 0.3232421839643e-07, 0.5185389180568e+01, 0.1066495398892e+01, - 0.3541176318876e-07, 0.3921381909679e+01, 0.9917696840332e+01, - 0.3689831242681e-07, 0.4190658955386e+01, 0.1192625446156e+02, - 0.3890605376774e-07, 0.5546023371097e+01, 0.7478166569050e-01, - 0.3038559339780e-07, 0.6231032794494e+01, 0.1256621883632e+02, - 0.3137083969782e-07, 0.6207063419190e+01, 0.4292330755499e+01, - - 0.4024004081854e-07, 0.1195257375713e+01, 0.1334167431096e+02, - 0.3300234879283e-07, 0.1804694240998e+01, 0.1057540660594e+02, - 0.3635399155575e-07, 0.5597811343500e+01, 0.6208294184755e+01, - 0.3032668691356e-07, 0.3191059366530e+01, 0.1805292951336e+02, - 0.2809652069058e-07, 0.4094348032570e+01, 0.3523159621801e-02, - 0.3696955383823e-07, 0.5219282738794e+01, 0.5966683958112e+01, - 0.3562894142503e-07, 0.1037247544554e+01, 0.6357857516136e+01, - 0.3510598524148e-07, 0.1430020816116e+01, 0.6599467742779e+01, - 0.3617736142953e-07, 0.3002911403677e+01, 0.6019991944201e+01, - 0.2624524910730e-07, 0.2437046757292e+01, 0.6702560555334e+01, - - 0.2535824204490e-07, 0.1581594689647e+01, 0.3141537925223e+02, - 0.3519787226257e-07, 0.5379863121521e+01, 0.2505706758577e+03, - 0.2578406709982e-07, 0.4904222639329e+01, 0.1673046366289e+02, - 0.3423887981473e-07, 0.3646448997315e+01, 0.6546159756691e+01, - 0.2776083886467e-07, 0.3307829300144e+01, 0.1272157198369e+02, - 0.3379592818379e-07, 0.1747541251125e+01, 0.1494531617769e+02, - 0.3050255426284e-07, 0.1784689432607e-01, 0.4732030630302e+01, - 0.2652378350236e-07, 0.4420055276260e+01, 0.5863591145557e+01, - 0.2374498173768e-07, 0.3629773929208e+01, 0.2388894113936e+01, - 0.2716451255140e-07, 0.3079623706780e+01, 0.1202934727411e+02, - - 0.3038583699229e-07, 0.3312487903507e+00, 0.1256608456547e+02, - 0.2220681228760e-07, 0.5265520401774e+01, 0.1336244973887e+02, - 0.3044156540912e-07, 0.4766664081250e+01, 0.2908881142201e+02, - 0.2731859923561e-07, 0.5069146530691e+01, 0.1391601904066e+02, - 0.2285603018171e-07, 0.5954935112271e+01, 0.6076890225335e+01, - 0.2025006454555e-07, 0.4061789589267e+01, 0.4701116388778e+01, - 0.2012597519804e-07, 0.2485047705241e+01, 0.6262720680387e+01, - 0.2003406962258e-07, 0.4163779209320e+01, 0.6303431020504e+01, - 0.2207863441371e-07, 0.6923839133828e+00, 0.6489261475556e+01, - 0.2481374305624e-07, 0.5944173595676e+01, 0.1204357418345e+02, - - 0.2130923288870e-07, 0.4641013671967e+01, 0.5746271423666e+01, - 0.2446370543391e-07, 0.6125796518757e+01, 0.1495633313810e+00, - 0.1932492759052e-07, 0.2234572324504e+00, 0.1352175143971e+02, - 0.2600122568049e-07, 0.4281012405440e+01, 0.4590910121555e+01, - 0.2431754047488e-07, 0.1429943874870e+00, 0.1162474756779e+01, - 0.1875902869209e-07, 0.9781803816948e+00, 0.6279194432410e+01, - 0.1874381139426e-07, 0.5670368130173e+01, 0.6286957268481e+01, - 0.2156696047173e-07, 0.2008985006833e+01, 0.1813929450232e+02, - 0.1965076182484e-07, 0.2566186202453e+00, 0.4686889479442e+01, - 0.2334816372359e-07, 0.4408121891493e+01, 0.1002183730415e+02, - - 0.1869937408802e-07, 0.5272745038656e+01, 0.2427287361862e+00, - 0.2436236460883e-07, 0.4407720479029e+01, 0.9514313292143e+02, - 0.1761365216611e-07, 0.1943892315074e+00, 0.1351787002167e+02, - 0.2156289480503e-07, 0.1418570924545e+01, 0.6037244212485e+01, - 0.2164748979255e-07, 0.4724603439430e+01, 0.2301353951334e+02, - 0.2222286670853e-07, 0.2400266874598e+01, 0.1266924451345e+02, - 0.2070901414929e-07, 0.5230348028732e+01, 0.6528907488406e+01, - 0.1792745177020e-07, 0.2099190328945e+01, 0.6819880277225e+01, - 0.1841802068445e-07, 0.3467527844848e+00, 0.6514761976723e+02, - 0.1578401631718e-07, 0.7098642356340e+00, 0.2077542790660e-01, - - 0.1561690152531e-07, 0.5943349620372e+01, 0.6272439236156e+01, - 0.1558591045463e-07, 0.7040653478980e+00, 0.6293712464735e+01, - 0.1737356469576e-07, 0.4487064760345e+01, 0.1765478049437e+02, - 0.1434755619991e-07, 0.2993391570995e+01, 0.1102062672231e+00, - 0.1482187806654e-07, 0.2278049198251e+01, 0.1052268489556e+01, - 0.1424812827089e-07, 0.1682114725827e+01, 0.1311972100268e+02, - 0.1380282448623e-07, 0.3262668602579e+01, 0.1017725758696e+02, - 0.1811481244566e-07, 0.3187771221777e+01, 0.1887552587463e+02, - 0.1504446185696e-07, 0.5650162308647e+01, 0.7626583626240e-01, - 0.1740776154137e-07, 0.5487068607507e+01, 0.1965104848470e+02, - - 0.1374339536251e-07, 0.5745688172201e+01, 0.6016468784579e+01, - 0.1761377477704e-07, 0.5748060203659e+01, 0.2593412433514e+02, - 0.1535138225795e-07, 0.6226848505790e+01, 0.9411464614024e+01, - 0.1788140543676e-07, 0.6189318878563e+01, 0.3301902111895e+02, - 0.1375002807996e-07, 0.5371812884394e+01, 0.6327837846670e+00, - 0.1242115758632e-07, 0.1471687569712e+01, 0.3894181736510e+01, - 0.1450977333938e-07, 0.4143836662127e+01, 0.1277945078067e+02, - 0.1297579575023e-07, 0.9003477661957e+00, 0.6549682916313e+01, - 0.1462667934821e-07, 0.5760505536428e+01, 0.1863592847156e+02, - 0.1381774374799e-07, 0.1085471729463e+01, 0.2379164476796e+01, - - 0.1682333169307e-07, 0.5409870870133e+01, 0.1620077269078e+02, - 0.1190812918837e-07, 0.1397205174601e+01, 0.1149965630200e+02, - 0.1221434762106e-07, 0.9001804809095e+00, 0.1257326515556e+02, - 0.1549934644860e-07, 0.4262528275544e+01, 0.1820933031200e+02, - 0.1252138953050e-07, 0.1411642012027e+01, 0.6993008899458e+01, - 0.1237078905387e-07, 0.2844472403615e+01, 0.2435678079171e+02, - 0.1446953389615e-07, 0.5295835522223e+01, 0.3813291813120e-01, - 0.1388446457170e-07, 0.4969428135497e+01, 0.2458316379602e+00, - 0.1019339179228e-07, 0.2491369561806e+01, 0.6112403035119e+01, - 0.1258880815343e-07, 0.4679426248976e+01, 0.5429879531333e+01, - - 0.1297768238261e-07, 0.1074509953328e+01, 0.1249137003520e+02, - 0.9913505718094e-08, 0.4735097918224e+01, 0.6247047890016e+01, - 0.9830453155969e-08, 0.4158649187338e+01, 0.6453748665772e+01, - 0.1192615865309e-07, 0.3438208613699e+01, 0.6290122169689e+01, - 0.9835874798277e-08, 0.1913300781229e+01, 0.6319103810876e+01, - 0.9639087569277e-08, 0.9487683644125e+00, 0.8273820945392e+01, - 0.1175716107001e-07, 0.3228141664287e+01, 0.6276029531202e+01, - 0.1018926508678e-07, 0.2216607854300e+01, 0.1254537627298e+02, - 0.9500087869225e-08, 0.2625116459733e+01, 0.1256517118505e+02, - 0.9664192916575e-08, 0.5860562449214e+01, 0.6259197520765e+01, - - 0.9612858712203e-08, 0.7885682917381e+00, 0.6306954180126e+01, - 0.1117645675413e-07, 0.3932148831189e+01, 0.1779695906178e+02, - 0.1158864052160e-07, 0.9995605521691e+00, 0.1778273215245e+02, - 0.9021043467028e-08, 0.5263769742673e+01, 0.6172869583223e+01, - 0.8836134773563e-08, 0.1496843220365e+01, 0.1692165728891e+01, - 0.1045872200691e-07, 0.7009039517214e+00, 0.2204125344462e+00, - 0.1211463487798e-07, 0.4041544938511e+01, 0.8257698122054e+02, - 0.8541990804094e-08, 0.1447586692316e+01, 0.6393282117669e+01, - 0.1038720703636e-07, 0.4594249718112e+00, 0.1550861511662e+02, - 0.1126722351445e-07, 0.3925550579036e+01, 0.2061856251104e+00, - - 0.8697373859631e-08, 0.4411341856037e+01, 0.9491756770005e+00, - 0.8869380028441e-08, 0.2402659724813e+01, 0.3903911373650e+01, - 0.9247014693258e-08, 0.1401579743423e+01, 0.6267823317922e+01, - 0.9205062930950e-08, 0.5245978000814e+01, 0.6298328382969e+01, - 0.8000745038049e-08, 0.3590803356945e+01, 0.2648454860559e+01, - 0.9168973650819e-08, 0.2470150501679e+01, 0.1498544001348e+03, - 0.1075444949238e-07, 0.1328606161230e+01, 0.3694923081589e+02, - 0.7817298525817e-08, 0.6162256225998e+01, 0.4804209201333e+01, - 0.9541469226356e-08, 0.3942568967039e+01, 0.1256713221673e+02, - 0.9821910122027e-08, 0.2360246287233e+00, 0.1140367694411e+02, - - 0.9897822023777e-08, 0.4619805634280e+01, 0.2280573557157e+02, - 0.7737289283765e-08, 0.3784727847451e+01, 0.7834121070590e+01, - 0.9260204034710e-08, 0.2223352487601e+01, 0.2787043132925e+01, - 0.7320252888486e-08, 0.1288694636874e+01, 0.6282655592598e+01, - 0.7319785780946e-08, 0.5359869567774e+01, 0.6283496108294e+01, - 0.7147219933778e-08, 0.5516616675856e+01, 0.1725663147538e+02, - 0.7946502829878e-08, 0.2630459984567e+01, 0.1241073141809e+02, - 0.9001711808932e-08, 0.2849815827227e+01, 0.6281591679874e+01, - 0.8994041507257e-08, 0.3795244450750e+01, 0.6284560021018e+01, - 0.8298582787358e-08, 0.5236413127363e+00, 0.1241658836951e+02, - - 0.8526596520710e-08, 0.4794605424426e+01, 0.1098419223922e+02, - 0.8209822103197e-08, 0.1578752370328e+01, 0.1096996532989e+02, - 0.6357049861094e-08, 0.5708926113761e+01, 0.1596186371003e+01, - 0.7370473179049e-08, 0.3842402530241e+01, 0.4061219149443e+01, - 0.7232154664726e-08, 0.3067548981535e+01, 0.1610006857377e+03, - 0.6328765494903e-08, 0.1313930030069e+01, 0.1193336791622e+02, - 0.8030064908595e-08, 0.3488500408886e+01, 0.8460828644453e+00, - 0.6275464259232e-08, 0.1532061626198e+01, 0.8531963191132e+00, - 0.7051897446325e-08, 0.3285859929993e+01, 0.5849364236221e+01, - 0.6161593705428e-08, 0.1477341999464e+01, 0.5573142801433e+01, - - 0.7754683957278e-08, 0.1586118663096e+01, 0.8662240327241e+01, - 0.5889928990701e-08, 0.1304887868803e+01, 0.1232342296471e+02, - 0.5705756047075e-08, 0.4555333589350e+01, 0.1258692712880e+02, - 0.5964178808332e-08, 0.3001762842062e+01, 0.5333900173445e+01, - 0.6712446027467e-08, 0.4886780007595e+01, 0.1171295538178e+02, - 0.5941809275464e-08, 0.4701509603824e+01, 0.9779108567966e+01, - 0.5466993627395e-08, 0.4588357817278e+01, 0.1884211409667e+02, - 0.6340512090980e-08, 0.1164543038893e+01, 0.5217580628120e+02, - 0.6325505710045e-08, 0.3919171259645e+01, 0.1041998632314e+02, - 0.6164789509685e-08, 0.2143828253542e+01, 0.6151533897323e+01, - - 0.5263330812430e-08, 0.6066564434241e+01, 0.1885275071096e+02, - 0.5597087780221e-08, 0.2926316429472e+01, 0.4337116142245e+00, - 0.5396556236817e-08, 0.3244303591505e+01, 0.6286362197481e+01, - 0.5396615148223e-08, 0.3404304703662e+01, 0.6279789503410e+01, - 0.7091832443341e-08, 0.8532377803192e+00, 0.4907302013889e+01, - 0.6572352589782e-08, 0.4901966774419e+01, 0.1176433076753e+02, - 0.5960236060795e-08, 0.1874672315797e+01, 0.1422690933580e-01, - 0.5125480043511e-08, 0.3735726064334e+01, 0.1245594543367e+02, - 0.5928241866410e-08, 0.4502033899935e+01, 0.6414617803568e+01, - 0.5249600357424e-08, 0.4372334799878e+01, 0.1151388321134e+02, - - 0.6059171276087e-08, 0.2581617302908e+01, 0.6062663316000e+01, - 0.5295235081662e-08, 0.2974811513158e+01, 0.3496032717521e+01, - 0.5820561875933e-08, 0.1796073748244e+00, 0.2838593341516e+00, - 0.4754696606440e-08, 0.1981998136973e+01, 0.3104930017775e+01, - 0.6385053548955e-08, 0.2559174171605e+00, 0.6133512519065e+01, - 0.6589828273941e-08, 0.2750967106776e+01, 0.4087944051283e+02, - 0.5383376567189e-08, 0.6325947523578e+00, 0.2248384854122e+02, - 0.5928941683538e-08, 0.1672304519067e+01, 0.1581959461667e+01, - 0.4816060709794e-08, 0.3512566172575e+01, 0.9388005868221e+01, - 0.6003381586512e-08, 0.5610932219189e+01, 0.5326786718777e+01, - - 0.5504225393105e-08, 0.4037501131256e+01, 0.6503488384892e+01, - 0.5353772620129e-08, 0.6122774968240e+01, 0.1735668374386e+03, - 0.5786253768544e-08, 0.5527984999515e+01, 0.1350651127443e+00, - 0.5065706702002e-08, 0.9980765573624e+00, 0.1248988586463e+02, - 0.5972838885276e-08, 0.6044489493203e+01, 0.2673594526851e+02, - 0.5323585877961e-08, 0.3924265998147e+01, 0.4171425416666e+01, - 0.5210772682858e-08, 0.6220111376901e+01, 0.2460261242967e+02, - 0.4726549040535e-08, 0.3716043206862e+01, 0.7232251527446e+01, - 0.6029425105059e-08, 0.8548704071116e+00, 0.3227113045244e+03, - 0.4481542826513e-08, 0.1426925072829e+01, 0.5547199253223e+01, - - 0.5836024505068e-08, 0.7135651752625e-01, 0.7285056171570e+02, - 0.4137046613272e-08, 0.5330767643283e+01, 0.1087398597200e+02, - 0.5171977473924e-08, 0.4494262335353e+00, 0.1884570439172e+02, - 0.5694429833732e-08, 0.2952369582215e+01, 0.9723862754494e+02, - 0.4009158925298e-08, 0.3500003416535e+01, 0.6244942932314e+01, - 0.4784939596873e-08, 0.6196709413181e+01, 0.2929661536378e+02, - 0.3983725022610e-08, 0.5103690031897e+01, 0.4274518229222e+01, - 0.3870535232462e-08, 0.3187569587401e+01, 0.6321208768577e+01, - 0.5140501213951e-08, 0.1668924357457e+01, 0.1232032006293e+02, - 0.3849034819355e-08, 0.4445722510309e+01, 0.1726726808967e+02, - - 0.4002383075060e-08, 0.5226224152423e+01, 0.7018952447668e+01, - 0.3890719543549e-08, 0.4371166550274e+01, 0.1491901785440e+02, - 0.4887084607881e-08, 0.5973556689693e+01, 0.1478866649112e+01, - 0.3739939287592e-08, 0.2089084714600e+01, 0.6922973089781e+01, - 0.5031925918209e-08, 0.4658371936827e+01, 0.1715706182245e+02, - 0.4387748764954e-08, 0.4825580552819e+01, 0.2331413144044e+03, - 0.4147398098865e-08, 0.3739003524998e+01, 0.1376059875786e+02, - 0.3719089993586e-08, 0.1148941386536e+01, 0.6297302759782e+01, - 0.3934238461056e-08, 0.1559893008343e+01, 0.7872148766781e+01, - 0.3672471375622e-08, 0.5516145383612e+01, 0.6268848941110e+01, - - 0.3768911277583e-08, 0.6116053700563e+01, 0.4157198507331e+01, - 0.4033388417295e-08, 0.5076821746017e+01, 0.1567108171867e+02, - 0.3764194617832e-08, 0.8164676232075e+00, 0.3185192151914e+01, - 0.4840628226284e-08, 0.1360479453671e+01, 0.1252801878276e+02, - 0.4949443923785e-08, 0.2725622229926e+01, 0.1617106187867e+03, - 0.4117393089971e-08, 0.6054459628492e+00, 0.5642198095270e+01, - 0.3925754020428e-08, 0.8570462135210e+00, 0.2139354194808e+02, - 0.3630551757923e-08, 0.3552067338279e+01, 0.6294805223347e+01, - 0.3627274802357e-08, 0.3096565085313e+01, 0.6271346477544e+01, - 0.3806143885093e-08, 0.6367751709777e+00, 0.1725304118033e+02, - - 0.4433254641565e-08, 0.4848461503937e+01, 0.7445550607224e+01, - 0.3712319846576e-08, 0.1331950643655e+01, 0.4194847048887e+00, - 0.3849847534783e-08, 0.4958368297746e+00, 0.9562891316684e+00, - 0.3483955430165e-08, 0.2237215515707e+01, 0.1161697602389e+02, - 0.3961912730982e-08, 0.3332402188575e+01, 0.2277943724828e+02, - 0.3419978244481e-08, 0.5785600576016e+01, 0.1362553364512e+02, - 0.3329417758177e-08, 0.9812676559709e-01, 0.1685848245639e+02, - 0.4207206893193e-08, 0.9494780468236e+00, 0.2986433403208e+02, - 0.3268548976410e-08, 0.1739332095686e+00, 0.5749861718712e+01, - 0.3321880082685e-08, 0.1423354800666e+01, 0.6279143387820e+01, - - 0.4503173010852e-08, 0.2314972675293e+00, 0.1385561574497e+01, - 0.4316599090954e-08, 0.1012646782616e+00, 0.4176041334900e+01, - 0.3283493323850e-08, 0.5233306881265e+01, 0.6287008313071e+01, - 0.3164033542343e-08, 0.4005597257511e+01, 0.2099539292909e+02, - 0.4159720956725e-08, 0.5365676242020e+01, 0.5905702259363e+01, - 0.3565176892217e-08, 0.4284440620612e+01, 0.3932462625300e-02, - 0.3514440950221e-08, 0.4270562636575e+01, 0.7335344340001e+01, - 0.3540596871909e-08, 0.5953553201060e+01, 0.1234573916645e+02, - 0.2960769905118e-08, 0.1115180417718e+01, 0.2670964694522e+02, - 0.2962213739684e-08, 0.3863811918186e+01, 0.6408777551755e+00, - - 0.3883556700251e-08, 0.1268617928302e+01, 0.6660449441528e+01, - 0.2919225516346e-08, 0.4908605223265e+01, 0.1375773836557e+01, - 0.3115158863370e-08, 0.3744519976885e+01, 0.3802769619140e-01, - 0.4099438144212e-08, 0.4173244670532e+01, 0.4480965020977e+02, - 0.2899531858964e-08, 0.5910601428850e+01, 0.2059724391010e+02, - 0.3289733429855e-08, 0.2488050078239e+01, 0.1081813534213e+02, - 0.3933075612875e-08, 0.1122363652883e+01, 0.3773735910827e+00, - 0.3021403764467e-08, 0.4951973724904e+01, 0.2982630633589e+02, - 0.2798598949757e-08, 0.5117057845513e+01, 0.1937891852345e+02, - 0.3397421302707e-08, 0.6104159180476e+01, 0.6923953605621e+01, - - 0.3720398002179e-08, 0.1184933429829e+01, 0.3066615496545e+02, - 0.3598484186267e-08, 0.3505282086105e+01, 0.6147450479709e+01, - 0.3694594027310e-08, 0.2286651088141e+01, 0.2636725487657e+01, - 0.2680444152969e-08, 0.1871816775482e+00, 0.6816289982179e+01, - 0.3497574865641e-08, 0.3143251755431e+01, 0.6418701221183e+01, - 0.3130274129494e-08, 0.2462167316018e+01, 0.1235996607578e+02, - 0.3241119069551e-08, 0.4256374004686e+01, 0.1652265972112e+02, - 0.2601960842061e-08, 0.4970362941425e+01, 0.1045450126711e+02, - 0.2690601527504e-08, 0.2372657824898e+01, 0.3163918923335e+00, - 0.2908688152664e-08, 0.4232652627721e+01, 0.2828699048865e+02, - - 0.3120456131875e-08, 0.3925747001137e+00, 0.2195415756911e+02, - 0.3148855423384e-08, 0.3093478330445e+01, 0.1172006883645e+02, - 0.3051044261017e-08, 0.5560948248212e+01, 0.6055599646783e+01, - 0.2826006876660e-08, 0.5072790310072e+01, 0.5120601093667e+01, - 0.3100034191711e-08, 0.4998530231096e+01, 0.1799603123222e+02, - 0.2398771640101e-08, 0.2561739802176e+01, 0.6255674361143e+01, - 0.2384002842728e-08, 0.4087420284111e+01, 0.6310477339748e+01, - 0.2842146517568e-08, 0.2515048217955e+01, 0.5469525544182e+01, - 0.2847674371340e-08, 0.5235326497443e+01, 0.1034429499989e+02, - 0.2903722140764e-08, 0.1088200795797e+01, 0.6510552054109e+01, - - 0.3187610710605e-08, 0.4710624424816e+01, 0.1693792562116e+03, - 0.3048869992813e-08, 0.2857975896445e+00, 0.8390110365991e+01, - 0.2860216950984e-08, 0.2241619020815e+01, 0.2243449970715e+00, - 0.2701117683113e-08, 0.6651573305272e-01, 0.6129297044991e+01, - 0.2509891590152e-08, 0.1285135324585e+01, 0.1044027435778e+02, - 0.2623200252223e-08, 0.2981229834530e+00, 0.6436854655901e+01, - 0.2622541669202e-08, 0.6122470726189e+01, 0.9380959548977e+01, - 0.2818435667099e-08, 0.4251087148947e+01, 0.5934151399930e+01, - 0.2365196797465e-08, 0.3465070460790e+01, 0.2470570524223e+02, - 0.2358704646143e-08, 0.5791603815350e+01, 0.8671969964381e+01, - - 0.2388299481390e-08, 0.4142483772941e+01, 0.7096626156709e+01, - 0.1996041217224e-08, 0.2101901889496e+01, 0.1727188400790e+02, - 0.2687593060336e-08, 0.1526689456959e+01, 0.7075506709219e+02, - 0.2618913670810e-08, 0.2397684236095e+01, 0.6632000300961e+01, - 0.2571523050364e-08, 0.5751929456787e+00, 0.6206810014183e+01, - 0.2582135006946e-08, 0.5595464352926e+01, 0.4873985990671e+02, - 0.2372530190361e-08, 0.5092689490655e+01, 0.1590676413561e+02, - 0.2357178484712e-08, 0.4444363527851e+01, 0.3097883698531e+01, - 0.2451590394723e-08, 0.3108251687661e+01, 0.6612329252343e+00, - 0.2370045949608e-08, 0.2608133861079e+01, 0.3459636466239e+02, - - 0.2268997267358e-08, 0.3639717753384e+01, 0.2844914056730e-01, - 0.1731432137906e-08, 0.1741898445707e+00, 0.2019909489111e+02, - 0.1629869741622e-08, 0.3902225646724e+01, 0.3035599730800e+02, - 0.2206215801974e-08, 0.4971131250731e+01, 0.6281667977667e+01, - 0.2205469554680e-08, 0.1677462357110e+01, 0.6284483723224e+01, - 0.2148792362509e-08, 0.4236259604006e+01, 0.1980482729015e+02, - 0.1873733657847e-08, 0.5926814998687e+01, 0.2876692439167e+02, - 0.2026573758959e-08, 0.4349643351962e+01, 0.2449240616245e+02, - 0.1807770325110e-08, 0.5700940482701e+01, 0.2045286941806e+02, - 0.1881174408581e-08, 0.6601286363430e+00, 0.2358125818164e+02, - - 0.1368023671690e-08, 0.2211098592752e+01, 0.2473415438279e+02, - 0.1720017916280e-08, 0.4942488551129e+01, 0.1679593901136e+03, - 0.1702427665131e-08, 0.1452233856386e+01, 0.3338575901272e+03, - 0.1414032510054e-08, 0.5525357721439e+01, 0.1624205518357e+03, - 0.1652626045364e-08, 0.4108794283624e+01, 0.8956999012000e+02, - 0.1642957769686e-08, 0.7344335209984e+00, 0.5267006960365e+02, - 0.1614952403624e-08, 0.3541213951363e+01, 0.3332657872986e+02, - 0.1535988291188e-08, 0.4031094072151e+01, 0.3852657435933e+02, - 0.1593193738177e-08, 0.4185136203609e+01, 0.2282781046519e+03, - 0.1074569126382e-08, 0.1720485636868e+01, 0.8397383534231e+02, - - 0.1074408214509e-08, 0.2758613420318e+01, 0.8401985929482e+02, - 0.9700199670465e-09, 0.4216686842097e+01, 0.7826370942180e+02, - 0.1258433517061e-08, 0.2575068876639e+00, 0.3115650189215e+03, - 0.1240303229539e-08, 0.4800844956756e+00, 0.1784300471910e+03, - 0.9018345948127e-09, 0.3896756361552e+00, 0.5886454391678e+02, - 0.1135301432805e-08, 0.3700805023550e+00, 0.7842370451713e+02, - 0.9215887951370e-09, 0.4364579276638e+01, 0.1014262087719e+03, - 0.1055401054147e-08, 0.2156564222111e+01, 0.5660027930059e+02, - 0.1008725979831e-08, 0.5454015785234e+01, 0.4245678405627e+02, - 0.7217398104321e-09, 0.1597772562175e+01, 0.2457074661053e+03, - - 0.6912033134447e-09, 0.5824090621461e+01, 0.1679936946371e+03, - 0.6833881523549e-09, 0.3578778482835e+01, 0.6053048899753e+02, - 0.4887304205142e-09, 0.3724362812423e+01, 0.9656299901946e+02, - 0.5173709754788e-09, 0.5422427507933e+01, 0.2442876000072e+03, - 0.4671353097145e-09, 0.2396106924439e+01, 0.1435713242844e+03, - 0.5652608439480e-09, 0.2804028838685e+01, 0.8365903305582e+02, - 0.5604061331253e-09, 0.1638816006247e+01, 0.8433466158131e+02, - 0.4712723365400e-09, 0.8979003224474e+00, 0.3164282286739e+03, - 0.4909967465112e-09, 0.3210426725516e+01, 0.4059982187939e+03, - 0.4771358267658e-09, 0.5308027211629e+01, 0.1805255418145e+03, - - 0.3943451445989e-09, 0.2195145341074e+01, 0.2568537517081e+03, - 0.3952109120244e-09, 0.5081189491586e+01, 0.2449975330562e+03, - 0.3788134594789e-09, 0.4345171264441e+01, 0.1568131045107e+03, - 0.3738330190479e-09, 0.2613062847997e+01, 0.3948519331910e+03, - 0.3099866678136e-09, 0.2846760817689e+01, 0.1547176098872e+03, - 0.2002962716768e-09, 0.4921360989412e+01, 0.2268582385539e+03, - 0.2198291338754e-09, 0.1130360117454e+00, 0.1658638954901e+03, - 0.1491958330784e-09, 0.4228195232278e+01, 0.2219950288015e+03, - 0.1475384076173e-09, 0.3005721811604e+00, 0.3052819430710e+03, - 0.1661626624624e-09, 0.7830125621203e+00, 0.2526661704812e+03, - - 0.9015823460025e-10, 0.3807792942715e+01, 0.4171445043968e+03} - - /* Sun-to-Earth, T^0, Y */ - e0y := []float64{ - 0.9998921098898e+00, 0.1826583913846e+00, 0.6283075850446e+01, - -0.2442700893735e-01, 0.0000000000000e+00, 0.0000000000000e+00, - 0.8352929742915e-02, 0.1395277998680e+00, 0.1256615170089e+02, - 0.1046697300177e-03, 0.9641423109763e-01, 0.1884922755134e+02, - 0.3110841876663e-04, 0.5381140401712e+01, 0.8399684731857e+02, - 0.2570269094593e-04, 0.5301016407128e+01, 0.5296909721118e+00, - 0.2147389623610e-04, 0.2662510869850e+01, 0.1577343543434e+01, - 0.1680344384050e-04, 0.5207904119704e+01, 0.6279552690824e+01, - 0.1679117312193e-04, 0.4582187486968e+01, 0.6286599010068e+01, - 0.1440512068440e-04, 0.1900688517726e+01, 0.2352866153506e+01, - - 0.1135139664999e-04, 0.5273108538556e+01, 0.5223693906222e+01, - 0.9345482571018e-05, 0.4503047687738e+01, 0.1203646072878e+02, - 0.9007418719568e-05, 0.1605621059637e+01, 0.1021328554739e+02, - 0.5671536712314e-05, 0.5812849070861e+00, 0.1059381944224e+01, - 0.7451401861666e-05, 0.2807346794836e+01, 0.3981490189893e+00, - 0.6393470057114e-05, 0.6029224133855e+01, 0.5753384878334e+01, - 0.6814275881697e-05, 0.6472990145974e+00, 0.4705732307012e+01, - 0.6113705628887e-05, 0.3813843419700e+01, 0.6812766822558e+01, - 0.4503851367273e-05, 0.4527804370996e+01, 0.5884926831456e+01, - 0.4522249141926e-05, 0.5991783029224e+01, 0.6256777527156e+01, - - 0.4501794307018e-05, 0.3798703844397e+01, 0.6309374173736e+01, - 0.5514927480180e-05, 0.3961257833388e+01, 0.5507553240374e+01, - 0.4062862799995e-05, 0.5256247296369e+01, 0.6681224869435e+01, - 0.5414900429712e-05, 0.5499032014097e+01, 0.7755226100720e+00, - 0.5463153987424e-05, 0.6173092454097e+01, 0.1414349524433e+02, - 0.5071611859329e-05, 0.2870244247651e+01, 0.7860419393880e+01, - 0.2195112094455e-05, 0.2952338617201e+01, 0.1150676975667e+02, - 0.2279139233919e-05, 0.5951775132933e+01, 0.7058598460518e+01, - 0.2278386100876e-05, 0.4845456398785e+01, 0.4694002934110e+01, - 0.2559088003308e-05, 0.6945321117311e+00, 0.1216800268190e+02, - - 0.2561079286856e-05, 0.6167224608301e+01, 0.7099330490126e+00, - 0.1792755796387e-05, 0.1400122509632e+01, 0.7962980379786e+00, - 0.1818715656502e-05, 0.4703347611830e+01, 0.6283142985870e+01, - 0.1818744924791e-05, 0.5086748900237e+01, 0.6283008715021e+01, - 0.1554518791390e-05, 0.5331008042713e-01, 0.2513230340178e+02, - 0.2063265737239e-05, 0.4283680484178e+01, 0.1179062909082e+02, - 0.1497613520041e-05, 0.6074207826073e+01, 0.5486777812467e+01, - 0.2000617940427e-05, 0.2501426281450e+01, 0.1778984560711e+02, - 0.1289731195580e-05, 0.3646340599536e+01, 0.7079373888424e+01, - 0.1282657998934e-05, 0.3232864804902e+01, 0.3738761453707e+01, - - 0.1528915968658e-05, 0.5581433416669e+01, 0.2132990797783e+00, - 0.1187304098432e-05, 0.5453576453694e+01, 0.9437762937313e+01, - 0.7842782928118e-06, 0.2823953922273e+00, 0.8827390247185e+01, - 0.7352892280868e-06, 0.1124369580175e+01, 0.1589072916335e+01, - 0.6570189360797e-06, 0.2089154042840e+01, 0.1176985366291e+02, - 0.6324967590410e-06, 0.6704855581230e+00, 0.6262300422539e+01, - 0.6298289872283e-06, 0.2836414855840e+01, 0.6303851278352e+01, - 0.6476686465855e-06, 0.4852433866467e+00, 0.7113454667900e-02, - 0.8587034651234e-06, 0.1453511005668e+01, 0.1672837615881e+03, - 0.8068948788113e-06, 0.9224087798609e+00, 0.6069776770667e+01, - - 0.8353786011661e-06, 0.4631707184895e+01, 0.3340612434717e+01, - 0.6009324532132e-06, 0.1829498827726e+01, 0.4136910472696e+01, - 0.7558158559566e-06, 0.2588596800317e+01, 0.6496374930224e+01, - 0.5809279504503e-06, 0.5516818853476e+00, 0.1097707878456e+02, - 0.5374131950254e-06, 0.6275674734960e+01, 0.1194447056968e+01, - 0.5711160507326e-06, 0.1091905956872e+01, 0.6282095334605e+01, - 0.5710183170746e-06, 0.2415001635090e+01, 0.6284056366286e+01, - 0.5144373590610e-06, 0.6020336443438e+01, 0.6290189305114e+01, - 0.5103108927267e-06, 0.3775634564605e+01, 0.6275962395778e+01, - 0.4960654697891e-06, 0.1073450946756e+01, 0.6127655567643e+01, - - 0.4786385689280e-06, 0.2431178012310e+01, 0.6438496133249e+01, - 0.6109911263665e-06, 0.5343356157914e+01, 0.3154687086868e+01, - 0.4839898944024e-06, 0.5830833594047e-01, 0.8018209333619e+00, - 0.4734822623919e-06, 0.4536080134821e+01, 0.3128388763578e+01, - 0.4834741473290e-06, 0.2585090489754e+00, 0.7084896783808e+01, - 0.5134858581156e-06, 0.4213317172603e+01, 0.1235285262111e+02, - 0.5064004264978e-06, 0.4814418806478e+00, 0.1185621865188e+02, - 0.3753476772761e-06, 0.1599953399788e+01, 0.8429241228195e+01, - 0.4935264014283e-06, 0.2157417556873e+01, 0.2544314396739e+01, - 0.3950929600897e-06, 0.3359394184254e+01, 0.5481254917084e+01, - - 0.4895849789777e-06, 0.5165704376558e+01, 0.9225539266174e+01, - 0.4215241688886e-06, 0.2065368800993e+01, 0.1726015463500e+02, - 0.3796773731132e-06, 0.1468606346612e+01, 0.4265981595566e+00, - 0.3114178142515e-06, 0.3615638079474e+01, 0.2146165377750e+01, - 0.3260664220838e-06, 0.4417134922435e+01, 0.4164311961999e+01, - 0.3976996123008e-06, 0.4700866883004e+01, 0.5856477690889e+01, - 0.2801459672924e-06, 0.4538902060922e+01, 0.1256967486051e+02, - 0.3638931868861e-06, 0.1334197991475e+01, 0.1807370494127e+02, - 0.2487013269476e-06, 0.3749275558275e+01, 0.2629832328990e-01, - 0.3034165481994e-06, 0.4236622030873e+00, 0.4535059491685e+01, - - 0.2676278825586e-06, 0.5970848007811e+01, 0.3930209696940e+01, - 0.2764903818918e-06, 0.5194636754501e+01, 0.1256262854127e+02, - 0.2485149930507e-06, 0.1002434207846e+01, 0.5088628793478e+01, - 0.2199305540941e-06, 0.3066773098403e+01, 0.1255903824622e+02, - 0.2571106500435e-06, 0.7588312459063e+00, 0.1336797263425e+02, - 0.2049751817158e-06, 0.3444977434856e+01, 0.1137170464392e+02, - 0.2599707296297e-06, 0.1873128542205e+01, 0.7143069561767e+02, - 0.1785018072217e-06, 0.5015891306615e+01, 0.1748016358760e+01, - 0.2324833891115e-06, 0.4618271239730e+01, 0.1831953657923e+02, - 0.1709711119545e-06, 0.5300003455669e+01, 0.4933208510675e+01, - - 0.2107159351716e-06, 0.2229819815115e+01, 0.7477522907414e+01, - 0.1750333080295e-06, 0.6161485880008e+01, 0.1044738781244e+02, - 0.2000598210339e-06, 0.2967357299999e+01, 0.8031092209206e+01, - 0.1380920248681e-06, 0.3027007923917e+01, 0.8635942003952e+01, - 0.1412460470299e-06, 0.6037597163798e+01, 0.2942463415728e+01, - 0.1888459803001e-06, 0.8561476243374e+00, 0.1561374759853e+03, - 0.1788370542585e-06, 0.4869736290209e+01, 0.1592596075957e+01, - 0.1360893296167e-06, 0.3626411886436e+01, 0.1309584267300e+02, - 0.1506846530160e-06, 0.1550975377427e+01, 0.1649636139783e+02, - 0.1800913376176e-06, 0.2075826033190e+01, 0.1729818233119e+02, - - 0.1436261390649e-06, 0.6148876420255e+01, 0.2042657109477e+02, - 0.1220227114151e-06, 0.4382583879906e+01, 0.7632943190217e+01, - 0.1337883603592e-06, 0.2036644327361e+01, 0.1213955354133e+02, - 0.1159326650738e-06, 0.3892276994687e+01, 0.5331357529664e+01, - 0.1352853128569e-06, 0.1447950649744e+01, 0.1673046366289e+02, - 0.1433408296083e-06, 0.4457854692961e+01, 0.7342457794669e+01, - 0.1234701666518e-06, 0.1538818147151e+01, 0.6279485555400e+01, - 0.1234027192007e-06, 0.1968523220760e+01, 0.6286666145492e+01, - 0.1244024091797e-06, 0.5779803499985e+01, 0.1511046609763e+02, - 0.1097934945516e-06, 0.6210975221388e+00, 0.1098880815746e+02, - - 0.1254611329856e-06, 0.2591963807998e+01, 0.1572083878776e+02, - 0.1158247286784e-06, 0.2483612812670e+01, 0.5729506548653e+01, - 0.9039078252960e-07, 0.3857554579796e+01, 0.9623688285163e+01, - 0.9108024978836e-07, 0.5826368512984e+01, 0.7234794171227e+01, - 0.8887068108436e-07, 0.3475694573987e+01, 0.6148010737701e+01, - 0.8632374035438e-07, 0.3059070488983e-01, 0.6418140963190e+01, - 0.7893186992967e-07, 0.1583194837728e+01, 0.2118763888447e+01, - 0.8297650201172e-07, 0.8519770534637e+00, 0.1471231707864e+02, - 0.1019759578988e-06, 0.1319598738732e+00, 0.1349867339771e+01, - 0.1010037696236e-06, 0.9937860115618e+00, 0.6836645152238e+01, - - 0.1047727548266e-06, 0.1382138405399e+01, 0.5999216516294e+01, - 0.7351993881086e-07, 0.3833397851735e+01, 0.6040347114260e+01, - 0.9868771092341e-07, 0.2124913814390e+01, 0.6566935184597e+01, - 0.7007321959390e-07, 0.5946305343763e+01, 0.6525804586632e+01, - 0.6861411679709e-07, 0.4574654977089e+01, 0.7238675589263e+01, - 0.7554519809614e-07, 0.5949232686844e+01, 0.1253985337760e+02, - 0.9541880448335e-07, 0.3495242990564e+01, 0.2122839202813e+02, - 0.7185606722155e-07, 0.4310113471661e+01, 0.6245048154254e+01, - 0.7131360871710e-07, 0.5480309323650e+01, 0.6321103546637e+01, - 0.6651142021039e-07, 0.5411097713654e+01, 0.5327476111629e+01, - - 0.8538618213667e-07, 0.1827849973951e+01, 0.1101510648075e+02, - 0.8634954288044e-07, 0.5443584943349e+01, 0.5643178611111e+01, - 0.7449415051484e-07, 0.2011535459060e+01, 0.5368044267797e+00, - 0.7421047599169e-07, 0.3464562529249e+01, 0.2354323048545e+02, - 0.6140694354424e-07, 0.5657556228815e+01, 0.1296430071988e+02, - 0.6353525143033e-07, 0.3463816593821e+01, 0.1990745094947e+01, - 0.6221964013447e-07, 0.1532259498697e+01, 0.9517183207817e+00, - 0.5852480257244e-07, 0.1375396598875e+01, 0.9555997388169e+00, - 0.6398637498911e-07, 0.2405645801972e+01, 0.2407292145756e+02, - 0.7039744069878e-07, 0.5397541799027e+01, 0.5225775174439e+00, - - 0.6977997694382e-07, 0.4762347105419e+01, 0.1097355562493e+02, - 0.7460629558396e-07, 0.2711944692164e+01, 0.2200391463820e+02, - 0.5376577536101e-07, 0.2352980430239e+01, 0.1431416805965e+02, - 0.7530607893556e-07, 0.1943940180699e+01, 0.1842262939178e+02, - 0.6822928971605e-07, 0.4337651846959e+01, 0.1554202828031e+00, - 0.6220772380094e-07, 0.6716871369278e+00, 0.1845107853235e+02, - 0.6586950799043e-07, 0.2229714460505e+01, 0.5216580451554e+01, - 0.5873800565771e-07, 0.7627013920580e+00, 0.6398972393349e+00, - 0.6264346929745e-07, 0.6202785478961e+00, 0.6277552955062e+01, - 0.6257929115669e-07, 0.2886775596668e+01, 0.6288598745829e+01, - - 0.5343536033409e-07, 0.1977241012051e+01, 0.4690479774488e+01, - 0.5587849781714e-07, 0.1922923484825e+01, 0.1551045220144e+01, - 0.6905100845603e-07, 0.3570757164631e+01, 0.1030928125552e+00, - 0.6178957066649e-07, 0.5197558947765e+01, 0.5230807360890e+01, - 0.6187270224331e-07, 0.8193497368922e+00, 0.5650292065779e+01, - 0.5385664291426e-07, 0.5406336665586e+01, 0.7771377146812e+02, - 0.6329363917926e-07, 0.2837760654536e+01, 0.2608790314060e+02, - 0.4546018761604e-07, 0.2933580297050e+01, 0.5535693017924e+00, - 0.6196091049375e-07, 0.4157871494377e+01, 0.8467247584405e+02, - 0.6159555108218e-07, 0.3211703561703e+01, 0.2394243902548e+03, - - 0.4995340539317e-07, 0.1459098102922e+01, 0.4732030630302e+01, - 0.5457031243572e-07, 0.1430457676136e+01, 0.6179983037890e+01, - 0.4863461418397e-07, 0.2196425916730e+01, 0.9027992316901e+02, - 0.5342947626870e-07, 0.2086612890268e+01, 0.6386168663001e+01, - 0.5674296648439e-07, 0.2760204966535e+01, 0.6915859635113e+01, - 0.4745783120161e-07, 0.4245368971862e+01, 0.6282970628506e+01, - 0.4745676961198e-07, 0.5544725787016e+01, 0.6283181072386e+01, - 0.4049796869973e-07, 0.2213984363586e+01, 0.6254626709878e+01, - 0.4248333596940e-07, 0.8075781952896e+00, 0.7875671926403e+01, - 0.4027178070205e-07, 0.1293268540378e+01, 0.6311524991013e+01, - - 0.4066543943476e-07, 0.3986141175804e+01, 0.3634620989887e+01, - 0.4858863787880e-07, 0.1276112738231e+01, 0.5760498333002e+01, - 0.5277398263530e-07, 0.4916111741527e+01, 0.2515860172507e+02, - 0.4105635656559e-07, 0.1725805864426e+01, 0.6709674010002e+01, - 0.4376781925772e-07, 0.2243642442106e+01, 0.6805653367890e+01, - 0.3235827894693e-07, 0.3614135118271e+01, 0.1066495398892e+01, - 0.3073244740308e-07, 0.2460873393460e+01, 0.5863591145557e+01, - 0.3088609271373e-07, 0.5678431771790e+01, 0.9917696840332e+01, - 0.3393022279836e-07, 0.3814017477291e+01, 0.1391601904066e+02, - 0.3038686508802e-07, 0.4660216229171e+01, 0.1256621883632e+02, - - 0.4019677752497e-07, 0.5906906243735e+01, 0.1334167431096e+02, - 0.3288834998232e-07, 0.9536146445882e+00, 0.1620077269078e+02, - 0.3889973794631e-07, 0.3942205097644e+01, 0.7478166569050e-01, - 0.3050438987141e-07, 0.1624810271286e+01, 0.1805292951336e+02, - 0.3601142564638e-07, 0.4030467142575e+01, 0.6208294184755e+01, - 0.3689015557141e-07, 0.3648878818694e+01, 0.5966683958112e+01, - 0.3563471893565e-07, 0.5749584017096e+01, 0.6357857516136e+01, - 0.2776183170667e-07, 0.2630124187070e+01, 0.3523159621801e-02, - 0.2922350530341e-07, 0.1790346403629e+01, 0.1272157198369e+02, - 0.3511076917302e-07, 0.6142198301611e+01, 0.6599467742779e+01, - - 0.3619351007632e-07, 0.1432421386492e+01, 0.6019991944201e+01, - 0.2561254711098e-07, 0.2302822475792e+01, 0.1259245002418e+02, - 0.2626903942920e-07, 0.8660470994571e+00, 0.6702560555334e+01, - 0.2550187397083e-07, 0.6069721995383e+01, 0.1057540660594e+02, - 0.2535873526138e-07, 0.1079020331795e-01, 0.3141537925223e+02, - 0.3519786153847e-07, 0.3809066902283e+01, 0.2505706758577e+03, - 0.3424651492873e-07, 0.2075435114417e+01, 0.6546159756691e+01, - 0.2372676630861e-07, 0.2057803120154e+01, 0.2388894113936e+01, - 0.2710980779541e-07, 0.1510068488010e+01, 0.1202934727411e+02, - 0.3038710889704e-07, 0.5043617528901e+01, 0.1256608456547e+02, - - 0.2220364130585e-07, 0.3694793218205e+01, 0.1336244973887e+02, - 0.3025880825460e-07, 0.5450618999049e-01, 0.2908881142201e+02, - 0.2784493486864e-07, 0.3381164084502e+01, 0.1494531617769e+02, - 0.2294414142438e-07, 0.4382309025210e+01, 0.6076890225335e+01, - 0.2012723294724e-07, 0.9142212256518e+00, 0.6262720680387e+01, - 0.2036357831958e-07, 0.5676172293154e+01, 0.4701116388778e+01, - 0.2003474823288e-07, 0.2592767977625e+01, 0.6303431020504e+01, - 0.2207144900109e-07, 0.5404976271180e+01, 0.6489261475556e+01, - 0.2481664905135e-07, 0.4373284587027e+01, 0.1204357418345e+02, - 0.2674949182295e-07, 0.5859182188482e+01, 0.4590910121555e+01, - - 0.2450554720322e-07, 0.4555381557451e+01, 0.1495633313810e+00, - 0.2601975986457e-07, 0.3933165584959e+01, 0.1965104848470e+02, - 0.2199860022848e-07, 0.5227977189087e+01, 0.1351787002167e+02, - 0.2448121172316e-07, 0.4858060353949e+01, 0.1162474756779e+01, - 0.1876014864049e-07, 0.5690546553605e+01, 0.6279194432410e+01, - 0.1874513219396e-07, 0.4099539297446e+01, 0.6286957268481e+01, - 0.2156380842559e-07, 0.4382594769913e+00, 0.1813929450232e+02, - 0.1981691240061e-07, 0.1829784152444e+01, 0.4686889479442e+01, - 0.2329992648539e-07, 0.2836254278973e+01, 0.1002183730415e+02, - 0.1765184135302e-07, 0.2803494925833e+01, 0.4292330755499e+01, - - 0.2436368366085e-07, 0.2836897959677e+01, 0.9514313292143e+02, - 0.2164089203889e-07, 0.6127522446024e+01, 0.6037244212485e+01, - 0.1847755034221e-07, 0.3683163635008e+01, 0.2427287361862e+00, - 0.1674798769966e-07, 0.3316993867246e+00, 0.1311972100268e+02, - 0.2222542124356e-07, 0.8294097805480e+00, 0.1266924451345e+02, - 0.2071074505925e-07, 0.3659492220261e+01, 0.6528907488406e+01, - 0.1608224471835e-07, 0.4774492067182e+01, 0.1352175143971e+02, - 0.1857583439071e-07, 0.2873120597682e+01, 0.8662240327241e+01, - 0.1793018836159e-07, 0.5282441177929e+00, 0.6819880277225e+01, - 0.1575391221692e-07, 0.1320789654258e+01, 0.1102062672231e+00, - - 0.1840132009557e-07, 0.1917110916256e+01, 0.6514761976723e+02, - 0.1760917288281e-07, 0.2972635937132e+01, 0.5746271423666e+01, - 0.1561779518516e-07, 0.4372569261981e+01, 0.6272439236156e+01, - 0.1558687885205e-07, 0.5416424926425e+01, 0.6293712464735e+01, - 0.1951359382579e-07, 0.3094448898752e+01, 0.2301353951334e+02, - 0.1569144275614e-07, 0.2802103689808e+01, 0.1765478049437e+02, - 0.1479130389462e-07, 0.2136435020467e+01, 0.2077542790660e-01, - 0.1467828510764e-07, 0.7072627435674e+00, 0.1052268489556e+01, - 0.1627627337440e-07, 0.3947607143237e+01, 0.6327837846670e+00, - 0.1503498479758e-07, 0.4079248909190e+01, 0.7626583626240e-01, - - 0.1297967708237e-07, 0.6269637122840e+01, 0.1149965630200e+02, - 0.1374416896634e-07, 0.4175657970702e+01, 0.6016468784579e+01, - 0.1783812325219e-07, 0.1476540547560e+01, 0.3301902111895e+02, - 0.1525884228756e-07, 0.4653477715241e+01, 0.9411464614024e+01, - 0.1451067396763e-07, 0.2573001128225e+01, 0.1277945078067e+02, - 0.1297713111950e-07, 0.5612799618771e+01, 0.6549682916313e+01, - 0.1462784012820e-07, 0.4189661623870e+01, 0.1863592847156e+02, - 0.1384185980007e-07, 0.2656915472196e+01, 0.2379164476796e+01, - 0.1221497599801e-07, 0.5612515760138e+01, 0.1257326515556e+02, - 0.1560574525896e-07, 0.4783414317919e+01, 0.1887552587463e+02, - - 0.1544598372036e-07, 0.2694431138063e+01, 0.1820933031200e+02, - 0.1531678928696e-07, 0.4105103489666e+01, 0.2593412433514e+02, - 0.1349321503795e-07, 0.3082437194015e+00, 0.5120601093667e+01, - 0.1252030290917e-07, 0.6124072334087e+01, 0.6993008899458e+01, - 0.1459243816687e-07, 0.3733103981697e+01, 0.3813291813120e-01, - 0.1226103625262e-07, 0.1267127706817e+01, 0.2435678079171e+02, - 0.1019449641504e-07, 0.4367790112269e+01, 0.1725663147538e+02, - 0.1380789433607e-07, 0.3387201768700e+01, 0.2458316379602e+00, - 0.1019453421658e-07, 0.9204143073737e+00, 0.6112403035119e+01, - 0.1297929434405e-07, 0.5786874896426e+01, 0.1249137003520e+02, - - 0.9912677786097e-08, 0.3164232870746e+01, 0.6247047890016e+01, - 0.9829386098599e-08, 0.2586762413351e+01, 0.6453748665772e+01, - 0.1226807746104e-07, 0.6239068436607e+01, 0.5429879531333e+01, - 0.1192691755997e-07, 0.1867380051424e+01, 0.6290122169689e+01, - 0.9836499227081e-08, 0.3424716293727e+00, 0.6319103810876e+01, - 0.9642862564285e-08, 0.5661372990657e+01, 0.8273820945392e+01, - 0.1165184404862e-07, 0.5768367239093e+01, 0.1778273215245e+02, - 0.1175794418818e-07, 0.1657351222943e+01, 0.6276029531202e+01, - 0.1018948635601e-07, 0.6458292350865e+00, 0.1254537627298e+02, - 0.9500383606676e-08, 0.1054306140741e+01, 0.1256517118505e+02, - - 0.1227512202906e-07, 0.2505278379114e+01, 0.2248384854122e+02, - 0.9664792009993e-08, 0.4289737277000e+01, 0.6259197520765e+01, - 0.9613285666331e-08, 0.5500597673141e+01, 0.6306954180126e+01, - 0.1117906736211e-07, 0.2361405953468e+01, 0.1779695906178e+02, - 0.9611378640782e-08, 0.2851310576269e+01, 0.2061856251104e+00, - 0.8845354852370e-08, 0.6208777705343e+01, 0.1692165728891e+01, - 0.1054046966600e-07, 0.5413091423934e+01, 0.2204125344462e+00, - 0.1215539124483e-07, 0.5613969479755e+01, 0.8257698122054e+02, - 0.9932460955209e-08, 0.1106124877015e+01, 0.1017725758696e+02, - 0.8785804715043e-08, 0.2869224476477e+01, 0.9491756770005e+00, - - 0.8538084097562e-08, 0.6159640899344e+01, 0.6393282117669e+01, - 0.8648994369529e-08, 0.1374901198784e+01, 0.4804209201333e+01, - 0.1039063219067e-07, 0.5171080641327e+01, 0.1550861511662e+02, - 0.8867983926439e-08, 0.8317320304902e+00, 0.3903911373650e+01, - 0.8327495955244e-08, 0.3605591969180e+01, 0.6172869583223e+01, - 0.9243088356133e-08, 0.6114299196843e+01, 0.6267823317922e+01, - 0.9205657357835e-08, 0.3675153683737e+01, 0.6298328382969e+01, - 0.1033269714606e-07, 0.3313328813024e+01, 0.5573142801433e+01, - 0.8001706275552e-08, 0.2019980960053e+01, 0.2648454860559e+01, - 0.9171858254191e-08, 0.8992015524177e+00, 0.1498544001348e+03, - - 0.1075327150242e-07, 0.2898669963648e+01, 0.3694923081589e+02, - 0.9884866689828e-08, 0.4946715904478e+01, 0.1140367694411e+02, - 0.9541835576677e-08, 0.2371787888469e+01, 0.1256713221673e+02, - 0.7739903376237e-08, 0.2213775190612e+01, 0.7834121070590e+01, - 0.7311962684106e-08, 0.3429378787739e+01, 0.1192625446156e+02, - 0.9724904869624e-08, 0.6195878564404e+01, 0.2280573557157e+02, - 0.9251628983612e-08, 0.6511509527390e+00, 0.2787043132925e+01, - 0.7320763787842e-08, 0.6001083639421e+01, 0.6282655592598e+01, - 0.7320296650962e-08, 0.3789073265087e+01, 0.6283496108294e+01, - 0.7947032271039e-08, 0.1059659582204e+01, 0.1241073141809e+02, - - 0.9005277053115e-08, 0.1280315624361e+01, 0.6281591679874e+01, - 0.8995601652048e-08, 0.2224439106766e+01, 0.6284560021018e+01, - 0.8288040568796e-08, 0.5234914433867e+01, 0.1241658836951e+02, - 0.6359381347255e-08, 0.4137989441490e+01, 0.1596186371003e+01, - 0.8699572228626e-08, 0.1758411009497e+01, 0.6133512519065e+01, - 0.6456797542736e-08, 0.5919285089994e+01, 0.1685848245639e+02, - 0.7424573475452e-08, 0.5414616938827e+01, 0.4061219149443e+01, - 0.7235671196168e-08, 0.1496516557134e+01, 0.1610006857377e+03, - 0.8104015182733e-08, 0.1919918242764e+01, 0.8460828644453e+00, - 0.8098576535937e-08, 0.3819615855458e+01, 0.3894181736510e+01, - - 0.6275292346625e-08, 0.6244264115141e+01, 0.8531963191132e+00, - 0.6052432989112e-08, 0.5037731872610e+00, 0.1567108171867e+02, - 0.5705651535817e-08, 0.2984557271995e+01, 0.1258692712880e+02, - 0.5789650115138e-08, 0.6087038140697e+01, 0.1193336791622e+02, - 0.5512132153377e-08, 0.5855668994076e+01, 0.1232342296471e+02, - 0.7388890819102e-08, 0.2443128574740e+01, 0.4907302013889e+01, - 0.5467593991798e-08, 0.3017561234194e+01, 0.1884211409667e+02, - 0.6388519802999e-08, 0.5887386712935e+01, 0.5217580628120e+02, - 0.6106777149944e-08, 0.3483461059895e+00, 0.1422690933580e-01, - 0.7383420275489e-08, 0.5417387056707e+01, 0.2358125818164e+02, - - 0.5505208141738e-08, 0.2848193644783e+01, 0.1151388321134e+02, - 0.6310757462877e-08, 0.2349882520828e+01, 0.1041998632314e+02, - 0.6166904929691e-08, 0.5728575944077e+00, 0.6151533897323e+01, - 0.5263442042754e-08, 0.4495796125937e+01, 0.1885275071096e+02, - 0.5591828082629e-08, 0.1355441967677e+01, 0.4337116142245e+00, - 0.5397051680497e-08, 0.1673422864307e+01, 0.6286362197481e+01, - 0.5396992745159e-08, 0.1833502206373e+01, 0.6279789503410e+01, - 0.6572913000726e-08, 0.3331122065824e+01, 0.1176433076753e+02, - 0.5123421866413e-08, 0.2165327142679e+01, 0.1245594543367e+02, - 0.5930495725999e-08, 0.2931146089284e+01, 0.6414617803568e+01, - - 0.6431797403933e-08, 0.4134407994088e+01, 0.1350651127443e+00, - 0.5003182207604e-08, 0.3805420303749e+01, 0.1096996532989e+02, - 0.5587731032504e-08, 0.1082469260599e+01, 0.6062663316000e+01, - 0.5935263407816e-08, 0.8384333678401e+00, 0.5326786718777e+01, - 0.4756019827760e-08, 0.3552588749309e+01, 0.3104930017775e+01, - 0.6599951172637e-08, 0.4320826409528e+01, 0.4087944051283e+02, - 0.5902606868464e-08, 0.4811879454445e+01, 0.5849364236221e+01, - 0.5921147809031e-08, 0.9942628922396e-01, 0.1581959461667e+01, - 0.5505382581266e-08, 0.2466557607764e+01, 0.6503488384892e+01, - 0.5353771071862e-08, 0.4551978748683e+01, 0.1735668374386e+03, - - 0.5063282210946e-08, 0.5710812312425e+01, 0.1248988586463e+02, - 0.5926120403383e-08, 0.1333998428358e+01, 0.2673594526851e+02, - 0.5211016176149e-08, 0.4649315360760e+01, 0.2460261242967e+02, - 0.5347075084894e-08, 0.5512754081205e+01, 0.4171425416666e+01, - 0.4872609773574e-08, 0.1308025299938e+01, 0.5333900173445e+01, - 0.4727711321420e-08, 0.2144908368062e+01, 0.7232251527446e+01, - 0.6029426018652e-08, 0.5567259412084e+01, 0.3227113045244e+03, - 0.4321485284369e-08, 0.5230667156451e+01, 0.9388005868221e+01, - 0.4476406760553e-08, 0.6134081115303e+01, 0.5547199253223e+01, - 0.5835268277420e-08, 0.4783808492071e+01, 0.7285056171570e+02, - - 0.5172183602748e-08, 0.5161817911099e+01, 0.1884570439172e+02, - 0.5693571465184e-08, 0.1381646203111e+01, 0.9723862754494e+02, - 0.4060634965349e-08, 0.3876705259495e+00, 0.4274518229222e+01, - 0.3967398770473e-08, 0.5029491776223e+01, 0.3496032717521e+01, - 0.3943754005255e-08, 0.1923162955490e+01, 0.6244942932314e+01, - 0.4781323427824e-08, 0.4633332586423e+01, 0.2929661536378e+02, - 0.3871483781204e-08, 0.1616650009743e+01, 0.6321208768577e+01, - 0.5141741733997e-08, 0.9817316704659e-01, 0.1232032006293e+02, - 0.4002385978497e-08, 0.3656161212139e+01, 0.7018952447668e+01, - 0.4901092604097e-08, 0.4404098713092e+01, 0.1478866649112e+01, - - 0.3740932630345e-08, 0.5181188732639e+00, 0.6922973089781e+01, - 0.4387283718538e-08, 0.3254859566869e+01, 0.2331413144044e+03, - 0.5019197802033e-08, 0.3086773224677e+01, 0.1715706182245e+02, - 0.3834931695175e-08, 0.2797882673542e+01, 0.1491901785440e+02, - 0.3760413942497e-08, 0.2892676280217e+01, 0.1726726808967e+02, - 0.3719717204628e-08, 0.5861046025739e+01, 0.6297302759782e+01, - 0.4145623530149e-08, 0.2168239627033e+01, 0.1376059875786e+02, - 0.3932788425380e-08, 0.6271811124181e+01, 0.7872148766781e+01, - 0.3686377476857e-08, 0.3936853151404e+01, 0.6268848941110e+01, - 0.3779077950339e-08, 0.1404148734043e+01, 0.4157198507331e+01, - - 0.4091334550598e-08, 0.2452436180854e+01, 0.9779108567966e+01, - 0.3926694536146e-08, 0.6102292739040e+01, 0.1098419223922e+02, - 0.4841000253289e-08, 0.6072760457276e+01, 0.1252801878276e+02, - 0.4949340130240e-08, 0.1154832815171e+01, 0.1617106187867e+03, - 0.3761557737360e-08, 0.5527545321897e+01, 0.3185192151914e+01, - 0.3647396268188e-08, 0.1525035688629e+01, 0.6271346477544e+01, - 0.3932405074189e-08, 0.5570681040569e+01, 0.2139354194808e+02, - 0.3631322501141e-08, 0.1981240601160e+01, 0.6294805223347e+01, - 0.4130007425139e-08, 0.2050060880201e+01, 0.2195415756911e+02, - 0.4433905965176e-08, 0.3277477970321e+01, 0.7445550607224e+01, - - 0.3851814176947e-08, 0.5210690074886e+01, 0.9562891316684e+00, - 0.3485807052785e-08, 0.6653274904611e+00, 0.1161697602389e+02, - 0.3979772816991e-08, 0.1767941436148e+01, 0.2277943724828e+02, - 0.3402607460500e-08, 0.3421746306465e+01, 0.1087398597200e+02, - 0.4049993000926e-08, 0.1127144787547e+01, 0.3163918923335e+00, - 0.3420511182382e-08, 0.4214794779161e+01, 0.1362553364512e+02, - 0.3640772365012e-08, 0.5324905497687e+01, 0.1725304118033e+02, - 0.3323037987501e-08, 0.6135761838271e+01, 0.6279143387820e+01, - 0.4503141663637e-08, 0.1802305450666e+01, 0.1385561574497e+01, - 0.4314560055588e-08, 0.4812299731574e+01, 0.4176041334900e+01, - - 0.3294226949110e-08, 0.3657547059723e+01, 0.6287008313071e+01, - 0.3215657197281e-08, 0.4866676894425e+01, 0.5749861718712e+01, - 0.4129362656266e-08, 0.3809342558906e+01, 0.5905702259363e+01, - 0.3137762976388e-08, 0.2494635174443e+01, 0.2099539292909e+02, - 0.3514010952384e-08, 0.2699961831678e+01, 0.7335344340001e+01, - 0.3327607571530e-08, 0.3318457714816e+01, 0.5436992986000e+01, - 0.3541066946675e-08, 0.4382703582466e+01, 0.1234573916645e+02, - 0.3216179847052e-08, 0.5271066317054e+01, 0.3802769619140e-01, - 0.2959045059570e-08, 0.5819591585302e+01, 0.2670964694522e+02, - 0.3884040326665e-08, 0.5980934960428e+01, 0.6660449441528e+01, - - 0.2922027539886e-08, 0.3337290282483e+01, 0.1375773836557e+01, - 0.4110846382042e-08, 0.5742978187327e+01, 0.4480965020977e+02, - 0.2934508411032e-08, 0.2278075804200e+01, 0.6408777551755e+00, - 0.3966896193000e-08, 0.5835747858477e+01, 0.3773735910827e+00, - 0.3286695827610e-08, 0.5838898193902e+01, 0.3932462625300e-02, - 0.3720643094196e-08, 0.1122212337858e+01, 0.1646033343740e+02, - 0.3285508906174e-08, 0.9182250996416e+00, 0.1081813534213e+02, - 0.3753880575973e-08, 0.5174761973266e+01, 0.5642198095270e+01, - 0.3022129385587e-08, 0.3381611020639e+01, 0.2982630633589e+02, - 0.2798569205621e-08, 0.3546193723922e+01, 0.1937891852345e+02, - - 0.3397872070505e-08, 0.4533203197934e+01, 0.6923953605621e+01, - 0.3708099772977e-08, 0.2756168198616e+01, 0.3066615496545e+02, - 0.3599283541510e-08, 0.1934395469918e+01, 0.6147450479709e+01, - 0.3688702753059e-08, 0.7149920971109e+00, 0.2636725487657e+01, - 0.2681084724003e-08, 0.4899819493154e+01, 0.6816289982179e+01, - 0.3495993460759e-08, 0.1572418915115e+01, 0.6418701221183e+01, - 0.3130770324995e-08, 0.8912190180489e+00, 0.1235996607578e+02, - 0.2744353821941e-08, 0.3800821940055e+01, 0.2059724391010e+02, - 0.2842732906341e-08, 0.2644717440029e+01, 0.2828699048865e+02, - 0.3046882682154e-08, 0.3987793020179e+01, 0.6055599646783e+01, - - 0.2399072455143e-08, 0.9908826440764e+00, 0.6255674361143e+01, - 0.2384306274204e-08, 0.2516149752220e+01, 0.6310477339748e+01, - 0.2977324500559e-08, 0.5849195642118e+01, 0.1652265972112e+02, - 0.3062835258972e-08, 0.1681660100162e+01, 0.1172006883645e+02, - 0.3109682589231e-08, 0.5804143987737e+00, 0.2751146787858e+02, - 0.2903920355299e-08, 0.5800768280123e+01, 0.6510552054109e+01, - 0.2823221989212e-08, 0.9241118370216e+00, 0.5469525544182e+01, - 0.3187949696649e-08, 0.3139776445735e+01, 0.1693792562116e+03, - 0.2922559771655e-08, 0.3549440782984e+01, 0.2630839062450e+00, - 0.2436302066603e-08, 0.4735540696319e+01, 0.3946258593675e+00, - - 0.3049473043606e-08, 0.4998289124561e+01, 0.8390110365991e+01, - 0.2863682575784e-08, 0.6709515671102e+00, 0.2243449970715e+00, - 0.2641750517966e-08, 0.5410978257284e+01, 0.2986433403208e+02, - 0.2704093466243e-08, 0.4778317207821e+01, 0.6129297044991e+01, - 0.2445522177011e-08, 0.6009020662222e+01, 0.1171295538178e+02, - 0.2623608810230e-08, 0.5010449777147e+01, 0.6436854655901e+01, - 0.2079259704053e-08, 0.5980943768809e+01, 0.2019909489111e+02, - 0.2820225596771e-08, 0.2679965110468e+01, 0.5934151399930e+01, - 0.2365221950927e-08, 0.1894231148810e+01, 0.2470570524223e+02, - 0.2359682077149e-08, 0.4220752950780e+01, 0.8671969964381e+01, - - 0.2387577137206e-08, 0.2571783940617e+01, 0.7096626156709e+01, - 0.1982102089816e-08, 0.5169765997119e+00, 0.1727188400790e+02, - 0.2687502389925e-08, 0.6239078264579e+01, 0.7075506709219e+02, - 0.2207751669135e-08, 0.2031184412677e+01, 0.4377611041777e+01, - 0.2618370214274e-08, 0.8266079985979e+00, 0.6632000300961e+01, - 0.2591951887361e-08, 0.8819350522008e+00, 0.4873985990671e+02, - 0.2375055656248e-08, 0.3520944177789e+01, 0.1590676413561e+02, - 0.2472019978911e-08, 0.1551431908671e+01, 0.6612329252343e+00, - 0.2368157127199e-08, 0.4178610147412e+01, 0.3459636466239e+02, - 0.1764846605693e-08, 0.1506764000157e+01, 0.1980094587212e+02, - - 0.2291769608798e-08, 0.2118250611782e+01, 0.2844914056730e-01, - 0.2209997316943e-08, 0.3363255261678e+01, 0.2666070658668e+00, - 0.2292699097923e-08, 0.4200423956460e+00, 0.1484170571900e-02, - 0.1629683015329e-08, 0.2331362582487e+01, 0.3035599730800e+02, - 0.2206492862426e-08, 0.3400274026992e+01, 0.6281667977667e+01, - 0.2205746568257e-08, 0.1066051230724e+00, 0.6284483723224e+01, - 0.2026310767991e-08, 0.2779066487979e+01, 0.2449240616245e+02, - 0.1762977622163e-08, 0.9951450691840e+00, 0.2045286941806e+02, - 0.1368535049606e-08, 0.6402447365817e+00, 0.2473415438279e+02, - 0.1720598775450e-08, 0.2303524214705e+00, 0.1679593901136e+03, - - 0.1702429015449e-08, 0.6164622655048e+01, 0.3338575901272e+03, - 0.1414033197685e-08, 0.3954561185580e+01, 0.1624205518357e+03, - 0.1573768958043e-08, 0.2028286308984e+01, 0.3144167757552e+02, - 0.1650705184447e-08, 0.2304040666128e+01, 0.5267006960365e+02, - 0.1651087618855e-08, 0.2538461057280e+01, 0.8956999012000e+02, - 0.1616409518983e-08, 0.5111054348152e+01, 0.3332657872986e+02, - 0.1537175173581e-08, 0.5601130666603e+01, 0.3852657435933e+02, - 0.1593191980553e-08, 0.2614340453411e+01, 0.2282781046519e+03, - 0.1499480170643e-08, 0.3624721577264e+01, 0.2823723341956e+02, - 0.1493807843235e-08, 0.4214569879008e+01, 0.2876692439167e+02, - - 0.1074571199328e-08, 0.1496911744704e+00, 0.8397383534231e+02, - 0.1074406983417e-08, 0.1187817671922e+01, 0.8401985929482e+02, - 0.9757576855851e-09, 0.2655703035858e+01, 0.7826370942180e+02, - 0.1258432887565e-08, 0.4969896184844e+01, 0.3115650189215e+03, - 0.1240336343282e-08, 0.5192460776926e+01, 0.1784300471910e+03, - 0.9016107005164e-09, 0.1960356923057e+01, 0.5886454391678e+02, - 0.1135392360918e-08, 0.5082427809068e+01, 0.7842370451713e+02, - 0.9216046089565e-09, 0.2793775037273e+01, 0.1014262087719e+03, - 0.1061276615030e-08, 0.3726144311409e+01, 0.5660027930059e+02, - 0.1010110596263e-08, 0.7404080708937e+00, 0.4245678405627e+02, - - 0.7217424756199e-09, 0.2697449980577e-01, 0.2457074661053e+03, - 0.6912003846756e-09, 0.4253296276335e+01, 0.1679936946371e+03, - 0.6871814664847e-09, 0.5148072412354e+01, 0.6053048899753e+02, - 0.4887158016343e-09, 0.2153581148294e+01, 0.9656299901946e+02, - 0.5161802866314e-09, 0.3852750634351e+01, 0.2442876000072e+03, - 0.5652599559057e-09, 0.1233233356270e+01, 0.8365903305582e+02, - 0.4710812608586e-09, 0.5610486976767e+01, 0.3164282286739e+03, - 0.4909977500324e-09, 0.1639629524123e+01, 0.4059982187939e+03, - 0.4772641839378e-09, 0.3737100368583e+01, 0.1805255418145e+03, - 0.4487562567153e-09, 0.1158417054478e+00, 0.8433466158131e+02, - - 0.3943441230497e-09, 0.6243502862796e+00, 0.2568537517081e+03, - 0.3952236913598e-09, 0.3510377382385e+01, 0.2449975330562e+03, - 0.3788898363417e-09, 0.5916128302299e+01, 0.1568131045107e+03, - 0.3738329328831e-09, 0.1042266763456e+01, 0.3948519331910e+03, - 0.2451199165151e-09, 0.1166788435700e+01, 0.1435713242844e+03, - 0.2436734402904e-09, 0.3254726114901e+01, 0.2268582385539e+03, - 0.2213605274325e-09, 0.1687210598530e+01, 0.1658638954901e+03, - 0.1491521204829e-09, 0.2657541786794e+01, 0.2219950288015e+03, - 0.1474995329744e-09, 0.5013089805819e+01, 0.3052819430710e+03, - 0.1661939475656e-09, 0.5495315428418e+01, 0.2526661704812e+03, - - 0.9015946748003e-10, 0.2236989966505e+01, 0.4171445043968e+03} - - /* Sun-to-Earth, T^0, Z */ - e0z := []float64{ - 0.2796207639075e-05, 0.3198701560209e+01, 0.8433466158131e+02, - 0.1016042198142e-05, 0.5422360395913e+01, 0.5507553240374e+01, - 0.8044305033647e-06, 0.3880222866652e+01, 0.5223693906222e+01, - 0.4385347909274e-06, 0.3704369937468e+01, 0.2352866153506e+01, - 0.3186156414906e-06, 0.3999639363235e+01, 0.1577343543434e+01, - 0.2272412285792e-06, 0.3984738315952e+01, 0.1047747311755e+01, - 0.1645620103007e-06, 0.3565412516841e+01, 0.5856477690889e+01, - 0.1815836921166e-06, 0.4984507059020e+01, 0.6283075850446e+01, - 0.1447461676364e-06, 0.3702753570108e+01, 0.9437762937313e+01, - 0.1430760876382e-06, 0.3409658712357e+01, 0.1021328554739e+02, - - 0.1120445753226e-06, 0.4829561570246e+01, 0.1414349524433e+02, - 0.1090232840797e-06, 0.2080729178066e+01, 0.6812766822558e+01, - 0.9715727346551e-07, 0.3476295881948e+01, 0.4694002934110e+01, - 0.1036267136217e-06, 0.4056639536648e+01, 0.7109288135493e+02, - 0.8752665271340e-07, 0.4448159519911e+01, 0.5753384878334e+01, - 0.8331864956004e-07, 0.4991704044208e+01, 0.7084896783808e+01, - 0.6901658670245e-07, 0.4325358994219e+01, 0.6275962395778e+01, - 0.9144536848998e-07, 0.1141826375363e+01, 0.6620890113188e+01, - 0.7205085037435e-07, 0.3624344170143e+01, 0.5296909721118e+00, - 0.7697874654176e-07, 0.5554257458998e+01, 0.1676215758509e+03, - - 0.5197545738384e-07, 0.6251760961735e+01, 0.1807370494127e+02, - 0.5031345378608e-07, 0.2497341091913e+01, 0.4705732307012e+01, - 0.4527110205840e-07, 0.2335079920992e+01, 0.6309374173736e+01, - 0.4753355798089e-07, 0.7094148987474e+00, 0.5884926831456e+01, - 0.4296951977516e-07, 0.1101916352091e+01, 0.6681224869435e+01, - 0.3855341568387e-07, 0.1825495405486e+01, 0.5486777812467e+01, - 0.5253930970990e-07, 0.4424740687208e+01, 0.7860419393880e+01, - 0.4024630496471e-07, 0.5120498157053e+01, 0.1336797263425e+02, - 0.4061069791453e-07, 0.6029771435451e+01, 0.3930209696940e+01, - 0.3797883804205e-07, 0.4435193600836e+00, 0.3154687086868e+01, - - 0.2933033225587e-07, 0.5124157356507e+01, 0.1059381944224e+01, - 0.3503000930426e-07, 0.5421830162065e+01, 0.6069776770667e+01, - 0.3670096214050e-07, 0.4582101667297e+01, 0.1219403291462e+02, - 0.2905609437008e-07, 0.1926566420072e+01, 0.1097707878456e+02, - 0.2466827821713e-07, 0.6090174539834e+00, 0.6496374930224e+01, - 0.2691647295332e-07, 0.1393432595077e+01, 0.2200391463820e+02, - 0.2150554667946e-07, 0.4308671715951e+01, 0.5643178611111e+01, - 0.2237481922680e-07, 0.8133968269414e+00, 0.8635942003952e+01, - 0.1817741038157e-07, 0.3755205127454e+01, 0.3340612434717e+01, - 0.2227820762132e-07, 0.2759558596664e+01, 0.1203646072878e+02, - - 0.1944713772307e-07, 0.5699645869121e+01, 0.1179062909082e+02, - 0.1527340520662e-07, 0.1986749091746e+01, 0.3981490189893e+00, - 0.1577282574914e-07, 0.3205017217983e+01, 0.5088628793478e+01, - 0.1424738825424e-07, 0.6256747903666e+01, 0.2544314396739e+01, - 0.1616563121701e-07, 0.2601671259394e+00, 0.1729818233119e+02, - 0.1401210391692e-07, 0.4686939173506e+01, 0.7058598460518e+01, - 0.1488726974214e-07, 0.2815862451372e+01, 0.2593412433514e+02, - 0.1692626442388e-07, 0.4956894109797e+01, 0.1564752902480e+03, - 0.1123571582910e-07, 0.2381192697696e+01, 0.3738761453707e+01, - 0.9903308606317e-08, 0.4294851657684e+01, 0.9225539266174e+01, - - 0.9174533187191e-08, 0.3075171510642e+01, 0.4164311961999e+01, - 0.8645985631457e-08, 0.5477534821633e+00, 0.8429241228195e+01, - -0.1085876492688e-07, 0.0000000000000e+00, 0.0000000000000e+00, - 0.9264309077815e-08, 0.5968571670097e+01, 0.7079373888424e+01, - 0.8243116984954e-08, 0.1489098777643e+01, 0.1044738781244e+02, - 0.8268102113708e-08, 0.3512977691983e+01, 0.1150676975667e+02, - 0.9043613988227e-08, 0.1290704408221e+00, 0.1101510648075e+02, - 0.7432912038789e-08, 0.1991086893337e+01, 0.2608790314060e+02, - 0.8586233727285e-08, 0.4238357924414e+01, 0.2986433403208e+02, - 0.7612230060131e-08, 0.2911090150166e+01, 0.4732030630302e+01, - - 0.7097787751408e-08, 0.1908938392390e+01, 0.8031092209206e+01, - 0.7640237040175e-08, 0.6129219000168e+00, 0.7962980379786e+00, - 0.7070445688081e-08, 0.1380417036651e+01, 0.2146165377750e+01, - 0.7690770957702e-08, 0.1680504249084e+01, 0.2122839202813e+02, - 0.8051292542594e-08, 0.5127423484511e+01, 0.2942463415728e+01, - 0.5902709104515e-08, 0.2020274190917e+01, 0.7755226100720e+00, - 0.5134567496462e-08, 0.2606778676418e+01, 0.1256615170089e+02, - 0.5525802046102e-08, 0.1613011769663e+01, 0.8018209333619e+00, - 0.5880724784221e-08, 0.4604483417236e+01, 0.4690479774488e+01, - 0.5211699081370e-08, 0.5718964114193e+01, 0.8827390247185e+01, - - 0.4891849573562e-08, 0.3689658932196e+01, 0.2132990797783e+00, - 0.5150246069997e-08, 0.4099769855122e+01, 0.6480980550449e+02, - 0.5102434319633e-08, 0.5660834602509e+01, 0.3379454372902e+02, - 0.5083405254252e-08, 0.9842221218974e+00, 0.4136910472696e+01, - 0.4206562585682e-08, 0.1341363634163e+00, 0.3128388763578e+01, - 0.4663249683579e-08, 0.8130132735866e+00, 0.5216580451554e+01, - 0.4099474416530e-08, 0.5791497770644e+01, 0.4265981595566e+00, - 0.4628251220767e-08, 0.1249802769331e+01, 0.1572083878776e+02, - 0.5024068728142e-08, 0.4795684802743e+01, 0.6290189305114e+01, - 0.5120234327758e-08, 0.3810420387208e+01, 0.5230807360890e+01, - - 0.5524029815280e-08, 0.1029264714351e+01, 0.2397622045175e+03, - 0.4757415718860e-08, 0.3528044781779e+01, 0.1649636139783e+02, - 0.3915786131127e-08, 0.5593889282646e+01, 0.1589072916335e+01, - 0.4869053149991e-08, 0.3299636454433e+01, 0.7632943190217e+01, - 0.3649365703729e-08, 0.1286049002584e+01, 0.6206810014183e+01, - 0.3992493949002e-08, 0.3100307589464e+01, 0.2515860172507e+02, - 0.3320247477418e-08, 0.6212683940807e+01, 0.1216800268190e+02, - 0.3287123739696e-08, 0.4699118445928e+01, 0.7234794171227e+01, - 0.3472776811103e-08, 0.2630507142004e+01, 0.7342457794669e+01, - 0.3423253294767e-08, 0.2946432844305e+01, 0.9623688285163e+01, - - 0.3896173898244e-08, 0.1224834179264e+01, 0.6438496133249e+01, - 0.3388455337924e-08, 0.1543807616351e+01, 0.1494531617769e+02, - 0.3062704716523e-08, 0.1191777572310e+01, 0.8662240327241e+01, - 0.3270075600400e-08, 0.5483498767737e+01, 0.1194447056968e+01, - 0.3101209215259e-08, 0.8000833804348e+00, 0.3772475342596e+02, - 0.2780883347311e-08, 0.4077980721888e+00, 0.5863591145557e+01, - 0.2903605931824e-08, 0.2617490302147e+01, 0.1965104848470e+02, - 0.2682014743119e-08, 0.2634703158290e+01, 0.7238675589263e+01, - 0.2534360108492e-08, 0.6102446114873e+01, 0.6836645152238e+01, - 0.2392564882509e-08, 0.3681820208691e+01, 0.5849364236221e+01, - - 0.2656667254856e-08, 0.6216045388886e+01, 0.6133512519065e+01, - 0.2331242096773e-08, 0.5864949777744e+01, 0.4535059491685e+01, - 0.2287898363668e-08, 0.4566628532802e+01, 0.7477522907414e+01, - 0.2336944521306e-08, 0.2442722126930e+01, 0.1137170464392e+02, - 0.3156632236269e-08, 0.1626628050682e+01, 0.2509084901204e+03, - 0.2982612402766e-08, 0.2803604512609e+01, 0.1748016358760e+01, - 0.2774031674807e-08, 0.4654002897158e+01, 0.8223916695780e+02, - 0.2295236548638e-08, 0.4326518333253e+01, 0.3378142627421e+00, - 0.2190714699873e-08, 0.4519614578328e+01, 0.2908881142201e+02, - 0.2191495845045e-08, 0.3012626912549e+01, 0.1673046366289e+02, - - 0.2492901628386e-08, 0.1290101424052e+00, 0.1543797956245e+03, - 0.1993778064319e-08, 0.3864046799414e+01, 0.1778984560711e+02, - 0.1898146479022e-08, 0.5053777235891e+01, 0.2042657109477e+02, - 0.1918280127634e-08, 0.2222470192548e+01, 0.4165496312290e+02, - 0.1916351061607e-08, 0.8719067257774e+00, 0.7737595720538e+02, - 0.1834720181466e-08, 0.4031491098040e+01, 0.2358125818164e+02, - 0.1249201523806e-08, 0.5938379466835e+01, 0.3301902111895e+02, - 0.1477304050539e-08, 0.6544722606797e+00, 0.9548094718417e+02, - 0.1264316431249e-08, 0.2059072853236e+01, 0.8399684731857e+02, - 0.1203526495039e-08, 0.3644813532605e+01, 0.4558517281984e+02, - - 0.9221681059831e-09, 0.3241815055602e+01, 0.7805158573086e+02, - 0.7849278367646e-09, 0.5043812342457e+01, 0.5217580628120e+02, - 0.7983392077387e-09, 0.5000024502753e+01, 0.1501922143975e+03, - 0.7925395431654e-09, 0.1398734871821e-01, 0.9061773743175e+02, - 0.7640473285886e-09, 0.5067111723130e+01, 0.4951538251678e+02, - 0.5398937754482e-09, 0.5597382200075e+01, 0.1613385000004e+03, - 0.5626247550193e-09, 0.2601338209422e+01, 0.7318837597844e+02, - 0.5525197197855e-09, 0.5814832109256e+01, 0.1432335100216e+03, - 0.5407629837898e-09, 0.3384820609076e+01, 0.3230491187871e+03, - 0.3856739119801e-09, 0.1072391840473e+01, 0.2334791286671e+03, - - 0.3856425239987e-09, 0.2369540393327e+01, 0.1739046517013e+03, - 0.4350867755983e-09, 0.5255575751082e+01, 0.1620484330494e+03, - 0.3844113924996e-09, 0.5482356246182e+01, 0.9757644180768e+02, - 0.2854869155431e-09, 0.9573634763143e+00, 0.1697170704744e+03, - 0.1719227671416e-09, 0.1887203025202e+01, 0.2265204242912e+03, - 0.1527846879755e-09, 0.3982183931157e+01, 0.3341954043900e+03, - 0.1128229264847e-09, 0.2787457156298e+01, 0.3119028331842e+03} - - /* Sun-to-Earth, T^1, X */ - e1x := []float64{ - 0.1234046326004e-05, 0.0000000000000e+00, 0.0000000000000e+00, - 0.5150068824701e-06, 0.6002664557501e+01, 0.1256615170089e+02, - 0.1290743923245e-07, 0.5959437664199e+01, 0.1884922755134e+02, - 0.1068615564952e-07, 0.2015529654209e+01, 0.6283075850446e+01, - 0.2079619142538e-08, 0.1732960531432e+01, 0.6279552690824e+01, - 0.2078009243969e-08, 0.4915604476996e+01, 0.6286599010068e+01, - 0.6206330058856e-09, 0.3616457953824e+00, 0.4705732307012e+01, - 0.5989335313746e-09, 0.3802607304474e+01, 0.6256777527156e+01, - 0.5958495663840e-09, 0.2845866560031e+01, 0.6309374173736e+01, - 0.4866923261539e-09, 0.5213203771824e+01, 0.7755226100720e+00, - - 0.4267785823142e-09, 0.4368189727818e+00, 0.1059381944224e+01, - 0.4610675141648e-09, 0.1837249181372e-01, 0.7860419393880e+01, - 0.3626989993973e-09, 0.2161590545326e+01, 0.5753384878334e+01, - 0.3563071194389e-09, 0.1452631954746e+01, 0.5884926831456e+01, - 0.3557015642807e-09, 0.4470593393054e+01, 0.6812766822558e+01, - 0.3210412089122e-09, 0.5195926078314e+01, 0.6681224869435e+01, - 0.2875473577986e-09, 0.5916256610193e+01, 0.2513230340178e+02, - 0.2842913681629e-09, 0.1149902426047e+01, 0.6127655567643e+01, - 0.2751248215916e-09, 0.5502088574662e+01, 0.6438496133249e+01, - 0.2481432881127e-09, 0.2921989846637e+01, 0.5486777812467e+01, - - 0.2059885976560e-09, 0.3718070376585e+01, 0.7079373888424e+01, - 0.2015522342591e-09, 0.5979395259740e+01, 0.6290189305114e+01, - 0.1995364084253e-09, 0.6772087985494e+00, 0.6275962395778e+01, - 0.1957436436943e-09, 0.2899210654665e+01, 0.5507553240374e+01, - 0.1651609818948e-09, 0.6228206482192e+01, 0.1150676975667e+02, - 0.1822980550699e-09, 0.1469348746179e+01, 0.1179062909082e+02, - 0.1675223159760e-09, 0.3813910555688e+01, 0.7058598460518e+01, - 0.1706491764745e-09, 0.3004380506684e+00, 0.7113454667900e-02, - 0.1392952362615e-09, 0.1440393973406e+01, 0.7962980379786e+00, - 0.1209868266342e-09, 0.4150425791727e+01, 0.4694002934110e+01, - - 0.1009827202611e-09, 0.3290040429843e+01, 0.3738761453707e+01, - 0.1047261388602e-09, 0.4229590090227e+01, 0.6282095334605e+01, - 0.1047006652004e-09, 0.2418967680575e+01, 0.6284056366286e+01, - 0.9609993143095e-10, 0.4627943659201e+01, 0.6069776770667e+01, - 0.9590900593873e-10, 0.1894393939924e+01, 0.4136910472696e+01, - 0.9146249188071e-10, 0.2010647519562e+01, 0.6496374930224e+01, - 0.8545274480290e-10, 0.5529846956226e-01, 0.1194447056968e+01, - 0.8224377881194e-10, 0.1254304102174e+01, 0.1589072916335e+01, - 0.6183529510410e-10, 0.3360862168815e+01, 0.8827390247185e+01, - 0.6259255147141e-10, 0.4755628243179e+01, 0.8429241228195e+01, - - 0.5539291694151e-10, 0.5371746955142e+01, 0.4933208510675e+01, - 0.7328259466314e-10, 0.4927699613906e+00, 0.4535059491685e+01, - 0.6017835843560e-10, 0.5776682001734e-01, 0.1255903824622e+02, - 0.7079827775243e-10, 0.4395059432251e+01, 0.5088628793478e+01, - 0.5170358878213e-10, 0.5154062619954e+01, 0.1176985366291e+02, - 0.4872301838682e-10, 0.6289611648973e+00, 0.6040347114260e+01, - 0.5249869411058e-10, 0.5617272046949e+01, 0.3154687086868e+01, - 0.4716172354411e-10, 0.3965901800877e+01, 0.5331357529664e+01, - 0.4871214940964e-10, 0.4627507050093e+01, 0.1256967486051e+02, - 0.4598076850751e-10, 0.6023631226459e+01, 0.6525804586632e+01, - - 0.4562196089485e-10, 0.4138562084068e+01, 0.3930209696940e+01, - 0.4325493872224e-10, 0.1330845906564e+01, 0.7632943190217e+01, - 0.5673781176748e-10, 0.2558752615657e+01, 0.5729506548653e+01, - 0.3961436642503e-10, 0.2728071734630e+01, 0.7234794171227e+01, - 0.5101868209058e-10, 0.4113444965144e+01, 0.6836645152238e+01, - 0.5257043167676e-10, 0.6195089830590e+01, 0.8031092209206e+01, - 0.5076613989393e-10, 0.2305124132918e+01, 0.7477522907414e+01, - 0.3342169352778e-10, 0.5415998155071e+01, 0.1097707878456e+02, - 0.3545881983591e-10, 0.3727160564574e+01, 0.4164311961999e+01, - 0.3364063738599e-10, 0.2901121049204e+00, 0.1137170464392e+02, - - 0.3357039670776e-10, 0.1652229354331e+01, 0.5223693906222e+01, - 0.4307412268687e-10, 0.4938909587445e+01, 0.1592596075957e+01, - 0.3405769115435e-10, 0.2408890766511e+01, 0.3128388763578e+01, - 0.3001926198480e-10, 0.4862239006386e+01, 0.1748016358760e+01, - 0.2778264787325e-10, 0.5241168661353e+01, 0.7342457794669e+01, - 0.2676159480666e-10, 0.3423593942199e+01, 0.2146165377750e+01, - 0.2954273399939e-10, 0.1881721265406e+01, 0.5368044267797e+00, - 0.3309362888795e-10, 0.1931525677349e+01, 0.8018209333619e+00, - 0.2810283608438e-10, 0.2414659495050e+01, 0.5225775174439e+00, - 0.3378045637764e-10, 0.4238019163430e+01, 0.1554202828031e+00, - - 0.2558134979840e-10, 0.1828225235805e+01, 0.5230807360890e+01, - 0.2273755578447e-10, 0.5858184283998e+01, 0.7084896783808e+01, - 0.2294176037690e-10, 0.4514589779057e+01, 0.1726015463500e+02, - 0.2533506099435e-10, 0.2355717851551e+01, 0.5216580451554e+01, - 0.2716685375812e-10, 0.2221003625100e+01, 0.8635942003952e+01, - 0.2419043435198e-10, 0.5955704951635e+01, 0.4690479774488e+01, - 0.2521232544812e-10, 0.1395676848521e+01, 0.5481254917084e+01, - 0.2630195021491e-10, 0.5727468918743e+01, 0.2629832328990e-01, - 0.2548395840944e-10, 0.2628351859400e-03, 0.1349867339771e+01} - - /* Sun-to-Earth, T^1, Y */ - e1y := []float64{ - 0.9304690546528e-06, 0.0000000000000e+00, 0.0000000000000e+00, - 0.5150715570663e-06, 0.4431807116294e+01, 0.1256615170089e+02, - 0.1290825411056e-07, 0.4388610039678e+01, 0.1884922755134e+02, - 0.4645466665386e-08, 0.5827263376034e+01, 0.6283075850446e+01, - 0.2079625310718e-08, 0.1621698662282e+00, 0.6279552690824e+01, - 0.2078189850907e-08, 0.3344713435140e+01, 0.6286599010068e+01, - 0.6207190138027e-09, 0.5074049319576e+01, 0.4705732307012e+01, - 0.5989826532569e-09, 0.2231842216620e+01, 0.6256777527156e+01, - 0.5961360812618e-09, 0.1274975769045e+01, 0.6309374173736e+01, - 0.4874165471016e-09, 0.3642277426779e+01, 0.7755226100720e+00, - - 0.4283834034360e-09, 0.5148765510106e+01, 0.1059381944224e+01, - 0.4652389287529e-09, 0.4715794792175e+01, 0.7860419393880e+01, - 0.3751707476401e-09, 0.6617207370325e+00, 0.5753384878334e+01, - 0.3559998806198e-09, 0.6155548875404e+01, 0.5884926831456e+01, - 0.3558447558857e-09, 0.2898827297664e+01, 0.6812766822558e+01, - 0.3211116927106e-09, 0.3625813502509e+01, 0.6681224869435e+01, - 0.2875609914672e-09, 0.4345435813134e+01, 0.2513230340178e+02, - 0.2843109704069e-09, 0.5862263940038e+01, 0.6127655567643e+01, - 0.2744676468427e-09, 0.3926419475089e+01, 0.6438496133249e+01, - 0.2481285237789e-09, 0.1351976572828e+01, 0.5486777812467e+01, - - 0.2060338481033e-09, 0.2147556998591e+01, 0.7079373888424e+01, - 0.2015822358331e-09, 0.4408358972216e+01, 0.6290189305114e+01, - 0.2001195944195e-09, 0.5385829822531e+01, 0.6275962395778e+01, - 0.1953667642377e-09, 0.1304933746120e+01, 0.5507553240374e+01, - 0.1839744078713e-09, 0.6173567228835e+01, 0.1179062909082e+02, - 0.1643334294845e-09, 0.4635942997523e+01, 0.1150676975667e+02, - 0.1768051018652e-09, 0.5086283558874e+01, 0.7113454667900e-02, - 0.1674874205489e-09, 0.2243332137241e+01, 0.7058598460518e+01, - 0.1421445397609e-09, 0.6186899771515e+01, 0.7962980379786e+00, - 0.1255163958267e-09, 0.5730238465658e+01, 0.4694002934110e+01, - - 0.1013945281961e-09, 0.1726055228402e+01, 0.3738761453707e+01, - 0.1047294335852e-09, 0.2658801228129e+01, 0.6282095334605e+01, - 0.1047103879392e-09, 0.8481047835035e+00, 0.6284056366286e+01, - 0.9530343962826e-10, 0.3079267149859e+01, 0.6069776770667e+01, - 0.9604637611690e-10, 0.3258679792918e+00, 0.4136910472696e+01, - 0.9153518537177e-10, 0.4398599886584e+00, 0.6496374930224e+01, - 0.8562458214922e-10, 0.4772686794145e+01, 0.1194447056968e+01, - 0.8232525360654e-10, 0.5966220721679e+01, 0.1589072916335e+01, - 0.6150223411438e-10, 0.1780985591923e+01, 0.8827390247185e+01, - 0.6272087858000e-10, 0.3184305429012e+01, 0.8429241228195e+01, - - 0.5540476311040e-10, 0.3801260595433e+01, 0.4933208510675e+01, - 0.7331901699361e-10, 0.5205948591865e+01, 0.4535059491685e+01, - 0.6018528702791e-10, 0.4770139083623e+01, 0.1255903824622e+02, - 0.5150530724804e-10, 0.3574796899585e+01, 0.1176985366291e+02, - 0.6471933741811e-10, 0.2679787266521e+01, 0.5088628793478e+01, - 0.5317460644174e-10, 0.9528763345494e+00, 0.3154687086868e+01, - 0.4832187748783e-10, 0.5329322498232e+01, 0.6040347114260e+01, - 0.4716763555110e-10, 0.2395235316466e+01, 0.5331357529664e+01, - 0.4871509139861e-10, 0.3056663648823e+01, 0.1256967486051e+02, - 0.4598417696768e-10, 0.4452762609019e+01, 0.6525804586632e+01, - - 0.5674189533175e-10, 0.9879680872193e+00, 0.5729506548653e+01, - 0.4073560328195e-10, 0.5939127696986e+01, 0.7632943190217e+01, - 0.5040994945359e-10, 0.4549875824510e+01, 0.8031092209206e+01, - 0.5078185134679e-10, 0.7346659893982e+00, 0.7477522907414e+01, - 0.3769343537061e-10, 0.1071317188367e+01, 0.7234794171227e+01, - 0.4980331365299e-10, 0.2500345341784e+01, 0.6836645152238e+01, - 0.3458236594757e-10, 0.3825159450711e+01, 0.1097707878456e+02, - 0.3578859493602e-10, 0.5299664791549e+01, 0.4164311961999e+01, - 0.3370504646419e-10, 0.5002316301593e+01, 0.1137170464392e+02, - 0.3299873338428e-10, 0.2526123275282e+01, 0.3930209696940e+01, - - 0.4304917318409e-10, 0.3368078557132e+01, 0.1592596075957e+01, - 0.3402418753455e-10, 0.8385495425800e+00, 0.3128388763578e+01, - 0.2778460572146e-10, 0.3669905203240e+01, 0.7342457794669e+01, - 0.2782710128902e-10, 0.2691664812170e+00, 0.1748016358760e+01, - 0.2711725179646e-10, 0.4707487217718e+01, 0.5296909721118e+00, - 0.2981760946340e-10, 0.3190260867816e+00, 0.5368044267797e+00, - 0.2811672977772e-10, 0.3196532315372e+01, 0.7084896783808e+01, - 0.2863454474467e-10, 0.2263240324780e+00, 0.5223693906222e+01, - 0.3333464634051e-10, 0.3498451685065e+01, 0.8018209333619e+00, - 0.3312991747609e-10, 0.5839154477412e+01, 0.1554202828031e+00, - - 0.2813255564006e-10, 0.8268044346621e+00, 0.5225775174439e+00, - 0.2665098083966e-10, 0.3934021725360e+01, 0.5216580451554e+01, - 0.2349795705216e-10, 0.5197620913779e+01, 0.2146165377750e+01, - 0.2330352293961e-10, 0.2984999231807e+01, 0.1726015463500e+02, - 0.2728001683419e-10, 0.6521679638544e+00, 0.8635942003952e+01, - 0.2484061007669e-10, 0.3468955561097e+01, 0.5230807360890e+01, - 0.2646328768427e-10, 0.1013724533516e+01, 0.2629832328990e-01, - 0.2518630264831e-10, 0.6108081057122e+01, 0.5481254917084e+01, - 0.2421901455384e-10, 0.1651097776260e+01, 0.1349867339771e+01, - 0.6348533267831e-11, 0.3220226560321e+01, 0.8433466158131e+02} - - /* Sun-to-Earth, T^1, Z */ - e1z := []float64{ - 0.2278290449966e-05, 0.3413716033863e+01, 0.6283075850446e+01, - 0.5429458209830e-07, 0.0000000000000e+00, 0.0000000000000e+00, - 0.1903240492525e-07, 0.3370592358297e+01, 0.1256615170089e+02, - 0.2385409276743e-09, 0.3327914718416e+01, 0.1884922755134e+02, - 0.8676928342573e-10, 0.1824006811264e+01, 0.5223693906222e+01, - 0.7765442593544e-10, 0.3888564279247e+01, 0.5507553240374e+01, - 0.7066158332715e-10, 0.5194267231944e+01, 0.2352866153506e+01, - 0.7092175288657e-10, 0.2333246960021e+01, 0.8399684731857e+02, - 0.5357582213535e-10, 0.2224031176619e+01, 0.5296909721118e+00, - 0.3828035865021e-10, 0.2156710933584e+01, 0.6279552690824e+01, - - 0.3824857220427e-10, 0.1529755219915e+01, 0.6286599010068e+01, - 0.3286995181628e-10, 0.4879512900483e+01, 0.1021328554739e+02} - - /* Sun-to-Earth, T^2, X */ - e2x := []float64{ - -0.4143818297913e-10, 0.0000000000000e+00, 0.0000000000000e+00, - 0.2171497694435e-10, 0.4398225628264e+01, 0.1256615170089e+02, - 0.9845398442516e-11, 0.2079720838384e+00, 0.6283075850446e+01, - 0.9256833552682e-12, 0.4191264694361e+01, 0.1884922755134e+02, - 0.1022049384115e-12, 0.5381133195658e+01, 0.8399684731857e+02} - - /* Sun-to-Earth, T^2, Y */ - e2y := []float64{ - 0.5063375872532e-10, 0.0000000000000e+00, 0.0000000000000e+00, - 0.2173815785980e-10, 0.2827805833053e+01, 0.1256615170089e+02, - 0.1010231999920e-10, 0.4634612377133e+01, 0.6283075850446e+01, - 0.9259745317636e-12, 0.2620612076189e+01, 0.1884922755134e+02, - 0.1022202095812e-12, 0.3809562326066e+01, 0.8399684731857e+02} - - /* Sun-to-Earth, T^2, Z */ - e2z := []float64{ - 0.9722666114891e-10, 0.5152219582658e+01, 0.6283075850446e+01, - -0.3494819171909e-11, 0.0000000000000e+00, 0.0000000000000e+00, - 0.6713034376076e-12, 0.6440188750495e+00, 0.1256615170089e+02} - - /* SSB-to-Sun, T^0, X */ - s0x := []float64{ - 0.4956757536410e-02, 0.3741073751789e+01, 0.5296909721118e+00, - 0.2718490072522e-02, 0.4016011511425e+01, 0.2132990797783e+00, - 0.1546493974344e-02, 0.2170528330642e+01, 0.3813291813120e-01, - 0.8366855276341e-03, 0.2339614075294e+01, 0.7478166569050e-01, - 0.2936777942117e-03, 0.0000000000000e+00, 0.0000000000000e+00, - 0.1201317439469e-03, 0.4090736353305e+01, 0.1059381944224e+01, - 0.7578550887230e-04, 0.3241518088140e+01, 0.4265981595566e+00, - 0.1941787367773e-04, 0.1012202064330e+01, 0.2061856251104e+00, - 0.1889227765991e-04, 0.3892520416440e+01, 0.2204125344462e+00, - 0.1937896968613e-04, 0.4797779441161e+01, 0.1495633313810e+00, - - 0.1434506110873e-04, 0.3868960697933e+01, 0.5225775174439e+00, - 0.1406659911580e-04, 0.4759766557397e+00, 0.5368044267797e+00, - 0.1179022300202e-04, 0.7774961520598e+00, 0.7626583626240e-01, - 0.8085864460959e-05, 0.3254654471465e+01, 0.3664874755930e-01, - 0.7622752967615e-05, 0.4227633103489e+01, 0.3961708870310e-01, - 0.6209171139066e-05, 0.2791828325711e+00, 0.7329749511860e-01, - 0.4366435633970e-05, 0.4440454875925e+01, 0.1589072916335e+01, - 0.3792124889348e-05, 0.5156393842356e+01, 0.7113454667900e-02, - 0.3154548963402e-05, 0.6157005730093e+01, 0.4194847048887e+00, - 0.3088359882942e-05, 0.2494567553163e+01, 0.6398972393349e+00, - - 0.2788440902136e-05, 0.4934318747989e+01, 0.1102062672231e+00, - 0.3039928456376e-05, 0.4895077702640e+01, 0.6283075850446e+01, - 0.2272258457679e-05, 0.5278394064764e+01, 0.1030928125552e+00, - 0.2162007057957e-05, 0.5802978019099e+01, 0.3163918923335e+00, - 0.1767632855737e-05, 0.3415346595193e-01, 0.1021328554739e+02, - 0.1349413459362e-05, 0.2001643230755e+01, 0.1484170571900e-02, - 0.1170141900476e-05, 0.2424750491620e+01, 0.6327837846670e+00, - 0.1054355266820e-05, 0.3123311487576e+01, 0.4337116142245e+00, - 0.9800822461610e-06, 0.3026258088130e+01, 0.1052268489556e+01, - 0.1091203749931e-05, 0.3157811670347e+01, 0.1162474756779e+01, - - 0.6960236715913e-06, 0.8219570542313e+00, 0.1066495398892e+01, - 0.5689257296909e-06, 0.1323052375236e+01, 0.9491756770005e+00, - 0.6613172135802e-06, 0.2765348881598e+00, 0.8460828644453e+00, - 0.6277702517571e-06, 0.5794064466382e+01, 0.1480791608091e+00, - 0.6304884066699e-06, 0.7323555380787e+00, 0.2243449970715e+00, - 0.4897850467382e-06, 0.3062464235399e+01, 0.3340612434717e+01, - 0.3759148598786e-06, 0.4588290469664e+01, 0.3516457698740e-01, - 0.3110520548195e-06, 0.1374299536572e+01, 0.6373574839730e-01, - 0.3064708359780e-06, 0.4222267485047e+01, 0.1104591729320e-01, - 0.2856347168241e-06, 0.3714202944973e+01, 0.1510475019529e+00, - - 0.2840945514288e-06, 0.2847972875882e+01, 0.4110125927500e-01, - 0.2378951599405e-06, 0.3762072563388e+01, 0.2275259891141e+00, - 0.2714229481417e-06, 0.1036049980031e+01, 0.2535050500000e-01, - 0.2323551717307e-06, 0.4682388599076e+00, 0.8582758298370e-01, - 0.1881790512219e-06, 0.4790565425418e+01, 0.2118763888447e+01, - 0.2261353968371e-06, 0.1669144912212e+01, 0.7181332454670e-01, - 0.2214546389848e-06, 0.3937717281614e+01, 0.2968341143800e-02, - 0.2184915594933e-06, 0.1129169845099e+00, 0.7775000683430e-01, - 0.2000164937936e-06, 0.4030009638488e+01, 0.2093666171530e+00, - 0.1966105136719e-06, 0.8745955786834e+00, 0.2172315424036e+00, - - 0.1904742332624e-06, 0.5919743598964e+01, 0.2022531624851e+00, - 0.1657399705031e-06, 0.2549141484884e+01, 0.7358765972222e+00, - 0.1574070533987e-06, 0.5277533020230e+01, 0.7429900518901e+00, - 0.1832261651039e-06, 0.3064688127777e+01, 0.3235053470014e+00, - 0.1733615346569e-06, 0.3011432799094e+01, 0.1385174140878e+00, - 0.1549124014496e-06, 0.4005569132359e+01, 0.5154640627760e+00, - 0.1637044713838e-06, 0.1831375966632e+01, 0.8531963191132e+00, - 0.1123420082383e-06, 0.1180270407578e+01, 0.1990721704425e+00, - 0.1083754165740e-06, 0.3414101320863e+00, 0.5439178814476e+00, - 0.1156638012655e-06, 0.6130479452594e+00, 0.5257585094865e+00, - - 0.1142548785134e-06, 0.3724761948846e+01, 0.5336234347371e+00, - 0.7921463895965e-07, 0.2435425589361e+01, 0.1478866649112e+01, - 0.7428600285231e-07, 0.3542144398753e+01, 0.2164800718209e+00, - 0.8323211246747e-07, 0.3525058072354e+01, 0.1692165728891e+01, - 0.7257595116312e-07, 0.1364299431982e+01, 0.2101180877357e+00, - 0.7111185833236e-07, 0.2460478875808e+01, 0.4155522422634e+00, - 0.6868090383716e-07, 0.4397327670704e+01, 0.1173197218910e+00, - 0.7226419974175e-07, 0.4042647308905e+01, 0.1265567569334e+01, - 0.6955642383177e-07, 0.2865047906085e+01, 0.9562891316684e+00, - 0.7492139296331e-07, 0.5014278994215e+01, 0.1422690933580e-01, - - 0.6598363128857e-07, 0.2376730020492e+01, 0.6470106940028e+00, - 0.7381147293385e-07, 0.3272990384244e+01, 0.1581959461667e+01, - 0.6402909624032e-07, 0.5302290955138e+01, 0.9597935788730e-01, - 0.6237454263857e-07, 0.5444144425332e+01, 0.7084920306520e-01, - 0.5241198544016e-07, 0.4215359579205e+01, 0.5265099800692e+00, - 0.5144463853918e-07, 0.1218916689916e+00, 0.5328719641544e+00, - 0.5868164772299e-07, 0.2369402002213e+01, 0.7871412831580e-01, - 0.6233195669151e-07, 0.1254922242403e+01, 0.2608790314060e+02, - 0.6068463791422e-07, 0.5679713760431e+01, 0.1114304132498e+00, - 0.4359361135065e-07, 0.6097219641646e+00, 0.1375773836557e+01, - - 0.4686510366826e-07, 0.4786231041431e+01, 0.1143987543936e+00, - 0.3758977287225e-07, 0.1167368068139e+01, 0.1596186371003e+01, - 0.4282051974778e-07, 0.1519471064319e+01, 0.2770348281756e+00, - 0.5153765386113e-07, 0.1860532322984e+01, 0.2228608264996e+00, - 0.4575129387188e-07, 0.7632857887158e+00, 0.1465949902372e+00, - 0.3326844933286e-07, 0.1298219485285e+01, 0.5070101000000e-01, - 0.3748617450984e-07, 0.1046510321062e+01, 0.4903339079539e+00, - 0.2816756661499e-07, 0.3434522346190e+01, 0.2991266627620e+00, - 0.3412750405039e-07, 0.2523766270318e+01, 0.3518164938661e+00, - 0.2655796761776e-07, 0.2904422260194e+01, 0.6256703299991e+00, - - 0.2963597929458e-07, 0.5923900431149e+00, 0.1099462426779e+00, - 0.2539523734781e-07, 0.4851947722567e+01, 0.1256615170089e+02, - 0.2283087914139e-07, 0.3400498595496e+01, 0.6681224869435e+01, - 0.2321309799331e-07, 0.5789099148673e+01, 0.3368040641550e-01, - 0.2549657649750e-07, 0.3991856479792e-01, 0.1169588211447e+01, - 0.2290462303977e-07, 0.2788567577052e+01, 0.1045155034888e+01, - 0.1945398522914e-07, 0.3290896998176e+01, 0.1155361302111e+01, - 0.1849171512638e-07, 0.2698060129367e+01, 0.4452511715700e-02, - 0.1647199834254e-07, 0.3016735644085e+01, 0.4408250688924e+00, - 0.1529530765273e-07, 0.5573043116178e+01, 0.6521991896920e-01, - - 0.1433199339978e-07, 0.1481192356147e+01, 0.9420622223326e+00, - 0.1729134193602e-07, 0.1422817538933e+01, 0.2108507877249e+00, - 0.1716463931346e-07, 0.3469468901855e+01, 0.2157473718317e+00, - 0.1391206061378e-07, 0.6122436220547e+01, 0.4123712502208e+00, - 0.1404746661924e-07, 0.1647765641936e+01, 0.4258542984690e-01, - 0.1410452399455e-07, 0.5989729161964e+01, 0.2258291676434e+00, - 0.1089828772168e-07, 0.2833705509371e+01, 0.4226656969313e+00, - 0.1047374564948e-07, 0.5090690007331e+00, 0.3092784376656e+00, - 0.1358279126532e-07, 0.5128990262836e+01, 0.7923417740620e-01, - 0.1020456476148e-07, 0.9632772880808e+00, 0.1456308687557e+00, - - 0.1033428735328e-07, 0.3223779318418e+01, 0.1795258541446e+01, - 0.1412435841540e-07, 0.2410271572721e+01, 0.1525316725248e+00, - 0.9722759371574e-08, 0.2333531395690e+01, 0.8434341241180e-01, - 0.9657334084704e-08, 0.6199270974168e+01, 0.1272681024002e+01, - 0.1083641148690e-07, 0.2864222292929e+01, 0.7032915397480e-01, - 0.1067318403838e-07, 0.5833458866568e+00, 0.2123349582968e+00, - 0.1062366201976e-07, 0.4307753989494e+01, 0.2142632012598e+00, - 0.1236364149266e-07, 0.2873917870593e+01, 0.1847279083684e+00, - 0.1092759489593e-07, 0.2959887266733e+01, 0.1370332435159e+00, - 0.8912069362899e-08, 0.5141213702562e+01, 0.2648454860559e+01, - - 0.9656467707970e-08, 0.4532182462323e+01, 0.4376440768498e+00, - 0.8098386150135e-08, 0.2268906338379e+01, 0.2880807454688e+00, - 0.7857714675000e-08, 0.4055544260745e+01, 0.2037373330570e+00, - 0.7288455940646e-08, 0.5357901655142e+01, 0.1129145838217e+00, - 0.9450595950552e-08, 0.4264926963939e+01, 0.5272426800584e+00, - 0.9381718247537e-08, 0.7489366976576e-01, 0.5321392641652e+00, - 0.7079052646038e-08, 0.1923311052874e+01, 0.6288513220417e+00, - 0.9259004415344e-08, 0.2970256853438e+01, 0.1606092486742e+00, - 0.8259801499742e-08, 0.3327056314697e+01, 0.8389694097774e+00, - 0.6476334355779e-08, 0.2954925505727e+01, 0.2008557621224e+01, - - 0.5984021492007e-08, 0.9138753105829e+00, 0.2042657109477e+02, - 0.5989546863181e-08, 0.3244464082031e+01, 0.2111650433779e+01, - 0.6233108606023e-08, 0.4995232638403e+00, 0.4305306221819e+00, - 0.6877299149965e-08, 0.2834987233449e+01, 0.9561746721300e-02, - 0.8311234227190e-08, 0.2202951835758e+01, 0.3801276407308e+00, - 0.6599472832414e-08, 0.4478581462618e+01, 0.1063314406849e+01, - 0.6160491096549e-08, 0.5145858696411e+01, 0.1368660381889e+01, - 0.6164772043891e-08, 0.3762976697911e+00, 0.4234171675140e+00, - 0.6363248684450e-08, 0.3162246718685e+01, 0.1253008786510e-01, - 0.6448587520999e-08, 0.3442693302119e+01, 0.5287268506303e+00, - - 0.6431662283977e-08, 0.8977549136606e+00, 0.5306550935933e+00, - 0.6351223158474e-08, 0.4306447410369e+01, 0.5217580628120e+02, - 0.5476721393451e-08, 0.3888529177855e+01, 0.2221856701002e+01, - 0.5341772572619e-08, 0.2655560662512e+01, 0.7466759693650e-01, - 0.5337055758302e-08, 0.5164990735946e+01, 0.7489573444450e-01, - 0.5373120816787e-08, 0.6041214553456e+01, 0.1274714967946e+00, - 0.5392351705426e-08, 0.9177763485932e+00, 0.1055449481598e+01, - 0.6688495850205e-08, 0.3089608126937e+01, 0.2213766559277e+00, - 0.5072003660362e-08, 0.4311316541553e+01, 0.2132517061319e+00, - 0.5070726650455e-08, 0.5790675464444e+00, 0.2133464534247e+00, - - 0.5658012950032e-08, 0.2703945510675e+01, 0.7287631425543e+00, - 0.4835509924854e-08, 0.2975422976065e+01, 0.7160067364790e-01, - 0.6479821978012e-08, 0.1324168733114e+01, 0.2209183458640e-01, - 0.6230636494980e-08, 0.2860103632836e+01, 0.3306188016693e+00, - 0.4649239516213e-08, 0.4832259763403e+01, 0.7796265773310e-01, - 0.6487325792700e-08, 0.2726165825042e+01, 0.3884652414254e+00, - 0.4682823682770e-08, 0.6966602455408e+00, 0.1073608853559e+01, - 0.5704230804976e-08, 0.5669634104606e+01, 0.8731175355560e-01, - 0.6125413585489e-08, 0.1513386538915e+01, 0.7605151500000e-01, - 0.6035825038187e-08, 0.1983509168227e+01, 0.9846002785331e+00, - - 0.4331123462303e-08, 0.2782892992807e+01, 0.4297791515992e+00, - 0.4681107685143e-08, 0.5337232886836e+01, 0.2127790306879e+00, - 0.4669105829655e-08, 0.5837133792160e+01, 0.2138191288687e+00, - 0.5138823602365e-08, 0.3080560200507e+01, 0.7233337363710e-01, - 0.4615856664534e-08, 0.1661747897471e+01, 0.8603097737811e+00, - 0.4496916702197e-08, 0.2112508027068e+01, 0.7381754420900e-01, - 0.4278479042945e-08, 0.5716528462627e+01, 0.7574578717200e-01, - 0.3840525503932e-08, 0.6424172726492e+00, 0.3407705765729e+00, - 0.4866636509685e-08, 0.4919244697715e+01, 0.7722995774390e-01, - 0.3526100639296e-08, 0.2550821052734e+01, 0.6225157782540e-01, - - 0.3939558488075e-08, 0.3939331491710e+01, 0.5268983110410e-01, - 0.4041268772576e-08, 0.2275337571218e+01, 0.3503323232942e+00, - 0.3948761842853e-08, 0.1999324200790e+01, 0.1451108196653e+00, - 0.3258394550029e-08, 0.9121001378200e+00, 0.5296435984654e+00, - 0.3257897048761e-08, 0.3428428660869e+01, 0.5297383457582e+00, - 0.3842559031298e-08, 0.6132927720035e+01, 0.9098186128426e+00, - 0.3109920095448e-08, 0.7693650193003e+00, 0.3932462625300e-02, - 0.3132237775119e-08, 0.3621293854908e+01, 0.2346394437820e+00, - 0.3942189421510e-08, 0.4841863659733e+01, 0.3180992042600e-02, - 0.3796972285340e-08, 0.1814174994268e+01, 0.1862120789403e+00, - - 0.3995640233688e-08, 0.1386990406091e+01, 0.4549093064213e+00, - 0.2875013727414e-08, 0.9178318587177e+00, 0.1905464808669e+01, - 0.3073719932844e-08, 0.2688923811835e+01, 0.3628624111593e+00, - 0.2731016580075e-08, 0.1188259127584e+01, 0.2131850110243e+00, - 0.2729549896546e-08, 0.3702160634273e+01, 0.2134131485323e+00, - 0.3339372892449e-08, 0.7199163960331e+00, 0.2007689919132e+00, - 0.2898833764204e-08, 0.1916709364999e+01, 0.5291709230214e+00, - 0.2894536549362e-08, 0.2424043195547e+01, 0.5302110212022e+00, - 0.3096872473843e-08, 0.4445894977497e+01, 0.2976424921901e+00, - 0.2635672326810e-08, 0.3814366984117e+01, 0.1485980103780e+01, - - 0.3649302697001e-08, 0.2924200596084e+01, 0.6044726378023e+00, - 0.3127954585895e-08, 0.1842251648327e+01, 0.1084620721060e+00, - 0.2616040173947e-08, 0.4155841921984e+01, 0.1258454114666e+01, - 0.2597395859860e-08, 0.1158045978874e+00, 0.2103781122809e+00, - 0.2593286172210e-08, 0.4771850408691e+01, 0.2162200472757e+00, - 0.2481823585747e-08, 0.4608842558889e+00, 0.1062562936266e+01, - 0.2742219550725e-08, 0.1538781127028e+01, 0.5651155736444e+00, - 0.3199558469610e-08, 0.3226647822878e+00, 0.7036329877322e+00, - 0.2666088542957e-08, 0.1967991731219e+00, 0.1400015846597e+00, - 0.2397067430580e-08, 0.3707036669873e+01, 0.2125476091956e+00, - - 0.2376570772738e-08, 0.1182086628042e+01, 0.2140505503610e+00, - 0.2547228007887e-08, 0.4906256820629e+01, 0.1534957940063e+00, - 0.2265575594114e-08, 0.3414949866857e+01, 0.2235935264888e+00, - 0.2464381430585e-08, 0.4599122275378e+01, 0.2091065926078e+00, - 0.2433408527044e-08, 0.2830751145445e+00, 0.2174915669488e+00, - 0.2443605509076e-08, 0.4212046432538e+01, 0.1739420156204e+00, - 0.2319779262465e-08, 0.9881978408630e+00, 0.7530171478090e-01, - 0.2284622835465e-08, 0.5565347331588e+00, 0.7426161660010e-01, - 0.2467268750783e-08, 0.5655708150766e+00, 0.2526561439362e+00, - 0.2808513492782e-08, 0.1418405053408e+01, 0.5636314030725e+00, - - 0.2329528932532e-08, 0.4069557545675e+01, 0.1056200952181e+01, - 0.9698639532817e-09, 0.1074134313634e+01, 0.7826370942180e+02} - - /* SSB-to-Sun, T^0, Y */ - s0y := []float64{ - 0.4955392320126e-02, 0.2170467313679e+01, 0.5296909721118e+00, - 0.2722325167392e-02, 0.2444433682196e+01, 0.2132990797783e+00, - 0.1546579925346e-02, 0.5992779281546e+00, 0.3813291813120e-01, - 0.8363140252966e-03, 0.7687356310801e+00, 0.7478166569050e-01, - 0.3385792683603e-03, 0.0000000000000e+00, 0.0000000000000e+00, - 0.1201192221613e-03, 0.2520035601514e+01, 0.1059381944224e+01, - 0.7587125720554e-04, 0.1669954006449e+01, 0.4265981595566e+00, - 0.1964155361250e-04, 0.5707743963343e+01, 0.2061856251104e+00, - 0.1891900364909e-04, 0.2320960679937e+01, 0.2204125344462e+00, - 0.1937373433356e-04, 0.3226940689555e+01, 0.1495633313810e+00, - - 0.1437139941351e-04, 0.2301626908096e+01, 0.5225775174439e+00, - 0.1406267683099e-04, 0.5188579265542e+01, 0.5368044267797e+00, - 0.1178703080346e-04, 0.5489483248476e+01, 0.7626583626240e-01, - 0.8079835186041e-05, 0.1683751835264e+01, 0.3664874755930e-01, - 0.7623253594652e-05, 0.2656400462961e+01, 0.3961708870310e-01, - 0.6248667483971e-05, 0.4992775362055e+01, 0.7329749511860e-01, - 0.4366353695038e-05, 0.2869706279678e+01, 0.1589072916335e+01, - 0.3829101568895e-05, 0.3572131359950e+01, 0.7113454667900e-02, - 0.3175733773908e-05, 0.4535372530045e+01, 0.4194847048887e+00, - 0.3092437902159e-05, 0.9230153317909e+00, 0.6398972393349e+00, - - 0.2874168812154e-05, 0.3363143761101e+01, 0.1102062672231e+00, - 0.3040119321826e-05, 0.3324250895675e+01, 0.6283075850446e+01, - 0.2699723308006e-05, 0.2917882441928e+00, 0.1030928125552e+00, - 0.2134832683534e-05, 0.4220997202487e+01, 0.3163918923335e+00, - 0.1770412139433e-05, 0.4747318496462e+01, 0.1021328554739e+02, - 0.1377264209373e-05, 0.4305058462401e+00, 0.1484170571900e-02, - 0.1127814538960e-05, 0.8538177240740e+00, 0.6327837846670e+00, - 0.1055608090130e-05, 0.1551800742580e+01, 0.4337116142245e+00, - 0.9802673861420e-06, 0.1459646735377e+01, 0.1052268489556e+01, - 0.1090329461951e-05, 0.1587351228711e+01, 0.1162474756779e+01, - - 0.6959590025090e-06, 0.5534442628766e+01, 0.1066495398892e+01, - 0.5664914529542e-06, 0.6030673003297e+01, 0.9491756770005e+00, - 0.6607787763599e-06, 0.4989507233927e+01, 0.8460828644453e+00, - 0.6269725742838e-06, 0.4222951804572e+01, 0.1480791608091e+00, - 0.6301889697863e-06, 0.5444316669126e+01, 0.2243449970715e+00, - 0.4891042662861e-06, 0.1490552839784e+01, 0.3340612434717e+01, - 0.3457083123290e-06, 0.3030475486049e+01, 0.3516457698740e-01, - 0.3032559967314e-06, 0.2652038793632e+01, 0.1104591729320e-01, - 0.2841133988903e-06, 0.1276744786829e+01, 0.4110125927500e-01, - 0.2855564444432e-06, 0.2143368674733e+01, 0.1510475019529e+00, - - 0.2765157135038e-06, 0.5444186109077e+01, 0.6373574839730e-01, - 0.2382312465034e-06, 0.2190521137593e+01, 0.2275259891141e+00, - 0.2808060365077e-06, 0.5735195064841e+01, 0.2535050500000e-01, - 0.2332175234405e-06, 0.9481985524859e-01, 0.7181332454670e-01, - 0.2322488199659e-06, 0.5180499361533e+01, 0.8582758298370e-01, - 0.1881850258423e-06, 0.3219788273885e+01, 0.2118763888447e+01, - 0.2196111392808e-06, 0.2366941159761e+01, 0.2968341143800e-02, - 0.2183810335519e-06, 0.4825445110915e+01, 0.7775000683430e-01, - 0.2002733093326e-06, 0.2457148995307e+01, 0.2093666171530e+00, - 0.1967111767229e-06, 0.5586291545459e+01, 0.2172315424036e+00, - - 0.1568473250543e-06, 0.3708003123320e+01, 0.7429900518901e+00, - 0.1852528314300e-06, 0.4310638151560e+01, 0.2022531624851e+00, - 0.1832111226447e-06, 0.1494665322656e+01, 0.3235053470014e+00, - 0.1746805502310e-06, 0.1451378500784e+01, 0.1385174140878e+00, - 0.1555730966650e-06, 0.1068040418198e+01, 0.7358765972222e+00, - 0.1554883462559e-06, 0.2442579035461e+01, 0.5154640627760e+00, - 0.1638380568746e-06, 0.2597913420625e+00, 0.8531963191132e+00, - 0.1159938593640e-06, 0.5834512021280e+01, 0.1990721704425e+00, - 0.1083427965695e-06, 0.5054033177950e+01, 0.5439178814476e+00, - 0.1156480369431e-06, 0.5325677432457e+01, 0.5257585094865e+00, - - 0.1141308860095e-06, 0.2153403923857e+01, 0.5336234347371e+00, - 0.7913146470946e-07, 0.8642846847027e+00, 0.1478866649112e+01, - 0.7439752463733e-07, 0.1970628496213e+01, 0.2164800718209e+00, - 0.7280277104079e-07, 0.6073307250609e+01, 0.2101180877357e+00, - 0.8319567719136e-07, 0.1954371928334e+01, 0.1692165728891e+01, - 0.7137705549290e-07, 0.8904989440909e+00, 0.4155522422634e+00, - 0.6900825396225e-07, 0.2825717714977e+01, 0.1173197218910e+00, - 0.7245757216635e-07, 0.2481677513331e+01, 0.1265567569334e+01, - 0.6961165696255e-07, 0.1292955312978e+01, 0.9562891316684e+00, - 0.7571804456890e-07, 0.3427517575069e+01, 0.1422690933580e-01, - - 0.6605425721904e-07, 0.8052192701492e+00, 0.6470106940028e+00, - 0.7375477357248e-07, 0.1705076390088e+01, 0.1581959461667e+01, - 0.7041664951470e-07, 0.4848356967891e+00, 0.9597935788730e-01, - 0.6322199535763e-07, 0.3878069473909e+01, 0.7084920306520e-01, - 0.5244380279191e-07, 0.2645560544125e+01, 0.5265099800692e+00, - 0.5143125704988e-07, 0.4834486101370e+01, 0.5328719641544e+00, - 0.5871866319373e-07, 0.7981472548900e+00, 0.7871412831580e-01, - 0.6300822573871e-07, 0.5979398788281e+01, 0.2608790314060e+02, - 0.6062154271548e-07, 0.4108655402756e+01, 0.1114304132498e+00, - 0.4361912339976e-07, 0.5322624319280e+01, 0.1375773836557e+01, - - 0.4417005920067e-07, 0.6240817359284e+01, 0.2770348281756e+00, - 0.4686806749936e-07, 0.3214977301156e+01, 0.1143987543936e+00, - 0.3758892132305e-07, 0.5879809634765e+01, 0.1596186371003e+01, - 0.5151351332319e-07, 0.2893377688007e+00, 0.2228608264996e+00, - 0.4554683578572e-07, 0.5475427144122e+01, 0.1465949902372e+00, - 0.3442381385338e-07, 0.5992034796640e+01, 0.5070101000000e-01, - 0.2831093954933e-07, 0.5367350273914e+01, 0.3092784376656e+00, - 0.3756267090084e-07, 0.5758171285420e+01, 0.4903339079539e+00, - 0.2816374679892e-07, 0.1863718700923e+01, 0.2991266627620e+00, - 0.3419307025569e-07, 0.9524347534130e+00, 0.3518164938661e+00, - - 0.2904250494239e-07, 0.5304471615602e+01, 0.1099462426779e+00, - 0.2471734511206e-07, 0.1297069793530e+01, 0.6256703299991e+00, - 0.2539620831872e-07, 0.3281126083375e+01, 0.1256615170089e+02, - 0.2281017868007e-07, 0.1829122133165e+01, 0.6681224869435e+01, - 0.2275319473335e-07, 0.5797198160181e+01, 0.3932462625300e-02, - 0.2547755368442e-07, 0.4752697708330e+01, 0.1169588211447e+01, - 0.2285979669317e-07, 0.1223205292886e+01, 0.1045155034888e+01, - 0.1913386560994e-07, 0.1757532993389e+01, 0.1155361302111e+01, - 0.1809020525147e-07, 0.4246116108791e+01, 0.3368040641550e-01, - 0.1649213300201e-07, 0.1445162890627e+01, 0.4408250688924e+00, - - 0.1834972793932e-07, 0.1126917567225e+01, 0.4452511715700e-02, - 0.1439550648138e-07, 0.6160756834764e+01, 0.9420622223326e+00, - 0.1487645457041e-07, 0.4358761931792e+01, 0.4123712502208e+00, - 0.1731729516660e-07, 0.6134456753344e+01, 0.2108507877249e+00, - 0.1717747163567e-07, 0.1898186084455e+01, 0.2157473718317e+00, - 0.1418190430374e-07, 0.4180286741266e+01, 0.6521991896920e-01, - 0.1404844134873e-07, 0.7654053565412e-01, 0.4258542984690e-01, - 0.1409842846538e-07, 0.4418612420312e+01, 0.2258291676434e+00, - 0.1090948346291e-07, 0.1260615686131e+01, 0.4226656969313e+00, - 0.1357577323612e-07, 0.3558248818690e+01, 0.7923417740620e-01, - - 0.1018154061960e-07, 0.5676087241256e+01, 0.1456308687557e+00, - 0.1412073972109e-07, 0.8394392632422e+00, 0.1525316725248e+00, - 0.1030938326496e-07, 0.1653593274064e+01, 0.1795258541446e+01, - 0.1180081567104e-07, 0.1285802592036e+01, 0.7032915397480e-01, - 0.9708510575650e-08, 0.7631889488106e+00, 0.8434341241180e-01, - 0.9637689663447e-08, 0.4630642649176e+01, 0.1272681024002e+01, - 0.1068910429389e-07, 0.5294934032165e+01, 0.2123349582968e+00, - 0.1063716179336e-07, 0.2736266800832e+01, 0.2142632012598e+00, - 0.1234858713814e-07, 0.1302891146570e+01, 0.1847279083684e+00, - 0.8912631189738e-08, 0.3570415993621e+01, 0.2648454860559e+01, - - 0.1036378285534e-07, 0.4236693440949e+01, 0.1370332435159e+00, - 0.9667798501561e-08, 0.2960768892398e+01, 0.4376440768498e+00, - 0.8108314201902e-08, 0.6987781646841e+00, 0.2880807454688e+00, - 0.7648364324628e-08, 0.2499017863863e+01, 0.2037373330570e+00, - 0.7286136828406e-08, 0.3787426951665e+01, 0.1129145838217e+00, - 0.9448237743913e-08, 0.2694354332983e+01, 0.5272426800584e+00, - 0.9374276106428e-08, 0.4787121277064e+01, 0.5321392641652e+00, - 0.7100226287462e-08, 0.3530238792101e+00, 0.6288513220417e+00, - 0.9253056659571e-08, 0.1399478925664e+01, 0.1606092486742e+00, - 0.6636432145504e-08, 0.3479575438447e+01, 0.1368660381889e+01, - - 0.6469975312932e-08, 0.1383669964800e+01, 0.2008557621224e+01, - 0.7335849729765e-08, 0.1243698166898e+01, 0.9561746721300e-02, - 0.8743421205855e-08, 0.3776164289301e+01, 0.3801276407308e+00, - 0.5993635744494e-08, 0.5627122113596e+01, 0.2042657109477e+02, - 0.5981008479693e-08, 0.1674336636752e+01, 0.2111650433779e+01, - 0.6188535145838e-08, 0.5214925208672e+01, 0.4305306221819e+00, - 0.6596074017566e-08, 0.2907653268124e+01, 0.1063314406849e+01, - 0.6630815126226e-08, 0.2127643669658e+01, 0.8389694097774e+00, - 0.6156772830040e-08, 0.5082160803295e+01, 0.4234171675140e+00, - 0.6446960563014e-08, 0.1872100916905e+01, 0.5287268506303e+00, - - 0.6429324424668e-08, 0.5610276103577e+01, 0.5306550935933e+00, - 0.6302232396465e-08, 0.1592152049607e+01, 0.1253008786510e-01, - 0.6399244436159e-08, 0.2746214421532e+01, 0.5217580628120e+02, - 0.5474965172558e-08, 0.2317666374383e+01, 0.2221856701002e+01, - 0.5339293190692e-08, 0.1084724961156e+01, 0.7466759693650e-01, - 0.5334733683389e-08, 0.3594106067745e+01, 0.7489573444450e-01, - 0.5392665782110e-08, 0.5630254365606e+01, 0.1055449481598e+01, - 0.6682075673789e-08, 0.1518480041732e+01, 0.2213766559277e+00, - 0.5079130495960e-08, 0.2739765115711e+01, 0.2132517061319e+00, - 0.5077759793261e-08, 0.5290711290094e+01, 0.2133464534247e+00, - - 0.4832037368310e-08, 0.1404473217200e+01, 0.7160067364790e-01, - 0.6463279674802e-08, 0.6038381695210e+01, 0.2209183458640e-01, - 0.6240592771560e-08, 0.1290170653666e+01, 0.3306188016693e+00, - 0.4672013521493e-08, 0.3261895939677e+01, 0.7796265773310e-01, - 0.6500650750348e-08, 0.1154522312095e+01, 0.3884652414254e+00, - 0.6344161389053e-08, 0.6206111545062e+01, 0.7605151500000e-01, - 0.4682518370646e-08, 0.5409118796685e+01, 0.1073608853559e+01, - 0.5329460015591e-08, 0.1202985784864e+01, 0.7287631425543e+00, - 0.5701588675898e-08, 0.4098715257064e+01, 0.8731175355560e-01, - 0.6030690867211e-08, 0.4132033218460e+00, 0.9846002785331e+00, - - 0.4336256312655e-08, 0.1211415991827e+01, 0.4297791515992e+00, - 0.4688498808975e-08, 0.3765479072409e+01, 0.2127790306879e+00, - 0.4675578609335e-08, 0.4265540037226e+01, 0.2138191288687e+00, - 0.4225578112158e-08, 0.5237566010676e+01, 0.3407705765729e+00, - 0.5139422230028e-08, 0.1507173079513e+01, 0.7233337363710e-01, - 0.4619995093571e-08, 0.9023957449848e-01, 0.8603097737811e+00, - 0.4494776255461e-08, 0.5414930552139e+00, 0.7381754420900e-01, - 0.4274026276788e-08, 0.4145735303659e+01, 0.7574578717200e-01, - 0.5018141789353e-08, 0.3344408829055e+01, 0.3180992042600e-02, - 0.4866163952181e-08, 0.3348534657607e+01, 0.7722995774390e-01, - - 0.4111986020501e-08, 0.4198823597220e+00, 0.1451108196653e+00, - 0.3356142784950e-08, 0.5609144747180e+01, 0.1274714967946e+00, - 0.4070575554551e-08, 0.7028411059224e+00, 0.3503323232942e+00, - 0.3257451857278e-08, 0.5624697983086e+01, 0.5296435984654e+00, - 0.3256973703026e-08, 0.1857842076707e+01, 0.5297383457582e+00, - 0.3830771508640e-08, 0.4562887279931e+01, 0.9098186128426e+00, - 0.3725024005962e-08, 0.2358058692652e+00, 0.1084620721060e+00, - 0.3136763921756e-08, 0.2049731526845e+01, 0.2346394437820e+00, - 0.3795147256194e-08, 0.2432356296933e+00, 0.1862120789403e+00, - 0.2877342229911e-08, 0.5631101279387e+01, 0.1905464808669e+01, - - 0.3076931798805e-08, 0.1117615737392e+01, 0.3628624111593e+00, - 0.2734765945273e-08, 0.5899826516955e+01, 0.2131850110243e+00, - 0.2733405296885e-08, 0.2130562964070e+01, 0.2134131485323e+00, - 0.2898552353410e-08, 0.3462387048225e+00, 0.5291709230214e+00, - 0.2893736103681e-08, 0.8534352781543e+00, 0.5302110212022e+00, - 0.3095717734137e-08, 0.2875061429041e+01, 0.2976424921901e+00, - 0.2636190425832e-08, 0.2242512846659e+01, 0.1485980103780e+01, - 0.3645512095537e-08, 0.1354016903958e+01, 0.6044726378023e+00, - 0.2808173547723e-08, 0.6705114365631e-01, 0.6225157782540e-01, - 0.2625012866888e-08, 0.4775705748482e+01, 0.5268983110410e-01, - - 0.2572233995651e-08, 0.2638924216139e+01, 0.1258454114666e+01, - 0.2604238824792e-08, 0.4826358927373e+01, 0.2103781122809e+00, - 0.2596886385239e-08, 0.3200388483118e+01, 0.2162200472757e+00, - 0.3228057304264e-08, 0.5384848409563e+01, 0.2007689919132e+00, - 0.2481601798252e-08, 0.5173373487744e+01, 0.1062562936266e+01, - 0.2745977498864e-08, 0.6250966149853e+01, 0.5651155736444e+00, - 0.2669878833811e-08, 0.4906001352499e+01, 0.1400015846597e+00, - 0.3203986611711e-08, 0.5034333010005e+01, 0.7036329877322e+00, - 0.3354961227212e-08, 0.6108262423137e+01, 0.4549093064213e+00, - 0.2400407324558e-08, 0.2135399294955e+01, 0.2125476091956e+00, - - 0.2379905859802e-08, 0.5893721933961e+01, 0.2140505503610e+00, - 0.2550844302187e-08, 0.3331940762063e+01, 0.1534957940063e+00, - 0.2268824211001e-08, 0.1843418461035e+01, 0.2235935264888e+00, - 0.2464700891204e-08, 0.3029548547230e+01, 0.2091065926078e+00, - 0.2436814726024e-08, 0.4994717970364e+01, 0.2174915669488e+00, - 0.2443623894745e-08, 0.2645102591375e+01, 0.1739420156204e+00, - 0.2318701783838e-08, 0.5700547397897e+01, 0.7530171478090e-01, - 0.2284448700256e-08, 0.5268898905872e+01, 0.7426161660010e-01, - 0.2468848123510e-08, 0.5276280575078e+01, 0.2526561439362e+00, - 0.2814052350303e-08, 0.6130168623475e+01, 0.5636314030725e+00, - - 0.2243662755220e-08, 0.6631692457995e+00, 0.8886590321940e-01, - 0.2330795855941e-08, 0.2499435487702e+01, 0.1056200952181e+01, - 0.9757679038404e-09, 0.5796846023126e+01, 0.7826370942180e+02} - - /* SSB-to-Sun, T^0, Z */ - s0z := []float64{ - 0.1181255122986e-03, 0.4607918989164e+00, 0.2132990797783e+00, - 0.1127777651095e-03, 0.4169146331296e+00, 0.5296909721118e+00, - 0.4777754401806e-04, 0.4582657007130e+01, 0.3813291813120e-01, - 0.1129354285772e-04, 0.5758735142480e+01, 0.7478166569050e-01, - -0.1149543637123e-04, 0.0000000000000e+00, 0.0000000000000e+00, - 0.3298730512306e-05, 0.5978801994625e+01, 0.4265981595566e+00, - 0.2733376706079e-05, 0.7665413691040e+00, 0.1059381944224e+01, - 0.9426389657270e-06, 0.3710201265838e+01, 0.2061856251104e+00, - 0.8187517749552e-06, 0.3390675605802e+00, 0.2204125344462e+00, - 0.4080447871819e-06, 0.4552296640088e+00, 0.5225775174439e+00, - - 0.3169973017028e-06, 0.3445455899321e+01, 0.5368044267797e+00, - 0.2438098615549e-06, 0.5664675150648e+01, 0.3664874755930e-01, - 0.2601897517235e-06, 0.1931894095697e+01, 0.1495633313810e+00, - 0.2314558080079e-06, 0.3666319115574e+00, 0.3961708870310e-01, - 0.1962549548002e-06, 0.3167411699020e+01, 0.7626583626240e-01, - 0.2180518287925e-06, 0.1544420746580e+01, 0.7113454667900e-02, - 0.1451382442868e-06, 0.1583756740070e+01, 0.1102062672231e+00, - 0.1358439007389e-06, 0.5239941758280e+01, 0.6398972393349e+00, - 0.1050585898028e-06, 0.2266958352859e+01, 0.3163918923335e+00, - 0.1050029870186e-06, 0.2711495250354e+01, 0.4194847048887e+00, - - 0.9934920679800e-07, 0.1116208151396e+01, 0.1589072916335e+01, - 0.1048395331560e-06, 0.3408619600206e+01, 0.1021328554739e+02, - 0.8370147196668e-07, 0.3810459401087e+01, 0.2535050500000e-01, - 0.7989856510998e-07, 0.3769910473647e+01, 0.7329749511860e-01, - 0.5441221655233e-07, 0.2416994903374e+01, 0.1030928125552e+00, - 0.4610812906784e-07, 0.5858503336994e+01, 0.4337116142245e+00, - 0.3923022803444e-07, 0.3354170010125e+00, 0.1484170571900e-02, - 0.2610725582128e-07, 0.5410600646324e+01, 0.6327837846670e+00, - 0.2455279767721e-07, 0.6120216681403e+01, 0.1162474756779e+01, - 0.2375530706525e-07, 0.6055443426143e+01, 0.1052268489556e+01, - - 0.1782967577553e-07, 0.3146108708004e+01, 0.8460828644453e+00, - 0.1581687095238e-07, 0.6255496089819e+00, 0.3340612434717e+01, - 0.1594657672461e-07, 0.3782604300261e+01, 0.1066495398892e+01, - 0.1563448615040e-07, 0.1997775733196e+01, 0.2022531624851e+00, - 0.1463624258525e-07, 0.1736316792088e+00, 0.3516457698740e-01, - 0.1331585056673e-07, 0.4331941830747e+01, 0.9491756770005e+00, - 0.1130634557637e-07, 0.6152017751825e+01, 0.2968341143800e-02, - 0.1028949607145e-07, 0.2101792614637e+00, 0.2275259891141e+00, - 0.1024074971618e-07, 0.4071833211074e+01, 0.5070101000000e-01, - 0.8826956060303e-08, 0.4861633688145e+00, 0.2093666171530e+00, - - 0.8572230171541e-08, 0.5268190724302e+01, 0.4110125927500e-01, - 0.7649332643544e-08, 0.5134543417106e+01, 0.2608790314060e+02, - 0.8581673291033e-08, 0.2920218146681e+01, 0.1480791608091e+00, - 0.8430589300938e-08, 0.3604576619108e+01, 0.2172315424036e+00, - 0.7776165501012e-08, 0.3772942249792e+01, 0.6373574839730e-01, - 0.8311070234408e-08, 0.6200412329888e+01, 0.3235053470014e+00, - 0.6927365212582e-08, 0.4543353113437e+01, 0.8531963191132e+00, - 0.6791574208598e-08, 0.2882188406238e+01, 0.7181332454670e-01, - 0.5593100811839e-08, 0.1776646892780e+01, 0.7429900518901e+00, - 0.4553381853021e-08, 0.3949617611240e+01, 0.7775000683430e-01, - - 0.5758000450068e-08, 0.3859251775075e+01, 0.1990721704425e+00, - 0.4281283457133e-08, 0.1466294631206e+01, 0.2118763888447e+01, - 0.4206935661097e-08, 0.5421776011706e+01, 0.1104591729320e-01, - 0.4213751641837e-08, 0.3412048993322e+01, 0.2243449970715e+00, - 0.5310506239878e-08, 0.5421641370995e+00, 0.5154640627760e+00, - 0.3827450341320e-08, 0.8887314524995e+00, 0.1510475019529e+00, - 0.4292435241187e-08, 0.1405043757194e+01, 0.1422690933580e-01, - 0.3189780702289e-08, 0.1060049293445e+01, 0.1173197218910e+00, - 0.3226611928069e-08, 0.6270858897442e+01, 0.2164800718209e+00, - 0.2893897608830e-08, 0.5117563223301e+01, 0.6470106940028e+00, - - 0.3239852024578e-08, 0.4079092237983e+01, 0.2101180877357e+00, - 0.2956892222200e-08, 0.1594917021704e+01, 0.3092784376656e+00, - 0.2980177912437e-08, 0.5258787667564e+01, 0.4155522422634e+00, - 0.3163725690776e-08, 0.3854589225479e+01, 0.8582758298370e-01, - 0.2662262399118e-08, 0.3561326430187e+01, 0.5257585094865e+00, - 0.2766689135729e-08, 0.3180732086830e+00, 0.1385174140878e+00, - 0.2411600278464e-08, 0.3324798335058e+01, 0.5439178814476e+00, - 0.2483527695131e-08, 0.4169069291947e+00, 0.5336234347371e+00, - 0.7788777276590e-09, 0.1900569908215e+01, 0.5217580628120e+02} - - /* SSB-to-Sun, T^1, X */ - s1x := []float64{ - -0.1296310361520e-07, 0.0000000000000e+00, 0.0000000000000e+00, - 0.8975769009438e-08, 0.1128891609250e+01, 0.4265981595566e+00, - 0.7771113441307e-08, 0.2706039877077e+01, 0.2061856251104e+00, - 0.7538303866642e-08, 0.2191281289498e+01, 0.2204125344462e+00, - 0.6061384579336e-08, 0.3248167319958e+01, 0.1059381944224e+01, - 0.5726994235594e-08, 0.5569981398610e+01, 0.5225775174439e+00, - 0.5616492836424e-08, 0.5057386614909e+01, 0.5368044267797e+00, - 0.1010881584769e-08, 0.3473577116095e+01, 0.7113454667900e-02, - 0.7259606157626e-09, 0.3651858593665e+00, 0.6398972393349e+00, - 0.8755095026935e-09, 0.1662835408338e+01, 0.4194847048887e+00, - - 0.5370491182812e-09, 0.1327673878077e+01, 0.4337116142245e+00, - 0.5743773887665e-09, 0.4250200846687e+01, 0.2132990797783e+00, - 0.4408103140300e-09, 0.3598752574277e+01, 0.1589072916335e+01, - 0.3101892374445e-09, 0.4887822983319e+01, 0.1052268489556e+01, - 0.3209453713578e-09, 0.9702272295114e+00, 0.5296909721118e+00, - 0.3017228286064e-09, 0.5484462275949e+01, 0.1066495398892e+01, - 0.3200700038601e-09, 0.2846613338643e+01, 0.1495633313810e+00, - 0.2137637279911e-09, 0.5692163292729e+00, 0.3163918923335e+00, - 0.1899686386727e-09, 0.2061077157189e+01, 0.2275259891141e+00, - 0.1401994545308e-09, 0.4177771136967e+01, 0.1102062672231e+00, - - 0.1578057810499e-09, 0.5782460597335e+01, 0.7626583626240e-01, - 0.1237713253351e-09, 0.5705900866881e+01, 0.5154640627760e+00, - 0.1313076837395e-09, 0.5163438179576e+01, 0.3664874755930e-01, - 0.1184963304860e-09, 0.3054804427242e+01, 0.6327837846670e+00, - 0.1238130878565e-09, 0.2317292575962e+01, 0.3961708870310e-01, - 0.1015959527736e-09, 0.2194643645526e+01, 0.7329749511860e-01, - 0.9017954423714e-10, 0.2868603545435e+01, 0.1990721704425e+00, - 0.8668024955603e-10, 0.4923849675082e+01, 0.5439178814476e+00, - 0.7756083930103e-10, 0.3014334135200e+01, 0.9491756770005e+00, - 0.7536503401741e-10, 0.2704886279769e+01, 0.1030928125552e+00, - - 0.5483308679332e-10, 0.6010983673799e+01, 0.8531963191132e+00, - 0.5184339620428e-10, 0.1952704573291e+01, 0.2093666171530e+00, - 0.5108658712030e-10, 0.2958575786649e+01, 0.2172315424036e+00, - 0.5019424524650e-10, 0.1736317621318e+01, 0.2164800718209e+00, - 0.4909312625978e-10, 0.3167216416257e+01, 0.2101180877357e+00, - 0.4456638901107e-10, 0.7697579923471e+00, 0.3235053470014e+00, - 0.4227030350925e-10, 0.3490910137928e+01, 0.6373574839730e-01, - 0.4095456040093e-10, 0.5178888984491e+00, 0.6470106940028e+00, - 0.4990537041422e-10, 0.3323887668974e+01, 0.1422690933580e-01, - 0.4321170010845e-10, 0.4288484987118e+01, 0.7358765972222e+00, - - 0.3544072091802e-10, 0.6021051579251e+01, 0.5265099800692e+00, - 0.3480198638687e-10, 0.4600027054714e+01, 0.5328719641544e+00, - 0.3440287244435e-10, 0.4349525970742e+01, 0.8582758298370e-01, - 0.3330628322713e-10, 0.2347391505082e+01, 0.1104591729320e-01, - 0.2973060707184e-10, 0.4789409286400e+01, 0.5257585094865e+00, - 0.2932606766089e-10, 0.5831693799927e+01, 0.5336234347371e+00, - 0.2876972310953e-10, 0.2692638514771e+01, 0.1173197218910e+00, - 0.2827488278556e-10, 0.2056052487960e+01, 0.2022531624851e+00, - 0.2515028239756e-10, 0.7411863262449e+00, 0.9597935788730e-01, - 0.2853033744415e-10, 0.3948481024894e+01, 0.2118763888447e+01} - - /* SSB-to-Sun, T^1, Y */ - s1y := []float64{ - 0.8989047573576e-08, 0.5840593672122e+01, 0.4265981595566e+00, - 0.7815938401048e-08, 0.1129664707133e+01, 0.2061856251104e+00, - 0.7550926713280e-08, 0.6196589104845e+00, 0.2204125344462e+00, - 0.6056556925895e-08, 0.1677494667846e+01, 0.1059381944224e+01, - 0.5734142698204e-08, 0.4000920852962e+01, 0.5225775174439e+00, - 0.5614341822459e-08, 0.3486722577328e+01, 0.5368044267797e+00, - 0.1028678147656e-08, 0.1877141024787e+01, 0.7113454667900e-02, - 0.7270792075266e-09, 0.5077167301739e+01, 0.6398972393349e+00, - 0.8734141726040e-09, 0.9069550282609e-01, 0.4194847048887e+00, - 0.5377371402113e-09, 0.6039381844671e+01, 0.4337116142245e+00, - - 0.4729719431571e-09, 0.2153086311760e+01, 0.2132990797783e+00, - 0.4458052820973e-09, 0.5059830025565e+01, 0.5296909721118e+00, - 0.4406855467908e-09, 0.2027971692630e+01, 0.1589072916335e+01, - 0.3101659310977e-09, 0.3317677981860e+01, 0.1052268489556e+01, - 0.3016749232545e-09, 0.3913703482532e+01, 0.1066495398892e+01, - 0.3198541352656e-09, 0.1275513098525e+01, 0.1495633313810e+00, - 0.2142065389871e-09, 0.5301351614597e+01, 0.3163918923335e+00, - 0.1902615247592e-09, 0.4894943352736e+00, 0.2275259891141e+00, - 0.1613410990871e-09, 0.2449891130437e+01, 0.1102062672231e+00, - 0.1576992165097e-09, 0.4211421447633e+01, 0.7626583626240e-01, - - 0.1241637259894e-09, 0.4140803368133e+01, 0.5154640627760e+00, - 0.1313974830355e-09, 0.3591920305503e+01, 0.3664874755930e-01, - 0.1181697118258e-09, 0.1506314382788e+01, 0.6327837846670e+00, - 0.1238239742779e-09, 0.7461405378404e+00, 0.3961708870310e-01, - 0.1010107068241e-09, 0.6271010795475e+00, 0.7329749511860e-01, - 0.9226316616509e-10, 0.1259158839583e+01, 0.1990721704425e+00, - 0.8664946419555e-10, 0.3353244696934e+01, 0.5439178814476e+00, - 0.7757230468978e-10, 0.1447677295196e+01, 0.9491756770005e+00, - 0.7693168628139e-10, 0.1120509896721e+01, 0.1030928125552e+00, - 0.5487897454612e-10, 0.4439380426795e+01, 0.8531963191132e+00, - - 0.5196118677218e-10, 0.3788856619137e+00, 0.2093666171530e+00, - 0.5110853339935e-10, 0.1386879372016e+01, 0.2172315424036e+00, - 0.5027804534813e-10, 0.1647881805466e+00, 0.2164800718209e+00, - 0.4922485922674e-10, 0.1594315079862e+01, 0.2101180877357e+00, - 0.6155599524400e-10, 0.0000000000000e+00, 0.0000000000000e+00, - 0.4447147832161e-10, 0.5480720918976e+01, 0.3235053470014e+00, - 0.4144691276422e-10, 0.1931371033660e+01, 0.6373574839730e-01, - 0.4099950625452e-10, 0.5229611294335e+01, 0.6470106940028e+00, - 0.5060541682953e-10, 0.1731112486298e+01, 0.1422690933580e-01, - 0.4293615946300e-10, 0.2714571038925e+01, 0.7358765972222e+00, - - 0.3545659845763e-10, 0.4451041444634e+01, 0.5265099800692e+00, - 0.3479112041196e-10, 0.3029385448081e+01, 0.5328719641544e+00, - 0.3438516493570e-10, 0.2778507143731e+01, 0.8582758298370e-01, - 0.3297341285033e-10, 0.7898709807584e+00, 0.1104591729320e-01, - 0.2972585818015e-10, 0.3218785316973e+01, 0.5257585094865e+00, - 0.2931707295017e-10, 0.4260731012098e+01, 0.5336234347371e+00, - 0.2897198149403e-10, 0.1120753978101e+01, 0.1173197218910e+00, - 0.2832293240878e-10, 0.4597682717827e+00, 0.2022531624851e+00, - 0.2864348326612e-10, 0.2169939928448e+01, 0.9597935788730e-01, - 0.2852714675471e-10, 0.2377659870578e+01, 0.2118763888447e+01} - - /* SSB-to-Sun, T^1, Z */ - s1z := []float64{ - 0.5444220475678e-08, 0.1803825509310e+01, 0.2132990797783e+00, - 0.3883412695596e-08, 0.4668616389392e+01, 0.5296909721118e+00, - 0.1334341434551e-08, 0.0000000000000e+00, 0.0000000000000e+00, - 0.3730001266883e-09, 0.5401405918943e+01, 0.2061856251104e+00, - 0.2894929197956e-09, 0.4932415609852e+01, 0.2204125344462e+00, - 0.2857950357701e-09, 0.3154625362131e+01, 0.7478166569050e-01, - 0.2499226432292e-09, 0.3657486128988e+01, 0.4265981595566e+00, - 0.1937705443593e-09, 0.5740434679002e+01, 0.1059381944224e+01, - 0.1374894396320e-09, 0.1712857366891e+01, 0.5368044267797e+00, - 0.1217248678408e-09, 0.2312090870932e+01, 0.5225775174439e+00, - - 0.7961052740870e-10, 0.5283368554163e+01, 0.3813291813120e-01, - 0.4979225949689e-10, 0.4298290471860e+01, 0.4194847048887e+00, - 0.4388552286597e-10, 0.6145515047406e+01, 0.7113454667900e-02, - 0.2586835212560e-10, 0.3019448001809e+01, 0.6398972393349e+00} - - /* SSB-to-Sun, T^2, X */ - s2x := []float64{ - 0.1603551636587e-11, 0.4404109410481e+01, 0.2061856251104e+00, - 0.1556935889384e-11, 0.4818040873603e+00, 0.2204125344462e+00, - 0.1182594414915e-11, 0.9935762734472e+00, 0.5225775174439e+00, - 0.1158794583180e-11, 0.3353180966450e+01, 0.5368044267797e+00, - 0.9597358943932e-12, 0.5567045358298e+01, 0.2132990797783e+00, - 0.6511516579605e-12, 0.5630872420788e+01, 0.4265981595566e+00, - 0.7419792747688e-12, 0.2156188581957e+01, 0.5296909721118e+00, - 0.3951972655848e-12, 0.1981022541805e+01, 0.1059381944224e+01, - 0.4478223877045e-12, 0.0000000000000e+00, 0.0000000000000e+00} - - /* SSB-to-Sun, T^2, Y */ - s2y := []float64{ - 0.1609114495091e-11, 0.2831096993481e+01, 0.2061856251104e+00, - 0.1560330784946e-11, 0.5193058213906e+01, 0.2204125344462e+00, - 0.1183535479202e-11, 0.5707003443890e+01, 0.5225775174439e+00, - 0.1158183066182e-11, 0.1782400404928e+01, 0.5368044267797e+00, - 0.1032868027407e-11, 0.4036925452011e+01, 0.2132990797783e+00, - 0.6540142847741e-12, 0.4058241056717e+01, 0.4265981595566e+00, - 0.7305236491596e-12, 0.6175401942957e+00, 0.5296909721118e+00, - -0.5580725052968e-12, 0.0000000000000e+00, 0.0000000000000e+00, - 0.3946122651015e-12, 0.4108265279171e+00, 0.1059381944224e+01} - - /* SSB-to-Sun, T^2, Z */ - s2z := []float64{ - 0.3749920358054e-12, 0.3230285558668e+01, 0.2132990797783e+00, - 0.2735037220939e-12, 0.6154322683046e+01, 0.5296909721118e+00} - - /* Pointers to coefficient arrays, in x,y,z sets */ - ce0 := [3][]float64{e0x, e0y, e0z} - ce1 := [3][]float64{e1x, e1y, e1z} - ce2 := [3][]float64{e2x, e2y, e2z} - cs0 := [3][]float64{s0x, s0y, s0z} - cs1 := [3][]float64{s1x, s1y, s1z} - cs2 := [3][]float64{s2x, s2y, s2z} - - // const double *coeffs; - var coeffs *[]float64 - - /* Numbers of terms for each component of the model, in x,y,z sets */ - ne0 := [3]int{len(e0x) / 3, len(e0y) / 3, len(e0z) / 3} - ne1 := [3]int{len(e1x) / 3, len(e1y) / 3, len(e1z) / 3} - ne2 := [3]int{len(e2x) / 3, len(e2y) / 3, len(e2z) / 3} - ns0 := [3]int{len(s0x) / 3, len(s0y) / 3, len(s0z) / 3} - ns1 := [3]int{len(s1x) / 3, len(s1y) / 3, len(s1z) / 3} - ns2 := [3]int{len(s2x) / 3, len(s2y) / 3, len(s2z) / 3} - - var nterms int - - /* Miscellaneous */ - var jstat, i, j int - var t, t2, xyz, xyzd, a, b, c, ct, p, cp float64 - var ph, vh, pb, vb [3]float64 - var x, y, z float64 - - /* ------------------------------------------------------------------ */ - - /* Time since reference epoch, Julian years. */ - t = ((date1 - DJ00) + date2) / DJY - t2 = t * t - - /* Set status. */ - // jstat = fabs(t) <= 100.0 ? 0 : 1; - if fabs(t) <= 100.0 { - jstat = 0 - } else { - jstat = 1 - } - - /* X then Y then Z. */ - for i = 0; i < 3; i++ { - - /* Initialize position and velocity component. */ - xyz = 0.0 - xyzd = 0.0 - - /* ------------------------------------------------ */ - /* Obtain component of Sun to Earth ecliptic vector */ - /* ------------------------------------------------ */ - - /* Sun to Earth, T^0 terms. */ - coeffs = &ce0[i] - nterms = ne0[i] - - for j = 0; j < nterms; j++ { - a = (*coeffs)[j*3] - b = (*coeffs)[j*3+1] - c = (*coeffs)[j*3+2] - - p = b + c*t - xyz += a * cos(p) - xyzd -= a * c * sin(p) - } - - /* Sun to Earth, T^1 terms. */ - coeffs = &ce1[i] - nterms = ne1[i] - - for j = 0; j < nterms; j++ { - a = (*coeffs)[j*3] - b = (*coeffs)[j*3+1] - c = (*coeffs)[j*3+2] - ct = c * t - p = b + ct - cp = cos(p) - xyz += a * t * cp - xyzd += a * (cp - ct*sin(p)) - } - - /* Sun to Earth, T^2 terms. */ - coeffs = &ce2[i] - nterms = ne2[i] - - for j = 0; j < nterms; j++ { - a = (*coeffs)[j*3] - b = (*coeffs)[j*3+1] - c = (*coeffs)[j*3+2] - ct = c * t - p = b + ct - cp = cos(p) - xyz += a * t2 * cp - xyzd += a * t * (2.0*cp - ct*sin(p)) - } - - /* Heliocentric Earth position and velocity component. */ - ph[i] = xyz - vh[i] = xyzd / DJY - - /* ------------------------------------------------ */ - /* Obtain component of SSB to Earth ecliptic vector */ - /* ------------------------------------------------ */ - - /* SSB to Sun, T^0 terms. */ - coeffs = &cs0[i] - nterms = ns0[i] - - for j = 0; j < nterms; j++ { - a = (*coeffs)[j*3] - b = (*coeffs)[j*3+1] - c = (*coeffs)[j*3+2] - p = b + c*t - xyz += a * cos(p) - xyzd -= a * c * sin(p) - } - - /* SSB to Sun, T^1 terms. */ - coeffs = &cs1[i] - nterms = ns1[i] - - for j = 0; j < nterms; j++ { - a = (*coeffs)[j*3] - b = (*coeffs)[j*3+1] - c = (*coeffs)[j*3+2] - ct = c * t - p = b + ct - cp = cos(p) - xyz += a * t * cp - xyzd += a * (cp - ct*sin(p)) - } - - /* SSB to Sun, T^2 terms. */ - coeffs = &cs2[i] - nterms = ns2[i] - - for j = 0; j < nterms; j++ { - a = (*coeffs)[j*3] - b = (*coeffs)[j*3+1] - c = (*coeffs)[j*3+2] - ct = c * t - p = b + ct - cp = cos(p) - xyz += a * t2 * cp - xyzd += a * t * (2.0*cp - ct*sin(p)) - } - - /* Barycentric Earth position and velocity component. */ - pb[i] = xyz - vb[i] = xyzd / DJY - - /* Next Cartesian component. */ - } - - /* Rotate from ecliptic to BCRS coordinates. */ - - x = ph[0] - y = ph[1] - z = ph[2] - pvh[0][0] = x + am12*y + am13*z - pvh[0][1] = am21*x + am22*y + am23*z - pvh[0][2] = am32*y + am33*z - - x = vh[0] - y = vh[1] - z = vh[2] - pvh[1][0] = x + am12*y + am13*z - pvh[1][1] = am21*x + am22*y + am23*z - pvh[1][2] = am32*y + am33*z - - x = pb[0] - y = pb[1] - z = pb[2] - pvb[0][0] = x + am12*y + am13*z - pvb[0][1] = am21*x + am22*y + am23*z - pvb[0][2] = am32*y + am33*z - - x = vb[0] - y = vb[1] - z = vb[2] - pvb[1][0] = x + am12*y + am13*z - pvb[1][1] = am21*x + am22*y + am23*z - pvb[1][2] = am32*y + am33*z - - /* Return the status. */ - return jstat -} - -/* -Moon98 Moon geocentric position and velocity - -Approximate geocentric position and velocity of the Moon. - -Given: - date1 float64 TT date part A (Notes 1,4) - date2 float64 TT date part B (Notes 1,4) - -Returned: - pv [2][3]float64 Moon p,v, GCRS (AU, AU/d, Note 5) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. The limited - accuracy of the present algorithm is such that any of the methods - is satisfactory. - - 2) This function is a full implementation of the algorithm - published by Meeus (see reference) except that the light-time - correction to the Moon's mean longitude has been omitted. - - 3) Comparisons with ELP/MPP02 over the interval 1950-2100 gave RMS - errors of 2.9 arcsec in geocentric direction, 6.1 km in position - and 36 mm/s in velocity. The worst case errors were 18.3 arcsec - in geocentric direction, 31.7 km in position and 172 mm/s in - velocity. - - 4) The original algorithm is expressed in terms of "dynamical time", - which can either be TDB or TT without any significant change in - accuracy. UT cannot be used without incurring significant errors - (30 arcsec in the present era) due to the Moon's 0.5 arcsec/sec - movement. - - 5) The result is with respect to the GCRS (the same as J2000.0 mean - equator and equinox to within 23 mas). - - 6) Velocity is obtained by a complete analytical differentiation - of the Meeus model. - - 7) The Meeus algorithm generates position and velocity in mean - ecliptic coordinates of date, which the present function then - rotates into GCRS. Because the ecliptic system is precessing, - there is a coupling between this spin (about 1.4 degrees per - century) and the Moon position that produces a small velocity - contribution. In the present function this effect is neglected - as it corresponds to a maximum difference of less than 3 mm/s and - increases the RMS error by only 0.4%. - -References: - - Meeus, J., Astronomical Algorithms, 2nd edition, Willmann-Bell, - 1998, p337. - - Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G. & Laskar, J., Astron.Astrophys., 1994, 282, 663 - -Defined in sofam.go: - DAU astronomical unit (m) - DJC days per Julian century - DJ00 reference epoch (J2000.0), Julian Date - DD2R degrees to radians - -Called: - S2pv spherical coordinates to pv-vector - Pfw06 bias-precession F-W angles, IAU 2006 - Ir initialize r-matrix to identity - Rz rotate around Z-axis - Rx rotate around X-axis - Rxpv product of r-matrix and pv-vector -*/ -func Moon98(date1, date2 float64, pv *[2][3]float64) { - /* - Coefficients for fundamental arguments: - - . Powers of time in Julian centuries - . Units are degrees. - */ - - /* Moon's mean longitude (wrt mean equinox and ecliptic of date) */ - const elp0 = 218.31665436 /* Simon et al. (1994). */ - const elp1 = 481267.88123421 - const elp2 = -0.0015786 - const elp3 = 1.0 / 538841.0 - const elp4 = -1.0 / 65194000.0 - - var elp, delp float64 - - /* Moon's mean elongation */ - const d0 = 297.8501921 - const d1 = 445267.1114034 - const d2 = -0.0018819 - const d3 = 1.0 / 545868.0 - const d4 = 1.0 / 113065000.0 - var d, dd float64 - - /* Sun's mean anomaly */ - const em0 = 357.5291092 - const em1 = 35999.0502909 - const em2 = -0.0001536 - const em3 = 1.0 / 24490000.0 - const em4 = 0.0 - var em, dem float64 - - /* Moon's mean anomaly */ - const emp0 = 134.9633964 - const emp1 = 477198.8675055 - const emp2 = 0.0087414 - const emp3 = 1.0 / 69699.0 - const emp4 = -1.0 / 14712000.0 - var emp, demp float64 - - /* Mean distance of the Moon from its ascending node */ - const f0 = 93.2720950 - const f1 = 483202.0175233 - const f2 = -0.0036539 - const f3 = 1.0 / 3526000.0 - const f4 = 1.0 / 863310000.0 - var f, df float64 - - /* - Other arguments - */ - - /* Meeus A_1, due to Venus (deg) */ - const a10 = 119.75 - const a11 = 131.849 - var a1, da1 float64 - - /* Meeus A_2, due to Jupiter (deg) */ - const a20 = 53.09 - const a21 = 479264.290 - var a2, da2 float64 - - /* Meeus A_3, due to sidereal motion of the Moon in longitude (deg) */ - const a30 = 313.45 - const a31 = 481266.484 - var a3, da3 float64 - - /* Coefficients for Meeus "additive terms" (deg) */ - const al1 = 0.003958 - const al2 = 0.001962 - const al3 = 0.000318 - const ab1 = -0.002235 - const ab2 = 0.000382 - const ab3 = 0.000175 - const ab4 = 0.000175 - const ab5 = 0.000127 - const ab6 = -0.000115 - - /* Fixed term in distance (m) */ - const r0 = 385000560.0 - - /* Coefficients for (dimensionless) E factor */ - const ( - e1 = -0.002516 - e2 = -0.0000074 - ) - var e, de, esq, desq float64 - - /* - Coefficients for Moon longitude and distance series - */ - type termlr struct { - nd int /* multiple of D in argument */ - nem int /* " " M " " */ - nemp int /* " " M' " " */ - nf int /* " " F " " */ - coefl float64 /* coefficient of L sine argument (deg) */ - coefr float64 /* coefficient of R cosine argument (m) */ - } - - tlr := []termlr{{0, 0, 1, 0, 6.288774, -20905355.0}, - {2, 0, -1, 0, 1.274027, -3699111.0}, - {2, 0, 0, 0, 0.658314, -2955968.0}, - {0, 0, 2, 0, 0.213618, -569925.0}, - {0, 1, 0, 0, -0.185116, 48888.0}, - {0, 0, 0, 2, -0.114332, -3149.0}, - {2, 0, -2, 0, 0.058793, 246158.0}, - {2, -1, -1, 0, 0.057066, -152138.0}, - {2, 0, 1, 0, 0.053322, -170733.0}, - {2, -1, 0, 0, 0.045758, -204586.0}, - {0, 1, -1, 0, -0.040923, -129620.0}, - {1, 0, 0, 0, -0.034720, 108743.0}, - {0, 1, 1, 0, -0.030383, 104755.0}, - {2, 0, 0, -2, 0.015327, 10321.0}, - {0, 0, 1, 2, -0.012528, 0.0}, - {0, 0, 1, -2, 0.010980, 79661.0}, - {4, 0, -1, 0, 0.010675, -34782.0}, - {0, 0, 3, 0, 0.010034, -23210.0}, - {4, 0, -2, 0, 0.008548, -21636.0}, - {2, 1, -1, 0, -0.007888, 24208.0}, - {2, 1, 0, 0, -0.006766, 30824.0}, - {1, 0, -1, 0, -0.005163, -8379.0}, - {1, 1, 0, 0, 0.004987, -16675.0}, - {2, -1, 1, 0, 0.004036, -12831.0}, - {2, 0, 2, 0, 0.003994, -10445.0}, - {4, 0, 0, 0, 0.003861, -11650.0}, - {2, 0, -3, 0, 0.003665, 14403.0}, - {0, 1, -2, 0, -0.002689, -7003.0}, - {2, 0, -1, 2, -0.002602, 0.0}, - {2, -1, -2, 0, 0.002390, 10056.0}, - {1, 0, 1, 0, -0.002348, 6322.0}, - {2, -2, 0, 0, 0.002236, -9884.0}, - {0, 1, 2, 0, -0.002120, 5751.0}, - {0, 2, 0, 0, -0.002069, 0.0}, - {2, -2, -1, 0, 0.002048, -4950.0}, - {2, 0, 1, -2, -0.001773, 4130.0}, - {2, 0, 0, 2, -0.001595, 0.0}, - {4, -1, -1, 0, 0.001215, -3958.0}, - {0, 0, 2, 2, -0.001110, 0.0}, - {3, 0, -1, 0, -0.000892, 3258.0}, - {2, 1, 1, 0, -0.000810, 2616.0}, - {4, -1, -2, 0, 0.000759, -1897.0}, - {0, 2, -1, 0, -0.000713, -2117.0}, - {2, 2, -1, 0, -0.000700, 2354.0}, - {2, 1, -2, 0, 0.000691, 0.0}, - {2, -1, 0, -2, 0.000596, 0.0}, - {4, 0, 1, 0, 0.000549, -1423.0}, - {0, 0, 4, 0, 0.000537, -1117.0}, - {4, -1, 0, 0, 0.000520, -1571.0}, - {1, 0, -2, 0, -0.000487, -1739.0}, - {2, 1, 0, -2, -0.000399, 0.0}, - {0, 0, 2, -2, -0.000381, -4421.0}, - {1, 1, 1, 0, 0.000351, 0.0}, - {3, 0, -2, 0, -0.000340, 0.0}, - {4, 0, -3, 0, 0.000330, 0.0}, - {2, -1, 2, 0, 0.000327, 0.0}, - {0, 2, 1, 0, -0.000323, 1165.0}, - {1, 1, -1, 0, 0.000299, 0.0}, - {2, 0, 3, 0, 0.000294, 0.0}, - {2, 0, -1, -2, 0.000000, 8752.0}} - - NLR := len(tlr) - - /* - Coefficients for Moon latitude series - */ - type termb struct { - nd int /* multiple of D in argument */ - nem int /* " " M " " */ - nemp int /* " " M' " " */ - nf int /* " " F " " */ - coefb float64 /* coefficient of B sine argument (deg) */ - } - - tb := []termb{{0, 0, 0, 1, 5.128122}, - {0, 0, 1, 1, 0.280602}, - {0, 0, 1, -1, 0.277693}, - {2, 0, 0, -1, 0.173237}, - {2, 0, -1, 1, 0.055413}, - {2, 0, -1, -1, 0.046271}, - {2, 0, 0, 1, 0.032573}, - {0, 0, 2, 1, 0.017198}, - {2, 0, 1, -1, 0.009266}, - {0, 0, 2, -1, 0.008822}, - {2, -1, 0, -1, 0.008216}, - {2, 0, -2, -1, 0.004324}, - {2, 0, 1, 1, 0.004200}, - {2, 1, 0, -1, -0.003359}, - {2, -1, -1, 1, 0.002463}, - {2, -1, 0, 1, 0.002211}, - {2, -1, -1, -1, 0.002065}, - {0, 1, -1, -1, -0.001870}, - {4, 0, -1, -1, 0.001828}, - {0, 1, 0, 1, -0.001794}, - {0, 0, 0, 3, -0.001749}, - {0, 1, -1, 1, -0.001565}, - {1, 0, 0, 1, -0.001491}, - {0, 1, 1, 1, -0.001475}, - {0, 1, 1, -1, -0.001410}, - {0, 1, 0, -1, -0.001344}, - {1, 0, 0, -1, -0.001335}, - {0, 0, 3, 1, 0.001107}, - {4, 0, 0, -1, 0.001021}, - {4, 0, -1, 1, 0.000833}, - {0, 0, 1, -3, 0.000777}, - {4, 0, -2, 1, 0.000671}, - {2, 0, 0, -3, 0.000607}, - {2, 0, 2, -1, 0.000596}, - {2, -1, 1, -1, 0.000491}, - {2, 0, -2, 1, -0.000451}, - {0, 0, 3, -1, 0.000439}, - {2, 0, 2, 1, 0.000422}, - {2, 0, -3, -1, 0.000421}, - {2, 1, -1, 1, -0.000366}, - {2, 1, 0, 1, -0.000351}, - {4, 0, 0, 1, 0.000331}, - {2, -1, 1, 1, 0.000315}, - {2, -2, 0, -1, 0.000302}, - {0, 0, 1, 3, -0.000283}, - {2, 1, 1, -1, -0.000229}, - {1, 1, 0, -1, 0.000223}, - {1, 1, 0, 1, 0.000223}, - {0, 1, -2, -1, -0.000220}, - {2, 1, -1, -1, -0.000220}, - {1, 0, 1, 1, -0.000185}, - {2, -1, -2, -1, 0.000181}, - {0, 1, 2, 1, -0.000177}, - {4, 0, -2, -1, 0.000176}, - {4, -1, -1, -1, 0.000166}, - {1, 0, 1, -1, -0.000164}, - {4, 0, 1, -1, 0.000132}, - {1, 0, -1, -1, -0.000119}, - {4, -1, 0, -1, 0.000115}, - {2, -2, 0, 1, 0.000107}} - - NB := len(tb) - - /* Miscellaneous */ - var n, i int - var t, elpmf, delpmf, vel, vdel, vr, vdr, a1mf, da1mf, a1pf, - da1pf, dlpmp, slpmp, vb, vdb, v, dv, emn, empn, dn, fn, en, - den, arg, darg, farg, coeff, el, del, r, dr, b, db, gamb, - phib, psib, epsa float64 - var rm [3][3]float64 - - /* ------------------------------------------------------------------ */ - - /* Centuries since J2000.0 */ - t = ((date1 - DJ00) + date2) / DJC - - /* --------------------- */ - /* Fundamental arguments */ - /* --------------------- */ - - /* Arguments (radians) and derivatives (radians per Julian century) - for the current date. */ - - /* Moon's mean longitude. */ - elp = DD2R * fmod(elp0+ - (elp1+ - (elp2+ - (elp3+ - elp4*t)*t)*t)*t, 360.0) - delp = DD2R * (elp1 + - (elp2*2.0+ - (elp3*3.0+ - elp4*4.0*t)*t)*t) - - /* Moon's mean elongation. */ - d = DD2R * fmod(d0+ - (d1+ - (d2+ - (d3+ - d4*t)*t)*t)*t, 360.0) - dd = DD2R * (d1 + - (d2*2.0+ - (d3*3.0+ - d4*4.0*t)*t)*t) - - /* Sun's mean anomaly. */ - em = DD2R * fmod(em0+ - (em1+ - (em2+ - (em3+ - em4*t)*t)*t)*t, 360.0) - dem = DD2R * (em1 + - (em2*2.0+ - (em3*3.0+ - em4*4.0*t)*t)*t) - - /* Moon's mean anomaly. */ - emp = DD2R * fmod(emp0+ - (emp1+ - (emp2+ - (emp3+ - emp4*t)*t)*t)*t, 360.0) - demp = DD2R * (emp1 + - (emp2*2.0+ - (emp3*3.0+ - emp4*4.0*t)*t)*t) - - /* Mean distance of the Moon from its ascending node. */ - f = DD2R * fmod(f0+ - (f1+ - (f2+ - (f3+ - f4*t)*t)*t)*t, 360.0) - df = DD2R * (f1 + - (f2*2.0+ - (f3*3.0+ - f4*4.0*t)*t)*t) - - /* Meeus further arguments. */ - a1 = DD2R * (a10 + a11*t) - da1 = DD2R * al1 - a2 = DD2R * (a20 + a21*t) - da2 = DD2R * a21 - a3 = DD2R * (a30 + a31*t) - da3 = DD2R * a31 - - /* E-factor, and square. */ - e = 1.0 + (e1+e2*t)*t - de = e1 + 2.0*e2*t - esq = e * e - desq = 2.0 * e * de - - /* Use the Meeus additive terms (deg) to start off the summations. */ - elpmf = elp - f - delpmf = delp - df - vel = al1*sin(a1) + al2*sin(elpmf) + al3*sin(a2) - vdel = al1*cos(a1)*da1 + al2*cos(elpmf)*delpmf + al3*cos(a2)*da2 - - vr = 0.0 - vdr = 0.0 - - a1mf = a1 - f - da1mf = da1 - df - a1pf = a1 + f - da1pf = da1 + df - dlpmp = elp - emp - slpmp = elp + emp - vb = ab1*sin(elp) + ab2*sin(a3) + ab3*sin(a1mf) + ab4*sin(a1pf) + ab5*sin(dlpmp) + ab6*sin(slpmp) - vdb = ab1*cos(elp)*delp + ab2*cos(a3)*da3 + ab3*cos(a1mf)*da1mf + ab4*cos(a1pf)*da1pf + ab5*cos(dlpmp)*(delp-demp) + ab6*cos(slpmp)*(delp+demp) - - /* ----------------- */ - /* Series expansions */ - /* ----------------- */ - - /* Longitude and distance plus derivatives. */ - for n = NLR - 1; n >= 0; n-- { - dn = float64(tlr[n].nd) - //emn = float64 ( i = tlr[n].nem ); - i = tlr[n].nem - emn = float64(tlr[n].nem) - empn = float64(tlr[n].nemp) - fn = float64(tlr[n].nf) - switch abs(i) { - case 1: - en = e - den = de - break - case 2: - en = esq - den = desq - break - default: - en = 1.0 - den = 0.0 - } - arg = dn*d + emn*em + empn*emp + fn*f - darg = dn*dd + emn*dem + empn*demp + fn*df - farg = sin(arg) - v = farg * en - dv = cos(arg)*darg*en + farg*den - coeff = tlr[n].coefl - vel += coeff * v - vdel += coeff * dv - farg = cos(arg) - v = farg * en - dv = -sin(arg)*darg*en + farg*den - coeff = tlr[n].coefr - vr += coeff * v - vdr += coeff * dv - } - el = elp + DD2R*vel - del = (delp + DD2R*vdel) / DJC - r = (vr + r0) / DAU - dr = vdr / DAU / DJC - - /* Latitude plus derivative. */ - for n = NB - 1; n >= 0; n-- { - dn = float64(tb[n].nd) - //emn = float64( i = tb[n].nem ); - i = tb[n].nem - emn = float64(tb[n].nem) - empn = float64(tb[n].nemp) - fn = float64(tb[n].nf) - switch abs(i) { - case 1: - en = e - den = de - break - case 2: - en = esq - den = desq - break - default: - en = 1.0 - den = 0.0 - } - arg = dn*d + emn*em + empn*emp + fn*f - darg = dn*dd + emn*dem + empn*demp + fn*df - farg = sin(arg) - v = farg * en - dv = cos(arg)*darg*en + farg*den - coeff = tb[n].coefb - vb += coeff * v - vdb += coeff * dv - } - b = vb * DD2R - db = vdb * DD2R / DJC - - /* ------------------------------ */ - /* Transformation into final form */ - /* ------------------------------ */ - - /* Longitude, latitude to x, y, z (AU). */ - S2pv(el, b, r, del, db, dr, pv) - - /* IAU 2006 Fukushima-Williams bias+precession angles. */ - Pfw06(date1, date2, &gamb, &phib, &psib, &epsa) - - /* Mean ecliptic coordinates to GCRS rotation matrix. */ - Ir(&rm) - Rz(psib, &rm) - Rx(-phib, &rm) - Rz(-gamb, &rm) - - /* Rotate the Moon position and velocity into GCRS (Note 6). */ - Rxpv(rm, *pv, pv) - - /* Finished. */ -} - -/* -Plan94 Major-planet position and velocity - -Approximate heliocentric position and velocity of a nominated major -planet: Mercury, Venus, EMB, Mars, Jupiter, Saturn, Uranus or -Neptune (but not the Earth itself). - -Given: - date1 float64 TDB date part A (Note 1) - date2 float64 TDB date part B (Note 1) - np int planet (1=Mercury, 2=Venus, 3=EMB, 4=Mars, - 5=Jupiter, 6=Saturn, 7=Uranus, 8=Neptune) - -Returned (argument): - pv [2][3]float64 planet p,v (heliocentric, J2000.0, au,au/d) - -Returned (function value): - int status: -1 = illegal NP (outside 1-8) - 0 = OK - +1 = warning: year outside 1000-3000 - +2 = warning: failed to converge - -Notes: - - 1) The date date1+date2 is in the TDB time scale (in practice TT can - be used) and is a Julian Date, apportioned in any convenient way - between the two arguments. For example, JD(TDB)=2450123.7 could - be expressed in any of these ways, among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - resolution. The MJD method and the date & time methods are both - good compromises between resolution and convenience. The limited - accuracy of the present algorithm is such that any of the methods - is satisfactory. - - 2) If an np value outside the range 1-8 is supplied, an error status - (function value -1) is returned and the pv vector set to zeroes. - - 3) For np=3 the result is for the Earth-Moon Barycenter. To obtain - the heliocentric position and velocity of the Earth, use instead - the SOFA function iauEpv00. - - 4) On successful return, the array pv contains the following: - - pv[0][0] x } - pv[0][1] y } heliocentric position, au - pv[0][2] z } - - pv[1][0] xdot } - pv[1][1] ydot } heliocentric velocity, au/d - pv[1][2] zdot } - - The reference frame is equatorial and is with respect to the - mean equator and equinox of epoch J2000.0. - - 5) The algorithm is due to J.L. Simon, P. Bretagnon, J. Chapront, - M. Chapront-Touze, G. Francou and J. Laskar (Bureau des - Longitudes, Paris, France). From comparisons with JPL - ephemeris DE102, they quote the following maximum errors - over the interval 1800-2050: - - L (arcsec) B (arcsec) R (km) - - Mercury 4 1 300 - Venus 5 1 800 - EMB 6 1 1000 - Mars 17 1 7700 - Jupiter 71 5 76000 - Saturn 81 13 267000 - Uranus 86 7 712000 - Neptune 11 1 253000 - - Over the interval 1000-3000, they report that the accuracy is no - worse than 1.5 times that over 1800-2050. Outside 1000-3000 the - accuracy declines. - - Comparisons of the present function with the JPL DE200 ephemeris - give the following RMS errors over the interval 1960-2025: - - position (km) velocity (m/s) - - Mercury 334 0.437 - Venus 1060 0.855 - EMB 2010 0.815 - Mars 7690 1.98 - Jupiter 71700 7.70 - Saturn 199000 19.4 - Uranus 564000 16.4 - Neptune 158000 14.4 - - Comparisons against DE200 over the interval 1800-2100 gave the - following maximum absolute differences. (The results using - DE406 were essentially the same.) - - L (arcsec) B (arcsec) R (km) Rdot (m/s) - - Mercury 7 1 500 0.7 - Venus 7 1 1100 0.9 - EMB 9 1 1300 1.0 - Mars 26 1 9000 2.5 - Jupiter 78 6 82000 8.2 - Saturn 87 14 263000 24.6 - Uranus 86 7 661000 27.4 - Neptune 11 2 248000 21.4 - - 6) The present SOFA re-implementation of the original Simon et al. - Fortran code differs from the original in the following respects: - - * C instead of Fortran. - - * The date is supplied in two parts. - - * The result is returned only in equatorial Cartesian form; - the ecliptic longitude, latitude and radius vector are not - returned. - - * The result is in the J2000.0 equatorial frame, not ecliptic. - - * More is done in-line: there are fewer calls to subroutines. - - * Different error/warning status values are used. - - * A different Kepler's-equation-solver is used (avoiding - use of double precision complex). - - * Polynomials in t are nested to minimize rounding errors. - - * Explicit double constants are used to avoid mixed-mode - expressions. - - None of the above changes affects the result significantly. - - 7) The returned status indicates the most serious condition - encountered during execution of the function. Illegal np is - considered the most serious, overriding failure to converge, - which in turn takes precedence over the remote date warning. - -Called: - Anpm normalize angle into range +/- pi - -Reference: Simon, J.L, Bretagnon, P., Chapront, J., - Chapront-Touze, M., Francou, G., and Laskar, J., - Astron.Astrophys., 282, 663 (1994). -*/ -func Plan94(date1, date2 float64, np int, pv *[2][3]float64) int { - /* Gaussian constant */ - const GK = 0.017202098950 - - /* Sin and cos of J2000.0 mean obliquity (IAU 1976) */ - const SINEPS = 0.3977771559319137 - const COSEPS = 0.9174820620691818 - - /* Maximum number of iterations allowed to solve Kepler's equation */ - const KMAX = 10 - - var jstat, i, k int - var t, da, dl, de, dp, di, dom, dmu, arga, argl, am, - ae, dae, ae2, at, r, v, si2, xq, xp, tl, xsw, - xcw, xm2, xf, ci2, xms, xmc, xpxq2, x, y, z float64 - - /* Planetary inverse masses */ - amas := []float64{6023600.0, /* Mercury */ - 408523.5, /* Venus */ - 328900.5, /* EMB */ - 3098710.0, /* Mars */ - 1047.355, /* Jupiter */ - 3498.5, /* Saturn */ - 22869.0, /* Uranus */ - 19314.0} /* Neptune */ - - /* - Tables giving the mean Keplerian elements, limited to t^2 terms: - - a semi-major axis (au) - dlm mean longitude (degree and arcsecond) - e eccentricity - pi longitude of the perihelion (degree and arcsecond) - dinc inclination (degree and arcsecond) - omega longitude of the ascending node (degree and arcsecond) - */ - - a := [][3]float64{ - {0.3870983098, 0.0, 0.0}, /* Mercury */ - {0.7233298200, 0.0, 0.0}, /* Venus */ - {1.0000010178, 0.0, 0.0}, /* EMB */ - {1.5236793419, 3e-10, 0.0}, /* Mars */ - {5.2026032092, 19132e-10, -39e-10}, /* Jupiter */ - {9.5549091915, -0.0000213896, 444e-10}, /* Saturn */ - {19.2184460618, -3716e-10, 979e-10}, /* Uranus */ - {30.1103868694, -16635e-10, 686e-10}, /* Neptune */ - } - - dlm := [][3]float64{ - {252.25090552, 5381016286.88982, -1.92789}, - {181.97980085, 2106641364.33548, 0.59381}, - {100.46645683, 1295977422.83429, -2.04411}, - {355.43299958, 689050774.93988, 0.94264}, - {34.35151874, 109256603.77991, -30.60378}, - {50.07744430, 43996098.55732, 75.61614}, - {314.05500511, 15424811.93933, -1.75083}, - {304.34866548, 7865503.20744, 0.21103}, - } - - e := [][3]float64{ - {0.2056317526, 0.0002040653, -28349e-10}, - {0.0067719164, -0.0004776521, 98127e-10}, - {0.0167086342, -0.0004203654, -0.0000126734}, - {0.0934006477, 0.0009048438, -80641e-10}, - {0.0484979255, 0.0016322542, -0.0000471366}, - {0.0555481426, -0.0034664062, -0.0000643639}, - {0.0463812221, -0.0002729293, 0.0000078913}, - {0.0094557470, 0.0000603263, 0.0}, - } - - pi := [][3]float64{ - {77.45611904, 5719.11590, -4.83016}, - {131.56370300, 175.48640, -498.48184}, - {102.93734808, 11612.35290, 53.27577}, - {336.06023395, 15980.45908, -62.32800}, - {14.33120687, 7758.75163, 259.95938}, - {93.05723748, 20395.49439, 190.25952}, - {173.00529106, 3215.56238, -34.09288}, - {48.12027554, 1050.71912, 27.39717}, - } - - dinc := [][3]float64{ - {7.00498625, -214.25629, 0.28977}, - {3.39466189, -30.84437, -11.67836}, - {0.0, 469.97289, -3.35053}, - {1.84972648, -293.31722, -8.11830}, - {1.30326698, -71.55890, 11.95297}, - {2.48887878, 91.85195, -17.66225}, - {0.77319689, -60.72723, 1.25759}, - {1.76995259, 8.12333, 0.08135}, - } - - omega := [][3]float64{ - {48.33089304, -4515.21727, -31.79892}, - {76.67992019, -10008.48154, -51.32614}, - {174.87317577, -8679.27034, 15.34191}, - {49.55809321, -10620.90088, -230.57416}, - {100.46440702, 6362.03561, 326.52178}, - {113.66550252, -9240.19942, -66.23743}, - {74.00595701, 2669.15033, 145.93964}, - {131.78405702, -221.94322, -0.78728}, - } - - /* Tables for trigonometric terms to be added to the mean elements of */ - /* the semi-major axes */ - - kp := [][9]float64{ - {69613, 75645, 88306, 59899, 15746, 71087, 142173, 3086, 0}, - {21863, 32794, 26934, 10931, 26250, 43725, 53867, 28939, 0}, - {16002, 21863, 32004, 10931, 14529, 16368, 15318, 32794, 0}, - {6345, 7818, 15636, 7077, 8184, 14163, 1107, 4872, 0}, - {1760, 1454, 1167, 880, 287, 2640, 19, 2047, 1454}, - {574, 0, 880, 287, 19, 1760, 1167, 306, 574}, - {204, 0, 177, 1265, 4, 385, 200, 208, 204}, - {0, 102, 106, 4, 98, 1367, 487, 204, 0}, - } - - ca := [][9]float64{ - {4, -13, 11, -9, -9, -3, -1, 4, 0}, - {-156, 59, -42, 6, 19, -20, -10, -12, 0}, - {64, -152, 62, -8, 32, -41, 19, -11, 0}, - {124, 621, -145, 208, 54, -57, 30, 15, 0}, - {-23437, -2634, 6601, 6259, -1507, -1821, 2620, -2115, -1489}, - {62911, -119919, 79336, 17814, -24241, 12068, 8306, -4893, 8902}, - {389061, -262125, -44088, 8387, -22976, -2093, -615, -9720, 6633}, - {-412235, -157046, -31430, 37817, -9740, -13, -7449, 9644, 0}, - } - - sa := [][9]float64{ - {-29, -1, 9, 6, -6, 5, 4, 0, 0}, - {-48, -125, -26, -37, 18, -13, -20, -2, 0}, - {-150, -46, 68, 54, 14, 24, -28, 22, 0}, - {-621, 532, -694, -20, 192, -94, 71, -73, 0}, - {-14614, -19828, -5869, 1881, -4372, -2255, 782, 930, 913}, - {139737, 0, 24667, 51123, -5102, 7429, -4095, -1976, -9566}, - {-138081, 0, 37205, -49039, -41901, -33872, -27037, -12474, 18797}, - {0, 28492, 133236, 69654, 52322, -49577, -26430, -3593, 0}, - } - - /* Tables giving the trigonometric terms to be added to the mean */ - /* elements of the mean longitudes */ - - kq := [][10]float64{ - {3086, 15746, 69613, 59899, 75645, 88306, 12661, 2658, 0, 0}, - {21863, 32794, 10931, 73, 4387, 26934, 1473, 2157, 0, 0}, - {10, 16002, 21863, 10931, 1473, 32004, 4387, 73, 0, 0}, - {10, 6345, 7818, 1107, 15636, 7077, 8184, 532, 10, 0}, - {19, 1760, 1454, 287, 1167, 880, 574, 2640, 19, 1454}, - {19, 574, 287, 306, 1760, 12, 31, 38, 19, 574}, - {4, 204, 177, 8, 31, 200, 1265, 102, 4, 204}, - {4, 102, 106, 8, 98, 1367, 487, 204, 4, 102}, - } - - cl := [][10]float64{ - {21, -95, -157, 41, -5, 42, 23, 30, 0, 0}, - {-160, -313, -235, 60, -74, -76, -27, 34, 0, 0}, - {-325, -322, -79, 232, -52, 97, 55, -41, 0, 0}, - {2268, -979, 802, 602, -668, -33, 345, 201, -55, 0}, - {7610, -4997, -7689, -5841, -2617, 1115, -748, -607, 6074, 354}, - {-18549, 30125, 20012, -730, 824, 23, 1289, -352, -14767, -2062}, - {-135245, -14594, 4197, -4030, -5630, -2898, 2540, -306, 2939, 1986}, - {89948, 2103, 8963, 2695, 3682, 1648, 866, -154, -1963, -283}, - } - - sl := [][10]float64{ - {-342, 136, -23, 62, 66, -52, -33, 17, 0, 0}, - {524, -149, -35, 117, 151, 122, -71, -62, 0, 0}, - {-105, -137, 258, 35, -116, -88, -112, -80, 0, 0}, - {854, -205, -936, -240, 140, -341, -97, -232, 536, 0}, - {-56980, 8016, 1012, 1448, -3024, -3710, 318, 503, 3767, 577}, - {138606, -13478, -4964, 1441, -1319, -1482, 427, 1236, -9167, -1918}, - {71234, -41116, 5334, -4935, -1848, 66, 434, -1748, 3780, -701}, - {-47645, 11647, 2166, 3194, 679, 0, -244, -419, -2531, 48}, - } - - /* ------------------------------------------------------------------ */ - - /* Validate the planet number. */ - if (np < 1) || (np > 8) { - jstat = -1 - - /* Reset the result in case of failure. */ - for k = 0; k < 2; k++ { - for i = 0; i < 3; i++ { - pv[k][i] = 0.0 - } - } - - } else { - - /* Decrement the planet number to start at zero. */ - np-- - - /* Time: Julian millennia since J2000.0. */ - t = ((date1 - DJ00) + date2) / DJM - - /* OK status unless remote date. */ - // jstat = fabs(t) <= 1.0 ? 0 : 1; - if fabs(t) <= 1.0 { - jstat = 0 - } else { - jstat = 1 - } - - /* Compute the mean elements. */ - da = a[np][0] + - (a[np][1]+ - a[np][2]*t)*t - dl = (3600.0*dlm[np][0] + - (dlm[np][1]+ - dlm[np][2]*t)*t) * DAS2R - de = e[np][0] + - (e[np][1]+ - e[np][2]*t)*t - dp = Anpm((3600.0*pi[np][0] + - (pi[np][1]+ - pi[np][2]*t)*t) * DAS2R) - di = (3600.0*dinc[np][0] + - (dinc[np][1]+ - dinc[np][2]*t)*t) * DAS2R - dom = Anpm((3600.0*omega[np][0] + - (omega[np][1]+ - omega[np][2]*t)*t) * DAS2R) - - /* Apply the trigonometric terms. */ - dmu = 0.35953620 * t - for k = 0; k < 8; k++ { - arga = kp[np][k] * dmu - argl = kq[np][k] * dmu - da += (ca[np][k]*cos(arga) + - sa[np][k]*sin(arga)) * 1e-7 - dl += (cl[np][k]*cos(argl) + - sl[np][k]*sin(argl)) * 1e-7 - } - arga = kp[np][8] * dmu - da += t * (ca[np][8]*cos(arga) + - sa[np][8]*sin(arga)) * 1e-7 - for k = 8; k < 10; k++ { - argl = kq[np][k] * dmu - dl += t * (cl[np][k]*cos(argl) + - sl[np][k]*sin(argl)) * 1e-7 - } - dl = fmod(dl, D2PI) - - /* Iterative soln. of Kepler's equation to get eccentric anomaly. */ - am = dl - dp - ae = am + de*sin(am) - k = 0 - dae = 1.0 - for k < KMAX && fabs(dae) > 1e-12 { - dae = (am - ae + de*sin(ae)) / (1.0 - de*cos(ae)) - ae += dae - k++ - if k == KMAX-1 { - jstat = 2 - } - } - - /* True anomaly. */ - ae2 = ae / 2.0 - at = 2.0 * atan2(sqrt((1.0+de)/(1.0-de))*sin(ae2), - cos(ae2)) - - /* Distance (au) and speed (radians per day). */ - r = da * (1.0 - de*cos(ae)) - v = GK * sqrt((1.0+1.0/amas[np])/(da*da*da)) - - si2 = sin(di / 2.0) - xq = si2 * cos(dom) - xp = si2 * sin(dom) - tl = at + dp - xsw = sin(tl) - xcw = cos(tl) - xm2 = 2.0 * (xp*xcw - xq*xsw) - xf = da / sqrt(1-de*de) - ci2 = cos(di / 2.0) - xms = (de*sin(dp) + xsw) * xf - xmc = (de*cos(dp) + xcw) * xf - xpxq2 = 2 * xp * xq - - /* Position (J2000.0 ecliptic x,y,z in au). */ - x = r * (xcw - xm2*xp) - y = r * (xsw + xm2*xq) - z = r * (-xm2 * ci2) - - /* Rotate to equatorial. */ - pv[0][0] = x - pv[0][1] = y*COSEPS - z*SINEPS - pv[0][2] = y*SINEPS + z*COSEPS - - /* Velocity (J2000.0 ecliptic xdot,ydot,zdot in au/d). */ - x = v * ((-1.0+2.0*xp*xp)*xms + xpxq2*xmc) - y = v * ((1.0-2.0*xq*xq)*xmc - xpxq2*xms) - z = v * (2.0 * ci2 * (xp*xms + xq*xmc)) - - /* Rotate to equatorial. */ - pv[1][0] = x - pv[1][1] = y*COSEPS - z*SINEPS - pv[1][2] = y*SINEPS + z*COSEPS - - } - - /* Return the status. */ - return jstat -} diff --git a/vendor/github.com/hebl/gofa/erast.go b/vendor/github.com/hebl/gofa/erast.go deleted file mode 100644 index 74639d1..0000000 --- a/vendor/github.com/hebl/gofa/erast.go +++ /dev/null @@ -1,1263 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -// Earth Rotation and Sidereal Time - -/* -Ee00 Equation of the equinoxes, IAU 2000 - -The equation of the equinoxes, compatible with IAU 2000 resolutions, -given the nutation in longitude and the mean obliquity. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - epsa float64 mean obliquity (Note 2) - dpsi float64 nutation in longitude (Note 3) - -Returned (function value): - float64 equation of the equinoxes (Note 4) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The obliquity, in radians, is mean of date. - - 3) The result, which is in radians, operates in the following sense: - - Greenwich apparent ST = GMST + equation of the equinoxes - - 4) The result is compatible with the IAU 2000 resolutions. For - further details, see IERS Conventions 2003 and Capitaine et al. - (2002). - -Called: - Eect00 equation of the equinoxes complementary terms - -References: - - Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to - implement the IAU 2000 definition of UT1", Astronomy & - Astrophysics, 406, 1135-1149 (2003) - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func Ee00(date1, date2 float64, epsa, dpsi float64) float64 { - var ee float64 - - /* Equation of the equinoxes. */ - ee = dpsi*cos(epsa) + Eect00(date1, date2) - - return ee -} - -/* -Ee00a Equation of the equinoxes, IAU 2000A - -Equation of the equinoxes, compatible with IAU 2000 resolutions. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned (function value): - float64 equation of the equinoxes (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The result, which is in radians, operates in the following sense: - - Greenwich apparent ST = GMST + equation of the equinoxes - - 3) The result is compatible with the IAU 2000 resolutions. For - further details, see IERS Conventions 2003 and Capitaine et al. - (2002). - -Called: - Pr00 IAU 2000 precession adjustments - Obl80 mean obliquity, IAU 1980 - Nut00a nutation, IAU 2000A - Ee00 equation of the equinoxes, IAU 2000 - -References: - - Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to - implement the IAU 2000 definition of UT1", Astronomy & - Astrophysics, 406, 1135-1149 (2003). - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004). -*/ -func Ee00a(date1, date2 float64) float64 { - var dpsipr, depspr, epsa, dpsi, deps, ee float64 - - /* IAU 2000 precession-rate adjustments. */ - Pr00(date1, date2, &dpsipr, &depspr) - - /* Mean obliquity, consistent with IAU 2000 precession-nutation. */ - epsa = Obl80(date1, date2) + depspr - - /* Nutation in longitude. */ - Nut00a(date1, date2, &dpsi, &deps) - - /* Equation of the equinoxes. */ - ee = Ee00(date1, date2, epsa, dpsi) - - return ee -} - -/* -Ee00b Equation of the equinoxes, IAU 2000B - -Equation of the equinoxes, compatible with IAU 2000 resolutions but -using the truncated nutation model IAU 2000B. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned (function value): - float64 equation of the equinoxes (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The result, which is in radians, operates in the following sense: - - Greenwich apparent ST = GMST + equation of the equinoxes - - 3) The result is compatible with the IAU 2000 resolutions except - that accuracy has been compromised (1 mas) for the sake of speed. - For further details, see McCarthy & Luzum (2003), IERS - Conventions 2003 and Capitaine et al. (2003). - -Called: - Pr00 IAU 2000 precession adjustments - Obl80 mean obliquity, IAU 1980 - Nut00b nutation, IAU 2000B - Ee00 equation of the equinoxes, IAU 2000 - -References: - - Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to - implement the IAU 2000 definition of UT1", Astronomy & - Astrophysics, 406, 1135-1149 (2003) - - McCarthy, D.D. & Luzum, B.J., "An abridged model of the - precession-nutation of the celestial pole", Celestial Mechanics & - Dynamical Astronomy, 85, 37-49 (2003) - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func Ee00b(date1, date2 float64) float64 { - var dpsipr, depspr, epsa, dpsi, deps, ee float64 - - /* IAU 2000 precession-rate adjustments. */ - Pr00(date1, date2, &dpsipr, &depspr) - - /* Mean obliquity, consistent with IAU 2000 precession-nutation. */ - epsa = Obl80(date1, date2) + depspr - - /* Nutation in longitude. */ - Nut00b(date1, date2, &dpsi, &deps) - - /* Equation of the equinoxes. */ - ee = Ee00(date1, date2, epsa, dpsi) - - return ee -} - -/* -Ee06a Equation of the equinoxes, IAU 2006/2000A - -Equation of the equinoxes, compatible with IAU 2000 resolutions and -IAU 2006/2000A precession-nutation. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned (function value): - float64 equation of the equinoxes (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The result, which is in radians, operates in the following sense: - - Greenwich apparent ST = GMST + equation of the equinoxes - -Called: - Anpm normalize angle into range +/- pi - Gst06a Greenwich apparent sidereal time, IAU 2006/2000A - Gmst06 Greenwich mean sidereal time, IAU 2006 - -Reference: - - McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003), - IERS Technical Note No. 32, BKG -*/ -func Ee06a(date1, date2 float64) float64 { - var gst06a, gmst06, ee float64 - - /* Apparent and mean sidereal times. */ - gst06a = Gst06a(0.0, 0.0, date1, date2) - gmst06 = Gmst06(0.0, 0.0, date1, date2) - - /* Equation of the equinoxes. */ - ee = Anpm(gst06a - gmst06) - - return ee - -} - -/* -Eect00 Equation of the equinoxes complementary terms, consistent with -IAU 2000 resolutions. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned (function value): - float64 complementary terms (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The "complementary terms" are part of the equation of the - equinoxes (EE), classically the difference between apparent and - mean Sidereal Time: - - GAST = GMST + EE - - with: - - EE = dpsi * cos(eps) - - where dpsi is the nutation in longitude and eps is the obliquity - of date. However, if the rotation of the Earth were constant in - an inertial frame the classical formulation would lead to - apparent irregularities in the UT1 timescale traceable to side- - effects of precession-nutation. In order to eliminate these - effects from UT1, "complementary terms" were introduced in 1994 - (IAU, 1994) and took effect from 1997 (Capitaine and Gontier, - 1993): - - GAST = GMST + CT + EE - - By convention, the complementary terms are included as part of - the equation of the equinoxes rather than as part of the mean - Sidereal Time. This slightly compromises the "geometrical" - interpretation of mean sidereal time but is otherwise - inconsequential. - - The present function computes CT in the above expression, - compatible with IAU 2000 resolutions (Capitaine et al., 2002, and - IERS Conventions 2003). - -Called: - Fal03 mean anomaly of the Moon - Falp03 mean anomaly of the Sun - Faf03 mean argument of the latitude of the Moon - Fad03 mean elongation of the Moon from the Sun - Faom03 mean longitude of the Moon's ascending node - Fave03 mean longitude of Venus - Fae03 mean longitude of Earth - Fapa03 general accumulated precession in longitude - -References: - - Capitaine, N. & Gontier, A.-M., Astron.Astrophys., 275, - 645-650 (1993) - - Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to - implement the IAU 2000 definition of UT1", Astron.Astrophys., 406, - 1135-1149 (2003) - - IAU Resolution C7, Recommendation 3 (1994) - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func Eect00(date1, date2 float64) float64 { - /* Time since J2000.0, in Julian centuries */ - var t float64 - - /* Miscellaneous */ - var i, j int - var a, s0, s1 float64 - - /* Fundamental arguments */ - var fa [14]float64 - - /* Returned value. */ - var eect float64 - - /* ----------------------------------------- */ - /* The series for the EE complementary terms */ - /* ----------------------------------------- */ - - type TERM struct { - nfa [8]int /* coefficients of l,l',F,D,Om,LVe,LE,pA */ - s, c float64 /* sine and cosine coefficients */ - } - - /* Terms of order t^0 */ - e0 := []TERM{ - - /* 1-10 */ - {[8]int{0, 0, 0, 0, 1, 0, 0, 0}, 2640.96e-6, -0.39e-6}, - {[8]int{0, 0, 0, 0, 2, 0, 0, 0}, 63.52e-6, -0.02e-6}, - {[8]int{0, 0, 2, -2, 3, 0, 0, 0}, 11.75e-6, 0.01e-6}, - {[8]int{0, 0, 2, -2, 1, 0, 0, 0}, 11.21e-6, 0.01e-6}, - {[8]int{0, 0, 2, -2, 2, 0, 0, 0}, -4.55e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 3, 0, 0, 0}, 2.02e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 1, 0, 0, 0}, 1.98e-6, 0.00e-6}, - {[8]int{0, 0, 0, 0, 3, 0, 0, 0}, -1.72e-6, 0.00e-6}, - {[8]int{0, 1, 0, 0, 1, 0, 0, 0}, -1.41e-6, -0.01e-6}, - {[8]int{0, 1, 0, 0, -1, 0, 0, 0}, -1.26e-6, -0.01e-6}, - - /* 11-20 */ - {[8]int{1, 0, 0, 0, -1, 0, 0, 0}, -0.63e-6, 0.00e-6}, - {[8]int{1, 0, 0, 0, 1, 0, 0, 0}, -0.63e-6, 0.00e-6}, - {[8]int{0, 1, 2, -2, 3, 0, 0, 0}, 0.46e-6, 0.00e-6}, - {[8]int{0, 1, 2, -2, 1, 0, 0, 0}, 0.45e-6, 0.00e-6}, - {[8]int{0, 0, 4, -4, 4, 0, 0, 0}, 0.36e-6, 0.00e-6}, - {[8]int{0, 0, 1, -1, 1, -8, 12, 0}, -0.24e-6, -0.12e-6}, - {[8]int{0, 0, 2, 0, 0, 0, 0, 0}, 0.32e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 2, 0, 0, 0}, 0.28e-6, 0.00e-6}, - {[8]int{1, 0, 2, 0, 3, 0, 0, 0}, 0.27e-6, 0.00e-6}, - {[8]int{1, 0, 2, 0, 1, 0, 0, 0}, 0.26e-6, 0.00e-6}, - - /* 21-30 */ - {[8]int{0, 0, 2, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6}, - {[8]int{0, 1, -2, 2, -3, 0, 0, 0}, 0.19e-6, 0.00e-6}, - {[8]int{0, 1, -2, 2, -1, 0, 0, 0}, 0.18e-6, 0.00e-6}, - {[8]int{0, 0, 0, 0, 0, 8, -13, -1}, -0.10e-6, 0.05e-6}, - {[8]int{0, 0, 0, 2, 0, 0, 0, 0}, 0.15e-6, 0.00e-6}, - {[8]int{2, 0, -2, 0, -1, 0, 0, 0}, -0.14e-6, 0.00e-6}, - {[8]int{1, 0, 0, -2, 1, 0, 0, 0}, 0.14e-6, 0.00e-6}, - {[8]int{0, 1, 2, -2, 2, 0, 0, 0}, -0.14e-6, 0.00e-6}, - {[8]int{1, 0, 0, -2, -1, 0, 0, 0}, 0.14e-6, 0.00e-6}, - {[8]int{0, 0, 4, -2, 4, 0, 0, 0}, 0.13e-6, 0.00e-6}, - - /* 31-33 */ - {[8]int{0, 0, 2, -2, 4, 0, 0, 0}, -0.11e-6, 0.00e-6}, - {[8]int{1, 0, -2, 0, -3, 0, 0, 0}, 0.11e-6, 0.00e-6}, - {[8]int{1, 0, -2, 0, -1, 0, 0, 0}, 0.11e-6, 0.00e-6}, - } - - /* Terms of order t^1 */ - e1 := []TERM{ - {[8]int{0, 0, 0, 0, 1, 0, 0, 0}, -0.87e-6, 0.00e-6}, - } - - /* Number of terms in the series */ - NE0 := len(e0) - NE1 := len(e1) - - /* ------------------------------------------------------------------ */ - - /* Interval between fundamental epoch J2000.0 and current date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* Fundamental Arguments (from IERS Conventions 2003) */ - - /* Mean anomaly of the Moon. */ - fa[0] = Fal03(t) - - /* Mean anomaly of the Sun. */ - fa[1] = Falp03(t) - - /* Mean longitude of the Moon minus that of the ascending node. */ - fa[2] = Faf03(t) - - /* Mean elongation of the Moon from the Sun. */ - fa[3] = Fad03(t) - - /* Mean longitude of the ascending node of the Moon. */ - fa[4] = Faom03(t) - - /* Mean longitude of Venus. */ - fa[5] = Fave03(t) - - /* Mean longitude of Earth. */ - fa[6] = Fae03(t) - - /* General precession in longitude. */ - fa[7] = Fapa03(t) - - /* Evaluate the EE complementary terms. */ - s0 = 0.0 - s1 = 0.0 - - for i = NE0 - 1; i >= 0; i-- { - a = 0.0 - for j = 0; j < 8; j++ { - a += float64(e0[i].nfa[j]) * fa[j] - } - s0 += e0[i].s*sin(a) + e0[i].c*cos(a) - } - - for i = NE1 - 1; i >= 0; i-- { - a = 0.0 - for j = 0; j < 8; j++ { - a += float64(e1[i].nfa[j]) * fa[j] - } - s1 += e1[i].s*sin(a) + e1[i].c*cos(a) - } - - eect = (s0 + s1*t) * DAS2R - - return eect -} - -/* -Eqeq94 Equation of the equinoxes, IAU 1994 - -Equation of the equinoxes, IAU 1994 model. - -Given: - date1,date2 float64 TDB date (Note 1) - -Returned (function value): - float64 equation of the equinoxes (Note 2) - -Notes: - - 1) The date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The result, which is in radians, operates in the following sense: - - Greenwich apparent ST = GMST + equation of the equinoxes - -Called: - Anpm normalize angle into range +/- pi - Nut80 nutation, IAU 1980 - Obl80 mean obliquity, IAU 1980 - -References: - - IAU Resolution C7, Recommendation 3 (1994). - - Capitaine, N. & Gontier, A.-M., 1993, Astron.Astrophys., 275, - 645-650. -*/ -func Eqeq94(date1, date2 float64) float64 { - var t, om, dpsi, deps, eps0, ee float64 - - /* Interval between fundamental epoch J2000.0 and given date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* Longitude of the mean ascending node of the lunar orbit on the */ - /* ecliptic, measured from the mean equinox of date. */ - om = Anpm((450160.280+(-482890.539+ - (7.455+0.008*t)*t)*t)*DAS2R + - fmod(-5.0*t, 1.0)*D2PI) - - /* Nutation components and mean obliquity. */ - Nut80(date1, date2, &dpsi, &deps) - eps0 = Obl80(date1, date2) - - /* Equation of the equinoxes. */ - ee = dpsi*cos(eps0) + DAS2R*(0.00264*sin(om)+0.000063*sin(om+om)) - - return ee -} - -/* -Era00 Earth Rotation Angle, IAU 2000 - -Given: - dj1,dj2 float64 UT1 as a 2-part Julian Date (see note) - -Returned (function value): - float64 Earth rotation angle (radians), range 0-2pi - -Notes: - - 1) The UT1 date dj1+dj2 is a Julian Date, apportioned in any - convenient way between the arguments dj1 and dj2. For example, - JD(UT1)=2450123.7 could be expressed in any of these ways, - among others: - - dj1 dj2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 and MJD methods are good compromises - between resolution and convenience. The date & time method is - best matched to the algorithm used: maximum precision is - delivered when the dj1 argument is for 0hrs UT1 on the day in - question and the dj2 argument lies in the range 0 to 1, or vice - versa. - - 2) The algorithm is adapted from Expression 22 of Capitaine et al. - 2000. The time argument has been expressed in days directly, - and, to retain precision, integer contributions have been - eliminated. The same formulation is given in IERS Conventions - (2003), Chap. 5, Eq. 14. - -Called: - Anp normalize angle into range 0 to 2pi - -References: - - Capitaine N., Guinot B. and McCarthy D.D, 2000, Astron. - Astrophys., 355, 398-405. - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func Era00(dj1, dj2 float64) float64 { - var d1, d2, t, f, theta float64 - - /* Days since fundamental epoch. */ - if dj1 < dj2 { - d1 = dj1 - d2 = dj2 - } else { - d1 = dj2 - d2 = dj1 - } - t = d1 + (d2 - DJ00) - - /* Fractional part of T (days). */ - f = fmod(d1, 1.0) + fmod(d2, 1.0) - - /* Earth rotation angle at this UT1. */ - theta = Anp(D2PI * (f + 0.7790572732640 + 0.00273781191135448*t)) - - return theta - -} - -/* -Gmst00 Greenwich Mean Sidereal Time, IAU 2000 - -Greenwich mean sidereal time (model consistent with IAU 2000 -resolutions). - -Given: - uta,utb float64 UT1 as a 2-part Julian Date (Notes 1,2) - tta,ttb float64 TT as a 2-part Julian Date (Notes 1,2) - -Returned (function value): - float64 Greenwich mean sidereal time (radians) - -Notes: - - 1) The UT1 and TT dates uta+utb and tta+ttb respectively, are both - Julian Dates, apportioned in any convenient way between the - argument pairs. For example, JD(UT1)=2450123.7 could be - expressed in any of these ways, among others: - - Part A Part B - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable (in the case of UT; the TT is not at all critical - in this respect). The J2000 and MJD methods are good compromises - between resolution and convenience. For UT, the date & time - method is best matched to the algorithm that is used by the Earth - Rotation Angle function, called internally: maximum precision is - delivered when the uta argument is for 0hrs UT1 on the day in - question and the utb argument lies in the range 0 to 1, or vice - versa. - - 2) Both UT1 and TT are required, UT1 to predict the Earth rotation - and TT to predict the effects of precession. If UT1 is used for - both purposes, errors of order 100 microarcseconds result. - - 3) This GMST is compatible with the IAU 2000 resolutions and must be - used only in conjunction with other IAU 2000 compatible - components such as precession-nutation and equation of the - equinoxes. - - 4) The result is returned in the range 0 to 2pi. - - 5) The algorithm is from Capitaine et al. (2003) and IERS - Conventions 2003. - -Called: - Era00 Earth rotation angle, IAU 2000 - Anp normalize angle into range 0 to 2pi - -References: - - Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to - implement the IAU 2000 definition of UT1", Astronomy & - Astrophysics, 406, 1135-1149 (2003) - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func Gmst00(uta, utb float64, tta, ttb float64) float64 { - var t, gmst float64 - - /* TT Julian centuries since J2000.0. */ - t = ((tta - DJ00) + ttb) / DJC - - /* Greenwich Mean Sidereal Time, IAU 2000. */ - gmst = Anp(Era00(uta, utb) + - (0.014506+ - (4612.15739966+ - (1.39667721+ - (-0.00009344+ - (0.00001882)*t)*t)*t)*t)*DAS2R) - - return gmst -} - -/* -Gmst06 Greenwich Mean Sidereal Time, IAU 2006 - -Greenwich mean sidereal time (consistent with IAU 2006 precession). - -Given: - uta,utb float64 UT1 as a 2-part Julian Date (Notes 1,2) - tta,ttb float64 TT as a 2-part Julian Date (Notes 1,2) - -Returned (function value): - float64 Greenwich mean sidereal time (radians) - -Notes: - - 1) The UT1 and TT dates uta+utb and tta+ttb respectively, are both - Julian Dates, apportioned in any convenient way between the - argument pairs. For example, JD=2450123.7 could be expressed in - any of these ways, among others: - - Part A Part B - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable (in the case of UT; the TT is not at all critical - in this respect). The J2000 and MJD methods are good compromises - between resolution and convenience. For UT, the date & time - method is best matched to the algorithm that is used by the Earth - rotation angle function, called internally: maximum precision is - delivered when the uta argument is for 0hrs UT1 on the day in - question and the utb argument lies in the range 0 to 1, or vice - versa. - - 2) Both UT1 and TT are required, UT1 to predict the Earth rotation - and TT to predict the effects of precession. If UT1 is used for - both purposes, errors of order 100 microarcseconds result. - - 3) This GMST is compatible with the IAU 2006 precession and must not - be used with other precession models. - - 4) The result is returned in the range 0 to 2pi. - -Called: - Era00 Earth rotation angle, IAU 2000 - Anp normalize angle into range 0 to 2pi - -Reference: - - Capitaine, N., Wallace, P.T. & Chapront, J., 2005, - Astron.Astrophys. 432, 355 -*/ -func Gmst06(uta, utb float64, tta, ttb float64) float64 { - var t, gmst float64 - - /* TT Julian centuries since J2000.0. */ - t = ((tta - DJ00) + ttb) / DJC - - /* Greenwich mean sidereal time, IAU 2006. */ - gmst = Anp(Era00(uta, utb) + - (0.014506+ - (4612.156534+ - (1.3915817+ - (-0.00000044+ - (-0.000029956+ - (-0.0000000368)*t)*t)*t)*t)*t)*DAS2R) - - return gmst -} - -/* -Gmst82 Greenwich Mean Sidereal Time, IAU 1982 - -Universal Time to Greenwich mean sidereal time (IAU 1982 model). - -Given: - dj1,dj2 float64 UT1 Julian Date (see note) - -Returned (function value): - float64 Greenwich mean sidereal time (radians) - -Notes: - - 1) The UT1 date dj1+dj2 is a Julian Date, apportioned in any - convenient way between the arguments dj1 and dj2. For example, - JD(UT1)=2450123.7 could be expressed in any of these ways, - among others: - - dj1 dj2 - - 2450123.7 0 (JD method) - 2451545 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 and MJD methods are good compromises - between resolution and convenience. The date & time method is - best matched to the algorithm used: maximum accuracy (or, at - least, minimum noise) is delivered when the dj1 argument is for - 0hrs UT1 on the day in question and the dj2 argument lies in the - range 0 to 1, or vice versa. - - 2) The algorithm is based on the IAU 1982 expression. This is - always described as giving the GMST at 0 hours UT1. In fact, it - gives the difference between the GMST and the UT, the steady - 4-minutes-per-day drawing-ahead of ST with respect to UT. When - whole days are ignored, the expression happens to equal the GMST - at 0 hours UT1 each day. - - 3) In this function, the entire UT1 (the sum of the two arguments - dj1 and dj2) is used directly as the argument for the standard - formula, the constant term of which is adjusted by 12 hours to - take account of the noon phasing of Julian Date. The UT1 is then - added, but omitting whole days to conserve accuracy. - -Called: - Anp normalize angle into range 0 to 2pi - -References: - - Transactions of the International Astronomical Union, - XVIII B, 67 (1983). - - Aoki et al., Astron.Astrophys., 105, 359-361 (1982). -*/ -func Gmst82(dj1, dj2 float64) float64 { - /* Coefficients of IAU 1982 GMST-UT1 model */ - A := 24110.54841 - DAYSEC/2.0 - B := 8640184.812866 - C := 0.093104 - D := -6.2e-6 - - /* The first constant, A, has to be adjusted by 12 hours because the */ - /* UT1 is supplied as a Julian date, which begins at noon. */ - - var d1, d2, t, f, gmst float64 - - /* Julian centuries since fundamental epoch. */ - if dj1 < dj2 { - d1 = dj1 - d2 = dj2 - } else { - d1 = dj2 - d2 = dj1 - } - t = (d1 + (d2 - DJ00)) / DJC - - /* Fractional part of JD(UT1), in seconds. */ - f = DAYSEC * (fmod(d1, 1.0) + fmod(d2, 1.0)) - - /* GMST at this UT1. */ - gmst = Anp(DS2R * ((A + (B+(C+D*t)*t)*t) + f)) - - return gmst -} - -/* -Gst00a Greenwich Apparent Sidereal Time, IAU 2000A - -Greenwich apparent sidereal time (consistent with IAU 2000 -resolutions). - -Given: - uta,utb float64 UT1 as a 2-part Julian Date (Notes 1,2) - tta,ttb float64 TT as a 2-part Julian Date (Notes 1,2) - -Returned (function value): - float64 Greenwich apparent sidereal time (radians) - -Notes: - - 1) The UT1 and TT dates uta+utb and tta+ttb respectively, are both - Julian Dates, apportioned in any convenient way between the - argument pairs. For example, JD(UT1)=2450123.7 could be - expressed in any of these ways, among others: - - uta utb - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable (in the case of UT; the TT is not at all critical - in this respect). The J2000 and MJD methods are good compromises - between resolution and convenience. For UT, the date & time - method is best matched to the algorithm that is used by the Earth - Rotation Angle function, called internally: maximum precision is - delivered when the uta argument is for 0hrs UT1 on the day in - question and the utb argument lies in the range 0 to 1, or vice - versa. - - 2) Both UT1 and TT are required, UT1 to predict the Earth rotation - and TT to predict the effects of precession-nutation. If UT1 is - used for both purposes, errors of order 100 microarcseconds - result. - - 3) This GAST is compatible with the IAU 2000 resolutions and must be - used only in conjunction with other IAU 2000 compatible - components such as precession-nutation. - - 4) The result is returned in the range 0 to 2pi. - - 5) The algorithm is from Capitaine et al. (2003) and IERS - Conventions 2003. - -Called: - Gmst00 Greenwich mean sidereal time, IAU 2000 - Ee00a equation of the equinoxes, IAU 2000A - Anp normalize angle into range 0 to 2pi - -References: - - Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to - implement the IAU 2000 definition of UT1", Astronomy & - Astrophysics, 406, 1135-1149 (2003) - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func Gst00a(uta, utb float64, tta, ttb float64) float64 { - var gmst00, ee00a, gst float64 - - gmst00 = Gmst00(uta, utb, tta, ttb) - ee00a = Ee00a(tta, ttb) - gst = Anp(gmst00 + ee00a) - - return gst -} - -/* -Gst00b Greenwich Apparent Sidereal Time, IAU 2000B - -Greenwich apparent sidereal time (consistent with IAU 2000 -resolutions but using the truncated nutation model IAU 2000B). - -Given: - uta,utb float64 UT1 as a 2-part Julian Date (Notes 1,2) - -Returned (function value): - float64 Greenwich apparent sidereal time (radians) - -Notes: - - 1) The UT1 date uta+utb is a Julian Date, apportioned in any - convenient way between the argument pair. For example, - JD(UT1)=2450123.7 could be expressed in any of these ways, - among others: - - uta utb - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 and MJD methods are good compromises - between resolution and convenience. For UT, the date & time - method is best matched to the algorithm that is used by the Earth - Rotation Angle function, called internally: maximum precision is - delivered when the uta argument is for 0hrs UT1 on the day in - question and the utb argument lies in the range 0 to 1, or vice - versa. - - 2) The result is compatible with the IAU 2000 resolutions, except - that accuracy has been compromised for the sake of speed and - convenience in two respects: - - . UT is used instead of TDB (or TT) to compute the precession - component of GMST and the equation of the equinoxes. This - results in errors of order 0.1 mas at present. - - . The IAU 2000B abridged nutation model (McCarthy & Luzum, 2003) - is used, introducing errors of up to 1 mas. - - 3) This GAST is compatible with the IAU 2000 resolutions and must be - used only in conjunction with other IAU 2000 compatible - components such as precession-nutation. - - 4) The result is returned in the range 0 to 2pi. - - 5) The algorithm is from Capitaine et al. (2003) and IERS - Conventions 2003. - -Called: - Gmst00 Greenwich mean sidereal time, IAU 2000 - Ee00b equation of the equinoxes, IAU 2000B - Anp normalize angle into range 0 to 2pi - -References: - - Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to - implement the IAU 2000 definition of UT1", Astronomy & - Astrophysics, 406, 1135-1149 (2003) - - McCarthy, D.D. & Luzum, B.J., "An abridged model of the - precession-nutation of the celestial pole", Celestial Mechanics & - Dynamical Astronomy, 85, 37-49 (2003) - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func Gst00b(uta, utb float64) float64 { - var gmst00, ee00b, gst float64 - - gmst00 = Gmst00(uta, utb, uta, utb) - ee00b = Ee00b(uta, utb) - gst = Anp(gmst00 + ee00b) - - return gst -} - -/* -Gst06 Greenwich Apparent Sidereal Time, IAU 2006 given NPB matrix - -Given: - uta,utb float64 UT1 as a 2-part Julian Date (Notes 1,2) - tta,ttb float64 TT as a 2-part Julian Date (Notes 1,2) - rnpb [3][3]float64 nutation x precession x bias matrix - -Returned (function value): - float64 Greenwich apparent sidereal time (radians) - -Notes: - - 1) The UT1 and TT dates uta+utb and tta+ttb respectively, are both - Julian Dates, apportioned in any convenient way between the - argument pairs. For example, JD(UT1)=2450123.7 could be - expressed in any of these ways, among others: - - uta utb - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable (in the case of UT; the TT is not at all critical - in this respect). The J2000 and MJD methods are good compromises - between resolution and convenience. For UT, the date & time - method is best matched to the algorithm that is used by the Earth - rotation angle function, called internally: maximum precision is - delivered when the uta argument is for 0hrs UT1 on the day in - question and the utb argument lies in the range 0 to 1, or vice - versa. - - 2) Both UT1 and TT are required, UT1 to predict the Earth rotation - and TT to predict the effects of precession-nutation. If UT1 is - used for both purposes, errors of order 100 microarcseconds - result. - - 3) Although the function uses the IAU 2006 series for s+XY/2, it is - otherwise independent of the precession-nutation model and can in - practice be used with any equinox-based NPB matrix. - - 4) The result is returned in the range 0 to 2pi. - -Called: - Bpn2xy extract CIP X,Y coordinates from NPB matrix - S06 the CIO locator s, given X,Y, IAU 2006 - Anp normalize angle into range 0 to 2pi - Era00 Earth rotation angle, IAU 2000 - Eors equation of the origins, given NPB matrix and s - -Reference: - - Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 -*/ -func Gst06(uta, utb float64, tta, ttb float64, rnpb [3][3]float64) float64 { - var x, y, s, era, eors, gst float64 - - /* Extract CIP coordinates. */ - Bpn2xy(rnpb, &x, &y) - - /* The CIO locator, s. */ - s = S06(tta, ttb, x, y) - - /* Greenwich apparent sidereal time. */ - era = Era00(uta, utb) - eors = Eors(rnpb, s) - gst = Anp(era - eors) - - return gst -} - -/* -Gst06a Greenwich Apparent Sidereal Time, IAU 2006/2000A - -Greenwich apparent sidereal time (consistent with IAU 2000 and 2006 -resolutions). - -Given: - uta,utb float64 UT1 as a 2-part Julian Date (Notes 1,2) - tta,ttb float64 TT as a 2-part Julian Date (Notes 1,2) - -Returned (function value): - float64 Greenwich apparent sidereal time (radians) - -Notes: - - 1) The UT1 and TT dates uta+utb and tta+ttb respectively, are both - Julian Dates, apportioned in any convenient way between the - argument pairs. For example, JD(UT1)=2450123.7 could be - expressed in any of these ways, among others: - - uta utb - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable (in the case of UT; the TT is not at all critical - in this respect). The J2000 and MJD methods are good compromises - between resolution and convenience. For UT, the date & time - method is best matched to the algorithm that is used by the Earth - rotation angle function, called internally: maximum precision is - delivered when the uta argument is for 0hrs UT1 on the day in - question and the utb argument lies in the range 0 to 1, or vice - versa. - - 2) Both UT1 and TT are required, UT1 to predict the Earth rotation - and TT to predict the effects of precession-nutation. If UT1 is - used for both purposes, errors of order 100 microarcseconds - result. - - 3) This GAST is compatible with the IAU 2000/2006 resolutions and - must be used only in conjunction with IAU 2006 precession and - IAU 2000A nutation. - - 4) The result is returned in the range 0 to 2pi. - -Called: - Pnm06a classical NPB matrix, IAU 2006/2000A - Gst06 Greenwich apparent ST, IAU 2006, given NPB matrix - -Reference: - - Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 -*/ -func Gst06a(uta, utb float64, tta, ttb float64) float64 { - var rnpb [3][3]float64 - var gst float64 - - /* Classical nutation x precession x bias matrix, IAU 2000A. */ - Pnm06a(tta, ttb, &rnpb) - - /* Greenwich apparent sidereal time. */ - gst = Gst06(uta, utb, tta, ttb, rnpb) - - return gst -} - -/* -Gst94 Greenwich Apparent Sidereal Time, IAU 1994 - -Greenwich apparent sidereal time (consistent with IAU 1982/94 -resolutions). - -Given: - uta,utb float64 UT1 as a 2-part Julian Date (Notes 1,2) - -Returned (function value): - float64 Greenwich apparent sidereal time (radians) - -Notes: - - 1) The UT1 date uta+utb is a Julian Date, apportioned in any - convenient way between the argument pair. For example, - JD(UT1)=2450123.7 could be expressed in any of these ways, among - others: - - uta utb - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 and MJD methods are good compromises - between resolution and convenience. For UT, the date & time - method is best matched to the algorithm that is used by the Earth - Rotation Angle function, called internally: maximum precision is - delivered when the uta argument is for 0hrs UT1 on the day in - question and the utb argument lies in the range 0 to 1, or vice - versa. - - 2) The result is compatible with the IAU 1982 and 1994 resolutions, - except that accuracy has been compromised for the sake of - convenience in that UT is used instead of TDB (or TT) to compute - the equation of the equinoxes. - - 3) This GAST must be used only in conjunction with contemporaneous - IAU standards such as 1976 precession, 1980 obliquity and 1982 - nutation. It is not compatible with the IAU 2000 resolutions. - - 4) The result is returned in the range 0 to 2pi. - -Called: - Gmst82 Greenwich mean sidereal time, IAU 1982 - Eqeq94 equation of the equinoxes, IAU 1994 - Anp normalize angle into range 0 to 2pi - -References: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992) - - IAU Resolution C7, Recommendation 3 (1994) -*/ -func Gst94(uta, utb float64) float64 { - var gmst82, eqeq94, gst float64 - - gmst82 = Gmst82(uta, utb) - eqeq94 = Eqeq94(uta, utb) - gst = Anp(gmst82 + eqeq94) - - return gst -} diff --git a/vendor/github.com/hebl/gofa/fundargs.go b/vendor/github.com/hebl/gofa/fundargs.go deleted file mode 100644 index ad73e7f..0000000 --- a/vendor/github.com/hebl/gofa/fundargs.go +++ /dev/null @@ -1,554 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -// Fundamental Arguments (14) - -/* -Fad03 mean elongation of the Moon from the Sun. - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 D, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - is from Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 -*/ -func Fad03(t float64) float64 { - var a float64 - - /* Mean elongation of the Moon from the Sun (IERS Conventions 2003). */ - a = fmod(1072260.703692+ - t*(1602961601.2090+ - t*(-6.3706+ - t*(0.006593+ - t*(-0.00003169)))), TURNAS) * DAS2R - - return a -} - -/* -Fae03 mean longitude of Earth. - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 mean longitude of Earth, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - comes from Souchay et al. (1999) after Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 - - Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, - Astron.Astrophys.Supp.Ser. 135, 111 -*/ -func Fae03(t float64) float64 { - var a float64 - - /* Mean longitude of Earth (IERS Conventions 2003). */ - a = fmod(1.753470314+628.3075849991*t, D2PI) - - return a -} - -/* -Faf03 mean longitude of the Moon minus mean longitude of the ascending node. - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 F, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - is from Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 -*/ -func Faf03(t float64) float64 { - var a float64 - - /* Mean longitude of the Moon minus that of the ascending node */ - /* (IERS Conventions 2003). */ - a = fmod(335779.526232+ - t*(1739527262.8478+ - t*(-12.7512+ - t*(-0.001037+ - t*(0.00000417)))), TURNAS) * DAS2R - - return a -} - -/* -Faju03 Mean longitude of Jupiter - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 mean longitude of Jupiter, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - comes from Souchay et al. (1999) after Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 - - Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, - Astron.Astrophys.Supp.Ser. 135, 111 -*/ -func Faju03(t float64) float64 { - var a float64 - - /* Mean longitude of Jupiter (IERS Conventions 2003). */ - a = fmod(0.599546497+52.9690962641*t, D2PI) - - return a -} - -/* -Fal03 Mean anomaly of the Moon - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 l, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - is from Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 -*/ -func Fal03(t float64) float64 { - var a float64 - - /* Mean anomaly of the Moon (IERS Conventions 2003). */ - a = fmod(485868.249036+ - t*(1717915923.2178+ - t*(31.8792+ - t*(0.051635+ - t*(-0.00024470)))), TURNAS) * DAS2R - - return a -} - -/* -Falp03 Mean anomaly of the Sun - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 l', radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - is from Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 -*/ -func Falp03(t float64) float64 { - var a float64 - - /* Mean anomaly of the Sun (IERS Conventions 2003). */ - a = fmod(1287104.793048+ - t*(129596581.0481+ - t*(-0.5532+ - t*(0.000136+ - t*(-0.00001149)))), TURNAS) * DAS2R - - return a -} - -/* -Fama03 Mean longitude of Mars - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 mean longitude of Mars, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - comes from Souchay et al. (1999) after Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 - - Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, - Astron.Astrophys.Supp.Ser. 135, 111 -*/ -func Fama03(t float64) float64 { - var a float64 - - /* Mean longitude of Mars (IERS Conventions 2003). */ - a = fmod(6.203480913+334.0612426700*t, D2PI) - - return a -} - -/* -Fame03 Mean longitude of Mercury - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 mean longitude of Mercury, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - comes from Souchay et al. (1999) after Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 - - Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, - Astron.Astrophys.Supp.Ser. 135, 111 -*/ -func Fame03(t float64) float64 { - var a float64 - - /* Mean longitude of Mercury (IERS Conventions 2003). */ - a = fmod(4.402608842+2608.7903141574*t, D2PI) - - return a -} - -/* -Fane03 Mean longitude of Neptune - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 mean longitude of Neptune, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - is adapted from Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 -*/ -func Fane03(t float64) float64 { - var a float64 - - /* Mean longitude of Neptune (IERS Conventions 2003). */ - a = fmod(5.311886287+3.8133035638*t, D2PI) - - return a -} - -/* -Faom03 Mean longitude of the Moon's ascending node - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 Omega, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - is from Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J., 1994, Astron.Astrophys. 282, 663-683. -*/ -func Faom03(t float64) float64 { - var a float64 - - /* Mean longitude of the Moon's ascending node */ - /* (IERS Conventions 2003). */ - a = fmod(450160.398036+ - t*(-6962890.5431+ - t*(7.4722+ - t*(0.007702+ - t*(-0.00005939)))), TURNAS) * DAS2R - - return a -} - -/* -Fapa03 General accumulated precession in longitude - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 general precession in longitude, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003). It - is taken from Kinoshita & Souchay (1990) and comes originally - from Lieske et al. (1977). - -References: - - Kinoshita, H. and Souchay J. 1990, Celest.Mech. and Dyn.Astron. - 48, 187 - - Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977, - Astron.Astrophys. 58, 1-16 - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func Fapa03(t float64) float64 { - var a float64 - - /* General accumulated precession in longitude. */ - a = (0.024381750 + 0.00000538691*t) * t - - return a -} - -/* -Fasa03 Mean longitude of Saturn - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 mean longitude of Saturn, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - comes from Souchay et al. (1999) after Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 - - Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, - Astron.Astrophys.Supp.Ser. 135, 111 -*/ -func Fasa03(t float64) float64 { - var a float64 - - /* Mean longitude of Saturn (IERS Conventions 2003). */ - a = fmod(0.874016757+21.3299104960*t, D2PI) - - return a -} - -/* -Faur03 Mean longitude of Uranus - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 mean longitude of Uranus, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - is adapted from Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 -*/ -func Faur03(t float64) float64 { - var a float64 - - /* Mean longitude of Uranus (IERS Conventions 2003). */ - a = fmod(5.481293872+7.4781598567*t, D2PI) - - return a -} - -/* -Fave03 Mean longitude of Venus - -Fundamental argument, IERS Conventions (2003) - -Given: - t float64 TDB, Julian centuries since J2000.0 (Note 1) - -Returned (function value): - float64 mean longitude of Venus, radians (Note 2) - -Notes: - - 1) Though t is strictly TDB, it is usually more convenient to use - TT, which makes no significant difference. - - 2) The expression used is as adopted in IERS Conventions (2003) and - comes from Souchay et al. (1999) after Simon et al. (1994). - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 - - Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, - Astron.Astrophys.Supp.Ser. 135, 111 -*/ -func Fave03(t float64) float64 { - var a float64 - - /* Mean longitude of Venus (IERS Conventions 2003). */ - a = fmod(3.176146697+1021.3285546211*t, D2PI) - - return a -} diff --git a/vendor/github.com/hebl/gofa/gofa.go b/vendor/github.com/hebl/gofa/gofa.go deleted file mode 100644 index ad42377..0000000 --- a/vendor/github.com/hebl/gofa/gofa.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -const ( - VERSION = 1.18 -) - -/* -ASTROM Star-independent astrometry parameters - -(Vectors Eb, Eh, Em and V are all with respect to BCRS axes.) -*/ -type ASTROM struct { - Pmt float64 /* PM time interval (SSB, Julian years) */ - Eb [3]float64 /* SSB to observer (vector, au) */ - Eh [3]float64 /* Sun to observer (unit vector) */ - Em float64 /* distance from Sun to observer (au) */ - V [3]float64 /* barycentric observer velocity (vector, c) */ - Bm1 float64 /* sqrt(1-|v|^2): reciprocal of Lorenz factor */ - Bpn [3][3]float64 /* bias-precession-nutation matrix */ - Along float64 /* longitude + s' + dERA(DUT) (radians) */ - Phi float64 /* geodetic latitude (radians) */ - Xpl float64 /* polar motion xp wrt local meridian (radians) */ - Ypl float64 /* polar motion yp wrt local meridian (radians) */ - Sphi float64 /* sine of geodetic latitude */ - Cphi float64 /* cosine of geodetic latitude */ - Diurab float64 /* magnitude of diurnal aberration vector */ - Eral float64 /* "local" Earth rotation angle (radians) */ - Refa float64 /* refraction constant A (radians) */ - Refb float64 /* refraction constant B (radians) */ -} - -/* -LDBODY Body parameters for light deflection -*/ -type LDBODY struct { - Bm float64 /* mass of the body (solar masses) */ - Dl float64 /* deflection limiter (radians^2/2) */ - Pv [2][3]float64 /* barycentric PV of the body (au, au/day) */ -} diff --git a/vendor/github.com/hebl/gofa/gofam.go b/vendor/github.com/hebl/gofa/gofam.go deleted file mode 100644 index 4ef5fd0..0000000 --- a/vendor/github.com/hebl/gofa/gofam.go +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -// Constant value and math functions - -import "math" - -// Const -const ( - /* Pi */ - DPI = 3.141592653589793238462643 - - /* 2Pi */ - D2PI = 6.283185307179586476925287 - - /* Pi/2 */ - DPI2 = 1.570796326794896619231322 - - /* Radians to degrees */ - DR2D = 57.29577951308232087679815 - - /* Degrees to radians */ - DD2R = 1.745329251994329576923691e-2 - - /* Radians to arcseconds */ - DR2AS = 206264.8062470963551564734 - - /* Arcseconds to radians */ - DAS2R = 4.848136811095359935899141e-6 - - /* Seconds of time to radians */ - DS2R = 7.272205216643039903848712e-5 - - /* Arcseconds in a full circle */ - TURNAS = 1296000.0 - - /* Milliarcseconds to radians */ - DMAS2R = (DAS2R / 1e3) - - /* Length of tropical year B1900 (days) */ - DTY = 365.242198781 - - /* Seconds per day. */ - DAYSEC = 86400.0 - - /* Days per Julian year */ - DJY = 365.25 - - /* Days per Julian century */ - DJC = 36525.0 - - /* Days per Julian millennium */ - DJM = 365250.0 - - /* Reference epoch (J2000.0), Julian Date */ - DJ00 = 2451545.0 - - /* Julian Date of Modified Julian Date zero */ - DJM0 = 2400000.5 - - /* Reference epoch (J2000.0), Modified Julian Date */ - DJM00 = 51544.5 - - /* 1977 Jan 1.0 as MJD */ - DJM77 = 43144.0 - - /* TT minus TAI (s) */ - TTMTAI = 32.184 - - /* Astronomical unit (m, IAU 2012) */ - DAU = 149597870.7e3 - - /* Speed of light (m/s) */ - CMPS = 299792458.0 - - /* Light time for 1 au (s) */ - AULT = (DAU / CMPS) - - /* Speed of light (au per day) */ - DC = (DAYSEC / AULT) - - /* L_G = 1 - d(TT)/d(TCG) */ - ELG = 6.969290134e-10 - - /* L_B = 1 - d(TDB)/d(TCB), and TDB (s) at TAI 1977/1/1.0 */ - ELB = 1.550519768e-8 - TDB0 = -6.55e-5 - - /* Schwarzschild radius of the Sun (au) */ - /* = 2 * 1.32712440041e20 / (2.99792458e8)^2 / 1.49597870700e11 */ - SRS = 1.97412574336e-8 - - /* Reference ellipsoids */ - WGS84 = 1 - GRS80 = 2 - WGS72 = 3 - - // - DBL_EPSILON = 2.220446049250313080847263336181640625e-16 -) - -/* dint(A) - truncate to nearest whole number towards zero (double) */ -func dint(A float64) float64 { - if A < 0.0 { - return math.Ceil(A) - } else { - return math.Floor(A) - } -} - -/* dnint(A) - round to nearest whole number (double) */ -func dnint(A float64) float64 { - if math.Abs(A) < 0.5 { - return 0.0 - } else { - if A < 0.0 { - return math.Ceil(A - 0.5) - } else { - return math.Floor(A + 0.5) - } - } -} - -/* dsign(A,B) - magnitude of A with sign of B (double) */ -func dsign(A, B float64) float64 { - if B < 0.0 { - return -math.Abs(A) - } else { - return math.Abs(A) - } -} - -/* max(A,B) - larger (most +ve) of two numbers (generic) */ -func gmax(A, B float64) float64 { - if A > B { - return A - } - return B -} - -/* min(A,B) - smaller (least +ve) of two numbers (generic) */ -func gmin(A, B float64) float64 { - if A < B { - return A - } - return B -} - -func abs(A int) int { - if A < 0 { - return -A - } else { - return A - } -} - -//math function -func fabs(x float64) float64 { return math.Abs(x) } -func sin(x float64) float64 { return math.Sin(x) } -func cos(x float64) float64 { return math.Cos(x) } -func tan(x float64) float64 { return math.Tan(x) } -func asin(x float64) float64 { return math.Asin(x) } -func atan(x float64) float64 { return math.Atan(x) } -func atan2(x, y float64) float64 { return math.Atan2(x, y) } -func sqrt(x float64) float64 { return math.Sqrt(x) } -func fmod(x, y float64) float64 { return math.Mod(x, y) } -func pow10(n int) float64 { return math.Pow10(n) } -func pow(x, y float64) float64 { return math.Pow(x, y) } - -const ( - sqrt2 = math.Sqrt2 -) diff --git a/vendor/github.com/hebl/gofa/jd.go b/vendor/github.com/hebl/gofa/jd.go deleted file mode 100644 index 4a43ce8..0000000 --- a/vendor/github.com/hebl/gofa/jd.go +++ /dev/null @@ -1,442 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -// Calendar - -/* -Cal2jd Gregorian Calendar to Julian Date. - -Given: - iy,im,id int year, month, day in Gregorian calendar (Note 1) - -Returned: - djm0 float64 MJD zero-point: always 2400000.5 - djm float64 Modified Julian Date for 0 hrs - -Returned (function value): - int status: - 0 = OK - -1 = bad year (Note 3: JD not computed) - -2 = bad month (JD not computed) - -3 = bad day (JD computed) - -Notes: - - 1. The algorithm used is valid from -4800 March 1, but this - implementation rejects dates before -4799 January 1. - - 2. The Julian Date is returned in two pieces, in the usual SOFA - manner, which is designed to preserve time resolution. The - Julian Date is available as a single number by adding djm0 and - djm. - - 3. In early eras the conversion is from the "Proleptic Gregorian - Calendar"; no account is taken of the date(s) of adoption of - the Gregorian Calendar, nor is the AD/BC numbering convention - observed. - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992), - Section 12.92 (p604). -*/ -func Cal2jd(iy, im, id int, djm0, djm *float64) int { - var j, ly, my int - var iypmy int - - /* Earliest year allowed (4800BC) */ - const IYMIN = -4799 - - /* Month lengths in days */ - mtab := []int{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} - - /* Preset status. */ - j = 0 - - /* Validate year and month. */ - if iy < IYMIN { - return -1 - } - if im < 1 || im > 12 { - return -2 - } - - /* If February in a leap year, 1, otherwise 0. */ - // ly = ((im == 2) && !(iy%4) && (iy%100 || !(iy%400))); - if (im == 2) && (iy%4 == 0) && ((iy%100 != 0) || (iy%400 == 0)) { - ly = 1 - } else { - ly = 0 - } - - /* Validate day, taking into account leap years. */ - if (id < 1) || (id > (mtab[im-1] + ly)) { - j = -3 - } - - /* Return result. */ - my = (im - 14) / 12 - iypmy = (iy + my) - *djm0 = DJM0 - *djm = float64((1461*(iypmy+4800))/4 + (367*(im-2-12*my))/12 - (3*((iypmy+4900)/100))/4 + id - 2432076) - - /* Return status. */ - return j - -} - -/* -Jd2cal Julian Date to Gregorian year, month, day, and fraction of a day. - -Given: - dj1,dj2 float64 Julian Date (Notes 1, 2) - -Returned (arguments): - iy int year - im int month - id int day - fd float64 fraction of day - -Returned (function value): - int status: - 0 = OK - -1 = unacceptable date (Note 1) - -Notes: - - 1) The earliest valid date is -68569.5 (-4900 March 1). The - largest value accepted is 1e9. - - 2) The Julian Date is apportioned in any convenient way between - the arguments dj1 and dj2. For example, JD=2450123.7 could - be expressed in any of these ways, among others: - - dj1 dj2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - Separating integer and fraction uses the "compensated summation" - algorithm of Kahan-Neumaier to preserve as much precision as - possible irrespective of the jd1+jd2 apportionment. - - 3) In early eras the conversion is from the "proleptic Gregorian - calendar"; no account is taken of the date(s) of adoption of - the Gregorian calendar, nor is the AD/BC numbering convention - observed. - -References: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992), - Section 12.92 (p604). - - Klein, A., A Generalized Kahan-Babuska-Summation-Algorithm. - Computing, 76, 279-293 (2006), Section 3. -*/ -func Jd2cal(dj1, dj2 float64, iy, im, id *int, fd *float64) int { - /* Minimum and maximum allowed JD */ - const DJMIN = -68569.5 - const DJMAX = 1e9 - - var jd, i, l, n, k int64 - var dj, f1, f2, d, s, cs, x, t, f float64 - var v [2]float64 - - /* Verify date is acceptable. */ - dj = dj1 + dj2 - if dj < DJMIN || dj > DJMAX { - return -1 - } - - /* Separate day and fraction (where -0.5 <= fraction < 0.5). */ - d = dnint(dj1) - f1 = dj1 - d - jd = int64(d) - d = dnint(dj2) - f2 = dj2 - d - jd += int64(d) - - /* Compute f1+f2+0.5 using compensated summation (Klein 2006). */ - s = 0.5 - cs = 0.0 - v[0] = f1 - v[1] = f2 - for i := 0; i < 2; i++ { - x = v[i] - t = s + x - if fabs(s) >= fabs(x) { - cs += (s - t) + x - } else { - cs += (x - t) + s - } - - s = t - if s >= 1.0 { - jd++ - s -= 1.0 - } - } - f = s + cs - cs = f - s - - /* Deal with negative f. */ - if f < 0.0 { - - /* Compensated summation: assume that |s| <= 1.0. */ - f = s + 1.0 - cs += (1.0 - f) + s - s = f - f = s + cs - cs = f - s - jd-- - } - - /* Deal with f that is 1.0 or more (when rounded to double). */ - if (f - 1.0) >= -DBL_EPSILON/4.0 { - - /* Compensated summation: assume that |s| <= 1.0. */ - t = s - 1.0 - cs += (s - t) - 1.0 - s = t - f = s + cs - if -DBL_EPSILON/2.0 < f { - jd++ - f = gmax(f, 0.0) - } - } - - /* Express day in Gregorian calendar. */ - l = jd + 68569 - n = (4 * l) / 146097 - l -= (146097*n + 3) / 4 - i = (4000 * (l + 1)) / 1461001 - l -= (1461*i)/4 - 31 - k = (80 * l) / 2447 - *id = int(l - (2447*k)/80) - l = k / 11 - *im = int(k + 2 - 12*l) - *iy = int(100*(n-49) + i + l) - *fd = f - - /* Success. */ - return 0 -} - -/* -Jdcalf Julian Date to Gregorian Calendar, expressed in a form convenient -for formatting messages: rounded to a specified precision. - -Given: - ndp int number of decimal places of days in fraction - dj1,dj2 float64 dj1+dj2 = Julian Date (Note 1) - -Returned: - iymdf [4]int year, month, day, fraction in Gregorian calendar - -Returned (function value): - int status: - -1 = date out of range - 0 = OK - +1 = NDP not 0-9 (interpreted as 0) - -Notes: - - 1) The Julian Date is apportioned in any convenient way between - the arguments dj1 and dj2. For example, JD=2450123.7 could - be expressed in any of these ways, among others: - - dj1 dj2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - 2) In early eras the conversion is from the "Proleptic Gregorian - Calendar"; no account is taken of the date(s) of adoption of - the Gregorian Calendar, nor is the AD/BC numbering convention - observed. - - 3) See also the function Jd2cal. - - 4) The number of decimal places ndp should be 4 or less if internal - overflows are to be avoided on platforms which use 16-bit - integers. - -Called: - Jd2cal JD to Gregorian calendar - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992), - Section 12.92 (p604). - -*/ -func Jdcalf(ndp int, dj1, dj2 float64, iymdf *[4]int) int { - var j, js int - var denom, d1, d2, f1, f2, d, djd, f, rf float64 - - /* Denominator of fraction (e.g. 100 for 2 decimal places). */ - if (ndp >= 0) && (ndp <= 9) { - j = 0 - denom = pow10(ndp) - } else { - j = 1 - denom = 1.0 - } - - /* Copy the date, big then small. */ - if fabs(dj1) >= fabs(dj2) { - d1 = dj1 - d2 = dj2 - } else { - d1 = dj2 - d2 = dj1 - } - - /* Realign to midnight (without rounding error). */ - d1 -= 0.5 - - /* Separate day and fraction (as precisely as possible). */ - d = dnint(d1) - f1 = d1 - d - djd = d - d = dnint(d2) - f2 = d2 - d - djd += d - d = dnint(f1 + f2) - f = (f1 - d) + f2 - if f < 0.0 { - f += 1.0 - d -= 1.0 - } - djd += d - - /* Round the total fraction to the specified number of places. */ - rf = dnint(f*denom) / denom - - /* Re-align to noon. */ - djd += 0.5 - - /* Convert to Gregorian calendar. */ - js = Jd2cal(djd, rf, &iymdf[0], &iymdf[1], &iymdf[2], &f) - if js == 0 { - iymdf[3] = int(dnint(f * denom)) - } else { - j = js - } - - /* Return the status. */ - return j -} - -/* -Epb Julian Date to Besselian Epoch. - -Given: - dj1,dj2 float64 Julian Date (see note) - -Returned (function value): - float64 Besselian Epoch. - -Note: - - The Julian Date is supplied in two pieces, in the usual SOFA - manner, which is designed to preserve time resolution. The - Julian Date is available as a single number by adding dj1 and - dj2. The maximum resolution is achieved if dj1 is 2451545.0 - (J2000.0). - -Reference: - - Lieske, J.H., 1979. Astron.Astrophys., 73, 282. -*/ -func Epb(dj1, dj2 float64) float64 { - /* J2000.0-B1900.0 (2415019.81352) in days */ - const D1900 = 36524.68648 - - return 1900.0 + ((dj1-DJ00)+(dj2+D1900))/DTY -} - -/* -Epb2jd Besselian Epoch to Julian Date. - -Given: - epb float64 Besselian Epoch (e.g. 1957.3) - -Returned: - djm0 float64 MJD zero-point: always 2400000.5 - djm float64 Modified Julian Date - -Note: - - The Julian Date is returned in two pieces, in the usual SOFA - manner, which is designed to preserve time resolution. The - Julian Date is available as a single number by adding djm0 and - djm. - -Reference: - Lieske, J.H., 1979, Astron.Astrophys. 73, 282. -*/ -func Epb2jd(epb float64, djm0, djm *float64) { - *djm0 = DJM0 - *djm = 15019.81352 + (epb-1900.0)*DTY -} - -/* -Epj Julian Date to Julian Epoch. - -Given: - dj1,dj2 float64 Julian Date (see note) - -Returned (function value): - float64 Julian Epoch - -Note: - - The Julian Date is supplied in two pieces, in the usual SOFA - manner, which is designed to preserve time resolution. The - Julian Date is available as a single number by adding dj1 and - dj2. The maximum resolution is achieved if dj1 is 2451545.0 - (J2000.0). - -Reference: - Lieske, J.H., 1979, Astron.Astrophys. 73, 282. -*/ -func Epj(dj1, dj2 float64) float64 { - epj := 2000.0 + ((dj1-DJ00)+dj2)/DJY - - return epj -} - -/* -Epj2jd Julian Epoch to Julian Date. - -Given: - epj float64 Julian Epoch (e.g. 1996.8) - -Returned: - djm0 float64 MJD zero-point: always 2400000.5 - djm float64 Modified Julian Date - -Note: - - The Julian Date is returned in two pieces, in the usual SOFA - manner, which is designed to preserve time resolution. The - Julian Date is available as a single number by adding djm0 and - djm. - -Reference: - Lieske, J.H., 1979, Astron.Astrophys. 73, 282. -*/ -func Epj2jd(epj float64, djm0, djm *float64) { - *djm0 = DJM0 - *djm = DJM00 + (epj-2000.0)*365.25 -} diff --git a/vendor/github.com/hebl/gofa/pn.go b/vendor/github.com/hebl/gofa/pn.go deleted file mode 100644 index 6aeeffa..0000000 --- a/vendor/github.com/hebl/gofa/pn.go +++ /dev/null @@ -1,10273 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -// SOFA Precession / Nutation / Polar Motion - -/* -Bi00 Frame bias components, IAU 2000 Frame bias components of IAU 2000 -precession-nutation models; part of the Mathews-Herring-Buffett (MHB2000) -nutation series, with additions. - -Returned: - dpsibi,depsbi float64 longitude and obliquity corrections - dra float64 the ICRS RA of the J2000.0 mean equinox - -Notes: - - 1) The frame bias corrections in longitude and obliquity (radians) - are required in order to correct for the offset between the GCRS - pole and the mean J2000.0 pole. They define, with respect to the - GCRS frame, a J2000.0 mean pole that is consistent with the rest - of the IAU 2000A precession-nutation model. - - 2) In addition to the displacement of the pole, the complete - description of the frame bias requires also an offset in right - ascension. This is not part of the IAU 2000A model, and is from - Chapront et al. (2002). It is returned in radians. - - 3) This is a supplemented implementation of one aspect of the IAU - 2000A nutation model, formally adopted by the IAU General - Assembly in 2000, namely MHB2000 (Mathews et al. 2002). - -References: - - Chapront, J., Chapront-Touze, M. & Francou, G., Astron. - Astrophys., 387, 700, 2002. - - Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation - and precession: New nutation series for nonrigid Earth and - insights into the Earth's interior", J.Geophys.Res., 107, B4, - 2002. The MHB2000 code itself was obtained on 2002 September 9 - from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A. -*/ -func Bi00(dpsibi, depsbi, dra *float64) { - /* The frame bias corrections in longitude and obliquity */ - const DPBIAS = -0.041775 * DAS2R - const DEBIAS = -0.0068192 * DAS2R - - /* The ICRS RA of the J2000.0 equinox (Chapront et al., 2002) */ - const DRA0 = -0.0146 * DAS2R - - /* Return the results (which are fixed). */ - *dpsibi = DPBIAS - *depsbi = DEBIAS - *dra = DRA0 -} - -/* -Bp00 Frame bias and precession matrices, IAU 2000 Frame bias and precession, IAU 2000. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rb [3][3]float64 frame bias matrix (Note 2) - rp [3][3]float64 precession matrix (Note 3) - rbp [3][3]float64 bias-precession matrix (Note 4) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix rb transforms vectors from GCRS to mean J2000.0 by - applying frame bias. - - 3) The matrix rp transforms vectors from J2000.0 mean equator and - equinox to mean equator and equinox of date by applying - precession. - - 4) The matrix rbp transforms vectors from GCRS to mean equator and - equinox of date by applying frame bias then precession. It is - the product rp x rb. - - 5) It is permissible to re-use the same array in the returned - arguments. The arrays are filled in the order given. - -Called: - Bi00 frame bias components, IAU 2000 - Pr00 IAU 2000 precession adjustments - Ir initialize r-matrix to identity - Rx rotate around X-axis - Ry rotate around Y-axis - Rz rotate around Z-axis - Cr copy r-matrix - Rxr product of two r-matrices - -Reference: - "Expressions for the Celestial Intermediate Pole and Celestial - Ephemeris Origin consistent with the IAU 2000A precession- - nutation model", Astron.Astrophys. 400, 1145-1154 (2003) - - n.b. The celestial ephemeris origin (CEO) was renamed "celestial - intermediate origin" (CIO) by IAU 2006 Resolution 2. -*/ -func Bp00(date1, date2 float64, rb, rp, rbp *[3][3]float64) { - /* J2000.0 obliquity (Lieske et al. 1977) */ - const EPS0 = 84381.448 * DAS2R - - var t, dpsibi, depsbi, dra0, psia77, oma77, chia, - dpsipr, depspr, psia, oma float64 - var rbw [3][3]float64 - - /* Interval between fundamental epoch J2000.0 and current date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* Frame bias. */ - Bi00(&dpsibi, &depsbi, &dra0) - - /* Precession angles (Lieske et al. 1977) */ - psia77 = (5038.7784 + (-1.07259+(-0.001147)*t)*t) * t * DAS2R - oma77 = EPS0 + ((0.05127+(-0.007726)*t)*t)*t*DAS2R - chia = (10.5526 + (-2.38064+(-0.001125)*t)*t) * t * DAS2R - - /* Apply IAU 2000 precession corrections. */ - Pr00(date1, date2, &dpsipr, &depspr) - psia = psia77 + dpsipr - oma = oma77 + depspr - - /* Frame bias matrix: GCRS to J2000.0. */ - Ir(&rbw) - Rz(dra0, &rbw) - Ry(dpsibi*sin(EPS0), &rbw) - Rx(-depsbi, &rbw) - Cr(rbw, rb) - - /* Precession matrix: J2000.0 to mean of date. */ - Ir(rp) - Rx(EPS0, rp) - Rz(-psia, rp) - Rx(-oma, rp) - Rz(chia, rp) - - /* Bias-precession matrix: GCRS to mean of date. */ - Rxr(*rp, rbw, rbp) -} - -/* -Bp06 Frame bias and precession matrices, IAU 2006 Frame bias and precession, IAU 2006. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rb [3][3]float64 frame bias matrix (Note 2) - rp [3][3]float64 precession matrix (Note 3) - rbp [3][3]float64 bias-precession matrix (Note 4) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix rb transforms vectors from GCRS to mean J2000.0 by - applying frame bias. - - 3) The matrix rp transforms vectors from mean J2000.0 to mean of - date by applying precession. - - 4) The matrix rbp transforms vectors from GCRS to mean of date by - applying frame bias then precession. It is the product rp x rb. - - 5) It is permissible to re-use the same array in the returned - arguments. The arrays are filled in the order given. - -Called: - Pfw06 bias-precession F-W angles, IAU 2006 - Fw2m F-W angles to r-matrix - Pmat06 PB matrix, IAU 2006 - Tr transpose r-matrix - Rxr product of two r-matrices - Cr copy r-matrix - -References: - - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 - - Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 -*/ -func Bp06(date1, date2 float64, rb, rp, rbp *[3][3]float64) { - var gamb, phib, psib, epsa float64 - var rbpw, rbt [3][3]float64 - - /* B matrix. */ - Pfw06(DJM0, DJM00, &gamb, &phib, &psib, &epsa) - Fw2m(gamb, phib, psib, epsa, rb) - - /* PxB matrix (temporary). */ - Pmat06(date1, date2, &rbpw) - - /* P matrix. */ - Tr(*rb, &rbt) - Rxr(rbpw, rbt, rp) - - /* PxB matrix. */ - Cr(rbpw, rbp) -} - -/* -Bpn2xy CIP XY given Bias-precession-nutation matrix Extract from the -bias-precession-nutation matrix the X,Y coordinates of the Celestial Intermediate Pole. - -Given: - rbpn [3][3]float64 celestial-to-true matrix (Note 1) - -Returned: - x,y float64 Celestial Intermediate Pole (Note 2) - -Notes: - - 1) The matrix rbpn transforms vectors from GCRS to true equator (and - CIO or equinox) of date, and therefore the Celestial Intermediate - Pole unit vector is the bottom row of the matrix. - - 2) The arguments x,y are components of the Celestial Intermediate - Pole unit vector in the Geocentric Celestial Reference System. - -Reference: - - "Expressions for the Celestial Intermediate Pole and Celestial - Ephemeris Origin consistent with the IAU 2000A precession- - nutation model", Astron.Astrophys. 400, 1145-1154 - (2003) - - n.b. The celestial ephemeris origin (CEO) was renamed "celestial - intermediate origin" (CIO) by IAU 2006 Resolution 2. -*/ -func Bpn2xy(rbpn [3][3]float64, x, y *float64) { - /* Extract the X,Y coordinates. */ - *x = rbpn[2][0] - *y = rbpn[2][1] -} - -/* -C2i00a Celestial-to-intermediate matrix, IAU 2000A Form the -celestial-to-intermediate matrix for a given date using the -IAU 2000A precession-nutation model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rc2i [3][3]float64 celestial-to-intermediate matrix (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix rc2i is the first stage in the transformation from - celestial to terrestrial coordinates: - - [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] - - = rc2t * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003), ERA is the Earth - Rotation Angle and RPOM is the polar motion matrix. - - 3) A faster, but slightly less accurate, result (about 1 mas) can be - obtained by using instead the iauC2i00b function. - -Called: - Pnm00a classical NPB matrix, IAU 2000A - C2ibpn celestial-to-intermediate matrix, given NPB matrix - -References: - - "Expressions for the Celestial Intermediate Pole and Celestial - Ephemeris Origin consistent with the IAU 2000A precession- - nutation model", Astron.Astrophys. 400, 1145-1154 - (2003) - - n.b. The celestial ephemeris origin (CEO) was renamed "celestial - intermediate origin" (CIO) by IAU 2006 Resolution 2. - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func C2i00a(date1, date2 float64, rc2i *[3][3]float64) { - var rbpn [3][3]float64 - - /* Obtain the celestial-to-true matrix (IAU 2000A). */ - Pnm00a(date1, date2, &rbpn) - - /* Form the celestial-to-intermediate matrix. */ - C2ibpn(date1, date2, rbpn, rc2i) -} - -/* -C2i00b Celestial-to-intermediate matrix, IAU 2000B -Form the celestial-to-intermediate matrix for a given date using the -IAU 2000B precession-nutation model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rc2i [3][3]float64 celestial-to-intermediate matrix (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix rc2i is the first stage in the transformation from - celestial to terrestrial coordinates: - - [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] - - = rc2t * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003), ERA is the Earth - Rotation Angle and RPOM is the polar motion matrix. - - 3) The present function is faster, but slightly less accurate (about - 1 mas), than the iauC2i00a function. - -Called: - Pnm00b classical NPB matrix, IAU 2000B - C2ibpn celestial-to-intermediate matrix, given NPB matrix - -References: - - "Expressions for the Celestial Intermediate Pole and Celestial - Ephemeris Origin consistent with the IAU 2000A precession- - nutation model", Astron.Astrophys. 400, 1145-1154 - (2003) - - n.b. The celestial ephemeris origin (CEO) was renamed "celestial - intermediate origin" (CIO) by IAU 2006 Resolution 2. - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func C2i00b(date1, date2 float64, rc2i *[3][3]float64) { - var rbpn [3][3]float64 - - /* Obtain the celestial-to-true matrix (IAU 2000B). */ - Pnm00b(date1, date2, &rbpn) - - /* Form the celestial-to-intermediate matrix. */ - C2ibpn(date1, date2, rbpn, rc2i) -} - -/* -C2i06a Celestial-to-intermediate matrix, IAU 2006/2000A -Form the celestial-to-intermediate matrix for a given date using the -IAU 2006 precession and IAU 2000A nutation models. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rc2i [3][3]float64 celestial-to-intermediate matrix (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix rc2i is the first stage in the transformation from - celestial to terrestrial coordinates: - - [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] - - = RC2T * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003), ERA is the Earth - Rotation Angle and RPOM is the polar motion matrix. - -Called: - Pnm06a classical NPB matrix, IAU 2006/2000A - Bpn2xy extract CIP X,Y coordinates from NPB matrix - S06 the CIO locator s, given X,Y, IAU 2006 - C2ixys celestial-to-intermediate matrix, given X,Y and s - -References: - - McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003), - IERS Technical Note No. 32, BKG -*/ -func C2i06a(date1, date2 float64, rc2i *[3][3]float64) { - var rbpn [3][3]float64 - var x, y, s float64 - - /* Obtain the celestial-to-true matrix (IAU 2006/2000A). */ - Pnm06a(date1, date2, &rbpn) - - /* Extract the X,Y coordinates. */ - Bpn2xy(rbpn, &x, &y) - - /* Obtain the CIO locator. */ - s = S06(date1, date2, x, y) - - /* Form the celestial-to-intermediate matrix. */ - C2ixys(x, y, s, rc2i) -} - -/* -C2ibpn Celestial-to-intermediate matrix given B-P-N -Form the celestial-to-intermediate matrix for a given date given -the bias-precession-nutation matrix. IAU 2000. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - rbpn [3][3]float64 celestial-to-true matrix (Note 2) - -Returned: - rc2i [3][3]float64 celestial-to-intermediate matrix (Note 3) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix rbpn transforms vectors from GCRS to true equator (and - CIO or equinox) of date. Only the CIP (bottom row) is used. - - 3) The matrix rc2i is the first stage in the transformation from - celestial to terrestrial coordinates: - - [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] - - = RC2T * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003), ERA is the Earth - Rotation Angle and RPOM is the polar motion matrix. - - 4) Although its name does not include "00", This function is in fact - specific to the IAU 2000 models. - -Called: - Bpn2xy extract CIP X,Y coordinates from NPB matrix - C2ixy celestial-to-intermediate matrix, given X,Y - -References: - "Expressions for the Celestial Intermediate Pole and Celestial - Ephemeris Origin consistent with the IAU 2000A precession- - nutation model", Astron.Astrophys. 400, 1145-1154 (2003) - - n.b. The celestial ephemeris origin (CEO) was renamed "celestial - intermediate origin" (CIO) by IAU 2006 Resolution 2. - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func C2ibpn(date1, date2 float64, rbpn [3][3]float64, rc2i *[3][3]float64) { - var x, y float64 - - /* Extract the X,Y coordinates. */ - Bpn2xy(rbpn, &x, &y) - - /* Form the celestial-to-intermediate matrix (n.b. IAU 2000 specific). */ - C2ixy(date1, date2, x, y, rc2i) -} - -/* -C2ixy Celestial-to-intermediate matrix given CIP -Form the celestial to intermediate-frame-of-date matrix for a given -date when the CIP X,Y coordinates are known. IAU 2000. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - x,y float64 Celestial Intermediate Pole (Note 2) - -Returned: - rc2i [3][3]float64 celestial-to-intermediate matrix (Note 3) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The Celestial Intermediate Pole coordinates are the x,y components - of the unit vector in the Geocentric Celestial Reference System. - - 3) The matrix rc2i is the first stage in the transformation from - celestial to terrestrial coordinates: - - [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] - - = RC2T * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003), ERA is the Earth - Rotation Angle and RPOM is the polar motion matrix. - - 4) Although its name does not include "00", This function is in fact - specific to the IAU 2000 models. - -Called: - C2ixys celestial-to-intermediate matrix, given X,Y and s - S00 the CIO locator s, given X,Y, IAU 2000A - -Reference: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func C2ixy(date1, date2 float64, x, y float64, rc2i *[3][3]float64) { - /* Compute s and then the matrix. */ - C2ixys(x, y, S00(date1, date2, x, y), rc2i) -} - -/* -C2ixys Celestial-to-intermediate matrix given CIP and s -Form the celestial to intermediate-frame-of-date matrix given the CIP -X,Y and the CIO locator s. - -Given: - x,y float64 Celestial Intermediate Pole (Note 1) - s float64 the CIO locator s (Note 2) - -Returned: - rc2i [3][3]float64 celestial-to-intermediate matrix (Note 3) - -Notes: - - 1) The Celestial Intermediate Pole coordinates are the x,y - components of the unit vector in the Geocentric Celestial - Reference System. - - 2) The CIO locator s (in radians) positions the Celestial - Intermediate Origin on the equator of the CIP. - - 3) The matrix rc2i is the first stage in the transformation from - celestial to terrestrial coordinates: - - [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] - - = RC2T * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003), ERA is the Earth - Rotation Angle and RPOM is the polar motion matrix. - -Called: - Ir initialize r-matrix to identity - Rz rotate around Z-axis - Ry rotate around Y-axis - -Reference: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func C2ixys(x, y, s float64, rc2i *[3][3]float64) { - var r2, e, d float64 - - /* Obtain the spherical angles E and d. */ - r2 = x*x + y*y - // e = (r2 > 0.0) ? atan2(y, x) : 0.0; - if r2 > 0.0 { - e = atan2(y, x) - } else { - e = 0.0 - } - d = atan(sqrt(r2 / (1.0 - r2))) - - /* Form the matrix. */ - Ir(rc2i) - Rz(e, rc2i) - Ry(d, rc2i) - Rz(-(e + s), rc2i) -} - -/* -C2t00a Celestial-to-terrestrial matrix, IAU 2000A -Form the celestial to terrestrial matrix given the date, the UT1 and -the polar motion, using the IAU 2000A precession-nutation model. - -Given: - tta,ttb float64 TT as a 2-part Julian Date (Note 1) - uta,utb float64 UT1 as a 2-part Julian Date (Note 1) - xp,yp float64 CIP coordinates (radians, Note 2) - -Returned: - rc2t [3][3]float64 celestial-to-terrestrial matrix (Note 3) - -Notes: - - 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates, - apportioned in any convenient way between the arguments uta and - utb. For example, JD(UT1)=2450123.7 could be expressed in any of - these ways, among others: - - uta utb - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution is - acceptable. The J2000 and MJD methods are good compromises - between resolution and convenience. In the case of uta,utb, the - date & time method is best matched to the Earth rotation angle - algorithm used: maximum precision is delivered when the uta - argument is for 0hrs UT1 on the day in question and the utb - argument lies in the range 0 to 1, or vice versa. - - 2) The arguments xp and yp are the coordinates (in radians) of the - Celestial Intermediate Pole with respect to the International - Terrestrial Reference System (see IERS Conventions 2003), - measured along the meridians 0 and 90 deg west respectively. - - 3) The matrix rc2t transforms from celestial to terrestrial - coordinates: - - [TRS] = RPOM * R_3(ERA) * RC2I * [CRS] - - = rc2t * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003), RC2I is the - celestial-to-intermediate matrix, ERA is the Earth rotation - angle and RPOM is the polar motion matrix. - - 4) A faster, but slightly less accurate, result (about 1 mas) can - be obtained by using instead the iauC2t00b function. - -Called: - C2i00a celestial-to-intermediate matrix, IAU 2000A - Era00 Earth rotation angle, IAU 2000 - Sp00 the TIO locator s', IERS 2000 - Pom00 polar motion matrix - C2tcio form CIO-based celestial-to-terrestrial matrix - -Reference: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func C2t00a(tta, ttb float64, uta, utb float64, xp, yp float64, rc2t *[3][3]float64) { - var rc2i, rpom [3][3]float64 - var era, sp float64 - - /* Form the celestial-to-intermediate matrix for this TT (IAU 2000A). */ - C2i00a(tta, ttb, &rc2i) - - /* Predict the Earth rotation angle for this UT1. */ - era = Era00(uta, utb) - - /* Estimate s'. */ - sp = Sp00(tta, ttb) - - /* Form the polar motion matrix. */ - Pom00(xp, yp, sp, &rpom) - - /* Combine to form the celestial-to-terrestrial matrix. */ - C2tcio(rc2i, era, rpom, rc2t) -} - -/* -C2t00b Celestial-to-terrestrial matrix, IAU 2000B -Form the celestial to terrestrial matrix given the date, the UT1 and -the polar motion, using the IAU 2000B precession-nutation model. - -Given: - tta,ttb float64 TT as a 2-part Julian Date (Note 1) - uta,utb float64 UT1 as a 2-part Julian Date (Note 1) - xp,yp float64 coordinates of the pole (radians, Note 2) - -Returned: - rc2t [3][3]float64 celestial-to-terrestrial matrix (Note 3) - -Notes: - - 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates, - apportioned in any convenient way between the arguments uta and - utb. For example, JD(UT1)=2450123.7 could be expressed in any of - these ways, among others: - - uta utb - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution is - acceptable. The J2000 and MJD methods are good compromises - between resolution and convenience. In the case of uta,utb, the - date & time method is best matched to the Earth rotation angle - algorithm used: maximum precision is delivered when the uta - argument is for 0hrs UT1 on the day in question and the utb - argument lies in the range 0 to 1, or vice versa. - - 2) The arguments xp and yp are the coordinates (in radians) of the - Celestial Intermediate Pole with respect to the International - Terrestrial Reference System (see IERS Conventions 2003), - measured along the meridians 0 and 90 deg west respectively. - - 3) The matrix rc2t transforms from celestial to terrestrial - coordinates: - - [TRS] = RPOM * R_3(ERA) * RC2I * [CRS] - - = rc2t * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003), RC2I is the - celestial-to-intermediate matrix, ERA is the Earth rotation - angle and RPOM is the polar motion matrix. - - 4) The present function is faster, but slightly less accurate (about - 1 mas), than the iauC2t00a function. - -Called: - C2i00b celestial-to-intermediate matrix, IAU 2000B - Era00 Earth rotation angle, IAU 2000 - Pom00 polar motion matrix - C2tcio form CIO-based celestial-to-terrestrial matrix - -Reference: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func C2t00b(tta, ttb float64, uta, utb float64, xp, yp float64, rc2t *[3][3]float64) { - var rc2i, rpom [3][3]float64 - var era float64 - - /* Form the celestial-to-intermediate matrix for this TT (IAU 2000B). */ - C2i00b(tta, ttb, &rc2i) - - /* Predict the Earth rotation angle for this UT1. */ - era = Era00(uta, utb) - - /* Form the polar motion matrix (neglecting s'). */ - Pom00(xp, yp, 0.0, &rpom) - - /* Combine to form the celestial-to-terrestrial matrix. */ - C2tcio(rc2i, era, rpom, rc2t) -} - -/* -C2t06a Celestial-to-terrestrial matrix, IAU 2006/2000A -Form the celestial to terrestrial matrix given the date, the UT1 and -the polar motion, using the IAU 2006/2000A precession-nutation -model. - -Given: - tta,ttb float64 TT as a 2-part Julian Date (Note 1) - uta,utb float64 UT1 as a 2-part Julian Date (Note 1) - xp,yp float64 coordinates of the pole (radians, Note 2) - -Returned: - rc2t [3][3]float64 celestial-to-terrestrial matrix (Note 3) - -Notes: - - 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates, - apportioned in any convenient way between the two arguments. For - example, JD(UT1)=2450123.7 could be expressed in any of - these ways, among others: - - uta utb - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution is - acceptable. The J2000 and MJD methods are good compromises - between resolution and convenience. In the case of uta,utb, the - date & time method is best matched to the Earth rotation angle - algorithm used: maximum precision is delivered when the uta - argument is for 0hrs UT1 on the day in question and the utb - argument lies in the range 0 to 1, or vice versa. - - 2) The arguments xp and yp are the coordinates (in radians) of the - Celestial Intermediate Pole with respect to the International - Terrestrial Reference System (see IERS Conventions 2003), - measured along the meridians 0 and 90 deg west respectively. - - 3) The matrix rc2t transforms from celestial to terrestrial - coordinates: - - [TRS] = RPOM * R_3(ERA) * RC2I * [CRS] - - = rc2t * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003), RC2I is the - celestial-to-intermediate matrix, ERA is the Earth rotation - angle and RPOM is the polar motion matrix. - -Called: - C2i06a celestial-to-intermediate matrix, IAU 2006/2000A - Era00 Earth rotation angle, IAU 2000 - Sp00 the TIO locator s', IERS 2000 - Pom00 polar motion matrix - C2tcio form CIO-based celestial-to-terrestrial matrix - -Reference: - - McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003), - IERS Technical Note No. 32, BKG -*/ -func C2t06a(tta, ttb float64, uta, utb float64, xp, yp float64, rc2t *[3][3]float64) { - var rc2i, rpom [3][3]float64 - var era, sp float64 - - /* Form the celestial-to-intermediate matrix for this TT. */ - C2i06a(tta, ttb, &rc2i) - - /* Predict the Earth rotation angle for this UT1. */ - era = Era00(uta, utb) - - /* Estimate s'. */ - sp = Sp00(tta, ttb) - - /* Form the polar motion matrix. */ - Pom00(xp, yp, sp, &rpom) - - /* Combine to form the celestial-to-terrestrial matrix. */ - C2tcio(rc2i, era, rpom, rc2t) -} - -/* -C2tcio Form CIO-based Celestial-to-terrestrial matrix -Assemble the celestial to terrestrial matrix from CIO-based -components (the celestial-to-intermediate matrix, the Earth Rotation -Angle and the polar motion matrix). - -Given: - rc2i [3][3]float64 celestial-to-intermediate matrix - era float64 Earth rotation angle (radians) - rpom [3][3]float64 polar-motion matrix - -Returned: - rc2t [3][3]float64 celestial-to-terrestrial matrix - -Notes: - - 1) This function constructs the rotation matrix that transforms - vectors in the celestial system into vectors in the terrestrial - system. It does so starting from precomputed components, namely - the matrix which rotates from celestial coordinates to the - intermediate frame, the Earth rotation angle and the polar motion - matrix. One use of the present function is when generating a - series of celestial-to-terrestrial matrices where only the Earth - Rotation Angle changes, avoiding the considerable overhead of - recomputing the precession-nutation more often than necessary to - achieve given accuracy objectives. - - 2) The relationship between the arguments is as follows: - - [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] - - = rc2t * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003). - -Called: - Cr copy r-matrix - Rz rotate around Z-axis - Rxr product of two r-matrices - -Reference: - - McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003), - IERS Technical Note No. 32, BKG -*/ -func C2tcio(rc2i [3][3]float64, era float64, rpom [3][3]float64, rc2t *[3][3]float64) { - var r [3][3]float64 - - /* Construct the matrix. */ - Cr(rc2i, &r) - Rz(era, &r) - Rxr(rpom, r, rc2t) -} - -/* -C2teqx Celestial-to-terrestrial matrix, classical -Assemble the celestial to terrestrial matrix from equinox-based -components (the celestial-to-true matrix, the Greenwich Apparent -Sidereal Time and the polar motion matrix). - -Given: - rbpn [3][3]float64 celestial-to-true matrix - gst float64 Greenwich (apparent) Sidereal Time (radians) - rpom [3][3]float64 polar-motion matrix - -Returned: - rc2t [3][3]float64 celestial-to-terrestrial matrix (Note 2) - -Notes: - - 1) This function constructs the rotation matrix that transforms - vectors in the celestial system into vectors in the terrestrial - system. It does so starting from precomputed components, namely - the matrix which rotates from celestial coordinates to the - true equator and equinox of date, the Greenwich Apparent Sidereal - Time and the polar motion matrix. One use of the present function - is when generating a series of celestial-to-terrestrial matrices - where only the Sidereal Time changes, avoiding the considerable - overhead of recomputing the precession-nutation more often than - necessary to achieve given accuracy objectives. - - 2) The relationship between the arguments is as follows: - - [TRS] = rpom * R_3(gst) * rbpn * [CRS] - - = rc2t * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003). - -Called: - Cr copy r-matrix - Rz rotate around Z-axis - Rxr product of two r-matrices - -Reference: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func C2teqx(rbpn [3][3]float64, gst float64, rpom [3][3]float64, rc2t *[3][3]float64) { - var r [3][3]float64 - - /* Construct the matrix. */ - Cr(rbpn, &r) - Rz(gst, &r) - Rxr(rpom, r, rc2t) -} - -/* -C2tpe Celestial-to-terrestrial matrix given nutation -Form the celestial to terrestrial matrix given the date, the UT1, -the nutation and the polar motion. IAU 2000. - -Given: - tta,ttb float64 TT as a 2-part Julian Date (Note 1) - uta,utb float64 UT1 as a 2-part Julian Date (Note 1) - dpsi,deps float64 nutation (Note 2) - xp,yp float64 coordinates of the pole (radians, Note 3) - -Returned: - rc2t [3][3]float64 celestial-to-terrestrial matrix (Note 4) - -Notes: - - 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates, - apportioned in any convenient way between the arguments uta and - utb. For example, JD(UT1)=2450123.7 could be expressed in any of - these ways, among others: - - uta utb - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution is - acceptable. The J2000 and MJD methods are good compromises - between resolution and convenience. In the case of uta,utb, the - date & time method is best matched to the Earth rotation angle - algorithm used: maximum precision is delivered when the uta - argument is for 0hrs UT1 on the day in question and the utb - argument lies in the range 0 to 1, or vice versa. - - 2) The caller is responsible for providing the nutation components; - they are in longitude and obliquity, in radians and are with - respect to the equinox and ecliptic of date. For high-accuracy - applications, free core nutation should be included as well as - any other relevant corrections to the position of the CIP. - - 3) The arguments xp and yp are the coordinates (in radians) of the - Celestial Intermediate Pole with respect to the International - Terrestrial Reference System (see IERS Conventions 2003), - measured along the meridians 0 and 90 deg west respectively. - - 4) The matrix rc2t transforms from celestial to terrestrial - coordinates: - - [TRS] = RPOM * R_3(GST) * RBPN * [CRS] - - = rc2t * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003), RBPN is the - bias-precession-nutation matrix, GST is the Greenwich (apparent) - Sidereal Time and RPOM is the polar motion matrix. - - 5) Although its name does not include "00", This function is in fact - specific to the IAU 2000 models. - -Called: - Pn00 bias/precession/nutation results, IAU 2000 - Gmst00 Greenwich mean sidereal time, IAU 2000 - Sp00 the TIO locator s', IERS 2000 - Ee00 equation of the equinoxes, IAU 2000 - Pom00 polar motion matrix - C2teqx form equinox-based celestial-to-terrestrial matrix - -Reference: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func C2tpe(tta, ttb float64, uta, utb float64, dpsi, deps float64, xp, yp float64, rc2t *[3][3]float64) { - var epsa, gmst, ee, sp float64 - var rb, rp, rbp, rn, rbpn, rpom [3][3]float64 - - /* Form the celestial-to-true matrix for this TT. */ - Pn00(tta, ttb, dpsi, deps, &epsa, &rb, &rp, &rbp, &rn, &rbpn) - - /* Predict the Greenwich Mean Sidereal Time for this UT1 and TT. */ - gmst = Gmst00(uta, utb, tta, ttb) - - /* Predict the equation of the equinoxes given TT and nutation. */ - ee = Ee00(tta, ttb, epsa, dpsi) - - /* Estimate s'. */ - sp = Sp00(tta, ttb) - - /* Form the polar motion matrix. */ - Pom00(xp, yp, sp, &rpom) - - /* Combine to form the celestial-to-terrestrial matrix. */ - C2teqx(rbpn, gmst+ee, rpom, rc2t) -} - -/* -C2txy Celestial-to-terrestrial matrix given CIP -Form the celestial to terrestrial matrix given the date, the UT1, -the CIP coordinates and the polar motion. IAU 2000. - -Given: - tta,ttb float64 TT as a 2-part Julian Date (Note 1) - uta,utb float64 UT1 as a 2-part Julian Date (Note 1) - x,y float64 Celestial Intermediate Pole (Note 2) - xp,yp float64 coordinates of the pole (radians, Note 3) - -Returned: - rc2t [3][3]float64 celestial-to-terrestrial matrix (Note 4) - -Notes: - - 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates, - apportioned in any convenient way between the arguments uta and - utb. For example, JD(UT1)=2450123.7 could be expressed in any o - these ways, among others: - - uta utb - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution is - acceptable. The J2000 and MJD methods are good compromises - between resolution and convenience. In the case of uta,utb, the - date & time method is best matched to the Earth rotation angle - algorithm used: maximum precision is delivered when the uta - argument is for 0hrs UT1 on the day in question and the utb - argument lies in the range 0 to 1, or vice versa. - - 2) The Celestial Intermediate Pole coordinates are the x,y - components of the unit vector in the Geocentric Celestial - Reference System. - - 3) The arguments xp and yp are the coordinates (in radians) of the - Celestial Intermediate Pole with respect to the International - Terrestrial Reference System (see IERS Conventions 2003), - measured along the meridians 0 and 90 deg west respectively. - - 4) The matrix rc2t transforms from celestial to terrestrial - coordinates: - - [TRS] = RPOM * R_3(ERA) * RC2I * [CRS] - - = rc2t * [CRS] - - where [CRS] is a vector in the Geocentric Celestial Reference - System and [TRS] is a vector in the International Terrestrial - Reference System (see IERS Conventions 2003), ERA is the Earth - Rotation Angle and RPOM is the polar motion matrix. - - 5) Although its name does not include "00", This function is in fact - specific to the IAU 2000 models. - -Called: - C2ixy celestial-to-intermediate matrix, given X,Y - Era00 Earth rotation angle, IAU 2000 - Sp00 the TIO locator s', IERS 2000 - Pom00 polar motion matrix - C2tcio form CIO-based celestial-to-terrestrial matrix - -Reference: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func C2txy(tta, ttb float64, uta, utb float64, x, y float64, xp, yp float64, rc2t *[3][3]float64) { - var rc2i, rpom [3][3]float64 - var era, sp float64 - - /* Form the celestial-to-intermediate matrix for this TT. */ - C2ixy(tta, ttb, x, y, &rc2i) - - /* Predict the Earth rotation angle for this UT1. */ - era = Era00(uta, utb) - - /* Estimate s'. */ - sp = Sp00(tta, ttb) - - /* Form the polar motion matrix. */ - Pom00(xp, yp, sp, &rpom) - - /* Combine to form the celestial-to-terrestrial matrix. */ - C2tcio(rc2i, era, rpom, rc2t) -} - -/* -Eo06a Equation of the origins, IAU 2006/2000A -Equation of the origins, IAU 2006 precession and IAU 2000A nutation. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned (function value): - float64 the equation of the origins in radians - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The equation of the origins is the distance between the true - equinox and the celestial intermediate origin and, equivalently, - the difference between Earth rotation angle and Greenwich - apparent sidereal time (ERA-GST). It comprises the precession - (since J2000.0) in right ascension plus the equation of the - equinoxes (including the small correction terms). - -Called: - Pnm06a classical NPB matrix, IAU 2006/2000A - Bpn2xy extract CIP X,Y coordinates from NPB matrix - S06 the CIO locator s, given X,Y, IAU 2006 - Eors equation of the origins, given NPB matrix and s - -References: - - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 - - Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 -*/ -func Eo06a(date1, date2 float64) float64 { - var r [3][3]float64 - var x, y, s, eo float64 - - /* Classical nutation x precession x bias matrix. */ - Pnm06a(date1, date2, &r) - - /* Extract CIP coordinates. */ - Bpn2xy(r, &x, &y) - - /* The CIO locator, s. */ - s = S06(date1, date2, x, y) - - /* Solve for the EO. */ - eo = Eors(r, s) - - return eo - -} - -/* -Eors Equation of the origins, given NPB matrix and s -Equation of the origins, given the classical NPB matrix and the -quantity s. - -Given: - rnpb [3][3]float64 classical nutation x precession x bias matrix - s float64 the quantity s (the CIO locator) in radians - -Returned (function value): - float64 the equation of the origins in radians - -Notes: - - 1) The equation of the origins is the distance between the true - equinox and the celestial intermediate origin and, equivalently, - the difference between Earth rotation angle and Greenwich - apparent sidereal time (ERA-GST). It comprises the precession - (since J2000.0) in right ascension plus the equation of the - equinoxes (including the small correction terms). - - 2) The algorithm is from Wallace & Capitaine (2006). - -References: - - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 - - Wallace, P. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 -*/ -func Eors(rnpb [3][3]float64, s float64) float64 { - var x, ax, xs, ys, zs, p, q, eo float64 - - /* Evaluate Wallace & Capitaine (2006) expression (16). */ - x = rnpb[2][0] - ax = x / (1.0 + rnpb[2][2]) - xs = 1.0 - ax*x - ys = -ax * rnpb[2][1] - zs = -x - p = rnpb[0][0]*xs + rnpb[0][1]*ys + rnpb[0][2]*zs - q = rnpb[1][0]*xs + rnpb[1][1]*ys + rnpb[1][2]*zs - // eo = ((p != 0) || (q != 0)) ? s - atan2(q, p) : s; - if (p != 0) || (q != 0) { - eo = s - atan2(q, p) - } else { - eo = s - } - - return eo -} - -/* -Fw2m Fukushima-Williams angles to r-matrix -Form rotation matrix given the Fukushima-Williams angles. - -Given: - gamb float64 F-W angle gamma_bar (radians) - phib float64 F-W angle phi_bar (radians) - psi float64 F-W angle psi (radians) - eps float64 F-W angle epsilon (radians) - -Returned: - r [3][3]float64 rotation matrix - -Notes: - - 1) Naming the following points: - - e = J2000.0 ecliptic pole, - p = GCRS pole, - E = ecliptic pole of date, - and P = CIP, - - the four Fukushima-Williams angles are as follows: - - gamb = gamma = epE - phib = phi = pE - psi = psi = pEP - eps = epsilon = EP - - 2) The matrix representing the combined effects of frame bias, - precession and nutation is: - - NxPxB = R_1(-eps).R_3(-psi).R_1(phib).R_3(gamb) - - 3) The present function can construct three different matrices, - depending on which angles are supplied as the arguments gamb, - phib, psi and eps: - - o To obtain the nutation x precession x frame bias matrix, - first generate the four precession angles known conventionally - as gamma_bar, phi_bar, psi_bar and epsilon_A, then generate - the nutation components Dpsi and Depsilon and add them to - psi_bar and epsilon_A, and finally call the present function - using those four angles as arguments. - - o To obtain the precession x frame bias matrix, generate the - four precession angles and call the present function. - - o To obtain the frame bias matrix, generate the four precession - angles for date J2000.0 and call the present function. - - The nutation-only and precession-only matrices can if necessary - be obtained by combining these three appropriately. - -Called: - Ir initialize r-matrix to identity - Rz rotate around Z-axis - Rx rotate around X-axis - -References: - - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 - - Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351 -*/ -func Fw2m(gamb, phib, psi, eps float64, r *[3][3]float64) { - Ir(r) - Rz(gamb, r) - Rx(phib, r) - Rz(-psi, r) - Rx(-eps, r) -} - -/* -Fw2xy Fukushima-Williams angles to X,Y -CIP X,Y given Fukushima-Williams bias-precession-nutation angles. - -Given: - gamb float64 F-W angle gamma_bar (radians) - phib float64 F-W angle phi_bar (radians) - psi float64 F-W angle psi (radians) - eps float64 F-W angle epsilon (radians) - -Returned: - x,y float64 CIP unit vector X,Y - -Notes: - - 1) Naming the following points: - - e = J2000.0 ecliptic pole, - p = GCRS pole - E = ecliptic pole of date, - and P = CIP, - - the four Fukushima-Williams angles are as follows: - - gamb = gamma = epE - phib = phi = pE - psi = psi = pEP - eps = epsilon = EP - - 2) The matrix representing the combined effects of frame bias, - precession and nutation is: - - NxPxB = R_1(-epsA).R_3(-psi).R_1(phib).R_3(gamb) - - The returned values x,y are elements [2][0] and [2][1] of the - matrix. Near J2000.0, they are essentially angles in radians. - -Called: - Fw2m F-W angles to r-matrix - Bpn2xy extract CIP X,Y coordinates from NPB matrix - -Reference: - - Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351 -*/ -func Fw2xy(gamb, phib float64, psi, eps float64, x, y *float64) { - var r [3][3]float64 - - /* Form NxPxB matrix. */ - Fw2m(gamb, phib, psi, eps, &r) - - /* Extract CIP X,Y. */ - Bpn2xy(r, x, y) -} - -/* -Ltp Long-term precession matrix. - -Given: - epj float64 Julian epoch (TT) - -Returned: - rp [3][3]float64 precession matrix, J2000.0 to date - -Notes: - - 1) The matrix is in the sense - - P_date = rp x P_J2000, - - where P_J2000 is a vector with respect to the J2000.0 mean - equator and equinox and P_date is the same vector with respect to - the equator and equinox of epoch epj. - - 2) The Vondrak et al. (2011, 2012) 400 millennia precession model - agrees with the IAU 2006 precession at J2000.0 and stays within - 100 microarcseconds during the 20th and 21st centuries. It is - accurate to a few arcseconds throughout the historical period, - worsening to a few tenths of a degree at the end of the - +/- 200,000 year time span. - -Called: - Ltpequ equator pole, long term - Ltpecl ecliptic pole, long term - Pxp vector product - Pn normalize vector - -References: - - Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession - expressions, valid for long time intervals, Astron.Astrophys. 534, - A22 - - Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession - expressions, valid for long time intervals (Corrigendum), - Astron.Astrophys. 541, C1 -*/ -func Ltp(epj float64, rp *[3][3]float64) { - - var peqr, pecl, v, eqx [3]float64 - var w float64 - - /* Equator pole (bottom row of matrix). */ - Ltpequ(epj, &peqr) - - /* Ecliptic pole. */ - Ltpecl(epj, &pecl) - - /* Equinox (top row of matrix). */ - Pxp(peqr, pecl, &v) - Pn(v, &w, &eqx) - - /* Middle row of matrix. */ - Pxp(peqr, eqx, &v) - - /* Assemble the matrix. */ - for i := 0; i < 3; i++ { - rp[0][i] = eqx[i] - rp[1][i] = v[i] - rp[2][i] = peqr[i] - } - -} - -/* -Ltpb Long-term precession matrix, including ICRS frame bias. - -Given: - epj float64 Julian epoch (TT) - -Returned: - rpb [3][3]float64 precession-bias matrix, J2000.0 to date - -Notes: - - 1) The matrix is in the sense - - P_date = rpb x P_ICRS, - - where P_ICRS is a vector in the Geocentric Celestial Reference - System, and P_date is the vector with respect to the Celestial - Intermediate Reference System at that date but with nutation - neglected. - - 2) A first order frame bias formulation is used, of sub- - microarcsecond accuracy compared with a full 3D rotation. - - 3) The Vondrak et al. (2011, 2012) 400 millennia precession model - agrees with the IAU 2006 precession at J2000.0 and stays within - 100 microarcseconds during the 20th and 21st centuries. It is - accurate to a few arcseconds throughout the historical period, - worsening to a few tenths of a degree at the end of the - +/- 200,000 year time span. - -References: - - Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession - expressions, valid for long time intervals, Astron.Astrophys. 534, - A22 - - Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession - expressions, valid for long time intervals (Corrigendum), - Astron.Astrophys. 541, C1 -*/ -func Ltpb(epj float64, rpb *[3][3]float64) { - /* Frame bias (IERS Conventions 2010, Eqs. 5.21 and 5.33) */ - dx := -0.016617 * DAS2R - de := -0.0068192 * DAS2R - dr := -0.0146 * DAS2R - - var rp [3][3]float64 - - /* Precession matrix. */ - Ltp(epj, &rp) - - /* Apply the bias. */ - for i := 0; i < 3; i++ { - rpb[i][0] = rp[i][0] - rp[i][1]*dr + rp[i][2]*dx - rpb[i][1] = rp[i][0]*dr + rp[i][1] + rp[i][2]*de - rpb[i][2] = -rp[i][0]*dx - rp[i][1]*de + rp[i][2] - } -} - -/* -Ltpecl Long-term precession of the ecliptic. - -Given: - epj float64 Julian epoch (TT) - -Returned: - vec [3]float64 ecliptic pole unit vector - -Notes: - - 1) The returned vector is with respect to the J2000.0 mean equator - and equinox. - - 2) The Vondrak et al. (2011, 2012) 400 millennia precession model - agrees with the IAU 2006 precession at J2000.0 and stays within - 100 microarcseconds during the 20th and 21st centuries. It is - accurate to a few arcseconds throughout the historical period, - worsening to a few tenths of a degree at the end of the - +/- 200,000 year time span. - -References: - - Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession - expressions, valid for long time intervals, Astron.Astrophys. 534, - A22 - - Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession - expressions, valid for long time intervals (Corrigendum), - Astron.Astrophys. 541, C1 -*/ -func Ltpecl(epj float64, vec *[3]float64) { - - /* Obliquity at J2000.0 (radians). */ - const eps0 = 84381.406 * DAS2R - - /* Polynomial coefficients */ - const NPOL = 4 - pqpol := [2][4]float64{ - {5851.607687, -0.1189000, -0.00028913, 0.000000101}, - {-1600.886300, 1.1689818, -0.00000020, -0.000000437}, - } - - /* Periodic coefficients */ - pqper := [][5]float64{ - {708.15, -5486.751211, -684.661560, 667.666730, -5523.863691}, - {2309.00, -17.127623, 2446.283880, -2354.886252, -549.747450}, - {1620.00, -617.517403, 399.671049, -428.152441, -310.998056}, - {492.20, 413.442940, -356.652376, 376.202861, 421.535876}, - {1183.00, 78.614193, -186.387003, 184.778874, -36.776172}, - {622.00, -180.732815, -316.800070, 335.321713, -145.278396}, - {882.00, -87.676083, 198.296701, -185.138669, -34.744450}, - {547.00, 46.140315, 101.135679, -120.972830, 22.885731}, - } - NPER := len(pqper) - - /* Miscellaneous */ - - var t, p, q, w, a, s, c float64 - - /* Centuries since J2000. */ - t = (epj - 2000.0) / 100.0 - - /* Initialize P_A and Q_A accumulators. */ - p = 0.0 - q = 0.0 - - /* Periodic terms. */ - w = D2PI * t - for i := 0; i < NPER; i++ { - a = w / pqper[i][0] - s = sin(a) - c = cos(a) - p += c*pqper[i][1] + s*pqper[i][3] - q += c*pqper[i][2] + s*pqper[i][4] - } - - /* Polynomial terms. */ - w = 1.0 - for i := 0; i < NPOL; i++ { - p += pqpol[0][i] * w - q += pqpol[1][i] * w - w *= t - } - - /* P_A and Q_A (radians). */ - p *= DAS2R - q *= DAS2R - - /* Form the ecliptic pole vector. */ - w = 1.0 - p*p - q*q - if w < 0.0 { - w = 0.0 - } else { - w = sqrt(w) - } - - s = sin(eps0) - c = cos(eps0) - vec[0] = p - vec[1] = -q*c - w*s - vec[2] = -q*s + w*c -} - -/* -Ltpequ Long-term precession of the equator. - -Given: - epj float64 Julian epoch (TT) - -Returned: - veq [3]float64 equator pole unit vector - -Notes: - - 1) The returned vector is with respect to the J2000.0 mean equator - and equinox. - - 2) The Vondrak et al. (2011, 2012) 400 millennia precession model - agrees with the IAU 2006 precession at J2000.0 and stays within - 100 microarcseconds during the 20th and 21st centuries. It is - accurate to a few arcseconds throughout the historical period, - worsening to a few tenths of a degree at the end of the - +/- 200,000 year time span. - -References: - - Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession - expressions, valid for long time intervals, Astron.Astrophys. 534, - A22 - - Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession - expressions, valid for long time intervals (Corrigendum), - Astron.Astrophys. 541, C1 -*/ -func Ltpequ(epj float64, veq *[3]float64) { - /* Polynomial coefficients */ - const NPOL = 4 - xypol := [2][4]float64{ - {5453.282155, 0.4252841, -0.00037173, -0.000000152}, - {-73750.930350, -0.7675452, -0.00018725, 0.000000231}, - } - - /* Periodic coefficients */ - xyper := [][5]float64{ - {256.75, -819.940624, 75004.344875, 81491.287984, 1558.515853}, - {708.15, -8444.676815, 624.033993, 787.163481, 7774.939698}, - {274.20, 2600.009459, 1251.136893, 1251.296102, -2219.534038}, - {241.45, 2755.175630, -1102.212834, -1257.950837, -2523.969396}, - {2309.00, -167.659835, -2660.664980, -2966.799730, 247.850422}, - {492.20, 871.855056, 699.291817, 639.744522, -846.485643}, - {396.10, 44.769698, 153.167220, 131.600209, -1393.124055}, - {288.90, -512.313065, -950.865637, -445.040117, 368.526116}, - {231.10, -819.415595, 499.754645, 584.522874, 749.045012}, - {1610.00, -538.071099, -145.188210, -89.756563, 444.704518}, - {620.00, -189.793622, 558.116553, 524.429630, 235.934465}, - {157.87, -402.922932, -23.923029, -13.549067, 374.049623}, - {220.30, 179.516345, -165.405086, -210.157124, -171.330180}, - {1200.00, -9.814756, 9.344131, -44.919798, -22.899655}, - } - NPER := len(xyper) - - /* Miscellaneous */ - - var t, x, y, w, a, s, c float64 - - /* Centuries since J2000. */ - t = (epj - 2000.0) / 100.0 - - /* Initialize X and Y accumulators. */ - x = 0.0 - y = 0.0 - - /* Periodic terms. */ - w = D2PI * t - for i := 0; i < NPER; i++ { - a = w / xyper[i][0] - s = sin(a) - c = cos(a) - x += c*xyper[i][1] + s*xyper[i][3] - y += c*xyper[i][2] + s*xyper[i][4] - } - - /* Polynomial terms. */ - w = 1.0 - for i := 0; i < NPOL; i++ { - x += xypol[0][i] * w - y += xypol[1][i] * w - w *= t - } - - /* X and Y (direction cosines). */ - x *= DAS2R - y *= DAS2R - - /* Form the equator pole vector. */ - veq[0] = x - veq[1] = y - w = 1.0 - x*x - y*y - if w < 0.0 { - veq[2] = 0.0 - } else { - veq[2] = sqrt(w) - } - -} - -/* -Num00a Nutation matrix, IAU 2000A -Form the matrix of nutation for a given date, IAU 2000A model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rmatn [3][3]float64 nutation matrix - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix operates in the sense V(true) = rmatn * V(mean), where - the p-vector V(true) is with respect to the true equatorial triad - of date and the p-vector V(mean) is with respect to the mean - equatorial triad of date. - - 3) A faster, but slightly less accurate, result (about 1 mas) can be - obtained by using instead the iauNum00b function. - -Called: - Pn00a bias/precession/nutation, IAU 2000A - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992), - Section 3.222-3 (p114). -*/ -func Num00a(date1, date2 float64, rmatn *[3][3]float64) { - var dpsi, deps, epsa float64 - var rb, rp, rbp, rbpn [3][3]float64 - - /* Obtain the required matrix (discarding other results). */ - Pn00a(date1, date2, - &dpsi, &deps, &epsa, &rb, &rp, &rbp, rmatn, &rbpn) -} - -/* -Num00b Nutation matrix, IAU 2000B -Form the matrix of nutation for a given date, IAU 2000B model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rmatn [3][3]float64 nutation matrix - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix operates in the sense V(true) = rmatn * V(mean), where - the p-vector V(true) is with respect to the true equatorial triad - of date and the p-vector V(mean) is with respect to the mean - equatorial triad of date. - - 3) The present function is faster, but slightly less accurate (about - 1 mas), than the iauNum00a function. - -Called: - Pn00b bias/precession/nutation, IAU 2000B - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992), - Section 3.222-3 (p114). -*/ -func Num00b(date1, date2 float64, rmatn *[3][3]float64) { - var dpsi, deps, epsa float64 - var rb, rp, rbp, rbpn [3][3]float64 - - /* Obtain the required matrix (discarding other results). */ - Pn00b(date1, date2, - &dpsi, &deps, &epsa, &rb, &rp, &rbp, rmatn, &rbpn) -} - -/* -Num06a Nutation matrix, IAU 2006/2000A -Form the matrix of nutation for a given date, IAU 2006/2000A model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rmatn [3][3]float64 nutation matrix - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix operates in the sense V(true) = rmatn * V(mean), where - the p-vector V(true) is with respect to the true equatorial triad - of date and the p-vector V(mean) is with respect to the mean - equatorial triad of date. - -Called: - Obl06 mean obliquity, IAU 2006 - Nut06a nutation, IAU 2006/2000A - Numat form nutation matrix - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992), - Section 3.222-3 (p114). -*/ -func Num06a(date1, date2 float64, rmatn *[3][3]float64) { - var eps, dp, de float64 - - /* Mean obliquity. */ - eps = Obl06(date1, date2) - - /* Nutation components. */ - Nut06a(date1, date2, &dp, &de) - - /* Nutation matrix. */ - Numat(eps, dp, de, rmatn) - -} - -/* -Numat Nutation matrix, generic Form the matrix of nutation. - -Given: - epsa float64 mean obliquity of date (Note 1) - dpsi,deps float64 nutation (Note 2) - -Returned: - rmatn [3][3]float64 nutation matrix (Note 3) - -Notes: - - - 1) The supplied mean obliquity epsa, must be consistent with the - precession-nutation models from which dpsi and deps were obtained. - - 2) The caller is responsible for providing the nutation components; - they are in longitude and obliquity, in radians and are with - respect to the equinox and ecliptic of date. - - 3) The matrix operates in the sense V(true) = rmatn * V(mean), - where the p-vector V(true) is with respect to the true - equatorial triad of date and the p-vector V(mean) is with - respect to the mean equatorial triad of date. - -Called: - Ir initialize r-matrix to identity - Rx rotate around X-axis - Rz rotate around Z-axis - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992), - Section 3.222-3 (p114). -*/ -func Numat(epsa, dpsi, deps float64, rmatn *[3][3]float64) { - /* Build the rotation matrix. */ - Ir(rmatn) - Rx(epsa, rmatn) - Rz(-dpsi, rmatn) - Rx(-(epsa + deps), rmatn) -} - -/* -Nut00a Nutation, IAU 2000A Nutation, IAU 2000A model -(MHB2000 luni-solar and planetary nutation with free core nutation omitted). - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - dpsi,deps float64 nutation, luni-solar + planetary (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The nutation components in longitude and obliquity are in radians - and with respect to the equinox and ecliptic of date. The - obliquity at J2000.0 is assumed to be the Lieske et al. (1977) - value of 84381.448 arcsec. - - Both the luni-solar and planetary nutations are included. The - latter are due to direct planetary nutations and the - perturbations of the lunar and terrestrial orbits. - - 3) The function computes the MHB2000 nutation series with the - associated corrections for planetary nutations. It is an - implementation of the nutation part of the IAU 2000A precession- - nutation model, formally adopted by the IAU General Assembly in - 2000, namely MHB2000 (Mathews et al. 2002), but with the free - core nutation (FCN - see Note 4) omitted. - - 4) The full MHB2000 model also contains contributions to the - nutations in longitude and obliquity due to the free-excitation - of the free-core-nutation during the period 1979-2000. These FCN - terms, which are time-dependent and unpredictable, are NOT - included in the present function and, if required, must be - independently computed. With the FCN corrections included, the - present function delivers a pole which is at current epochs - accurate to a few hundred microarcseconds. The omission of FCN - introduces further errors of about that size. - - 5) The present function provides classical nutation. The MHB2000 - algorithm, from which it is adapted, deals also with (i) the - offsets between the GCRS and mean poles and (ii) the adjustments - in longitude and obliquity due to the changed precession rates. - These additional functions, namely frame bias and precession - adjustments, are supported by the SOFA functions iauBi00 and - Pr00. - - 6) The MHB2000 algorithm also provides "total" nutations, comprising - the arithmetic sum of the frame bias, precession adjustments, - luni-solar nutation and planetary nutation. These total - nutations can be used in combination with an existing IAU 1976 - precession implementation, such as iauPmat76, to deliver GCRS- - to-true predictions of sub-mas accuracy at current dates. - However, there are three shortcomings in the MHB2000 model that - must be taken into account if more accurate or definitive results - are required (see Wallace 2002): - - (i) The MHB2000 total nutations are simply arithmetic sums, - yet in reality the various components are successive Euler - rotations. This slight lack of rigor leads to cross terms - that exceed 1 mas after a century. The rigorous procedure - is to form the GCRS-to-true rotation matrix by applying the - bias, precession and nutation in that order. - - (ii) Although the precession adjustments are stated to be with - respect to Lieske et al. (1977), the MHB2000 model does - not specify which set of Euler angles are to be used and - how the adjustments are to be applied. The most literal - and straightforward procedure is to adopt the 4-rotation - epsilon_0, psi_A, omega_A, xi_A option, and to add DPSIPR - to psi_A and DEPSPR to both omega_A and eps_A. - - (iii) The MHB2000 model predates the determination by Chapront - et al. (2002) of a 14.6 mas displacement between the - J2000.0 mean equinox and the origin of the ICRS frame. It - should, however, be noted that neglecting this displacement - when calculating star coordinates does not lead to a - 14.6 mas change in right ascension, only a small second- - order distortion in the pattern of the precession-nutation - effect. - - For these reasons, the SOFA functions do not generate the "total - nutations" directly, though they can of course easily be - generated by calling iauBi00, iauPr00 and the present function - and adding the results. - - 7) The MHB2000 model contains 41 instances where the same frequency - appears multiple times, of which 38 are duplicates and three are - triplicates. To keep the present code close to the original MHB - algorithm, this small inefficiency has not been corrected. - -Called: - Fal03 mean anomaly of the Moon - Faf03 mean argument of the latitude of the Moon - Faom03 mean longitude of the Moon's ascending node - Fame03 mean longitude of Mercury - Fave03 mean longitude of Venus - Fae03 mean longitude of Earth - Fama03 mean longitude of Mars - Faju03 mean longitude of Jupiter - Fasa03 mean longitude of Saturn - Faur03 mean longitude of Uranus - Fapa03 general accumulated precession in longitude - -References: - - Chapront, J., Chapront-Touze, M. & Francou, G. 2002, - Astron.Astrophys. 387, 700 - - Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977, - Astron.Astrophys. 58, 1-16 - - Mathews, P.M., Herring, T.A., Buffet, B.A. 2002, J.Geophys.Res. - 107, B4. The MHB_2000 code itself was obtained on 9th September - 2002 from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A. - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 - - Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, - Astron.Astrophys.Supp.Ser. 135, 111 - - Wallace, P.T., "Software for Implementing the IAU 2000 - Resolutions", in IERS Workshop 5.1 (2002) -*/ -func Nut00a(date1, date2 float64, dpsi, deps *float64) { - var i int - var t, el, elp, f, d, om, arg, dp, de, sarg, carg, - al, af, ad, aom, alme, alve, alea, alma, - alju, alsa, alur, alne, apa, dpsils, depsls, - dpsipl, depspl float64 - - /* Units of 0.1 microarcsecond to radians */ - const U2R = DAS2R / 1e7 - - /* ------------------------- */ - /* Luni-Solar nutation model */ - /* ------------------------- */ - - /* The units for the sine and cosine coefficients are */ - /* 0.1 microarcsecond and the same per Julian century */ - - xls := []struct { - nl, nlp, nf, nd, nom int /* coefficients of l,l',F,D,Om */ - sp, spt, cp float64 /* longitude sin, t*sin, cos coefficients */ - ce, cet, se float64 /* obliquity cos, t*cos, sin coefficients */ - }{ - - /* 1- 10 */ - {0, 0, 0, 0, 1, - -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0}, - {0, 0, 2, -2, 2, - -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0}, - {0, 0, 2, 0, 2, -2276413.0, -234.0, 2796.0, 978459.0, -485.0, 1374.0}, - {0, 0, 0, 0, 2, 2074554.0, 207.0, -698.0, -897492.0, 470.0, -291.0}, - {0, 1, 0, 0, 0, 1475877.0, -3633.0, 11817.0, 73871.0, -184.0, -1924.0}, - {0, 1, 2, -2, 2, -516821.0, 1226.0, -524.0, 224386.0, -677.0, -174.0}, - {1, 0, 0, 0, 0, 711159.0, 73.0, -872.0, -6750.0, 0.0, 358.0}, - {0, 0, 2, 0, 1, -387298.0, -367.0, 380.0, 200728.0, 18.0, 318.0}, - {1, 0, 2, 0, 2, -301461.0, -36.0, 816.0, 129025.0, -63.0, 367.0}, - {0, -1, 2, -2, 2, 215829.0, -494.0, 111.0, -95929.0, 299.0, 132.0}, - - /* 11-20 */ - {0, 0, 2, -2, 1, 128227.0, 137.0, 181.0, -68982.0, -9.0, 39.0}, - {-1, 0, 2, 0, 2, 123457.0, 11.0, 19.0, -53311.0, 32.0, -4.0}, - {-1, 0, 0, 2, 0, 156994.0, 10.0, -168.0, -1235.0, 0.0, 82.0}, - {1, 0, 0, 0, 1, 63110.0, 63.0, 27.0, -33228.0, 0.0, -9.0}, - {-1, 0, 0, 0, 1, -57976.0, -63.0, -189.0, 31429.0, 0.0, -75.0}, - {-1, 0, 2, 2, 2, -59641.0, -11.0, 149.0, 25543.0, -11.0, 66.0}, - {1, 0, 2, 0, 1, -51613.0, -42.0, 129.0, 26366.0, 0.0, 78.0}, - {-2, 0, 2, 0, 1, 45893.0, 50.0, 31.0, -24236.0, -10.0, 20.0}, - {0, 0, 0, 2, 0, 63384.0, 11.0, -150.0, -1220.0, 0.0, 29.0}, - {0, 0, 2, 2, 2, -38571.0, -1.0, 158.0, 16452.0, -11.0, 68.0}, - - /* 21-30 */ - {0, -2, 2, -2, 2, 32481.0, 0.0, 0.0, -13870.0, 0.0, 0.0}, - {-2, 0, 0, 2, 0, -47722.0, 0.0, -18.0, 477.0, 0.0, -25.0}, - {2, 0, 2, 0, 2, -31046.0, -1.0, 131.0, 13238.0, -11.0, 59.0}, - {1, 0, 2, -2, 2, 28593.0, 0.0, -1.0, -12338.0, 10.0, -3.0}, - {-1, 0, 2, 0, 1, 20441.0, 21.0, 10.0, -10758.0, 0.0, -3.0}, - {2, 0, 0, 0, 0, 29243.0, 0.0, -74.0, -609.0, 0.0, 13.0}, - {0, 0, 2, 0, 0, 25887.0, 0.0, -66.0, -550.0, 0.0, 11.0}, - {0, 1, 0, 0, 1, -14053.0, -25.0, 79.0, 8551.0, -2.0, -45.0}, - {-1, 0, 0, 2, 1, 15164.0, 10.0, 11.0, -8001.0, 0.0, -1.0}, - {0, 2, 2, -2, 2, -15794.0, 72.0, -16.0, 6850.0, -42.0, -5.0}, - - /* 31-40 */ - {0, 0, -2, 2, 0, 21783.0, 0.0, 13.0, -167.0, 0.0, 13.0}, - {1, 0, 0, -2, 1, -12873.0, -10.0, -37.0, 6953.0, 0.0, -14.0}, - {0, -1, 0, 0, 1, -12654.0, 11.0, 63.0, 6415.0, 0.0, 26.0}, - {-1, 0, 2, 2, 1, -10204.0, 0.0, 25.0, 5222.0, 0.0, 15.0}, - {0, 2, 0, 0, 0, 16707.0, -85.0, -10.0, 168.0, -1.0, 10.0}, - {1, 0, 2, 2, 2, -7691.0, 0.0, 44.0, 3268.0, 0.0, 19.0}, - {-2, 0, 2, 0, 0, -11024.0, 0.0, -14.0, 104.0, 0.0, 2.0}, - {0, 1, 2, 0, 2, 7566.0, -21.0, -11.0, -3250.0, 0.0, -5.0}, - {0, 0, 2, 2, 1, -6637.0, -11.0, 25.0, 3353.0, 0.0, 14.0}, - {0, -1, 2, 0, 2, -7141.0, 21.0, 8.0, 3070.0, 0.0, 4.0}, - - /* 41-50 */ - {0, 0, 0, 2, 1, -6302.0, -11.0, 2.0, 3272.0, 0.0, 4.0}, - {1, 0, 2, -2, 1, 5800.0, 10.0, 2.0, -3045.0, 0.0, -1.0}, - {2, 0, 2, -2, 2, 6443.0, 0.0, -7.0, -2768.0, 0.0, -4.0}, - {-2, 0, 0, 2, 1, -5774.0, -11.0, -15.0, 3041.0, 0.0, -5.0}, - {2, 0, 2, 0, 1, -5350.0, 0.0, 21.0, 2695.0, 0.0, 12.0}, - {0, -1, 2, -2, 1, -4752.0, -11.0, -3.0, 2719.0, 0.0, -3.0}, - {0, 0, 0, -2, 1, -4940.0, -11.0, -21.0, 2720.0, 0.0, -9.0}, - {-1, -1, 0, 2, 0, 7350.0, 0.0, -8.0, -51.0, 0.0, 4.0}, - {2, 0, 0, -2, 1, 4065.0, 0.0, 6.0, -2206.0, 0.0, 1.0}, - {1, 0, 0, 2, 0, 6579.0, 0.0, -24.0, -199.0, 0.0, 2.0}, - - /* 51-60 */ - {0, 1, 2, -2, 1, 3579.0, 0.0, 5.0, -1900.0, 0.0, 1.0}, - {1, -1, 0, 0, 0, 4725.0, 0.0, -6.0, -41.0, 0.0, 3.0}, - {-2, 0, 2, 0, 2, -3075.0, 0.0, -2.0, 1313.0, 0.0, -1.0}, - {3, 0, 2, 0, 2, -2904.0, 0.0, 15.0, 1233.0, 0.0, 7.0}, - {0, -1, 0, 2, 0, 4348.0, 0.0, -10.0, -81.0, 0.0, 2.0}, - {1, -1, 2, 0, 2, -2878.0, 0.0, 8.0, 1232.0, 0.0, 4.0}, - {0, 0, 0, 1, 0, -4230.0, 0.0, 5.0, -20.0, 0.0, -2.0}, - {-1, -1, 2, 2, 2, -2819.0, 0.0, 7.0, 1207.0, 0.0, 3.0}, - {-1, 0, 2, 0, 0, -4056.0, 0.0, 5.0, 40.0, 0.0, -2.0}, - {0, -1, 2, 2, 2, -2647.0, 0.0, 11.0, 1129.0, 0.0, 5.0}, - - /* 61-70 */ - {-2, 0, 0, 0, 1, -2294.0, 0.0, -10.0, 1266.0, 0.0, -4.0}, - {1, 1, 2, 0, 2, 2481.0, 0.0, -7.0, -1062.0, 0.0, -3.0}, - {2, 0, 0, 0, 1, 2179.0, 0.0, -2.0, -1129.0, 0.0, -2.0}, - {-1, 1, 0, 1, 0, 3276.0, 0.0, 1.0, -9.0, 0.0, 0.0}, - {1, 1, 0, 0, 0, -3389.0, 0.0, 5.0, 35.0, 0.0, -2.0}, - {1, 0, 2, 0, 0, 3339.0, 0.0, -13.0, -107.0, 0.0, 1.0}, - {-1, 0, 2, -2, 1, -1987.0, 0.0, -6.0, 1073.0, 0.0, -2.0}, - {1, 0, 0, 0, 2, -1981.0, 0.0, 0.0, 854.0, 0.0, 0.0}, - {-1, 0, 0, 1, 0, 4026.0, 0.0, -353.0, -553.0, 0.0, -139.0}, - {0, 0, 2, 1, 2, 1660.0, 0.0, -5.0, -710.0, 0.0, -2.0}, - - /* 71-80 */ - {-1, 0, 2, 4, 2, -1521.0, 0.0, 9.0, 647.0, 0.0, 4.0}, - {-1, 1, 0, 1, 1, 1314.0, 0.0, 0.0, -700.0, 0.0, 0.0}, - {0, -2, 2, -2, 1, -1283.0, 0.0, 0.0, 672.0, 0.0, 0.0}, - {1, 0, 2, 2, 1, -1331.0, 0.0, 8.0, 663.0, 0.0, 4.0}, - {-2, 0, 2, 2, 2, 1383.0, 0.0, -2.0, -594.0, 0.0, -2.0}, - {-1, 0, 0, 0, 2, 1405.0, 0.0, 4.0, -610.0, 0.0, 2.0}, - {1, 1, 2, -2, 2, 1290.0, 0.0, 0.0, -556.0, 0.0, 0.0}, - {-2, 0, 2, 4, 2, -1214.0, 0.0, 5.0, 518.0, 0.0, 2.0}, - {-1, 0, 4, 0, 2, 1146.0, 0.0, -3.0, -490.0, 0.0, -1.0}, - {2, 0, 2, -2, 1, 1019.0, 0.0, -1.0, -527.0, 0.0, -1.0}, - - /* 81-90 */ - {2, 0, 2, 2, 2, -1100.0, 0.0, 9.0, 465.0, 0.0, 4.0}, - {1, 0, 0, 2, 1, -970.0, 0.0, 2.0, 496.0, 0.0, 1.0}, - {3, 0, 0, 0, 0, 1575.0, 0.0, -6.0, -50.0, 0.0, 0.0}, - {3, 0, 2, -2, 2, 934.0, 0.0, -3.0, -399.0, 0.0, -1.0}, - {0, 0, 4, -2, 2, 922.0, 0.0, -1.0, -395.0, 0.0, -1.0}, - {0, 1, 2, 0, 1, 815.0, 0.0, -1.0, -422.0, 0.0, -1.0}, - {0, 0, -2, 2, 1, 834.0, 0.0, 2.0, -440.0, 0.0, 1.0}, - {0, 0, 2, -2, 3, 1248.0, 0.0, 0.0, -170.0, 0.0, 1.0}, - {-1, 0, 0, 4, 0, 1338.0, 0.0, -5.0, -39.0, 0.0, 0.0}, - {2, 0, -2, 0, 1, 716.0, 0.0, -2.0, -389.0, 0.0, -1.0}, - - /* 91-100 */ - {-2, 0, 0, 4, 0, 1282.0, 0.0, -3.0, -23.0, 0.0, 1.0}, - {-1, -1, 0, 2, 1, 742.0, 0.0, 1.0, -391.0, 0.0, 0.0}, - {-1, 0, 0, 1, 1, 1020.0, 0.0, -25.0, -495.0, 0.0, -10.0}, - {0, 1, 0, 0, 2, 715.0, 0.0, -4.0, -326.0, 0.0, 2.0}, - {0, 0, -2, 0, 1, -666.0, 0.0, -3.0, 369.0, 0.0, -1.0}, - {0, -1, 2, 0, 1, -667.0, 0.0, 1.0, 346.0, 0.0, 1.0}, - {0, 0, 2, -1, 2, -704.0, 0.0, 0.0, 304.0, 0.0, 0.0}, - {0, 0, 2, 4, 2, -694.0, 0.0, 5.0, 294.0, 0.0, 2.0}, - {-2, -1, 0, 2, 0, -1014.0, 0.0, -1.0, 4.0, 0.0, -1.0}, - {1, 1, 0, -2, 1, -585.0, 0.0, -2.0, 316.0, 0.0, -1.0}, - - /* 101-110 */ - {-1, 1, 0, 2, 0, -949.0, 0.0, 1.0, 8.0, 0.0, -1.0}, - {-1, 1, 0, 1, 2, -595.0, 0.0, 0.0, 258.0, 0.0, 0.0}, - {1, -1, 0, 0, 1, 528.0, 0.0, 0.0, -279.0, 0.0, 0.0}, - {1, -1, 2, 2, 2, -590.0, 0.0, 4.0, 252.0, 0.0, 2.0}, - {-1, 1, 2, 2, 2, 570.0, 0.0, -2.0, -244.0, 0.0, -1.0}, - {3, 0, 2, 0, 1, -502.0, 0.0, 3.0, 250.0, 0.0, 2.0}, - {0, 1, -2, 2, 0, -875.0, 0.0, 1.0, 29.0, 0.0, 0.0}, - {-1, 0, 0, -2, 1, -492.0, 0.0, -3.0, 275.0, 0.0, -1.0}, - {0, 1, 2, 2, 2, 535.0, 0.0, -2.0, -228.0, 0.0, -1.0}, - {-1, -1, 2, 2, 1, -467.0, 0.0, 1.0, 240.0, 0.0, 1.0}, - - /* 111-120 */ - {0, -1, 0, 0, 2, 591.0, 0.0, 0.0, -253.0, 0.0, 0.0}, - {1, 0, 2, -4, 1, -453.0, 0.0, -1.0, 244.0, 0.0, -1.0}, - {-1, 0, -2, 2, 0, 766.0, 0.0, 1.0, 9.0, 0.0, 0.0}, - {0, -1, 2, 2, 1, -446.0, 0.0, 2.0, 225.0, 0.0, 1.0}, - {2, -1, 2, 0, 2, -488.0, 0.0, 2.0, 207.0, 0.0, 1.0}, - {0, 0, 0, 2, 2, -468.0, 0.0, 0.0, 201.0, 0.0, 0.0}, - {1, -1, 2, 0, 1, -421.0, 0.0, 1.0, 216.0, 0.0, 1.0}, - {-1, 1, 2, 0, 2, 463.0, 0.0, 0.0, -200.0, 0.0, 0.0}, - {0, 1, 0, 2, 0, -673.0, 0.0, 2.0, 14.0, 0.0, 0.0}, - {0, -1, -2, 2, 0, 658.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - - /* 121-130 */ - {0, 3, 2, -2, 2, -438.0, 0.0, 0.0, 188.0, 0.0, 0.0}, - {0, 0, 0, 1, 1, -390.0, 0.0, 0.0, 205.0, 0.0, 0.0}, - {-1, 0, 2, 2, 0, 639.0, -11.0, -2.0, -19.0, 0.0, 0.0}, - {2, 1, 2, 0, 2, 412.0, 0.0, -2.0, -176.0, 0.0, -1.0}, - {1, 1, 0, 0, 1, -361.0, 0.0, 0.0, 189.0, 0.0, 0.0}, - {1, 1, 2, 0, 1, 360.0, 0.0, -1.0, -185.0, 0.0, -1.0}, - {2, 0, 0, 2, 0, 588.0, 0.0, -3.0, -24.0, 0.0, 0.0}, - {1, 0, -2, 2, 0, -578.0, 0.0, 1.0, 5.0, 0.0, 0.0}, - {-1, 0, 0, 2, 2, -396.0, 0.0, 0.0, 171.0, 0.0, 0.0}, - {0, 1, 0, 1, 0, 565.0, 0.0, -1.0, -6.0, 0.0, 0.0}, - - /* 131-140 */ - {0, 1, 0, -2, 1, -335.0, 0.0, -1.0, 184.0, 0.0, -1.0}, - {-1, 0, 2, -2, 2, 357.0, 0.0, 1.0, -154.0, 0.0, 0.0}, - {0, 0, 0, -1, 1, 321.0, 0.0, 1.0, -174.0, 0.0, 0.0}, - {-1, 1, 0, 0, 1, -301.0, 0.0, -1.0, 162.0, 0.0, 0.0}, - {1, 0, 2, -1, 2, -334.0, 0.0, 0.0, 144.0, 0.0, 0.0}, - {1, -1, 0, 2, 0, 493.0, 0.0, -2.0, -15.0, 0.0, 0.0}, - {0, 0, 0, 4, 0, 494.0, 0.0, -2.0, -19.0, 0.0, 0.0}, - {1, 0, 2, 1, 2, 337.0, 0.0, -1.0, -143.0, 0.0, -1.0}, - {0, 0, 2, 1, 1, 280.0, 0.0, -1.0, -144.0, 0.0, 0.0}, - {1, 0, 0, -2, 2, 309.0, 0.0, 1.0, -134.0, 0.0, 0.0}, - - /* 141-150 */ - {-1, 0, 2, 4, 1, -263.0, 0.0, 2.0, 131.0, 0.0, 1.0}, - {1, 0, -2, 0, 1, 253.0, 0.0, 1.0, -138.0, 0.0, 0.0}, - {1, 1, 2, -2, 1, 245.0, 0.0, 0.0, -128.0, 0.0, 0.0}, - {0, 0, 2, 2, 0, 416.0, 0.0, -2.0, -17.0, 0.0, 0.0}, - {-1, 0, 2, -1, 1, -229.0, 0.0, 0.0, 128.0, 0.0, 0.0}, - {-2, 0, 2, 2, 1, 231.0, 0.0, 0.0, -120.0, 0.0, 0.0}, - {4, 0, 2, 0, 2, -259.0, 0.0, 2.0, 109.0, 0.0, 1.0}, - {2, -1, 0, 0, 0, 375.0, 0.0, -1.0, -8.0, 0.0, 0.0}, - {2, 1, 2, -2, 2, 252.0, 0.0, 0.0, -108.0, 0.0, 0.0}, - {0, 1, 2, 1, 2, -245.0, 0.0, 1.0, 104.0, 0.0, 0.0}, - - /* 151-160 */ - {1, 0, 4, -2, 2, 243.0, 0.0, -1.0, -104.0, 0.0, 0.0}, - {-1, -1, 0, 0, 1, 208.0, 0.0, 1.0, -112.0, 0.0, 0.0}, - {0, 1, 0, 2, 1, 199.0, 0.0, 0.0, -102.0, 0.0, 0.0}, - {-2, 0, 2, 4, 1, -208.0, 0.0, 1.0, 105.0, 0.0, 0.0}, - {2, 0, 2, 0, 0, 335.0, 0.0, -2.0, -14.0, 0.0, 0.0}, - {1, 0, 0, 1, 0, -325.0, 0.0, 1.0, 7.0, 0.0, 0.0}, - {-1, 0, 0, 4, 1, -187.0, 0.0, 0.0, 96.0, 0.0, 0.0}, - {-1, 0, 4, 0, 1, 197.0, 0.0, -1.0, -100.0, 0.0, 0.0}, - {2, 0, 2, 2, 1, -192.0, 0.0, 2.0, 94.0, 0.0, 1.0}, - {0, 0, 2, -3, 2, -188.0, 0.0, 0.0, 83.0, 0.0, 0.0}, - - /* 161-170 */ - {-1, -2, 0, 2, 0, 276.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {2, 1, 0, 0, 0, -286.0, 0.0, 1.0, 6.0, 0.0, 0.0}, - {0, 0, 4, 0, 2, 186.0, 0.0, -1.0, -79.0, 0.0, 0.0}, - {0, 0, 0, 0, 3, -219.0, 0.0, 0.0, 43.0, 0.0, 0.0}, - {0, 3, 0, 0, 0, 276.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {0, 0, 2, -4, 1, -153.0, 0.0, -1.0, 84.0, 0.0, 0.0}, - {0, -1, 0, 2, 1, -156.0, 0.0, 0.0, 81.0, 0.0, 0.0}, - {0, 0, 0, 4, 1, -154.0, 0.0, 1.0, 78.0, 0.0, 0.0}, - {-1, -1, 2, 4, 2, -174.0, 0.0, 1.0, 75.0, 0.0, 0.0}, - {1, 0, 2, 4, 2, -163.0, 0.0, 2.0, 69.0, 0.0, 1.0}, - - /* 171-180 */ - {-2, 2, 0, 2, 0, -228.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {-2, -1, 2, 0, 1, 91.0, 0.0, -4.0, -54.0, 0.0, -2.0}, - {-2, 0, 0, 2, 2, 175.0, 0.0, 0.0, -75.0, 0.0, 0.0}, - {-1, -1, 2, 0, 2, -159.0, 0.0, 0.0, 69.0, 0.0, 0.0}, - {0, 0, 4, -2, 1, 141.0, 0.0, 0.0, -72.0, 0.0, 0.0}, - {3, 0, 2, -2, 1, 147.0, 0.0, 0.0, -75.0, 0.0, 0.0}, - {-2, -1, 0, 2, 1, -132.0, 0.0, 0.0, 69.0, 0.0, 0.0}, - {1, 0, 0, -1, 1, 159.0, 0.0, -28.0, -54.0, 0.0, 11.0}, - {0, -2, 0, 2, 0, 213.0, 0.0, 0.0, -4.0, 0.0, 0.0}, - {-2, 0, 0, 4, 1, 123.0, 0.0, 0.0, -64.0, 0.0, 0.0}, - - /* 181-190 */ - {-3, 0, 0, 0, 1, -118.0, 0.0, -1.0, 66.0, 0.0, 0.0}, - {1, 1, 2, 2, 2, 144.0, 0.0, -1.0, -61.0, 0.0, 0.0}, - {0, 0, 2, 4, 1, -121.0, 0.0, 1.0, 60.0, 0.0, 0.0}, - {3, 0, 2, 2, 2, -134.0, 0.0, 1.0, 56.0, 0.0, 1.0}, - {-1, 1, 2, -2, 1, -105.0, 0.0, 0.0, 57.0, 0.0, 0.0}, - {2, 0, 0, -4, 1, -102.0, 0.0, 0.0, 56.0, 0.0, 0.0}, - {0, 0, 0, -2, 2, 120.0, 0.0, 0.0, -52.0, 0.0, 0.0}, - {2, 0, 2, -4, 1, 101.0, 0.0, 0.0, -54.0, 0.0, 0.0}, - {-1, 1, 0, 2, 1, -113.0, 0.0, 0.0, 59.0, 0.0, 0.0}, - {0, 0, 2, -1, 1, -106.0, 0.0, 0.0, 61.0, 0.0, 0.0}, - - /* 191-200 */ - {0, -2, 2, 2, 2, -129.0, 0.0, 1.0, 55.0, 0.0, 0.0}, - {2, 0, 0, 2, 1, -114.0, 0.0, 0.0, 57.0, 0.0, 0.0}, - {4, 0, 2, -2, 2, 113.0, 0.0, -1.0, -49.0, 0.0, 0.0}, - {2, 0, 0, -2, 2, -102.0, 0.0, 0.0, 44.0, 0.0, 0.0}, - {0, 2, 0, 0, 1, -94.0, 0.0, 0.0, 51.0, 0.0, 0.0}, - {1, 0, 0, -4, 1, -100.0, 0.0, -1.0, 56.0, 0.0, 0.0}, - {0, 2, 2, -2, 1, 87.0, 0.0, 0.0, -47.0, 0.0, 0.0}, - {-3, 0, 0, 4, 0, 161.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {-1, 1, 2, 0, 1, 96.0, 0.0, 0.0, -50.0, 0.0, 0.0}, - {-1, -1, 0, 4, 0, 151.0, 0.0, -1.0, -5.0, 0.0, 0.0}, - - /* 201-210 */ - {-1, -2, 2, 2, 2, -104.0, 0.0, 0.0, 44.0, 0.0, 0.0}, - {-2, -1, 2, 4, 2, -110.0, 0.0, 0.0, 48.0, 0.0, 0.0}, - {1, -1, 2, 2, 1, -100.0, 0.0, 1.0, 50.0, 0.0, 0.0}, - {-2, 1, 0, 2, 0, 92.0, 0.0, -5.0, 12.0, 0.0, -2.0}, - {-2, 1, 2, 0, 1, 82.0, 0.0, 0.0, -45.0, 0.0, 0.0}, - {2, 1, 0, -2, 1, 82.0, 0.0, 0.0, -45.0, 0.0, 0.0}, - {-3, 0, 2, 0, 1, -78.0, 0.0, 0.0, 41.0, 0.0, 0.0}, - {-2, 0, 2, -2, 1, -77.0, 0.0, 0.0, 43.0, 0.0, 0.0}, - {-1, 1, 0, 2, 2, 2.0, 0.0, 0.0, 54.0, 0.0, 0.0}, - {0, -1, 2, -1, 2, 94.0, 0.0, 0.0, -40.0, 0.0, 0.0}, - - /* 211-220 */ - {-1, 0, 4, -2, 2, -93.0, 0.0, 0.0, 40.0, 0.0, 0.0}, - {0, -2, 2, 0, 2, -83.0, 0.0, 10.0, 40.0, 0.0, -2.0}, - {-1, 0, 2, 1, 2, 83.0, 0.0, 0.0, -36.0, 0.0, 0.0}, - {2, 0, 0, 0, 2, -91.0, 0.0, 0.0, 39.0, 0.0, 0.0}, - {0, 0, 2, 0, 3, 128.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {-2, 0, 4, 0, 2, -79.0, 0.0, 0.0, 34.0, 0.0, 0.0}, - {-1, 0, -2, 0, 1, -83.0, 0.0, 0.0, 47.0, 0.0, 0.0}, - {-1, 1, 2, 2, 1, 84.0, 0.0, 0.0, -44.0, 0.0, 0.0}, - {3, 0, 0, 0, 1, 83.0, 0.0, 0.0, -43.0, 0.0, 0.0}, - {-1, 0, 2, 3, 2, 91.0, 0.0, 0.0, -39.0, 0.0, 0.0}, - - /* 221-230 */ - {2, -1, 2, 0, 1, -77.0, 0.0, 0.0, 39.0, 0.0, 0.0}, - {0, 1, 2, 2, 1, 84.0, 0.0, 0.0, -43.0, 0.0, 0.0}, - {0, -1, 2, 4, 2, -92.0, 0.0, 1.0, 39.0, 0.0, 0.0}, - {2, -1, 2, 2, 2, -92.0, 0.0, 1.0, 39.0, 0.0, 0.0}, - {0, 2, -2, 2, 0, -94.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, -1, 2, -1, 1, 68.0, 0.0, 0.0, -36.0, 0.0, 0.0}, - {0, -2, 0, 0, 1, -61.0, 0.0, 0.0, 32.0, 0.0, 0.0}, - {1, 0, 2, -4, 2, 71.0, 0.0, 0.0, -31.0, 0.0, 0.0}, - {1, -1, 0, -2, 1, 62.0, 0.0, 0.0, -34.0, 0.0, 0.0}, - {-1, -1, 2, 0, 1, -63.0, 0.0, 0.0, 33.0, 0.0, 0.0}, - - /* 231-240 */ - {1, -1, 2, -2, 2, -73.0, 0.0, 0.0, 32.0, 0.0, 0.0}, - {-2, -1, 0, 4, 0, 115.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {-1, 0, 0, 3, 0, -103.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-2, -1, 2, 2, 2, 63.0, 0.0, 0.0, -28.0, 0.0, 0.0}, - {0, 2, 2, 0, 2, 74.0, 0.0, 0.0, -32.0, 0.0, 0.0}, - {1, 1, 0, 2, 0, -103.0, 0.0, -3.0, 3.0, 0.0, -1.0}, - {2, 0, 2, -1, 2, -69.0, 0.0, 0.0, 30.0, 0.0, 0.0}, - {1, 0, 2, 1, 1, 57.0, 0.0, 0.0, -29.0, 0.0, 0.0}, - {4, 0, 0, 0, 0, 94.0, 0.0, 0.0, -4.0, 0.0, 0.0}, - {2, 1, 2, 0, 1, 64.0, 0.0, 0.0, -33.0, 0.0, 0.0}, - - /* 241-250 */ - {3, -1, 2, 0, 2, -63.0, 0.0, 0.0, 26.0, 0.0, 0.0}, - {-2, 2, 0, 2, 1, -38.0, 0.0, 0.0, 20.0, 0.0, 0.0}, - {1, 0, 2, -3, 1, -43.0, 0.0, 0.0, 24.0, 0.0, 0.0}, - {1, 1, 2, -4, 1, -45.0, 0.0, 0.0, 23.0, 0.0, 0.0}, - {-1, -1, 2, -2, 1, 47.0, 0.0, 0.0, -24.0, 0.0, 0.0}, - {0, -1, 0, -1, 1, -48.0, 0.0, 0.0, 25.0, 0.0, 0.0}, - {0, -1, 0, -2, 1, 45.0, 0.0, 0.0, -26.0, 0.0, 0.0}, - {-2, 0, 0, 0, 2, 56.0, 0.0, 0.0, -25.0, 0.0, 0.0}, - {-2, 0, -2, 2, 0, 88.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-1, 0, -2, 4, 0, -75.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - - /* 251-260 */ - {1, -2, 0, 0, 0, 85.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 1, 0, 1, 1, 49.0, 0.0, 0.0, -26.0, 0.0, 0.0}, - {-1, 2, 0, 2, 0, -74.0, 0.0, -3.0, -1.0, 0.0, -1.0}, - {1, -1, 2, -2, 1, -39.0, 0.0, 0.0, 21.0, 0.0, 0.0}, - {1, 2, 2, -2, 2, 45.0, 0.0, 0.0, -20.0, 0.0, 0.0}, - {2, -1, 2, -2, 2, 51.0, 0.0, 0.0, -22.0, 0.0, 0.0}, - {1, 0, 2, -1, 1, -40.0, 0.0, 0.0, 21.0, 0.0, 0.0}, - {2, 1, 2, -2, 1, 41.0, 0.0, 0.0, -21.0, 0.0, 0.0}, - {-2, 0, 0, -2, 1, -42.0, 0.0, 0.0, 24.0, 0.0, 0.0}, - {1, -2, 2, 0, 2, -51.0, 0.0, 0.0, 22.0, 0.0, 0.0}, - - /* 261-270 */ - {0, 1, 2, 1, 1, -42.0, 0.0, 0.0, 22.0, 0.0, 0.0}, - {1, 0, 4, -2, 1, 39.0, 0.0, 0.0, -21.0, 0.0, 0.0}, - {-2, 0, 4, 2, 2, 46.0, 0.0, 0.0, -18.0, 0.0, 0.0}, - {1, 1, 2, 1, 2, -53.0, 0.0, 0.0, 22.0, 0.0, 0.0}, - {1, 0, 0, 4, 0, 82.0, 0.0, 0.0, -4.0, 0.0, 0.0}, - {1, 0, 2, 2, 0, 81.0, 0.0, -1.0, -4.0, 0.0, 0.0}, - {2, 0, 2, 1, 2, 47.0, 0.0, 0.0, -19.0, 0.0, 0.0}, - {3, 1, 2, 0, 2, 53.0, 0.0, 0.0, -23.0, 0.0, 0.0}, - {4, 0, 2, 0, 1, -45.0, 0.0, 0.0, 22.0, 0.0, 0.0}, - {-2, -1, 2, 0, 0, -44.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - - /* 271-280 */ - {0, 1, -2, 2, 1, -33.0, 0.0, 0.0, 16.0, 0.0, 0.0}, - {1, 0, -2, 1, 0, -61.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {0, -1, -2, 2, 1, 28.0, 0.0, 0.0, -15.0, 0.0, 0.0}, - {2, -1, 0, -2, 1, -38.0, 0.0, 0.0, 19.0, 0.0, 0.0}, - {-1, 0, 2, -1, 2, -33.0, 0.0, 0.0, 21.0, 0.0, 0.0}, - {1, 0, 2, -3, 2, -60.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 1, 2, -2, 3, 48.0, 0.0, 0.0, -10.0, 0.0, 0.0}, - {0, 0, 2, -3, 1, 27.0, 0.0, 0.0, -14.0, 0.0, 0.0}, - {-1, 0, -2, 2, 1, 38.0, 0.0, 0.0, -20.0, 0.0, 0.0}, - {0, 0, 2, -4, 2, 31.0, 0.0, 0.0, -13.0, 0.0, 0.0}, - - /* 281-290 */ - {-2, 1, 0, 0, 1, -29.0, 0.0, 0.0, 15.0, 0.0, 0.0}, - {-1, 0, 0, -1, 1, 28.0, 0.0, 0.0, -15.0, 0.0, 0.0}, - {2, 0, 2, -4, 2, -32.0, 0.0, 0.0, 15.0, 0.0, 0.0}, - {0, 0, 4, -4, 4, 45.0, 0.0, 0.0, -8.0, 0.0, 0.0}, - {0, 0, 4, -4, 2, -44.0, 0.0, 0.0, 19.0, 0.0, 0.0}, - {-1, -2, 0, 2, 1, 28.0, 0.0, 0.0, -15.0, 0.0, 0.0}, - {-2, 0, 0, 3, 0, -51.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, 0, -2, 2, 1, -36.0, 0.0, 0.0, 20.0, 0.0, 0.0}, - {-3, 0, 2, 2, 2, 44.0, 0.0, 0.0, -19.0, 0.0, 0.0}, - {-3, 0, 2, 2, 1, 26.0, 0.0, 0.0, -14.0, 0.0, 0.0}, - - /* 291-300 */ - {-2, 0, 2, 2, 0, -60.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {2, -1, 0, 0, 1, 35.0, 0.0, 0.0, -18.0, 0.0, 0.0}, - {-2, 1, 2, 2, 2, -27.0, 0.0, 0.0, 11.0, 0.0, 0.0}, - {1, 1, 0, 1, 0, 47.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {0, 1, 4, -2, 2, 36.0, 0.0, 0.0, -15.0, 0.0, 0.0}, - {-1, 1, 0, -2, 1, -36.0, 0.0, 0.0, 20.0, 0.0, 0.0}, - {0, 0, 0, -4, 1, -35.0, 0.0, 0.0, 19.0, 0.0, 0.0}, - {1, -1, 0, 2, 1, -37.0, 0.0, 0.0, 19.0, 0.0, 0.0}, - {1, 1, 0, 2, 1, 32.0, 0.0, 0.0, -16.0, 0.0, 0.0}, - {-1, 2, 2, 2, 2, 35.0, 0.0, 0.0, -14.0, 0.0, 0.0}, - - /* 301-310 */ - {3, 1, 2, -2, 2, 32.0, 0.0, 0.0, -13.0, 0.0, 0.0}, - {0, -1, 0, 4, 0, 65.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {2, -1, 0, 2, 0, 47.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {0, 0, 4, 0, 1, 32.0, 0.0, 0.0, -16.0, 0.0, 0.0}, - {2, 0, 4, -2, 2, 37.0, 0.0, 0.0, -16.0, 0.0, 0.0}, - {-1, -1, 2, 4, 1, -30.0, 0.0, 0.0, 15.0, 0.0, 0.0}, - {1, 0, 0, 4, 1, -32.0, 0.0, 0.0, 16.0, 0.0, 0.0}, - {1, -2, 2, 2, 2, -31.0, 0.0, 0.0, 13.0, 0.0, 0.0}, - {0, 0, 2, 3, 2, 37.0, 0.0, 0.0, -16.0, 0.0, 0.0}, - {-1, 1, 2, 4, 2, 31.0, 0.0, 0.0, -13.0, 0.0, 0.0}, - - /* 311-320 */ - {3, 0, 0, 2, 0, 49.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {-1, 0, 4, 2, 2, 32.0, 0.0, 0.0, -13.0, 0.0, 0.0}, - {1, 1, 2, 2, 1, 23.0, 0.0, 0.0, -12.0, 0.0, 0.0}, - {-2, 0, 2, 6, 2, -43.0, 0.0, 0.0, 18.0, 0.0, 0.0}, - {2, 1, 2, 2, 2, 26.0, 0.0, 0.0, -11.0, 0.0, 0.0}, - {-1, 0, 2, 6, 2, -32.0, 0.0, 0.0, 14.0, 0.0, 0.0}, - {1, 0, 2, 4, 1, -29.0, 0.0, 0.0, 14.0, 0.0, 0.0}, - {2, 0, 2, 4, 2, -27.0, 0.0, 0.0, 12.0, 0.0, 0.0}, - {1, 1, -2, 1, 0, 30.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-3, 1, 2, 1, 2, -11.0, 0.0, 0.0, 5.0, 0.0, 0.0}, - - /* 321-330 */ - {2, 0, -2, 0, 2, -21.0, 0.0, 0.0, 10.0, 0.0, 0.0}, - {-1, 0, 0, 1, 2, -34.0, 0.0, 0.0, 15.0, 0.0, 0.0}, - {-4, 0, 2, 2, 1, -10.0, 0.0, 0.0, 6.0, 0.0, 0.0}, - {-1, -1, 0, 1, 0, -36.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 0, -2, 2, 2, -9.0, 0.0, 0.0, 4.0, 0.0, 0.0}, - {1, 0, 0, -1, 2, -12.0, 0.0, 0.0, 5.0, 0.0, 0.0}, - {0, -1, 2, -2, 3, -21.0, 0.0, 0.0, 5.0, 0.0, 0.0}, - {-2, 1, 2, 0, 0, -29.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {0, 0, 2, -2, 4, -15.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {-2, -2, 0, 2, 0, -20.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - - /* 331-340 */ - {-2, 0, -2, 4, 0, 28.0, 0.0, 0.0, 0.0, 0.0, -2.0}, - {0, -2, -2, 2, 0, 17.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, 2, 0, -2, 1, -22.0, 0.0, 0.0, 12.0, 0.0, 0.0}, - {3, 0, 0, -4, 1, -14.0, 0.0, 0.0, 7.0, 0.0, 0.0}, - {-1, 1, 2, -2, 2, 24.0, 0.0, 0.0, -11.0, 0.0, 0.0}, - {1, -1, 2, -4, 1, 11.0, 0.0, 0.0, -6.0, 0.0, 0.0}, - {1, 1, 0, -2, 2, 14.0, 0.0, 0.0, -6.0, 0.0, 0.0}, - {-3, 0, 2, 0, 0, 24.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-3, 0, 2, 0, 2, 18.0, 0.0, 0.0, -8.0, 0.0, 0.0}, - {-2, 0, 0, 1, 0, -38.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - - /* 341-350 */ - {0, 0, -2, 1, 0, -31.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-3, 0, 0, 2, 1, -16.0, 0.0, 0.0, 8.0, 0.0, 0.0}, - {-1, -1, -2, 2, 0, 29.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 1, 2, -4, 1, -18.0, 0.0, 0.0, 10.0, 0.0, 0.0}, - {2, 1, 0, -4, 1, -10.0, 0.0, 0.0, 5.0, 0.0, 0.0}, - {0, 2, 0, -2, 1, -17.0, 0.0, 0.0, 10.0, 0.0, 0.0}, - {1, 0, 0, -3, 1, 9.0, 0.0, 0.0, -4.0, 0.0, 0.0}, - {-2, 0, 2, -2, 2, 16.0, 0.0, 0.0, -6.0, 0.0, 0.0}, - {-2, -1, 0, 0, 1, 22.0, 0.0, 0.0, -12.0, 0.0, 0.0}, - {-4, 0, 0, 2, 0, 20.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - - /* 351-360 */ - {1, 1, 0, -4, 1, -13.0, 0.0, 0.0, 6.0, 0.0, 0.0}, - {-1, 0, 2, -4, 1, -17.0, 0.0, 0.0, 9.0, 0.0, 0.0}, - {0, 0, 4, -4, 1, -14.0, 0.0, 0.0, 8.0, 0.0, 0.0}, - {0, 3, 2, -2, 2, 0.0, 0.0, 0.0, -7.0, 0.0, 0.0}, - {-3, -1, 0, 4, 0, 14.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-3, 0, 0, 4, 1, 19.0, 0.0, 0.0, -10.0, 0.0, 0.0}, - {1, -1, -2, 2, 0, -34.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, -1, 0, 2, 2, -20.0, 0.0, 0.0, 8.0, 0.0, 0.0}, - {1, -2, 0, 0, 1, 9.0, 0.0, 0.0, -5.0, 0.0, 0.0}, - {1, -1, 0, 0, 2, -18.0, 0.0, 0.0, 7.0, 0.0, 0.0}, - - /* 361-370 */ - {0, 0, 0, 1, 2, 13.0, 0.0, 0.0, -6.0, 0.0, 0.0}, - {-1, -1, 2, 0, 0, 17.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, -2, 2, -2, 2, -12.0, 0.0, 0.0, 5.0, 0.0, 0.0}, - {0, -1, 2, -1, 1, 15.0, 0.0, 0.0, -8.0, 0.0, 0.0}, - {-1, 0, 2, 0, 3, -11.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {1, 1, 0, 0, 2, 13.0, 0.0, 0.0, -5.0, 0.0, 0.0}, - {-1, 1, 2, 0, 0, -18.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, 2, 0, 0, 0, -35.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, 2, 2, 0, 2, 9.0, 0.0, 0.0, -4.0, 0.0, 0.0}, - {-1, 0, 4, -2, 1, -19.0, 0.0, 0.0, 10.0, 0.0, 0.0}, - - /* 371-380 */ - {3, 0, 2, -4, 2, -26.0, 0.0, 0.0, 11.0, 0.0, 0.0}, - {1, 2, 2, -2, 1, 8.0, 0.0, 0.0, -4.0, 0.0, 0.0}, - {1, 0, 4, -4, 2, -10.0, 0.0, 0.0, 4.0, 0.0, 0.0}, - {-2, -1, 0, 4, 1, 10.0, 0.0, 0.0, -6.0, 0.0, 0.0}, - {0, -1, 0, 2, 2, -21.0, 0.0, 0.0, 9.0, 0.0, 0.0}, - {-2, 1, 0, 4, 0, -15.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-2, -1, 2, 2, 1, 9.0, 0.0, 0.0, -5.0, 0.0, 0.0}, - {2, 0, -2, 2, 0, -29.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, 0, 0, 1, 1, -19.0, 0.0, 0.0, 10.0, 0.0, 0.0}, - {0, 1, 0, 2, 2, 12.0, 0.0, 0.0, -5.0, 0.0, 0.0}, - - /* 381-390 */ - {1, -1, 2, -1, 2, 22.0, 0.0, 0.0, -9.0, 0.0, 0.0}, - {-2, 0, 4, 0, 1, -10.0, 0.0, 0.0, 5.0, 0.0, 0.0}, - {2, 1, 0, 0, 1, -20.0, 0.0, 0.0, 11.0, 0.0, 0.0}, - {0, 1, 2, 0, 0, -20.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, -1, 4, -2, 2, -17.0, 0.0, 0.0, 7.0, 0.0, 0.0}, - {0, 0, 4, -2, 4, 15.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {0, 2, 2, 0, 1, 8.0, 0.0, 0.0, -4.0, 0.0, 0.0}, - {-3, 0, 0, 6, 0, 14.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, -1, 0, 4, 1, -12.0, 0.0, 0.0, 6.0, 0.0, 0.0}, - {1, -2, 0, 2, 0, 25.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - - /* 391-400 */ - {-1, 0, 0, 4, 2, -13.0, 0.0, 0.0, 6.0, 0.0, 0.0}, - {-1, -2, 2, 2, 1, -14.0, 0.0, 0.0, 8.0, 0.0, 0.0}, - {-1, 0, 0, -2, 2, 13.0, 0.0, 0.0, -5.0, 0.0, 0.0}, - {1, 0, -2, -2, 1, -17.0, 0.0, 0.0, 9.0, 0.0, 0.0}, - {0, 0, -2, -2, 1, -12.0, 0.0, 0.0, 6.0, 0.0, 0.0}, - {-2, 0, -2, 0, 1, -10.0, 0.0, 0.0, 5.0, 0.0, 0.0}, - {0, 0, 0, 3, 1, 10.0, 0.0, 0.0, -6.0, 0.0, 0.0}, - {0, 0, 0, 3, 0, -15.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, 1, 0, 4, 0, -22.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, -1, 2, 2, 0, 28.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - - /* 401-410 */ - {-2, 0, 2, 3, 2, 15.0, 0.0, 0.0, -7.0, 0.0, 0.0}, - {1, 0, 0, 2, 2, 23.0, 0.0, 0.0, -10.0, 0.0, 0.0}, - {0, -1, 2, 1, 2, 12.0, 0.0, 0.0, -5.0, 0.0, 0.0}, - {3, -1, 0, 0, 0, 29.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {2, 0, 0, 1, 0, -25.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {1, -1, 2, 0, 0, 22.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 0, 2, 1, 0, -18.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, 0, 2, 0, 3, 15.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {3, 1, 0, 0, 0, -23.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {3, -1, 2, -2, 2, 12.0, 0.0, 0.0, -5.0, 0.0, 0.0}, - - /* 411-420 */ - {2, 0, 2, -1, 1, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0}, - {1, 1, 2, 0, 0, -19.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 0, 4, -1, 2, -10.0, 0.0, 0.0, 4.0, 0.0, 0.0}, - {1, 2, 2, 0, 2, 21.0, 0.0, 0.0, -9.0, 0.0, 0.0}, - {-2, 0, 0, 6, 0, 23.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {0, -1, 0, 4, 1, -16.0, 0.0, 0.0, 8.0, 0.0, 0.0}, - {-2, -1, 2, 4, 1, -19.0, 0.0, 0.0, 9.0, 0.0, 0.0}, - {0, -2, 2, 2, 1, -22.0, 0.0, 0.0, 10.0, 0.0, 0.0}, - {0, -1, 2, 2, 0, 27.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {-1, 0, 2, 3, 1, 16.0, 0.0, 0.0, -8.0, 0.0, 0.0}, - - /* 421-430 */ - {-2, 1, 2, 4, 2, 19.0, 0.0, 0.0, -8.0, 0.0, 0.0}, - {2, 0, 0, 2, 2, 9.0, 0.0, 0.0, -4.0, 0.0, 0.0}, - {2, -2, 2, 0, 2, -9.0, 0.0, 0.0, 4.0, 0.0, 0.0}, - {-1, 1, 2, 3, 2, -9.0, 0.0, 0.0, 4.0, 0.0, 0.0}, - {3, 0, 2, -1, 2, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0}, - {4, 0, 2, -2, 1, 18.0, 0.0, 0.0, -9.0, 0.0, 0.0}, - {-1, 0, 0, 6, 0, 16.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {-1, -2, 2, 4, 2, -10.0, 0.0, 0.0, 4.0, 0.0, 0.0}, - {-3, 0, 2, 6, 2, -23.0, 0.0, 0.0, 9.0, 0.0, 0.0}, - {-1, 0, 2, 4, 0, 16.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - - /* 431-440 */ - {3, 0, 0, 2, 1, -12.0, 0.0, 0.0, 6.0, 0.0, 0.0}, - {3, -1, 2, 0, 1, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0}, - {3, 0, 2, 0, 0, 30.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {1, 0, 4, 0, 2, 24.0, 0.0, 0.0, -10.0, 0.0, 0.0}, - {5, 0, 2, -2, 2, 10.0, 0.0, 0.0, -4.0, 0.0, 0.0}, - {0, -1, 2, 4, 1, -16.0, 0.0, 0.0, 7.0, 0.0, 0.0}, - {2, -1, 2, 2, 1, -16.0, 0.0, 0.0, 7.0, 0.0, 0.0}, - {0, 1, 2, 4, 2, 17.0, 0.0, 0.0, -7.0, 0.0, 0.0}, - {1, -1, 2, 4, 2, -24.0, 0.0, 0.0, 10.0, 0.0, 0.0}, - {3, -1, 2, 2, 2, -12.0, 0.0, 0.0, 5.0, 0.0, 0.0}, - - /* 441-450 */ - {3, 0, 2, 2, 1, -24.0, 0.0, 0.0, 11.0, 0.0, 0.0}, - {5, 0, 2, 0, 2, -23.0, 0.0, 0.0, 9.0, 0.0, 0.0}, - {0, 0, 2, 6, 2, -13.0, 0.0, 0.0, 5.0, 0.0, 0.0}, - {4, 0, 2, 2, 2, -15.0, 0.0, 0.0, 7.0, 0.0, 0.0}, - {0, -1, 1, -1, 1, 0.0, 0.0, -1988.0, 0.0, 0.0, -1679.0}, - {-1, 0, 1, 0, 3, 0.0, 0.0, -63.0, 0.0, 0.0, -27.0}, - {0, -2, 2, -2, 3, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, 0, -1, 0, 1, 0.0, 0.0, 5.0, 0.0, 0.0, 4.0}, - {2, -2, 0, -2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {-1, 0, 1, 0, 2, 0.0, 0.0, 364.0, 0.0, 0.0, 176.0}, - - /* 451-460 */ - {-1, 0, 1, 0, 1, 0.0, 0.0, -1044.0, 0.0, 0.0, -891.0}, - {-1, -1, 2, -1, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {-2, 2, 0, 2, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {-1, 0, 1, 0, 0, 0.0, 0.0, 330.0, 0.0, 0.0, 0.0}, - {-4, 1, 2, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {-3, 0, 2, 1, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {-2, -1, 2, 0, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {1, 0, -2, 1, 1, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {2, -1, -2, 0, 1, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {-4, 0, 2, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - - /* 461-470 */ - {-3, 1, 0, 3, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, 0, -1, 2, 0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0}, - {0, -2, 0, 0, 2, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {0, -2, 0, 0, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {-3, 0, 0, 3, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-2, -1, 0, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {-1, 0, -2, 3, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-4, 0, 0, 4, 0, -12.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {2, 1, -2, 0, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {2, -1, 0, -2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - - /* 471-480 */ - {0, 0, 1, -1, 0, -5.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, 2, 0, 1, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-2, 1, 2, 0, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {1, 1, 0, -1, 1, 7.0, 0.0, 0.0, -4.0, 0.0, 0.0}, - {1, 0, 1, -2, 1, 0.0, 0.0, -12.0, 0.0, 0.0, -10.0}, - {0, 2, 0, 0, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {1, -1, 2, -3, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {-1, 1, 2, -1, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-2, 0, 4, -2, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {-2, 0, 4, -2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - - /* 481-490 */ - {-2, -2, 0, 2, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {-2, 0, -2, 4, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, 2, 2, -4, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {1, 1, 2, -4, 2, 7.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {-1, 2, 2, -2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {2, 0, 0, -3, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {-1, 2, 0, 0, 1, -5.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {0, 0, 0, -2, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, -1, 2, -2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-1, 1, 0, 0, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - - /* 491-500 */ - {0, 0, 0, -1, 2, -8.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {-2, 1, 0, 1, 0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, -2, 0, -2, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {1, 0, -2, 0, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-3, 1, 0, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, 1, -2, 2, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, -1, 0, 0, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {-3, 0, 0, 2, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-3, -1, 0, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {2, 0, 2, -6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - - /* 501-510 */ - {0, 1, 2, -4, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {2, 0, 0, -4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {-2, 1, 2, -2, 1, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {0, -1, 2, -4, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {0, 1, 0, -2, 2, 9.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {-1, 0, 0, -2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {2, 0, -2, -2, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {-4, 0, 2, 0, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-1, -1, 0, -1, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {0, 0, -2, 0, 2, 9.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - - /* 511-520 */ - {-3, 0, 0, 1, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, 0, -2, 1, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-2, 0, -2, 2, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {0, 0, -4, 2, 0, 8.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-2, -1, -2, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, 0, 2, -6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-1, 0, 2, -4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {1, 0, 0, -4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {2, 1, 2, -4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {2, 1, 2, -4, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - - /* 521-530 */ - {0, 1, 4, -4, 4, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 1, 4, -4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {-1, -1, -2, 4, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, -3, 0, 2, 0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, 0, -2, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-2, -1, 0, 3, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 0, -2, 3, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-2, 0, 0, 3, 1, -5.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {0, -1, 0, 1, 0, -13.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-3, 0, 2, 2, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - - /* 531-540 */ - {1, 1, -2, 2, 0, 10.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, 1, 0, 2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {1, -2, 2, -2, 1, 10.0, 0.0, 13.0, 6.0, 0.0, -5.0}, - {0, 0, 1, 0, 2, 0.0, 0.0, 30.0, 0.0, 0.0, 14.0}, - {0, 0, 1, 0, 1, 0.0, 0.0, -162.0, 0.0, 0.0, -138.0}, - {0, 0, 1, 0, 0, 0.0, 0.0, 75.0, 0.0, 0.0, 0.0}, - {-1, 2, 0, 2, 1, -7.0, 0.0, 0.0, 4.0, 0.0, 0.0}, - {0, 0, 2, 0, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-2, 0, 2, 0, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {2, 0, 0, -1, 1, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - - /* 541-550 */ - {3, 0, 0, -2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {1, 0, 2, -2, 3, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, 2, 0, 0, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {2, 0, 2, -3, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-1, 1, 4, -2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-2, -2, 0, 4, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, -3, 0, 2, 0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 0, -2, 4, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, -1, 0, 3, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-2, 0, 0, 4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - - /* 551-560 */ - {-1, 0, 0, 3, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {2, -2, 0, 0, 0, 7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, -1, 0, 1, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, 0, 0, 2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, -2, 2, 0, 1, -6.0, 0.0, -3.0, 3.0, 0.0, 1.0}, - {-1, 0, 1, 2, 1, 0.0, 0.0, -3.0, 0.0, 0.0, -2.0}, - {-1, 1, 0, 3, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, -1, 2, 1, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {0, -1, 2, 0, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-2, 1, 2, 2, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - - /* 561-570 */ - {2, -2, 2, -2, 2, -1.0, 0.0, 3.0, 3.0, 0.0, -1.0}, - {1, 1, 0, 1, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {1, 0, 1, 0, 1, 0.0, 0.0, -13.0, 0.0, 0.0, -11.0}, - {1, 0, 1, 0, 0, 3.0, 0.0, 6.0, 0.0, 0.0, 0.0}, - {0, 2, 0, 2, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {2, -1, 2, -2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {0, -1, 4, -2, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {0, 0, 4, -2, 3, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 1, 4, -2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {4, 0, 2, -4, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - - /* 571-580 */ - {2, 2, 2, -2, 2, 8.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {2, 0, 4, -4, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-1, -2, 0, 4, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, -3, 2, 2, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {-3, 0, 2, 4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {-3, 0, 2, -2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-1, -1, 0, -2, 1, 8.0, 0.0, 0.0, -4.0, 0.0, 0.0}, - {-3, 0, 0, 0, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {-3, 0, -2, 2, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 1, 0, -4, 1, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - - /* 581-590 */ - {-2, 1, 0, -2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-4, 0, 0, 0, 1, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0}, - {-1, 0, 0, -4, 1, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {-3, 0, 0, -2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {0, 0, 0, 3, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {-1, 1, 0, 4, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {1, -2, 2, 0, 1, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {0, 1, 0, 3, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-1, 0, 2, 2, 3, 6.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {0, 0, 2, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - - /* 591-600 */ - {-2, 0, 2, 2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-1, 1, 2, 2, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {3, 0, 0, 0, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {2, 1, 0, 1, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {2, -1, 2, -1, 2, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {0, 0, 2, 0, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {0, 0, 3, 0, 3, 0.0, 0.0, -26.0, 0.0, 0.0, -11.0}, - {0, 0, 3, 0, 2, 0.0, 0.0, -10.0, 0.0, 0.0, -5.0}, - {-1, 2, 2, 2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {-1, 0, 4, 0, 0, -13.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - - /* 601-610 */ - {1, 2, 2, 0, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {3, 1, 2, -2, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {1, 1, 4, -2, 2, 7.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {-2, -1, 0, 6, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, -2, 0, 4, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-2, 0, 0, 6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-2, -2, 2, 4, 2, -6.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {0, -3, 2, 2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {0, 0, 0, 4, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {-1, -1, 2, 3, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - - /* 611-620 */ - {-2, 0, 2, 4, 0, 13.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {2, -1, 0, 2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {1, 0, 0, 3, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 1, 0, 4, 1, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {0, 1, 0, 4, 0, -11.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, -1, 2, 1, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {0, 0, 2, 2, 3, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, 0, 2, 2, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {-1, 0, 2, 2, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-2, 0, 4, 2, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - - /* 621-630 */ - {2, 1, 0, 2, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {2, 1, 0, 2, 0, -12.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {2, -1, 2, 0, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, 0, 2, 1, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 1, 2, 2, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {2, 0, 2, 0, 3, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {3, 0, 2, 0, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {1, 0, 2, 0, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {1, 0, 3, 0, 3, 0.0, 0.0, -5.0, 0.0, 0.0, -2.0}, - {1, 1, 2, 1, 1, -7.0, 0.0, 0.0, 4.0, 0.0, 0.0}, - - /* 631-640 */ - {0, 2, 2, 2, 2, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {2, 1, 2, 0, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {2, 0, 4, -2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {4, 1, 2, -2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {-1, -1, 0, 6, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {-3, -1, 2, 6, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {-1, 0, 0, 6, 1, -5.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {-3, 0, 2, 6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {1, -1, 0, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {1, -1, 0, 4, 0, 12.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - - /* 641-650 */ - {-2, 0, 2, 5, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {1, -2, 2, 2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {3, -1, 0, 2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, -1, 2, 2, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 0, 2, 3, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {-1, 1, 2, 4, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {0, 1, 2, 3, 2, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {-1, 0, 4, 2, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {2, 0, 2, 1, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {5, 0, 0, 0, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - - /* 651-660 */ - {2, 1, 2, 1, 2, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {1, 0, 4, 0, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {3, 1, 2, 0, 1, 7.0, 0.0, 0.0, -4.0, 0.0, 0.0}, - {3, 0, 4, -2, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {-2, -1, 2, 6, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {0, 0, 0, 6, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, -2, 2, 4, 2, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {-2, 0, 2, 6, 1, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0}, - {2, 0, 0, 4, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {2, 0, 0, 4, 0, 10.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - - /* 661-670 */ - {2, -2, 2, 2, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {0, 0, 2, 4, 0, 7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {1, 0, 2, 3, 2, 7.0, 0.0, 0.0, -3.0, 0.0, 0.0}, - {4, 0, 0, 2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {2, 0, 2, 2, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0, 0, 4, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {4, -1, 2, 0, 2, -6.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {3, 0, 2, 1, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {2, 1, 2, 2, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {4, 1, 2, 0, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - - /* 671-678 */ - {-1, -1, 2, 6, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {-1, 0, 2, 6, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {1, -1, 2, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - {1, 1, 2, 4, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, - {3, 1, 2, 2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, - {5, 0, 2, 0, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {2, -1, 2, 4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, - {2, 0, 2, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, - } - - /* Number of terms in the luni-solar nutation model */ - NLS := len(xls) - - /* ------------------------ */ - /* Planetary nutation model */ - /* ------------------------ */ - - /* The units for the sine and cosine coefficients are */ - /* 0.1 microarcsecond */ - - xpl := []struct { - nl, /* coefficients of l, F, D and Omega */ - nf, - nd, - nom, - nme, /* coefficients of planetary longitudes */ - nve, - nea, - nma, - nju, - nsa, - nur, - nne, - npa int /* coefficient of general precession */ - sp, cp int /* longitude sin, cos coefficients */ - se, ce int /* obliquity sin, cos coefficients */ - }{ - - /* 1-10 */ - {0, 0, 0, 0, 0, 0, 8, -16, 4, 5, 0, 0, 0, 1440, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, -8, 16, -4, -5, 0, 0, 2, 56, -117, -42, -40}, - {0, 0, 0, 0, 0, 0, 8, -16, 4, 5, 0, 0, 2, 125, -43, 0, -54}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 2, 2, 0, 5, 0, 0}, - {0, 0, 0, 0, 0, 0, -4, 8, -1, -5, 0, 0, 2, 3, -7, -3, 0}, - {0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 1, 3, 0, 0, -2}, - {0, 1, -1, 1, 0, 0, 3, -8, 3, 0, 0, 0, 0, -114, 0, 0, 61}, - {-1, 0, 0, 0, 0, 10, -3, 0, 0, 0, 0, 0, 0, -219, 89, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, -2, 6, -3, 0, 2, -3, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, -462, 1604, 0, 0}, - - /* 11-20 */ - {0, 1, -1, 1, 0, 0, -5, 8, -3, 0, 0, 0, 0, 99, 0, 0, -53}, - {0, 0, 0, 0, 0, 0, -4, 8, -3, 0, 0, 0, 1, -3, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, 2, 0, 6, 2, 0}, - {0, 0, 0, 0, 0, -5, 6, 4, 0, 0, 0, 0, 2, 3, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 2, -12, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 1, 14, -218, 117, 8}, - {0, 1, -1, 1, 0, 0, -1, 0, 2, -5, 0, 0, 0, 31, -481, -257, -17}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, -491, 128, 0, 0}, - {0, 1, -1, 1, 0, 0, -1, 0, -2, 5, 0, 0, 0, -3084, 5123, 2735, 1647}, - {0, 0, 0, 0, 0, 0, 0, 0, -2, 5, 0, 0, 1, -1444, 2409, -1286, -771}, - - /* 21-30 */ - {0, 0, 0, 0, 0, 0, 0, 0, -2, 5, 0, 0, 2, 11, -24, -11, -9}, - {2, -1, -1, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0, 26, -9, 0, 0}, - {1, 0, -2, 0, 0, 19, -21, 3, 0, 0, 0, 0, 0, 103, -60, 0, 0}, - {0, 1, -1, 1, 0, 2, -4, 0, -3, 0, 0, 0, 0, 0, -13, -7, 0}, - {1, 0, -1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, -26, -29, -16, 14}, - {0, 1, -1, 1, 0, 0, -1, 0, -4, 10, 0, 0, 0, 9, -27, -14, -5}, - {-2, 0, 2, 1, 0, 0, 2, 0, 0, -5, 0, 0, 0, 12, 0, 0, -6}, - {0, 0, 0, 0, 0, 3, -7, 4, 0, 0, 0, 0, 0, -7, 0, 0, 0}, - {0, -1, 1, 0, 0, 0, 1, 0, 1, -1, 0, 0, 0, 0, 24, 0, 0}, - {-2, 0, 2, 1, 0, 0, 2, 0, -2, 0, 0, 0, 0, 284, 0, 0, -151}, - - /* 31-40 */ - {-1, 0, 0, 0, 0, 18, -16, 0, 0, 0, 0, 0, 0, 226, 101, 0, 0}, - {-2, 1, 1, 2, 0, 0, 1, 0, -2, 0, 0, 0, 0, 0, -8, -2, 0}, - {-1, 1, -1, 1, 0, 18, -17, 0, 0, 0, 0, 0, 0, 0, -6, -3, 0}, - {-1, 0, 1, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 5, 0, 0, -3}, - {0, 0, 0, 0, 0, -8, 13, 0, 0, 0, 0, 0, 2, -41, 175, 76, 17}, - {0, 2, -2, 2, 0, -8, 11, 0, 0, 0, 0, 0, 0, 0, 15, 6, 0}, - {0, 0, 0, 0, 0, -8, 13, 0, 0, 0, 0, 0, 1, 425, 212, -133, 269}, - {0, 1, -1, 1, 0, -8, 12, 0, 0, 0, 0, 0, 0, 1200, 598, 319, -641}, - {0, 0, 0, 0, 0, 8, -13, 0, 0, 0, 0, 0, 0, 235, 334, 0, 0}, - {0, 1, -1, 1, 0, 8, -14, 0, 0, 0, 0, 0, 0, 11, -12, -7, -6}, - - /* 41-50 */ - {0, 0, 0, 0, 0, 8, -13, 0, 0, 0, 0, 0, 1, 5, -6, 3, 3}, - {-2, 0, 2, 1, 0, 0, 2, 0, -4, 5, 0, 0, 0, -5, 0, 0, 3}, - {-2, 0, 2, 2, 0, 3, -3, 0, 0, 0, 0, 0, 0, 6, 0, 0, -3}, - {-2, 0, 2, 0, 0, 0, 2, 0, -3, 1, 0, 0, 0, 15, 0, 0, 0}, - {0, 0, 0, 1, 0, 3, -5, 0, 2, 0, 0, 0, 0, 13, 0, 0, -7}, - {-2, 0, 2, 0, 0, 0, 2, 0, -4, 3, 0, 0, 0, -6, -9, 0, 0}, - {0, -1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 266, -78, 0, 0}, - {0, 0, 0, 1, 0, 0, -1, 2, 0, 0, 0, 0, 0, -460, -435, -232, 246}, - {0, 1, -1, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0, 15, 7, 0}, - {-1, 1, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0, -3, 0, 0, 2}, - - /* 51-60 */ - {-1, 0, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, 131, 0, 0}, - {-2, 0, 2, 0, 0, 0, 2, 0, -2, -2, 0, 0, 0, 4, 0, 0, 0}, - {-2, 2, 0, 2, 0, 0, -5, 9, 0, 0, 0, 0, 0, 0, 3, 0, 0}, - {0, 1, -1, 1, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 4, 2, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0}, - {0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 2, 0, -17, -19, -10, 9}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, -9, -11, 6, -5}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, -6, 0, 0, 3}, - {-1, 0, 1, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -16, 8, 0, 0}, - {0, -1, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0}, - - /* 61-70 */ - {0, 1, -1, 2, 0, 0, -1, 0, 0, 2, 0, 0, 0, 11, 24, 11, -5}, - {0, 0, 0, 1, 0, 0, -9, 17, 0, 0, 0, 0, 0, -3, -4, -2, 1}, - {0, 0, 0, 2, 0, -3, 5, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, - {0, 1, -1, 1, 0, 0, -1, 0, -1, 2, 0, 0, 0, 0, -8, -4, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 3, 0, 0}, - {1, 0, -2, 0, 0, 17, -16, 0, -2, 0, 0, 0, 0, 0, 5, 0, 0}, - {0, 1, -1, 1, 0, 0, -1, 0, 1, -3, 0, 0, 0, 0, 3, 2, 0}, - {-2, 0, 2, 1, 0, 0, 5, -6, 0, 0, 0, 0, 0, -6, 4, 2, 3}, - {0, -2, 2, 0, 0, 0, 9, -13, 0, 0, 0, 0, 0, -3, -5, 0, 0}, - {0, 1, -1, 2, 0, 0, -1, 0, 0, 1, 0, 0, 0, -5, 0, 0, 2}, - - /* 71-80 */ - {0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 24, 13, -2}, - {0, -1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, -42, 20, 0, 0}, - {0, -2, 2, 0, 0, 5, -6, 0, 0, 0, 0, 0, 0, -10, 233, 0, 0}, - {0, -1, 1, 1, 0, 5, -7, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1}, - {-2, 0, 2, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0, 78, -18, 0, 0}, - {2, 1, -3, 1, 0, -6, 7, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0}, - {0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -3, -1, 0}, - {0, -1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, -4, -2, 1}, - {0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 2, 0, 0, 0, -8, -4, -1}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, -5, 3, 0}, - - /* 81-90 */ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, -7, 0, 0, 3}, - {0, 0, 0, 0, 0, 0, -8, 15, 0, 0, 0, 0, 2, -14, 8, 3, 6}, - {0, 0, 0, 0, 0, 0, -8, 15, 0, 0, 0, 0, 1, 0, 8, -4, 0}, - {0, 1, -1, 1, 0, 0, -9, 15, 0, 0, 0, 0, 0, 0, 19, 10, 0}, - {0, 0, 0, 0, 0, 0, 8, -15, 0, 0, 0, 0, 0, 45, -22, 0, 0}, - {1, -1, -1, 0, 0, 0, 8, -15, 0, 0, 0, 0, 0, -3, 0, 0, 0}, - {2, 0, -2, 0, 0, 2, -5, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0}, - {-2, 0, 2, 0, 0, 0, 2, 0, -5, 5, 0, 0, 0, 0, 3, 0, 0}, - {2, 0, -2, 1, 0, 0, -6, 8, 0, 0, 0, 0, 0, 3, 5, 3, -2}, - {2, 0, -2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0, 89, -16, -9, -48}, - - /* 91-100 */ - {-2, 1, 1, 0, 0, 0, 1, 0, -3, 0, 0, 0, 0, 0, 3, 0, 0}, - {-2, 1, 1, 1, 0, 0, 1, 0, -3, 0, 0, 0, 0, -3, 7, 4, 2}, - {-2, 0, 2, 0, 0, 0, 2, 0, -3, 0, 0, 0, 0, -349, -62, 0, 0}, - {-2, 0, 2, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, -15, 22, 0, 0}, - {-2, 0, 2, 0, 0, 0, 2, 0, -1, -5, 0, 0, 0, -3, 0, 0, 0}, - {-1, 0, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, -53, 0, 0, 0}, - {-1, 1, 1, 1, 0, -20, 20, 0, 0, 0, 0, 0, 0, 5, 0, 0, -3}, - {1, 0, -2, 0, 0, 20, -21, 0, 0, 0, 0, 0, 0, 0, -8, 0, 0}, - {0, 0, 0, 1, 0, 0, 8, -15, 0, 0, 0, 0, 0, 15, -7, -4, -8}, - {0, 2, -2, 1, 0, 0, -10, 15, 0, 0, 0, 0, 0, -3, 0, 0, 1}, - - /* 101-110 */ - {0, -1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, -21, -78, 0, 0}, - {0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 20, -70, -37, -11}, - {0, 1, -1, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, 6, 3, 0}, - {0, 1, -1, 1, 0, 0, -1, 0, -2, 4, 0, 0, 0, 5, 3, 2, -2}, - {2, 0, -2, 1, 0, -6, 8, 0, 0, 0, 0, 0, 0, -17, -4, -2, 9}, - {0, -2, 2, 1, 0, 5, -6, 0, 0, 0, 0, 0, 0, 0, 6, 3, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 32, 15, -8, 17}, - {0, 1, -1, 1, 0, 0, -1, 0, 0, -1, 0, 0, 0, 174, 84, 45, -93}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 11, 56, 0, 0}, - {0, 1, -1, 1, 0, 0, -1, 0, 0, 1, 0, 0, 0, -66, -12, -6, 35}, - - /* 111-120 */ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 47, 8, 4, -25}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 8, 4, 0}, - {0, 2, -2, 1, 0, 0, -9, 13, 0, 0, 0, 0, 0, 10, -22, -12, -5}, - {0, 0, 0, 1, 0, 0, 7, -13, 0, 0, 0, 0, 0, -3, 0, 0, 2}, - {-2, 0, 2, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, -24, 12, 0, 0}, - {0, 0, 0, 0, 0, 0, 9, -17, 0, 0, 0, 0, 0, 5, -6, 0, 0}, - {0, 0, 0, 0, 0, 0, -9, 17, 0, 0, 0, 0, 2, 3, 0, 0, -2}, - {1, 0, -1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 4, 3, 1, -2}, - {1, 0, -1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, 29, 15, 0}, - {0, 0, 0, 2, 0, 0, -1, 2, 0, 0, 0, 0, 0, -5, -4, -2, 2}, - - /* 121-130 */ - {0, -1, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 8, -3, -1, -5}, - {0, -2, 2, 0, 1, 0, -2, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0}, - {0, 0, 0, 0, 0, 3, -5, 0, 2, 0, 0, 0, 0, 10, 0, 0, 0}, - {-2, 0, 2, 1, 0, 0, 2, 0, -3, 1, 0, 0, 0, 3, 0, 0, -2}, - {-2, 0, 2, 1, 0, 3, -3, 0, 0, 0, 0, 0, 0, -5, 0, 0, 3}, - {0, 0, 0, 1, 0, 8, -13, 0, 0, 0, 0, 0, 0, 46, 66, 35, -25}, - {0, -1, 1, 0, 0, 8, -12, 0, 0, 0, 0, 0, 0, -14, 7, 0, 0}, - {0, 2, -2, 1, 0, -8, 11, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0}, - {-1, 0, 1, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -5, 0, 0, 0}, - {-1, 0, 0, 1, 0, 18, -16, 0, 0, 0, 0, 0, 0, -68, -34, -18, 36}, - - /* 131-140 */ - {0, 1, -1, 1, 0, 0, -1, 0, -1, 1, 0, 0, 0, 0, 14, 7, 0}, - {0, 0, 0, 1, 0, 3, -7, 4, 0, 0, 0, 0, 0, 10, -6, -3, -5}, - {-2, 1, 1, 1, 0, 0, -3, 7, 0, 0, 0, 0, 0, -5, -4, -2, 3}, - {0, 1, -1, 2, 0, 0, -1, 0, -2, 5, 0, 0, 0, -3, 5, 2, 1}, - {0, 0, 0, 1, 0, 0, 0, 0, -2, 5, 0, 0, 0, 76, 17, 9, -41}, - {0, 0, 0, 1, 0, 0, -4, 8, -3, 0, 0, 0, 0, 84, 298, 159, -45}, - {1, 0, 0, 1, 0, -10, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, - {0, 2, -2, 1, 0, 0, -2, 0, 0, 0, 0, 0, 0, -3, 0, 0, 2}, - {-1, 0, 0, 1, 0, 10, -3, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1}, - {0, 0, 0, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0, -82, 292, 156, 44}, - - /* 141-150 */ - {0, 0, 0, 1, 0, 0, 0, 0, 2, -5, 0, 0, 0, -73, 17, 9, 39}, - {0, -1, 1, 0, 0, 0, 1, 0, 2, -5, 0, 0, 0, -9, -16, 0, 0}, - {2, -1, -1, 1, 0, 0, 3, -7, 0, 0, 0, 0, 0, 3, 0, -1, -2}, - {-2, 0, 2, 0, 0, 0, 2, 0, 0, -5, 0, 0, 0, -3, 0, 0, 0}, - {0, 0, 0, 1, 0, -3, 7, -4, 0, 0, 0, 0, 0, -9, -5, -3, 5}, - {-2, 0, 2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, -439, 0, 0, 0}, - {1, 0, 0, 1, 0, -18, 16, 0, 0, 0, 0, 0, 0, 57, -28, -15, -30}, - {-2, 1, 1, 1, 0, 0, 1, 0, -2, 0, 0, 0, 0, 0, -6, -3, 0}, - {0, 1, -1, 2, 0, -8, 12, 0, 0, 0, 0, 0, 0, -4, 0, 0, 2}, - {0, 0, 0, 1, 0, -8, 13, 0, 0, 0, 0, 0, 0, -40, 57, 30, 21}, - - /* 151-160 */ - {0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 1, 23, 7, 3, -13}, - {0, 1, -1, 1, 0, 0, 0, -2, 0, 0, 0, 0, 0, 273, 80, 43, -146}, - {0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -449, 430, 0, 0}, - {0, 1, -1, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0, -8, -47, -25, 4}, - {0, 0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 1, 6, 47, 25, -3}, - {-1, 0, 1, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, 23, 13, 0}, - {-1, 0, 1, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, -3, 0, 0, 2}, - {0, 1, -1, 1, 0, 0, -1, 0, 0, -2, 0, 0, 0, 3, -4, -2, -2}, - {0, 1, -1, 1, 0, 0, -1, 0, 0, 2, 0, 0, 0, -48, -110, -59, 26}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 51, 114, 61, -27}, - - /* 161-170 */ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, -133, 0, 0, 57}, - {0, 1, -1, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0}, - {0, 0, 0, 1, 0, -3, 5, 0, 0, 0, 0, 0, 0, -21, -6, -3, 11}, - {0, 1, -1, 2, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, -3, -1, 0}, - {0, 0, 0, 1, 0, 0, -2, 4, 0, 0, 0, 0, 0, -11, -21, -11, 6}, - {0, 2, -2, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0, -18, -436, -233, 9}, - {0, -1, 1, 0, 0, 5, -7, 0, 0, 0, 0, 0, 0, 35, -7, 0, 0}, - {0, 0, 0, 1, 0, 5, -8, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0}, - {-2, 0, 2, 1, 0, 6, -8, 0, 0, 0, 0, 0, 0, 11, -3, -1, -6}, - {0, 0, 0, 1, 0, 0, -8, 15, 0, 0, 0, 0, 0, -5, -3, -1, 3}, - - /* 171-180 */ - {-2, 0, 2, 1, 0, 0, 2, 0, -3, 0, 0, 0, 0, -53, -9, -5, 28}, - {-2, 0, 2, 1, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0, 3, 2, 1}, - {1, 0, -1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 4, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, -4, 0, 0}, - {0, 1, -1, 1, 0, 0, -1, 0, -1, 0, 0, 0, 0, -50, 194, 103, 27}, - {0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 1, -13, 52, 28, 7}, - {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -91, 248, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 6, 49, 26, -3}, - {0, 1, -1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, -6, -47, -25, 3}, - {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 3, 0}, - - /* 181-190 */ - {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 52, 23, 10, -23}, - {0, 1, -1, 2, 0, 0, -1, 0, 0, -1, 0, 0, 0, -3, 0, 0, 1}, - {0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 5, 3, 0}, - {0, -1, 1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, -4, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, -7, 13, 0, 0, 0, 0, 2, -4, 8, 3, 2}, - {0, 0, 0, 0, 0, 0, 7, -13, 0, 0, 0, 0, 0, 10, 0, 0, 0}, - {2, 0, -2, 1, 0, 0, -5, 6, 0, 0, 0, 0, 0, 3, 0, 0, -2}, - {0, 2, -2, 1, 0, 0, -8, 11, 0, 0, 0, 0, 0, 0, 8, 4, 0}, - {0, 2, -2, 1, -1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 8, 4, 1}, - {-2, 0, 2, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, -4, 0, 0, 0}, - - /* 191-200 */ - {0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, -4, 0, 0, 0}, - {0, 1, -1, 1, 0, 0, -1, 0, 0, 3, 0, 0, 0, -8, 4, 2, 4}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1, 8, -4, -2, -4}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2, 0, 15, 7, 0}, - {-2, 0, 2, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, -138, 0, 0, 0}, - {0, 0, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0, 0, -7, -3, 0}, - {0, 0, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -7, -3, 0}, - {2, 0, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0, 54, 0, 0, -29}, - {0, 1, -1, 2, 0, 0, -1, 0, 2, 0, 0, 0, 0, 0, 10, 4, 0}, - {0, 1, -1, 2, 0, 0, 0, -2, 0, 0, 0, 0, 0, -7, 0, 0, 3}, - - /* 201-210 */ - {0, 0, 0, 1, 0, 0, 1, -2, 0, 0, 0, 0, 0, -37, 35, 19, 20}, - {0, -1, 1, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 4, 0, 0}, - {0, -1, 1, 0, 0, 0, 1, 0, 0, -2, 0, 0, 0, -4, 9, 0, 0}, - {0, 2, -2, 1, 0, 0, -2, 0, 0, 2, 0, 0, 0, 8, 0, 0, -4}, - {0, 1, -1, 1, 0, 3, -6, 0, 0, 0, 0, 0, 0, -9, -14, -8, 5}, - {0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 1, -3, -9, -5, 3}, - {0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 0, -145, 47, 0, 0}, - {0, 1, -1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, -10, 40, 21, 5}, - {0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 1, 11, -49, -26, -7}, - {0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 2, -2150, 0, 0, 932}, - - /* 211-220 */ - {0, 2, -2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0, -12, 0, 0, 5}, - {0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 2, 85, 0, 0, -37}, - {0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 1, 4, 0, 0, -2}, - {0, 1, -1, 1, 0, 0, 1, -4, 0, 0, 0, 0, 0, 3, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -86, 153, 0, 0}, - {0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 1, -6, 9, 5, 3}, - {0, 1, -1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 9, -13, -7, -5}, - {0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 1, -8, 12, 6, 4}, - {0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 2, -51, 0, 0, 22}, - {0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 2, -11, -268, -116, 5}, - - /* 221-230 */ - {0, 2, -2, 2, 0, -5, 6, 0, 0, 0, 0, 0, 0, 0, 12, 5, 0}, - {0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 2, 0, 7, 3, 0}, - {0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 1, 31, 6, 3, -17}, - {0, 1, -1, 1, 0, -5, 7, 0, 0, 0, 0, 0, 0, 140, 27, 14, -75}, - {0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 1, 57, 11, 6, -30}, - {0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, 0, -14, -39, 0, 0}, - {0, 1, -1, 2, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, -6, -2, 0}, - {0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 4, 15, 8, -2}, - {0, -1, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 4, 0, 0}, - {0, 2, -2, 1, 0, 0, -2, 0, 1, 0, 0, 0, 0, -3, 0, 0, 1}, - - /* 231-240 */ - {0, 0, 0, 0, 0, 0, -6, 11, 0, 0, 0, 0, 2, 0, 11, 5, 0}, - {0, 0, 0, 0, 0, 0, 6, -11, 0, 0, 0, 0, 0, 9, 6, 0, 0}, - {0, 0, 0, 0, -1, 0, 4, 0, 0, 0, 0, 0, 2, -4, 10, 4, 2}, - {0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0}, - {2, 0, -2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0, 16, 0, 0, -9}, - {-2, 0, 2, 0, 0, 0, 2, 0, 0, -2, 0, 0, 0, -3, 0, 0, 0}, - {0, 2, -2, 1, 0, 0, -7, 9, 0, 0, 0, 0, 0, 0, 3, 2, -1}, - {0, 0, 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 2, 7, 0, 0, -3}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, -25, 22, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 42, 223, 119, -22}, - - /* 241-250 */ - {0, 1, -1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, -27, -143, -77, 14}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 9, 49, 26, -5}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, -1166, 0, 0, 505}, - {0, 2, -2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0, -5, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2, -6, 0, 0, 3}, - {0, 0, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0, -8, 0, 1, 4}, - {0, -1, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0}, - {0, 2, -2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0, 117, 0, 0, -63}, - {0, 0, 0, 1, 0, 0, 2, -4, 0, 0, 0, 0, 0, -4, 8, 4, 2}, - {0, 2, -2, 1, 0, 0, -4, 4, 0, 0, 0, 0, 0, 3, 0, 0, -2}, - - /* 251-260 */ - {0, 1, -1, 2, 0, -5, 7, 0, 0, 0, 0, 0, 0, -5, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 31, 0, 0}, - {0, 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 1, -5, 0, 1, 3}, - {0, 1, -1, 1, 0, 0, -4, 6, 0, 0, 0, 0, 0, 4, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 1, -4, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 2, -24, -13, -6, 10}, - {0, -1, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0}, - {0, 0, 0, 1, 0, 2, -3, 0, 0, 0, 0, 0, 0, 0, -32, -17, 0}, - {0, 0, 0, 0, 0, 0, -5, 9, 0, 0, 0, 0, 2, 8, 12, 5, -3}, - {0, 0, 0, 0, 0, 0, -5, 9, 0, 0, 0, 0, 1, 3, 0, 0, -1}, - - /* 261-270 */ - {0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, 0, 7, 13, 0, 0}, - {0, -1, 1, 0, 0, 0, 1, 0, -2, 0, 0, 0, 0, -3, 16, 0, 0}, - {0, 2, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0, 50, 0, 0, -27}, - {-2, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -5, -3, 0}, - {0, -2, 2, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0}, - {0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 0, 1, 0, 5, 3, 1}, - {0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 0, 2, 24, 5, 2, -11}, - {0, 0, 0, 0, 0, -2, 3, 0, 0, 0, 0, 0, 2, 5, -11, -5, -2}, - {0, 0, 0, 0, 0, -2, 3, 0, 0, 0, 0, 0, 1, 30, -3, -2, -16}, - {0, 1, -1, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0, 18, 0, 0, -9}, - - /* 271-280 */ - {0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 0, 8, 614, 0, 0}, - {0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 1, 3, -3, -1, -2}, - {0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 6, 17, 9, -3}, - {0, 1, -1, 1, 0, 0, -1, 0, 3, 0, 0, 0, 0, -3, -9, -5, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 6, 3, -1}, - {0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2, -127, 21, 9, 55}, - {0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, 0, 3, 5, 0, 0}, - {0, 0, 0, 0, 0, 0, -4, 8, 0, 0, 0, 0, 2, -6, -10, -4, 3}, - {0, -2, 2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, 5, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 2, 16, 9, 4, -7}, - - /* 281-290 */ - {0, 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 1, 3, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0, 0, 22, 0, 0}, - {0, 0, 0, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 19, 10, 0}, - {0, 2, -2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0, 7, 0, 0, -4}, - {0, 0, 0, 0, 0, 0, -5, 10, 0, 0, 0, 0, 2, 0, -5, -2, 0}, - {0, 0, 0, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, -9, 3, 1, 4}, - {0, 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 2, 17, 0, 0, -7}, - {0, 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 1, 0, -3, -2, -1}, - {0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, -20, 34, 0, 0}, - - /* 291-300 */ - {0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 1, -10, 0, 1, 5}, - {0, 1, -1, 1, 0, 1, -3, 0, 0, 0, 0, 0, 0, -4, 0, 0, 2}, - {0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 0, 22, -87, 0, 0}, - {0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 1, -4, 0, 0, 2}, - {0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 2, -3, -6, -2, 1}, - {0, 0, 0, 0, 0, -7, 11, 0, 0, 0, 0, 0, 2, -16, -3, -1, 7}, - {0, 0, 0, 0, 0, -7, 11, 0, 0, 0, 0, 0, 1, 0, -3, -2, 0}, - {0, -2, 2, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, -68, 39, 0, 0}, - {0, 2, -2, 1, 0, -4, 4, 0, 0, 0, 0, 0, 0, 27, 0, 0, -14}, - - /* 301-310 */ - {0, -1, 1, 0, 0, 4, -5, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -25, 0, 0, 0}, - {0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 0, 1, -12, -3, -2, 6}, - {0, 1, -1, 1, 0, -4, 6, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, - {0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 0, 2, 3, 66, 29, -1}, - {0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 0, 2, 490, 0, 0, -213}, - {0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 0, 1, -22, 93, 49, 12}, - {0, 1, -1, 1, 0, -4, 5, 0, 0, 0, 0, 0, 0, -7, 28, 15, 4}, - {0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 0, 1, -3, 13, 7, 2}, - {0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, 0, -46, 14, 0, 0}, - - /* 311-320 */ - {-2, 0, 2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 1, 0, 0}, - {0, -1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0}, - {0, 0, 0, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0, -28, 0, 0, 15}, - {0, 0, 0, 0, 0, 0, -1, 0, 5, 0, 0, 0, 2, 5, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, 0, 3, 0, 0}, - {0, 0, 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, 2, -11, 0, 0, 5}, - {0, 0, 0, 0, 0, 0, -7, 12, 0, 0, 0, 0, 2, 0, 3, 1, 0}, - {0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1}, - {0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 1, 25, 106, 57, -13}, - - /* 321-330 */ - {0, 1, -1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 5, 21, 11, -3}, - {0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1485, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1, -7, -32, -17, 4}, - {0, 1, -1, 1, 0, 1, -2, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0}, - {0, 0, 0, 0, 0, 0, -2, 5, 0, 0, 0, 0, 2, -6, -3, -2, 3}, - {0, 0, 0, 0, 0, 0, -1, 0, 4, 0, 0, 0, 2, 30, -6, -2, -13}, - {0, 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, -4, 4, 0, 0}, - {0, 0, 0, 1, 0, -1, 1, 0, 0, 0, 0, 0, 0, -19, 0, 0, 10}, - {0, 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 2, 0, 4, 2, -1}, - {0, 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 0, 0, 3, 0, 0}, - - /* 331-340 */ - {0, 2, -2, 1, 0, 0, -3, 0, 3, 0, 0, 0, 0, 4, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, -3, 7, 0, 0, 0, 0, 2, 0, -3, -1, 0}, - {-2, 0, 2, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 2, 5, 3, 1, -2}, - {0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, 0, 11, 0, 0}, - {0, 0, 0, 0, 0, 0, -1, 0, 3, 0, 0, 0, 2, 118, 0, 0, -52}, - {0, 0, 0, 0, 0, 0, -1, 0, 3, 0, 0, 0, 1, 0, -5, -3, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, 0, -28, 36, 0, 0}, - {0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, 0, 5, -5, 0, 0}, - {0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 0, 1, 14, -59, -31, -8}, - - /* 341-350 */ - {0, 1, -1, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 9, 5, 1}, - {0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 0, 2, -458, 0, 0, 198}, - {0, 0, 0, 0, 0, -6, 9, 0, 0, 0, 0, 0, 2, 0, -45, -20, 0}, - {0, 0, 0, 0, 0, -6, 9, 0, 0, 0, 0, 0, 1, 9, 0, 0, -5}, - {0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0}, - {0, 0, 0, 1, 0, 0, 1, 0, -2, 0, 0, 0, 0, 0, -4, -2, -1}, - {0, 2, -2, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0, 11, 0, 0, -6}, - {0, 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 2, 6, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, -16, 23, 0, 0}, - {0, 0, 0, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, -4, -2, 0}, - - /* 351-360 */ - {0, 0, 0, 0, 0, 0, -1, 0, 2, 0, 0, 0, 2, -5, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, 0, -166, 269, 0, 0}, - {0, 0, 0, 1, 0, 0, 1, 0, -1, 0, 0, 0, 0, 15, 0, 0, -8}, - {0, 0, 0, 0, 0, -5, 9, 0, 0, 0, 0, 0, 2, 10, 0, 0, -4}, - {0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -78, 45, 0, 0}, - {0, 0, 0, 0, 0, -3, 4, 0, 0, 0, 0, 0, 2, 0, -5, -2, 0}, - {0, 0, 0, 0, 0, -3, 4, 0, 0, 0, 0, 0, 1, 7, 0, 0, -4}, - {0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, -5, 328, 0, 0}, - {0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 1, 3, 0, 0, -2}, - {0, 0, 0, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 5, 0, 0, -2}, - - /* 361-370 */ - {0, 0, 0, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, 0, 3, 1, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, -3, 0, 0, 0, -3, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 1, -5, 0, 0, 0, -3, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, -4, -2, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, -1223, -26, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1, 0, 7, 3, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, -3, 5, 0, 0, 0, 3, 0, 0, 0}, - {0, 0, 0, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, -2, 0, 0, 0, -6, 20, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -368, 0, 0, 0}, - - /* 371-380 */ - {0, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, -75, 0, 0, 0}, - {0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 11, 0, 0, -6}, - {0, 0, 0, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0, 3, 0, 0, -2}, - {0, 0, 0, 0, 0, -8, 14, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 1, 0, 2, -5, 0, 0, 0, -13, -30, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 0, 21, 3, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 2, -3, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, -4, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 8, -27, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, -8, 3, 0, 0, 0, 0, -19, -11, 0, 0}, - - /* 381-390 */ - {0, 0, 0, 0, 0, 0, -3, 8, -3, 0, 0, 0, 2, -4, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 1, 0, -2, 5, 0, 0, 2, 0, 5, 2, 0}, - {0, 0, 0, 0, 0, -8, 12, 0, 0, 0, 0, 0, 2, -6, 0, 0, 2}, - {0, 0, 0, 0, 0, -8, 12, 0, 0, 0, 0, 0, 0, -8, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 1, -2, 0, 0, 0, -1, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2, -14, 0, 0, 6}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 6, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, -74, 0, 0, 32}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2, 0, -3, -1, 0}, - {0, 2, -2, 1, 0, -5, 5, 0, 0, 0, 0, 0, 0, 4, 0, 0, -2}, - - /* 391-400 */ - {0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 8, 11, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 3, 2, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, -262, 0, 0, 114}, - {0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0}, - {0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 0, 1, -7, 0, 0, 4}, - {0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 0, 2, 0, -27, -12, 0}, - {0, 0, 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, 2, -19, -8, -4, 8}, - {0, 0, 0, 0, 0, -5, 7, 0, 0, 0, 0, 0, 2, 202, 0, 0, -87}, - {0, 0, 0, 0, 0, -5, 7, 0, 0, 0, 0, 0, 1, -8, 35, 19, 5}, - {0, 1, -1, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0}, - - /* 401-410 */ - {0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, 0, 16, -5, 0, 0}, - {0, 2, -2, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 5, 0, 0, -3}, - {0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, -3, 0, 0}, - {0, 0, 0, 0, -1, 0, 3, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, -35, -48, -21, 15}, - {0, 0, 0, 0, 0, 0, -2, 6, 0, 0, 0, 0, 2, -3, -5, -2, 1}, - {0, 0, 0, 1, 0, 2, -2, 0, 0, 0, 0, 0, 0, 6, 0, 0, -3}, - {0, 0, 0, 0, 0, 0, -6, 9, 0, 0, 0, 0, 2, 3, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, 0, -5, 0, 0}, - {0, 0, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0, 1, 12, 55, 29, -6}, - - /* 411-420 */ - {0, 1, -1, 1, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0}, - {0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, -598, 0, 0, 0}, - {0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 1, -3, -13, -7, 1}, - {0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 2, -5, -7, -3, 2}, - {0, 0, 0, 0, 0, 0, -5, 7, 0, 0, 0, 0, 2, 3, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, 5, -7, 0, 0}, - {0, 0, 0, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, 16, -6, 0, 0}, - {0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, 0, 8, -3, 0, 0}, - {0, 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, 0, 1, 8, -31, -16, -4}, - - /* 421-430 */ - {0, 1, -1, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0}, - {0, 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, 0, 2, 113, 0, 0, -49}, - {0, 0, 0, 0, 0, -7, 10, 0, 0, 0, 0, 0, 2, 0, -24, -10, 0}, - {0, 0, 0, 0, 0, -7, 10, 0, 0, 0, 0, 0, 1, 4, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 27, 0, 0, 0}, - {0, 0, 0, 0, 0, -4, 8, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1}, - {0, 0, 0, 0, 0, -4, 5, 0, 0, 0, 0, 0, 2, 0, -4, -2, 0}, - {0, 0, 0, 0, 0, -4, 5, 0, 0, 0, 0, 0, 1, 5, 0, 0, -2}, - {0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2, -13, 0, 0, 6}, - - /* 431-440 */ - {0, 0, 0, 0, 0, 0, -2, 0, 5, 0, 0, 0, 2, 5, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 2, -18, -10, -4, 8}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -4, -28, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, -5, 6, 3, 2}, - {0, 0, 0, 0, 0, -9, 13, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, -1, 5, 0, 0, 0, 0, 2, -5, -9, -4, 2}, - {0, 0, 0, 0, 0, 0, -2, 0, 4, 0, 0, 0, 2, 17, 0, 0, -7}, - {0, 0, 0, 0, 0, 0, 2, 0, -4, 0, 0, 0, 0, 11, 4, 0, 0}, - {0, 0, 0, 0, 0, 0, -2, 7, 0, 0, 0, 0, 2, 0, -6, -2, 0}, - {0, 0, 0, 0, 0, 0, 2, 0, -3, 0, 0, 0, 0, 83, 15, 0, 0}, - - /* 441-450 */ - {0, 0, 0, 0, 0, -2, 5, 0, 0, 0, 0, 0, 1, -4, 0, 0, 2}, - {0, 0, 0, 0, 0, -2, 5, 0, 0, 0, 0, 0, 2, 0, -114, -49, 0}, - {0, 0, 0, 0, 0, -6, 8, 0, 0, 0, 0, 0, 2, 117, 0, 0, -51}, - {0, 0, 0, 0, 0, -6, 8, 0, 0, 0, 0, 0, 1, -5, 19, 10, 2}, - {0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0}, - {0, 0, 0, 1, 0, 0, 2, 0, -2, 0, 0, 0, 0, -3, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, -3, 9, 0, 0, 0, 0, 2, 0, -3, -1, 0}, - {0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 3, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 2, 0, -6, -2, 0}, - {0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, 393, 3, 0, 0}, - - /* 451-460 */ - {0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 1, -4, 21, 11, 2}, - {0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 2, -6, 0, -1, 3}, - {0, 0, 0, 0, 0, -5, 10, 0, 0, 0, 0, 0, 2, -3, 8, 4, 1}, - {0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 8, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 2, 18, -29, -13, -8}, - {0, 0, 0, 0, 0, -3, 3, 0, 0, 0, 0, 0, 1, 8, 34, 18, -4}, - {0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 1, 3, 12, 6, -1}, - {0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 2, 54, -15, -7, -24}, - {0, 0, 0, 0, 0, 0, 2, 0, 0, -3, 0, 0, 0, 0, 3, 0, 0}, - - /* 461-470 */ - {0, 0, 0, 0, 0, 0, -5, 13, 0, 0, 0, 0, 2, 3, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 0, 0, 35, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 2, -154, -30, -13, 67}, - {0, 0, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 0, 15, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 1, 0, 4, 2, 0}, - {0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 0, 9, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 2, 80, -71, -31, -35}, - {0, 0, 0, 0, 0, 0, 2, 0, 0, -1, 0, 0, 2, 0, -20, -9, 0}, - {0, 0, 0, 0, 0, 0, -6, 15, 0, 0, 0, 0, 2, 11, 5, 2, -5}, - {0, 0, 0, 0, 0, -8, 15, 0, 0, 0, 0, 0, 2, 61, -96, -42, -27}, - - /* 471-480 */ - {0, 0, 0, 0, 0, -3, 9, -4, 0, 0, 0, 0, 2, 14, 9, 4, -6}, - {0, 0, 0, 0, 0, 0, 2, 0, 2, -5, 0, 0, 2, -11, -6, -3, 5}, - {0, 0, 0, 0, 0, 0, -2, 8, -1, -5, 0, 0, 2, 0, -3, -1, 0}, - {0, 0, 0, 0, 0, 0, 6, -8, 3, 0, 0, 0, 2, 123, -415, -180, -53}, - {0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, -35}, - {0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 7, -32, -17, -4}, - {0, 1, -1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -9, -5, 0}, - {0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, -4, 2, 0}, - {0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, -89, 0, 0, 38}, - - /* 481-490 */ - {0, 0, 0, 0, 0, 0, -6, 16, -4, -5, 0, 0, 2, 0, -86, -19, -6}, - {0, 0, 0, 0, 0, 0, -2, 8, -3, 0, 0, 0, 2, 0, 0, -19, 6}, - {0, 0, 0, 0, 0, 0, -2, 8, -3, 0, 0, 0, 2, -123, -416, -180, 53}, - {0, 0, 0, 0, 0, 0, 6, -8, 1, 5, 0, 0, 2, 0, -3, -1, 0}, - {0, 0, 0, 0, 0, 0, 2, 0, -2, 5, 0, 0, 2, 12, -6, -3, -5}, - {0, 0, 0, 0, 0, 3, -5, 4, 0, 0, 0, 0, 2, -13, 9, 4, 6}, - {0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 2, 0, -15, -7, 0}, - {0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 1, 3, 0, 0, -1}, - {0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 2, -62, -97, -42, 27}, - {0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 2, -11, 5, 2, 5}, - - /* 491-500 */ - {0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2, 0, -19, -8, 0}, - {0, 0, 0, 0, 0, 3, -3, 0, 2, 0, 0, 0, 2, -3, 0, 0, 1}, - {0, 2, -2, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, 4, 2, 0}, - {0, 1, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0}, - {0, 2, -2, 1, 0, 0, -4, 8, -3, 0, 0, 0, 0, 0, 4, 2, 0}, - {0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 2, -85, -70, -31, 37}, - {0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 163, -12, -5, -72}, - {0, 0, 0, 0, 0, -3, 7, 0, 0, 0, 0, 0, 2, -63, -16, -7, 28}, - {0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2, -21, -32, -14, 9}, - {0, 0, 0, 0, 0, -5, 6, 0, 0, 0, 0, 0, 2, 0, -3, -1, 0}, - - /* 501-510 */ - {0, 0, 0, 0, 0, -5, 6, 0, 0, 0, 0, 0, 1, 3, 0, 0, -2}, - {0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0}, - {0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 2, 3, 10, 4, -1}, - {0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 3, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, -1, 6, 0, 0, 0, 0, 2, 0, -7, -3, 0}, - {0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 2, 0, -4, -2, 0}, - {0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 0, 6, 19, 0, 0}, - {0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 2, 5, -173, -75, -2}, - {0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 2, 0, -7, -3, 0}, - {0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 2, 7, -12, -5, -3}, - - /* 511-520 */ - {0, 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 1, -3, 0, 0, 2}, - {0, 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 2, 3, -4, -2, -1}, - {0, 0, 0, 0, 0, -7, 9, 0, 0, 0, 0, 0, 2, 74, 0, 0, -32}, - {0, 0, 0, 0, 0, -7, 9, 0, 0, 0, 0, 0, 1, -3, 12, 6, 2}, - {0, 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 2, 26, -14, -6, -11}, - {0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 2, 19, 0, 0, -8}, - {0, 0, 0, 0, 0, -4, 4, 0, 0, 0, 0, 0, 1, 6, 24, 13, -3}, - {0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0}, - {0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 1, 0, -10, -5, 0}, - {0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 2, 11, -3, -1, -5}, - - /* 521-530 */ - {0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 3, 0, 1, -1}, - {0, 0, 0, 0, 0, 0, -3, 0, 5, 0, 0, 0, 2, 3, 0, 0, -1}, - {0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 5, -23, -12, -3}, - {0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, -339, 0, 0, 147}, - {0, 0, 0, 0, 0, -9, 12, 0, 0, 0, 0, 0, 2, 0, -10, -5, 0}, - {0, 0, 0, 0, 0, 0, 3, 0, -4, 0, 0, 0, 0, 5, 0, 0, 0}, - {0, 2, -2, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 2, 0, -4, -2, 0}, - {0, 0, 0, 0, 0, 0, 3, 0, -3, 0, 0, 0, 0, 18, -3, 0, 0}, - - /* 531-540 */ - {0, 0, 0, 0, 0, 0, 3, 0, -3, 0, 0, 0, 2, 9, -11, -5, -4}, - {0, 0, 0, 0, 0, -2, 6, 0, 0, 0, 0, 0, 2, -8, 0, 0, 4}, - {0, 0, 0, 0, 0, -6, 7, 0, 0, 0, 0, 0, 1, 3, 0, 0, -1}, - {0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0}, - {0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 2, 6, -9, -4, -2}, - {0, 0, 0, 0, 0, 0, 3, 0, -2, 0, 0, 0, 0, -4, -12, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, 0, -2, 0, 0, 0, 2, 67, -91, -39, -29}, - {0, 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 2, 30, -18, -8, -13}, - {0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 2, 0, -114, -50, 0}, - - /* 541-550 */ - {0, 0, 0, 0, 0, 0, 3, 0, -1, 0, 0, 0, 2, 0, 0, 0, 23}, - {0, 0, 0, 0, 0, 0, 3, 0, -1, 0, 0, 0, 2, 517, 16, 7, -224}, - {0, 0, 0, 0, 0, 0, 3, 0, 0, -2, 0, 0, 2, 0, -7, -3, 0}, - {0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 2, 143, -3, -1, -62}, - {0, 0, 0, 0, 0, 0, 3, 0, 0, -1, 0, 0, 2, 29, 0, 0, -13}, - {0, 2, -2, 1, 0, 0, 1, 0, -1, 0, 0, 0, 0, -4, 0, 0, 2}, - {0, 0, 0, 0, 0, -8, 16, 0, 0, 0, 0, 0, 2, -6, 0, 0, 3}, - {0, 0, 0, 0, 0, 0, 3, 0, 2, -5, 0, 0, 2, 5, 12, 5, -2}, - {0, 0, 0, 0, 0, 0, 7, -8, 3, 0, 0, 0, 2, -25, 0, 0, 11}, - {0, 0, 0, 0, 0, 0, -5, 16, -4, -5, 0, 0, 2, -3, 0, 0, 1}, - - /* 551-560 */ - {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 4, 2, 0}, - {0, 0, 0, 0, 0, 0, -1, 8, -3, 0, 0, 0, 2, -22, 12, 5, 10}, - {0, 0, 0, 0, 0, -8, 10, 0, 0, 0, 0, 0, 2, 50, 0, 0, -22}, - {0, 0, 0, 0, 0, -8, 10, 0, 0, 0, 0, 0, 1, 0, 7, 4, 0}, - {0, 0, 0, 0, 0, -8, 10, 0, 0, 0, 0, 0, 2, 0, 3, 1, 0}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, -4, 4, 2, 2}, - {0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 2, -5, -11, -5, 2}, - {0, 0, 0, 0, 0, -3, 8, 0, 0, 0, 0, 0, 2, 0, 4, 2, 0}, - {0, 0, 0, 0, 0, -5, 5, 0, 0, 0, 0, 0, 1, 4, 17, 9, -2}, - {0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0}, - - /* 561-570 */ - {0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 1, 0, -4, -2, 0}, - {0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 2, -8, 0, 0, 4}, - {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0}, - {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 4, -15, -8, -2}, - {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 370, -8, 0, -160}, - {0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 2, 0, 0, -3, 0}, - {0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 2, 0, 3, 1, 0}, - {0, 0, 0, 0, 0, 0, 6, -5, 0, 0, 0, 0, 2, -6, 3, 1, 3}, - {0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 2, -10, 0, 0, 4}, - - /* 571-580 */ - {0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 0, 2, 0, 9, 4, 0}, - {0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 2, 4, 17, 7, -2}, - {0, 0, 0, 0, 0, -9, 11, 0, 0, 0, 0, 0, 2, 34, 0, 0, -15}, - {0, 0, 0, 0, 0, -9, 11, 0, 0, 0, 0, 0, 1, 0, 5, 3, 0}, - {0, 0, 0, 0, 0, 0, 4, 0, -4, 0, 0, 0, 2, -5, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 4, 0, -3, 0, 0, 0, 2, -37, -7, -3, 16}, - {0, 0, 0, 0, 0, -6, 6, 0, 0, 0, 0, 0, 1, 3, 13, 7, -2}, - {0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0}, - {0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 1, 0, -3, -2, 0}, - {0, 0, 0, 0, 0, 0, 4, 0, -2, 0, 0, 0, 2, -184, -3, -1, 80}, - - /* 581-590 */ - {0, 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 2, -3, 0, 0, 1}, - {0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 1, 0, -10, -6, -1}, - {0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 2, 31, -6, 0, -13}, - {0, 0, 0, 0, 0, 0, 4, 0, -1, 0, 0, 0, 2, -3, -32, -14, 1}, - {0, 0, 0, 0, 0, 0, 4, 0, 0, -2, 0, 0, 2, -7, 0, 0, 3}, - {0, 0, 0, 0, 0, 0, 5, -2, 0, 0, 0, 0, 2, 0, -8, -4, 0}, - {0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 3, -4, 0, 0}, - {0, 0, 0, 0, 0, 8, -9, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0}, - {0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 0, 2, 0, 3, 1, 0}, - - /* 591-600 */ - {0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 2, 19, -23, -10, 2}, - {0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, -10}, - {0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1, 0, 3, 2, 0}, - {0, 0, 0, 0, 0, -7, 7, 0, 0, 0, 0, 0, 1, 0, 9, 5, -1}, - {0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0}, - {0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 1, 0, -7, -4, 0}, - {0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 2, 8, -4, 0, -4}, - {0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0}, - {0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, 0, -4, 0, 0, 0, 2, -3, 0, 0, 1}, - - /* 601-610 */ - {0, 0, 0, 0, 0, 0, 5, 0, -3, 0, 0, 0, 2, -9, 0, 1, 4}, - {0, 0, 0, 0, 0, 0, 5, 0, -2, 0, 0, 0, 2, 3, 12, 5, -1}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2, 17, -3, -1, 0}, - {0, 0, 0, 0, 0, -8, 8, 0, 0, 0, 0, 0, 1, 0, 7, 4, 0}, - {0, 0, 0, 0, 0, 8, -8, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0}, - {0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 1, 0, -5, -3, 0}, - {0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 2, 14, -3, 0, -1}, - {0, 0, 0, 0, 0, -9, 9, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0}, - {0, 0, 0, 0, 0, -9, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, -5}, - {0, 0, 0, 0, 0, -9, 9, 0, 0, 0, 0, 0, 1, 0, 5, 3, 0}, - - /* 611-620 */ - {0, 0, 0, 0, 0, 9, -9, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0}, - {0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 0, 1, 0, -3, -2, 0}, - {0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 2, 9, 4, 3}, - {0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4}, - {0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1, 0, 4, 2, 0}, - {0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 6, 0, 0, -3}, - {0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1, 0, 3, 1, 0}, - {0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 5, 0, 0, -2}, - - /* 621-630 */ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, -1}, - {1, 0, -2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, -3, 0, 0, 0}, - {1, 0, -2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0}, - {1, 0, -2, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 7, 0, 0, 0}, - {1, 0, -2, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0}, - {-1, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, - {-1, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, 6, 0, 0, 0}, - {-1, 0, 2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -4, 0, 0}, - {1, 0, -2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -4, 0, 0}, - {-2, 0, 2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 5, 0, 0, 0}, - - /* 631-640 */ - {-1, 0, 0, 0, 0, 0, 2, 0, -3, 0, 0, 0, 0, -3, 0, 0, 0}, - {-1, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 4, 0, 0, 0}, - {-1, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0}, - {-1, 0, 2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, - {1, -1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0}, - {-1, 0, 2, 0, 0, 0, 2, 0, -3, 0, 0, 0, 0, 13, 0, 0, 0}, - {-2, 0, 0, 0, 0, 0, 2, 0, -3, 0, 0, 0, 0, 21, 11, 0, 0}, - {1, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -5, 0, 0}, - {-1, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -5, -2, 0}, - {1, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0}, - - /* 641-650 */ - {-1, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -5, 0, 0}, - {-1, 0, 2, 1, 0, 0, 2, 0, -2, 0, 0, 0, 0, -3, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, 20, 10, 0, 0}, - {-1, 0, 2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, -34, 0, 0, 0}, - {-1, 0, 2, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, -19, 0, 0, 0}, - {1, 0, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0, 3, 0, 0, -2}, - {1, 2, -2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1}, - {1, 2, -2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0, -6, 0, 0, 3}, - {1, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0}, - {1, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 3, 0, 0, 0}, - - /* 651-660 */ - {0, 0, -2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0}, - {0, 0, -2, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 4, 0, 0, 0}, - {0, 2, 0, 2, 0, -2, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, - {0, 2, 0, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0, 6, 0, 0, -3}, - {0, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0, -8, 0, 0, 3}, - {0, 2, 0, 2, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0}, - {0, 0, 2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, -3, 0, 0, 0}, - {0, 1, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -3, -2, 0}, - {1, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 126, -63, -27, -55}, - {-1, 2, 0, 2, 0, 10, -3, 0, 0, 0, 0, 0, 0, -5, 0, 1, 2}, - - /* 661-670 */ - {0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, -3, 28, 15, 2}, - {1, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 5, 0, 1, -2}, - {0, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, 9, 4, 1}, - {0, 2, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0, 0, 9, 4, -1}, - {-1, 2, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0, -126, -63, -27, 55}, - {2, 2, -2, 2, 0, 0, -2, 0, 3, 0, 0, 0, 0, 3, 0, 0, -1}, - {1, 2, 0, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0, 21, -11, -6, -11}, - {0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0}, - {-1, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, -21, -11, -6, 11}, - {-2, 2, 2, 2, 0, 0, 2, 0, -2, 0, 0, 0, 0, -3, 0, 0, 1}, - - /* 671-680 */ - {0, 2, 0, 2, 0, 2, -3, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0}, - {0, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0, 8, 0, 0, -4}, - {0, 2, 0, 2, 0, 0, 1, 0, -1, 0, 0, 0, 0, -6, 0, 0, 3}, - {0, 2, 0, 2, 0, 2, -2, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1}, - {-1, 2, 2, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0, 3, 0, 0, -1}, - {1, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1}, - {-1, 2, 2, 2, 0, 0, 2, 0, -3, 0, 0, 0, 0, -5, 0, 0, 2}, - {2, 2, 0, 2, 0, 0, 2, 0, -3, 0, 0, 0, 0, 24, -12, -5, -11}, - {1, 2, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0, 0, 3, 1, 0}, - {1, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, 3, 1, 0}, - - /* 681-687 */ - {1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0}, - {0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, -24, -12, -5, 10}, - {2, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 4, 0, -1, -2}, - {-1, 2, 2, 2, 0, 0, 2, 0, -2, 0, 0, 0, 0, 13, 0, 0, -6}, - {-1, 2, 2, 2, 0, 3, -3, 0, 0, 0, 0, 0, 0, 7, 0, 0, -3}, - {1, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, - {0, 2, 2, 2, 0, 0, 2, 0, -2, 0, 0, 0, 0, 3, 0, 0, -1}, - } - - /* Number of terms in the planetary nutation model */ - NPL := len(xpl) - - /* ------------------------------------------------------------------ */ - - /* Interval between fundamental date J2000.0 and given date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* ------------------- */ - /* LUNI-SOLAR NUTATION */ - /* ------------------- */ - - /* Fundamental (Delaunay) arguments */ - - /* Mean anomaly of the Moon (IERS 2003). */ - el = Fal03(t) - - /* Mean anomaly of the Sun (MHB2000). */ - elp = fmod(1287104.79305+ - t*(129596581.0481+ - t*(-0.5532+ - t*(0.000136+ - t*(-0.00001149)))), TURNAS) * DAS2R - - /* Mean longitude of the Moon minus that of the ascending node */ - /* (IERS 2003. */ - f = Faf03(t) - - /* Mean elongation of the Moon from the Sun (MHB2000). */ - d = fmod(1072260.70369+ - t*(1602961601.2090+ - t*(-6.3706+ - t*(0.006593+ - t*(-0.00003169)))), TURNAS) * DAS2R - - /* Mean longitude of the ascending node of the Moon (IERS 2003). */ - om = Faom03(t) - - /* Initialize the nutation values. */ - dp = 0.0 - de = 0.0 - - /* Summation of luni-solar nutation series (in reverse order). */ - for i = NLS - 1; i >= 0; i-- { - - /* Argument and functions. */ - arg = fmod(float64(xls[i].nl)*el+ - float64(xls[i].nlp)*elp+ - float64(xls[i].nf)*f+ - float64(xls[i].nd)*d+ - float64(xls[i].nom)*om, D2PI) - sarg = sin(arg) - carg = cos(arg) - - /* Term. */ - dp += (xls[i].sp+xls[i].spt*t)*sarg + xls[i].cp*carg - de += (xls[i].ce+xls[i].cet*t)*carg + xls[i].se*sarg - } - - /* Convert from 0.1 microarcsec units to radians. */ - dpsils = dp * U2R - depsls = de * U2R - - /* ------------------ */ - /* PLANETARY NUTATION */ - /* ------------------ */ - - /* n.b. The MHB2000 code computes the luni-solar and planetary nutation */ - /* in different functions, using slightly different Delaunay */ - /* arguments in the two cases. This behaviour is faithfully */ - /* reproduced here. Use of the IERS 2003 expressions for both */ - /* cases leads to negligible changes, well below */ - /* 0.1 microarcsecond. */ - - /* Mean anomaly of the Moon (MHB2000). */ - al = fmod(2.35555598+8328.6914269554*t, D2PI) - - /* Mean longitude of the Moon minus that of the ascending node */ - /*(MHB2000). */ - af = fmod(1.627905234+8433.466158131*t, D2PI) - - /* Mean elongation of the Moon from the Sun (MHB2000). */ - ad = fmod(5.198466741+7771.3771468121*t, D2PI) - - /* Mean longitude of the ascending node of the Moon (MHB2000). */ - aom = fmod(2.18243920-33.757045*t, D2PI) - - /* General accumulated precession in longitude (IERS 2003). */ - apa = Fapa03(t) - - /* Planetary longitudes, Mercury through Uranus (IERS 2003). */ - alme = Fame03(t) - alve = Fave03(t) - alea = Fae03(t) - alma = Fama03(t) - alju = Faju03(t) - alsa = Fasa03(t) - alur = Faur03(t) - - /* Neptune longitude (MHB2000). */ - alne = fmod(5.321159000+3.8127774000*t, D2PI) - - /* Initialize the nutation values. */ - dp = 0.0 - de = 0.0 - - /* Summation of planetary nutation series (in reverse order). */ - for i = NPL - 1; i >= 0; i-- { - - /* Argument and functions. */ - arg = fmod(float64(xpl[i].nl)*al+ - float64(xpl[i].nf)*af+ - float64(xpl[i].nd)*ad+ - float64(xpl[i].nom)*aom+ - float64(xpl[i].nme)*alme+ - float64(xpl[i].nve)*alve+ - float64(xpl[i].nea)*alea+ - float64(xpl[i].nma)*alma+ - float64(xpl[i].nju)*alju+ - float64(xpl[i].nsa)*alsa+ - float64(xpl[i].nur)*alur+ - float64(xpl[i].nne)*alne+ - float64(xpl[i].npa)*apa, D2PI) - sarg = sin(arg) - carg = cos(arg) - - /* Term. */ - dp += float64(xpl[i].sp)*sarg + float64(xpl[i].cp)*carg - de += float64(xpl[i].se)*sarg + float64(xpl[i].ce)*carg - - } - - /* Convert from 0.1 microarcsec units to radians. */ - dpsipl = dp * U2R - depspl = de * U2R - - /* ------- */ - /* RESULTS */ - /* ------- */ - - /* Add luni-solar and planetary components. */ - *dpsi = dpsils + dpsipl - *deps = depsls + depspl -} - -/* -Nut00b Nutation, IAU 2000B Nutation, IAU 2000B model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - dpsi,deps float64 nutation, luni-solar + planetary (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The nutation components in longitude and obliquity are in radians - and with respect to the equinox and ecliptic of date. The - obliquity at J2000.0 is assumed to be the Lieske et al. (1977) - value of 84381.448 arcsec. (The errors that result from using - this function with the IAU 2006 value of 84381.406 arcsec can be - neglected.) - - The nutation model consists only of luni-solar terms, but - includes also a fixed offset which compensates for certain long- - period planetary terms (Note 7). - - 3) This function is an implementation of the IAU 2000B abridged - nutation model formally adopted by the IAU General Assembly in - 2000. The function computes the MHB_2000_SHORT luni-solar - nutation series (Luzum 2001), but without the associated - corrections for the precession rate adjustments and the offset - between the GCRS and J2000.0 mean poles. - - 4) The full IAU 2000A (MHB2000) nutation model contains nearly 1400 - terms. The IAU 2000B model (McCarthy & Luzum 2003) contains only - 77 terms, plus additional simplifications, yet still delivers - results of 1 mas accuracy at present epochs. This combination of - accuracy and size makes the IAU 2000B abridged nutation model - suitable for most practical applications. - - The function delivers a pole accurate to 1 mas from 1900 to 2100 - (usually better than 1 mas, very occasionally just outside - 1 mas). The full IAU 2000A model, which is implemented in the - function iauNut00a (q.v.), delivers considerably greater accuracy - at current dates; however, to realize this improved accuracy, - corrections for the essentially unpredictable free-core-nutation - (FCN) must also be included. - - 5) The present function provides classical nutation. The - MHB_2000_SHORT algorithm, from which it is adapted, deals also - with (i) the offsets between the GCRS and mean poles and (ii) the - adjustments in longitude and obliquity due to the changed - precession rates. These additional functions, namely frame bias - and precession adjustments, are supported by the SOFA functions - Bi00 and iauPr00. - - 6) The MHB_2000_SHORT algorithm also provides "total" nutations, - comprising the arithmetic sum of the frame bias, precession - adjustments, and nutation (luni-solar + planetary). These total - nutations can be used in combination with an existing IAU 1976 - precession implementation, such as iauPmat76, to deliver GCRS- - to-true predictions of mas accuracy at current epochs. However, - for symmetry with the iauNut00a function (q.v. for the reasons), - the SOFA functions do not generate the "total nutations" - directly. Should they be required, they could of course easily - be generated by calling iauBi00, iauPr00 and the present function - and adding the results. - - 7) The IAU 2000B model includes "planetary bias" terms that are - fixed in size but compensate for long-period nutations. The - amplitudes quoted in McCarthy & Luzum (2003), namely - Dpsi = -1.5835 mas and Depsilon = +1.6339 mas, are optimized for - the "total nutations" method described in Note 6. The Luzum - (2001) values used in this SOFA implementation, namely -0.135 mas - and +0.388 mas, are optimized for the "rigorous" method, where - frame bias, precession and nutation are applied separately and in - that order. During the interval 1995-2050, the SOFA - implementation delivers a maximum error of 1.001 mas (not - including FCN). - -References: - - Lieske, J.H., Lederle, T., Fricke, W., Morando, B., "Expressions - for the precession quantities based upon the IAU /1976/ system of - astronomical constants", Astron.Astrophys. 58, 1-2, 1-16. (1977) - - Luzum, B., private communication, 2001 (Fortran code - MHB_2000_SHORT) - - McCarthy, D.D. & Luzum, B.J., "An abridged model of the - precession-nutation of the celestial pole", Cel.Mech.Dyn.Astron. - 85, 37-49 (2003) - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J., Astron.Astrophys. 282, 663-683 (1994) -*/ -func Nut00b(date1, date2 float64, dpsi, deps *float64) { - var t, el, elp, f, d, om, arg, dp, de, sarg, carg, - dpsils, depsls, dpsipl, depspl float64 - var i int - - /* Units of 0.1 microarcsecond to radians */ - const U2R = DAS2R / 1e7 - - /* ---------------------------------------- */ - /* Fixed offsets in lieu of planetary terms */ - /* ---------------------------------------- */ - - const DPPLAN = -0.135 * DMAS2R - const DEPLAN = 0.388 * DMAS2R - - /* --------------------------------------------------- */ - /* Luni-solar nutation: argument and term coefficients */ - /* --------------------------------------------------- */ - - /* The units for the sine and cosine coefficients are */ - /* 0.1 microarcsec and the same per Julian century */ - - x := []struct { - nl, nlp, nf, nd, nom int /* coefficients of l,l',F,D,Om */ - ps, pst, pc float64 /* longitude sin, t*sin, cos coefficients */ - ec, ect, es float64 /* obliquity cos, t*cos, sin coefficients */ - - }{ - - /* 1-10 */ - {0, 0, 0, 0, 1, - -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0}, - {0, 0, 2, -2, 2, - -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0}, - {0, 0, 2, 0, 2, -2276413.0, -234.0, 2796.0, 978459.0, -485.0, 1374.0}, - {0, 0, 0, 0, 2, 2074554.0, 207.0, -698.0, -897492.0, 470.0, -291.0}, - {0, 1, 0, 0, 0, 1475877.0, -3633.0, 11817.0, 73871.0, -184.0, -1924.0}, - {0, 1, 2, -2, 2, -516821.0, 1226.0, -524.0, 224386.0, -677.0, -174.0}, - {1, 0, 0, 0, 0, 711159.0, 73.0, -872.0, -6750.0, 0.0, 358.0}, - {0, 0, 2, 0, 1, -387298.0, -367.0, 380.0, 200728.0, 18.0, 318.0}, - {1, 0, 2, 0, 2, -301461.0, -36.0, 816.0, 129025.0, -63.0, 367.0}, - {0, -1, 2, -2, 2, 215829.0, -494.0, 111.0, -95929.0, 299.0, 132.0}, - - /* 11-20 */ - {0, 0, 2, -2, 1, 128227.0, 137.0, 181.0, -68982.0, -9.0, 39.0}, - {-1, 0, 2, 0, 2, 123457.0, 11.0, 19.0, -53311.0, 32.0, -4.0}, - {-1, 0, 0, 2, 0, 156994.0, 10.0, -168.0, -1235.0, 0.0, 82.0}, - {1, 0, 0, 0, 1, 63110.0, 63.0, 27.0, -33228.0, 0.0, -9.0}, - {-1, 0, 0, 0, 1, -57976.0, -63.0, -189.0, 31429.0, 0.0, -75.0}, - {-1, 0, 2, 2, 2, -59641.0, -11.0, 149.0, 25543.0, -11.0, 66.0}, - {1, 0, 2, 0, 1, -51613.0, -42.0, 129.0, 26366.0, 0.0, 78.0}, - {-2, 0, 2, 0, 1, 45893.0, 50.0, 31.0, -24236.0, -10.0, 20.0}, - {0, 0, 0, 2, 0, 63384.0, 11.0, -150.0, -1220.0, 0.0, 29.0}, - {0, 0, 2, 2, 2, -38571.0, -1.0, 158.0, 16452.0, -11.0, 68.0}, - - /* 21-30 */ - {0, -2, 2, -2, 2, 32481.0, 0.0, 0.0, -13870.0, 0.0, 0.0}, - {-2, 0, 0, 2, 0, -47722.0, 0.0, -18.0, 477.0, 0.0, -25.0}, - {2, 0, 2, 0, 2, -31046.0, -1.0, 131.0, 13238.0, -11.0, 59.0}, - {1, 0, 2, -2, 2, 28593.0, 0.0, -1.0, -12338.0, 10.0, -3.0}, - {-1, 0, 2, 0, 1, 20441.0, 21.0, 10.0, -10758.0, 0.0, -3.0}, - {2, 0, 0, 0, 0, 29243.0, 0.0, -74.0, -609.0, 0.0, 13.0}, - {0, 0, 2, 0, 0, 25887.0, 0.0, -66.0, -550.0, 0.0, 11.0}, - {0, 1, 0, 0, 1, -14053.0, -25.0, 79.0, 8551.0, -2.0, -45.0}, - {-1, 0, 0, 2, 1, 15164.0, 10.0, 11.0, -8001.0, 0.0, -1.0}, - {0, 2, 2, -2, 2, -15794.0, 72.0, -16.0, 6850.0, -42.0, -5.0}, - - /* 31-40 */ - {0, 0, -2, 2, 0, 21783.0, 0.0, 13.0, -167.0, 0.0, 13.0}, - {1, 0, 0, -2, 1, -12873.0, -10.0, -37.0, 6953.0, 0.0, -14.0}, - {0, -1, 0, 0, 1, -12654.0, 11.0, 63.0, 6415.0, 0.0, 26.0}, - {-1, 0, 2, 2, 1, -10204.0, 0.0, 25.0, 5222.0, 0.0, 15.0}, - {0, 2, 0, 0, 0, 16707.0, -85.0, -10.0, 168.0, -1.0, 10.0}, - {1, 0, 2, 2, 2, -7691.0, 0.0, 44.0, 3268.0, 0.0, 19.0}, - {-2, 0, 2, 0, 0, -11024.0, 0.0, -14.0, 104.0, 0.0, 2.0}, - {0, 1, 2, 0, 2, 7566.0, -21.0, -11.0, -3250.0, 0.0, -5.0}, - {0, 0, 2, 2, 1, -6637.0, -11.0, 25.0, 3353.0, 0.0, 14.0}, - {0, -1, 2, 0, 2, -7141.0, 21.0, 8.0, 3070.0, 0.0, 4.0}, - - /* 41-50 */ - {0, 0, 0, 2, 1, -6302.0, -11.0, 2.0, 3272.0, 0.0, 4.0}, - {1, 0, 2, -2, 1, 5800.0, 10.0, 2.0, -3045.0, 0.0, -1.0}, - {2, 0, 2, -2, 2, 6443.0, 0.0, -7.0, -2768.0, 0.0, -4.0}, - {-2, 0, 0, 2, 1, -5774.0, -11.0, -15.0, 3041.0, 0.0, -5.0}, - {2, 0, 2, 0, 1, -5350.0, 0.0, 21.0, 2695.0, 0.0, 12.0}, - {0, -1, 2, -2, 1, -4752.0, -11.0, -3.0, 2719.0, 0.0, -3.0}, - {0, 0, 0, -2, 1, -4940.0, -11.0, -21.0, 2720.0, 0.0, -9.0}, - {-1, -1, 0, 2, 0, 7350.0, 0.0, -8.0, -51.0, 0.0, 4.0}, - {2, 0, 0, -2, 1, 4065.0, 0.0, 6.0, -2206.0, 0.0, 1.0}, - {1, 0, 0, 2, 0, 6579.0, 0.0, -24.0, -199.0, 0.0, 2.0}, - - /* 51-60 */ - {0, 1, 2, -2, 1, 3579.0, 0.0, 5.0, -1900.0, 0.0, 1.0}, - {1, -1, 0, 0, 0, 4725.0, 0.0, -6.0, -41.0, 0.0, 3.0}, - {-2, 0, 2, 0, 2, -3075.0, 0.0, -2.0, 1313.0, 0.0, -1.0}, - {3, 0, 2, 0, 2, -2904.0, 0.0, 15.0, 1233.0, 0.0, 7.0}, - {0, -1, 0, 2, 0, 4348.0, 0.0, -10.0, -81.0, 0.0, 2.0}, - {1, -1, 2, 0, 2, -2878.0, 0.0, 8.0, 1232.0, 0.0, 4.0}, - {0, 0, 0, 1, 0, -4230.0, 0.0, 5.0, -20.0, 0.0, -2.0}, - {-1, -1, 2, 2, 2, -2819.0, 0.0, 7.0, 1207.0, 0.0, 3.0}, - {-1, 0, 2, 0, 0, -4056.0, 0.0, 5.0, 40.0, 0.0, -2.0}, - {0, -1, 2, 2, 2, -2647.0, 0.0, 11.0, 1129.0, 0.0, 5.0}, - - /* 61-70 */ - {-2, 0, 0, 0, 1, -2294.0, 0.0, -10.0, 1266.0, 0.0, -4.0}, - {1, 1, 2, 0, 2, 2481.0, 0.0, -7.0, -1062.0, 0.0, -3.0}, - {2, 0, 0, 0, 1, 2179.0, 0.0, -2.0, -1129.0, 0.0, -2.0}, - {-1, 1, 0, 1, 0, 3276.0, 0.0, 1.0, -9.0, 0.0, 0.0}, - {1, 1, 0, 0, 0, -3389.0, 0.0, 5.0, 35.0, 0.0, -2.0}, - {1, 0, 2, 0, 0, 3339.0, 0.0, -13.0, -107.0, 0.0, 1.0}, - {-1, 0, 2, -2, 1, -1987.0, 0.0, -6.0, 1073.0, 0.0, -2.0}, - {1, 0, 0, 0, 2, -1981.0, 0.0, 0.0, 854.0, 0.0, 0.0}, - {-1, 0, 0, 1, 0, 4026.0, 0.0, -353.0, -553.0, 0.0, -139.0}, - {0, 0, 2, 1, 2, 1660.0, 0.0, -5.0, -710.0, 0.0, -2.0}, - - /* 71-77 */ - {-1, 0, 2, 4, 2, -1521.0, 0.0, 9.0, 647.0, 0.0, 4.0}, - {-1, 1, 0, 1, 1, 1314.0, 0.0, 0.0, -700.0, 0.0, 0.0}, - {0, -2, 2, -2, 1, -1283.0, 0.0, 0.0, 672.0, 0.0, 0.0}, - {1, 0, 2, 2, 1, -1331.0, 0.0, 8.0, 663.0, 0.0, 4.0}, - {-2, 0, 2, 2, 2, 1383.0, 0.0, -2.0, -594.0, 0.0, -2.0}, - {-1, 0, 0, 0, 2, 1405.0, 0.0, 4.0, -610.0, 0.0, 2.0}, - {1, 1, 2, -2, 2, 1290.0, 0.0, 0.0, -556.0, 0.0, 0.0}, - } - - /* Number of terms in the series */ - NLS := len(x) - - /* ------------------------------------------------------------------ */ - - /* Interval between fundamental epoch J2000.0 and given date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* --------------------*/ - /* LUNI-SOLAR NUTATION */ - /* --------------------*/ - - /* Fundamental (Delaunay) arguments from Simon et al. (1994) */ - - /* Mean anomaly of the Moon. */ - el = fmod(485868.249036+(1717915923.2178)*t, TURNAS) * DAS2R - - /* Mean anomaly of the Sun. */ - elp = fmod(1287104.79305+(129596581.0481)*t, TURNAS) * DAS2R - - /* Mean argument of the latitude of the Moon. */ - f = fmod(335779.526232+(1739527262.8478)*t, TURNAS) * DAS2R - - /* Mean elongation of the Moon from the Sun. */ - d = fmod(1072260.70369+(1602961601.2090)*t, TURNAS) * DAS2R - - /* Mean longitude of the ascending node of the Moon. */ - om = fmod(450160.398036+(-6962890.5431)*t, TURNAS) * DAS2R - - /* Initialize the nutation values. */ - dp = 0.0 - de = 0.0 - - /* Summation of luni-solar nutation series (smallest terms first). */ - for i = NLS - 1; i >= 0; i-- { - - /* Argument and functions. */ - arg = fmod(float64(x[i].nl)*el+ - float64(x[i].nlp)*elp+ - float64(x[i].nf)*f+ - float64(x[i].nd)*d+ - float64(x[i].nom)*om, D2PI) - sarg = sin(arg) - carg = cos(arg) - - /* Term. */ - dp += (x[i].ps+x[i].pst*t)*sarg + x[i].pc*carg - de += (x[i].ec+x[i].ect*t)*carg + x[i].es*sarg - } - - /* Convert from 0.1 microarcsec units to radians. */ - dpsils = dp * U2R - depsls = de * U2R - - /* ------------------------------*/ - /* IN LIEU OF PLANETARY NUTATION */ - /* ------------------------------*/ - - /* Fixed offset to correct for missing terms in truncated series. */ - dpsipl = DPPLAN - depspl = DEPLAN - - /* --------*/ - /* RESULTS */ - /* --------*/ - - /* Add luni-solar and planetary components. */ - *dpsi = dpsils + dpsipl - *deps = depsls + depspl -} - -/* -Nut06a Nutation, IAU 2006/2000A -IAU 2000A nutation with adjustments to match the IAU 2006 -precession. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - dpsi,deps float64 nutation, luni-solar + planetary (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The nutation components in longitude and obliquity are in radians - and with respect to the mean equinox and ecliptic of date, - 2006 precession model (Hilton et al. 2006, Capitaine et al. - 2005). - - 3) The function first computes the IAU 2000A nutation, then applies - adjustments for (i) the consequences of the change in obliquity - from the IAU 1980 ecliptic to the IAU 2006 ecliptic and (ii) the - secular variation in the Earth's dynamical form factor J2. - - 4) The present function provides classical nutation, complementing - the IAU 2000 frame bias and IAU 2006 precession. It delivers a - pole which is at current epochs accurate to a few tens of - microarcseconds, apart from the free core nutation. - -Called: - Nut00a nutation, IAU 2000A - -References: - - Chapront, J., Chapront-Touze, M. & Francou, G. 2002, - Astron.Astrophys. 387, 700 - - Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977, - Astron.Astrophys. 58, 1-16 - - Mathews, P.M., Herring, T.A., Buffet, B.A. 2002, J.Geophys.Res. - 107, B4. The MHB_2000 code itself was obtained on 9th September - 2002 from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A. - - Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 - - Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, - Astron.Astrophys.Supp.Ser. 135, 111 - - Wallace, P.T., "Software for Implementing the IAU 2000 - Resolutions", in IERS Workshop 5.1 (2002) -*/ -func Nut06a(date1, date2 float64, dpsi, deps *float64) { - var t, fj2, dp, de float64 - - /* Interval between fundamental date J2000.0 and given date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* Factor correcting for secular variation of J2. */ - fj2 = -2.7774e-6 * t - - /* Obtain IAU 2000A nutation. */ - Nut00a(date1, date2, &dp, &de) - - /* Apply P03 adjustments (Wallace & Capitaine, 2006, Eqs.5). */ - *dpsi = dp + dp*(0.4697e-6+fj2) - *deps = de + de*fj2 - -} - -/* -Nut80 Nutation, IAU 1980 Nutation, IAU 1980 model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - dpsi float64 nutation in longitude (radians) - deps float64 nutation in obliquity (radians) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The nutation components are with respect to the ecliptic of - date. - -Called: - Anpm normalize angle into range +/- pi - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992), - Section 3.222 (p111). -*/ -func Nut80(date1, date2 float64, dpsi, deps *float64) { - var t, el, elp, f, d, om, dp, de, arg, s, c float64 - var j int - - /* Units of 0.1 milliarcsecond to radians */ - const U2R = DAS2R / 1e4 - - /* ------------------------------------------------ */ - /* Table of multiples of arguments and coefficients */ - /* ------------------------------------------------ */ - - /* The units for the sine and cosine coefficients are 0.1 mas and */ - /* the same per Julian century */ - - x := []struct { - nl, nlp, nf, nd, nom int /* coefficients of l,l',F,D,Om */ - sp, spt float64 /* longitude sine, 1 and t coefficients */ - ce, cet float64 /* obliquity cosine, 1 and t coefficients */ - }{ - - /* 1-10 */ - {0, 0, 0, 0, 1, -171996.0, -174.2, 92025.0, 8.9}, - {0, 0, 0, 0, 2, 2062.0, 0.2, -895.0, 0.5}, - {-2, 0, 2, 0, 1, 46.0, 0.0, -24.0, 0.0}, - {2, 0, -2, 0, 0, 11.0, 0.0, 0.0, 0.0}, - {-2, 0, 2, 0, 2, -3.0, 0.0, 1.0, 0.0}, - {1, -1, 0, -1, 0, -3.0, 0.0, 0.0, 0.0}, - {0, -2, 2, -2, 1, -2.0, 0.0, 1.0, 0.0}, - {2, 0, -2, 0, 1, 1.0, 0.0, 0.0, 0.0}, - {0, 0, 2, -2, 2, -13187.0, -1.6, 5736.0, -3.1}, - {0, 1, 0, 0, 0, 1426.0, -3.4, 54.0, -0.1}, - - /* 11-20 */ - {0, 1, 2, -2, 2, -517.0, 1.2, 224.0, -0.6}, - {0, -1, 2, -2, 2, 217.0, -0.5, -95.0, 0.3}, - {0, 0, 2, -2, 1, 129.0, 0.1, -70.0, 0.0}, - {2, 0, 0, -2, 0, 48.0, 0.0, 1.0, 0.0}, - {0, 0, 2, -2, 0, -22.0, 0.0, 0.0, 0.0}, - {0, 2, 0, 0, 0, 17.0, -0.1, 0.0, 0.0}, - {0, 1, 0, 0, 1, -15.0, 0.0, 9.0, 0.0}, - {0, 2, 2, -2, 2, -16.0, 0.1, 7.0, 0.0}, - {0, -1, 0, 0, 1, -12.0, 0.0, 6.0, 0.0}, - {-2, 0, 0, 2, 1, -6.0, 0.0, 3.0, 0.0}, - - /* 21-30 */ - {0, -1, 2, -2, 1, -5.0, 0.0, 3.0, 0.0}, - {2, 0, 0, -2, 1, 4.0, 0.0, -2.0, 0.0}, - {0, 1, 2, -2, 1, 4.0, 0.0, -2.0, 0.0}, - {1, 0, 0, -1, 0, -4.0, 0.0, 0.0, 0.0}, - {2, 1, 0, -2, 0, 1.0, 0.0, 0.0, 0.0}, - {0, 0, -2, 2, 1, 1.0, 0.0, 0.0, 0.0}, - {0, 1, -2, 2, 0, -1.0, 0.0, 0.0, 0.0}, - {0, 1, 0, 0, 2, 1.0, 0.0, 0.0, 0.0}, - {-1, 0, 0, 1, 1, 1.0, 0.0, 0.0, 0.0}, - {0, 1, 2, -2, 0, -1.0, 0.0, 0.0, 0.0}, - - /* 31-40 */ - {0, 0, 2, 0, 2, -2274.0, -0.2, 977.0, -0.5}, - {1, 0, 0, 0, 0, 712.0, 0.1, -7.0, 0.0}, - {0, 0, 2, 0, 1, -386.0, -0.4, 200.0, 0.0}, - {1, 0, 2, 0, 2, -301.0, 0.0, 129.0, -0.1}, - {1, 0, 0, -2, 0, -158.0, 0.0, -1.0, 0.0}, - {-1, 0, 2, 0, 2, 123.0, 0.0, -53.0, 0.0}, - {0, 0, 0, 2, 0, 63.0, 0.0, -2.0, 0.0}, - {1, 0, 0, 0, 1, 63.0, 0.1, -33.0, 0.0}, - {-1, 0, 0, 0, 1, -58.0, -0.1, 32.0, 0.0}, - {-1, 0, 2, 2, 2, -59.0, 0.0, 26.0, 0.0}, - - /* 41-50 */ - {1, 0, 2, 0, 1, -51.0, 0.0, 27.0, 0.0}, - {0, 0, 2, 2, 2, -38.0, 0.0, 16.0, 0.0}, - {2, 0, 0, 0, 0, 29.0, 0.0, -1.0, 0.0}, - {1, 0, 2, -2, 2, 29.0, 0.0, -12.0, 0.0}, - {2, 0, 2, 0, 2, -31.0, 0.0, 13.0, 0.0}, - {0, 0, 2, 0, 0, 26.0, 0.0, -1.0, 0.0}, - {-1, 0, 2, 0, 1, 21.0, 0.0, -10.0, 0.0}, - {-1, 0, 0, 2, 1, 16.0, 0.0, -8.0, 0.0}, - {1, 0, 0, -2, 1, -13.0, 0.0, 7.0, 0.0}, - {-1, 0, 2, 2, 1, -10.0, 0.0, 5.0, 0.0}, - - /* 51-60 */ - {1, 1, 0, -2, 0, -7.0, 0.0, 0.0, 0.0}, - {0, 1, 2, 0, 2, 7.0, 0.0, -3.0, 0.0}, - {0, -1, 2, 0, 2, -7.0, 0.0, 3.0, 0.0}, - {1, 0, 2, 2, 2, -8.0, 0.0, 3.0, 0.0}, - {1, 0, 0, 2, 0, 6.0, 0.0, 0.0, 0.0}, - {2, 0, 2, -2, 2, 6.0, 0.0, -3.0, 0.0}, - {0, 0, 0, 2, 1, -6.0, 0.0, 3.0, 0.0}, - {0, 0, 2, 2, 1, -7.0, 0.0, 3.0, 0.0}, - {1, 0, 2, -2, 1, 6.0, 0.0, -3.0, 0.0}, - {0, 0, 0, -2, 1, -5.0, 0.0, 3.0, 0.0}, - - /* 61-70 */ - {1, -1, 0, 0, 0, 5.0, 0.0, 0.0, 0.0}, - {2, 0, 2, 0, 1, -5.0, 0.0, 3.0, 0.0}, - {0, 1, 0, -2, 0, -4.0, 0.0, 0.0, 0.0}, - {1, 0, -2, 0, 0, 4.0, 0.0, 0.0, 0.0}, - {0, 0, 0, 1, 0, -4.0, 0.0, 0.0, 0.0}, - {1, 1, 0, 0, 0, -3.0, 0.0, 0.0, 0.0}, - {1, 0, 2, 0, 0, 3.0, 0.0, 0.0, 0.0}, - {1, -1, 2, 0, 2, -3.0, 0.0, 1.0, 0.0}, - {-1, -1, 2, 2, 2, -3.0, 0.0, 1.0, 0.0}, - {-2, 0, 0, 0, 1, -2.0, 0.0, 1.0, 0.0}, - - /* 71-80 */ - {3, 0, 2, 0, 2, -3.0, 0.0, 1.0, 0.0}, - {0, -1, 2, 2, 2, -3.0, 0.0, 1.0, 0.0}, - {1, 1, 2, 0, 2, 2.0, 0.0, -1.0, 0.0}, - {-1, 0, 2, -2, 1, -2.0, 0.0, 1.0, 0.0}, - {2, 0, 0, 0, 1, 2.0, 0.0, -1.0, 0.0}, - {1, 0, 0, 0, 2, -2.0, 0.0, 1.0, 0.0}, - {3, 0, 0, 0, 0, 2.0, 0.0, 0.0, 0.0}, - {0, 0, 2, 1, 2, 2.0, 0.0, -1.0, 0.0}, - {-1, 0, 0, 0, 2, 1.0, 0.0, -1.0, 0.0}, - {1, 0, 0, -4, 0, -1.0, 0.0, 0.0, 0.0}, - - /* 81-90 */ - {-2, 0, 2, 2, 2, 1.0, 0.0, -1.0, 0.0}, - {-1, 0, 2, 4, 2, -2.0, 0.0, 1.0, 0.0}, - {2, 0, 0, -4, 0, -1.0, 0.0, 0.0, 0.0}, - {1, 1, 2, -2, 2, 1.0, 0.0, -1.0, 0.0}, - {1, 0, 2, 2, 1, -1.0, 0.0, 1.0, 0.0}, - {-2, 0, 2, 4, 2, -1.0, 0.0, 1.0, 0.0}, - {-1, 0, 4, 0, 2, 1.0, 0.0, 0.0, 0.0}, - {1, -1, 0, -2, 0, 1.0, 0.0, 0.0, 0.0}, - {2, 0, 2, -2, 1, 1.0, 0.0, -1.0, 0.0}, - {2, 0, 2, 2, 2, -1.0, 0.0, 0.0, 0.0}, - - /* 91-100 */ - {1, 0, 0, 2, 1, -1.0, 0.0, 0.0, 0.0}, - {0, 0, 4, -2, 2, 1.0, 0.0, 0.0, 0.0}, - {3, 0, 2, -2, 2, 1.0, 0.0, 0.0, 0.0}, - {1, 0, 2, -2, 0, -1.0, 0.0, 0.0, 0.0}, - {0, 1, 2, 0, 1, 1.0, 0.0, 0.0, 0.0}, - {-1, -1, 0, 2, 1, 1.0, 0.0, 0.0, 0.0}, - {0, 0, -2, 0, 1, -1.0, 0.0, 0.0, 0.0}, - {0, 0, 2, -1, 2, -1.0, 0.0, 0.0, 0.0}, - {0, 1, 0, 2, 0, -1.0, 0.0, 0.0, 0.0}, - {1, 0, -2, -2, 0, -1.0, 0.0, 0.0, 0.0}, - - /* 101-106 */ - {0, -1, 2, 0, 1, -1.0, 0.0, 0.0, 0.0}, - {1, 1, 0, -2, 1, -1.0, 0.0, 0.0, 0.0}, - {1, 0, -2, 2, 0, -1.0, 0.0, 0.0, 0.0}, - {2, 0, 0, 2, 0, 1.0, 0.0, 0.0, 0.0}, - {0, 0, 2, 4, 2, -1.0, 0.0, 0.0, 0.0}, - {0, 1, 0, 1, 0, 1.0, 0.0, 0.0, 0.0}, - } - - /* Number of terms in the series */ - NT := len(x) - - /* ------------------------------------------------------------------ */ - - /* Interval between fundamental epoch J2000.0 and given date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* --------------------- */ - /* Fundamental arguments */ - /* --------------------- */ - - /* Mean longitude of Moon minus mean longitude of Moon's perigee. */ - el = Anpm((485866.733+(715922.633+(31.310+0.064*t)*t)*t)*DAS2R + fmod(1325.0*t, 1.0)*D2PI) - - /* Mean longitude of Sun minus mean longitude of Sun's perigee. */ - elp = Anpm((1287099.804+(1292581.224+(-0.577-0.012*t)*t)*t)*DAS2R + fmod(99.0*t, 1.0)*D2PI) - - /* Mean longitude of Moon minus mean longitude of Moon's node. */ - f = Anpm((335778.877+(295263.137+(-13.257+0.011*t)*t)*t)*DAS2R + fmod(1342.0*t, 1.0)*D2PI) - - /* Mean elongation of Moon from Sun. */ - d = Anpm((1072261.307+(1105601.328+(-6.891+0.019*t)*t)*t)*DAS2R + fmod(1236.0*t, 1.0)*D2PI) - - /* Longitude of the mean ascending node of the lunar orbit on the */ - /* ecliptic, measured from the mean equinox of date. */ - om = Anpm((450160.280+(-482890.539+(7.455+0.008*t)*t)*t)*DAS2R + fmod(-5.0*t, 1.0)*D2PI) - - /* --------------- */ - /* Nutation series */ - /* --------------- */ - - /* Initialize nutation components. */ - dp = 0.0 - de = 0.0 - - /* Sum the nutation terms, ending with the biggest. */ - for j = NT - 1; j >= 0; j-- { - - /* Form argument for current term. */ - arg = float64(x[j].nl)*el + - float64(x[j].nlp)*elp + - float64(x[j].nf)*f + - float64(x[j].nd)*d + - float64(x[j].nom)*om - - /* Accumulate current nutation term. */ - s = x[j].sp + x[j].spt*t - c = x[j].ce + x[j].cet*t - if s != 0.0 { - dp += s * sin(arg) - } - if c != 0.0 { - de += c * cos(arg) - } - } - - /* Convert results from 0.1 mas units to radians. */ - *dpsi = dp * U2R - *deps = de * U2R -} - -/* -Nutm80 Nutation matrix, IAU 1980 -Form the matrix of nutation for a given date, IAU 1980 model. - -Given: - date1,date2 float64 TDB date (Note 1) - -Returned: - rmatn [3][3]float64 nutation matrix - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix operates in the sense V(true) = rmatn * V(mean), - where the p-vector V(true) is with respect to the true - equatorial triad of date and the p-vector V(mean) is with - respect to the mean equatorial triad of date. - -Called: - Nut80 nutation, IAU 1980 - Obl80 mean obliquity, IAU 1980 - Numat form nutation matrix -*/ -func Nutm80(date1, date2 float64, rmatn *[3][3]float64) { - var dpsi, deps, epsa float64 - - /* Nutation components and mean obliquity. */ - Nut80(date1, date2, &dpsi, &deps) - epsa = Obl80(date1, date2) - - /* Build the rotation matrix. */ - Numat(epsa, dpsi, deps, rmatn) -} - -/* -Obl06 Mean obliquity, IAU 2006 -Mean obliquity of the ecliptic, IAU 2006 precession model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned (function value): - float64 obliquity of the ecliptic (radians, Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The result is the angle between the ecliptic and mean equator of - date date1+date2. - -Reference: - - Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351 -*/ -func Obl06(date1, date2 float64) float64 { - var t, eps0 float64 - - /* Interval between fundamental date J2000.0 and given date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* Mean obliquity. */ - eps0 = (84381.406 + (-46.836769+(-0.0001831+(0.00200340+(-0.000000576+(-0.0000000434)*t)*t)*t)*t)*t) * DAS2R - - return eps0 -} - -/* -Obl80 Mean obliquity, IAU 1980 Mean obliquity of the ecliptic, IAU 1980 model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned (function value): - float64 obliquity of the ecliptic (radians, Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The result is the angle between the ecliptic and mean equator of - date date1+date2. - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992), - Expression 3.222-1 (p114). -*/ -func Obl80(date1, date2 float64) float64 { - var t, eps0 float64 - - /* Interval between fundamental epoch J2000.0 and given date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* Mean obliquity of date. */ - eps0 = DAS2R * (84381.448 + - (-46.8150+ - (-0.00059+ - (0.001813)*t)*t)*t) - - return eps0 -} - -/* -Pb06 Zeta, z, theta precession angles, IAU 2006, including bias -This function forms three Euler angles which implement general -precession from epoch J2000.0, using the IAU 2006 model. Frame -bias (the offset between ICRS and mean J2000.0) is included. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - bzeta float64 1st rotation: radians cw around z - bz float64 3rd rotation: radians cw around z - btheta float64 2nd rotation: radians ccw around y - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The traditional accumulated precession angles zeta_A, z_A, - theta_A cannot be obtained in the usual way, namely through - polynomial expressions, because of the frame bias. The latter - means that two of the angles undergo rapid changes near this - date. They are instead the results of decomposing the - precession-bias matrix obtained by using the Fukushima-Williams - method, which does not suffer from the problem. The - decomposition returns values which can be used in the - conventional formulation and which include frame bias. - - 3) The three angles are returned in the conventional order, which - is not the same as the order of the corresponding Euler - rotations. The precession-bias matrix is - R_3(-z) x R_2(+theta) x R_3(-zeta). - - 4) Should zeta_A, z_A, theta_A angles be required that do not - contain frame bias, they are available by calling the SOFA - function iauP06e. - -Called: - Pmat06 PB matrix, IAU 2006 - Rz rotate around Z-axis -*/ -func Pb06(date1, date2 float64, bzeta, bz, btheta *float64) { - var r [3][3]float64 - var y, x float64 - - /* Precession matrix via Fukushima-Williams angles. */ - Pmat06(date1, date2, &r) - - /* Solve for z, choosing the +/- pi alternative. */ - y = r[1][2] - x = -r[0][2] - if x < 0.0 { - y = -y - x = -x - } - - // *bz = ( x != 0.0 || y != 0.0 ) ? - atan2(y,x) : 0.0; - if x != 0.0 || y != 0.0 { - *bz = -atan2(y, x) - } else { - *bz = 0.0 - } - - /* Derotate it out of the matrix. */ - Rz(*bz, &r) - - /* Solve for the remaining two angles. */ - y = r[0][2] - x = r[2][2] - // *btheta = ( x != 0.0 || y != 0.0 ) ? - atan2(y,x) : 0.0; - if x != 0.0 || y != 0.0 { - *btheta = -atan2(y, x) - } else { - *btheta = 0.0 - } - - y = -r[1][0] - x = r[1][1] - // *bzeta = ( x != 0.0 || y != 0.0 ) ? - atan2(y,x) : 0.0; - if x != 0.0 || y != 0.0 { - *bzeta = -atan2(y, x) - } else { - *bzeta = 0.0 - } -} - -/* -Pfw06 Bias-precession Fukushima-Williams angles, IAU 2006 -Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation). - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - gamb float64 F-W angle gamma_bar (radians) - phib float64 F-W angle phi_bar (radians) - psib float64 F-W angle psi_bar (radians) - epsa float64 F-W angle epsilon_A (radians) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) Naming the following points: - - e = J2000.0 ecliptic pole, - p = GCRS pole, - E = mean ecliptic pole of date, - and P = mean pole of date, - - the four Fukushima-Williams angles are as follows: - - gamb = gamma_bar = epE - phib = phi_bar = pE - psib = psi_bar = pEP - epsa = epsilon_A = EP - - 3) The matrix representing the combined effects of frame bias and - precession is: - - PxB = R_1(-epsa).R_3(-psib).R_1(phib).R_3(gamb) - - 4) The matrix representing the combined effects of frame bias, - precession and nutation is simply: - - NxPxB = R_1(-epsa-dE).R_3(-psib-dP).R_1(phib).R_3(gamb) - - where dP and dE are the nutation components with respect to the - ecliptic of date. - -Reference: - - Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351 - -Called: - Obl06 mean obliquity, IAU 2006 -*/ -func Pfw06(date1, date2 float64, gamb, phib, psib, epsa *float64) { - var t float64 - - /* Interval between fundamental date J2000.0 and given date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* P03 bias+precession angles. */ - *gamb = (-0.052928 + (10.556378+(0.4932044+(-0.00031238+(-0.000002788+(0.0000000260)*t)*t)*t)*t)*t) * DAS2R - *phib = (84381.412819 + (-46.811016+(0.0511268+(0.00053289+(-0.000000440+(-0.0000000176)*t)*t)*t)*t)*t) * DAS2R - *psib = (-0.041775 + (5038.481484+(1.5584175+(-0.00018522+(-0.000026452+(-0.0000000148)*t)*t)*t)*t)*t) * DAS2R - *epsa = Obl06(date1, date2) -} - -/* -Pmat00 Precession matrix (including frame bias), IAU 2000 -Precession matrix (including frame bias) from GCRS to a specified -date, IAU 2000 model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rbp [3][3]float64 bias-precession matrix (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix operates in the sense V(date) = rbp * V(GCRS), where - the p-vector V(GCRS) is with respect to the Geocentric Celestial - Reference System (IAU, 2000) and the p-vector V(date) is with - respect to the mean equatorial triad of the given date. - -Called: - Bp00 frame bias and precession matrices, IAU 2000 - -Reference: - - : Trans. International Astronomical Union, Vol. XXIVB; Proc. - 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6. - (2000) -*/ -func Pmat00(date1, date2 float64, rbp *[3][3]float64) { - var rb, rp [3][3]float64 - - /* Obtain the required matrix (discarding others). */ - Bp00(date1, date2, &rb, &rp, rbp) -} - -/* -Pmat06 Precession matrix (including frame bias), IAU 2006 -Precession matrix (including frame bias) from GCRS to a specified -date, IAU 2006 model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rbp [3][3]float64 bias-precession matrix (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix operates in the sense V(date) = rbp * V(GCRS), where - the p-vector V(GCRS) is with respect to the Geocentric Celestial - Reference System (IAU, 2000) and the p-vector V(date) is with - respect to the mean equatorial triad of the given date. - -Called: - Pfw06 bias-precession F-W angles, IAU 2006 - Fw2m F-W angles to r-matrix - -References: - - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 - - : Trans. International Astronomical Union, Vol. XXIVB; Proc. - 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6. - (2000) - - Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 -*/ -func Pmat06(date1, date2 float64, rbp *[3][3]float64) { - var gamb, phib, psib, epsa float64 - - /* Bias-precession Fukushima-Williams angles. */ - Pfw06(date1, date2, &gamb, &phib, &psib, &epsa) - - /* Form the matrix. */ - Fw2m(gamb, phib, psib, epsa, rbp) -} - -/* -Pmat76 Precession matrix, IAU 1976 -Precession matrix from J2000.0 to a specified date, IAU 1976 model. - -Given: - date1,date2 float64 ending date, TT (Note 1) - -Returned: - rmatp [3][3]float64 precession matrix, J2000.0 -> date1+date2 - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix operates in the sense V(date) = RMATP * V(J2000), - where the p-vector V(J2000) is with respect to the mean - equatorial triad of epoch J2000.0 and the p-vector V(date) - is with respect to the mean equatorial triad of the given - date. - - 3) Though the matrix method itself is rigorous, the precession - angles are expressed through canonical polynomials which are - valid only for a limited time span. In addition, the IAU 1976 - precession rate is known to be imperfect. The absolute accuracy - of the present formulation is better than 0.1 arcsec from - 1960AD to 2040AD, better than 1 arcsec from 1640AD to 2360AD, - and remains below 3 arcsec for the whole of the period - 500BC to 3000AD. The errors exceed 10 arcsec outside the - range 1200BC to 3900AD, exceed 100 arcsec outside 4200BC to - 5600AD and exceed 1000 arcsec outside 6800BC to 8200AD. - -Called: - Prec76 accumulated precession angles, IAU 1976 - Ir initialize r-matrix to identity - Rz rotate around Z-axis - Ry rotate around Y-axis - Cr copy r-matrix - -References: - - Lieske, J.H., 1979, Astron.Astrophys. 73, 282. - equations (6) & (7), p283. - - Kaplan,G.H., 1981. USNO circular no. 163, pA2. -*/ -func Pmat76(date1, date2 float64, rmatp *[3][3]float64) { - var zeta, z, theta float64 - var wmat [3][3]float64 - - /* Precession Euler angles, J2000.0 to specified date. */ - Prec76(DJ00, 0.0, date1, date2, &zeta, &z, &theta) - - /* Form the rotation matrix. */ - Ir(&wmat) - Rz(-zeta, &wmat) - Ry(theta, &wmat) - Rz(-z, &wmat) - Cr(wmat, rmatp) -} - -/* -Pn00 B,P,N matrices, IAU 2000, given nutation - -Precession-nutation, IAU 2000 model: a multi-purpose function, -supporting classical (equinox-based) use directly and CIO-based -use indirectly. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - dpsi,deps float64 nutation (Note 2) - -Returned: - epsa float64 mean obliquity (Note 3) - rb [3][3]float64 frame bias matrix (Note 4) - rp [3][3]float64 precession matrix (Note 5) - rbp [3][3]float64 bias-precession matrix (Note 6) - rn [3][3]float64 nutation matrix (Note 7) - rbpn [3][3]float64 GCRS-to-true matrix (Note 8) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The caller is responsible for providing the nutation components; - they are in longitude and obliquity, in radians and are with - respect to the equinox and ecliptic of date. For high-accuracy - applications, free core nutation should be included as well as - any other relevant corrections to the position of the CIP. - - 3) The returned mean obliquity is consistent with the IAU 2000 - precession-nutation models. - - 4) The matrix rb transforms vectors from GCRS to J2000.0 mean - equator and equinox by applying frame bias. - - 5) The matrix rp transforms vectors from J2000.0 mean equator and - equinox to mean equator and equinox of date by applying - precession. - - 6) The matrix rbp transforms vectors from GCRS to mean equator and - equinox of date by applying frame bias then precession. It is - the product rp x rb. - - 7) The matrix rn transforms vectors from mean equator and equinox of - date to true equator and equinox of date by applying the nutation - (luni-solar + planetary). - - 8) The matrix rbpn transforms vectors from GCRS to true equator and - equinox of date. It is the product rn x rbp, applying frame - bias, precession and nutation in that order. - - 9) It is permissible to re-use the same array in the returned - arguments. The arrays are filled in the order given. - -Called: - Pr00 IAU 2000 precession adjustments - Obl80 mean obliquity, IAU 1980 - Bp00 frame bias and precession matrices, IAU 2000 - Cr copy r-matrix - Numat form nutation matrix - Rxr product of two r-matrices - -Reference: - - Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., - "Expressions for the Celestial Intermediate Pole and Celestial - Ephemeris Origin consistent with the IAU 2000A precession- - nutation model", Astron.Astrophys. 400, 1145-1154 (2003) - - n.b. The celestial ephemeris origin (CEO) was renamed "celestial - intermediate origin" (CIO) by IAU 2006 Resolution 2. -*/ -func Pn00(date1, date2 float64, dpsi, deps float64, epsa *float64, rb, rp, rbp, rn, rbpn *[3][3]float64) { - var dpsipr, depspr float64 - var rbpw, rnw [3][3]float64 - - /* IAU 2000 precession-rate adjustments. */ - Pr00(date1, date2, &dpsipr, &depspr) - - /* Mean obliquity, consistent with IAU 2000 precession-nutation. */ - *epsa = Obl80(date1, date2) + depspr - - /* Frame bias and precession matrices and their product. */ - Bp00(date1, date2, rb, rp, &rbpw) - Cr(rbpw, rbp) - - /* Nutation matrix. */ - Numat(*epsa, dpsi, deps, &rnw) - Cr(rnw, rn) - - /* Bias-precession-nutation matrix (classical). */ - Rxr(rnw, rbpw, rbpn) -} - -/* -Pn00a B,P,N matrices, IAU 2000A - -Precession-nutation, IAU 2000A model: a multi-purpose function, -supporting classical (equinox-based) use directly and CIO-based -use indirectly. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - dpsi,deps float64 nutation (Note 2) - epsa float64 mean obliquity (Note 3) - rb [3][3]float64 frame bias matrix (Note 4) - rp [3][3]float64 precession matrix (Note 5) - rbp [3][3]float64 bias-precession matrix (Note 6) - rn [3][3]float64 nutation matrix (Note 7) - rbpn [3][3]float64 GCRS-to-true matrix (Notes 8,9) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The nutation components (luni-solar + planetary, IAU 2000A) in - longitude and obliquity are in radians and with respect to the - equinox and ecliptic of date. Free core nutation is omitted; - for the utmost accuracy, use the iauPn00 function, where the - nutation components are caller-specified. For faster but - slightly less accurate results, use the iauPn00b function. - - 3) The mean obliquity is consistent with the IAU 2000 precession. - - 4) The matrix rb transforms vectors from GCRS to J2000.0 mean - equator and equinox by applying frame bias. - - 5) The matrix rp transforms vectors from J2000.0 mean equator and - equinox to mean equator and equinox of date by applying - precession. - - 6) The matrix rbp transforms vectors from GCRS to mean equator and - equinox of date by applying frame bias then precession. It is - the product rp x rb. - - 7) The matrix rn transforms vectors from mean equator and equinox - of date to true equator and equinox of date by applying the - nutation (luni-solar + planetary). - - 8) The matrix rbpn transforms vectors from GCRS to true equator and - equinox of date. It is the product rn x rbp, applying frame - bias, precession and nutation in that order. - - 9) The X,Y,Z coordinates of the IAU 2000A Celestial Intermediate - Pole are elements (3,1-3) of the GCRS-to-true matrix, - i.e. rbpn[2][0-2]. - - 10)It is permissible to re-use the same array in the returned - arguments. The arrays are filled in the stated order. - -Called: - Nut00a nutation, IAU 2000A - Pn00 bias/precession/nutation results, IAU 2000 - -Reference: - - Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., - "Expressions for the Celestial Intermediate Pole and Celestial - Ephemeris Origin consistent with the IAU 2000A precession- - nutation model", Astron.Astrophys. 400, 1145-1154 (2003) - - n.b. The celestial ephemeris origin (CEO) was renamed "celestial - intermediate origin" (CIO) by IAU 2006 Resolution 2. -*/ -func Pn00a(date1, date2 float64, dpsi, deps, epsa *float64, rb, rp, rbp, rn, rbpn *[3][3]float64) { - /* Nutation. */ - Nut00a(date1, date2, dpsi, deps) - - /* Remaining results. */ - Pn00(date1, date2, *dpsi, *deps, epsa, rb, rp, rbp, rn, rbpn) -} - -/* -Pn00b B,P,N matrices, IAU 2000B - -Precession-nutation, IAU 2000B model: a multi-purpose function, -supporting classical (equinox-based) use directly and CIO-based -use indirectly. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - dpsi,deps float64 nutation (Note 2) - epsa float64 mean obliquity (Note 3) - rb [3][3]float64 frame bias matrix (Note 4) - rp [3][3]float64 precession matrix (Note 5) - rbp [3][3]float64 bias-precession matrix (Note 6) - rn [3][3]float64 nutation matrix (Note 7) - rbpn [3][3]float64 GCRS-to-true matrix (Notes 8,9) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The nutation components (luni-solar + planetary, IAU 2000B) in - longitude and obliquity are in radians and with respect to the - equinox and ecliptic of date. For more accurate results, but - at the cost of increased computation, use the iauPn00a function. - For the utmost accuracy, use the iauPn00 function, where the - nutation components are caller-specified. - - 3) The mean obliquity is consistent with the IAU 2000 precession. - - 4) The matrix rb transforms vectors from GCRS to J2000.0 mean - equator and equinox by applying frame bias. - - 5) The matrix rp transforms vectors from J2000.0 mean equator and - equinox to mean equator and equinox of date by applying - precession. - - 6) The matrix rbp transforms vectors from GCRS to mean equator and - equinox of date by applying frame bias then precession. It is - the product rp x rb. - - 7) The matrix rn transforms vectors from mean equator and equinox - of date to true equator and equinox of date by applying the - nutation (luni-solar + planetary). - - 8) The matrix rbpn transforms vectors from GCRS to true equator and - equinox of date. It is the product rn x rbp, applying frame - bias, precession and nutation in that order. - - 9) The X,Y,Z coordinates of the IAU 2000B Celestial Intermediate - Pole are elements (3,1-3) of the GCRS-to-true matrix, - i.e. rbpn[2][0-2]. - - 10)It is permissible to re-use the same array in the returned - arguments. The arrays are filled in the stated order. - -Called: - Nut00b nutation, IAU 2000B - Pn00 bias/precession/nutation results, IAU 2000 - -Reference: - - Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., - "Expressions for the Celestial Intermediate Pole and Celestial - Ephemeris Origin consistent with the IAU 2000A precession- - nutation model", Astron.Astrophys. 400, 1145-1154 (2003). - - n.b. The celestial ephemeris origin (CEO) was renamed "celestial - intermediate origin" (CIO) by IAU 2006 Resolution 2. -*/ -func Pn00b(date1, date2 float64, dpsi, deps, epsa *float64, rb, rp, rbp, rn, rbpn *[3][3]float64) { - /* Nutation. */ - Nut00b(date1, date2, dpsi, deps) - - /* Remaining results. */ - Pn00(date1, date2, *dpsi, *deps, epsa, rb, rp, rbp, rn, rbpn) -} - -/* -Pn06 Bias precession nutation results, IAU 2006 - -Precession-nutation, IAU 2006 model: a multi-purpose function, -supporting classical (equinox-based) use directly and CIO-based use -indirectly. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - dpsi,deps float64 nutation (Note 2) - -Returned: - epsa float64 mean obliquity (Note 3) - rb [3][3]float64 frame bias matrix (Note 4) - rp [3][3]float64 precession matrix (Note 5) - rbp [3][3]float64 bias-precession matrix (Note 6) - rn [3][3]float64 nutation matrix (Note 7) - rbpn [3][3]float64 GCRS-to-true matrix (Notes 8,9) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The caller is responsible for providing the nutation components; - they are in longitude and obliquity, in radians and are with - respect to the equinox and ecliptic of date. For high-accuracy - applications, free core nutation should be included as well as - any other relevant corrections to the position of the CIP. - - 3) The returned mean obliquity is consistent with the IAU 2006 - precession. - - 4) The matrix rb transforms vectors from GCRS to J2000.0 mean - equator and equinox by applying frame bias. - - 5) The matrix rp transforms vectors from J2000.0 mean equator and - equinox to mean equator and equinox of date by applying - precession. - - 6) The matrix rbp transforms vectors from GCRS to mean equator and - equinox of date by applying frame bias then precession. It is - the product rp x rb. - - 7) The matrix rn transforms vectors from mean equator and equinox - of date to true equator and equinox of date by applying the - nutation (luni-solar + planetary). - - 8) The matrix rbpn transforms vectors from GCRS to true equator and - equinox of date. It is the product rn x rbp, applying frame - bias, precession and nutation in that order. - - 9) The X,Y,Z coordinates of the Celestial Intermediate Pole are - elements (3,1-3) of the GCRS-to-true matrix, i.e. rbpn[2][0-2]. - - 10)It is permissible to re-use the same array in the returned - arguments. The arrays are filled in the stated order. - -Called: - Pfw06 bias-precession F-W angles, IAU 2006 - Fw2m F-W angles to r-matrix - Cr copy r-matrix - Tr transpose r-matrix - Rxr product of two r-matrices - -References: - - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 - - Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 -*/ -func Pn06(date1, date2 float64, dpsi, deps float64, epsa *float64, rb, rp, rbp, rn, rbpn *[3][3]float64) { - var gamb, phib, psib, eps float64 - var r1, r2, rt [3][3]float64 - - /* Bias-precession Fukushima-Williams angles of J2000.0 = frame bias. */ - Pfw06(DJM0, DJM00, &gamb, &phib, &psib, &eps) - - /* B matrix. */ - Fw2m(gamb, phib, psib, eps, &r1) - Cr(r1, rb) - - /* Bias-precession Fukushima-Williams angles of date. */ - Pfw06(date1, date2, &gamb, &phib, &psib, &eps) - - /* Bias-precession matrix. */ - Fw2m(gamb, phib, psib, eps, &r2) - Cr(r2, rbp) - - /* Solve for precession matrix. */ - Tr(r1, &rt) - Rxr(r2, rt, rp) - - /* Equinox-based bias-precession-nutation matrix. */ - Fw2m(gamb, phib, psib+dpsi, eps+deps, &r1) - Cr(r1, rbpn) - - /* Solve for nutation matrix. */ - Tr(r2, &rt) - Rxr(r1, rt, rn) - - /* Obliquity, mean of date. */ - *epsa = eps - -} - -/* -Pn06a Bias precession nutation results, IAU 2006/2000A - -Precession-nutation, IAU 2006/2000A models: a multi-purpose function, -supporting classical (equinox-based) use directly and CIO-based use -indirectly. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - dpsi,deps float64 nutation (Note 2) - epsa float64 mean obliquity (Note 3) - rb [3][3]float64 frame bias matrix (Note 4) - rp [3][3]float64 precession matrix (Note 5) - rbp [3][3]float64 bias-precession matrix (Note 6) - rn [3][3]float64 nutation matrix (Note 7) - rbpn [3][3]float64 GCRS-to-true matrix (Notes 8,9) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The nutation components (luni-solar + planetary, IAU 2000A) in - longitude and obliquity are in radians and with respect to the - equinox and ecliptic of date. Free core nutation is omitted; - for the utmost accuracy, use the iauPn06 function, where the - nutation components are caller-specified. - - 3) The mean obliquity is consistent with the IAU 2006 precession. - - 4) The matrix rb transforms vectors from GCRS to mean J2000.0 by - applying frame bias. - - 5) The matrix rp transforms vectors from mean J2000.0 to mean of - date by applying precession. - - 6) The matrix rbp transforms vectors from GCRS to mean of date by - applying frame bias then precession. It is the product rp x rb. - - 7) The matrix rn transforms vectors from mean of date to true of - date by applying the nutation (luni-solar + planetary). - - 8) The matrix rbpn transforms vectors from GCRS to true of date - (CIP/equinox). It is the product rn x rbp, applying frame bias, - precession and nutation in that order. - - 9) The X,Y,Z coordinates of the IAU 2006/2000A Celestial - Intermediate Pole are elements (3,1-3) of the GCRS-to-true - matrix, i.e. rbpn[2][0-2]. - - 10)It is permissible to re-use the same array in the returned - arguments. The arrays are filled in the stated order. - -Called: - Nut06a nutation, IAU 2006/2000A - Pn06 bias/precession/nutation results, IAU 2006 - -Reference: - - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 -*/ -func Pn06a(date1, date2 float64, dpsi, deps, epsa *float64, rb, rp, rbp, rn, rbpn *[3][3]float64) { - /* Nutation. */ - Nut06a(date1, date2, dpsi, deps) - - /* Remaining results. */ - Pn06(date1, date2, *dpsi, *deps, epsa, rb, rp, rbp, rn, rbpn) -} - -/* -Pnm00a Classical NPB matrix, IAU 2000A - -Form the matrix of precession-nutation for a given date (including -frame bias), equinox based, IAU 2000A model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rbpn [3][3]float64 bias-precession-nutation matrix (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix operates in the sense V(date) = rbpn * V(GCRS), where - the p-vector V(date) is with respect to the true equatorial triad - of date date1+date2 and the p-vector V(GCRS) is with respect to - the Geocentric Celestial Reference System (IAU, 2000). - - 3) A faster, but slightly less accurate, result (about 1 mas) can be - obtained by using instead the iauPnm00b function. - -Called: - Pn00a bias/precession/nutation, IAU 2000A - -Reference: - - : Trans. International Astronomical Union, Vol. XXIVB; Proc. - 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6. - (2000) -*/ -func Pnm00a(date1, date2 float64, rbpn *[3][3]float64) { - var dpsi, deps, epsa float64 - var rb, rp, rbp, rn [3][3]float64 - - /* Obtain the required matrix (discarding other results). */ - Pn00a(date1, date2, &dpsi, &deps, &epsa, &rb, &rp, &rbp, &rn, rbpn) -} - -/* -Pnm00b Classical NPB matrix, IAU 2000B - -Form the matrix of precession-nutation for a given date (including -frame bias), equinox-based, IAU 2000B model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rbpn [3][3]float64 bias-precession-nutation matrix (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix operates in the sense V(date) = rbpn * V(GCRS), where - the p-vector V(date) is with respect to the true equatorial triad - of date date1+date2 and the p-vector V(GCRS) is with respect to - the Geocentric Celestial Reference System (IAU, 2000). - - 3) The present function is faster, but slightly less accurate (about - 1 mas), than the iauPnm00a function. - -Called: - Pn00b bias/precession/nutation, IAU 2000B - -Reference: - - : Trans. International Astronomical Union, Vol. XXIVB; Proc. - 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6. - (2000) -*/ -func Pnm00b(date1, date2 float64, rbpn *[3][3]float64) { - var dpsi, deps, epsa float64 - var rb, rp, rbp, rn [3][3]float64 - - /* Obtain the required matrix (discarding other results). */ - Pn00b(date1, date2, &dpsi, &deps, &epsa, &rb, &rp, &rbp, &rn, rbpn) -} - -/* -Pnm06a Classical NPB matrix, IAU 2006/2000A - -Form the matrix of precession-nutation for a given date (including -frame bias), equinox based, IAU 2006 precession and IAU 2000A -nutation models. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rbpn [3][3]float64 bias-precession-nutation matrix (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, among - others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix operates in the sense V(date) = rbpn * V(GCRS), where - the p-vector V(date) is with respect to the true equatorial triad - of date date1+date2 and the p-vector V(GCRS) is with respect to - the Geocentric Celestial Reference System (IAU, 2000). - -Called: - Pfw06 bias-precession F-W angles, IAU 2006 - Nut06a nutation, IAU 2006/2000A - Fw2m F-W angles to r-matrix - -Reference: - - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855. -*/ -func Pnm06a(date1, date2 float64, rbpn *[3][3]float64) { - var gamb, phib, psib, epsa, dp, de float64 - - /* Fukushima-Williams angles for frame bias and precession. */ - Pfw06(date1, date2, &gamb, &phib, &psib, &epsa) - - /* Nutation components. */ - Nut06a(date1, date2, &dp, &de) - - /* Equinox based nutation x precession x bias matrix. */ - Fw2m(gamb, phib, psib+dp, epsa+de, rbpn) -} - -/* -Pnm80 Precession/nutation matrix, IAU 1976/1980 - -Form the matrix of precession/nutation for a given date, IAU 1976 -precession model, IAU 1980 nutation model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - rmatpn [3][3]float64 combined precession/nutation matrix - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The matrix operates in the sense V(date) = rmatpn * V(J2000), - where the p-vector V(date) is with respect to the true equatorial - triad of date date1+date2 and the p-vector V(J2000) is with - respect to the mean equatorial triad of epoch J2000.0. - -Called: - Pmat76 precession matrix, IAU 1976 - Nutm80 nutation matrix, IAU 1980 - Rxr product of two r-matrices - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992), - Section 3.3 (p145). -*/ -func Pnm80(date1, date2 float64, rmatpn *[3][3]float64) { - var rmatp, rmatn [3][3]float64 - - /* Precession matrix, J2000.0 to date. */ - Pmat76(date1, date2, &rmatp) - - /* Nutation matrix. */ - Nutm80(date1, date2, &rmatn) - - /* Combine the matrices: PN = N x P. */ - Rxr(rmatn, rmatp, rmatpn) -} - -/* -P06e Precession angles, IAU 2006, equinox based - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned (see Note 2): - eps0 float64 epsilon_0 - psia float64 psi_A - oma float64 omega_A - bpa float64 P_A - bqa float64 Q_A - pia float64 pi_A - bpia float64 Pi_A - epsa float64 obliquity epsilon_A - chia float64 chi_A - za float64 z_A - zetaa float64 zeta_A - thetaa float64 theta_A - pa float64 p_A - gam float64 F-W angle gamma_J2000 - phi float64 F-W angle phi_J2000 - psi float64 F-W angle psi_J2000 - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) This function returns the set of equinox based angles for the - Capitaine et al. "P03" precession theory, adopted by the IAU in - 2006. The angles are set out in Table 1 of Hilton et al. (2006): - - eps0 epsilon_0 obliquity at J2000.0 - psia psi_A luni-solar precession - oma omega_A inclination of equator wrt J2000.0 ecliptic - bpa P_A ecliptic pole x, J2000.0 ecliptic triad - bqa Q_A ecliptic pole -y, J2000.0 ecliptic triad - pia pi_A angle between moving and J2000.0 ecliptics - bpia Pi_A longitude of ascending node of the ecliptic - epsa epsilon_A obliquity of the ecliptic - chia chi_A planetary precession - za z_A equatorial precession: -3rd 323 Euler angle - zetaa zeta_A equatorial precession: -1st 323 Euler angle - thetaa theta_A equatorial precession: 2nd 323 Euler angle - pa p_A general precession (n.b. see below) - gam gamma_J2000 J2000.0 RA difference of ecliptic poles - phi phi_J2000 J2000.0 codeclination of ecliptic pole - psi psi_J2000 longitude difference of equator poles, J2000.0 - - The returned values are all radians. - - Note that the t^5 coefficient in the series for p_A from - Capitaine et al. (2003) is incorrectly signed in Hilton et al. - (2006). - - 3) Hilton et al. (2006) Table 1 also contains angles that depend on - models distinct from the P03 precession theory itself, namely the - 2000A frame bias and nutation. The quoted polynomials are - used in other SOFA functions: - - . iauXy06 contains the polynomial parts of the X and Y series. - - . iauS06 contains the polynomial part of the s+XY/2 series. - - . iauPfw06 implements the series for the Fukushima-Williams - angles that are with respect to the GCRS pole (i.e. the variants - that include frame bias). - - 4) The IAU resolution stipulated that the choice of parameterization - was left to the user, and so an IAU compliant precession - implementation can be constructed using various combinations of - the angles returned by the present function. - - 5) The parameterization used by SOFA is the version of the Fukushima- - Williams angles that refers directly to the GCRS pole. These - angles may be calculated by calling the function iauPfw06. SOFA - also supports the direct computation of the CIP GCRS X,Y by - series, available by calling iauXy06. - - 6) The agreement between the different parameterizations is at the - 1 microarcsecond level in the present era. - - 7) When constructing a precession formulation that refers to the GCRS - pole rather than the dynamical pole, it may (depending on the - choice of angles) be necessary to introduce the frame bias - explicitly. - - 8) It is permissible to re-use the same variable in the returned - arguments. The quantities are stored in the stated order. - -References: - - Capitaine, N., Wallace, P.T. & Chapront, J., 2003, - Astron.Astrophys., 412, 567 - - Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351 - -Called: - Obl06 mean obliquity, IAU 2006 -*/ -func P06e(date1, date2 float64, eps0, psia, oma, bpa *float64, bqa, pia, bpia *float64, epsa, chia, za, zetaa *float64, - thetaa, pa *float64, gam, phi, psi *float64) { - var t float64 - - /* Interval between fundamental date J2000.0 and given date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* Obliquity at J2000.0. */ - - *eps0 = 84381.406 * DAS2R - - /* Luni-solar precession. */ - - *psia = (5038.481507 + - (-1.0790069+ - (-0.00114045+ - (0.000132851+ - (-0.0000000951)* - t)*t)*t)*t) * t * DAS2R - - /* Inclination of mean equator with respect to the J2000.0 ecliptic. */ - - *oma = *eps0 + (-0.025754+ - (0.0512623+ - (-0.00772503+ - (-0.000000467+ - (0.0000003337)* - t)*t)*t)*t)*t*DAS2R - - /* Ecliptic pole x, J2000.0 ecliptic triad. */ - - *bpa = (4.199094 + - (0.1939873+ - (-0.00022466+ - (-0.000000912+ - (0.0000000120)* - t)*t)*t)*t) * t * DAS2R - - /* Ecliptic pole -y, J2000.0 ecliptic triad. */ - - *bqa = (-46.811015 + - (0.0510283+ - (0.00052413+ - (-0.000000646+ - (-0.0000000172)* - t)*t)*t)*t) * t * DAS2R - - /* Angle between moving and J2000.0 ecliptics. */ - - *pia = (46.998973 + - (-0.0334926+ - (-0.00012559+ - (0.000000113+ - (-0.0000000022)* - t)*t)*t)*t) * t * DAS2R - - /* Longitude of ascending node of the moving ecliptic. */ - - *bpia = (629546.7936 + - (-867.95758+ - (0.157992+ - (-0.0005371+ - (-0.00004797+ - (0.000000072)* - t)*t)*t)*t)*t) * DAS2R - - /* Mean obliquity of the ecliptic. */ - - *epsa = Obl06(date1, date2) - - /* Planetary precession. */ - - *chia = (10.556403 + - (-2.3814292+ - (-0.00121197+ - (0.000170663+ - (-0.0000000560)* - t)*t)*t)*t) * t * DAS2R - - /* Equatorial precession: minus the third of the 323 Euler angles. */ - - *za = (-2.650545 + - (2306.077181+ - (1.0927348+ - (0.01826837+ - (-0.000028596+ - (-0.0000002904)* - t)*t)*t)*t)*t) * DAS2R - - /* Equatorial precession: minus the first of the 323 Euler angles. */ - - *zetaa = (2.650545 + - (2306.083227+ - (0.2988499+ - (0.01801828+ - (-0.000005971+ - (-0.0000003173)* - t)*t)*t)*t)*t) * DAS2R - - /* Equatorial precession: second of the 323 Euler angles. */ - - *thetaa = (2004.191903 + - (-0.4294934+ - (-0.04182264+ - (-0.000007089+ - (-0.0000001274)* - t)*t)*t)*t) * t * DAS2R - - /* General precession. */ - - *pa = (5028.796195 + - (1.1054348+ - (0.00007964+ - (-0.000023857+ - (-0.0000000383)* - t)*t)*t)*t) * t * DAS2R - - /* Fukushima-Williams angles for precession. */ - - *gam = (10.556403 + - (0.4932044+ - (-0.00031238+ - (-0.000002788+ - (0.0000000260)* - t)*t)*t)*t) * t * DAS2R - - *phi = *eps0 + (-46.811015+ - (0.0511269+ - (0.00053289+ - (-0.000000440+ - (-0.0000000176)* - t)*t)*t)*t)*t*DAS2R - - *psi = (5038.481507 + - (1.5584176+ - (-0.00018522+ - (-0.000026452+ - (-0.0000000148)* - t)*t)*t)*t) * t * DAS2R -} - -/* -Pom00 Polar-motion matrix, IAU 2000 - -Form the matrix of polar motion for a given date, IAU 2000. - -Given: - xp,yp float64 coordinates of the pole (radians, Note 1) - sp float64 the TIO locator s' (radians, Note 2) - -Returned: - rpom [3][3]float64 polar-motion matrix (Note 3) - -Notes: - - 1) The arguments xp and yp are the coordinates (in radians) of the - Celestial Intermediate Pole with respect to the International - Terrestrial Reference System (see IERS Conventions 2003), - measured along the meridians 0 and 90 deg west respectively. - - 2) The argument sp is the TIO locator s', in radians, which - positions the Terrestrial Intermediate Origin on the equator. It - is obtained from polar motion observations by numerical - integration, and so is in essence unpredictable. However, it is - dominated by a secular drift of about 47 microarcseconds per - century, and so can be taken into account by using s' = -47*t, - where t is centuries since J2000.0. The function iauSp00 - implements this approximation. - - 3) The matrix operates in the sense V(TRS) = rpom * V(CIP), meaning - that it is the final rotation when computing the pointing - direction to a celestial source. - -Called: - Ir initialize r-matrix to identity - Rz rotate around Z-axis - Ry rotate around Y-axis - Rx rotate around X-axis - -Reference: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func Pom00(xp, yp, sp float64, rpom *[3][3]float64) { - /* Construct the matrix. */ - Ir(rpom) - Rz(sp, rpom) - Ry(-xp, rpom) - Rx(-yp, rpom) -} - -/* -Pr00 Adjustments to IAU 1976 precession, IAU 2000 - -Precession-rate part of the IAU 2000 precession-nutation models -(part of MHB2000). - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - dpsipr,depspr float64 precession corrections (Notes 2,3) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The precession adjustments are expressed as "nutation - components", corrections in longitude and obliquity with respect - to the J2000.0 equinox and ecliptic. - - 3) Although the precession adjustments are stated to be with respect - to Lieske et al. (1977), the MHB2000 model does not specify which - set of Euler angles are to be used and how the adjustments are to - be applied. The most literal and straightforward procedure is to - adopt the 4-rotation epsilon_0, psi_A, omega_A, xi_A option, and - to add dpsipr to psi_A and depspr to both omega_A and eps_A. - - 4) This is an implementation of one aspect of the IAU 2000A nutation - model, formally adopted by the IAU General Assembly in 2000, - namely MHB2000 (Mathews et al. 2002). - -References: - - Lieske, J.H., Lederle, T., Fricke, W. & Morando, B., "Expressions - for the precession quantities based upon the IAU (1976) System of - Astronomical Constants", Astron.Astrophys., 58, 1-16 (1977) - - Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation - and precession New nutation series for nonrigid Earth and - insights into the Earth's interior", J.Geophys.Res., 107, B4, - 2002. The MHB2000 code itself was obtained on 9th September 2002 - from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A. - - Wallace, P.T., "Software for Implementing the IAU 2000 - Resolutions", in IERS Workshop 5.1 (2002). -*/ -func Pr00(date1, date2 float64, dpsipr, depspr *float64) { - var t float64 - - /* Precession and obliquity corrections (radians per century) */ - const PRECOR = -0.29965 * DAS2R - const OBLCOR = -0.02524 * DAS2R - - /* Interval between fundamental epoch J2000.0 and given date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* Precession rate contributions with respect to IAU 1976/80. */ - *dpsipr = PRECOR * t - *depspr = OBLCOR * t -} - -/* -Prec76 Precession, IAU 1976 - -IAU 1976 precession model. - -This function forms the three Euler angles which implement general -precession between two dates, using the IAU 1976 model (as for the -FK5 catalog). - -Given: - date01,date02 float64 TDB starting date (Note 1) - date11,date12 float64 TDB ending date (Note 1) - -Returned: - zeta float64 1st rotation: radians cw around z - z float64 3rd rotation: radians cw around z - theta float64 2nd rotation: radians ccw around y - -Notes: - - 1) The dates date01+date02 and date11+date12 are Julian Dates, - apportioned in any convenient way between the arguments daten1 - and daten2. For example, JD(TDB)=2450123.7 could be expressed in - any of these ways, among others: - - daten1 daten2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in cases - where the loss of several decimal digits of resolution is - acceptable. The J2000 method is best matched to the way the - argument is handled internally and will deliver the optimum - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - The two dates may be expressed using different methods, but at - the risk of losing some resolution. - - 2) The accumulated precession angles zeta, z, theta are expressed - through canonical polynomials which are valid only for a limited - time span. In addition, the IAU 1976 precession rate is known to - be imperfect. The absolute accuracy of the present formulation - is better than 0.1 arcsec from 1960AD to 2040AD, better than - 1 arcsec from 1640AD to 2360AD, and remains below 3 arcsec for - the whole of the period 500BC to 3000AD. The errors exceed - 10 arcsec outside the range 1200BC to 3900AD, exceed 100 arcsec - outside 4200BC to 5600AD and exceed 1000 arcsec outside 6800BC to - 8200AD. - - 3) The three angles are returned in the conventional order, which - is not the same as the order of the corresponding Euler - rotations. The precession matrix is - R_3(-z) x R_2(+theta) x R_3(-zeta). - -Reference: - - Lieske, J.H., 1979, Astron.Astrophys. 73, 282, equations - (6) & (7), p283. -*/ -func Prec76(date01, date02 float64, date11, date12 float64, zeta, z, theta *float64) { - var t0, t, tas2r, w float64 - - /* Interval between fundamental epoch J2000.0 and start date (JC). */ - t0 = ((date01 - DJ00) + date02) / DJC - - /* Interval over which precession required (JC). */ - t = ((date11 - date01) + (date12 - date02)) / DJC - - /* Euler angles. */ - tas2r = t * DAS2R - w = 2306.2181 + (1.39656-0.000139*t0)*t0 - - *zeta = (w + ((0.30188-0.000344*t0)+0.017998*t)*t) * tas2r - - *z = (w + ((1.09468+0.000066*t0)+0.018203*t)*t) * tas2r - - *theta = ((2004.3109 + (-0.85330-0.000217*t0)*t0) + ((-0.42665-0.000217*t0)-0.041833*t)*t) * tas2r -} - -/* -S00 The CIO locator s, given X,Y, IAU 2000 - -The CIO locator s, positioning the Celestial Intermediate Origin on -the equator of the Celestial Intermediate Pole, given the CIP's X,Y -coordinates. Compatible with IAU 2000A precession-nutation. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - x,y float64 CIP coordinates (Note 3) - -Returned (function value): - float64 the CIO locator s in radians (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The CIO locator s is the difference between the right ascensions - of the same point in two systems: the two systems are the GCRS - and the CIP,CIO, and the point is the ascending node of the - CIP equator. The quantity s remains below 0.1 arcsecond - throughout 1900-2100. - - 3) The series used to compute s is in fact for s+XY/2, where X and Y - are the x and y components of the CIP unit vector; this series - is more compact than a direct series for s would be. This - function requires X,Y to be supplied by the caller, who is - responsible for providing values that are consistent with the - supplied date. - - 4) The model is consistent with the IAU 2000A precession-nutation. - -Called: - Fal03 mean anomaly of the Moon - Falp03 mean anomaly of the Sun - Faf03 mean argument of the latitude of the Moon - Fad03 mean elongation of the Moon from the Sun - Faom03 mean longitude of the Moon's ascending node - Fave03 mean longitude of Venus - Fae03 mean longitude of Earth - Fapa03 general accumulated precession in longitude - -References: - - Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., - "Expressions for the Celestial Intermediate Pole and Celestial - Ephemeris Origin consistent with the IAU 2000A precession- - nutation model", Astron.Astrophys. 400, 1145-1154 (2003) - - n.b. The celestial ephemeris origin (CEO) was renamed "celestial - intermediate origin" (CIO) by IAU 2006 Resolution 2. - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func S00(date1, date2 float64, x, y float64) float64 { - /* Time since J2000.0, in Julian centuries */ - var t float64 - - /* Miscellaneous */ - var i, j int - var a, w0, w1, w2, w3, w4, w5 float64 - - /* Fundamental arguments */ - var fa [8]float64 - - /* Returned value */ - var s float64 - - /* --------------------- */ - /* The series for s+XY/2 */ - /* --------------------- */ - - type TERM struct { - nfa [8]int /* coefficients of l,l',F,D,Om,LVe,LE,pA */ - s, c float64 /* sine and cosine coefficients */ - } - - /* Polynomial coefficients */ - sp := []float64{ - - /* 1-6 */ - 94.00e-6, - 3808.35e-6, - -119.94e-6, - -72574.09e-6, - 27.70e-6, - 15.61e-6, - } - - /* Terms of order t^0 */ - s0 := []TERM{ - - /* 1-10 */ - {[8]int{0, 0, 0, 0, 1, 0, 0, 0}, -2640.73e-6, 0.39e-6}, - {[8]int{0, 0, 0, 0, 2, 0, 0, 0}, -63.53e-6, 0.02e-6}, - {[8]int{0, 0, 2, -2, 3, 0, 0, 0}, -11.75e-6, -0.01e-6}, - {[8]int{0, 0, 2, -2, 1, 0, 0, 0}, -11.21e-6, -0.01e-6}, - {[8]int{0, 0, 2, -2, 2, 0, 0, 0}, 4.57e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 3, 0, 0, 0}, -2.02e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 1, 0, 0, 0}, -1.98e-6, 0.00e-6}, - {[8]int{0, 0, 0, 0, 3, 0, 0, 0}, 1.72e-6, 0.00e-6}, - {[8]int{0, 1, 0, 0, 1, 0, 0, 0}, 1.41e-6, 0.01e-6}, - {[8]int{0, 1, 0, 0, -1, 0, 0, 0}, 1.26e-6, 0.01e-6}, - - /* 11-20 */ - {[8]int{1, 0, 0, 0, -1, 0, 0, 0}, 0.63e-6, 0.00e-6}, - {[8]int{1, 0, 0, 0, 1, 0, 0, 0}, 0.63e-6, 0.00e-6}, - {[8]int{0, 1, 2, -2, 3, 0, 0, 0}, -0.46e-6, 0.00e-6}, - {[8]int{0, 1, 2, -2, 1, 0, 0, 0}, -0.45e-6, 0.00e-6}, - {[8]int{0, 0, 4, -4, 4, 0, 0, 0}, -0.36e-6, 0.00e-6}, - {[8]int{0, 0, 1, -1, 1, -8, 12, 0}, 0.24e-6, 0.12e-6}, - {[8]int{0, 0, 2, 0, 0, 0, 0, 0}, -0.32e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 2, 0, 0, 0}, -0.28e-6, 0.00e-6}, - {[8]int{1, 0, 2, 0, 3, 0, 0, 0}, -0.27e-6, 0.00e-6}, - {[8]int{1, 0, 2, 0, 1, 0, 0, 0}, -0.26e-6, 0.00e-6}, - - /* 21-30 */ - {[8]int{0, 0, 2, -2, 0, 0, 0, 0}, 0.21e-6, 0.00e-6}, - {[8]int{0, 1, -2, 2, -3, 0, 0, 0}, -0.19e-6, 0.00e-6}, - {[8]int{0, 1, -2, 2, -1, 0, 0, 0}, -0.18e-6, 0.00e-6}, - {[8]int{0, 0, 0, 0, 0, 8, -13, -1}, 0.10e-6, -0.05e-6}, - {[8]int{0, 0, 0, 2, 0, 0, 0, 0}, -0.15e-6, 0.00e-6}, - {[8]int{2, 0, -2, 0, -1, 0, 0, 0}, 0.14e-6, 0.00e-6}, - {[8]int{0, 1, 2, -2, 2, 0, 0, 0}, 0.14e-6, 0.00e-6}, - {[8]int{1, 0, 0, -2, 1, 0, 0, 0}, -0.14e-6, 0.00e-6}, - {[8]int{1, 0, 0, -2, -1, 0, 0, 0}, -0.14e-6, 0.00e-6}, - {[8]int{0, 0, 4, -2, 4, 0, 0, 0}, -0.13e-6, 0.00e-6}, - - /* 31-33 */ - {[8]int{0, 0, 2, -2, 4, 0, 0, 0}, 0.11e-6, 0.00e-6}, - {[8]int{1, 0, -2, 0, -3, 0, 0, 0}, -0.11e-6, 0.00e-6}, - {[8]int{1, 0, -2, 0, -1, 0, 0, 0}, -0.11e-6, 0.00e-6}, - } - - /* Terms of order t^1 */ - s1 := []TERM{ - - /* 1-3 */ - {[8]int{0, 0, 0, 0, 2, 0, 0, 0}, -0.07e-6, 3.57e-6}, - {[8]int{0, 0, 0, 0, 1, 0, 0, 0}, 1.71e-6, -0.03e-6}, - {[8]int{0, 0, 2, -2, 3, 0, 0, 0}, 0.00e-6, 0.48e-6}, - } - - /* Terms of order t^2 */ - s2 := []TERM{ - - /* 1-10 */ - {[8]int{0, 0, 0, 0, 1, 0, 0, 0}, 743.53e-6, -0.17e-6}, - {[8]int{0, 0, 2, -2, 2, 0, 0, 0}, 56.91e-6, 0.06e-6}, - {[8]int{0, 0, 2, 0, 2, 0, 0, 0}, 9.84e-6, -0.01e-6}, - {[8]int{0, 0, 0, 0, 2, 0, 0, 0}, -8.85e-6, 0.01e-6}, - {[8]int{0, 1, 0, 0, 0, 0, 0, 0}, -6.38e-6, -0.05e-6}, - {[8]int{1, 0, 0, 0, 0, 0, 0, 0}, -3.07e-6, 0.00e-6}, - {[8]int{0, 1, 2, -2, 2, 0, 0, 0}, 2.23e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 1, 0, 0, 0}, 1.67e-6, 0.00e-6}, - {[8]int{1, 0, 2, 0, 2, 0, 0, 0}, 1.30e-6, 0.00e-6}, - {[8]int{0, 1, -2, 2, -2, 0, 0, 0}, 0.93e-6, 0.00e-6}, - - /* 11-20 */ - {[8]int{1, 0, 0, -2, 0, 0, 0, 0}, 0.68e-6, 0.00e-6}, - {[8]int{0, 0, 2, -2, 1, 0, 0, 0}, -0.55e-6, 0.00e-6}, - {[8]int{1, 0, -2, 0, -2, 0, 0, 0}, 0.53e-6, 0.00e-6}, - {[8]int{0, 0, 0, 2, 0, 0, 0, 0}, -0.27e-6, 0.00e-6}, - {[8]int{1, 0, 0, 0, 1, 0, 0, 0}, -0.27e-6, 0.00e-6}, - {[8]int{1, 0, -2, -2, -2, 0, 0, 0}, -0.26e-6, 0.00e-6}, - {[8]int{1, 0, 0, 0, -1, 0, 0, 0}, -0.25e-6, 0.00e-6}, - {[8]int{1, 0, 2, 0, 1, 0, 0, 0}, 0.22e-6, 0.00e-6}, - {[8]int{2, 0, 0, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6}, - {[8]int{2, 0, -2, 0, -1, 0, 0, 0}, 0.20e-6, 0.00e-6}, - - /* 21-25 */ - {[8]int{0, 0, 2, 2, 2, 0, 0, 0}, 0.17e-6, 0.00e-6}, - {[8]int{2, 0, 2, 0, 2, 0, 0, 0}, 0.13e-6, 0.00e-6}, - {[8]int{2, 0, 0, 0, 0, 0, 0, 0}, -0.13e-6, 0.00e-6}, - {[8]int{1, 0, 2, -2, 2, 0, 0, 0}, -0.12e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 0, 0, 0, 0}, -0.11e-6, 0.00e-6}, - } - - /* Terms of order t^3 */ - s3 := []TERM{ - - /* 1-4 */ - {[8]int{0, 0, 0, 0, 1, 0, 0, 0}, 0.30e-6, -23.51e-6}, - {[8]int{0, 0, 2, -2, 2, 0, 0, 0}, -0.03e-6, -1.39e-6}, - {[8]int{0, 0, 2, 0, 2, 0, 0, 0}, -0.01e-6, -0.24e-6}, - {[8]int{0, 0, 0, 0, 2, 0, 0, 0}, 0.00e-6, 0.22e-6}, - } - - /* Terms of order t^4 */ - s4 := []TERM{ - - /* 1-1 */ - {[8]int{0, 0, 0, 0, 1, 0, 0, 0}, -0.26e-6, -0.01e-6}, - } - - /* Number of terms in the series */ - NS0 := len(s0) - NS1 := len(s1) - NS2 := len(s2) - NS3 := len(s3) - NS4 := len(s4) - - /* ------------------------------------------------------------------ */ - - /* Interval between fundamental epoch J2000.0 and current date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* Fundamental Arguments (from IERS Conventions 2003) */ - - /* Mean anomaly of the Moon. */ - fa[0] = Fal03(t) - - /* Mean anomaly of the Sun. */ - fa[1] = Falp03(t) - - /* Mean longitude of the Moon minus that of the ascending node. */ - fa[2] = Faf03(t) - - /* Mean elongation of the Moon from the Sun. */ - fa[3] = Fad03(t) - - /* Mean longitude of the ascending node of the Moon. */ - fa[4] = Faom03(t) - - /* Mean longitude of Venus. */ - fa[5] = Fave03(t) - - /* Mean longitude of Earth. */ - fa[6] = Fae03(t) - - /* General precession in longitude. */ - fa[7] = Fapa03(t) - - /* Evaluate s. */ - w0 = sp[0] - w1 = sp[1] - w2 = sp[2] - w3 = sp[3] - w4 = sp[4] - w5 = sp[5] - - for i = NS0 - 1; i >= 0; i-- { - a = 0.0 - for j = 0; j < 8; j++ { - a += float64(s0[i].nfa[j]) * fa[j] - } - w0 += s0[i].s*sin(a) + s0[i].c*cos(a) - } - - for i = NS1 - 1; i >= 0; i-- { - a = 0.0 - for j = 0; j < 8; j++ { - a += float64(s1[i].nfa[j]) * fa[j] - } - w1 += s1[i].s*sin(a) + s1[i].c*cos(a) - } - - for i = NS2 - 1; i >= 0; i-- { - a = 0.0 - for j = 0; j < 8; j++ { - a += float64(s2[i].nfa[j]) * fa[j] - } - w2 += s2[i].s*sin(a) + s2[i].c*cos(a) - } - - for i = NS3 - 1; i >= 0; i-- { - a = 0.0 - for j = 0; j < 8; j++ { - a += float64(s3[i].nfa[j]) * fa[j] - } - w3 += s3[i].s*sin(a) + s3[i].c*cos(a) - } - - for i = NS4 - 1; i >= 0; i-- { - a = 0.0 - for j = 0; j < 8; j++ { - a += float64(s4[i].nfa[j]) * fa[j] - } - w4 += s4[i].s*sin(a) + s4[i].c*cos(a) - } - - s = (w0+ - (w1+ - (w2+ - (w3+ - (w4+ - w5*t)*t)*t)*t)*t)*DAS2R - x*y/2.0 - - return s -} - -/* -S00a The CIO locator s, IAU 2000A - -The CIO locator s, positioning the Celestial Intermediate Origin on -the equator of the Celestial Intermediate Pole, using the IAU 2000A -precession-nutation model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned (function value): - float64 the CIO locator s in radians (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The CIO locator s is the difference between the right ascensions - of the same point in two systems. The two systems are the GCRS - and the CIP,CIO, and the point is the ascending node of the - CIP equator. The CIO locator s remains a small fraction of - 1 arcsecond throughout 1900-2100. - - 3) The series used to compute s is in fact for s+XY/2, where X and Y - are the x and y components of the CIP unit vector; this series - is more compact than a direct series for s would be. The present - function uses the full IAU 2000A nutation model when predicting - the CIP position. Faster results, with no significant loss of - accuracy, can be obtained via the function iauS00b, which uses - instead the IAU 2000B truncated model. - -Called: - Pnm00a classical NPB matrix, IAU 2000A - Bnp2xy extract CIP X,Y from the BPN matrix - S00 the CIO locator s, given X,Y, IAU 2000A - -References: - - Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., - "Expressions for the Celestial Intermediate Pole and Celestial - Ephemeris Origin consistent with the IAU 2000A precession- - nutation model", Astron.Astrophys. 400, 1145-1154 (2003) - - n.b. The celestial ephemeris origin (CEO) was renamed "celestial - intermediate origin" (CIO) by IAU 2006 Resolution 2. - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func S00a(date1, date2 float64) float64 { - var rbpn [3][3]float64 - var x, y, s float64 - - /* Bias-precession-nutation-matrix, IAU 2000A. */ - Pnm00a(date1, date2, &rbpn) - - /* Extract the CIP coordinates. */ - Bpn2xy(rbpn, &x, &y) - - /* Compute the CIO locator s, given the CIP coordinates. */ - s = S00(date1, date2, x, y) - - return s -} - -/* -S00b The CIO locator s, IAU 2000B - -The CIO locator s, positioning the Celestial Intermediate Origin on -the equator of the Celestial Intermediate Pole, using the IAU 2000B -precession-nutation model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned (function value): - float64 the CIO locator s in radians (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The CIO locator s is the difference between the right ascensions - of the same point in two systems. The two systems are the GCRS - and the CIP,CIO, and the point is the ascending node of the - CIP equator. The CIO locator s remains a small fraction of - 1 arcsecond throughout 1900-2100. - - 3) The series used to compute s is in fact for s+XY/2, where X and Y - are the x and y components of the CIP unit vector; this series - is more compact than a direct series for s would be. The present - function uses the IAU 2000B truncated nutation model when - predicting the CIP position. The function iauS00a uses instead - the full IAU 2000A model, but with no significant increase in - accuracy and at some cost in speed. - -Called: - Pnm00b classical NPB matrix, IAU 2000B - Bnp2xy extract CIP X,Y from the BPN matrix - S00 the CIO locator s, given X,Y, IAU 2000A - -References: - - Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., - "Expressions for the Celestial Intermediate Pole and Celestial - Ephemeris Origin consistent with the IAU 2000A precession- - nutation model", Astron.Astrophys. 400, 1145-1154 (2003) - - n.b. The celestial ephemeris origin (CEO) was renamed "celestial - intermediate origin" (CIO) by IAU 2006 Resolution 2. - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func S00b(date1, date2 float64) float64 { - var rbpn [3][3]float64 - var x, y, s float64 - - /* Bias-precession-nutation-matrix, IAU 2000B. */ - Pnm00b(date1, date2, &rbpn) - - /* Extract the CIP coordinates. */ - Bpn2xy(rbpn, &x, &y) - - /* Compute the CIO locator s, given the CIP coordinates. */ - s = S00(date1, date2, x, y) - - return s -} - -/* -S06 The CIO locator s, given X,Y, IAU 2006 - -The CIO locator s, positioning the Celestial Intermediate Origin on -the equator of the Celestial Intermediate Pole, given the CIP's X,Y -coordinates. Compatible with IAU 2006/2000A precession-nutation. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - x,y float64 CIP coordinates (Note 3) - -Returned (function value): - float64 the CIO locator s in radians (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The CIO locator s is the difference between the right ascensions - of the same point in two systems: the two systems are the GCRS - and the CIP,CIO, and the point is the ascending node of the - CIP equator. The quantity s remains below 0.1 arcsecond - throughout 1900-2100. - - 3) The series used to compute s is in fact for s+XY/2, where X and Y - are the x and y components of the CIP unit vector; this series - is more compact than a direct series for s would be. This - function requires X,Y to be supplied by the caller, who is - responsible for providing values that are consistent with the - supplied date. - - 4) The model is consistent with the "P03" precession (Capitaine et - al. 2003), adopted by IAU 2006 Resolution 1, 2006, and the - 2000A nutation (with P03 adjustments). - -Called: - Fal03 mean anomaly of the Moon - Falp03 mean anomaly of the Sun - Faf03 mean argument of the latitude of the Moon - Fad03 mean elongation of the Moon from the Sun - Faom03 mean longitude of the Moon's ascending node - Fave03 mean longitude of Venus - Fae03 mean longitude of Earth - Fapa03 general accumulated precession in longitude - -References: - - Capitaine, N., Wallace, P.T. & Chapront, J., 2003, Astron. - Astrophys. 432, 355 - - McCarthy, D.D., Petit, G. (eds.) 2004, IERS Conventions (2003), - IERS Technical Note No. 32, BKG -*/ -func S06(date1, date2 float64, x, y float64) float64 { - /* Time since J2000.0, in Julian centuries */ - var t float64 - - /* Miscellaneous */ - var i, j int - var a, w0, w1, w2, w3, w4, w5 float64 - - /* Fundamental arguments */ - var fa [8]float64 - - /* Returned value */ - var s float64 - - /* --------------------- */ - /* The series for s+XY/2 */ - /* --------------------- */ - - type TERM struct { - nfa [8]int /* coefficients of l,l',F,D,Om,LVe,LE,pA */ - s, c float64 /* sine and cosine coefficients */ - } - - /* Polynomial coefficients */ - sp := []float64{ - - /* 1-6 */ - 94.00e-6, - 3808.65e-6, - -122.68e-6, - -72574.11e-6, - 27.98e-6, - 15.62e-6, - } - - /* Terms of order t^0 */ - s0 := []TERM{ - - /* 1-10 */ - {[8]int{0, 0, 0, 0, 1, 0, 0, 0}, -2640.73e-6, 0.39e-6}, - {[8]int{0, 0, 0, 0, 2, 0, 0, 0}, -63.53e-6, 0.02e-6}, - {[8]int{0, 0, 2, -2, 3, 0, 0, 0}, -11.75e-6, -0.01e-6}, - {[8]int{0, 0, 2, -2, 1, 0, 0, 0}, -11.21e-6, -0.01e-6}, - {[8]int{0, 0, 2, -2, 2, 0, 0, 0}, 4.57e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 3, 0, 0, 0}, -2.02e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 1, 0, 0, 0}, -1.98e-6, 0.00e-6}, - {[8]int{0, 0, 0, 0, 3, 0, 0, 0}, 1.72e-6, 0.00e-6}, - {[8]int{0, 1, 0, 0, 1, 0, 0, 0}, 1.41e-6, 0.01e-6}, - {[8]int{0, 1, 0, 0, -1, 0, 0, 0}, 1.26e-6, 0.01e-6}, - - /* 11-20 */ - {[8]int{1, 0, 0, 0, -1, 0, 0, 0}, 0.63e-6, 0.00e-6}, - {[8]int{1, 0, 0, 0, 1, 0, 0, 0}, 0.63e-6, 0.00e-6}, - {[8]int{0, 1, 2, -2, 3, 0, 0, 0}, -0.46e-6, 0.00e-6}, - {[8]int{0, 1, 2, -2, 1, 0, 0, 0}, -0.45e-6, 0.00e-6}, - {[8]int{0, 0, 4, -4, 4, 0, 0, 0}, -0.36e-6, 0.00e-6}, - {[8]int{0, 0, 1, -1, 1, -8, 12, 0}, 0.24e-6, 0.12e-6}, - {[8]int{0, 0, 2, 0, 0, 0, 0, 0}, -0.32e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 2, 0, 0, 0}, -0.28e-6, 0.00e-6}, - {[8]int{1, 0, 2, 0, 3, 0, 0, 0}, -0.27e-6, 0.00e-6}, - {[8]int{1, 0, 2, 0, 1, 0, 0, 0}, -0.26e-6, 0.00e-6}, - - /* 21-30 */ - {[8]int{0, 0, 2, -2, 0, 0, 0, 0}, 0.21e-6, 0.00e-6}, - {[8]int{0, 1, -2, 2, -3, 0, 0, 0}, -0.19e-6, 0.00e-6}, - {[8]int{0, 1, -2, 2, -1, 0, 0, 0}, -0.18e-6, 0.00e-6}, - {[8]int{0, 0, 0, 0, 0, 8, -13, -1}, 0.10e-6, -0.05e-6}, - {[8]int{0, 0, 0, 2, 0, 0, 0, 0}, -0.15e-6, 0.00e-6}, - {[8]int{2, 0, -2, 0, -1, 0, 0, 0}, 0.14e-6, 0.00e-6}, - {[8]int{0, 1, 2, -2, 2, 0, 0, 0}, 0.14e-6, 0.00e-6}, - {[8]int{1, 0, 0, -2, 1, 0, 0, 0}, -0.14e-6, 0.00e-6}, - {[8]int{1, 0, 0, -2, -1, 0, 0, 0}, -0.14e-6, 0.00e-6}, - {[8]int{0, 0, 4, -2, 4, 0, 0, 0}, -0.13e-6, 0.00e-6}, - - /* 31-33 */ - {[8]int{0, 0, 2, -2, 4, 0, 0, 0}, 0.11e-6, 0.00e-6}, - {[8]int{1, 0, -2, 0, -3, 0, 0, 0}, -0.11e-6, 0.00e-6}, - {[8]int{1, 0, -2, 0, -1, 0, 0, 0}, -0.11e-6, 0.00e-6}, - } - - /* Terms of order t^1 */ - s1 := []TERM{ - - /* 1 - 3 */ - {[8]int{0, 0, 0, 0, 2, 0, 0, 0}, -0.07e-6, 3.57e-6}, - {[8]int{0, 0, 0, 0, 1, 0, 0, 0}, 1.73e-6, -0.03e-6}, - {[8]int{0, 0, 2, -2, 3, 0, 0, 0}, 0.00e-6, 0.48e-6}, - } - - /* Terms of order t^2 */ - s2 := []TERM{ - - /* 1-10 */ - {[8]int{0, 0, 0, 0, 1, 0, 0, 0}, 743.52e-6, -0.17e-6}, - {[8]int{0, 0, 2, -2, 2, 0, 0, 0}, 56.91e-6, 0.06e-6}, - {[8]int{0, 0, 2, 0, 2, 0, 0, 0}, 9.84e-6, -0.01e-6}, - {[8]int{0, 0, 0, 0, 2, 0, 0, 0}, -8.85e-6, 0.01e-6}, - {[8]int{0, 1, 0, 0, 0, 0, 0, 0}, -6.38e-6, -0.05e-6}, - {[8]int{1, 0, 0, 0, 0, 0, 0, 0}, -3.07e-6, 0.00e-6}, - {[8]int{0, 1, 2, -2, 2, 0, 0, 0}, 2.23e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 1, 0, 0, 0}, 1.67e-6, 0.00e-6}, - {[8]int{1, 0, 2, 0, 2, 0, 0, 0}, 1.30e-6, 0.00e-6}, - {[8]int{0, 1, -2, 2, -2, 0, 0, 0}, 0.93e-6, 0.00e-6}, - - /* 11-20 */ - {[8]int{1, 0, 0, -2, 0, 0, 0, 0}, 0.68e-6, 0.00e-6}, - {[8]int{0, 0, 2, -2, 1, 0, 0, 0}, -0.55e-6, 0.00e-6}, - {[8]int{1, 0, -2, 0, -2, 0, 0, 0}, 0.53e-6, 0.00e-6}, - {[8]int{0, 0, 0, 2, 0, 0, 0, 0}, -0.27e-6, 0.00e-6}, - {[8]int{1, 0, 0, 0, 1, 0, 0, 0}, -0.27e-6, 0.00e-6}, - {[8]int{1, 0, -2, -2, -2, 0, 0, 0}, -0.26e-6, 0.00e-6}, - {[8]int{1, 0, 0, 0, -1, 0, 0, 0}, -0.25e-6, 0.00e-6}, - {[8]int{1, 0, 2, 0, 1, 0, 0, 0}, 0.22e-6, 0.00e-6}, - {[8]int{2, 0, 0, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6}, - {[8]int{2, 0, -2, 0, -1, 0, 0, 0}, 0.20e-6, 0.00e-6}, - - /* 21-25 */ - {[8]int{0, 0, 2, 2, 2, 0, 0, 0}, 0.17e-6, 0.00e-6}, - {[8]int{2, 0, 2, 0, 2, 0, 0, 0}, 0.13e-6, 0.00e-6}, - {[8]int{2, 0, 0, 0, 0, 0, 0, 0}, -0.13e-6, 0.00e-6}, - {[8]int{1, 0, 2, -2, 2, 0, 0, 0}, -0.12e-6, 0.00e-6}, - {[8]int{0, 0, 2, 0, 0, 0, 0, 0}, -0.11e-6, 0.00e-6}, - } - - /* Terms of order t^3 */ - s3 := []TERM{ - - /* 1-4 */ - {[8]int{0, 0, 0, 0, 1, 0, 0, 0}, 0.30e-6, -23.42e-6}, - {[8]int{0, 0, 2, -2, 2, 0, 0, 0}, -0.03e-6, -1.46e-6}, - {[8]int{0, 0, 2, 0, 2, 0, 0, 0}, -0.01e-6, -0.25e-6}, - {[8]int{0, 0, 0, 0, 2, 0, 0, 0}, 0.00e-6, 0.23e-6}, - } - - /* Terms of order t^4 */ - s4 := []TERM{ - - /* 1-1 */ - {[8]int{0, 0, 0, 0, 1, 0, 0, 0}, -0.26e-6, -0.01e-6}, - } - - /* Number of terms in the series */ - NS0 := len(s0) - NS1 := len(s1) - NS2 := len(s2) - NS3 := len(s3) - NS4 := len(s4) - - /* ------------------------------------------------------------------ */ - - /* Interval between fundamental epoch J2000.0 and current date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* Fundamental Arguments (from IERS Conventions 2003) */ - - /* Mean anomaly of the Moon. */ - fa[0] = Fal03(t) - - /* Mean anomaly of the Sun. */ - fa[1] = Falp03(t) - - /* Mean longitude of the Moon minus that of the ascending node. */ - fa[2] = Faf03(t) - - /* Mean elongation of the Moon from the Sun. */ - fa[3] = Fad03(t) - - /* Mean longitude of the ascending node of the Moon. */ - fa[4] = Faom03(t) - - /* Mean longitude of Venus. */ - fa[5] = Fave03(t) - - /* Mean longitude of Earth. */ - fa[6] = Fae03(t) - - /* General precession in longitude. */ - fa[7] = Fapa03(t) - - /* Evaluate s. */ - w0 = sp[0] - w1 = sp[1] - w2 = sp[2] - w3 = sp[3] - w4 = sp[4] - w5 = sp[5] - - for i = NS0 - 1; i >= 0; i-- { - a = 0.0 - for j = 0; j < 8; j++ { - a += float64(s0[i].nfa[j]) * fa[j] - } - w0 += s0[i].s*sin(a) + s0[i].c*cos(a) - } - - for i = NS1 - 1; i >= 0; i-- { - a = 0.0 - for j = 0; j < 8; j++ { - a += float64(s1[i].nfa[j]) * fa[j] - } - w1 += s1[i].s*sin(a) + s1[i].c*cos(a) - } - - for i = NS2 - 1; i >= 0; i-- { - a = 0.0 - for j = 0; j < 8; j++ { - a += float64(s2[i].nfa[j]) * fa[j] - } - w2 += s2[i].s*sin(a) + s2[i].c*cos(a) - } - - for i = NS3 - 1; i >= 0; i-- { - a = 0.0 - for j = 0; j < 8; j++ { - a += float64(s3[i].nfa[j]) * fa[j] - } - w3 += s3[i].s*sin(a) + s3[i].c*cos(a) - } - - for i = NS4 - 1; i >= 0; i-- { - a = 0.0 - for j = 0; j < 8; j++ { - a += float64(s4[i].nfa[j]) * fa[j] - } - w4 += s4[i].s*sin(a) + s4[i].c*cos(a) - } - - s = (w0+(w1+(w2+(w3+(w4+w5*t)*t)*t)*t)*t)*DAS2R - x*y/2.0 - - return s -} - -/* -S06a The CIO locator s, IAU 2006/2000A - -The CIO locator s, positioning the Celestial Intermediate Origin on -the equator of the Celestial Intermediate Pole, using the IAU 2006 -precession and IAU 2000A nutation models. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned (function value): - float64 the CIO locator s in radians (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The CIO locator s is the difference between the right ascensions - of the same point in two systems. The two systems are the GCRS - and the CIP,CIO, and the point is the ascending node of the - CIP equator. The CIO locator s remains a small fraction of - 1 arcsecond throughout 1900-2100. - - 3) The series used to compute s is in fact for s+XY/2, where X and Y - are the x and y components of the CIP unit vector; this series is - more compact than a direct series for s would be. The present - function uses the full IAU 2000A nutation model when predicting - the CIP position. - -Called: - Pnm06a classical NPB matrix, IAU 2006/2000A - Bpn2xy extract CIP X,Y coordinates from NPB matrix - S06 the CIO locator s, given X,Y, IAU 2006 - -References: - - Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., - "Expressions for the Celestial Intermediate Pole and Celestial - Ephemeris Origin consistent with the IAU 2000A precession- - nutation model", Astron.Astrophys. 400, 1145-1154 (2003) - - n.b. The celestial ephemeris origin (CEO) was renamed "celestial - intermediate origin" (CIO) by IAU 2006 Resolution 2. - - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 - - McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003), - IERS Technical Note No. 32, BKG - - Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 -*/ -func S06a(date1, date2 float64) float64 { - var rnpb [3][3]float64 - var x, y, s float64 - - /* Bias-precession-nutation-matrix, IAU 20006/2000A. */ - Pnm06a(date1, date2, &rnpb) - - /* Extract the CIP coordinates. */ - Bpn2xy(rnpb, &x, &y) - - /* Compute the CIO locator s, given the CIP coordinates. */ - s = S06(date1, date2, x, y) - - return s -} - -/* -Sp00 The TIO locator s', IERS 2003 - -The TIO locator s', positioning the Terrestrial Intermediate Origin -on the equator of the Celestial Intermediate Pole. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned (function value): - float64 the TIO locator s' in radians (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The TIO locator s' is obtained from polar motion observations by - numerical integration, and so is in essence unpredictable. - However, it is dominated by a secular drift of about - 47 microarcseconds per century, which is the approximation - evaluated by the present function. - -Reference: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func Sp00(date1, date2 float64) float64 { - var t, sp float64 - - /* Interval between fundamental epoch J2000.0 and current date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* Approximate s'. */ - sp = -47e-6 * t * DAS2R - - return sp -} - -/* -Xy06 CIP, IAU 2006/2000A, from series - -X,Y coordinates of celestial intermediate pole from series based -on IAU 2006 precession and IAU 2000A nutation. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - x,y float64 CIP X,Y coordinates (Note 2) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The X,Y coordinates are those of the unit vector towards the - celestial intermediate pole. They represent the combined effects - of frame bias, precession and nutation. - - 3) The fundamental arguments used are as adopted in IERS Conventions - (2003) and are from Simon et al. (1994) and Souchay et al. - (1999). - - 4) This is an alternative to the angles-based method, via the SOFA - function iauFw2xy and as used in iauXys06a for example. The two - methods agree at the 1 microarcsecond level (at present), a - negligible amount compared with the intrinsic accuracy of the - models. However, it would be unwise to mix the two methods - (angles-based and series-based) in a single application. - -Called: - Fal03 mean anomaly of the Moon - Falp03 mean anomaly of the Sun - Faf03 mean argument of the latitude of the Moon - Fad03 mean elongation of the Moon from the Sun - Faom03 mean longitude of the Moon's ascending node - Fame03 mean longitude of Mercury - Fave03 mean longitude of Venus - Fae03 mean longitude of Earth - Fama03 mean longitude of Mars - Faju03 mean longitude of Jupiter - Fasa03 mean longitude of Saturn - Faur03 mean longitude of Uranus - Fane03 mean longitude of Neptune - Fapa03 general accumulated precession in longitude - -References: - - Capitaine, N., Wallace, P.T. & Chapront, J., 2003, - Astron.Astrophys., 412, 567 - - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 - - McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003), - IERS Technical Note No. 32, BKG - - Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G. & Laskar, J., Astron.Astrophys., 1994, 282, 663 - - Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M., 1999, - Astron.Astrophys.Supp.Ser. 135, 111 - - Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 -*/ -func Xy06(date1, date2 float64, x, y *float64) { - /* Maximum power of T in the polynomials for X and Y */ - const MAXPT = 5 - - /* Polynomial coefficients (arcsec, X then Y). */ - xyp := [2][MAXPT + 1]float64{ - {-0.016617, - 2004.191898, - -0.4297829, - -0.19861834, - 0.000007578, - 0.0000059285, - }, - {-0.006951, - -0.025896, - -22.4072747, - 0.00190059, - 0.001112526, - 0.0000001358, - }, - } - - /* Fundamental-argument multipliers: luni-solar terms */ - mfals := [][5]int{ - - /* 1-10 */ - {0, 0, 0, 0, 1}, - {0, 0, 2, -2, 2}, - {0, 0, 2, 0, 2}, - {0, 0, 0, 0, 2}, - {0, 1, 0, 0, 0}, - {0, 1, 2, -2, 2}, - {1, 0, 0, 0, 0}, - {0, 0, 2, 0, 1}, - {1, 0, 2, 0, 2}, - {0, 1, -2, 2, -2}, - - /* 11-20 */ - {0, 0, 2, -2, 1}, - {1, 0, -2, 0, -2}, - {1, 0, 0, -2, 0}, - {1, 0, 0, 0, 1}, - {1, 0, 0, 0, -1}, - {1, 0, -2, -2, -2}, - {1, 0, 2, 0, 1}, - {2, 0, -2, 0, -1}, - {0, 0, 0, 2, 0}, - {0, 0, 2, 2, 2}, - - /* 21-30 */ - {2, 0, 0, -2, 0}, - {0, 2, -2, 2, -2}, - {2, 0, 2, 0, 2}, - {1, 0, 2, -2, 2}, - {1, 0, -2, 0, -1}, - {2, 0, 0, 0, 0}, - {0, 0, 2, 0, 0}, - {0, 1, 0, 0, 1}, - {1, 0, 0, -2, -1}, - {0, 2, 2, -2, 2}, - - /* 31-40 */ - {0, 0, 2, -2, 0}, - {1, 0, 0, -2, 1}, - {0, 1, 0, 0, -1}, - {0, 2, 0, 0, 0}, - {1, 0, -2, -2, -1}, - {1, 0, 2, 2, 2}, - {0, 1, 2, 0, 2}, - {2, 0, -2, 0, 0}, - {0, 0, 2, 2, 1}, - {0, 1, -2, 0, -2}, - - /* 41-50 */ - {0, 0, 0, 2, 1}, - {1, 0, 2, -2, 1}, - {2, 0, 0, -2, -1}, - {2, 0, 2, -2, 2}, - {2, 0, 2, 0, 1}, - {0, 0, 0, 2, -1}, - {0, 1, -2, 2, -1}, - {1, 1, 0, -2, 0}, - {2, 0, 0, -2, 1}, - {1, 0, 0, 2, 0}, - - /* 51-60 */ - {0, 1, 2, -2, 1}, - {1, -1, 0, 0, 0}, - {0, 1, -1, 1, -1}, - {2, 0, -2, 0, -2}, - {0, 1, 0, -2, 0}, - {1, 0, 0, -1, 0}, - {3, 0, 2, 0, 2}, - {0, 0, 0, 1, 0}, - {1, -1, 2, 0, 2}, - {1, 1, -2, -2, -2}, - - /* 61-70 */ - {1, 0, -2, 0, 0}, - {2, 0, 0, 0, -1}, - {0, 1, -2, -2, -2}, - {1, 1, 2, 0, 2}, - {2, 0, 0, 0, 1}, - {1, 1, 0, 0, 0}, - {1, 0, -2, 2, -1}, - {1, 0, 2, 0, 0}, - {1, -1, 0, -1, 0}, - {1, 0, 0, 0, 2}, - - /* 71-80 */ - {1, 0, -1, 0, -1}, - {0, 0, 2, 1, 2}, - {1, 0, -2, -4, -2}, - {1, -1, 0, -1, -1}, - {1, 0, 2, 2, 1}, - {0, 2, -2, 2, -1}, - {1, 0, 0, 0, -2}, - {2, 0, -2, -2, -2}, - {1, 1, 2, -2, 2}, - {2, 0, -2, -4, -2}, - - /* 81-90 */ - {1, 0, -4, 0, -2}, - {2, 0, 2, -2, 1}, - {1, 0, 0, -1, -1}, - {2, 0, 2, 2, 2}, - {3, 0, 0, 0, 0}, - {1, 0, 0, 2, 1}, - {0, 0, 2, -2, -1}, - {3, 0, 2, -2, 2}, - {0, 0, 4, -2, 2}, - {1, 0, 0, -4, 0}, - - /* 91-100 */ - {0, 1, 2, 0, 1}, - {2, 0, 0, -4, 0}, - {1, 1, 0, -2, -1}, - {2, 0, -2, 0, 1}, - {0, 0, 2, 0, -1}, - {0, 1, -2, 0, -1}, - {0, 1, 0, 0, 2}, - {0, 0, 2, -1, 2}, - {0, 0, 2, 4, 2}, - {2, 1, 0, -2, 0}, - - /* 101-110 */ - {1, 1, 0, -2, 1}, - {1, -1, 0, -2, 0}, - {1, -1, 0, -1, -2}, - {1, -1, 0, 0, 1}, - {0, 1, -2, 2, 0}, - {0, 1, 0, 0, -2}, - {1, -1, 2, 2, 2}, - {1, 0, 0, 2, -1}, - {1, -1, -2, -2, -2}, - {3, 0, 2, 0, 1}, - - /* 111-120 */ - {0, 1, 2, 2, 2}, - {1, 0, 2, -2, 0}, - {1, 1, -2, -2, -1}, - {1, 0, 2, -4, 1}, - {0, 1, -2, -2, -1}, - {2, -1, 2, 0, 2}, - {0, 0, 0, 2, 2}, - {1, -1, 2, 0, 1}, - {1, -1, -2, 0, -2}, - {0, 1, 0, 2, 0}, - - /* 121-130 */ - {0, 1, 2, -2, 0}, - {0, 0, 0, 1, 1}, - {1, 0, -2, -2, 0}, - {0, 3, 2, -2, 2}, - {2, 1, 2, 0, 2}, - {1, 1, 0, 0, 1}, - {2, 0, 0, 2, 0}, - {1, 1, 2, 0, 1}, - {1, 0, 0, -2, -2}, - {1, 0, -2, 2, 0}, - - /* 131-140 */ - {1, 0, -1, 0, -2}, - {0, 1, 0, -2, 1}, - {0, 1, 0, 1, 0}, - {0, 0, 0, 1, -1}, - {1, 0, -2, 2, -2}, - {1, -1, 0, 0, -1}, - {0, 0, 0, 4, 0}, - {1, -1, 0, 2, 0}, - {1, 0, 2, 1, 2}, - {1, 0, 2, -1, 2}, - - /* 141-150 */ - {0, 0, 2, 1, 1}, - {1, 0, 0, -2, 2}, - {1, 0, -2, 0, 1}, - {1, 0, -2, -4, -1}, - {0, 0, 2, 2, 0}, - {1, 1, 2, -2, 1}, - {1, 0, -2, 1, -1}, - {0, 0, 1, 0, 1}, - {2, 0, -2, -2, -1}, - {4, 0, 2, 0, 2}, - - /* 151-160 */ - {2, -1, 0, 0, 0}, - {2, 1, 2, -2, 2}, - {0, 1, 2, 1, 2}, - {1, 0, 4, -2, 2}, - {1, 1, 0, 0, -1}, - {2, 0, 2, 0, 0}, - {2, 0, -2, -4, -1}, - {1, 0, -1, 0, 0}, - {1, 0, 0, 1, 0}, - {0, 1, 0, 2, 1}, - - /* 161-170 */ - {1, 0, -4, 0, -1}, - {1, 0, 0, -4, -1}, - {2, 0, 2, 2, 1}, - {2, 1, 0, 0, 0}, - {0, 0, 2, -3, 2}, - {1, 2, 0, -2, 0}, - {0, 3, 0, 0, 0}, - {0, 0, 4, 0, 2}, - {0, 0, 2, -4, 1}, - {2, 0, 0, -2, -2}, - - /* 171-180 */ - {1, 1, -2, -4, -2}, - {0, 1, 0, -2, -1}, - {0, 0, 0, 4, 1}, - {3, 0, 2, -2, 1}, - {1, 0, 2, 4, 2}, - {1, 1, -2, 0, -2}, - {0, 0, 4, -2, 1}, - {2, -2, 0, -2, 0}, - {2, 1, 0, -2, -1}, - {0, 2, 0, -2, 0}, - - /* 181-190 */ - {1, 0, 0, -1, 1}, - {1, 1, 2, 2, 2}, - {3, 0, 0, 0, -1}, - {2, 0, 0, -4, -1}, - {3, 0, 2, 2, 2}, - {0, 0, 2, 4, 1}, - {0, 2, -2, -2, -2}, - {1, -1, 0, -2, -1}, - {0, 0, 2, -1, 1}, - {2, 0, 0, 2, 1}, - - /* 191-200 */ - {1, -1, -2, 2, -1}, - {0, 0, 0, 2, -2}, - {2, 0, 0, -4, 1}, - {1, 0, 0, -4, 1}, - {2, 0, 2, -4, 1}, - {4, 0, 2, -2, 2}, - {2, 1, -2, 0, -1}, - {2, 1, -2, -4, -2}, - {3, 0, 0, -4, 0}, - {1, -1, 2, 2, 1}, - - /* 201-210 */ - {1, -1, -2, 0, -1}, - {0, 2, 0, 0, 1}, - {1, 2, -2, -2, -2}, - {1, 1, 0, -4, 0}, - {2, 0, 0, -2, 2}, - {0, 2, 2, -2, 1}, - {1, 0, 2, 0, -1}, - {2, 1, 0, -2, 1}, - {2, -1, -2, 0, -1}, - {1, -1, -2, -2, -1}, - - /* 211-220 */ - {0, 1, -2, 1, -2}, - {1, 0, -4, 2, -2}, - {0, 1, 2, 2, 1}, - {3, 0, 0, 0, 1}, - {2, -1, 2, 2, 2}, - {0, 1, -2, -4, -2}, - {1, 0, -2, -3, -2}, - {2, 0, 0, 0, 2}, - {1, -1, 0, -2, -2}, - {2, 0, -2, 2, -1}, - - /* 221-230 */ - {0, 2, -2, 0, -2}, - {3, 0, -2, 0, -1}, - {2, -1, 2, 0, 1}, - {1, 0, -2, -1, -2}, - {0, 0, 2, 0, 3}, - {2, 0, -4, 0, -2}, - {2, 1, 0, -4, 0}, - {1, 1, -2, 1, -1}, - {0, 2, 2, 0, 2}, - {1, -1, 2, -2, 2}, - - /* 231-240 */ - {1, -1, 0, -2, 1}, - {2, 1, 2, 0, 1}, - {1, 0, 2, -4, 2}, - {1, 1, -2, 0, -1}, - {1, 1, 0, 2, 0}, - {1, 0, 0, -3, 0}, - {2, 0, 2, -1, 2}, - {0, 2, 0, 0, -1}, - {2, -1, 0, -2, 0}, - {4, 0, 0, 0, 0}, - - /* 241-250 */ - {2, 1, -2, -2, -2}, - {0, 2, -2, 2, 0}, - {1, 0, 2, 1, 1}, - {1, 0, -1, 0, -3}, - {3, -1, 2, 0, 2}, - {2, 0, 2, -2, 0}, - {1, -2, 0, 0, 0}, - {2, 0, 0, 0, -2}, - {1, 0, 0, 4, 0}, - {0, 1, 0, 1, 1}, - - /* 251-260 */ - {1, 0, 2, 2, 0}, - {0, 1, 0, 2, -1}, - {0, 1, 0, 1, -1}, - {0, 0, 2, -2, 3}, - {3, 1, 2, 0, 2}, - {1, 1, 2, 1, 2}, - {1, 1, -2, 2, -1}, - {2, -1, 2, -2, 2}, - {1, -2, 2, 0, 2}, - {1, 0, 2, -4, 0}, - - /* 261-270 */ - {0, 0, 1, 0, 0}, - {1, 0, 2, -3, 1}, - {1, -2, 0, -2, 0}, - {2, 0, 0, 2, -1}, - {1, 1, 2, -4, 1}, - {4, 0, 2, 0, 1}, - {0, 1, 2, 1, 1}, - {1, 2, 2, -2, 2}, - {2, 0, 2, 1, 2}, - {2, 1, 2, -2, 1}, - - /* 271-280 */ - {1, 0, 2, -1, 1}, - {1, 0, 4, -2, 1}, - {1, -1, 2, -2, 1}, - {0, 1, 0, -4, 0}, - {3, 0, -2, -2, -2}, - {0, 0, 4, -4, 2}, - {2, 0, -4, -2, -2}, - {2, -2, 0, -2, -1}, - {1, 0, 2, -2, -1}, - {2, 0, -2, -6, -2}, - - /* 281-290 */ - {1, 0, -2, 1, -2}, - {1, 0, -2, 2, 1}, - {1, -1, 0, 2, -1}, - {1, 0, -2, 1, 0}, - {2, -1, 0, -2, 1}, - {1, -1, 0, 2, 1}, - {2, 0, -2, -2, 0}, - {1, 0, 2, -3, 2}, - {0, 0, 0, 4, -1}, - {2, -1, 0, 0, 1}, - - /* 291-300 */ - {2, 0, 4, -2, 2}, - {0, 0, 2, 3, 2}, - {0, 1, 4, -2, 2}, - {0, 1, -2, 2, 1}, - {1, 1, 0, 2, 1}, - {1, 0, 0, 4, 1}, - {0, 0, 4, 0, 1}, - {2, 0, 0, -3, 0}, - {1, 0, 0, -1, -2}, - {1, -2, -2, -2, -2}, - - /* 301-310 */ - {3, 0, 0, 2, 0}, - {2, 0, 2, -4, 2}, - {1, 1, -2, -4, -1}, - {1, 0, -2, -6, -2}, - {2, -1, 0, 0, -1}, - {2, -1, 0, 2, 0}, - {0, 1, 2, -2, -1}, - {1, 1, 0, 1, 0}, - {1, 2, 0, -2, -1}, - {1, 0, 0, 1, -1}, - - /* 311-320 */ - {0, 0, 1, 0, 2}, - {3, 1, 2, -2, 2}, - {1, 0, -4, -2, -2}, - {1, 0, 2, 4, 1}, - {1, -2, 2, 2, 2}, - {1, -1, -2, -4, -2}, - {0, 0, 2, -4, 2}, - {0, 0, 2, -3, 1}, - {2, 1, -2, 0, 0}, - {3, 0, -2, -2, -1}, - - /* 321-330 */ - {2, 0, 2, 4, 2}, - {0, 0, 0, 0, 3}, - {2, -1, -2, -2, -2}, - {2, 0, 0, -1, 0}, - {3, 0, 2, -4, 2}, - {2, 1, 2, 2, 2}, - {0, 0, 3, 0, 3}, - {1, 1, 2, 2, 1}, - {2, 1, 0, 0, -1}, - {1, 2, 0, -2, 1}, - - /* 331-340 */ - {3, 0, 2, 2, 1}, - {1, -1, -2, 2, -2}, - {1, 1, 0, -1, 0}, - {1, 2, 0, 0, 0}, - {1, 0, 4, 0, 2}, - {1, -1, 2, 4, 2}, - {2, 1, 0, 0, 1}, - {1, 0, 0, 2, 2}, - {1, -1, -2, 2, 0}, - {0, 2, -2, -2, -1}, - - /* 341-350 */ - {2, 0, -2, 0, 2}, - {5, 0, 2, 0, 2}, - {3, 0, -2, -6, -2}, - {1, -1, 2, -1, 2}, - {3, 0, 0, -4, -1}, - {1, 0, 0, 1, 1}, - {1, 0, -4, 2, -1}, - {0, 1, 2, -4, 1}, - {1, 2, 2, 0, 2}, - {0, 1, 0, -2, -2}, - - /* 351-360 */ - {0, 0, 2, -1, 0}, - {1, 0, 1, 0, 1}, - {0, 2, 0, -2, 1}, - {3, 0, 2, 0, 0}, - {1, 1, -2, 1, 0}, - {2, 1, -2, -4, -1}, - {3, -1, 0, 0, 0}, - {2, -1, -2, 0, 0}, - {4, 0, 2, -2, 1}, - {2, 0, -2, 2, 0}, - - /* 361-370 */ - {1, 1, 2, -2, 0}, - {1, 0, -2, 4, -1}, - {1, 0, -2, -2, 1}, - {2, 0, 2, -4, 0}, - {1, 1, 0, -2, -2}, - {1, 1, -2, -2, 0}, - {1, 0, 1, -2, 1}, - {2, -1, -2, -4, -2}, - {3, 0, -2, 0, -2}, - {0, 1, -2, -2, 0}, - - /* 371-380 */ - {3, 0, 0, -2, -1}, - {1, 0, -2, -3, -1}, - {0, 1, 0, -4, -1}, - {1, -2, 2, -2, 1}, - {0, 1, -2, 1, -1}, - {1, -1, 0, 0, 2}, - {2, 0, 0, 1, 0}, - {1, -2, 0, 2, 0}, - {1, 2, -2, -2, -1}, - {0, 0, 4, -4, 1}, - - /* 381-390 */ - {0, 1, 2, 4, 2}, - {0, 1, -4, 2, -2}, - {3, 0, -2, 0, 0}, - {2, -1, 2, 2, 1}, - {0, 1, -2, -4, -1}, - {4, 0, 2, 2, 2}, - {2, 0, -2, -3, -2}, - {2, 0, 0, -6, 0}, - {1, 0, 2, 0, 3}, - {3, 1, 0, 0, 0}, - - /* 391-400 */ - {3, 0, 0, -4, 1}, - {1, -1, 2, 0, 0}, - {1, -1, 0, -4, 0}, - {2, 0, -2, 2, -2}, - {1, 1, 0, -2, 2}, - {4, 0, 0, -2, 0}, - {2, 2, 0, -2, 0}, - {0, 1, 2, 0, 0}, - {1, 1, 0, -4, 1}, - {1, 0, 0, -4, -2}, - - /* 401-410 */ - {0, 0, 0, 1, 2}, - {3, 0, 0, 2, 1}, - {1, 1, 0, -4, -1}, - {0, 0, 2, 2, -1}, - {1, 1, 2, 0, 0}, - {1, -1, 2, -4, 1}, - {1, 1, 0, 0, 2}, - {0, 0, 2, 6, 2}, - {4, 0, -2, -2, -1}, - {2, 1, 0, -4, -1}, - - /* 411-420 */ - {0, 0, 0, 3, 1}, - {1, -1, -2, 0, 0}, - {0, 0, 2, 1, 0}, - {1, 0, 0, 2, -2}, - {3, -1, 2, 2, 2}, - {3, -1, 2, -2, 2}, - {1, 0, 0, -1, 2}, - {1, -2, 2, -2, 2}, - {0, 1, 0, 2, 2}, - {0, 1, -2, -1, -2}, - - /* 421-430 */ - {1, 1, -2, 0, 0}, - {0, 2, 2, -2, 0}, - {3, -1, -2, -1, -2}, - {1, 0, 0, -6, 0}, - {1, 0, -2, -4, 0}, - {2, 1, 0, -4, 1}, - {2, 0, 2, 0, -1}, - {2, 0, -4, 0, -1}, - {0, 0, 3, 0, 2}, - {2, 1, -2, -2, -1}, - - /* 431-440 */ - {1, -2, 0, 0, 1}, - {2, -1, 0, -4, 0}, - {0, 0, 0, 3, 0}, - {5, 0, 2, -2, 2}, - {1, 2, -2, -4, -2}, - {1, 0, 4, -4, 2}, - {0, 0, 4, -1, 2}, - {3, 1, 0, -4, 0}, - {3, 0, 0, -6, 0}, - {2, 0, 0, 2, 2}, - - /* 441-450 */ - {2, -2, 2, 0, 2}, - {1, 0, 0, -3, 1}, - {1, -2, -2, 0, -2}, - {1, -1, -2, -3, -2}, - {0, 0, 2, -2, -2}, - {2, 0, -2, -4, 0}, - {1, 0, -4, 0, 0}, - {0, 1, 0, -1, 0}, - {4, 0, 0, 0, -1}, - {3, 0, 2, -1, 2}, - - /* 451-460 */ - {3, -1, 2, 0, 1}, - {2, 0, 2, -1, 1}, - {1, 2, 2, -2, 1}, - {1, 1, 0, 2, -1}, - {0, 2, 2, 0, 1}, - {3, 1, 2, 0, 1}, - {1, 1, 2, 1, 1}, - {1, 1, 0, -1, 1}, - {1, -2, 0, -2, -1}, - {4, 0, 0, -4, 0}, - - /* 461-470 */ - {2, 1, 0, 2, 0}, - {1, -1, 0, 4, 0}, - {0, 1, 0, -2, 2}, - {0, 0, 2, 0, -2}, - {1, 0, -1, 0, 1}, - {3, 0, 2, -2, 0}, - {2, 0, 2, 2, 0}, - {1, 2, 0, -4, 0}, - {1, -1, 0, -3, 0}, - {0, 1, 0, 4, 0}, - - /* 471 - 480 */ - {0, 1, -2, 0, 0}, - {2, 2, 2, -2, 2}, - {0, 0, 0, 1, -2}, - {0, 2, -2, 0, -1}, - {4, 0, 2, -4, 2}, - {2, 0, -4, 2, -2}, - {2, -1, -2, 0, -2}, - {1, 1, 4, -2, 2}, - {1, 1, 2, -4, 2}, - {1, 0, 2, 3, 2}, - - /* 481-490 */ - {1, 0, 0, 4, -1}, - {0, 0, 0, 4, 2}, - {2, 0, 0, 4, 0}, - {1, 1, -2, 2, 0}, - {2, 1, 2, 1, 2}, - {2, 1, 2, -4, 1}, - {2, 0, 2, 1, 1}, - {2, 0, -4, -2, -1}, - {2, 0, -2, -6, -1}, - {2, -1, 2, -1, 2}, - - /* 491-500 */ - {1, -2, 2, 0, 1}, - {1, -2, 0, -2, 1}, - {1, -1, 0, -4, -1}, - {0, 2, 2, 2, 2}, - {0, 2, -2, -4, -2}, - {0, 1, 2, 3, 2}, - {0, 1, 0, -4, 1}, - {3, 0, 0, -2, 1}, - {2, 1, -2, 0, 1}, - {2, 0, 4, -2, 1}, - - /* 501-510 */ - {2, 0, 0, -3, -1}, - {2, -2, 0, -2, 1}, - {2, -1, 2, -2, 1}, - {1, 0, 0, -6, -1}, - {1, -2, 0, 0, -1}, - {1, -2, -2, -2, -1}, - {0, 1, 4, -2, 1}, - {0, 0, 2, 3, 1}, - {2, -1, 0, -1, 0}, - {1, 3, 0, -2, 0}, - - /* 511-520 */ - {0, 3, 0, -2, 0}, - {2, -2, 2, -2, 2}, - {0, 0, 4, -2, 0}, - {4, -1, 2, 0, 2}, - {2, 2, -2, -4, -2}, - {4, 1, 2, 0, 2}, - {4, -1, -2, -2, -2}, - {2, 1, 0, -2, -2}, - {2, 1, -2, -6, -2}, - {2, 0, 0, -1, 1}, - - /* 521-530 */ - {2, -1, -2, 2, -1}, - {1, 1, -2, 2, -2}, - {1, 1, -2, -3, -2}, - {1, 0, 3, 0, 3}, - {1, 0, -2, 1, 1}, - {1, 0, -2, 0, 2}, - {1, -1, 2, 1, 2}, - {1, -1, 0, 0, -2}, - {1, -1, -4, 2, -2}, - {0, 3, -2, -2, -2}, - - /* 531-540 */ - {0, 1, 0, 4, 1}, - {0, 0, 4, 2, 2}, - {3, 0, -2, -2, 0}, - {2, -2, 0, 0, 0}, - {1, 1, 2, -4, 0}, - {1, 1, 0, -3, 0}, - {1, 0, 2, -3, 0}, - {1, -1, 2, -2, 0}, - {0, 2, 0, 2, 0}, - {0, 0, 2, 4, 0}, - - /* 541-550 */ - {1, 0, 1, 0, 0}, - {3, 1, 2, -2, 1}, - {3, 0, 4, -2, 2}, - {3, 0, 2, 1, 2}, - {3, 0, 0, 2, -1}, - {3, 0, 0, 0, 2}, - {3, 0, -2, 2, -1}, - {2, 0, 4, -4, 2}, - {2, 0, 2, -3, 2}, - {2, 0, 0, 4, 1}, - - /* 551-560 */ - {2, 0, 0, -3, 1}, - {2, 0, -4, 2, -1}, - {2, 0, -2, -2, 1}, - {2, -2, 2, 2, 2}, - {2, -2, 0, -2, -2}, - {2, -1, 0, 2, 1}, - {2, -1, 0, 2, -1}, - {1, 1, 2, 4, 2}, - {1, 1, 0, 1, 1}, - {1, 1, 0, 1, -1}, - - /* 561-570 */ - {1, 1, -2, -6, -2}, - {1, 0, 0, -3, -1}, - {1, 0, -4, -2, -1}, - {1, 0, -2, -6, -1}, - {1, -2, 2, 2, 1}, - {1, -2, -2, 2, -1}, - {1, -1, -2, -4, -1}, - {0, 2, 0, 0, 2}, - {0, 1, 2, -4, 2}, - {0, 1, -2, 4, -1}, - - /* 571-580 */ - {5, 0, 0, 0, 0}, - {3, 0, 0, -3, 0}, - {2, 2, 0, -4, 0}, - {1, -1, 2, 2, 0}, - {0, 1, 0, 3, 0}, - {4, 0, -2, 0, -1}, - {3, 0, -2, -6, -1}, - {3, 0, -2, -1, -1}, - {2, 1, 2, 2, 1}, - {2, 1, 0, 2, 1}, - - /* 581-590 */ - {2, 0, 2, 4, 1}, - {2, 0, 2, -6, 1}, - {2, 0, 2, -2, -1}, - {2, 0, 0, -6, -1}, - {2, -1, -2, -2, -1}, - {1, 2, 2, 0, 1}, - {1, 2, 0, 0, 1}, - {1, 0, 4, 0, 1}, - {1, 0, 2, -6, 1}, - {1, 0, 2, -4, -1}, - - /* 591-600 */ - {1, 0, -1, -2, -1}, - {1, -1, 2, 4, 1}, - {1, -1, 2, -3, 1}, - {1, -1, 0, 4, 1}, - {1, -1, -2, 1, -1}, - {0, 1, 2, -2, 3}, - {3, 0, 0, -2, 0}, - {1, 0, 1, -2, 0}, - {0, 2, 0, -4, 0}, - {0, 0, 2, -4, 0}, - - /* 601-610 */ - {0, 0, 1, -1, 0}, - {0, 0, 0, 6, 0}, - {0, 2, 0, 0, -2}, - {0, 1, -2, 2, -3}, - {4, 0, 0, 2, 0}, - {3, 0, 0, -1, 0}, - {3, -1, 0, 2, 0}, - {2, 1, 0, 1, 0}, - {2, 1, 0, -6, 0}, - {2, -1, 2, 0, 0}, - - /* 611-620 */ - {1, 0, 2, -1, 0}, - {1, -1, 0, 1, 0}, - {1, -1, -2, -2, 0}, - {0, 1, 2, 2, 0}, - {0, 0, 2, -3, 0}, - {2, 2, 0, -2, -1}, - {2, -1, -2, 0, 1}, - {1, 2, 2, -4, 1}, - {0, 1, 4, -4, 2}, - {0, 0, 0, 3, 2}, - - /* 621-630 */ - {5, 0, 2, 0, 1}, - {4, 1, 2, -2, 2}, - {4, 0, -2, -2, 0}, - {3, 1, 2, 2, 2}, - {3, 1, 0, -2, 0}, - {3, 1, -2, -6, -2}, - {3, 0, 0, 0, -2}, - {3, 0, -2, -4, -2}, - {3, -1, 0, -3, 0}, - {3, -1, 0, -2, 0}, - - /* 631-640 */ - {2, 1, 2, 0, 0}, - {2, 1, 2, -4, 2}, - {2, 1, 2, -2, 0}, - {2, 1, 0, -3, 0}, - {2, 1, -2, 0, -2}, - {2, 0, 0, -4, 2}, - {2, 0, 0, -4, -2}, - {2, 0, -2, -5, -2}, - {2, -1, 2, 4, 2}, - {2, -1, 0, -2, 2}, - - /* 641-650 */ - {1, 3, -2, -2, -2}, - {1, 1, 0, 0, -2}, - {1, 1, 0, -6, 0}, - {1, 1, -2, 1, -2}, - {1, 1, -2, -1, -2}, - {1, 0, 2, 1, 0}, - {1, 0, 0, 3, 0}, - {1, 0, 0, -4, 2}, - {1, 0, -2, 4, -2}, - {1, -2, 0, -1, 0}, - - /* 651-NFLS */ - {0, 1, -4, 2, -1}, - {1, 0, -2, 0, -3}, - {0, 0, 4, -4, 4}, - } - - /* Number of frequencies: luni-solar */ - NFLS := len(mfals) - - /* Fundamental-argument multipliers: planetary terms */ - mfapl := [][14]int{ - - /* 1-10 */ - {0, 0, 1, -1, 1, 0, 0, -1, 0, -2, 5, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, -2}, - {0, 0, 1, -1, 1, 0, -8, 12, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 8, -16, 4, 5, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, -1, 2, 0, 0, 0, 0, 0}, - - /* 11-20 */ - {0, 0, 0, 0, 0, 0, 8, -13, 0, 0, 0, 0, 0, -1}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 2, -5, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 3, 0, -1, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 2, -8, 3, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 6, -8, 3, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 0}, - - /* 21-30 */ - {0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 1, 0, 0, -4, 8, -3, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2}, - {0, 0, 1, -1, 1, 0, 0, 0, -2, 0, 0, 0, 0, 0}, - {2, 0, 0, -2, -1, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1}, - {2, 0, 0, -2, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - - /* 31-40 */ - {0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 8, -13, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 1}, - {2, 0, 0, -2, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, -1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 0, -1, 0, 0, 0}, - - /* 41-50 */ - {0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, -2}, - {0, 0, 1, -1, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 4, 0, -2, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 8, -13, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 2}, - {1, 0, 0, 0, 0, 0, -18, 16, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2}, - - /* 51-60 */ - {0, 0, 1, -1, 1, 0, -5, 7, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, 0, 0, 0, -10, 3, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 0, 0, -5, 6, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 2}, - {1, 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1}, - {1, 0, -2, 0, -2, 0, 0, 4, -8, 3, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 2, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0}, - - /* 61-70 */ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 8, -16, 4, 5, 0, 0, -2}, - {0, 0, 1, -1, 1, 0, 0, 3, -8, 3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 8, -11, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 8, -16, 4, 5, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0}, - - /* 71-80 */ - {0, 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 8, -15, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 3, 0, -2, 0, 0, 0, 2}, - {0, 0, 1, -1, 1, 0, 0, -5, 8, -3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 0}, - - /* 81-90 */ - {2, 0, 0, -2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, -1}, - {2, 0, 0, -2, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 8, -13, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, 0, 0, -2, 5, 0, 0, 0}, - {1, 0, 0, -1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2}, - {1, 0, 0, 0, -1, 0, -18, 16, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, 0, 0, 2, -5, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0}, - - /* 91-100 */ - {1, 0, 0, -2, 0, 0, 19, -21, 3, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, -8, 13, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 1, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2}, - {1, 0, 0, 0, 1, 0, -18, 16, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 6, -16, 4, 5, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0, -2}, - - /* 101-110 */ - {0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1}, - {2, 0, 0, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 0}, - {2, 0, 0, -2, -1, 0, 0, -2, 0, 3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2}, - - /* 111-120 */ - {0, 0, 0, 0, 1, 0, 0, 1, -2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2}, - {0, 0, 2, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, -3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0}, - {2, 0, 0, -2, 0, 0, -6, 8, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0}, - - /* 121-130 */ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 8, -10, 0, 0, 0, 0, 0, -2}, - {0, 0, 1, -1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, -2}, - {1, 0, 0, -1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0}, - - /* 131-140 */ - {0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 4, 0, -3, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 1, 0, 2, -3, 0, 0, 0, 0, 0, 0}, - - /* 141-150 */ - {1, 0, 0, -1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 9, -11, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 8, -15, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, -4, 5, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 4, 0, -1, 0, 0, 0, 2}, - - /* 151-160 */ - {1, 0, 0, -1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, -4, 10, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, -2}, - {0, 0, 2, -2, 1, 0, -4, 4, 0, 0, 0, 0, 0, 0}, - - /* 161-170 */ - {0, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 2}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 2, 0}, - {0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, -9, 13, 0, 0, 0, 0, 0}, - {2, 0, 2, 0, 2, 0, 0, 2, 0, -3, 0, 0, 0, 0}, - - /* 171-180 */ - {0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, -2}, - {0, 0, 1, -1, 2, 0, 0, -1, 0, 0, 2, 0, 0, 0}, - {1, 0, 0, -1, -1, 0, -3, 4, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1}, - {1, 0, 2, 0, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0}, - {1, 0, -2, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, -2, 4, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0}, - - /* 181-190 */ - {0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1}, - {0, 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, -8, 3, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 6, -10, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 7, -8, 3, 0, 0, 0, 2}, - {0, 0, 0, 0, 1, 0, -3, 5, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, -5, 7, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 1}, - - /* 191-200 */ - {0, 0, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 7, -10, 0, 0, 0, 0, 0, -2}, - {1, 0, 0, -2, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 2, -5, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, -1}, - {0, 0, 1, -1, 1, 0, 0, -9, 15, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, -1, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0}, - - /* 201-210 */ - {0, 0, 0, 0, 0, 0, 0, 1, -4, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -1, 0, 0, 2}, - {2, 0, 0, -2, 1, 0, -6, 8, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, -1}, - {0, 0, 1, -1, 1, 0, 3, -6, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 8, -14, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - - /* 211-220 */ - {0, 0, 0, 0, 1, 0, 0, 8, -15, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 0, 0}, - {2, 0, 0, -2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2}, - {2, 0, -1, -1, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0}, - - /* 221-230 */ - {2, 0, 0, -2, 0, 0, 0, -6, 8, 0, 0, 0, 0, 0}, - {2, 0, 0, -2, 0, 0, 0, -5, 6, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 1, 0, 0, 1, 0, -1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, -9, 4, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, -2}, - - /* 231-240 */ - {0, 0, 0, 0, 0, 0, 0, 2, 0, -4, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1}, - {0, 0, 0, 0, 0, 0, 7, -11, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 3, -5, 4, 0, 0, 0, 0, 2}, - {0, 0, 1, -1, 0, 0, 0, -1, 0, -1, 1, 0, 0, 0}, - {2, 0, 0, 0, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 8, -15, 0, 0, 0, 0, -2}, - {0, 0, 1, -1, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, -1}, - - /* 241-250 */ - {0, 0, 1, -1, 1, 0, 0, -1, 0, -1, 1, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 3, -8, 3, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 2, -4, 0, -3, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 3, -5, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 3, 0, -3, 0, 0, 0, 2}, - {0, 0, 2, -2, 2, 0, -8, 11, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -2, 0, 0, 0}, - - /* 251-260 */ - {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 0}, - {1, 0, -2, -2, -2, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 5, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 1}, - - /* 261-270 */ - {0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 2, -5, 0, 0, 2}, - {2, 0, 0, -2, -1, 0, 0, -2, 0, 0, 5, 0, 0, 0}, - {2, 0, 0, -2, -1, 0, -6, 8, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, -2, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 8, -8, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 3, 0, 2, -5, 0, 0, 2}, - {0, 0, 0, 0, 1, 0, 3, -7, 4, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0}, - - /* 271-280 */ - {0, 0, 1, -1, 0, 0, 0, -1, 0, -2, 5, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 3, 0, -3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 6, -15, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 2}, - {1, 0, 0, -1, 0, 0, 0, -3, 4, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, -3, 7, -4, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 5, 0, -2, 0, 0, 0, 2}, - - /* 281-290 */ - {0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 1}, - {0, 0, 2, -2, 2, 0, -5, 6, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 6, -11, 0, 0, 0, 0, -2}, - - /* 291-300 */ - {0, 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, -2}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 3, 0, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, 0, -1, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 9, -12, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 1}, - {0, 0, 1, -1, 0, 0, -8, 12, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, -1}, - - /* 301-310 */ - {0, 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, 0, -2}, - {0, 0, 1, -1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, -1}, - {0, 0, 1, -1, -1, 0, 0, 0, -2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, -5, 0, 0, 0, 0, -2}, - {2, 0, 0, -2, 0, 0, 0, -2, 0, 3, -1, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 2}, - - /* 311-320 */ - {0, 0, 0, 0, 0, 0, 9, -9, 0, 0, 0, 0, 0, -1}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 3, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, 2, -4, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1}, - {0, 0, 1, -1, 2, 0, 0, -1, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2}, - {0, 0, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0}, - - /* 321-330 */ - {0, 0, 2, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 5, 0, -3, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, - {2, 0, -1, -1, -1, 0, 0, -1, 0, 3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 5, -10, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 8, -13, 0, 0, 0, 0, 0, 1}, - {0, 0, 2, -2, 1, -1, 0, 2, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 2, 0, 0}, - - /* 331-340 */ - {0, 0, 0, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, -2, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0}, - {0, 0, 2, -2, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 9, -9, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, -8, 11, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, -2, 0, 0, 2, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, -1, 2, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 2, -6, 0, 0, 0, 0, 0, -2}, - - /* 341-350 */ - {0, 0, 0, 0, 0, 0, 0, 8, -15, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 5, -2, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 7, -13, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 3, 0, -2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 2}, - {0, 0, 2, -2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 8, -8, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 8, -10, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 1}, - - /* 351-360 */ - {0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, -4, 0, 0, 0, 0}, - {2, 0, 0, -2, -1, 0, 0, -5, 6, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, 0, -2}, - {2, 0, -1, -1, -1, 0, 0, 3, -7, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0}, - {0, 0, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0}, - - /* 361-370 */ - {2, 0, 0, -2, 0, 0, 0, -2, 0, 4, -3, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 6, -11, 0, 0, 0, 0, 0}, - {2, 0, 0, -2, 1, 0, 0, -6, 8, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 6, -5, 0, 0, 0, 0, 2}, - {1, 0, -2, -2, -2, 0, -3, 3, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 2, 0, 0, 0, -2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0}, - {0, 0, 0, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1}, - - /* 371-380 */ - {0, 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 4, 0, 0, -2, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 3, 0, 0, -2, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 0, 1, -6, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 3, -5, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 7, -13, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 2}, - - /* 381-390 */ - {0, 0, 1, -1, 0, 0, 0, -1, 0, 0, 2, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, -8, 15, 0, 0, 0, 0, 0}, - {2, 0, 0, -2, -2, 0, -3, 3, 0, 0, 0, 0, 0, 0}, - {2, 0, -1, -1, -1, 0, 0, -1, 0, 2, 0, 0, 0, 0}, - {1, 0, 2, -2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - {1, 0, -1, 1, -1, 0, -18, 17, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, 0, 2, 0, 0, 1, 0, -1, 0, 0, 0, 0}, - {0, 0, 2, 0, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0}, - {0, 0, 2, -2, -1, 0, -5, 6, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0}, - - /* 391-400 */ - {0, 0, 0, 0, 1, 0, 2, -2, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 8, -16, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2}, - {0, 0, 0, 0, 2, 0, 0, -1, 2, 0, 0, 0, 0, 0}, - {2, 0, -1, -1, -2, 0, 0, -1, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 6, -10, 0, 0, 0, 0, 0, -1}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, -2, 4, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2}, - {2, 0, 0, -2, -1, 0, 0, -2, 0, 4, -5, 0, 0, 0}, - - /* 401-410 */ - {2, 0, 0, -2, -1, 0, -3, 3, 0, 0, 0, 0, 0, 0}, - {2, 0, -1, -1, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0}, - {1, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, -1, -1, 0, 0, -2, 2, 0, 0, 0, 0, 0}, - {1, 0, -1, -1, -1, 0, 20, -20, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 1, -2, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, -2, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 5, -8, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0}, - - /* 411-420 */ - {0, 0, 0, 0, 0, 0, 9, -11, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1}, - {0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -2}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 0, -2, 0, 0, 0}, - {0, 0, 1, -1, 2, 0, 0, -1, 0, -2, 5, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0}, - - /* 421-430 */ - {0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 2, -6, 0, 0, 0, 0, -2}, - {1, 0, 0, -2, 0, 0, 20, -21, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 8, -12, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 2, 0, 0, -1, 0, -1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 8, -12, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 9, -17, 0, 0, 0, 0, 0}, - - /* 431-440 */ - {0, 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 2, -7, 0, 0, 0, 0, -2}, - {1, 0, 0, -1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0}, - {1, 0, -2, 0, -2, 0, -10, 3, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, -9, 17, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, -4, 0, 0, 0, 0, 0, -2}, - {1, 0, -2, -2, -2, 0, 0, -2, 0, 3, 0, 0, 0, 0}, - {1, 0, -1, 1, -1, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - - /* 441-450 */ - {0, 0, 2, -2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - {0, 0, 1, -1, 2, 0, 0, -1, 0, 0, 1, 0, 0, 0}, - {0, 0, 1, -1, 2, 0, -5, 7, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 5, -10, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 4, 0, -4, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, -5, 0, 0, 0, -2}, - - /* 451-460 */ - {0, 0, 0, 0, 0, 0, 0, 1, 0, -5, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 5, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 1}, - {1, 0, 0, -2, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, -7, 4, 0, 0, 0, 0, 0}, - {2, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, -1, 0, 0, -1, 0, -1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, 1, 0, -2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 6, -10, 0, 0, 0, 0, -2}, - - /* 461-470 */ - {1, 0, 0, -1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, 1, 0, -1, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, -4, 8, -3, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, -3, 0, 3, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, -5, 5, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 1, -3, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -4, 6, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, -1, 0, 0}, - {0, 0, 1, -1, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0}, - - /* 471-480 */ - {0, 0, 0, 0, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 7, -10, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 3, -8, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 2}, - - /* 481-490 */ - {0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 3, -8, 3, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1}, - {2, 0, 0, -2, -1, 0, 0, -6, 8, 0, 0, 0, 0, 0}, - {2, 0, -1, -1, 1, 0, 0, 3, -7, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, -7, 9, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, -1}, - - /* 491-500 */ - {0, 0, 1, -1, 2, 0, -8, 12, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, 0, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - {1, 0, 0, -2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}, - {2, 0, 0, -2, 1, 0, 0, -5, 6, 0, 0, 0, 0, 0}, - {2, 0, 0, -2, -1, 0, 0, -2, 0, 3, -1, 0, 0, 0}, - {1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - {1, 0, 0, -2, -1, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - - /* 501-510 */ - {1, 0, 0, -1, -1, 0, 0, -3, 4, 0, 0, 0, 0, 0}, - {1, 0, -1, 0, -1, 0, -3, 5, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, -4, 4, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, -2, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, -8, 11, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 0, 0, 0, -9, 13, 0, 0, 0, 0, 0}, - {0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, 1, -4, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, 0, -1, 0, 1, -3, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, 7, -13, 0, 0, 0, 0, 0}, - - /* 511-520 */ - {0, 0, 0, 0, 1, 0, 0, 2, 0, -2, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 7, -11, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 1}, - - /* 521-530 */ - {0, 0, 0, 0, 0, 0, 1, -4, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 9, -17, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0}, - {2, 0, 0, -2, 0, 0, 0, -4, 8, -3, 0, 0, 0, 0}, - - /* 531-540 */ - {2, 0, 0, -2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0}, - {1, 0, 0, 0, 0, 0, 0, -4, 8, -3, 0, 0, 0, 0}, - {1, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, -2, 0, 0, 17, -16, 0, -2, 0, 0, 0, 0}, - {1, 0, 0, -1, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 3, 0, -4, 0, 0, 0, 0}, - - /* 541-550 */ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, -2}, - {0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2}, - {2, 0, 0, -2, 0, 0, 0, -4, 4, 0, 0, 0, 0, 0}, - {2, 0, 0, -2, 0, 0, 0, -2, 0, 2, 2, 0, 0, 0}, - {1, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0}, - {1, 0, 0, 0, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, -2, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, -2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0}, - {1, 0, 0, -2, 0, 0, 0, -4, 8, -3, 0, 0, 0, 0}, - - /* 551-560 */ - {1, 0, 0, -2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 0, 0, -4, 4, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, -4, 5, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0}, - - /* 561-570 */ - {0, 0, 0, 0, 0, 0, 8, -9, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0}, - {2, 0, -2, -2, -2, 0, 0, -2, 0, 2, 0, 0, 0, 0}, - {1, 0, 0, 0, 1, 0, -10, 3, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, 0, -1, 0, -10, 3, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, 0, 2, 0, 2, -3, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, 0, 2, 0, 2, -2, 0, 0, 0, 0, 0, 0}, - - /* 571-580 */ - {0, 0, 2, 0, 2, 0, -2, 3, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, 0, 2, 0, -2, 2, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0}, - {2, 0, 2, -2, 2, 0, 0, -2, 0, 3, 0, 0, 0, 0}, - {2, 0, 1, -3, 1, 0, -6, 7, 0, 0, 0, 0, 0, 0}, - {2, 0, 0, -2, 0, 0, 2, -5, 0, 0, 0, 0, 0, 0}, - {2, 0, 0, -2, 0, 0, 0, -2, 0, 5, -5, 0, 0, 0}, - {2, 0, 0, -2, 0, 0, 0, -2, 0, 1, 5, 0, 0, 0}, - {2, 0, 0, -2, 0, 0, 0, -2, 0, 0, 5, 0, 0, 0}, - - /* 581-590 */ - {2, 0, 0, -2, 0, 0, 0, -2, 0, 0, 2, 0, 0, 0}, - {2, 0, 0, -2, 0, 0, -4, 4, 0, 0, 0, 0, 0, 0}, - {2, 0, -2, 0, -2, 0, 0, 5, -9, 0, 0, 0, 0, 0}, - {2, 0, -1, -1, 0, 0, 0, -1, 0, 3, 0, 0, 0, 0}, - {1, 0, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0}, - {1, 0, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0}, - {1, 0, 2, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0}, - {1, 0, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0}, - {1, 0, 2, -2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0}, - {1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0}, - - /* 591-600 */ - {1, 0, 0, 0, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0}, - {1, 0, 0, -2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0}, - {1, 0, -2, -2, -2, 0, 0, 1, 0, -1, 0, 0, 0, 0}, - {1, 0, -1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {1, 0, -1, -1, 0, 0, 0, 8, -15, 0, 0, 0, 0, 0}, - {0, 0, 2, 2, 2, 0, 0, 2, 0, -2, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, -2, 0, 1, 0, 0, 0, 0}, - {0, 0, 2, -2, 1, 0, 0, -10, 15, 0, 0, 0, 0, 0}, - {0, 0, 2, -2, 0, -1, 0, 2, 0, 0, 0, 0, 0, 0}, - - /* 601-610 */ - {0, 0, 1, -1, 2, 0, 0, -1, 0, 0, -1, 0, 0, 0}, - {0, 0, 1, -1, 2, 0, -3, 4, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, -4, 6, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, 0, -1, 0, 0, -2, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, -1, -1, 0, -5, 7, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0}, - - /* 611-620 */ - {0, 0, 0, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 2, 0, -3, 5, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 9, -13, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 8, -14, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 8, -11, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, -2}, - - /* 621-630 */ - {0, 0, 0, 0, 0, 0, 5, -6, -4, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, -3, 0, 2, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 7, -12, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, -2}, - - /* 631-640 */ - {0, 0, 0, 0, 0, 0, 0, 6, -8, 1, 5, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 6, -10, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 5, 0, -4, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, -1}, - {0, 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 5, -16, 4, 5, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 5, -13, 0, 0, 0, 0, -2}, - - /* 641-650 */ - {0, 0, 0, 0, 0, 0, 0, 3, 0, -5, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 3, -9, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 3, -7, 0, 0, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -3, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, -8, 1, 5, 0, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 1, -5, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -3, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 5, 0, 0, 0}, - - /* 651-NFPL */ - {0, 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -6, 3, 0, -2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - } - - /* Number of frequencies: planetary */ - NFPL := len(mfapl) - - /* Pointers into amplitudes array, one pointer per frequency */ - nc := []int{ - - /* 1-100 */ - 1, 21, 37, 51, 65, 79, 91, 103, 115, 127, - 139, 151, 163, 172, 184, 196, 207, 219, 231, 240, - 252, 261, 273, 285, 297, 309, 318, 327, 339, 351, - 363, 372, 384, 396, 405, 415, 423, 435, 444, 452, - 460, 467, 474, 482, 490, 498, 506, 513, 521, 528, - 536, 543, 551, 559, 566, 574, 582, 590, 597, 605, - 613, 620, 628, 636, 644, 651, 658, 666, 674, 680, - 687, 695, 702, 710, 717, 725, 732, 739, 746, 753, - 760, 767, 774, 782, 790, 798, 805, 812, 819, 826, - 833, 840, 846, 853, 860, 867, 874, 881, 888, 895, - - /* 101-200 */ - 901, 908, 914, 921, 928, 934, 941, 948, 955, 962, - 969, 976, 982, 989, 996, 1003, 1010, 1017, 1024, 1031, - 1037, 1043, 1050, 1057, 1064, 1071, 1078, 1084, 1091, 1098, - 1104, 1112, 1118, 1124, 1131, 1138, 1145, 1151, 1157, 1164, - 1171, 1178, 1185, 1192, 1199, 1205, 1212, 1218, 1226, 1232, - 1239, 1245, 1252, 1259, 1266, 1272, 1278, 1284, 1292, 1298, - 1304, 1310, 1316, 1323, 1329, 1335, 1341, 1347, 1353, 1359, - 1365, 1371, 1377, 1383, 1389, 1396, 1402, 1408, 1414, 1420, - 1426, 1434, 1440, 1446, 1452, 1459, 1465, 1471, 1477, 1482, - 1488, 1493, 1499, 1504, 1509, 1514, 1520, 1527, 1532, 1538, - - /* 201-300 */ - 1543, 1548, 1553, 1558, 1564, 1569, 1574, 1579, 1584, 1589, - 1594, 1596, 1598, 1600, 1602, 1605, 1608, 1610, 1612, 1617, - 1619, 1623, 1625, 1627, 1629, 1632, 1634, 1640, 1642, 1644, - 1646, 1648, 1650, 1652, 1654, 1658, 1660, 1662, 1664, 1668, - 1670, 1672, 1673, 1675, 1679, 1681, 1683, 1684, 1686, 1688, - 1690, 1693, 1695, 1697, 1701, 1703, 1705, 1707, 1709, 1711, - 1712, 1715, 1717, 1721, 1723, 1725, 1727, 1729, 1731, 1733, - 1735, 1737, 1739, 1741, 1743, 1745, 1747, 1749, 1751, 1753, - 1755, 1757, 1759, 1761, 1762, 1764, 1766, 1768, 1769, 1771, - 1773, 1775, 1777, 1779, 1781, 1783, 1785, 1787, 1788, 1790, - - /* 301-400 */ - 1792, 1794, 1796, 1798, 1800, 1802, 1804, 1806, 1807, 1809, - 1811, 1815, 1817, 1819, 1821, 1823, 1825, 1827, 1829, 1831, - 1833, 1835, 1837, 1839, 1840, 1842, 1844, 1848, 1850, 1852, - 1854, 1856, 1858, 1859, 1860, 1862, 1864, 1866, 1868, 1869, - 1871, 1873, 1875, 1877, 1879, 1881, 1883, 1885, 1887, 1889, - 1891, 1892, 1896, 1898, 1900, 1901, 1903, 1905, 1907, 1909, - 1910, 1911, 1913, 1915, 1919, 1921, 1923, 1927, 1929, 1931, - 1933, 1935, 1937, 1939, 1943, 1945, 1947, 1948, 1949, 1951, - 1953, 1955, 1957, 1958, 1960, 1962, 1964, 1966, 1968, 1970, - 1971, 1973, 1974, 1975, 1977, 1979, 1980, 1981, 1982, 1984, - - /* 401-500 */ - 1986, 1988, 1990, 1992, 1994, 1995, 1997, 1999, 2001, 2003, - 2005, 2007, 2008, 2009, 2011, 2013, 2015, 2017, 2019, 2021, - 2023, 2024, 2025, 2027, 2029, 2031, 2033, 2035, 2037, 2041, - 2043, 2045, 2046, 2047, 2049, 2051, 2053, 2055, 2056, 2057, - 2059, 2061, 2063, 2065, 2067, 2069, 2070, 2071, 2072, 2074, - 2076, 2078, 2080, 2082, 2084, 2086, 2088, 2090, 2092, 2094, - 2095, 2096, 2097, 2099, 2101, 2105, 2106, 2107, 2108, 2109, - 2110, 2111, 2113, 2115, 2119, 2121, 2123, 2125, 2127, 2129, - 2131, 2133, 2135, 2136, 2137, 2139, 2141, 2143, 2145, 2147, - 2149, 2151, 2153, 2155, 2157, 2159, 2161, 2163, 2165, 2167, - - /* 501-600 */ - 2169, 2171, 2173, 2175, 2177, 2179, 2181, 2183, 2185, 2186, - 2187, 2188, 2192, 2193, 2195, 2197, 2199, 2201, 2203, 2205, - 2207, 2209, 2211, 2213, 2217, 2219, 2221, 2223, 2225, 2227, - 2229, 2231, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, - 2241, 2244, 2246, 2248, 2250, 2252, 2254, 2256, 2258, 2260, - 2262, 2264, 2266, 2268, 2270, 2272, 2274, 2276, 2278, 2280, - 2282, 2284, 2286, 2288, 2290, 2292, 2294, 2296, 2298, 2300, - 2302, 2303, 2304, 2305, 2306, 2307, 2309, 2311, 2313, 2315, - 2317, 2319, 2321, 2323, 2325, 2327, 2329, 2331, 2333, 2335, - 2337, 2341, 2343, 2345, 2347, 2349, 2351, 2352, 2355, 2356, - - /* 601-700 */ - 2357, 2358, 2359, 2361, 2363, 2364, 2365, 2366, 2367, 2368, - 2369, 2370, 2371, 2372, 2373, 2374, 2376, 2378, 2380, 2382, - 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, - 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, - 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, - 2414, 2415, 2417, 2418, 2430, 2438, 2445, 2453, 2460, 2468, - 2474, 2480, 2488, 2496, 2504, 2512, 2520, 2527, 2535, 2543, - 2550, 2558, 2566, 2574, 2580, 2588, 2596, 2604, 2612, 2619, - 2627, 2634, 2642, 2648, 2656, 2664, 2671, 2679, 2685, 2693, - 2701, 2709, 2717, 2725, 2733, 2739, 2747, 2753, 2761, 2769, - - /* 701-800 */ - 2777, 2785, 2793, 2801, 2809, 2817, 2825, 2833, 2841, 2848, - 2856, 2864, 2872, 2878, 2884, 2892, 2898, 2906, 2914, 2922, - 2930, 2938, 2944, 2952, 2958, 2966, 2974, 2982, 2988, 2996, - 3001, 3009, 3017, 3025, 3032, 3039, 3045, 3052, 3059, 3067, - 3069, 3076, 3083, 3090, 3098, 3105, 3109, 3111, 3113, 3120, - 3124, 3128, 3132, 3136, 3140, 3144, 3146, 3150, 3158, 3161, - 3165, 3166, 3168, 3172, 3176, 3180, 3182, 3185, 3189, 3193, - 3194, 3197, 3200, 3204, 3208, 3212, 3216, 3219, 3221, 3222, - 3226, 3230, 3234, 3238, 3242, 3243, 3247, 3251, 3254, 3258, - 3262, 3266, 3270, 3274, 3275, 3279, 3283, 3287, 3289, 3293, - - /* 801-900 */ - 3296, 3300, 3303, 3307, 3311, 3315, 3319, 3321, 3324, 3327, - 3330, 3334, 3338, 3340, 3342, 3346, 3350, 3354, 3358, 3361, - 3365, 3369, 3373, 3377, 3381, 3385, 3389, 3393, 3394, 3398, - 3402, 3406, 3410, 3413, 3417, 3421, 3425, 3429, 3433, 3435, - 3439, 3443, 3446, 3450, 3453, 3457, 3458, 3461, 3464, 3468, - 3472, 3476, 3478, 3481, 3485, 3489, 3493, 3497, 3501, 3505, - 3507, 3511, 3514, 3517, 3521, 3524, 3525, 3527, 3529, 3533, - 3536, 3540, 3541, 3545, 3548, 3551, 3555, 3559, 3563, 3567, - 3569, 3570, 3574, 3576, 3578, 3582, 3586, 3590, 3593, 3596, - 3600, 3604, 3608, 3612, 3616, 3620, 3623, 3626, 3630, 3632, - - /* 901-1000 */ - 3636, 3640, 3643, 3646, 3648, 3652, 3656, 3660, 3664, 3667, - 3669, 3671, 3675, 3679, 3683, 3687, 3689, 3693, 3694, 3695, - 3699, 3703, 3705, 3707, 3710, 3713, 3717, 3721, 3725, 3729, - 3733, 3736, 3740, 3744, 3748, 3752, 3754, 3757, 3759, 3763, - 3767, 3770, 3773, 3777, 3779, 3783, 3786, 3790, 3794, 3798, - 3801, 3805, 3809, 3813, 3817, 3821, 3825, 3827, 3831, 3835, - 3836, 3837, 3840, 3844, 3848, 3852, 3856, 3859, 3863, 3867, - 3869, 3871, 3875, 3879, 3883, 3887, 3890, 3894, 3898, 3901, - 3905, 3909, 3913, 3917, 3921, 3922, 3923, 3924, 3926, 3930, - 3932, 3936, 3938, 3940, 3944, 3948, 3952, 3956, 3959, 3963, - - /* 1001-1100 */ - 3965, 3969, 3973, 3977, 3979, 3981, 3982, 3986, 3989, 3993, - 3997, 4001, 4004, 4006, 4009, 4012, 4016, 4020, 4024, 4026, - 4028, 4032, 4036, 4040, 4044, 4046, 4050, 4054, 4058, 4060, - 4062, 4063, 4064, 4068, 4071, 4075, 4077, 4081, 4083, 4087, - 4089, 4091, 4095, 4099, 4101, 4103, 4105, 4107, 4111, 4115, - 4119, 4123, 4127, 4129, 4131, 4135, 4139, 4141, 4143, 4145, - 4149, 4153, 4157, 4161, 4165, 4169, 4173, 4177, 4180, 4183, - 4187, 4191, 4195, 4198, 4201, 4205, 4209, 4212, 4213, 4216, - 4217, 4221, 4223, 4226, 4230, 4234, 4236, 4240, 4244, 4248, - 4252, 4256, 4258, 4262, 4264, 4266, 4268, 4270, 4272, 4276, - - /* 1101-1200 */ - 4279, 4283, 4285, 4287, 4289, 4293, 4295, 4299, 4300, 4301, - 4305, 4309, 4313, 4317, 4319, 4323, 4325, 4329, 4331, 4333, - 4335, 4337, 4341, 4345, 4349, 4351, 4353, 4357, 4361, 4365, - 4367, 4369, 4373, 4377, 4381, 4383, 4387, 4389, 4391, 4395, - 4399, 4403, 4407, 4411, 4413, 4414, 4415, 4418, 4419, 4421, - 4423, 4427, 4429, 4431, 4433, 4435, 4437, 4439, 4443, 4446, - 4450, 4452, 4456, 4458, 4460, 4462, 4466, 4469, 4473, 4477, - 4481, 4483, 4487, 4489, 4491, 4493, 4497, 4499, 4501, 4504, - 4506, 4510, 4513, 4514, 4515, 4518, 4521, 4522, 4525, 4526, - 4527, 4530, 4533, 4534, 4537, 4541, 4542, 4543, 4544, 4545, - - /* 1201-1300 */ - 4546, 4547, 4550, 4553, 4554, 4555, 4558, 4561, 4564, 4567, - 4568, 4571, 4574, 4575, 4578, 4581, 4582, 4585, 4586, 4588, - 4590, 4592, 4596, 4598, 4602, 4604, 4608, 4612, 4613, 4616, - 4619, 4622, 4623, 4624, 4625, 4626, 4629, 4632, 4633, 4636, - 4639, 4640, 4641, 4642, 4643, 4644, 4645, 4648, 4649, 4650, - 4651, 4652, 4653, 4656, 4657, 4660, 4661, 4664, 4667, 4670, - 4671, 4674, 4675, 4676, 4677, 4678, 4681, 4682, 4683, 4684, - 4687, 4688, 4689, 4692, 4693, 4696, 4697, 4700, 4701, 4702, - 4703, 4704, 4707, 4708, 4711, 4712, 4715, 4716, 4717, 4718, - 4719, 4720, 4721, 4722, 4723, 4726, 4729, 4730, 4733, 4736, - - /* 1301-(NFLS+NFPL) */ - 4737, 4740, 4741, 4742, 4745, 4746, 4749, 4752, 4753, - } - - /* Amplitude coefficients (microarcsec); indexed using the nc array. */ - a := []float64{ - - /* 1-105 */ - -6844318.44, 9205236.26, 1328.67, 1538.18, 205833.11, - 153041.79, -3309.73, 853.32, 2037.98, -2301.27, - 81.46, 120.56, -20.39, -15.22, 1.73, -1.61, -0.10, 0.11, - -0.02, -0.02, -523908.04, 573033.42, -544.75, -458.66, - 12814.01, 11714.49, 198.97, -290.91, 155.74, -143.27, - -2.75, -1.03, -1.27, -1.16, 0.00, -0.01, -90552.22, - 97846.69, 111.23, 137.41, 2187.91, 2024.68, 41.44, -51.26, - 26.92, -24.46, -0.46, -0.28, -0.22, -0.20, 82168.76, - -89618.24, -27.64, -29.05, -2004.36, -1837.32, - -36.07, 48.00, -24.43, 22.41, 0.47, 0.24, 0.20, 0.18, - 58707.02, 7387.02, 470.05, -192.40, 164.33, -1312.21, - -179.73, -28.93, -17.36, -1.83, -0.50, 3.57, 0.00, 0.13, - -20557.78, 22438.42, -20.84, -17.40, 501.82, 459.68, - 59.20, -67.30, 6.08, -5.61, -1.36, -1.19, 28288.28, - -674.99, -34.69, 35.80, -15.07, -632.54, -11.19, 0.78, -8.41, - 0.17, 0.01, 0.07, -15406.85, 20069.50, 15.12, - - /* 106-219 */ - 31.80, 448.76, 344.50, -5.77, 1.41, 4.59, -5.02, 0.17, - 0.24, -11991.74, 12902.66, 32.46, 36.70, 288.49, - 268.14, 5.70, -7.06, 3.57, -3.23, -0.06, -0.04, - -8584.95, -9592.72, 4.42, -13.20, -214.50, 192.06, - 23.87, 29.83, 2.54, 2.40, 0.60, -0.48, 5095.50, - -6918.22, 7.19, 3.92, -154.91, -113.94, 2.86, -1.04, - -1.52, 1.73, -0.07, -0.10, -4910.93, -5331.13, - 0.76, 0.40, -119.21, 109.81, 2.16, 3.20, 1.46, 1.33, - 0.04, -0.02, -6245.02, -123.48, -6.68, -8.20, -2.76, - 139.64, 2.71, 0.15, 1.86, 2511.85, -3323.89, 1.07, - -0.90, -74.33, -56.17, 1.16, -0.01, -0.75, 0.83, -0.02, - -0.04, 2307.58, 3143.98, -7.52, 7.50, 70.31, -51.60, 1.46, - 0.16, -0.69, -0.79, 0.02, -0.05, 2372.58, 2554.51, 5.93, - -6.60, 57.12, -53.05, -0.96, -1.24, -0.71, -0.64, -0.01, - -2053.16, 2636.13, 5.13, 7.80, 58.94, 45.91, -0.42, - -0.12, 0.61, -0.66, 0.02, 0.03, -1825.49, - - /* 220-339 */ - -2423.59, 1.23, -2.00, -54.19, 40.82, -1.07, -1.02, - 0.54, 0.61, -0.04, 0.04, 2521.07, -122.28, -5.97, 2.90, - -2.73, -56.37, -0.82, 0.13, -0.75, -1534.09, 1645.01, - 6.29, 6.80, 36.78, 34.30, 0.92, -1.25, 0.46, -0.41, - -0.02, -0.01, 1898.27, 47.70, -0.72, 2.50, 1.07, -42.45, - -0.94, 0.02, -0.56, -1292.02, -1387.00, 0.00, - 0.00, -31.01, 28.89, 0.68, 0.00, 0.38, 0.35, -0.01, - -0.01, -1234.96, 1323.81, 5.21, 5.90, 29.60, 27.61, - 0.74, -1.22, 0.37, -0.33, -0.02, -0.01, 1137.48, - -1233.89, -0.04, -0.30, -27.59, -25.43, -0.61, 1.00, - -0.34, 0.31, 0.01, 0.01, -813.13, -1075.60, 0.40, - 0.30, -24.05, 18.18, -0.40, -0.01, 0.24, 0.27, -0.01, - 0.01, 1163.22, -60.90, -2.94, 1.30, -1.36, -26.01, -0.58, - 0.07, -0.35, 1029.70, -55.55, -2.63, 1.10, -1.25, -23.02, - -0.52, 0.06, -0.31, -556.26, 852.85, 3.16, -4.48, 19.06, - 12.44, -0.81, -0.27, 0.17, -0.21, 0.00, 0.02, -603.52, - - /* 340-467 */ - -800.34, 0.44, 0.10, -17.90, 13.49, -0.08, -0.01, 0.18, - 0.20, -0.01, 0.01, -628.24, 684.99, -0.64, -0.50, 15.32, - 14.05, 3.18, -4.19, 0.19, -0.17, -0.09, -0.07, -866.48, - -16.26, 0.52, -1.30, -0.36, 19.37, 0.43, -0.01, 0.26, - -512.37, 695.54, -1.47, -1.40, 15.55, 11.46, -0.16, 0.03, - 0.15, -0.17, 0.01, 0.01, 506.65, 643.75, 2.54, -2.62, - 14.40, -11.33, -0.77, -0.06, -0.15, -0.16, 0.00, 0.01, - 664.57, 16.81, -0.40, 1.00, 0.38, -14.86, -3.71, -0.09, - -0.20, 405.91, 522.11, 0.99, -1.50, 11.67, -9.08, -0.25, - -0.02, -0.12, -0.13, -305.78, 326.60, 1.75, 1.90, 7.30, - 6.84, 0.20, -0.04, 300.99, -325.03, -0.44, -0.50, -7.27, - -6.73, -1.01, 0.01, 0.00, 0.08, 0.00, 0.02, 438.51, - 10.47, -0.56, -0.20, 0.24, -9.81, -0.24, 0.01, -0.13, - -264.02, 335.24, 0.99, 1.40, 7.49, 5.90, -0.27, -0.02, - 284.09, 307.03, 0.32, -0.40, 6.87, -6.35, -0.99, -0.01, - -250.54, 327.11, 0.08, 0.40, 7.31, 5.60, -0.30, 230.72, - - /* 468-595 */ - -304.46, 0.08, -0.10, -6.81, -5.16, 0.27, 229.78, 304.17, - -0.60, 0.50, 6.80, -5.14, 0.33, 0.01, 256.30, -276.81, - -0.28, -0.40, -6.19, -5.73, -0.14, 0.01, -212.82, 269.45, - 0.84, 1.20, 6.02, 4.76, 0.14, -0.02, 196.64, 272.05, - -0.84, 0.90, 6.08, -4.40, 0.35, 0.02, 188.95, 272.22, - -0.12, 0.30, 6.09, -4.22, 0.34, -292.37, -5.10, -0.32, - -0.40, -0.11, 6.54, 0.14, 0.01, 161.79, -220.67, 0.24, - 0.10, -4.93, -3.62, -0.08, 261.54, -19.94, -0.95, 0.20, - -0.45, -5.85, -0.13, 0.02, 142.16, -190.79, 0.20, 0.10, - -4.27, -3.18, -0.07, 187.95, -4.11, -0.24, 0.30, -0.09, - -4.20, -0.09, 0.01, 0.00, 0.00, -79.08, 167.90, 0.04, - 0.00, 3.75, 1.77, 121.98, 131.04, -0.08, 0.10, 2.93, - -2.73, -0.06, -172.95, -8.11, -0.40, -0.20, -0.18, 3.87, - 0.09, 0.01, -160.15, -55.30, -14.04, 13.90, -1.23, 3.58, - 0.40, 0.31, -115.40, 123.20, 0.60, 0.70, 2.75, 2.58, - 0.08, -0.01, -168.26, -2.00, 0.20, -0.20, -0.04, 3.76, - - /* 596-723 */ - 0.08, -114.49, 123.20, 0.32, 0.40, 2.75, 2.56, 0.07, - -0.01, 112.14, 120.70, 0.28, -0.30, 2.70, -2.51, -0.07, - -0.01, 161.34, 4.03, 0.20, 0.20, 0.09, -3.61, -0.08, - 91.31, 126.64, -0.40, 0.40, 2.83, -2.04, -0.04, 0.01, - 105.29, 112.90, 0.44, -0.50, 2.52, -2.35, -0.07, -0.01, - 98.69, -106.20, -0.28, -0.30, -2.37, -2.21, -0.06, 0.01, - 86.74, -112.94, -0.08, -0.20, -2.53, -1.94, -0.05, -134.81, - 3.51, 0.20, -0.20, 0.08, 3.01, 0.07, 79.03, 107.31, - -0.24, 0.20, 2.40, -1.77, -0.04, 0.01, 132.81, -10.77, - -0.52, 0.10, -0.24, -2.97, -0.07, 0.01, -130.31, -0.90, - 0.04, 0.00, 0.00, 2.91, -78.56, 85.32, 0.00, 0.00, - 1.91, 1.76, 0.04, 0.00, 0.00, -41.53, 89.10, 0.02, - 0.00, 1.99, 0.93, 66.03, -71.00, -0.20, -0.20, -1.59, - -1.48, -0.04, 60.50, 64.70, 0.36, -0.40, 1.45, -1.35, - -0.04, -0.01, -52.27, -70.01, 0.00, 0.00, -1.57, 1.17, - 0.03, -52.95, 66.29, 0.32, 0.40, 1.48, 1.18, 0.04, - - /* 724-851 */ - -0.01, 51.02, 67.25, 0.00, 0.00, 1.50, -1.14, -0.03, - -55.66, -60.92, 0.16, -0.20, -1.36, 1.24, 0.03, -54.81, - -59.20, -0.08, 0.20, -1.32, 1.23, 0.03, 51.32, -55.60, - 0.00, 0.00, -1.24, -1.15, -0.03, 48.29, 51.80, 0.20, - -0.20, 1.16, -1.08, -0.03, -45.59, -49.00, -0.12, 0.10, - -1.10, 1.02, 0.03, 40.54, -52.69, -0.04, -0.10, -1.18, - -0.91, -0.02, -40.58, -49.51, -1.00, 1.00, -1.11, 0.91, - 0.04, 0.02, -43.76, 46.50, 0.36, 0.40, 1.04, 0.98, - 0.03, -0.01, 62.65, -5.00, -0.24, 0.00, -0.11, -1.40, - -0.03, 0.01, -38.57, 49.59, 0.08, 0.10, 1.11, 0.86, - 0.02, -33.22, -44.04, 0.08, -0.10, -0.98, 0.74, 0.02, - 37.15, -39.90, -0.12, -0.10, -0.89, -0.83, -0.02, 36.68, - -39.50, -0.04, -0.10, -0.88, -0.82, -0.02, -53.22, -3.91, - -0.20, 0.00, -0.09, 1.19, 0.03, 32.43, -42.19, -0.04, - -0.10, -0.94, -0.73, -0.02, -51.00, -2.30, -0.12, -0.10, - 0.00, 1.14, -29.53, -39.11, 0.04, 0.00, -0.87, 0.66, - - /* 852-979 */ - 0.02, 28.50, -38.92, -0.08, -0.10, -0.87, -0.64, -0.02, - 26.54, 36.95, -0.12, 0.10, 0.83, -0.59, -0.01, 26.54, - 34.59, 0.04, -0.10, 0.77, -0.59, -0.02, 28.35, -32.55, - -0.16, 0.20, -0.73, -0.63, -0.01, -28.00, 30.40, 0.00, - 0.00, 0.68, 0.63, 0.01, -27.61, 29.40, 0.20, 0.20, - 0.66, 0.62, 0.02, 40.33, 0.40, -0.04, 0.10, 0.00, - -0.90, -23.28, 31.61, -0.08, -0.10, 0.71, 0.52, 0.01, - 37.75, 0.80, 0.04, 0.10, 0.00, -0.84, 23.66, 25.80, - 0.00, 0.00, 0.58, -0.53, -0.01, 21.01, -27.91, 0.00, - 0.00, -0.62, -0.47, -0.01, -34.81, 2.89, 0.04, 0.00, - 0.00, 0.78, -23.49, -25.31, 0.00, 0.00, -0.57, 0.53, - 0.01, -23.47, 25.20, 0.16, 0.20, 0.56, 0.52, 0.02, - 19.58, 27.50, -0.12, 0.10, 0.62, -0.44, -0.01, -22.67, - -24.40, -0.08, 0.10, -0.55, 0.51, 0.01, -19.97, 25.00, - 0.12, 0.20, 0.56, 0.45, 0.01, 21.28, -22.80, -0.08, - -0.10, -0.51, -0.48, -0.01, -30.47, 0.91, 0.04, 0.00, - - /* 980-1107 */ - 0.00, 0.68, 18.58, 24.00, 0.04, -0.10, 0.54, -0.42, - -0.01, -18.02, 24.40, -0.04, -0.10, 0.55, 0.40, 0.01, - 17.74, 22.50, 0.08, -0.10, 0.50, -0.40, -0.01, -19.41, - 20.70, 0.08, 0.10, 0.46, 0.43, 0.01, -18.64, 20.11, - 0.00, 0.00, 0.45, 0.42, 0.01, -16.75, 21.60, 0.04, - 0.10, 0.48, 0.37, 0.01, -18.42, -20.00, 0.00, 0.00, - -0.45, 0.41, 0.01, -26.77, 1.41, 0.08, 0.00, 0.00, - 0.60, -26.17, -0.19, 0.00, 0.00, 0.00, 0.59, -15.52, - 20.51, 0.00, 0.00, 0.46, 0.35, 0.01, -25.42, -1.91, - -0.08, 0.00, -0.04, 0.57, 0.45, -17.42, 18.10, 0.00, - 0.00, 0.40, 0.39, 0.01, 16.39, -17.60, -0.08, -0.10, - -0.39, -0.37, -0.01, -14.37, 18.91, 0.00, 0.00, 0.42, - 0.32, 0.01, 23.39, -2.40, -0.12, 0.00, 0.00, -0.52, - 14.32, -18.50, -0.04, -0.10, -0.41, -0.32, -0.01, 15.69, - 17.08, 0.00, 0.00, 0.38, -0.35, -0.01, -22.99, 0.50, - 0.04, 0.00, 0.00, 0.51, 0.00, 0.00, 14.47, -17.60, - - /* 1108-1235 */ - -0.01, 0.00, -0.39, -0.32, -13.33, 18.40, -0.04, -0.10, - 0.41, 0.30, 22.47, -0.60, -0.04, 0.00, 0.00, -0.50, - -12.78, -17.41, 0.04, 0.00, -0.39, 0.29, 0.01, -14.10, - -15.31, 0.04, 0.00, -0.34, 0.32, 0.01, 11.98, 16.21, - -0.04, 0.00, 0.36, -0.27, -0.01, 19.65, -1.90, -0.08, - 0.00, 0.00, -0.44, 19.61, -1.50, -0.08, 0.00, 0.00, - -0.44, 13.41, -14.30, -0.04, -0.10, -0.32, -0.30, -0.01, - -13.29, 14.40, 0.00, 0.00, 0.32, 0.30, 0.01, 11.14, - -14.40, -0.04, 0.00, -0.32, -0.25, -0.01, 12.24, -13.38, - 0.04, 0.00, -0.30, -0.27, -0.01, 10.07, -13.81, 0.04, - 0.00, -0.31, -0.23, -0.01, 10.46, 13.10, 0.08, -0.10, - 0.29, -0.23, -0.01, 16.55, -1.71, -0.08, 0.00, 0.00, - -0.37, 9.75, -12.80, 0.00, 0.00, -0.29, -0.22, -0.01, - 9.11, 12.80, 0.00, 0.00, 0.29, -0.20, 0.00, 0.00, - -6.44, -13.80, 0.00, 0.00, -0.31, 0.14, -9.19, -12.00, - 0.00, 0.00, -0.27, 0.21, -10.30, 10.90, 0.08, 0.10, - - /* 1236-1363 */ - 0.24, 0.23, 0.01, 14.92, -0.80, -0.04, 0.00, 0.00, - -0.33, 10.02, -10.80, 0.00, 0.00, -0.24, -0.22, -0.01, - -9.75, 10.40, 0.04, 0.00, 0.23, 0.22, 0.01, 9.67, - -10.40, -0.04, 0.00, -0.23, -0.22, -0.01, -8.28, -11.20, - 0.04, 0.00, -0.25, 0.19, 13.32, -1.41, -0.08, 0.00, - 0.00, -0.30, 8.27, 10.50, 0.04, 0.00, 0.23, -0.19, - 0.00, 0.00, 13.13, 0.00, 0.00, 0.00, 0.00, -0.29, - -12.93, 0.70, 0.04, 0.00, 0.00, 0.29, 7.91, -10.20, - 0.00, 0.00, -0.23, -0.18, -7.84, -10.00, -0.04, 0.00, - -0.22, 0.18, 7.44, 9.60, 0.00, 0.00, 0.21, -0.17, - -7.64, 9.40, 0.08, 0.10, 0.21, 0.17, 0.01, -11.38, - 0.60, 0.04, 0.00, 0.00, 0.25, -7.48, 8.30, 0.00, - 0.00, 0.19, 0.17, -10.98, -0.20, 0.00, 0.00, 0.00, - 0.25, 10.98, 0.20, 0.00, 0.00, 0.00, -0.25, 7.40, - -7.90, -0.04, 0.00, -0.18, -0.17, -6.09, 8.40, -0.04, - 0.00, 0.19, 0.14, -6.94, -7.49, 0.00, 0.00, -0.17, - - /* 1364-1491 */ - 0.16, 6.92, 7.50, 0.04, 0.00, 0.17, -0.15, 6.20, - 8.09, 0.00, 0.00, 0.18, -0.14, -6.12, 7.80, 0.04, - 0.00, 0.17, 0.14, 5.85, -7.50, 0.00, 0.00, -0.17, - -0.13, -6.48, 6.90, 0.08, 0.10, 0.15, 0.14, 0.01, - 6.32, 6.90, 0.00, 0.00, 0.15, -0.14, 5.61, -7.20, - 0.00, 0.00, -0.16, -0.13, 9.07, 0.00, 0.00, 0.00, - 0.00, -0.20, 5.25, 6.90, 0.00, 0.00, 0.15, -0.12, - -8.47, -0.40, 0.00, 0.00, 0.00, 0.19, 6.32, -5.39, - -1.11, 1.10, -0.12, -0.14, 0.02, 0.02, 5.73, -6.10, - -0.04, 0.00, -0.14, -0.13, 4.70, 6.60, -0.04, 0.00, - 0.15, -0.11, -4.90, -6.40, 0.00, 0.00, -0.14, 0.11, - -5.33, 5.60, 0.04, 0.10, 0.13, 0.12, 0.01, -4.81, - 6.00, 0.04, 0.00, 0.13, 0.11, 5.13, 5.50, 0.04, - 0.00, 0.12, -0.11, 4.50, 5.90, 0.00, 0.00, 0.13, - -0.10, -4.22, 6.10, 0.00, 0.00, 0.14, -4.53, 5.70, - 0.00, 0.00, 0.13, 0.10, 4.18, 5.70, 0.00, 0.00, - - /* 1492-1619 */ - 0.13, -4.75, -5.19, 0.00, 0.00, -0.12, 0.11, -4.06, - 5.60, 0.00, 0.00, 0.13, -3.98, 5.60, -0.04, 0.00, - 0.13, 4.02, -5.40, 0.00, 0.00, -0.12, 4.49, -4.90, - -0.04, 0.00, -0.11, -0.10, -3.62, -5.40, -0.16, 0.20, - -0.12, 0.00, 0.01, 4.38, 4.80, 0.00, 0.00, 0.11, - -6.40, -0.10, 0.00, 0.00, 0.00, 0.14, -3.98, 5.00, - 0.04, 0.00, 0.11, -3.82, -5.00, 0.00, 0.00, -0.11, - -3.71, 5.07, 0.00, 0.00, 0.11, 4.14, 4.40, 0.00, - 0.00, 0.10, -6.01, -0.50, -0.04, 0.00, 0.00, 0.13, - -4.04, 4.39, 0.00, 0.00, 0.10, 3.45, -4.72, 0.00, - 0.00, -0.11, 3.31, 4.71, 0.00, 0.00, 0.11, 3.26, - -4.50, 0.00, 0.00, -0.10, -3.26, -4.50, 0.00, 0.00, - -0.10, -3.34, -4.40, 0.00, 0.00, -0.10, -3.74, -4.00, - 3.70, 4.00, 3.34, -4.30, 3.30, -4.30, -3.66, 3.90, - 0.04, 3.66, 3.90, 0.04, -3.62, -3.90, -3.61, 3.90, - -0.20, 5.30, 0.00, 0.00, 0.12, 3.06, 4.30, 3.30, - - /* 1620-1747 */ - 4.00, 0.40, 0.20, 3.10, 4.10, -3.06, 3.90, -3.30, - -3.60, -3.30, 3.36, 0.01, 3.14, 3.40, -4.57, -0.20, - 0.00, 0.00, 0.00, 0.10, -2.70, -3.60, 2.94, -3.20, - -2.90, 3.20, 2.47, -3.40, 2.55, -3.30, 2.80, -3.08, - 2.51, 3.30, -4.10, 0.30, -0.12, -0.10, 4.10, 0.20, - -2.74, 3.00, 2.46, 3.23, -3.66, 1.20, -0.20, 0.20, - 3.74, -0.40, -2.51, -2.80, -3.74, 2.27, -2.90, 0.00, - 0.00, -2.50, 2.70, -2.51, 2.60, -3.50, 0.20, 3.38, - -2.22, -2.50, 3.26, -0.40, 1.95, -2.60, 3.22, -0.40, - -0.04, -1.79, -2.60, 1.91, 2.50, 0.74, 3.05, -0.04, - 0.08, 2.11, -2.30, -2.11, 2.20, -1.87, -2.40, 2.03, - -2.20, -2.03, 2.20, 2.98, 0.00, 0.00, 2.98, -1.71, - 2.40, 2.94, -0.10, -0.12, 0.10, 1.67, 2.40, -1.79, - 2.30, -1.79, 2.20, -1.67, 2.20, 1.79, -2.00, 1.87, - -1.90, 1.63, -2.10, -1.59, 2.10, 1.55, -2.10, -1.55, - 2.10, -2.59, -0.20, -1.75, -1.90, -1.75, 1.90, -1.83, - - /* 1748-1875 */ - -1.80, 1.51, 2.00, -1.51, -2.00, 1.71, 1.80, 1.31, - 2.10, -1.43, 2.00, 1.43, 2.00, -2.43, -1.51, 1.90, - -1.47, 1.90, 2.39, 0.20, -2.39, 1.39, 1.90, 1.39, - -1.80, 1.47, -1.60, 1.47, -1.60, 1.43, -1.50, -1.31, - 1.60, 1.27, -1.60, -1.27, 1.60, 1.27, -1.60, 2.03, - 1.35, 1.50, -1.39, -1.40, 1.95, -0.20, -1.27, 1.49, - 1.19, 1.50, 1.27, 1.40, 1.15, 1.50, 1.87, -0.10, - -1.12, -1.50, 1.87, -1.11, -1.50, -1.11, -1.50, 0.00, - 0.00, 1.19, 1.40, 1.27, -1.30, -1.27, -1.30, -1.15, - 1.40, -1.23, 1.30, -1.23, -1.30, 1.22, -1.29, 1.07, - -1.40, 1.75, -0.20, -1.03, -1.40, -1.07, 1.20, -1.03, - 1.15, 1.07, 1.10, 1.51, -1.03, 1.10, 1.03, -1.10, - 0.00, 0.00, -1.03, -1.10, 0.91, -1.20, -0.88, -1.20, - -0.88, 1.20, -0.95, 1.10, -0.95, -1.10, 1.43, -1.39, - 0.95, -1.00, -0.95, 1.00, -0.80, 1.10, 0.91, -1.00, - -1.35, 0.88, 1.00, -0.83, 1.00, -0.91, 0.90, 0.91, - - /* 1876-2003 */ - 0.90, 0.88, -0.90, -0.76, -1.00, -0.76, 1.00, 0.76, - 1.00, -0.72, 1.00, 0.84, -0.90, 0.84, 0.90, 1.23, - 0.00, 0.00, -0.52, -1.10, -0.68, 1.00, 1.19, -0.20, - 1.19, 0.76, 0.90, 1.15, -0.10, 1.15, -0.10, 0.72, - -0.90, -1.15, -1.15, 0.68, 0.90, -0.68, 0.90, -1.11, - 0.00, 0.00, 0.20, 0.79, 0.80, -1.11, -0.10, 0.00, - 0.00, -0.48, -1.00, -0.76, -0.80, -0.72, -0.80, -1.07, - -0.10, 0.64, 0.80, -0.64, -0.80, 0.64, 0.80, 0.40, - 0.60, 0.52, -0.50, -0.60, -0.80, -0.71, 0.70, -0.99, - 0.99, 0.56, 0.80, -0.56, 0.80, 0.68, -0.70, 0.68, - 0.70, -0.95, -0.64, 0.70, 0.64, 0.70, -0.60, 0.70, - -0.60, -0.70, -0.91, -0.10, -0.51, 0.76, -0.91, -0.56, - 0.70, 0.88, 0.88, -0.63, -0.60, 0.55, -0.60, -0.80, - 0.80, -0.80, -0.52, 0.60, 0.52, 0.60, 0.52, -0.60, - -0.48, 0.60, 0.48, 0.60, 0.48, 0.60, -0.76, 0.44, - -0.60, 0.52, -0.50, -0.52, 0.50, 0.40, 0.60, -0.40, - - /* 2004-2131 */ - -0.60, 0.40, -0.60, 0.72, -0.72, -0.51, -0.50, -0.48, - 0.50, 0.48, -0.50, -0.48, 0.50, -0.48, 0.50, 0.48, - -0.50, -0.48, -0.50, -0.68, -0.68, 0.44, 0.50, -0.64, - -0.10, -0.64, -0.10, -0.40, 0.50, 0.40, 0.50, 0.40, - 0.50, 0.00, 0.00, -0.40, -0.50, -0.36, -0.50, 0.36, - -0.50, 0.60, -0.60, 0.40, -0.40, 0.40, 0.40, -0.40, - 0.40, -0.40, 0.40, -0.56, -0.56, 0.36, -0.40, -0.36, - 0.40, 0.36, -0.40, -0.36, -0.40, 0.36, 0.40, 0.36, - 0.40, -0.52, 0.52, 0.52, 0.32, 0.40, -0.32, 0.40, - -0.32, 0.40, -0.32, 0.40, 0.32, -0.40, -0.32, -0.40, - 0.32, -0.40, 0.28, -0.40, -0.28, 0.40, 0.28, -0.40, - 0.28, 0.40, 0.48, -0.48, 0.48, 0.36, -0.30, -0.36, - -0.30, 0.00, 0.00, 0.20, 0.40, -0.44, 0.44, -0.44, - -0.44, -0.44, -0.44, 0.32, -0.30, 0.32, 0.30, 0.24, - 0.30, -0.12, -0.10, -0.28, 0.30, 0.28, 0.30, 0.28, - 0.30, 0.28, -0.30, 0.28, -0.30, 0.28, -0.30, 0.28, - - /* 2132-2259 */ - 0.30, -0.28, 0.30, 0.40, 0.40, -0.24, 0.30, 0.24, - -0.30, 0.24, -0.30, -0.24, -0.30, 0.24, 0.30, 0.24, - -0.30, -0.24, 0.30, 0.24, -0.30, -0.24, -0.30, 0.24, - -0.30, 0.24, 0.30, -0.24, 0.30, -0.24, 0.30, 0.20, - -0.30, 0.20, -0.30, 0.20, -0.30, 0.20, 0.30, 0.20, - -0.30, 0.20, -0.30, 0.20, 0.30, 0.20, 0.30, -0.20, - -0.30, 0.20, -0.30, 0.20, -0.30, -0.36, -0.36, -0.36, - -0.04, 0.30, 0.12, -0.10, -0.32, -0.24, 0.20, 0.24, - 0.20, 0.20, -0.20, -0.20, -0.20, -0.20, -0.20, 0.20, - 0.20, 0.20, -0.20, 0.20, 0.20, 0.20, 0.20, -0.20, - -0.20, 0.00, 0.00, -0.20, -0.20, -0.20, 0.20, -0.20, - 0.20, 0.20, -0.20, -0.20, -0.20, 0.20, 0.20, 0.20, - 0.20, 0.20, -0.20, 0.20, -0.20, 0.28, 0.28, 0.28, - 0.28, 0.28, 0.28, -0.28, 0.28, 0.12, 0.00, 0.24, - 0.16, -0.20, 0.16, -0.20, 0.16, -0.20, 0.16, 0.20, - -0.16, 0.20, 0.16, 0.20, -0.16, 0.20, -0.16, 0.20, - - /* 2260-2387 */ - -0.16, 0.20, 0.16, -0.20, 0.16, 0.20, 0.16, -0.20, - -0.16, 0.20, -0.16, -0.20, -0.16, 0.20, 0.16, 0.20, - 0.16, -0.20, 0.16, -0.20, 0.16, 0.20, 0.16, 0.20, - 0.16, 0.20, -0.16, -0.20, 0.16, 0.20, -0.16, 0.20, - 0.16, 0.20, -0.16, -0.20, 0.16, -0.20, 0.16, -0.20, - -0.16, -0.20, 0.24, -0.24, -0.24, 0.24, 0.24, 0.12, - 0.20, 0.12, 0.20, -0.12, -0.20, 0.12, -0.20, 0.12, - -0.20, -0.12, 0.20, -0.12, 0.20, -0.12, -0.20, 0.12, - 0.20, 0.12, 0.20, 0.12, -0.20, -0.12, 0.20, 0.12, - -0.20, -0.12, 0.20, 0.12, 0.20, 0.00, 0.00, -0.12, - 0.20, -0.12, 0.20, 0.12, -0.20, -0.12, 0.20, 0.12, - 0.20, 0.00, -0.21, -0.20, 0.00, 0.00, 0.20, -0.20, - -0.20, -0.20, 0.20, -0.16, -0.10, 0.00, 0.17, 0.16, - 0.16, 0.16, 0.16, -0.16, 0.16, 0.16, -0.16, 0.16, - -0.16, 0.16, 0.12, 0.10, 0.12, -0.10, -0.12, 0.10, - -0.12, 0.10, 0.12, -0.10, -0.12, 0.12, -0.12, 0.12, - - /* 2388-2515 */ - -0.12, 0.12, -0.12, -0.12, -0.12, -0.12, -0.12, -0.12, - -0.12, 0.12, 0.12, 0.12, 0.12, -0.12, -0.12, 0.12, - 0.12, 0.12, -0.12, 0.12, -0.12, -0.12, -0.12, 0.12, - -0.12, -0.12, 0.12, 0.00, 0.11, 0.11, -122.67, 164.70, - 203.78, 273.50, 3.58, 2.74, 6.18, -4.56, 0.00, -0.04, - 0.00, -0.07, 57.44, -77.10, 95.82, 128.60, -1.77, -1.28, - 2.85, -2.14, 82.14, 89.50, 0.00, 0.00, 2.00, -1.84, - -0.04, 47.73, -64.10, 23.79, 31.90, -1.45, -1.07, 0.69, - -0.53, -46.38, 50.50, 0.00, 0.00, 1.13, 1.04, 0.02, - -18.38, 0.00, 63.80, 0.00, 0.00, 0.41, 0.00, -1.43, - 59.07, 0.00, 0.00, 0.00, 0.00, -1.32, 57.28, 0.00, - 0.00, 0.00, 0.00, -1.28, -48.65, 0.00, -1.15, 0.00, - 0.00, 1.09, 0.00, 0.03, -18.30, 24.60, -17.30, -23.20, - 0.56, 0.41, -0.51, 0.39, -16.91, 26.90, 8.43, 13.30, - 0.60, 0.38, 0.31, -0.19, 1.23, -1.70, -19.13, -25.70, - -0.03, -0.03, -0.58, 0.43, -0.72, 0.90, -17.34, -23.30, - - /* 2516-2643 */ - 0.03, 0.02, -0.52, 0.39, -19.49, -21.30, 0.00, 0.00, - -0.48, 0.44, 0.01, 20.57, -20.10, 0.64, 0.70, -0.45, - -0.46, 0.00, -0.01, 4.89, 5.90, -16.55, 19.90, 0.14, - -0.11, 0.44, 0.37, 18.22, 19.80, 0.00, 0.00, 0.44, - -0.41, -0.01, 4.89, -5.30, -16.51, -18.00, -0.11, -0.11, - -0.41, 0.37, -17.86, 0.00, 17.10, 0.00, 0.00, 0.40, - 0.00, -0.38, 0.32, 0.00, 24.42, 0.00, 0.00, -0.01, - 0.00, -0.55, -23.79, 0.00, 0.00, 0.00, 0.00, 0.53, - 14.72, -16.00, -0.32, 0.00, -0.36, -0.33, -0.01, 0.01, - 3.34, -4.50, 11.86, 15.90, -0.11, -0.07, 0.35, -0.27, - -3.26, 4.40, 11.62, 15.60, 0.09, 0.07, 0.35, -0.26, - -19.53, 0.00, 5.09, 0.00, 0.00, 0.44, 0.00, -0.11, - -13.48, 14.70, 0.00, 0.00, 0.33, 0.30, 0.01, 10.86, - -14.60, 3.18, 4.30, -0.33, -0.24, 0.09, -0.07, -11.30, - -15.10, 0.00, 0.00, -0.34, 0.25, 0.01, 2.03, -2.70, - 10.82, 14.50, -0.07, -0.05, 0.32, -0.24, 17.46, 0.00, - - /* 2644-2771 */ - 0.00, 0.00, 0.00, -0.39, 16.43, 0.00, 0.52, 0.00, - 0.00, -0.37, 0.00, -0.01, 9.35, 0.00, 13.29, 0.00, - 0.00, -0.21, 0.00, -0.30, -10.42, 11.40, 0.00, 0.00, - 0.25, 0.23, 0.01, 0.44, 0.50, -10.38, 11.30, 0.02, - -0.01, 0.25, 0.23, -14.64, 0.00, 0.00, 0.00, 0.00, - 0.33, 0.56, 0.80, -8.67, 11.70, 0.02, -0.01, 0.26, - 0.19, 13.88, 0.00, -2.47, 0.00, 0.00, -0.31, 0.00, - 0.06, -1.99, 2.70, 7.72, 10.30, 0.06, 0.04, 0.23, - -0.17, -0.20, 0.00, 13.05, 0.00, 0.00, 0.00, 0.00, - -0.29, 6.92, -9.30, 3.34, 4.50, -0.21, -0.15, 0.10, - -0.07, -6.60, 0.00, 10.70, 0.00, 0.00, 0.15, 0.00, - -0.24, -8.04, -8.70, 0.00, 0.00, -0.19, 0.18, -10.58, - 0.00, -3.10, 0.00, 0.00, 0.24, 0.00, 0.07, -7.32, - 8.00, -0.12, -0.10, 0.18, 0.16, 1.63, 1.70, 6.96, - -7.60, 0.03, -0.04, -0.17, -0.16, -3.62, 0.00, 9.86, - 0.00, 0.00, 0.08, 0.00, -0.22, 0.20, -0.20, -6.88, - - /* 2772-2899 */ - -7.50, 0.00, 0.00, -0.17, 0.15, -8.99, 0.00, 4.02, - 0.00, 0.00, 0.20, 0.00, -0.09, -1.07, 1.40, -5.69, - -7.70, 0.03, 0.02, -0.17, 0.13, 6.48, -7.20, -0.48, - -0.50, -0.16, -0.14, -0.01, 0.01, 5.57, -7.50, 1.07, - 1.40, -0.17, -0.12, 0.03, -0.02, 8.71, 0.00, 3.54, - 0.00, 0.00, -0.19, 0.00, -0.08, 0.40, 0.00, 9.27, - 0.00, 0.00, -0.01, 0.00, -0.21, -6.13, 6.70, -1.19, - -1.30, 0.15, 0.14, -0.03, 0.03, 5.21, -5.70, -2.51, - -2.60, -0.13, -0.12, -0.06, 0.06, 5.69, -6.20, -0.12, - -0.10, -0.14, -0.13, -0.01, 2.03, -2.70, 4.53, 6.10, - -0.06, -0.05, 0.14, -0.10, 5.01, 5.50, -2.51, 2.70, - 0.12, -0.11, 0.06, 0.06, -1.91, 2.60, -4.38, -5.90, - 0.06, 0.04, -0.13, 0.10, 4.65, -6.30, 0.00, 0.00, - -0.14, -0.10, -5.29, 5.70, 0.00, 0.00, 0.13, 0.12, - -2.23, -4.00, -4.65, 4.20, -0.09, 0.05, 0.10, 0.10, - -4.53, 6.10, 0.00, 0.00, 0.14, 0.10, 2.47, 2.70, - - /* 2900-3027 */ - -4.46, 4.90, 0.06, -0.06, 0.11, 0.10, -5.05, 5.50, - 0.84, 0.90, 0.12, 0.11, 0.02, -0.02, 4.97, -5.40, - -1.71, 0.00, -0.12, -0.11, 0.00, 0.04, -0.99, -1.30, - 4.22, -5.70, -0.03, 0.02, -0.13, -0.09, 0.99, 1.40, - 4.22, -5.60, 0.03, -0.02, -0.13, -0.09, -4.69, -5.20, - 0.00, 0.00, -0.12, 0.10, -3.42, 0.00, 6.09, 0.00, - 0.00, 0.08, 0.00, -0.14, -4.65, -5.10, 0.00, 0.00, - -0.11, 0.10, 0.00, 0.00, -4.53, -5.00, 0.00, 0.00, - -0.11, 0.10, -2.43, -2.70, -3.82, 4.20, -0.06, 0.05, - 0.10, 0.09, 0.00, 0.00, -4.53, 4.90, 0.00, 0.00, - 0.11, 0.10, -4.49, -4.90, 0.00, 0.00, -0.11, 0.10, - 2.67, -2.90, -3.62, -3.90, -0.06, -0.06, -0.09, 0.08, - 3.94, -5.30, 0.00, 0.00, -0.12, -3.38, 3.70, -2.78, - -3.10, 0.08, 0.08, -0.07, 0.06, 3.18, -3.50, -2.82, - -3.10, -0.08, -0.07, -0.07, 0.06, -5.77, 0.00, 1.87, - 0.00, 0.00, 0.13, 0.00, -0.04, 3.54, -4.80, -0.64, - - /* 3028-3155 */ - -0.90, -0.11, 0.00, -0.02, -3.50, -4.70, 0.68, -0.90, - -0.11, 0.00, -0.02, 5.49, 0.00, 0.00, 0.00, 0.00, - -0.12, 1.83, -2.50, 2.63, 3.50, -0.06, 0.00, 0.08, - 3.02, -4.10, 0.68, 0.90, -0.09, 0.00, 0.02, 0.00, - 0.00, 5.21, 0.00, 0.00, 0.00, 0.00, -0.12, -3.54, - 3.80, 2.70, 3.60, -1.35, 1.80, 0.08, 0.00, 0.04, - -2.90, 3.90, 0.68, 0.90, 0.09, 0.00, 0.02, 0.80, - -1.10, -2.78, -3.70, -0.02, 0.00, -0.08, 4.10, 0.00, - -2.39, 0.00, 0.00, -0.09, 0.00, 0.05, -1.59, 2.10, - 2.27, 3.00, 0.05, 0.00, 0.07, -2.63, 3.50, -0.48, - -0.60, -2.94, -3.20, -2.94, 3.20, 2.27, -3.00, -1.11, - -1.50, -0.07, 0.00, -0.03, -0.56, -0.80, -2.35, 3.10, - 0.00, -0.60, -3.42, 1.90, -0.12, -0.10, 2.63, -2.90, - 2.51, 2.80, -0.64, 0.70, -0.48, -0.60, 2.19, -2.90, - 0.24, -0.30, 2.15, 2.90, 2.15, -2.90, 0.52, 0.70, - 2.07, -2.80, -3.10, 0.00, 1.79, 0.00, 0.00, 0.07, - - /* 3156-3283 */ - 0.00, -0.04, 0.88, 0.00, -3.46, 2.11, 2.80, -0.36, - 0.50, 3.54, -0.20, -3.50, -1.39, 1.50, -1.91, -2.10, - -1.47, 2.00, 1.39, 1.90, 2.07, -2.30, 0.91, 1.00, - 1.99, -2.70, 3.30, 0.00, 0.60, -0.44, -0.70, -1.95, - 2.60, 2.15, -2.40, -0.60, -0.70, 3.30, 0.84, 0.00, - -3.10, -3.10, 0.00, -0.72, -0.32, 0.40, -1.87, -2.50, - 1.87, -2.50, 0.32, 0.40, -0.24, 0.30, -1.87, -2.50, - -0.24, -0.30, 1.87, -2.50, -2.70, 0.00, 1.55, 2.03, - 2.20, -2.98, -1.99, -2.20, 0.12, -0.10, -0.40, 0.50, - 1.59, 2.10, 0.00, 0.00, -1.79, 2.00, -1.03, 1.40, - -1.15, -1.60, 0.32, 0.50, 1.39, -1.90, 2.35, -1.27, - 1.70, 0.60, 0.80, -0.32, -0.40, 1.35, -1.80, 0.44, - 0.00, 2.23, -0.84, 0.90, -1.27, -1.40, -1.47, 1.60, - -0.28, -0.30, -0.28, 0.40, -1.27, -1.70, 0.28, -0.40, - -1.43, -1.50, 0.00, 0.00, -1.27, -1.70, 2.11, -0.32, - -0.40, -1.23, 1.60, 1.19, -1.30, -0.72, -0.80, 0.72, - - /* 3284-3411 */ - -0.80, -1.15, -1.30, -1.35, -1.50, -1.19, -1.60, -0.12, - 0.20, 1.79, 0.00, -0.88, -0.28, 0.40, 1.11, 1.50, - -1.83, 0.00, 0.56, -0.12, 0.10, -1.27, -1.40, 0.00, - 0.00, 1.15, 1.50, -0.12, 0.20, 1.11, 1.50, 0.36, - -0.50, -1.07, -1.40, -1.11, 1.50, 1.67, 0.00, 0.80, - -1.11, 0.00, 1.43, 1.23, -1.30, -0.24, -1.19, -1.30, - -0.24, 0.20, -0.44, -0.90, -0.95, 1.10, 1.07, -1.40, - 1.15, -1.30, 1.03, -1.10, -0.56, -0.60, -0.68, 0.90, - -0.76, -1.00, -0.24, -0.30, 0.95, -1.30, 0.56, 0.70, - 0.84, -1.10, -0.56, 0.00, -1.55, 0.91, -1.30, 0.28, - 0.30, 0.16, -0.20, 0.95, 1.30, 0.40, -0.50, -0.88, - -1.20, 0.95, -1.10, -0.48, -0.50, 0.00, 0.00, -1.07, - 1.20, 0.44, -0.50, 0.95, 1.10, 0.00, 0.00, 0.92, - -1.30, 0.95, 1.00, -0.52, 0.60, 1.59, 0.24, -0.40, - 0.91, 1.20, 0.84, -1.10, -0.44, -0.60, 0.84, 1.10, - -0.44, 0.60, -0.44, 0.60, -0.84, -1.10, -0.80, 0.00, - - /* 3412-3539 */ - 1.35, 0.76, 0.20, -0.91, -1.00, 0.20, -0.30, -0.91, - -1.20, -0.95, 1.00, -0.48, -0.50, 0.88, 1.00, 0.48, - -0.50, -0.95, -1.10, 0.20, -0.20, -0.99, 1.10, -0.84, - 1.10, -0.24, -0.30, 0.20, -0.30, 0.84, 1.10, -1.39, - 0.00, -0.28, -0.16, 0.20, 0.84, 1.10, 0.00, 0.00, - 1.39, 0.00, 0.00, -0.95, 1.00, 1.35, -0.99, 0.00, - 0.88, -0.52, 0.00, -1.19, 0.20, 0.20, 0.76, -1.00, - 0.00, 0.00, 0.76, 1.00, 0.00, 0.00, 0.76, 1.00, - -0.76, 1.00, 0.00, 0.00, 1.23, 0.76, 0.80, -0.32, - 0.40, -0.72, 0.80, -0.40, -0.40, 0.00, 0.00, -0.80, - -0.90, -0.68, 0.90, -0.16, -0.20, -0.16, -0.20, 0.68, - -0.90, -0.36, 0.50, -0.56, -0.80, 0.72, -0.90, 0.44, - -0.60, -0.48, -0.70, -0.16, 0.00, -1.11, 0.32, 0.00, - -1.07, 0.60, -0.80, -0.28, -0.40, -0.64, 0.00, 0.91, - 1.11, 0.64, -0.90, 0.76, -0.80, 0.00, 0.00, -0.76, - -0.80, 1.03, 0.00, -0.36, -0.64, -0.70, 0.36, -0.40, - - /* 3540-3667 */ - 1.07, 0.36, -0.50, -0.52, -0.70, 0.60, 0.00, 0.88, - 0.95, 0.00, 0.48, 0.16, -0.20, 0.60, 0.80, 0.16, - -0.20, -0.60, -0.80, 0.00, -1.00, 0.12, 0.20, 0.16, - -0.20, 0.68, 0.70, 0.59, -0.80, -0.99, -0.56, -0.60, - 0.36, -0.40, -0.68, -0.70, -0.68, -0.70, -0.36, -0.50, - -0.44, 0.60, 0.64, 0.70, -0.12, 0.10, -0.52, 0.60, - 0.36, 0.40, 0.00, 0.00, 0.95, -0.84, 0.00, 0.44, - 0.56, 0.60, 0.32, -0.30, 0.00, 0.00, 0.60, 0.70, - 0.00, 0.00, 0.60, 0.70, -0.12, -0.20, 0.52, -0.70, - 0.00, 0.00, 0.56, 0.70, -0.12, 0.10, -0.52, -0.70, - 0.00, 0.00, 0.88, -0.76, 0.00, -0.44, 0.00, 0.00, - -0.52, -0.70, 0.52, -0.70, 0.36, -0.40, -0.44, -0.50, - 0.00, 0.00, 0.60, 0.60, 0.84, 0.00, 0.12, -0.24, - 0.00, 0.80, -0.56, 0.60, -0.32, -0.30, 0.48, -0.50, - 0.28, -0.30, -0.48, -0.50, 0.12, 0.20, 0.48, -0.60, - 0.48, 0.60, -0.12, 0.20, 0.24, 0.00, 0.76, -0.52, - - /* 3668-3795 */ - -0.60, -0.52, 0.60, 0.48, -0.50, -0.24, -0.30, 0.12, - -0.10, 0.48, 0.60, 0.52, -0.20, 0.36, 0.40, -0.44, - 0.50, -0.24, -0.30, -0.48, -0.60, -0.44, -0.60, -0.12, - 0.10, 0.76, 0.76, 0.20, -0.20, 0.48, 0.50, 0.40, - -0.50, -0.24, -0.30, 0.44, -0.60, 0.44, -0.60, 0.36, - 0.00, -0.64, 0.72, 0.00, -0.12, 0.00, -0.10, -0.40, - -0.60, -0.20, -0.20, -0.44, 0.50, -0.44, 0.50, 0.20, - 0.20, -0.44, -0.50, 0.20, -0.20, -0.20, 0.20, -0.44, - -0.50, 0.64, 0.00, 0.32, -0.36, 0.50, -0.20, -0.30, - 0.12, -0.10, 0.48, 0.50, -0.12, 0.30, -0.36, -0.50, - 0.00, 0.00, 0.48, 0.50, -0.48, 0.50, 0.68, 0.00, - -0.12, 0.56, -0.40, 0.44, -0.50, -0.12, -0.10, 0.24, - 0.30, -0.40, 0.40, 0.64, 0.00, -0.24, 0.64, 0.00, - -0.20, 0.00, 0.00, 0.44, -0.50, 0.44, 0.50, -0.12, - 0.20, -0.36, -0.50, 0.12, 0.00, 0.64, -0.40, 0.50, - 0.00, 0.10, 0.00, 0.00, -0.40, 0.50, 0.00, 0.00, - - /* 3796-3923 */ - -0.40, -0.50, 0.56, 0.00, 0.28, 0.00, 0.10, 0.36, - 0.50, 0.00, -0.10, 0.36, -0.50, 0.36, 0.50, 0.00, - -0.10, 0.24, -0.20, -0.36, -0.40, 0.16, 0.20, 0.40, - -0.40, 0.00, 0.00, -0.36, -0.50, -0.36, -0.50, -0.32, - -0.50, -0.12, 0.10, 0.20, 0.20, -0.36, 0.40, -0.60, - 0.60, 0.28, 0.00, 0.52, 0.12, -0.10, 0.40, 0.40, - 0.00, -0.50, 0.20, -0.20, -0.32, 0.40, 0.16, 0.20, - -0.16, 0.20, 0.32, 0.40, 0.56, 0.00, -0.12, 0.32, - -0.40, -0.16, -0.20, 0.00, 0.00, 0.40, 0.40, -0.40, - -0.40, -0.40, 0.40, -0.36, 0.40, 0.12, 0.10, 0.00, - 0.10, 0.36, 0.40, 0.00, -0.10, 0.36, 0.40, -0.36, - 0.40, 0.00, 0.10, 0.32, 0.00, 0.44, 0.12, 0.20, - 0.28, -0.40, 0.00, 0.00, 0.36, 0.40, 0.32, -0.40, - -0.16, 0.12, 0.10, 0.32, -0.40, 0.20, 0.30, -0.24, - 0.30, 0.00, 0.10, 0.32, 0.40, 0.00, -0.10, -0.32, - -0.40, -0.32, 0.40, 0.00, 0.10, -0.52, -0.52, 0.52, - - /* 3924-4051 */ - 0.32, -0.40, 0.00, 0.00, 0.32, 0.40, 0.32, -0.40, - 0.00, 0.00, -0.32, -0.40, -0.32, 0.40, 0.32, 0.40, - 0.00, 0.00, 0.32, 0.40, 0.00, 0.00, -0.32, -0.40, - 0.00, 0.00, 0.32, 0.40, 0.16, 0.20, 0.32, -0.30, - -0.16, 0.00, -0.48, -0.20, 0.20, -0.28, -0.30, 0.28, - -0.40, 0.00, 0.00, 0.28, -0.40, 0.00, 0.00, 0.28, - -0.40, 0.00, 0.00, -0.28, -0.40, 0.28, 0.40, -0.28, - -0.40, -0.48, -0.20, 0.20, 0.24, 0.30, 0.44, 0.00, - 0.16, 0.24, 0.30, 0.16, -0.20, 0.24, 0.30, -0.12, - 0.20, 0.20, 0.30, -0.16, 0.20, 0.00, 0.00, 0.44, - -0.32, 0.30, 0.24, 0.00, -0.36, 0.36, 0.00, 0.24, - 0.12, -0.20, 0.20, 0.30, -0.12, 0.00, -0.28, 0.30, - -0.24, 0.30, 0.12, 0.10, -0.28, -0.30, -0.28, 0.30, - 0.00, 0.00, -0.28, -0.30, 0.00, 0.00, -0.28, -0.30, - 0.00, 0.00, 0.28, 0.30, 0.00, 0.00, -0.28, -0.30, - -0.28, 0.30, 0.00, 0.00, -0.28, -0.30, 0.00, 0.00, - - /* 4052-4179 */ - 0.28, 0.30, 0.00, 0.00, -0.28, 0.30, 0.28, -0.30, - -0.28, 0.30, 0.40, 0.40, -0.24, 0.30, 0.00, -0.10, - 0.16, 0.00, 0.36, -0.20, 0.30, -0.12, -0.10, -0.24, - -0.30, 0.00, 0.00, -0.24, 0.30, -0.24, 0.30, 0.00, - 0.00, -0.24, 0.30, -0.24, 0.30, 0.24, -0.30, 0.00, - 0.00, 0.24, -0.30, 0.00, 0.00, 0.24, 0.30, 0.24, - -0.30, 0.24, 0.30, -0.24, 0.30, -0.24, 0.30, -0.20, - 0.20, -0.16, -0.20, 0.00, 0.00, -0.32, 0.20, 0.00, - 0.10, 0.20, -0.30, 0.20, -0.20, 0.12, 0.20, -0.16, - 0.20, 0.16, 0.20, 0.20, 0.30, 0.20, 0.30, 0.00, - 0.00, -0.20, 0.30, 0.00, 0.00, 0.20, 0.30, -0.20, - -0.30, -0.20, -0.30, 0.20, -0.30, 0.00, 0.00, 0.20, - 0.30, 0.00, 0.00, 0.20, 0.30, 0.00, 0.00, 0.20, - 0.30, 0.00, 0.00, 0.20, 0.30, 0.00, 0.00, 0.20, - -0.30, 0.00, 0.00, -0.20, -0.30, 0.00, 0.00, -0.20, - 0.30, 0.00, 0.00, -0.20, 0.30, 0.00, 0.00, 0.36, - - /* 4180-4307 */ - 0.00, 0.00, 0.36, 0.12, 0.10, -0.24, 0.20, 0.12, - -0.20, -0.16, -0.20, -0.13, 0.10, 0.22, 0.21, 0.20, - 0.00, -0.28, 0.32, 0.00, -0.12, -0.20, -0.20, 0.12, - -0.10, 0.12, 0.10, -0.20, 0.20, 0.00, 0.00, -0.32, - 0.32, 0.00, 0.00, 0.32, 0.32, 0.00, 0.00, -0.24, - -0.20, 0.24, 0.20, 0.20, 0.00, -0.24, 0.00, 0.00, - -0.24, -0.20, 0.00, 0.00, 0.24, 0.20, -0.24, -0.20, - 0.00, 0.00, -0.24, 0.20, 0.16, -0.20, 0.12, 0.10, - 0.20, 0.20, 0.00, -0.10, -0.12, 0.10, -0.16, -0.20, - -0.12, -0.10, -0.16, 0.20, 0.20, 0.20, 0.00, 0.00, - -0.20, 0.20, -0.20, 0.20, -0.20, 0.20, -0.20, 0.20, - 0.20, -0.20, -0.20, -0.20, 0.00, 0.00, -0.20, 0.20, - 0.20, 0.00, -0.20, 0.00, 0.00, -0.20, 0.20, -0.20, - 0.20, -0.20, -0.20, -0.20, -0.20, 0.00, 0.00, 0.20, - 0.20, 0.20, 0.20, 0.12, -0.20, -0.12, -0.10, 0.28, - -0.28, 0.16, -0.20, 0.00, -0.10, 0.00, 0.10, -0.16, - - /* 4308-4435 */ - 0.20, 0.00, -0.10, -0.16, -0.20, 0.00, -0.10, 0.16, - -0.20, 0.16, -0.20, 0.00, 0.00, 0.16, 0.20, -0.16, - 0.20, 0.00, 0.00, 0.16, 0.20, 0.16, -0.20, 0.16, - -0.20, -0.16, 0.20, 0.16, -0.20, 0.00, 0.00, 0.16, - 0.20, 0.00, 0.00, 0.16, 0.20, 0.00, 0.00, -0.16, - -0.20, 0.16, -0.20, -0.16, -0.20, 0.00, 0.00, -0.16, - -0.20, 0.00, 0.00, -0.16, 0.20, 0.00, 0.00, 0.16, - -0.20, 0.16, 0.20, 0.16, 0.20, 0.00, 0.00, -0.16, - -0.20, 0.00, 0.00, -0.16, -0.20, 0.00, 0.00, 0.16, - 0.20, 0.16, 0.20, 0.00, 0.00, 0.16, 0.20, 0.16, - -0.20, 0.16, 0.20, 0.00, 0.00, -0.16, 0.20, 0.00, - 0.10, 0.12, -0.20, 0.12, -0.20, 0.00, -0.10, 0.00, - -0.10, 0.12, 0.20, 0.00, -0.10, -0.12, 0.20, -0.15, - 0.20, -0.24, 0.24, 0.00, 0.00, 0.24, 0.24, 0.12, - -0.20, -0.12, -0.20, 0.00, 0.00, 0.12, 0.20, 0.12, - -0.20, 0.12, 0.20, 0.12, 0.20, 0.12, 0.20, 0.12, - - /* 4436-4563 */ - -0.20, -0.12, 0.20, 0.00, 0.00, 0.12, 0.20, 0.12, - 0.00, -0.20, 0.00, 0.00, -0.12, -0.20, 0.12, -0.20, - 0.00, 0.00, 0.12, 0.20, -0.12, 0.20, -0.12, 0.20, - 0.12, -0.20, 0.00, 0.00, 0.12, 0.20, 0.20, 0.00, - 0.12, 0.00, 0.00, -0.12, 0.20, 0.00, 0.00, -0.12, - -0.20, 0.00, 0.00, -0.12, -0.20, -0.12, -0.20, 0.00, - 0.00, 0.12, -0.20, 0.12, -0.20, 0.12, 0.20, -0.12, - -0.20, 0.00, 0.00, 0.12, -0.20, 0.12, -0.20, 0.12, - 0.20, 0.12, 0.00, 0.20, -0.12, -0.20, 0.00, 0.00, - 0.12, 0.20, -0.16, 0.00, 0.16, -0.20, 0.20, 0.00, - 0.00, -0.20, 0.00, 0.00, -0.20, 0.20, 0.00, 0.00, - 0.20, 0.20, -0.20, 0.00, 0.00, -0.20, 0.12, 0.00, - -0.16, 0.20, 0.00, 0.00, 0.20, 0.12, -0.10, 0.00, - 0.10, 0.16, -0.16, -0.16, -0.16, -0.16, -0.16, 0.00, - 0.00, -0.16, 0.00, 0.00, -0.16, -0.16, -0.16, 0.00, - 0.00, -0.16, 0.00, 0.00, 0.16, 0.00, 0.00, 0.16, - - /* 4564-4691 */ - 0.00, 0.00, 0.16, 0.16, 0.00, 0.00, -0.16, 0.00, - 0.00, -0.16, -0.16, 0.00, 0.00, 0.16, 0.00, 0.00, - -0.16, -0.16, 0.00, 0.00, -0.16, -0.16, 0.12, 0.10, - 0.12, -0.10, 0.12, 0.10, 0.00, 0.00, 0.12, 0.10, - -0.12, 0.10, 0.00, 0.00, 0.12, 0.10, 0.12, -0.10, - 0.00, 0.00, -0.12, -0.10, 0.00, 0.00, 0.12, 0.10, - 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, -0.12, 0.00, - 0.00, 0.12, 0.12, 0.12, 0.12, 0.12, 0.00, 0.00, - 0.12, 0.00, 0.00, 0.12, 0.12, 0.00, 0.00, 0.12, - 0.00, 0.00, 0.12, -0.12, -0.12, 0.12, 0.12, -0.12, - -0.12, 0.00, 0.00, 0.12, -0.12, 0.12, 0.12, -0.12, - -0.12, 0.00, 0.00, -0.12, -0.12, 0.00, 0.00, -0.12, - 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, 0.12, 0.00, - 0.00, 0.12, -0.12, 0.00, 0.00, -0.12, 0.12, -0.12, - -0.12, 0.12, 0.00, 0.00, 0.12, 0.12, 0.12, -0.12, - 0.00, 0.00, -0.12, -0.12, -0.12, 0.00, 0.00, -0.12, - - /* 4692-NA */ - -0.12, 0.00, 0.00, 0.12, 0.12, 0.00, 0.00, -0.12, - -0.12, -0.12, -0.12, 0.12, 0.00, 0.00, 0.12, -0.12, - 0.00, 0.00, -0.12, -0.12, 0.00, 0.00, 0.12, -0.12, - -0.12, -0.12, -0.12, 0.12, 0.12, -0.12, -0.12, 0.00, - 0.00, -0.12, 0.00, 0.00, -0.12, 0.12, 0.00, 0.00, - 0.12, 0.00, 0.00, -0.12, -0.12, 0.00, 0.00, -0.12, - -0.12, 0.12, 0.00, 0.00, 0.12, 0.12, 0.00, 0.00, - 0.12, 0.00, 0.00, 0.12, 0.12, 0.08, 0.00, 0.04, - } - - /* Number of amplitude coefficients */ - NA := len(a) - - /* Amplitude usage: X or Y, sin or cos, power of T. */ - jaxy := []int{0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1} - jasc := []int{0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0} - japt := []int{0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4} - - /* Miscellaneous */ - var t, w float64 - var pt [MAXPT + 1]float64 - var fa [14]float64 - var xypr, xypl, xyls, sc [2]float64 - var arg float64 - - var jpt, i, j, jxy, ialast, ifreq, m, ia, jsc int - - /* ------------------------------------------------------------------ */ - - /* Interval between fundamental date J2000.0 and given date (JC). */ - t = ((date1 - DJ00) + date2) / DJC - - /* Powers of T. */ - w = 1.0 - for jpt = 0; jpt <= MAXPT; jpt++ { - pt[jpt] = w - w *= t - } - - /* Initialize totals in X and Y: polynomial, luni-solar, planetary. */ - for jxy = 0; jxy < 2; jxy++ { - xypr[jxy] = 0.0 - xyls[jxy] = 0.0 - xypl[jxy] = 0.0 - } - - /* --------------------------------- */ - /* Fundamental arguments (IERS 2003) */ - /* --------------------------------- */ - - /* Mean anomaly of the Moon. */ - fa[0] = Fal03(t) - - /* Mean anomaly of the Sun. */ - fa[1] = Falp03(t) - - /* Mean argument of the latitude of the Moon. */ - fa[2] = Faf03(t) - - /* Mean elongation of the Moon from the Sun. */ - fa[3] = Fad03(t) - - /* Mean longitude of the ascending node of the Moon. */ - fa[4] = Faom03(t) - - /* Planetary longitudes, Mercury through Neptune. */ - fa[5] = Fame03(t) - fa[6] = Fave03(t) - fa[7] = Fae03(t) - fa[8] = Fama03(t) - fa[9] = Faju03(t) - fa[10] = Fasa03(t) - fa[11] = Faur03(t) - fa[12] = Fane03(t) - - /* General accumulated precession in longitude. */ - fa[13] = Fapa03(t) - - /* -------------------------------------- */ - /* Polynomial part of precession-nutation */ - /* -------------------------------------- */ - - for jxy = 0; jxy < 2; jxy++ { - for j = MAXPT; j >= 0; j-- { - xypr[jxy] += xyp[jxy][j] * pt[j] - } - } - - /* ---------------------------------- */ - /* Nutation periodic terms, planetary */ - /* ---------------------------------- */ - - /* Work backwards through the coefficients per frequency list. */ - ialast = NA - for ifreq = NFPL - 1; ifreq >= 0; ifreq-- { - - /* Obtain the argument functions. */ - arg = 0.0 - for i = 0; i < 14; i++ { - m = mfapl[ifreq][i] - if m != 0 { - arg += float64(m) * fa[i] - } - } - sc[0] = sin(arg) - sc[1] = cos(arg) - - /* Work backwards through the amplitudes at this frequency. */ - ia = nc[ifreq+NFLS] - for i = ialast; i >= ia; i-- { - - /* Coefficient number (0 = 1st). */ - j = i - ia - - /* X or Y. */ - jxy = jaxy[j] - - /* Sin or cos. */ - jsc = jasc[j] - - /* Power of T. */ - jpt = japt[j] - - /* Accumulate the component. */ - xypl[jxy] += a[i-1] * sc[jsc] * pt[jpt] - } - ialast = ia - 1 - } - - /* ----------------------------------- */ - /* Nutation periodic terms, luni-solar */ - /* ----------------------------------- */ - - /* Continue working backwards through the number of coefficients list. */ - for ifreq = NFLS - 1; ifreq >= 0; ifreq-- { - - /* Obtain the argument functions. */ - arg = 0.0 - for i = 0; i < 5; i++ { - m = mfals[ifreq][i] - if m != 0 { - arg += float64(m) * fa[i] - } - } - sc[0] = sin(arg) - sc[1] = cos(arg) - - /* Work backwards through the amplitudes at this frequency. */ - ia = nc[ifreq] - for i = ialast; i >= ia; i-- { - - /* Coefficient number (0 = 1st). */ - j = i - ia - - /* X or Y. */ - jxy = jaxy[j] - - /* Sin or cos. */ - jsc = jasc[j] - - /* Power of T. */ - jpt = japt[j] - - /* Accumulate the component. */ - xyls[jxy] += a[i-1] * sc[jsc] * pt[jpt] - } - ialast = ia - 1 - } - - /* ------------------------------------ */ - /* Results: CIP unit vector components */ - /* ------------------------------------ */ - - *x = DAS2R * (xypr[0] + (xyls[0]+xypl[0])/1e6) - *y = DAS2R * (xypr[1] + (xyls[1]+xypl[1])/1e6) -} - -/* -Xys00a CIP and s, IAU 2000A - -For a given TT date, compute the X,Y coordinates of the Celestial -Intermediate Pole and the CIO locator s, using the IAU 2000A -precession-nutation model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - x,y float64 Celestial Intermediate Pole (Note 2) - s float64 the CIO locator s (Note 3) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The Celestial Intermediate Pole coordinates are the x,y - components of the unit vector in the Geocentric Celestial - Reference System. - - 3) The CIO locator s (in radians) positions the Celestial - Intermediate Origin on the equator of the CIP. - - 4) A faster, but slightly less accurate result (about 1 mas for - X,Y), can be obtained by using instead the iauXys00b function. - -Called: - Pnm00a classical NPB matrix, IAU 2000A - Bpn2xy extract CIP X,Y coordinates from NPB matrix - S00 the CIO locator s, given X,Y, IAU 2000A - -Reference: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func Xys00a(date1, date2 float64, x, y, s *float64) { - var rbpn [3][3]float64 - - /* Form the bias-precession-nutation matrix, IAU 2000A. */ - Pnm00a(date1, date2, &rbpn) - - /* Extract X,Y. */ - Bpn2xy(rbpn, x, y) - - /* Obtain s. */ - *s = S00(date1, date2, *x, *y) -} - -/* -Xys00b CIP and s, IAU 2000B - -For a given TT date, compute the X,Y coordinates of the Celestial -Intermediate Pole and the CIO locator s, using the IAU 2000B -precession-nutation model. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - x,y float64 Celestial Intermediate Pole (Note 2) - s float64 the CIO locator s (Note 3) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The Celestial Intermediate Pole coordinates are the x,y - components of the unit vector in the Geocentric Celestial - Reference System. - - 3) The CIO locator s (in radians) positions the Celestial - Intermediate Origin on the equator of the CIP. - - 4) The present function is faster, but slightly less accurate (about - 1 mas in X,Y), than the iauXys00a function. - -Called: - Pnm00b classical NPB matrix, IAU 2000B - Bpn2xy extract CIP X,Y coordinates from NPB matrix - S00 the CIO locator s, given X,Y, IAU 2000A - -Reference: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) -*/ -func Xys00b(date1, date2 float64, x, y, s *float64) { - var rbpn [3][3]float64 - - /* Form the bias-precession-nutation matrix, IAU 2000A. */ - Pnm00b(date1, date2, &rbpn) - - /* Extract X,Y. */ - Bpn2xy(rbpn, x, y) - - /* Obtain s. */ - *s = S00(date1, date2, *x, *y) -} - -/* -Xys06a CIP and s, IAU 2006/2000A - -For a given TT date, compute the X,Y coordinates of the Celestial -Intermediate Pole and the CIO locator s, using the IAU 2006 -precession and IAU 2000A nutation models. - -Given: - date1,date2 float64 TT as a 2-part Julian Date (Note 1) - -Returned: - x,y float64 Celestial Intermediate Pole (Note 2) - s float64 the CIO locator s (Note 3) - -Notes: - - 1) The TT date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - 2) The Celestial Intermediate Pole coordinates are the x,y components - of the unit vector in the Geocentric Celestial Reference System. - - 3) The CIO locator s (in radians) positions the Celestial - Intermediate Origin on the equator of the CIP. - - 4) Series-based solutions for generating X and Y are also available: - see Capitaine & Wallace (2006) and iauXy06. - -Called: - Pnm06a classical NPB matrix, IAU 2006/2000A - Bpn2xy extract CIP X,Y coordinates from NPB matrix - S06 the CIO locator s, given X,Y, IAU 2006 - -References: - - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 - - Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 -*/ -func Xys06a(date1, date2 float64, x, y, s *float64) { - var rbpn [3][3]float64 - - /* Form the bias-precession-nutation matrix, IAU 2006/2000A. */ - Pnm06a(date1, date2, &rbpn) - - /* Extract X,Y. */ - Bpn2xy(rbpn, x, y) - - /* Obtain s. */ - *s = S06(date1, date2, *x, *y) -} diff --git a/vendor/github.com/hebl/gofa/projection.go b/vendor/github.com/hebl/gofa/projection.go deleted file mode 100644 index fb2184b..0000000 --- a/vendor/github.com/hebl/gofa/projection.go +++ /dev/null @@ -1,563 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -/* -Tpxes Project celestial to tangent plane, spherical - -In the tangent plane projection, given celestial spherical -coordinates for a star and the tangent point, solve for the star's -rectangular coordinates in the tangent plane. - -Given: - a,b float64 star's spherical coordinates - a0,b0 float64 tangent point's spherical coordinates - -Returned: - xi,eta float64 rectangular coordinates of star image (Note 2) - -Returned (function value): - int status: 0 = OK - 1 = star too far from axis - 2 = antistar on tangent plane - 3 = antistar too far from axis - -Notes: - - 1) The tangent plane projection is also called the "gnomonic - projection" and the "central projection". - - 2) The eta axis points due north in the adopted coordinate system. - If the spherical coordinates are observed (RA,Dec), the tangent - plane coordinates (xi,eta) are conventionally called the - "standard coordinates". For right-handed spherical coordinates, - (xi,eta) are also right-handed. The units of (xi,eta) are, - effectively, radians at the tangent point. - - 3) All angular arguments are in radians. - - 4) This function is a member of the following set: - - spherical vector solve for - - > iauTpxes < iauTpxev xi,eta - iauTpsts iauTpstv star - iauTpors iauTporv origin - -References: - - Calabretta M.R. & Greisen, E.W., 2002, "Representations of - celestial coordinates in FITS", Astron.Astrophys. 395, 1077 - - Green, R.M., "Spherical Astronomy", Cambridge University Press, - 1987, Chapter 13. -*/ -func Tpxes(a, b, a0, b0 float64, xi, eta *float64) int { - const TINY = 1e-6 - - var j int - var sb0, sb, cb0, cb, da, sda, cda, d float64 - - /* Functions of the spherical coordinates. */ - sb0 = sin(b0) - sb = sin(b) - cb0 = cos(b0) - cb = cos(b) - da = a - a0 - sda = sin(da) - cda = cos(da) - - /* Reciprocal of star vector length to tangent plane. */ - d = sb*sb0 + cb*cb0*cda - - /* Check for error cases. */ - if d > TINY { - j = 0 - } else if d >= 0.0 { - j = 1 - d = TINY - } else if d > -TINY { - j = 2 - d = -TINY - } else { - j = 3 - } - - /* Return the tangent plane coordinates (even in dubious cases). */ - *xi = cb * sda / d - *eta = (sb*cb0 - cb*sb0*cda) / d - - /* Return the status. */ - return j -} - -/* -Tpxev Project celestial to tangent plane, vector - -In the tangent plane projection, given celestial direction cosines -for a star and the tangent point, solve for the star's rectangular -coordinates in the tangent plane. - -Given: - v [3]float64 direction cosines of star (Note 4) - v0 [3]float64 direction cosines of tangent point (Note 4) - -Returned: - xi,eta float64 tangent plane coordinates of star - -Returned (function value): - int status: 0 = OK - 1 = star too far from axis - 2 = antistar on tangent plane - 3 = antistar too far from axis - -Notes: - - 1) The tangent plane projection is also called the "gnomonic - projection" and the "central projection". - - 2) The eta axis points due north in the adopted coordinate system. - If the direction cosines represent observed (RA,Dec), the tangent - plane coordinates (xi,eta) are conventionally called the - "standard coordinates". If the direction cosines are with - respect to a right-handed triad, (xi,eta) are also right-handed. - The units of (xi,eta) are, effectively, radians at the tangent - point. - - 3) The method used is to extend the star vector to the tangent - plane and then rotate the triad so that (x,y) becomes (xi,eta). - Writing (a,b) for the celestial spherical coordinates of the - star, the sequence of rotations is (a+pi/2) around the z-axis - followed by (pi/2-b) around the x-axis. - - 4) If vector v0 is not of unit length, or if vector v is of zero - length, the results will be wrong. - - 5) If v0 points at a pole, the returned (xi,eta) will be based on - the arbitrary assumption that the longitude coordinate of the - tangent point is zero. - - 6) This function is a member of the following set: - - spherical vector solve for - - iauTpxes > iauTpxev < xi,eta - iauTpsts iauTpstv star - iauTpors iauTporv origin - -References: - - Calabretta M.R. & Greisen, E.W., 2002, "Representations of - celestial coordinates in FITS", Astron.Astrophys. 395, 1077 - - Green, R.M., "Spherical Astronomy", Cambridge University Press, - 1987, Chapter 13. -*/ -func Tpxev(v, v0 [3]float64, xi, eta *float64) int { - const TINY = 1e-6 - var j int - var x, y, z, x0, y0, z0, r2, r, w, d float64 - - /* Star and tangent point. */ - x = v[0] - y = v[1] - z = v[2] - x0 = v0[0] - y0 = v0[1] - z0 = v0[2] - - /* Deal with polar case. */ - r2 = x0*x0 + y0*y0 - r = sqrt(r2) - if r == 0.0 { - r = 1e-20 - x0 = r - } - - /* Reciprocal of star vector length to tangent plane. */ - w = x*x0 + y*y0 - d = w + z*z0 - - /* Check for error cases. */ - if d > TINY { - j = 0 - } else if d >= 0.0 { - j = 1 - d = TINY - } else if d > -TINY { - j = 2 - d = -TINY - } else { - j = 3 - } - - /* Return the tangent plane coordinates (even in dubious cases). */ - d *= r - *xi = (y*x0 - x*y0) / d - *eta = (z*r2 - z0*w) / d - - /* Return the status. */ - return j -} - -/* -Tpsts Project tangent plane to celestial, spherical - -In the tangent plane projection, given the star's rectangular -coordinates and the spherical coordinates of the tangent point, -solve for the spherical coordinates of the star. - -Given: - xi,eta float64 rectangular coordinates of star image (Note 2) - a0,b0 float64 tangent point's spherical coordinates - -Returned: - a,b float64 star's spherical coordinates - -Notes: - - 1) The tangent plane projection is also called the "gnomonic - projection" and the "central projection". - - 2) The eta axis points due north in the adopted coordinate system. - If the spherical coordinates are observed (RA,Dec), the tangent - plane coordinates (xi,eta) are conventionally called the - "standard coordinates". If the spherical coordinates are with - respect to a right-handed triad, (xi,eta) are also right-handed. - The units of (xi,eta) are, effectively, radians at the tangent - point. - - 3) All angular arguments are in radians. - - 4) This function is a member of the following set: - - spherical vector solve for - - iauTpxes iauTpxev xi,eta - > iauTpsts < iauTpstv star - iauTpors iauTporv origin - -Called: - Anp normalize angle into range 0 to 2pi - -References: - - Calabretta M.R. & Greisen, E.W., 2002, "Representations of - celestial coordinates in FITS", Astron.Astrophys. 395, 1077 - - Green, R.M., "Spherical Astronomy", Cambridge University Press, - 1987, Chapter 13. -*/ -func Tpsts(xi, eta, a0, b0 float64, a, b *float64) { - var sb0, cb0, d float64 - - sb0 = sin(b0) - cb0 = cos(b0) - d = cb0 - eta*sb0 - *a = Anp(atan2(xi, d) + a0) - *b = atan2(sb0+eta*cb0, sqrt(xi*xi+d*d)) -} - -/* -Tpstv Project tangent plane to celestial, vector - -In the tangent plane projection, given the star's rectangular -coordinates and the direction cosines of the tangent point, solve -for the direction cosines of the star. - -Given: - xi,eta float64 rectangular coordinates of star image (Note 2) - v0 [3]float64 tangent point's direction cosines - -Returned: - v [3]float64 star's direction cosines - -Notes: - - 1) The tangent plane projection is also called the "gnomonic - projection" and the "central projection". - - 2) The eta axis points due north in the adopted coordinate system. - If the direction cosines represent observed (RA,Dec), the tangent - plane coordinates (xi,eta) are conventionally called the - "standard coordinates". If the direction cosines are with - respect to a right-handed triad, (xi,eta) are also right-handed. - The units of (xi,eta) are, effectively, radians at the tangent - point. - - 3) The method used is to complete the star vector in the (xi,eta) - based triad and normalize it, then rotate the triad to put the - tangent point at the pole with the x-axis aligned to zero - longitude. Writing (a0,b0) for the celestial spherical - coordinates of the tangent point, the sequence of rotations is - (b-pi/2) around the x-axis followed by (-a-pi/2) around the - z-axis. - - 4) If vector v0 is not of unit length, the returned vector v will - be wrong. - - 5) If vector v0 points at a pole, the returned vector v will be - based on the arbitrary assumption that the longitude coordinate - of the tangent point is zero. - - 6) This function is a member of the following set: - - spherical vector solve for - - iauTpxes iauTpxev xi,eta - iauTpsts > iauTpstv < star - iauTpors iauTporv origin - - References: - - Calabretta M.R. & Greisen, E.W., 2002, "Representations of - celestial coordinates in FITS", Astron.Astrophys. 395, 1077 - - Green, R.M., "Spherical Astronomy", Cambridge University Press, - 1987, Chapter 13. -*/ -func Tpstv(xi, eta float64, v0 [3]float64, v *[3]float64) { - var x, y, z, f, r float64 - - /* Tangent point. */ - x = v0[0] - y = v0[1] - z = v0[2] - - /* Deal with polar case. */ - r = sqrt(x*x + y*y) - if r == 0.0 { - r = 1e-20 - x = r - } - - /* Star vector length to tangent plane. */ - f = sqrt(1.0 + xi*xi + eta*eta) - - /* Apply the transformation and normalize. */ - v[0] = (x - (xi*y+eta*x*z)/r) / f - v[1] = (y + (xi*x-eta*y*z)/r) / f - v[2] = (z + eta*r) / f -} - -/* -Tpors Solve for tangent point, spherical - -In the tangent plane projection, given the rectangular coordinates -of a star and its spherical coordinates, determine the spherical -coordinates of the tangent point. - -Given: - xi,eta float64 rectangular coordinates of star image (Note 2) - a,b float64 star's spherical coordinates (Note 3) - -Returned: - a01,b01 float64 tangent point's spherical coordinates, Soln. 1 - a02,b02 float64 tangent point's spherical coordinates, Soln. 2 - -Returned (function value): - int number of solutions: - 0 = no solutions returned (Note 5) - 1 = only the first solution is useful (Note 6) - 2 = both solutions are useful (Note 6) - -Notes: - - 1) The tangent plane projection is also called the "gnomonic - projection" and the "central projection". - - 2) The eta axis points due north in the adopted coordinate system. - If the spherical coordinates are observed (RA,Dec), the tangent - plane coordinates (xi,eta) are conventionally called the - "standard coordinates". If the spherical coordinates are with - respect to a right-handed triad, (xi,eta) are also right-handed. - The units of (xi,eta) are, effectively, radians at the tangent - point. - - 3) All angular arguments are in radians. - - 4) The angles a01 and a02 are returned in the range 0-2pi. The - angles b01 and b02 are returned in the range +/-pi, but in the - usual, non-pole-crossing, case, the range is +/-pi/2. - - 5) Cases where there is no solution can arise only near the poles. - For example, it is clearly impossible for a star at the pole - itself to have a non-zero xi value, and hence it is meaningless - to ask where the tangent point would have to be to bring about - this combination of xi and dec. - - 6) Also near the poles, cases can arise where there are two useful - solutions. The return value indicates whether the second of the - two solutions returned is useful; 1 indicates only one useful - solution, the usual case. - - 7) The basis of the algorithm is to solve the spherical triangle PSC, - where P is the north celestial pole, S is the star and C is the - tangent point. The spherical coordinates of the tangent point are - [a0,b0]; writing rho^2 = (xi^2+eta^2) and r^2 = (1+rho^2), side c - is then (pi/2-b), side p is sqrt(xi^2+eta^2) and side s (to be - found) is (pi/2-b0). Angle C is given by sin(C) = xi/rho and - cos(C) = eta/rho. Angle P (to be found) is the longitude - difference between star and tangent point (a-a0). - - 8) This function is a member of the following set: - - spherical vector solve for - - iauTpxes iauTpxev xi,eta - iauTpsts iauTpstv star - > iauTpors < iauTporv origin - - Called: - Anp normalize angle into range 0 to 2pi - - References: - - Calabretta M.R. & Greisen, E.W., 2002, "Representations of - celestial coordinates in FITS", Astron.Astrophys. 395, 1077 - - Green, R.M., "Spherical Astronomy", Cambridge University Press, - 1987, Chapter 13. -*/ -func Tpors(xi, eta, a, b float64, a01, b01, a02, b02 *float64) int { - var xi2, r, sb, cb, rsb, rcb, w2, w, s, c float64 - - xi2 = xi * xi - r = sqrt(1.0 + xi2 + eta*eta) - sb = sin(b) - cb = cos(b) - rsb = r * sb - rcb = r * cb - w2 = rcb*rcb - xi2 - if w2 >= 0.0 { - w = sqrt(w2) - s = rsb - eta*w - c = rsb*eta + w - if xi == 0.0 && w == 0.0 { - w = 1.0 - } - *a01 = Anp(a - atan2(xi, w)) - *b01 = atan2(s, c) - w = -w - s = rsb - eta*w - c = rsb*eta + w - *a02 = Anp(a - atan2(xi, w)) - *b02 = atan2(s, c) - if fabs(rsb) < 1.0 { - return 1 - } else { - return 2 - } - } else { - return 0 - } -} - -/* -Tporv Solve for tangent point, vector - -In the tangent plane projection, given the rectangular coordinates -of a star and its direction cosines, determine the direction -cosines of the tangent point. - -Given: - xi,eta float64 rectangular coordinates of star image (Note 2) - v [3]float64 star's direction cosines (Note 3) - -Returned: - v01 [3]float64 tangent point's direction cosines, Solution 1 - v02 [3]float64 tangent point's direction cosines, Solution 2 - -Returned (function value): - int number of solutions: - 0 = no solutions returned (Note 4) - 1 = only the first solution is useful (Note 5) - 2 = both solutions are useful (Note 5) - -Notes: - - 1) The tangent plane projection is also called the "gnomonic - projection" and the "central projection". - - 2) The eta axis points due north in the adopted coordinate system. - If the direction cosines represent observed (RA,Dec), the tangent - plane coordinates (xi,eta) are conventionally called the - "standard coordinates". If the direction cosines are with - respect to a right-handed triad, (xi,eta) are also right-handed. - The units of (xi,eta) are, effectively, radians at the tangent - point. - - 3) The vector v must be of unit length or the result will be wrong. - - 4) Cases where there is no solution can arise only near the poles. - For example, it is clearly impossible for a star at the pole - itself to have a non-zero xi value, and hence it is meaningless - to ask where the tangent point would have to be. - - 5) Also near the poles, cases can arise where there are two useful - solutions. The return value indicates whether the second of the - two solutions returned is useful; 1 indicates only one useful - solution, the usual case. - - 6) The basis of the algorithm is to solve the spherical triangle - PSC, where P is the north celestial pole, S is the star and C is - the tangent point. Calling the celestial spherical coordinates - of the star and tangent point (a,b) and (a0,b0) respectively, and - writing rho^2 = (xi^2+eta^2) and r^2 = (1+rho^2), and - transforming the vector v into (a,b) in the normal way, side c is - then (pi/2-b), side p is sqrt(xi^2+eta^2) and side s (to be - found) is (pi/2-b0), while angle C is given by sin(C) = xi/rho - and cos(C) = eta/rho; angle P (to be found) is (a-a0). After - solving the spherical triangle, the result (a0,b0) can be - expressed in vector form as v0. - - 7) This function is a member of the following set: - - spherical vector solve for - - iauTpxes iauTpxev xi,eta - iauTpsts iauTpstv star - iauTpors > iauTporv < origin - - References: - - Calabretta M.R. & Greisen, E.W., 2002, "Representations of - celestial coordinates in FITS", Astron.Astrophys. 395, 1077 - - Green, R.M., "Spherical Astronomy", Cambridge University Press, - 1987, Chapter 13. -*/ -func Tporv(xi, eta float64, v [3]float64, v01, v02 *[3]float64) int { - var x, y, z, rxy2, xi2, eta2p1, r, rsb, rcb, w2, w, c float64 - - x = v[0] - y = v[1] - z = v[2] - rxy2 = x*x + y*y - xi2 = xi * xi - eta2p1 = eta*eta + 1.0 - r = sqrt(xi2 + eta2p1) - rsb = r * z - rcb = r * sqrt(x*x+y*y) - w2 = rcb*rcb - xi2 - if w2 > 0.0 { - w = sqrt(w2) - c = (rsb*eta + w) / (eta2p1 * sqrt(rxy2*(w2+xi2))) - v01[0] = c * (x*w + y*xi) - v01[1] = c * (y*w - x*xi) - v01[2] = (rsb - eta*w) / eta2p1 - w = -w - c = (rsb*eta + w) / (eta2p1 * sqrt(rxy2*(w2+xi2))) - v02[0] = c * (x*w + y*xi) - v02[1] = c * (y*w - x*xi) - v02[2] = (rsb - eta*w) / eta2p1 - if fabs(rsb) < 1.0 { - return 1 - } else { - return 2 - } - } else { - return 0 - } -} diff --git a/vendor/github.com/hebl/gofa/sofa_copyr.txt b/vendor/github.com/hebl/gofa/sofa_copyr.txt deleted file mode 100644 index c7a04ef..0000000 --- a/vendor/github.com/hebl/gofa/sofa_copyr.txt +++ /dev/null @@ -1,111 +0,0 @@ -copyr.lis 2021 April 12 - - -COPYRIGHT NOTICE - -Text equivalent to that below appears at the end of every SOFA routine -(with one exception). There are small formatting differences between -the Fortran and C versions. - -The one exception is the "leap second" routine DAT. This uniquely is -classified as "user replaceable", and has a mitigated license statement -that permits the distribution of local variants under the same name. -This measure allows other SOFA routines to call the local variant, which -may be file or network based, or otherwise equipped to pick up IERS leap -second updates with no need to download new SOFA code. - -*+---------------------------------------------------------------------- -* -* Copyright (C) 2021 -* Standards Of Fundamental Astronomy Board -* of the International Astronomical Union. -* -* ===================== -* SOFA Software License -* ===================== -* -* NOTICE TO USER: -* -* BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND -* CONDITIONS WHICH APPLY TO ITS USE. -* -* 1. The Software is owned by the IAU SOFA Board ("SOFA"). -* -* 2. Permission is granted to anyone to use the SOFA software for any -* purpose, including commercial applications, free of charge and -* without payment of royalties, subject to the conditions and -* restrictions listed below. -* -* 3. You (the user) may copy and distribute SOFA source code to others, -* and use and adapt its code and algorithms in your own software, -* on a world-wide, royalty-free basis. That portion of your -* distribution that does not consist of intact and unchanged copies -* of SOFA source code files is a "derived work" that must comply -* with the following requirements: -* -* a) Your work shall be marked or carry a statement that it -* (i) uses routines and computations derived by you from -* software provided by SOFA under license to you; and -* (ii) does not itself constitute software provided by and/or -* endorsed by SOFA. -* -* b) The source code of your derived work must contain descriptions -* of how the derived work is based upon, contains and/or differs -* from the original SOFA software. -* -* c) The names of all routines in your derived work shall not -* include the prefix "iau" or "sofa" or trivial modifications -* thereof such as changes of case. -* -* d) The origin of the SOFA components of your derived work must -* not be misrepresented; you must not claim that you wrote the -* original software, nor file a patent application for SOFA -* software or algorithms embedded in the SOFA software. -* -* e) These requirements must be reproduced intact in any source -* distribution and shall apply to anyone to whom you have -* granted a further right to modify the source code of your -* derived work. -* -* Note that, as originally distributed, the SOFA software is -* intended to be a definitive implementation of the IAU standards, -* and consequently third-party modifications are discouraged. All -* variations, no matter how minor, must be explicitly marked as -* such, as explained above. -* -* 4. You shall not cause the SOFA software to be brought into -* disrepute, either by misuse, or use for inappropriate tasks, or -* by inappropriate modification. -* -* 5. The SOFA software is provided "as is" and SOFA makes no warranty -* as to its use or performance. SOFA does not and cannot warrant -* the performance or results which the user may obtain by using the -* SOFA software. SOFA makes no warranties, express or implied, as -* to non-infringement of third party rights, merchantability, or -* fitness for any particular purpose. In no event will SOFA be -* liable to the user for any consequential, incidental, or special -* damages, including any lost profits or lost savings, even if a -* SOFA representative has been advised of such damages, or for any -* claim by any third party. -* -* 6. The provision of any version of the SOFA software under the terms -* and conditions specified herein does not imply that future -* versions will also be made available under the same terms and -* conditions. -* -* In any published work or commercial product which uses the SOFA -* software directly, acknowledgement (see www.iausofa.org) is -* appreciated. -* -* Correspondence concerning SOFA software should be addressed as -* follows: -* -* By email: sofa@ukho.gov.uk -* By post: IAU SOFA Center -* HM Nautical Almanac Office -* UK Hydrographic Office -* Admiralty Way, Taunton -* Somerset, TA1 2DN -* United Kingdom -* -*----------------------------------------------------------------------- diff --git a/vendor/github.com/hebl/gofa/ts.go b/vendor/github.com/hebl/gofa/ts.go deleted file mode 100644 index 8b9f181..0000000 --- a/vendor/github.com/hebl/gofa/ts.go +++ /dev/null @@ -1,2930 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -import ( - "math" - "strings" -) - -// SOFA Time Scale and Calendar Tools - -// Time Scales (20) - -/* -D2dtf Format 2-part JD for output - -Format for output a 2-part Julian Date (or in the case of UTC a -quasi-JD form that includes special provision for leap seconds). - -Given: - - scale string time scale ID (Note 1) - ndp int resolution (Note 2) - d1,d2 float64 time as a 2-part Julian Date (Notes 3,4) - -Returned: - - iy,im,id int year, month, day in Gregorian calendar (Note 5) - ihmsf [4]int hours, minutes, seconds, fraction (Note 1) - -Returned (function value): - - int status: +1 = dubious year (Note 5) - 0 = OK - -1 = unacceptable date (Note 6) - -Notes: - - 1. scale identifies the time scale. Only the value "UTC" (in upper - case) is significant, and enables handling of leap seconds (see - Note 4). - - 2. ndp is the number of decimal places in the seconds field, and can - have negative as well as positive values, such as: - - ndp resolution - -4 1 00 00 - -3 0 10 00 - -2 0 01 00 - -1 0 00 10 - 0 0 00 01 - 1 0 00 00.1 - 2 0 00 00.01 - 3 0 00 00.001 - - The limits are platform dependent, but a safe range is -5 to +9. - - 3. d1+d2 is Julian Date, apportioned in any convenient way between - the two arguments, for example where d1 is the Julian Day Number - and d2 is the fraction of a day. In the case of UTC, where the - use of JD is problematical, special conventions apply: see the - next note. - - 4. JD cannot unambiguously represent UTC during a leap second unless - special measures are taken. The SOFA internal convention is that - the quasi-JD day represents UTC days whether the length is 86399, - 86400 or 86401 SI seconds. In the 1960-1972 era there were - smaller jumps (in either direction) each time the linear UTC(TAI) - expression was changed, and these "mini-leaps" are also included - in the SOFA convention. - - 5. The warning status "dubious year" flags UTCs that predate the - introduction of the time scale or that are too far in the future - to be trusted. See Dat for further details. - - 6. For calendar conventions and limitations, see Cal2jd. - -Called: - - Jd2cal JD to Gregorian calendar - D2tf decompose days to hms - Dat delta(AT) = TAI-UTC -*/ -func D2dtf(scale string, ndp int, d1, d2 float64, iy, im, id *int, ihmsf *[4]int) int { - var leap bool - var s byte - var iy1, im1, id1, js, iy2, im2, id2, i int - var ihmsf1 [4]int - var a1, b1, fd, dat0, dat12, w, dat24, dleap float64 - - /* The two-part JD. */ - a1 = d1 - b1 = d2 - - /* Provisional calendar date. */ - js = Jd2cal(a1, b1, &iy1, &im1, &id1, &fd) - if js != 0 { - return -1 - } - - /* Is this a leap second day? */ - leap = false - //if ( ! strcmp(scale,"UTC") ) { - if strings.Compare(scale, "UTC") == 0 { - /* TAI-UTC at 0h today. */ - js = Dat(iy1, im1, id1, 0.0, &dat0) - if js < 0 { - return -1 - } - - /* TAI-UTC at 12h today (to detect drift). */ - js = Dat(iy1, im1, id1, 0.5, &dat12) - if js < 0 { - return -1 - } - - /* TAI-UTC at 0h tomorrow (to detect jumps). */ - js = Jd2cal(a1+1.5, b1-fd, &iy2, &im2, &id2, &w) - if js != 0 { - return -1 - } - js = Dat(iy2, im2, id2, 0.0, &dat24) - if js < 0 { - return -1 - } - - /* Any sudden change in TAI-UTC (seconds). */ - dleap = dat24 - (2.0*dat12 - dat0) - - /* If leap second day, scale the fraction of a day into SI. */ - // leap = (math.Abs(dleap) > 0.5) - - // if math.Abs(dleap) > 0.5 { - // leap = 1 - // } - leap = (math.Abs(dleap) > 0.5) - - if leap { - fd += fd * dleap / DAYSEC - } - } - - /* Provisional time of day. */ - D2tf(ndp, fd, &s, &ihmsf1) - - /* Has the (rounded) time gone past 24h? */ - if ihmsf1[0] > 23 { - - /* Yes. We probably need tomorrow's calendar date. */ - js = Jd2cal(a1+1.5, b1-fd, &iy2, &im2, &id2, &w) - if js != 0 { - return -1 - } - - /* Is today a leap second day? */ - if !leap { - - /* No. Use 0h tomorrow. */ - iy1 = iy2 - im1 = im2 - id1 = id2 - ihmsf1[0] = 0 - ihmsf1[1] = 0 - ihmsf1[2] = 0 - - } else { - - /* Yes. Are we past the leap second itself? */ - if ihmsf1[2] > 0 { - - /* Yes. Use tomorrow but allow for the leap second. */ - iy1 = iy2 - im1 = im2 - id1 = id2 - ihmsf1[0] = 0 - ihmsf1[1] = 0 - ihmsf1[2] = 0 - - } else { - /* No. Use 23 59 60... today. */ - ihmsf1[0] = 23 - ihmsf1[1] = 59 - ihmsf1[2] = 60 - } - - /* If rounding to 10s or coarser always go up to new day. */ - if ndp < 0 && ihmsf1[2] == 60 { - iy1 = iy2 - im1 = im2 - id1 = id2 - ihmsf1[0] = 0 - ihmsf1[1] = 0 - ihmsf1[2] = 0 - } - } - } - - /* Results. */ - *iy = iy1 - *im = im1 - *id = id1 - for i = 0; i < 4; i++ { - ihmsf[i] = ihmsf1[i] - } - - /* Status. */ - return js -} - -/* -Dtf2d Encode time and date fields into 2-part JD - -Encode date and time fields into 2-part Julian Date (or in the case -of UTC a quasi-JD form that includes special provision for leap -seconds). - -Given: - - scale string time scale ID (Note 1) - iy,im,id int year, month, day in Gregorian calendar (Note 2) - ihr,imn int hour, minute - sec float64 seconds - -Returned: - - d1,d2 float64 2-part Julian Date (Notes 3,4) - -Returned (function value): - - int status: +3 = both of next two - +2 = time is after end of day (Note 5) - +1 = dubious year (Note 6) - 0 = OK - -1 = bad year - -2 = bad month - -3 = bad day - -4 = bad hour - -5 = bad minute - -6 = bad second (<0) - -Notes: - - 1. scale identifies the time scale. Only the value "UTC" (in upper - case) is significant, and enables handling of leap seconds (see - Note 4). - - 2. For calendar conventions and limitations, see Cal2jd. - - 3. The sum of the results, d1+d2, is Julian Date, where normally d1 - is the Julian Day Number and d2 is the fraction of a day. In the - case of UTC, where the use of JD is problematical, special - conventions apply: see the next note. - - 4. JD cannot unambiguously represent UTC during a leap second unless - special measures are taken. The SOFA internal convention is that - the quasi-JD day represents UTC days whether the length is 86399, - 86400 or 86401 SI seconds. In the 1960-1972 era there were - smaller jumps (in either direction) each time the linear UTC(TAI) - expression was changed, and these "mini-leaps" are also included - in the SOFA convention. - - 5. The warning status "time is after end of day" usually means that - the sec argument is greater than 60.0. However, in a day ending - in a leap second the limit changes to 61.0 (or 59.0 in the case - of a negative leap second). - - 6. The warning status "dubious year" flags UTCs that predate the - introduction of the time scale or that are too far in the future - to be trusted. See Dat for further details. - - 7. Only in the case of continuous and regular time scales (TAI, TT, - TCG, TCB and TDB) is the result d1+d2 a Julian Date, strictly - speaking. In the other cases (UT1 and UTC) the result must be - used with circumspection; in particular the difference between - two such results cannot be interpreted as a precise time - interval. - -Called: - - Cal2jd Gregorian calendar to JD - Dat delta(AT) = TAI-UTC - Jd2cal JD to Gregorian calendar -*/ -func Dtf2d(scale string, iy, im, id, ihr, imn int, sec float64, d1, d2 *float64) int { - var js, iy2, im2, id2 int - var dj, w, day, seclim, dat0, dat12, dat24, dleap, time float64 - - /* Today's Julian Day Number. */ - js = Cal2jd(iy, im, id, &dj, &w) - if js != 0 { - return js - } - dj += w - - /* Day length and final minute length in seconds (provisional). */ - day = DAYSEC - seclim = 60.0 - - /* Deal with the UTC leap second case. */ - if strings.Compare(scale, "UTC") == 0 { - - /* TAI-UTC at 0h today. */ - js = Dat(iy, im, id, 0.0, &dat0) - if js < 0 { - return js - } - - /* TAI-UTC at 12h today (to detect drift). */ - js = Dat(iy, im, id, 0.5, &dat12) - if js < 0 { - return js - } - - /* TAI-UTC at 0h tomorrow (to detect jumps). */ - js = Jd2cal(dj, 1.5, &iy2, &im2, &id2, &w) - if js != 0 { - return js - } - js = Dat(iy2, im2, id2, 0.0, &dat24) - if js < 0 { - return js - } - - /* Any sudden change in TAI-UTC between today and tomorrow. */ - dleap = dat24 - (2.0*dat12 - dat0) - - /* If leap second day, correct the day and final minute lengths. */ - day += dleap - if ihr == 23 && imn == 59 { - seclim += dleap - } - - /* End of UTC-specific actions. */ - } - - /* Validate the time. */ - if ihr >= 0 && ihr <= 23 { - if imn >= 0 && imn <= 59 { - if sec >= 0 { - if sec >= seclim { - js += 2 - } - } else { - js = -6 - } - } else { - js = -5 - } - } else { - js = -4 - } - if js < 0 { - return js - } - - /* The time in days. */ - time = (60.0*(float64(60*ihr+imn)) + sec) / float64(day) - - /* Return the date and time. */ - *d1 = dj - *d2 = time - - /* Status. */ - return js -} - -/* -Dat Delta(AT) (=TAI-UTC) for a given UTC date - -For a given UTC date, calculate Delta(AT) = TAI-UTC. - - :------------------------------------------: - : : - : IMPORTANT : - : : - : A new version of this function must be : - : produced whenever a new leap second is : - : announced. There are four items to : - : change on each such occasion: : - : : - : 1) A new line must be added to the set : - : of statements that initialize the : - : array "changes". : - : : - : 2) The constant IYV must be set to the : - : current year. : - : : - : 3) The "Latest leap second" comment : - : below must be set to the new leap : - : second date. : - : : - : 4) The "This revision" comment, later, : - : must be set to the current date. : - : : - : Change (2) must also be carried out : - : whenever the function is re-issued, : - : even if no leap seconds have been : - : added. : - : : - : Latest leap second: 2016 December 31 : - : : - :__________________________________________: - -Given: - - iy int UTC: year (Notes 1 and 2) - im int month (Note 2) - id int day (Notes 2 and 3) - fd float64 fraction of day (Note 4) - -Returned: - - deltat float64 TAI minus UTC, seconds - -Returned (function value): - - int status (Note 5): - 1 = dubious year (Note 1) - 0 = OK - -1 = bad year - -2 = bad month - -3 = bad day (Note 3) - -4 = bad fraction (Note 4) - -5 = internal error (Note 5) - -Notes: - - 1. UTC began at 1960 January 1.0 (JD 2436934.5) and it is improper - to call the function with an earlier date. If this is attempted, - zero is returned together with a warning status. - - Because leap seconds cannot, in principle, be predicted in - advance, a reliable check for dates beyond the valid range is - impossible. To guard against gross errors, a year five or more - after the release year of the present function (see the constant - IYV) is considered dubious. In this case a warning status is - returned but the result is computed in the normal way. - - For both too-early and too-late years, the warning status is +1. - This is distinct from the error status -1, which signifies a year - so early that JD could not be computed. - - 2. If the specified date is for a day which ends with a leap second, - the TAI-UTC value returned is for the period leading up to the - leap second. If the date is for a day which begins as a leap - second ends, the TAI-UTC returned is for the period following the - leap second. - - 3. The day number must be in the normal calendar range, for example - 1 through 30 for April. The "almanac" convention of allowing - such dates as January 0 and December 32 is not supported in this - function, in order to avoid confusion near leap seconds. - - 4. The fraction of day is used only for dates before the - introduction of leap seconds, the first of which occurred at the - end of 1971. It is tested for validity (0 to 1 is the valid - range) even if not used; if invalid, zero is used and status -4 - is returned. For many applications, setting fd to zero is - acceptable; the resulting error is always less than 3 ms (and - occurs only pre-1972). - - 5. The status value returned in the case where there are multiple - errors refers to the first error detected. For example, if the - month and day are 13 and 32 respectively, status -2 (bad month) - will be returned. The "internal error" status refers to a - case that is impossible but causes some compilers to issue a - warning. - - 6. In cases where a valid result is not available, zero is returned. - -References: - - 1. For dates from 1961 January 1 onwards, the expressions from the - file ftp://maia.usno.navy.mil/ser7/tai-utc.dat are used. - - 2. The 5ms timestep at 1961 January 1 is taken from 2.58.1 (p87) of - the 1992 Explanatory Supplement. - -Called: - - Cal2jd Gregorian calendar to JD -*/ -func Dat(iy, im, id int, fd float64, deltat *float64) int { - /* Release year for this version of Dat */ - const IYV = 2023 - - /* Reference dates (MJD) and drift rates (s/day), pre leap seconds */ - drift := [...][2]float64{ - {37300.0, 0.0012960}, - {37300.0, 0.0012960}, - {37300.0, 0.0012960}, - {37665.0, 0.0011232}, - {37665.0, 0.0011232}, - {38761.0, 0.0012960}, - {38761.0, 0.0012960}, - {38761.0, 0.0012960}, - {38761.0, 0.0012960}, - {38761.0, 0.0012960}, - {38761.0, 0.0012960}, - {38761.0, 0.0012960}, - {39126.0, 0.0025920}, - {39126.0, 0.0025920}, - } - - /* Number of Delta(AT) expressions before leap seconds were introduced */ - // enum { NERA1 = (int) (sizeof drift / sizeof (double) / 2) }; - NERA1 := len(drift) - - /* Dates and Delta(AT)s */ - changes := [...]struct { - iyear int - month int - delat float64 - }{ - {1960, 1, 1.4178180}, - {1961, 1, 1.4228180}, - {1961, 8, 1.3728180}, - {1962, 1, 1.8458580}, - {1963, 11, 1.9458580}, - {1964, 1, 3.2401300}, - {1964, 4, 3.3401300}, - {1964, 9, 3.4401300}, - {1965, 1, 3.5401300}, - {1965, 3, 3.6401300}, - {1965, 7, 3.7401300}, - {1965, 9, 3.8401300}, - {1966, 1, 4.3131700}, - {1968, 2, 4.2131700}, - {1972, 1, 10.0}, - {1972, 7, 11.0}, - {1973, 1, 12.0}, - {1974, 1, 13.0}, - {1975, 1, 14.0}, - {1976, 1, 15.0}, - {1977, 1, 16.0}, - {1978, 1, 17.0}, - {1979, 1, 18.0}, - {1980, 1, 19.0}, - {1981, 7, 20.0}, - {1982, 7, 21.0}, - {1983, 7, 22.0}, - {1985, 7, 23.0}, - {1988, 1, 24.0}, - {1990, 1, 25.0}, - {1991, 1, 26.0}, - {1992, 7, 27.0}, - {1993, 7, 28.0}, - {1994, 7, 29.0}, - {1996, 1, 30.0}, - {1997, 7, 31.0}, - {1999, 1, 32.0}, - {2006, 1, 33.0}, - {2009, 1, 34.0}, - {2012, 7, 35.0}, - {2015, 7, 36.0}, - {2017, 1, 37.0}, - } - - /* Number of Delta(AT) changes */ - // enum { NDAT = (int) (sizeof changes / sizeof changes[0]) }; - NDAT := len(changes) - - /* Miscellaneous local variables */ - var j, i, m int - var da, djm0, djm float64 - - /* Initialize the result to zero. */ - // *deltat = da = 0.0; - *deltat = 0.0 - // da = 0.0 - - /* If invalid fraction of a day, set error status and give up. */ - if fd < 0.0 || fd > 1.0 { - return -4 - } - - /* Convert the date into an MJD. */ - j = Cal2jd(iy, im, id, &djm0, &djm) - - /* If invalid year, month, or day, give up. */ - if j < 0 { - return j - } - - /* If pre-UTC year, set warning status and give up. */ - if iy < changes[0].iyear { - return 1 - } - - /* If suspiciously late year, set warning status but proceed. */ - if iy > IYV+5 { - j = 1 - } - - /* Combine year and month to form a date-ordered integer... */ - m = 12*iy + im - - /* ...and use it to find the preceding table entry. */ - for i = NDAT - 1; i >= 0; i-- { - if m >= (12*changes[i].iyear + changes[i].month) { - break - } - } - - /* Prevent underflow warnings. */ - if i < 0 { - return -5 - } - - /* Get the Delta(AT). */ - da = changes[i].delat - - /* If pre-1972, adjust for drift. */ - if i < NERA1 { - da += (djm + fd - drift[i][0]) * drift[i][1] - } - - /* Return the Delta(AT) value. */ - *deltat = da - - /* Return the status. */ - return j -} - -/* -Dtdb TDB-TT - -An approximation to TDB-TT, the difference between barycentric -dynamical time and terrestrial time, for an observer on the Earth. - -The different time scales - proper, coordinate and realized - are -related to each other: - - TAI <- physically realized - : - offset <- observed (nominally +32.184s) - : - TT <- terrestrial time - : - rate adjustment (L_G) <- definition of TT - : - TCG <- time scale for GCRS - : - "periodic" terms <- Dtdb is an implementation - : - rate adjustment (L_C) <- function of solar-system ephemeris - : - TCB <- time scale for BCRS - : - rate adjustment (-L_B) <- definition of TDB - : - TDB <- TCB scaled to track TT - : - "periodic" terms <- -Dtdb is an approximation - : - TT <- terrestrial time - -Adopted values for the various constants can be found in the IERS -Conventions (McCarthy & Petit 2003). - -Given: - - date1,date2 float64 date, TDB (Notes 1-3) - ut float64 universal time (UT1, fraction of one day) - elong float64 longitude (east positive, radians) - u float64 distance from Earth spin axis (km) - v float64 distance north of equatorial plane (km) - -Returned (function value): - - float64 TDB-TT (seconds) - -Notes: - - 1. The date date1+date2 is a Julian Date, apportioned in any - convenient way between the two arguments. For example, - JD(TT)=2450123.7 could be expressed in any of these ways, - among others: - - date1 date2 - - 2450123.7 0.0 (JD method) - 2451545.0 -1421.3 (J2000 method) - 2400000.5 50123.2 (MJD method) - 2450123.5 0.2 (date & time method) - - The JD method is the most natural and convenient to use in - cases where the loss of several decimal digits of resolution - is acceptable. The J2000 method is best matched to the way - the argument is handled internally and will deliver the - optimum resolution. The MJD method and the date & time methods - are both good compromises between resolution and convenience. - - Although the date is, formally, barycentric dynamical time (TDB), - the terrestrial dynamical time (TT) can be used with no practical - effect on the accuracy of the prediction. - - 2. TT can be regarded as a coordinate time that is realized as an - offset of 32.184s from International Atomic Time, TAI. TT is a - specific linear transformation of geocentric coordinate time TCG, - which is the time scale for the Geocentric Celestial Reference - System, GCRS. - - 3. TDB is a coordinate time, and is a specific linear transformation - of barycentric coordinate time TCB, which is the time scale for - the Barycentric Celestial Reference System, BCRS. - - 4. The difference TCG-TCB depends on the masses and positions of the - bodies of the solar system and the velocity of the Earth. It is - dominated by a rate difference, the residual being of a periodic - character. The latter, which is modeled by the present function, - comprises a main (annual) sinusoidal term of amplitude - approximately 0.00166 seconds, plus planetary terms up to about - 20 microseconds, and lunar and diurnal terms up to 2 microseconds. - These effects come from the changing transverse Doppler effect - and gravitational red-shift as the observer (on the Earth's - surface) experiences variations in speed (with respect to the - BCRS) and gravitational potential. - - 5. TDB can be regarded as the same as TCB but with a rate adjustment - to keep it close to TT, which is convenient for many applications. - The history of successive attempts to define TDB is set out in - Resolution 3 adopted by the IAU General Assembly in 2006, which - defines a fixed TDB(TCB) transformation that is consistent with - contemporary solar-system ephemerides. Future ephemerides will - imply slightly changed transformations between TCG and TCB, which - could introduce a linear drift between TDB and TT; however, any - such drift is unlikely to exceed 1 nanosecond per century. - - 6. The geocentric TDB-TT model used in the present function is that of - Fairhead & Bretagnon (1990), in its full form. It was originally - supplied by Fairhead (private communications with P.T.Wallace, - - 1990. as a Fortran subroutine. The present C function contains an - adaptation of the Fairhead code. The numerical results are - essentially unaffected by the changes, the differences with - respect to the Fairhead & Bretagnon original being at the 1e-20 s - level. - - The topocentric part of the model is from Moyer (1981) and - Murray (1983), with fundamental arguments adapted from - Simon et al. 1994. It is an approximation to the expression - ( v / c ) . ( r / c ), where v is the barycentric velocity of - the Earth, r is the geocentric position of the observer and - c is the speed of light. - - By supplying zeroes for u and v, the topocentric part of the - model can be nullified, and the function will return the Fairhead - & Bretagnon result alone. - - 7. During the interval 1950-2050, the absolute accuracy is better - than +/- 3 nanoseconds relative to time ephemerides obtained by - direct numerical integrations based on the JPL DE405 solar system - ephemeris. - - 8. It must be stressed that the present function is merely a model, - and that numerical integration of solar-system ephemerides is the - definitive method for predicting the relationship between TCG and - TCB and hence between TT and TDB. - -References: - - Fairhead, L., & Bretagnon, P., Astron.Astrophys., 229, 240-247 - (1990). - - IAU 2006 Resolution 3. - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Moyer, T.D., Cel.Mech., 23, 33 (1981). - - Murray, C.A., Vectorial Astrometry, Adam Hilger (1983). - - Seidelmann, P.K. et al., Explanatory Supplement to the - Astronomical Almanac, Chapter 2, University Science Books (1992). - - Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M., - Francou, G. & Laskar, J., Astron.Astrophys., 282, 663-683 (1994). -*/ -func Dtdb(date1, date2 float64, ut, elong, u, v float64) float64 { - var t, tsol, w, elsun, emsun, d, elj, els, wt, w0, w1, w2, w3, w4, - wf, wj float64 - var j int - - /* - ===================== - Fairhead et al. model - ===================== - - 787 sets of three coefficients. - - Each set is - amplitude (microseconds) - frequency (radians per Julian millennium since J2000.0) - phase (radians) - - Sets 1-474 are the T0 terms - " 475-679 " " T1 - " 680-764 " " T2 - " 765-784 " " T3 - " 785-787 " " T4 - */ - - fairhd := [787][3]float64{ - /* 1, 10 */ - {1656.674564e-6, 6283.075849991, 6.240054195}, - {22.417471e-6, 5753.384884897, 4.296977442}, - {13.839792e-6, 12566.151699983, 6.196904410}, - {4.770086e-6, 529.690965095, 0.444401603}, - {4.676740e-6, 6069.776754553, 4.021195093}, - {2.256707e-6, 213.299095438, 5.543113262}, - {1.694205e-6, -3.523118349, 5.025132748}, - {1.554905e-6, 77713.771467920, 5.198467090}, - {1.276839e-6, 7860.419392439, 5.988822341}, - {1.193379e-6, 5223.693919802, 3.649823730}, - - /* 11, 20 */ - {1.115322e-6, 3930.209696220, 1.422745069}, - {0.794185e-6, 11506.769769794, 2.322313077}, - {0.447061e-6, 26.298319800, 3.615796498}, - {0.435206e-6, -398.149003408, 4.349338347}, - {0.600309e-6, 1577.343542448, 2.678271909}, - {0.496817e-6, 6208.294251424, 5.696701824}, - {0.486306e-6, 5884.926846583, 0.520007179}, - {0.432392e-6, 74.781598567, 2.435898309}, - {0.468597e-6, 6244.942814354, 5.866398759}, - {0.375510e-6, 5507.553238667, 4.103476804}, - /* 21, 30 */ - {0.243085e-6, -775.522611324, 3.651837925}, - {0.173435e-6, 18849.227549974, 6.153743485}, - {0.230685e-6, 5856.477659115, 4.773852582}, - {0.203747e-6, 12036.460734888, 4.333987818}, - {0.143935e-6, -796.298006816, 5.957517795}, - {0.159080e-6, 10977.078804699, 1.890075226}, - {0.119979e-6, 38.133035638, 4.551585768}, - {0.118971e-6, 5486.777843175, 1.914547226}, - {0.116120e-6, 1059.381930189, 0.873504123}, - {0.137927e-6, 11790.629088659, 1.135934669}, - /* 31, 40 */ - {0.098358e-6, 2544.314419883, 0.092793886}, - {0.101868e-6, -5573.142801634, 5.984503847}, - {0.080164e-6, 206.185548437, 2.095377709}, - {0.079645e-6, 4694.002954708, 2.949233637}, - {0.062617e-6, 20.775395492, 2.654394814}, - {0.075019e-6, 2942.463423292, 4.980931759}, - {0.064397e-6, 5746.271337896, 1.280308748}, - {0.063814e-6, 5760.498431898, 4.167901731}, - {0.048042e-6, 2146.165416475, 1.495846011}, - {0.048373e-6, 155.420399434, 2.251573730}, - /* 41, 50 */ - {0.058844e-6, 426.598190876, 4.839650148}, - {0.046551e-6, -0.980321068, 0.921573539}, - {0.054139e-6, 17260.154654690, 3.411091093}, - {0.042411e-6, 6275.962302991, 2.869567043}, - {0.040184e-6, -7.113547001, 3.565975565}, - {0.036564e-6, 5088.628839767, 3.324679049}, - {0.040759e-6, 12352.852604545, 3.981496998}, - {0.036507e-6, 801.820931124, 6.248866009}, - {0.036955e-6, 3154.687084896, 5.071801441}, - {0.042732e-6, 632.783739313, 5.720622217}, - /* 51, 60 */ - {0.042560e-6, 161000.685737473, 1.270837679}, - {0.040480e-6, 15720.838784878, 2.546610123}, - {0.028244e-6, -6286.598968340, 5.069663519}, - {0.033477e-6, 6062.663207553, 4.144987272}, - {0.034867e-6, 522.577418094, 5.210064075}, - {0.032438e-6, 6076.890301554, 0.749317412}, - {0.030215e-6, 7084.896781115, 3.389610345}, - {0.029247e-6, -71430.695617928, 4.183178762}, - {0.033529e-6, 9437.762934887, 2.404714239}, - {0.032423e-6, 8827.390269875, 5.541473556}, - /* 61, 70 */ - {0.027567e-6, 6279.552731642, 5.040846034}, - {0.029862e-6, 12139.553509107, 1.770181024}, - {0.022509e-6, 10447.387839604, 1.460726241}, - {0.020937e-6, 8429.241266467, 0.652303414}, - {0.020322e-6, 419.484643875, 3.735430632}, - {0.024816e-6, -1194.447010225, 1.087136918}, - {0.025196e-6, 1748.016413067, 2.901883301}, - {0.021691e-6, 14143.495242431, 5.952658009}, - {0.017673e-6, 6812.766815086, 3.186129845}, - {0.022567e-6, 6133.512652857, 3.307984806}, - /* 71, 80 */ - {0.016155e-6, 10213.285546211, 1.331103168}, - {0.014751e-6, 1349.867409659, 4.308933301}, - {0.015949e-6, -220.412642439, 4.005298270}, - {0.015974e-6, -2352.866153772, 6.145309371}, - {0.014223e-6, 17789.845619785, 2.104551349}, - {0.017806e-6, 73.297125859, 3.475975097}, - {0.013671e-6, -536.804512095, 5.971672571}, - {0.011942e-6, 8031.092263058, 2.053414715}, - {0.014318e-6, 16730.463689596, 3.016058075}, - {0.012462e-6, 103.092774219, 1.737438797}, - /* 81, 90 */ - {0.010962e-6, 3.590428652, 2.196567739}, - {0.015078e-6, 19651.048481098, 3.969480770}, - {0.010396e-6, 951.718406251, 5.717799605}, - {0.011707e-6, -4705.732307544, 2.654125618}, - {0.010453e-6, 5863.591206116, 1.913704550}, - {0.012420e-6, 4690.479836359, 4.734090399}, - {0.011847e-6, 5643.178563677, 5.489005403}, - {0.008610e-6, 3340.612426700, 3.661698944}, - {0.011622e-6, 5120.601145584, 4.863931876}, - {0.010825e-6, 553.569402842, 0.842715011}, - /* 91, 100 */ - {0.008666e-6, -135.065080035, 3.293406547}, - {0.009963e-6, 149.563197135, 4.870690598}, - {0.009858e-6, 6309.374169791, 1.061816410}, - {0.007959e-6, 316.391869657, 2.465042647}, - {0.010099e-6, 283.859318865, 1.942176992}, - {0.007147e-6, -242.728603974, 3.661486981}, - {0.007505e-6, 5230.807466803, 4.920937029}, - {0.008323e-6, 11769.853693166, 1.229392026}, - {0.007490e-6, -6256.777530192, 3.658444681}, - {0.009370e-6, 149854.400134205, 0.673880395}, - /* 101, 110 */ - {0.007117e-6, 38.027672636, 5.294249518}, - {0.007857e-6, 12168.002696575, 0.525733528}, - {0.007019e-6, 6206.809778716, 0.837688810}, - {0.006056e-6, 955.599741609, 4.194535082}, - {0.008107e-6, 13367.972631107, 3.793235253}, - {0.006731e-6, 5650.292110678, 5.639906583}, - {0.007332e-6, 36.648562930, 0.114858677}, - {0.006366e-6, 4164.311989613, 2.262081818}, - {0.006858e-6, 5216.580372801, 0.642063318}, - {0.006919e-6, 6681.224853400, 6.018501522}, - /* 111, 120 */ - {0.006826e-6, 7632.943259650, 3.458654112}, - {0.005308e-6, -1592.596013633, 2.500382359}, - {0.005096e-6, 11371.704689758, 2.547107806}, - {0.004841e-6, 5333.900241022, 0.437078094}, - {0.005582e-6, 5966.683980335, 2.246174308}, - {0.006304e-6, 11926.254413669, 2.512929171}, - {0.006603e-6, 23581.258177318, 5.393136889}, - {0.005123e-6, -1.484472708, 2.999641028}, - {0.004648e-6, 1589.072895284, 1.275847090}, - {0.005119e-6, 6438.496249426, 1.486539246}, - /* 121, 130 */ - {0.004521e-6, 4292.330832950, 6.140635794}, - {0.005680e-6, 23013.539539587, 4.557814849}, - {0.005488e-6, -3.455808046, 0.090675389}, - {0.004193e-6, 7234.794256242, 4.869091389}, - {0.003742e-6, 7238.675591600, 4.691976180}, - {0.004148e-6, -110.206321219, 3.016173439}, - {0.004553e-6, 11499.656222793, 5.554998314}, - {0.004892e-6, 5436.993015240, 1.475415597}, - {0.004044e-6, 4732.030627343, 1.398784824}, - {0.004164e-6, 12491.370101415, 5.650931916}, - /* 131, 140 */ - {0.004349e-6, 11513.883316794, 2.181745369}, - {0.003919e-6, 12528.018664345, 5.823319737}, - {0.003129e-6, 6836.645252834, 0.003844094}, - {0.004080e-6, -7058.598461315, 3.690360123}, - {0.003270e-6, 76.266071276, 1.517189902}, - {0.002954e-6, 6283.143160294, 4.447203799}, - {0.002872e-6, 28.449187468, 1.158692983}, - {0.002881e-6, 735.876513532, 0.349250250}, - {0.003279e-6, 5849.364112115, 4.893384368}, - {0.003625e-6, 6209.778724132, 1.473760578}, - /* 141, 150 */ - {0.003074e-6, 949.175608970, 5.185878737}, - {0.002775e-6, 9917.696874510, 1.030026325}, - {0.002646e-6, 10973.555686350, 3.918259169}, - {0.002575e-6, 25132.303399966, 6.109659023}, - {0.003500e-6, 263.083923373, 1.892100742}, - {0.002740e-6, 18319.536584880, 4.320519510}, - {0.002464e-6, 202.253395174, 4.698203059}, - {0.002409e-6, 2.542797281, 5.325009315}, - {0.003354e-6, -90955.551694697, 1.942656623}, - {0.002296e-6, 6496.374945429, 5.061810696}, - /* 151, 160 */ - {0.003002e-6, 6172.869528772, 2.797822767}, - {0.003202e-6, 27511.467873537, 0.531673101}, - {0.002954e-6, -6283.008539689, 4.533471191}, - {0.002353e-6, 639.897286314, 3.734548088}, - {0.002401e-6, 16200.772724501, 2.605547070}, - {0.003053e-6, 233141.314403759, 3.029030662}, - {0.003024e-6, 83286.914269554, 2.355556099}, - {0.002863e-6, 17298.182327326, 5.240963796}, - {0.002103e-6, -7079.373856808, 5.756641637}, - {0.002303e-6, 83996.847317911, 2.013686814}, - /* 161, 170 */ - {0.002303e-6, 18073.704938650, 1.089100410}, - {0.002381e-6, 63.735898303, 0.759188178}, - {0.002493e-6, 6386.168624210, 0.645026535}, - {0.002366e-6, 3.932153263, 6.215885448}, - {0.002169e-6, 11015.106477335, 4.845297676}, - {0.002397e-6, 6243.458341645, 3.809290043}, - {0.002183e-6, 1162.474704408, 6.179611691}, - {0.002353e-6, 6246.427287062, 4.781719760}, - {0.002199e-6, -245.831646229, 5.956152284}, - {0.001729e-6, 3894.181829542, 1.264976635}, - /* 171, 180 */ - {0.001896e-6, -3128.388765096, 4.914231596}, - {0.002085e-6, 35.164090221, 1.405158503}, - {0.002024e-6, 14712.317116458, 2.752035928}, - {0.001737e-6, 6290.189396992, 5.280820144}, - {0.002229e-6, 491.557929457, 1.571007057}, - {0.001602e-6, 14314.168113050, 4.203664806}, - {0.002186e-6, 454.909366527, 1.402101526}, - {0.001897e-6, 22483.848574493, 4.167932508}, - {0.001825e-6, -3738.761430108, 0.545828785}, - {0.001894e-6, 1052.268383188, 5.817167450}, - /* 181, 190 */ - {0.001421e-6, 20.355319399, 2.419886601}, - {0.001408e-6, 10984.192351700, 2.732084787}, - {0.001847e-6, 10873.986030480, 2.903477885}, - {0.001391e-6, -8635.942003763, 0.593891500}, - {0.001388e-6, -7.046236698, 1.166145902}, - {0.001810e-6, -88860.057071188, 0.487355242}, - {0.001288e-6, -1990.745017041, 3.913022880}, - {0.001297e-6, 23543.230504682, 3.063805171}, - {0.001335e-6, -266.607041722, 3.995764039}, - {0.001376e-6, 10969.965257698, 5.152914309}, - /* 191, 200 */ - {0.001745e-6, 244287.600007027, 3.626395673}, - {0.001649e-6, 31441.677569757, 1.952049260}, - {0.001416e-6, 9225.539273283, 4.996408389}, - {0.001238e-6, 4804.209275927, 5.503379738}, - {0.001472e-6, 4590.910180489, 4.164913291}, - {0.001169e-6, 6040.347246017, 5.841719038}, - {0.001039e-6, 5540.085789459, 2.769753519}, - {0.001004e-6, -170.672870619, 0.755008103}, - {0.001284e-6, 10575.406682942, 5.306538209}, - {0.001278e-6, 71.812653151, 4.713486491}, - /* 201, 210 */ - {0.001321e-6, 18209.330263660, 2.624866359}, - {0.001297e-6, 21228.392023546, 0.382603541}, - {0.000954e-6, 6282.095528923, 0.882213514}, - {0.001145e-6, 6058.731054289, 1.169483931}, - {0.000979e-6, 5547.199336460, 5.448375984}, - {0.000987e-6, -6262.300454499, 2.656486959}, - {0.001070e-6, -154717.609887482, 1.827624012}, - {0.000991e-6, 4701.116501708, 4.387001801}, - {0.001155e-6, -14.227094002, 3.042700750}, - {0.001176e-6, 277.034993741, 3.335519004}, - /* 211, 220 */ - {0.000890e-6, 13916.019109642, 5.601498297}, - {0.000884e-6, -1551.045222648, 1.088831705}, - {0.000876e-6, 5017.508371365, 3.969902609}, - {0.000806e-6, 15110.466119866, 5.142876744}, - {0.000773e-6, -4136.910433516, 0.022067765}, - {0.001077e-6, 175.166059800, 1.844913056}, - {0.000954e-6, -6284.056171060, 0.968480906}, - {0.000737e-6, 5326.786694021, 4.923831588}, - {0.000845e-6, -433.711737877, 4.749245231}, - {0.000819e-6, 8662.240323563, 5.991247817}, - /* 221, 230 */ - {0.000852e-6, 199.072001436, 2.189604979}, - {0.000723e-6, 17256.631536341, 6.068719637}, - {0.000940e-6, 6037.244203762, 6.197428148}, - {0.000885e-6, 11712.955318231, 3.280414875}, - {0.000706e-6, 12559.038152982, 2.824848947}, - {0.000732e-6, 2379.164473572, 2.501813417}, - {0.000764e-6, -6127.655450557, 2.236346329}, - {0.000908e-6, 131.541961686, 2.521257490}, - {0.000907e-6, 35371.887265976, 3.370195967}, - {0.000673e-6, 1066.495477190, 3.876512374}, - /* 231, 240 */ - {0.000814e-6, 17654.780539750, 4.627122566}, - {0.000630e-6, 36.027866677, 0.156368499}, - {0.000798e-6, 515.463871093, 5.151962502}, - {0.000798e-6, 148.078724426, 5.909225055}, - {0.000806e-6, 309.278322656, 6.054064447}, - {0.000607e-6, -39.617508346, 2.839021623}, - {0.000601e-6, 412.371096874, 3.984225404}, - {0.000646e-6, 11403.676995575, 3.852959484}, - {0.000704e-6, 13521.751441591, 2.300991267}, - {0.000603e-6, -65147.619767937, 4.140083146}, - /* 241, 250 */ - {0.000609e-6, 10177.257679534, 0.437122327}, - {0.000631e-6, 5767.611978898, 4.026532329}, - {0.000576e-6, 11087.285125918, 4.760293101}, - {0.000674e-6, 14945.316173554, 6.270510511}, - {0.000726e-6, 5429.879468239, 6.039606892}, - {0.000710e-6, 28766.924424484, 5.672617711}, - {0.000647e-6, 11856.218651625, 3.397132627}, - {0.000678e-6, -5481.254918868, 6.249666675}, - {0.000618e-6, 22003.914634870, 2.466427018}, - {0.000738e-6, 6134.997125565, 2.242668890}, - /* 251, 260 */ - {0.000660e-6, 625.670192312, 5.864091907}, - {0.000694e-6, 3496.032826134, 2.668309141}, - {0.000531e-6, 6489.261398429, 1.681888780}, - {0.000611e-6, -143571.324284214, 2.424978312}, - {0.000575e-6, 12043.574281889, 4.216492400}, - {0.000553e-6, 12416.588502848, 4.772158039}, - {0.000689e-6, 4686.889407707, 6.224271088}, - {0.000495e-6, 7342.457780181, 3.817285811}, - {0.000567e-6, 3634.621024518, 1.649264690}, - {0.000515e-6, 18635.928454536, 3.945345892}, - /* 261, 270 */ - {0.000486e-6, -323.505416657, 4.061673868}, - {0.000662e-6, 25158.601719765, 1.794058369}, - {0.000509e-6, 846.082834751, 3.053874588}, - {0.000472e-6, -12569.674818332, 5.112133338}, - {0.000461e-6, 6179.983075773, 0.513669325}, - {0.000641e-6, 83467.156352816, 3.210727723}, - {0.000520e-6, 10344.295065386, 2.445597761}, - {0.000493e-6, 18422.629359098, 1.676939306}, - {0.000478e-6, 1265.567478626, 5.487314569}, - {0.000472e-6, -18.159247265, 1.999707589}, - /* 271, 280 */ - {0.000559e-6, 11190.377900137, 5.783236356}, - {0.000494e-6, 9623.688276691, 3.022645053}, - {0.000463e-6, 5739.157790895, 1.411223013}, - {0.000432e-6, 16858.482532933, 1.179256434}, - {0.000574e-6, 72140.628666286, 1.758191830}, - {0.000484e-6, 17267.268201691, 3.290589143}, - {0.000550e-6, 4907.302050146, 0.864024298}, - {0.000399e-6, 14.977853527, 2.094441910}, - {0.000491e-6, 224.344795702, 0.878372791}, - {0.000432e-6, 20426.571092422, 6.003829241}, - /* 281, 290 */ - {0.000481e-6, 5749.452731634, 4.309591964}, - {0.000480e-6, 5757.317038160, 1.142348571}, - {0.000485e-6, 6702.560493867, 0.210580917}, - {0.000426e-6, 6055.549660552, 4.274476529}, - {0.000480e-6, 5959.570433334, 5.031351030}, - {0.000466e-6, 12562.628581634, 4.959581597}, - {0.000520e-6, 39302.096962196, 4.788002889}, - {0.000458e-6, 12132.439962106, 1.880103788}, - {0.000470e-6, 12029.347187887, 1.405611197}, - {0.000416e-6, -7477.522860216, 1.082356330}, - /* 291, 300 */ - {0.000449e-6, 11609.862544012, 4.179989585}, - {0.000465e-6, 17253.041107690, 0.353496295}, - {0.000362e-6, -4535.059436924, 1.583849576}, - {0.000383e-6, 21954.157609398, 3.747376371}, - {0.000389e-6, 17.252277143, 1.395753179}, - {0.000331e-6, 18052.929543158, 0.566790582}, - {0.000430e-6, 13517.870106233, 0.685827538}, - {0.000368e-6, -5756.908003246, 0.731374317}, - {0.000330e-6, 10557.594160824, 3.710043680}, - {0.000332e-6, 20199.094959633, 1.652901407}, - /* 301, 310 */ - {0.000384e-6, 11933.367960670, 5.827781531}, - {0.000387e-6, 10454.501386605, 2.541182564}, - {0.000325e-6, 15671.081759407, 2.178850542}, - {0.000318e-6, 138.517496871, 2.253253037}, - {0.000305e-6, 9388.005909415, 0.578340206}, - {0.000352e-6, 5749.861766548, 3.000297967}, - {0.000311e-6, 6915.859589305, 1.693574249}, - {0.000297e-6, 24072.921469776, 1.997249392}, - {0.000363e-6, -640.877607382, 5.071820966}, - {0.000323e-6, 12592.450019783, 1.072262823}, - /* 311, 320 */ - {0.000341e-6, 12146.667056108, 4.700657997}, - {0.000290e-6, 9779.108676125, 1.812320441}, - {0.000342e-6, 6132.028180148, 4.322238614}, - {0.000329e-6, 6268.848755990, 3.033827743}, - {0.000374e-6, 17996.031168222, 3.388716544}, - {0.000285e-6, -533.214083444, 4.687313233}, - {0.000338e-6, 6065.844601290, 0.877776108}, - {0.000276e-6, 24.298513841, 0.770299429}, - {0.000336e-6, -2388.894020449, 5.353796034}, - {0.000290e-6, 3097.883822726, 4.075291557}, - /* 321, 330 */ - {0.000318e-6, 709.933048357, 5.941207518}, - {0.000271e-6, 13095.842665077, 3.208912203}, - {0.000331e-6, 6073.708907816, 4.007881169}, - {0.000292e-6, 742.990060533, 2.714333592}, - {0.000362e-6, 29088.811415985, 3.215977013}, - {0.000280e-6, 12359.966151546, 0.710872502}, - {0.000267e-6, 10440.274292604, 4.730108488}, - {0.000262e-6, 838.969287750, 1.327720272}, - {0.000250e-6, 16496.361396202, 0.898769761}, - {0.000325e-6, 20597.243963041, 0.180044365}, - /* 331, 340 */ - {0.000268e-6, 6148.010769956, 5.152666276}, - {0.000284e-6, 5636.065016677, 5.655385808}, - {0.000301e-6, 6080.822454817, 2.135396205}, - {0.000294e-6, -377.373607916, 3.708784168}, - {0.000236e-6, 2118.763860378, 1.733578756}, - {0.000234e-6, 5867.523359379, 5.575209112}, - {0.000268e-6, -226858.238553767, 0.069432392}, - {0.000265e-6, 167283.761587465, 4.369302826}, - {0.000280e-6, 28237.233459389, 5.304829118}, - {0.000292e-6, 12345.739057544, 4.096094132}, - /* 341, 350 */ - {0.000223e-6, 19800.945956225, 3.069327406}, - {0.000301e-6, 43232.306658416, 6.205311188}, - {0.000264e-6, 18875.525869774, 1.417263408}, - {0.000304e-6, -1823.175188677, 3.409035232}, - {0.000301e-6, 109.945688789, 0.510922054}, - {0.000260e-6, 813.550283960, 2.389438934}, - {0.000299e-6, 316428.228673312, 5.384595078}, - {0.000211e-6, 5756.566278634, 3.789392838}, - {0.000209e-6, 5750.203491159, 1.661943545}, - {0.000240e-6, 12489.885628707, 5.684549045}, - /* 351, 360 */ - {0.000216e-6, 6303.851245484, 3.862942261}, - {0.000203e-6, 1581.959348283, 5.549853589}, - {0.000200e-6, 5642.198242609, 1.016115785}, - {0.000197e-6, -70.849445304, 4.690702525}, - {0.000227e-6, 6287.008003254, 2.911891613}, - {0.000197e-6, 533.623118358, 1.048982898}, - {0.000205e-6, -6279.485421340, 1.829362730}, - {0.000209e-6, -10988.808157535, 2.636140084}, - {0.000208e-6, -227.526189440, 4.127883842}, - {0.000191e-6, 415.552490612, 4.401165650}, - /* 361, 370 */ - {0.000190e-6, 29296.615389579, 4.175658539}, - {0.000264e-6, 66567.485864652, 4.601102551}, - {0.000256e-6, -3646.350377354, 0.506364778}, - {0.000188e-6, 13119.721102825, 2.032195842}, - {0.000185e-6, -209.366942175, 4.694756586}, - {0.000198e-6, 25934.124331089, 3.832703118}, - {0.000195e-6, 4061.219215394, 3.308463427}, - {0.000234e-6, 5113.487598583, 1.716090661}, - {0.000188e-6, 1478.866574064, 5.686865780}, - {0.000222e-6, 11823.161639450, 1.942386641}, - /* 371, 380 */ - {0.000181e-6, 10770.893256262, 1.999482059}, - {0.000171e-6, 6546.159773364, 1.182807992}, - {0.000206e-6, 70.328180442, 5.934076062}, - {0.000169e-6, 20995.392966449, 2.169080622}, - {0.000191e-6, 10660.686935042, 5.405515999}, - {0.000228e-6, 33019.021112205, 4.656985514}, - {0.000184e-6, -4933.208440333, 3.327476868}, - {0.000220e-6, -135.625325010, 1.765430262}, - {0.000166e-6, 23141.558382925, 3.454132746}, - {0.000191e-6, 6144.558353121, 5.020393445}, - /* 381, 390 */ - {0.000180e-6, 6084.003848555, 0.602182191}, - {0.000163e-6, 17782.732072784, 4.960593133}, - {0.000225e-6, 16460.333529525, 2.596451817}, - {0.000222e-6, 5905.702242076, 3.731990323}, - {0.000204e-6, 227.476132789, 5.636192701}, - {0.000159e-6, 16737.577236597, 3.600691544}, - {0.000200e-6, 6805.653268085, 0.868220961}, - {0.000187e-6, 11919.140866668, 2.629456641}, - {0.000161e-6, 127.471796607, 2.862574720}, - {0.000205e-6, 6286.666278643, 1.742882331}, - /* 391, 400 */ - {0.000189e-6, 153.778810485, 4.812372643}, - {0.000168e-6, 16723.350142595, 0.027860588}, - {0.000149e-6, 11720.068865232, 0.659721876}, - {0.000189e-6, 5237.921013804, 5.245313000}, - {0.000143e-6, 6709.674040867, 4.317625647}, - {0.000146e-6, 4487.817406270, 4.815297007}, - {0.000144e-6, -664.756045130, 5.381366880}, - {0.000175e-6, 5127.714692584, 4.728443327}, - {0.000162e-6, 6254.626662524, 1.435132069}, - {0.000187e-6, 47162.516354635, 1.354371923}, - /* 401, 410 */ - {0.000146e-6, 11080.171578918, 3.369695406}, - {0.000180e-6, -348.924420448, 2.490902145}, - {0.000148e-6, 151.047669843, 3.799109588}, - {0.000157e-6, 6197.248551160, 1.284375887}, - {0.000167e-6, 146.594251718, 0.759969109}, - {0.000133e-6, -5331.357443741, 5.409701889}, - {0.000154e-6, 95.979227218, 3.366890614}, - {0.000148e-6, -6418.140930027, 3.384104996}, - {0.000128e-6, -6525.804453965, 3.803419985}, - {0.000130e-6, 11293.470674356, 0.939039445}, - /* 411, 420 */ - {0.000152e-6, -5729.506447149, 0.734117523}, - {0.000138e-6, 210.117701700, 2.564216078}, - {0.000123e-6, 6066.595360816, 4.517099537}, - {0.000140e-6, 18451.078546566, 0.642049130}, - {0.000126e-6, 11300.584221356, 3.485280663}, - {0.000119e-6, 10027.903195729, 3.217431161}, - {0.000151e-6, 4274.518310832, 4.404359108}, - {0.000117e-6, 6072.958148291, 0.366324650}, - {0.000165e-6, -7668.637425143, 4.298212528}, - {0.000117e-6, -6245.048177356, 5.379518958}, - /* 421, 430 */ - {0.000130e-6, -5888.449964932, 4.527681115}, - {0.000121e-6, -543.918059096, 6.109429504}, - {0.000162e-6, 9683.594581116, 5.720092446}, - {0.000141e-6, 6219.339951688, 0.679068671}, - {0.000118e-6, 22743.409379516, 4.881123092}, - {0.000129e-6, 1692.165669502, 0.351407289}, - {0.000126e-6, 5657.405657679, 5.146592349}, - {0.000114e-6, 728.762966531, 0.520791814}, - {0.000120e-6, 52.596639600, 0.948516300}, - {0.000115e-6, 65.220371012, 3.504914846}, - /* 431, 440 */ - {0.000126e-6, 5881.403728234, 5.577502482}, - {0.000158e-6, 163096.180360983, 2.957128968}, - {0.000134e-6, 12341.806904281, 2.598576764}, - {0.000151e-6, 16627.370915377, 3.985702050}, - {0.000109e-6, 1368.660252845, 0.014730471}, - {0.000131e-6, 6211.263196841, 0.085077024}, - {0.000146e-6, 5792.741760812, 0.708426604}, - {0.000146e-6, -77.750543984, 3.121576600}, - {0.000107e-6, 5341.013788022, 0.288231904}, - {0.000138e-6, 6281.591377283, 2.797450317}, - /* 441, 450 */ - {0.000113e-6, -6277.552925684, 2.788904128}, - {0.000115e-6, -525.758811831, 5.895222200}, - {0.000138e-6, 6016.468808270, 6.096188999}, - {0.000139e-6, 23539.707386333, 2.028195445}, - {0.000146e-6, -4176.041342449, 4.660008502}, - {0.000107e-6, 16062.184526117, 4.066520001}, - {0.000142e-6, 83783.548222473, 2.936315115}, - {0.000128e-6, 9380.959672717, 3.223844306}, - {0.000135e-6, 6205.325306007, 1.638054048}, - {0.000101e-6, 2699.734819318, 5.481603249}, - /* 451, 460 */ - {0.000104e-6, -568.821874027, 2.205734493}, - {0.000103e-6, 6321.103522627, 2.440421099}, - {0.000119e-6, 6321.208885629, 2.547496264}, - {0.000138e-6, 1975.492545856, 2.314608466}, - {0.000121e-6, 137.033024162, 4.539108237}, - {0.000123e-6, 19402.796952817, 4.538074405}, - {0.000119e-6, 22805.735565994, 2.869040566}, - {0.000133e-6, 64471.991241142, 6.056405489}, - {0.000129e-6, -85.827298831, 2.540635083}, - {0.000131e-6, 13613.804277336, 4.005732868}, - /* 461, 470 */ - {0.000104e-6, 9814.604100291, 1.959967212}, - {0.000112e-6, 16097.679950283, 3.589026260}, - {0.000123e-6, 2107.034507542, 1.728627253}, - {0.000121e-6, 36949.230808424, 6.072332087}, - {0.000108e-6, -12539.853380183, 3.716133846}, - {0.000113e-6, -7875.671863624, 2.725771122}, - {0.000109e-6, 4171.425536614, 4.033338079}, - {0.000101e-6, 6247.911759770, 3.441347021}, - {0.000113e-6, 7330.728427345, 0.656372122}, - {0.000113e-6, 51092.726050855, 2.791483066}, - /* 471, 480 */ - {0.000106e-6, 5621.842923210, 1.815323326}, - {0.000101e-6, 111.430161497, 5.711033677}, - {0.000103e-6, 909.818733055, 2.812745443}, - {0.000101e-6, 1790.642637886, 1.965746028}, - - /* T */ - {102.156724e-6, 6283.075849991, 4.249032005}, - {1.706807e-6, 12566.151699983, 4.205904248}, - {0.269668e-6, 213.299095438, 3.400290479}, - {0.265919e-6, 529.690965095, 5.836047367}, - {0.210568e-6, -3.523118349, 6.262738348}, - {0.077996e-6, 5223.693919802, 4.670344204}, - /* 481, 490 */ - {0.054764e-6, 1577.343542448, 4.534800170}, - {0.059146e-6, 26.298319800, 1.083044735}, - {0.034420e-6, -398.149003408, 5.980077351}, - {0.032088e-6, 18849.227549974, 4.162913471}, - {0.033595e-6, 5507.553238667, 5.980162321}, - {0.029198e-6, 5856.477659115, 0.623811863}, - {0.027764e-6, 155.420399434, 3.745318113}, - {0.025190e-6, 5746.271337896, 2.980330535}, - {0.022997e-6, -796.298006816, 1.174411803}, - {0.024976e-6, 5760.498431898, 2.467913690}, - /* 491, 500 */ - {0.021774e-6, 206.185548437, 3.854787540}, - {0.017925e-6, -775.522611324, 1.092065955}, - {0.013794e-6, 426.598190876, 2.699831988}, - {0.013276e-6, 6062.663207553, 5.845801920}, - {0.011774e-6, 12036.460734888, 2.292832062}, - {0.012869e-6, 6076.890301554, 5.333425680}, - {0.012152e-6, 1059.381930189, 6.222874454}, - {0.011081e-6, -7.113547001, 5.154724984}, - {0.010143e-6, 4694.002954708, 4.044013795}, - {0.009357e-6, 5486.777843175, 3.416081409}, - /* 501, 510 */ - {0.010084e-6, 522.577418094, 0.749320262}, - {0.008587e-6, 10977.078804699, 2.777152598}, - {0.008628e-6, 6275.962302991, 4.562060226}, - {0.008158e-6, -220.412642439, 5.806891533}, - {0.007746e-6, 2544.314419883, 1.603197066}, - {0.007670e-6, 2146.165416475, 3.000200440}, - {0.007098e-6, 74.781598567, 0.443725817}, - {0.006180e-6, -536.804512095, 1.302642751}, - {0.005818e-6, 5088.628839767, 4.827723531}, - {0.004945e-6, -6286.598968340, 0.268305170}, - /* 511, 520 */ - {0.004774e-6, 1349.867409659, 5.808636673}, - {0.004687e-6, -242.728603974, 5.154890570}, - {0.006089e-6, 1748.016413067, 4.403765209}, - {0.005975e-6, -1194.447010225, 2.583472591}, - {0.004229e-6, 951.718406251, 0.931172179}, - {0.005264e-6, 553.569402842, 2.336107252}, - {0.003049e-6, 5643.178563677, 1.362634430}, - {0.002974e-6, 6812.766815086, 1.583012668}, - {0.003403e-6, -2352.866153772, 2.552189886}, - {0.003030e-6, 419.484643875, 5.286473844}, - /* 521, 530 */ - {0.003210e-6, -7.046236698, 1.863796539}, - {0.003058e-6, 9437.762934887, 4.226420633}, - {0.002589e-6, 12352.852604545, 1.991935820}, - {0.002927e-6, 5216.580372801, 2.319951253}, - {0.002425e-6, 5230.807466803, 3.084752833}, - {0.002656e-6, 3154.687084896, 2.487447866}, - {0.002445e-6, 10447.387839604, 2.347139160}, - {0.002990e-6, 4690.479836359, 6.235872050}, - {0.002890e-6, 5863.591206116, 0.095197563}, - {0.002498e-6, 6438.496249426, 2.994779800}, - /* 531, 540 */ - {0.001889e-6, 8031.092263058, 3.569003717}, - {0.002567e-6, 801.820931124, 3.425611498}, - {0.001803e-6, -71430.695617928, 2.192295512}, - {0.001782e-6, 3.932153263, 5.180433689}, - {0.001694e-6, -4705.732307544, 4.641779174}, - {0.001704e-6, -1592.596013633, 3.997097652}, - {0.001735e-6, 5849.364112115, 0.417558428}, - {0.001643e-6, 8429.241266467, 2.180619584}, - {0.001680e-6, 38.133035638, 4.164529426}, - {0.002045e-6, 7084.896781115, 0.526323854}, - /* 541, 550 */ - {0.001458e-6, 4292.330832950, 1.356098141}, - {0.001437e-6, 20.355319399, 3.895439360}, - {0.001738e-6, 6279.552731642, 0.087484036}, - {0.001367e-6, 14143.495242431, 3.987576591}, - {0.001344e-6, 7234.794256242, 0.090454338}, - {0.001438e-6, 11499.656222793, 0.974387904}, - {0.001257e-6, 6836.645252834, 1.509069366}, - {0.001358e-6, 11513.883316794, 0.495572260}, - {0.001628e-6, 7632.943259650, 4.968445721}, - {0.001169e-6, 103.092774219, 2.838496795}, - /* 551, 560 */ - {0.001162e-6, 4164.311989613, 3.408387778}, - {0.001092e-6, 6069.776754553, 3.617942651}, - {0.001008e-6, 17789.845619785, 0.286350174}, - {0.001008e-6, 639.897286314, 1.610762073}, - {0.000918e-6, 10213.285546211, 5.532798067}, - {0.001011e-6, -6256.777530192, 0.661826484}, - {0.000753e-6, 16730.463689596, 3.905030235}, - {0.000737e-6, 11926.254413669, 4.641956361}, - {0.000694e-6, 3340.612426700, 2.111120332}, - {0.000701e-6, 3894.181829542, 2.760823491}, - /* 561, 570 */ - {0.000689e-6, -135.065080035, 4.768800780}, - {0.000700e-6, 13367.972631107, 5.760439898}, - {0.000664e-6, 6040.347246017, 1.051215840}, - {0.000654e-6, 5650.292110678, 4.911332503}, - {0.000788e-6, 6681.224853400, 4.699648011}, - {0.000628e-6, 5333.900241022, 5.024608847}, - {0.000755e-6, -110.206321219, 4.370971253}, - {0.000628e-6, 6290.189396992, 3.660478857}, - {0.000635e-6, 25132.303399966, 4.121051532}, - {0.000534e-6, 5966.683980335, 1.173284524}, - /* 571, 580 */ - {0.000543e-6, -433.711737877, 0.345585464}, - {0.000517e-6, -1990.745017041, 5.414571768}, - {0.000504e-6, 5767.611978898, 2.328281115}, - {0.000485e-6, 5753.384884897, 1.685874771}, - {0.000463e-6, 7860.419392439, 5.297703006}, - {0.000604e-6, 515.463871093, 0.591998446}, - {0.000443e-6, 12168.002696575, 4.830881244}, - {0.000570e-6, 199.072001436, 3.899190272}, - {0.000465e-6, 10969.965257698, 0.476681802}, - {0.000424e-6, -7079.373856808, 1.112242763}, - /* 581, 590 */ - {0.000427e-6, 735.876513532, 1.994214480}, - {0.000478e-6, -6127.655450557, 3.778025483}, - {0.000414e-6, 10973.555686350, 5.441088327}, - {0.000512e-6, 1589.072895284, 0.107123853}, - {0.000378e-6, 10984.192351700, 0.915087231}, - {0.000402e-6, 11371.704689758, 4.107281715}, - {0.000453e-6, 9917.696874510, 1.917490952}, - {0.000395e-6, 149.563197135, 2.763124165}, - {0.000371e-6, 5739.157790895, 3.112111866}, - {0.000350e-6, 11790.629088659, 0.440639857}, - /* 591, 600 */ - {0.000356e-6, 6133.512652857, 5.444568842}, - {0.000344e-6, 412.371096874, 5.676832684}, - {0.000383e-6, 955.599741609, 5.559734846}, - {0.000333e-6, 6496.374945429, 0.261537984}, - {0.000340e-6, 6055.549660552, 5.975534987}, - {0.000334e-6, 1066.495477190, 2.335063907}, - {0.000399e-6, 11506.769769794, 5.321230910}, - {0.000314e-6, 18319.536584880, 2.313312404}, - {0.000424e-6, 1052.268383188, 1.211961766}, - {0.000307e-6, 63.735898303, 3.169551388}, - /* 601, 610 */ - {0.000329e-6, 29.821438149, 6.106912080}, - {0.000357e-6, 6309.374169791, 4.223760346}, - {0.000312e-6, -3738.761430108, 2.180556645}, - {0.000301e-6, 309.278322656, 1.499984572}, - {0.000268e-6, 12043.574281889, 2.447520648}, - {0.000257e-6, 12491.370101415, 3.662331761}, - {0.000290e-6, 625.670192312, 1.272834584}, - {0.000256e-6, 5429.879468239, 1.913426912}, - {0.000339e-6, 3496.032826134, 4.165930011}, - {0.000283e-6, 3930.209696220, 4.325565754}, - /* 611, 620 */ - {0.000241e-6, 12528.018664345, 3.832324536}, - {0.000304e-6, 4686.889407707, 1.612348468}, - {0.000259e-6, 16200.772724501, 3.470173146}, - {0.000238e-6, 12139.553509107, 1.147977842}, - {0.000236e-6, 6172.869528772, 3.776271728}, - {0.000296e-6, -7058.598461315, 0.460368852}, - {0.000306e-6, 10575.406682942, 0.554749016}, - {0.000251e-6, 17298.182327326, 0.834332510}, - {0.000290e-6, 4732.030627343, 4.759564091}, - {0.000261e-6, 5884.926846583, 0.298259862}, - /* 621, 630 */ - {0.000249e-6, 5547.199336460, 3.749366406}, - {0.000213e-6, 11712.955318231, 5.415666119}, - {0.000223e-6, 4701.116501708, 2.703203558}, - {0.000268e-6, -640.877607382, 0.283670793}, - {0.000209e-6, 5636.065016677, 1.238477199}, - {0.000193e-6, 10177.257679534, 1.943251340}, - {0.000182e-6, 6283.143160294, 2.456157599}, - {0.000184e-6, -227.526189440, 5.888038582}, - {0.000182e-6, -6283.008539689, 0.241332086}, - {0.000228e-6, -6284.056171060, 2.657323816}, - /* 631, 640 */ - {0.000166e-6, 7238.675591600, 5.930629110}, - {0.000167e-6, 3097.883822726, 5.570955333}, - {0.000159e-6, -323.505416657, 5.786670700}, - {0.000154e-6, -4136.910433516, 1.517805532}, - {0.000176e-6, 12029.347187887, 3.139266834}, - {0.000167e-6, 12132.439962106, 3.556352289}, - {0.000153e-6, 202.253395174, 1.463313961}, - {0.000157e-6, 17267.268201691, 1.586837396}, - {0.000142e-6, 83996.847317911, 0.022670115}, - {0.000152e-6, 17260.154654690, 0.708528947}, - /* 641, 650 */ - {0.000144e-6, 6084.003848555, 5.187075177}, - {0.000135e-6, 5756.566278634, 1.993229262}, - {0.000134e-6, 5750.203491159, 3.457197134}, - {0.000144e-6, 5326.786694021, 6.066193291}, - {0.000160e-6, 11015.106477335, 1.710431974}, - {0.000133e-6, 3634.621024518, 2.836451652}, - {0.000134e-6, 18073.704938650, 5.453106665}, - {0.000134e-6, 1162.474704408, 5.326898811}, - {0.000128e-6, 5642.198242609, 2.511652591}, - {0.000160e-6, 632.783739313, 5.628785365}, - /* 651, 660 */ - {0.000132e-6, 13916.019109642, 0.819294053}, - {0.000122e-6, 14314.168113050, 5.677408071}, - {0.000125e-6, 12359.966151546, 5.251984735}, - {0.000121e-6, 5749.452731634, 2.210924603}, - {0.000136e-6, -245.831646229, 1.646502367}, - {0.000120e-6, 5757.317038160, 3.240883049}, - {0.000134e-6, 12146.667056108, 3.059480037}, - {0.000137e-6, 6206.809778716, 1.867105418}, - {0.000141e-6, 17253.041107690, 2.069217456}, - {0.000129e-6, -7477.522860216, 2.781469314}, - /* 661, 670 */ - {0.000116e-6, 5540.085789459, 4.281176991}, - {0.000116e-6, 9779.108676125, 3.320925381}, - {0.000129e-6, 5237.921013804, 3.497704076}, - {0.000113e-6, 5959.570433334, 0.983210840}, - {0.000122e-6, 6282.095528923, 2.674938860}, - {0.000140e-6, -11.045700264, 4.957936982}, - {0.000108e-6, 23543.230504682, 1.390113589}, - {0.000106e-6, -12569.674818332, 0.429631317}, - {0.000110e-6, -266.607041722, 5.501340197}, - {0.000115e-6, 12559.038152982, 4.691456618}, - /* 671, 680 */ - {0.000134e-6, -2388.894020449, 0.577313584}, - {0.000109e-6, 10440.274292604, 6.218148717}, - {0.000102e-6, -543.918059096, 1.477842615}, - {0.000108e-6, 21228.392023546, 2.237753948}, - {0.000101e-6, -4535.059436924, 3.100492232}, - {0.000103e-6, 76.266071276, 5.594294322}, - {0.000104e-6, 949.175608970, 5.674287810}, - {0.000101e-6, 13517.870106233, 2.196632348}, - {0.000100e-6, 11933.367960670, 4.056084160}, - - /* T^2 */ - {4.322990e-6, 6283.075849991, 2.642893748}, - /* 681, 690 */ - {0.406495e-6, 0.000000000, 4.712388980}, - {0.122605e-6, 12566.151699983, 2.438140634}, - {0.019476e-6, 213.299095438, 1.642186981}, - {0.016916e-6, 529.690965095, 4.510959344}, - {0.013374e-6, -3.523118349, 1.502210314}, - {0.008042e-6, 26.298319800, 0.478549024}, - {0.007824e-6, 155.420399434, 5.254710405}, - {0.004894e-6, 5746.271337896, 4.683210850}, - {0.004875e-6, 5760.498431898, 0.759507698}, - {0.004416e-6, 5223.693919802, 6.028853166}, - /* 691, 700 */ - {0.004088e-6, -7.113547001, 0.060926389}, - {0.004433e-6, 77713.771467920, 3.627734103}, - {0.003277e-6, 18849.227549974, 2.327912542}, - {0.002703e-6, 6062.663207553, 1.271941729}, - {0.003435e-6, -775.522611324, 0.747446224}, - {0.002618e-6, 6076.890301554, 3.633715689}, - {0.003146e-6, 206.185548437, 5.647874613}, - {0.002544e-6, 1577.343542448, 6.232904270}, - {0.002218e-6, -220.412642439, 1.309509946}, - {0.002197e-6, 5856.477659115, 2.407212349}, - /* 701, 710 */ - {0.002897e-6, 5753.384884897, 5.863842246}, - {0.001766e-6, 426.598190876, 0.754113147}, - {0.001738e-6, -796.298006816, 2.714942671}, - {0.001695e-6, 522.577418094, 2.629369842}, - {0.001584e-6, 5507.553238667, 1.341138229}, - {0.001503e-6, -242.728603974, 0.377699736}, - {0.001552e-6, -536.804512095, 2.904684667}, - {0.001370e-6, -398.149003408, 1.265599125}, - {0.001889e-6, -5573.142801634, 4.413514859}, - {0.001722e-6, 6069.776754553, 2.445966339}, - /* 711, 720 */ - {0.001124e-6, 1059.381930189, 5.041799657}, - {0.001258e-6, 553.569402842, 3.849557278}, - {0.000831e-6, 951.718406251, 2.471094709}, - {0.000767e-6, 4694.002954708, 5.363125422}, - {0.000756e-6, 1349.867409659, 1.046195744}, - {0.000775e-6, -11.045700264, 0.245548001}, - {0.000597e-6, 2146.165416475, 4.543268798}, - {0.000568e-6, 5216.580372801, 4.178853144}, - {0.000711e-6, 1748.016413067, 5.934271972}, - {0.000499e-6, 12036.460734888, 0.624434410}, - /* 721, 730 */ - {0.000671e-6, -1194.447010225, 4.136047594}, - {0.000488e-6, 5849.364112115, 2.209679987}, - {0.000621e-6, 6438.496249426, 4.518860804}, - {0.000495e-6, -6286.598968340, 1.868201275}, - {0.000456e-6, 5230.807466803, 1.271231591}, - {0.000451e-6, 5088.628839767, 0.084060889}, - {0.000435e-6, 5643.178563677, 3.324456609}, - {0.000387e-6, 10977.078804699, 4.052488477}, - {0.000547e-6, 161000.685737473, 2.841633844}, - {0.000522e-6, 3154.687084896, 2.171979966}, - /* 731, 740 */ - {0.000375e-6, 5486.777843175, 4.983027306}, - {0.000421e-6, 5863.591206116, 4.546432249}, - {0.000439e-6, 7084.896781115, 0.522967921}, - {0.000309e-6, 2544.314419883, 3.172606705}, - {0.000347e-6, 4690.479836359, 1.479586566}, - {0.000317e-6, 801.820931124, 3.553088096}, - {0.000262e-6, 419.484643875, 0.606635550}, - {0.000248e-6, 6836.645252834, 3.014082064}, - {0.000245e-6, -1592.596013633, 5.519526220}, - {0.000225e-6, 4292.330832950, 2.877956536}, - /* 741, 750 */ - {0.000214e-6, 7234.794256242, 1.605227587}, - {0.000205e-6, 5767.611978898, 0.625804796}, - {0.000180e-6, 10447.387839604, 3.499954526}, - {0.000229e-6, 199.072001436, 5.632304604}, - {0.000214e-6, 639.897286314, 5.960227667}, - {0.000175e-6, -433.711737877, 2.162417992}, - {0.000209e-6, 515.463871093, 2.322150893}, - {0.000173e-6, 6040.347246017, 2.556183691}, - {0.000184e-6, 6309.374169791, 4.732296790}, - {0.000227e-6, 149854.400134205, 5.385812217}, - /* 751, 760 */ - {0.000154e-6, 8031.092263058, 5.120720920}, - {0.000151e-6, 5739.157790895, 4.815000443}, - {0.000197e-6, 7632.943259650, 0.222827271}, - {0.000197e-6, 74.781598567, 3.910456770}, - {0.000138e-6, 6055.549660552, 1.397484253}, - {0.000149e-6, -6127.655450557, 5.333727496}, - {0.000137e-6, 3894.181829542, 4.281749907}, - {0.000135e-6, 9437.762934887, 5.979971885}, - {0.000139e-6, -2352.866153772, 4.715630782}, - {0.000142e-6, 6812.766815086, 0.513330157}, - /* 761, 770 */ - {0.000120e-6, -4705.732307544, 0.194160689}, - {0.000131e-6, -71430.695617928, 0.000379226}, - {0.000124e-6, 6279.552731642, 2.122264908}, - {0.000108e-6, -6256.777530192, 0.883445696}, - - /* T^3 */ - {0.143388e-6, 6283.075849991, 1.131453581}, - {0.006671e-6, 12566.151699983, 0.775148887}, - {0.001480e-6, 155.420399434, 0.480016880}, - {0.000934e-6, 213.299095438, 6.144453084}, - {0.000795e-6, 529.690965095, 2.941595619}, - {0.000673e-6, 5746.271337896, 0.120415406}, - /* 771, 780 */ - {0.000672e-6, 5760.498431898, 5.317009738}, - {0.000389e-6, -220.412642439, 3.090323467}, - {0.000373e-6, 6062.663207553, 3.003551964}, - {0.000360e-6, 6076.890301554, 1.918913041}, - {0.000316e-6, -21.340641002, 5.545798121}, - {0.000315e-6, -242.728603974, 1.884932563}, - {0.000278e-6, 206.185548437, 1.266254859}, - {0.000238e-6, -536.804512095, 4.532664830}, - {0.000185e-6, 522.577418094, 4.578313856}, - {0.000245e-6, 18849.227549974, 0.587467082}, - /* 781, 787 */ - {0.000180e-6, 426.598190876, 5.151178553}, - {0.000200e-6, 553.569402842, 5.355983739}, - {0.000141e-6, 5223.693919802, 1.336556009}, - {0.000104e-6, 5856.477659115, 4.239842759}, - - /* T^4 */ - {0.003826e-6, 6283.075849991, 5.705257275}, - {0.000303e-6, 12566.151699983, 5.407132842}, - {0.000209e-6, 155.420399434, 1.989815753}, - } - - /* Time since J2000.0 in Julian millennia. */ - t = ((date1 - DJ00) + date2) / DJM - - /* ================= */ - /* Topocentric terms */ - /* ================= */ - - /* Convert UT to local solar time in radians. */ - tsol = math.Mod(ut, 1.0)*D2PI + elong - - /* FUNDAMENTAL ARGUMENTS: Simon et al. 1994. */ - - /* Combine time argument (millennia) with deg/arcsec factor. */ - w = t / 3600.0 - - /* Sun Mean Longitude. */ - elsun = math.Mod(280.46645683+1296027711.03429*w, 360.0) * DD2R - - /* Sun Mean Anomaly. */ - emsun = math.Mod(357.52910918+1295965810.481*w, 360.0) * DD2R - - /* Mean Elongation of Moon from Sun. */ - d = math.Mod(297.85019547+16029616012.090*w, 360.0) * DD2R - - /* Mean Longitude of Jupiter. */ - elj = math.Mod(34.35151874+109306899.89453*w, 360.0) * DD2R - - /* Mean Longitude of Saturn. */ - els = math.Mod(50.07744430+44046398.47038*w, 360.0) * DD2R - - /* TOPOCENTRIC TERMS: Moyer 1981 and Murray 1983. */ - wt = +0.00029e-10*u*math.Sin(tsol+elsun-els) + - +0.00100e-10*u*math.Sin(tsol-2.0*emsun) + - +0.00133e-10*u*math.Sin(tsol-d) + - +0.00133e-10*u*math.Sin(tsol+elsun-elj) + - -0.00229e-10*u*math.Sin(tsol+2.0*elsun+emsun) + - -0.02200e-10*v*math.Cos(elsun+emsun) + - +0.05312e-10*u*math.Sin(tsol-emsun) + - -0.13677e-10*u*math.Sin(tsol+2.0*elsun) + - -1.31840e-10*v*math.Cos(elsun) + - +3.17679e-10*u*math.Sin(tsol) - - /* ===================== */ - /* Fairhead et al. model */ - /* ===================== */ - - /* T0 */ - w0 = 0 - for j = 473; j >= 0; j-- { - w0 += fairhd[j][0] * math.Sin(fairhd[j][1]*t+fairhd[j][2]) - } - - /* T1 */ - w1 = 0 - for j = 678; j >= 474; j-- { - w1 += fairhd[j][0] * math.Sin(fairhd[j][1]*t+fairhd[j][2]) - } - - /* T2 */ - w2 = 0 - for j = 763; j >= 679; j-- { - w2 += fairhd[j][0] * math.Sin(fairhd[j][1]*t+fairhd[j][2]) - } - - /* T3 */ - w3 = 0 - for j = 783; j >= 764; j-- { - w3 += fairhd[j][0] * math.Sin(fairhd[j][1]*t+fairhd[j][2]) - } - - /* T4 */ - w4 = 0 - for j = 786; j >= 784; j-- { - w4 += fairhd[j][0] * math.Sin(fairhd[j][1]*t+fairhd[j][2]) - } - - /* Multiply by powers of T and combine. */ - wf = t*(t*(t*(t*w4+w3)+w2)+w1) + w0 - - /* Adjustments to use JPL planetary masses instead of IAU. */ - wj = 0.00065e-6*math.Sin(6069.776754*t+4.021194) + - 0.00033e-6*math.Sin(213.299095*t+5.543132) + - (-0.00196e-6 * math.Sin(6208.294251*t+5.696701)) + - (-0.00173e-6 * math.Sin(74.781599*t+2.435900)) + - 0.03638e-6*t*t - - /* ============ */ - /* Final result */ - /* ============ */ - - /* TDB-TT in seconds. */ - w = wt + wf + wj - - return w -} - -/* -Taitt TAI to TT. - -Time scale transformation: International Atomic Time, TAI, to -Terrestrial Time, TT. - -Given: - - tai1,tai2 float64 TAI as a 2-part Julian Date - -Returned: - - tt1,tt2 float64 TT as a 2-part Julian Date - -Returned (function value): - - int status: 0 = OK - -Note: - - tai1+tai2 is Julian Date, apportioned in any convenient way - between the two arguments, for example where tai1 is the Julian - Day Number and tai2 is the fraction of a day. The returned - tt1,tt2 follow suit. - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992) -*/ -func Taitt(tai1, tai2 float64, tt1, tt2 *float64) int { - /* TT minus TAI (days). */ - const dtat = TTMTAI / DAYSEC - - /* Result, safeguarding precision. */ - if math.Abs(tai1) > math.Abs(tai2) { - *tt1 = tai1 - *tt2 = tai2 + dtat - } else { - *tt1 = tai1 + dtat - *tt2 = tai2 - } - - /* Status (always OK). */ - return 0 -} - -/* -Taiut1 TAI to UT1 - -Time scale transformation: International Atomic Time, TAI, to -Universal Time, UT1. - -Given: - - tai1,tai2 float64 TAI as a 2-part Julian Date - dta float64 UT1-TAI in seconds - -Returned: - - ut11,ut12 float64 UT1 as a 2-part Julian Date - -Returned (function value): - - int status: 0 = OK - -Notes: - - 1. tai1+tai2 is Julian Date, apportioned in any convenient way - between the two arguments, for example where tai1 is the Julian - Day Number and tai2 is the fraction of a day. The returned - UT11,UT12 follow suit. - - 2. The argument dta, i.e. UT1-TAI, is an observed quantity, and is - available from IERS tabulations. - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992) -*/ -func Taiut1(tai1, tai2, dta float64, ut11, ut12 *float64) int { - var dtad float64 - - /* Result, safeguarding precision. */ - dtad = dta / DAYSEC - if math.Abs(tai1) > math.Abs(tai2) { - *ut11 = tai1 - *ut12 = tai2 + dtad - } else { - *ut11 = tai1 + dtad - *ut12 = tai2 - } - - /* Status (always OK). */ - return 0 -} - -/* -Taiutc TAI to UTC - -Time scale transformation: International Atomic Time, TAI, to -Coordinated Universal Time, UTC. - -Given: - - tai1,tai2 float64 TAI as a 2-part Julian Date (Note 1) - -Returned: - - utc1,utc2 float64 UTC as a 2-part quasi Julian Date (Notes 1-3) - -Returned (function value): - - int status: +1 = dubious year (Note 4) - 0 = OK - -1 = unacceptable date - -Notes: - - 1. tai1+tai2 is Julian Date, apportioned in any convenient way - between the two arguments, for example where tai1 is the Julian - Day Number and tai2 is the fraction of a day. The returned utc1 - and utc2 form an analogous pair, except that a special convention - is used, to deal with the problem of leap seconds - see the next - note. - - 2. JD cannot unambiguously represent UTC during a leap second unless - special measures are taken. The convention in the present - function is that the JD day represents UTC days whether the - length is 86399, 86400 or 86401 SI seconds. In the 1960-1972 era - there were smaller jumps (in either direction) each time the - linear UTC(TAI) expression was changed, and these "mini-leaps" - are also included in the SOFA convention. - - 3. The function D2dtf can be used to transform the UTC quasi-JD - into calendar date and clock time, including UTC leap second - handling. - - 4. The warning status "dubious year" flags UTCs that predate the - introduction of the time scale or that are too far in the future - to be trusted. See Dat for further details. - -Called: - - Utctai UTC to TAI - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992) -*/ -func Taiutc(tai1, tai2 float64, utc1, utc2 *float64) int { - var big1 bool - var i, j int - var a1, a2, u1, u2, g1, g2 float64 - - /* Put the two parts of the TAI into big-first order. */ - big1 = (math.Abs(tai1) >= math.Abs(tai2)) - if big1 { - a1 = tai1 - a2 = tai2 - } else { - a1 = tai2 - a2 = tai1 - } - - /* Initial guess for UTC. */ - u1 = a1 - u2 = a2 - - /* Iterate (though in most cases just once is enough). */ - for i = 0; i < 3; i++ { - - /* Guessed UTC to TAI. */ - j = Utctai(u1, u2, &g1, &g2) - if j < 0 { - return j - } - - /* Adjust guessed UTC. */ - u2 += a1 - g1 - u2 += a2 - g2 - } - - /* Return the UTC result, preserving the TAI order. */ - if big1 { - *utc1 = u1 - *utc2 = u2 - } else { - *utc1 = u2 - *utc2 = u1 - } - - /* Status. */ - return j -} - -/* -Tcbtdb TCB to TDB - -Time scale transformation: Barycentric Coordinate Time, TCB, to -Barycentric Dynamical Time, TDB. - -Given: - - tcb1,tcb2 float64 TCB as a 2-part Julian Date - -Returned: - - tdb1,tdb2 float64 TDB as a 2-part Julian Date - -Returned (function value): - - int status: 0 = OK - -Notes: - - 1. tcb1+tcb2 is Julian Date, apportioned in any convenient way - between the two arguments, for example where tcb1 is the Julian - Day Number and tcb2 is the fraction of a day. The returned - tdb1,tdb2 follow suit. - - 2. The 2006 IAU General Assembly introduced a conventional linear - transformation between TDB and TCB. This transformation - compensates for the drift between TCB and terrestrial time TT, - and keeps TDB approximately centered on TT. Because the - relationship between TT and TCB depends on the adopted solar - system ephemeris, the degree of alignment between TDB and TT over - long intervals will vary according to which ephemeris is used. - Former definitions of TDB attempted to avoid this problem by - stipulating that TDB and TT should differ only by periodic - effects. This is a good description of the nature of the - relationship but eluded precise mathematical formulation. The - conventional linear relationship adopted in 2006 sidestepped - these difficulties whilst delivering a TDB that in practice was - consistent with values before that date. - - 3. TDB is essentially the same as Teph, the time argument for the - JPL solar system ephemerides. - -Reference: - - IAU 2006 Resolution B3 -*/ -func Tcbtdb(tcb1, tcb2 float64, tdb1, tdb2 *float64) int { - /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */ - const t77td = DJM0 + DJM77 - const t77tf = TTMTAI / DAYSEC - - /* TDB (days) at TAI 1977 Jan 1.0 */ - const tdb0 = TDB0 / DAYSEC - - var d float64 - - /* Result, safeguarding precision. */ - if math.Abs(tcb1) > math.Abs(tcb2) { - d = tcb1 - t77td - *tdb1 = tcb1 - *tdb2 = tcb2 + tdb0 - (d+(tcb2-t77tf))*ELB - } else { - d = tcb2 - t77td - *tdb1 = tcb1 + tdb0 - (d+(tcb1-t77tf))*ELB - *tdb2 = tcb2 - } - - /* Status (always OK). */ - return 0 -} - -/* -Tcgtt TCG to TT - -Time scale transformation: Geocentric Coordinate Time, TCG, to -Terrestrial Time, TT. - -Given: - - tcg1,tcg2 float64 TCG as a 2-part Julian Date - -Returned: - - tt1,tt2 float64 TT as a 2-part Julian Date - -Returned (function value): - - int status: 0 = OK - -Note: - - tcg1+tcg2 is Julian Date, apportioned in any convenient way - between the two arguments, for example where tcg1 is the Julian - Day Number and tcg22 is the fraction of a day. The returned - tt1,tt2 follow suit. - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - IAU 2000 Resolution B1.9 -*/ -func Tcgtt(tcg1, tcg2 float64, tt1, tt2 *float64) int { - /* 1977 Jan 1 00:00:32.184 TT, as MJD */ - const t77t = DJM77 + TTMTAI/DAYSEC - - /* Result, safeguarding precision. */ - if math.Abs(tcg1) > math.Abs(tcg2) { - *tt1 = tcg1 - *tt2 = tcg2 - ((tcg1-DJM0)+(tcg2-t77t))*ELG - } else { - *tt1 = tcg1 - ((tcg2-DJM0)+(tcg1-t77t))*ELG - *tt2 = tcg2 - } - - /* OK status. */ - return 0 -} - -/* -Tdbtcb TDB to TCB - -Time scale transformation: Barycentric Dynamical Time, TDB, to -Barycentric Coordinate Time, TCB. - -Given: - - tdb1,tdb2 float64 TDB as a 2-part Julian Date - -Returned: - - tcb1,tcb2 float64 TCB as a 2-part Julian Date - -Returned (function value): - - int status: 0 = OK - -Notes: - - 1. tdb1+tdb2 is Julian Date, apportioned in any convenient way - between the two arguments, for example where tdb1 is the Julian - Day Number and tdb2 is the fraction of a day. The returned - tcb1,tcb2 follow suit. - - 2. The 2006 IAU General Assembly introduced a conventional linear - transformation between TDB and TCB. This transformation - compensates for the drift between TCB and terrestrial time TT, - and keeps TDB approximately centered on TT. Because the - relationship between TT and TCB depends on the adopted solar - system ephemeris, the degree of alignment between TDB and TT over - long intervals will vary according to which ephemeris is used. - Former definitions of TDB attempted to avoid this problem by - stipulating that TDB and TT should differ only by periodic - effects. This is a good description of the nature of the - relationship but eluded precise mathematical formulation. The - conventional linear relationship adopted in 2006 sidestepped - these difficulties whilst delivering a TDB that in practice was - consistent with values before that date. - - 3. TDB is essentially the same as Teph, the time argument for the - JPL solar system ephemerides. - -Reference: - - IAU 2006 Resolution B3 -*/ -func Tdbtcb(tdb1, tdb2 float64, tcb1, tcb2 *float64) int { - /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */ - const t77td = DJM0 + DJM77 - const t77tf = TTMTAI / DAYSEC - - /* TDB (days) at TAI 1977 Jan 1.0 */ - const tdb0 = TDB0 / DAYSEC - - /* TDB to TCB rate */ - const elbb = ELB / (1.0 - ELB) - - var d, f float64 - - /* Result, preserving date format but safeguarding precision. */ - if math.Abs(tdb1) > math.Abs(tdb2) { - d = t77td - tdb1 - f = tdb2 - tdb0 - *tcb1 = tdb1 - *tcb2 = f - (d-(f-t77tf))*elbb - } else { - d = t77td - tdb2 - f = tdb1 - tdb0 - *tcb1 = f - (d-(f-t77tf))*elbb - *tcb2 = tdb2 - } - - /* Status (always OK). */ - return 0 -} - -/* -Tdbtt TDB to TT - -Time scale transformation: Barycentric Dynamical Time, TDB, to -Terrestrial Time, TT. - -Given: - - tdb1,tdb2 float64 TDB as a 2-part Julian Date - dtr float64 TDB-TT in seconds - -Returned: - - tt1,tt2 float64 TT as a 2-part Julian Date - -Returned (function value): - - int status: 0 = OK - -Notes: - - 1. tdb1+tdb2 is Julian Date, apportioned in any convenient way - between the two arguments, for example where tdb1 is the Julian - Day Number and tdb2 is the fraction of a day. The returned - tt1,tt2 follow suit. - - 2. The argument dtr represents the quasi-periodic component of the - GR transformation between TT and TCB. It is dependent upon the - adopted solar-system ephemeris, and can be obtained by numerical - integration, by interrogating a precomputed time ephemeris or by - evaluating a model such as that implemented in the SOFA function - Dtdb. The quantity is dominated by an annual term of 1.7 ms - amplitude. - - 3. TDB is essentially the same as Teph, the time argument for the - JPL solar system ephemerides. - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - IAU 2006 Resolution 3 -*/ -func Tdbtt(tdb1, tdb2, dtr float64, tt1, tt2 *float64) int { - var dtrd float64 - - /* Result, safeguarding precision. */ - dtrd = dtr / DAYSEC - if math.Abs(tdb1) > math.Abs(tdb2) { - *tt1 = tdb1 - *tt2 = tdb2 - dtrd - } else { - *tt1 = tdb1 - dtrd - *tt2 = tdb2 - } - - /* Status (always OK). */ - return 0 -} - -/* -Tttai TT to TAI - -Time scale transformation: Terrestrial Time, TT, to International -Atomic Time, TAI. - -Given: - - tt1,tt2 float64 TT as a 2-part Julian Date - -Returned: - - tai1,tai2 float64 TAI as a 2-part Julian Date - -Returned (function value): - - int status: 0 = OK - -Note: - - tt1+tt2 is Julian Date, apportioned in any convenient way between - the two arguments, for example where tt1 is the Julian Day Number - and tt2 is the fraction of a day. The returned tai1,tai2 follow - suit. - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992) -*/ -func Tttai(tt1, tt2 float64, tai1, tai2 *float64) int { - /* TT minus TAI (days). */ - const dtat = TTMTAI / DAYSEC - - /* Result, safeguarding precision. */ - if math.Abs(tt1) > math.Abs(tt2) { - *tai1 = tt1 - *tai2 = tt2 - dtat - } else { - *tai1 = tt1 - dtat - *tai2 = tt2 - } - - /* Status (always OK). */ - return 0 - -} - -/* -Tttcg TT to TCG - -Time scale transformation: Terrestrial Time, TT, to Geocentric -Coordinate Time, TCG. - -Given: - - tt1,tt2 float64 TT as a 2-part Julian Date - -Returned: - - tcg1,tcg2 float64 TCG as a 2-part Julian Date - -Returned (function value): - - int status: 0 = OK - -Note: - - tt1+tt2 is Julian Date, apportioned in any convenient way between - the two arguments, for example where tt1 is the Julian Day Number - and tt2 is the fraction of a day. The returned tcg1,tcg2 follow - suit. - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - IAU 2000 Resolution B1.9 -*/ -func Tttcg(tt1, tt2 float64, tcg1, tcg2 *float64) int { - /* 1977 Jan 1 00:00:32.184 TT, as MJD */ - const t77t = DJM77 + TTMTAI/DAYSEC - - /* TT to TCG rate */ - const elgg = ELG / (1.0 - ELG) - - /* Result, safeguarding precision. */ - if math.Abs(tt1) > math.Abs(tt2) { - *tcg1 = tt1 - *tcg2 = tt2 + ((tt1-DJM0)+(tt2-t77t))*elgg - } else { - *tcg1 = tt1 + ((tt2-DJM0)+(tt1-t77t))*elgg - *tcg2 = tt2 - } - - /* Status (always OK). */ - return 0 -} - -/* -Tttdb TT to TDB - -Time scale transformation: Terrestrial Time, TT, to Barycentric -Dynamical Time, TDB. - -Given: - - tt1,tt2 float64 TT as a 2-part Julian Date - dtr float64 TDB-TT in seconds - -Returned: - - tdb1,tdb2 float64 TDB as a 2-part Julian Date - -Returned (function value): - - int status: 0 = OK - -Notes: - - 1. tt1+tt2 is Julian Date, apportioned in any convenient way between - the two arguments, for example where tt1 is the Julian Day Number - and tt2 is the fraction of a day. The returned tdb1,tdb2 follow - suit. - - 2. The argument dtr represents the quasi-periodic component of the - GR transformation between TT and TCB. It is dependent upon the - adopted solar-system ephemeris, and can be obtained by numerical - integration, by interrogating a precomputed time ephemeris or by - evaluating a model such as that implemented in the SOFA function - Dtdb. The quantity is dominated by an annual term of 1.7 ms - amplitude. - - 3. TDB is essentially the same as Teph, the time argument for the JPL - solar system ephemerides. - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - IAU 2006 Resolution 3 -*/ -func Tttdb(tt1, tt2, dtr float64, tdb1, tdb2 *float64) int { - var dtrd float64 - - /* Result, safeguarding precision. */ - dtrd = dtr / DAYSEC - if math.Abs(tt1) > math.Abs(tt2) { - *tdb1 = tt1 - *tdb2 = tt2 + dtrd - } else { - *tdb1 = tt1 + dtrd - *tdb2 = tt2 - } - - /* Status (always OK). */ - return 0 -} - -/* -Ttut1 TT to UT1 - -Time scale transformation: Terrestrial Time, TT, to Universal Time, -UT1. - -Given: - - tt1,tt2 float64 TT as a 2-part Julian Date - dt float64 TT-UT1 in seconds - -Returned: - - ut11,ut12 float64 UT1 as a 2-part Julian Date - -Returned (function value): - - int status: 0 = OK - -Notes: - - 1. tt1+tt2 is Julian Date, apportioned in any convenient way between - the two arguments, for example where tt1 is the Julian Day Number - and tt2 is the fraction of a day. The returned ut11,ut12 follow - suit. - - 2. The argument dt is classical Delta T. - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992) -*/ -func Ttut1(tt1, tt2, dt float64, ut11, ut12 *float64) int { - var dtd float64 - - /* Result, safeguarding precision. */ - dtd = dt / DAYSEC - if math.Abs(tt1) > math.Abs(tt2) { - *ut11 = tt1 - *ut12 = tt2 - dtd - } else { - *ut11 = tt1 - dtd - *ut12 = tt2 - } - - /* Status (always OK). */ - return 0 -} - -/* -Ut1tai UT1 to TAI - -Time scale transformation: Universal Time, UT1, to International -Atomic Time, TAI. - -Given: - - ut11,ut12 float64 UT1 as a 2-part Julian Date - dta float64 UT1-TAI in seconds - -Returned: - - tai1,tai2 float64 TAI as a 2-part Julian Date - -Returned (function value): - - int status: 0 = OK - -Notes: - - 1. ut11+ut12 is Julian Date, apportioned in any convenient way - between the two arguments, for example where ut11 is the Julian - Day Number and ut12 is the fraction of a day. The returned - tai1,tai2 follow suit. - - 2. The argument dta, i.e. UT1-TAI, is an observed quantity, and is - available from IERS tabulations. - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992) -*/ -func Ut1tai(ut11, ut12, dta float64, tai1, tai2 *float64) int { - var dtad float64 - - /* Result, safeguarding precision. */ - dtad = dta / DAYSEC - if math.Abs(ut11) > math.Abs(ut12) { - *tai1 = ut11 - *tai2 = ut12 - dtad - } else { - *tai1 = ut11 - dtad - *tai2 = ut12 - } - - /* Status (always OK). */ - return 0 -} - -/* -Ut1tt UT1 to TT - -Time scale transformation: Universal Time, UT1, to Terrestrial -Time, TT. - -Given: - - ut11,ut12 float64 UT1 as a 2-part Julian Date - dt float64 TT-UT1 in seconds - -Returned: - - tt1,tt2 float64 TT as a 2-part Julian Date - -Returned (function value): - - int status: 0 = OK - -Notes: - - 1. ut11+ut12 is Julian Date, apportioned in any convenient way - between the two arguments, for example where ut11 is the Julian - Day Number and ut12 is the fraction of a day. The returned - tt1,tt2 follow suit. - - 2. The argument dt is classical Delta T. - -Reference: - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992) -*/ -func Ut1tt(ut11, ut12, dt float64, tt1, tt2 *float64) int { - var dtd float64 - - /* Result, safeguarding precision. */ - dtd = dt / DAYSEC - if math.Abs(ut11) > math.Abs(ut12) { - *tt1 = ut11 - *tt2 = ut12 + dtd - } else { - *tt1 = ut11 + dtd - *tt2 = ut12 - } - - /* Status (always OK). */ - return 0 -} - -/* -Ut1utc UT1 to UTC - -Time scale transformation: Universal Time, UT1, to Coordinated -Universal Time, UTC. - -Given: - - ut11,ut12 float64 UT1 as a 2-part Julian Date (Note 1) - dut1 float64 Delta UT1: UT1-UTC in seconds (Note 2) - -Returned: - - utc1,utc2 float64 UTC as a 2-part quasi Julian Date (Notes 3,4) - -Returned (function value): - - int status: +1 = dubious year (Note 5) - 0 = OK - -1 = unacceptable date - -Notes: - - 1. ut11+ut12 is Julian Date, apportioned in any convenient way - between the two arguments, for example where ut11 is the Julian - Day Number and ut12 is the fraction of a day. The returned utc1 - and utc2 form an analogous pair, except that a special convention - is used, to deal with the problem of leap seconds - see Note 3. - - 2. Delta UT1 can be obtained from tabulations provided by the - International Earth Rotation and Reference Systems Service. The - value changes abruptly by 1s at a leap second; however, close to - a leap second the algorithm used here is tolerant of the "wrong" - choice of value being made. - - 3. JD cannot unambiguously represent UTC during a leap second unless - special measures are taken. The convention in the present - function is that the returned quasi-JD UTC1+UTC2 represents UTC - days whether the length is 86399, 86400 or 86401 SI seconds. - - 4. The function D2dtf can be used to transform the UTC quasi-JD - into calendar date and clock time, including UTC leap second - handling. - - 5. The warning status "dubious year" flags UTCs that predate the - introduction of the time scale or that are too far in the future - to be trusted. See Dat for further details. - -Called: - - Jd2cal JD to Gregorian calendar - Dat delta(AT) = TAI-UTC - Cal2jd Gregorian calendar to JD - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992) -*/ -func Ut1utc(ut11, ut12, dut1 float64, utc1, utc2 *float64) int { - var big1 bool - var i, iy, im, id, js int - var duts, u1, u2, d1, dats1, d2, fd, dats2, ddats, us1, us2, du float64 - - /* UT1-UTC in seconds. */ - duts = dut1 - - /* Put the two parts of the UT1 into big-first order. */ - big1 = (math.Abs(ut11) >= math.Abs(ut12)) - if big1 { - u1 = ut11 - u2 = ut12 - } else { - u1 = ut12 - u2 = ut11 - } - - /* See if the UT1 can possibly be in a leap-second day. */ - d1 = u1 - dats1 = 0 - for i = -1; i <= 3; i++ { - d2 = u2 + float64(i) - if Jd2cal(d1, d2, &iy, &im, &id, &fd) != 0 { - return -1 - } - js = Dat(iy, im, id, 0.0, &dats2) - if js < 0 { - return -1 - } - if i == -1 { - dats1 = dats2 - } - ddats = dats2 - dats1 - if math.Abs(ddats) >= 0.5 { - - /* Yes, leap second nearby: ensure UT1-UTC is "before" value. */ - if ddats*duts >= 0 { - duts -= ddats - } - - /* UT1 for the start of the UTC day that ends in a leap. */ - if Cal2jd(iy, im, id, &d1, &d2) != 0 { - return -1 - } - us1 = d1 - us2 = d2 - 1.0 + duts/DAYSEC - - /* Is the UT1 after this point? */ - du = u1 - us1 - du += u2 - us2 - if du > 0 { - - /* Yes: fraction of the current UTC day that has elapsed. */ - fd = du * DAYSEC / (DAYSEC + ddats) - - /* Ramp UT1-UTC to bring about SOFA's JD(UTC) convention. */ - //duts += ddats * ( fd <= 1.0 ? fd : 1.0 ); - if fd <= 1.0 { - duts += ddats * fd - } else { - duts += ddats - } - } - - /* Done. */ - break - } - dats1 = dats2 - } - - /* Subtract the (possibly adjusted) UT1-UTC from UT1 to give UTC. */ - u2 -= duts / DAYSEC - - /* Result, safeguarding precision. */ - if big1 { - *utc1 = u1 - *utc2 = u2 - } else { - *utc1 = u2 - *utc2 = u1 - } - - /* Status. */ - return js -} - -/* -Utctai UTC to TAI - -Time scale transformation: Coordinated Universal Time, UTC, to -International Atomic Time, TAI. - -Given: - - utc1,utc2 float64 UTC as a 2-part quasi Julian Date (Notes 1-4) - -Returned: - - tai1,tai2 float64 TAI as a 2-part Julian Date (Note 5) - -Returned (function value): - - int status: +1 = dubious year (Note 3) - 0 = OK - -1 = unacceptable date - -Notes: - - 1. utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any - convenient way between the two arguments, for example where utc1 - is the Julian Day Number and utc2 is the fraction of a day. - - 2. JD cannot unambiguously represent UTC during a leap second unless - special measures are taken. The convention in the present - function is that the JD day represents UTC days whether the - length is 86399, 86400 or 86401 SI seconds. In the 1960-1972 era - there were smaller jumps (in either direction) each time the - linear UTC(TAI) expression was changed, and these "mini-leaps" - are also included in the SOFA convention. - - 3. The warning status "dubious year" flags UTCs that predate the - introduction of the time scale or that are too far in the future - to be trusted. See Dat for further details. - - 4. The function Dtf2d converts from calendar date and time of day - into 2-part Julian Date, and in the case of UTC implements the - leap-second-ambiguity convention described above. - - 5. The returned TAI1,TAI2 are such that their sum is the TAI Julian - Date. - -Called: - - Jd2cal JD to Gregorian calendar - Dat delta(AT) = TAI-UTC - Cal2jd Gregorian calendar to JD - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992) -*/ -func Utctai(utc1, utc2 float64, tai1, tai2 *float64) int { - var big1 bool - var iy, im, id, j, iyt, imt, idt int - var u1, u2, fd, dat0, dat12, w, dat24, dlod, dleap, z1, z2, a2 float64 - - /* Put the two parts of the UTC into big-first order. */ - big1 = (math.Abs(utc1) >= math.Abs(utc2)) - if big1 { - u1 = utc1 - u2 = utc2 - } else { - u1 = utc2 - u2 = utc1 - } - - /* Get TAI-UTC at 0h today. */ - j = Jd2cal(u1, u2, &iy, &im, &id, &fd) - if j != 0 { - return j - } - j = Dat(iy, im, id, 0.0, &dat0) - if j < 0 { - return j - } - - /* Get TAI-UTC at 12h today (to detect drift). */ - j = Dat(iy, im, id, 0.5, &dat12) - if j < 0 { - return j - } - - /* Get TAI-UTC at 0h tomorrow (to detect jumps). */ - j = Jd2cal(u1+1.5, u2-fd, &iyt, &imt, &idt, &w) - if j != 0 { - return j - } - j = Dat(iyt, imt, idt, 0.0, &dat24) - if j < 0 { - return j - } - - /* Separate TAI-UTC change into per-day (DLOD) and any jump (DLEAP). */ - dlod = 2.0 * (dat12 - dat0) - dleap = dat24 - (dat0 + dlod) - - /* Remove any scaling applied to spread leap into preceding day. */ - fd *= (DAYSEC + dleap) / DAYSEC - - /* Scale from (pre-1972) UTC seconds to SI seconds. */ - fd *= (DAYSEC + dlod) / DAYSEC - - /* Today's calendar date to 2-part JD. */ - if Cal2jd(iy, im, id, &z1, &z2) != 0 { - return -1 - } - - /* Assemble the TAI result, preserving the UTC split and order. */ - a2 = z1 - u1 - a2 += z2 - a2 += fd + dat0/DAYSEC - if big1 { - *tai1 = u1 - *tai2 = a2 - } else { - *tai1 = a2 - *tai2 = u1 - } - - /* Status. */ - return j -} - -/* -Utcut1 UTC to UT1 - -Time scale transformation: Coordinated Universal Time, UTC, to -Universal Time, UT1. - -Given: - - utc1,utc2 float64 UTC as a 2-part quasi Julian Date (Notes 1-4) - dut1 float64 Delta UT1 = UT1-UTC in seconds (Note 5) - -Returned: - - ut11,ut12 float64 UT1 as a 2-part Julian Date (Note 6) - -Returned (function value): - - int status: +1 = dubious year (Note 3) - 0 = OK - -1 = unacceptable date - -Notes: - - 1. utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any - convenient way between the two arguments, for example where utc1 - is the Julian Day Number and utc2 is the fraction of a day. - - 2. JD cannot unambiguously represent UTC during a leap second unless - special measures are taken. The convention in the present - function is that the JD day represents UTC days whether the - length is 86399, 86400 or 86401 SI seconds. - - 3. The warning status "dubious year" flags UTCs that predate the - introduction of the time scale or that are too far in the future - to be trusted. See Dat for further details. - - 4. The function Dtf2d converts from calendar date and time of - day into 2-part Julian Date, and in the case of UTC implements - the leap-second-ambiguity convention described above. - - 5. Delta UT1 can be obtained from tabulations provided by the - International Earth Rotation and Reference Systems Service. - It is the caller's responsibility to supply a dut1 argument - containing the UT1-UTC value that matches the given UTC. - - 6. The returned ut11,ut12 are such that their sum is the UT1 Julian - Date. - -References: - - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), - IERS Technical Note No. 32, BKG (2004) - - Explanatory Supplement to the Astronomical Almanac, - P. Kenneth Seidelmann (ed), University Science Books (1992) - - Called: - Jd2cal JD to Gregorian calendar - Dat delta(AT) = TAI-UTC - Utctai UTC to TAI - Taiut1 TAI to UT1 -*/ -func Utcut1(utc1, utc2, dut1 float64, ut11, ut12 *float64) int { - var iy, im, id, js, jw int - var w, dat, dta, tai1, tai2 float64 - - /* Look up TAI-UTC. */ - if Jd2cal(utc1, utc2, &iy, &im, &id, &w) != 0 { - return -1 - } - js = Dat(iy, im, id, 0.0, &dat) - if js < 0 { - return -1 - } - - /* Form UT1-TAI. */ - dta = dut1 - dat - - /* UTC to TAI to UT1. */ - jw = Utctai(utc1, utc2, &tai1, &tai2) - if jw < 0 { - return -1 - } else if jw > 0 { - js = jw - } - if Taiut1(tai1, tai2, dta, ut11, ut12) != 0 { - return -1 - } - - /* Status. */ - return js - -} diff --git a/vendor/github.com/hebl/gofa/vml.go b/vendor/github.com/hebl/gofa/vml.go deleted file mode 100644 index ca615c8..0000000 --- a/vendor/github.com/hebl/gofa/vml.go +++ /dev/null @@ -1,1245 +0,0 @@ -// Copyright 2022 HE Boliang -// All rights reserved. - -package gofa - -// Vector/Matrix Library - -// 1. Initialization (4) - -// Operations involving p-vectors and r-matrices (3) - -/* -Zp Zero a p-vector. - -Returned: - p [3]float64 zero p-vector -*/ -func Zp(p *[3]float64) { - p[0] = 0.0 - p[1] = 0.0 - p[2] = 0.0 -} - -/* -Zr Initialize an r-matrix to the null matrix. - -Returned: - r [3][3]float64 r-matrix -*/ -func Zr(r *[3][3]float64) { - r[0][0] = 0.0 - r[0][1] = 0.0 - r[0][2] = 0.0 - r[1][0] = 0.0 - r[1][1] = 0.0 - r[1][2] = 0.0 - r[2][0] = 0.0 - r[2][1] = 0.0 - r[2][2] = 0.0 -} - -/* -Ir Initialize an r-matrix to the identity matrix. - -Returned: - r [3][3]float64 r-matrix -*/ -func Ir(r *[3][3]float64) { - r[0][0] = 1.0 - r[0][1] = 0.0 - r[0][2] = 0.0 - r[1][0] = 0.0 - r[1][1] = 1.0 - r[1][2] = 0.0 - r[2][0] = 0.0 - r[2][1] = 0.0 - r[2][2] = 1.0 -} - -/* -Zpv Zero a pv-vector. - -Returned: - pv [2][3]float64 zero pv-vector - -Called: - Zp zero p-vector -*/ -func Zpv(pv *[2][3]float64) { - Zp(&pv[0]) - Zp(&pv[1]) -} - -// 2. Copy/Extend/Extract (5) - -// Operations involving p-vectors and r-matrices (2) - -/* -Cp Copy a p-vector. - -Given: - p [3]float64 p-vector to be copied - -Returned: - c [3]float64 copy -*/ -func Cp(p [3]float64, c *[3]float64) { - c[0] = p[0] - c[1] = p[1] - c[2] = p[2] -} - -/* -Cr Copy an r-matrix. - -Given: - r [3][3]float64 r-matrix to be copied - -Returned: - c [3][3]float64 copy - -Called: - Cp copy p-vector -*/ -func Cr(r [3][3]float64, c *[3][3]float64) { - Cp(r[0], &c[0]) - Cp(r[1], &c[1]) - Cp(r[2], &c[2]) -} - -// Operations involving pv-vectors (3) - -/* -Cpv Copy a position/velocity vector. - -Given: - pv [2][3]float64 position/velocity vector to be copied - -Returned: - c [2][3]float64 copy -*/ -func Cpv(pv [2][3]float64, c *[2][3]float64) { - Cp(pv[0], &c[0]) - Cp(pv[1], &c[1]) -} - -/* -P2pv Extend a p-vector to a pv-vector by appending a zero velocity. - -Given: - p [3]float64 p-vector - -Returned: - pv [2][3]float64 pv-vector - -Called: - Cp copy p-vector - Zp zero p-vector -*/ -func P2pv(p [3]float64, pv *[2][3]float64) { - Cp(p, &pv[0]) - Zp(&pv[1]) -} - -/* -Pv2p Discard velocity component of a pv-vector. - -Given: - pv [2][3]float64 pv-vector - -Returned: - p [3]float64 p-vector - -Called: - Cp copy p-vector -*/ -func Pv2p(pv [2][3]float64, p *[3]float64) { - Cp(pv[0], p) -} - -// 3. Build Rotations (3) - -/* -Rx Rotate an r-matrix about the x-axis. - -Given: - phi float64 angle (radians) - -Given and returned: - r [3][3]float64 r-matrix, rotated - -Notes: - - 1) Calling this function with positive phi incorporates in the - supplied r-matrix r an additional rotation, about the x-axis, - anticlockwise as seen looking towards the origin from positive x. - - 2) The additional rotation can be represented by this matrix: - - ( 1 0 0 ) - ( ) - ( 0 + cos(phi) + sin(phi) ) - ( ) - ( 0 - sin(phi) + cos(phi) ) -*/ -func Rx(phi float64, r *[3][3]float64) { - var s, c, a10, a11, a12, a20, a21, a22 float64 - - s = sin(phi) - c = cos(phi) - - a10 = c*r[1][0] + s*r[2][0] - a11 = c*r[1][1] + s*r[2][1] - a12 = c*r[1][2] + s*r[2][2] - a20 = -s*r[1][0] + c*r[2][0] - a21 = -s*r[1][1] + c*r[2][1] - a22 = -s*r[1][2] + c*r[2][2] - - r[1][0] = a10 - r[1][1] = a11 - r[1][2] = a12 - r[2][0] = a20 - r[2][1] = a21 - r[2][2] = a22 -} - -/* -Ry Rotate an r-matrix about the y-axis. - -Given: - theta float64 angle (radians) - -Given and returned: - r [3][3]float64 r-matrix, rotated - -Notes: - - 1) Calling this function with positive theta incorporates in the - supplied r-matrix r an additional rotation, about the y-axis, - anticlockwise as seen looking towards the origin from positive y. - - 2) The additional rotation can be represented by this matrix: - - ( + cos(theta) 0 - sin(theta) ) - ( ) - ( 0 1 0 ) - ( ) - ( + sin(theta) 0 + cos(theta) ) -*/ -func Ry(theta float64, r *[3][3]float64) { - var s, c, a00, a01, a02, a20, a21, a22 float64 - - s = sin(theta) - c = cos(theta) - - a00 = c*r[0][0] - s*r[2][0] - a01 = c*r[0][1] - s*r[2][1] - a02 = c*r[0][2] - s*r[2][2] - a20 = s*r[0][0] + c*r[2][0] - a21 = s*r[0][1] + c*r[2][1] - a22 = s*r[0][2] + c*r[2][2] - - r[0][0] = a00 - r[0][1] = a01 - r[0][2] = a02 - r[2][0] = a20 - r[2][1] = a21 - r[2][2] = a22 -} - -/* -Rz Rotate an r-matrix about the z-axis. - -Given: - psi float64 angle (radians) - -Given and returned: - r [3][3]float64 r-matrix, rotated - -Notes: - - 1) Calling this function with positive psi incorporates in the - supplied r-matrix r an additional rotation, about the z-axis, - anticlockwise as seen looking towards the origin from positive z. - - 2) The additional rotation can be represented by this matrix: - - ( + cos(psi) + sin(psi) 0 ) - ( ) - ( - sin(psi) + cos(psi) 0 ) - ( ) - ( 0 0 1 ) -*/ -func Rz(psi float64, r *[3][3]float64) { - var s, c, a00, a01, a02, a10, a11, a12 float64 - - s = sin(psi) - c = cos(psi) - - a00 = c*r[0][0] + s*r[1][0] - a01 = c*r[0][1] + s*r[1][1] - a02 = c*r[0][2] + s*r[1][2] - a10 = -s*r[0][0] + c*r[1][0] - a11 = -s*r[0][1] + c*r[1][1] - a12 = -s*r[0][2] + c*r[1][2] - - r[0][0] = a00 - r[0][1] = a01 - r[0][2] = a02 - r[1][0] = a10 - r[1][1] = a11 - r[1][2] = a12 - -} - -// 4. Spherical/Cartesian Conversions (6) - -// Operations involving p-vectors and r-matrices (4) - -/* -S2c Convert spherical coordinates to Cartesian. - -Given: - theta float64 longitude angle (radians) - phi float64 latitude angle (radians) - -Returned: - c [3]float64 direction cosines -*/ -func S2c(theta, phi float64, c *[3]float64) { - var cp float64 - - cp = cos(phi) - c[0] = cos(theta) * cp - c[1] = sin(theta) * cp - c[2] = sin(phi) -} - -/* -C2s P-vector to spherical coordinates. - -Given: - p [3]float64 p-vector - -Returned: - theta float64 longitude angle (radians) - phi float64 latitude angle (radians) - -Notes: - - 1) The vector p can have any magnitude; only its direction is used. - - 2) If p is null, zero theta and phi are returned. - - 3) At either pole, zero theta is returned. -*/ -func C2s(p [3]float64, theta *float64, phi *float64) { - var x, y, z, d2 float64 - - x = p[0] - y = p[1] - z = p[2] - d2 = x*x + y*y - - if d2 == 0.0 { - *theta = 0.0 - } else { - *theta = atan2(y, x) - } - - if z == 0.0 { - *phi = 0.0 - } else { - *phi = atan2(z, sqrt(d2)) - } -} - -/* -S2p Convert spherical polar coordinates to p-vector. - -Given: - theta float64 longitude angle (radians) - phi float64 latitude angle (radians) - r float64 radial distance - -Returned: - p [3]float64 Cartesian coordinates - -Called: - S2c spherical coordinates to unit vector - Sxp multiply p-vector by scalar -*/ -func S2p(theta, phi, r float64, p *[3]float64) { - u := [3]float64{} - - S2c(theta, phi, &u) - Sxp(r, u, p) -} - -/* -P2s P-vector to spherical polar coordinates. - -Given: - p [3]float64 p-vector - -Returned: - theta float64 longitude angle (radians) - phi float64 latitude angle (radians) - r float64 radial distance - -Notes: - - 1) If P is null, zero theta, phi and r are returned. - - 2) At either pole, zero theta is returned. - -Called: - C2s p-vector to spherical - Pm modulus of p-vector -*/ -func P2s(p [3]float64, theta *float64, phi *float64, r *float64) { - C2s(p, theta, phi) - *r = Pm(p) -} - -// Operations involving pv-vectors (2) - -/* -S2pv Convert position/velocity from spherical to Cartesian coordinates. - -Given: - theta float64 longitude angle (radians) - phi float64 latitude angle (radians) - r float64 radial distance - td float64 rate of change of theta - pd float64 rate of change of phi - rd float64 rate of change of r - -Returned: - pv [2][3]float64 pv-vector -*/ -func S2pv(theta, phi, r float64, td, pd, rd float64, pv *[2][3]float64) { - var st, ct, sp, cp, rcp, x, y, rpd, w float64 - - st = sin(theta) - ct = cos(theta) - sp = sin(phi) - cp = cos(phi) - rcp = r * cp - x = rcp * ct - y = rcp * st - rpd = r * pd - w = rpd*sp - cp*rd - - pv[0][0] = x - pv[0][1] = y - pv[0][2] = r * sp - pv[1][0] = -y*td - w*ct - pv[1][1] = x*td - w*st - pv[1][2] = rpd*cp + sp*rd -} - -/* -Pv2s Convert position/velocity from Cartesian to spherical coordinates. - -Given: - pv [2][3]float64 pv-vector - -Returned: - theta float64 longitude angle (radians) - phi float64 latitude angle (radians) - r float64 radial distance - td float64 rate of change of theta - pd float64 rate of change of phi - rd float64 rate of change of r - -Notes: - - 1) If the position part of pv is null, theta, phi, td and pd - are indeterminate. This is handled by extrapolating the - position through unit time by using the velocity part of - pv. This moves the origin without changing the direction - of the velocity component. If the position and velocity - components of pv are both null, zeroes are returned for all - six results. - - 2) If the position is a pole, theta, td and pd are indeterminate. - In such cases zeroes are returned for all three. -*/ -func Pv2s(pv [2][3]float64, theta, phi, r *float64, td, pd, rd *float64) { - var x, y, z, xd, yd, zd, rxy2, rxy, r2, rtrue, rw, xyp float64 - - /* Components of position/velocity vector. */ - x = pv[0][0] - y = pv[0][1] - z = pv[0][2] - xd = pv[1][0] - yd = pv[1][1] - zd = pv[1][2] - - /* Component of r in XY plane squared. */ - rxy2 = x*x + y*y - - /* Modulus squared. */ - r2 = rxy2 + z*z - - /* Modulus. */ - rtrue = sqrt(r2) - - /* If null vector, move the origin along the direction of movement. */ - rw = rtrue - if rtrue == 0.0 { - x = xd - y = yd - z = zd - rxy2 = x*x + y*y - r2 = rxy2 + z*z - rw = sqrt(r2) - } - - /* Position and velocity in spherical coordinates. */ - rxy = sqrt(rxy2) - xyp = x*xd + y*yd - if rxy2 != 0.0 { - *theta = atan2(y, x) - *phi = atan2(z, rxy) - *td = (x*yd - y*xd) / rxy2 - *pd = (zd*rxy2 - z*xyp) / (r2 * rxy) - } else { - *theta = 0.0 - if z != 0.0 { - *phi = atan2(z, rxy) - } else { - *phi = 0.0 - } - - *td = 0.0 - *pd = 0.0 - } - *r = rtrue - - if rw != 0.0 { - *rd = (xyp + z*zd) / rw - } else { - *rd = 0.0 - } - -} - -// 5. Operations on Vectors (17) - -// Operations involving p-vectors and r-matrices (8) - -/* -Ppp P-vector addition. - -Given: - a [3]float64 first p-vector - b [3]float64 second p-vector - -Returned: - apb [3]float64 a + b - -Note: - It is permissible to re-use the same array for any of the - arguments. -*/ -func Ppp(a, b [3]float64, apb *[3]float64) { - apb[0] = a[0] + b[0] - apb[1] = a[1] + b[1] - apb[2] = a[2] + b[2] -} - -/* -Pmp P-vector subtraction. - -Given: - a [3]float64 first p-vector - b [3]float64 second p-vector - -Returned: - amb [3]float64 a - b - -Note: - It is permissible to re-use the same array for any of the - arguments. -*/ -func Pmp(a, b [3]float64, amb *[3]float64) { - amb[0] = a[0] - b[0] - amb[1] = a[1] - b[1] - amb[2] = a[2] - b[2] -} - -/* -Ppsp P-vector plus scaled p-vector. - -Given: - a [3]float64 first p-vector - s float64 scalar (multiplier for b) - b [3]float64 second p-vector - -Returned: - apsb [3]float64 a + s*b - -Note: - It is permissible for any of a, b and apsb to be the same array. - -Called: - Sxp multiply p-vector by scalar - Ppp p-vector plus p-vector -*/ -func Ppsp(a [3]float64, s float64, b [3]float64, apsb *[3]float64) { - var sb [3]float64 - - /* s*b. */ - Sxp(s, b, &sb) - - /* a + s*b. */ - Ppp(a, sb, apsb) - -} - -/* -Pdp p-vector inner (=scalar=dot) product. - -Given: - a [3]float64 first p-vector - b [3]float64 second p-vector - -Returned (function value): - float64 a . b -*/ -func Pdp(a, b [3]float64) float64 { - w := a[0]*b[0] + a[1]*b[1] + a[2]*b[2] - return w -} - -/* -Pxp p-vector outer (=vector=cross) product. - -Given: - a [3]float64 first p-vector - b [3]float64 second p-vector - -Returned: - axb [3]float64 a x b - -Note: - It is permissible to re-use the same array for any of the - arguments. -*/ -func Pxp(a, b [3]float64, axb *[3]float64) { - var xa, ya, za, xb, yb, zb float64 - - xa = a[0] - ya = a[1] - za = a[2] - xb = b[0] - yb = b[1] - zb = b[2] - axb[0] = ya*zb - za*yb - axb[1] = za*xb - xa*zb - axb[2] = xa*yb - ya*xb -} - -/* -Pm Modulus of p-vector. - -Given: - p [3]float64 p-vector - -Returned (function value): - float64 modulus -*/ -func Pm(p [3]float64) float64 { - return sqrt(p[0]*p[0] + p[1]*p[1] + p[2]*p[2]) -} - -/* -Pn Convert a p-vector into modulus and unit vector. - -Given: - p [3]float64 p-vector - -Returned: - r float64 modulus - u [3]float64 unit vector - -Notes: - - 1) If p is null, the result is null. Otherwise the result is a unit - vector. - - 2) It is permissible to re-use the same array for any of the - arguments. - -Called: - Pm modulus of p-vector - Zp zero p-vector - Sxp multiply p-vector by scalar -*/ -func Pn(p [3]float64, r *float64, u *[3]float64) { - var w float64 - - /* Obtain the modulus and test for zero. */ - w = Pm(p) - if w == 0.0 { - /* Null vector. */ - Zp(u) - } else { - /* Unit vector. */ - Sxp(1.0/w, p, u) - } - - /* Return the modulus. */ - *r = w -} - -/* -Sxp Multiply a p-vector by a scalar. - -Given: - s float64 scalar - p [3]float64 p-vector - -Returned: - sp [3]float64 s * p - -Note: - It is permissible for p and sp to be the same array. -*/ -func Sxp(s float64, p [3]float64, sp *[3]float64) { - sp[0] = s * p[0] - sp[1] = s * p[1] - sp[2] = s * p[2] -} - -// Operations involving pv-vectors (9) - -/* -Pvppv Add one pv-vector to another. - -Given: - a [2][3]float64 first pv-vector - b [2][3]float64 second pv-vector - -Returned: - apb [2][3]float64 a + b - -Note: - It is permissible to re-use the same array for any of the - arguments. - -Called: - Ppp p-vector plus p-vector -*/ -func Pvppv(a, b [2][3]float64, apb *[2][3]float64) { - Ppp(a[0], b[0], &apb[0]) - Ppp(a[1], b[1], &apb[1]) -} - -/* -Pvmpv Subtract one pv-vector from another. - -Given: - a [2][3]float64 first pv-vector - b [2][3]float64 second pv-vector - -Returned: - amb [2][3]float64 a - b - -Note: - It is permissible to re-use the same array for any of the - arguments. - -Called: - Pmp p-vector minus p-vector -*/ -func Pvmpv(a, b [2][3]float64, amb *[2][3]float64) { - Pmp(a[0], b[0], &amb[0]) - Pmp(a[1], b[1], &amb[1]) -} - -/* -Pvdpv Inner (=scalar=dot) product of two pv-vectors. - -Given: - a [2][3]float64 first pv-vector - b [2][3]float64 second pv-vector - -Returned: - adb [2]float64 a . b (see note) - -Note: - - If the position and velocity components of the two pv-vectors are - ( ap, av ) and ( bp, bv ), the result, a . b, is the pair of - numbers ( ap . bp , ap . bv + av . bp ). The two numbers are the - dot-product of the two p-vectors and its derivative. - -Called: - Pdp scalar product of two p-vectors -*/ -func Pvdpv(a, b [2][3]float64, adb *[2]float64) { - var adbd, addb float64 - - /* a . b = constant part of result. */ - adb[0] = Pdp(a[0], b[0]) - - /* a . bdot */ - adbd = Pdp(a[0], b[1]) - - /* adot . b */ - addb = Pdp(a[1], b[0]) - - /* Velocity part of result. */ - adb[1] = adbd + addb -} - -/* -Pvxpv Outer (=vector=cross) product of two pv-vectors. - -Given: - a [2][3]float64 first pv-vector - b [2][3]float64 second pv-vector - -Returned: - axb [2][3]float64 a x b - -Notes: - - 1) If the position and velocity components of the two pv-vectors are - ( ap, av ) and ( bp, bv ), the result, a x b, is the pair of - vectors ( ap x bp, ap x bv + av x bp ). The two vectors are the - cross-product of the two p-vectors and its derivative. - - 2) It is permissible to re-use the same array for any of the - arguments. - -Called: - Cpv copy pv-vector - Pxp vector product of two p-vectors - Ppp p-vector plus p-vector -*/ -func Pvxpv(a, b [2][3]float64, axb *[2][3]float64) { - var wa, wb [2][3]float64 - var axbd, adxb [3]float64 - - /* Make copies of the inputs. */ - Cpv(a, &wa) - Cpv(b, &wb) - - /* a x b = position part of result. */ - Pxp(wa[0], wb[0], &axb[0]) - - /* a x bdot + adot x b = velocity part of result. */ - Pxp(wa[0], wb[1], &axbd) - Pxp(wa[1], wb[0], &adxb) - Ppp(axbd, adxb, &axb[1]) -} - -/* -Pvm Modulus of pv-vector. - -Given: - pv [2][3]float64 pv-vector - -Returned: - r float64 modulus of position component - s float64 modulus of velocity component - -Called: - Pm modulus of p-vector -*/ -func Pvm(pv [2][3]float64, r, s *float64) { - /* Distance. */ - *r = Pm(pv[0]) - - /* Speed. */ - *s = Pm(pv[1]) -} - -/* -Sxpv Multiply a pv-vector by a scalar. - -Given: - s float64 scalar - pv [2][3]float64 pv-vector - -Returned: - spv [2][3]float64 s * pv - -Note: - It is permissible for pv and spv to be the same array. - -Called: - S2xpv multiply pv-vector by two scalars -*/ -func Sxpv(s float64, pv [2][3]float64, spv *[2][3]float64) { - S2xpv(s, s, pv, spv) -} - -/* -S2xpv Multiply a pv-vector by two scalars. - -Given: - s1 float64 scalar to multiply position component by - s2 float64 scalar to multiply velocity component by - pv [2][3]float64 pv-vector - -Returned: - spv [2][3]float64 pv-vector: p scaled by s1, v scaled by s2 - -Note: - It is permissible for pv and spv to be the same array. - -Called: - Sxp multiply p-vector by scalar -*/ -func S2xpv(s1, s2 float64, pv [2][3]float64, spv *[2][3]float64) { - Sxp(s1, pv[0], &spv[0]) - Sxp(s2, pv[1], &spv[1]) -} - -/* -Pvu Update a pv-vector. - -Given: - dt float64 time interval - pv [2][3]float64 pv-vector - -Returned: - upv [2][3]float64 p updated, v unchanged - -Notes: - - 1) "Update" means "refer the position component of the vector - to a new date dt time units from the existing date". - - 2) The time units of dt must match those of the velocity. - - 3) It is permissible for pv and upv to be the same array. - -Called: - Ppsp p-vector plus scaled p-vector - Cp copy p-vector -*/ -func Pvu(dt float64, pv [2][3]float64, upv *[2][3]float64) { - Ppsp(pv[0], dt, pv[1], &upv[0]) - Cp(pv[1], &upv[1]) -} - -/* -Pvup Update a pv-vector, discarding the velocity component. - -Status: vector/matrix support function. - -Given: - dt float64 time interval - pv [2][3]float64 pv-vector - -Returned: - p [3]float64 p-vector - -Notes: - - 1) "Update" means "refer the position component of the vector to a - new date dt time units from the existing date". - - 2) The time units of dt must match those of the velocity. -*/ -func Pvup(dt float64, pv [2][3]float64, p *[3]float64) { - p[0] = pv[0][0] + dt*pv[1][0] - p[1] = pv[0][1] + dt*pv[1][1] - p[2] = pv[0][2] + dt*pv[1][2] -} - -// 6. Operations on matrices (2) - -/* -Rxr Multiply two r-matrices. - -Given: - a [3][3]float64 first r-matrix - b [3][3]float64 second r-matrix - -Returned: - atb [3][3]float64 a * b - -Note: - It is permissible to re-use the same array for any of the - arguments. - -Called: - Cr copy r-matrix -*/ -func Rxr(a, b [3][3]float64, atb *[3][3]float64) { - - var w float64 - var wm [3][3]float64 - - for i := 0; i < 3; i++ { - for j := 0; j < 3; j++ { - w = 0.0 - for k := 0; k < 3; k++ { - w += a[i][k] * b[k][j] - } - wm[i][j] = w - } - } - Cr(wm, atb) -} - -/* -Tr Transpose an r-matrix. - -Given: - r [3][3]float64 r-matrix - -Returned: - rt [3][3]float64 transpose - -Note: - It is permissible for r and rt to be the same array. - -Called: - Cr copy r-matrix -*/ -func Tr(r [3][3]float64, rt *[3][3]float64) { - var wm [3][3]float64 - - for i := 0; i < 3; i++ { - for j := 0; j < 3; j++ { - wm[i][j] = r[j][i] - } - } - Cr(wm, rt) -} - -// 7. Matrix-vector products (4) - -// Operations involving p-vectors and r-matrices (2) - -/* -Rxp Multiply a p-vector by an r-matrix. - -Given: - r [3][3]float64 r-matrix - p [3]float64 p-vector - -Returned: - rp [3]float64 r * p - -Note: - It is permissible for p and rp to be the same array. - -Called: - Cp copy p-vector -*/ -func Rxp(r [3][3]float64, p [3]float64, rp *[3]float64) { - var w float64 - var wrp [3]float64 - //var i, j int - - /* Matrix r * vector p. */ - for j := 0; j < 3; j++ { - w = 0.0 - for i := 0; i < 3; i++ { - w += r[j][i] * p[i] - } - wrp[j] = w - } - - /* Return the result. */ - Cp(wrp, rp) -} - -/* -Trxp Multiply a p-vector by the transpose of an r-matrix. - -Given: - r [3][3]float64 r-matrix - p [3]float64 p-vector - -Returned: - trp [3]float64 r^T * p - -Note: - It is permissible for p and trp to be the same array. - -Called: - Tr transpose r-matrix - Rxp product of r-matrix and p-vector -*/ -func Trxp(r [3][3]float64, p [3]float64, trp *[3]float64) { - var tr [3][3]float64 - - /* Transpose of matrix r. */ - Tr(r, &tr) - - /* Matrix tr * vector p -> vector trp. */ - Rxp(tr, p, trp) -} - -// Operations involving pv-vectors (2) - -/* -Rxpv Multiply a pv-vector by an r-matrix. - -Given: - r [3][3]float64 r-matrix - pv [2][3]float64 pv-vector - -Returned: - rpv [2][3]float64 r * pv - -Notes: - - 1) The algorithm is for the simple case where the r-matrix r is not - a function of time. The case where r is a function of time leads - to an additional velocity component equal to the product of the - derivative of r and the position vector. - - 2) It is permissible for pv and rpv to be the same array. - -Called: - Rxp product of r-matrix and p-vector -*/ -func Rxpv(r [3][3]float64, pv [2][3]float64, rpv *[2][3]float64) { - Rxp(r, pv[0], &rpv[0]) - Rxp(r, pv[1], &rpv[1]) -} - -/* -Trxpv Multiply a pv-vector by the transpose of an r-matrix. - -Given: - r [3][3]float64 r-matrix - pv [2][3]float64 pv-vector - -Returned: - trpv [2][3]float64 r^T * pv - -Notes: - - 1) The algorithm is for the simple case where the r-matrix r is not - a function of time. The case where r is a function of time leads - to an additional velocity component equal to the product of the - derivative of the transpose of r and the position vector. - - 2) It is permissible for pv and rpv to be the same array. - -Called: - Tr transpose r-matrix - Rxpv product of r-matrix and pv-vector -*/ -func Trxpv(r [3][3]float64, pv [2][3]float64, trpv *[2][3]float64) { - var tr [3][3]float64 - - /* Transpose of matrix r. */ - Tr(r, &tr) - - /* Matrix tr * vector pv -> vector trpv. */ - Rxpv(tr, pv, trpv) -} - -// 9. Rotation vectors (2) - -/* -Rv2m Form the r-matrix corresponding to a given r-vector. - -Given: - w [3]float64 rotation vector (Note 1) - -Returned: - r [3][3]float64 rotation matrix - -Notes: - - 1) A rotation matrix describes a rotation through some angle about - some arbitrary axis called the Euler axis. The "rotation vector" - supplied to This function has the same direction as the Euler - axis, and its magnitude is the angle in radians. - - 2) If w is null, the identity matrix is returned. - - 3) The reference frame rotates clockwise as seen looking along the - rotation vector from the origin. -*/ -func Rv2m(w [3]float64, r *[3][3]float64) { - var x, y, z, phi, s, c, f float64 - - /* Euler angle (magnitude of rotation vector) and functions. */ - x = w[0] - y = w[1] - z = w[2] - phi = sqrt(x*x + y*y + z*z) - s = sin(phi) - c = cos(phi) - f = 1.0 - c - - /* Euler axis (direction of rotation vector), perhaps null. */ - if phi > 0.0 { - x /= phi - y /= phi - z /= phi - } - - /* Form the rotation matrix. */ - r[0][0] = x*x*f + c - r[0][1] = x*y*f + z*s - r[0][2] = x*z*f - y*s - r[1][0] = y*x*f - z*s - r[1][1] = y*y*f + c - r[1][2] = y*z*f + x*s - r[2][0] = z*x*f + y*s - r[2][1] = z*y*f - x*s - r[2][2] = z*z*f + c - -} - -/* -Rm2v Express an r-matrix as an r-vector. - -Given: - r [3][3]float64 rotation matrix - -Returned: - w [3]float64 rotation vector (Note 1) - -Notes: - - 1) A rotation matrix describes a rotation through some angle about - some arbitrary axis called the Euler axis. The "rotation vector" - returned by this function has the same direction as the Euler axis, - and its magnitude is the angle in radians. (The magnitude and - direction can be separated by means of the function iauPn.) - - 2) If r is null, so is the result. If r is not a rotation matrix - the result is undefined; r must be proper (i.e. have a positive - determinant) and real orthogonal (inverse = transpose). - - 3) The reference frame rotates clockwise as seen looking along - the rotation vector from the origin. -*/ -func Rm2v(r [3][3]float64, w *[3]float64) { - var x, y, z, s2, c2, phi, f float64 - - x = r[1][2] - r[2][1] - y = r[2][0] - r[0][2] - z = r[0][1] - r[1][0] - s2 = sqrt(x*x + y*y + z*z) - if s2 > 0 { - c2 = r[0][0] + r[1][1] + r[2][2] - 1.0 - phi = atan2(s2, c2) - f = phi / s2 - w[0] = x * f - w[1] = y * f - w[2] = z * f - } else { - w[0] = 0.0 - w[1] = 0.0 - w[2] = 0.0 - } -} diff --git a/vendor/github.com/inconshreveable/mousetrap/LICENSE b/vendor/github.com/inconshreveable/mousetrap/LICENSE deleted file mode 100644 index 5f920e9..0000000 --- a/vendor/github.com/inconshreveable/mousetrap/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2022 Alan Shreve (@inconshreveable) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/inconshreveable/mousetrap/README.md b/vendor/github.com/inconshreveable/mousetrap/README.md deleted file mode 100644 index 7a950d1..0000000 --- a/vendor/github.com/inconshreveable/mousetrap/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# mousetrap - -mousetrap is a tiny library that answers a single question. - -On a Windows machine, was the process invoked by someone double clicking on -the executable file while browsing in explorer? - -### Motivation - -Windows developers unfamiliar with command line tools will often "double-click" -the executable for a tool. Because most CLI tools print the help and then exit -when invoked without arguments, this is often very frustrating for those users. - -mousetrap provides a way to detect these invocations so that you can provide -more helpful behavior and instructions on how to run the CLI tool. To see what -this looks like, both from an organizational and a technical perspective, see -https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/ - -### The interface - -The library exposes a single interface: - - func StartedByExplorer() (bool) diff --git a/vendor/github.com/inconshreveable/mousetrap/trap_others.go b/vendor/github.com/inconshreveable/mousetrap/trap_others.go deleted file mode 100644 index 06a91f0..0000000 --- a/vendor/github.com/inconshreveable/mousetrap/trap_others.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build !windows -// +build !windows - -package mousetrap - -// StartedByExplorer returns true if the program was invoked by the user -// double-clicking on the executable from explorer.exe -// -// It is conservative and returns false if any of the internal calls fail. -// It does not guarantee that the program was run from a terminal. It only can tell you -// whether it was launched from explorer.exe -// -// On non-Windows platforms, it always returns false. -func StartedByExplorer() bool { - return false -} diff --git a/vendor/github.com/inconshreveable/mousetrap/trap_windows.go b/vendor/github.com/inconshreveable/mousetrap/trap_windows.go deleted file mode 100644 index 0c56880..0000000 --- a/vendor/github.com/inconshreveable/mousetrap/trap_windows.go +++ /dev/null @@ -1,42 +0,0 @@ -package mousetrap - -import ( - "syscall" - "unsafe" -) - -func getProcessEntry(pid int) (*syscall.ProcessEntry32, error) { - snapshot, err := syscall.CreateToolhelp32Snapshot(syscall.TH32CS_SNAPPROCESS, 0) - if err != nil { - return nil, err - } - defer syscall.CloseHandle(snapshot) - var procEntry syscall.ProcessEntry32 - procEntry.Size = uint32(unsafe.Sizeof(procEntry)) - if err = syscall.Process32First(snapshot, &procEntry); err != nil { - return nil, err - } - for { - if procEntry.ProcessID == uint32(pid) { - return &procEntry, nil - } - err = syscall.Process32Next(snapshot, &procEntry) - if err != nil { - return nil, err - } - } -} - -// StartedByExplorer returns true if the program was invoked by the user double-clicking -// on the executable from explorer.exe -// -// It is conservative and returns false if any of the internal calls fail. -// It does not guarantee that the program was run from a terminal. It only can tell you -// whether it was launched from explorer.exe -func StartedByExplorer() bool { - pe, err := getProcessEntry(syscall.Getppid()) - if err != nil { - return false - } - return "explorer.exe" == syscall.UTF16ToString(pe.ExeFile[:]) -} diff --git a/vendor/github.com/k0kubun/pp/v3/.github_changelog_generator b/vendor/github.com/k0kubun/pp/v3/.github_changelog_generator deleted file mode 100644 index caec759..0000000 --- a/vendor/github.com/k0kubun/pp/v3/.github_changelog_generator +++ /dev/null @@ -1,2 +0,0 @@ -user=k0kubun -project=pp diff --git a/vendor/github.com/k0kubun/pp/v3/CHANGELOG.md b/vendor/github.com/k0kubun/pp/v3/CHANGELOG.md deleted file mode 100644 index bb53179..0000000 --- a/vendor/github.com/k0kubun/pp/v3/CHANGELOG.md +++ /dev/null @@ -1,258 +0,0 @@ -# Changelog - -## [v3.2.0](https://github.com/k0kubun/pp/tree/v3.2.0) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v3.1.0...v3.2.0) - -**Closed issues:** - -- ignore private fields in a struct in pretty print golang [\#74](https://github.com/k0kubun/pp/issues/74) -- Bug?: Colorize map field names/keys using "FieldName" color scheme setting [\#72](https://github.com/k0kubun/pp/issues/72) -- Printf not work correctly [\#70](https://github.com/k0kubun/pp/issues/70) -- How to use the latest version? [\#69](https://github.com/k0kubun/pp/issues/69) -- Please provide a simple way to disable color [\#67](https://github.com/k0kubun/pp/issues/67) -- disable printing of struct metadata [\#66](https://github.com/k0kubun/pp/issues/66) - -**Merged pull requests:** - -- Expose defaultPrettyPrinter as pp.Default [\#75](https://github.com/k0kubun/pp/pull/75) ([k0kubun](https://github.com/k0kubun)) -- Bump github.com/mattn/go-colorable from 0.1.12 to 0.1.13 [\#73](https://github.com/k0kubun/pp/pull/73) ([dependabot[bot]](https://github.com/apps/dependabot)) -- doc: fix pp.go arguments word typo [\#68](https://github.com/k0kubun/pp/pull/68) ([rasecoiac03](https://github.com/rasecoiac03)) - -## [v3.1.0](https://github.com/k0kubun/pp/tree/v3.1.0) (2022-01-06) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v3.0.10...v3.1.0) - -**Merged pull requests:** - -- Use SetDecimalUnit\(true\) by default [\#65](https://github.com/k0kubun/pp/pull/65) ([k0kubun](https://github.com/k0kubun)) - -## [v3.0.10](https://github.com/k0kubun/pp/tree/v3.0.10) (2022-01-06) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v3.0.9...v3.0.10) - -**Merged pull requests:** - -- Remove k0kubun/colorstring from dependencies [\#64](https://github.com/k0kubun/pp/pull/64) ([k0kubun](https://github.com/k0kubun)) - -## [v3.0.9](https://github.com/k0kubun/pp/tree/v3.0.9) (2022-01-06) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v3.0.8...v3.0.9) - -**Merged pull requests:** - -- Bump github.com/mattn/go-colorable from 0.1.7 to 0.1.12 [\#63](https://github.com/k0kubun/pp/pull/63) ([dependabot[bot]](https://github.com/apps/dependabot)) - -## [v3.0.8](https://github.com/k0kubun/pp/tree/v3.0.8) (2021-11-30) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v3.0.7...v3.0.8) - -**Closed issues:** - -- Add option to skip unexported fields [\#59](https://github.com/k0kubun/pp/issues/59) -- Verb '%T' is working incorrectly in formatted print [\#58](https://github.com/k0kubun/pp/issues/58) -- Option to print byte as decimal [\#54](https://github.com/k0kubun/pp/issues/54) -- Option for thousands separator [\#53](https://github.com/k0kubun/pp/issues/53) -- The color part of vim is messy [\#52](https://github.com/k0kubun/pp/issues/52) -- Bug: `printTime` assumes the standard library time [\#47](https://github.com/k0kubun/pp/issues/47) -- Feature request: Add `pp:"noprint"` tag [\#42](https://github.com/k0kubun/pp/issues/42) -- Feature request: omitempty [\#22](https://github.com/k0kubun/pp/issues/22) -- Unable to print invalid address [\#21](https://github.com/k0kubun/pp/issues/21) - -**Merged pull requests:** - -- build: upgrade `go` directive in `go.mod` to 1.17 [\#62](https://github.com/k0kubun/pp/pull/62) ([Juneezee](https://github.com/Juneezee)) -- SetThousandsSeparator [\#61](https://github.com/k0kubun/pp/pull/61) ([mariusgrigoriu](https://github.com/mariusgrigoriu)) -- Add ExportedOnly option [\#60](https://github.com/k0kubun/pp/pull/60) ([k0kubun](https://github.com/k0kubun)) -- Add SetDecimalUint option [\#55](https://github.com/k0kubun/pp/pull/55) ([k0kubun](https://github.com/k0kubun)) -- Add Badge for pkg.go.dev [\#51](https://github.com/k0kubun/pp/pull/51) ([zakuro9715](https://github.com/zakuro9715)) -- Fix typo in README.md [\#50](https://github.com/k0kubun/pp/pull/50) ([bl-ue](https://github.com/bl-ue)) -- Add Struct Tag Support for Printing [\#49](https://github.com/k0kubun/pp/pull/49) ([rickbau5](https://github.com/rickbau5)) -- Ensure time.Time is from standard library [\#48](https://github.com/k0kubun/pp/pull/48) ([bquenin](https://github.com/bquenin)) - -## [v3.0.7](https://github.com/k0kubun/pp/tree/v3.0.7) (2020-11-18) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v3.0.6...v3.0.7) - -**Closed issues:** - -- Sort map by key before printing [\#23](https://github.com/k0kubun/pp/issues/23) - -**Merged pull requests:** - -- Resurrect Go 1.11 support [\#46](https://github.com/k0kubun/pp/pull/46) ([k0kubun](https://github.com/k0kubun)) - -## [v3.0.6](https://github.com/k0kubun/pp/tree/v3.0.6) (2020-11-14) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v3.0.5...v3.0.6) - -**Merged pull requests:** - -- Sort keys of maps [\#45](https://github.com/k0kubun/pp/pull/45) ([k0kubun](https://github.com/k0kubun)) - -## [v3.0.5](https://github.com/k0kubun/pp/tree/v3.0.5) (2020-11-14) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v3.0.4...v3.0.5) - -## [v3.0.4](https://github.com/k0kubun/pp/tree/v3.0.4) (2020-11-12) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v3.0.3...v3.0.4) - -**Closed issues:** - -- Feature request: Pretty print big.Int and big.Float? [\#41](https://github.com/k0kubun/pp/issues/41) - -**Merged pull requests:** - -- chore: optimize CI [\#44](https://github.com/k0kubun/pp/pull/44) ([deliangyang](https://github.com/deliangyang)) -- refactor: use defer release lock [\#43](https://github.com/k0kubun/pp/pull/43) ([deliangyang](https://github.com/deliangyang)) - -## [v3.0.3](https://github.com/k0kubun/pp/tree/v3.0.3) (2020-08-11) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v3.0.2...v3.0.3) - -**Closed issues:** - -- go mod doesn't install 3.0.2 [\#40](https://github.com/k0kubun/pp/issues/40) - -## [v3.0.2](https://github.com/k0kubun/pp/tree/v3.0.2) (2020-05-05) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v3.0.1...v3.0.2) - -**Closed issues:** - -- WithLineInfo print the wrong line [\#39](https://github.com/k0kubun/pp/issues/39) -- Display of nil slice as same as an empty slice [\#36](https://github.com/k0kubun/pp/issues/36) -- Unsure why number coming out in base 16 [\#27](https://github.com/k0kubun/pp/issues/27) -- disable colors when not output is not a tty [\#26](https://github.com/k0kubun/pp/issues/26) - -**Merged pull requests:** - -- Allow changing coloringEnabled per pp instance [\#37](https://github.com/k0kubun/pp/pull/37) ([k0kubun](https://github.com/k0kubun)) -- support Go modules [\#35](https://github.com/k0kubun/pp/pull/35) ([itchyny](https://github.com/itchyny)) -- Add max depth var [\#34](https://github.com/k0kubun/pp/pull/34) ([sumerc](https://github.com/sumerc)) -- Allow own instances of pp [\#33](https://github.com/k0kubun/pp/pull/33) ([Eun](https://github.com/Eun)) -- fix typo of foreground [\#32](https://github.com/k0kubun/pp/pull/32) ([shogo82148](https://github.com/shogo82148)) - -## [v3.0.1](https://github.com/k0kubun/pp/tree/v3.0.1) (2019-04-02) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v3.0.0...v3.0.1) - -## [v3.0.0](https://github.com/k0kubun/pp/tree/v3.0.0) (2019-03-04) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v2.4.0...v3.0.0) - -## [v2.4.0](https://github.com/k0kubun/pp/tree/v2.4.0) (2019-03-03) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v2.3.0...v2.4.0) - -**Merged pull requests:** - -- Fix newline of map type [\#29](https://github.com/k0kubun/pp/pull/29) ([itchyny](https://github.com/itchyny)) -- add MIT license file [\#28](https://github.com/k0kubun/pp/pull/28) ([alteholz](https://github.com/alteholz)) -- Update the map printer to properly print maps. [\#25](https://github.com/k0kubun/pp/pull/25) ([denniszl](https://github.com/denniszl)) - -## [v2.3.0](https://github.com/k0kubun/pp/tree/v2.3.0) (2017-01-23) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v2.2.0...v2.3.0) - -**Merged pull requests:** - -- Add WithLineInfo method for print filename and line number along [\#24](https://github.com/k0kubun/pp/pull/24) ([huydx](https://github.com/huydx)) - -## [v2.2.0](https://github.com/k0kubun/pp/tree/v2.2.0) (2015-07-23) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v2.1.0...v2.2.0) - -**Closed issues:** - -- please do not use unsafe package [\#20](https://github.com/k0kubun/pp/issues/20) - -**Merged pull requests:** - -- check whether reflect.Value can call `Interface()` [\#19](https://github.com/k0kubun/pp/pull/19) ([skatsuta](https://github.com/skatsuta)) -- Fix indent for slices [\#18](https://github.com/k0kubun/pp/pull/18) ([sdidyk](https://github.com/sdidyk)) - -## [v2.1.0](https://github.com/k0kubun/pp/tree/v2.1.0) (2015-04-25) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v2.0.1...v2.1.0) - -**Merged pull requests:** - -- Custom colors [\#17](https://github.com/k0kubun/pp/pull/17) ([sdidyk](https://github.com/sdidyk)) -- Some changes of printer [\#16](https://github.com/k0kubun/pp/pull/16) ([sdidyk](https://github.com/sdidyk)) -- Suppress panic caused by Float values [\#15](https://github.com/k0kubun/pp/pull/15) ([yudai](https://github.com/yudai)) - -## [v2.0.1](https://github.com/k0kubun/pp/tree/v2.0.1) (2015-03-01) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v2.0.0...v2.0.1) - -**Merged pull requests:** - -- escape sequences to pipe [\#13](https://github.com/k0kubun/pp/pull/13) ([mattn](https://github.com/mattn)) - -## [v2.0.0](https://github.com/k0kubun/pp/tree/v2.0.0) (2015-02-14) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v1.3.0...v2.0.0) - -**Closed issues:** - -- Fold large buffers [\#8](https://github.com/k0kubun/pp/issues/8) - -**Merged pull requests:** - -- Fold a large buffer [\#12](https://github.com/k0kubun/pp/pull/12) ([k0kubun](https://github.com/k0kubun)) - -## [v1.3.0](https://github.com/k0kubun/pp/tree/v1.3.0) (2015-02-14) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v1.2.0...v1.3.0) - -**Closed issues:** - -- time.Time formatter [\#2](https://github.com/k0kubun/pp/issues/2) - -**Merged pull requests:** - -- Implement time.Time pretty printer [\#11](https://github.com/k0kubun/pp/pull/11) ([k0kubun](https://github.com/k0kubun)) - -## [v1.2.0](https://github.com/k0kubun/pp/tree/v1.2.0) (2015-02-14) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v1.1.0...v1.2.0) - -**Merged pull requests:** - -- Color escaped characters inside strings [\#10](https://github.com/k0kubun/pp/pull/10) ([motemen](https://github.com/motemen)) - -## [v1.1.0](https://github.com/k0kubun/pp/tree/v1.1.0) (2015-02-14) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v1.0.0...v1.1.0) - -**Merged pull requests:** - -- Handle circular structures [\#9](https://github.com/k0kubun/pp/pull/9) ([motemen](https://github.com/motemen)) - -## [v1.0.0](https://github.com/k0kubun/pp/tree/v1.0.0) (2015-01-09) - -[Full Changelog](https://github.com/k0kubun/pp/compare/v0.0.1...v1.0.0) - -**Closed issues:** - -- test failed if Golang over 1.4 [\#5](https://github.com/k0kubun/pp/issues/5) - -**Merged pull requests:** - -- remove unused struct. [\#7](https://github.com/k0kubun/pp/pull/7) ([walf443](https://github.com/walf443)) -- customizable Print\* functions output [\#6](https://github.com/k0kubun/pp/pull/6) ([walf443](https://github.com/walf443)) - -## [v0.0.1](https://github.com/k0kubun/pp/tree/v0.0.1) (2014-12-29) - -[Full Changelog](https://github.com/k0kubun/pp/compare/71948a64abfb9f3877ee472dba16472ca6d8e773...v0.0.1) - -**Merged pull requests:** - -- fix: `Fprintln` infinite loop bug. [\#3](https://github.com/k0kubun/pp/pull/3) ([kyokomi](https://github.com/kyokomi)) -- Support windows [\#1](https://github.com/k0kubun/pp/pull/1) ([k0kubun](https://github.com/k0kubun)) - - - -\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* diff --git a/vendor/github.com/k0kubun/pp/v3/LICENSE.txt b/vendor/github.com/k0kubun/pp/v3/LICENSE.txt deleted file mode 100644 index c2e6a4b..0000000 --- a/vendor/github.com/k0kubun/pp/v3/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Takashi Kokubun - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/k0kubun/pp/v3/README.md b/vendor/github.com/k0kubun/pp/v3/README.md deleted file mode 100644 index c9b2a99..0000000 --- a/vendor/github.com/k0kubun/pp/v3/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# pp [![Go](https://github.com/k0kubun/pp/workflows/Go/badge.svg)](https://github.com/k0kubun/pp/actions) [![Go Reference](https://pkg.go.dev/badge/github.com/k0kubun/pp/v3.svg)](https://pkg.go.dev/github.com/k0kubun/pp/v3) - -Colored pretty printer for Go language - -![](http://i.gyazo.com/d3253ae839913b7239a7229caa4af551.png) - -## Usage - -Just call `pp.Print()`. - -```go -import "github.com/k0kubun/pp/v3" - -m := map[string]string{"foo": "bar", "hello": "world"} -pp.Print(m) -``` - -![](http://i.gyazo.com/0d08376ed2656257627f79626d5e0cde.png) - -### API - -fmt package-like functions are provided. - -```go -pp.Print() -pp.Println() -pp.Sprint() -pp.Fprintf() -// ... -``` - -You can also create own instances that do not interfere with the default printer: - -```go -mypp := pp.New() -mypp.SetOutput(os.Stderr) -mypp.Println() -// ... -``` - -### Custom colors - -If you require, you may change the colors (all or some) for syntax highlighting: - -```go -// Create a struct describing your scheme -scheme := pp.ColorScheme{ - Integer: pp.Green | pp.Bold, - Float: pp.Black | pp.BackgroundWhite | pp.Bold, - String: pp.Yellow, -} - -// Register it for usage -pp.SetColorScheme(scheme) -``` - -Look into ColorScheme struct for the field names. - -If you would like to revert to the default highlighting, you may do so by calling `pp.ResetColorScheme()`. - -Out of the following color flags, you may combine any color with a background color and optionally with the bold parameter. Please note that bold will likely not work on the windows platform. - -```go -// Colors -Black -Red -Green -Yellow -Blue -Magenta -Cyan -White - -// Background colors -BackgroundBlack -BackgroundRed -BackgroundGreen -BackgroundYellow -BackgroundBlue -BackgroundMagenta -BackgroundCyan -BackgroundWhite - -// Other -Bold - -// Special -NoColor -``` - -## Demo - -### Timeline - -![](http://i.gyazo.com/a8adaeec965db943486e35083cf707f2.png) - -### UserStream event - -![](http://i.gyazo.com/1e88915b3a6a9129f69fb5d961c4f079.png) - -### Works on windows - -![](http://i.gyazo.com/ab791997a980f1ab3ee2a01586efdce6.png) - -## License - -MIT License diff --git a/vendor/github.com/k0kubun/pp/v3/color.go b/vendor/github.com/k0kubun/pp/v3/color.go deleted file mode 100644 index 59a6724..0000000 --- a/vendor/github.com/k0kubun/pp/v3/color.go +++ /dev/null @@ -1,125 +0,0 @@ -// color.go: Color API and implementation -package pp - -import ( - "fmt" - "reflect" -) - -const ( - // No color - NoColor uint16 = 1 << 15 -) - -const ( - // Foreground colors for ColorScheme. - _ uint16 = iota | NoColor - Black - Red - Green - Yellow - Blue - Magenta - Cyan - White - bitsForeground = 0 - maskForeground = 0xf - ansiForegroundOffset = 30 - 1 -) - -const ( - // Background colors for ColorScheme. - _ uint16 = iota<> bitsForeground - background := color & maskBackground >> bitsBackground - bold := color & maskBold - - if foreground == 0 && background == 0 && bold == 0 { - return text - } - - modBold := "" - modForeground := "" - modBackground := "" - - if bold > 0 { - modBold = "\033[1m" - } - if foreground > 0 { - modForeground = fmt.Sprintf("\033[%dm", foreground+ansiForegroundOffset) - } - if background > 0 { - modBackground = fmt.Sprintf("\033[%dm", background+ansiBackgroundOffset) - } - - return fmt.Sprintf("%s%s%s%s\033[0m", modForeground, modBackground, modBold, text) -} diff --git a/vendor/github.com/k0kubun/pp/v3/pp.go b/vendor/github.com/k0kubun/pp/v3/pp.go deleted file mode 100644 index bac9958..0000000 --- a/vendor/github.com/k0kubun/pp/v3/pp.go +++ /dev/null @@ -1,308 +0,0 @@ -// pp.go: API definitions. The core implementation is delegated to printer.go. -package pp - -import ( - "errors" - "fmt" - "io" - "os" - "runtime" - "sync" - - "github.com/mattn/go-colorable" -) - -// Global variable API -// see also: color.go -var ( - // Default pretty printer. It's public so that you can modify config globally. - Default = newPrettyPrinter(3) // pp.* => PrettyPrinter.* => formatAll - // If the length of array or slice is larger than this, - // the buffer will be shorten as {...}. - BufferFoldThreshold = 1024 - // PrintMapTypes when set to true will have map types will always appended to maps. - PrintMapTypes = true - // WithLineInfo add file name and line information to output - // call this function with care, because getting stack has performance penalty - WithLineInfo bool -) - -// Internals -var ( - defaultOut = colorable.NewColorableStdout() - defaultWithLineInfo = false -) - -type PrettyPrinter struct { - // WithLineInfo adds file name and line information to output. - // Call this function with care, because getting stack has performance penalty. - WithLineInfo bool - // To support WithLineInfo, we need to know which frame we should look at. - // Thus callerLevel sets the number of frames it needs to skip. - callerLevel int - out io.Writer - currentScheme ColorScheme - outLock sync.Mutex - maxDepth int - coloringEnabled bool - decimalUint bool - thousandsSeparator bool - // This skips unexported fields of structs. - exportedOnly bool -} - -// New creates a new PrettyPrinter that can be used to pretty print values -func New() *PrettyPrinter { - return newPrettyPrinter(2) // PrettyPrinter.* => formatAll -} - -func newPrettyPrinter(callerLevel int) *PrettyPrinter { - return &PrettyPrinter{ - WithLineInfo: defaultWithLineInfo, - callerLevel: callerLevel, - out: defaultOut, - currentScheme: defaultScheme, - maxDepth: -1, - coloringEnabled: true, - decimalUint: true, - exportedOnly: false, - } -} - -// Print prints given arguments. -func (pp *PrettyPrinter) Print(a ...interface{}) (n int, err error) { - return fmt.Fprint(pp.out, pp.formatAll(a)...) -} - -// Printf prints a given format. -func (pp *PrettyPrinter) Printf(format string, a ...interface{}) (n int, err error) { - return fmt.Fprintf(pp.out, format, pp.formatAll(a)...) -} - -// Println prints given arguments with newline. -func (pp *PrettyPrinter) Println(a ...interface{}) (n int, err error) { - return fmt.Fprintln(pp.out, pp.formatAll(a)...) -} - -// Sprint formats given arguments and returns the result as string. -func (pp *PrettyPrinter) Sprint(a ...interface{}) string { - return fmt.Sprint(pp.formatAll(a)...) -} - -// Sprintf formats with pretty print and returns the result as string. -func (pp *PrettyPrinter) Sprintf(format string, a ...interface{}) string { - return fmt.Sprintf(format, pp.formatAll(a)...) -} - -// Sprintln formats given arguments with newline and returns the result as string. -func (pp *PrettyPrinter) Sprintln(a ...interface{}) string { - return fmt.Sprintln(pp.formatAll(a)...) -} - -// Fprint prints given arguments to a given writer. -func (pp *PrettyPrinter) Fprint(w io.Writer, a ...interface{}) (n int, err error) { - return fmt.Fprint(w, pp.formatAll(a)...) -} - -// Fprintf prints format to a given writer. -func (pp *PrettyPrinter) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { - return fmt.Fprintf(w, format, pp.formatAll(a)...) -} - -// Fprintln prints given arguments to a given writer with newline. -func (pp *PrettyPrinter) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { - return fmt.Fprintln(w, pp.formatAll(a)...) -} - -// Errorf formats given arguments and returns it as error type. -func (pp *PrettyPrinter) Errorf(format string, a ...interface{}) error { - return errors.New(pp.Sprintf(format, a...)) -} - -// Fatal prints given arguments and finishes execution with exit status 1. -func (pp *PrettyPrinter) Fatal(a ...interface{}) { - fmt.Fprint(pp.out, pp.formatAll(a)...) - os.Exit(1) -} - -// Fatalf prints a given format and finishes execution with exit status 1. -func (pp *PrettyPrinter) Fatalf(format string, a ...interface{}) { - fmt.Fprintf(pp.out, format, pp.formatAll(a)...) - os.Exit(1) -} - -// Fatalln prints given arguments with newline and finishes execution with exit status 1. -func (pp *PrettyPrinter) Fatalln(a ...interface{}) { - fmt.Fprintln(pp.out, pp.formatAll(a)...) - os.Exit(1) -} - -func (pp *PrettyPrinter) SetColoringEnabled(enabled bool) { - pp.coloringEnabled = enabled -} - -func (pp *PrettyPrinter) SetDecimalUint(enabled bool) { - pp.decimalUint = enabled -} - -func (pp *PrettyPrinter) SetExportedOnly(enabled bool) { - pp.exportedOnly = enabled -} - -func (pp *PrettyPrinter) SetThousandsSeparator(enabled bool) { - pp.thousandsSeparator = enabled -} - -// SetOutput sets pp's output -func (pp *PrettyPrinter) SetOutput(o io.Writer) { - pp.outLock.Lock() - defer pp.outLock.Unlock() - - pp.out = o -} - -// GetOutput returns pp's output. -func (pp *PrettyPrinter) GetOutput() io.Writer { - return pp.out -} - -// ResetOutput sets pp's output back to the default output -func (pp *PrettyPrinter) ResetOutput() { - pp.outLock.Lock() - defer pp.outLock.Unlock() - - pp.out = defaultOut -} - -// SetColorScheme takes a colorscheme used by all future Print calls. -func (pp *PrettyPrinter) SetColorScheme(scheme ColorScheme) { - scheme.fixColors() - pp.currentScheme = scheme -} - -// ResetColorScheme resets colorscheme to default. -func (pp *PrettyPrinter) ResetColorScheme() { - pp.currentScheme = defaultScheme -} - -func (pp *PrettyPrinter) formatAll(objects []interface{}) []interface{} { - results := []interface{}{} - - // fix for backwards capability - withLineInfo := pp.WithLineInfo - if pp == Default { - withLineInfo = WithLineInfo - } - - if withLineInfo { - _, fn, line, _ := runtime.Caller(pp.callerLevel) - results = append(results, fmt.Sprintf("%s:%d\n", fn, line)) - } - - for _, object := range objects { - results = append(results, pp.format(object)) - } - return results -} - -// Print prints given arguments. -func Print(a ...interface{}) (n int, err error) { - return Default.Print(a...) -} - -// Printf prints a given format. -func Printf(format string, a ...interface{}) (n int, err error) { - return Default.Printf(format, a...) -} - -// Println prints given arguments with newline. -func Println(a ...interface{}) (n int, err error) { - return Default.Println(a...) -} - -// Sprint formats given arguments and returns the result as string. -func Sprint(a ...interface{}) string { - return Default.Sprint(a...) -} - -// Sprintf formats with pretty print and returns the result as string. -func Sprintf(format string, a ...interface{}) string { - return Default.Sprintf(format, a...) -} - -// Sprintln formats given arguments with newline and returns the result as string. -func Sprintln(a ...interface{}) string { - return Default.Sprintln(a...) -} - -// Fprint prints given arguments to a given writer. -func Fprint(w io.Writer, a ...interface{}) (n int, err error) { - return Default.Fprint(w, a...) -} - -// Fprintf prints format to a given writer. -func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { - return Default.Fprintf(w, format, a...) -} - -// Fprintln prints given arguments to a given writer with newline. -func Fprintln(w io.Writer, a ...interface{}) (n int, err error) { - return Default.Fprintln(w, a...) -} - -// Errorf formats given arguments and returns it as error type. -func Errorf(format string, a ...interface{}) error { - return Default.Errorf(format, a...) -} - -// Fatal prints given arguments and finishes execution with exit status 1. -func Fatal(a ...interface{}) { - Default.Fatal(a...) -} - -// Fatalf prints a given format and finishes execution with exit status 1. -func Fatalf(format string, a ...interface{}) { - Default.Fatalf(format, a...) -} - -// Fatalln prints given arguments with newline and finishes execution with exit status 1. -func Fatalln(a ...interface{}) { - Default.Fatalln(a...) -} - -// Change Print* functions' output to a given writer. -// For example, you can limit output by ENV. -// -// func init() { -// if os.Getenv("DEBUG") == "" { -// pp.SetDefaultOutput(ioutil.Discard) -// } -// } -func SetDefaultOutput(o io.Writer) { - Default.SetOutput(o) -} - -// GetOutput returns pp's default output. -func GetDefaultOutput() io.Writer { - return Default.GetOutput() -} - -// Change Print* functions' output to default one. -func ResetDefaultOutput() { - Default.ResetOutput() -} - -// SetColorScheme takes a colorscheme used by all future Print calls. -func SetColorScheme(scheme ColorScheme) { - Default.SetColorScheme(scheme) -} - -// ResetColorScheme resets colorscheme to default. -func ResetColorScheme() { - Default.ResetColorScheme() -} - -// SetMaxDepth sets the printer's Depth, -1 prints all -func SetDefaultMaxDepth(v int) { - Default.maxDepth = v -} diff --git a/vendor/github.com/k0kubun/pp/v3/printer.go b/vendor/github.com/k0kubun/pp/v3/printer.go deleted file mode 100644 index 13e0a0a..0000000 --- a/vendor/github.com/k0kubun/pp/v3/printer.go +++ /dev/null @@ -1,526 +0,0 @@ -// printer.go: The actual pretty print implementation. Everything in this file should be private. -package pp - -import ( - "bytes" - "fmt" - "math" - "math/big" - "reflect" - "regexp" - "strconv" - "strings" - "text/tabwriter" - "time" - - "golang.org/x/text/language" - "golang.org/x/text/message" -) - -const ( - indentWidth = 2 -) - -func (pp *PrettyPrinter) format(object interface{}) string { - return newPrinter(object, &pp.currentScheme, pp.maxDepth, pp.coloringEnabled, pp.decimalUint, pp.exportedOnly, pp.thousandsSeparator).String() -} - -func newPrinter(object interface{}, currentScheme *ColorScheme, maxDepth int, coloringEnabled bool, decimalUint bool, exportedOnly bool, thousandsSeparator bool) *printer { - buffer := bytes.NewBufferString("") - tw := new(tabwriter.Writer) - tw.Init(buffer, indentWidth, 0, 1, ' ', 0) - - printer := &printer{ - Buffer: buffer, - tw: tw, - depth: 0, - maxDepth: maxDepth, - value: reflect.ValueOf(object), - visited: map[uintptr]bool{}, - currentScheme: currentScheme, - coloringEnabled: coloringEnabled, - decimalUint: decimalUint, - exportedOnly: exportedOnly, - thousandsSeparator: thousandsSeparator, - } - - if thousandsSeparator { - printer.localizedPrinter = message.NewPrinter(language.English) - } - - return printer -} - -type printer struct { - *bytes.Buffer - tw *tabwriter.Writer - depth int - maxDepth int - value reflect.Value - visited map[uintptr]bool - currentScheme *ColorScheme - coloringEnabled bool - decimalUint bool - exportedOnly bool - thousandsSeparator bool - localizedPrinter *message.Printer -} - -func (p *printer) String() string { - switch p.value.Kind() { - case reflect.Bool: - p.colorPrint(p.raw(), p.currentScheme.Bool) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Uintptr, reflect.Complex64, reflect.Complex128: - p.colorPrint(p.raw(), p.currentScheme.Integer) - case reflect.Float32, reflect.Float64: - p.colorPrint(p.raw(), p.currentScheme.Float) - case reflect.String: - p.printString() - case reflect.Map: - p.printMap() - case reflect.Struct: - p.printStruct() - case reflect.Array, reflect.Slice: - p.printSlice() - case reflect.Chan: - p.printf("(%s)(%s)", p.typeString(), p.pointerAddr()) - case reflect.Interface: - p.printInterface() - case reflect.Ptr: - p.printPtr() - case reflect.Func: - p.printf("%s {...}", p.typeString()) - case reflect.UnsafePointer: - p.printf("%s(%s)", p.typeString(), p.pointerAddr()) - case reflect.Invalid: - p.print(p.nil()) - default: - p.print(p.raw()) - } - - p.tw.Flush() - return p.Buffer.String() -} - -func (p *printer) print(text string) { - fmt.Fprint(p.tw, text) -} - -func (p *printer) printf(format string, args ...interface{}) { - text := fmt.Sprintf(format, args...) - p.print(text) -} - -func (p *printer) println(text string) { - p.print(text + "\n") -} - -func (p *printer) indentPrint(text string) { - p.print(p.indent() + text) -} - -func (p *printer) indentPrintf(format string, args ...interface{}) { - text := fmt.Sprintf(format, args...) - p.indentPrint(text) -} - -func (p *printer) colorPrint(text string, color uint16) { - p.print(p.colorize(text, color)) -} - -func (p *printer) printString() { - quoted := strconv.Quote(p.value.String()) - quoted = quoted[1 : len(quoted)-1] - - p.colorPrint(`"`, p.currentScheme.StringQuotation) - for len(quoted) > 0 { - pos := strings.IndexByte(quoted, '\\') - if pos == -1 { - p.colorPrint(quoted, p.currentScheme.String) - break - } - if pos != 0 { - p.colorPrint(quoted[0:pos], p.currentScheme.String) - } - - n := 1 - switch quoted[pos+1] { - case 'x': // "\x00" - n = 3 - case 'u': // "\u0000" - n = 5 - case 'U': // "\U00000000" - n = 9 - case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': // "\000" - n = 3 - } - p.colorPrint(quoted[pos:pos+n+1], p.currentScheme.EscapedChar) - quoted = quoted[pos+n+1:] - } - p.colorPrint(`"`, p.currentScheme.StringQuotation) -} - -func (p *printer) printMap() { - if p.value.Len() == 0 { - p.printf("%s{}", p.typeString()) - return - } - - if p.visited[p.value.Pointer()] { - p.printf("%s{...}", p.typeString()) - return - } - p.visited[p.value.Pointer()] = true - - if PrintMapTypes { - p.printf("%s{\n", p.typeString()) - } else { - p.println("{") - } - p.indented(func() { - value := sortMap(p.value) - for i := 0; i < value.Len(); i++ { - p.indentPrintf("%s:\t%s,\n", p.format(value.keys[i]), p.format(value.values[i])) - } - }) - p.indentPrint("}") -} - -func (p *printer) printStruct() { - if p.value.CanInterface() { - if p.value.Type().String() == "time.Time" && p.value.Type().PkgPath() == "time" { - p.printTime() - return - } else if p.value.Type().String() == "big.Int" { - bigInt := p.value.Interface().(big.Int) - p.print(p.colorize(bigInt.String(), p.currentScheme.Integer)) - return - } else if p.value.Type().String() == "big.Float" { - bigFloat := p.value.Interface().(big.Float) - p.print(p.colorize(bigFloat.String(), p.currentScheme.Float)) - return - } - } - - var fields []int - for i := 0; i < p.value.NumField(); i++ { - field := p.value.Type().Field(i) - value := p.value.Field(i) - // ignore unexported if needed - if p.exportedOnly && field.PkgPath != "" { - continue - } - // ignore fields if zero value, or explicitly set - if tag := field.Tag.Get("pp"); tag != "" { - parts := strings.Split(tag, ",") - if len(parts) == 2 && parts[1] == "omitempty" && valueIsZero(value) { - continue - } - if parts[0] == "-" { - continue - } - } - fields = append(fields, i) - } - - if len(fields) == 0 { - p.print(p.typeString() + "{}") - return - } - - p.println(p.typeString() + "{") - p.indented(func() { - for _, i := range fields { - field := p.value.Type().Field(i) - value := p.value.Field(i) - - fieldName := field.Name - if tag := field.Tag.Get("pp"); tag != "" { - tagName := strings.Split(tag, ",") - if tagName[0] != "" { - fieldName = tagName[0] - } - } - - colorizedFieldName := p.colorize(fieldName, p.currentScheme.FieldName) - p.indentPrintf("%s:\t%s,\n", colorizedFieldName, p.format(value)) - } - }) - p.indentPrint("}") -} - -func (p *printer) printTime() { - tm := p.value.Interface().(time.Time) - p.printf( - "%s-%s-%s %s:%s:%s %s", - p.colorize(strconv.Itoa(tm.Year()), p.currentScheme.Time), - p.colorize(fmt.Sprintf("%02d", tm.Month()), p.currentScheme.Time), - p.colorize(fmt.Sprintf("%02d", tm.Day()), p.currentScheme.Time), - p.colorize(fmt.Sprintf("%02d", tm.Hour()), p.currentScheme.Time), - p.colorize(fmt.Sprintf("%02d", tm.Minute()), p.currentScheme.Time), - p.colorize(fmt.Sprintf("%02d", tm.Second()), p.currentScheme.Time), - p.colorize(tm.Location().String(), p.currentScheme.Time), - ) -} - -func (p *printer) printSlice() { - if p.value.Kind() == reflect.Slice && p.value.IsNil() { - p.printf("%s(%s)", p.typeString(), p.nil()) - return - } - if p.value.Len() == 0 { - p.printf("%s{}", p.typeString()) - return - } - - if p.value.Kind() == reflect.Slice { - if p.visited[p.value.Pointer()] { - // Stop travarsing cyclic reference - p.printf("%s{...}", p.typeString()) - return - } - p.visited[p.value.Pointer()] = true - } - - // Fold a large buffer - if p.value.Len() > BufferFoldThreshold { - p.printf("%s{...}", p.typeString()) - return - } - - p.println(p.typeString() + "{") - p.indented(func() { - groupsize := 0 - switch p.value.Type().Elem().Kind() { - case reflect.Uint8: - groupsize = 16 - case reflect.Uint16: - groupsize = 8 - case reflect.Uint32: - groupsize = 8 - case reflect.Uint64: - groupsize = 4 - } - - if groupsize > 0 { - for i := 0; i < p.value.Len(); i++ { - // indent for new group - if i%groupsize == 0 { - p.print(p.indent()) - } - // slice element - p.printf("%s,", p.format(p.value.Index(i))) - // space or newline - if (i+1)%groupsize == 0 || i+1 == p.value.Len() { - p.print("\n") - } else { - p.print(" ") - } - } - } else { - for i := 0; i < p.value.Len(); i++ { - p.indentPrintf("%s,\n", p.format(p.value.Index(i))) - } - } - }) - p.indentPrint("}") -} - -func (p *printer) printInterface() { - e := p.value.Elem() - if e.Kind() == reflect.Invalid { - p.print(p.nil()) - } else if e.IsValid() { - p.print(p.format(e)) - } else { - p.printf("%s(%s)", p.typeString(), p.nil()) - } -} - -func (p *printer) printPtr() { - if p.visited[p.value.Pointer()] { - p.printf("&%s{...}", p.elemTypeString()) - return - } - if p.value.Pointer() != 0 { - p.visited[p.value.Pointer()] = true - } - - if p.value.Elem().IsValid() { - p.printf("&%s", p.format(p.value.Elem())) - } else { - p.printf("(%s)(%s)", p.typeString(), p.nil()) - } -} - -func (p *printer) pointerAddr() string { - return p.colorize(fmt.Sprintf("%#v", p.value.Pointer()), p.currentScheme.PointerAdress) -} - -func (p *printer) typeString() string { - return p.colorizeType(p.value.Type().String()) -} - -func (p *printer) elemTypeString() string { - return p.colorizeType(p.value.Elem().Type().String()) -} - -func (p *printer) colorizeType(t string) string { - prefix := "" - - if p.matchRegexp(t, `^\[\].+$`) { - prefix = "[]" - t = t[2:] - } - - if p.matchRegexp(t, `^\[\d+\].+$`) { - num := regexp.MustCompile(`\d+`).FindString(t) - prefix = fmt.Sprintf("[%s]", p.colorize(num, p.currentScheme.ObjectLength)) - t = t[2+len(num):] - } - - if p.matchRegexp(t, `^[^\.]+\.[^\.]+$`) { - ts := strings.Split(t, ".") - t = fmt.Sprintf("%s.%s", ts[0], p.colorize(ts[1], p.currentScheme.StructName)) - } else { - t = p.colorize(t, p.currentScheme.StructName) - } - return prefix + t -} - -func (p *printer) matchRegexp(text, exp string) bool { - return regexp.MustCompile(exp).MatchString(text) -} - -func (p *printer) indented(proc func()) { - p.depth++ - if p.maxDepth == -1 || p.depth <= p.maxDepth { - proc() - } - p.depth-- -} - -func (p *printer) fmtOrLocalizedSprintf(format string, a ...interface{}) string { - if p.localizedPrinter == nil { - return fmt.Sprintf(format, a...) - } - - return p.localizedPrinter.Sprintf(format, a...) -} - -func (p *printer) raw() string { - // Some value causes panic when Interface() is called. - switch p.value.Kind() { - case reflect.Bool: - return fmt.Sprintf("%#v", p.value.Bool()) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return p.fmtOrLocalizedSprintf("%v", p.value.Int()) - case reflect.Uint, reflect.Uintptr: - if p.decimalUint { - return p.fmtOrLocalizedSprintf("%d", p.value.Uint()) - } else { - return fmt.Sprintf("%#v", p.value.Uint()) - } - case reflect.Uint8: - if p.decimalUint { - return fmt.Sprintf("%d", p.value.Uint()) - } else { - return fmt.Sprintf("0x%02x", p.value.Uint()) - } - case reflect.Uint16: - if p.decimalUint { - return p.fmtOrLocalizedSprintf("%d", p.value.Uint()) - } else { - return fmt.Sprintf("0x%04x", p.value.Uint()) - } - case reflect.Uint32: - if p.decimalUint { - return p.fmtOrLocalizedSprintf("%d", p.value.Uint()) - } else { - return fmt.Sprintf("0x%08x", p.value.Uint()) - } - case reflect.Uint64: - if p.decimalUint { - return p.fmtOrLocalizedSprintf("%d", p.value.Uint()) - } else { - return fmt.Sprintf("0x%016x", p.value.Uint()) - } - case reflect.Float32, reflect.Float64: - return p.fmtOrLocalizedSprintf("%f", p.value.Float()) - case reflect.Complex64, reflect.Complex128: - return fmt.Sprintf("%#v", p.value.Complex()) - default: - return fmt.Sprintf("%#v", p.value.Interface()) - } -} - -func (p *printer) nil() string { - return p.colorize("nil", p.currentScheme.Nil) -} - -func (p *printer) colorize(text string, color uint16) string { - if ColoringEnabled && p.coloringEnabled { - return colorizeText(text, color) - } else { - return text - } -} - -func (p *printer) format(object interface{}) string { - pp := newPrinter(object, p.currentScheme, p.maxDepth, p.coloringEnabled, p.decimalUint, p.exportedOnly, p.thousandsSeparator) - pp.depth = p.depth - pp.visited = p.visited - if value, ok := object.(reflect.Value); ok { - pp.value = value - } - return pp.String() -} - -func (p *printer) indent() string { - return strings.Repeat("\t", p.depth) -} - -// valueIsZero reports whether v is the zero value for its type. -// It returns false if the argument is invalid. -// This is a copy paste of reflect#IsZero from go1.15. It is not present before go1.13 (source: https://golang.org/doc/go1.13#library) -// source: https://golang.org/src/reflect/value.go?s=34297:34325#L1090 -// This will need to be updated for new types or the decision should be made to drop support for Go version pre go1.13 -func valueIsZero(v reflect.Value) bool { - switch v.Kind() { - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return math.Float64bits(v.Float()) == 0 - case reflect.Complex64, reflect.Complex128: - c := v.Complex() - return math.Float64bits(real(c)) == 0 && math.Float64bits(imag(c)) == 0 - case reflect.Array: - for i := 0; i < v.Len(); i++ { - if !valueIsZero(v.Index(i)) { - return false - } - } - return true - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice, reflect.UnsafePointer: - return v.IsNil() - case reflect.String: - return v.Len() == 0 - case reflect.Struct: - for i := 0; i < v.NumField(); i++ { - if !valueIsZero(v.Field(i)) { - return false - } - } - return true - default: - // this is the only difference between stdlib reflect#IsZero and this function. We're not going to - // panic on the default cause, even - return false - } -} diff --git a/vendor/github.com/k0kubun/pp/v3/sort.go b/vendor/github.com/k0kubun/pp/v3/sort.go deleted file mode 100644 index 591b595..0000000 --- a/vendor/github.com/k0kubun/pp/v3/sort.go +++ /dev/null @@ -1,76 +0,0 @@ -// sort.go: Implementation for sorting map keys -package pp - -import ( - "reflect" - "sort" -) - -func sortMap(value reflect.Value) *sortedMap { - if value.Type().Kind() != reflect.Map { - panic("sortMap is used for a non-Map value") - } - - keys := make([]reflect.Value, 0, value.Len()) - values := make([]reflect.Value, 0, value.Len()) - mapKeys := value.MapKeys() - for i := 0; i < len(mapKeys); i++ { - keys = append(keys, mapKeys[i]) - values = append(values, value.MapIndex(mapKeys[i])) - } - - sorted := &sortedMap{ - keys: keys, - values: values, - } - sort.Stable(sorted) - return sorted -} - -type sortedMap struct { - keys []reflect.Value - values []reflect.Value -} - -// Functions for sort.Interface - -func (s *sortedMap) Len() int { - return len(s.keys) -} - -func (s *sortedMap) Swap(i, j int) { - s.keys[i], s.keys[j] = s.keys[j], s.keys[i] - s.values[i], s.values[j] = s.values[j], s.values[i] -} - -func (s *sortedMap) Less(i, j int) bool { - a, b := s.keys[i], s.keys[j] - if a.Type() != b.Type() { - return false // give up - } - - // Return true if b is bigger - switch a.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return a.Int() < b.Int() - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return a.Uint() < b.Uint() - case reflect.String: - return a.String() < b.String() - case reflect.Float32, reflect.Float64: - if a.Float() != a.Float() || b.Float() != b.Float() { - return false // NaN - } - return a.Float() < b.Float() - case reflect.Bool: - return !a.Bool() && b.Bool() - case reflect.Ptr: - return a.Pointer() < b.Pointer() - case reflect.Struct: - return a.NumField() < b.NumField() - case reflect.Array: - return a.Len() < b.Len() - default: - return false // not supported yet - } -} diff --git a/vendor/github.com/lestrrat-go/file-rotatelogs/.gitignore b/vendor/github.com/lestrrat-go/file-rotatelogs/.gitignore deleted file mode 100644 index 0026861..0000000 --- a/vendor/github.com/lestrrat-go/file-rotatelogs/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe diff --git a/vendor/github.com/lestrrat-go/file-rotatelogs/.travis.yml b/vendor/github.com/lestrrat-go/file-rotatelogs/.travis.yml deleted file mode 100644 index c6207d2..0000000 --- a/vendor/github.com/lestrrat-go/file-rotatelogs/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: go -sudo: false -go: - - "1.14" - - tip diff --git a/vendor/github.com/lestrrat-go/file-rotatelogs/Changes b/vendor/github.com/lestrrat-go/file-rotatelogs/Changes deleted file mode 100644 index f4c5dcf..0000000 --- a/vendor/github.com/lestrrat-go/file-rotatelogs/Changes +++ /dev/null @@ -1,8 +0,0 @@ -Changes -======= - -v2.4.0 - 8 Sep 2020 - * Add WithRotationSize option to specify log ration when - a certain file size is reached. (NOTE: this does not guarantee - that the file size is exactly the size specified, but that it - *exceeds* the specified size) diff --git a/vendor/github.com/lestrrat-go/file-rotatelogs/LICENSE b/vendor/github.com/lestrrat-go/file-rotatelogs/LICENSE deleted file mode 100644 index 9a7f25b..0000000 --- a/vendor/github.com/lestrrat-go/file-rotatelogs/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 lestrrat - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/lestrrat-go/file-rotatelogs/README.md b/vendor/github.com/lestrrat-go/file-rotatelogs/README.md deleted file mode 100644 index 94c3c06..0000000 --- a/vendor/github.com/lestrrat-go/file-rotatelogs/README.md +++ /dev/null @@ -1,233 +0,0 @@ -file-rotatelogs -================== - -Provide an `io.Writer` that periodically rotates log files from within the application. Port of [File::RotateLogs](https://metacpan.org/release/File-RotateLogs) from Perl to Go. - -[![Build Status](https://travis-ci.org/lestrrat-go/file-rotatelogs.png?branch=master)](https://travis-ci.org/lestrrat-go/file-rotatelogs) - -[![GoDoc](https://godoc.org/github.com/lestrrat-go/file-rotatelogs?status.svg)](https://godoc.org/github.com/lestrrat-go/file-rotatelogs) - - -# SYNOPSIS - -```go -import ( - "log" - "net/http" - - apachelog "github.com/lestrrat-go/apache-logformat" - rotatelogs "github.com/lestrrat-go/file-rotatelogs" -) - -func main() { - mux := http.NewServeMux() - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { ... }) - - logf, err := rotatelogs.New( - "/path/to/access_log.%Y%m%d%H%M", - rotatelogs.WithLinkName("/path/to/access_log"), - rotatelogs.WithMaxAge(24 * time.Hour), - rotatelogs.WithRotationTime(time.Hour), - ) - if err != nil { - log.Printf("failed to create rotatelogs: %s", err) - return - } - - // Now you must write to logf. apache-logformat library can create - // a http.Handler that only writes the approriate logs for the request - // to the given handle - http.ListenAndServe(":8080", apachelog.CombinedLog.Wrap(mux, logf)) -} -``` - -# DESCRIPTION - -When you integrate this to into your app, it automatically write to logs that -are rotated from within the app: No more disk-full alerts because you forgot -to setup logrotate! - -To install, simply issue a `go get`: - -``` -go get github.com/lestrrat-go/file-rotatelogs -``` - -It's normally expected that this library is used with some other -logging service, such as the built-in `log` library, or loggers -such as `github.com/lestrrat-go/apache-logformat`. - -```go -import( - "log" - "github.com/lestrrat-go/file-rotatelogs" -) - -func main() { - rl, _ := rotatelogs.New("/path/to/access_log.%Y%m%d%H%M") - - log.SetOutput(rl) - - /* elsewhere ... */ - log.Printf("Hello, World!") -} -``` - -OPTIONS -==== - -## Pattern (Required) - -The pattern used to generate actual log file names. You should use patterns -using the strftime (3) format. For example: - -```go - rotatelogs.New("/var/log/myapp/log.%Y%m%d") -``` - -## Clock (default: rotatelogs.Local) - -You may specify an object that implements the roatatelogs.Clock interface. -When this option is supplied, it's used to determine the current time to -base all of the calculations on. For example, if you want to base your -calculations in UTC, you may specify rotatelogs.UTC - -```go - rotatelogs.New( - "/var/log/myapp/log.%Y%m%d", - rotatelogs.WithClock(rotatelogs.UTC), - ) -``` - -## Location - -This is an alternative to the `WithClock` option. Instead of providing an -explicit clock, you can provide a location for you times. We will create -a Clock object that produces times in your specified location, and configure -the rotatelog to respect it. - -## LinkName (default: "") - -Path where a symlink for the actual log file is placed. This allows you to -always check at the same location for log files even if the logs were rotated - -```go - rotatelogs.New( - "/var/log/myapp/log.%Y%m%d", - rotatelogs.WithLinkName("/var/log/myapp/current"), - ) -``` - -``` - // Else where - $ tail -f /var/log/myapp/current -``` - -Links that share the same parent directory with the main log path will get a -special treatment: namely, linked paths will be *RELATIVE* to the main log file. - -| Main log file name | Link name | Linked path | -|---------------------|---------------------|-----------------------| -| /path/to/log.%Y%m%d | /path/to/log | log.YYYYMMDD | -| /path/to/log.%Y%m%d | /path/to/nested/log | ../log.YYYYMMDD | -| /path/to/log.%Y%m%d | /foo/bar/baz/log | /path/to/log.YYYYMMDD | - -If not provided, no link will be written. - -## RotationTime (default: 86400 sec) - -Interval between file rotation. By default logs are rotated every 86400 seconds. -Note: Remember to use time.Duration values. - -```go - // Rotate every hour - rotatelogs.New( - "/var/log/myapp/log.%Y%m%d", - rotatelogs.WithRotationTime(time.Hour), - ) -``` - -## MaxAge (default: 7 days) - -Time to wait until old logs are purged. By default no logs are purged, which -certainly isn't what you want. -Note: Remember to use time.Duration values. - -```go - // Purge logs older than 1 hour - rotatelogs.New( - "/var/log/myapp/log.%Y%m%d", - rotatelogs.WithMaxAge(time.Hour), - ) -``` - -## RotationCount (default: -1) - -The number of files should be kept. By default, this option is disabled. - -Note: MaxAge should be disabled by specifing `WithMaxAge(-1)` explicitly. - -```go - // Purge logs except latest 7 files - rotatelogs.New( - "/var/log/myapp/log.%Y%m%d", - rotatelogs.WithMaxAge(-1), - rotatelogs.WithRotationCount(7), - ) -``` - -## Handler (default: nil) - -Sets the event handler to receive event notifications from the RotateLogs -object. Currently only supported event type is FiledRotated - -```go - rotatelogs.New( - "/var/log/myapp/log.%Y%m%d", - rotatelogs.Handler(rotatelogs.HandlerFunc(func(e Event) { - if e.Type() != rotatelogs.FileRotatedEventType { - return - } - - // Do what you want with the data. This is just an idea: - storeLogFileToRemoteStorage(e.(*FileRotatedEvent).PreviousFile()) - })), - ) -``` - -## ForceNewFile - -Ensure a new file is created every time New() is called. If the base file name -already exists, an implicit rotation is performed. - -```go - rotatelogs.New( - "/var/log/myapp/log.%Y%m%d", - rotatelogs.ForceNewFile(), - ) -``` - -# Rotating files forcefully - -If you want to rotate files forcefully before the actual rotation time has reached, -you may use the `Rotate()` method. This method forcefully rotates the logs, but -if the generated file name clashes, then a numeric suffix is added so that -the new file will forcefully appear on disk. - -For example, suppose you had a pattern of '%Y.log' with a rotation time of -`86400` so that it only gets rotated every year, but for whatever reason you -wanted to rotate the logs now, you could install a signal handler to -trigger this rotation: - -```go -rl := rotatelogs.New(...) - -signal.Notify(ch, syscall.SIGHUP) - -go func(ch chan os.Signal) { - <-ch - rl.Rotate() -}() -``` - -And you will get a log file name in like `2018.log.1`, `2018.log.2`, etc. diff --git a/vendor/github.com/lestrrat-go/file-rotatelogs/event.go b/vendor/github.com/lestrrat-go/file-rotatelogs/event.go deleted file mode 100644 index 23047c4..0000000 --- a/vendor/github.com/lestrrat-go/file-rotatelogs/event.go +++ /dev/null @@ -1,17 +0,0 @@ -package rotatelogs - -func (h HandlerFunc) Handle(e Event) { - h(e) -} - -func (e *FileRotatedEvent) Type() EventType { - return FileRotatedEventType -} - -func (e *FileRotatedEvent) PreviousFile() string { - return e.prev -} - -func (e *FileRotatedEvent) CurrentFile() string { - return e.current -} diff --git a/vendor/github.com/lestrrat-go/file-rotatelogs/interface.go b/vendor/github.com/lestrrat-go/file-rotatelogs/interface.go deleted file mode 100644 index 9a04ab4..0000000 --- a/vendor/github.com/lestrrat-go/file-rotatelogs/interface.go +++ /dev/null @@ -1,73 +0,0 @@ -package rotatelogs - -import ( - "os" - "sync" - "time" - - strftime "github.com/lestrrat-go/strftime" -) - -type Handler interface { - Handle(Event) -} - -type HandlerFunc func(Event) - -type Event interface { - Type() EventType -} - -type EventType int - -const ( - InvalidEventType EventType = iota - FileRotatedEventType -) - -type FileRotatedEvent struct { - prev string // previous filename - current string // current, new filename -} - -// RotateLogs represents a log file that gets -// automatically rotated as you write to it. -type RotateLogs struct { - clock Clock - curFn string - curBaseFn string - globPattern string - generation int - linkName string - maxAge time.Duration - mutex sync.RWMutex - eventHandler Handler - outFh *os.File - pattern *strftime.Strftime - rotationTime time.Duration - rotationSize int64 - rotationCount uint - forceNewFile bool -} - -// Clock is the interface used by the RotateLogs -// object to determine the current time -type Clock interface { - Now() time.Time -} -type clockFn func() time.Time - -// UTC is an object satisfying the Clock interface, which -// returns the current time in UTC -var UTC = clockFn(func() time.Time { return time.Now().UTC() }) - -// Local is an object satisfying the Clock interface, which -// returns the current time in the local timezone -var Local = clockFn(time.Now) - -// Option is used to pass optional arguments to -// the RotateLogs constructor -type Option interface { - Name() string - Value() interface{} -} diff --git a/vendor/github.com/lestrrat-go/file-rotatelogs/internal/option/option.go b/vendor/github.com/lestrrat-go/file-rotatelogs/internal/option/option.go deleted file mode 100644 index 9259dc5..0000000 --- a/vendor/github.com/lestrrat-go/file-rotatelogs/internal/option/option.go +++ /dev/null @@ -1,25 +0,0 @@ -package option - -type Interface interface { - Name() string - Value() interface{} -} - -type Option struct { - name string - value interface{} -} - -func New(name string, value interface{}) *Option { - return &Option{ - name: name, - value: value, - } -} - -func (o *Option) Name() string { - return o.name -} -func (o *Option) Value() interface{} { - return o.value -} diff --git a/vendor/github.com/lestrrat-go/file-rotatelogs/options.go b/vendor/github.com/lestrrat-go/file-rotatelogs/options.go deleted file mode 100644 index f75f18c..0000000 --- a/vendor/github.com/lestrrat-go/file-rotatelogs/options.go +++ /dev/null @@ -1,89 +0,0 @@ -package rotatelogs - -import ( - "time" - - "github.com/lestrrat-go/file-rotatelogs/internal/option" -) - -const ( - optkeyClock = "clock" - optkeyHandler = "handler" - optkeyLinkName = "link-name" - optkeyMaxAge = "max-age" - optkeyRotationTime = "rotation-time" - optkeyRotationSize = "rotation-size" - optkeyRotationCount = "rotation-count" - optkeyForceNewFile = "force-new-file" -) - -// WithClock creates a new Option that sets a clock -// that the RotateLogs object will use to determine -// the current time. -// -// By default rotatelogs.Local, which returns the -// current time in the local time zone, is used. If you -// would rather use UTC, use rotatelogs.UTC as the argument -// to this option, and pass it to the constructor. -func WithClock(c Clock) Option { - return option.New(optkeyClock, c) -} - -// WithLocation creates a new Option that sets up a -// "Clock" interface that the RotateLogs object will use -// to determine the current time. -// -// This optin works by always returning the in the given -// location. -func WithLocation(loc *time.Location) Option { - return option.New(optkeyClock, clockFn(func() time.Time { - return time.Now().In(loc) - })) -} - -// WithLinkName creates a new Option that sets the -// symbolic link name that gets linked to the current -// file name being used. -func WithLinkName(s string) Option { - return option.New(optkeyLinkName, s) -} - -// WithMaxAge creates a new Option that sets the -// max age of a log file before it gets purged from -// the file system. -func WithMaxAge(d time.Duration) Option { - return option.New(optkeyMaxAge, d) -} - -// WithRotationTime creates a new Option that sets the -// time between rotation. -func WithRotationTime(d time.Duration) Option { - return option.New(optkeyRotationTime, d) -} - -// WithRotationSize creates a new Option that sets the -// log file size between rotation. -func WithRotationSize(s int64) Option { - return option.New(optkeyRotationSize, s) -} - -// WithRotationCount creates a new Option that sets the -// number of files should be kept before it gets -// purged from the file system. -func WithRotationCount(n uint) Option { - return option.New(optkeyRotationCount, n) -} - -// WithHandler creates a new Option that specifies the -// Handler object that gets invoked when an event occurs. -// Currently `FileRotated` event is supported -func WithHandler(h Handler) Option { - return option.New(optkeyHandler, h) -} - -// ForceNewFile ensures a new file is created every time New() -// is called. If the base file name already exists, an implicit -// rotation is performed -func ForceNewFile() Option { - return option.New(optkeyForceNewFile, true) -} diff --git a/vendor/github.com/lestrrat-go/file-rotatelogs/rotatelogs.go b/vendor/github.com/lestrrat-go/file-rotatelogs/rotatelogs.go deleted file mode 100644 index 6e4a1bb..0000000 --- a/vendor/github.com/lestrrat-go/file-rotatelogs/rotatelogs.go +++ /dev/null @@ -1,407 +0,0 @@ -// package rotatelogs is a port of File-RotateLogs from Perl -// (https://metacpan.org/release/File-RotateLogs), and it allows -// you to automatically rotate output files when you write to them -// according to the filename pattern that you can specify. -package rotatelogs - -import ( - "fmt" - "io" - "os" - "path/filepath" - "regexp" - "strings" - "sync" - "time" - - strftime "github.com/lestrrat-go/strftime" - "github.com/pkg/errors" -) - -func (c clockFn) Now() time.Time { - return c() -} - -// New creates a new RotateLogs object. A log filename pattern -// must be passed. Optional `Option` parameters may be passed -func New(p string, options ...Option) (*RotateLogs, error) { - globPattern := p - for _, re := range patternConversionRegexps { - globPattern = re.ReplaceAllString(globPattern, "*") - } - - pattern, err := strftime.New(p) - if err != nil { - return nil, errors.Wrap(err, `invalid strftime pattern`) - } - - var clock Clock = Local - rotationTime := 24 * time.Hour - var rotationSize int64 - var rotationCount uint - var linkName string - var maxAge time.Duration - var handler Handler - var forceNewFile bool - - for _, o := range options { - switch o.Name() { - case optkeyClock: - clock = o.Value().(Clock) - case optkeyLinkName: - linkName = o.Value().(string) - case optkeyMaxAge: - maxAge = o.Value().(time.Duration) - if maxAge < 0 { - maxAge = 0 - } - case optkeyRotationTime: - rotationTime = o.Value().(time.Duration) - if rotationTime < 0 { - rotationTime = 0 - } - case optkeyRotationSize: - rotationSize = o.Value().(int64) - if rotationSize < 0 { - rotationSize = 0 - } - case optkeyRotationCount: - rotationCount = o.Value().(uint) - case optkeyHandler: - handler = o.Value().(Handler) - case optkeyForceNewFile: - forceNewFile = true - } - } - - if maxAge > 0 && rotationCount > 0 { - return nil, errors.New("options MaxAge and RotationCount cannot be both set") - } - - if maxAge == 0 && rotationCount == 0 { - // if both are 0, give maxAge a sane default - maxAge = 7 * 24 * time.Hour - } - - return &RotateLogs{ - clock: clock, - eventHandler: handler, - globPattern: globPattern, - linkName: linkName, - maxAge: maxAge, - pattern: pattern, - rotationTime: rotationTime, - rotationSize: rotationSize, - rotationCount: rotationCount, - forceNewFile: forceNewFile, - }, nil -} - -func (rl *RotateLogs) genFilename() string { - now := rl.clock.Now() - - // XXX HACK: Truncate only happens in UTC semantics, apparently. - // observed values for truncating given time with 86400 secs: - // - // before truncation: 2018/06/01 03:54:54 2018-06-01T03:18:00+09:00 - // after truncation: 2018/06/01 03:54:54 2018-05-31T09:00:00+09:00 - // - // This is really annoying when we want to truncate in local time - // so we hack: we take the apparent local time in the local zone, - // and pretend that it's in UTC. do our math, and put it back to - // the local zone - var base time.Time - if now.Location() != time.UTC { - base = time.Date(now.Year(), now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second(), now.Nanosecond(), time.UTC) - base = base.Truncate(time.Duration(rl.rotationTime)) - base = time.Date(base.Year(), base.Month(), base.Day(), base.Hour(), base.Minute(), base.Second(), base.Nanosecond(), base.Location()) - } else { - base = now.Truncate(time.Duration(rl.rotationTime)) - } - return rl.pattern.FormatString(base) -} - -// Write satisfies the io.Writer interface. It writes to the -// appropriate file handle that is currently being used. -// If we have reached rotation time, the target file gets -// automatically rotated, and also purged if necessary. -func (rl *RotateLogs) Write(p []byte) (n int, err error) { - // Guard against concurrent writes - rl.mutex.Lock() - defer rl.mutex.Unlock() - - out, err := rl.getWriter_nolock(false, false) - if err != nil { - return 0, errors.Wrap(err, `failed to acquite target io.Writer`) - } - - return out.Write(p) -} - -// must be locked during this operation -func (rl *RotateLogs) getWriter_nolock(bailOnRotateFail, useGenerationalNames bool) (io.Writer, error) { - generation := rl.generation - previousFn := rl.curFn - // This filename contains the name of the "NEW" filename - // to log to, which may be newer than rl.currentFilename - baseFn := rl.genFilename() - filename := baseFn - var forceNewFile bool - - fi, err := os.Stat(rl.curFn) - sizeRotation := false - if err == nil && rl.rotationSize > 0 && rl.rotationSize <= fi.Size() { - forceNewFile = true - sizeRotation = true - } - - if baseFn != rl.curBaseFn { - generation = 0 - // even though this is the first write after calling New(), - // check if a new file needs to be created - if rl.forceNewFile { - forceNewFile = true - } - } else { - if !useGenerationalNames && !sizeRotation { - // nothing to do - return rl.outFh, nil - } - forceNewFile = true - generation++ - } - if forceNewFile { - // A new file has been requested. Instead of just using the - // regular strftime pattern, we create a new file name using - // generational names such as "foo.1", "foo.2", "foo.3", etc - var name string - for { - if generation == 0 { - name = filename - } else { - name = fmt.Sprintf("%s.%d", filename, generation) - } - if _, err := os.Stat(name); err != nil { - filename = name - break - } - generation++ - } - } - // make sure the dir is existed, eg: - // ./foo/bar/baz/hello.log must make sure ./foo/bar/baz is existed - dirname := filepath.Dir(filename) - if err := os.MkdirAll(dirname, 0755); err != nil { - return nil, errors.Wrapf(err, "failed to create directory %s", dirname) - } - // if we got here, then we need to create a file - fh, err := os.OpenFile(filename, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644) - if err != nil { - return nil, errors.Errorf("failed to open file %s: %s", rl.pattern, err) - } - - if err := rl.rotate_nolock(filename); err != nil { - err = errors.Wrap(err, "failed to rotate") - if bailOnRotateFail { - // Failure to rotate is a problem, but it's really not a great - // idea to stop your application just because you couldn't rename - // your log. - // - // We only return this error when explicitly needed (as specified by bailOnRotateFail) - // - // However, we *NEED* to close `fh` here - if fh != nil { // probably can't happen, but being paranoid - fh.Close() - } - return nil, err - } - fmt.Fprintf(os.Stderr, "%s\n", err.Error()) - } - - rl.outFh.Close() - rl.outFh = fh - rl.curBaseFn = baseFn - rl.curFn = filename - rl.generation = generation - - if h := rl.eventHandler; h != nil { - go h.Handle(&FileRotatedEvent{ - prev: previousFn, - current: filename, - }) - } - return fh, nil -} - -// CurrentFileName returns the current file name that -// the RotateLogs object is writing to -func (rl *RotateLogs) CurrentFileName() string { - rl.mutex.RLock() - defer rl.mutex.RUnlock() - return rl.curFn -} - -var patternConversionRegexps = []*regexp.Regexp{ - regexp.MustCompile(`%[%+A-Za-z]`), - regexp.MustCompile(`\*+`), -} - -type cleanupGuard struct { - enable bool - fn func() - mutex sync.Mutex -} - -func (g *cleanupGuard) Enable() { - g.mutex.Lock() - defer g.mutex.Unlock() - g.enable = true -} -func (g *cleanupGuard) Run() { - g.fn() -} - -// Rotate forcefully rotates the log files. If the generated file name -// clash because file already exists, a numeric suffix of the form -// ".1", ".2", ".3" and so forth are appended to the end of the log file -// -// Thie method can be used in conjunction with a signal handler so to -// emulate servers that generate new log files when they receive a -// SIGHUP -func (rl *RotateLogs) Rotate() error { - rl.mutex.Lock() - defer rl.mutex.Unlock() - if _, err := rl.getWriter_nolock(true, true); err != nil { - return err - } - return nil -} - -func (rl *RotateLogs) rotate_nolock(filename string) error { - lockfn := filename + `_lock` - fh, err := os.OpenFile(lockfn, os.O_CREATE|os.O_EXCL, 0644) - if err != nil { - // Can't lock, just return - return err - } - - var guard cleanupGuard - guard.fn = func() { - fh.Close() - os.Remove(lockfn) - } - defer guard.Run() - - if rl.linkName != "" { - tmpLinkName := filename + `_symlink` - - // Change how the link name is generated based on where the - // target location is. if the location is directly underneath - // the main filename's parent directory, then we create a - // symlink with a relative path - linkDest := filename - linkDir := filepath.Dir(rl.linkName) - - baseDir := filepath.Dir(filename) - if strings.Contains(rl.linkName, baseDir) { - tmp, err := filepath.Rel(linkDir, filename) - if err != nil { - return errors.Wrapf(err, `failed to evaluate relative path from %#v to %#v`, baseDir, rl.linkName) - } - - linkDest = tmp - } - - if err := os.Symlink(linkDest, tmpLinkName); err != nil { - return errors.Wrap(err, `failed to create new symlink`) - } - - // the directory where rl.linkName should be created must exist - _, err := os.Stat(linkDir) - if err != nil { // Assume err != nil means the directory doesn't exist - if err := os.MkdirAll(linkDir, 0755); err != nil { - return errors.Wrapf(err, `failed to create directory %s`, linkDir) - } - } - - if err := os.Rename(tmpLinkName, rl.linkName); err != nil { - return errors.Wrap(err, `failed to rename new symlink`) - } - } - - if rl.maxAge <= 0 && rl.rotationCount <= 0 { - return errors.New("panic: maxAge and rotationCount are both set") - } - - matches, err := filepath.Glob(rl.globPattern) - if err != nil { - return err - } - - cutoff := rl.clock.Now().Add(-1 * rl.maxAge) - var toUnlink []string - for _, path := range matches { - // Ignore lock files - if strings.HasSuffix(path, "_lock") || strings.HasSuffix(path, "_symlink") { - continue - } - - fi, err := os.Stat(path) - if err != nil { - continue - } - - fl, err := os.Lstat(path) - if err != nil { - continue - } - - if rl.maxAge > 0 && fi.ModTime().After(cutoff) { - continue - } - - if rl.rotationCount > 0 && fl.Mode()&os.ModeSymlink == os.ModeSymlink { - continue - } - toUnlink = append(toUnlink, path) - } - - if rl.rotationCount > 0 { - // Only delete if we have more than rotationCount - if rl.rotationCount >= uint(len(toUnlink)) { - return nil - } - - toUnlink = toUnlink[:len(toUnlink)-int(rl.rotationCount)] - } - - if len(toUnlink) <= 0 { - return nil - } - - guard.Enable() - go func() { - // unlink files on a separate goroutine - for _, path := range toUnlink { - os.Remove(path) - } - }() - - return nil -} - -// Close satisfies the io.Closer interface. You must -// call this method if you performed any writes to -// the object. -func (rl *RotateLogs) Close() error { - rl.mutex.Lock() - defer rl.mutex.Unlock() - - if rl.outFh == nil { - return nil - } - - rl.outFh.Close() - rl.outFh = nil - return nil -} diff --git a/vendor/github.com/lestrrat-go/strftime/.gitignore b/vendor/github.com/lestrrat-go/strftime/.gitignore deleted file mode 100644 index daf913b..0000000 --- a/vendor/github.com/lestrrat-go/strftime/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/vendor/github.com/lestrrat-go/strftime/.golangci.yml b/vendor/github.com/lestrrat-go/strftime/.golangci.yml deleted file mode 100644 index 571d18b..0000000 --- a/vendor/github.com/lestrrat-go/strftime/.golangci.yml +++ /dev/null @@ -1,5 +0,0 @@ -issues: - exclude-rules: - - path: _test\.go - linters: - - errcheck diff --git a/vendor/github.com/lestrrat-go/strftime/Changes b/vendor/github.com/lestrrat-go/strftime/Changes deleted file mode 100644 index b86a84c..0000000 --- a/vendor/github.com/lestrrat-go/strftime/Changes +++ /dev/null @@ -1,28 +0,0 @@ -Changes -======= - -v1.0.6 - 20 Apr 2022 -[Miscellaneous] - * Minimum go version is now go 1.13 - * github.com/pkg/errors is going to be phased out in steps. In this release, - users may opt-in to using native errors using `fmt.Errorf("%w")` by - specifying the tag `strftime_native_errors`. In the next release, the default - will be to use native errors, but users will be able to opt-in to using - github.com/pkg/errors using a tag. The version after will remove github.com/pkg/errors. - - This is something that we normally would do over a major version upgrade - but since we do not expect this library to receive API breaking changes in the - near future and thus no v2 is expected, we have decided to do this over few - non-major releases. - -v1.0.5 -[New features] - * `(strftime.Strftime).FormatBuffer([]byte, time.Time) []byte` has been added. - This allows the user to provide the same underlying `[]byte` buffer for each - call to `FormatBuffer`, which avoid allocation per call. - * `%I` formatted midnight as `00`, where it should have been using `01` - - -before v1.0.4 - -Apparently we have failed to provide Changes prior to v1.0.5 :( diff --git a/vendor/github.com/lestrrat-go/strftime/LICENSE b/vendor/github.com/lestrrat-go/strftime/LICENSE deleted file mode 100644 index eed6938..0000000 --- a/vendor/github.com/lestrrat-go/strftime/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 lestrrat - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/lestrrat-go/strftime/Makefile b/vendor/github.com/lestrrat-go/strftime/Makefile deleted file mode 100644 index b382171..0000000 --- a/vendor/github.com/lestrrat-go/strftime/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -.PHONY: bench realclean cover viewcover test lint - -bench: - go test -tags bench -benchmem -bench . - @git checkout go.mod - @rm go.sum - -realclean: - rm coverage.out - -test: - go test -v -race ./... - -cover: -ifeq ($(strip $(STRFTIME_TAGS)),) - go test -v -race -coverpkg=./... -coverprofile=coverage.out ./... -else - go test -v -tags $(STRFTIME_TAGS) -race -coverpkg=./... -coverprofile=coverage.out ./... -endif - -viewcover: - go tool cover -html=coverage.out - -lint: - golangci-lint run ./... - -imports: - goimports -w ./ - diff --git a/vendor/github.com/lestrrat-go/strftime/README.md b/vendor/github.com/lestrrat-go/strftime/README.md deleted file mode 100644 index a1e7de5..0000000 --- a/vendor/github.com/lestrrat-go/strftime/README.md +++ /dev/null @@ -1,227 +0,0 @@ -# strftime - -Fast strftime for Go - -[![Build Status](https://travis-ci.org/lestrrat-go/strftime.png?branch=master)](https://travis-ci.org/lestrrat-go/strftime) - -[![GoDoc](https://godoc.org/github.com/lestrrat-go/strftime?status.svg)](https://godoc.org/github.com/lestrrat-go/strftime) - -# SYNOPSIS - -```go -f, err := strftime.New(`.... pattern ...`) -if err := f.Format(buf, time.Now()); err != nil { - log.Println(err.Error()) -} -``` - -# DESCRIPTION - -The goals for this library are - -* Optimized for the same pattern being called repeatedly -* Be flexible about destination to write the results out -* Be as complete as possible in terms of conversion specifications - -# API - -## Format(string, time.Time) (string, error) - -Takes the pattern and the time, and formats it. This function is a utility function that recompiles the pattern every time the function is called. If you know beforehand that you will be formatting the same pattern multiple times, consider using `New` to create a `Strftime` object and reuse it. - -## New(string) (\*Strftime, error) - -Takes the pattern and creates a new `Strftime` object. - -## obj.Pattern() string - -Returns the pattern string used to create this `Strftime` object - -## obj.Format(io.Writer, time.Time) error - -Formats the time according to the pre-compiled pattern, and writes the result to the specified `io.Writer` - -## obj.FormatString(time.Time) string - -Formats the time according to the pre-compiled pattern, and returns the result string. - -# SUPPORTED CONVERSION SPECIFICATIONS - -| pattern | description | -|:--------|:------------| -| %A | national representation of the full weekday name | -| %a | national representation of the abbreviated weekday | -| %B | national representation of the full month name | -| %b | national representation of the abbreviated month name | -| %C | (year / 100) as decimal number; single digits are preceded by a zero | -| %c | national representation of time and date | -| %D | equivalent to %m/%d/%y | -| %d | day of the month as a decimal number (01-31) | -| %e | the day of the month as a decimal number (1-31); single digits are preceded by a blank | -| %F | equivalent to %Y-%m-%d | -| %H | the hour (24-hour clock) as a decimal number (00-23) | -| %h | same as %b | -| %I | the hour (12-hour clock) as a decimal number (01-12) | -| %j | the day of the year as a decimal number (001-366) | -| %k | the hour (24-hour clock) as a decimal number (0-23); single digits are preceded by a blank | -| %l | the hour (12-hour clock) as a decimal number (1-12); single digits are preceded by a blank | -| %M | the minute as a decimal number (00-59) | -| %m | the month as a decimal number (01-12) | -| %n | a newline | -| %p | national representation of either "ante meridiem" (a.m.) or "post meridiem" (p.m.) as appropriate. | -| %R | equivalent to %H:%M | -| %r | equivalent to %I:%M:%S %p | -| %S | the second as a decimal number (00-60) | -| %T | equivalent to %H:%M:%S | -| %t | a tab | -| %U | the week number of the year (Sunday as the first day of the week) as a decimal number (00-53) | -| %u | the weekday (Monday as the first day of the week) as a decimal number (1-7) | -| %V | the week number of the year (Monday as the first day of the week) as a decimal number (01-53) | -| %v | equivalent to %e-%b-%Y | -| %W | the week number of the year (Monday as the first day of the week) as a decimal number (00-53) | -| %w | the weekday (Sunday as the first day of the week) as a decimal number (0-6) | -| %X | national representation of the time | -| %x | national representation of the date | -| %Y | the year with century as a decimal number | -| %y | the year without century as a decimal number (00-99) | -| %Z | the time zone name | -| %z | the time zone offset from UTC | -| %% | a '%' | - -# EXTENSIONS / CUSTOM SPECIFICATIONS - -This library in general tries to be POSIX compliant, but sometimes you just need that -extra specification or two that is relatively widely used but is not included in the -POSIX specification. - -For example, POSIX does not specify how to print out milliseconds, -but popular implementations allow `%f` or `%L` to achieve this. - -For those instances, `strftime.Strftime` can be configured to use a custom set of -specifications: - -``` -ss := strftime.NewSpecificationSet() -ss.Set('L', ...) // provide implementation for `%L` - -// pass this new specification set to the strftime instance -p, err := strftime.New(`%L`, strftime.WithSpecificationSet(ss)) -p.Format(..., time.Now()) -``` - -The implementation must implement the `Appender` interface, which is - -``` -type Appender interface { - Append([]byte, time.Time) []byte -} -``` - -For commonly used extensions such as the millisecond example and Unix timestamp, we provide a default -implementation so the user can do one of the following: - -``` -// (1) Pass a specification byte and the Appender -// This allows you to pass arbitrary Appenders -p, err := strftime.New( - `%L`, - strftime.WithSpecification('L', strftime.Milliseconds), -) - -// (2) Pass an option that knows to use strftime.Milliseconds -p, err := strftime.New( - `%L`, - strftime.WithMilliseconds('L'), -) -``` - -Similarly for Unix Timestamp: -``` -// (1) Pass a specification byte and the Appender -// This allows you to pass arbitrary Appenders -p, err := strftime.New( - `%s`, - strftime.WithSpecification('s', strftime.UnixSeconds), -) - -// (2) Pass an option that knows to use strftime.UnixSeconds -p, err := strftime.New( - `%s`, - strftime.WithUnixSeconds('s'), -) -``` - -If a common specification is missing, please feel free to submit a PR -(but please be sure to be able to defend how "common" it is) - -## List of available extensions - -- [`Milliseconds`](https://pkg.go.dev/github.com/lestrrat-go/strftime?tab=doc#Milliseconds) (related option: [`WithMilliseconds`](https://pkg.go.dev/github.com/lestrrat-go/strftime?tab=doc#WithMilliseconds)); - -- [`Microseconds`](https://pkg.go.dev/github.com/lestrrat-go/strftime?tab=doc#Microseconds) (related option: [`WithMicroseconds`](https://pkg.go.dev/github.com/lestrrat-go/strftime?tab=doc#WithMicroseconds)); - -- [`UnixSeconds`](https://pkg.go.dev/github.com/lestrrat-go/strftime?tab=doc#UnixSeconds) (related option: [`WithUnixSeconds`](https://pkg.go.dev/github.com/lestrrat-go/strftime?tab=doc#WithUnixSeconds)). - - -# PERFORMANCE / OTHER LIBRARIES - -The following benchmarks were run separately because some libraries were using cgo on specific platforms (notabley, the fastly version) - -``` -// On my OS X 10.14.6, 2.3 GHz Intel Core i5, 16GB memory. -// go version go1.13.4 darwin/amd64 -hummingbird% go test -tags bench -benchmem -bench . - -BenchmarkTebeka-4 297471 3905 ns/op 257 B/op 20 allocs/op -BenchmarkJehiah-4 818444 1773 ns/op 256 B/op 17 allocs/op -BenchmarkFastly-4 2330794 550 ns/op 80 B/op 5 allocs/op -BenchmarkLestrrat-4 916365 1458 ns/op 80 B/op 2 allocs/op -BenchmarkLestrratCachedString-4 2527428 546 ns/op 128 B/op 2 allocs/op -BenchmarkLestrratCachedWriter-4 537422 2155 ns/op 192 B/op 3 allocs/op -PASS -ok github.com/lestrrat-go/strftime 25.618s -``` - -``` -// On a host on Google Cloud Platform, machine-type: f1-micro (vCPU x 1, memory: 0.6GB) -// (Yes, I was being skimpy) -// Linux 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) x86_64 GNU/Linux -// go version go1.13.4 linux/amd64 -hummingbird% go test -tags bench -benchmem -bench . - -BenchmarkTebeka 254997 4726 ns/op 256 B/op 20 allocs/op -BenchmarkJehiah 659289 1882 ns/op 256 B/op 17 allocs/op -BenchmarkFastly 389150 3044 ns/op 224 B/op 13 allocs/op -BenchmarkLestrrat 699069 1780 ns/op 80 B/op 2 allocs/op -BenchmarkLestrratCachedString 2081594 589 ns/op 128 B/op 2 allocs/op -BenchmarkLestrratCachedWriter 825763 1480 ns/op 192 B/op 3 allocs/op -PASS -ok github.com/lestrrat-go/strftime 11.355s -``` - -This library is much faster than other libraries *IF* you can reuse the format pattern. - -Here's the annotated list from the benchmark results. You can clearly see that (re)using a `Strftime` object -and producing a string is the fastest. Writing to an `io.Writer` seems a bit sluggish, but since -the one producing the string is doing almost exactly the same thing, we believe this is purely the overhead of -writing to an `io.Writer` - -| Import Path | Score | Note | -|:------------------------------------|--------:|:--------------------------------| -| github.com/lestrrat-go/strftime | 3000000 | Using `FormatString()` (cached) | -| github.com/fastly/go-utils/strftime | 2000000 | Pure go version on OS X | -| github.com/lestrrat-go/strftime | 1000000 | Using `Format()` (NOT cached) | -| github.com/jehiah/go-strftime | 1000000 | | -| github.com/fastly/go-utils/strftime | 1000000 | cgo version on Linux | -| github.com/lestrrat-go/strftime | 500000 | Using `Format()` (cached) | -| github.com/tebeka/strftime | 300000 | | - -However, depending on your pattern, this speed may vary. If you find a particular pattern that seems sluggish, -please send in patches or tests. - -Please also note that this benchmark only uses the subset of conversion specifications that are supported by *ALL* of the libraries compared. - -Somethings to consider when making performance comparisons in the future: - -* Can it write to io.Writer? -* Which `%specification` does it handle? diff --git a/vendor/github.com/lestrrat-go/strftime/appenders.go b/vendor/github.com/lestrrat-go/strftime/appenders.go deleted file mode 100644 index 2941a24..0000000 --- a/vendor/github.com/lestrrat-go/strftime/appenders.go +++ /dev/null @@ -1,348 +0,0 @@ -package strftime - -import ( - "bytes" - "fmt" - "io" - "strconv" - "strings" - "time" -) - -// These are all of the standard, POSIX compliant specifications. -// Extensions should be in extensions.go -var ( - fullWeekDayName = StdlibFormat("Monday") - abbrvWeekDayName = StdlibFormat("Mon") - fullMonthName = StdlibFormat("January") - abbrvMonthName = StdlibFormat("Jan") - centuryDecimal = AppendFunc(appendCentury) - timeAndDate = StdlibFormat("Mon Jan _2 15:04:05 2006") - mdy = StdlibFormat("01/02/06") - dayOfMonthZeroPad = StdlibFormat("02") - dayOfMonthSpacePad = StdlibFormat("_2") - ymd = StdlibFormat("2006-01-02") - twentyFourHourClockZeroPad = &hourPadded{twelveHour: false, pad: '0'} - twelveHourClockZeroPad = &hourPadded{twelveHour: true, pad: '0'} - dayOfYear = AppendFunc(appendDayOfYear) - twentyFourHourClockSpacePad = &hourPadded{twelveHour: false, pad: ' '} - twelveHourClockSpacePad = &hourPadded{twelveHour: true, pad: ' '} - minutesZeroPad = StdlibFormat("04") - monthNumberZeroPad = StdlibFormat("01") - newline = Verbatim("\n") - ampm = StdlibFormat("PM") - hm = StdlibFormat("15:04") - imsp = hmsWAMPM{} - secondsNumberZeroPad = StdlibFormat("05") - hms = StdlibFormat("15:04:05") - tab = Verbatim("\t") - weekNumberSundayOrigin = weeknumberOffset(0) // week number of the year, Sunday first - weekdayMondayOrigin = weekday(1) - // monday as the first day, and 01 as the first value - weekNumberMondayOriginOneOrigin = AppendFunc(appendWeekNumber) - eby = StdlibFormat("_2-Jan-2006") - // monday as the first day, and 00 as the first value - weekNumberMondayOrigin = weeknumberOffset(1) // week number of the year, Monday first - weekdaySundayOrigin = weekday(0) - natReprTime = StdlibFormat("15:04:05") // national representation of the time XXX is this correct? - natReprDate = StdlibFormat("01/02/06") // national representation of the date XXX is this correct? - year = StdlibFormat("2006") // year with century - yearNoCentury = StdlibFormat("06") // year w/o century - timezone = StdlibFormat("MST") // time zone name - timezoneOffset = StdlibFormat("-0700") // time zone ofset from UTC - percent = Verbatim("%") -) - -// Appender is the interface that must be fulfilled by components that -// implement the translation of specifications to actual time value. -// -// The Append method takes the accumulated byte buffer, and the time to -// use to generate the textual representation. The resulting byte -// sequence must be returned by this method, normally by using the -// append() builtin function. -type Appender interface { - Append([]byte, time.Time) []byte -} - -// AppendFunc is an utility type to allow users to create a -// function-only version of an Appender -type AppendFunc func([]byte, time.Time) []byte - -func (af AppendFunc) Append(b []byte, t time.Time) []byte { - return af(b, t) -} - -type appenderList []Appender - -type dumper interface { - dump(io.Writer) -} - -func (l appenderList) dump(out io.Writer) { - var buf bytes.Buffer - ll := len(l) - for i, a := range l { - if dumper, ok := a.(dumper); ok { - dumper.dump(&buf) - } else { - fmt.Fprintf(&buf, "%#v", a) - } - - if i < ll-1 { - fmt.Fprintf(&buf, ",\n") - } - } - if _, err := buf.WriteTo(out); err != nil { - panic(err) - } -} - -// does the time.Format thing -type stdlibFormat struct { - s string -} - -// StdlibFormat returns an Appender that simply goes through `time.Format()` -// For example, if you know you want to display the abbreviated month name for %b, -// you can create a StdlibFormat with the pattern `Jan` and register that -// for specification `b`: -// -// a := StdlibFormat(`Jan`) -// ss := NewSpecificationSet() -// ss.Set('b', a) // does %b -> abbreviated month name -func StdlibFormat(s string) Appender { - return &stdlibFormat{s: s} -} - -func (v stdlibFormat) Append(b []byte, t time.Time) []byte { - return t.AppendFormat(b, v.s) -} - -func (v stdlibFormat) str() string { - return v.s -} - -func (v stdlibFormat) canCombine() bool { - return true -} - -func (v stdlibFormat) combine(w combiner) Appender { - return StdlibFormat(v.s + w.str()) -} - -func (v stdlibFormat) dump(out io.Writer) { - fmt.Fprintf(out, "stdlib: %s", v.s) -} - -type verbatimw struct { - s string -} - -// Verbatim returns an Appender suitable for generating static text. -// For static text, this method is slightly favorable than creating -// your own appender, as adjacent verbatim blocks will be combined -// at compile time to produce more efficient Appenders -func Verbatim(s string) Appender { - return &verbatimw{s: s} -} - -func (v verbatimw) Append(b []byte, _ time.Time) []byte { - return append(b, v.s...) -} - -func (v verbatimw) canCombine() bool { - return canCombine(v.s) -} - -func (v verbatimw) combine(w combiner) Appender { - if _, ok := w.(*stdlibFormat); ok { - return StdlibFormat(v.s + w.str()) - } - return Verbatim(v.s + w.str()) -} - -func (v verbatimw) str() string { - return v.s -} - -func (v verbatimw) dump(out io.Writer) { - fmt.Fprintf(out, "verbatim: %s", v.s) -} - -// These words below, as well as any decimal character -var combineExclusion = []string{ - "Mon", - "Monday", - "Jan", - "January", - "MST", - "PM", - "pm", -} - -func canCombine(s string) bool { - if strings.ContainsAny(s, "0123456789") { - return false - } - for _, word := range combineExclusion { - if strings.Contains(s, word) { - return false - } - } - return true -} - -type combiner interface { - canCombine() bool - combine(combiner) Appender - str() string -} - -// this is container for the compiler to keep track of appenders, -// and combine them as we parse and compile the pattern -type combiningAppend struct { - list appenderList - prev Appender - prevCanCombine bool -} - -func (ca *combiningAppend) Append(w Appender) { - if ca.prevCanCombine { - if wc, ok := w.(combiner); ok && wc.canCombine() { - ca.prev = ca.prev.(combiner).combine(wc) - ca.list[len(ca.list)-1] = ca.prev - return - } - } - - ca.list = append(ca.list, w) - ca.prev = w - ca.prevCanCombine = false - if comb, ok := w.(combiner); ok { - if comb.canCombine() { - ca.prevCanCombine = true - } - } -} - -func appendCentury(b []byte, t time.Time) []byte { - n := t.Year() / 100 - if n < 10 { - b = append(b, '0') - } - return append(b, strconv.Itoa(n)...) -} - -type weekday int - -func (v weekday) Append(b []byte, t time.Time) []byte { - n := int(t.Weekday()) - if n < int(v) { - n += 7 - } - return append(b, byte(n+48)) -} - -type weeknumberOffset int - -func (v weeknumberOffset) Append(b []byte, t time.Time) []byte { - yd := t.YearDay() - offset := int(t.Weekday()) - int(v) - if offset < 0 { - offset += 7 - } - - if yd < offset { - return append(b, '0', '0') - } - - n := ((yd - offset) / 7) + 1 - if n < 10 { - b = append(b, '0') - } - return append(b, strconv.Itoa(n)...) -} - -func appendWeekNumber(b []byte, t time.Time) []byte { - _, n := t.ISOWeek() - if n < 10 { - b = append(b, '0') - } - return append(b, strconv.Itoa(n)...) -} - -func appendDayOfYear(b []byte, t time.Time) []byte { - n := t.YearDay() - if n < 10 { - b = append(b, '0', '0') - } else if n < 100 { - b = append(b, '0') - } - return append(b, strconv.Itoa(n)...) -} - -type hourPadded struct { - pad byte - twelveHour bool -} - -func (v hourPadded) Append(b []byte, t time.Time) []byte { - h := t.Hour() - if v.twelveHour && h > 12 { - h = h - 12 - } - if v.twelveHour && h == 0 { - h = 12 - } - - if h < 10 { - b = append(b, v.pad) - b = append(b, byte(h+48)) - } else { - b = unrollTwoDigits(b, h) - } - return b -} - -func unrollTwoDigits(b []byte, v int) []byte { - b = append(b, byte((v/10)+48)) - b = append(b, byte((v%10)+48)) - return b -} - -type hmsWAMPM struct{} - -func (v hmsWAMPM) Append(b []byte, t time.Time) []byte { - h := t.Hour() - var am bool - - if h == 0 { - b = append(b, '1') - b = append(b, '2') - am = true - } else { - switch { - case h == 12: - // no op - case h > 12: - h = h - 12 - default: - am = true - } - b = unrollTwoDigits(b, h) - } - b = append(b, ':') - b = unrollTwoDigits(b, t.Minute()) - b = append(b, ':') - b = unrollTwoDigits(b, t.Second()) - - b = append(b, ' ') - if am { - b = append(b, 'A') - } else { - b = append(b, 'P') - } - b = append(b, 'M') - - return b -} diff --git a/vendor/github.com/lestrrat-go/strftime/extension.go b/vendor/github.com/lestrrat-go/strftime/extension.go deleted file mode 100644 index 5f03aec..0000000 --- a/vendor/github.com/lestrrat-go/strftime/extension.go +++ /dev/null @@ -1,67 +0,0 @@ -package strftime - -import ( - "strconv" - "time" -) - -// NOTE: declare private variable and iniitalize once in init(), -// and leave the Milliseconds() function as returning static content. -// This way, `go doc -all` does not show the contents of the -// milliseconds function -var milliseconds Appender -var microseconds Appender -var unixseconds Appender - -func init() { - milliseconds = AppendFunc(func(b []byte, t time.Time) []byte { - millisecond := int(t.Nanosecond()) / int(time.Millisecond) - if millisecond < 100 { - b = append(b, '0') - } - if millisecond < 10 { - b = append(b, '0') - } - return append(b, strconv.Itoa(millisecond)...) - }) - microseconds = AppendFunc(func(b []byte, t time.Time) []byte { - microsecond := int(t.Nanosecond()) / int(time.Microsecond) - if microsecond < 100000 { - b = append(b, '0') - } - if microsecond < 10000 { - b = append(b, '0') - } - if microsecond < 1000 { - b = append(b, '0') - } - if microsecond < 100 { - b = append(b, '0') - } - if microsecond < 10 { - b = append(b, '0') - } - return append(b, strconv.Itoa(microsecond)...) - }) - unixseconds = AppendFunc(func(b []byte, t time.Time) []byte { - return append(b, strconv.FormatInt(t.Unix(), 10)...) - }) -} - -// Milliseconds returns the Appender suitable for creating a zero-padded, -// 3-digit millisecond textual representation. -func Milliseconds() Appender { - return milliseconds -} - -// Microsecond returns the Appender suitable for creating a zero-padded, -// 6-digit microsecond textual representation. -func Microseconds() Appender { - return microseconds -} - -// UnixSeconds returns the Appender suitable for creating -// unix timestamp textual representation. -func UnixSeconds() Appender { - return unixseconds -} diff --git a/vendor/github.com/lestrrat-go/strftime/internal/errors/errors_fmt.go b/vendor/github.com/lestrrat-go/strftime/internal/errors/errors_fmt.go deleted file mode 100644 index 18871c1..0000000 --- a/vendor/github.com/lestrrat-go/strftime/internal/errors/errors_fmt.go +++ /dev/null @@ -1,18 +0,0 @@ -//go:build strftime_native_errors -// +build strftime_native_errors - -package errors - -import "fmt" - -func New(s string) error { - return fmt.Errorf(s) -} - -func Errorf(s string, args ...interface{}) error { - return fmt.Errorf(s, args...) -} - -func Wrap(err error, s string) error { - return fmt.Errorf(s+`: %w`, err) -} diff --git a/vendor/github.com/lestrrat-go/strftime/internal/errors/errors_pkg.go b/vendor/github.com/lestrrat-go/strftime/internal/errors/errors_pkg.go deleted file mode 100644 index 3579787..0000000 --- a/vendor/github.com/lestrrat-go/strftime/internal/errors/errors_pkg.go +++ /dev/null @@ -1,18 +0,0 @@ -//go:build !strftime_native_errors -// +build !strftime_native_errors - -package errors - -import "github.com/pkg/errors" - -func New(s string) error { - return errors.New(s) -} - -func Errorf(s string, args ...interface{}) error { - return errors.Errorf(s, args...) -} - -func Wrap(err error, s string) error { - return errors.Wrap(err, s) -} diff --git a/vendor/github.com/lestrrat-go/strftime/options.go b/vendor/github.com/lestrrat-go/strftime/options.go deleted file mode 100644 index 8ef9d95..0000000 --- a/vendor/github.com/lestrrat-go/strftime/options.go +++ /dev/null @@ -1,67 +0,0 @@ -package strftime - -type Option interface { - Name() string - Value() interface{} -} - -type option struct { - name string - value interface{} -} - -func (o *option) Name() string { return o.name } -func (o *option) Value() interface{} { return o.value } - -const optSpecificationSet = `opt-specification-set` - -// WithSpecification allows you to specify a custom specification set -func WithSpecificationSet(ds SpecificationSet) Option { - return &option{ - name: optSpecificationSet, - value: ds, - } -} - -type optSpecificationPair struct { - name byte - appender Appender -} - -const optSpecification = `opt-specification` - -// WithSpecification allows you to create a new specification set on the fly, -// to be used only for that invocation. -func WithSpecification(b byte, a Appender) Option { - return &option{ - name: optSpecification, - value: &optSpecificationPair{ - name: b, - appender: a, - }, - } -} - -// WithMilliseconds is similar to WithSpecification, and specifies that -// the Strftime object should interpret the pattern `%b` (where b -// is the byte that you specify as the argument) -// as the zero-padded, 3 letter milliseconds of the time. -func WithMilliseconds(b byte) Option { - return WithSpecification(b, Milliseconds()) -} - -// WithMicroseconds is similar to WithSpecification, and specifies that -// the Strftime object should interpret the pattern `%b` (where b -// is the byte that you specify as the argument) -// as the zero-padded, 3 letter microseconds of the time. -func WithMicroseconds(b byte) Option { - return WithSpecification(b, Microseconds()) -} - -// WithUnixSeconds is similar to WithSpecification, and specifies that -// the Strftime object should interpret the pattern `%b` (where b -// is the byte that you specify as the argument) -// as the unix timestamp in seconds -func WithUnixSeconds(b byte) Option { - return WithSpecification(b, UnixSeconds()) -} diff --git a/vendor/github.com/lestrrat-go/strftime/specifications.go b/vendor/github.com/lestrrat-go/strftime/specifications.go deleted file mode 100644 index 2b6e11f..0000000 --- a/vendor/github.com/lestrrat-go/strftime/specifications.go +++ /dev/null @@ -1,152 +0,0 @@ -package strftime - -import ( - "fmt" - "sync" - - "github.com/lestrrat-go/strftime/internal/errors" -) - -// because there is no such thing was a sync.RWLocker -type rwLocker interface { - RLock() - RUnlock() - sync.Locker -} - -// SpecificationSet is a container for patterns that Strftime uses. -// If you want a custom strftime, you can copy the default -// SpecificationSet and tweak it -type SpecificationSet interface { - Lookup(byte) (Appender, error) - Delete(byte) error - Set(byte, Appender) error -} - -type specificationSet struct { - mutable bool - lock rwLocker - store map[byte]Appender -} - -// The default specification set does not need any locking as it is never -// accessed from the outside, and is never mutated. -var defaultSpecificationSet SpecificationSet - -func init() { - defaultSpecificationSet = newImmutableSpecificationSet() -} - -func newImmutableSpecificationSet() SpecificationSet { - // Create a mutable one so that populateDefaultSpecifications work through - // its magic, then copy the associated map - // (NOTE: this is done this way because there used to be - // two struct types for specification set, united under an interface. - // it can now be removed, but we would need to change the entire - // populateDefaultSpecifications method, and I'm currently too lazy - // PRs welcome) - tmp := NewSpecificationSet() - - ss := &specificationSet{ - mutable: false, - lock: nil, // never used, so intentionally not initialized - store: tmp.(*specificationSet).store, - } - - return ss -} - -// NewSpecificationSet creates a specification set with the default specifications. -func NewSpecificationSet() SpecificationSet { - ds := &specificationSet{ - mutable: true, - lock: &sync.RWMutex{}, - store: make(map[byte]Appender), - } - populateDefaultSpecifications(ds) - - return ds -} - -var defaultSpecifications = map[byte]Appender{ - 'A': fullWeekDayName, - 'a': abbrvWeekDayName, - 'B': fullMonthName, - 'b': abbrvMonthName, - 'C': centuryDecimal, - 'c': timeAndDate, - 'D': mdy, - 'd': dayOfMonthZeroPad, - 'e': dayOfMonthSpacePad, - 'F': ymd, - 'H': twentyFourHourClockZeroPad, - 'h': abbrvMonthName, - 'I': twelveHourClockZeroPad, - 'j': dayOfYear, - 'k': twentyFourHourClockSpacePad, - 'l': twelveHourClockSpacePad, - 'M': minutesZeroPad, - 'm': monthNumberZeroPad, - 'n': newline, - 'p': ampm, - 'R': hm, - 'r': imsp, - 'S': secondsNumberZeroPad, - 'T': hms, - 't': tab, - 'U': weekNumberSundayOrigin, - 'u': weekdayMondayOrigin, - 'V': weekNumberMondayOriginOneOrigin, - 'v': eby, - 'W': weekNumberMondayOrigin, - 'w': weekdaySundayOrigin, - 'X': natReprTime, - 'x': natReprDate, - 'Y': year, - 'y': yearNoCentury, - 'Z': timezone, - 'z': timezoneOffset, - '%': percent, -} - -func populateDefaultSpecifications(ds SpecificationSet) { - for c, handler := range defaultSpecifications { - if err := ds.Set(c, handler); err != nil { - panic(fmt.Sprintf("failed to set default specification for %c: %s", c, err)) - } - } -} - -func (ds *specificationSet) Lookup(b byte) (Appender, error) { - if ds.mutable { - ds.lock.RLock() - defer ds.lock.RLock() - } - v, ok := ds.store[b] - if !ok { - return nil, errors.Errorf(`lookup failed: '%%%c' was not found in specification set`, b) - } - return v, nil -} - -func (ds *specificationSet) Delete(b byte) error { - if !ds.mutable { - return errors.New(`delete failed: this specification set is marked immutable`) - } - - ds.lock.Lock() - defer ds.lock.Unlock() - delete(ds.store, b) - return nil -} - -func (ds *specificationSet) Set(b byte, a Appender) error { - if !ds.mutable { - return errors.New(`set failed: this specification set is marked immutable`) - } - - ds.lock.Lock() - defer ds.lock.Unlock() - ds.store[b] = a - return nil -} diff --git a/vendor/github.com/lestrrat-go/strftime/strftime.go b/vendor/github.com/lestrrat-go/strftime/strftime.go deleted file mode 100644 index c869491..0000000 --- a/vendor/github.com/lestrrat-go/strftime/strftime.go +++ /dev/null @@ -1,228 +0,0 @@ -package strftime - -import ( - "io" - "strings" - "sync" - "time" - - "github.com/lestrrat-go/strftime/internal/errors" -) - -type compileHandler interface { - handle(Appender) -} - -// compile, and create an appender list -type appenderListBuilder struct { - list *combiningAppend -} - -func (alb *appenderListBuilder) handle(a Appender) { - alb.list.Append(a) -} - -// compile, and execute the appenders on the fly -type appenderExecutor struct { - t time.Time - dst []byte -} - -func (ae *appenderExecutor) handle(a Appender) { - ae.dst = a.Append(ae.dst, ae.t) -} - -func compile(handler compileHandler, p string, ds SpecificationSet) error { - for l := len(p); l > 0; l = len(p) { - // This is a really tight loop, so we don't even calls to - // Verbatim() to cuase extra stuff - var verbatim verbatimw - - i := strings.IndexByte(p, '%') - if i < 0 { - verbatim.s = p - handler.handle(&verbatim) - // this is silly, but I don't trust break keywords when there's a - // possibility of this piece of code being rearranged - p = p[l:] - continue - } - if i == l-1 { - return errors.New(`stray % at the end of pattern`) - } - - // we found a '%'. we need the next byte to decide what to do next - // we already know that i < l - 1 - // everything up to the i is verbatim - if i > 0 { - verbatim.s = p[:i] - handler.handle(&verbatim) - p = p[i:] - } - - specification, err := ds.Lookup(p[1]) - if err != nil { - return errors.Wrap(err, `pattern compilation failed`) - } - - handler.handle(specification) - p = p[2:] - } - return nil -} - -func getSpecificationSetFor(options ...Option) (SpecificationSet, error) { - var ds SpecificationSet = defaultSpecificationSet - var extraSpecifications []*optSpecificationPair - for _, option := range options { - switch option.Name() { - case optSpecificationSet: - ds = option.Value().(SpecificationSet) - case optSpecification: - extraSpecifications = append(extraSpecifications, option.Value().(*optSpecificationPair)) - } - } - - if len(extraSpecifications) > 0 { - // If ds is immutable, we're going to need to create a new - // one. oh what a waste! - if raw, ok := ds.(*specificationSet); ok && !raw.mutable { - ds = NewSpecificationSet() - } - for _, v := range extraSpecifications { - if err := ds.Set(v.name, v.appender); err != nil { - return nil, err - } - } - } - return ds, nil -} - -var fmtAppendExecutorPool = sync.Pool{ - New: func() interface{} { - var h appenderExecutor - h.dst = make([]byte, 0, 32) - return &h - }, -} - -func getFmtAppendExecutor() *appenderExecutor { - return fmtAppendExecutorPool.Get().(*appenderExecutor) -} - -func releasdeFmtAppendExecutor(v *appenderExecutor) { - // TODO: should we discard the buffer if it's too long? - v.dst = v.dst[:0] - fmtAppendExecutorPool.Put(v) -} - -// Format takes the format `s` and the time `t` to produce the -// format date/time. Note that this function re-compiles the -// pattern every time it is called. -// -// If you know beforehand that you will be reusing the pattern -// within your application, consider creating a `Strftime` object -// and reusing it. -func Format(p string, t time.Time, options ...Option) (string, error) { - // TODO: this may be premature optimization - ds, err := getSpecificationSetFor(options...) - if err != nil { - return "", errors.Wrap(err, `failed to get specification set`) - } - h := getFmtAppendExecutor() - defer releasdeFmtAppendExecutor(h) - - h.t = t - if err := compile(h, p, ds); err != nil { - return "", errors.Wrap(err, `failed to compile format`) - } - - return string(h.dst), nil -} - -// Strftime is the object that represents a compiled strftime pattern -type Strftime struct { - pattern string - compiled appenderList -} - -// New creates a new Strftime object. If the compilation fails, then -// an error is returned in the second argument. -func New(p string, options ...Option) (*Strftime, error) { - // TODO: this may be premature optimization - ds, err := getSpecificationSetFor(options...) - if err != nil { - return nil, errors.Wrap(err, `failed to get specification set`) - } - - var h appenderListBuilder - h.list = &combiningAppend{} - - if err := compile(&h, p, ds); err != nil { - return nil, errors.Wrap(err, `failed to compile format`) - } - - return &Strftime{ - pattern: p, - compiled: h.list.list, - }, nil -} - -// Pattern returns the original pattern string -func (f *Strftime) Pattern() string { - return f.pattern -} - -// Format takes the destination `dst` and time `t`. It formats the date/time -// using the pre-compiled pattern, and outputs the results to `dst` -func (f *Strftime) Format(dst io.Writer, t time.Time) error { - const bufSize = 64 - var b []byte - max := len(f.pattern) + 10 - if max < bufSize { - var buf [bufSize]byte - b = buf[:0] - } else { - b = make([]byte, 0, max) - } - if _, err := dst.Write(f.format(b, t)); err != nil { - return err - } - return nil -} - -// FormatBuffer is equivalent to Format, but appends the result directly to -// supplied slice dst, returning the updated slice. This avoids any internal -// memory allocation. -func (f *Strftime) FormatBuffer(dst []byte, t time.Time) []byte { - return f.format(dst, t) -} - -// Dump outputs the internal structure of the formatter, for debugging purposes. -// Please do NOT assume the output format to be fixed: it is expected to change -// in the future. -func (f *Strftime) Dump(out io.Writer) { - f.compiled.dump(out) -} - -func (f *Strftime) format(b []byte, t time.Time) []byte { - for _, w := range f.compiled { - b = w.Append(b, t) - } - return b -} - -// FormatString takes the time `t` and formats it, returning the -// string containing the formated data. -func (f *Strftime) FormatString(t time.Time) string { - const bufSize = 64 - var b []byte - max := len(f.pattern) + 10 - if max < bufSize { - var buf [bufSize]byte - b = buf[:0] - } else { - b = make([]byte, 0, max) - } - return string(f.format(b, t)) -} diff --git a/vendor/github.com/magiconair/properties/.gitignore b/vendor/github.com/magiconair/properties/.gitignore deleted file mode 100644 index e7081ff..0000000 --- a/vendor/github.com/magiconair/properties/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -*.sublime-project -*.sublime-workspace -*.un~ -*.swp -.idea/ -*.iml diff --git a/vendor/github.com/magiconair/properties/CHANGELOG.md b/vendor/github.com/magiconair/properties/CHANGELOG.md deleted file mode 100644 index 842e8e2..0000000 --- a/vendor/github.com/magiconair/properties/CHANGELOG.md +++ /dev/null @@ -1,205 +0,0 @@ -## Changelog - -### [1.8.7](https://github.com/magiconair/properties/tree/v1.8.7) - 08 Dec 2022 - - * [PR #65](https://github.com/magiconair/properties/pull/65): Speedup Merge - - Thanks to [@AdityaVallabh](https://github.com/AdityaVallabh) for the patch. - - * [PR #66](https://github.com/magiconair/properties/pull/66): use github actions - -### [1.8.6](https://github.com/magiconair/properties/tree/v1.8.6) - 23 Feb 2022 - - * [PR #57](https://github.com/magiconair/properties/pull/57):Fix "unreachable code" lint error - - Thanks to [@ellie](https://github.com/ellie) for the patch. - - * [PR #63](https://github.com/magiconair/properties/pull/63): Make TestMustGetParsedDuration backwards compatible - - This patch ensures that the `TestMustGetParsedDuration` still works with `go1.3` to make the - author happy until it affects real users. - - Thanks to [@maage](https://github.com/maage) for the patch. - -### [1.8.5](https://github.com/magiconair/properties/tree/v1.8.5) - 24 Mar 2021 - - * [PR #55](https://github.com/magiconair/properties/pull/55): Fix: Encoding Bug in Comments - - When reading comments \ are loaded correctly, but when writing they are then - replaced by \\. This leads to wrong comments when writing and reading multiple times. - - Thanks to [@doxsch](https://github.com/doxsch) for the patch. - -### [1.8.4](https://github.com/magiconair/properties/tree/v1.8.4) - 23 Sep 2020 - - * [PR #50](https://github.com/magiconair/properties/pull/50): enhance error message for circular references - - Thanks to [@sriv](https://github.com/sriv) for the patch. - -### [1.8.3](https://github.com/magiconair/properties/tree/v1.8.3) - 14 Sep 2020 - - * [PR #49](https://github.com/magiconair/properties/pull/49): Include the key in error message causing the circular reference - - The change is include the key in the error message which is causing the circular - reference when parsing/loading the properties files. - - Thanks to [@haroon-sheikh](https://github.com/haroon-sheikh) for the patch. - -### [1.8.2](https://github.com/magiconair/properties/tree/v1.8.2) - 25 Aug 2020 - - * [PR #36](https://github.com/magiconair/properties/pull/36): Escape backslash on write - - This patch ensures that backslashes are escaped on write. Existing applications which - rely on the old behavior may need to be updated. - - Thanks to [@apesternikov](https://github.com/apesternikov) for the patch. - - * [PR #42](https://github.com/magiconair/properties/pull/42): Made Content-Type check whitespace agnostic in LoadURL() - - Thanks to [@aliras1](https://github.com/aliras1) for the patch. - - * [PR #41](https://github.com/magiconair/properties/pull/41): Make key/value separator configurable on Write() - - Thanks to [@mkjor](https://github.com/mkjor) for the patch. - - * [PR #40](https://github.com/magiconair/properties/pull/40): Add method to return a sorted list of keys - - Thanks to [@mkjor](https://github.com/mkjor) for the patch. - -### [1.8.1](https://github.com/magiconair/properties/tree/v1.8.1) - 10 May 2019 - - * [PR #35](https://github.com/magiconair/properties/pull/35): Close body always after request - - This patch ensures that in `LoadURL` the response body is always closed. - - Thanks to [@liubog2008](https://github.com/liubog2008) for the patch. - -### [1.8](https://github.com/magiconair/properties/tree/v1.8) - 15 May 2018 - - * [PR #26](https://github.com/magiconair/properties/pull/26): Disable expansion during loading - - This adds the option to disable property expansion during loading. - - Thanks to [@kmala](https://github.com/kmala) for the patch. - -### [1.7.6](https://github.com/magiconair/properties/tree/v1.7.6) - 14 Feb 2018 - - * [PR #29](https://github.com/magiconair/properties/pull/29): Reworked expansion logic to handle more complex cases. - - See PR for an example. - - Thanks to [@yobert](https://github.com/yobert) for the fix. - -### [1.7.5](https://github.com/magiconair/properties/tree/v1.7.5) - 13 Feb 2018 - - * [PR #28](https://github.com/magiconair/properties/pull/28): Support duplicate expansions in the same value - - Values which expand the same key multiple times (e.g. `key=${a} ${a}`) will no longer fail - with a `circular reference error`. - - Thanks to [@yobert](https://github.com/yobert) for the fix. - -### [1.7.4](https://github.com/magiconair/properties/tree/v1.7.4) - 31 Oct 2017 - - * [Issue #23](https://github.com/magiconair/properties/issues/23): Ignore blank lines with whitespaces - - * [PR #24](https://github.com/magiconair/properties/pull/24): Update keys when DisableExpansion is enabled - - Thanks to [@mgurov](https://github.com/mgurov) for the fix. - -### [1.7.3](https://github.com/magiconair/properties/tree/v1.7.3) - 10 Jul 2017 - - * [Issue #17](https://github.com/magiconair/properties/issues/17): Add [SetValue()](http://godoc.org/github.com/magiconair/properties#Properties.SetValue) method to set values generically - * [Issue #22](https://github.com/magiconair/properties/issues/22): Add [LoadMap()](http://godoc.org/github.com/magiconair/properties#LoadMap) function to load properties from a string map - -### [1.7.2](https://github.com/magiconair/properties/tree/v1.7.2) - 20 Mar 2017 - - * [Issue #15](https://github.com/magiconair/properties/issues/15): Drop gocheck dependency - * [PR #21](https://github.com/magiconair/properties/pull/21): Add [Map()](http://godoc.org/github.com/magiconair/properties#Properties.Map) and [FilterFunc()](http://godoc.org/github.com/magiconair/properties#Properties.FilterFunc) - -### [1.7.1](https://github.com/magiconair/properties/tree/v1.7.1) - 13 Jan 2017 - - * [Issue #14](https://github.com/magiconair/properties/issues/14): Decouple TestLoadExpandedFile from `$USER` - * [PR #12](https://github.com/magiconair/properties/pull/12): Load from files and URLs - * [PR #16](https://github.com/magiconair/properties/pull/16): Keep gofmt happy - * [PR #18](https://github.com/magiconair/properties/pull/18): Fix Delete() function - -### [1.7.0](https://github.com/magiconair/properties/tree/v1.7.0) - 20 Mar 2016 - - * [Issue #10](https://github.com/magiconair/properties/issues/10): Add [LoadURL,LoadURLs,MustLoadURL,MustLoadURLs](http://godoc.org/github.com/magiconair/properties#LoadURL) method to load properties from a URL. - * [Issue #11](https://github.com/magiconair/properties/issues/11): Add [LoadString,MustLoadString](http://godoc.org/github.com/magiconair/properties#LoadString) method to load properties from an UTF8 string. - * [PR #8](https://github.com/magiconair/properties/pull/8): Add [MustFlag](http://godoc.org/github.com/magiconair/properties#Properties.MustFlag) method to provide overrides via command line flags. (@pascaldekloe) - -### [1.6.0](https://github.com/magiconair/properties/tree/v1.6.0) - 11 Dec 2015 - - * Add [Decode](http://godoc.org/github.com/magiconair/properties#Properties.Decode) method to populate struct from properties via tags. - -### [1.5.6](https://github.com/magiconair/properties/tree/v1.5.6) - 18 Oct 2015 - - * Vendored in gopkg.in/check.v1 - -### [1.5.5](https://github.com/magiconair/properties/tree/v1.5.5) - 31 Jul 2015 - - * [PR #6](https://github.com/magiconair/properties/pull/6): Add [Delete](http://godoc.org/github.com/magiconair/properties#Properties.Delete) method to remove keys including comments. (@gerbenjacobs) - -### [1.5.4](https://github.com/magiconair/properties/tree/v1.5.4) - 23 Jun 2015 - - * [Issue #5](https://github.com/magiconair/properties/issues/5): Allow disabling of property expansion [DisableExpansion](http://godoc.org/github.com/magiconair/properties#Properties.DisableExpansion). When property expansion is disabled Properties become a simple key/value store and don't check for circular references. - -### [1.5.3](https://github.com/magiconair/properties/tree/v1.5.3) - 02 Jun 2015 - - * [Issue #4](https://github.com/magiconair/properties/issues/4): Maintain key order in [Filter()](http://godoc.org/github.com/magiconair/properties#Properties.Filter), [FilterPrefix()](http://godoc.org/github.com/magiconair/properties#Properties.FilterPrefix) and [FilterRegexp()](http://godoc.org/github.com/magiconair/properties#Properties.FilterRegexp) - -### [1.5.2](https://github.com/magiconair/properties/tree/v1.5.2) - 10 Apr 2015 - - * [Issue #3](https://github.com/magiconair/properties/issues/3): Don't print comments in [WriteComment()](http://godoc.org/github.com/magiconair/properties#Properties.WriteComment) if they are all empty - * Add clickable links to README - -### [1.5.1](https://github.com/magiconair/properties/tree/v1.5.1) - 08 Dec 2014 - - * Added [GetParsedDuration()](http://godoc.org/github.com/magiconair/properties#Properties.GetParsedDuration) and [MustGetParsedDuration()](http://godoc.org/github.com/magiconair/properties#Properties.MustGetParsedDuration) for values specified compatible with - [time.ParseDuration()](http://golang.org/pkg/time/#ParseDuration). - -### [1.5.0](https://github.com/magiconair/properties/tree/v1.5.0) - 18 Nov 2014 - - * Added support for single and multi-line comments (reading, writing and updating) - * The order of keys is now preserved - * Calling [Set()](http://godoc.org/github.com/magiconair/properties#Properties.Set) with an empty key now silently ignores the call and does not create a new entry - * Added a [MustSet()](http://godoc.org/github.com/magiconair/properties#Properties.MustSet) method - * Migrated test library from launchpad.net/gocheck to [gopkg.in/check.v1](http://gopkg.in/check.v1) - -### [1.4.2](https://github.com/magiconair/properties/tree/v1.4.2) - 15 Nov 2014 - - * [Issue #2](https://github.com/magiconair/properties/issues/2): Fixed goroutine leak in parser which created two lexers but cleaned up only one - -### [1.4.1](https://github.com/magiconair/properties/tree/v1.4.1) - 13 Nov 2014 - - * [Issue #1](https://github.com/magiconair/properties/issues/1): Fixed bug in Keys() method which returned an empty string - -### [1.4.0](https://github.com/magiconair/properties/tree/v1.4.0) - 23 Sep 2014 - - * Added [Keys()](http://godoc.org/github.com/magiconair/properties#Properties.Keys) to get the keys - * Added [Filter()](http://godoc.org/github.com/magiconair/properties#Properties.Filter), [FilterRegexp()](http://godoc.org/github.com/magiconair/properties#Properties.FilterRegexp) and [FilterPrefix()](http://godoc.org/github.com/magiconair/properties#Properties.FilterPrefix) to get a subset of the properties - -### [1.3.0](https://github.com/magiconair/properties/tree/v1.3.0) - 18 Mar 2014 - -* Added support for time.Duration -* Made MustXXX() failure beha[ior configurable (log.Fatal, panic](https://github.com/magiconair/properties/tree/vior configurable (log.Fatal, panic) - custom) -* Changed default of MustXXX() failure from panic to log.Fatal - -### [1.2.0](https://github.com/magiconair/properties/tree/v1.2.0) - 05 Mar 2014 - -* Added MustGet... functions -* Added support for int and uint with range checks on 32 bit platforms - -### [1.1.0](https://github.com/magiconair/properties/tree/v1.1.0) - 20 Jan 2014 - -* Renamed from goproperties to properties -* Added support for expansion of environment vars in - filenames and value expressions -* Fixed bug where value expressions were not at the - start of the string - -### [1.0.0](https://github.com/magiconair/properties/tree/v1.0.0) - 7 Jan 2014 - -* Initial release diff --git a/vendor/github.com/magiconair/properties/LICENSE.md b/vendor/github.com/magiconair/properties/LICENSE.md deleted file mode 100644 index 79c87e3..0000000 --- a/vendor/github.com/magiconair/properties/LICENSE.md +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2013-2020, Frank Schroeder - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/magiconair/properties/README.md b/vendor/github.com/magiconair/properties/README.md deleted file mode 100644 index e2edda0..0000000 --- a/vendor/github.com/magiconair/properties/README.md +++ /dev/null @@ -1,128 +0,0 @@ -[![](https://img.shields.io/github/tag/magiconair/properties.svg?style=flat-square&label=release)](https://github.com/magiconair/properties/releases) -[![Travis CI Status](https://img.shields.io/travis/magiconair/properties.svg?branch=master&style=flat-square&label=travis)](https://travis-ci.org/magiconair/properties) -[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg?style=flat-square)](https://raw.githubusercontent.com/magiconair/properties/master/LICENSE) -[![GoDoc](http://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square)](http://godoc.org/github.com/magiconair/properties) - -# Overview - -#### Please run `git pull --tags` to update the tags. See [below](#updated-git-tags) why. - -properties is a Go library for reading and writing properties files. - -It supports reading from multiple files or URLs and Spring style recursive -property expansion of expressions like `${key}` to their corresponding value. -Value expressions can refer to other keys like in `${key}` or to environment -variables like in `${USER}`. Filenames can also contain environment variables -like in `/home/${USER}/myapp.properties`. - -Properties can be decoded into structs, maps, arrays and values through -struct tags. - -Comments and the order of keys are preserved. Comments can be modified -and can be written to the output. - -The properties library supports both ISO-8859-1 and UTF-8 encoded data. - -Starting from version 1.3.0 the behavior of the MustXXX() functions is -configurable by providing a custom `ErrorHandler` function. The default has -changed from `panic` to `log.Fatal` but this is configurable and custom -error handling functions can be provided. See the package documentation for -details. - -Read the full documentation on [![GoDoc](http://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square)](http://godoc.org/github.com/magiconair/properties) - -## Getting Started - -```go -import ( - "flag" - "github.com/magiconair/properties" -) - -func main() { - // init from a file - p := properties.MustLoadFile("${HOME}/config.properties", properties.UTF8) - - // or multiple files - p = properties.MustLoadFiles([]string{ - "${HOME}/config.properties", - "${HOME}/config-${USER}.properties", - }, properties.UTF8, true) - - // or from a map - p = properties.LoadMap(map[string]string{"key": "value", "abc": "def"}) - - // or from a string - p = properties.MustLoadString("key=value\nabc=def") - - // or from a URL - p = properties.MustLoadURL("http://host/path") - - // or from multiple URLs - p = properties.MustLoadURL([]string{ - "http://host/config", - "http://host/config-${USER}", - }, true) - - // or from flags - p.MustFlag(flag.CommandLine) - - // get values through getters - host := p.MustGetString("host") - port := p.GetInt("port", 8080) - - // or through Decode - type Config struct { - Host string `properties:"host"` - Port int `properties:"port,default=9000"` - Accept []string `properties:"accept,default=image/png;image;gif"` - Timeout time.Duration `properties:"timeout,default=5s"` - } - var cfg Config - if err := p.Decode(&cfg); err != nil { - log.Fatal(err) - } -} - -``` - -## Installation and Upgrade - -``` -$ go get -u github.com/magiconair/properties -``` - -## License - -2 clause BSD license. See [LICENSE](https://github.com/magiconair/properties/blob/master/LICENSE) file for details. - -## ToDo - -* Dump contents with passwords and secrets obscured - -## Updated Git tags - -#### 13 Feb 2018 - -I realized that all of the git tags I had pushed before v1.7.5 were lightweight tags -and I've only recently learned that this doesn't play well with `git describe` 😞 - -I have replaced all lightweight tags with signed tags using this script which should -retain the commit date, name and email address. Please run `git pull --tags` to update them. - -Worst case you have to reclone the repo. - -```shell -#!/bin/bash -tag=$1 -echo "Updating $tag" -date=$(git show ${tag}^0 --format=%aD | head -1) -email=$(git show ${tag}^0 --format=%aE | head -1) -name=$(git show ${tag}^0 --format=%aN | head -1) -GIT_COMMITTER_DATE="$date" GIT_COMMITTER_NAME="$name" GIT_COMMITTER_EMAIL="$email" git tag -s -f ${tag} ${tag}^0 -m ${tag} -``` - -I apologize for the inconvenience. - -Frank - diff --git a/vendor/github.com/magiconair/properties/decode.go b/vendor/github.com/magiconair/properties/decode.go deleted file mode 100644 index 8e6aa44..0000000 --- a/vendor/github.com/magiconair/properties/decode.go +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright 2013-2022 Frank Schroeder. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package properties - -import ( - "fmt" - "reflect" - "strconv" - "strings" - "time" -) - -// Decode assigns property values to exported fields of a struct. -// -// Decode traverses v recursively and returns an error if a value cannot be -// converted to the field type or a required value is missing for a field. -// -// The following type dependent decodings are used: -// -// String, boolean, numeric fields have the value of the property key assigned. -// The property key name is the name of the field. A different key and a default -// value can be set in the field's tag. Fields without default value are -// required. If the value cannot be converted to the field type an error is -// returned. -// -// time.Duration fields have the result of time.ParseDuration() assigned. -// -// time.Time fields have the vaule of time.Parse() assigned. The default layout -// is time.RFC3339 but can be set in the field's tag. -// -// Arrays and slices of string, boolean, numeric, time.Duration and time.Time -// fields have the value interpreted as a comma separated list of values. The -// individual values are trimmed of whitespace and empty values are ignored. A -// default value can be provided as a semicolon separated list in the field's -// tag. -// -// Struct fields are decoded recursively using the field name plus "." as -// prefix. The prefix (without dot) can be overridden in the field's tag. -// Default values are not supported in the field's tag. Specify them on the -// fields of the inner struct instead. -// -// Map fields must have a key of type string and are decoded recursively by -// using the field's name plus ".' as prefix and the next element of the key -// name as map key. The prefix (without dot) can be overridden in the field's -// tag. Default values are not supported. -// -// Examples: -// -// // Field is ignored. -// Field int `properties:"-"` -// -// // Field is assigned value of 'Field'. -// Field int -// -// // Field is assigned value of 'myName'. -// Field int `properties:"myName"` -// -// // Field is assigned value of key 'myName' and has a default -// // value 15 if the key does not exist. -// Field int `properties:"myName,default=15"` -// -// // Field is assigned value of key 'Field' and has a default -// // value 15 if the key does not exist. -// Field int `properties:",default=15"` -// -// // Field is assigned value of key 'date' and the date -// // is in format 2006-01-02 -// Field time.Time `properties:"date,layout=2006-01-02"` -// -// // Field is assigned the non-empty and whitespace trimmed -// // values of key 'Field' split by commas. -// Field []string -// -// // Field is assigned the non-empty and whitespace trimmed -// // values of key 'Field' split by commas and has a default -// // value ["a", "b", "c"] if the key does not exist. -// Field []string `properties:",default=a;b;c"` -// -// // Field is decoded recursively with "Field." as key prefix. -// Field SomeStruct -// -// // Field is decoded recursively with "myName." as key prefix. -// Field SomeStruct `properties:"myName"` -// -// // Field is decoded recursively with "Field." as key prefix -// // and the next dotted element of the key as map key. -// Field map[string]string -// -// // Field is decoded recursively with "myName." as key prefix -// // and the next dotted element of the key as map key. -// Field map[string]string `properties:"myName"` -func (p *Properties) Decode(x interface{}) error { - t, v := reflect.TypeOf(x), reflect.ValueOf(x) - if t.Kind() != reflect.Ptr || v.Elem().Type().Kind() != reflect.Struct { - return fmt.Errorf("not a pointer to struct: %s", t) - } - if err := dec(p, "", nil, nil, v); err != nil { - return err - } - return nil -} - -func dec(p *Properties, key string, def *string, opts map[string]string, v reflect.Value) error { - t := v.Type() - - // value returns the property value for key or the default if provided. - value := func() (string, error) { - if val, ok := p.Get(key); ok { - return val, nil - } - if def != nil { - return *def, nil - } - return "", fmt.Errorf("missing required key %s", key) - } - - // conv converts a string to a value of the given type. - conv := func(s string, t reflect.Type) (val reflect.Value, err error) { - var v interface{} - - switch { - case isDuration(t): - v, err = time.ParseDuration(s) - - case isTime(t): - layout := opts["layout"] - if layout == "" { - layout = time.RFC3339 - } - v, err = time.Parse(layout, s) - - case isBool(t): - v, err = boolVal(s), nil - - case isString(t): - v, err = s, nil - - case isFloat(t): - v, err = strconv.ParseFloat(s, 64) - - case isInt(t): - v, err = strconv.ParseInt(s, 10, 64) - - case isUint(t): - v, err = strconv.ParseUint(s, 10, 64) - - default: - return reflect.Zero(t), fmt.Errorf("unsupported type %s", t) - } - if err != nil { - return reflect.Zero(t), err - } - return reflect.ValueOf(v).Convert(t), nil - } - - // keydef returns the property key and the default value based on the - // name of the struct field and the options in the tag. - keydef := func(f reflect.StructField) (string, *string, map[string]string) { - _key, _opts := parseTag(f.Tag.Get("properties")) - - var _def *string - if d, ok := _opts["default"]; ok { - _def = &d - } - if _key != "" { - return _key, _def, _opts - } - return f.Name, _def, _opts - } - - switch { - case isDuration(t) || isTime(t) || isBool(t) || isString(t) || isFloat(t) || isInt(t) || isUint(t): - s, err := value() - if err != nil { - return err - } - val, err := conv(s, t) - if err != nil { - return err - } - v.Set(val) - - case isPtr(t): - return dec(p, key, def, opts, v.Elem()) - - case isStruct(t): - for i := 0; i < v.NumField(); i++ { - fv := v.Field(i) - fk, def, opts := keydef(t.Field(i)) - if !fv.CanSet() { - return fmt.Errorf("cannot set %s", t.Field(i).Name) - } - if fk == "-" { - continue - } - if key != "" { - fk = key + "." + fk - } - if err := dec(p, fk, def, opts, fv); err != nil { - return err - } - } - return nil - - case isArray(t): - val, err := value() - if err != nil { - return err - } - vals := split(val, ";") - a := reflect.MakeSlice(t, 0, len(vals)) - for _, s := range vals { - val, err := conv(s, t.Elem()) - if err != nil { - return err - } - a = reflect.Append(a, val) - } - v.Set(a) - - case isMap(t): - valT := t.Elem() - m := reflect.MakeMap(t) - for postfix := range p.FilterStripPrefix(key + ".").m { - pp := strings.SplitN(postfix, ".", 2) - mk, mv := pp[0], reflect.New(valT) - if err := dec(p, key+"."+mk, nil, nil, mv); err != nil { - return err - } - m.SetMapIndex(reflect.ValueOf(mk), mv.Elem()) - } - v.Set(m) - - default: - return fmt.Errorf("unsupported type %s", t) - } - return nil -} - -// split splits a string on sep, trims whitespace of elements -// and omits empty elements -func split(s string, sep string) []string { - var a []string - for _, v := range strings.Split(s, sep) { - if v = strings.TrimSpace(v); v != "" { - a = append(a, v) - } - } - return a -} - -// parseTag parses a "key,k=v,k=v,..." -func parseTag(tag string) (key string, opts map[string]string) { - opts = map[string]string{} - for i, s := range strings.Split(tag, ",") { - if i == 0 { - key = s - continue - } - - pp := strings.SplitN(s, "=", 2) - if len(pp) == 1 { - opts[pp[0]] = "" - } else { - opts[pp[0]] = pp[1] - } - } - return key, opts -} - -func isArray(t reflect.Type) bool { return t.Kind() == reflect.Array || t.Kind() == reflect.Slice } -func isBool(t reflect.Type) bool { return t.Kind() == reflect.Bool } -func isDuration(t reflect.Type) bool { return t == reflect.TypeOf(time.Second) } -func isMap(t reflect.Type) bool { return t.Kind() == reflect.Map } -func isPtr(t reflect.Type) bool { return t.Kind() == reflect.Ptr } -func isString(t reflect.Type) bool { return t.Kind() == reflect.String } -func isStruct(t reflect.Type) bool { return t.Kind() == reflect.Struct } -func isTime(t reflect.Type) bool { return t == reflect.TypeOf(time.Time{}) } -func isFloat(t reflect.Type) bool { - return t.Kind() == reflect.Float32 || t.Kind() == reflect.Float64 -} -func isInt(t reflect.Type) bool { - return t.Kind() == reflect.Int || t.Kind() == reflect.Int8 || t.Kind() == reflect.Int16 || t.Kind() == reflect.Int32 || t.Kind() == reflect.Int64 -} -func isUint(t reflect.Type) bool { - return t.Kind() == reflect.Uint || t.Kind() == reflect.Uint8 || t.Kind() == reflect.Uint16 || t.Kind() == reflect.Uint32 || t.Kind() == reflect.Uint64 -} diff --git a/vendor/github.com/magiconair/properties/doc.go b/vendor/github.com/magiconair/properties/doc.go deleted file mode 100644 index 7c79793..0000000 --- a/vendor/github.com/magiconair/properties/doc.go +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2013-2022 Frank Schroeder. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package properties provides functions for reading and writing -// ISO-8859-1 and UTF-8 encoded .properties files and has -// support for recursive property expansion. -// -// Java properties files are ISO-8859-1 encoded and use Unicode -// literals for characters outside the ISO character set. Unicode -// literals can be used in UTF-8 encoded properties files but -// aren't necessary. -// -// To load a single properties file use MustLoadFile(): -// -// p := properties.MustLoadFile(filename, properties.UTF8) -// -// To load multiple properties files use MustLoadFiles() -// which loads the files in the given order and merges the -// result. Missing properties files can be ignored if the -// 'ignoreMissing' flag is set to true. -// -// Filenames can contain environment variables which are expanded -// before loading. -// -// f1 := "/etc/myapp/myapp.conf" -// f2 := "/home/${USER}/myapp.conf" -// p := MustLoadFiles([]string{f1, f2}, properties.UTF8, true) -// -// All of the different key/value delimiters ' ', ':' and '=' are -// supported as well as the comment characters '!' and '#' and -// multi-line values. -// -// ! this is a comment -// # and so is this -// -// # the following expressions are equal -// key value -// key=value -// key:value -// key = value -// key : value -// key = val\ -// ue -// -// Properties stores all comments preceding a key and provides -// GetComments() and SetComments() methods to retrieve and -// update them. The convenience functions GetComment() and -// SetComment() allow access to the last comment. The -// WriteComment() method writes properties files including -// the comments and with the keys in the original order. -// This can be used for sanitizing properties files. -// -// Property expansion is recursive and circular references -// and malformed expressions are not allowed and cause an -// error. Expansion of environment variables is supported. -// -// # standard property -// key = value -// -// # property expansion: key2 = value -// key2 = ${key} -// -// # recursive expansion: key3 = value -// key3 = ${key2} -// -// # circular reference (error) -// key = ${key} -// -// # malformed expression (error) -// key = ${ke -// -// # refers to the users' home dir -// home = ${HOME} -// -// # local key takes precedence over env var: u = foo -// USER = foo -// u = ${USER} -// -// The default property expansion format is ${key} but can be -// changed by setting different pre- and postfix values on the -// Properties object. -// -// p := properties.NewProperties() -// p.Prefix = "#[" -// p.Postfix = "]#" -// -// Properties provides convenience functions for getting typed -// values with default values if the key does not exist or the -// type conversion failed. -// -// # Returns true if the value is either "1", "on", "yes" or "true" -// # Returns false for every other value and the default value if -// # the key does not exist. -// v = p.GetBool("key", false) -// -// # Returns the value if the key exists and the format conversion -// # was successful. Otherwise, the default value is returned. -// v = p.GetInt64("key", 999) -// v = p.GetUint64("key", 999) -// v = p.GetFloat64("key", 123.0) -// v = p.GetString("key", "def") -// v = p.GetDuration("key", 999) -// -// As an alternative properties may be applied with the standard -// library's flag implementation at any time. -// -// # Standard configuration -// v = flag.Int("key", 999, "help message") -// flag.Parse() -// -// # Merge p into the flag set -// p.MustFlag(flag.CommandLine) -// -// Properties provides several MustXXX() convenience functions -// which will terminate the app if an error occurs. The behavior -// of the failure is configurable and the default is to call -// log.Fatal(err). To have the MustXXX() functions panic instead -// of logging the error set a different ErrorHandler before -// you use the Properties package. -// -// properties.ErrorHandler = properties.PanicHandler -// -// # Will panic instead of logging an error -// p := properties.MustLoadFile("config.properties") -// -// You can also provide your own ErrorHandler function. The only requirement -// is that the error handler function must exit after handling the error. -// -// properties.ErrorHandler = func(err error) { -// fmt.Println(err) -// os.Exit(1) -// } -// -// # Will write to stdout and then exit -// p := properties.MustLoadFile("config.properties") -// -// Properties can also be loaded into a struct via the `Decode` -// method, e.g. -// -// type S struct { -// A string `properties:"a,default=foo"` -// D time.Duration `properties:"timeout,default=5s"` -// E time.Time `properties:"expires,layout=2006-01-02,default=2015-01-01"` -// } -// -// See `Decode()` method for the full documentation. -// -// The following documents provide a description of the properties -// file format. -// -// http://en.wikipedia.org/wiki/.properties -// -// http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load%28java.io.Reader%29 -package properties diff --git a/vendor/github.com/magiconair/properties/integrate.go b/vendor/github.com/magiconair/properties/integrate.go deleted file mode 100644 index 35d0ae9..0000000 --- a/vendor/github.com/magiconair/properties/integrate.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2013-2022 Frank Schroeder. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package properties - -import "flag" - -// MustFlag sets flags that are skipped by dst.Parse when p contains -// the respective key for flag.Flag.Name. -// -// It's use is recommended with command line arguments as in: -// -// flag.Parse() -// p.MustFlag(flag.CommandLine) -func (p *Properties) MustFlag(dst *flag.FlagSet) { - m := make(map[string]*flag.Flag) - dst.VisitAll(func(f *flag.Flag) { - m[f.Name] = f - }) - dst.Visit(func(f *flag.Flag) { - delete(m, f.Name) // overridden - }) - - for name, f := range m { - v, ok := p.Get(name) - if !ok { - continue - } - - if err := f.Value.Set(v); err != nil { - ErrorHandler(err) - } - } -} diff --git a/vendor/github.com/magiconair/properties/lex.go b/vendor/github.com/magiconair/properties/lex.go deleted file mode 100644 index 3d15a1f..0000000 --- a/vendor/github.com/magiconair/properties/lex.go +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright 2013-2022 Frank Schroeder. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// Parts of the lexer are from the template/text/parser package -// For these parts the following applies: -// -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file of the go 1.2 -// distribution. - -package properties - -import ( - "fmt" - "strconv" - "strings" - "unicode/utf8" -) - -// item represents a token or text string returned from the scanner. -type item struct { - typ itemType // The type of this item. - pos int // The starting position, in bytes, of this item in the input string. - val string // The value of this item. -} - -func (i item) String() string { - switch { - case i.typ == itemEOF: - return "EOF" - case i.typ == itemError: - return i.val - case len(i.val) > 10: - return fmt.Sprintf("%.10q...", i.val) - } - return fmt.Sprintf("%q", i.val) -} - -// itemType identifies the type of lex items. -type itemType int - -const ( - itemError itemType = iota // error occurred; value is text of error - itemEOF - itemKey // a key - itemValue // a value - itemComment // a comment -) - -// defines a constant for EOF -const eof = -1 - -// permitted whitespace characters space, FF and TAB -const whitespace = " \f\t" - -// stateFn represents the state of the scanner as a function that returns the next state. -type stateFn func(*lexer) stateFn - -// lexer holds the state of the scanner. -type lexer struct { - input string // the string being scanned - state stateFn // the next lexing function to enter - pos int // current position in the input - start int // start position of this item - width int // width of last rune read from input - lastPos int // position of most recent item returned by nextItem - runes []rune // scanned runes for this item - items chan item // channel of scanned items -} - -// next returns the next rune in the input. -func (l *lexer) next() rune { - if l.pos >= len(l.input) { - l.width = 0 - return eof - } - r, w := utf8.DecodeRuneInString(l.input[l.pos:]) - l.width = w - l.pos += l.width - return r -} - -// peek returns but does not consume the next rune in the input. -func (l *lexer) peek() rune { - r := l.next() - l.backup() - return r -} - -// backup steps back one rune. Can only be called once per call of next. -func (l *lexer) backup() { - l.pos -= l.width -} - -// emit passes an item back to the client. -func (l *lexer) emit(t itemType) { - i := item{t, l.start, string(l.runes)} - l.items <- i - l.start = l.pos - l.runes = l.runes[:0] -} - -// ignore skips over the pending input before this point. -func (l *lexer) ignore() { - l.start = l.pos -} - -// appends the rune to the current value -func (l *lexer) appendRune(r rune) { - l.runes = append(l.runes, r) -} - -// accept consumes the next rune if it's from the valid set. -func (l *lexer) accept(valid string) bool { - if strings.ContainsRune(valid, l.next()) { - return true - } - l.backup() - return false -} - -// acceptRun consumes a run of runes from the valid set. -func (l *lexer) acceptRun(valid string) { - for strings.ContainsRune(valid, l.next()) { - } - l.backup() -} - -// lineNumber reports which line we're on, based on the position of -// the previous item returned by nextItem. Doing it this way -// means we don't have to worry about peek double counting. -func (l *lexer) lineNumber() int { - return 1 + strings.Count(l.input[:l.lastPos], "\n") -} - -// errorf returns an error token and terminates the scan by passing -// back a nil pointer that will be the next state, terminating l.nextItem. -func (l *lexer) errorf(format string, args ...interface{}) stateFn { - l.items <- item{itemError, l.start, fmt.Sprintf(format, args...)} - return nil -} - -// nextItem returns the next item from the input. -func (l *lexer) nextItem() item { - i := <-l.items - l.lastPos = i.pos - return i -} - -// lex creates a new scanner for the input string. -func lex(input string) *lexer { - l := &lexer{ - input: input, - items: make(chan item), - runes: make([]rune, 0, 32), - } - go l.run() - return l -} - -// run runs the state machine for the lexer. -func (l *lexer) run() { - for l.state = lexBeforeKey(l); l.state != nil; { - l.state = l.state(l) - } -} - -// state functions - -// lexBeforeKey scans until a key begins. -func lexBeforeKey(l *lexer) stateFn { - switch r := l.next(); { - case isEOF(r): - l.emit(itemEOF) - return nil - - case isEOL(r): - l.ignore() - return lexBeforeKey - - case isComment(r): - return lexComment - - case isWhitespace(r): - l.ignore() - return lexBeforeKey - - default: - l.backup() - return lexKey - } -} - -// lexComment scans a comment line. The comment character has already been scanned. -func lexComment(l *lexer) stateFn { - l.acceptRun(whitespace) - l.ignore() - for { - switch r := l.next(); { - case isEOF(r): - l.ignore() - l.emit(itemEOF) - return nil - case isEOL(r): - l.emit(itemComment) - return lexBeforeKey - default: - l.appendRune(r) - } - } -} - -// lexKey scans the key up to a delimiter -func lexKey(l *lexer) stateFn { - var r rune - -Loop: - for { - switch r = l.next(); { - - case isEscape(r): - err := l.scanEscapeSequence() - if err != nil { - return l.errorf(err.Error()) - } - - case isEndOfKey(r): - l.backup() - break Loop - - case isEOF(r): - break Loop - - default: - l.appendRune(r) - } - } - - if len(l.runes) > 0 { - l.emit(itemKey) - } - - if isEOF(r) { - l.emit(itemEOF) - return nil - } - - return lexBeforeValue -} - -// lexBeforeValue scans the delimiter between key and value. -// Leading and trailing whitespace is ignored. -// We expect to be just after the key. -func lexBeforeValue(l *lexer) stateFn { - l.acceptRun(whitespace) - l.accept(":=") - l.acceptRun(whitespace) - l.ignore() - return lexValue -} - -// lexValue scans text until the end of the line. We expect to be just after the delimiter. -func lexValue(l *lexer) stateFn { - for { - switch r := l.next(); { - case isEscape(r): - if isEOL(l.peek()) { - l.next() - l.acceptRun(whitespace) - } else { - err := l.scanEscapeSequence() - if err != nil { - return l.errorf(err.Error()) - } - } - - case isEOL(r): - l.emit(itemValue) - l.ignore() - return lexBeforeKey - - case isEOF(r): - l.emit(itemValue) - l.emit(itemEOF) - return nil - - default: - l.appendRune(r) - } - } -} - -// scanEscapeSequence scans either one of the escaped characters -// or a unicode literal. We expect to be after the escape character. -func (l *lexer) scanEscapeSequence() error { - switch r := l.next(); { - - case isEscapedCharacter(r): - l.appendRune(decodeEscapedCharacter(r)) - return nil - - case atUnicodeLiteral(r): - return l.scanUnicodeLiteral() - - case isEOF(r): - return fmt.Errorf("premature EOF") - - // silently drop the escape character and append the rune as is - default: - l.appendRune(r) - return nil - } -} - -// scans a unicode literal in the form \uXXXX. We expect to be after the \u. -func (l *lexer) scanUnicodeLiteral() error { - // scan the digits - d := make([]rune, 4) - for i := 0; i < 4; i++ { - d[i] = l.next() - if d[i] == eof || !strings.ContainsRune("0123456789abcdefABCDEF", d[i]) { - return fmt.Errorf("invalid unicode literal") - } - } - - // decode the digits into a rune - r, err := strconv.ParseInt(string(d), 16, 0) - if err != nil { - return err - } - - l.appendRune(rune(r)) - return nil -} - -// decodeEscapedCharacter returns the unescaped rune. We expect to be after the escape character. -func decodeEscapedCharacter(r rune) rune { - switch r { - case 'f': - return '\f' - case 'n': - return '\n' - case 'r': - return '\r' - case 't': - return '\t' - default: - return r - } -} - -// atUnicodeLiteral reports whether we are at a unicode literal. -// The escape character has already been consumed. -func atUnicodeLiteral(r rune) bool { - return r == 'u' -} - -// isComment reports whether we are at the start of a comment. -func isComment(r rune) bool { - return r == '#' || r == '!' -} - -// isEndOfKey reports whether the rune terminates the current key. -func isEndOfKey(r rune) bool { - return strings.ContainsRune(" \f\t\r\n:=", r) -} - -// isEOF reports whether we are at EOF. -func isEOF(r rune) bool { - return r == eof -} - -// isEOL reports whether we are at a new line character. -func isEOL(r rune) bool { - return r == '\n' || r == '\r' -} - -// isEscape reports whether the rune is the escape character which -// prefixes unicode literals and other escaped characters. -func isEscape(r rune) bool { - return r == '\\' -} - -// isEscapedCharacter reports whether we are at one of the characters that need escaping. -// The escape character has already been consumed. -func isEscapedCharacter(r rune) bool { - return strings.ContainsRune(" :=fnrt", r) -} - -// isWhitespace reports whether the rune is a whitespace character. -func isWhitespace(r rune) bool { - return strings.ContainsRune(whitespace, r) -} diff --git a/vendor/github.com/magiconair/properties/load.go b/vendor/github.com/magiconair/properties/load.go deleted file mode 100644 index 635368d..0000000 --- a/vendor/github.com/magiconair/properties/load.go +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright 2013-2022 Frank Schroeder. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package properties - -import ( - "fmt" - "io/ioutil" - "net/http" - "os" - "strings" -) - -// Encoding specifies encoding of the input data. -type Encoding uint - -const ( - // utf8Default is a private placeholder for the zero value of Encoding to - // ensure that it has the correct meaning. UTF8 is the default encoding but - // was assigned a non-zero value which cannot be changed without breaking - // existing code. Clients should continue to use the public constants. - utf8Default Encoding = iota - - // UTF8 interprets the input data as UTF-8. - UTF8 - - // ISO_8859_1 interprets the input data as ISO-8859-1. - ISO_8859_1 -) - -type Loader struct { - // Encoding determines how the data from files and byte buffers - // is interpreted. For URLs the Content-Type header is used - // to determine the encoding of the data. - Encoding Encoding - - // DisableExpansion configures the property expansion of the - // returned property object. When set to true, the property values - // will not be expanded and the Property object will not be checked - // for invalid expansion expressions. - DisableExpansion bool - - // IgnoreMissing configures whether missing files or URLs which return - // 404 are reported as errors. When set to true, missing files and 404 - // status codes are not reported as errors. - IgnoreMissing bool -} - -// Load reads a buffer into a Properties struct. -func (l *Loader) LoadBytes(buf []byte) (*Properties, error) { - return l.loadBytes(buf, l.Encoding) -} - -// LoadAll reads the content of multiple URLs or files in the given order into -// a Properties struct. If IgnoreMissing is true then a 404 status code or -// missing file will not be reported as error. Encoding sets the encoding for -// files. For the URLs see LoadURL for the Content-Type header and the -// encoding. -func (l *Loader) LoadAll(names []string) (*Properties, error) { - all := NewProperties() - for _, name := range names { - n, err := expandName(name) - if err != nil { - return nil, err - } - - var p *Properties - switch { - case strings.HasPrefix(n, "http://"): - p, err = l.LoadURL(n) - case strings.HasPrefix(n, "https://"): - p, err = l.LoadURL(n) - default: - p, err = l.LoadFile(n) - } - if err != nil { - return nil, err - } - all.Merge(p) - } - - all.DisableExpansion = l.DisableExpansion - if all.DisableExpansion { - return all, nil - } - return all, all.check() -} - -// LoadFile reads a file into a Properties struct. -// If IgnoreMissing is true then a missing file will not be -// reported as error. -func (l *Loader) LoadFile(filename string) (*Properties, error) { - data, err := ioutil.ReadFile(filename) - if err != nil { - if l.IgnoreMissing && os.IsNotExist(err) { - LogPrintf("properties: %s not found. skipping", filename) - return NewProperties(), nil - } - return nil, err - } - return l.loadBytes(data, l.Encoding) -} - -// LoadURL reads the content of the URL into a Properties struct. -// -// The encoding is determined via the Content-Type header which -// should be set to 'text/plain'. If the 'charset' parameter is -// missing, 'iso-8859-1' or 'latin1' the encoding is set to -// ISO-8859-1. If the 'charset' parameter is set to 'utf-8' the -// encoding is set to UTF-8. A missing content type header is -// interpreted as 'text/plain; charset=utf-8'. -func (l *Loader) LoadURL(url string) (*Properties, error) { - resp, err := http.Get(url) - if err != nil { - return nil, fmt.Errorf("properties: error fetching %q. %s", url, err) - } - defer resp.Body.Close() - - if resp.StatusCode == 404 && l.IgnoreMissing { - LogPrintf("properties: %s returned %d. skipping", url, resp.StatusCode) - return NewProperties(), nil - } - - if resp.StatusCode != 200 { - return nil, fmt.Errorf("properties: %s returned %d", url, resp.StatusCode) - } - - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - return nil, fmt.Errorf("properties: %s error reading response. %s", url, err) - } - - ct := resp.Header.Get("Content-Type") - ct = strings.Join(strings.Fields(ct), "") - var enc Encoding - switch strings.ToLower(ct) { - case "text/plain", "text/plain;charset=iso-8859-1", "text/plain;charset=latin1": - enc = ISO_8859_1 - case "", "text/plain;charset=utf-8": - enc = UTF8 - default: - return nil, fmt.Errorf("properties: invalid content type %s", ct) - } - - return l.loadBytes(body, enc) -} - -func (l *Loader) loadBytes(buf []byte, enc Encoding) (*Properties, error) { - p, err := parse(convert(buf, enc)) - if err != nil { - return nil, err - } - p.DisableExpansion = l.DisableExpansion - if p.DisableExpansion { - return p, nil - } - return p, p.check() -} - -// Load reads a buffer into a Properties struct. -func Load(buf []byte, enc Encoding) (*Properties, error) { - l := &Loader{Encoding: enc} - return l.LoadBytes(buf) -} - -// LoadString reads an UTF8 string into a properties struct. -func LoadString(s string) (*Properties, error) { - l := &Loader{Encoding: UTF8} - return l.LoadBytes([]byte(s)) -} - -// LoadMap creates a new Properties struct from a string map. -func LoadMap(m map[string]string) *Properties { - p := NewProperties() - for k, v := range m { - p.Set(k, v) - } - return p -} - -// LoadFile reads a file into a Properties struct. -func LoadFile(filename string, enc Encoding) (*Properties, error) { - l := &Loader{Encoding: enc} - return l.LoadAll([]string{filename}) -} - -// LoadFiles reads multiple files in the given order into -// a Properties struct. If 'ignoreMissing' is true then -// non-existent files will not be reported as error. -func LoadFiles(filenames []string, enc Encoding, ignoreMissing bool) (*Properties, error) { - l := &Loader{Encoding: enc, IgnoreMissing: ignoreMissing} - return l.LoadAll(filenames) -} - -// LoadURL reads the content of the URL into a Properties struct. -// See Loader#LoadURL for details. -func LoadURL(url string) (*Properties, error) { - l := &Loader{Encoding: UTF8} - return l.LoadAll([]string{url}) -} - -// LoadURLs reads the content of multiple URLs in the given order into a -// Properties struct. If IgnoreMissing is true then a 404 status code will -// not be reported as error. See Loader#LoadURL for the Content-Type header -// and the encoding. -func LoadURLs(urls []string, ignoreMissing bool) (*Properties, error) { - l := &Loader{Encoding: UTF8, IgnoreMissing: ignoreMissing} - return l.LoadAll(urls) -} - -// LoadAll reads the content of multiple URLs or files in the given order into a -// Properties struct. If 'ignoreMissing' is true then a 404 status code or missing file will -// not be reported as error. Encoding sets the encoding for files. For the URLs please see -// LoadURL for the Content-Type header and the encoding. -func LoadAll(names []string, enc Encoding, ignoreMissing bool) (*Properties, error) { - l := &Loader{Encoding: enc, IgnoreMissing: ignoreMissing} - return l.LoadAll(names) -} - -// MustLoadString reads an UTF8 string into a Properties struct and -// panics on error. -func MustLoadString(s string) *Properties { - return must(LoadString(s)) -} - -// MustLoadFile reads a file into a Properties struct and -// panics on error. -func MustLoadFile(filename string, enc Encoding) *Properties { - return must(LoadFile(filename, enc)) -} - -// MustLoadFiles reads multiple files in the given order into -// a Properties struct and panics on error. If 'ignoreMissing' -// is true then non-existent files will not be reported as error. -func MustLoadFiles(filenames []string, enc Encoding, ignoreMissing bool) *Properties { - return must(LoadFiles(filenames, enc, ignoreMissing)) -} - -// MustLoadURL reads the content of a URL into a Properties struct and -// panics on error. -func MustLoadURL(url string) *Properties { - return must(LoadURL(url)) -} - -// MustLoadURLs reads the content of multiple URLs in the given order into a -// Properties struct and panics on error. If 'ignoreMissing' is true then a 404 -// status code will not be reported as error. -func MustLoadURLs(urls []string, ignoreMissing bool) *Properties { - return must(LoadURLs(urls, ignoreMissing)) -} - -// MustLoadAll reads the content of multiple URLs or files in the given order into a -// Properties struct. If 'ignoreMissing' is true then a 404 status code or missing file will -// not be reported as error. Encoding sets the encoding for files. For the URLs please see -// LoadURL for the Content-Type header and the encoding. It panics on error. -func MustLoadAll(names []string, enc Encoding, ignoreMissing bool) *Properties { - return must(LoadAll(names, enc, ignoreMissing)) -} - -func must(p *Properties, err error) *Properties { - if err != nil { - ErrorHandler(err) - } - return p -} - -// expandName expands ${ENV_VAR} expressions in a name. -// If the environment variable does not exist then it will be replaced -// with an empty string. Malformed expressions like "${ENV_VAR" will -// be reported as error. -func expandName(name string) (string, error) { - return expand(name, []string{}, "${", "}", make(map[string]string)) -} - -// Interprets a byte buffer either as an ISO-8859-1 or UTF-8 encoded string. -// For ISO-8859-1 we can convert each byte straight into a rune since the -// first 256 unicode code points cover ISO-8859-1. -func convert(buf []byte, enc Encoding) string { - switch enc { - case utf8Default, UTF8: - return string(buf) - case ISO_8859_1: - runes := make([]rune, len(buf)) - for i, b := range buf { - runes[i] = rune(b) - } - return string(runes) - default: - ErrorHandler(fmt.Errorf("unsupported encoding %v", enc)) - } - panic("ErrorHandler should exit") -} diff --git a/vendor/github.com/magiconair/properties/parser.go b/vendor/github.com/magiconair/properties/parser.go deleted file mode 100644 index fccfd39..0000000 --- a/vendor/github.com/magiconair/properties/parser.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2013-2022 Frank Schroeder. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package properties - -import ( - "fmt" - "runtime" -) - -type parser struct { - lex *lexer -} - -func parse(input string) (properties *Properties, err error) { - p := &parser{lex: lex(input)} - defer p.recover(&err) - - properties = NewProperties() - key := "" - comments := []string{} - - for { - token := p.expectOneOf(itemComment, itemKey, itemEOF) - switch token.typ { - case itemEOF: - goto done - case itemComment: - comments = append(comments, token.val) - continue - case itemKey: - key = token.val - if _, ok := properties.m[key]; !ok { - properties.k = append(properties.k, key) - } - } - - token = p.expectOneOf(itemValue, itemEOF) - if len(comments) > 0 { - properties.c[key] = comments - comments = []string{} - } - switch token.typ { - case itemEOF: - properties.m[key] = "" - goto done - case itemValue: - properties.m[key] = token.val - } - } - -done: - return properties, nil -} - -func (p *parser) errorf(format string, args ...interface{}) { - format = fmt.Sprintf("properties: Line %d: %s", p.lex.lineNumber(), format) - panic(fmt.Errorf(format, args...)) -} - -func (p *parser) expectOneOf(expected ...itemType) (token item) { - token = p.lex.nextItem() - for _, v := range expected { - if token.typ == v { - return token - } - } - p.unexpected(token) - panic("unexpected token") -} - -func (p *parser) unexpected(token item) { - p.errorf(token.String()) -} - -// recover is the handler that turns panics into returns from the top level of Parse. -func (p *parser) recover(errp *error) { - e := recover() - if e != nil { - if _, ok := e.(runtime.Error); ok { - panic(e) - } - *errp = e.(error) - } -} diff --git a/vendor/github.com/magiconair/properties/properties.go b/vendor/github.com/magiconair/properties/properties.go deleted file mode 100644 index fb2f7b4..0000000 --- a/vendor/github.com/magiconair/properties/properties.go +++ /dev/null @@ -1,848 +0,0 @@ -// Copyright 2013-2022 Frank Schroeder. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package properties - -// BUG(frank): Set() does not check for invalid unicode literals since this is currently handled by the lexer. -// BUG(frank): Write() does not allow to configure the newline character. Therefore, on Windows LF is used. - -import ( - "bytes" - "fmt" - "io" - "log" - "os" - "regexp" - "sort" - "strconv" - "strings" - "time" - "unicode/utf8" -) - -const maxExpansionDepth = 64 - -// ErrorHandlerFunc defines the type of function which handles failures -// of the MustXXX() functions. An error handler function must exit -// the application after handling the error. -type ErrorHandlerFunc func(error) - -// ErrorHandler is the function which handles failures of the MustXXX() -// functions. The default is LogFatalHandler. -var ErrorHandler ErrorHandlerFunc = LogFatalHandler - -// LogHandlerFunc defines the function prototype for logging errors. -type LogHandlerFunc func(fmt string, args ...interface{}) - -// LogPrintf defines a log handler which uses log.Printf. -var LogPrintf LogHandlerFunc = log.Printf - -// LogFatalHandler handles the error by logging a fatal error and exiting. -func LogFatalHandler(err error) { - log.Fatal(err) -} - -// PanicHandler handles the error by panicking. -func PanicHandler(err error) { - panic(err) -} - -// ----------------------------------------------------------------------------- - -// A Properties contains the key/value pairs from the properties input. -// All values are stored in unexpanded form and are expanded at runtime -type Properties struct { - // Pre-/Postfix for property expansion. - Prefix string - Postfix string - - // DisableExpansion controls the expansion of properties on Get() - // and the check for circular references on Set(). When set to - // true Properties behaves like a simple key/value store and does - // not check for circular references on Get() or on Set(). - DisableExpansion bool - - // Stores the key/value pairs - m map[string]string - - // Stores the comments per key. - c map[string][]string - - // Stores the keys in order of appearance. - k []string - - // WriteSeparator specifies the separator of key and value while writing the properties. - WriteSeparator string -} - -// NewProperties creates a new Properties struct with the default -// configuration for "${key}" expressions. -func NewProperties() *Properties { - return &Properties{ - Prefix: "${", - Postfix: "}", - m: map[string]string{}, - c: map[string][]string{}, - k: []string{}, - } -} - -// Load reads a buffer into the given Properties struct. -func (p *Properties) Load(buf []byte, enc Encoding) error { - l := &Loader{Encoding: enc, DisableExpansion: p.DisableExpansion} - newProperties, err := l.LoadBytes(buf) - if err != nil { - return err - } - p.Merge(newProperties) - return nil -} - -// Get returns the expanded value for the given key if exists. -// Otherwise, ok is false. -func (p *Properties) Get(key string) (value string, ok bool) { - v, ok := p.m[key] - if p.DisableExpansion { - return v, ok - } - if !ok { - return "", false - } - - expanded, err := p.expand(key, v) - - // we guarantee that the expanded value is free of - // circular references and malformed expressions - // so we panic if we still get an error here. - if err != nil { - ErrorHandler(err) - } - - return expanded, true -} - -// MustGet returns the expanded value for the given key if exists. -// Otherwise, it panics. -func (p *Properties) MustGet(key string) string { - if v, ok := p.Get(key); ok { - return v - } - ErrorHandler(invalidKeyError(key)) - panic("ErrorHandler should exit") -} - -// ---------------------------------------------------------------------------- - -// ClearComments removes the comments for all keys. -func (p *Properties) ClearComments() { - p.c = map[string][]string{} -} - -// ---------------------------------------------------------------------------- - -// GetComment returns the last comment before the given key or an empty string. -func (p *Properties) GetComment(key string) string { - comments, ok := p.c[key] - if !ok || len(comments) == 0 { - return "" - } - return comments[len(comments)-1] -} - -// ---------------------------------------------------------------------------- - -// GetComments returns all comments that appeared before the given key or nil. -func (p *Properties) GetComments(key string) []string { - if comments, ok := p.c[key]; ok { - return comments - } - return nil -} - -// ---------------------------------------------------------------------------- - -// SetComment sets the comment for the key. -func (p *Properties) SetComment(key, comment string) { - p.c[key] = []string{comment} -} - -// ---------------------------------------------------------------------------- - -// SetComments sets the comments for the key. If the comments are nil then -// all comments for this key are deleted. -func (p *Properties) SetComments(key string, comments []string) { - if comments == nil { - delete(p.c, key) - return - } - p.c[key] = comments -} - -// ---------------------------------------------------------------------------- - -// GetBool checks if the expanded value is one of '1', 'yes', -// 'true' or 'on' if the key exists. The comparison is case-insensitive. -// If the key does not exist the default value is returned. -func (p *Properties) GetBool(key string, def bool) bool { - v, err := p.getBool(key) - if err != nil { - return def - } - return v -} - -// MustGetBool checks if the expanded value is one of '1', 'yes', -// 'true' or 'on' if the key exists. The comparison is case-insensitive. -// If the key does not exist the function panics. -func (p *Properties) MustGetBool(key string) bool { - v, err := p.getBool(key) - if err != nil { - ErrorHandler(err) - } - return v -} - -func (p *Properties) getBool(key string) (value bool, err error) { - if v, ok := p.Get(key); ok { - return boolVal(v), nil - } - return false, invalidKeyError(key) -} - -func boolVal(v string) bool { - v = strings.ToLower(v) - return v == "1" || v == "true" || v == "yes" || v == "on" -} - -// ---------------------------------------------------------------------------- - -// GetDuration parses the expanded value as an time.Duration (in ns) if the -// key exists. If key does not exist or the value cannot be parsed the default -// value is returned. In almost all cases you want to use GetParsedDuration(). -func (p *Properties) GetDuration(key string, def time.Duration) time.Duration { - v, err := p.getInt64(key) - if err != nil { - return def - } - return time.Duration(v) -} - -// MustGetDuration parses the expanded value as an time.Duration (in ns) if -// the key exists. If key does not exist or the value cannot be parsed the -// function panics. In almost all cases you want to use MustGetParsedDuration(). -func (p *Properties) MustGetDuration(key string) time.Duration { - v, err := p.getInt64(key) - if err != nil { - ErrorHandler(err) - } - return time.Duration(v) -} - -// ---------------------------------------------------------------------------- - -// GetParsedDuration parses the expanded value with time.ParseDuration() if the key exists. -// If key does not exist or the value cannot be parsed the default -// value is returned. -func (p *Properties) GetParsedDuration(key string, def time.Duration) time.Duration { - s, ok := p.Get(key) - if !ok { - return def - } - v, err := time.ParseDuration(s) - if err != nil { - return def - } - return v -} - -// MustGetParsedDuration parses the expanded value with time.ParseDuration() if the key exists. -// If key does not exist or the value cannot be parsed the function panics. -func (p *Properties) MustGetParsedDuration(key string) time.Duration { - s, ok := p.Get(key) - if !ok { - ErrorHandler(invalidKeyError(key)) - } - v, err := time.ParseDuration(s) - if err != nil { - ErrorHandler(err) - } - return v -} - -// ---------------------------------------------------------------------------- - -// GetFloat64 parses the expanded value as a float64 if the key exists. -// If key does not exist or the value cannot be parsed the default -// value is returned. -func (p *Properties) GetFloat64(key string, def float64) float64 { - v, err := p.getFloat64(key) - if err != nil { - return def - } - return v -} - -// MustGetFloat64 parses the expanded value as a float64 if the key exists. -// If key does not exist or the value cannot be parsed the function panics. -func (p *Properties) MustGetFloat64(key string) float64 { - v, err := p.getFloat64(key) - if err != nil { - ErrorHandler(err) - } - return v -} - -func (p *Properties) getFloat64(key string) (value float64, err error) { - if v, ok := p.Get(key); ok { - value, err = strconv.ParseFloat(v, 64) - if err != nil { - return 0, err - } - return value, nil - } - return 0, invalidKeyError(key) -} - -// ---------------------------------------------------------------------------- - -// GetInt parses the expanded value as an int if the key exists. -// If key does not exist or the value cannot be parsed the default -// value is returned. If the value does not fit into an int the -// function panics with an out of range error. -func (p *Properties) GetInt(key string, def int) int { - v, err := p.getInt64(key) - if err != nil { - return def - } - return intRangeCheck(key, v) -} - -// MustGetInt parses the expanded value as an int if the key exists. -// If key does not exist or the value cannot be parsed the function panics. -// If the value does not fit into an int the function panics with -// an out of range error. -func (p *Properties) MustGetInt(key string) int { - v, err := p.getInt64(key) - if err != nil { - ErrorHandler(err) - } - return intRangeCheck(key, v) -} - -// ---------------------------------------------------------------------------- - -// GetInt64 parses the expanded value as an int64 if the key exists. -// If key does not exist or the value cannot be parsed the default -// value is returned. -func (p *Properties) GetInt64(key string, def int64) int64 { - v, err := p.getInt64(key) - if err != nil { - return def - } - return v -} - -// MustGetInt64 parses the expanded value as an int if the key exists. -// If key does not exist or the value cannot be parsed the function panics. -func (p *Properties) MustGetInt64(key string) int64 { - v, err := p.getInt64(key) - if err != nil { - ErrorHandler(err) - } - return v -} - -func (p *Properties) getInt64(key string) (value int64, err error) { - if v, ok := p.Get(key); ok { - value, err = strconv.ParseInt(v, 10, 64) - if err != nil { - return 0, err - } - return value, nil - } - return 0, invalidKeyError(key) -} - -// ---------------------------------------------------------------------------- - -// GetUint parses the expanded value as an uint if the key exists. -// If key does not exist or the value cannot be parsed the default -// value is returned. If the value does not fit into an int the -// function panics with an out of range error. -func (p *Properties) GetUint(key string, def uint) uint { - v, err := p.getUint64(key) - if err != nil { - return def - } - return uintRangeCheck(key, v) -} - -// MustGetUint parses the expanded value as an int if the key exists. -// If key does not exist or the value cannot be parsed the function panics. -// If the value does not fit into an int the function panics with -// an out of range error. -func (p *Properties) MustGetUint(key string) uint { - v, err := p.getUint64(key) - if err != nil { - ErrorHandler(err) - } - return uintRangeCheck(key, v) -} - -// ---------------------------------------------------------------------------- - -// GetUint64 parses the expanded value as an uint64 if the key exists. -// If key does not exist or the value cannot be parsed the default -// value is returned. -func (p *Properties) GetUint64(key string, def uint64) uint64 { - v, err := p.getUint64(key) - if err != nil { - return def - } - return v -} - -// MustGetUint64 parses the expanded value as an int if the key exists. -// If key does not exist or the value cannot be parsed the function panics. -func (p *Properties) MustGetUint64(key string) uint64 { - v, err := p.getUint64(key) - if err != nil { - ErrorHandler(err) - } - return v -} - -func (p *Properties) getUint64(key string) (value uint64, err error) { - if v, ok := p.Get(key); ok { - value, err = strconv.ParseUint(v, 10, 64) - if err != nil { - return 0, err - } - return value, nil - } - return 0, invalidKeyError(key) -} - -// ---------------------------------------------------------------------------- - -// GetString returns the expanded value for the given key if exists or -// the default value otherwise. -func (p *Properties) GetString(key, def string) string { - if v, ok := p.Get(key); ok { - return v - } - return def -} - -// MustGetString returns the expanded value for the given key if exists or -// panics otherwise. -func (p *Properties) MustGetString(key string) string { - if v, ok := p.Get(key); ok { - return v - } - ErrorHandler(invalidKeyError(key)) - panic("ErrorHandler should exit") -} - -// ---------------------------------------------------------------------------- - -// Filter returns a new properties object which contains all properties -// for which the key matches the pattern. -func (p *Properties) Filter(pattern string) (*Properties, error) { - re, err := regexp.Compile(pattern) - if err != nil { - return nil, err - } - - return p.FilterRegexp(re), nil -} - -// FilterRegexp returns a new properties object which contains all properties -// for which the key matches the regular expression. -func (p *Properties) FilterRegexp(re *regexp.Regexp) *Properties { - pp := NewProperties() - for _, k := range p.k { - if re.MatchString(k) { - // TODO(fs): we are ignoring the error which flags a circular reference. - // TODO(fs): since we are just copying a subset of keys this cannot happen (fingers crossed) - pp.Set(k, p.m[k]) - } - } - return pp -} - -// FilterPrefix returns a new properties object with a subset of all keys -// with the given prefix. -func (p *Properties) FilterPrefix(prefix string) *Properties { - pp := NewProperties() - for _, k := range p.k { - if strings.HasPrefix(k, prefix) { - // TODO(fs): we are ignoring the error which flags a circular reference. - // TODO(fs): since we are just copying a subset of keys this cannot happen (fingers crossed) - pp.Set(k, p.m[k]) - } - } - return pp -} - -// FilterStripPrefix returns a new properties object with a subset of all keys -// with the given prefix and the prefix removed from the keys. -func (p *Properties) FilterStripPrefix(prefix string) *Properties { - pp := NewProperties() - n := len(prefix) - for _, k := range p.k { - if len(k) > len(prefix) && strings.HasPrefix(k, prefix) { - // TODO(fs): we are ignoring the error which flags a circular reference. - // TODO(fs): since we are modifying keys I am not entirely sure whether we can create a circular reference - // TODO(fs): this function should probably return an error but the signature is fixed - pp.Set(k[n:], p.m[k]) - } - } - return pp -} - -// Len returns the number of keys. -func (p *Properties) Len() int { - return len(p.m) -} - -// Keys returns all keys in the same order as in the input. -func (p *Properties) Keys() []string { - keys := make([]string, len(p.k)) - copy(keys, p.k) - return keys -} - -// Set sets the property key to the corresponding value. -// If a value for key existed before then ok is true and prev -// contains the previous value. If the value contains a -// circular reference or a malformed expression then -// an error is returned. -// An empty key is silently ignored. -func (p *Properties) Set(key, value string) (prev string, ok bool, err error) { - if key == "" { - return "", false, nil - } - - // if expansion is disabled we allow circular references - if p.DisableExpansion { - prev, ok = p.Get(key) - p.m[key] = value - if !ok { - p.k = append(p.k, key) - } - return prev, ok, nil - } - - // to check for a circular reference we temporarily need - // to set the new value. If there is an error then revert - // to the previous state. Only if all tests are successful - // then we add the key to the p.k list. - prev, ok = p.Get(key) - p.m[key] = value - - // now check for a circular reference - _, err = p.expand(key, value) - if err != nil { - - // revert to the previous state - if ok { - p.m[key] = prev - } else { - delete(p.m, key) - } - - return "", false, err - } - - if !ok { - p.k = append(p.k, key) - } - - return prev, ok, nil -} - -// SetValue sets property key to the default string value -// as defined by fmt.Sprintf("%v"). -func (p *Properties) SetValue(key string, value interface{}) error { - _, _, err := p.Set(key, fmt.Sprintf("%v", value)) - return err -} - -// MustSet sets the property key to the corresponding value. -// If a value for key existed before then ok is true and prev -// contains the previous value. An empty key is silently ignored. -func (p *Properties) MustSet(key, value string) (prev string, ok bool) { - prev, ok, err := p.Set(key, value) - if err != nil { - ErrorHandler(err) - } - return prev, ok -} - -// String returns a string of all expanded 'key = value' pairs. -func (p *Properties) String() string { - var s string - for _, key := range p.k { - value, _ := p.Get(key) - s = fmt.Sprintf("%s%s = %s\n", s, key, value) - } - return s -} - -// Sort sorts the properties keys in alphabetical order. -// This is helpfully before writing the properties. -func (p *Properties) Sort() { - sort.Strings(p.k) -} - -// Write writes all unexpanded 'key = value' pairs to the given writer. -// Write returns the number of bytes written and any write error encountered. -func (p *Properties) Write(w io.Writer, enc Encoding) (n int, err error) { - return p.WriteComment(w, "", enc) -} - -// WriteComment writes all unexpanced 'key = value' pairs to the given writer. -// If prefix is not empty then comments are written with a blank line and the -// given prefix. The prefix should be either "# " or "! " to be compatible with -// the properties file format. Otherwise, the properties parser will not be -// able to read the file back in. It returns the number of bytes written and -// any write error encountered. -func (p *Properties) WriteComment(w io.Writer, prefix string, enc Encoding) (n int, err error) { - var x int - - for _, key := range p.k { - value := p.m[key] - - if prefix != "" { - if comments, ok := p.c[key]; ok { - // don't print comments if they are all empty - allEmpty := true - for _, c := range comments { - if c != "" { - allEmpty = false - break - } - } - - if !allEmpty { - // add a blank line between entries but not at the top - if len(comments) > 0 && n > 0 { - x, err = fmt.Fprintln(w) - if err != nil { - return - } - n += x - } - - for _, c := range comments { - x, err = fmt.Fprintf(w, "%s%s\n", prefix, c) - if err != nil { - return - } - n += x - } - } - } - } - sep := " = " - if p.WriteSeparator != "" { - sep = p.WriteSeparator - } - x, err = fmt.Fprintf(w, "%s%s%s\n", encode(key, " :", enc), sep, encode(value, "", enc)) - if err != nil { - return - } - n += x - } - return -} - -// Map returns a copy of the properties as a map. -func (p *Properties) Map() map[string]string { - m := make(map[string]string) - for k, v := range p.m { - m[k] = v - } - return m -} - -// FilterFunc returns a copy of the properties which includes the values which passed all filters. -func (p *Properties) FilterFunc(filters ...func(k, v string) bool) *Properties { - pp := NewProperties() -outer: - for k, v := range p.m { - for _, f := range filters { - if !f(k, v) { - continue outer - } - pp.Set(k, v) - } - } - return pp -} - -// ---------------------------------------------------------------------------- - -// Delete removes the key and its comments. -func (p *Properties) Delete(key string) { - delete(p.m, key) - delete(p.c, key) - newKeys := []string{} - for _, k := range p.k { - if k != key { - newKeys = append(newKeys, k) - } - } - p.k = newKeys -} - -// Merge merges properties, comments and keys from other *Properties into p -func (p *Properties) Merge(other *Properties) { - for _, k := range other.k { - if _, ok := p.m[k]; !ok { - p.k = append(p.k, k) - } - } - for k, v := range other.m { - p.m[k] = v - } - for k, v := range other.c { - p.c[k] = v - } -} - -// ---------------------------------------------------------------------------- - -// check expands all values and returns an error if a circular reference or -// a malformed expression was found. -func (p *Properties) check() error { - for key, value := range p.m { - if _, err := p.expand(key, value); err != nil { - return err - } - } - return nil -} - -func (p *Properties) expand(key, input string) (string, error) { - // no pre/postfix -> nothing to expand - if p.Prefix == "" && p.Postfix == "" { - return input, nil - } - - return expand(input, []string{key}, p.Prefix, p.Postfix, p.m) -} - -// expand recursively expands expressions of '(prefix)key(postfix)' to their corresponding values. -// The function keeps track of the keys that were already expanded and stops if it -// detects a circular reference or a malformed expression of the form '(prefix)key'. -func expand(s string, keys []string, prefix, postfix string, values map[string]string) (string, error) { - if len(keys) > maxExpansionDepth { - return "", fmt.Errorf("expansion too deep") - } - - for { - start := strings.Index(s, prefix) - if start == -1 { - return s, nil - } - - keyStart := start + len(prefix) - keyLen := strings.Index(s[keyStart:], postfix) - if keyLen == -1 { - return "", fmt.Errorf("malformed expression") - } - - end := keyStart + keyLen + len(postfix) - 1 - key := s[keyStart : keyStart+keyLen] - - // fmt.Printf("s:%q pp:%q start:%d end:%d keyStart:%d keyLen:%d key:%q\n", s, prefix + "..." + postfix, start, end, keyStart, keyLen, key) - - for _, k := range keys { - if key == k { - var b bytes.Buffer - b.WriteString("circular reference in:\n") - for _, k1 := range keys { - fmt.Fprintf(&b, "%s=%s\n", k1, values[k1]) - } - return "", fmt.Errorf(b.String()) - } - } - - val, ok := values[key] - if !ok { - val = os.Getenv(key) - } - new_val, err := expand(val, append(keys, key), prefix, postfix, values) - if err != nil { - return "", err - } - s = s[:start] + new_val + s[end+1:] - } -} - -// encode encodes a UTF-8 string to ISO-8859-1 and escapes some characters. -func encode(s string, special string, enc Encoding) string { - switch enc { - case UTF8: - return encodeUtf8(s, special) - case ISO_8859_1: - return encodeIso(s, special) - default: - panic(fmt.Sprintf("unsupported encoding %v", enc)) - } -} - -func encodeUtf8(s string, special string) string { - v := "" - for pos := 0; pos < len(s); { - r, w := utf8.DecodeRuneInString(s[pos:]) - pos += w - v += escape(r, special) - } - return v -} - -func encodeIso(s string, special string) string { - var r rune - var w int - var v string - for pos := 0; pos < len(s); { - switch r, w = utf8.DecodeRuneInString(s[pos:]); { - case r < 1<<8: // single byte rune -> escape special chars only - v += escape(r, special) - case r < 1<<16: // two byte rune -> unicode literal - v += fmt.Sprintf("\\u%04x", r) - default: // more than two bytes per rune -> can't encode - v += "?" - } - pos += w - } - return v -} - -func escape(r rune, special string) string { - switch r { - case '\f': - return "\\f" - case '\n': - return "\\n" - case '\r': - return "\\r" - case '\t': - return "\\t" - case '\\': - return "\\\\" - default: - if strings.ContainsRune(special, r) { - return "\\" + string(r) - } - return string(r) - } -} - -func invalidKeyError(key string) error { - return fmt.Errorf("unknown property: %s", key) -} diff --git a/vendor/github.com/magiconair/properties/rangecheck.go b/vendor/github.com/magiconair/properties/rangecheck.go deleted file mode 100644 index dbd60b3..0000000 --- a/vendor/github.com/magiconair/properties/rangecheck.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2013-2022 Frank Schroeder. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package properties - -import ( - "fmt" - "math" -) - -// make this a var to overwrite it in a test -var is32Bit = ^uint(0) == math.MaxUint32 - -// intRangeCheck checks if the value fits into the int type and -// panics if it does not. -func intRangeCheck(key string, v int64) int { - if is32Bit && (v < math.MinInt32 || v > math.MaxInt32) { - panic(fmt.Sprintf("Value %d for key %s out of range", v, key)) - } - return int(v) -} - -// uintRangeCheck checks if the value fits into the uint type and -// panics if it does not. -func uintRangeCheck(key string, v uint64) uint { - if is32Bit && v > math.MaxUint32 { - panic(fmt.Sprintf("Value %d for key %s out of range", v, key)) - } - return uint(v) -} diff --git a/vendor/github.com/mattn/go-colorable/LICENSE b/vendor/github.com/mattn/go-colorable/LICENSE deleted file mode 100644 index 91b5cef..0000000 --- a/vendor/github.com/mattn/go-colorable/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Yasuhiro Matsumoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/mattn/go-colorable/README.md b/vendor/github.com/mattn/go-colorable/README.md deleted file mode 100644 index ca04837..0000000 --- a/vendor/github.com/mattn/go-colorable/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# go-colorable - -[![Build Status](https://github.com/mattn/go-colorable/workflows/test/badge.svg)](https://github.com/mattn/go-colorable/actions?query=workflow%3Atest) -[![Codecov](https://codecov.io/gh/mattn/go-colorable/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-colorable) -[![GoDoc](https://godoc.org/github.com/mattn/go-colorable?status.svg)](http://godoc.org/github.com/mattn/go-colorable) -[![Go Report Card](https://goreportcard.com/badge/mattn/go-colorable)](https://goreportcard.com/report/mattn/go-colorable) - -Colorable writer for windows. - -For example, most of logger packages doesn't show colors on windows. (I know we can do it with ansicon. But I don't want.) -This package is possible to handle escape sequence for ansi color on windows. - -## Too Bad! - -![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/bad.png) - - -## So Good! - -![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/good.png) - -## Usage - -```go -logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true}) -logrus.SetOutput(colorable.NewColorableStdout()) - -logrus.Info("succeeded") -logrus.Warn("not correct") -logrus.Error("something error") -logrus.Fatal("panic") -``` - -You can compile above code on non-windows OSs. - -## Installation - -``` -$ go get github.com/mattn/go-colorable -``` - -# License - -MIT - -# Author - -Yasuhiro Matsumoto (a.k.a mattn) diff --git a/vendor/github.com/mattn/go-colorable/colorable_appengine.go b/vendor/github.com/mattn/go-colorable/colorable_appengine.go deleted file mode 100644 index 416d1bb..0000000 --- a/vendor/github.com/mattn/go-colorable/colorable_appengine.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build appengine -// +build appengine - -package colorable - -import ( - "io" - "os" - - _ "github.com/mattn/go-isatty" -) - -// NewColorable returns new instance of Writer which handles escape sequence. -func NewColorable(file *os.File) io.Writer { - if file == nil { - panic("nil passed instead of *os.File to NewColorable()") - } - - return file -} - -// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. -func NewColorableStdout() io.Writer { - return os.Stdout -} - -// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. -func NewColorableStderr() io.Writer { - return os.Stderr -} - -// EnableColorsStdout enable colors if possible. -func EnableColorsStdout(enabled *bool) func() { - if enabled != nil { - *enabled = true - } - return func() {} -} diff --git a/vendor/github.com/mattn/go-colorable/colorable_others.go b/vendor/github.com/mattn/go-colorable/colorable_others.go deleted file mode 100644 index 766d946..0000000 --- a/vendor/github.com/mattn/go-colorable/colorable_others.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build !windows && !appengine -// +build !windows,!appengine - -package colorable - -import ( - "io" - "os" - - _ "github.com/mattn/go-isatty" -) - -// NewColorable returns new instance of Writer which handles escape sequence. -func NewColorable(file *os.File) io.Writer { - if file == nil { - panic("nil passed instead of *os.File to NewColorable()") - } - - return file -} - -// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. -func NewColorableStdout() io.Writer { - return os.Stdout -} - -// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. -func NewColorableStderr() io.Writer { - return os.Stderr -} - -// EnableColorsStdout enable colors if possible. -func EnableColorsStdout(enabled *bool) func() { - if enabled != nil { - *enabled = true - } - return func() {} -} diff --git a/vendor/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go deleted file mode 100644 index 1846ad5..0000000 --- a/vendor/github.com/mattn/go-colorable/colorable_windows.go +++ /dev/null @@ -1,1047 +0,0 @@ -//go:build windows && !appengine -// +build windows,!appengine - -package colorable - -import ( - "bytes" - "io" - "math" - "os" - "strconv" - "strings" - "sync" - "syscall" - "unsafe" - - "github.com/mattn/go-isatty" -) - -const ( - foregroundBlue = 0x1 - foregroundGreen = 0x2 - foregroundRed = 0x4 - foregroundIntensity = 0x8 - foregroundMask = (foregroundRed | foregroundBlue | foregroundGreen | foregroundIntensity) - backgroundBlue = 0x10 - backgroundGreen = 0x20 - backgroundRed = 0x40 - backgroundIntensity = 0x80 - backgroundMask = (backgroundRed | backgroundBlue | backgroundGreen | backgroundIntensity) - commonLvbUnderscore = 0x8000 - - cENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4 -) - -const ( - genericRead = 0x80000000 - genericWrite = 0x40000000 -) - -const ( - consoleTextmodeBuffer = 0x1 -) - -type wchar uint16 -type short int16 -type dword uint32 -type word uint16 - -type coord struct { - x short - y short -} - -type smallRect struct { - left short - top short - right short - bottom short -} - -type consoleScreenBufferInfo struct { - size coord - cursorPosition coord - attributes word - window smallRect - maximumWindowSize coord -} - -type consoleCursorInfo struct { - size dword - visible int32 -} - -var ( - kernel32 = syscall.NewLazyDLL("kernel32.dll") - procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo") - procSetConsoleTextAttribute = kernel32.NewProc("SetConsoleTextAttribute") - procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition") - procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW") - procFillConsoleOutputAttribute = kernel32.NewProc("FillConsoleOutputAttribute") - procGetConsoleCursorInfo = kernel32.NewProc("GetConsoleCursorInfo") - procSetConsoleCursorInfo = kernel32.NewProc("SetConsoleCursorInfo") - procSetConsoleTitle = kernel32.NewProc("SetConsoleTitleW") - procGetConsoleMode = kernel32.NewProc("GetConsoleMode") - procSetConsoleMode = kernel32.NewProc("SetConsoleMode") - procCreateConsoleScreenBuffer = kernel32.NewProc("CreateConsoleScreenBuffer") -) - -// Writer provides colorable Writer to the console -type Writer struct { - out io.Writer - handle syscall.Handle - althandle syscall.Handle - oldattr word - oldpos coord - rest bytes.Buffer - mutex sync.Mutex -} - -// NewColorable returns new instance of Writer which handles escape sequence from File. -func NewColorable(file *os.File) io.Writer { - if file == nil { - panic("nil passed instead of *os.File to NewColorable()") - } - - if isatty.IsTerminal(file.Fd()) { - var mode uint32 - if r, _, _ := procGetConsoleMode.Call(file.Fd(), uintptr(unsafe.Pointer(&mode))); r != 0 && mode&cENABLE_VIRTUAL_TERMINAL_PROCESSING != 0 { - return file - } - var csbi consoleScreenBufferInfo - handle := syscall.Handle(file.Fd()) - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - return &Writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}} - } - return file -} - -// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. -func NewColorableStdout() io.Writer { - return NewColorable(os.Stdout) -} - -// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. -func NewColorableStderr() io.Writer { - return NewColorable(os.Stderr) -} - -var color256 = map[int]int{ - 0: 0x000000, - 1: 0x800000, - 2: 0x008000, - 3: 0x808000, - 4: 0x000080, - 5: 0x800080, - 6: 0x008080, - 7: 0xc0c0c0, - 8: 0x808080, - 9: 0xff0000, - 10: 0x00ff00, - 11: 0xffff00, - 12: 0x0000ff, - 13: 0xff00ff, - 14: 0x00ffff, - 15: 0xffffff, - 16: 0x000000, - 17: 0x00005f, - 18: 0x000087, - 19: 0x0000af, - 20: 0x0000d7, - 21: 0x0000ff, - 22: 0x005f00, - 23: 0x005f5f, - 24: 0x005f87, - 25: 0x005faf, - 26: 0x005fd7, - 27: 0x005fff, - 28: 0x008700, - 29: 0x00875f, - 30: 0x008787, - 31: 0x0087af, - 32: 0x0087d7, - 33: 0x0087ff, - 34: 0x00af00, - 35: 0x00af5f, - 36: 0x00af87, - 37: 0x00afaf, - 38: 0x00afd7, - 39: 0x00afff, - 40: 0x00d700, - 41: 0x00d75f, - 42: 0x00d787, - 43: 0x00d7af, - 44: 0x00d7d7, - 45: 0x00d7ff, - 46: 0x00ff00, - 47: 0x00ff5f, - 48: 0x00ff87, - 49: 0x00ffaf, - 50: 0x00ffd7, - 51: 0x00ffff, - 52: 0x5f0000, - 53: 0x5f005f, - 54: 0x5f0087, - 55: 0x5f00af, - 56: 0x5f00d7, - 57: 0x5f00ff, - 58: 0x5f5f00, - 59: 0x5f5f5f, - 60: 0x5f5f87, - 61: 0x5f5faf, - 62: 0x5f5fd7, - 63: 0x5f5fff, - 64: 0x5f8700, - 65: 0x5f875f, - 66: 0x5f8787, - 67: 0x5f87af, - 68: 0x5f87d7, - 69: 0x5f87ff, - 70: 0x5faf00, - 71: 0x5faf5f, - 72: 0x5faf87, - 73: 0x5fafaf, - 74: 0x5fafd7, - 75: 0x5fafff, - 76: 0x5fd700, - 77: 0x5fd75f, - 78: 0x5fd787, - 79: 0x5fd7af, - 80: 0x5fd7d7, - 81: 0x5fd7ff, - 82: 0x5fff00, - 83: 0x5fff5f, - 84: 0x5fff87, - 85: 0x5fffaf, - 86: 0x5fffd7, - 87: 0x5fffff, - 88: 0x870000, - 89: 0x87005f, - 90: 0x870087, - 91: 0x8700af, - 92: 0x8700d7, - 93: 0x8700ff, - 94: 0x875f00, - 95: 0x875f5f, - 96: 0x875f87, - 97: 0x875faf, - 98: 0x875fd7, - 99: 0x875fff, - 100: 0x878700, - 101: 0x87875f, - 102: 0x878787, - 103: 0x8787af, - 104: 0x8787d7, - 105: 0x8787ff, - 106: 0x87af00, - 107: 0x87af5f, - 108: 0x87af87, - 109: 0x87afaf, - 110: 0x87afd7, - 111: 0x87afff, - 112: 0x87d700, - 113: 0x87d75f, - 114: 0x87d787, - 115: 0x87d7af, - 116: 0x87d7d7, - 117: 0x87d7ff, - 118: 0x87ff00, - 119: 0x87ff5f, - 120: 0x87ff87, - 121: 0x87ffaf, - 122: 0x87ffd7, - 123: 0x87ffff, - 124: 0xaf0000, - 125: 0xaf005f, - 126: 0xaf0087, - 127: 0xaf00af, - 128: 0xaf00d7, - 129: 0xaf00ff, - 130: 0xaf5f00, - 131: 0xaf5f5f, - 132: 0xaf5f87, - 133: 0xaf5faf, - 134: 0xaf5fd7, - 135: 0xaf5fff, - 136: 0xaf8700, - 137: 0xaf875f, - 138: 0xaf8787, - 139: 0xaf87af, - 140: 0xaf87d7, - 141: 0xaf87ff, - 142: 0xafaf00, - 143: 0xafaf5f, - 144: 0xafaf87, - 145: 0xafafaf, - 146: 0xafafd7, - 147: 0xafafff, - 148: 0xafd700, - 149: 0xafd75f, - 150: 0xafd787, - 151: 0xafd7af, - 152: 0xafd7d7, - 153: 0xafd7ff, - 154: 0xafff00, - 155: 0xafff5f, - 156: 0xafff87, - 157: 0xafffaf, - 158: 0xafffd7, - 159: 0xafffff, - 160: 0xd70000, - 161: 0xd7005f, - 162: 0xd70087, - 163: 0xd700af, - 164: 0xd700d7, - 165: 0xd700ff, - 166: 0xd75f00, - 167: 0xd75f5f, - 168: 0xd75f87, - 169: 0xd75faf, - 170: 0xd75fd7, - 171: 0xd75fff, - 172: 0xd78700, - 173: 0xd7875f, - 174: 0xd78787, - 175: 0xd787af, - 176: 0xd787d7, - 177: 0xd787ff, - 178: 0xd7af00, - 179: 0xd7af5f, - 180: 0xd7af87, - 181: 0xd7afaf, - 182: 0xd7afd7, - 183: 0xd7afff, - 184: 0xd7d700, - 185: 0xd7d75f, - 186: 0xd7d787, - 187: 0xd7d7af, - 188: 0xd7d7d7, - 189: 0xd7d7ff, - 190: 0xd7ff00, - 191: 0xd7ff5f, - 192: 0xd7ff87, - 193: 0xd7ffaf, - 194: 0xd7ffd7, - 195: 0xd7ffff, - 196: 0xff0000, - 197: 0xff005f, - 198: 0xff0087, - 199: 0xff00af, - 200: 0xff00d7, - 201: 0xff00ff, - 202: 0xff5f00, - 203: 0xff5f5f, - 204: 0xff5f87, - 205: 0xff5faf, - 206: 0xff5fd7, - 207: 0xff5fff, - 208: 0xff8700, - 209: 0xff875f, - 210: 0xff8787, - 211: 0xff87af, - 212: 0xff87d7, - 213: 0xff87ff, - 214: 0xffaf00, - 215: 0xffaf5f, - 216: 0xffaf87, - 217: 0xffafaf, - 218: 0xffafd7, - 219: 0xffafff, - 220: 0xffd700, - 221: 0xffd75f, - 222: 0xffd787, - 223: 0xffd7af, - 224: 0xffd7d7, - 225: 0xffd7ff, - 226: 0xffff00, - 227: 0xffff5f, - 228: 0xffff87, - 229: 0xffffaf, - 230: 0xffffd7, - 231: 0xffffff, - 232: 0x080808, - 233: 0x121212, - 234: 0x1c1c1c, - 235: 0x262626, - 236: 0x303030, - 237: 0x3a3a3a, - 238: 0x444444, - 239: 0x4e4e4e, - 240: 0x585858, - 241: 0x626262, - 242: 0x6c6c6c, - 243: 0x767676, - 244: 0x808080, - 245: 0x8a8a8a, - 246: 0x949494, - 247: 0x9e9e9e, - 248: 0xa8a8a8, - 249: 0xb2b2b2, - 250: 0xbcbcbc, - 251: 0xc6c6c6, - 252: 0xd0d0d0, - 253: 0xdadada, - 254: 0xe4e4e4, - 255: 0xeeeeee, -} - -// `\033]0;TITLESTR\007` -func doTitleSequence(er *bytes.Reader) error { - var c byte - var err error - - c, err = er.ReadByte() - if err != nil { - return err - } - if c != '0' && c != '2' { - return nil - } - c, err = er.ReadByte() - if err != nil { - return err - } - if c != ';' { - return nil - } - title := make([]byte, 0, 80) - for { - c, err = er.ReadByte() - if err != nil { - return err - } - if c == 0x07 || c == '\n' { - break - } - title = append(title, c) - } - if len(title) > 0 { - title8, err := syscall.UTF16PtrFromString(string(title)) - if err == nil { - procSetConsoleTitle.Call(uintptr(unsafe.Pointer(title8))) - } - } - return nil -} - -// returns Atoi(s) unless s == "" in which case it returns def -func atoiWithDefault(s string, def int) (int, error) { - if s == "" { - return def, nil - } - return strconv.Atoi(s) -} - -// Write writes data on console -func (w *Writer) Write(data []byte) (n int, err error) { - w.mutex.Lock() - defer w.mutex.Unlock() - var csbi consoleScreenBufferInfo - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) - - handle := w.handle - - var er *bytes.Reader - if w.rest.Len() > 0 { - var rest bytes.Buffer - w.rest.WriteTo(&rest) - w.rest.Reset() - rest.Write(data) - er = bytes.NewReader(rest.Bytes()) - } else { - er = bytes.NewReader(data) - } - var plaintext bytes.Buffer -loop: - for { - c1, err := er.ReadByte() - if err != nil { - plaintext.WriteTo(w.out) - break loop - } - if c1 != 0x1b { - plaintext.WriteByte(c1) - continue - } - _, err = plaintext.WriteTo(w.out) - if err != nil { - break loop - } - c2, err := er.ReadByte() - if err != nil { - break loop - } - - switch c2 { - case '>': - continue - case ']': - w.rest.WriteByte(c1) - w.rest.WriteByte(c2) - er.WriteTo(&w.rest) - if bytes.IndexByte(w.rest.Bytes(), 0x07) == -1 { - break loop - } - er = bytes.NewReader(w.rest.Bytes()[2:]) - err := doTitleSequence(er) - if err != nil { - break loop - } - w.rest.Reset() - continue - // https://github.com/mattn/go-colorable/issues/27 - case '7': - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - w.oldpos = csbi.cursorPosition - continue - case '8': - procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&w.oldpos))) - continue - case 0x5b: - // execute part after switch - default: - continue - } - - w.rest.WriteByte(c1) - w.rest.WriteByte(c2) - er.WriteTo(&w.rest) - - var buf bytes.Buffer - var m byte - for i, c := range w.rest.Bytes()[2:] { - if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { - m = c - er = bytes.NewReader(w.rest.Bytes()[2+i+1:]) - w.rest.Reset() - break - } - buf.Write([]byte(string(c))) - } - if m == 0 { - break loop - } - - switch m { - case 'A': - n, err = atoiWithDefault(buf.String(), 1) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.y -= short(n) - procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'B': - n, err = atoiWithDefault(buf.String(), 1) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.y += short(n) - procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'C': - n, err = atoiWithDefault(buf.String(), 1) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.x += short(n) - procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'D': - n, err = atoiWithDefault(buf.String(), 1) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.x -= short(n) - if csbi.cursorPosition.x < 0 { - csbi.cursorPosition.x = 0 - } - procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'E': - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.x = 0 - csbi.cursorPosition.y += short(n) - procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'F': - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.x = 0 - csbi.cursorPosition.y -= short(n) - procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'G': - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - if n < 1 { - n = 1 - } - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - csbi.cursorPosition.x = short(n - 1) - procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'H', 'f': - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - if buf.Len() > 0 { - token := strings.Split(buf.String(), ";") - switch len(token) { - case 1: - n1, err := strconv.Atoi(token[0]) - if err != nil { - continue - } - csbi.cursorPosition.y = short(n1 - 1) - case 2: - n1, err := strconv.Atoi(token[0]) - if err != nil { - continue - } - n2, err := strconv.Atoi(token[1]) - if err != nil { - continue - } - csbi.cursorPosition.x = short(n2 - 1) - csbi.cursorPosition.y = short(n1 - 1) - } - } else { - csbi.cursorPosition.y = 0 - } - procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'J': - n := 0 - if buf.Len() > 0 { - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - } - var count, written dword - var cursor coord - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - switch n { - case 0: - cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} - count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.size.y-csbi.cursorPosition.y)*dword(csbi.size.x) - case 1: - cursor = coord{x: csbi.window.left, y: csbi.window.top} - count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.window.top-csbi.cursorPosition.y)*dword(csbi.size.x) - case 2: - cursor = coord{x: csbi.window.left, y: csbi.window.top} - count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.size.y-csbi.cursorPosition.y)*dword(csbi.size.x) - } - procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) - procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) - case 'K': - n := 0 - if buf.Len() > 0 { - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - } - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - var cursor coord - var count, written dword - switch n { - case 0: - cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} - count = dword(csbi.size.x - csbi.cursorPosition.x) - case 1: - cursor = coord{x: csbi.window.left, y: csbi.cursorPosition.y} - count = dword(csbi.size.x - csbi.cursorPosition.x) - case 2: - cursor = coord{x: csbi.window.left, y: csbi.cursorPosition.y} - count = dword(csbi.size.x) - } - procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) - procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) - case 'X': - n := 0 - if buf.Len() > 0 { - n, err = strconv.Atoi(buf.String()) - if err != nil { - continue - } - } - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - var cursor coord - var written dword - cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} - procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(n), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) - procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(n), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) - case 'm': - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - attr := csbi.attributes - cs := buf.String() - if cs == "" { - procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(w.oldattr)) - continue - } - token := strings.Split(cs, ";") - for i := 0; i < len(token); i++ { - ns := token[i] - if n, err = strconv.Atoi(ns); err == nil { - switch { - case n == 0 || n == 100: - attr = w.oldattr - case n == 4: - attr |= commonLvbUnderscore - case (1 <= n && n <= 3) || n == 5: - attr |= foregroundIntensity - case n == 7 || n == 27: - attr = - (attr &^ (foregroundMask | backgroundMask)) | - ((attr & foregroundMask) << 4) | - ((attr & backgroundMask) >> 4) - case n == 22: - attr &^= foregroundIntensity - case n == 24: - attr &^= commonLvbUnderscore - case 30 <= n && n <= 37: - attr &= backgroundMask - if (n-30)&1 != 0 { - attr |= foregroundRed - } - if (n-30)&2 != 0 { - attr |= foregroundGreen - } - if (n-30)&4 != 0 { - attr |= foregroundBlue - } - case n == 38: // set foreground color. - if i < len(token)-2 && (token[i+1] == "5" || token[i+1] == "05") { - if n256, err := strconv.Atoi(token[i+2]); err == nil { - if n256foreAttr == nil { - n256setup() - } - attr &= backgroundMask - attr |= n256foreAttr[n256%len(n256foreAttr)] - i += 2 - } - } else if len(token) == 5 && token[i+1] == "2" { - var r, g, b int - r, _ = strconv.Atoi(token[i+2]) - g, _ = strconv.Atoi(token[i+3]) - b, _ = strconv.Atoi(token[i+4]) - i += 4 - if r > 127 { - attr |= foregroundRed - } - if g > 127 { - attr |= foregroundGreen - } - if b > 127 { - attr |= foregroundBlue - } - } else { - attr = attr & (w.oldattr & backgroundMask) - } - case n == 39: // reset foreground color. - attr &= backgroundMask - attr |= w.oldattr & foregroundMask - case 40 <= n && n <= 47: - attr &= foregroundMask - if (n-40)&1 != 0 { - attr |= backgroundRed - } - if (n-40)&2 != 0 { - attr |= backgroundGreen - } - if (n-40)&4 != 0 { - attr |= backgroundBlue - } - case n == 48: // set background color. - if i < len(token)-2 && token[i+1] == "5" { - if n256, err := strconv.Atoi(token[i+2]); err == nil { - if n256backAttr == nil { - n256setup() - } - attr &= foregroundMask - attr |= n256backAttr[n256%len(n256backAttr)] - i += 2 - } - } else if len(token) == 5 && token[i+1] == "2" { - var r, g, b int - r, _ = strconv.Atoi(token[i+2]) - g, _ = strconv.Atoi(token[i+3]) - b, _ = strconv.Atoi(token[i+4]) - i += 4 - if r > 127 { - attr |= backgroundRed - } - if g > 127 { - attr |= backgroundGreen - } - if b > 127 { - attr |= backgroundBlue - } - } else { - attr = attr & (w.oldattr & foregroundMask) - } - case n == 49: // reset foreground color. - attr &= foregroundMask - attr |= w.oldattr & backgroundMask - case 90 <= n && n <= 97: - attr = (attr & backgroundMask) - attr |= foregroundIntensity - if (n-90)&1 != 0 { - attr |= foregroundRed - } - if (n-90)&2 != 0 { - attr |= foregroundGreen - } - if (n-90)&4 != 0 { - attr |= foregroundBlue - } - case 100 <= n && n <= 107: - attr = (attr & foregroundMask) - attr |= backgroundIntensity - if (n-100)&1 != 0 { - attr |= backgroundRed - } - if (n-100)&2 != 0 { - attr |= backgroundGreen - } - if (n-100)&4 != 0 { - attr |= backgroundBlue - } - } - procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(attr)) - } - } - case 'h': - var ci consoleCursorInfo - cs := buf.String() - if cs == "5>" { - procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) - ci.visible = 0 - procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) - } else if cs == "?25" { - procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) - ci.visible = 1 - procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) - } else if cs == "?1049" { - if w.althandle == 0 { - h, _, _ := procCreateConsoleScreenBuffer.Call(uintptr(genericRead|genericWrite), 0, 0, uintptr(consoleTextmodeBuffer), 0, 0) - w.althandle = syscall.Handle(h) - if w.althandle != 0 { - handle = w.althandle - } - } - } - case 'l': - var ci consoleCursorInfo - cs := buf.String() - if cs == "5>" { - procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) - ci.visible = 1 - procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) - } else if cs == "?25" { - procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) - ci.visible = 0 - procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) - } else if cs == "?1049" { - if w.althandle != 0 { - syscall.CloseHandle(w.althandle) - w.althandle = 0 - handle = w.handle - } - } - case 's': - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - w.oldpos = csbi.cursorPosition - case 'u': - procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&w.oldpos))) - } - } - - return len(data), nil -} - -type consoleColor struct { - rgb int - red bool - green bool - blue bool - intensity bool -} - -func (c consoleColor) foregroundAttr() (attr word) { - if c.red { - attr |= foregroundRed - } - if c.green { - attr |= foregroundGreen - } - if c.blue { - attr |= foregroundBlue - } - if c.intensity { - attr |= foregroundIntensity - } - return -} - -func (c consoleColor) backgroundAttr() (attr word) { - if c.red { - attr |= backgroundRed - } - if c.green { - attr |= backgroundGreen - } - if c.blue { - attr |= backgroundBlue - } - if c.intensity { - attr |= backgroundIntensity - } - return -} - -var color16 = []consoleColor{ - {0x000000, false, false, false, false}, - {0x000080, false, false, true, false}, - {0x008000, false, true, false, false}, - {0x008080, false, true, true, false}, - {0x800000, true, false, false, false}, - {0x800080, true, false, true, false}, - {0x808000, true, true, false, false}, - {0xc0c0c0, true, true, true, false}, - {0x808080, false, false, false, true}, - {0x0000ff, false, false, true, true}, - {0x00ff00, false, true, false, true}, - {0x00ffff, false, true, true, true}, - {0xff0000, true, false, false, true}, - {0xff00ff, true, false, true, true}, - {0xffff00, true, true, false, true}, - {0xffffff, true, true, true, true}, -} - -type hsv struct { - h, s, v float32 -} - -func (a hsv) dist(b hsv) float32 { - dh := a.h - b.h - switch { - case dh > 0.5: - dh = 1 - dh - case dh < -0.5: - dh = -1 - dh - } - ds := a.s - b.s - dv := a.v - b.v - return float32(math.Sqrt(float64(dh*dh + ds*ds + dv*dv))) -} - -func toHSV(rgb int) hsv { - r, g, b := float32((rgb&0xFF0000)>>16)/256.0, - float32((rgb&0x00FF00)>>8)/256.0, - float32(rgb&0x0000FF)/256.0 - min, max := minmax3f(r, g, b) - h := max - min - if h > 0 { - if max == r { - h = (g - b) / h - if h < 0 { - h += 6 - } - } else if max == g { - h = 2 + (b-r)/h - } else { - h = 4 + (r-g)/h - } - } - h /= 6.0 - s := max - min - if max != 0 { - s /= max - } - v := max - return hsv{h: h, s: s, v: v} -} - -type hsvTable []hsv - -func toHSVTable(rgbTable []consoleColor) hsvTable { - t := make(hsvTable, len(rgbTable)) - for i, c := range rgbTable { - t[i] = toHSV(c.rgb) - } - return t -} - -func (t hsvTable) find(rgb int) consoleColor { - hsv := toHSV(rgb) - n := 7 - l := float32(5.0) - for i, p := range t { - d := hsv.dist(p) - if d < l { - l, n = d, i - } - } - return color16[n] -} - -func minmax3f(a, b, c float32) (min, max float32) { - if a < b { - if b < c { - return a, c - } else if a < c { - return a, b - } else { - return c, b - } - } else { - if a < c { - return b, c - } else if b < c { - return b, a - } else { - return c, a - } - } -} - -var n256foreAttr []word -var n256backAttr []word - -func n256setup() { - n256foreAttr = make([]word, 256) - n256backAttr = make([]word, 256) - t := toHSVTable(color16) - for i, rgb := range color256 { - c := t.find(rgb) - n256foreAttr[i] = c.foregroundAttr() - n256backAttr[i] = c.backgroundAttr() - } -} - -// EnableColorsStdout enable colors if possible. -func EnableColorsStdout(enabled *bool) func() { - var mode uint32 - h := os.Stdout.Fd() - if r, _, _ := procGetConsoleMode.Call(h, uintptr(unsafe.Pointer(&mode))); r != 0 { - if r, _, _ = procSetConsoleMode.Call(h, uintptr(mode|cENABLE_VIRTUAL_TERMINAL_PROCESSING)); r != 0 { - if enabled != nil { - *enabled = true - } - return func() { - procSetConsoleMode.Call(h, uintptr(mode)) - } - } - } - if enabled != nil { - *enabled = true - } - return func() {} -} diff --git a/vendor/github.com/mattn/go-colorable/go.test.sh b/vendor/github.com/mattn/go-colorable/go.test.sh deleted file mode 100644 index 012162b..0000000 --- a/vendor/github.com/mattn/go-colorable/go.test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -echo "" > coverage.txt - -for d in $(go list ./... | grep -v vendor); do - go test -race -coverprofile=profile.out -covermode=atomic "$d" - if [ -f profile.out ]; then - cat profile.out >> coverage.txt - rm profile.out - fi -done diff --git a/vendor/github.com/mattn/go-colorable/noncolorable.go b/vendor/github.com/mattn/go-colorable/noncolorable.go deleted file mode 100644 index 05d6f74..0000000 --- a/vendor/github.com/mattn/go-colorable/noncolorable.go +++ /dev/null @@ -1,57 +0,0 @@ -package colorable - -import ( - "bytes" - "io" -) - -// NonColorable holds writer but removes escape sequence. -type NonColorable struct { - out io.Writer -} - -// NewNonColorable returns new instance of Writer which removes escape sequence from Writer. -func NewNonColorable(w io.Writer) io.Writer { - return &NonColorable{out: w} -} - -// Write writes data on console -func (w *NonColorable) Write(data []byte) (n int, err error) { - er := bytes.NewReader(data) - var plaintext bytes.Buffer -loop: - for { - c1, err := er.ReadByte() - if err != nil { - plaintext.WriteTo(w.out) - break loop - } - if c1 != 0x1b { - plaintext.WriteByte(c1) - continue - } - _, err = plaintext.WriteTo(w.out) - if err != nil { - break loop - } - c2, err := er.ReadByte() - if err != nil { - break loop - } - if c2 != 0x5b { - continue - } - - for { - c, err := er.ReadByte() - if err != nil { - break loop - } - if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { - break - } - } - } - - return len(data), nil -} diff --git a/vendor/github.com/mattn/go-isatty/LICENSE b/vendor/github.com/mattn/go-isatty/LICENSE deleted file mode 100644 index 65dc692..0000000 --- a/vendor/github.com/mattn/go-isatty/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -Copyright (c) Yasuhiro MATSUMOTO - -MIT License (Expat) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/mattn/go-isatty/README.md b/vendor/github.com/mattn/go-isatty/README.md deleted file mode 100644 index 3841835..0000000 --- a/vendor/github.com/mattn/go-isatty/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# go-isatty - -[![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty) -[![Codecov](https://codecov.io/gh/mattn/go-isatty/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-isatty) -[![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master) -[![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty) - -isatty for golang - -## Usage - -```go -package main - -import ( - "fmt" - "github.com/mattn/go-isatty" - "os" -) - -func main() { - if isatty.IsTerminal(os.Stdout.Fd()) { - fmt.Println("Is Terminal") - } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) { - fmt.Println("Is Cygwin/MSYS2 Terminal") - } else { - fmt.Println("Is Not Terminal") - } -} -``` - -## Installation - -``` -$ go get github.com/mattn/go-isatty -``` - -## License - -MIT - -## Author - -Yasuhiro Matsumoto (a.k.a mattn) - -## Thanks - -* k-takata: base idea for IsCygwinTerminal - - https://github.com/k-takata/go-iscygpty diff --git a/vendor/github.com/mattn/go-isatty/doc.go b/vendor/github.com/mattn/go-isatty/doc.go deleted file mode 100644 index 17d4f90..0000000 --- a/vendor/github.com/mattn/go-isatty/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package isatty implements interface to isatty -package isatty diff --git a/vendor/github.com/mattn/go-isatty/go.test.sh b/vendor/github.com/mattn/go-isatty/go.test.sh deleted file mode 100644 index 012162b..0000000 --- a/vendor/github.com/mattn/go-isatty/go.test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -echo "" > coverage.txt - -for d in $(go list ./... | grep -v vendor); do - go test -race -coverprofile=profile.out -covermode=atomic "$d" - if [ -f profile.out ]; then - cat profile.out >> coverage.txt - rm profile.out - fi -done diff --git a/vendor/github.com/mattn/go-isatty/isatty_bsd.go b/vendor/github.com/mattn/go-isatty/isatty_bsd.go deleted file mode 100644 index d569c0c..0000000 --- a/vendor/github.com/mattn/go-isatty/isatty_bsd.go +++ /dev/null @@ -1,19 +0,0 @@ -//go:build (darwin || freebsd || openbsd || netbsd || dragonfly || hurd) && !appengine -// +build darwin freebsd openbsd netbsd dragonfly hurd -// +build !appengine - -package isatty - -import "golang.org/x/sys/unix" - -// IsTerminal return true if the file descriptor is terminal. -func IsTerminal(fd uintptr) bool { - _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) - return err == nil -} - -// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 -// terminal. This is also always false on this environment. -func IsCygwinTerminal(fd uintptr) bool { - return false -} diff --git a/vendor/github.com/mattn/go-isatty/isatty_others.go b/vendor/github.com/mattn/go-isatty/isatty_others.go deleted file mode 100644 index 3150322..0000000 --- a/vendor/github.com/mattn/go-isatty/isatty_others.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build appengine || js || nacl || wasm -// +build appengine js nacl wasm - -package isatty - -// IsTerminal returns true if the file descriptor is terminal which -// is always false on js and appengine classic which is a sandboxed PaaS. -func IsTerminal(fd uintptr) bool { - return false -} - -// IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 -// terminal. This is also always false on this environment. -func IsCygwinTerminal(fd uintptr) bool { - return false -} diff --git a/vendor/github.com/mattn/go-isatty/isatty_plan9.go b/vendor/github.com/mattn/go-isatty/isatty_plan9.go deleted file mode 100644 index bae7f9b..0000000 --- a/vendor/github.com/mattn/go-isatty/isatty_plan9.go +++ /dev/null @@ -1,23 +0,0 @@ -//go:build plan9 -// +build plan9 - -package isatty - -import ( - "syscall" -) - -// IsTerminal returns true if the given file descriptor is a terminal. -func IsTerminal(fd uintptr) bool { - path, err := syscall.Fd2path(int(fd)) - if err != nil { - return false - } - return path == "/dev/cons" || path == "/mnt/term/dev/cons" -} - -// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 -// terminal. This is also always false on this environment. -func IsCygwinTerminal(fd uintptr) bool { - return false -} diff --git a/vendor/github.com/mattn/go-isatty/isatty_solaris.go b/vendor/github.com/mattn/go-isatty/isatty_solaris.go deleted file mode 100644 index 0c3acf2..0000000 --- a/vendor/github.com/mattn/go-isatty/isatty_solaris.go +++ /dev/null @@ -1,21 +0,0 @@ -//go:build solaris && !appengine -// +build solaris,!appengine - -package isatty - -import ( - "golang.org/x/sys/unix" -) - -// IsTerminal returns true if the given file descriptor is a terminal. -// see: https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/isatty.c -func IsTerminal(fd uintptr) bool { - _, err := unix.IoctlGetTermio(int(fd), unix.TCGETA) - return err == nil -} - -// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 -// terminal. This is also always false on this environment. -func IsCygwinTerminal(fd uintptr) bool { - return false -} diff --git a/vendor/github.com/mattn/go-isatty/isatty_tcgets.go b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go deleted file mode 100644 index 6778765..0000000 --- a/vendor/github.com/mattn/go-isatty/isatty_tcgets.go +++ /dev/null @@ -1,19 +0,0 @@ -//go:build (linux || aix || zos) && !appengine -// +build linux aix zos -// +build !appengine - -package isatty - -import "golang.org/x/sys/unix" - -// IsTerminal return true if the file descriptor is terminal. -func IsTerminal(fd uintptr) bool { - _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) - return err == nil -} - -// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 -// terminal. This is also always false on this environment. -func IsCygwinTerminal(fd uintptr) bool { - return false -} diff --git a/vendor/github.com/mattn/go-isatty/isatty_windows.go b/vendor/github.com/mattn/go-isatty/isatty_windows.go deleted file mode 100644 index 8e3c991..0000000 --- a/vendor/github.com/mattn/go-isatty/isatty_windows.go +++ /dev/null @@ -1,125 +0,0 @@ -//go:build windows && !appengine -// +build windows,!appengine - -package isatty - -import ( - "errors" - "strings" - "syscall" - "unicode/utf16" - "unsafe" -) - -const ( - objectNameInfo uintptr = 1 - fileNameInfo = 2 - fileTypePipe = 3 -) - -var ( - kernel32 = syscall.NewLazyDLL("kernel32.dll") - ntdll = syscall.NewLazyDLL("ntdll.dll") - procGetConsoleMode = kernel32.NewProc("GetConsoleMode") - procGetFileInformationByHandleEx = kernel32.NewProc("GetFileInformationByHandleEx") - procGetFileType = kernel32.NewProc("GetFileType") - procNtQueryObject = ntdll.NewProc("NtQueryObject") -) - -func init() { - // Check if GetFileInformationByHandleEx is available. - if procGetFileInformationByHandleEx.Find() != nil { - procGetFileInformationByHandleEx = nil - } -} - -// IsTerminal return true if the file descriptor is terminal. -func IsTerminal(fd uintptr) bool { - var st uint32 - r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0) - return r != 0 && e == 0 -} - -// Check pipe name is used for cygwin/msys2 pty. -// Cygwin/MSYS2 PTY has a name like: -// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master -func isCygwinPipeName(name string) bool { - token := strings.Split(name, "-") - if len(token) < 5 { - return false - } - - if token[0] != `\msys` && - token[0] != `\cygwin` && - token[0] != `\Device\NamedPipe\msys` && - token[0] != `\Device\NamedPipe\cygwin` { - return false - } - - if token[1] == "" { - return false - } - - if !strings.HasPrefix(token[2], "pty") { - return false - } - - if token[3] != `from` && token[3] != `to` { - return false - } - - if token[4] != "master" { - return false - } - - return true -} - -// getFileNameByHandle use the undocomented ntdll NtQueryObject to get file full name from file handler -// since GetFileInformationByHandleEx is not available under windows Vista and still some old fashion -// guys are using Windows XP, this is a workaround for those guys, it will also work on system from -// Windows vista to 10 -// see https://stackoverflow.com/a/18792477 for details -func getFileNameByHandle(fd uintptr) (string, error) { - if procNtQueryObject == nil { - return "", errors.New("ntdll.dll: NtQueryObject not supported") - } - - var buf [4 + syscall.MAX_PATH]uint16 - var result int - r, _, e := syscall.Syscall6(procNtQueryObject.Addr(), 5, - fd, objectNameInfo, uintptr(unsafe.Pointer(&buf)), uintptr(2*len(buf)), uintptr(unsafe.Pointer(&result)), 0) - if r != 0 { - return "", e - } - return string(utf16.Decode(buf[4 : 4+buf[0]/2])), nil -} - -// IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 -// terminal. -func IsCygwinTerminal(fd uintptr) bool { - if procGetFileInformationByHandleEx == nil { - name, err := getFileNameByHandle(fd) - if err != nil { - return false - } - return isCygwinPipeName(name) - } - - // Cygwin/msys's pty is a pipe. - ft, _, e := syscall.Syscall(procGetFileType.Addr(), 1, fd, 0, 0) - if ft != fileTypePipe || e != 0 { - return false - } - - var buf [2 + syscall.MAX_PATH]uint16 - r, _, e := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), - 4, fd, fileNameInfo, uintptr(unsafe.Pointer(&buf)), - uintptr(len(buf)*2), 0, 0) - if r == 0 || e != 0 { - return false - } - - l := *(*uint32)(unsafe.Pointer(&buf)) - return isCygwinPipeName(string(utf16.Decode(buf[2 : 2+l/2]))) -} diff --git a/vendor/github.com/mgutz/ansi/.gitignore b/vendor/github.com/mgutz/ansi/.gitignore deleted file mode 100644 index 9ed3b07..0000000 --- a/vendor/github.com/mgutz/ansi/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.test diff --git a/vendor/github.com/mgutz/ansi/LICENSE b/vendor/github.com/mgutz/ansi/LICENSE deleted file mode 100644 index 06ce0c3..0000000 --- a/vendor/github.com/mgutz/ansi/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2013 Mario L. Gutierrez - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/vendor/github.com/mgutz/ansi/README.md b/vendor/github.com/mgutz/ansi/README.md deleted file mode 100644 index 05905ab..0000000 --- a/vendor/github.com/mgutz/ansi/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# ansi - -Package ansi is a small, fast library to create ANSI colored strings and codes. - -## Install - -Get it - -```sh -go get -u github.com/mgutz/ansi -``` - -## Example - -```go -import "github.com/mgutz/ansi" - -// colorize a string, SLOW -msg := ansi.Color("foo", "red+b:white") - -// create a FAST closure function to avoid computation of ANSI code -phosphorize := ansi.ColorFunc("green+h:black") -msg = phosphorize("Bring back the 80s!") -msg2 := phospohorize("Look, I'm a CRT!") - -// cache escape codes and build strings manually -lime := ansi.ColorCode("green+h:black") -reset := ansi.ColorCode("reset") - -fmt.Println(lime, "Bring back the 80s!", reset) -``` - -Other examples - -```go -Color(s, "red") // red -Color(s, "red+d") // red dim -Color(s, "red+b") // red bold -Color(s, "red+B") // red blinking -Color(s, "red+u") // red underline -Color(s, "red+bh") // red bold bright -Color(s, "red:white") // red on white -Color(s, "red+b:white+h") // red bold on white bright -Color(s, "red+B:white+h") // red blink on white bright -Color(s, "off") // turn off ansi codes -``` - -To view color combinations, from project directory in terminal. - -```sh -go test -``` - -## Style format - -```go -"foregroundColor+attributes:backgroundColor+attributes" -``` - -Colors - -* black -* red -* green -* yellow -* blue -* magenta -* cyan -* white -* 0...255 (256 colors) - -Foreground Attributes - -* B = Blink -* b = bold -* h = high intensity (bright) -* d = dim -* i = inverse -* s = strikethrough -* u = underline - -Background Attributes - -* h = high intensity (bright) - -## Constants - -* ansi.Reset -* ansi.DefaultBG -* ansi.DefaultFG -* ansi.Black -* ansi.Red -* ansi.Green -* ansi.Yellow -* ansi.Blue -* ansi.Magenta -* ansi.Cyan -* ansi.White -* ansi.LightBlack -* ansi.LightRed -* ansi.LightGreen -* ansi.LightYellow -* ansi.LightBlue -* ansi.LightMagenta -* ansi.LightCyan -* ansi.LightWhite - -## References - -Wikipedia ANSI escape codes [Colors](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) - -General [tips and formatting](http://misc.flogisoft.com/bash/tip_colors_and_formatting) - -What about support on Windows? Use [colorable by mattn](https://github.com/mattn/go-colorable). -Ansi and colorable are used by [logxi](https://github.com/mgutz/logxi) to support logging in -color on Windows. - -## MIT License - -Copyright (c) 2013 Mario Gutierrez mario@mgutz.com - -See the file LICENSE for copying permission. - diff --git a/vendor/github.com/mgutz/ansi/ansi.go b/vendor/github.com/mgutz/ansi/ansi.go deleted file mode 100644 index 9ab6979..0000000 --- a/vendor/github.com/mgutz/ansi/ansi.go +++ /dev/null @@ -1,291 +0,0 @@ -package ansi - -import ( - "bytes" - "fmt" - "strconv" - "strings" -) - -const ( - black = iota - red - green - yellow - blue - magenta - cyan - white - defaultt = 9 - - normalIntensityFG = 30 - highIntensityFG = 90 - normalIntensityBG = 40 - highIntensityBG = 100 - - start = "\033[" - normal = "0;" - bold = "1;" - dim = "2;" - underline = "4;" - blink = "5;" - inverse = "7;" - strikethrough = "9;" - - // Reset is the ANSI reset escape sequence - Reset = "\033[0m" - // DefaultBG is the default background - DefaultBG = "\033[49m" - // DefaultFG is the default foreground - DefaultFG = "\033[39m" -) - -// Black FG -var Black string - -// Red FG -var Red string - -// Green FG -var Green string - -// Yellow FG -var Yellow string - -// Blue FG -var Blue string - -// Magenta FG -var Magenta string - -// Cyan FG -var Cyan string - -// White FG -var White string - -// LightBlack FG -var LightBlack string - -// LightRed FG -var LightRed string - -// LightGreen FG -var LightGreen string - -// LightYellow FG -var LightYellow string - -// LightBlue FG -var LightBlue string - -// LightMagenta FG -var LightMagenta string - -// LightCyan FG -var LightCyan string - -// LightWhite FG -var LightWhite string - -var ( - plain = false - // Colors maps common color names to their ANSI color code. - Colors = map[string]int{ - "black": black, - "red": red, - "green": green, - "yellow": yellow, - "blue": blue, - "magenta": magenta, - "cyan": cyan, - "white": white, - "default": defaultt, - } -) - -func init() { - for i := 0; i < 256; i++ { - Colors[strconv.Itoa(i)] = i - } - - Black = ColorCode("black") - Red = ColorCode("red") - Green = ColorCode("green") - Yellow = ColorCode("yellow") - Blue = ColorCode("blue") - Magenta = ColorCode("magenta") - Cyan = ColorCode("cyan") - White = ColorCode("white") - LightBlack = ColorCode("black+h") - LightRed = ColorCode("red+h") - LightGreen = ColorCode("green+h") - LightYellow = ColorCode("yellow+h") - LightBlue = ColorCode("blue+h") - LightMagenta = ColorCode("magenta+h") - LightCyan = ColorCode("cyan+h") - LightWhite = ColorCode("white+h") -} - -// ColorCode returns the ANSI color color code for style. -func ColorCode(style string) string { - return colorCode(style).String() -} - -// Gets the ANSI color code for a style. -func colorCode(style string) *bytes.Buffer { - buf := bytes.NewBufferString("") - if plain || style == "" { - return buf - } - if style == "reset" { - buf.WriteString(Reset) - return buf - } else if style == "off" { - return buf - } - - foregroundBackground := strings.Split(style, ":") - foreground := strings.Split(foregroundBackground[0], "+") - fgKey := foreground[0] - fg := Colors[fgKey] - fgStyle := "" - if len(foreground) > 1 { - fgStyle = foreground[1] - } - - bg, bgStyle := "", "" - - if len(foregroundBackground) > 1 { - background := strings.Split(foregroundBackground[1], "+") - bg = background[0] - if len(background) > 1 { - bgStyle = background[1] - } - } - - buf.WriteString(start) - base := normalIntensityFG - buf.WriteString(normal) // reset any previous style - if len(fgStyle) > 0 { - if strings.Contains(fgStyle, "b") { - buf.WriteString(bold) - } - if strings.Contains(fgStyle, "d") { - buf.WriteString(dim) - } - if strings.Contains(fgStyle, "B") { - buf.WriteString(blink) - } - if strings.Contains(fgStyle, "u") { - buf.WriteString(underline) - } - if strings.Contains(fgStyle, "i") { - buf.WriteString(inverse) - } - if strings.Contains(fgStyle, "s") { - buf.WriteString(strikethrough) - } - if strings.Contains(fgStyle, "h") { - base = highIntensityFG - } - } - - // if 256-color - n, err := strconv.Atoi(fgKey) - if err == nil { - fmt.Fprintf(buf, "38;5;%d;", n) - } else { - fmt.Fprintf(buf, "%d;", base+fg) - } - - base = normalIntensityBG - if len(bg) > 0 { - if strings.Contains(bgStyle, "h") { - base = highIntensityBG - } - // if 256-color - n, err := strconv.Atoi(bg) - if err == nil { - fmt.Fprintf(buf, "48;5;%d;", n) - } else { - fmt.Fprintf(buf, "%d;", base+Colors[bg]) - } - } - - // remove last ";" - buf.Truncate(buf.Len() - 1) - buf.WriteRune('m') - return buf -} - -// Color colors a string based on the ANSI color code for style. -func Color(s, style string) string { - if plain || len(style) < 1 { - return s - } - buf := colorCode(style) - buf.WriteString(s) - buf.WriteString(Reset) - return buf.String() -} - -// ColorFunc creates a closure to avoid computation ANSI color code. -func ColorFunc(style string) func(string) string { - if style == "" { - return func(s string) string { - return s - } - } - color := ColorCode(style) - return func(s string) string { - if plain || s == "" { - return s - } - buf := bytes.NewBufferString(color) - buf.WriteString(s) - buf.WriteString(Reset) - result := buf.String() - return result - } -} - -// DisableColors disables ANSI color codes. The default is false (colors are on). -func DisableColors(disable bool) { - plain = disable - if plain { - Black = "" - Red = "" - Green = "" - Yellow = "" - Blue = "" - Magenta = "" - Cyan = "" - White = "" - LightBlack = "" - LightRed = "" - LightGreen = "" - LightYellow = "" - LightBlue = "" - LightMagenta = "" - LightCyan = "" - LightWhite = "" - } else { - Black = ColorCode("black") - Red = ColorCode("red") - Green = ColorCode("green") - Yellow = ColorCode("yellow") - Blue = ColorCode("blue") - Magenta = ColorCode("magenta") - Cyan = ColorCode("cyan") - White = ColorCode("white") - LightBlack = ColorCode("black+h") - LightRed = ColorCode("red+h") - LightGreen = ColorCode("green+h") - LightYellow = ColorCode("yellow+h") - LightBlue = ColorCode("blue+h") - LightMagenta = ColorCode("magenta+h") - LightCyan = ColorCode("cyan+h") - LightWhite = ColorCode("white+h") - } -} diff --git a/vendor/github.com/mgutz/ansi/doc.go b/vendor/github.com/mgutz/ansi/doc.go deleted file mode 100644 index c93039b..0000000 --- a/vendor/github.com/mgutz/ansi/doc.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Package ansi is a small, fast library to create ANSI colored strings and codes. - -Installation - - # this installs the color viewer and the package - go get -u github.com/mgutz/ansi/cmd/ansi-mgutz - -Example - - // colorize a string, SLOW - msg := ansi.Color("foo", "red+b:white") - - // create a closure to avoid recalculating ANSI code compilation - phosphorize := ansi.ColorFunc("green+h:black") - msg = phosphorize("Bring back the 80s!") - msg2 := phospohorize("Look, I'm a CRT!") - - // cache escape codes and build strings manually - lime := ansi.ColorCode("green+h:black") - reset := ansi.ColorCode("reset") - - fmt.Println(lime, "Bring back the 80s!", reset) - -Other examples - - Color(s, "red") // red - Color(s, "red+b") // red bold - Color(s, "red+B") // red blinking - Color(s, "red+u") // red underline - Color(s, "red+bh") // red bold bright - Color(s, "red:white") // red on white - Color(s, "red+b:white+h") // red bold on white bright - Color(s, "red+B:white+h") // red blink on white bright - -To view color combinations, from terminal - - ansi-mgutz - -Style format - - "foregroundColor+attributes:backgroundColor+attributes" - -Colors - - black - red - green - yellow - blue - magenta - cyan - white - -Attributes - - b = bold foreground - B = Blink foreground - u = underline foreground - h = high intensity (bright) foreground, background - d = dim foreground - i = inverse - -Wikipedia ANSI escape codes [Colors](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) -*/ -package ansi diff --git a/vendor/github.com/mgutz/ansi/print.go b/vendor/github.com/mgutz/ansi/print.go deleted file mode 100644 index 806f436..0000000 --- a/vendor/github.com/mgutz/ansi/print.go +++ /dev/null @@ -1,57 +0,0 @@ -package ansi - -import ( - "fmt" - "sort" - - colorable "github.com/mattn/go-colorable" -) - -// PrintStyles prints all style combinations to the terminal. -func PrintStyles() { - // for compatibility with Windows, not needed for *nix - stdout := colorable.NewColorableStdout() - - bgColors := []string{ - "", - ":black", - ":red", - ":green", - ":yellow", - ":blue", - ":magenta", - ":cyan", - ":white", - } - - keys := make([]string, 0, len(Colors)) - for k := range Colors { - keys = append(keys, k) - } - - sort.Sort(sort.StringSlice(keys)) - - for _, fg := range keys { - for _, bg := range bgColors { - fmt.Fprintln(stdout, padColor(fg, []string{"" + bg, "+b" + bg, "+bh" + bg, "+u" + bg})) - fmt.Fprintln(stdout, padColor(fg, []string{"+s" + bg, "+i" + bg})) - fmt.Fprintln(stdout, padColor(fg, []string{"+uh" + bg, "+B" + bg, "+Bb" + bg /* backgrounds */, "" + bg + "+h"})) - fmt.Fprintln(stdout, padColor(fg, []string{"+b" + bg + "+h", "+bh" + bg + "+h", "+u" + bg + "+h", "+uh" + bg + "+h"})) - } - } -} - -func pad(s string, length int) string { - for len(s) < length { - s += " " - } - return s -} - -func padColor(color string, styles []string) string { - buffer := "" - for _, style := range styles { - buffer += Color(pad(color+style, 20), color+style) - } - return buffer -} diff --git a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md deleted file mode 100644 index c758234..0000000 --- a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md +++ /dev/null @@ -1,96 +0,0 @@ -## 1.5.0 - -* New option `IgnoreUntaggedFields` to ignore decoding to any fields - without `mapstructure` (or the configured tag name) set [GH-277] -* New option `ErrorUnset` which makes it an error if any fields - in a target struct are not set by the decoding process. [GH-225] -* New function `OrComposeDecodeHookFunc` to help compose decode hooks. [GH-240] -* Decoding to slice from array no longer crashes [GH-265] -* Decode nested struct pointers to map [GH-271] -* Fix issue where `,squash` was ignored if `Squash` option was set. [GH-280] -* Fix issue where fields with `,omitempty` would sometimes decode - into a map with an empty string key [GH-281] - -## 1.4.3 - -* Fix cases where `json.Number` didn't decode properly [GH-261] - -## 1.4.2 - -* Custom name matchers to support any sort of casing, formatting, etc. for - field names. [GH-250] -* Fix possible panic in ComposeDecodeHookFunc [GH-251] - -## 1.4.1 - -* Fix regression where `*time.Time` value would be set to empty and not be sent - to decode hooks properly [GH-232] - -## 1.4.0 - -* A new decode hook type `DecodeHookFuncValue` has been added that has - access to the full values. [GH-183] -* Squash is now supported with embedded fields that are struct pointers [GH-205] -* Empty strings will convert to 0 for all numeric types when weakly decoding [GH-206] - -## 1.3.3 - -* Decoding maps from maps creates a settable value for decode hooks [GH-203] - -## 1.3.2 - -* Decode into interface type with a struct value is supported [GH-187] - -## 1.3.1 - -* Squash should only squash embedded structs. [GH-194] - -## 1.3.0 - -* Added `",omitempty"` support. This will ignore zero values in the source - structure when encoding. [GH-145] - -## 1.2.3 - -* Fix duplicate entries in Keys list with pointer values. [GH-185] - -## 1.2.2 - -* Do not add unsettable (unexported) values to the unused metadata key - or "remain" value. [GH-150] - -## 1.2.1 - -* Go modules checksum mismatch fix - -## 1.2.0 - -* Added support to capture unused values in a field using the `",remain"` value - in the mapstructure tag. There is an example to showcase usage. -* Added `DecoderConfig` option to always squash embedded structs -* `json.Number` can decode into `uint` types -* Empty slices are preserved and not replaced with nil slices -* Fix panic that can occur in when decoding a map into a nil slice of structs -* Improved package documentation for godoc - -## 1.1.2 - -* Fix error when decode hook decodes interface implementation into interface - type. [GH-140] - -## 1.1.1 - -* Fix panic that can happen in `decodePtr` - -## 1.1.0 - -* Added `StringToIPHookFunc` to convert `string` to `net.IP` and `net.IPNet` [GH-133] -* Support struct to struct decoding [GH-137] -* If source map value is nil, then destination map value is nil (instead of empty) -* If source slice value is nil, then destination slice value is nil (instead of empty) -* If source pointer is nil, then destination pointer is set to nil (instead of - allocated zero value of type) - -## 1.0.0 - -* Initial tagged stable release. diff --git a/vendor/github.com/mitchellh/mapstructure/LICENSE b/vendor/github.com/mitchellh/mapstructure/LICENSE deleted file mode 100644 index f9c841a..0000000 --- a/vendor/github.com/mitchellh/mapstructure/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/mitchellh/mapstructure/README.md b/vendor/github.com/mitchellh/mapstructure/README.md deleted file mode 100644 index 0018dc7..0000000 --- a/vendor/github.com/mitchellh/mapstructure/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# mapstructure [![Godoc](https://godoc.org/github.com/mitchellh/mapstructure?status.svg)](https://godoc.org/github.com/mitchellh/mapstructure) - -mapstructure is a Go library for decoding generic map values to structures -and vice versa, while providing helpful error handling. - -This library is most useful when decoding values from some data stream (JSON, -Gob, etc.) where you don't _quite_ know the structure of the underlying data -until you read a part of it. You can therefore read a `map[string]interface{}` -and use this library to decode it into the proper underlying native Go -structure. - -## Installation - -Standard `go get`: - -``` -$ go get github.com/mitchellh/mapstructure -``` - -## Usage & Example - -For usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/mapstructure). - -The `Decode` function has examples associated with it there. - -## But Why?! - -Go offers fantastic standard libraries for decoding formats such as JSON. -The standard method is to have a struct pre-created, and populate that struct -from the bytes of the encoded format. This is great, but the problem is if -you have configuration or an encoding that changes slightly depending on -specific fields. For example, consider this JSON: - -```json -{ - "type": "person", - "name": "Mitchell" -} -``` - -Perhaps we can't populate a specific structure without first reading -the "type" field from the JSON. We could always do two passes over the -decoding of the JSON (reading the "type" first, and the rest later). -However, it is much simpler to just decode this into a `map[string]interface{}` -structure, read the "type" key, then use something like this library -to decode it into the proper structure. diff --git a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go b/vendor/github.com/mitchellh/mapstructure/decode_hooks.go deleted file mode 100644 index 3a754ca..0000000 --- a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go +++ /dev/null @@ -1,279 +0,0 @@ -package mapstructure - -import ( - "encoding" - "errors" - "fmt" - "net" - "reflect" - "strconv" - "strings" - "time" -) - -// typedDecodeHook takes a raw DecodeHookFunc (an interface{}) and turns -// it into the proper DecodeHookFunc type, such as DecodeHookFuncType. -func typedDecodeHook(h DecodeHookFunc) DecodeHookFunc { - // Create variables here so we can reference them with the reflect pkg - var f1 DecodeHookFuncType - var f2 DecodeHookFuncKind - var f3 DecodeHookFuncValue - - // Fill in the variables into this interface and the rest is done - // automatically using the reflect package. - potential := []interface{}{f1, f2, f3} - - v := reflect.ValueOf(h) - vt := v.Type() - for _, raw := range potential { - pt := reflect.ValueOf(raw).Type() - if vt.ConvertibleTo(pt) { - return v.Convert(pt).Interface() - } - } - - return nil -} - -// DecodeHookExec executes the given decode hook. This should be used -// since it'll naturally degrade to the older backwards compatible DecodeHookFunc -// that took reflect.Kind instead of reflect.Type. -func DecodeHookExec( - raw DecodeHookFunc, - from reflect.Value, to reflect.Value) (interface{}, error) { - - switch f := typedDecodeHook(raw).(type) { - case DecodeHookFuncType: - return f(from.Type(), to.Type(), from.Interface()) - case DecodeHookFuncKind: - return f(from.Kind(), to.Kind(), from.Interface()) - case DecodeHookFuncValue: - return f(from, to) - default: - return nil, errors.New("invalid decode hook signature") - } -} - -// ComposeDecodeHookFunc creates a single DecodeHookFunc that -// automatically composes multiple DecodeHookFuncs. -// -// The composed funcs are called in order, with the result of the -// previous transformation. -func ComposeDecodeHookFunc(fs ...DecodeHookFunc) DecodeHookFunc { - return func(f reflect.Value, t reflect.Value) (interface{}, error) { - var err error - data := f.Interface() - - newFrom := f - for _, f1 := range fs { - data, err = DecodeHookExec(f1, newFrom, t) - if err != nil { - return nil, err - } - newFrom = reflect.ValueOf(data) - } - - return data, nil - } -} - -// OrComposeDecodeHookFunc executes all input hook functions until one of them returns no error. In that case its value is returned. -// If all hooks return an error, OrComposeDecodeHookFunc returns an error concatenating all error messages. -func OrComposeDecodeHookFunc(ff ...DecodeHookFunc) DecodeHookFunc { - return func(a, b reflect.Value) (interface{}, error) { - var allErrs string - var out interface{} - var err error - - for _, f := range ff { - out, err = DecodeHookExec(f, a, b) - if err != nil { - allErrs += err.Error() + "\n" - continue - } - - return out, nil - } - - return nil, errors.New(allErrs) - } -} - -// StringToSliceHookFunc returns a DecodeHookFunc that converts -// string to []string by splitting on the given sep. -func StringToSliceHookFunc(sep string) DecodeHookFunc { - return func( - f reflect.Kind, - t reflect.Kind, - data interface{}) (interface{}, error) { - if f != reflect.String || t != reflect.Slice { - return data, nil - } - - raw := data.(string) - if raw == "" { - return []string{}, nil - } - - return strings.Split(raw, sep), nil - } -} - -// StringToTimeDurationHookFunc returns a DecodeHookFunc that converts -// strings to time.Duration. -func StringToTimeDurationHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(time.Duration(5)) { - return data, nil - } - - // Convert it by parsing - return time.ParseDuration(data.(string)) - } -} - -// StringToIPHookFunc returns a DecodeHookFunc that converts -// strings to net.IP -func StringToIPHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(net.IP{}) { - return data, nil - } - - // Convert it by parsing - ip := net.ParseIP(data.(string)) - if ip == nil { - return net.IP{}, fmt.Errorf("failed parsing ip %v", data) - } - - return ip, nil - } -} - -// StringToIPNetHookFunc returns a DecodeHookFunc that converts -// strings to net.IPNet -func StringToIPNetHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(net.IPNet{}) { - return data, nil - } - - // Convert it by parsing - _, net, err := net.ParseCIDR(data.(string)) - return net, err - } -} - -// StringToTimeHookFunc returns a DecodeHookFunc that converts -// strings to time.Time. -func StringToTimeHookFunc(layout string) DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(time.Time{}) { - return data, nil - } - - // Convert it by parsing - return time.Parse(layout, data.(string)) - } -} - -// WeaklyTypedHook is a DecodeHookFunc which adds support for weak typing to -// the decoder. -// -// Note that this is significantly different from the WeaklyTypedInput option -// of the DecoderConfig. -func WeaklyTypedHook( - f reflect.Kind, - t reflect.Kind, - data interface{}) (interface{}, error) { - dataVal := reflect.ValueOf(data) - switch t { - case reflect.String: - switch f { - case reflect.Bool: - if dataVal.Bool() { - return "1", nil - } - return "0", nil - case reflect.Float32: - return strconv.FormatFloat(dataVal.Float(), 'f', -1, 64), nil - case reflect.Int: - return strconv.FormatInt(dataVal.Int(), 10), nil - case reflect.Slice: - dataType := dataVal.Type() - elemKind := dataType.Elem().Kind() - if elemKind == reflect.Uint8 { - return string(dataVal.Interface().([]uint8)), nil - } - case reflect.Uint: - return strconv.FormatUint(dataVal.Uint(), 10), nil - } - } - - return data, nil -} - -func RecursiveStructToMapHookFunc() DecodeHookFunc { - return func(f reflect.Value, t reflect.Value) (interface{}, error) { - if f.Kind() != reflect.Struct { - return f.Interface(), nil - } - - var i interface{} = struct{}{} - if t.Type() != reflect.TypeOf(&i).Elem() { - return f.Interface(), nil - } - - m := make(map[string]interface{}) - t.Set(reflect.ValueOf(m)) - - return f.Interface(), nil - } -} - -// TextUnmarshallerHookFunc returns a DecodeHookFunc that applies -// strings to the UnmarshalText function, when the target type -// implements the encoding.TextUnmarshaler interface -func TextUnmarshallerHookFunc() DecodeHookFuncType { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - result := reflect.New(t).Interface() - unmarshaller, ok := result.(encoding.TextUnmarshaler) - if !ok { - return data, nil - } - if err := unmarshaller.UnmarshalText([]byte(data.(string))); err != nil { - return nil, err - } - return result, nil - } -} diff --git a/vendor/github.com/mitchellh/mapstructure/error.go b/vendor/github.com/mitchellh/mapstructure/error.go deleted file mode 100644 index 47a99e5..0000000 --- a/vendor/github.com/mitchellh/mapstructure/error.go +++ /dev/null @@ -1,50 +0,0 @@ -package mapstructure - -import ( - "errors" - "fmt" - "sort" - "strings" -) - -// Error implements the error interface and can represents multiple -// errors that occur in the course of a single decode. -type Error struct { - Errors []string -} - -func (e *Error) Error() string { - points := make([]string, len(e.Errors)) - for i, err := range e.Errors { - points[i] = fmt.Sprintf("* %s", err) - } - - sort.Strings(points) - return fmt.Sprintf( - "%d error(s) decoding:\n\n%s", - len(e.Errors), strings.Join(points, "\n")) -} - -// WrappedErrors implements the errwrap.Wrapper interface to make this -// return value more useful with the errwrap and go-multierror libraries. -func (e *Error) WrappedErrors() []error { - if e == nil { - return nil - } - - result := make([]error, len(e.Errors)) - for i, e := range e.Errors { - result[i] = errors.New(e) - } - - return result -} - -func appendErrors(errors []string, err error) []string { - switch e := err.(type) { - case *Error: - return append(errors, e.Errors...) - default: - return append(errors, e.Error()) - } -} diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go deleted file mode 100644 index 1efb22a..0000000 --- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go +++ /dev/null @@ -1,1540 +0,0 @@ -// Package mapstructure exposes functionality to convert one arbitrary -// Go type into another, typically to convert a map[string]interface{} -// into a native Go structure. -// -// The Go structure can be arbitrarily complex, containing slices, -// other structs, etc. and the decoder will properly decode nested -// maps and so on into the proper structures in the native Go struct. -// See the examples to see what the decoder is capable of. -// -// The simplest function to start with is Decode. -// -// Field Tags -// -// When decoding to a struct, mapstructure will use the field name by -// default to perform the mapping. For example, if a struct has a field -// "Username" then mapstructure will look for a key in the source value -// of "username" (case insensitive). -// -// type User struct { -// Username string -// } -// -// You can change the behavior of mapstructure by using struct tags. -// The default struct tag that mapstructure looks for is "mapstructure" -// but you can customize it using DecoderConfig. -// -// Renaming Fields -// -// To rename the key that mapstructure looks for, use the "mapstructure" -// tag and set a value directly. For example, to change the "username" example -// above to "user": -// -// type User struct { -// Username string `mapstructure:"user"` -// } -// -// Embedded Structs and Squashing -// -// Embedded structs are treated as if they're another field with that name. -// By default, the two structs below are equivalent when decoding with -// mapstructure: -// -// type Person struct { -// Name string -// } -// -// type Friend struct { -// Person -// } -// -// type Friend struct { -// Person Person -// } -// -// This would require an input that looks like below: -// -// map[string]interface{}{ -// "person": map[string]interface{}{"name": "alice"}, -// } -// -// If your "person" value is NOT nested, then you can append ",squash" to -// your tag value and mapstructure will treat it as if the embedded struct -// were part of the struct directly. Example: -// -// type Friend struct { -// Person `mapstructure:",squash"` -// } -// -// Now the following input would be accepted: -// -// map[string]interface{}{ -// "name": "alice", -// } -// -// When decoding from a struct to a map, the squash tag squashes the struct -// fields into a single map. Using the example structs from above: -// -// Friend{Person: Person{Name: "alice"}} -// -// Will be decoded into a map: -// -// map[string]interface{}{ -// "name": "alice", -// } -// -// DecoderConfig has a field that changes the behavior of mapstructure -// to always squash embedded structs. -// -// Remainder Values -// -// If there are any unmapped keys in the source value, mapstructure by -// default will silently ignore them. You can error by setting ErrorUnused -// in DecoderConfig. If you're using Metadata you can also maintain a slice -// of the unused keys. -// -// You can also use the ",remain" suffix on your tag to collect all unused -// values in a map. The field with this tag MUST be a map type and should -// probably be a "map[string]interface{}" or "map[interface{}]interface{}". -// See example below: -// -// type Friend struct { -// Name string -// Other map[string]interface{} `mapstructure:",remain"` -// } -// -// Given the input below, Other would be populated with the other -// values that weren't used (everything but "name"): -// -// map[string]interface{}{ -// "name": "bob", -// "address": "123 Maple St.", -// } -// -// Omit Empty Values -// -// When decoding from a struct to any other value, you may use the -// ",omitempty" suffix on your tag to omit that value if it equates to -// the zero value. The zero value of all types is specified in the Go -// specification. -// -// For example, the zero type of a numeric type is zero ("0"). If the struct -// field value is zero and a numeric type, the field is empty, and it won't -// be encoded into the destination type. -// -// type Source struct { -// Age int `mapstructure:",omitempty"` -// } -// -// Unexported fields -// -// Since unexported (private) struct fields cannot be set outside the package -// where they are defined, the decoder will simply skip them. -// -// For this output type definition: -// -// type Exported struct { -// private string // this unexported field will be skipped -// Public string -// } -// -// Using this map as input: -// -// map[string]interface{}{ -// "private": "I will be ignored", -// "Public": "I made it through!", -// } -// -// The following struct will be decoded: -// -// type Exported struct { -// private: "" // field is left with an empty string (zero value) -// Public: "I made it through!" -// } -// -// Other Configuration -// -// mapstructure is highly configurable. See the DecoderConfig struct -// for other features and options that are supported. -package mapstructure - -import ( - "encoding/json" - "errors" - "fmt" - "reflect" - "sort" - "strconv" - "strings" -) - -// DecodeHookFunc is the callback function that can be used for -// data transformations. See "DecodeHook" in the DecoderConfig -// struct. -// -// The type must be one of DecodeHookFuncType, DecodeHookFuncKind, or -// DecodeHookFuncValue. -// Values are a superset of Types (Values can return types), and Types are a -// superset of Kinds (Types can return Kinds) and are generally a richer thing -// to use, but Kinds are simpler if you only need those. -// -// The reason DecodeHookFunc is multi-typed is for backwards compatibility: -// we started with Kinds and then realized Types were the better solution, -// but have a promise to not break backwards compat so we now support -// both. -type DecodeHookFunc interface{} - -// DecodeHookFuncType is a DecodeHookFunc which has complete information about -// the source and target types. -type DecodeHookFuncType func(reflect.Type, reflect.Type, interface{}) (interface{}, error) - -// DecodeHookFuncKind is a DecodeHookFunc which knows only the Kinds of the -// source and target types. -type DecodeHookFuncKind func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error) - -// DecodeHookFuncValue is a DecodeHookFunc which has complete access to both the source and target -// values. -type DecodeHookFuncValue func(from reflect.Value, to reflect.Value) (interface{}, error) - -// DecoderConfig is the configuration that is used to create a new decoder -// and allows customization of various aspects of decoding. -type DecoderConfig struct { - // DecodeHook, if set, will be called before any decoding and any - // type conversion (if WeaklyTypedInput is on). This lets you modify - // the values before they're set down onto the resulting struct. The - // DecodeHook is called for every map and value in the input. This means - // that if a struct has embedded fields with squash tags the decode hook - // is called only once with all of the input data, not once for each - // embedded struct. - // - // If an error is returned, the entire decode will fail with that error. - DecodeHook DecodeHookFunc - - // If ErrorUnused is true, then it is an error for there to exist - // keys in the original map that were unused in the decoding process - // (extra keys). - ErrorUnused bool - - // If ErrorUnset is true, then it is an error for there to exist - // fields in the result that were not set in the decoding process - // (extra fields). This only applies to decoding to a struct. This - // will affect all nested structs as well. - ErrorUnset bool - - // ZeroFields, if set to true, will zero fields before writing them. - // For example, a map will be emptied before decoded values are put in - // it. If this is false, a map will be merged. - ZeroFields bool - - // If WeaklyTypedInput is true, the decoder will make the following - // "weak" conversions: - // - // - bools to string (true = "1", false = "0") - // - numbers to string (base 10) - // - bools to int/uint (true = 1, false = 0) - // - strings to int/uint (base implied by prefix) - // - int to bool (true if value != 0) - // - string to bool (accepts: 1, t, T, TRUE, true, True, 0, f, F, - // FALSE, false, False. Anything else is an error) - // - empty array = empty map and vice versa - // - negative numbers to overflowed uint values (base 10) - // - slice of maps to a merged map - // - single values are converted to slices if required. Each - // element is weakly decoded. For example: "4" can become []int{4} - // if the target type is an int slice. - // - WeaklyTypedInput bool - - // Squash will squash embedded structs. A squash tag may also be - // added to an individual struct field using a tag. For example: - // - // type Parent struct { - // Child `mapstructure:",squash"` - // } - Squash bool - - // Metadata is the struct that will contain extra metadata about - // the decoding. If this is nil, then no metadata will be tracked. - Metadata *Metadata - - // Result is a pointer to the struct that will contain the decoded - // value. - Result interface{} - - // The tag name that mapstructure reads for field names. This - // defaults to "mapstructure" - TagName string - - // IgnoreUntaggedFields ignores all struct fields without explicit - // TagName, comparable to `mapstructure:"-"` as default behaviour. - IgnoreUntaggedFields bool - - // MatchName is the function used to match the map key to the struct - // field name or tag. Defaults to `strings.EqualFold`. This can be used - // to implement case-sensitive tag values, support snake casing, etc. - MatchName func(mapKey, fieldName string) bool -} - -// A Decoder takes a raw interface value and turns it into structured -// data, keeping track of rich error information along the way in case -// anything goes wrong. Unlike the basic top-level Decode method, you can -// more finely control how the Decoder behaves using the DecoderConfig -// structure. The top-level Decode method is just a convenience that sets -// up the most basic Decoder. -type Decoder struct { - config *DecoderConfig -} - -// Metadata contains information about decoding a structure that -// is tedious or difficult to get otherwise. -type Metadata struct { - // Keys are the keys of the structure which were successfully decoded - Keys []string - - // Unused is a slice of keys that were found in the raw value but - // weren't decoded since there was no matching field in the result interface - Unused []string - - // Unset is a slice of field names that were found in the result interface - // but weren't set in the decoding process since there was no matching value - // in the input - Unset []string -} - -// Decode takes an input structure and uses reflection to translate it to -// the output structure. output must be a pointer to a map or struct. -func Decode(input interface{}, output interface{}) error { - config := &DecoderConfig{ - Metadata: nil, - Result: output, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// WeakDecode is the same as Decode but is shorthand to enable -// WeaklyTypedInput. See DecoderConfig for more info. -func WeakDecode(input, output interface{}) error { - config := &DecoderConfig{ - Metadata: nil, - Result: output, - WeaklyTypedInput: true, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// DecodeMetadata is the same as Decode, but is shorthand to -// enable metadata collection. See DecoderConfig for more info. -func DecodeMetadata(input interface{}, output interface{}, metadata *Metadata) error { - config := &DecoderConfig{ - Metadata: metadata, - Result: output, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// WeakDecodeMetadata is the same as Decode, but is shorthand to -// enable both WeaklyTypedInput and metadata collection. See -// DecoderConfig for more info. -func WeakDecodeMetadata(input interface{}, output interface{}, metadata *Metadata) error { - config := &DecoderConfig{ - Metadata: metadata, - Result: output, - WeaklyTypedInput: true, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// NewDecoder returns a new decoder for the given configuration. Once -// a decoder has been returned, the same configuration must not be used -// again. -func NewDecoder(config *DecoderConfig) (*Decoder, error) { - val := reflect.ValueOf(config.Result) - if val.Kind() != reflect.Ptr { - return nil, errors.New("result must be a pointer") - } - - val = val.Elem() - if !val.CanAddr() { - return nil, errors.New("result must be addressable (a pointer)") - } - - if config.Metadata != nil { - if config.Metadata.Keys == nil { - config.Metadata.Keys = make([]string, 0) - } - - if config.Metadata.Unused == nil { - config.Metadata.Unused = make([]string, 0) - } - - if config.Metadata.Unset == nil { - config.Metadata.Unset = make([]string, 0) - } - } - - if config.TagName == "" { - config.TagName = "mapstructure" - } - - if config.MatchName == nil { - config.MatchName = strings.EqualFold - } - - result := &Decoder{ - config: config, - } - - return result, nil -} - -// Decode decodes the given raw interface to the target pointer specified -// by the configuration. -func (d *Decoder) Decode(input interface{}) error { - return d.decode("", input, reflect.ValueOf(d.config.Result).Elem()) -} - -// Decodes an unknown data type into a specific reflection value. -func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) error { - var inputVal reflect.Value - if input != nil { - inputVal = reflect.ValueOf(input) - - // We need to check here if input is a typed nil. Typed nils won't - // match the "input == nil" below so we check that here. - if inputVal.Kind() == reflect.Ptr && inputVal.IsNil() { - input = nil - } - } - - if input == nil { - // If the data is nil, then we don't set anything, unless ZeroFields is set - // to true. - if d.config.ZeroFields { - outVal.Set(reflect.Zero(outVal.Type())) - - if d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) - } - } - return nil - } - - if !inputVal.IsValid() { - // If the input value is invalid, then we just set the value - // to be the zero value. - outVal.Set(reflect.Zero(outVal.Type())) - if d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) - } - return nil - } - - if d.config.DecodeHook != nil { - // We have a DecodeHook, so let's pre-process the input. - var err error - input, err = DecodeHookExec(d.config.DecodeHook, inputVal, outVal) - if err != nil { - return fmt.Errorf("error decoding '%s': %s", name, err) - } - } - - var err error - outputKind := getKind(outVal) - addMetaKey := true - switch outputKind { - case reflect.Bool: - err = d.decodeBool(name, input, outVal) - case reflect.Interface: - err = d.decodeBasic(name, input, outVal) - case reflect.String: - err = d.decodeString(name, input, outVal) - case reflect.Int: - err = d.decodeInt(name, input, outVal) - case reflect.Uint: - err = d.decodeUint(name, input, outVal) - case reflect.Float32: - err = d.decodeFloat(name, input, outVal) - case reflect.Struct: - err = d.decodeStruct(name, input, outVal) - case reflect.Map: - err = d.decodeMap(name, input, outVal) - case reflect.Ptr: - addMetaKey, err = d.decodePtr(name, input, outVal) - case reflect.Slice: - err = d.decodeSlice(name, input, outVal) - case reflect.Array: - err = d.decodeArray(name, input, outVal) - case reflect.Func: - err = d.decodeFunc(name, input, outVal) - default: - // If we reached this point then we weren't able to decode it - return fmt.Errorf("%s: unsupported type: %s", name, outputKind) - } - - // If we reached here, then we successfully decoded SOMETHING, so - // mark the key as used if we're tracking metainput. - if addMetaKey && d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) - } - - return err -} - -// This decodes a basic type (bool, int, string, etc.) and sets the -// value to "data" of that type. -func (d *Decoder) decodeBasic(name string, data interface{}, val reflect.Value) error { - if val.IsValid() && val.Elem().IsValid() { - elem := val.Elem() - - // If we can't address this element, then its not writable. Instead, - // we make a copy of the value (which is a pointer and therefore - // writable), decode into that, and replace the whole value. - copied := false - if !elem.CanAddr() { - copied = true - - // Make *T - copy := reflect.New(elem.Type()) - - // *T = elem - copy.Elem().Set(elem) - - // Set elem so we decode into it - elem = copy - } - - // Decode. If we have an error then return. We also return right - // away if we're not a copy because that means we decoded directly. - if err := d.decode(name, data, elem); err != nil || !copied { - return err - } - - // If we're a copy, we need to set te final result - val.Set(elem.Elem()) - return nil - } - - dataVal := reflect.ValueOf(data) - - // If the input data is a pointer, and the assigned type is the dereference - // of that exact pointer, then indirect it so that we can assign it. - // Example: *string to string - if dataVal.Kind() == reflect.Ptr && dataVal.Type().Elem() == val.Type() { - dataVal = reflect.Indirect(dataVal) - } - - if !dataVal.IsValid() { - dataVal = reflect.Zero(val.Type()) - } - - dataValType := dataVal.Type() - if !dataValType.AssignableTo(val.Type()) { - return fmt.Errorf( - "'%s' expected type '%s', got '%s'", - name, val.Type(), dataValType) - } - - val.Set(dataVal) - return nil -} - -func (d *Decoder) decodeString(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - - converted := true - switch { - case dataKind == reflect.String: - val.SetString(dataVal.String()) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetString("1") - } else { - val.SetString("0") - } - case dataKind == reflect.Int && d.config.WeaklyTypedInput: - val.SetString(strconv.FormatInt(dataVal.Int(), 10)) - case dataKind == reflect.Uint && d.config.WeaklyTypedInput: - val.SetString(strconv.FormatUint(dataVal.Uint(), 10)) - case dataKind == reflect.Float32 && d.config.WeaklyTypedInput: - val.SetString(strconv.FormatFloat(dataVal.Float(), 'f', -1, 64)) - case dataKind == reflect.Slice && d.config.WeaklyTypedInput, - dataKind == reflect.Array && d.config.WeaklyTypedInput: - dataType := dataVal.Type() - elemKind := dataType.Elem().Kind() - switch elemKind { - case reflect.Uint8: - var uints []uint8 - if dataKind == reflect.Array { - uints = make([]uint8, dataVal.Len(), dataVal.Len()) - for i := range uints { - uints[i] = dataVal.Index(i).Interface().(uint8) - } - } else { - uints = dataVal.Interface().([]uint8) - } - val.SetString(string(uints)) - default: - converted = false - } - default: - converted = false - } - - if !converted { - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeInt(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - dataType := dataVal.Type() - - switch { - case dataKind == reflect.Int: - val.SetInt(dataVal.Int()) - case dataKind == reflect.Uint: - val.SetInt(int64(dataVal.Uint())) - case dataKind == reflect.Float32: - val.SetInt(int64(dataVal.Float())) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetInt(1) - } else { - val.SetInt(0) - } - case dataKind == reflect.String && d.config.WeaklyTypedInput: - str := dataVal.String() - if str == "" { - str = "0" - } - - i, err := strconv.ParseInt(str, 0, val.Type().Bits()) - if err == nil { - val.SetInt(i) - } else { - return fmt.Errorf("cannot parse '%s' as int: %s", name, err) - } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := jn.Int64() - if err != nil { - return fmt.Errorf( - "error decoding json.Number into %s: %s", name, err) - } - val.SetInt(i) - default: - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - dataType := dataVal.Type() - - switch { - case dataKind == reflect.Int: - i := dataVal.Int() - if i < 0 && !d.config.WeaklyTypedInput { - return fmt.Errorf("cannot parse '%s', %d overflows uint", - name, i) - } - val.SetUint(uint64(i)) - case dataKind == reflect.Uint: - val.SetUint(dataVal.Uint()) - case dataKind == reflect.Float32: - f := dataVal.Float() - if f < 0 && !d.config.WeaklyTypedInput { - return fmt.Errorf("cannot parse '%s', %f overflows uint", - name, f) - } - val.SetUint(uint64(f)) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetUint(1) - } else { - val.SetUint(0) - } - case dataKind == reflect.String && d.config.WeaklyTypedInput: - str := dataVal.String() - if str == "" { - str = "0" - } - - i, err := strconv.ParseUint(str, 0, val.Type().Bits()) - if err == nil { - val.SetUint(i) - } else { - return fmt.Errorf("cannot parse '%s' as uint: %s", name, err) - } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := strconv.ParseUint(string(jn), 0, 64) - if err != nil { - return fmt.Errorf( - "error decoding json.Number into %s: %s", name, err) - } - val.SetUint(i) - default: - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeBool(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - - switch { - case dataKind == reflect.Bool: - val.SetBool(dataVal.Bool()) - case dataKind == reflect.Int && d.config.WeaklyTypedInput: - val.SetBool(dataVal.Int() != 0) - case dataKind == reflect.Uint && d.config.WeaklyTypedInput: - val.SetBool(dataVal.Uint() != 0) - case dataKind == reflect.Float32 && d.config.WeaklyTypedInput: - val.SetBool(dataVal.Float() != 0) - case dataKind == reflect.String && d.config.WeaklyTypedInput: - b, err := strconv.ParseBool(dataVal.String()) - if err == nil { - val.SetBool(b) - } else if dataVal.String() == "" { - val.SetBool(false) - } else { - return fmt.Errorf("cannot parse '%s' as bool: %s", name, err) - } - default: - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeFloat(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - dataType := dataVal.Type() - - switch { - case dataKind == reflect.Int: - val.SetFloat(float64(dataVal.Int())) - case dataKind == reflect.Uint: - val.SetFloat(float64(dataVal.Uint())) - case dataKind == reflect.Float32: - val.SetFloat(dataVal.Float()) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetFloat(1) - } else { - val.SetFloat(0) - } - case dataKind == reflect.String && d.config.WeaklyTypedInput: - str := dataVal.String() - if str == "" { - str = "0" - } - - f, err := strconv.ParseFloat(str, val.Type().Bits()) - if err == nil { - val.SetFloat(f) - } else { - return fmt.Errorf("cannot parse '%s' as float: %s", name, err) - } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := jn.Float64() - if err != nil { - return fmt.Errorf( - "error decoding json.Number into %s: %s", name, err) - } - val.SetFloat(i) - default: - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeMap(name string, data interface{}, val reflect.Value) error { - valType := val.Type() - valKeyType := valType.Key() - valElemType := valType.Elem() - - // By default we overwrite keys in the current map - valMap := val - - // If the map is nil or we're purposely zeroing fields, make a new map - if valMap.IsNil() || d.config.ZeroFields { - // Make a new map to hold our result - mapType := reflect.MapOf(valKeyType, valElemType) - valMap = reflect.MakeMap(mapType) - } - - // Check input type and based on the input type jump to the proper func - dataVal := reflect.Indirect(reflect.ValueOf(data)) - switch dataVal.Kind() { - case reflect.Map: - return d.decodeMapFromMap(name, dataVal, val, valMap) - - case reflect.Struct: - return d.decodeMapFromStruct(name, dataVal, val, valMap) - - case reflect.Array, reflect.Slice: - if d.config.WeaklyTypedInput { - return d.decodeMapFromSlice(name, dataVal, val, valMap) - } - - fallthrough - - default: - return fmt.Errorf("'%s' expected a map, got '%s'", name, dataVal.Kind()) - } -} - -func (d *Decoder) decodeMapFromSlice(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error { - // Special case for BC reasons (covered by tests) - if dataVal.Len() == 0 { - val.Set(valMap) - return nil - } - - for i := 0; i < dataVal.Len(); i++ { - err := d.decode( - name+"["+strconv.Itoa(i)+"]", - dataVal.Index(i).Interface(), val) - if err != nil { - return err - } - } - - return nil -} - -func (d *Decoder) decodeMapFromMap(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error { - valType := val.Type() - valKeyType := valType.Key() - valElemType := valType.Elem() - - // Accumulate errors - errors := make([]string, 0) - - // If the input data is empty, then we just match what the input data is. - if dataVal.Len() == 0 { - if dataVal.IsNil() { - if !val.IsNil() { - val.Set(dataVal) - } - } else { - // Set to empty allocated value - val.Set(valMap) - } - - return nil - } - - for _, k := range dataVal.MapKeys() { - fieldName := name + "[" + k.String() + "]" - - // First decode the key into the proper type - currentKey := reflect.Indirect(reflect.New(valKeyType)) - if err := d.decode(fieldName, k.Interface(), currentKey); err != nil { - errors = appendErrors(errors, err) - continue - } - - // Next decode the data into the proper type - v := dataVal.MapIndex(k).Interface() - currentVal := reflect.Indirect(reflect.New(valElemType)) - if err := d.decode(fieldName, v, currentVal); err != nil { - errors = appendErrors(errors, err) - continue - } - - valMap.SetMapIndex(currentKey, currentVal) - } - - // Set the built up map to the value - val.Set(valMap) - - // If we had errors, return those - if len(errors) > 0 { - return &Error{errors} - } - - return nil -} - -func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error { - typ := dataVal.Type() - for i := 0; i < typ.NumField(); i++ { - // Get the StructField first since this is a cheap operation. If the - // field is unexported, then ignore it. - f := typ.Field(i) - if f.PkgPath != "" { - continue - } - - // Next get the actual value of this field and verify it is assignable - // to the map value. - v := dataVal.Field(i) - if !v.Type().AssignableTo(valMap.Type().Elem()) { - return fmt.Errorf("cannot assign type '%s' to map value field of type '%s'", v.Type(), valMap.Type().Elem()) - } - - tagValue := f.Tag.Get(d.config.TagName) - keyName := f.Name - - if tagValue == "" && d.config.IgnoreUntaggedFields { - continue - } - - // If Squash is set in the config, we squash the field down. - squash := d.config.Squash && v.Kind() == reflect.Struct && f.Anonymous - - v = dereferencePtrToStructIfNeeded(v, d.config.TagName) - - // Determine the name of the key in the map - if index := strings.Index(tagValue, ","); index != -1 { - if tagValue[:index] == "-" { - continue - } - // If "omitempty" is specified in the tag, it ignores empty values. - if strings.Index(tagValue[index+1:], "omitempty") != -1 && isEmptyValue(v) { - continue - } - - // If "squash" is specified in the tag, we squash the field down. - squash = squash || strings.Index(tagValue[index+1:], "squash") != -1 - if squash { - // When squashing, the embedded type can be a pointer to a struct. - if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Struct { - v = v.Elem() - } - - // The final type must be a struct - if v.Kind() != reflect.Struct { - return fmt.Errorf("cannot squash non-struct type '%s'", v.Type()) - } - } - if keyNameTagValue := tagValue[:index]; keyNameTagValue != "" { - keyName = keyNameTagValue - } - } else if len(tagValue) > 0 { - if tagValue == "-" { - continue - } - keyName = tagValue - } - - switch v.Kind() { - // this is an embedded struct, so handle it differently - case reflect.Struct: - x := reflect.New(v.Type()) - x.Elem().Set(v) - - vType := valMap.Type() - vKeyType := vType.Key() - vElemType := vType.Elem() - mType := reflect.MapOf(vKeyType, vElemType) - vMap := reflect.MakeMap(mType) - - // Creating a pointer to a map so that other methods can completely - // overwrite the map if need be (looking at you decodeMapFromMap). The - // indirection allows the underlying map to be settable (CanSet() == true) - // where as reflect.MakeMap returns an unsettable map. - addrVal := reflect.New(vMap.Type()) - reflect.Indirect(addrVal).Set(vMap) - - err := d.decode(keyName, x.Interface(), reflect.Indirect(addrVal)) - if err != nil { - return err - } - - // the underlying map may have been completely overwritten so pull - // it indirectly out of the enclosing value. - vMap = reflect.Indirect(addrVal) - - if squash { - for _, k := range vMap.MapKeys() { - valMap.SetMapIndex(k, vMap.MapIndex(k)) - } - } else { - valMap.SetMapIndex(reflect.ValueOf(keyName), vMap) - } - - default: - valMap.SetMapIndex(reflect.ValueOf(keyName), v) - } - } - - if val.CanAddr() { - val.Set(valMap) - } - - return nil -} - -func (d *Decoder) decodePtr(name string, data interface{}, val reflect.Value) (bool, error) { - // If the input data is nil, then we want to just set the output - // pointer to be nil as well. - isNil := data == nil - if !isNil { - switch v := reflect.Indirect(reflect.ValueOf(data)); v.Kind() { - case reflect.Chan, - reflect.Func, - reflect.Interface, - reflect.Map, - reflect.Ptr, - reflect.Slice: - isNil = v.IsNil() - } - } - if isNil { - if !val.IsNil() && val.CanSet() { - nilValue := reflect.New(val.Type()).Elem() - val.Set(nilValue) - } - - return true, nil - } - - // Create an element of the concrete (non pointer) type and decode - // into that. Then set the value of the pointer to this type. - valType := val.Type() - valElemType := valType.Elem() - if val.CanSet() { - realVal := val - if realVal.IsNil() || d.config.ZeroFields { - realVal = reflect.New(valElemType) - } - - if err := d.decode(name, data, reflect.Indirect(realVal)); err != nil { - return false, err - } - - val.Set(realVal) - } else { - if err := d.decode(name, data, reflect.Indirect(val)); err != nil { - return false, err - } - } - return false, nil -} - -func (d *Decoder) decodeFunc(name string, data interface{}, val reflect.Value) error { - // Create an element of the concrete (non pointer) type and decode - // into that. Then set the value of the pointer to this type. - dataVal := reflect.Indirect(reflect.ValueOf(data)) - if val.Type() != dataVal.Type() { - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - val.Set(dataVal) - return nil -} - -func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataValKind := dataVal.Kind() - valType := val.Type() - valElemType := valType.Elem() - sliceType := reflect.SliceOf(valElemType) - - // If we have a non array/slice type then we first attempt to convert. - if dataValKind != reflect.Array && dataValKind != reflect.Slice { - if d.config.WeaklyTypedInput { - switch { - // Slice and array we use the normal logic - case dataValKind == reflect.Slice, dataValKind == reflect.Array: - break - - // Empty maps turn into empty slices - case dataValKind == reflect.Map: - if dataVal.Len() == 0 { - val.Set(reflect.MakeSlice(sliceType, 0, 0)) - return nil - } - // Create slice of maps of other sizes - return d.decodeSlice(name, []interface{}{data}, val) - - case dataValKind == reflect.String && valElemType.Kind() == reflect.Uint8: - return d.decodeSlice(name, []byte(dataVal.String()), val) - - // All other types we try to convert to the slice type - // and "lift" it into it. i.e. a string becomes a string slice. - default: - // Just re-try this function with data as a slice. - return d.decodeSlice(name, []interface{}{data}, val) - } - } - - return fmt.Errorf( - "'%s': source data must be an array or slice, got %s", name, dataValKind) - } - - // If the input value is nil, then don't allocate since empty != nil - if dataValKind != reflect.Array && dataVal.IsNil() { - return nil - } - - valSlice := val - if valSlice.IsNil() || d.config.ZeroFields { - // Make a new slice to hold our result, same size as the original data. - valSlice = reflect.MakeSlice(sliceType, dataVal.Len(), dataVal.Len()) - } - - // Accumulate any errors - errors := make([]string, 0) - - for i := 0; i < dataVal.Len(); i++ { - currentData := dataVal.Index(i).Interface() - for valSlice.Len() <= i { - valSlice = reflect.Append(valSlice, reflect.Zero(valElemType)) - } - currentField := valSlice.Index(i) - - fieldName := name + "[" + strconv.Itoa(i) + "]" - if err := d.decode(fieldName, currentData, currentField); err != nil { - errors = appendErrors(errors, err) - } - } - - // Finally, set the value to the slice we built up - val.Set(valSlice) - - // If there were errors, we return those - if len(errors) > 0 { - return &Error{errors} - } - - return nil -} - -func (d *Decoder) decodeArray(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataValKind := dataVal.Kind() - valType := val.Type() - valElemType := valType.Elem() - arrayType := reflect.ArrayOf(valType.Len(), valElemType) - - valArray := val - - if valArray.Interface() == reflect.Zero(valArray.Type()).Interface() || d.config.ZeroFields { - // Check input type - if dataValKind != reflect.Array && dataValKind != reflect.Slice { - if d.config.WeaklyTypedInput { - switch { - // Empty maps turn into empty arrays - case dataValKind == reflect.Map: - if dataVal.Len() == 0 { - val.Set(reflect.Zero(arrayType)) - return nil - } - - // All other types we try to convert to the array type - // and "lift" it into it. i.e. a string becomes a string array. - default: - // Just re-try this function with data as a slice. - return d.decodeArray(name, []interface{}{data}, val) - } - } - - return fmt.Errorf( - "'%s': source data must be an array or slice, got %s", name, dataValKind) - - } - if dataVal.Len() > arrayType.Len() { - return fmt.Errorf( - "'%s': expected source data to have length less or equal to %d, got %d", name, arrayType.Len(), dataVal.Len()) - - } - - // Make a new array to hold our result, same size as the original data. - valArray = reflect.New(arrayType).Elem() - } - - // Accumulate any errors - errors := make([]string, 0) - - for i := 0; i < dataVal.Len(); i++ { - currentData := dataVal.Index(i).Interface() - currentField := valArray.Index(i) - - fieldName := name + "[" + strconv.Itoa(i) + "]" - if err := d.decode(fieldName, currentData, currentField); err != nil { - errors = appendErrors(errors, err) - } - } - - // Finally, set the value to the array we built up - val.Set(valArray) - - // If there were errors, we return those - if len(errors) > 0 { - return &Error{errors} - } - - return nil -} - -func (d *Decoder) decodeStruct(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - - // If the type of the value to write to and the data match directly, - // then we just set it directly instead of recursing into the structure. - if dataVal.Type() == val.Type() { - val.Set(dataVal) - return nil - } - - dataValKind := dataVal.Kind() - switch dataValKind { - case reflect.Map: - return d.decodeStructFromMap(name, dataVal, val) - - case reflect.Struct: - // Not the most efficient way to do this but we can optimize later if - // we want to. To convert from struct to struct we go to map first - // as an intermediary. - - // Make a new map to hold our result - mapType := reflect.TypeOf((map[string]interface{})(nil)) - mval := reflect.MakeMap(mapType) - - // Creating a pointer to a map so that other methods can completely - // overwrite the map if need be (looking at you decodeMapFromMap). The - // indirection allows the underlying map to be settable (CanSet() == true) - // where as reflect.MakeMap returns an unsettable map. - addrVal := reflect.New(mval.Type()) - - reflect.Indirect(addrVal).Set(mval) - if err := d.decodeMapFromStruct(name, dataVal, reflect.Indirect(addrVal), mval); err != nil { - return err - } - - result := d.decodeStructFromMap(name, reflect.Indirect(addrVal), val) - return result - - default: - return fmt.Errorf("'%s' expected a map, got '%s'", name, dataVal.Kind()) - } -} - -func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) error { - dataValType := dataVal.Type() - if kind := dataValType.Key().Kind(); kind != reflect.String && kind != reflect.Interface { - return fmt.Errorf( - "'%s' needs a map with string keys, has '%s' keys", - name, dataValType.Key().Kind()) - } - - dataValKeys := make(map[reflect.Value]struct{}) - dataValKeysUnused := make(map[interface{}]struct{}) - for _, dataValKey := range dataVal.MapKeys() { - dataValKeys[dataValKey] = struct{}{} - dataValKeysUnused[dataValKey.Interface()] = struct{}{} - } - - targetValKeysUnused := make(map[interface{}]struct{}) - errors := make([]string, 0) - - // This slice will keep track of all the structs we'll be decoding. - // There can be more than one struct if there are embedded structs - // that are squashed. - structs := make([]reflect.Value, 1, 5) - structs[0] = val - - // Compile the list of all the fields that we're going to be decoding - // from all the structs. - type field struct { - field reflect.StructField - val reflect.Value - } - - // remainField is set to a valid field set with the "remain" tag if - // we are keeping track of remaining values. - var remainField *field - - fields := []field{} - for len(structs) > 0 { - structVal := structs[0] - structs = structs[1:] - - structType := structVal.Type() - - for i := 0; i < structType.NumField(); i++ { - fieldType := structType.Field(i) - fieldVal := structVal.Field(i) - if fieldVal.Kind() == reflect.Ptr && fieldVal.Elem().Kind() == reflect.Struct { - // Handle embedded struct pointers as embedded structs. - fieldVal = fieldVal.Elem() - } - - // If "squash" is specified in the tag, we squash the field down. - squash := d.config.Squash && fieldVal.Kind() == reflect.Struct && fieldType.Anonymous - remain := false - - // We always parse the tags cause we're looking for other tags too - tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",") - for _, tag := range tagParts[1:] { - if tag == "squash" { - squash = true - break - } - - if tag == "remain" { - remain = true - break - } - } - - if squash { - if fieldVal.Kind() != reflect.Struct { - errors = appendErrors(errors, - fmt.Errorf("%s: unsupported type for squash: %s", fieldType.Name, fieldVal.Kind())) - } else { - structs = append(structs, fieldVal) - } - continue - } - - // Build our field - if remain { - remainField = &field{fieldType, fieldVal} - } else { - // Normal struct field, store it away - fields = append(fields, field{fieldType, fieldVal}) - } - } - } - - // for fieldType, field := range fields { - for _, f := range fields { - field, fieldValue := f.field, f.val - fieldName := field.Name - - tagValue := field.Tag.Get(d.config.TagName) - tagValue = strings.SplitN(tagValue, ",", 2)[0] - if tagValue != "" { - fieldName = tagValue - } - - rawMapKey := reflect.ValueOf(fieldName) - rawMapVal := dataVal.MapIndex(rawMapKey) - if !rawMapVal.IsValid() { - // Do a slower search by iterating over each key and - // doing case-insensitive search. - for dataValKey := range dataValKeys { - mK, ok := dataValKey.Interface().(string) - if !ok { - // Not a string key - continue - } - - if d.config.MatchName(mK, fieldName) { - rawMapKey = dataValKey - rawMapVal = dataVal.MapIndex(dataValKey) - break - } - } - - if !rawMapVal.IsValid() { - // There was no matching key in the map for the value in - // the struct. Remember it for potential errors and metadata. - targetValKeysUnused[fieldName] = struct{}{} - continue - } - } - - if !fieldValue.IsValid() { - // This should never happen - panic("field is not valid") - } - - // If we can't set the field, then it is unexported or something, - // and we just continue onwards. - if !fieldValue.CanSet() { - continue - } - - // Delete the key we're using from the unused map so we stop tracking - delete(dataValKeysUnused, rawMapKey.Interface()) - - // If the name is empty string, then we're at the root, and we - // don't dot-join the fields. - if name != "" { - fieldName = name + "." + fieldName - } - - if err := d.decode(fieldName, rawMapVal.Interface(), fieldValue); err != nil { - errors = appendErrors(errors, err) - } - } - - // If we have a "remain"-tagged field and we have unused keys then - // we put the unused keys directly into the remain field. - if remainField != nil && len(dataValKeysUnused) > 0 { - // Build a map of only the unused values - remain := map[interface{}]interface{}{} - for key := range dataValKeysUnused { - remain[key] = dataVal.MapIndex(reflect.ValueOf(key)).Interface() - } - - // Decode it as-if we were just decoding this map onto our map. - if err := d.decodeMap(name, remain, remainField.val); err != nil { - errors = appendErrors(errors, err) - } - - // Set the map to nil so we have none so that the next check will - // not error (ErrorUnused) - dataValKeysUnused = nil - } - - if d.config.ErrorUnused && len(dataValKeysUnused) > 0 { - keys := make([]string, 0, len(dataValKeysUnused)) - for rawKey := range dataValKeysUnused { - keys = append(keys, rawKey.(string)) - } - sort.Strings(keys) - - err := fmt.Errorf("'%s' has invalid keys: %s", name, strings.Join(keys, ", ")) - errors = appendErrors(errors, err) - } - - if d.config.ErrorUnset && len(targetValKeysUnused) > 0 { - keys := make([]string, 0, len(targetValKeysUnused)) - for rawKey := range targetValKeysUnused { - keys = append(keys, rawKey.(string)) - } - sort.Strings(keys) - - err := fmt.Errorf("'%s' has unset fields: %s", name, strings.Join(keys, ", ")) - errors = appendErrors(errors, err) - } - - if len(errors) > 0 { - return &Error{errors} - } - - // Add the unused keys to the list of unused keys if we're tracking metadata - if d.config.Metadata != nil { - for rawKey := range dataValKeysUnused { - key := rawKey.(string) - if name != "" { - key = name + "." + key - } - - d.config.Metadata.Unused = append(d.config.Metadata.Unused, key) - } - for rawKey := range targetValKeysUnused { - key := rawKey.(string) - if name != "" { - key = name + "." + key - } - - d.config.Metadata.Unset = append(d.config.Metadata.Unset, key) - } - } - - return nil -} - -func isEmptyValue(v reflect.Value) bool { - switch getKind(v) { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - return false -} - -func getKind(val reflect.Value) reflect.Kind { - kind := val.Kind() - - switch { - case kind >= reflect.Int && kind <= reflect.Int64: - return reflect.Int - case kind >= reflect.Uint && kind <= reflect.Uint64: - return reflect.Uint - case kind >= reflect.Float32 && kind <= reflect.Float64: - return reflect.Float32 - default: - return kind - } -} - -func isStructTypeConvertibleToMap(typ reflect.Type, checkMapstructureTags bool, tagName string) bool { - for i := 0; i < typ.NumField(); i++ { - f := typ.Field(i) - if f.PkgPath == "" && !checkMapstructureTags { // check for unexported fields - return true - } - if checkMapstructureTags && f.Tag.Get(tagName) != "" { // check for mapstructure tags inside - return true - } - } - return false -} - -func dereferencePtrToStructIfNeeded(v reflect.Value, tagName string) reflect.Value { - if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct { - return v - } - deref := v.Elem() - derefT := deref.Type() - if isStructTypeConvertibleToMap(derefT, true, tagName) { - return deref - } - return v -} diff --git a/vendor/github.com/mjibson/go-dsp/LICENSE b/vendor/github.com/mjibson/go-dsp/LICENSE deleted file mode 100644 index d412027..0000000 --- a/vendor/github.com/mjibson/go-dsp/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2011 Matt Jibson - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/vendor/github.com/mjibson/go-dsp/dsputils/compare.go b/vendor/github.com/mjibson/go-dsp/dsputils/compare.go deleted file mode 100644 index 8cab075..0000000 --- a/vendor/github.com/mjibson/go-dsp/dsputils/compare.go +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2011 Matt Jibson - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package dsputils - -import ( - "math" -) - -const ( - closeFactor = 1e-8 -) - -// PrettyClose returns true if the slices a and b are very close, else false. -func PrettyClose(a, b []float64) bool { - if len(a) != len(b) { - return false - } - - for i, c := range a { - if !Float64Equal(c, b[i]) { - return false - } - } - return true -} - -// PrettyCloseC returns true if the slices a and b are very close, else false. -func PrettyCloseC(a, b []complex128) bool { - if len(a) != len(b) { - return false - } - - for i, c := range a { - if !ComplexEqual(c, b[i]) { - return false - } - } - return true -} - -// PrettyClose2 returns true if the matrixes a and b are very close, else false. -func PrettyClose2(a, b [][]complex128) bool { - if len(a) != len(b) { - return false - } - - for i, c := range a { - if !PrettyCloseC(c, b[i]) { - return false - } - } - return true -} - -// PrettyClose2F returns true if the matrixes a and b are very close, else false. -func PrettyClose2F(a, b [][]float64) bool { - if len(a) != len(b) { - return false - } - - for i, c := range a { - if !PrettyClose(c, b[i]) { - return false - } - } - return true -} - -// ComplexEqual returns true if a and b are very close, else false. -func ComplexEqual(a, b complex128) bool { - r_a := real(a) - r_b := real(b) - i_a := imag(a) - i_b := imag(b) - - return Float64Equal(r_a, r_b) && Float64Equal(i_a, i_b) -} - -// Float64Equal returns true if a and b are very close, else false. -func Float64Equal(a, b float64) bool { - return math.Abs(a-b) <= closeFactor || math.Abs(1-a/b) <= closeFactor -} diff --git a/vendor/github.com/mjibson/go-dsp/dsputils/dsputils.go b/vendor/github.com/mjibson/go-dsp/dsputils/dsputils.go deleted file mode 100644 index 8ea3be7..0000000 --- a/vendor/github.com/mjibson/go-dsp/dsputils/dsputils.go +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2011 Matt Jibson - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -// Package dsputils provides functions useful in digital signal processing. -package dsputils - -import ( - "math" -) - -// ToComplex returns the complex equivalent of the real-valued slice. -func ToComplex(x []float64) []complex128 { - y := make([]complex128, len(x)) - for n, v := range x { - y[n] = complex(v, 0) - } - return y -} - -// IsPowerOf2 returns true if x is a power of 2, else false. -func IsPowerOf2(x int) bool { - return x&(x-1) == 0 -} - -// NextPowerOf2 returns the next power of 2 >= x. -func NextPowerOf2(x int) int { - if IsPowerOf2(x) { - return x - } - - return int(math.Pow(2, math.Ceil(math.Log2(float64(x))))) -} - -// ZeroPad returns x with zeros appended to the end to the specified length. -// If len(x) >= length, x is returned, otherwise a new array is returned. -func ZeroPad(x []complex128, length int) []complex128 { - if len(x) >= length { - return x - } - - r := make([]complex128, length) - copy(r, x) - return r -} - -// ZeroPadF returns x with zeros appended to the end to the specified length. -// If len(x) >= length, x is returned, otherwise a new array is returned. -func ZeroPadF(x []float64, length int) []float64 { - if len(x) >= length { - return x - } - - r := make([]float64, length) - copy(r, x) - return r -} - -// ZeroPad2 returns ZeroPad of x, with the length as the next power of 2 >= len(x). -func ZeroPad2(x []complex128) []complex128 { - return ZeroPad(x, NextPowerOf2(len(x))) -} - -// ToComplex2 returns the complex equivalent of the real-valued matrix. -func ToComplex2(x [][]float64) [][]complex128 { - y := make([][]complex128, len(x)) - for n, v := range x { - y[n] = ToComplex(v) - } - return y -} - -// Segment returns segs equal-length slices that are segments of x with noverlap% of overlap. -// The returned slices are not copies of x, but slices into it. -// Trailing entries in x that connot be included in the equal-length segments are discarded. -// noverlap is a percentage, thus 0 <= noverlap <= 1, and noverlap = 0.5 is 50% overlap. -func Segment(x []complex128, segs int, noverlap float64) [][]complex128 { - lx := len(x) - - // determine step, length, and overlap - var overlap, length, step, tot int - for length = lx; length > 0; length-- { - overlap = int(float64(length) * noverlap) - tot = segs*(length-overlap) + overlap - if tot <= lx { - step = length - overlap - break - } - } - - if length == 0 { - panic("too many segments") - } - - r := make([][]complex128, segs) - s := 0 - for n := range r { - r[n] = x[s : s+length] - s += step - } - - return r -} diff --git a/vendor/github.com/mjibson/go-dsp/dsputils/matrix.go b/vendor/github.com/mjibson/go-dsp/dsputils/matrix.go deleted file mode 100644 index ac07855..0000000 --- a/vendor/github.com/mjibson/go-dsp/dsputils/matrix.go +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) 2011 Matt Jibson - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package dsputils - -// Matrix is a multidimensional matrix of arbitrary size and dimension. -// It cannot be resized after creation. Arrays in any axis can be set or fetched. -type Matrix struct { - list []complex128 - dims, offsets []int -} - -// MakeMatrix returns a new Matrix populated with x having dimensions dims. -// For example, to create a 3-dimensional Matrix with 2 components, 3 rows, and 4 columns: -// MakeMatrix([]complex128 { -// 1, 2, 3, 4, -// 5, 6, 7, 8, -// 9, 0, 1, 2, -// -// 3, 4, 5, 6, -// 7, 8, 9, 0, -// 4, 3, 2, 1}, -// []int {2, 3, 4}) -func MakeMatrix(x []complex128, dims []int) *Matrix { - length := 1 - offsets := make([]int, len(dims)) - - for i := len(dims) - 1; i >= 0; i-- { - if dims[i] < 1 { - panic("invalid dimensions") - } - - offsets[i] = length - length *= dims[i] - } - - if len(x) != length { - panic("incorrect dimensions") - } - - dc := make([]int, len(dims)) - copy(dc, dims) - return &Matrix{x, dc, offsets} -} - -// MakeMatrix2 is a helper function to convert a 2-d array to a matrix. -func MakeMatrix2(x [][]complex128) *Matrix { - dims := []int{len(x), len(x[0])} - r := make([]complex128, dims[0]*dims[1]) - for n, v := range x { - if len(v) != dims[1] { - panic("ragged array") - } - - copy(r[n*dims[1]:(n+1)*dims[1]], v) - } - - return MakeMatrix(r, dims) -} - -// Copy returns a new copy of m. -func (m *Matrix) Copy() *Matrix { - r := &Matrix{m.list, m.dims, m.offsets} - r.list = make([]complex128, len(m.list)) - copy(r.list, m.list) - return r -} - -// MakeEmptyMatrix creates an empty Matrix with given dimensions. -func MakeEmptyMatrix(dims []int) *Matrix { - x := 1 - for _, v := range dims { - x *= v - } - - return MakeMatrix(make([]complex128, x), dims) -} - -// offset returns the index in the one-dimensional array -func (s *Matrix) offset(dims []int) int { - if len(dims) != len(s.dims) { - panic("incorrect dimensions") - } - - i := 0 - for n, v := range dims { - if v > s.dims[n] { - panic("incorrect dimensions") - } - - i += v * s.offsets[n] - } - - return i -} - -func (m *Matrix) indexes(dims []int) []int { - i := -1 - for n, v := range dims { - if v == -1 { - if i >= 0 { - panic("only one dimension index allowed") - } - - i = n - } else if v >= m.dims[n] { - panic("dimension out of bounds") - } - } - - if i == -1 { - panic("must specify one dimension index") - } - - x := 0 - for n, v := range dims { - if v >= 0 { - x += m.offsets[n] * v - } - } - - r := make([]int, m.dims[i]) - for j := range r { - r[j] = x + m.offsets[i]*j - } - - return r -} - -// Dimensions returns the dimension array of the Matrix. -func (m *Matrix) Dimensions() []int { - r := make([]int, len(m.dims)) - copy(r, m.dims) - return r -} - -// Dim returns the array of any given index of the Matrix. -// Exactly one value in dims must be -1. This is the array dimension returned. -// For example, using the Matrix documented in MakeMatrix: -// m.Dim([]int {1, 0, -1}) = []complex128 {3, 4, 5, 6} -// m.Dim([]int {0, -1, 2}) = []complex128 {3, 7, 1} -// m.Dim([]int {-1, 1, 3}) = []complex128 {8, 0} -func (s *Matrix) Dim(dims []int) []complex128 { - inds := s.indexes(dims) - r := make([]complex128, len(inds)) - for n, v := range inds { - r[n] = s.list[v] - } - - return r -} - -func (m *Matrix) SetDim(x []complex128, dims []int) { - inds := m.indexes(dims) - if len(x) != len(inds) { - panic("incorrect array length") - } - - for n, v := range inds { - m.list[v] = x[n] - } -} - -// Value returns the value at the given index. -// m.Value([]int {1, 2, 3, 4}) is equivalent to m[1][2][3][4]. -func (s *Matrix) Value(dims []int) complex128 { - return s.list[s.offset(dims)] -} - -// SetValue sets the value at the given index. -// m.SetValue(10, []int {1, 2, 3, 4}) is equivalent to m[1][2][3][4] = 10. -func (s *Matrix) SetValue(x complex128, dims []int) { - s.list[s.offset(dims)] = x -} - -// To2D returns the 2-D array equivalent of the Matrix. -// Only works on Matrixes of 2 dimensions. -func (m *Matrix) To2D() [][]complex128 { - if len(m.dims) != 2 { - panic("can only convert 2-D Matrixes") - } - - r := make([][]complex128, m.dims[0]) - for i := 0; i < m.dims[0]; i++ { - r[i] = make([]complex128, m.dims[1]) - copy(r[i], m.list[i*m.dims[1]:(i+1)*m.dims[1]]) - } - - return r -} - -// PrettyClose returns true if the Matrixes are very close, else false. -// Comparison done using dsputils.PrettyCloseC(). -func (m *Matrix) PrettyClose(n *Matrix) bool { - // todo: use new slice equality comparison - for i, v := range m.dims { - if v != n.dims[i] { - return false - } - } - - return PrettyCloseC(m.list, n.list) -} diff --git a/vendor/github.com/mjibson/go-dsp/fft/bluestein.go b/vendor/github.com/mjibson/go-dsp/fft/bluestein.go deleted file mode 100644 index 998fb98..0000000 --- a/vendor/github.com/mjibson/go-dsp/fft/bluestein.go +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2011 Matt Jibson - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fft - -import ( - "math" - "sync" - - "github.com/mjibson/go-dsp/dsputils" -) - -var ( - bluesteinLock sync.RWMutex - bluesteinFactors = map[int][]complex128{} - bluesteinInvFactors = map[int][]complex128{} -) - -func getBluesteinFactors(input_len int) ([]complex128, []complex128) { - bluesteinLock.RLock() - - if hasBluesteinFactors(input_len) { - defer bluesteinLock.RUnlock() - return bluesteinFactors[input_len], bluesteinInvFactors[input_len] - } - - bluesteinLock.RUnlock() - bluesteinLock.Lock() - defer bluesteinLock.Unlock() - - if !hasBluesteinFactors(input_len) { - bluesteinFactors[input_len] = make([]complex128, input_len) - bluesteinInvFactors[input_len] = make([]complex128, input_len) - - var sin, cos float64 - for i := 0; i < input_len; i++ { - if i == 0 { - sin, cos = 0, 1 - } else { - sin, cos = math.Sincos(math.Pi / float64(input_len) * float64(i*i)) - } - bluesteinFactors[input_len][i] = complex(cos, sin) - bluesteinInvFactors[input_len][i] = complex(cos, -sin) - } - } - - return bluesteinFactors[input_len], bluesteinInvFactors[input_len] -} - -func hasBluesteinFactors(idx int) bool { - return bluesteinFactors[idx] != nil -} - -// bluesteinFFT returns the FFT calculated using the Bluestein algorithm. -func bluesteinFFT(x []complex128) []complex128 { - lx := len(x) - a := dsputils.ZeroPad(x, dsputils.NextPowerOf2(lx*2-1)) - la := len(a) - factors, invFactors := getBluesteinFactors(lx) - - for n, v := range x { - a[n] = v * invFactors[n] - } - - b := make([]complex128, la) - for i := 0; i < lx; i++ { - b[i] = factors[i] - - if i != 0 { - b[la-i] = factors[i] - } - } - - r := Convolve(a, b) - - for i := 0; i < lx; i++ { - r[i] *= invFactors[i] - } - - return r[:lx] -} diff --git a/vendor/github.com/mjibson/go-dsp/fft/fft.go b/vendor/github.com/mjibson/go-dsp/fft/fft.go deleted file mode 100644 index fee48f9..0000000 --- a/vendor/github.com/mjibson/go-dsp/fft/fft.go +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) 2011 Matt Jibson - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -// Package fft provides forward and inverse fast Fourier transform functions. -package fft - -import ( - "github.com/mjibson/go-dsp/dsputils" -) - -// FFTReal returns the forward FFT of the real-valued slice. -func FFTReal(x []float64) []complex128 { - return FFT(dsputils.ToComplex(x)) -} - -// IFFTReal returns the inverse FFT of the real-valued slice. -func IFFTReal(x []float64) []complex128 { - return IFFT(dsputils.ToComplex(x)) -} - -// IFFT returns the inverse FFT of the complex-valued slice. -func IFFT(x []complex128) []complex128 { - lx := len(x) - r := make([]complex128, lx) - - // Reverse inputs, which is calculated with modulo N, hence x[0] as an outlier - r[0] = x[0] - for i := 1; i < lx; i++ { - r[i] = x[lx-i] - } - - r = FFT(r) - - N := complex(float64(lx), 0) - for n := range r { - r[n] /= N - } - return r -} - -// Convolve returns the convolution of x ∗ y. -func Convolve(x, y []complex128) []complex128 { - if len(x) != len(y) { - panic("arrays not of equal size") - } - - fft_x := FFT(x) - fft_y := FFT(y) - - r := make([]complex128, len(x)) - for i := 0; i < len(r); i++ { - r[i] = fft_x[i] * fft_y[i] - } - - return IFFT(r) -} - -// FFT returns the forward FFT of the complex-valued slice. -func FFT(x []complex128) []complex128 { - lx := len(x) - - // todo: non-hack handling length <= 1 cases - if lx <= 1 { - r := make([]complex128, lx) - copy(r, x) - return r - } - - if dsputils.IsPowerOf2(lx) { - return radix2FFT(x) - } - - return bluesteinFFT(x) -} - -var ( - worker_pool_size = 0 -) - -// SetWorkerPoolSize sets the number of workers during FFT computation on multicore systems. -// If n is 0 (the default), then GOMAXPROCS workers will be created. -func SetWorkerPoolSize(n int) { - if n < 0 { - n = 0 - } - - worker_pool_size = n -} - -// FFT2Real returns the 2-dimensional, forward FFT of the real-valued matrix. -func FFT2Real(x [][]float64) [][]complex128 { - return FFT2(dsputils.ToComplex2(x)) -} - -// FFT2 returns the 2-dimensional, forward FFT of the complex-valued matrix. -func FFT2(x [][]complex128) [][]complex128 { - return computeFFT2(x, FFT) -} - -// IFFT2Real returns the 2-dimensional, inverse FFT of the real-valued matrix. -func IFFT2Real(x [][]float64) [][]complex128 { - return IFFT2(dsputils.ToComplex2(x)) -} - -// IFFT2 returns the 2-dimensional, inverse FFT of the complex-valued matrix. -func IFFT2(x [][]complex128) [][]complex128 { - return computeFFT2(x, IFFT) -} - -func computeFFT2(x [][]complex128, fftFunc func([]complex128) []complex128) [][]complex128 { - rows := len(x) - if rows == 0 { - panic("empty input array") - } - - cols := len(x[0]) - r := make([][]complex128, rows) - for i := 0; i < rows; i++ { - if len(x[i]) != cols { - panic("ragged input array") - } - r[i] = make([]complex128, cols) - } - - for i := 0; i < cols; i++ { - t := make([]complex128, rows) - for j := 0; j < rows; j++ { - t[j] = x[j][i] - } - - for n, v := range fftFunc(t) { - r[n][i] = v - } - } - - for n, v := range r { - r[n] = fftFunc(v) - } - - return r -} - -// FFTN returns the forward FFT of the matrix m, computed in all N dimensions. -func FFTN(m *dsputils.Matrix) *dsputils.Matrix { - return computeFFTN(m, FFT) -} - -// IFFTN returns the forward FFT of the matrix m, computed in all N dimensions. -func IFFTN(m *dsputils.Matrix) *dsputils.Matrix { - return computeFFTN(m, IFFT) -} - -func computeFFTN(m *dsputils.Matrix, fftFunc func([]complex128) []complex128) *dsputils.Matrix { - dims := m.Dimensions() - t := m.Copy() - r := dsputils.MakeEmptyMatrix(dims) - - for n := range dims { - dims[n] -= 1 - } - - for n := range dims { - d := make([]int, len(dims)) - copy(d, dims) - d[n] = -1 - - for { - r.SetDim(fftFunc(t.Dim(d)), d) - - if !decrDim(d, dims) { - break - } - } - - r, t = t, r - } - - return t -} - -// decrDim decrements an element of x by 1, skipping all -1s, and wrapping up to d. -// If a value is 0, it will be reset to its correspending value in d, and will carry one from the next non -1 value to the right. -// Returns true if decremented, else false. -func decrDim(x, d []int) bool { - for n, v := range x { - if v == -1 { - continue - } else if v == 0 { - i := n - // find the next element to decrement - for ; i < len(x); i++ { - if x[i] == -1 { - continue - } else if x[i] == 0 { - x[i] = d[i] - } else { - x[i] -= 1 - return true - } - } - - // no decrement - return false - } else { - x[n] -= 1 - return true - } - } - - return false -} diff --git a/vendor/github.com/mjibson/go-dsp/fft/radix2.go b/vendor/github.com/mjibson/go-dsp/fft/radix2.go deleted file mode 100644 index 34be593..0000000 --- a/vendor/github.com/mjibson/go-dsp/fft/radix2.go +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) 2011 Matt Jibson - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package fft - -import ( - "math" - "runtime" - "sync" -) - -var ( - radix2Lock sync.RWMutex - radix2Factors = map[int][]complex128{ - 4: {complex(1, 0), complex(0, -1), complex(-1, 0), complex(0, 1)}, - } -) - -// EnsureRadix2Factors ensures that all radix 2 factors are computed for inputs -// of length input_len. This is used to precompute needed factors for known -// sizes. Generally should only be used for benchmarks. -func EnsureRadix2Factors(input_len int) { - getRadix2Factors(input_len) -} - -func getRadix2Factors(input_len int) []complex128 { - radix2Lock.RLock() - - if hasRadix2Factors(input_len) { - defer radix2Lock.RUnlock() - return radix2Factors[input_len] - } - - radix2Lock.RUnlock() - radix2Lock.Lock() - defer radix2Lock.Unlock() - - if !hasRadix2Factors(input_len) { - for i, p := 8, 4; i <= input_len; i, p = i<<1, i { - if radix2Factors[i] == nil { - radix2Factors[i] = make([]complex128, i) - - for n, j := 0, 0; n < i; n, j = n+2, j+1 { - radix2Factors[i][n] = radix2Factors[p][j] - } - - for n := 1; n < i; n += 2 { - sin, cos := math.Sincos(-2 * math.Pi / float64(i) * float64(n)) - radix2Factors[i][n] = complex(cos, sin) - } - } - } - } - - return radix2Factors[input_len] -} - -func hasRadix2Factors(idx int) bool { - return radix2Factors[idx] != nil -} - -type fft_work struct { - start, end int -} - -// radix2FFT returns the FFT calculated using the radix-2 DIT Cooley-Tukey algorithm. -func radix2FFT(x []complex128) []complex128 { - lx := len(x) - factors := getRadix2Factors(lx) - - t := make([]complex128, lx) // temp - r := reorderData(x) - - var blocks, stage, s_2 int - - jobs := make(chan *fft_work, lx) - wg := sync.WaitGroup{} - - num_workers := worker_pool_size - if (num_workers) == 0 { - num_workers = runtime.GOMAXPROCS(0) - } - - idx_diff := lx / num_workers - if idx_diff < 2 { - idx_diff = 2 - } - - worker := func() { - for work := range jobs { - for nb := work.start; nb < work.end; nb += stage { - if stage != 2 { - for j := 0; j < s_2; j++ { - idx := j + nb - idx2 := idx + s_2 - ridx := r[idx] - w_n := r[idx2] * factors[blocks*j] - t[idx] = ridx + w_n - t[idx2] = ridx - w_n - } - } else { - n1 := nb + 1 - rn := r[nb] - rn1 := r[n1] - t[nb] = rn + rn1 - t[n1] = rn - rn1 - } - } - wg.Done() - } - } - - for i := 0; i < num_workers; i++ { - go worker() - } - defer close(jobs) - - for stage = 2; stage <= lx; stage <<= 1 { - blocks = lx / stage - s_2 = stage / 2 - - for start, end := 0, stage; ; { - if end-start >= idx_diff || end == lx { - wg.Add(1) - jobs <- &fft_work{start, end} - - if end == lx { - break - } - - start = end - } - - end += stage - } - wg.Wait() - r, t = t, r - } - - return r -} - -// reorderData returns a copy of x reordered for the DFT. -func reorderData(x []complex128) []complex128 { - lx := uint(len(x)) - r := make([]complex128, lx) - s := log2(lx) - - var n uint - for ; n < lx; n++ { - r[reverseBits(n, s)] = x[n] - } - - return r -} - -// log2 returns the log base 2 of v -// from: http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogObvious -func log2(v uint) uint { - var r uint - - for v >>= 1; v != 0; v >>= 1 { - r++ - } - - return r -} - -// reverseBits returns the first s bits of v in reverse order -// from: http://graphics.stanford.edu/~seander/bithacks.html#BitReverseObvious -func reverseBits(v, s uint) uint { - var r uint - - // Since we aren't reversing all the bits in v (just the first s bits), - // we only need the first bit of v instead of a full copy. - r = v & 1 - s-- - - for v >>= 1; v != 0; v >>= 1 { - r <<= 1 - r |= v & 1 - s-- - } - - return r << s -} diff --git a/vendor/github.com/nuknal/goNum/.gitignore b/vendor/github.com/nuknal/goNum/.gitignore deleted file mode 100644 index f1c181e..0000000 --- a/vendor/github.com/nuknal/goNum/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out diff --git a/vendor/github.com/nuknal/goNum/AUTHOR.MD b/vendor/github.com/nuknal/goNum/AUTHOR.MD deleted file mode 100644 index 29ed22b..0000000 --- a/vendor/github.com/nuknal/goNum/AUTHOR.MD +++ /dev/null @@ -1,3 +0,0 @@ -1. NAME. chfenger、Black Ghost - -2. EMAIL. chengfengcool@sina.com diff --git a/vendor/github.com/nuknal/goNum/Anm.go b/vendor/github.com/nuknal/goNum/Anm.go deleted file mode 100644 index de90d95..0000000 --- a/vendor/github.com/nuknal/goNum/Anm.go +++ /dev/null @@ -1,43 +0,0 @@ -// Anm -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-6 -版本 : 0.0.0 ------------------------------------------------------- - m - 计算排列 A 的值 - n ------------------------------------------------------- -输入 : - n 整数 - m 整数, m <= n -输出 : - ------------------------------------------------------- -*/ - -package goNum - -// Anm -// m -// 计算排列 A 的值 -// n -func Anm(n, m int) int { - /* - m - 计算排列 A 的值 - n - ------------------------------------------------------ - 输入 : - n 整数 - m 整数, m <= n - 输出 : - */ - //不直接使用阶乘计算可以稍许增加速度 - temp0 := 1 - for i := n; i >= n-m+1; i-- { - temp0 = temp0 * i - } - return temp0 -} diff --git a/vendor/github.com/nuknal/goNum/Bisection.go b/vendor/github.com/nuknal/goNum/Bisection.go deleted file mode 100644 index ffa3c74..0000000 --- a/vendor/github.com/nuknal/goNum/Bisection.go +++ /dev/null @@ -1,78 +0,0 @@ -// Bisection -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-01 -版本 : 0.0.0 ------------------------------------------------------- - 此程序设计使用二分法来求解连续、单自变量、单调函数(区间 -内)指定有限区间上的解 - 线性收敛 ------------------------------------------------------- -输入 : - fn 函数,定义为等式左侧部分,右侧为零 - a, b 求解区间 - N 步数上限 - tol 误差上限 -输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// Bisection 此程序设计使用二分法来求解连续、单自变量、单调函数(区间 -//内)指定有限区间上的解 -func Bisection(fn func(float64) float64, a, b float64, N int, tol float64) (float64, bool) { - /* - 此程序设计使用二分法来求解连续、单自变量、单调函数(区间 - 内)指定有限区间上的解 - 线性收敛 - 输入 : - fn 函数,定义为等式左侧部分,右侧为零 - a, b 求解区间 - N 步数上限 - tol 误差上限 - 输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var sol float64 - var err bool = false - - //判断在[a,b]区间是否有解 - if (fn(a) > 0 && fn(b) > 0) || (fn(a) < 0 && fn(b) < 0) { - return sol, err - } - - //求解 - for i := 0; i < N; i++ { - sol = (a + b) / 2 - //解出 - if math.Abs(fn(sol)) < tol { - err = true - return sol, err - } - //未解出,重置区间边界 - switch { - case fn(sol) < 0 && fn(a) < 0: - a = sol - case fn(sol) > 0 && fn(a) < 0: - b = sol - case fn(sol) < 0 && fn(b) < 0: - b = sol - case fn(sol) > 0 && fn(b) < 0: - a = sol - default: - return sol, err - } - } - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/BubbleSort.go b/vendor/github.com/nuknal/goNum/BubbleSort.go deleted file mode 100644 index 3561a06..0000000 --- a/vendor/github.com/nuknal/goNum/BubbleSort.go +++ /dev/null @@ -1,77 +0,0 @@ -// BubbleSort -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-03-05 -版本 : 0.0.0 ------------------------------------------------------- - 冒泡排序法 -理论: - 时间复杂度: O(n^2) - 最好情况 : O(n) - 最坏情况 : O(n^2) - 空间复杂度: O(1) - 稳定性 : 稳定 ------------------------------------------------------- -输入 : - in 输入矩阵, 1xn -输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// BubbleSort 冒泡排序法 -func BubbleSort(in Matrix) (Matrix, bool) { - /* - 冒泡排序法 - 输入 : - in 输入矩阵, 1xn - 输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断初值维数 - if in.Rows != 1 { - panic("Error in goNum.BubbleSort: Input Matrix error") - } - if in.Columns < 1 { - panic("Error in goNum.BubbleSort: Empty input Matrix") - } else if in.Columns == 1 { - return in, true - } - - n := in.Columns - sol := ZeroMatrix(1, n) - var err bool = false - - //初始化sol - for i := 0; i < n; i++ { - sol.Data[i] = in.Data[i] - } - //排序开始, 方法1 - for i := 0; i < n-1; i++ { - for j := 0; j < n-i-1; j++ { - if sol.Data[j] > sol.Data[j+1] { - sol.Data[j], sol.Data[j+1] = sol.Data[j+1], sol.Data[j] - } - } - } - // 方法2 - // for isSort { - // isSort = false - // for j := 0; j < n-1; j++ { - // if sol.Data[j] > sol.Data[j+1] { - // sol.Data[j], sol.Data[j+1] = sol.Data[j+1], sol.Data[j] - // isSort = true - // } - // } - // } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/BucketSort.go b/vendor/github.com/nuknal/goNum/BucketSort.go deleted file mode 100644 index 71cade5..0000000 --- a/vendor/github.com/nuknal/goNum/BucketSort.go +++ /dev/null @@ -1,107 +0,0 @@ -// BucketSort -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-03-06 -版本 : 0.0.0 ------------------------------------------------------- - 桶排序法 -理论: - 时间复杂度: O(n+k) - 最好情况 : O(n) - 最坏情况 : O(n^2) - 空间复杂度: O(n+k) - 稳定性 : 稳定 ------------------------------------------------------- -输入 : - in 输入矩阵, 1xn - bucketSize 桶中元素数 -输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -注意: - 仅对整数排序有效 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// IntMin 整数切片中最小数 -func IntMin(in []int) int { - min := in[0] - for i := 1; i < len(in); i++ { - if min > in[i] { - min = in[i] - } - } - return min -} - -// bucketSort_sort -func bucketSort_sort(temp0 []int, bucketSize int) []int { - if (temp0 == nil) || (len(temp0) < 2) { - return temp0 - } - temp2 := make([]int, 0) - min := IntMin(temp0) - max := IntMax(temp0) - bucketCount := int(math.Floor(float64((max-min)/bucketSize))) + 1 - bucket := make([][]int, bucketCount) //第一维为桶数量,第二维为桶容量|| (bucketSize == 0) - - //排序开始 - //利用映射函数将数据分配到各个桶中 - for i := 0; i < len(temp0); i++ { - indi := int(math.Floor(float64((temp0[i] - min) / bucketSize))) - bucket[indi] = append(bucket[indi], temp0[i]) - } - //桶中排序 - for i := 0; i < bucketCount; i++ { - if bucketCount == 1 { - bucketSize-- - } - temp1 := bucketSort_sort(bucket[i], bucketSize) - for j := 0; j < len(temp1); j++ { - temp2 = append(temp2, temp1[j]) - } - } - return temp2 -} - -// BucketSort 桶排序法 -func BucketSort(in []int, bucketSize int) ([]int, bool) { - /* - 桶排序法 - 输入 : - in 输入矩阵, 1xn - bucketSize 桶中元素数 - 输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断初值维数 - if len(in) < 1 { - panic("Error in goNum.BucketSort: Empty input Matrix") - } else if len(in) == 1 { - return in, true - } - - n := len(in) - var err bool = false - soltemp := make([]int, n) - for i := 0; i < n; i++ { - soltemp[i] = in[i] - } - - //排序开始 - sol := bucketSort_sort(soltemp, bucketSize) - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/Cnm.go b/vendor/github.com/nuknal/goNum/Cnm.go deleted file mode 100644 index 2f7f04c..0000000 --- a/vendor/github.com/nuknal/goNum/Cnm.go +++ /dev/null @@ -1,38 +0,0 @@ -// Cnm -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-6 -版本 : 0.0.0 ------------------------------------------------------- - m - 计算组合 C 的值 - n ------------------------------------------------------- -输入 : - n 整数 - m 整数,m <= n -输出 : - ------------------------------------------------------- -*/ - -package goNum - -// Cnm -// m -// 计算组合 C 的值 -// n -func Cnm(n, m int) int { - /* - m - 计算组合 C 的值 - n - 输入 : - n 整数 - m 整数,m <= n - 输出 : - */ - //不直接使用阶乘计算可以稍许增加速度 - return Anm(n, m) / Factorial(m) -} diff --git a/vendor/github.com/nuknal/goNum/CountingSort.go b/vendor/github.com/nuknal/goNum/CountingSort.go deleted file mode 100644 index 509c01c..0000000 --- a/vendor/github.com/nuknal/goNum/CountingSort.go +++ /dev/null @@ -1,88 +0,0 @@ -// CountingSort -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-03-06 -版本 : 0.0.0 ------------------------------------------------------- - 计数排序法 -理论: - 时间复杂度: O(n+k) - 最好情况 : O(n+k) - 最坏情况 : O(n+k) - 空间复杂度: O(n+k) - 稳定性 : 稳定 ------------------------------------------------------- -输入 : - in 输入切片, 1xn -输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -注意: - 仅对整数排序有效 ------------------------------------------------------- -*/ - -package goNum - -// IntMax 整数切片中最大数 -func IntMax(in []int) int { - max := in[0] - for i := 1; i < len(in); i++ { - if in[i] > max { - max = in[i] - } - } - return max -} - -// CountingSort 计数排序法 -func CountingSort(in []int) ([]int, bool) { - /* - 计数排序法 - 输入 : - in 输入切片, 1xn - 输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断初值维数 - if len(in) < 1 { - panic("Error in goNum.CountingSort: Empty input Matrix") - } else if len(in) == 1 { - return in, true - } - - n := len(in) - sol := make([]int, n) - max := IntMax(in) - temp := make([]int, max+1) - ind := 0 - var err bool = false - - //初始化sol - for i := 0; i < n; i++ { - sol[i] = in[i] - } - //排序开始 - - for i := 0; i < n; i++ { - // if !temp[sol[i]] { - // temp[sol[i]] = 0 - // } - temp[sol[i]]++ - } - for i := 0; i < max+1; i++ { - for temp[i] > 0 { - sol[ind] = i - ind++ - temp[i]-- - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/DerivativePoly.go b/vendor/github.com/nuknal/goNum/DerivativePoly.go deleted file mode 100644 index 5399bad..0000000 --- a/vendor/github.com/nuknal/goNum/DerivativePoly.go +++ /dev/null @@ -1,65 +0,0 @@ -// DerivativePoly -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-25 -版本 : 0.0.0 ------------------------------------------------------- - 求单变量多项式n阶导数 -理论: - ------------------------------------------------------- -输入 : - A 按幂次连续增加的系数向量,(Nn+1)x1,Nn为最高幂次 - n 求导次数 -输出 : - sol 解,(Nn+1-n)x1 - err 解出标志:false-未解出或达到边界; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// DerivativePoly 求单变量多项式n阶导数 -func DerivativePoly(A Matrix, n int) (Matrix, bool) { - /* - 求单变量多项式n阶导数 - 输入 : - A 按幂次连续增加的系数向量,(Nn+1)x1,Nn为最高幂次 - n 求导次数 - 输出 : - sol 解,(Nn+1-n)x1 - err 解出标志:false-未解出或达到边界; - true-全部解出 - */ - //判断求导次数与最高幂次关系 - Nn := A.Rows - 1 - if n > Nn+1 { - panic("Error in goNum.DerivativePoly: Derivative number greater than polynomial's order") - } - //Nn+1 = n - if Nn+1 == n { - return NewMatrix(1, 1, []float64{0.0}), true - } - - sol := ZeroMatrix(Nn+1, 1) - var lenSol int = Nn + 1 - var err bool = false - - //赋予soltemp初值 - for i := 0; i < Nn+1; i++ { - sol.Data[i] = A.Data[i] - } - - //求导计算 - for i := 1; i < n+1; i++ { - for j := 1; j < lenSol; j++ { - sol.Data[j-1] = float64(j) * sol.Data[j] - } - lenSol-- - } - - err = true - return NewMatrix(lenSol, 1, sol.Data[:lenSol]), err -} diff --git a/vendor/github.com/nuknal/goNum/DetA.go b/vendor/github.com/nuknal/goNum/DetA.go deleted file mode 100644 index 4e2cffc..0000000 --- a/vendor/github.com/nuknal/goNum/DetA.go +++ /dev/null @@ -1,77 +0,0 @@ -// DetA -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-20 -版本 : 0.0.0 ------------------------------------------------------- - 求矩阵行列式值的列主元消去法 -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 52. ------------------------------------------------------- -输入 : - a 矩阵 -输出 : - sol 解值,值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// DetA 求矩阵行列式值的列主元消去法 -func DetA(a [][]float64) (float64, bool) { - /* - 求矩阵行列式值的列主元消去法 - 输入 : - a 矩阵 - 输出 : - sol 解值,值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var sol float64 = 1.0 - var err bool = false - var count0 int - n := len(a) - temp0 := make([]float64, n) - - // 判断是否方阵 - if len(a) != len(a[0]) { - return sol, err - } - - //主元消去 - for i := 0; i < n; i++ { - //求第i列的主元素并调整行顺序 - acol := make([]float64, n-i) - for icol := i; icol < n; icol++ { - acol[icol-i] = a[icol][i] - } - _, ii, _ := MaxAbs(acol) - if ii+i != i { - count0++ - temp0 = a[ii+i] - a[ii+i] = a[i] - a[i] = temp0 - } - - //列消去 - for j := i + 1; j < n; j++ { - mul := a[j][i] / a[i][i] - for k := i; k < n; k++ { - a[j][k] = a[j][k] - a[i][k]*mul - } - } - sol = math.Pow(-1.0, float64(count0)) * sol * a[i][i] - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/E_Mat.go b/vendor/github.com/nuknal/goNum/E_Mat.go deleted file mode 100644 index 9adbf78..0000000 --- a/vendor/github.com/nuknal/goNum/E_Mat.go +++ /dev/null @@ -1,50 +0,0 @@ -// E_Mat -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-20 -版本 : 0.0.0 ------------------------------------------------------- - 返回n阶单位矩阵 ------------------------------------------------------- -输入 : - n 阶数 -输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// E_Mat 返回n阶单位矩阵 -func E_Mat(n int) ([][]float64, bool) { - /* - 返回n阶单位矩阵 - 输入 : - n 阶数 - 输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - sol := make([][]float64, n) - for i := 0; i < n; i++ { - sol[i] = make([]float64, n) - } - var err bool = false - - //判断阶数 - if n < 1 { - return nil, err - } - - //分配元素 - for i := 0; i < n; i++ { - sol[i][i] = 1.0 - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/ErrorEvaluation.go b/vendor/github.com/nuknal/goNum/ErrorEvaluation.go deleted file mode 100644 index a986d07..0000000 --- a/vendor/github.com/nuknal/goNum/ErrorEvaluation.go +++ /dev/null @@ -1,88 +0,0 @@ -// ErrorEvaluation -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-23 -版本 : 0.0.0 ------------------------------------------------------- - 误差估计方法 -理论: - 0 最大误差: - E = max(Abs(f(xk)-y(xk))) - - 1 平均误差: - 1 N - E = --- Sum (Abs(f(xk)-y(xk))) - N k=1 - - 2 均方根误差: - 1 - E = Sqrt(--- Sum (f(xk)-y(xk))^2) - N - - 参考:John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. pp. 196 ------------------------------------------------------- -输入 : - FY 数据对,nx2,f(xk)---y(xk) -输出 : - sol 误差结果 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// MaxError 最大误差 -func MaxError(FY Matrix) float64 { - //最大误差 - //判断FY的维数 - if FY.Columns < 2 { - panic("Error in goNum.MaxError: FY is at least 2 columns") - } - - errs := ZeroMatrix(FY.Rows, 1) - var maxE float64 - for i := 0; i < FY.Rows; i++ { - errs.Data[i] = math.Abs(FY.GetFromMatrix(i, 1) - FY.GetFromMatrix(i, 0)) - } - maxE, _, _ = Max(errs.Data) - return maxE -} - -// MeanError 平均误差 -func MeanError(FY Matrix) float64 { - //平均误差 - //判断FY的维数 - if FY.Columns < 2 { - panic("Error in goNum.MaxError: FY is at least 2 columns") - } - - var meanE float64 - for i := 0; i < FY.Rows; i++ { - meanE += math.Abs(FY.GetFromMatrix(i, 1) - FY.GetFromMatrix(i, 0)) - } - meanE = meanE / float64(FY.Rows) - return meanE -} - -// RMSError 均方根误差 -func RMSError(FY Matrix) float64 { - //均方根误差 - //判断FY的维数 - if FY.Columns < 2 { - panic("Error in goNum.MaxError: FY is at least 2 columns") - } - - var rmsE float64 - for i := 0; i < FY.Rows; i++ { - temp0 := FY.GetFromMatrix(i, 1) - FY.GetFromMatrix(i, 0) - rmsE += temp0 * temp0 - } - rmsE = math.Sqrt(rmsE / float64(FY.Rows)) - return rmsE -} diff --git a/vendor/github.com/nuknal/goNum/Factorial.go b/vendor/github.com/nuknal/goNum/Factorial.go deleted file mode 100644 index 9977e0a..0000000 --- a/vendor/github.com/nuknal/goNum/Factorial.go +++ /dev/null @@ -1,36 +0,0 @@ -// Factorial -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-6 -版本 : 0.0.0 ------------------------------------------------------- - 计算自然数n的阶乘 ------------------------------------------------------- -输入 : - n 自然数 -输出 : - sol 阶乘结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// Factorial 计算自然数n的阶乘 -func Factorial(n int) int { - //判断n - if n < 0 { - panic("Error in goNum.Factorial: n < 1") - } - if n == 0 { - return 1 - } - //计算 - var sol int = 1 - for i := n; i > 1; i-- { - sol = sol * i - } - return sol -} diff --git a/vendor/github.com/nuknal/goNum/Fibonacci.go b/vendor/github.com/nuknal/goNum/Fibonacci.go deleted file mode 100644 index ecc5c49..0000000 --- a/vendor/github.com/nuknal/goNum/Fibonacci.go +++ /dev/null @@ -1,47 +0,0 @@ -// Fibonacci -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-24 -版本 : 0.0.0 ------------------------------------------------------- - 求Fibonacci数列 -理论: - ------------------------------------------------------- -输入 : - n Fibonacci数列参数 -输出 : - sol 解 ------------------------------------------------------- -*/ - -package goNum - -// Fibonacci 求Fibonacci数列 -func Fibonacci(n int) int { - /* - 求Fibonacci数列 - 输入 : - n Fibonacci数列参数 - 输出 : - sol 解 - */ - //判断n - F := make([]int, n+1) - if n == 0 { - F[0] = 0 - return 0 - } else if n == 1 { - F[1] = 1 - return 1 - } - - F[0] = 0 - F[1] = 1 - for i := 2; i < n+1; i++ { - F[i] = F[i-1] + F[i-2] - } - - return F[n] -} diff --git a/vendor/github.com/nuknal/goNum/FittingBezier.go b/vendor/github.com/nuknal/goNum/FittingBezier.go deleted file mode 100644 index ba54ae1..0000000 --- a/vendor/github.com/nuknal/goNum/FittingBezier.go +++ /dev/null @@ -1,97 +0,0 @@ -// FittingBezier -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-23 -版本 : 0.0.0 ------------------------------------------------------- - Bezier曲线拟合控制点 -理论: - 给定控制点集(xi, yi), i=0,1,...,N - 则Bezier曲线可以表示为: - | N - |x(t) = Sum xi*B_(i,N)(t) - | i=0 - | - | N - |y(t) = Sum yi*B_(i,N)(t) - | i=0 - 其中, - B_(i,N)(t)为Bernstein多项式: - N-i - B_(i,N)(t) = C *t^i*(1-t)^(N-i) - N - 0 <= t <= 1 - - 参考:John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 5.5 ------------------------------------------------------- -输入 : - XY 数据对,nx2,x-y -输出 : - sol 解,(N+1)x2,x(t)-y(t) - err 解出标志:false-未解出或达到边界; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -//BernsteinPoly Bernstein Polynomial -func BernsteinPoly(i, N int) Matrix { - cni := Cnm(N, i) - sol := ZeroMatrix(N+1, 1) - soltemp := ZeroMatrix(N+1, 1) - - soltemp.Data[0] = 1.0 - soltemp.Data[1] = -1.0 //1-t - //(1-t)^(N-i) - if N-i > 1 { - for j := 2; j < N-i+1; j++ { - for k := j; k > 0; k-- { - soltemp.Data[k] = soltemp.Data[k] - soltemp.Data[k-1] - } - } - } - //(1-t)^(N-i) * t^i - for j := N; j >= i; j-- { - sol.Data[j] = float64(cni) * soltemp.Data[j-i] - } - - return sol -} - -// FittingBezier Bezier曲线拟合控制点 -func FittingBezier(XY Matrix) (Matrix, bool) { - /* - Bezier曲线拟合控制点 - 输入 : - XY 数据对,nx2,x-y - 输出 : - sol 解,(N+1)x2,x(t)-y(t) - err 解出标志:false-未解出或达到边界; - true-全部解出 - */ - //判断维数 - if XY.Columns < 2 { - panic("Error in goNum.FittingBezier: At least 2 columns of XY needed") - } - n := XY.Rows - 1 //N-1 - sol := ZeroMatrix(n+1, 2) - var err bool = false - - //计算 - for i := 0; i < n+1; i++ { //n+1项BernsteinPoly - soltemp := BernsteinPoly(i, n) - xi := XY.GetFromMatrix(i, 0) - yi := XY.GetFromMatrix(i, 1) - for j := 0; j < n+1; j++ { //n次BernsteinPoly - sol.SetMatrix(j, 0, sol.GetFromMatrix(j, 0)+xi*soltemp.Data[j]) - sol.SetMatrix(j, 1, sol.GetFromMatrix(j, 1)+yi*soltemp.Data[j]) - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/FittingLSQ.go b/vendor/github.com/nuknal/goNum/FittingLSQ.go deleted file mode 100644 index 9308db2..0000000 --- a/vendor/github.com/nuknal/goNum/FittingLSQ.go +++ /dev/null @@ -1,82 +0,0 @@ -// FittingLSQ -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-23 -版本 : 0.0.0 ------------------------------------------------------- - 线性最小二乘拟合 -理论: - 设对N个数据对的线性拟合表示为 - y = Ax + B - - N N N - A*Sum xi^2 + B*Sum xi = Sum xiyi - i=1 i=1 i=1 - N N - A*Sum xi + NB = Sum yi - i=1 i=1 - 解此二元线性方程组即可得A、B - - 参考:John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 5.1 ------------------------------------------------------- -输入 : - XY 数据对,nx2,x-y -输出 : - sol 解,2x1 - err 解出标志:false-未解出或达到边界; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// FittingLSQ 线性最小二乘拟合 -func FittingLSQ(XY Matrix) (Matrix, bool) { - /* - 线性最小二乘拟合 - 输入 : - XY 数据对,nx2,x-y - 输出 : - sol 解,2x1 - err 解出标志:false-未解出或达到边界; - true-全部解出 - */ - //判断XY的维数 - if XY.Columns < 2 { - panic("Error in goNum.FittingLSQ: At least 2 columns of XY needed") - } - sol := ZeroMatrix(2, 1) - AS := ZeroMatrix(2, 2) - BS := ZeroMatrix(2, 1) - var err bool = false - var sx2, sx, sxy, sy float64 - n := XY.Rows - - //求累加和 - for i := 0; i < n; i++ { - sx2 += XY.GetFromMatrix(i, 0) * XY.GetFromMatrix(i, 0) - sx += XY.GetFromMatrix(i, 0) - sxy += XY.GetFromMatrix(i, 0) * XY.GetFromMatrix(i, 1) - sy += XY.GetFromMatrix(i, 1) - } - AS.SetMatrix(0, 0, sx2) - AS.SetMatrix(0, 1, sx) - AS.SetMatrix(1, 0, sx) - AS.SetMatrix(1, 1, float64(n)) - BS.SetMatrix(0, 0, sxy) - BS.SetMatrix(1, 0, sy) - - //解二元线性方程组 - soltemp, errtemp := LEs_ECPE(Matrix2ToSlices(AS), Matrix1ToSlices(BS)) - if errtemp != true { - panic("Error in goNum.FittingLSQ: Solve error") - } - sol.SetMatrix(0, 0, soltemp[1]) - sol.SetMatrix(1, 0, soltemp[0]) - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/FittingPolynomial.go b/vendor/github.com/nuknal/goNum/FittingPolynomial.go deleted file mode 100644 index 04972b9..0000000 --- a/vendor/github.com/nuknal/goNum/FittingPolynomial.go +++ /dev/null @@ -1,96 +0,0 @@ -// FittingPolynomial -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-11 -版本 : 0.0.0 ------------------------------------------------------- - 多项式拟合 -理论: - 对于单自变量单因变量的N个数据对 - 假设其一个低于N-1次的多项式为: - y(x) = a0 + a1x + a2x^2 + ... + amx^m (m < N-1) - 建立矛盾方程组Ax=b,即 - - N - Sum ai*xj^i = bj (i=0, 1, 2, ..., m) - j=1 - - 求解ai (i=0, 1, 2, ..., m)代入多项式即得拟合函数 - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 136-138. ------------------------------------------------------- -输入 : - xy 单自变量单因变量的N个数据对,Nx2 - m 多项式次数,m < N-1 -输出 : - sol 解向量,从0到m对应a0到am - RMS 均方误差 - MaxErr 最大误差 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -扩展 : - 可以修改为适应log、exp、sin等拟合方法 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// FittingPolynomial 多项式拟合 -func FittingPolynomial(xy Matrix, m int) (Matrix, float64, float64, bool) { - /* - 多项式拟合 - 输入 : - xy 单自变量单因变量的N个数据对,Nx2 - m 多项式次数,m < N-1 - 输出 : - sol 解向量,从0到m对应a0到am - RMS 均方误差 - MaxErr 最大误差 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断m是否小于N-1 - if (m > xy.Rows-2) || (m < 0) { - panic("Error in goNum.FittingPolynomial: Order m is wrong number") - } - - N := xy.Rows - - //构建矛盾方程组系数矩阵A, b=xy.ColumnOfMatrix(1) - A := ZeroMatrix(N, m+1) - for i := 0; i < N; i++ { - A.SetMatrix(i, 0, 1.0) - for j := 1; j < m+1; j++ { - temp := xy.GetFromMatrix(i, 0) - A.SetMatrix(i, j, math.Pow(temp, float64(j))) - } - } - //求解矛盾方程组 - sol, err := InconsistentLSQ(A, Slices1ToMatrix(xy.ColumnOfMatrix(1))) - //判断结果 - if err != true { - panic("Error in goNum.FittingPolynomial: Solve error") - } - - errSub := make([]float64, N) - var RMS float64 - for i := 0; i < N; i++ { - fit := sol.Data[0] - for j := 1; j < m+1; j++ { - fit += sol.Data[j] * math.Pow(xy.GetFromMatrix(i, 0), float64(j)) - } - errSub[i] = fit - xy.GetFromMatrix(i, 1) - RMS += errSub[i] * errSub[i] - } - RMS = math.Sqrt(RMS) - MaxErr, _, _ := MaxAbs(errSub) - - return sol, RMS, math.Abs(MaxErr), err -} diff --git a/vendor/github.com/nuknal/goNum/FittingTriPoly.go b/vendor/github.com/nuknal/goNum/FittingTriPoly.go deleted file mode 100644 index 9af534b..0000000 --- a/vendor/github.com/nuknal/goNum/FittingTriPoly.go +++ /dev/null @@ -1,89 +0,0 @@ -// FittingTriPoly -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-23 -版本 : 0.0.0 ------------------------------------------------------- - 基于傅立叶(Fourier)级数的三角多项式拟合 -理论: - 若f(x)周期为2pi,则存在M(2M= float64(N)/2.0 { - panic("Error in goNum.FittingTriPoly: M is wrong") - } - - sol := ZeroMatrix(M+1, 2) //b0=0.0 - var err bool = false - - //a0 - var a0 float64 - for k := 1; k < N; k++ { - // a0 += XY.GetFromMatrix(k, 1) * math.Cos(0.0*XY.GetFromMatrix(k, 0)) - a0 += XY.GetFromMatrix(k, 1) - } - sol.SetMatrix(0, 0, 2.0*a0/float64(N)) - - //aj, bj - for j := 1; j < M+1; j++ { - var aj, bj float64 - for k := 1; k < N; k++ { - aj += XY.GetFromMatrix(k, 1) * math.Cos(float64(j)*XY.GetFromMatrix(k, 0)) - bj += XY.GetFromMatrix(k, 1) * math.Sin(float64(j)*XY.GetFromMatrix(k, 0)) - } - sol.SetMatrix(j, 0, 2.0*aj/float64(N)) - sol.SetMatrix(j, 1, 2.0*bj/float64(N)) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/HeapSort.go b/vendor/github.com/nuknal/goNum/HeapSort.go deleted file mode 100644 index 5e4fd67..0000000 --- a/vendor/github.com/nuknal/goNum/HeapSort.go +++ /dev/null @@ -1,92 +0,0 @@ -// HeapSort -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-03-06 -版本 : 0.0.0 ------------------------------------------------------- - 堆排序法 -理论: - 时间复杂度: O(nlog2(n)) - 最好情况 : O(nlog2(n)) - 最坏情况 : O(nlog2(n)) - 空间复杂度: O(1) - 稳定性 : 不稳定 ------------------------------------------------------- -输入 : - in 输入矩阵, 1xn -输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// heapSort_maxHeap 建立最大顶堆 -func heapSort_maxHeap(sol *Matrix, n *int) { - for i := *n / 2; i >= 0; i-- { - heapSort_heapify(sol, i, n) - } -} - -// heapSort_heapify 堆调整 -func heapSort_heapify(sol *Matrix, i int, n *int) { - i0 := 2*i + 1 - i2 := 2*i + 2 - max := i - - if i0 < *n && (*sol).Data[i0] > (*sol).Data[i] { - max = i0 - } - if i2 < *n && (*sol).Data[i2] > (*sol).Data[i] { - max = i2 - } - - if max != i { - (*sol).Data[i], (*sol).Data[max] = (*sol).Data[max], (*sol).Data[i] - heapSort_heapify(sol, max, n) - } -} - -// HeapSort 堆排序法 -func HeapSort(in Matrix) (Matrix, bool) { - /* - 堆排序法 - 输入 : - in 输入矩阵, 1xn - 输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断初值维数 - if in.Rows != 1 { - panic("Error in goNum.HeapSort: Input Matrix error") - } - if in.Columns < 1 { - panic("Error in goNum.HeapSort: Empty input Matrix") - } else if in.Columns == 1 { - return in, true - } - - n := in.Columns - sol := ZeroMatrix(1, n) - var err bool = false - - //初始化sol - for i := 0; i < n; i++ { - sol.Data[i] = in.Data[i] - } - //排序开始 - heapSort_maxHeap(&sol, &n) - for i := in.Columns - 1; i > 0; i-- { - sol.Data[0], sol.Data[i] = sol.Data[i], sol.Data[0] - n-- - heapSort_heapify(&sol, 0, &n) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/InconsistentLSQ.go b/vendor/github.com/nuknal/goNum/InconsistentLSQ.go deleted file mode 100644 index 4d5f33b..0000000 --- a/vendor/github.com/nuknal/goNum/InconsistentLSQ.go +++ /dev/null @@ -1,74 +0,0 @@ -// InconsistentLSQ -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-11 -版本 : 0.0.0 ------------------------------------------------------- - 求解矛盾方程组的最小二乘法(Least Square Method) -理论: - 对于矛盾方程组Ax=b,即 - - n - Sum aij*xj = bi (i=1, 2, ..., N) - j=1 - - rank(A) = n (N > n) - - 则A'Ax=A'b的唯一解为原矛盾方程组的最小二乘解 - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 130-135. ------------------------------------------------------- -输入 : - A 原方程组系数矩阵,Nxn - b 原方程组值向量,Nx1 -输出 : - sol 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// InconsistentLSQ 求解矛盾方程组的最小二乘法(Least Square Method) -func InconsistentLSQ(A, b Matrix) (Matrix, bool) { - /* - 求解矛盾方程组的最小二乘法(Least Square Method) - 输入 : - A 原方程组系数矩阵,Nxn - b 原方程组值向量,Nx1 - 输出 : - sol 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断A和b的行数是否对应 - if A.Rows != b.Rows { - panic("Error in goNum.InconsistentLSQ: Rows of A and b are not equal") - } - - //求解A'A和A'b - AA := DotPruduct(A.Transpose(), A) - Ab := DotPruduct(A.Transpose(), b) - - //转换矩阵为切片 - Atemp := Matrix2ToSlices(AA) - btemp := Matrix1ToSlices(Ab) - if (len(Atemp) != A.Columns) || (len(Atemp[0]) != A.Columns) || (len(btemp) != A.Columns) { - panic("Error in goNum.InconsistentLSQ: Matrix to slices error") - } - //求解x向量,采用列主元消去法(LEs_ECPE) - soltemp, err := LEs_ECPE(Atemp, btemp) - if err != true { - panic("Error in goNum.InconsistentLSQ: Solve error") - } - //转换切片为矩阵 - sol := Slices1ToMatrix(soltemp) - if sol.Rows != A.Columns { - panic("Error in goNum.InconsistentLSQ: Slice to matrix error") - } - - return sol, true -} diff --git a/vendor/github.com/nuknal/goNum/InsertSort.go b/vendor/github.com/nuknal/goNum/InsertSort.go deleted file mode 100644 index 17d9620..0000000 --- a/vendor/github.com/nuknal/goNum/InsertSort.go +++ /dev/null @@ -1,69 +0,0 @@ -// InsertSort -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-03-05 -版本 : 0.0.0 ------------------------------------------------------- - 插入排序法 -理论: - 时间复杂度: O(n^2) - 最好情况 : O(n) - 最坏情况 : O(n^2) - 空间复杂度: O(1) - 稳定性 : 不稳定 ------------------------------------------------------- -输入 : - in 输入矩阵, 1xn -输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// InsertSort 插入排序法 -func InsertSort(in Matrix) (Matrix, bool) { - /* - 插入排序法 - 输入 : - in 输入矩阵, 1xn - 输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断初值维数 - if in.Rows != 1 { - panic("Error in goNum.InsertSort: Input Matrix error") - } - if in.Columns < 1 { - panic("Error in goNum.InsertSort: Empty input Matrix") - } else if in.Columns == 1 { - return in, true - } - - n := in.Columns - sol := ZeroMatrix(1, n) - var err bool = false - - //初始化sol - for i := 0; i < n; i++ { - sol.Data[i] = in.Data[i] - } - //排序开始 - for i := 1; i < n; i++ { - index := i - 1 - min := sol.Data[i] - for (index >= 0) && (sol.Data[index] > min) { - sol.Data[index+1] = sol.Data[index] - index-- - } - sol.Data[index+1] = min - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/IntegralCompositeNewtonCotes.go b/vendor/github.com/nuknal/goNum/IntegralCompositeNewtonCotes.go deleted file mode 100644 index 14f18a3..0000000 --- a/vendor/github.com/nuknal/goNum/IntegralCompositeNewtonCotes.go +++ /dev/null @@ -1,96 +0,0 @@ -// IntegralCompositeNewtonCotes -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-12 -版本 : 0.0.0 ------------------------------------------------------- - 1-8级复化Newton-Cotes求积分公式 -理论: - 对于积分 - b n - |f(x)dx ~= Sum Ak*f(xk) - a k=0 - - (n) - Ak = (b-a)C - k - - (n) (-1)^(n-k) n - C = ------------ |t(t-1)(t-2)...(t-(k-1))(t-(k+1))...(t-n)dt - k k!(n-k)!n 0 - - 特别的,n=1为复化梯形公式; - n=2为复化Simpson(辛浦生)公式; - n=4为复化Cotes(科特斯)公式 - - 将区间[a, b]等分为Nn个子区间,每个子区间上使用Newton-Cotes求积分公式 - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 155-156. ------------------------------------------------------- -输入 : - fun 被积分函数 - a, b 积分范围 - n Newton-Cotes公式级数 - Nn 子区间数 -输出 : - sol 解 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -注意 : - 由于误差得不到有效控制,稳定性无法保证,故而并不是n值越 - 大越好,实际应用中很少使用n值较大的Newton-Cotes公式 ------------------------------------------------------- -*/ - -package goNum - -// IntegralCompositeNewtonCotes 1-8级复化Newton-Cotes求积分公式 -func IntegralCompositeNewtonCotes(fun func(float64) float64, a, b float64, n, Nn int) (float64, bool) { - /* - 1-8级复化Newton-Cotes求积分公式 - 输入 : - fun 被积分函数 - a, b 积分范围 - n Newton-Cotes公式级数 - Nn 子区间数 - 输出 : - sol 解 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断n - if (n < 1) || (n > 8) { - panic("Error in goNum.IntegralNewtonCotes: n is not correct") - } - //判断a, b - if a == b { - return 0.0, true - } - //判断Nn - if Nn < 1 { - panic("Error in goNum.IntegralNewtonCotes: Nn is less than one") - } else if Nn == 1 { - return IntegralNewtonCotes(fun, a, b, n) - } - - var sol float64 - var err bool = false - - //子区间长度 - Hh := (b - a) / float64(Nn) - - //调用IntegralNewtonCotes循环累加 - for i := 1; i < Nn+1; i++ { - soltemp, errtemp := IntegralNewtonCotes(fun, a+Hh*float64(i-1), a+Hh*float64(i), n) - if errtemp != true { - panic("Error in goNum.IntegralNewtonCotes: Error in calling IntegralNewtonCotes") - } - sol += soltemp - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/IntegralCompositeNewtonCotesHalf.go b/vendor/github.com/nuknal/goNum/IntegralCompositeNewtonCotesHalf.go deleted file mode 100644 index 9995a25..0000000 --- a/vendor/github.com/nuknal/goNum/IntegralCompositeNewtonCotesHalf.go +++ /dev/null @@ -1,105 +0,0 @@ -// IntegralCompositeNewtonCotesHalf -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-12 -版本 : 0.0.0 ------------------------------------------------------- - 1-8级逐次分半复化Newton-Cotes求积分公式 -理论: - 对于积分 - b n - |f(x)dx ~= Sum Ak*f(xk) - a k=0 - - (n) - Ak = (b-a)C - k - - (n) (-1)^(n-k) n - C = ------------ |t(t-1)(t-2)...(t-(k-1))(t-(k+1))...(t-n)dt - k k!(n-k)!n 0 - - 特别的,n=1为复化梯形公式; - n=2为复化Simpson(辛浦生)公式; - n=4为复化Cotes(科特斯)公式 - - 将区间[a, b]等分为Nn个子区间,每个子区间上使用Newton-Cotes求积分公式 - 子区间逐次分半以满足精度要求 - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 159-160. ------------------------------------------------------- -输入 : - fun 被积分函数 - a, b 积分范围 - tol 精度要求 - n Newton-Cotes公式级数 - Nmax 最大循环次数 -输出 : - sol 解 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -注意 : - 由于误差得不到有效控制,稳定性无法保证,故而并不是n值越 - 大越好,实际应用中很少使用n值较大的Newton-Cotes公式 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// IntegralCompositeNewtonCotesHalf 1-8级逐次分半复化Newton-Cotes求积分公式 -func IntegralCompositeNewtonCotesHalf(fun func(float64) float64, a, b, tol float64, n, Nmax int) (float64, bool) { - /* - 1-8级逐次分半复化Newton-Cotes求积分公式 - 输入 : - fun 被积分函数 - a, b 积分范围 - tol 精度要求 - n Newton-Cotes公式级数 - Nmax 最大循环次数 - 输出 : - sol 解 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断n - if (n < 1) || (n > 8) { - panic("Error in goNum.IntegralNewtonCotes: n is not correct") - } - //判断a, b - if a == b { - return 0.0, true - } - - var sol0, sol1 float64 - var err bool = false - var Nn int = 1 - - //循环 - for k := 0; k < Nmax; k++ { - sol1 = 0.0 - //子区间长度 - Hh := (b - a) / float64(Nn) - //调用IntegralNewtonCotes循环累加 - for i := 1; i < Nn+1; i++ { - soltemp, errtemp := IntegralNewtonCotes(fun, a+Hh*float64(i-1), a+Hh*float64(i), n) - if errtemp != true { - panic("Error in goNum.IntegralNewtonCotes: Error in calling IntegralNewtonCotes") - } - sol1 += soltemp - } - if math.Abs(sol1-sol0) < tol { - return sol1, true - } - Nn = 2 * Nn - sol0 = sol1 - } - - return 0.0, err -} diff --git a/vendor/github.com/nuknal/goNum/IntegralGaussLagendre.go b/vendor/github.com/nuknal/goNum/IntegralGaussLagendre.go deleted file mode 100644 index 6c016df..0000000 --- a/vendor/github.com/nuknal/goNum/IntegralGaussLagendre.go +++ /dev/null @@ -1,130 +0,0 @@ -// IntegralGaussLagendre -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-12 -版本 : 0.0.0 ------------------------------------------------------- - 不超过8次的Gauss-Lagendre求积分公式 -理论: - 对于积分 - b - |f(x)dx - a - - 使用n+1次Lagendre多项式的零点作为高斯点,可获得代数 - 精度为2n+1的高斯型求积公式 - 其中区间[a, b]需要预先转换为区间[-1, 1] - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 162-164. ------------------------------------------------------- -输入 : - fun 被积分函数 - a, b 积分区间 - n 求积分公式次数 -输出 : - sol 解 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// IntegralGaussLagendre 不超过8次的Gauss-Lagendre求积分公式 -func IntegralGaussLagendre(fun func(float64) float64, a, b float64, n int) (float64, bool) { - /* - 不超过8次的Gauss-Lagendre求积分公式 - 输入 : - fun 被积分函数 - a, b 积分区间 - n 求积分公式次数 - 输出 : - sol 解 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断n范围 - if (n < 1) || (n > 8) { - panic("Error in goNum.IntegralGaussLagendre: n is a not correct input") - } - - xi := [][]float64{ - {0.0}, - {-0.5773502692, 0.5773502692}, - {-0.7745966692, 0.0, 0.7745966692}, - {-0.8611363116, -0.3399810436, 0.3399810436, 0.8611363116}, - {-0.9061798459, -0.5384693101, 0.0, 0.5384693101, 0.9061798459}, - {-0.9324695142, -0.6612093865, -0.2386191861, 0.2386191861, 0.6612093865, 0.9324695142}, - {-0.9491079123, -0.7415311856, -0.4058451514, 0.0, 0.4058451514, 0.7415311856, 0.9491079123}, - {-0.9602898566, -0.7966664774, -0.5255324099, -0.1834346425, 0.1834346425, 0.5255324099, 0.7966664774, 0.9602898566}, - } - Ai := [][]float64{ - {2.0}, - {1.0, 1.0}, - {0.555555555555556, 0.888888888888889, 0.555555555555556}, - {0.3478548451, 0.6521451549, 0.6521451549, 0.3478548451}, - {0.2369268851, 0.4786286705, 0.568888889, 0.4786286705, 0.2369268851}, - {0.1713244924, 0.3607615730, 0.4679139346, 0.4679139346, 0.3607615730, 0.1713244924}, - {0.1294849662, 0.2797053915, 0.3818300505, 0.4179591837, 0.3818300505, 0.2797053915, 0.1294849662}, - {0.1012285363, 0.2223810345, 0.3137066459, 0.3626837834, 0.3626837834, 0.3137066459, 0.2223810345, 0.1012285363}, - } - - //区间转换 - c := (b - a) / 2.0 - d := (a + b) / 2.0 - - switch n { - case 1: - sol := 0.0 - for i := 0; i < len(xi[0]); i++ { - sol += Ai[0][i] * fun(d+c*xi[0][i]) - } - return c * sol, true - case 2: - sol := 0.0 - for i := 0; i < len(xi[1]); i++ { - sol += Ai[1][i] * fun(d+c*xi[1][i]) - } - return c * sol, true - case 3: - sol := 0.0 - for i := 0; i < len(xi[2]); i++ { - sol += Ai[2][i] * fun(d+c*xi[2][i]) - } - return c * sol, true - case 4: - sol := 0.0 - for i := 0; i < len(xi[3]); i++ { - sol += Ai[3][i] * fun(d+c*xi[3][i]) - } - return c * sol, true - case 5: - sol := 0.0 - for i := 0; i < len(xi[4]); i++ { - sol += Ai[4][i] * fun(d+c*xi[4][i]) - } - return c * sol, true - case 6: - sol := 0.0 - for i := 0; i < len(xi[5]); i++ { - sol += Ai[5][i] * fun(d+c*xi[5][i]) - } - return c * sol, true - case 7: - sol := 0.0 - for i := 0; i < len(xi[6]); i++ { - sol += Ai[6][i] * fun(d+c*xi[6][i]) - } - return c * sol, true - case 8: - sol := 0.0 - for i := 0; i < len(xi[7]); i++ { - sol += Ai[7][i] * fun(d+c*xi[7][i]) - } - return c * sol, true - default: - return 0.0, false - } -} diff --git a/vendor/github.com/nuknal/goNum/IntegralNewtonCotes.go b/vendor/github.com/nuknal/goNum/IntegralNewtonCotes.go deleted file mode 100644 index ee93c50..0000000 --- a/vendor/github.com/nuknal/goNum/IntegralNewtonCotes.go +++ /dev/null @@ -1,145 +0,0 @@ -// IntegralNewtonCotes -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-11 -版本 : 0.0.0 ------------------------------------------------------- - 1-8级Newton-Cotes求积分公式 -理论: - 对于积分 - b n - |f(x)dx ~= Sum Ak*f(xk) - a k=0 - - (n) - Ak = (b-a)C - k - - (n) (-1)^(n-k) n - C = ------------ |t(t-1)(t-2)...(t-(k-1))(t-(k+1))...(t-n)dt - k k!(n-k)!n 0 - - 特别的,n=1为梯形公式; - n=2为Simpson(辛浦生)公式; - n=4为Cotes(科特斯)公式 - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 145-153. ------------------------------------------------------- -输入 : - fun 被积分函数 - a, b 积分范围 - n Newton-Cotes公式级数 -输出 : - sol 解 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -注意 : - 由于误差得不到有效控制,稳定性无法保证,故而并不是n值越 - 大越好,实际应用中很少使用n值较大的Newton-Cotes公式 ------------------------------------------------------- -*/ - -package goNum - -// IntegralNewtonCotes 1-8级Newton-Cotes求积分公式 -func IntegralNewtonCotes(fun func(float64) float64, a, b float64, n int) (float64, bool) { - /* - 1-8级Newton-Cotes求积分公式 - 输入 : - fun 被积分函数 - a, b 积分范围 - n Newton-Cotes公式级数 - 输出 : - sol 解 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断n - if (n < 1) || (n > 8) { - panic("Error in goNum.IntegralNewtonCotes: n is not correct") - } - //判断a, b - if a == b { - return 0.0, true - } - - var sol float64 - var err bool = false - - //计算xi - xi := ZeroMatrix(n+1, 1) - for i := 0; i < n+1; i++ { - xi.Data[i] = a + (b-a)*float64(i)/float64(n) - } - - //系数切片 - coeff := [][]float64{ - {1.0, 1.0}, - {1.0, 4.0, 1.0}, - {1.0, 3.0, 3.0, 1.0}, - {7.0, 32.0, 12.0, 32.0, 7.0}, - {19.0, 75.0, 50.0, 50.0, 75.0, 19.0}, - {41.0, 216.0, 27.0, 272.0, 27.0, 216.0, 41.0}, - {751.0, 3577.0, 1323.0, 2989.0, 2989.0, 1323.0, 3577.0, 751.0}, - {989.0, 5888.0, -928.0, 10496.0, -4540.0, 10496.0, -928.0, 5888.0, 989.0}, - } - - //计算积分值 - switch n { - case 1: - for i := 0; i < n+1; i++ { - sol += coeff[0][i] * fun(xi.Data[i]) - } - sol = sol * (b - a) / 2.0 - return sol, true - case 2: - for i := 0; i < n+1; i++ { - sol += coeff[1][i] * fun(xi.Data[i]) - } - sol = sol * (b - a) / 6.0 - return sol, true - case 3: - for i := 0; i < n+1; i++ { - sol += coeff[2][i] * fun(xi.Data[i]) - } - sol = sol * (b - a) / 8.0 - return sol, true - case 4: - for i := 0; i < n+1; i++ { - sol += coeff[3][i] * fun(xi.Data[i]) - } - sol = sol * (b - a) / 90.0 - return sol, true - case 5: - for i := 0; i < n+1; i++ { - sol += coeff[4][i] * fun(xi.Data[i]) - } - sol = sol * (b - a) / 288.0 - return sol, true - case 6: - for i := 0; i < n+1; i++ { - sol += coeff[5][i] * fun(xi.Data[i]) - } - sol = sol * (b - a) / 840.0 - return sol, true - case 7: - for i := 0; i < n+1; i++ { - sol += coeff[6][i] * fun(xi.Data[i]) - } - sol = sol * (b - a) / 17280.0 - return sol, true - case 8: - for i := 0; i < n+1; i++ { - sol += coeff[7][i] * fun(xi.Data[i]) - } - sol = sol * (b - a) / 28350.0 - return sol, true - default: - return 0.0, err - } - - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/IntegralRumberg.go b/vendor/github.com/nuknal/goNum/IntegralRumberg.go deleted file mode 100644 index 2fd0576..0000000 --- a/vendor/github.com/nuknal/goNum/IntegralRumberg.go +++ /dev/null @@ -1,132 +0,0 @@ -// IntegralRumberg -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-12 -版本 : 0.0.0 ------------------------------------------------------- - Rumberg(龙贝格)求积分公式 -理论: - 对于积分 - b - |f(x)dx - a - - b-a - T1 = -----(f(a)+f(b)) - 2 - - 1 b-a N b-a - T2N = ---TN + -----Sum f(a+(2j-1)------) - 2 2N j=1 2N - N=2^(k-1), k=1,2,3,... - - 1 4T2N-TN - SN = T2N + ---(T2N-TN) = -------- - 3 4-1 - - 1 4^2S2N-SN - CN = S2N + ----(S2N-SN) = ----------- - 15 4^2-1 - - 1 4^3C2N-CN - RN = C2N + ----(C2N-CN) = ----------- - 63 4^3-1 - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 162-164. ------------------------------------------------------- -输入 : - fun 被积分函数 - a, b 积分范围 - tol 控制误差 - Nn 最大循环步数 -输出 : - sol 解 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// IntegralRumberg Rumberg(龙贝格)求积分公式 -func IntegralRumberg(fun func(float64) float64, a, b, tol float64, Nn int) (float64, bool) { - /* - Rumberg(龙贝格)求积分公式 - 输入 : - fun 被积分函数 - a, b 积分范围 - tol 控制误差 - Nn 最大循环步数 - 输出 : - sol 解 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - - T := make([]float64, 0) //梯形序列 - S := make([]float64, 0) //辛浦生序列 - C := make([]float64, 0) //柯特斯序列 - R := make([]float64, 0) //龙贝格序列 - //第一步 - temp0 := (b - a) * (fun(a) + fun(b)) / 2.0 - T = append(T, temp0) //T[0]=T1 - //第二步, k=1 - temp0 = 0.0 - for j := 1; j < PowIInt(2, 0)+1; j++ { - temp0 += fun(a + (2.0*float64(j)-1.0)*(b-a)/2.0) - } - temp0 = T[0]/2.0 + temp0*(b-a)/2.0 - T = append(T, temp0) //T[1]=T2 - temp1 := T[1] + (T[1]-T[0])/3.0 - S = append(S, temp1) //S[0]=S1 - //第三步, k=2 - temp0 = 0.0 - for j := 1; j < PowIInt(2, 1)+1; j++ { - temp0 += fun(a + (2.0*float64(j)-1.0)*(b-a)/(2.0*2.0)) - } - temp0 = T[1]/2.0 + temp0*(b-a)/(2.0*2.0) - T = append(T, temp0) //T[2]=T4 - temp1 = T[2] + (T[2]-T[1])/3.0 - S = append(S, temp1) //S[1]=S2 - temp2 := S[1] + (S[1]-S[0])/15.0 - C = append(C, temp2) //C[0]=C1 - //第四步, k=3 - temp0 = 0.0 - for j := 1; j < PowIInt(2, 2)+1; j++ { - temp0 += fun(a + (2.0*float64(j)-1.0)*(b-a)/(2.0*4.0)) - } - temp0 = T[2]/2.0 + temp0*(b-a)/(2.0*4.0) - T = append(T, temp0) //T[3]=T8 - temp1 = T[3] + (T[3]-T[2])/3.0 - S = append(S, temp1) //S[2]=S4 - temp2 = S[2] + (S[2]-S[1])/15.0 - C = append(C, temp2) //C[1]=C2 - temp3 := C[1] + (C[1]-C[0])/63.0 - R = append(R, temp3) //R[0]=R1 - //进入Rumberg循环 - for i := 1; i < Nn; i++ { - temp0 = 0.0 - for j := 1; j < PowIInt(2, i+2)+1; j++ { - temp0 += fun(a + (2.0*float64(j)-1.0)*(b-a)/(2.0*PowIIntF(2, i+2))) - } - temp0 = T[i+2]/2.0 + temp0*(b-a)/(2.0*PowIIntF(2, i+2)) - T = append(T, temp0) //T[i+3] - temp1 = T[i+3] + (T[i+3]-T[i+2])/3.0 - S = append(S, temp1) //S[i+2] - temp2 = S[i+2] + (S[i+2]-S[i+1])/15.0 - C = append(C, temp2) //C[i+1] - temp3 = C[i+1] + (C[i+1]-C[i])/63.0 - R = append(R, temp3) //R[i] - - if math.Abs(R[i]-R[i-1]) < tol { - return R[i], true - } - } - return 0.0, false -} diff --git a/vendor/github.com/nuknal/goNum/InterpHermite.go b/vendor/github.com/nuknal/goNum/InterpHermite.go deleted file mode 100644 index c251fe0..0000000 --- a/vendor/github.com/nuknal/goNum/InterpHermite.go +++ /dev/null @@ -1,99 +0,0 @@ -// InterpHermite -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-7 -版本 : 0.0.0 ------------------------------------------------------- - 计算x点不高于2n+1次Hermite插值结果,拟合n+1个函数值数据 - 点和对应的n+1个一阶导数点 - 满阶插值,即阶数不高于2n+1 -理论: - n - H2n+1(x) = Sum (alphaj(x)*yj+betaj(x)*mj) - j=0 - yj, mj分别为函数值和一阶导数值 - n 1 - alphaj(x) = (1-2(x-xj)*Sum -------)lj^2(x) - k=0,k!=j xj-xk - betaj(x) = (x-xj)lj^2(x) - (x-x0)(x-x1)...(x-xn) - lj(x) = --------------------------, (被减数不含xj项) - (xj-x0)(xj-x1)...(xj-xn) - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 111-113. ------------------------------------------------------- -输入 : - A 数据点矩阵,(n+1)x3,第一列xi;第二列yi;第三列y'i - xq 插值点, xq!=xi -输出 : - sol xq点插值结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -//求解lj(xq) -func ljxq_InterpHermite(A Matrix, xq float64, j int) float64 { - sol := 1.0 - xj := A.GetFromMatrix(j, 0) - for i := 0; i < A.Rows; i++ { - xi := A.GetFromMatrix(i, 0) - if i != j { - sol = sol * (xq - xi) / (xj - xi) - } - } - return sol -} - -//求解alplhaj(xq) -func alphajxq_InterpHermite(A Matrix, xq float64, j int) float64 { - var temp0 float64 - xj := A.GetFromMatrix(j, 0) - for k := 0; k < A.Rows; k++ { - if k != j { - temp0 += 1.0 / (xj - A.GetFromMatrix(k, 0)) - } - } - temp1 := ljxq_InterpHermite(A, xq, j) - return (1.0 - 2.0*(xq-xj)*temp0) * temp1 * temp1 -} - -//求解betaj(xq) -func betajxq_InterpHermite(A Matrix, xq float64, j int) float64 { - xj := A.GetFromMatrix(j, 0) - temp0 := ljxq_InterpHermite(A, xq, j) - return (xq - xj) * temp0 * temp0 -} - -// InterpHermite 计算x点不高于2n+1次Hermite插值结果,拟合n+1个函数值数据点和对应的n+1个一阶导数点 -func InterpHermite(A Matrix, xq float64) (float64, bool) { - /* - 计算x点不高于2n+1次Hermite插值结果,拟合n+1个函数值数据点和对应的n+1个一阶导数点 - 输入 : - A 数据点矩阵,(n+1)x3,第一列xi;第二列yi;第三列y'i - xq 插值点, xq!=xi - 输出 : - sol xq点插值结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断A列数是否为3 - if A.Columns != 3 { - panic("Error in goNum.InterpHermite: give me xi, yi and y'i") - } - - var sol float64 - var err bool = false - - //开始计算 - for j := 0; j < A.Rows; j++ { - sol += alphajxq_InterpHermite(A, xq, j) * A.GetFromMatrix(j, 1) - sol += betajxq_InterpHermite(A, xq, j) * A.GetFromMatrix(j, 2) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/InterpHermiteFunc.go b/vendor/github.com/nuknal/goNum/InterpHermiteFunc.go deleted file mode 100644 index fb02bf7..0000000 --- a/vendor/github.com/nuknal/goNum/InterpHermiteFunc.go +++ /dev/null @@ -1,175 +0,0 @@ -// InterpHermiteFunc -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-7 -版本 : 0.0.0 ------------------------------------------------------- - 计算不高于2n+1次Hermite插值方程,拟合n+1个函数值数据 - 点和对应的n+1个一阶导数点 - 满阶插值,即阶数不高于2n+1 -理论: - n - H2n+1(x) = Sum (alphaj(x)*yj+betaj(x)*mj) - j=0 - - yj, mj分别为函数值和一阶导数值 - - n 1 - alphaj(x) = (1-2(x-xj)*Sum -------)lj^2(x) - k=0,k!=j xj-xk - - betaj(x) = (x-xj)lj^2(x) - - (x-x0)(x-x1)...(x-xn) - lj(x) = --------------------------, (被减数不含xj项) - (xj-x0)(xj-x1)...(xj-xn) - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 111-113. ------------------------------------------------------- -输入 : - A 数据点矩阵,(n+1)x3,第一列xi;第二列yi;第三列y'i -输出 : - B 插值方程系数结果,从前到后对应从0到2n+1阶,(2n+2)x1 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -//求解lj(x) -func ljx_InterpHermiteFunc(A Matrix, j int) Matrix { - Bljx := ZeroMatrix(A.Rows, 1) //出去j,加常数项总共n+1 - xj := A.GetFromMatrix(j, 0) - // j!=0 - temp0 := (xj - A.GetFromMatrix(0, 0)) //x0 - Bljx.Data[0] = -1.0 * A.GetFromMatrix(0, 0) - Bljx.Data[1] = 1.0 - // j==0 - if j == 0 { - temp0 = (xj - A.GetFromMatrix(1, 0)) //x1 - Bljx.Data[0] = -1.0 * A.GetFromMatrix(1, 0) - } - //其它 - for i := 1; i < A.Rows; i++ { - if (i != j) && (((j == 0) && (i > 1)) || (j > 0)) { - if i < j { - CA := ZeroMatrix(i+2, 1) //实际i+2行 - CB := ZeroMatrix(i+2, 1) //实际i+1行 - //先用x乘以之前每一项,相当于给每一项提升一阶,i+1 - //再用-xi乘以B的每一有效项,i+1 - CB.Data[0] = -1.0 * A.GetFromMatrix(i, 0) * Bljx.Data[0] - for ii := 1; ii < i+1; ii++ { - //单列可以这样,否则只能用SetMatrix和GetFromMatrix方法 - CA.Data[ii] = Bljx.Data[ii-1] - CB.Data[ii] = -1.0 * A.GetFromMatrix(i, 0) * Bljx.Data[ii] - } - CA.Data[i+1] = Bljx.Data[i] - //同阶相加赋予B - for ii := 0; ii < i+2; ii++ { - Bljx.Data[ii] = CA.Data[ii] + CB.Data[ii] - } - } else { //i>j - CA := ZeroMatrix(i+1, 1) //实际i+1行 - CB := ZeroMatrix(i+1, 1) //实际i行 - //先用x乘以之前每一项,相当于给每一项提升一阶,i+1 - //再用-xi乘以B的每一有效项,i - CB.Data[0] = -1.0 * A.GetFromMatrix(i, 0) * Bljx.Data[0] - for ii := 1; ii < i; ii++ { - //单列可以这样,否则只能用SetMatrix和GetFromMatrix方法 - CA.Data[ii] = Bljx.Data[ii-1] - CB.Data[ii] = -1.0 * A.GetFromMatrix(i, 0) * Bljx.Data[ii] - } - CA.Data[i] = Bljx.Data[i-1] - //同阶相加赋予B - for ii := 0; ii < i+1; ii++ { - Bljx.Data[ii] = CA.Data[ii] + CB.Data[ii] - } - } - temp0 = temp0 * (xj - A.GetFromMatrix(i, 0)) - } - } - for i := 0; i < Bljx.Rows; i++ { - Bljx.Data[i] = Bljx.Data[i] / temp0 - } - return Bljx -} - -//求解ljx^2 -func ljx2_InterpHermiteFunc(A Matrix, j int) Matrix { - ljx := ljx_InterpHermiteFunc(A, j) //n+1 rows - BA := ZeroMatrix(2*ljx.Rows-1, 1) //2n+1 rows - for i := ljx.Rows - 1; i >= 0; i-- { - for j := ljx.Rows - 1; j >= 0; j-- { - BA.Data[i+j] = BA.Data[i+j] + ljx.Data[i]*ljx.Data[j] - } - } - return BA -} - -//求解alphajx和betajx,合并是为了减少对ljx2_InterpHermiteFunc的调用 -func alphabetajx_InterpHermiteFunc(A Matrix, j int) (Matrix, Matrix) { - var temp0 float64 - ljx2 := ljx2_InterpHermiteFunc(A, j) //2n+1 rows - alphajx := ZeroMatrix(ljx2.Rows+1, 1) //2n+2 rows - betajx := ZeroMatrix(ljx2.Rows+1, 1) //2n+2 rows - xj := A.GetFromMatrix(j, 0) - - //计算alphajx中的求和 - for k := 0; k < A.Rows; k++ { - if k != j { - temp0 += 1.0 / (xj - A.GetFromMatrix(k, 0)) - } - } - temp0 = 2.0 * temp0 - - //alphajx = (temp0*xj+1 - temp0*x) * ljx2 - //betajx = (x-xj) * ljx2 - //2n+1阶,2n+2行 - alphajx.Data[alphajx.Rows-1] = -1.0 * temp0 * ljx2.Data[ljx2.Rows-1] - betajx.Data[betajx.Rows-1] = ljx2.Data[ljx2.Rows-1] - //其它非零阶, alphajx.Rows-2 == betajx.Rows-2 == ljx2.Rows-1 - for i := alphajx.Rows - 2; i > 0; i-- { - alphajx.Data[i] = (temp0*xj+1.0)*ljx2.Data[i] - 1.0*temp0*ljx2.Data[i-1] - betajx.Data[i] = -1.0*xj*ljx2.Data[i] + ljx2.Data[i-1] - } - //零阶 - alphajx.Data[0] = (temp0*xj + 1.0) * ljx2.Data[0] - betajx.Data[0] = -1.0 * xj * ljx2.Data[0] - - return alphajx, betajx -} - -// InterpHermiteFunc 计算不高于2n+1次Hermite插值方程,拟合n+1个函数值数据点和对应的n+1个一阶导数点 -func InterpHermiteFunc(A Matrix) (Matrix, bool) { - /* - 计算不高于2n+1次Hermite插值方程,拟合n+1个函数值数据点和对应的n+1个一阶导数点 - 输入 : - A 数据点矩阵,(n+1)x3,第一列xi;第二列yi;第三列y'i - 输出 : - B 插值方程系数结果,从前到后对应从0到2n+1阶,(2n+2)x1 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断A列数是否为3 - if A.Columns != 3 { - panic("Error in goNum.InterpHermite: give me xi, yi and y'i") - } - - var err bool = false - n := A.Rows - 1 - BA := ZeroMatrix(2*n+2, 1) - - for j := 0; j <= n; j++ { - alphajx, betajx := alphabetajx_InterpHermiteFunc(A, j) - for i := 0; i < alphajx.Rows; i++ { - BA.Data[i] = BA.Data[i] + alphajx.Data[i]*A.GetFromMatrix(j, 1) - BA.Data[i] = BA.Data[i] + betajx.Data[i]*A.GetFromMatrix(j, 2) - } - } - - err = true - return BA, err -} diff --git a/vendor/github.com/nuknal/goNum/InterpLagrange.go b/vendor/github.com/nuknal/goNum/InterpLagrange.go deleted file mode 100644 index 034c4c5..0000000 --- a/vendor/github.com/nuknal/goNum/InterpLagrange.go +++ /dev/null @@ -1,79 +0,0 @@ -// InterpLagrange -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-3 -版本 : 0.0.0 ------------------------------------------------------- - 求解n次拉格朗日Lagrange插值法拟合n+1个数据点 - 满阶插值,即阶数为给定点数-1 - 内插/外插 -理论: - n omega0n+1(xq) - Ln(xq) = Sum(-----------------------) - k=0 (xq-xk)*omega1n+1(xk) - - n - omega0n+1(xq) = Prod(xq-xi) - i=0 - - n - omega1n+1(xk) = Prod (xk-xi) - i=0,i!=k - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 94-100. ------------------------------------------------------- -输入 : - A 数据点矩阵,(n+1)x2,第一列xi;第二列yi - xq 插值点 - n 最大插值阶数 1 <= ... <= n -输出 : - sol 插值结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// InterpLagrange 求解n次拉格朗日Lagrange插值法拟合n+1个数据点 -func InterpLagrange(A Matrix, xq float64) (float64, bool) { - /* - 求解n次拉格朗日Lagrange插值法拟合n+1个数据点 - 输入 : - A 数据点矩阵,(n+1)x2,第一列xi;第二列yi - xq 插值点 - n 最大插值阶数 1 <= ... <= n - 输出 : - sol 插值结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - - var sol float64 - var err bool = false - n := A.Rows - 1 - - //计算系数矩阵 - for k := 0; k <= n; k++ { - //1. 计算分子 - var temp0 float64 = 1.0 - for i := 0; i <= n; i++ { - temp0 = temp0 * (xq - A.GetFromMatrix(i, 0)) - } - temp0 = temp0 / (xq - A.GetFromMatrix(k, 0)) - //2. 计算分母 - var temp1 float64 = 1.0 - for i := 0; i <= n; i++ { - if i != k { - temp1 = temp1 * (A.GetFromMatrix(k, 0) - A.GetFromMatrix(i, 0)) - } - } - //3. 求和 - sol += temp0 * A.GetFromMatrix(k, 1) / temp1 - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/InterpLagrangeFunc.go b/vendor/github.com/nuknal/goNum/InterpLagrangeFunc.go deleted file mode 100644 index d278a8e..0000000 --- a/vendor/github.com/nuknal/goNum/InterpLagrangeFunc.go +++ /dev/null @@ -1,140 +0,0 @@ -// InterpLagrangeFunc -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-4 -版本 : 0.0.0 ------------------------------------------------------- - 求解n次拉格朗日Lagrange插值方程系数,拟合n+1个数据点 - 满阶插值,即阶数为给定点数-1(因不能确定非满阶时所选取的 - 插值点是否合理) -理论: - n omega0n+1(x) - Ln(x) = Sum(----------------------) - k=0 (x-xk)*omega1n+1(xk) - - n - omega0n+1(x) = Prod(x-xi) - i=0 - - n - omega1n+1(xk) = Prod (xk-xi) - i=0,i!=k - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 94-100. ------------------------------------------------------- -输入 : - A 数据点矩阵,(n+1)x2,第一列xi;第二列yi -输出 : - B 插值系数矩阵,(n+1)x1,0~n - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -//计算分母 -func omega1_InterpLagrangeFunc(A Matrix, k, n int) float64 { - var sol float64 = 1.0 - for i := 0; i <= n; i++ { - if i != k { - sol = sol * (A.GetFromMatrix(k, 0) - A.GetFromMatrix(i, 0)) - } - } - return sol -} - -//计算分子并由高阶到低阶排序 -func omega0_InterpLagrangeFunc(A Matrix, k, n int) Matrix { - B := ZeroMatrix(n+1, 1) - //第零阶 x-x0 - if k == 0 { //如果k==0,则从x1循环 - B.SetMatrix(0, 0, -1.0*A.GetFromMatrix(1, 0)) - B.SetMatrix(1, 0, 1.0) - } - if k > 0 { //如果k>0,则从x0循环 - B.SetMatrix(0, 0, -1.0*A.GetFromMatrix(0, 0)) - B.SetMatrix(1, 0, 1.0) - } - //其他i!=k阶 - for i := 1; i <= n; i++ { - if (i != k) && ((k > 0) || ((k == 0) && (i > 1))) { - if k < i { - CA := ZeroMatrix(i+1, 1) //实际i+1行 - CB := ZeroMatrix(i+1, 1) //实际i行 - //先用x乘以之前每一项,相当于给每一项提升一阶,i+1 - for ii := 1; ii < i+1; ii++ { - //单列可以这样,否则只能用SetMatrix和GetFromMatrix方法 - CA.Data[ii] = B.Data[ii-1] - } - //再用-xi乘以B的每一有效项,i - for ii := 0; ii < i; ii++ { - //单列可以这样,否则只能用SetMatrix和GetFromMatrix方法 - CB.Data[ii] = -1.0 * A.GetFromMatrix(i, 0) * B.Data[ii] - } - //同阶相加赋予B - for ii := 0; ii < i+1; ii++ { - B.Data[ii] = CA.Data[ii] + CB.Data[ii] - } - } else { // k > i - CA := ZeroMatrix(i+2, 1) //实际i+2行 - CB := ZeroMatrix(i+2, 1) //实际i+1行 - //先用x乘以之前每一项,相当于给每一项提升一阶,i+1 - for ii := 1; ii < i+2; ii++ { - //单列可以这样,否则只能用SetMatrix和GetFromMatrix方法 - CA.Data[ii] = B.Data[ii-1] - } - //再用-xi乘以B的每一有效项,i+1 - for ii := 0; ii < i+1; ii++ { - //单列可以这样,否则只能用SetMatrix和GetFromMatrix方法 - CB.Data[ii] = -1.0 * A.GetFromMatrix(i, 0) * B.Data[ii] - } - //同阶相加赋予B - for ii := 0; ii < i+2; ii++ { - B.Data[ii] = CA.Data[ii] + CB.Data[ii] - } - } - - } - } - return B -} - -// InterpLagrangeFunc 求解n次拉格朗日Lagrange插值方程系数,拟合n+1个数据点 -func InterpLagrangeFunc(A Matrix) (Matrix, bool) { - /* - 求解n次拉格朗日Lagrange插值方程系数,拟合n+1个数据点 - 输入 : - A 数据点矩阵,(n+1)x2,第一列xi;第二列yi - 输出 : - B 插值系数矩阵,(n+1)x1 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - - //阶数 - n := A.Rows - 1 - - B := ZeroMatrix(n+1, 1) //最终系数矩阵 - var err bool = false - - //计算系数矩阵 - for k := 0; k <= n; k++ { - //1. 计算分母和系数乘积 - temp0 := A.GetFromMatrix(k, 1) / omega1_InterpLagrangeFunc(A, k, n) - //2. 计算分子并乘以上一步的结果,由高阶到低阶排序 - temp1 := omega0_InterpLagrangeFunc(A, k, n) - for i := 0; i < temp1.Rows; i++ { - temp1.Data[i] = temp1.Data[i] * temp0 - } - //3. 累加 - for i := 0; i < B.Rows; i++ { - B.Data[i] += temp1.Data[i] - } - } - - err = true - return B, err -} diff --git a/vendor/github.com/nuknal/goNum/InterpNewton.go b/vendor/github.com/nuknal/goNum/InterpNewton.go deleted file mode 100644 index 0bfa68f..0000000 --- a/vendor/github.com/nuknal/goNum/InterpNewton.go +++ /dev/null @@ -1,95 +0,0 @@ -// InterpNewton -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-6 -版本 : 0.0.0 ------------------------------------------------------- - 计算x点n次Newton插值结果,拟合n+1个数据点 - 满阶插值,即阶数为给定点数-1 -理论: - f(x) = f(x0) + f[x, x0](x-x0) - f[x, x0] = f[x0, x1] + f[x, x0, x1](x-x1) - ... - f(x) = f(x0) + f[x0, x0](x-x0) + - f[x0, x1, x2](x-x0)(x-x1) + - ... + - f[x0, x1, ..., xn](x-x0)(x-x1)...(x-x_(n-1)) - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 101-105. ------------------------------------------------------- -输入 : - A 数据点矩阵,(n+1)x2,第一列xi;第二列yi - xq 插值点, xq!=xi -输出 : - sol xq点插值结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -//求差商 -func diffq_InterpNewton(A Matrix, k int) float64 { - var sol float64 - for j := 0; j <= k; j++ { - xj := A.GetFromMatrix(j, 0) - //为保证理论可读性,并不采取调用omega1_InterpLagrangeFunc函数的方式 - var temp0 float64 = 1.0 - for i := 0; i <= k; i++ { - if i != j { - temp0 = temp0 * (xj - A.GetFromMatrix(i, 0)) - } - } - sol += A.GetFromMatrix(j, 1) / temp0 - } - return sol -} - -// InterpNewton 计算x点n次Newton插值结果,拟合n+1个数据点 -func InterpNewton(A Matrix, xq float64) (float64, bool) { - /* - 计算x点n次Newton插值结果,拟合n+1个数据点 - 输入 : - A 数据点矩阵,(n+1)x2,第一列xi;第二列yi - xq 插值点, xq!=xi - 输出 : - sol xq点插值结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - - //判断xq是否等于xi - for i := 0; i < A.Rows; i++ { - if math.Abs(xq-A.GetFromMatrix(i, 0)) < 1e-3 { - panic("Error in goNum.InterpNewton: xq equals about xi") - } - } - - var sol float64 - var err bool = false - n := A.Rows - 1 - BA := ZeroMatrix(n+1, 1) - - //开始计算 - BA.SetMatrix(0, 0, A.GetFromMatrix(0, 1)) //f(x0) - sol = BA.GetFromMatrix(0, 0) - for k := 1; k < n+1; k++ { - //求差商 - BA.SetMatrix(k, 0, diffq_InterpNewton(A, k)) - //求乘积 - for j := 0; j < k; j++ { - BA.Data[k] = BA.Data[k] * (xq - A.GetFromMatrix(j, 0)) - } - //累加 - sol += BA.Data[k] - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/InterpNewtonForward.go b/vendor/github.com/nuknal/goNum/InterpNewtonForward.go deleted file mode 100644 index 534aaa3..0000000 --- a/vendor/github.com/nuknal/goNum/InterpNewtonForward.go +++ /dev/null @@ -1,94 +0,0 @@ -// InterpNewtonForward -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-6 -版本 : 0.0.0 ------------------------------------------------------- - 计算x点n次Newton前向插值结果,拟合n+1个等距数据点 - Newton前向等距节点插值,满阶插值,即阶数为给定点数-1 -理论: - (-1)^y0 (-1)^2y0 - f(x) = f(x0) + --------(x-x0)/h + ---------(x-x0)(x-x1) + - h 2!h^2 - ... + - (-1)^ny0 - ----------(x-x0)(x-x1)...(x-x_(n-1)) - n!h^n - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 107-110. ------------------------------------------------------- -输入 : - A 数据点矩阵,(n+1)x2,第一列xi等距分布;第二列yi - xq 插值点, xq!=xi -输出 : - sol xq点插值结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import "math" - -//k阶差分 -func difff_InterpNewtonForward(A Matrix, k int) float64 { - sol := A.GetFromMatrix(k, 1) //yk - for s := 1; s <= k; s++ { - sol += math.Pow(-1.0, float64(s)) * float64(Cnm(k, s)) * A.GetFromMatrix(k-s, 1) - } - return sol -} - -// InterpNewtonForward 计算x点n次Newton前向插值结果,拟合n+1个等距数据点 -func InterpNewtonForward(A Matrix, xq float64) (float64, bool) { - /* - 计算x点n次Newton前向插值结果,拟合n+1个等距数据点 - 输入 : - A 数据点矩阵,(n+1)x2,第一列xi等距分布;第二列yi - xq 插值点, xq!=xi - 输出 : - sol xq点插值结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断xq是否等于xi - for i := 0; i < A.Rows; i++ { - if math.Abs(xq-A.GetFromMatrix(i, 0)) < 1e-3 { - return A.GetFromMatrix(i, 1), true - } - } - //判断xi是否等距节点 - for i := 0; i < A.Rows; i++ { - x0 := A.GetFromMatrix(0, 0) - if math.Abs(A.GetFromMatrix(i, 0)-float64(i)*x0) < 1e-3 { - panic("Error in goNum.InterpNewtonForward: xi is not in equidistance") - } - } - - var sol float64 - var err bool = false - n := A.Rows - 1 - h := A.GetFromMatrix(n, 0) - A.GetFromMatrix(n-1, 0) - BA := ZeroMatrix(n+1, 1) - - //计算 - BA.SetMatrix(0, 0, A.GetFromMatrix(0, 1)) //f(x0) - sol = BA.GetFromMatrix(0, 0) - for k := 1; k < n+1; k++ { - //求差分 - BA.SetMatrix(k, 0, difff_InterpNewtonForward(A, k)) - //乘系数1/(k!h^k) - BA.Data[k] = BA.Data[k] / (float64(Factorial(k)) * math.Pow(h, float64(k))) - //求乘积 - for j := 0; j < k; j++ { - BA.Data[k] = BA.Data[k] * (xq - A.GetFromMatrix(j, 0)) - } - //累加 - sol += BA.Data[k] - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/InterpSpline11.go b/vendor/github.com/nuknal/goNum/InterpSpline11.go deleted file mode 100644 index 936ea5b..0000000 --- a/vendor/github.com/nuknal/goNum/InterpSpline11.go +++ /dev/null @@ -1,217 +0,0 @@ -// InterpSpline11 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-8 -版本 : 0.0.0 ------------------------------------------------------- - 用节点处的一阶导数表示的三次样条插值函数, - 一阶导数边界条件 - n+1个点, n个区间 -理论: - 区间[x(i-1), xi]上的三次样条函数表达为: - (x-xi)^2 * [hi+2(x-x(i-1))] - Si(x) = -----------------------------y(i-1) + - hi^3 - (x-x(i-1))^2 * [hi+2(xi-x)] - -----------------------------yi + - hi^3 - (x-xi)^2 * (x-x(i-1)) - -----------------------m(i-1) + - hi^2 - (x-x(i-1))^2 * (x-xi) - -----------------------mi - hi^2 - - 令 lambdai = h(i+1)/(hi+h(i+1)) - Mi = 1-lambdai = hi/(hi+h(i+1)) - y(i+1)-yi yi-y(i-1) - fi = 3(Mi---------- + lambdai-----------) - h(i+1) hi - (i = 1,...,n-1) - - 则mi可由n-1阶线性方程组求得(利用LEs_Chasing): - |2 M1 || m1 | | f1-l1*m0 | - | l2 2 M2 || m2 | = | f2 | - | ........ || ... | | ... | - | l(n-2) 2 M(n-2)||m(n-2)| | f(n-2) | - | l(n-1) 2 ||m(n-1)| |f(n-1)-M(n-1)mn| - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 116-123. ------------------------------------------------------- -输入 : - A 数据点矩阵,(n+1)x3,第一列xi;第二列yi; - 第三列y'i,且y'i只需给出y'0和y'n -输出 : - B 插值方程系数结果矩阵,从前到后对应从0到3阶,4xn - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// InterpSpline11 用节点处的一阶导数表示的三次样条插值函数, 一阶导数边界条件 -func InterpSpline11(A Matrix) (Matrix, bool) { - /* - 用节点处的一阶导数表示的三次样条插值函数, 一阶导数边界条件 - 输入 : - A 数据点矩阵,(n+1)x3,第一列xi;第二列yi; - 第三列y'i,且y'i只需给出y'0和y'n - 输出 : - B 插值方程系数结果矩阵,从前到后对应从0到3阶,4xn - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var err bool = false - n := A.Rows - 1 - sol := ZeroMatrix(4, n) - BA := ZeroMatrix(n-1, n-1) //对角占优的三对角矩阵 - BB := ZeroMatrix(n-1, 1) //解向量 - BC := ZeroMatrix(n-1, 1) //值向量 - - //1解插值函数的一阶导数mi - //1.0.1第一行 - if true { //限制变量使用范围 - h1 := A.GetFromMatrix(1, 0) - A.GetFromMatrix(0, 0) - h2 := A.GetFromMatrix(2, 0) - A.GetFromMatrix(1, 0) - y0 := A.GetFromMatrix(0, 1) - y1 := A.GetFromMatrix(1, 1) - y2 := A.GetFromMatrix(2, 1) - - l1 := h2 / (h1 + h2) - M1 := 1.0 - l1 - f1 := 3.0 * (M1*(y2-y1)/h2 + l1*(y1-y0)/h1) - - BA.SetMatrix(0, 0, 2.0) - BA.SetMatrix(0, 1, M1) - BC.Data[0] = f1 - l1*A.GetFromMatrix(0, 2) - } - //1.0.2其它行 - for i := 2; i < n-1; i++ { - yi_1 := A.GetFromMatrix(i-1, 0) - yi := A.GetFromMatrix(i, 0) - yi1 := A.GetFromMatrix(i+1, 0) - - hi := A.GetFromMatrix(i, 0) - A.GetFromMatrix(i-1, 0) - hi1 := A.GetFromMatrix(i+1, 0) - A.GetFromMatrix(i, 0) - - lambdai := hi1 / (hi + hi1) - Mi := 1.0 - lambdai - fi := 3.0 * (Mi*(yi1-yi)/hi1 + lambdai*(yi-yi_1)/hi) - //赋予BA - BA.SetMatrix(i-1, i-2, lambdai) - BA.SetMatrix(i-1, i-1, 2.0) - BA.SetMatrix(i-1, i, Mi) - BC.Data[i-1] = fi - } - //1.0.3最后一行 - if true { //i=n-1 - hn_1 := A.GetFromMatrix(n-1, 0) - A.GetFromMatrix(n-2, 0) - hn := A.GetFromMatrix(n, 0) - A.GetFromMatrix(n-1, 0) - yn_2 := A.GetFromMatrix(n-2, 1) - yn_1 := A.GetFromMatrix(n-1, 1) - yn := A.GetFromMatrix(n, 1) - - lambdan_1 := hn / (hn_1 + hn) - Mn_1 := 1.0 - lambdan_1 - fn_1 := 3.0 * (Mn_1*(yn-yn_1)/hn + lambdan_1*(yn_1-yn_2)/hn_1) - - BA.SetMatrix(n-2, n-3, lambdan_1) - BA.SetMatrix(n-2, n-2, 2.0) - BC.Data[n-2] = fn_1 - Mn_1*A.GetFromMatrix(n, 2) - } - //1.1求解 - soltemp, errtemp := LEs_Chasing(BA, BC) - if errtemp != true { - panic("Error in goNum.InterpSpline11: Solve Error with goNum.LEs_Chasing") - } - for i := 0; i < n-1; i++ { - BB.Data[i] = soltemp.Data[i] - } - - //2求解Si(x) - S0 := ZeroMatrix(4, 1) - S1 := ZeroMatrix(4, 1) - S2 := ZeroMatrix(4, 1) - S3 := ZeroMatrix(4, 1) - for i := 1; i < n+1; i++ { - xi_1 := A.GetFromMatrix(i-1, 0) - xi := A.GetFromMatrix(i, 0) - yi_1 := A.GetFromMatrix(i-1, 1) - yi := A.GetFromMatrix(i, 1) - mi_1 := 0.0 - mi := 0.0 - if i == 1 { - mi_1 = A.GetFromMatrix(0, 2) - mi = BB.Data[i-1] - } else if i == n { - mi_1 = BB.Data[i-2] - mi = A.GetFromMatrix(n, 2) - } else { - mi_1 = BB.Data[i-2] - mi = BB.Data[i-1] - } - hi := xi - xi_1 - temp0 := ZeroMatrix(4, 1) - temp1 := ZeroMatrix(4, 1) - //2.1 S0 - temp0.Data[2] = 1.0 - temp0.Data[1] = -2.0 * xi - temp0.Data[0] = xi * xi - for j := 3; j > 0; j-- { - temp0.Data[j] = 2.0 * temp0.Data[j-1] - temp1.Data[j-1] = (hi - 2.0*xi_1) * temp0.Data[j-1] - S0.Data[j] = (temp0.Data[j] + temp1.Data[j]) * yi_1 / math.Pow(hi, 3.0) - } - S0.Data[0] = temp1.Data[0] * yi_1 / math.Pow(hi, 3.0) - //2.1 S1 - temp0 = ZeroMatrix(4, 1) - temp1 = ZeroMatrix(4, 1) - temp0.Data[2] = 1.0 - temp0.Data[1] = -2.0 * xi_1 - temp0.Data[0] = xi_1 * xi_1 - for j := 3; j > 0; j-- { - temp0.Data[j] = -2.0 * temp0.Data[j-1] - temp1.Data[j-1] = (hi + 2.0*xi) * temp0.Data[j-1] - S1.Data[j] = (temp0.Data[j] + temp1.Data[j]) * yi / math.Pow(hi, 3.0) - } - S1.Data[0] = temp1.Data[0] * yi / math.Pow(hi, 3.0) - //2.2 S2 - temp0 = ZeroMatrix(4, 1) - temp1 = ZeroMatrix(4, 1) - temp0.Data[2] = 1.0 - temp0.Data[1] = -2.0 * xi - temp0.Data[0] = xi * xi - for j := 3; j > 0; j-- { - temp0.Data[j] = temp0.Data[j-1] - temp1.Data[j-1] = -1.0 * xi_1 * temp0.Data[j-1] - S2.Data[j] = (temp0.Data[j] + temp1.Data[j]) * mi_1 / math.Pow(hi, 2.0) - } - S2.Data[0] = temp1.Data[0] * mi_1 / math.Pow(hi, 2.0) - //2.3 S3 - temp0 = ZeroMatrix(4, 1) - temp1 = ZeroMatrix(4, 1) - temp0.Data[2] = 1.0 - temp0.Data[1] = -2.0 * xi_1 - temp0.Data[0] = xi_1 * xi_1 - for j := 3; j > 0; j-- { - temp0.Data[j] = temp0.Data[j-1] - temp1.Data[j-1] = -1.0 * xi * temp0.Data[j-1] - S3.Data[j] = (temp0.Data[j] + temp1.Data[j]) * mi / math.Pow(hi, 2.0) - } - S3.Data[0] = temp1.Data[0] * mi / math.Pow(hi, 2.0) - //2.4 Si(x) - for j := 0; j < 4; j++ { - sol.SetMatrix(j, i-1, S0.Data[j]+S1.Data[j]+S2.Data[j]+S3.Data[j]) - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/InterpSpline12.go b/vendor/github.com/nuknal/goNum/InterpSpline12.go deleted file mode 100644 index d38b03c..0000000 --- a/vendor/github.com/nuknal/goNum/InterpSpline12.go +++ /dev/null @@ -1,199 +0,0 @@ -// InterpSpline12 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-8 -版本 : 0.0.0 ------------------------------------------------------- - 用节点处的一阶导数表示的三次样条插值函数, - 二阶导数边界条件 - n+1个点, n个区间 -理论: - 区间[x(i-1), xi]上的三次样条函数表达为: - (x-xi)^2 * [hi+2(x-x(i-1))] - Si(x) = -----------------------------y(i-1) + - hi^3 - (x-x(i-1))^2 * [hi+2(xi-x)] - -----------------------------yi + - hi^3 - (x-xi)^2 * (x-x(i-1)) - -----------------------m(i-1) + - hi^2 - (x-x(i-1))^2 * (x-xi) - -----------------------mi - hi^2 - - 令 lambdai = h(i+1)/(hi+h(i+1)) - Mi = 1-lambdai = hi/(hi+h(i+1)) - y(i+1)-yi yi-y(i-1) - fi = 3(Mi---------- + lambdai-----------) - h(i+1) hi - (i = 1,...,n-1) - - 则mi可由n+1阶线性方程组求得(利用LEs_Chasing): - |2 1 || m0 | | f0 | - |l1 2 M1 || m1 | | f1 | - | l2 2 M2 || m2 | = | f2 | - | ........ || ... | | ... | - | l(n-1) 2 M(n-1)||m(n-1)| |f(n-1)| - | 1 2 || mn | | fn | - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 116-123. ------------------------------------------------------- -输入 : - A 数据点矩阵,(n+1)x3,第一列xi;第二列yi; - 第三列y''i,且y''i只需给出y''0和y''n -输出 : - B 插值方程系数结果矩阵,从前到后对应从0到3阶,4xn - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import "math" - -// InterpSpline12 用节点处的一阶导数表示的三次样条插值函数,二阶导数边界条件 -func InterpSpline12(A Matrix) (Matrix, bool) { - /* - 用节点处的一阶导数表示的三次样条插值函数,二阶导数边界条件 - 输入 : - A 数据点矩阵,(n+1)x3,第一列xi;第二列yi; - 第三列y'i,且y'i只需给出y'0和y'n - 输出 : - B 插值方程系数结果矩阵,从前到后对应从0到3阶,4xn - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var err bool = false - n := A.Rows - 1 - sol := ZeroMatrix(4, n) - BA := ZeroMatrix(n+1, n+1) //对角占优的三对角矩阵 - BB := ZeroMatrix(n+1, 1) //解向量 - BC := ZeroMatrix(n+1, 1) //值向量 - - //1解插值函数的一阶导数mi - //1.0.1第一行 - if true { //限制变量使用范围 - h1 := A.GetFromMatrix(1, 0) - A.GetFromMatrix(0, 0) - y0 := A.GetFromMatrix(0, 1) - y1 := A.GetFromMatrix(1, 1) - - f0 := 3.0*(y1-y0)/h1 - h1*A.GetFromMatrix(0, 2)/2.0 - - BA.SetMatrix(0, 0, 2.0) - BA.SetMatrix(0, 1, 1.0) - BC.Data[0] = f0 - } - //1.0.2其它行 - for i := 1; i < n; i++ { - yi_1 := A.GetFromMatrix(i-1, 0) - yi := A.GetFromMatrix(i, 0) - yi1 := A.GetFromMatrix(i+1, 0) - - hi := A.GetFromMatrix(i, 0) - A.GetFromMatrix(i-1, 0) - hi1 := A.GetFromMatrix(i+1, 0) - A.GetFromMatrix(i, 0) - - lambdai := hi1 / (hi + hi1) - Mi := 1.0 - lambdai - fi := 3.0 * (Mi*(yi1-yi)/hi1 + lambdai*(yi-yi_1)/hi) - //赋予BA - BA.SetMatrix(i, i-1, lambdai) - BA.SetMatrix(i, i, 2.0) - BA.SetMatrix(i, i+1, Mi) - BC.Data[i] = fi - } - //1.0.3最后一行 - if true { //i=n - hn := A.GetFromMatrix(n, 0) - A.GetFromMatrix(n-1, 0) - yn_1 := A.GetFromMatrix(n-1, 1) - yn := A.GetFromMatrix(n, 1) - - fn := 3.0*(yn-yn_1)/hn + hn*A.GetFromMatrix(n, 2)/2.0 - - BA.SetMatrix(n, n-1, 1.0) - BA.SetMatrix(n, n, 2.0) - BC.Data[n] = fn - } - //1.1求解 - soltemp, errtemp := LEs_Chasing(BA, BC) - if errtemp != true { - panic("Error in goNum.InterpSpline12: Solve Error with goNum.LEs_Chasing") - } - for i := 0; i < n+1; i++ { - BB.Data[i] = soltemp.Data[i] - } - - //2求解Si(x) - S0 := ZeroMatrix(4, 1) - S1 := ZeroMatrix(4, 1) - S2 := ZeroMatrix(4, 1) - S3 := ZeroMatrix(4, 1) - for i := 1; i < n+1; i++ { - xi_1 := A.GetFromMatrix(i-1, 0) - xi := A.GetFromMatrix(i, 0) - yi_1 := A.GetFromMatrix(i-1, 1) - yi := A.GetFromMatrix(i, 1) - mi_1 := BB.Data[i-1] - mi := BB.Data[i] - hi := xi - xi_1 - - temp0 := ZeroMatrix(4, 1) - temp1 := ZeroMatrix(4, 1) - //2.1 S0 - temp0.Data[2] = 1.0 - temp0.Data[1] = -2.0 * xi - temp0.Data[0] = xi * xi - for j := 3; j > 0; j-- { - temp0.Data[j] = 2.0 * temp0.Data[j-1] - temp1.Data[j-1] = (hi - 2.0*xi_1) * temp0.Data[j-1] - S0.Data[j] = (temp0.Data[j] + temp1.Data[j]) * yi_1 / math.Pow(hi, 3.0) - } - S0.Data[0] = temp1.Data[0] * yi_1 / math.Pow(hi, 3.0) - //2.1 S1 - temp0 = ZeroMatrix(4, 1) - temp1 = ZeroMatrix(4, 1) - temp0.Data[2] = 1.0 - temp0.Data[1] = -2.0 * xi_1 - temp0.Data[0] = xi_1 * xi_1 - for j := 3; j > 0; j-- { - temp0.Data[j] = -2.0 * temp0.Data[j-1] - temp1.Data[j-1] = (hi + 2.0*xi) * temp0.Data[j-1] - S1.Data[j] = (temp0.Data[j] + temp1.Data[j]) * yi / math.Pow(hi, 3.0) - } - S1.Data[0] = temp1.Data[0] * yi / math.Pow(hi, 3.0) - //2.2 S2 - temp0 = ZeroMatrix(4, 1) - temp1 = ZeroMatrix(4, 1) - temp0.Data[2] = 1.0 - temp0.Data[1] = -2.0 * xi - temp0.Data[0] = xi * xi - for j := 3; j > 0; j-- { - temp0.Data[j] = temp0.Data[j-1] - temp1.Data[j-1] = -1.0 * xi_1 * temp0.Data[j-1] - S2.Data[j] = (temp0.Data[j] + temp1.Data[j]) * mi_1 / math.Pow(hi, 2.0) - } - S2.Data[0] = temp1.Data[0] * mi_1 / math.Pow(hi, 2.0) - //2.3 S3 - temp0 = ZeroMatrix(4, 1) - temp1 = ZeroMatrix(4, 1) - temp0.Data[2] = 1.0 - temp0.Data[1] = -2.0 * xi_1 - temp0.Data[0] = xi_1 * xi_1 - for j := 3; j > 0; j-- { - temp0.Data[j] = temp0.Data[j-1] - temp1.Data[j-1] = -1.0 * xi * temp0.Data[j-1] - S3.Data[j] = (temp0.Data[j] + temp1.Data[j]) * mi / math.Pow(hi, 2.0) - } - S3.Data[0] = temp1.Data[0] * mi / math.Pow(hi, 2.0) - //2.4 Si(x) - for j := 0; j < 4; j++ { - sol.SetMatrix(j, i-1, S0.Data[j]+S1.Data[j]+S2.Data[j]+S3.Data[j]) - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/InterpSpline21.go b/vendor/github.com/nuknal/goNum/InterpSpline21.go deleted file mode 100644 index aacea7e..0000000 --- a/vendor/github.com/nuknal/goNum/InterpSpline21.go +++ /dev/null @@ -1,179 +0,0 @@ -// InterpSpline21 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-9 -版本 : 0.0.0 ------------------------------------------------------- - 用节点处的二阶导数表示的三次样条插值函数, - 一阶导数边界条件 - n+1个点, n个区间 -理论: - 区间[x(i-1), xi]上的三次样条函数表达为: - (xi-x)^3 - Si(x) = ----------M(i-1) + - 6*hi - (x-x(i-1))^3 - --------------Mi + - 6*hi - M(i-1) xi-x - (y(i-1) - --------hi^2)------- - 6 hi - Mi x-x(i-1) - (yi - ----hi^2)---------- - 6 hi - - 令 Mi = hi/(hi+h(i+1)) - lambdai = 1-Mi = h(i+1)/(hi+h(i+1)) - 6 y(i+1)-yi yi-y(i-1) - fi = -----------(---------- - -----------) - hi+h(i+1) h(i+1) hi - (i = 1,...,n-1) - - 则mi可由n+1阶线性方程组求得(利用LEs_Chasing): - |2 1 || M0 | | f0 | - |M1 2 l1 || M1 | | f1 | - | M2 2 l2 || M2 | = | f2 | - | ........ || ... | | ... | - | M(n-1) 2 l(n-1)||M(n-1)| |f(n-1)| - | 1 2 || Mn | | fn | - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 124-127. ------------------------------------------------------- -输入 : - A 数据点矩阵,(n+1)x3,第一列xi;第二列yi; - 第三列y'i,且y'i只需给出y'0和y'n -输出 : - B 插值方程系数结果矩阵,从前到后对应从0到3阶,4xn - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// InterpSpline21 用节点处的二阶导数表示的三次样条插值函数, 一阶导数边界条件 -func InterpSpline21(A Matrix) (Matrix, bool) { - /* - 用节点处的二阶导数表示的三次样条插值函数, 一阶导数边界条件 - 输入 : - A 数据点矩阵,(n+1)x3,第一列xi;第二列yi; - 第三列y'i,且y'i只需给出y'0和y'n - 输出 : - B 插值方程系数结果矩阵,从前到后对应从0到3阶,4xn - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var err bool = false - n := A.Rows - 1 - sol := ZeroMatrix(4, n) - BA := ZeroMatrix(n+1, n+1) //对角占优的三对角矩阵 - BB := ZeroMatrix(n+1, 1) //解向量 - BC := ZeroMatrix(n+1, 1) //值向量 - - //1解插值函数的一阶导数mi - //1.0.1第一行 - if true { //限制变量使用范围 - h1 := A.GetFromMatrix(1, 0) - A.GetFromMatrix(0, 0) - y0 := A.GetFromMatrix(0, 1) - y1 := A.GetFromMatrix(1, 1) - - f0 := 6.0 * ((y1-y0)/h1 - A.GetFromMatrix(0, 2)) / h1 - - BA.SetMatrix(0, 0, 2.0) - BA.SetMatrix(0, 1, 1.0) - BC.Data[0] = f0 - } - //1.0.2其它行 - for i := 1; i < n; i++ { - yi_1 := A.GetFromMatrix(i-1, 0) - yi := A.GetFromMatrix(i, 0) - yi1 := A.GetFromMatrix(i+1, 0) - - hi := A.GetFromMatrix(i, 0) - A.GetFromMatrix(i-1, 0) - hi1 := A.GetFromMatrix(i+1, 0) - A.GetFromMatrix(i, 0) - - Mi := hi / (hi + hi1) - lambdai := 1.0 - Mi - fi := 6.0 * ((yi1-yi)/hi1 - (yi-yi_1)/hi) / (hi + hi1) - //赋予BA - BA.SetMatrix(i, i-1, Mi) - BA.SetMatrix(i, i, 2.0) - BA.SetMatrix(i, i+1, lambdai) - BC.Data[i] = fi - } - //1.0.3最后一行 - if true { //i=n - hn := A.GetFromMatrix(n, 0) - A.GetFromMatrix(n-1, 0) - yn_1 := A.GetFromMatrix(n-1, 1) - yn := A.GetFromMatrix(n, 1) - - fn := 6.0 * (A.GetFromMatrix(n, 2) - (yn-yn_1)/hn) / hn - - BA.SetMatrix(n, n-1, 1.0) - BA.SetMatrix(n, n, 2.0) - BC.Data[n] = fn - } - //1.1求解 - soltemp, errtemp := LEs_Chasing(BA, BC) - if errtemp != true { - panic("Error in goNum.InterpSpline11: Solve Error with goNum.LEs_Chasing") - } - for i := 0; i < n+1; i++ { - BB.Data[i] = soltemp.Data[i] - } - - //2求解Si(x) - S0 := ZeroMatrix(4, 1) - S1 := ZeroMatrix(4, 1) - S2 := ZeroMatrix(4, 1) - S3 := ZeroMatrix(4, 1) - for i := 1; i < n+1; i++ { - xi_1 := A.GetFromMatrix(i-1, 0) - xi := A.GetFromMatrix(i, 0) - yi_1 := A.GetFromMatrix(i-1, 1) - yi := A.GetFromMatrix(i, 1) - Mi_1 := BB.Data[i-1] - Mi := BB.Data[i] - hi := xi - xi_1 - temp0 := ZeroMatrix(4, 1) - //2.1 S0 - temp0.Data[3] = -1.0 - temp0.Data[2] = 3.0 * xi - temp0.Data[1] = -3.0 * xi * xi - temp0.Data[0] = xi * xi * xi - for j := 0; j < 4; j++ { - S0.Data[j] = temp0.Data[j] * Mi_1 / (6.0 * hi) - } - //2.1 S1 - temp0.Data[3] = 1.0 - temp0.Data[2] = -3.0 * xi_1 - temp0.Data[1] = 3.0 * xi_1 * xi_1 - temp0.Data[0] = -1.0 * xi_1 * xi_1 * xi_1 - for j := 0; j < 4; j++ { - S0.Data[j] = temp0.Data[j] * Mi / (6.0 * hi) - } - //2.2 S2 - temp0 = ZeroMatrix(4, 1) - temp0.Data[1] = -1.0 - temp0.Data[0] = xi - for j := 0; j < 4; j++ { - S2.Data[j] = temp0.Data[j] * (yi_1 - Mi_1*hi*hi/6.0) / hi - } - //2.3 S3 - temp0 = ZeroMatrix(4, 1) - temp0.Data[1] = 1.0 - temp0.Data[0] = -1.0 * xi_1 - for j := 0; j < 4; j++ { - S3.Data[j] = temp0.Data[j] * (yi - Mi*hi*hi/6.0) / hi - } - //2.4 Si(x) - for j := 0; j < 4; j++ { - sol.SetMatrix(j, i-1, S0.Data[j]+S1.Data[j]+S2.Data[j]+S3.Data[j]) - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/InterpSpline22.go b/vendor/github.com/nuknal/goNum/InterpSpline22.go deleted file mode 100644 index 39865b4..0000000 --- a/vendor/github.com/nuknal/goNum/InterpSpline22.go +++ /dev/null @@ -1,194 +0,0 @@ -// InterpSpline22 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-9 -版本 : 0.0.0 ------------------------------------------------------- - 用节点处的二阶导数表示的三次样条插值函数, - 二阶导数边界条件 - n+1个点, n个区间 -理论: - 区间[x(i-1), xi]上的三次样条函数表达为: - (xi-x)^3 - Si(x) = ----------M(i-1) + - 6*hi - (x-x(i-1))^3 - --------------Mi + - 6*hi - M(i-1) xi-x - (y(i-1) - --------hi^2)------- - 6 hi - Mi x-x(i-1) - (yi - ----hi^2)---------- - 6 hi - - 令 Mi = hi/(hi+h(i+1)) - lambdai = 1-Mi = h(i+1)/(hi+h(i+1)) - 6 y(i+1)-yi yi-y(i-1) - fi = -----------(---------- - -----------) - hi+h(i+1) h(i+1) hi - (i = 1,...,n-1) - - 则mi可由n-1阶线性方程组求得(利用LEs_Chasing): - |2 l1 || M1 | | f1-M1*M0 | - | M2 2 l2 || M2 | = | f2 | - | ........ || ... | | ... | - | M(n-2) 2 l(n-2)||M(n-2)| | f(n-2) | - | M(n-1) 2 ||M(n-1)| |f(n-1)-l(n-1)Mn| - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 124-127. ------------------------------------------------------- -输入 : - A 数据点矩阵,(n+1)x3,第一列xi;第二列yi; - 第三列y''i,且y''i只需给出y''0和y''n -输出 : - B 插值方程系数结果矩阵,从前到后对应从0到3阶,4xn - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// InterpSpline22 用节点处的二阶导数表示的三次样条插值函数, 二阶导数边界条件 -func InterpSpline22(A Matrix) (Matrix, bool) { - /* - 用节点处的二阶导数表示的三次样条插值函数, 二阶导数边界条件 - 输入 : - A 数据点矩阵,(n+1)x3,第一列xi;第二列yi; - 第三列y'i,且y'i只需给出y'0和y'n - 输出 : - B 插值方程系数结果矩阵,从前到后对应从0到3阶,4xn - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var err bool = false - n := A.Rows - 1 - sol := ZeroMatrix(4, n) - BA := ZeroMatrix(n-1, n-1) //对角占优的三对角矩阵 - BB := ZeroMatrix(n-1, 1) //解向量 - BC := ZeroMatrix(n-1, 1) //值向量 - - //1解插值函数的一阶导数mi - //1.0.1第一行 - if true { //限制变量使用范围 - h1 := A.GetFromMatrix(1, 0) - A.GetFromMatrix(0, 0) - h2 := A.GetFromMatrix(2, 0) - A.GetFromMatrix(1, 0) - y0 := A.GetFromMatrix(0, 1) - y1 := A.GetFromMatrix(1, 1) - y2 := A.GetFromMatrix(2, 1) - M1 := h1 / (h1 + h2) - l1 := 1.0 - M1 - f1 := 6.0 * ((y2-y1)/h2 - (y1-y0)/h1) / (h1 + h2) - BA.SetMatrix(0, 0, 2.0) - BA.SetMatrix(0, 1, l1) - BC.Data[0] = f1 - M1*A.GetFromMatrix(0, 2) - } - //1.0.2其它行 - for i := 2; i < n-1; i++ { - yi_1 := A.GetFromMatrix(i-1, 0) - yi := A.GetFromMatrix(i, 0) - yi1 := A.GetFromMatrix(i+1, 0) - - hi := A.GetFromMatrix(i, 0) - A.GetFromMatrix(i-1, 0) - hi1 := A.GetFromMatrix(i+1, 0) - A.GetFromMatrix(i, 0) - - Mi := hi / (hi + hi1) - li := 1.0 - Mi - fi := 6.0 * ((yi1-yi)/hi1 - (yi-yi_1)/hi) / (hi + hi1) - //赋予BA - BA.SetMatrix(i-1, i-2, Mi) - BA.SetMatrix(i-1, i-1, 2.0) - BA.SetMatrix(i-1, i, li) - BC.Data[i-1] = fi - } - //1.0.3最后一行 - if true { //i=n-1 - hn_1 := A.GetFromMatrix(n-1, 0) - A.GetFromMatrix(n-2, 0) - hn := A.GetFromMatrix(n, 0) - A.GetFromMatrix(n-1, 0) - yn_2 := A.GetFromMatrix(n-2, 1) - yn_1 := A.GetFromMatrix(n-1, 1) - yn := A.GetFromMatrix(n, 1) - - Mn_1 := hn_1 / (hn_1 + hn) - ln_1 := 1.0 - Mn_1 - fn_1 := 6.0 * ((yn-yn_1)/hn - (yn_1-yn_2)/hn_1) / (hn_1 + hn) - - BA.SetMatrix(n-2, n-3, Mn_1) - BA.SetMatrix(n-2, n-2, 2.0) - BC.Data[n-2] = fn_1 - ln_1*A.GetFromMatrix(n, 2) - } - //1.1求解 - soltemp, errtemp := LEs_Chasing(BA, BC) - if errtemp != true { - panic("Error in goNum.InterpSpline11: Solve Error with goNum.LEs_Chasing") - } - for i := 0; i < n-1; i++ { - BB.Data[i] = soltemp.Data[i] - } - - //2求解Si(x) - S0 := ZeroMatrix(4, 1) - S1 := ZeroMatrix(4, 1) - S2 := ZeroMatrix(4, 1) - S3 := ZeroMatrix(4, 1) - for i := 1; i < n+1; i++ { - xi_1 := A.GetFromMatrix(i-1, 0) - xi := A.GetFromMatrix(i, 0) - yi_1 := A.GetFromMatrix(i-1, 1) - yi := A.GetFromMatrix(i, 1) - Mi_1 := 0.0 - Mi := 0.0 - if i == 1 { - Mi_1 = A.GetFromMatrix(0, 2) - Mi = BB.Data[i-1] - } else if i == n { - Mi_1 = BB.Data[i-2] - Mi = A.GetFromMatrix(n, 2) - } else { - Mi_1 = BB.Data[i-2] - Mi = BB.Data[i-1] - } - hi := xi - xi_1 - temp0 := ZeroMatrix(4, 1) - //2.1 S0 - temp0.Data[3] = -1.0 - temp0.Data[2] = 3.0 * xi - temp0.Data[1] = -3.0 * xi * xi - temp0.Data[0] = xi * xi * xi - for j := 0; j < 4; j++ { - S0.Data[j] = temp0.Data[j] * Mi_1 / (6.0 * hi) - } - //2.1 S1 - temp0.Data[3] = 1.0 - temp0.Data[2] = -3.0 * xi_1 - temp0.Data[1] = 3.0 * xi_1 * xi_1 - temp0.Data[0] = -1.0 * xi_1 * xi_1 * xi_1 - for j := 0; j < 4; j++ { - S0.Data[j] = temp0.Data[j] * Mi / (6.0 * hi) - } - //2.2 S2 - temp0 = ZeroMatrix(4, 1) - temp0.Data[1] = -1.0 - temp0.Data[0] = xi - for j := 0; j < 4; j++ { - S2.Data[j] = temp0.Data[j] * (yi_1 - Mi_1*hi*hi/6.0) / hi - } - //2.3 S3 - temp0 = ZeroMatrix(4, 1) - temp0.Data[1] = 1.0 - temp0.Data[0] = -1.0 * xi_1 - for j := 0; j < 4; j++ { - S3.Data[j] = temp0.Data[j] * (yi - Mi*hi*hi/6.0) / hi - } - //2.4 Si(x) - for j := 0; j < 4; j++ { - sol.SetMatrix(j, i-1, S0.Data[j]+S1.Data[j]+S2.Data[j]+S3.Data[j]) - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/InverseA.go b/vendor/github.com/nuknal/goNum/InverseA.go deleted file mode 100644 index 34d5319..0000000 --- a/vendor/github.com/nuknal/goNum/InverseA.go +++ /dev/null @@ -1,87 +0,0 @@ -// InverseA -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-20 -版本 : 0.0.0 ------------------------------------------------------- - 求矩阵逆的列主元消去法 -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 51. ------------------------------------------------------- -输入 : - a 矩阵 -输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// InverseA 求矩阵逆的列主元消去法 -func InverseA(a [][]float64) ([][]float64, bool) { - /* - 求矩阵逆的列主元消去法 - 输入 : - a 矩阵 - 输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - - var err bool = false - n := len(a) - temp0, _ := E_Mat(n) - b := temp0 - sol := b - temp1 := make([]float64, n) - - //判断是否方阵 - if len(a) != len(a[0]) { - return sol, err - } - - //主元消去 - for i := 0; i < n; i++ { - //求第i列的主元素并调整行顺序 - acol := make([]float64, n-i) - for icol := i; icol < n; icol++ { - acol[icol-i] = a[icol][i] - } - _, ii, _ := MaxAbs(acol) - if ii+i != i { - temp1 = a[ii+i] - a[ii+i] = a[i] - a[i] = temp1 - temp1 = b[ii+i] - b[ii+i] = b[i] - b[i] = temp1 - } - - //列消去 - //本行主元置一 - mul := a[i][i] - for j := 0; j < n; j++ { - a[i][j] = a[i][j] / mul - b[i][j] = b[i][j] / mul - } - //其它列置零 - for j := 0; j < n; j++ { - if j != i { - mul = a[j][i] / a[i][i] - for k := 0; k < n; k++ { - a[j][k] = a[j][k] - a[i][k]*mul - b[j][k] = b[j][k] - b[i][k]*mul - } - } - } - } - - sol = b - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/LEs_Chasing.go b/vendor/github.com/nuknal/goNum/LEs_Chasing.go deleted file mode 100644 index 54454af..0000000 --- a/vendor/github.com/nuknal/goNum/LEs_Chasing.go +++ /dev/null @@ -1,93 +0,0 @@ -// LEs_Chasing -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-8 -版本 : 0.0.0 ------------------------------------------------------- - 追赶法求解严格对角占优的三对角矩阵 -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 59-61. ------------------------------------------------------- -输入 : - A 系数矩阵, nxn - BA 常数值向量, nx1 -输出 : - sol 解向量, nx1 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// LEs_Chasing 追赶法求解严格对角占优的三对角矩阵 -func LEs_Chasing(A, BA Matrix) (Matrix, bool) { - /* - 追赶法求解严格对角占优的三对角矩阵 - 输入 : - A 系数矩阵, nxn - BA 常数值向量, nx1 - 输出 : - sol 解向量, nx1 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断A是否方阵 - if A.Rows != A.Columns { - panic("Error in goNum.LEs_Chasing: A is not a square matrix") - } - //判断BA是否与A行数相等 - if A.Rows != BA.Rows { - panic("Error in goNum.LEs_Chasing: Rows of A and BA are not equal") - } - - var err bool = false - n := A.Rows - ai := ZeroMatrix(n, 1) //第一位无效 - bi := ZeroMatrix(n, 1) - ci := ZeroMatrix(n-1, 1) - gamma := ZeroMatrix(n, 1) //gammai - beta := ZeroMatrix(n, 1) //beta, 第一位无效 - delta := ZeroMatrix(n-1, 1) //deltai - y := ZeroMatrix(n, 1) //yi - sol := ZeroMatrix(n, 1) //xi - - //ai, bi, ci - bi.Data[0] = A.GetFromMatrix(0, 0) - ci.Data[0] = A.GetFromMatrix(0, 1) - for i := 1; i < n-1; i++ { - ai.Data[i] = A.GetFromMatrix(i, i-1) - bi.Data[i] = A.GetFromMatrix(i, i) - ci.Data[i] = A.GetFromMatrix(i, i+1) - } - ai.Data[n-1] = A.GetFromMatrix(n-1, n-2) - bi.Data[n-1] = A.GetFromMatrix(n-1, n-1) - - //解gamma, beta和delta - gamma.Data[0] = bi.Data[0] - delta.Data[0] = ci.Data[0] / gamma.Data[0] - for i := 1; i < n-1; i++ { - beta.Data[i] = ai.Data[i] - gamma.Data[i] = bi.Data[i] - beta.Data[i]*delta.Data[i-1] - delta.Data[i] = ci.Data[i] / gamma.Data[i] - } - beta.Data[n-1] = ai.Data[n-1] - gamma.Data[n-1] = bi.Data[n-1] - beta.Data[n-1]*delta.Data[n-2] - - //解yi - y.Data[0] = BA.Data[0] / gamma.Data[0] - for i := 1; i < BA.Rows; i++ { - y.Data[i] = (BA.Data[i] - beta.Data[i]*y.Data[i-1]) / gamma.Data[i] - } - - //解xi - sol.Data[n-1] = y.Data[n-1] - for i := n - 2; i >= 0; i-- { - sol.Data[i] = y.Data[i] - delta.Data[i]*sol.Data[i+1] - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/LEs_ECPE.go b/vendor/github.com/nuknal/goNum/LEs_ECPE.go deleted file mode 100644 index 4b9c34e..0000000 --- a/vendor/github.com/nuknal/goNum/LEs_ECPE.go +++ /dev/null @@ -1,96 +0,0 @@ -// LEs_ECPE -// linear equations - elemination of column principle -// element -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-19 -版本 : 0.0.0 ------------------------------------------------------- - 线性代数方程组的列主元消去法 -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 47-49. - - 乘除运算的次数 n^3/3+n^2-n/3 ------------------------------------------------------- -输入 : - a a x = b线性代数方程组的系数矩阵 - b a x = b线性代数方程组的右侧常数列向量 -输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// LEs_ECPE 线性代数方程组的列主元消去法 -func LEs_ECPE(a [][]float64, b []float64) ([]float64, bool) { - /* - 线性代数方程组的列主元消去法 - 输入 : - a a x = b线性代数方程组的系数矩阵 - b a x = b线性代数方程组的右侧常数列向量 - 输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //方程个数为n - var err bool = false - atemp := a - btemp := b - n := len(btemp) - sol := make([]float64, n) - temp0 := make([]float64, n) - var temp1 float64 - - // 输入判断 - if len(atemp) != n { - return sol, err - } - - //求解 - //消去,求得上三角矩阵 - for i := 0; i < n-1; i++ { - //求第i列的主元素并调整顺序 - acol := make([]float64, n-i) - for icol := i; icol < n; icol++ { - acol[icol-i] = atemp[icol][i] - } - _, ii, _ := MaxAbs(acol) - if ii+i != i { - temp0 = atemp[ii+i] - atemp[ii+i] = atemp[i] - atemp[i] = temp0 - temp1 = btemp[ii+i] - btemp[ii+i] = btemp[i] - btemp[i] = temp1 - } - - //列消去 - for j := i + 1; j < n; j++ { - mul := atemp[j][i] / atemp[i][i] - for k := i; k < n; k++ { - atemp[j][k] = atemp[j][k] - atemp[i][k]*mul - } - btemp[j] = btemp[j] - btemp[i]*mul - } - } - - //回代 - sol[n-1] = btemp[n-1] / atemp[n-1][n-1] - for i := n - 2; i >= 0; i-- { - temp1 = 0.0 - for j := i + 1; j < n; j++ { - temp1 = temp1 + atemp[i][j]*sol[j] - } - sol[i] = (btemp[i] - temp1) / atemp[i][i] - } - - //返回结果 - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/LEs_JocobiIterate.go b/vendor/github.com/nuknal/goNum/LEs_JocobiIterate.go deleted file mode 100644 index 070064f..0000000 --- a/vendor/github.com/nuknal/goNum/LEs_JocobiIterate.go +++ /dev/null @@ -1,90 +0,0 @@ -// LEs_JocobiIterate -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-22 -版本 : 0.0.0 ------------------------------------------------------- - 解n阶线性方程组的Jocobi迭代法(简单迭代法) -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 61-68. - 收敛的条件:(B为变化后的系数矩阵) - 1. 矩阵B的谱半径小于1,或者 - 2. 矩阵B的1范数小于1,或者 - 3. 矩阵B的无穷范数小于1,或者 - 4. 系数矩阵A严格对角占优 ------------------------------------------------------- -输入 : - A 系数矩阵 - b 常数值向量 - tol 最大容许误差 - n 最大迭代步数 -输出 : - sol 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// LEs_JocobiIterate 解n阶线性方程组的Jocobi迭代法(简单迭代法) -func LEs_JocobiIterate(A, b, x0 Matrix, tol float64, n int) ([]float64, bool) { - /* - 解n阶线性方程组的Jocobi迭代法(简单迭代法) - 输入 : - A 系数矩阵 - b 常数值向量 - tol 最大容许误差 - n 最大迭代步数 - 输出 : - sol 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - B := ZeroMatrix(A.Rows, A.Columns) - g := ZeroMatrix(A.Rows, 1) - x1 := ZeroMatrix(A.Rows, 1) - sol := ZeroMatrix(A.Rows, 1) - var err bool = false - - //方程组迭代化变换,求得矩阵B - for i := 0; i < A.Rows; i++ { - for j := 0; j < A.Columns; j++ { - if j != i { - B.SetMatrix(i, j, -1.0*A.GetFromMatrix(i, j)/A.GetFromMatrix(i, i)) - } - } - g.Data[i] = b.Data[i] / A.GetFromMatrix(i, i) - } - - //判断B,是否收敛 - temp0, _ := Norm1(B) - temp1, _ := NormInf(B) - if (temp0 >= 1) || (temp1 >= 1) { - return sol.Data, err - } - - //求解 - for i := 0; i < n; i++ { - x1 = AddMatrix(DotPruduct(B, x0), g) - sol = SubMatrix(x1, x0) - max, _, _ := Max(sol.Data) - if math.Abs(max) < tol { - sol = x1 - err = true - return sol.Data, err - } - - for i0 := 0; i0 < x0.Rows; i0++ { - x0.Data[i0] = x1.Data[i0] - } - } - - return make([]float64, A.Rows), err -} diff --git a/vendor/github.com/nuknal/goNum/LEs_SORIterate.go b/vendor/github.com/nuknal/goNum/LEs_SORIterate.go deleted file mode 100644 index e42b6df..0000000 --- a/vendor/github.com/nuknal/goNum/LEs_SORIterate.go +++ /dev/null @@ -1,85 +0,0 @@ -// LEs_SORIterate -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-22 -版本 : 0.0.0 ------------------------------------------------------- - 解n阶线性方程组的SOR(逐次超松弛, successive over - relaxation)迭代法 -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 68-72. - 收敛的条件:(B为变化后的系数矩阵) - 1. 系数矩阵A严格对角占优,且0 < omega <= 1,或者 - 2. 系数矩阵A对称正定,且0 < omega < 2 ------------------------------------------------------- -输入 : - A 系数矩阵 - b 常数值向量 - tol 最大容许误差 - omega 松弛因子,0 < omega < 2, omega = 1: Siedel, - omega < 1: 低松弛, omega > 1: 超松弛 - n 最大迭代步数 -输出 : - sol 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import "math" - -// LEs_SORIterate 解n阶线性方程组的SOR(逐次超松弛, successive over relaxation)迭代法 -func LEs_SORIterate(A, b, x0 Matrix, tol, omega float64, n int) ([]float64, bool) { - /* - 解n阶线性方程组的SOR(逐次超松弛, successive over relaxation)迭代法 - 输入 : - A 系数矩阵 - b 常数值向量 - tol 最大容许误差 - omega 松弛因子,0 < omega < 2, omega = 1: Siedel, - omega < 1: 低松弛, omega > 1: 超松弛 - n 最大迭代步数 - 输出 : - sol 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - x1 := ZeroMatrix(A.Rows, 1) - sol := ZeroMatrix(A.Rows, 1) - var err bool = false - - //求解 - for i := 0; i < n; i++ { - for i0 := 0; i0 < A.Rows; i0++ { - sum0 := 0.0 - for j := 0; j < i0; j++ { - sum0 += A.GetFromMatrix(i0, j) * x1.GetFromMatrix(j, 0) - } - sum1 := 0.0 - for j := i0 + 1; j < A.Columns; j++ { - sum1 += A.GetFromMatrix(i0, j) * x0.GetFromMatrix(j, 0) - } - x1.SetMatrix(i0, 0, (1-omega)*x0.GetFromMatrix(i0, 0)+omega*(b.Data[i0]-sum0-sum1)/A.GetFromMatrix(i0, i0)) - } - - //判断收敛 - sol = SubMatrix(x1, x0) - max, _, _ := Max(sol.Data) - if math.Abs(max) < tol { - sol = x1 - err = true - return sol.Data, err - } - - //准备下次迭代 - for i0 := 0; i0 < x0.Rows; i0++ { - x0.Data[i0] = x1.Data[i0] - } - } - - return make([]float64, A.Rows), err -} diff --git a/vendor/github.com/nuknal/goNum/LEs_SeidelIterate.go b/vendor/github.com/nuknal/goNum/LEs_SeidelIterate.go deleted file mode 100644 index 1ad2f6c..0000000 --- a/vendor/github.com/nuknal/goNum/LEs_SeidelIterate.go +++ /dev/null @@ -1,95 +0,0 @@ -// LEs_SeidelIterate -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-22 -版本 : 0.0.0 ------------------------------------------------------- - 解n阶线性方程组的Seidel迭代法 -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 68-72. - 收敛的条件:(B为变化后的系数矩阵) - 1. 矩阵B的谱半径小于1,或者 - 2. 矩阵B的1范数小于1,或者 - 3. 矩阵B的无穷范数小于1,或者 - 4. 系数矩阵A严格对角占优 ------------------------------------------------------- -输入 : - A 系数矩阵 - b 常数值向量 - tol 最大容许误差 - n 最大迭代步数 -输出 : - sol 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// LEs_SeidelIterate 解n阶线性方程组的Seidel迭代法 -func LEs_SeidelIterate(A, b, x0 Matrix, tol float64, n int) ([]float64, bool) { - /* - 解n阶线性方程组的Seidel迭代法 - 输入 : - A 系数矩阵 - b 常数值向量 - tol 最大容许误差 - n 最大迭代步数 - 输出 : - sol 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - B := ZeroMatrix(A.Rows, A.Columns) - g := ZeroMatrix(A.Rows, 1) - x1 := ZeroMatrix(A.Rows, 1) - xtemp := ZeroMatrix(A.Rows, 1) - sol := ZeroMatrix(A.Rows, 1) - var err bool = false - - //方程组迭代化变换,求得矩阵B - for i := 0; i < A.Rows; i++ { - for j := 0; j < A.Columns; j++ { - if j != i { - B.SetMatrix(i, j, -1.0*A.GetFromMatrix(i, j)/A.GetFromMatrix(i, i)) - } - } - g.Data[i] = b.Data[i] / A.GetFromMatrix(i, i) - } - - //判断B,是否收敛 - temp0, _ := Norm1(B) - temp1, _ := NormInf(B) - if (temp0 >= 1) || (temp1 >= 1) { - return sol.Data, err - } - - //求解 - for i := 0; i < n; i++ { - for i0 := 0; i0 < B.Rows; i0++ { - dotP := DotPruduct(NewMatrix(1, B.Columns, B.RowOfMatrix(i0)), xtemp) - x1.Data[i0] = dotP.Data[0] + g.Data[i0] - xtemp.Data[i0] = x1.Data[i0] - } - sol = SubMatrix(x1, x0) - max, _, _ := Max(sol.Data) - if math.Abs(max) < tol { - sol = x1 - err = true - return sol.Data, err - } - - for i0 := 0; i0 < x0.Rows; i0++ { - x0.Data[i0] = x1.Data[i0] - } - } - - return make([]float64, A.Rows), err -} diff --git a/vendor/github.com/nuknal/goNum/LICENSE b/vendor/github.com/nuknal/goNum/LICENSE deleted file mode 100644 index c65825e..0000000 --- a/vendor/github.com/nuknal/goNum/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - {one line to give the program's name and a brief idea of what it does.} - Copyright (C) {year} {name of author} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - {project} Copyright (C) {year} {fullname} - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/vendor/github.com/nuknal/goNum/LLT_Decompose.go b/vendor/github.com/nuknal/goNum/LLT_Decompose.go deleted file mode 100644 index 56dfaae..0000000 --- a/vendor/github.com/nuknal/goNum/LLT_Decompose.go +++ /dev/null @@ -1,77 +0,0 @@ -// LLT_Decompose -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-8 -版本 : 0.0.0 ------------------------------------------------------- - 求对称正定矩阵的平方根分解法 -理论: - A = LL' - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 57-58. ------------------------------------------------------- -输入 : - A 矩阵,对称正定 -输出 : - L 下三角矩阵, 上三角矩阵为其转置 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// LLT_Decompose 求对称正定矩阵的平方根分解法 -func LLT_Decompose(A Matrix) (Matrix, bool) { - /* - 求对称正定矩阵的平方根分解法 - 输入 : - A 矩阵,对称正定 - 输出 : - L - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断对称 - if A.Rows != A.Columns { - panic("Error in goNum.LLT_Decompose: A is not symmetry") - } - n := A.Rows - L := ZeroMatrix(n, n) - var err bool = false - - //计算开始 - //第一列 - L.SetMatrix(0, 0, math.Sqrt(A.GetFromMatrix(0, 0))) - l11 := L.GetFromMatrix(0, 0) - for j := 1; j < n; j++ { - L.SetMatrix(j, 0, A.GetFromMatrix(0, j)/l11) - } - //其它列 - for k := 1; k < n; k++ { - //主对角元lkk - var temp0 float64 - for m := 0; m < k; m++ { - temp0 += L.GetFromMatrix(k, m) * L.GetFromMatrix(k, m) - } - temp0 = A.GetFromMatrix(k, k) - temp0 - L.SetMatrix(k, k, math.Sqrt(temp0)) - //k列其它元 - for j := k + 1; j < n; j++ { - var temp1 float64 - for m := 0; m < k; m++ { - temp1 += L.GetFromMatrix(k, m) * L.GetFromMatrix(j, m) - } - temp1 = (A.GetFromMatrix(k, j) - temp1) / L.GetFromMatrix(k, k) - L.SetMatrix(j, k, temp1) - } - } - - err = true - return L, err -} diff --git a/vendor/github.com/nuknal/goNum/LU_Doolittle.go b/vendor/github.com/nuknal/goNum/LU_Doolittle.go deleted file mode 100644 index 47f810b..0000000 --- a/vendor/github.com/nuknal/goNum/LU_Doolittle.go +++ /dev/null @@ -1,72 +0,0 @@ -// LU_Doolittle -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-21 -版本 : 0.0.0 ------------------------------------------------------- - 求矩阵Doolittlede LU分解 -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 53-56. ------------------------------------------------------- -输入 : - A 矩阵 -输出 : - L, U 下三角矩阵和上三角矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// LU_Doolittle 求矩阵Doolittlede LU分解 -func LU_Doolittle(A Matrix) (Matrix, Matrix, bool) { - /* - 求矩阵Doolittlede LU分解 - 输入 : - A 矩阵 - 输出 : - L, U 下三角矩阵和上三角矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var err bool = false - - if A.Rows != A.Columns { - panic("goNum.LU_Doolittle: A is not a square matrix") - } - - L := ZeroMatrix(A.Rows, A.Columns) - U := ZeroMatrix(A.Rows, A.Columns) - - for j := 0; j < A.Rows; j++ { - U.SetMatrix(0, j, A.GetFromMatrix(0, j)) - } - for i := 1; i < A.Rows; i++ { - L.SetMatrix(i, 0, A.GetFromMatrix(i, 0)/U.GetFromMatrix(0, 0)) - } - - for k := 1; k < A.Rows; k++ { - - for j := k; j < A.Rows; j++ { - var sum float64 - for m := 0; m < k; m++ { - sum += L.GetFromMatrix(k, m) * U.GetFromMatrix(m, j) - } - U.SetMatrix(k, j, A.GetFromMatrix(k, j)-sum) - } - - for i := k + 1; i < A.Rows; i++ { - var sum float64 - for m := 0; m < k; m++ { - sum += L.GetFromMatrix(i, m) * U.GetFromMatrix(m, k) - } - L.SetMatrix(i, k, (A.GetFromMatrix(i, k)-sum)/U.GetFromMatrix(k, k)) - } - } - - err = true - return L, U, err -} diff --git a/vendor/github.com/nuknal/goNum/Matrix.go b/vendor/github.com/nuknal/goNum/Matrix.go deleted file mode 100644 index 2dd2de9..0000000 --- a/vendor/github.com/nuknal/goNum/Matrix.go +++ /dev/null @@ -1,285 +0,0 @@ -// Matrix -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-20 -版本 : 0.0.0 - 0.0.1 2018-12-11 增加切片与矩阵转换 - 0.0.2 2018-12-26 增加错误报告 - 0.0.3 2018-12-27 增加追加行/列 ------------------------------------------------------- - 矩阵的创建及其操作创建及其简单操作/运算 -理论: - 参考 OneThin // http://outofmemery.cn/code-snippet - /16991/go-language-matrix-operation - 进行了主要运算和结构的补充与修改 ------------------------------------------------------- -注意事项: - 1. r, c 是从零开始算的 ------------------------------------------------------- -*/ - -package goNum - -import ( - "fmt" - "strconv" -) - -//数据结构定义----------------------------------------+ -// Matrix 定义Matrix数据类型 -type Matrix struct { - Rows, Columns int //行数和列数 - Data []float64 //将矩阵中所有元素作为一维切片 -} - -//矩阵操作-------------------------------------------+ -//通过行列号寻找指定矩阵位置在一维切片中的编号 -func findIndex(r, c int, A *Matrix) int { - //r E [0, n), c E [0, n) - return r*A.Columns + c -} - -// SetMatrix 设置指定行列的值 -func (A *Matrix) SetMatrix(r, c int, val float64) { - if (r >= A.Rows) || (c >= A.Columns) { - panic("Error in goNum.(*Matrix).SetMatrix: Out of range") - } - A.Data[findIndex(r, c, A)] = val -} - -// GetFromMatrix 获取指定行列的值 -func (A *Matrix) GetFromMatrix(r, c int) float64 { - if (r >= A.Rows) || (c >= A.Columns) { - panic("Error in goNum.(*Matrix).GetFromMatrix: Out of range") - } - return A.Data[findIndex(r, c, A)] -} - -// RowOfMatrix 获取指定行的值的切片 -func (A *Matrix) RowOfMatrix(i int) []float64 { - if i >= A.Rows { - panic("Error in goNum.(*Matrix).RowOfMatrix: Out of range") - } - return A.Data[findIndex(i, 0, A):findIndex(i, A.Columns, A)] -} - -// ColumnOfMatrix 获取指定列的值的切片 -func (A *Matrix) ColumnOfMatrix(j int) []float64 { - if j >= A.Columns { - panic("Error in goNum.(*Matrix).ColumnOfMatrix: Out of range") - } - col := make([]float64, A.Rows) - for i := 0; i < A.Rows; i++ { - col[i] = A.RowOfMatrix(i)[j] - } - return col -} - -// Transpose 矩阵转置 -func (A *Matrix) Transpose() Matrix { - B := ZeroMatrix(A.Columns, A.Rows) - for i := 0; i < A.Rows; i++ { - for j := 0; j < A.Columns; j++ { - B.SetMatrix(j, i, A.GetFromMatrix(i, j)) - } - } - return B -} - -// AppendRow 追加一行,另外一种方法是追加数据到A.Data,测试显示其速度表现更差 -func (A *Matrix) AppendRow(row []float64) Matrix { - //判断row长度是否等于A列数 - if len(row) != A.Columns { - panic("Error in goNum.(*Matrix).AppendRow: Slice length error") - } - B := ZeroMatrix(A.Rows+1, A.Columns) - n := A.Rows * A.Columns - for i := 0; i < n; i++ { - B.Data[i] = A.Data[i] - } - for i := 0; i < len(row); i++ { - B.Data[n+i] = row[i] - } - return B -} - -// AppendColumn 追加一列,对于多次调用,建议组合使用转置和追加行 -func (A *Matrix) AppendColumn(col []float64) Matrix { - //判断row长度是否等于A列数 - if len(col) != A.Rows { - panic("Error in goNum.(*Matrix).AppendColumn: Slice length error") - } - B := ZeroMatrix(A.Rows, A.Columns+1) - for i := 0; i < A.Rows; i++ { - for j := 0; j < A.Columns; j++ { - B.SetMatrix(i, j, A.GetFromMatrix(i, j)) - } - B.SetMatrix(i, A.Columns, col[i]) - } - return B -} - -// PrintMatrix 格式输出 -func (A *Matrix) PrintMatrix() { - //求出最长字符 - colwidstr := make([]string, A.Columns) - for i := range colwidstr { - var maxLen int - thisColumn := A.ColumnOfMatrix(i) - for j := range thisColumn { - thisLen := len(strconv.FormatFloat(thisColumn[j], 'f', -1, 64)) - if thisLen > maxLen { - maxLen = thisLen - } - } - } - for i := 0; i < A.Rows; i++ { - thisRow := A.RowOfMatrix(i) - fmt.Printf("[") - for j := range thisRow { - var format string - if j == 0 { - format = "%" + colwidstr[j] + "s" - } else { - format = " %" + colwidstr[j] + "s" - } - fmt.Printf(format, strconv.FormatFloat(thisRow[j], 'f', -1, 64)) - } - fmt.Printf("]\n") - } -} - -//矩阵初始化-----------------------------------------+ -// ZeroMatrix r行c列零矩阵 -func ZeroMatrix(r, c int) Matrix { - return Matrix{r, c, make([]float64, r*c)} -} - -// IdentityE n阶单位矩阵 -func IdentityE(n int) Matrix { - A := ZeroMatrix(n, n) - for i := 0; i < len(A.Data); i += (n + 1) { - A.Data[i] = 1.0 - } - return A -} - -// NewMatrix 以已有数据创建r行c列矩阵 -func NewMatrix(r, c int, data []float64) Matrix { - if len(data) != r*c { - panic("goNum.Matrix.New: Length of data does not matched r rows and c columns") - } - A := ZeroMatrix(r, c) - A.Data = data - return A -} - -// Slices1ToMatrix 一维切片转为矩阵(列向量) -func Slices1ToMatrix(s []float64) Matrix { - A := ZeroMatrix(len(s), 1) - for i := 0; i < A.Rows; i++ { - A.Data[i] = s[i] - } - return A -} - -// Slices2ToMatrix 二维切片转为矩阵 -func Slices2ToMatrix(s [][]float64) Matrix { - row := len(s) - col := len(s[0]) - A := ZeroMatrix(row, col) - for i := 0; i < row; i++ { - for j := 0; j < col; j++ { - A.SetMatrix(i, j, s[i][j]) - } - } - return A -} - -// Matrix1ToSlices 列向量转为一维切片 -func Matrix1ToSlices(A Matrix) []float64 { - s := make([]float64, A.Rows) - for i := 0; i < A.Rows; i++ { - s[i] = A.Data[i] - } - return s -} - -// Matrix2ToSlices 二维矩阵转为二维切片 -func Matrix2ToSlices(A Matrix) [][]float64 { - s := make([][]float64, A.Rows) - for i := 0; i < A.Rows; i++ { - s[i] = make([]float64, A.Columns) - for j := 0; j < A.Columns; j++ { - s[i][j] = A.GetFromMatrix(i, j) - } - } - return s -} - -//矩阵运算------------------------------------------+ -// AddMatrix 矩阵相加 -func AddMatrix(A, B Matrix) Matrix { - if (A.Rows != B.Rows) || (A.Columns != B.Columns) { - panic("goNum.Matrix.Add: A and B does not matched") - } - AaddB := ZeroMatrix(A.Rows, A.Columns) - for i := 0; i < A.Rows; i++ { - for j := 0; j < A.Columns; j++ { - AaddB.SetMatrix(i, j, A.GetFromMatrix(i, j)+B.GetFromMatrix(i, j)) - } - } - return AaddB -} - -// SubMatrix 矩阵相减 -func SubMatrix(A, B Matrix) Matrix { - if (A.Rows != B.Rows) || (A.Columns != B.Columns) { - panic("goNum.Matrix.Sub: A and B does not matched") - } - AsubB := ZeroMatrix(A.Rows, A.Columns) - for i := 0; i < A.Rows; i++ { - for j := 0; j < A.Columns; j++ { - AsubB.SetMatrix(i, j, A.GetFromMatrix(i, j)-B.GetFromMatrix(i, j)) - } - } - return AsubB -} - -// NumProductMatrix 矩阵数乘 -func NumProductMatrix(A Matrix, c float64) Matrix { - cA := ZeroMatrix(A.Rows, A.Columns) - for i := 0; i < len(cA.Data); i++ { - cA.Data[i] = c * A.Data[i] - } - return cA -} - -// DotPruduct 矩阵点乘 -func DotPruduct(A, B Matrix) Matrix { - if A.Columns != B.Rows { - panic("goNum.Matrix.DotPruduct: A and B does not matched") - } - AdotB := ZeroMatrix(A.Rows, B.Columns) - for i := 0; i < A.Rows; i++ { - for j := 0; j < B.Columns; j++ { - for k := 0; k < A.Columns; k++ { - AdotB.Data[B.Columns*i+j] += A.GetFromMatrix(i, k) * B.GetFromMatrix(k, j) - } - } - } - return AdotB -} - -// CrossVector 向量叉乘,得到垂直于两个向量所在平面的向量 -func CrossVector(a, b []float64) []float64 { - if (len(a) != 3) || (len(b) != 3) { - panic("goNum.Matrix.CrossVector: vector a or b length is not 3") - } - acrossb := make([]float64, 3) - acrossb[0] = a[1]*b[2] - a[2]*b[1] - acrossb[1] = a[2]*b[0] - a[0]*b[2] - acrossb[2] = a[0]*b[1] - a[1]*b[0] - return acrossb -} diff --git a/vendor/github.com/nuknal/goNum/MatrixEigenClassicalJacobi.go b/vendor/github.com/nuknal/goNum/MatrixEigenClassicalJacobi.go deleted file mode 100644 index 87dc813..0000000 --- a/vendor/github.com/nuknal/goNum/MatrixEigenClassicalJacobi.go +++ /dev/null @@ -1,188 +0,0 @@ -// MatrixEigenClassicalJacobi -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-30 -版本 : 0.0.0 ------------------------------------------------------- - 求解n阶对称矩阵A的全部特征值及其特征向量,经典雅可比法 -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 84-89. ------------------------------------------------------- -输入 : - A 系数矩阵 - tol 最大容许误差 - n 最大迭代步数 -输出 : - Bbar 主特征值矩阵(n阶对角矩阵) - Rbar 主特征值所对应的特征向量(n维矩阵,第i列即对应于 - 第i个特征值的特征向量) - (err) 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -//判断矩阵是否对称 -func isSymMatrix_MatrixEigenClassicalJacobi(A Matrix) bool { - //是否方阵 - if A.Columns != A.Rows { - return false - } - - //是否对称 - for i := 0; i < A.Rows; i++ { - for j := 0; j < A.Columns; j++ { - if j != i { - if A.GetFromMatrix(i, j) != A.GetFromMatrix(j, i) { - return false - } - } - } - } - - return true -} - -//取最大非对角元素 -func maxElementElse_MatrixEigenClassicalJacobi(A Matrix) (int, int) { - var p, q int - var max float64 - for i := 0; i < A.Rows-1; i++ { - for j := i + 1; j < A.Rows; j++ { - c := A.GetFromMatrix(i, j) - if math.Abs(max) < math.Abs(c) { - max = c - p = i - q = j - } - } - } - return p, q -} - -//计算cos(theta)及sin(theta) -func cosSinTheta_MatrixEigenClassicalJacobi(A Matrix, p, q int) (float64, float64) { - apq := A.GetFromMatrix(p, q) - app := A.GetFromMatrix(p, p) - aqq := A.GetFromMatrix(q, q) - - //情况1,app-aqq=0 - if app == aqq { - c := math.Sqrt(2.0) / 2.0 - switch { - case apq < 0: - return c, -1.0 * c - case apq > 0: - return c, c - default: - panic("MatrixEigenClassicalJacobi/cosSinTheta: A(p, q) = 0") - } - } - - //其他情况 - c := (app - aqq) / (2.0 * apq) - d := 2.0 * apq / (app - aqq) - //如果|apq| << |app - aqq|,用d - if 1000.0*math.Abs(apq) < math.Abs(app-aqq) { - tant := d / (1.0 + math.Sqrt(1.0+d*d)) - cost := 1.0 / math.Sqrt(1.0+tant*tant) - sint := tant * cost - return cost, sint - } - // 用c - switch { - case c > 0: - tant := 1.0 / (c + math.Sqrt(1.0+c*c)) - cost := 1.0 / math.Sqrt(1.0+tant*tant) - sint := tant * cost - return cost, sint - case c < 0: - tant := -1.0 / (math.Abs(c) + math.Sqrt(1.0+c*c)) - cost := 1.0 / math.Sqrt(1.0+tant*tant) - sint := tant * cost - return cost, sint - default: - panic("MatrixEigenClassicalJacobi/cosSinTheta: A(p, q) = 0, c = 0") - } - return 0.0, 0.0 -} - -//非主对角元素平方之和 -func sum2Else_MatrixEigenClassicalJacobi(A Matrix) float64 { - var sum2 float64 - for i := 0; i < A.Rows-1; i++ { - for j := i + 1; j < A.Columns; j++ { - if i != j { - sum2 += A.GetFromMatrix(i, j) * A.GetFromMatrix(i, j) - } - } - } - return 2.0 * sum2 -} - -// MatrixEigenClassicalJacobi 求解n阶对称矩阵A的全部特征值及其特征向量,经典雅可比法 -func MatrixEigenClassicalJacobi(A Matrix, tol float64, n int) (Matrix, Matrix, bool) { - /* - 求解n阶对称矩阵A的全部特征值及其特征向量,经典雅可比法 - 输入 : - A 系数矩阵 - tol 最大容许误差 - n 最大迭代步数 - 输出 : - Bbar 主特征值矩阵(n阶对角矩阵) - Rbar 主特征值所对应的特征向量(n维矩阵,第i列即对应于 - 第i个特征值的特征向量) - (err) 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - - //判断A是否对称矩阵 - if !isSymMatrix_MatrixEigenClassicalJacobi(A) { - return ZeroMatrix(A.Rows, A.Columns), ZeroMatrix(A.Rows, A.Columns), false - } - - //第一步 - //Rbar最终为特征向量矩阵 - Rbar := IdentityE(A.Rows) - //复制A矩阵为B,B为迭代过程中逐渐改变的矩阵,最终将成为特征值矩阵 - B := ZeroMatrix(A.Rows, A.Columns) - Bbar := ZeroMatrix(A.Rows, A.Columns) - for i := 0; i < len(A.Data); i++ { - B.Data[i] = A.Data[i] - } - - //迭代步 - for i := 0; i < n; i++ { - //第二步,最大元素所在行列号 - p, q := maxElementElse_MatrixEigenClassicalJacobi(B) - //第三步,计算cos(theta)及sin(theta) - cost, sint := cosSinTheta_MatrixEigenClassicalJacobi(B, p, q) - //第四步,计算R及Rbar,迭代B矩阵 - //R为迭代矩阵 - R := IdentityE(A.Rows) - R.SetMatrix(p, p, cost) - R.SetMatrix(p, q, sint) - R.SetMatrix(q, p, -1.0*sint) - R.SetMatrix(q, q, cost) - Bbar = DotPruduct(DotPruduct(R, B), R.Transpose()) //A1 = RARt - //Rbar = Rbar*Rt - Rbar = DotPruduct(Rbar, R.Transpose()) - //第五步,判断误差 - if sum2Else_MatrixEigenClassicalJacobi(Bbar) <= tol { - return Bbar, Rbar, true - } - //A = A1 - for i := 0; i < len(Bbar.Data); i++ { - B.Data[i] = Bbar.Data[i] - } - } - - return ZeroMatrix(A.Rows, A.Columns), ZeroMatrix(A.Rows, A.Columns), false -} diff --git a/vendor/github.com/nuknal/goNum/MatrixEigenJacobiPass.go b/vendor/github.com/nuknal/goNum/MatrixEigenJacobiPass.go deleted file mode 100644 index cc5c6b6..0000000 --- a/vendor/github.com/nuknal/goNum/MatrixEigenJacobiPass.go +++ /dev/null @@ -1,96 +0,0 @@ -// MatrixEigenJacobiPass -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-30 -版本 : 0.0.0 ------------------------------------------------------- - 求解n阶对称矩阵A的全部特征值及其特征向量,雅可比过关法 -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 90. ------------------------------------------------------- -输入 : - A 系数矩阵 - tol 最大容许误差 - n 最大迭代步数 -输出 : - Bbar 主特征值矩阵(n阶对角矩阵) - Rbar 主特征值所对应的特征向量(n维矩阵,第i列即对应于 - 第i个特征值的特征向量) - (err) 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// MatrixEigenJacobiPass 求解n阶对称矩阵A的全部特征值及其特征向量,雅可比过关法 -func MatrixEigenJacobiPass(A Matrix, tol float64, n int) (Matrix, Matrix, bool) { - /* - 求解n阶对称矩阵A的全部特征值及其特征向量,雅可比过关法 - 输入 : - A 系数矩阵 - tol 最大容许误差 - n 最大迭代步数 - 输出 : - Bbar 主特征值矩阵(n阶对角矩阵) - Rbar 主特征值所对应的特征向量(n维矩阵,第i列即对应于 - 第i个特征值的特征向量) - (err) 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - - //判断A是否对称矩阵 - if !isSymMatrix_MatrixEigenClassicalJacobi(A) { - return ZeroMatrix(A.Rows, A.Columns), ZeroMatrix(A.Rows, A.Columns), false - } - //1. - //Rbar最终为特征向量矩阵 - Rbar := IdentityE(A.Rows) - //复制A矩阵为B,B为迭代过程中逐渐改变的矩阵,最终将成为特征值矩阵 - B := ZeroMatrix(A.Rows, A.Columns) - Bbar := ZeroMatrix(A.Rows, A.Columns) - for i := 0; i < len(A.Data); i++ { - B.Data[i] = A.Data[i] - } - //2. 计算非对角元素平方和 - v0 := sum2Else_MatrixEigenClassicalJacobi(B) - //3. 设置阀值v1 - v1 := v0 / float64(B.Rows) - - //迭代步 - for i := 0; i < n; i++ { - for i0 := 0; i0 < B.Rows-1; i0++ { - for j := i + 1; j < B.Columns; j++ { - //逐个扫描,判断是否大于阀值 - if B.GetFromMatrix(i, j) > v1 { - //Jocobi正交相似变换(古典Jocobi法) - //计算cos(theta)及sin(theta) - cost, sint := cosSinTheta_MatrixEigenClassicalJacobi(B, i, j) - //R为迭代矩阵 - R := IdentityE(A.Rows) - R.SetMatrix(i, i, cost) - R.SetMatrix(i, j, sint) - R.SetMatrix(j, i, -1.0*sint) - R.SetMatrix(j, j, cost) - Bbar = DotPruduct(DotPruduct(R, B), R.Transpose()) //A1 = RARt - //Rbar = Rbar*Rt - Rbar = DotPruduct(Rbar, R.Transpose()) - } - } - } - //计算并判断v1是否满足误差需求,否则迭代 - v0 = sum2Else_MatrixEigenClassicalJacobi(Bbar) - if v0 < tol { - return Bbar, Rbar, true - } - v1 = v0 / float64(B.Rows) - //A = A1 - for i := 0; i < len(Bbar.Data); i++ { - B.Data[i] = Bbar.Data[i] - } - } - - return ZeroMatrix(A.Rows, A.Columns), ZeroMatrix(A.Rows, A.Columns), false -} diff --git a/vendor/github.com/nuknal/goNum/MatrixEigenPower.go b/vendor/github.com/nuknal/goNum/MatrixEigenPower.go deleted file mode 100644 index 21fbd1a..0000000 --- a/vendor/github.com/nuknal/goNum/MatrixEigenPower.go +++ /dev/null @@ -1,100 +0,0 @@ -// MatrixEigenPower -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-23 -版本 : 0.0.0 ------------------------------------------------------- - 求解n阶矩阵A的主特征值(按模最大)及其特征向量 -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 78-81. ------------------------------------------------------- -输入 : - A 系数矩阵 - u n维初始向量 - tol 最大容许误差 - n 最大迭代步数 -输出 : - sol 主特征值 - v 主特征值所对应的特征向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// MatrixEigenPower 求解n阶矩阵A的主特征值(按模最大)及其特征向量 -func MatrixEigenPower(A, u0 Matrix, tol float64, n int) (float64, []float64, bool) { - /* - 求解n阶矩阵A的主特征值(按模最大)及其特征向量 - 输入 : - A 系数矩阵 - u n维初始向量 - tol 最大容许误差 - n 最大迭代步数 - 输出 : - sol 主特征值 - v 主特征值所对应的特征向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断输入正确与否 - if A.Rows != u0.Rows { - panic("goNum.MatrixEigenPower: A and u are not matched") - } - - u1 := ZeroMatrix(u0.Rows, u0.Columns) - var l0, l1 float64 - v1 := make([]float64, u0.Rows) - var err bool = false - var j int - - u1 = DotPruduct(A, u0) - for i0 := 0; i0 < u0.Rows; i0++ { - if (math.Abs(u0.Data[i0]) > 1e-3) && (math.Abs(u1.Data[i0]) > 1e-3) { - j = i0 - l0 = u1.Data[i0] / u0.Data[i0] - } - u0.Data[i0] = u1.Data[i0] - } - - for i := 0; i < n; i++ { - u1 = DotPruduct(A, u0) - l1 = u1.Data[j] / u0.Data[j] - - //计算最大值,并进行规范化处理 - for i0 := 0; i0 < u0.Rows; i0++ { - v1[i0] = math.Abs(u1.Data[i0]) - } - _, j0, _ := Max(v1) - max := u1.Data[j0] - if max > 1e6 { - for i0 := 0; i0 < u0.Rows; i0++ { - u1.Data[i0] = u1.Data[i0] / max - } - } - - //判断算出否,并计算对应的特征向量 - if math.Abs(l1-l0) < tol { - for i0 := 0; i0 < u0.Rows; i0++ { - u1.Data[i0] = u1.Data[i0] / max - } - err = true - return l1, u1.Data, err - } - - //准备下次迭代 - l0 = l1 - for i0 := 0; i0 < u0.Rows; i0++ { - u0.Data[i0] = u1.Data[i0] - } - } - - return 0.0, make([]float64, u0.Rows), err -} diff --git a/vendor/github.com/nuknal/goNum/Max.go b/vendor/github.com/nuknal/goNum/Max.go deleted file mode 100644 index 4ef907b..0000000 --- a/vendor/github.com/nuknal/goNum/Max.go +++ /dev/null @@ -1,50 +0,0 @@ -// Max -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-19 -版本 : 0.0.0 ------------------------------------------------------- - 向量第一个最大值及其位置 ------------------------------------------------------- -输入 : - a a 被处理向量 -输出 : - sol 解值 - ii 第一个最大值位置 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// Max 向量第一个最大值及其位置 -func Max(a []float64) (float64, int, bool) { - /* - 向量第一个最大值及其位置 - 输入 : - a a 被处理向量 - 输出 : - sol 解值 - ii 第一个最大值位置 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var sol float64 - var ii int - var err bool = false - - n := len(a) - ii = 0 - sol = a[ii] - for i := 1; i < n; i++ { - if sol < a[i] { - ii = i - sol = a[i] - } - } - - err = true - return sol, ii, err -} diff --git a/vendor/github.com/nuknal/goNum/MaxAbs.go b/vendor/github.com/nuknal/goNum/MaxAbs.go deleted file mode 100644 index 2c43325..0000000 --- a/vendor/github.com/nuknal/goNum/MaxAbs.go +++ /dev/null @@ -1,54 +0,0 @@ -// Max -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-19 -版本 : 0.0.0 ------------------------------------------------------- - 向量第一个绝对值最大值及其位置 ------------------------------------------------------- -输入 : - a a 被处理向量 -输出 : - sol 解值 - ii 第一个绝对值最大值位置 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// MaxAbs 向量第一个绝对值最大值及其位置 -func MaxAbs(a []float64) (float64, int, bool) { - /* - 向量第一个绝对值最大值及其位置 - 输入 : - a a 被处理向量 - 输出 : - sol 解值 - ii 第一个最大值位置 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var sol float64 - var ii int - var err bool = false - - n := len(a) - ii = 0 - sol = a[ii] - for i := 1; i < n; i++ { - if math.Abs(sol) < math.Abs(a[i]) { - ii = i - sol = a[i] - } - } - - err = true - return sol, ii, err -} diff --git a/vendor/github.com/nuknal/goNum/MaxMinSort.go b/vendor/github.com/nuknal/goNum/MaxMinSort.go deleted file mode 100644 index 18101ef..0000000 --- a/vendor/github.com/nuknal/goNum/MaxMinSort.go +++ /dev/null @@ -1,51 +0,0 @@ -// MaxMinSort -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-19 -版本 : 0.0.0 ------------------------------------------------------- - 向量从大到小的排序 ------------------------------------------------------- -输入 : - a a 被排序向量 -输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// MaxMinSort 向量从大到小的排序 -func MaxMinSort(a []float64) ([]float64, bool) { - /* - 向量从大到小的排序 - 输入 : - a a 被排序向量 - 输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var err bool = false - var temp float64 - var n int = len(a) - sol := make([]float64, n) - for i := 0; i < n; i++ { - sol[i] = a[i] - } - - for i := 0; i < n; i++ { - for j := i + 1; j < n; j++ { - if sol[i] < sol[j] { - temp = sol[j] - sol[j] = sol[i] - sol[i] = temp - } - } - } - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/MergeSort.go b/vendor/github.com/nuknal/goNum/MergeSort.go deleted file mode 100644 index 3e9efb4..0000000 --- a/vendor/github.com/nuknal/goNum/MergeSort.go +++ /dev/null @@ -1,111 +0,0 @@ -// MergeSort -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-03-06 -版本 : 0.0.0 ------------------------------------------------------- - 归并排序法 -理论: - 时间复杂度: O(nlog2(n)) - 最好情况 : O(nlog2(n)) - 最坏情况 : O(nlog2(n)) - 空间复杂度: O(n) - 稳定性 : 稳定 ------------------------------------------------------- -输入 : - in 输入矩阵, 1xn -输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// mergeSort_merge -// i0 --- first -// i1 --- mid -// i2 --- last -func mergeSort_merge(sol *Matrix, i0, i1, i2 int) { - temp := ZeroMatrix(1, (*sol).Columns) - i := i0 - j := i1 + 1 - k := 0 - for i <= i1 && j <= i2 { - if (*sol).Data[i] < (*sol).Data[j] { - temp.Data[k] = (*sol).Data[i] - k++ - i++ - } else { - temp.Data[k] = (*sol).Data[j] - k++ - j++ - } - } - - for i <= i1 { - temp.Data[k] = (*sol).Data[i] - k++ - i++ - } - - for j <= i2 { - temp.Data[k] = (*sol).Data[j] - k++ - j++ - } - - for i = 0; i < k; i++ { - (*sol).Data[i0+i] = temp.Data[i] - } -} - -// mergeSort_sort -// i0 --- first -// i2 --- last -func mergeSort_sort(sol *Matrix, i0, i2 int) { - if i0 < i2 { - var i1 int = (i0 + i2) / 2 - mergeSort_sort(sol, i0, i1) - mergeSort_sort(sol, i1+1, i2) - mergeSort_merge(sol, i0, i1, i2) - } -} - -// MergeSort 归并排序法 -func MergeSort(in Matrix) (Matrix, bool) { - /* - 归并排序法 - 输入 : - in 输入矩阵, 1xn - 输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断初值维数 - if in.Rows != 1 { - panic("Error in goNum.MergeSort: Input Matrix error") - } - if in.Columns < 1 { - panic("Error in goNum.MergeSort: Empty input Matrix") - } else if in.Columns == 1 { - return in, true - } - - n := in.Columns - sol := ZeroMatrix(1, n) - var err bool = false - - //初始化sol - for i := 0; i < n; i++ { - sol.Data[i] = in.Data[i] - } - //排序开始 - mergeSort_sort(&sol, 0, n-1) - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/Min.go b/vendor/github.com/nuknal/goNum/Min.go deleted file mode 100644 index 3aa2b7a..0000000 --- a/vendor/github.com/nuknal/goNum/Min.go +++ /dev/null @@ -1,50 +0,0 @@ -// Min -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-19 -版本 : 0.0.0 ------------------------------------------------------- - 向量第一个最小值及其位置 ------------------------------------------------------- -输入 : - a a 被处理向量 -输出 : - sol 解值 - ii 第一个最小值位置 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// Min 向量第一个最小值及其位置 -func Min(a []float64) (float64, int, bool) { - /* - 向量第一个最小值及其位置 - 输入 : - a a 被处理向量 - 输出 : - sol 解值 - ii 第一个最大值位置 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var sol float64 - var ii int - var err bool = false - - n := len(a) - ii = 0 - sol = a[ii] - for i := 1; i < n; i++ { - if sol > a[i] { - ii = i - sol = a[i] - } - } - - err = true - return sol, ii, err -} diff --git a/vendor/github.com/nuknal/goNum/MinAbs.go b/vendor/github.com/nuknal/goNum/MinAbs.go deleted file mode 100644 index 2a830c6..0000000 --- a/vendor/github.com/nuknal/goNum/MinAbs.go +++ /dev/null @@ -1,54 +0,0 @@ -// Min -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-19 -版本 : 0.0.0 ------------------------------------------------------- - 向量第一个绝对值最小值及其位置 ------------------------------------------------------- -输入 : - a a 被处理向量 -输出 : - sol 解值 - ii 第一个绝对值最小值位置 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// MinAbs 向量第一个绝对值最小值及其位置 -func MinAbs(a []float64) (float64, int, bool) { - /* - 向量第一个绝对值最小值及其位置 - 输入 : - a a 被处理向量 - 输出 : - sol 解值 - ii 第一个最大值位置 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var sol float64 - var ii int - var err bool = false - - n := len(a) - ii = 0 - sol = a[ii] - for i := 1; i < n; i++ { - if math.Abs(sol) > math.Abs(a[i]) { - ii = i - sol = a[i] - } - } - - err = true - return sol, ii, err -} diff --git a/vendor/github.com/nuknal/goNum/MinMaxSort.go b/vendor/github.com/nuknal/goNum/MinMaxSort.go deleted file mode 100644 index b419f74..0000000 --- a/vendor/github.com/nuknal/goNum/MinMaxSort.go +++ /dev/null @@ -1,51 +0,0 @@ -// MinMaxSort -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-19 -版本 : 0.0.0 ------------------------------------------------------- - 向量从小到大的排序 ------------------------------------------------------- -输入 : - a a 被排序向量 -输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// MinMaxSort 向量从小到大的排序 -func MinMaxSort(a []float64) ([]float64, bool) { - /* - 向量从小到大的排序 - 输入 : - a a 被排序向量 - 输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var err bool = false - var temp float64 - var n int = len(a) - sol := make([]float64, n) - for i := 0; i < n; i++ { - sol[i] = a[i] - } - - for i := 0; i < n; i++ { - for j := i + 1; j < n; j++ { - if sol[i] > sol[j] { - temp = sol[j] - sol[j] = sol[i] - sol[i] = temp - } - } - } - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/Muller.go b/vendor/github.com/nuknal/goNum/Muller.go deleted file mode 100644 index fe78adf..0000000 --- a/vendor/github.com/nuknal/goNum/Muller.go +++ /dev/null @@ -1,115 +0,0 @@ -// Muller -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-20 -版本 : 0.0.0 ------------------------------------------------------- - Muller法求解非线性方程f(x)=0的解 -理论: - - 参考 John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 2.5.2. ------------------------------------------------------- -输入 : - fun 求解函数 - x0 初值自变量,三个不同点,3x1 - tol 控制误差 - n 最大迭代步数 -输出 : - sol 解 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// Muller Muller法求解非线性方程f(x)=0的解 -func Muller(fun func(float64) float64, x0 Matrix, tol float64, n int) (float64, bool) { - /* - Muller法求解非线性方程f(x)=0的解 - 输入 : - fun 求解函数 - x0 初值自变量,三个不同点,3x1 - tol 控制误差 - n 最大迭代步数 - 输出 : - sol 解 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断tol - if tol <= 0.0 { - panic("Error in goNum.Muller: tol less than or euqals to zero") - } - - var sol float64 - var err bool = false - - //x0赋给p0并计算对应的y0 - p0 := ZeroMatrix(x0.Rows, x0.Columns+1) - x0sort, _ := MinMaxSort(x0.Data) - for i := 0; i < x0.Rows; i++ { - p0.SetMatrix(i, 0, x0sort[i]) - p0.SetMatrix(i, 1, fun(x0sort[i])) - } - - //迭代计算 - for i := 0; i < n; i++ { - //准备系数 - h0 := p0.GetFromMatrix(0, 0) - p0.GetFromMatrix(2, 0) - h1 := p0.GetFromMatrix(1, 0) - p0.GetFromMatrix(2, 0) - c := p0.GetFromMatrix(2, 1) - e0 := p0.GetFromMatrix(0, 1) - c - e1 := p0.GetFromMatrix(1, 1) - c - b := h1*h0*h0 - h0*h1*h1 - a := (e0*h1 - e1*h0) / b - b = (e1*h0*h0 - e0*h1*h1) / b - //求根 - z2 := b*b - 4.0*a*c - if z2 < 0 { - //panic("Error in goNum.Muller: There is complex values exist") - z2 = 0 - } - - var z float64 - if b < 0 { - z = -2.0 * c / (b - math.Sqrt(z2)) - } - z = -2.0 * c / (b + math.Sqrt(z2)) - z = p0.GetFromMatrix(2, 0) + z - - //判断解 - if math.Abs(fun(z)) < tol { - err = true - sol = z - return sol, err - } - - //删除离z最远的点 - dis := []float64{ - z - p0.GetFromMatrix(0, 0), - z - p0.GetFromMatrix(1, 0), - z - p0.GetFromMatrix(2, 0)} - _, deli, _ := MaxAbs(dis) - for j := 0; j < 3; j++ { - if deli == j { - p0.SetMatrix(j, 0, z) - } - } - x0sort, _ = MinMaxSort(p0.ColumnOfMatrix(0)) - for j := 0; j < 3; j++ { - p0.SetMatrix(j, 0, x0sort[j]) - p0.SetMatrix(j, 1, fun(x0sort[j])) - } - } - - err = false - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/NLEs_SeidelIterate.go b/vendor/github.com/nuknal/goNum/NLEs_SeidelIterate.go deleted file mode 100644 index c444916..0000000 --- a/vendor/github.com/nuknal/goNum/NLEs_SeidelIterate.go +++ /dev/null @@ -1,97 +0,0 @@ -// NLEs_SeidelIterate -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-20 -版本 : 0.0.0 ------------------------------------------------------- - 多元非线性方程组Seidel迭代 -理论: - Pk = x0 - Fk = [f1, f2,..., fn]' - - |df1/dx1 df1/dx2 ... df1/dxn| - |df2/dx1 df2/dx2 ... df2/dxn| - Jk = |... ... ... ... | - |dfn/dx1 dfn/dx2 ... dfn/dxn| - - Jk*dPk = -Fk - P_(k+1) = Pk+dPk - - 参考:John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 3.7 ------------------------------------------------------- -输入 : - funs 方程组,nx1 - J Joccobi矩阵,nxn - x0 初值x - tol 控制误差 - n 最大迭代次数 -输出 : - sol 解,nx1 - err 解出标志:false-未解出或达到边界; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// NLEs_SeidelIterate 多元非线性方程组Seidel迭代 -func NLEs_SeidelIterate(funs, J func(Matrix) Matrix, x0 Matrix, - tol float64, n int) (Matrix, bool) { - /* - 多元非线性方程组Seidel迭代 - 输入 : - funs 方程组,nx1 - J Joccobi矩阵,nxn - x0 初值x - tol 控制误差 - n 最大迭代次数 - 输出 : - sol 解,nx1 - err 解出标志:false-未解出或达到边界; - true-全部解出 - */ - //判断x维数 - if x0.Columns != 1 { - panic("Error in goNum.NLEs_SeidelIterate: x0 is not a vector") - } - - sol := ZeroMatrix(x0.Rows, 1) //解向量 - xold := ZeroMatrix(x0.Rows, 1) //Pk - var err bool = false - - //将x0赋予xold - for i := 0; i < x0.Rows; i++ { - xold.Data[i] = x0.Data[i] - sol.Data[i] = x0.Data[i] - } - //循环迭代 - y := NumProductMatrix(funs(xold), -1.0) - for i := 0; i < n; i++ { - ja := J(xold) - dx, dxerr := LEs_ECPE(Matrix2ToSlices(ja), y.Data) - if dxerr != true { - panic("Error in goNum.NLEs_SeidelIterate: Solve error") - } - //求解新值 - for i := 0; i < x0.Rows; i++ { - sol.Data[i] = xold.Data[i] + dx[i] - xold.Data[i] = sol.Data[i] - } - y = NumProductMatrix(funs(xold), -1.0) - //判断误差 - maxy, _, _ := MaxAbs(y.Data) - if math.Abs(maxy) < tol { - err = true - return sol, err - } - } - - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/NewtonIterate.go b/vendor/github.com/nuknal/goNum/NewtonIterate.go deleted file mode 100644 index c3e2050..0000000 --- a/vendor/github.com/nuknal/goNum/NewtonIterate.go +++ /dev/null @@ -1,82 +0,0 @@ -// NewtonIterate -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-01 -版本 : 0.0.0 ------------------------------------------------------- - 牛顿迭代求解非线性方程 f(x)=0 在区间[a, b]内的根 -理论: - (局部收敛定律) - 1. f(x)在区间[a, b]具有二阶连续导数; - 2. 当xE[a, b],f'(x) != 0; - (非局部收敛定律) - 1. 当xE[a, b],f'(x)、f''(x)连续且不变号 - 2. 选取初值x0E[a, b],使f(x0)*f''(x0) > 0 - 平方收敛 ------------------------------------------------------- -输入 : - fn f(x)函数,定义为等式左侧部分,右侧为0 - fn1 f'(x)函数 - a, b 求解区间 - c 求解初值 - N 步数上限 - tol 误差上限 -输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import "math" - -// NewtonIterate 牛顿迭代求解非线性方程 f(x)=0 在区间[a, b]内的根 -func NewtonIterate(fn, fn1 func(float64) float64, a, b, c float64, N int, tol float64) (float64, bool) { - /* - 牛顿迭代求解非线性方程 f(x)=0 在区间[a, b]内的根 - 输入 : - fn f(x)函数,定义为等式左侧部分,右侧为0 - fn1 f'(x)函数 - a, b 求解区间 - c 求解初值 - N 步数上限 - tol 误差上限 - 输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var sol float64 - var err bool = false - - // 判断端点和初值是否为所求之解 - switch { - case math.Abs(fn(a)) < tol: - sol = a - err = true - return sol, err - case math.Abs(fn(b)) < tol: - sol = b - err = true - return sol, err - case math.Abs(fn(c)) < tol: - sol = c - err = true - return sol, err - } - - //求解 - sol = c - fn(c)/fn1(c) - for i := 0; i < N; i++ { - if math.Abs(sol-c) < tol { - err = true - return sol, err - } - c = sol - sol = c - fn(c)/fn1(c) - } - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/Norm.go b/vendor/github.com/nuknal/goNum/Norm.go deleted file mode 100644 index d7beaae..0000000 --- a/vendor/github.com/nuknal/goNum/Norm.go +++ /dev/null @@ -1,79 +0,0 @@ -// Norm -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-21 -版本 : 0.0.0 ------------------------------------------------------- - 求向量p范数 -理论: - ------------------------------------------------------- -输入 : - A 向量,nx1 - p 指定范数 -输出 : - sol 范数值 - err 解出标志:false-未解出或达到边界; - true-全部解出 ------------------------------------------------------- -注释 p : - 1 1 modulus - 2 2 modulus - p p modulus - -1 infinite modulus ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// Norm 求向量p范数 -func Norm(A Matrix, p float64) (float64, bool) { - /* - 求向量p范数 - 输入 : - A 向量,nx1 - p 指定范数 - 输出 : - sol 范数值 - err 解出标志:false-未解出或达到边界; - true-全部解出 - */ - //A的维数 - if A.Columns != 1 { - panic("Error in goNum.Norm: A is not a vector") - } - //判断p的值 - if (p < (-1.0)) || ((p > (-1.0)) && (p <= 0.0)) { - panic("Error in goNum.Norm: p is wrong") - } - - var sol float64 - var err bool = false - switch { - case p == 1.0: //1范数 - for i := 0; i < A.Rows; i++ { - sol += math.Abs(A.Data[i]) - } - case p == 2.0: //2范数 - for i := 0; i < A.Rows; i++ { - sol += A.Data[i] * A.Data[i] - } - sol = math.Sqrt(sol) - case p == -1.0: //无穷范数 - sol, _, _ = MaxAbs(A.Data) - sol = math.Abs(sol) - default: //p范数 - for i := 0; i < A.Rows; i++ { - sol += math.Pow(A.Data[i], p) - } - sol = math.Pow(sol, 1.0/p) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/Norm1.go b/vendor/github.com/nuknal/goNum/Norm1.go deleted file mode 100644 index 2109858..0000000 --- a/vendor/github.com/nuknal/goNum/Norm1.go +++ /dev/null @@ -1,58 +0,0 @@ -// Norm1 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-21 -版本 : 0.0.0 ------------------------------------------------------- - 求矩阵1范数 -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 65. - ||A||1 = Maxj(Sumi(|aij|)) ------------------------------------------------------- -输入 : - A 矩阵 -输出 : - sol 范数值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// Norm1 求矩阵1范数 -func Norm1(A Matrix) (float64, bool) { - /* - 求矩阵1范数 - 输入 : - A 矩阵 - 输出 : - sol 范数值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - - var sol float64 - var err bool = false - - //求取列绝对值的和 - col := make([]float64, A.Columns) - for j := 0; j < A.Columns; j++ { - thisColumn := A.ColumnOfMatrix(j) - for i := 0; i < len(thisColumn); i++ { - col[j] += math.Abs(thisColumn[i]) - } - } - - //求取最大值 - sol, _, _ = Max(col) - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/NormInf.go b/vendor/github.com/nuknal/goNum/NormInf.go deleted file mode 100644 index bbcc1c0..0000000 --- a/vendor/github.com/nuknal/goNum/NormInf.go +++ /dev/null @@ -1,56 +0,0 @@ -// NormInf -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-21 -版本 : 0.0.0 ------------------------------------------------------- - 求矩阵无穷范数 -理论: - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 65. - ||A||Inf = Maxi(Sumj(|aij|)) ------------------------------------------------------- -输入 : - A 矩阵 -输出 : - sol 范数值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import "math" - -// NormInf 求矩阵无穷范数 -func NormInf(A Matrix) (float64, bool) { - /* - 求矩阵无穷范数 - 输入 : - A 矩阵 - 输出 : - sol 范数值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - - var sol float64 - var err bool = false - - //求取行绝对值的和 - row := make([]float64, A.Rows) - for i := 0; i < A.Rows; i++ { - thisRow := A.RowOfMatrix(i) - for j := 0; j < len(thisRow); j++ { - row[i] += math.Abs(thisRow[j]) - } - } - - //求取最大值 - sol, _, _ = Max(row) - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/ODEAdamsBashforthMoulton.go b/vendor/github.com/nuknal/goNum/ODEAdamsBashforthMoulton.go deleted file mode 100644 index 5ba8325..0000000 --- a/vendor/github.com/nuknal/goNum/ODEAdamsBashforthMoulton.go +++ /dev/null @@ -1,96 +0,0 @@ -// ODEAdamsBashforthMoulton -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-26 -版本 : 0.0.0 ------------------------------------------------------- - Adams-Bashforth-Moulton预估校正方法 -理论: - 预估(外插): - h - p_(k+1) = yk + ---(-9f_(k-3)+37f_(k-2)-59f_(k-1)+55fk) - 24 - 校正(内插): - h - y_(k+1) = yn + ----(f_(k-2)-5f_(k-1)+19fk+9f_(k+1)) - 24 - - 步长 h < 0.75/|fy(x,y)| - - 四阶精度 - - 参考:John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 9.6.1 ------------------------------------------------------- -输入 : - fun 被积分函数 - x0 初值,2x4 - h 步长 - n 积分步数 -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// ODEAdamsBashforthMoulton Adams-Bashforth-Moulton预估校正方法 -func ODEAdamsBashforthMoulton(fun func(float64, float64) float64, x0 Matrix, h float64, n int) (Matrix, bool) { - /* - Adams-Bashforth-Moulton预估校正方法 - 输入 : - fun 被积分函数 - x0 初值,2x4 - h 步长 - n 积分步数 - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断n - if n < 0 { - panic("Error in goNum.ODEAdamsBashforthMoulton: n is not a positive value") - } - //判断初值 - if (x0.Rows != 2) || (x0.Columns < 4) { - panic("Error in goNum.ODEAdamsBashforthMoulton: Initial values error") - } - - sol := ZeroMatrix(2, n+1) - p := ZeroMatrix(n+1, 1) - var err bool = false - - //初值 - for i := 0; i < 4; i++ { - sol.SetMatrix(0, i, x0.GetFromMatrix(0, i)) - sol.SetMatrix(1, i, x0.GetFromMatrix(1, i)) - } - - //计算 - for i := 4; i < n+1; i++ { - sol.SetMatrix(0, i, sol.GetFromMatrix(0, i-1)+h) //xi - //pi - temp0 := fun(sol.GetFromMatrix(0, i-3), sol.GetFromMatrix(1, i-3)) - temp1 := fun(sol.GetFromMatrix(0, i-2), sol.GetFromMatrix(1, i-2)) - temp2 := fun(sol.GetFromMatrix(0, i-1), sol.GetFromMatrix(1, i-1)) - soltemp := -9.0 * fun(sol.GetFromMatrix(0, i-4), sol.GetFromMatrix(1, i-4)) - soltemp += 37.0 * temp0 - soltemp += -59.0 * temp1 - soltemp += 55.0 * temp2 - p.SetMatrix(i, 0, sol.GetFromMatrix(1, i-1)+h*soltemp/24.0) - //yi - soltemp = temp0 - soltemp += -5.0 * temp1 - soltemp += 19.0 * temp2 - soltemp += 9.0 * fun(sol.GetFromMatrix(0, i), p.GetFromMatrix(i, 0)) - sol.SetMatrix(1, i, sol.GetFromMatrix(1, i-1)+h*soltemp/24.0) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/ODEAdamsEX.go b/vendor/github.com/nuknal/goNum/ODEAdamsEX.go deleted file mode 100644 index e3ba9ee..0000000 --- a/vendor/github.com/nuknal/goNum/ODEAdamsEX.go +++ /dev/null @@ -1,99 +0,0 @@ -// ODEAdamsEX -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-13 -版本 : 0.0.0 ------------------------------------------------------- - 四步Adams外推公式,显式、线性 -理论: - h - y_(n+1) = yn + ----(55f(xn,yn) - 59f(x_(n-1),y_(n-1)) + - 24 - 37f(x_(n-2),y_(n-2)) - 9f(x_(n-3),y_(n-3))) - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 200-201. ------------------------------------------------------- -输入 : - fun 被积分函数 - x0 初值 - xend 积分终止点 - fn 方程个数 - n 迭代次数 -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// ODEAdamsEX 四步Adams外推公式,显式、线性,单个方程 -func ODEAdamsEX(fun func(Matrix, int) float64, x0 Matrix, xend float64, fn, n int) (Matrix, bool) { - /* - 四步Adams外推公式,显式、线性,单个方程 - 输入 : - fun 被积分函数 - x0 初值 - xend 积分终止点 - fn 方程个数 - n 迭代次数 - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断方程个数是否对应初值个数 - if x0.Rows != fn+1 { - panic("Error in goNum.ODEAdamsEX: Quantities of x0 and fn+1 are not equal") - } - - sol := ZeroMatrix(fn+1, n+1) - h := (xend - x0.GetFromMatrix(0, 0)) / float64(n) - - //把初值赋给sol - for i := 0; i < fn+1; i++ { - sol.SetMatrix(i, 0, x0.Data[i]) - } - - //前三个使用RK44计算,不包括已有的初值点 - xendRK := x0.GetFromMatrix(0, 0) + 3.0*h - solRK, errRK := RK44(fun, x0, xendRK, fn, 3) - - if errRK != true { - panic("Error in goNum.ODEAdamsEX: RK44 solving error") - } - - //传递RK44计算的结果到sol - for k := 0; k < fn+1; k++ { //fn个方程,fn+1个参数 - for i := 1; i < 4; i++ { //三个结果 - sol.SetMatrix(k, i, solRK.GetFromMatrix(k, i)) - } - } - - //Adams外推公式, 4(即n+1)需要3,2,1,0四个 - for i := 4; i < n+1; i++ { - sol.SetMatrix(0, i, sol.GetFromMatrix(0, i-1)+h) //xi - //临时初值 - xyn := ZeroMatrix(fn+1, 1) - xyn_1 := ZeroMatrix(fn+1, 1) - xyn_2 := ZeroMatrix(fn+1, 1) - xyn_3 := ZeroMatrix(fn+1, 1) - for j := 0; j < fn+1; j++ { - xyn.Data[j] = sol.GetFromMatrix(j, i-1) - xyn_1.Data[j] = sol.GetFromMatrix(j, i-2) - xyn_2.Data[j] = sol.GetFromMatrix(j, i-3) - xyn_3.Data[j] = sol.GetFromMatrix(j, i-4) - } - //计算 - for j := 0; j < fn; j++ { //不包含xi的其他参数 - temp0 := 55.0*fun(xyn, j) - 59.0*fun(xyn_1, j) + 37.0*fun(xyn_2, j) - 9.0*fun(xyn_3, j) - temp0 = xyn.Data[j+1] + temp0*h/24.0 - sol.SetMatrix(j+1, i, temp0) //yi - } - } - - return sol, true -} diff --git a/vendor/github.com/nuknal/goNum/ODEAdamsIN.go b/vendor/github.com/nuknal/goNum/ODEAdamsIN.go deleted file mode 100644 index 350c573..0000000 --- a/vendor/github.com/nuknal/goNum/ODEAdamsIN.go +++ /dev/null @@ -1,120 +0,0 @@ -// ODEAdamsIN -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-13 -版本 : 0.0.0 ------------------------------------------------------- - 三次Adams内插公式,隐式、线性 -理论: - h - y_(n+1) = yn + ----(9f(x_(n+1),y_(n+1)) + 19f(xn,yn) - - 24 - 5f(x_(n-1),y_(n-1)) + f(x_(n-2),y_(n-2))) - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 201-202. ------------------------------------------------------- -输入 : - fun 被积分函数 - x0 初值 - xend 积分终止点 - tol 内迭代控制误差 - fn 方程个数 - n 迭代次数 -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// ODEAdamsIN 四步Adams外推公式,显式、线性,单个方程 -func ODEAdamsIN(fun func(Matrix, int) float64, x0 Matrix, xend, tol float64, fn, n int) (Matrix, bool) { - /* - 四步Adams外推公式,显式、线性,单个方程 - 输入 : - fun 被积分函数 - x0 初值 - xend 积分终止点 - tol 内迭代控制误差 - fn 方程个数 - n 迭代次数 - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断方程个数是否对应初值个数 - if x0.Rows != fn+1 { - panic("Error in goNum.ODEAdamsEX: Quantities of x0 and fn+1 are not equal") - } - - sol := ZeroMatrix(fn+1, n+1) - h := (xend - x0.GetFromMatrix(0, 0)) / float64(n) - - //把初值赋给sol - for i := 0; i < fn+1; i++ { - sol.SetMatrix(i, 0, x0.Data[i]) - } - - //前三个使用RK44计算,不包括已有的初值点 - xendRK := x0.GetFromMatrix(0, 0) + 3.0*h - solRK, errRK := RK44(fun, x0, xendRK, fn, 3) - - if errRK != true { - panic("Error in goNum.ODEAdamsEX: RK44 solving error") - } - - //传递RK44计算的结果到sol - for k := 0; k < fn+1; k++ { //fn个方程,fn+1个参数 - for i := 1; i < 4; i++ { //三个结果 - sol.SetMatrix(k, i, solRK.GetFromMatrix(k, i)) - } - } - - //三次Adams内插公式, 4(即n+1)需要3,2,1,0四个 - for i := 4; i < n+1; i++ { - sol.SetMatrix(0, i, sol.GetFromMatrix(0, i-1)+h) //xi - //临时初值 - xyn := ZeroMatrix(fn+1, 1) - xyn_1 := ZeroMatrix(fn+1, 1) - xyn_2 := ZeroMatrix(fn+1, 1) - xyn_3 := ZeroMatrix(fn+1, 1) - xyn10 := ZeroMatrix(fn+1, 1) - for j := 0; j < fn+1; j++ { - xyn.Data[j] = sol.GetFromMatrix(j, i-1) - xyn_1.Data[j] = sol.GetFromMatrix(j, i-2) - xyn_2.Data[j] = sol.GetFromMatrix(j, i-3) - xyn_3.Data[j] = sol.GetFromMatrix(j, i-4) - } - xyn10.Data[0] = sol.GetFromMatrix(0, i) //x_(n+1) - //内插公式隐式迭代初值,为4步Adams外推公式结果 - for j := 0; j < fn; j++ { //不包含xi的其他参数 - temp0 := 55.0*fun(xyn, j) - 59.0*fun(xyn_1, j) + 37.0*fun(xyn_2, j) - 9.0*fun(xyn_3, j) - xyn10.Data[j+1] = xyn.Data[j+1] + temp0*h/24.0 //y_(n+1)0 - } - //内插,对每个公式 - for j := 0; j < fn; j++ { - //隐式迭代,误差控制 - yn1k := xyn10.Data[j+1] - for { - temp0 := 9.0*fun(xyn10, j) + 19.0*fun(xyn, j) - 5.0*fun(xyn_1, j) + fun(xyn_2, j) - temp0 = xyn.Data[j+1] + h*temp0/24.0 - if math.Abs(temp0-yn1k) < tol { - sol.SetMatrix(j+1, i, temp0) - break //跳出无条件循环 - } - yn1k = temp0 - } - } - } - - return sol, true -} diff --git a/vendor/github.com/nuknal/goNum/ODEDiff.go b/vendor/github.com/nuknal/goNum/ODEDiff.go deleted file mode 100644 index 30c7291..0000000 --- a/vendor/github.com/nuknal/goNum/ODEDiff.go +++ /dev/null @@ -1,120 +0,0 @@ -// ODEDiff -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-26 -版本 : 0.0.0 ------------------------------------------------------- - 差分方法求解常微分方程 -理论: - 对于常微分方程:x''(t) = p(t)x'(t)+q(t)(t)+r(t) - 机器边值x(a) = x0, x(b) = xN - 使用中心差分公式可得 - x_(j+1)-2xj+x_(j-1) x_(j+1)-x_(j-1) - --------------------- = pj----------------- + qj*xj+rj - h^2 2h - 即 - -h h - (---pj-1)x_(j-1) + (2+h^2*qj)xj + (---pj-1)x_(j+1) = -h^2*rj - 2 2 - 下标j表示*(tj), tj=a+j*h,(区间[a, b]等分为N等份) - 整理成N-1阶线性方程组: - |2+h^2*q1 h*p1/2-1 | - |-h*p2/2-1 2+h^2*q2 h*p2/2-1 | - | -h*p3/2-1 2+h^2*q3 h*p3/2-1 |* - | ...... | - | -h*p_(N-2)/2-1 2+h^2*q_(N-2) h*p_(N-2)/2-1| - | -h*p_(N-1)/2-1 2+h^2*q_(N-1)| - - [x1 x2 x3 ... x_(N-1)]' = - - [-h^2*r1+e0 -h^2*r2 -h^2*r3 ... -h^2*r_(N-2) -h^2*r_(N-1)+eN]' - 其中: - e0 = (h*p1/2+1)x0, eN = (h*p_(N-1)/2+1)xN - - 参考:John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 9.9 ------------------------------------------------------- -输入 : - funp, funq, funr 被积分函数系数 - x0 初值,2x2, 按列a, b - Nn 积分步数 -输出 : - sol 解矩阵, 2x(Nn+1) - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// ODEDiff 差分方法求解常微分方程 -func ODEDiff(funp, funq, funr func(float64) float64, x0 Matrix, Nn int) (Matrix, bool) { - /* - 差分方法求解常微分方程 - 输入 : - funp, funq, funr 被积分函数系数 - x0 初值,2x2, 按列a, b - Nn 积分步数 - 输出 : - sol 解矩阵, 2x(Nn+1) - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断x0维数 - if (x0.Rows != 2) || (x0.Columns != 2) { - panic("Error in goNum.ODEDiff: Initial values error") - } - //判断Nn - if Nn < 1 { - panic("Error in goNum.ODEDiff: Nn must greater than zero") - } else if Nn == 1 { - return x0, true - } - - sol := ZeroMatrix(2, Nn+1) - var err bool = false - Aa := ZeroMatrix(Nn-1, Nn-1) - Bb := ZeroMatrix(Nn-1, 1) - h := (x0.GetFromMatrix(0, 1) - x0.GetFromMatrix(0, 0)) / float64(Nn) - - //ti - for i := 0; i < Nn+1; i++ { - sol.SetMatrix(0, i, x0.GetFromMatrix(0, 0)+h*float64(i)) - } - //x0, xN - sol.SetMatrix(1, 0, x0.GetFromMatrix(1, 0)) - sol.SetMatrix(1, Nn, x0.GetFromMatrix(1, 1)) - - //第一行 - Aa.SetMatrix(0, 0, 2.0+h*h*funq(sol.GetFromMatrix(0, 1))) - Aa.SetMatrix(0, 1, h*funp(sol.GetFromMatrix(0, 1))/2.0-1.0) - e0 := (h*funp(sol.GetFromMatrix(0, 1))/2.0 + 1.0) * sol.GetFromMatrix(1, 0) - Bb.SetMatrix(0, 0, -1.0*h*h*funr(sol.GetFromMatrix(0, 1))+e0) - for i := 1; i < Nn-2; i++ { - Aa.SetMatrix(i, i-1, -1.0*h*funp(sol.GetFromMatrix(0, i+1))/2.0-1.0) - Aa.SetMatrix(i, i, 2.0+h*h*funq(sol.GetFromMatrix(0, i+1))) - Aa.SetMatrix(i, i+1, h*funp(sol.GetFromMatrix(0, i+1))/2.0-1.0) - Bb.SetMatrix(i, 0, -1.0*h*h*funr(sol.GetFromMatrix(0, i+1))) - } - //最后行 - Aa.SetMatrix(Nn-2, Nn-2-1, -1.0*h*funp(sol.GetFromMatrix(0, Nn-1))/2.0-1.0) - Aa.SetMatrix(Nn-2, Nn-2, 2.0+h*h*funq(sol.GetFromMatrix(0, Nn-1))) - eN := (-1.0*h*funp(sol.GetFromMatrix(0, Nn-1))/2.0 + 1.0) * sol.GetFromMatrix(1, Nn) - Bb.SetMatrix(Nn-2, 0, -1.0*h*h*funr(sol.GetFromMatrix(0, Nn-1))+eN) - - //求解线性方程组LEs_Chasing - xTemp, errTemp := LEs_Chasing(Aa, Bb) - if errTemp != true { - panic("Error in goNum.ODEDiff: Solve error") - } - - //xTemp赋予sol - for i := 1; i < Nn; i++ { - sol.SetMatrix(1, i, xTemp.GetFromMatrix(i-1, 0)) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/ODEEuler.go b/vendor/github.com/nuknal/goNum/ODEEuler.go deleted file mode 100644 index d42801c..0000000 --- a/vendor/github.com/nuknal/goNum/ODEEuler.go +++ /dev/null @@ -1,75 +0,0 @@ -// ODEEuler -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-13 -版本 : 0.0.0 ------------------------------------------------------- - 常微分方程的Euler(欧拉)解法 -理论: - 对于常微分方程 - dy - ---- = f(x, y) - dx - y(x0) = y0, x0 <= x - - Euler(欧拉)解法: - y_(n+1) = yn + hf(xn, yn), n = 0,1,2,3,... - - 欧拉法是条件稳定的: 0 <= h <=-2.0/(y'/y) - 欧拉法为一阶精度的方法 - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 179. ------------------------------------------------------- -输入 : - fun 被积分函数 - x0, y0 初值 - h 积分步长 - n 迭代次数 -输出 : - sol 解矩阵,nx2 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// ODEEuler 常微分方程的Euler(欧拉)解法 -func ODEEuler(fun func(float64, float64) float64, x0, y0, h float64, n int) (Matrix, bool) { - /* - 常微分方程的Euler(欧拉)解法 - 输入 : - fun 被积分函数 - x0, y0 初值 - h 积分步长 - n 迭代次数 - 输出 : - sol 解矩阵,nx2 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断n - if n < 0 { - panic("Error in goNum.ODEEuler: n is not a positive value") - } - - sol := ZeroMatrix(n+1, 2) - var err bool = false - - //初值 - sol.SetMatrix(0, 0, x0) - sol.SetMatrix(0, 1, y0) - - for i := 0; i < n; i++ { - xi := sol.GetFromMatrix(i, 0) - xi1 := xi + h - yi1 := sol.GetFromMatrix(i, 1) + h*fun(xi, sol.GetFromMatrix(i, 1)) - sol.SetMatrix(i+1, 0, xi1) - sol.SetMatrix(i+1, 1, yi1) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/ODEEulerPredictorCorrector.go b/vendor/github.com/nuknal/goNum/ODEEulerPredictorCorrector.go deleted file mode 100644 index a6f07ea..0000000 --- a/vendor/github.com/nuknal/goNum/ODEEulerPredictorCorrector.go +++ /dev/null @@ -1,80 +0,0 @@ -// ODEEulerPredictorCorrector -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-13 -版本 : 0.0.0 ------------------------------------------------------- - 常微分方程的Euler(欧拉)预估校正解法 -理论: - 对于常微分方程 - dy - ---- = f(x, y) - dx - y(x0) = y0, x0 <= x - - Euler(欧拉)解法: - y_(n+1)0 = yn + hf(xn, yn) - y_(n+1) = yn + h(f(xn, yn)+f(x_(n+1), y_(n+1)0))/2 - n = 0,1,2,3,... - - 欧拉法是条件稳定的: |1+(y'/y)h+((y'/y)h)^2/2| <= 1.0 - 欧拉法为二阶精度的方法 - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 182. ------------------------------------------------------- -输入 : - fun 被积分函数 - x0, y0 初值 - h 积分步长 - n 迭代次数 -输出 : - sol 解矩阵,nx2 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// ODEEulerPredictorCorrector 常微分方程的Euler(欧拉)预估校正解法 -func ODEEulerPredictorCorrector(fun func(float64, float64) float64, x0, y0, h float64, n int) (Matrix, bool) { - /* - 常微分方程的Euler(欧拉)预估校正解法 - 输入 : - fun 被积分函数 - x0, y0 初值 - h 积分步长 - n 迭代次数 - 输出 : - sol 解矩阵,nx2 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断n - if n < 0 { - panic("Error in goNum.ODEEulerPredictorCorrector: n is not a positive value") - } - - sol := ZeroMatrix(n+1, 2) - var err bool = false - - //初值 - sol.SetMatrix(0, 0, x0) - sol.SetMatrix(0, 1, y0) - - for i := 0; i < n; i++ { - xi := sol.GetFromMatrix(i, 0) - yi := sol.GetFromMatrix(i, 1) - xi1 := xi + h - temp0 := fun(xi, yi) - yi10 := yi + h*temp0 - yi1 := yi + h*(temp0+fun(xi1, yi10))/2.0 - sol.SetMatrix(i+1, 0, xi1) - sol.SetMatrix(i+1, 1, yi1) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/ODEHamming.go b/vendor/github.com/nuknal/goNum/ODEHamming.go deleted file mode 100644 index a627c1f..0000000 --- a/vendor/github.com/nuknal/goNum/ODEHamming.go +++ /dev/null @@ -1,96 +0,0 @@ -// ODEHamming -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-26 -版本 : 0.0.0 ------------------------------------------------------- - Hamming预估校正方法 -理论: - 预估: - 4h - p_(k+1) = y_(k-3) + ---(2f_(k-2)-f_(k-1)+2fk) - 3 - 校正): - -y_(k-2)+9yk 3h - y_(k+1) = -------------- + ---(-f_(k-1)+2fk+f_(k+1)) - 8 8 - - 步长 h < 0.69/|fy(x,y)| - - 四阶精度 - - 参考:John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 9.6.6 ------------------------------------------------------- -输入 : - fun 被积分函数 - x0 初值,2x4 - h 步长 - n 积分步数 -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// ODEHamming Hamming预估校正方法 -func ODEHamming(fun func(float64, float64) float64, x0 Matrix, h float64, n int) (Matrix, bool) { - /* - Hamming预估校正方法 - 输入 : - fun 被积分函数 - x0 初值,2x4 - h 步长 - n 积分步数 - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断n - if n < 0 { - panic("Error in goNum.Hamming: n is not a positive value") - } - //判断初值 - if (x0.Rows != 2) || (x0.Columns < 4) { - panic("Error in goNum.Hamming: Initial values error") - } - - sol := ZeroMatrix(2, n+1) - p := ZeroMatrix(n+1, 1) - var err bool = false - - //初值 - for i := 0; i < 4; i++ { - sol.SetMatrix(0, i, x0.GetFromMatrix(0, i)) - sol.SetMatrix(1, i, x0.GetFromMatrix(1, i)) - } - - //计算 - for i := 4; i < n+1; i++ { - sol.SetMatrix(0, i, sol.GetFromMatrix(0, i-1)+h) //xi - //pi - temp0 := fun(sol.GetFromMatrix(0, i-3), sol.GetFromMatrix(1, i-3)) //f_(i-3) - temp1 := fun(sol.GetFromMatrix(0, i-2), sol.GetFromMatrix(1, i-2)) //f_(i-2) - temp2 := fun(sol.GetFromMatrix(0, i-1), sol.GetFromMatrix(1, i-1)) //f_(i-1) - soltemp := 2.0 * temp0 - soltemp += -1.0 * temp1 - soltemp += 2.0 * temp2 - p.SetMatrix(i, 0, sol.GetFromMatrix(1, i-4)+4.0*h*soltemp/3.0) - //yi - soltemp = -1.0 * temp1 - soltemp += 2.0 * temp2 - soltemp += fun(sol.GetFromMatrix(0, i), p.GetFromMatrix(i, 0)) //fi - soltemp = 3.0 * h * soltemp / 8.0 - soltemp += (-1.0*sol.GetFromMatrix(1, i-3) + 9.0*sol.GetFromMatrix(1, i-1)) / 8.0 - sol.SetMatrix(1, i, soltemp) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/ODEHeun.go b/vendor/github.com/nuknal/goNum/ODEHeun.go deleted file mode 100644 index eeb01d9..0000000 --- a/vendor/github.com/nuknal/goNum/ODEHeun.go +++ /dev/null @@ -1,79 +0,0 @@ -// ODEHeun -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-26 -版本 : 0.0.0 ------------------------------------------------------- - 常微分方程的Heun解法 -理论: - 对于常微分方程 - dy - ---- = f(x, y) - dx - y(x0) = y0, x0 <= x - - Heun法为 - 1. p_(k+1) = yk+hf(xk,yk) //欧拉法 - 2. y_(k+1) = yk+h(f(xk,yk)+f(x_(k+1),p_(k+1))/2 //梯形法 - k = 0,1,2,3,... - - 参考:John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 9.3 ------------------------------------------------------- -输入 : - fun 被积分函数 - x0, y0 初值 - h 步长 - n 迭代次数 -输出 : - sol 解矩阵,nx2 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// ODEHeun 常微分方程的Heun解法 -func ODEHeun(fun func(float64, float64) float64, x0, y0, h float64, n int) (Matrix, bool) { - /* - 常微分方程的Heun解法 - 输入 : - fun 被积分函数 - x0, y0 初值 - h 步长 - n 迭代次数 - 输出 : - sol 解矩阵,nx2 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断n - if n < 0 { - panic("Error in goNum.ODEHeun: n is not a positive value") - } - - sol := ZeroMatrix(n+1, 2) - p := ZeroMatrix(n+1, 2) - var err bool = false - - //初值 - sol.SetMatrix(0, 0, x0) - sol.SetMatrix(0, 1, y0) - - for i := 1; i < n+1; i++ { - p.SetMatrix(i, 0, sol.GetFromMatrix(i-1, 0)+h) //xi=x_(i-1)+h - sol.SetMatrix(i, 0, sol.GetFromMatrix(i-1, 0)+h) //xi=x_(i-1)+h - - soltemp := fun(sol.GetFromMatrix(i-1, 0), sol.GetFromMatrix(i-1, 1)) - p.SetMatrix(i, 1, sol.GetFromMatrix(i-1, 1)+h*soltemp) - - soltemp = h * (soltemp + fun(sol.GetFromMatrix(i, 0), p.GetFromMatrix(i, 1))) / 2.0 - sol.SetMatrix(i, 1, sol.GetFromMatrix(i-1, 1)+soltemp) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/ODEMilneSimpson.go b/vendor/github.com/nuknal/goNum/ODEMilneSimpson.go deleted file mode 100644 index bea95c9..0000000 --- a/vendor/github.com/nuknal/goNum/ODEMilneSimpson.go +++ /dev/null @@ -1,94 +0,0 @@ -// ODEMilneSimpson -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-26 -版本 : 0.0.0 ------------------------------------------------------- - Milne-Simpson预估校正方法 -理论: - 预估: - 4h - p_(k+1) = y_(k-3) + ---(2f_(k-2)-f_(k-1)+2fk) - 3 - 校正: - h - y_(k+1) = y_(k-1) + ---(f_(k-1)+4fk+f_(k+1)) - 3 - - 步长 h < 0.45/|fy(x,y)| - - 四阶精度 - - 参考:John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 9.6.4 ------------------------------------------------------- -输入 : - fun 被积分函数 - x0 初值,2x4 - h 步长 - n 积分步数 -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// ODEMilneSimpson Milne-Simpson预估校正方法 -func ODEMilneSimpson(fun func(float64, float64) float64, x0 Matrix, h float64, n int) (Matrix, bool) { - /* - Milne-Simpson预估校正方法 - 输入 : - fun 被积分函数 - x0 初值,2x4 - h 步长 - n 积分步数 - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断n - if n < 0 { - panic("Error in goNum.ODEMilneSimpson: n is not a positive value") - } - //判断初值 - if (x0.Rows != 2) || (x0.Columns < 4) { - panic("Error in goNum.ODEMilneSimpson: Initial values error") - } - - sol := ZeroMatrix(2, n+1) - p := ZeroMatrix(n+1, 1) - var err bool = false - - //初值 - for i := 0; i < 4; i++ { - sol.SetMatrix(0, i, x0.GetFromMatrix(0, i)) - sol.SetMatrix(1, i, x0.GetFromMatrix(1, i)) - } - - //计算 - for i := 4; i < n+1; i++ { - sol.SetMatrix(0, i, sol.GetFromMatrix(0, i-1)+h) //xi - //pi - temp0 := fun(sol.GetFromMatrix(0, i-3), sol.GetFromMatrix(1, i-3)) //f_(i-3) - temp1 := fun(sol.GetFromMatrix(0, i-2), sol.GetFromMatrix(1, i-2)) //f_(i-2) - temp2 := fun(sol.GetFromMatrix(0, i-1), sol.GetFromMatrix(1, i-1)) //f_(i-1) - soltemp := 2.0 * temp0 - soltemp += -1.0 * temp1 - soltemp += 2.0 * temp2 - p.SetMatrix(i, 0, sol.GetFromMatrix(1, i-4)+4.0*h*soltemp/3.0) - //yi - soltemp = temp1 - soltemp += 4.0 * temp2 - soltemp += fun(sol.GetFromMatrix(0, i), p.GetFromMatrix(i, 0)) //fi - sol.SetMatrix(1, i, sol.GetFromMatrix(1, i-2)+h*soltemp/3.0) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/ODETrapezoid.go b/vendor/github.com/nuknal/goNum/ODETrapezoid.go deleted file mode 100644 index b3953d9..0000000 --- a/vendor/github.com/nuknal/goNum/ODETrapezoid.go +++ /dev/null @@ -1,96 +0,0 @@ -// ODETrapezoid -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-13 -版本 : 0.0.0 ------------------------------------------------------- - 常微分方程的梯形解法 -理论: - 对于常微分方程 - dy - ---- = f(x, y) - dx - y(x0) = y0, x0 <= x - - 梯形解法: - h - y_(n+1) = yn + ---(f(xn, yn)+f(x_(n+1), y_(n+1))), n = 0,1,2,3,... - 2 - - 梯形法是无条件稳定的 - 梯形法为二阶精度的方法 - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 181. ------------------------------------------------------- -输入 : - fun 被积分函数 - x0, y0 初值 - h 积分步长 - tol 内循环控制误差 - n 迭代次数 -输出 : - sol 解矩阵,nx2 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// ODETrapezoid 常微分方程的梯形解法 -func ODETrapezoid(fun func(float64, float64) float64, x0, y0, h, tol float64, n int) (Matrix, bool) { - /* - 常微分方程的梯形解法 - 输入 : - fun 被积分函数 - x0, y0 初值 - h 积分步长 - tol 内循环控制误差 - n 迭代次数 - 输出 : - sol 解矩阵,nx2 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断n - if n < 0 { - panic("Error in goNum.ODETrapezoid: n is not a positive value") - } - - sol := ZeroMatrix(n+1, 2) - var err bool = false - - //初值 - sol.SetMatrix(0, 0, x0) - sol.SetMatrix(0, 1, y0) - - for i := 0; i < n; i++ { - xi := sol.GetFromMatrix(i, 0) - yi := sol.GetFromMatrix(i, 1) - xi10 := xi + h - yi10 := yi + h*fun(xi, yi) - //内循环 - yik := make([]float64, 0) - yik = append(yik, yi10) //k=0 - var k int = 0 - for { - yik = append(yik, yi+h*(fun(xi, yi)+fun(xi10, yik[k]))/2.0) - if math.Abs(yik[k+1]-yik[k]) < tol { - break - } - k++ - } - - sol.SetMatrix(i+1, 0, xi10) - sol.SetMatrix(i+1, 1, yik[k+1]) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/OptimizeFibonacci.go b/vendor/github.com/nuknal/goNum/OptimizeFibonacci.go deleted file mode 100644 index 965940a..0000000 --- a/vendor/github.com/nuknal/goNum/OptimizeFibonacci.go +++ /dev/null @@ -1,137 +0,0 @@ -// OptimizeFibonacci -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-24 -版本 : 0.0.0 ------------------------------------------------------- - Fibonacci搜索法求单峰单自变量极小值 -理论: - 对于在区间[a, b]内有定义的凹函数f(x),取点: - ck = ak+(1-r)(bk-ak) - d = ak+rk(bk-ak) - 其中r为Fibonacci数列值之比F_(n-k-1)/F_(n-k) - - 迭代次数n应使得Fn > (b0-a0)/tol - - 如果f(c) <= f(d),则将d赋予b,c赋予d,继续迭代; - 如果f(c) > f(d),则将c赋予a,d赋予c,继续迭代。 - 迭代终止条件为Abs(f(a)-f(b)) < tol,取区间中值 - - 参考:John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 8.1.1.2,并改进 ------------------------------------------------------- -输入 : - fun 函数 - a, b 区间范围 - tol 控制误差 -输出 : - sol 解 - err 解出标志:false-未解出或达到边界; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import "math" - -// OptimizeFibonacci Fibonacci搜索法求单峰单自变量极小值 -func OptimizeFibonacci(fun func(float64) float64, a, b, tol float64) (float64, bool) { - /* - Fibonacci搜索法求单峰单自变量极小值 - 输入 : - fun 函数 - a, b 区间范围 - tol 控制误差 - 输出 : - sol 解 - err 解出标志:false-未解出或达到边界; - true-全部解出 - */ - //判断a和b的关系 - if math.Abs(fun(a)-fun(b)) < tol { - if fun(a) < fun(b) { - return a, true - } else { - return b, true - } - } - - var sol float64 - var err bool = false - var n, cdFlag int = 0, 0 //cdFlag---下一步计算c(cdFlag=0)还是d(cdFlag=1) - - //计算n - bat := (fun(b) - fun(a)) / tol - for i := 0; i < 1e6; i++ { - if float64(Fibonacci(i)) > bat { - n = i - break - } - } - - //计算 - //第一步计算两次,c、d - fnn := float64(Fibonacci(n-1)) / float64(Fibonacci(n)) - ba := b - a - c := a + (1.0-fnn)*ba - d := a + fnn*ba - fc := fun(c) - fd := fun(d) - if fc <= fd { - b = d - d = c - fd = fc - cdFlag = 0 - } else { - a = c - c = d - fc = fd - cdFlag = 1 - } - //0 < k < n-3 - for k := 1; k < n-3; k++ { - fnn = float64(Fibonacci(n-k-1)) / float64(Fibonacci(n-k)) - ba = b - a - if cdFlag == 0 { //计算c - c = a + (1.0-fnn)*ba - fc = fun(c) - } else { //计算d - d = a + fnn*ba - fd = fun(d) - } - //下一步 - if fc <= fd { - b = d - d = c - fd = fc - cdFlag = 0 - } else { - a = c - c = d - fc = fd - cdFlag = 1 - } - } - //k=n-3, F2/F3 = 1/2, 不放入循环是为减少if判断的损耗 - fnn = 0.5 - 0.01 //加区别常数0.01 - ba = b - a - if cdFlag == 0 { //计算c - c = a + (1.0-fnn)*ba - fc = fun(c) - } else { //计算d - d = a + fnn*ba - fd = fun(d) - } - if fc <= fd { - b = d - } else { - a = c - } - sol = (b + a) / 2.0 - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/OptimizeGS.go b/vendor/github.com/nuknal/goNum/OptimizeGS.go deleted file mode 100644 index d35c6a5..0000000 --- a/vendor/github.com/nuknal/goNum/OptimizeGS.go +++ /dev/null @@ -1,91 +0,0 @@ -// OptimizeGS -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-24 -版本 : 0.0.0 ------------------------------------------------------- - 黄金分割法(Golden Section)求单峰单自变量极小值 -理论: - 对于在区间[a, b]内有定义的凹函数f(x),取黄金分割点: - c = a+(1-r)(b-a) - d = b-(1-r)(b-a) - 其中r为黄金分割比例(Sqrt(5)-1)/2 - - 如果f(c) <= f(d),则将d赋予b,继续迭代; - 如果f(c) > f(d),则将c赋予a,继续迭代。 - 迭代终止条件为Abs(f(a)-f(b)) < tol,取小值(c或d) - - 参考:John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 8.1.1.1 ------------------------------------------------------- -输入 : - fun 函数 - a, b 区间范围 - tol 控制误差 - N 最大迭代步数 -输出 : - sol 解 - err 解出标志:false-未解出或达到边界; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// OptimizeGS 黄金分割法(Golden Section)求单峰单自变量极小值 -func OptimizeGS(fun func(float64) float64, a, b, tol float64, N int) (float64, bool) { - /* - 黄金分割法(Golden Section)求单峰单自变量极小值 - 输入 : - fun 函数 - a, b 区间范围 - tol 控制误差 - N 最大迭代步数 - 输出 : - sol 解 - err 解出标志:false-未解出或达到边界; - true-全部解出 - */ - //判断a和b的关系 - if math.Abs(fun(a)-fun(b)) < tol { - if fun(a) < fun(b) { - return a, true - } else { - return b, true - } - } - - var sol float64 - var err bool = false - r1 := 1.0 - (math.Sqrt(5.0)-1.0)/2.0 //1-r - - for i := 0; i < N; i++ { - ba := b - a //b-a - c := a + r1*ba - d := b - r1*ba - //区间压缩 - if fun(c) > fun(d) { - a = c - } else { //fun(c)<=fun(d) - b = d - } - //误差判断 - if math.Abs(fun(a)-fun(b)) < tol { - err = true - if fun(c) < fun(d) { - sol = c - } else { - sol = d - } - return sol, err - } - } - - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/OptimizeSimplex.go b/vendor/github.com/nuknal/goNum/OptimizeSimplex.go deleted file mode 100644 index 27ede29..0000000 --- a/vendor/github.com/nuknal/goNum/OptimizeSimplex.go +++ /dev/null @@ -1,197 +0,0 @@ -// OptimizeSimplex -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-25 -版本 : 0.0.0 ------------------------------------------------------- - Nelder-Mead单纯形法求解多自变量函数极小值 -理论: - 对于函数z=f(x0,x1,...,xn),取三个相异的点构成三角形,并按函数值 - 从小到大排序为B、G、W,依下列方法进行操作: - 0. 取BG中点M = (B+G)/2; - 1. 取反射点R = M+(M-W); - 2. 取延伸点E = R+(R-M); - 3. 收缩点C = zMin(C1=M+(W-M)/2, C2=M+(M-W)/2); - 4. 收缩点S = (B+W)/2。 - 1~4每一步计算函数值并置换排序BGW - n个x需要n+1个初始点 - - 参考:John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 8.2.1 ------------------------------------------------------- -输入 : - fun 函数表达式 - x0 初始点,nx(n+1),第一行x0,第二行x1,... - tol 控制误差 - Nn 最大迭代步数 -输出 : - sol 解,(n+1)x1 - |xPath 自变量变化历程,二维浮点,可使用Slices2ToMatrix函数转换为Matrix类型 - |fxPath 函数值变化历程,一维浮点,可使用Slices1ToMatrix函数转换为Matrix类型 - |errPath 误差绝对值历程,一维浮点,可使用Slices1ToMatrix函数转换为Matrix类型 - err 解出标志:false-未解出或达到边界; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// OptimizeSimplex Nelder-Mead单纯形法求解多自变量函数极小值 -func OptimizeSimplex(fun func(Matrix) float64, x0 Matrix, tol float64, Nn int) (Matrix, bool) { - /* - Nelder-Mead单纯形法求解多自变量函数极小值 - 输入 : - fun 函数表达式 - x0 初始点,nx(n+1),第一行x0,第二行x1,... - tol 控制误差 - Nn 最大迭代步数 - 输出 : - sol 解,(n+1)x1 - err 解出标志:false-未解出或达到边界; - true-全部解出 - */ - //判断x0大小 - n := x0.Rows //xi - if x0.Columns != n+1 { //初始点个数等于自变量个数加一 - panic("Error in goNum.OptimizeSimplex: Initial values error") - } - //判断N - if Nn < 1 { - panic("Error in goNum.OptimizeSimplex: Iteration number error") - } - - sol := ZeroMatrix(n+1, 1) - xPath := make([][]float64, 0) - fxPath := make([]float64, 0) - errPath := make([]float64, 0) - var err bool = false - - //计算f(x) - for i := 0; i < n+1; i++ { - sol.Data[i] = fun(NewMatrix(n, 1, x0.ColumnOfMatrix(i))) - } - - //取最大、最小、次大和次小序号 - _, l0, _ := Min(sol.Data) //最小 - _, h0, _ := Max(sol.Data) //最大 - l1 := h0 //次小 - h1 := l0 //次大 - for i := 0; i < n+1; i++ { - if (i != l0) && (i != h0) && (sol.Data[i] < sol.Data[l1]) { - l1 = i - } - if (i != l0) && (i != h0) && (sol.Data[i] > sol.Data[h1]) { - h1 = i - } - } - xPath = append(xPath, x0.ColumnOfMatrix(l0)) - fxPath = append(fxPath, sol.Data[l0]) - errPath = append(errPath, math.Abs(sol.Data[h0]-sol.Data[l0])) - - //迭代 - for i := 0; i < Nn; i++ { - //中点M = (Sum-W)/n - temp0 := ZeroMatrix(n, 1) - for j := 0; j < n+1; j++ { - temp0 = AddMatrix(temp0, NewMatrix(n, 1, x0.ColumnOfMatrix(j))) - } - mm := NumProductMatrix(SubMatrix(temp0, NewMatrix(n, 1, x0.ColumnOfMatrix(h0))), 1.0/float64(n)) - //反射点R = 2M-W - rr := SubMatrix(NumProductMatrix(mm, 2.0), NewMatrix(n, 1, x0.ColumnOfMatrix(h0))) - fr := fun(rr) - //判断 - if fr < sol.Data[h1] { //fr sol.Data[l1] { //R-->W - for j := 0; j < n; j++ { - x0.SetMatrix(j, h0, rr.Data[j]) - } - sol.Data[h0] = fr - } else { //延伸E - ee := SubMatrix(NumProductMatrix(rr, 2.0), mm) - fe := fun(ee) - if fe < sol.Data[l1] { //E-->W - for j := 0; j < n; j++ { - x0.SetMatrix(j, h0, ee.Data[j]) - } - sol.Data[h0] = fe - } else { //R-->W - for j := 0; j < n; j++ { - x0.SetMatrix(j, h0, rr.Data[j]) - } - sol.Data[h0] = fr - } - } - } else { //case 2 - if fr < sol.Data[h0] { - for j := 0; j < n; j++ { - x0.SetMatrix(j, h0, rr.Data[j]) - } - sol.Data[h0] = fr - } - //C1 = (W+M)/2, C2 = (R+M)/2,默认C=C1 - cc := NumProductMatrix(AddMatrix(NewMatrix(n, 1, x0.ColumnOfMatrix(h0)), mm), 0.5) - fc := fun(cc) - c2 := NumProductMatrix(AddMatrix(rr, mm), 0.5) - fc2 := fun(c2) - //判断获得C - if fc > fc2 { - for j := 0; j < n; j++ { - cc.Data[j] = c2.Data[j] - } - fc = fc2 - } - if fc < sol.Data[h0] { - for j := 0; j < n; j++ { - x0.SetMatrix(j, h0, cc.Data[j]) - } - sol.Data[h0] = fc - } else { //xj = (xj+x0)/2 - for j := 0; j < n+1; j++ { - if j != l0 { - temp1 := NumProductMatrix(AddMatrix(NewMatrix(n, 1, x0.ColumnOfMatrix(j)), - NewMatrix(n, 1, x0.ColumnOfMatrix(l0))), 0.5) - for k := 0; k < n; k++ { - x0.SetMatrix(k, j, temp1.Data[k]) - } - sol.Data[j] = fun(temp1) - } - } - } - } - //下一步 - _, l0, _ = Min(sol.Data) //最小 - _, h0, _ = Max(sol.Data) //最大 - l1 = h0 //次小 - h1 = l0 //次大 - for j := 0; j < n+1; j++ { - if (j != l0) && (j != h0) && (sol.Data[j] < sol.Data[l1]) { - l1 = j - } - if (j != l0) && (j != h0) && (sol.Data[j] > sol.Data[h1]) { - h1 = j - } - } - //记录历程 - xPath = append(xPath, x0.ColumnOfMatrix(l0)) - fxPath = append(fxPath, sol.Data[l0]) - errPath = append(errPath, math.Abs(sol.Data[h0]-sol.Data[l0])) - //判断满足精度否 - if errPath[i+1] < tol { - //将所有数据赋予sol,前n项为x,最后一项为f(x) - sol.Data[n] = sol.Data[l0] - for j := 0; j < n; j++ { - sol.Data[j] = x0.GetFromMatrix(j, l0) - } - err = true - return sol, err - } - } - - return sol, err //,xPath,fxPath,errPath -} diff --git a/vendor/github.com/nuknal/goNum/PDEDiffEllipticalH5.go b/vendor/github.com/nuknal/goNum/PDEDiffEllipticalH5.go deleted file mode 100644 index a34b4cf..0000000 --- a/vendor/github.com/nuknal/goNum/PDEDiffEllipticalH5.go +++ /dev/null @@ -1,201 +0,0 @@ -// PDEDiffEllipticalH5 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-01-08 -版本 : 0.0.0 ------------------------------------------------------- - 求解椭圆型偏微分方程(Helmholtz)的差分解法(五点格式) -理论: - 对于椭圆型偏微分方程(Helmholtz方程): - d^2u d^2u - ------ + ------ + f(x, y)*u= g(x, y) - dx^2 dy^2 - - u(x, 0) = fy0(x), u(x, b) = fyb(x) - u(0, y) = fx0(y), u(a, y) = fxa(y) - - 0 < x < a, 0 < y < b - - x分为n等份,y分为m等份 - - hy^2[u_(i+1,j) + u_(i-1,j) - 2u_(i,j)] + - hx^2[u_(i,j+1) + u_(i,j-1) - 2u_(i,j)] + - f_(i,j)*u_(i,j)*hx^2*hy^2 - g_(i,j)*hx^2*hy^2 = 0 - - 解以上方程组可得解 - - 参考 John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 10.3. ------------------------------------------------------- -输入 : - funy0, funyb, funx0, funxa, funf, fung 边界函数及f(x, y)、g(x, y) - x0 求解范围,2x2 - n, m 网格数量, 对应x和y -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// PDEDiffEllipticalH5 求解椭圆型偏微分方程(Helmholtz)的差分解法(五点格式) -func PDEDiffEllipticalH5(funy0, funyb, funx0, funxa func(float64) float64, - funf, fung func(float64, float64) float64, x0 Matrix, n, m int) (Matrix, bool) { - /* - 求解椭圆型偏微分方程(Helmholtz)的差分解法(五点格式) - 输入 : - funy0, funyb, funx0, funxa, funf, fung 边界函数及f(x, y)、g(x, y) - x0 求解范围,2x2 - n, m 网格数量, 对应x和y - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断网格数量 - if (m < 1) || (n < 1) { - panic("Error in goNum.PDEDiffEllipticalH5: Grid numbers error") - } - //判断初值维数 - if (x0.Rows < 2) || (x0.Columns < 2) { - panic("Error in goNum.PDEDiffEllipticalH5: Initial values error") - } - - var err bool = false - sol := ZeroMatrix(m+1, n+1) //行y变化,列x变化 - hx := (x0.GetFromMatrix(1, 0) - x0.GetFromMatrix(0, 0)) / float64(n) //x方向步长 - hy := (x0.GetFromMatrix(1, 1) - x0.GetFromMatrix(0, 1)) / float64(m) //y方向步长 - hx2 := hx * hx - hy2 := hy * hy - hxhy2 := hx2 * hy2 - - //边界框的解 - //第一行的值和最后一行的值,不包括第一个和最后一个 - for i := 1; i < n; i++ { - sol.SetMatrix(0, i, funy0(x0.GetFromMatrix(0, 0)+hx*float64(i))) - sol.SetMatrix(m, i, funyb(x0.GetFromMatrix(0, 0)+hx*float64(i))) - } - //第一列的值和最后一列的值,包括第一个和最后一个 - for j := 0; j < m+1; j++ { - sol.SetMatrix(j, 0, funx0(x0.GetFromMatrix(0, 1)+hy*float64(j))) - sol.SetMatrix(j, n, funxa(x0.GetFromMatrix(0, 1)+hy*float64(j))) - } - - //求解中间点,主对角占优矩阵解法,利用高斯消去方法 - AA := ZeroMatrix((n-1)*(m-1), (n-1)*(m-1)) //系数矩阵A - BA := ZeroMatrix((n-1)*(m-1), 1) //值矩阵B - - //赋值系数矩阵和值矩阵 - //第一行, j = 1 - //第一个 - fij := hxhy2 * funf(x0.GetFromMatrix(0, 0)+hx*1.0, x0.GetFromMatrix(0, 1)+hy*1.0) - AA.SetMatrix(0, 0, -2.0*hx2-2.0*hy2+fij) - AA.SetMatrix(0, 1, hy2) - AA.SetMatrix(0, n-1, hx2) - tempBA := hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*1.0, x0.GetFromMatrix(0, 1)+hy*1.0) - tempBA = tempBA - hy2*funx0(x0.GetFromMatrix(0, 1)+hy*1.0) - tempBA = tempBA - hx2*funy0(x0.GetFromMatrix(0, 0)+hx*1.0) - BA.SetMatrix(0, 0, tempBA) - for i := 2; i < n-1; i++ { - fij = hxhy2 * funf(x0.GetFromMatrix(0, 0)+hx*float64(i), x0.GetFromMatrix(0, 1)+hy*1.0) - AA.SetMatrix(i-1, i-2, hy2) - AA.SetMatrix(i-1, i-1, -2.0*hx2-2.0*hy2+fij) - AA.SetMatrix(i-1, i, hy2) - AA.SetMatrix(i-1, (n-1)*1+i-1, hx2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*float64(i), x0.GetFromMatrix(0, 1)+hy*1.0) - tempBA = tempBA - hx2*funy0(x0.GetFromMatrix(0, 0)+hx*float64(i)) - BA.SetMatrix((n-1)*0+i-1, 0, tempBA) - } - //最后一个 - fij = hxhy2 * funf(x0.GetFromMatrix(0, 0)+hx*float64(n-1), x0.GetFromMatrix(0, 1)+hy*1.0) - AA.SetMatrix(n-1-1, n-1-2, hy2) - AA.SetMatrix(n-1-1, n-1-1, -2.0*hx2-2.0*hy2+fij) - AA.SetMatrix(n-1-1, (n-1)*1+n-1-1, hx2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*float64(n-1), x0.GetFromMatrix(0, 1)+hy*1.0) - tempBA = tempBA - hy2*funxa(x0.GetFromMatrix(0, 1)+hy*1.0) - tempBA = tempBA - hx2*funy0(x0.GetFromMatrix(0, 0)+hx*float64(n-1)) - BA.SetMatrix(n-1-1, 0, tempBA) - //中间行, 2 <= j <= m-2 - for j := 2; j < m-1; j++ { - //第一个 - fij = hxhy2 * funf(x0.GetFromMatrix(0, 0)+hx*1.0, x0.GetFromMatrix(0, 1)+hy*float64(j)) - AA.SetMatrix((n-1)*(j-1), (n-1)*(j-1-1), hx2) - AA.SetMatrix((n-1)*(j-1), (n-1)*(j-1), -2.0*hx2-2.0*hy2+fij) - AA.SetMatrix((n-1)*(j-1), (n-1)*(j-1)+1, hy2) - AA.SetMatrix((n-1)*(j-1), (n-1)*(j-1)+n-1, hx2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*1.0, x0.GetFromMatrix(0, 1)+hy*float64(j)) - tempBA = tempBA - hy2*funx0(x0.GetFromMatrix(0, 1)+hy*float64(j)) - BA.SetMatrix((n-1)*(j-1), 0, tempBA) - for i := 2; i < n-1; i++ { - fij = hxhy2 * funf(x0.GetFromMatrix(0, 0)+hx*float64(i), x0.GetFromMatrix(0, 1)+hy*float64(j)) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1-1)+i-1, hx2) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1)+i-2, hy2) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1)+i-1, -2.0*hx2-2.0*hy2+fij) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1)+i, hy2) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1+1)+i-1, hx2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*float64(i), x0.GetFromMatrix(0, 1)+hy*float64(j)) - BA.SetMatrix((n-1)*(j-1)+i-1, 0, tempBA) - } - //最后一个 - fij = hxhy2 * funf(x0.GetFromMatrix(0, 0)+hx*float64(n-1), x0.GetFromMatrix(0, 1)+hy*float64(j)) - AA.SetMatrix((n-1)*(j-1)+n-1-1, (n-1)*(j-1-1)+n-1-1, hx2) - AA.SetMatrix((n-1)*(j-1)+n-1-1, (n-1)*(j-1)+n-1-2, hy2) - AA.SetMatrix((n-1)*(j-1)+n-1-1, (n-1)*(j-1)+n-1-1, -2.0*hx2-2.0*hy2+fij) - AA.SetMatrix((n-1)*(j-1)+n-1-1, (n-1)*(j-1+1)+n-1-1, hx2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*float64(n-1), x0.GetFromMatrix(0, 1)+hy*float64(j)) - tempBA = tempBA - hy2*funxa(x0.GetFromMatrix(0, 1)+hy*float64(j)) - BA.SetMatrix((n-1)*(j-1)+n-1-1, 0, tempBA) - } - //最后一行, j = m-1 - //第一个 - fij = hxhy2 * funf(x0.GetFromMatrix(0, 0)+hx*1.0, x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - AA.SetMatrix((n-1)*(m-1-1), (n-1)*(m-1-1-1), hx2) - AA.SetMatrix((n-1)*(m-1-1), (n-1)*(m-1-1), -2.0*hx2-2.0*hy2+fij) - AA.SetMatrix((n-1)*(m-1-1), (n-1)*(m-1-1)+1, hy2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*1.0, x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - tempBA = tempBA - hy2*funx0(x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - tempBA = tempBA - hx2*funyb(x0.GetFromMatrix(0, 0)+hx*1.0) - BA.SetMatrix((n-1)*(m-1-1), 0, tempBA) - for i := 2; i < n-1; i++ { - fij = hxhy2 * funf(x0.GetFromMatrix(0, 0)+hx*float64(i), x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - AA.SetMatrix((n-1)*(m-1-1)+i-1, (n-1)*(m-1-1-1)+i-1, hx2) - AA.SetMatrix((n-1)*(m-1-1)+i-1, (n-1)*(m-1-1)+i-2, hy2) - AA.SetMatrix((n-1)*(m-1-1)+i-1, (n-1)*(m-1-1)+i-1, -2.0*hx2-2.0*hy2+fij) - AA.SetMatrix((n-1)*(m-1-1)+i-1, (n-1)*(m-1-1)+i, hy2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*float64(i), x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - tempBA = tempBA - hx2*funyb(x0.GetFromMatrix(0, 0)+hx*float64(i)) - BA.SetMatrix((n-1)*(m-1-1)+i-1, 0, tempBA) - } - //最后一个 - fij = hxhy2 * funf(x0.GetFromMatrix(0, 0)+hx*float64(n-1), x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - AA.SetMatrix((n-1)*(m-1-1)+n-1-1, (n-1)*(m-1-1-1)+n-1-1, hx2) - AA.SetMatrix((n-1)*(m-1-1)+n-1-1, (n-1)*(m-1-1)+n-1-2, hy2) - AA.SetMatrix((n-1)*(m-1-1)+n-1-1, (n-1)*(m-1-1)+n-1-1, -2.0*hx2-2.0*hy2+fij) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*float64(n-1), x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - tempBA = tempBA - hy2*funxa(x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - tempBA = tempBA - hx2*funyb(x0.GetFromMatrix(0, 0)+hx*float64(n-1)) - BA.SetMatrix((n-1)*(m-1-1)+n-1-1, 0, tempBA) - //求解矩阵方程 - tempp, temperr := LEs_ECPE(Matrix2ToSlices(AA), Matrix1ToSlices(BA)) - if temperr != true { - panic("Error in goNum.PDEDiffEllipticalH5: Solve error") - } - //解赋予sol - ii := 1 - jj := 1 - for i := 0; i < len(tempp); i++ { - sol.SetMatrix(ii, jj, tempp[i]) - if jj == n-1 { - ii++ - jj = 0 - } - jj++ - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/PDEDiffEllipticalLL5.go b/vendor/github.com/nuknal/goNum/PDEDiffEllipticalLL5.go deleted file mode 100644 index b023d29..0000000 --- a/vendor/github.com/nuknal/goNum/PDEDiffEllipticalLL5.go +++ /dev/null @@ -1,179 +0,0 @@ -// PDEDiffEllipticalLL5 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-01-07 -版本 : 0.0.0 ------------------------------------------------------- - 求解椭圆型偏微分方程(Laplace)的差分解法(五点格式) -理论: - 对于椭圆型偏微分方程(Laplace方程): - d^2u d^2u - ------ + ------ = 0 - dx^2 dy^2 - - u(x, 0) = fy0(x), u(x, b) = fyb(x) - u(0, y) = fx0(y), u(a, y) = fxa(y) - - 0 < x < a, 0 < y < b - - x分为n等份,y分为m等份 - - hy^2[u_(i+1,j) + u_(i-1,j) - 2u_(i,j)] + - hx^2[u_(i,j+1) + u_(i,j-1) - 2u_(i,j)] = 0 - - 解以上方程组可得解 - - 参考 John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 10.3.1. ------------------------------------------------------- -输入 : - funy0, funyb, funx0, funxa 边界函数 - x0 求解范围,2x2 - n, m 网格数量, 对应x和y -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// PDEDiffEllipticalLL5 求解椭圆型偏微分方程(Laplace)的差分解法(五点格式) -func PDEDiffEllipticalLL5(funy0, funyb, funx0, funxa func(float64) float64, - x0 Matrix, n, m int) (Matrix, bool) { - /* - 求解椭圆型偏微分方程(Laplace)的差分解法(五点格式) - 输入 : - funy0, funyb, funx0, funxa 边界函数 - x0 求解范围,2x2 - n, m 网格数量, 对应x和y - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断网格数量 - if (m < 1) || (n < 1) { - panic("Error in goNum.PDEDiffEllipticalLL5: Grid numbers error") - } - //判断初值维数 - if (x0.Rows < 2) || (x0.Columns < 2) { - panic("Error in goNum.PDEDiffEllipticalLL5: Initial values error") - } - - var err bool = false - sol := ZeroMatrix(m+1, n+1) //行y变化,列x变化 - hx := (x0.GetFromMatrix(1, 0) - x0.GetFromMatrix(0, 0)) / float64(n) //x方向步长 - hy := (x0.GetFromMatrix(1, 1) - x0.GetFromMatrix(0, 1)) / float64(m) //y方向步长 - - //边界框的解 - //第一行的值和最后一行的值,不包括第一个和最后一个 - for i := 1; i < n; i++ { - sol.SetMatrix(0, i, funy0(x0.GetFromMatrix(0, 0)+hx*float64(i))) - sol.SetMatrix(m, i, funyb(x0.GetFromMatrix(0, 0)+hx*float64(i))) - } - //第一列的值和最后一列的值,包括第一个和最后一个 - for j := 0; j < m+1; j++ { - sol.SetMatrix(j, 0, funx0(x0.GetFromMatrix(0, 1)+hy*float64(j))) - sol.SetMatrix(j, n, funxa(x0.GetFromMatrix(0, 1)+hy*float64(j))) - } - - //求解中间点,主对角占优矩阵解法,利用高斯消去方法 - AA := ZeroMatrix((n-1)*(m-1), (n-1)*(m-1)) //系数矩阵A - BA := ZeroMatrix((n-1)*(m-1), 1) //值矩阵B - - //赋值系数矩阵和值矩阵 - //第一行, j = 1 - //第一个 - AA.SetMatrix(0, 0, -2.0*hx*hx-2.0*hy*hy) - AA.SetMatrix(0, 1, hy*hy) - AA.SetMatrix(0, n-1, hx*hx) - tempBA := 0.0 - hy*hy*funx0(x0.GetFromMatrix(0, 1)+hy*1.0) - tempBA = tempBA - hx*hx*funy0(x0.GetFromMatrix(0, 0)+hx*1) - BA.SetMatrix(0, 0, tempBA) - for i := 2; i < n-1; i++ { - AA.SetMatrix(i-1, i-2, hy*hy) - AA.SetMatrix(i-1, i-1, -2.0*hx*hx-2.0*hy*hy) - AA.SetMatrix(i-1, i, hy*hy) - AA.SetMatrix(i-1, (n-1)*1+i-1, hx*hx) - tempBA = 0.0 - hx*hx*funy0(x0.GetFromMatrix(0, 0)+hx*float64(i)) - BA.SetMatrix((n-1)*0+i-1, 0, tempBA) - } - //最后一个 - AA.SetMatrix(n-1-1, n-1-2, hy*hy) - AA.SetMatrix(n-1-1, n-1-1, -2.0*hx*hx-2.0*hy*hy) - AA.SetMatrix(n-1-1, (n-1)*1+n-1-1, hx*hx) - tempBA = 0.0 - hy*hy*funxa(x0.GetFromMatrix(0, 1)+hy*1.0) - tempBA = tempBA - hx*hx*funy0(x0.GetFromMatrix(0, 0)+hx*float64(n-1)) - BA.SetMatrix(n-1-1, 0, tempBA) - //中间行 - for j := 2; j < m-1; j++ { - //第一个 - AA.SetMatrix((n-1)*(j-1), (n-1)*(j-1-1), hx*hx) - AA.SetMatrix((n-1)*(j-1), (n-1)*(j-1), -2.0*hx*hx-2.0*hy*hy) - AA.SetMatrix((n-1)*(j-1), (n-1)*(j-1)+1, hy*hy) - AA.SetMatrix((n-1)*(j-1), (n-1)*(j-1)+n-1, hx*hx) - tempBA = 0.0 - hy*hy*funx0(x0.GetFromMatrix(0, 1)+hy*float64(j)) - BA.SetMatrix((n-1)*(j-1), 0, tempBA) - for i := 2; i < n-1; i++ { - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1-1)+i-1, hx*hx) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1)+i-2, hy*hy) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1)+i-1, -2.0*hx*hx-2.0*hy*hy) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1)+i, hy*hy) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1+1)+i-1, hx*hx) - BA.SetMatrix((n-1)*(j-1)+i-1, 0, 0.0) - } - //最后一个 - AA.SetMatrix((n-1)*(j-1)+n-1-1, (n-1)*(j-1-1)+n-1-1, hx*hx) - AA.SetMatrix((n-1)*(j-1)+n-1-1, (n-1)*(j-1)+n-1-2, hy*hy) - AA.SetMatrix((n-1)*(j-1)+n-1-1, (n-1)*(j-1)+n-1-1, -2.0*hx*hx-2.0*hy*hy) - AA.SetMatrix((n-1)*(j-1)+n-1-1, (n-1)*(j-1+1)+n-1-1, hx*hx) - tempBA = 0.0 - hy*hy*funxa(x0.GetFromMatrix(0, 1)+hy*float64(j)) - BA.SetMatrix((n-1)*(j-1)+n-1-1, 0, tempBA) - } - //最后一行, j = m-1 - //第一个 - AA.SetMatrix((n-1)*(m-1-1), (n-1)*(m-1-1-1), hx*hx) - AA.SetMatrix((n-1)*(m-1-1), (n-1)*(m-1-1), -2.0*hx*hx-2.0*hy*hy) - AA.SetMatrix((n-1)*(m-1-1), (n-1)*(m-1-1)+1, hy*hy) - tempBA = 0.0 - hy*hy*funx0(x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - tempBA = tempBA - hx*hx*funyb(x0.GetFromMatrix(0, 0)+hx*1) - BA.SetMatrix((n-1)*(m-1-1), 0, tempBA) - for i := 2; i < n-1; i++ { - AA.SetMatrix((n-1)*(m-1-1)+i-1, (n-1)*(m-1-1-1)+i-1, hx*hx) - AA.SetMatrix((n-1)*(m-1-1)+i-1, (n-1)*(m-1-1)+i-2, hy*hy) - AA.SetMatrix((n-1)*(m-1-1)+i-1, (n-1)*(m-1-1)+i-1, -2.0*hx*hx-2.0*hy*hy) - AA.SetMatrix((n-1)*(m-1-1)+i-1, (n-1)*(m-1-1)+i, hy*hy) - tempBA = 0.0 - hx*hx*funyb(x0.GetFromMatrix(0, 0)+hx*float64(i)) - BA.SetMatrix((n-1)*(m-1-1)+i-1, 0, tempBA) - } - //最后一个 - AA.SetMatrix((n-1)*(m-1-1)+n-1-1, (n-1)*(m-1-1-1)+n-1-1, hx*hx) - AA.SetMatrix((n-1)*(m-1-1)+n-1-1, (n-1)*(m-1-1)+n-1-2, hy*hy) - AA.SetMatrix((n-1)*(m-1-1)+n-1-1, (n-1)*(m-1-1)+n-1-1, -2.0*hx*hx-2.0*hy*hy) - tempBA = 0.0 - hy*hy*funxa(x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - tempBA = tempBA - hx*hx*funyb(x0.GetFromMatrix(0, 0)+hx*float64(n-1)) - BA.SetMatrix((n-1)*(m-1-1)+n-1-1, 0, tempBA) - //求解矩阵方程 - tempp, temperr := LEs_ECPE(Matrix2ToSlices(AA), Matrix1ToSlices(BA)) - if temperr != true { - panic("Error in goNum.PDEDiffEllipticalLL5: Solve error") - } - //解赋予sol - ii := 1 - jj := 1 - for i := 0; i < len(tempp); i++ { - sol.SetMatrix(ii, jj, tempp[i]) - if jj == n-1 { - ii++ - jj = 0 - } - jj++ - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/PDEDiffEllipticalP5.go b/vendor/github.com/nuknal/goNum/PDEDiffEllipticalP5.go deleted file mode 100644 index fb131e2..0000000 --- a/vendor/github.com/nuknal/goNum/PDEDiffEllipticalP5.go +++ /dev/null @@ -1,191 +0,0 @@ -// PDEDiffEllipticalP5 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-01-08 -版本 : 0.0.0 ------------------------------------------------------- - 求解椭圆型偏微分方程(Poisson)的差分解法(五点格式) -理论: - 对于椭圆型偏微分方程(Poisson方程): - d^2u d^2u - ------ + ------ = g(x, y) - dx^2 dy^2 - - u(x, 0) = fy0(x), u(x, b) = fyb(x) - u(0, y) = fx0(y), u(a, y) = fxa(y) - - 0 < x < a, 0 < y < b - - x分为n等份,y分为m等份 - - hy^2[u_(i+1,j) + u_(i-1,j) - 2u_(i,j)] + - hx^2[u_(i,j+1) + u_(i,j-1) - 2u_(i,j)] - g_(i,j)*hx^2*hy^2 = 0 - - 解以上方程组可得解 - - 参考 John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 10.3. ------------------------------------------------------- -输入 : - funy0, funyb, funx0, funxa, fung 边界函数及g(x, y) - x0 求解范围,2x2 - n, m 网格数量, 对应x和y -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// PDEDiffEllipticalP5 求解椭圆型偏微分方程(Poisson)的差分解法(五点格式) -func PDEDiffEllipticalP5(funy0, funyb, funx0, funxa func(float64) float64, - fung func(float64, float64) float64, x0 Matrix, n, m int) (Matrix, bool) { - /* - 求解椭圆型偏微分方程(Poisson)的差分解法(五点格式) - 输入 : - funy0, funyb, funx0, funxa, fung 边界函数及g(x, y) - x0 求解范围,2x2 - n, m 网格数量, 对应x和y - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断网格数量 - if (m < 1) || (n < 1) { - panic("Error in goNum.PDEDiffEllipticalP5: Grid numbers error") - } - //判断初值维数 - if (x0.Rows < 2) || (x0.Columns < 2) { - panic("Error in goNum.PDEDiffEllipticalP5: Initial values error") - } - - var err bool = false - sol := ZeroMatrix(m+1, n+1) //行y变化,列x变化 - hx := (x0.GetFromMatrix(1, 0) - x0.GetFromMatrix(0, 0)) / float64(n) //x方向步长 - hy := (x0.GetFromMatrix(1, 1) - x0.GetFromMatrix(0, 1)) / float64(m) //y方向步长 - hx2 := hx * hx - hy2 := hy * hy - hxhy2 := hx2 * hy2 - - //边界框的解 - //第一行的值和最后一行的值,不包括第一个和最后一个 - for i := 1; i < n; i++ { - sol.SetMatrix(0, i, funy0(x0.GetFromMatrix(0, 0)+hx*float64(i))) - sol.SetMatrix(m, i, funyb(x0.GetFromMatrix(0, 0)+hx*float64(i))) - } - //第一列的值和最后一列的值,包括第一个和最后一个 - for j := 0; j < m+1; j++ { - sol.SetMatrix(j, 0, funx0(x0.GetFromMatrix(0, 1)+hy*float64(j))) - sol.SetMatrix(j, n, funxa(x0.GetFromMatrix(0, 1)+hy*float64(j))) - } - - //求解中间点,主对角占优矩阵解法,利用高斯消去方法 - AA := ZeroMatrix((n-1)*(m-1), (n-1)*(m-1)) //系数矩阵A - BA := ZeroMatrix((n-1)*(m-1), 1) //值矩阵B - - //赋值系数矩阵和值矩阵 - //第一行, j = 1 - //第一个 - AA.SetMatrix(0, 0, -2.0*hx2-2.0*hy2) - AA.SetMatrix(0, 1, hy2) - AA.SetMatrix(0, n-1, hx2) - tempBA := hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*1.0, x0.GetFromMatrix(0, 1)+hy*1.0) - tempBA = tempBA - hy2*funx0(x0.GetFromMatrix(0, 1)+hy*1.0) - tempBA = tempBA - hx2*funy0(x0.GetFromMatrix(0, 0)+hx*1.0) - BA.SetMatrix(0, 0, tempBA) - for i := 2; i < n-1; i++ { - AA.SetMatrix(i-1, i-2, hy2) - AA.SetMatrix(i-1, i-1, -2.0*hx2-2.0*hy2) - AA.SetMatrix(i-1, i, hy2) - AA.SetMatrix(i-1, (n-1)*1+i-1, hx2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*float64(i), x0.GetFromMatrix(0, 1)+hy*1.0) - tempBA = tempBA - hx2*funy0(x0.GetFromMatrix(0, 0)+hx*float64(i)) - BA.SetMatrix((n-1)*0+i-1, 0, tempBA) - } - //最后一个 - AA.SetMatrix(n-1-1, n-1-2, hy2) - AA.SetMatrix(n-1-1, n-1-1, -2.0*hx2-2.0*hy2) - AA.SetMatrix(n-1-1, (n-1)*1+n-1-1, hx2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*float64(n-1), x0.GetFromMatrix(0, 1)+hy*1.0) - tempBA = tempBA - hy2*funxa(x0.GetFromMatrix(0, 1)+hy*1.0) - tempBA = tempBA - hx2*funy0(x0.GetFromMatrix(0, 0)+hx*float64(n-1)) - BA.SetMatrix(n-1-1, 0, tempBA) - //中间行, 2 <= j <= m-2 - for j := 2; j < m-1; j++ { - //第一个 - AA.SetMatrix((n-1)*(j-1), (n-1)*(j-1-1), hx2) - AA.SetMatrix((n-1)*(j-1), (n-1)*(j-1), -2.0*hx2-2.0*hy2) - AA.SetMatrix((n-1)*(j-1), (n-1)*(j-1)+1, hy2) - AA.SetMatrix((n-1)*(j-1), (n-1)*(j-1)+n-1, hx2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*1.0, x0.GetFromMatrix(0, 1)+hy*float64(j)) - tempBA = tempBA - hy2*funx0(x0.GetFromMatrix(0, 1)+hy*float64(j)) - BA.SetMatrix((n-1)*(j-1), 0, tempBA) - for i := 2; i < n-1; i++ { - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1-1)+i-1, hx2) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1)+i-2, hy2) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1)+i-1, -2.0*hx2-2.0*hy2) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1)+i, hy2) - AA.SetMatrix((n-1)*(j-1)+i-1, (n-1)*(j-1+1)+i-1, hx2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*float64(i), x0.GetFromMatrix(0, 1)+hy*float64(j)) - BA.SetMatrix((n-1)*(j-1)+i-1, 0, tempBA) - } - //最后一个 - AA.SetMatrix((n-1)*(j-1)+n-1-1, (n-1)*(j-1-1)+n-1-1, hx2) - AA.SetMatrix((n-1)*(j-1)+n-1-1, (n-1)*(j-1)+n-1-2, hy2) - AA.SetMatrix((n-1)*(j-1)+n-1-1, (n-1)*(j-1)+n-1-1, -2.0*hx2-2.0*hy2) - AA.SetMatrix((n-1)*(j-1)+n-1-1, (n-1)*(j-1+1)+n-1-1, hx2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*float64(n-1), x0.GetFromMatrix(0, 1)+hy*float64(j)) - tempBA = tempBA - hy2*funxa(x0.GetFromMatrix(0, 1)+hy*float64(j)) - BA.SetMatrix((n-1)*(j-1)+n-1-1, 0, tempBA) - } - //最后一行, j = m-1 - //第一个 - AA.SetMatrix((n-1)*(m-1-1), (n-1)*(m-1-1-1), hx2) - AA.SetMatrix((n-1)*(m-1-1), (n-1)*(m-1-1), -2.0*hx2-2.0*hy2) - AA.SetMatrix((n-1)*(m-1-1), (n-1)*(m-1-1)+1, hy2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*1.0, x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - tempBA = tempBA - hy2*funx0(x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - tempBA = tempBA - hx2*funyb(x0.GetFromMatrix(0, 0)+hx*1.0) - BA.SetMatrix((n-1)*(m-1-1), 0, tempBA) - for i := 2; i < n-1; i++ { - AA.SetMatrix((n-1)*(m-1-1)+i-1, (n-1)*(m-1-1-1)+i-1, hx2) - AA.SetMatrix((n-1)*(m-1-1)+i-1, (n-1)*(m-1-1)+i-2, hy2) - AA.SetMatrix((n-1)*(m-1-1)+i-1, (n-1)*(m-1-1)+i-1, -2.0*hx2-2.0*hy2) - AA.SetMatrix((n-1)*(m-1-1)+i-1, (n-1)*(m-1-1)+i, hy2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*float64(i), x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - tempBA = tempBA - hx2*funyb(x0.GetFromMatrix(0, 0)+hx*float64(i)) - BA.SetMatrix((n-1)*(m-1-1)+i-1, 0, tempBA) - } - //最后一个 - AA.SetMatrix((n-1)*(m-1-1)+n-1-1, (n-1)*(m-1-1-1)+n-1-1, hx2) - AA.SetMatrix((n-1)*(m-1-1)+n-1-1, (n-1)*(m-1-1)+n-1-2, hy2) - AA.SetMatrix((n-1)*(m-1-1)+n-1-1, (n-1)*(m-1-1)+n-1-1, -2.0*hx2-2.0*hy2) - tempBA = hxhy2 * fung(x0.GetFromMatrix(0, 0)+hx*float64(n-1), x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - tempBA = tempBA - hy2*funxa(x0.GetFromMatrix(0, 1)+hy*float64(m-1)) - tempBA = tempBA - hx2*funyb(x0.GetFromMatrix(0, 0)+hx*float64(n-1)) - BA.SetMatrix((n-1)*(m-1-1)+n-1-1, 0, tempBA) - //求解矩阵方程 - tempp, temperr := LEs_ECPE(Matrix2ToSlices(AA), Matrix1ToSlices(BA)) - if temperr != true { - panic("Error in goNum.PDEDiffEllipticalP5: Solve error") - } - //解赋予sol - ii := 1 - jj := 1 - for i := 0; i < len(tempp); i++ { - sol.SetMatrix(ii, jj, tempp[i]) - if jj == n-1 { - ii++ - jj = 0 - } - jj++ - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/PDEDiffHyperbolic1.go b/vendor/github.com/nuknal/goNum/PDEDiffHyperbolic1.go deleted file mode 100644 index ce0fc52..0000000 --- a/vendor/github.com/nuknal/goNum/PDEDiffHyperbolic1.go +++ /dev/null @@ -1,104 +0,0 @@ -// PDEDiffHyperbolic1 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-17 -版本 : 0.0.0 ------------------------------------------------------- - 求解双曲型偏微分方程的差分解法(第一种差分格式) -理论: - 对于抛物型偏微分方程: - d^2u d^2u - ------ = A ------ + B - dt^2 dx^2 - - u(x, 0) = phi(x), (du/dt)_(t=0) = psi(x) - u(0, t) = u1(t), u(L, t) = u2(t) - - 0 < x < L, 0 < t < T - - 则差分格式为,x分为m等份,t分为n等份 - u_(i,j+1) = lu_(i+1,j) + 2(1-l)u_(i,j) + lu_(i-1,j) - - u_(i,j-1) + B*ht^2 - - 初值需要计算第零层和第一层、左右边界 - 第零层:u_(i,0) = phi(i*hx), i=1,2,...,m-1 - 第一层:u_(i,1) = u_(i,0) + ht*psi(i*hx) - 左边界:u_(0,j) = u1(j*ht) - 右边界:u_(m,j) = u2(j*ht), j=0,1,2,...,n - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 226-228. ------------------------------------------------------- -输入 : - funphi, funpsi, funu1, funu2 边界函数 - x0 求解范围,2x2 - A, B 常系数 - m, n 网格数量 -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// PDEDiffHyperbolic1 求解双曲型偏微分方程的差分解法(第一种差分格式) -func PDEDiffHyperbolic1(funphi, funpsi, funu1, funu2 func(float64) float64, - x0 Matrix, A, B float64, m, n int) (Matrix, bool) { - /* - 求解双曲型偏微分方程的差分解法(第一种差分格式) - 输入 : - funphi, funpsi, funu1, funu2 边界函数 - x0 求解范围,2x2 - A, B 常系数 - m, n 网格数量 - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断网格数量 - if (m < 1) || (n < 1) { - panic("Error in goNum.PDEDiffHyperbolic1: Grid numbers error") - } - - var err bool = false - sol := ZeroMatrix(m+1, n+1) - hx := (x0.GetFromMatrix(1, 0) - x0.GetFromMatrix(0, 0)) / float64(m) //x方向步长 - ht := (x0.GetFromMatrix(1, 1) - x0.GetFromMatrix(0, 1)) / float64(n) //t方向步长 - - //1. 计算t第零层上的值u_(i,0) i=,1,...,m-1 - for i := 1; i < m; i++ { - sol.SetMatrix(i, 0, funphi(x0.GetFromMatrix(0, 0)+float64(i)*hx)) - } - //2. 计算x左右边界上的节点u_(0,j)和u_(m,j) j=0,1,2,...,n - for j := 0; j < n+1; j++ { - sol.SetMatrix(0, j, funu1(x0.GetFromMatrix(0, 1)+float64(j)*ht)) //左边界 - sol.SetMatrix(m, j, funu2(x0.GetFromMatrix(0, 1)+float64(j)*ht)) //右边界 - } - //lambda及稳定性判断 - l := A * ht * ht / (hx * hx) - if l > 1 { - panic("Error in goNum.PDEDiffHyperbolic1: lambda greater than one") - } - //3. 计算t第一层上的值u_(i,1) i=,1,...,m-1 - for i := 1; i < m; i++ { - sol.SetMatrix(i, 1, sol.GetFromMatrix(i, 0)+ht*funpsi(x0.GetFromMatrix(0, 0)+float64(i)*hx)) - } - //4. 2~n层 - for j := 2; j < n+1; j++ { - for i := 1; i < m; i++ { - temp0 := l * sol.GetFromMatrix(i+1, j-1) - temp0 += 2.0 * (1.0 - l) * sol.GetFromMatrix(i, j-1) - temp0 += l * sol.GetFromMatrix(i-1, j-1) - temp0 -= sol.GetFromMatrix(i, j-2) - temp0 += B * ht * ht - sol.SetMatrix(i, j, temp0) - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/PDEDiffHyperbolic2.go b/vendor/github.com/nuknal/goNum/PDEDiffHyperbolic2.go deleted file mode 100644 index 025e922..0000000 --- a/vendor/github.com/nuknal/goNum/PDEDiffHyperbolic2.go +++ /dev/null @@ -1,107 +0,0 @@ -// PDEDiffHyperbolic2 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-17 -版本 : 0.0.0 ------------------------------------------------------- - 求解双曲型偏微分方程的差分解法(第二种差分格式,t=0时微分方程须成立) -理论: - 对于抛物型偏微分方程: - d^2u d^2u - ------ = A ------ + B - dt^2 dx^2 - - u(x, 0) = phi(x), (du/dt)_(t=0) = psi(x) - u(0, t) = u1(t), u(L, t) = u2(t) - - 0 < x < L, 0 < t < T - - 则差分格式为,x分为m等份,t分为n等份 - u_(i,j+1) = lu_(i+1,j) + 2(1-l)u_(i,j) + lu_(i-1,j) - - u_(i,j-1) + B*ht^2 - - 初值需要计算第零层和第一层、左右边界 - 第零层:u_(i,0) = phi(i*hx), i=1,2,...,m-1 - 第一层:u_(i,1) = u_(i,0) + ht*psi(i*hx) + B*ht^2/2 + - l*(u_(i+1,0)-2u_(i,0)+u_(i-1,0))/2 - 左边界:u_(0,j) = u1(j*ht) - 右边界:u_(m,j) = u2(j*ht), j=0,1,2,...,n - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 226-228. ------------------------------------------------------- -输入 : - funphi, funpsi, funu1, funu2 边界函数 - x0 求解范围,2x2 - A, B 常系数 - m, n 网格数量 -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// PDEDiffHyperbolic2 求解双曲型偏微分方程的差分解法(第二种差分格式,t=0时微分方程须成立) -func PDEDiffHyperbolic2(funphi, funpsi, funu1, funu2 func(float64) float64, - x0 Matrix, A, B float64, m, n int) (Matrix, bool) { - /* - 求解双曲型偏微分方程的差分解法(第二种差分格式,t=0时微分方程须成立) - 输入 : - funphi, funpsi, funu1, funu2 边界函数 - x0 求解范围,2x2 - A, B 常系数 - m, n 网格数量 - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断网格数量 - if (m < 1) || (n < 1) { - panic("Error in goNum.PDEDiffHyperbolic1: Grid numbers error") - } - - var err bool = false - sol := ZeroMatrix(m+1, n+1) - hx := (x0.GetFromMatrix(1, 0) - x0.GetFromMatrix(0, 0)) / float64(m) //x方向步长 - ht := (x0.GetFromMatrix(1, 1) - x0.GetFromMatrix(0, 1)) / float64(n) //t方向步长 - - //1. 计算t第零层上的值u_(i,0) i=,1,...,m-1 - for i := 1; i < m; i++ { - sol.SetMatrix(i, 0, funphi(x0.GetFromMatrix(0, 0)+float64(i)*hx)) - } - //2. 计算x左右边界上的节点u_(0,j)和u_(m,j) j=0,1,2,...,n - for j := 0; j < n+1; j++ { - sol.SetMatrix(0, j, funu1(x0.GetFromMatrix(0, 1)+float64(j)*ht)) //左边界 - sol.SetMatrix(m, j, funu2(x0.GetFromMatrix(0, 1)+float64(j)*ht)) //右边界 - } - //lambda及稳定性判断 - l := A * ht * ht / (hx * hx) - if l > 1 { - panic("Error in goNum.PDEDiffHyperbolic1: lambda greater than one") - } - //3. 计算t第一层上的值u_(i,1) i=,1,...,m-1 - for i := 1; i < m; i++ { - temp0 := sol.GetFromMatrix(i, 0) + ht*funpsi(x0.GetFromMatrix(0, 0)+float64(i)*hx) - temp0 += sol.GetFromMatrix(i+1, 0) - 2.0*sol.GetFromMatrix(i, 0) + sol.GetFromMatrix(i-1, 0) - sol.SetMatrix(i, 1, l*temp0/2.0+B*ht*ht/2.0) - } - //4. 2~n层 - for j := 2; j < n+1; j++ { - for i := 1; i < m; i++ { - temp0 := l * sol.GetFromMatrix(i+1, j-1) - temp0 += 2.0 * (1.0 - l) * sol.GetFromMatrix(i, j-1) - temp0 += l * sol.GetFromMatrix(i-1, j-1) - temp0 -= sol.GetFromMatrix(i, j-2) - temp0 += B * ht * ht - sol.SetMatrix(i, j, temp0) - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/PDEDiffParabolicE.go b/vendor/github.com/nuknal/goNum/PDEDiffParabolicE.go deleted file mode 100644 index 7c466ab..0000000 --- a/vendor/github.com/nuknal/goNum/PDEDiffParabolicE.go +++ /dev/null @@ -1,96 +0,0 @@ -// PDEDiffParabolicE -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-14 -版本 : 0.0.0 ------------------------------------------------------- - 求解抛物型偏微分方程的差分解法(显式) -理论: - 对于抛物型偏微分方程: - du d^2u - ---- = A ------ + B - dt dx^2 - - u(x, 0) = p(x) - u(0, t) = u1(t), u(L, t) = u2(t) - - 0 < x < L, 0 < t < T - - 则古典显式差分格式为,x分为m等份,t分为n等份 - u_(i,j+1) = lu_(i-1,j) + (1-2l)u_(i,j) + lu_(i+1,j) + B*tau - A*tau - l = ------- - h^2 - u_(i, 0) = p(ih), i=1,2,..,m-1 - u_(0, j) = u1(j*tau), u_(m, j) = u2(j, tau), j=0,1,...,n - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 214-215. ------------------------------------------------------- -输入 : - funp, funu1, funu2 边界函数 - x0 求解范围,2x2 - A, B 常系数 - m, n 网格数量 -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// PDEDiffParabolicE 求解抛物型偏微分方程的差分解法(显式) -func PDEDiffParabolicE(funp, funu1, funu2 func(float64) float64, x0 Matrix, - A, B float64, m, n int) (Matrix, bool) { - /* - 求解抛物型偏微分方程的差分解法(显式) - 输入 : - funp, funu1, funu2 边界函数 - x0 求解范围,2x2 - A, B 常系数 - m, n 网格数量 - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断网格数量 - if (m < 1) || (n < 1) { - panic("Error in goNum.PDEDiffParabolicE: Grid numbers error") - } - - var err bool = false - sol := ZeroMatrix(m+1, n+1) - hx := (x0.GetFromMatrix(1, 0) - x0.GetFromMatrix(0, 0)) / float64(m) //x方向步长 - ht := (x0.GetFromMatrix(1, 1) - x0.GetFromMatrix(0, 1)) / float64(n) //t方向步长 - - //1. 计算t第零层上的值u_(i,0) i=0,1,...,m - for i := 0; i < m+1; i++ { - sol.SetMatrix(i, 0, funp(x0.GetFromMatrix(0, 0)+float64(i)*hx)) - } - //2. 计算左右边界上的节点u_(0,j)和u_(m,j) j=1,2,...,n - for j := 1; j < n+1; j++ { - sol.SetMatrix(0, j, funu1(x0.GetFromMatrix(0, 1)+float64(j)*ht)) //左边界 - sol.SetMatrix(m, j, funu2(x0.GetFromMatrix(0, 1)+float64(j)*ht)) //右边界 - } - //内部节点循环求解 - l := A * ht / (hx * hx) - //稳定性判断 - if (l <= 0) || (l > 0.5) { - panic("Error in goNum.PDEDiffParabolicS: lambda less than or equal to zero, or greater than 0.5") - } - for j := 1; j < n+1; j++ { //层循环, ti - for i := 1; i < m; i++ { //列循环, xi - uij := l * sol.GetFromMatrix(i-1, j-1) - uij += (1 - 2.0*l) * sol.GetFromMatrix(i, j-1) - uij += l * sol.GetFromMatrix(i+1, j-1) - sol.SetMatrix(i, j, uij+B*ht) - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/PDEDiffParabolicI.go b/vendor/github.com/nuknal/goNum/PDEDiffParabolicI.go deleted file mode 100644 index 11e350b..0000000 --- a/vendor/github.com/nuknal/goNum/PDEDiffParabolicI.go +++ /dev/null @@ -1,129 +0,0 @@ -// PDEDiffParabolicI -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-14 -版本 : 0.0.0 ------------------------------------------------------- - 求解抛物型偏微分方程的差分解法(隐式) -理论: - 对于抛物型偏微分方程: - du d^2u - ---- = A ------ + B - dt dx^2 - - u(x, 0) = p(x) - u(0, t) = u1(t), u(L, t) = u2(t) - - 0 < x < L, 0 < t < T - - 则古典隐式差分格式为,x分为m等份,t分为n等份 - Au_(j+1) = uj + F_(j+1) - - |1+2l -l | - |-l 1+2l -l | - A = | .......... | - | -l 1+2l -l | - | -l 1+2l| - - u_(j+1) = [u_(1,j+1),u_(2,j+1),...,u_(m-1,j+1)]' - F_(j+1) = [lu1((j+1)*tau)+B*tau,B*tau,B*tau,...,B*tau,lu2((j+1)*tau)+B*tau]' - V_(j+1) = uj + F_(j+1) - j = 0,1,...,n-1 - - u0 = [u_(1,0),u_(2,0),...,u_(m-1,0)]' - = [p(h),p(2h),...,p((m-1)h)]' - - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 214-215. ------------------------------------------------------- -输入 : - funp, funu1, funu2 边界函数 - x0 求解范围,2x2 - A, B 常系数 - m, n 网格数量 -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// PDEDiffParabolicI 求解抛物型偏微分方程的差分解法(隐式) -func PDEDiffParabolicI(funp, funu1, funu2 func(float64) float64, x0 Matrix, A, B float64, m, n int) (Matrix, bool) { - /* - 求解抛物型偏微分方程的差分解法(隐式) - 输入 : - funp, funu1, funu2 边界函数 - x0 求解范围,2x2 - A, B 常系数 - m, n 网格数量 - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断网格数量 - if (m < 1) || (n < 1) { - panic("Error in goNum.PDEDiffParabolicI: Grid numbers error") - } - - var err bool = false - sol := ZeroMatrix(m+1, n+1) - hx := (x0.GetFromMatrix(1, 0) - x0.GetFromMatrix(0, 0)) / float64(m) //x方向步长 - ht := (x0.GetFromMatrix(1, 1) - x0.GetFromMatrix(0, 1)) / float64(n) //t方向步长 - - //1. 计算t第零层上的值u_(i,0) i=0,1,...,m - for i := 0; i < m+1; i++ { - sol.SetMatrix(i, 0, funp(x0.GetFromMatrix(0, 0)+float64(i)*hx)) - } - //2. 计算左右边界上的节点u_(0,j)和u_(m,j) j=1,2,...,n - for j := 1; j < n+1; j++ { - sol.SetMatrix(0, j, funu1(x0.GetFromMatrix(0, 1)+float64(j)*ht)) //左边界 - sol.SetMatrix(m, j, funu2(x0.GetFromMatrix(0, 1)+float64(j)*ht)) //右边界 - } - - l := A * ht / (hx * hx) - //稳定性判断 - if l <= 0 { - panic("Error in goNum.PDEDiffParabolicS: lambda less than or equal to zero") - } - //A赋值 - AA := ZeroMatrix(m-1, m-1) - ui := ZeroMatrix(m-1, 1) - Fi := ZeroMatrix(m-1, 1) - AA.SetMatrix(0, 0, 1.0+2.0*l) //第零行 - AA.SetMatrix(0, 1, -1.0*l) - ui.Data[0] = sol.GetFromMatrix(1, 0) - for i := 1; i < m-2; i++ { - AA.SetMatrix(i, i-1, -1.0*l) - AA.SetMatrix(i, i, 1.0+2.0*l) - AA.SetMatrix(i, i+1, -1.0*l) - ui.Data[i] = sol.GetFromMatrix(i+1, 0) - Fi.Data[i] = B * ht - } - AA.SetMatrix(m-2, m-3, -1.0*l) //第零行 - AA.SetMatrix(m-2, m-2, 1.0+2.0*l) - ui.Data[m-2] = sol.GetFromMatrix(m-1, 0) - //内部节点循环求解 - for j := 0; j < n; j++ { - //F,每一步需要重新计算第一项和最后一项 - Fi.Data[0] = l*funu1(float64(j+1)*ht) + B*ht - Fi.Data[m-2] = l*funu2(float64(j+1)*ht) + B*ht - // - ui1, errtemp := LEs_Chasing(AA, AddMatrix(ui, Fi)) - if errtemp != true { - panic("Error in goNum.PDEDiffParabolicI: Chasing solved error") - } - for i := 0; i < m-1; i++ { - ui.Data[i] = ui1.Data[i] - sol.SetMatrix(i+1, j+1, ui1.Data[i]) - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/PDEDiffParabolicS.go b/vendor/github.com/nuknal/goNum/PDEDiffParabolicS.go deleted file mode 100644 index 233b23e..0000000 --- a/vendor/github.com/nuknal/goNum/PDEDiffParabolicS.go +++ /dev/null @@ -1,138 +0,0 @@ -// PDEDiffParabolicS -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-14 -版本 : 0.0.0 ------------------------------------------------------- - 求解抛物型偏微分方程的差分解法(六点对称格式) -理论: - 对于抛物型偏微分方程: - du d^2u - ---- = A ------ + B - dt dx^2 - - u(x, 0) = p(x) - u(0, t) = u1(t), u(L, t) = u2(t) - - 0 < x < L, 0 < t < T - - 则古典隐式差分格式为,x分为m等份,t分为n等份 - Au_(j+1) = B_(j+1) - - |2(1+l) -l | - |-l 2(1+l) -l | - A = | .......... | - | -l 2(1+l) -l | - | -l 2(1+l)| - - u_(j+1) = [u_(1,j+1),u_(2,j+1),...,u_(m-1,j+1)]' - F_(j+1) = [lu_(0,j)+2(1-l)u_(1,j)+lu_(2,j)+lu_(0,j+1)+2B*tau, - lu_(1,j)+2(1-l)u_(2,j)+lu_(3,j)+2B*tau, - ... - lu_(m-3,j)+2(1-l)u_(m-2,j)+lu_(m-1,j)+2B*tau, - lu_(m-2,j)+2(1-l)u_(m-1,j)+lu_(m,j)+lu_(m,j+1)+2B*tau]' - j = 0,1,...,n-1 - - u0 = [u_(1,0),u_(2,0),...,u_(m-1,0)]' - = [p(h),p(2h),...,p((m-1)h)]' - - - 参考 John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 10.2.3. ------------------------------------------------------- -输入 : - funp, funu1, funu2 边界函数 - x0 求解范围,2x2 - A, B 常系数 - m, n 网格数量 -输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// PDEDiffParabolicS 求解抛物型偏微分方程的差分解法(隐式) -func PDEDiffParabolicS(funp, funu1, funu2 func(float64) float64, x0 Matrix, A, B float64, m, n int) (Matrix, bool) { - /* - 求解抛物型偏微分方程的差分解法(隐式) - 输入 : - funp, funu1, funu2 边界函数 - x0 求解范围,2x2 - A, B 常系数 - m, n 网格数量 - 输出 : - sol 解矩阵 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断网格数量 - if (m < 1) || (n < 1) { - panic("Error in goNum.PDEDiffParabolicS: Grid numbers error") - } - - var err bool = false - sol := ZeroMatrix(m+1, n+1) - hx := (x0.GetFromMatrix(1, 0) - x0.GetFromMatrix(0, 0)) / float64(m) //x方向步长 - ht := (x0.GetFromMatrix(1, 1) - x0.GetFromMatrix(0, 1)) / float64(n) //t方向步长 - - //1. 计算t第零层上的值u_(i,0) i=0,1,...,m - for i := 0; i < m+1; i++ { - sol.SetMatrix(i, 0, funp(x0.GetFromMatrix(0, 0)+float64(i)*hx)) - } - //2. 计算左右边界上的节点u_(0,j)和u_(m,j) j=1,2,...,n - for j := 1; j < n+1; j++ { - sol.SetMatrix(0, j, funu1(x0.GetFromMatrix(0, 1)+float64(j)*ht)) //左边界 - sol.SetMatrix(m, j, funu2(x0.GetFromMatrix(0, 1)+float64(j)*ht)) //右边界 - } - - l := A * ht / (hx * hx) - //稳定性判断 - if l <= 0 { - panic("Error in goNum.PDEDiffParabolicS: lambda less than or equal to zero") - } - //A赋值 - AA := ZeroMatrix(m-1, m-1) - ui := ZeroMatrix(m+1, 1) - AA.SetMatrix(0, 0, 2.0*(1.0+l)) //第零行 - AA.SetMatrix(0, 1, -1.0*l) - ui.Data[0] = sol.GetFromMatrix(0, 0) - for i := 1; i < m-2; i++ { - AA.SetMatrix(i, i-1, -1.0*l) - AA.SetMatrix(i, i, 2.0*(1.0+l)) - AA.SetMatrix(i, i+1, -1.0*l) - ui.Data[i] = sol.GetFromMatrix(i, 0) - } - AA.SetMatrix(m-2, m-3, -1.0*l) //第零行 - AA.SetMatrix(m-2, m-2, 2.0*(1.0+l)) - ui.Data[m-2] = sol.GetFromMatrix(m-2, 0) - ui.Data[m-1] = sol.GetFromMatrix(m-1, 0) - ui.Data[m] = sol.GetFromMatrix(m, 0) - //内部节点循环求解 - for j := 0; j < n; j++ { - Fi := ZeroMatrix(m-1, 1) - Fi.Data[0] = l*ui.Data[0] + 2.0*(1.0-l)*ui.Data[1] + l*ui.Data[2] + l*sol.GetFromMatrix(0, j+1) + 2.0*B*ht - for i := 1; i < m-2; i++ { - Fi.Data[i] = l*ui.Data[i] + 2.0*(1.0-l)*ui.Data[i+1] + l*ui.Data[i+2] + 2.0*B*ht - } - Fi.Data[m-2] = l*ui.Data[m-2] + 2.0*(1.0-l)*ui.Data[m-1] + l*ui.Data[m] + l*sol.GetFromMatrix(m, j+1) + 2.0*B*ht - //ui1为m-1行,ui为m+1行 - ui1, errtemp := LEs_Chasing(AA, Fi) - if errtemp != true { - panic("Error in goNum.PDEDiffParabolicS: Chasing solved error") - } - ui.Data[0] = sol.GetFromMatrix(0, j+1) - for i := 1; i < m; i++ { - ui.Data[i] = ui1.Data[i-1] - sol.SetMatrix(i, j+1, ui1.Data[i-1]) - } - ui.Data[m] = sol.GetFromMatrix(m, j+1) - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/PowInt.go b/vendor/github.com/nuknal/goNum/PowInt.go deleted file mode 100644 index 8bb15a9..0000000 --- a/vendor/github.com/nuknal/goNum/PowInt.go +++ /dev/null @@ -1,104 +0,0 @@ -// PowInt -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-12 -版本 : 0.0.0 ------------------------------------------------------- - 计算整数或浮点数的整数次幂 -理论: - ------------------------------------------------------- -输入 : - a, n a^n -输出 : - sol 解 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// PowFInt 浮点数的整数次幂 -func PowFInt(a float64, n int) float64 { - /* - 计算浮点数的整数次幂 - 输入 : - a, n a^n - 输出 : - sol 解 - */ - if n < 0 { - panic("Error in goNum.PowFInt: n less than zero") - } else if n == 0 { - return 1.0 - } else if n == 1 { - return a - } - sol := a - for i := 2; i < n+1; i++ { - sol = sol * a - } - return sol -} - -// PowIF 整数的浮点数次幂 -func PowIF(a int, n float64) float64 { - /* - 计算整数的浮点数次幂 - 输入 : - a, n a^n - 输出 : - sol 解 - */ - return math.Pow(float64(a), n) -} - -// PowIInt 整数的整数次幂,输出整数 -func PowIInt(a, n int) int { - /* - 计算整数的整数次幂,输出整数 - 输入 : - a, n a^n - 输出 : - sol 解 - */ - if n < 0 { - panic("Error in goNum.PowIInt: n less than zero") - } else if n == 0 { - return 1 - } else if n == 1 { - return a - } - sol := a - for i := 2; i < n+1; i++ { - sol = sol * a - } - return sol -} - -// PowIIntF 整数的整数次幂,输出浮点 -func PowIIntF(a, n int) float64 { - /* - 计算整数的整数次幂,输出浮点 - 输入 : - a, n a^n - 输出 : - sol 解 - */ - if n < 0 { - panic("Error in goNum.PowIInt: n less than zero") - } else if n == 0 { - return 1.0 - } else if n == 1 { - return float64(a) - } - sol := a - for i := 2; i < n+1; i++ { - sol = sol * a - } - return float64(sol) -} diff --git a/vendor/github.com/nuknal/goNum/QuickSort.go b/vendor/github.com/nuknal/goNum/QuickSort.go deleted file mode 100644 index eb72e95..0000000 --- a/vendor/github.com/nuknal/goNum/QuickSort.go +++ /dev/null @@ -1,88 +0,0 @@ -// QuickSort -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-03-06 -版本 : 0.0.0 ------------------------------------------------------- - 快速排序法 -理论: - 时间复杂度: O(nlog2(n)) - 最好情况 : O(nlog2(n)) - 最坏情况 : O(n^2) - 空间复杂度: O(nlog2(n)) - 稳定性 : 不稳定 ------------------------------------------------------- -输入 : - in 输入矩阵, 1xn -输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// quickSort_sort -// i0 --- first -// i2 --- last -func quickSort_sort(sol *Matrix, i0, i2 int) { - if i0 >= i2 { - return - } - i := i0 - j := i2 - ref := (*sol).Data[i] //第一个元素作为分区元素 - - for i != j { - for i < j && (*sol).Data[j] > ref { - j -= 1 - } - (*sol).Data[i] = (*sol).Data[j] - - for i < j && (*sol).Data[i] < ref { - i += 1 - } - (*sol).Data[j] = (*sol).Data[i] - } - (*sol).Data[i] = ref - quickSort_sort(sol, i0, i-1) - quickSort_sort(sol, i+1, i2) -} - -// QuickSort 快速排序法 -func QuickSort(in Matrix) (Matrix, bool) { - /* - 快速排序法 - 输入 : - in 输入矩阵, 1xn - 输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断初值维数 - if in.Rows != 1 { - panic("Error in goNum.QuickSort: Input Matrix error") - } - if in.Columns < 1 { - panic("Error in goNum.QuickSort: Empty input Matrix") - } else if in.Columns == 1 { - return in, true - } - - n := in.Columns - sol := ZeroMatrix(1, n) - var err bool = false - - //初始化sol - for i := 0; i < n; i++ { - sol.Data[i] = in.Data[i] - } - //排序开始 - quickSort_sort(&sol, 0, n-1) - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/README.md b/vendor/github.com/nuknal/goNum/README.md deleted file mode 100644 index 0907aa3..0000000 --- a/vendor/github.com/nuknal/goNum/README.md +++ /dev/null @@ -1,192 +0,0 @@ -关于goNum -========== -goNum是一款完全以[Go](https://golang.org)语言为基础的开源数值算法库,它可以使你像调用其它go函数一样使用其进行数值运算,且不依赖于任何外部库。 -限于作者业余时间有限,目前功能还在一步步完善,算法还在慢慢添加。 -绝大部分算法进行了典型状态测试,但不保证所有算法在所有状态下都是安全的、可靠的。 -另外,需要注意的是,此算法库旨在解决问题,而不是实现语言的某些能力,即使作者正在努力使得go语言的独特性在其中充分体现。 -如果您对作者的工作满意,请留心关注goNum的更新状态;如果您对作者的工作有所建议,请电邮:chengfengcool@sina.com。 -或者,承蒙赏识,如果您愿意捐助关于goNum工作,请电邮联系作者。 - -欢迎有志之士加入开发。 - -安装环境 -========= -Linux或者Windows -1. go 1.11(推荐)或更新版本; -2. [可选] LiteIDE X34或更新版本; -3. 请关注Linux和Windows换行符的区别。 - -安装方法 -========= -## 1. 在线安装 -1. 安装go; -2. 运行go get命令: -```go -go get github.com/chfenger/goNum -``` -## 2. 下载源码安装 -1. 下载源代码,并解压到指定文件夹(例如“UserDir”)下的src目录或其子目录(例如“UserDir/src/”或“UserDir/src/xxx/xxx/”)下; -2. 添加UserDir到GOPATH; -3. 重启IDE或终端即可。 - -关于命名 -========== -1. 包名'goNum'为算法库包; -2. 包名'goNum_test'为测试库包(Benchmark); -3. 文件名'*_test.go'为测试文件名,其内容可作为算法包使用的参考手册。 - -设计初衷 -========= -1. 旨在为自己和他人提供一个浅显易懂而又功能强大的数值算法库; -2. 优先保证速度和精度,因此诸如defer等优秀方式由于过于影响速度而并未实际采用; -3. 完全以Go语言开发,独立而不依赖于任何外部库。 - -算法 -===== -(持续更新中...) -- 基本数学 - - 排列 - - 二分法 - - 组合 - - 阶乘 - - 切片元素最大值 - - 切片元素绝对值最大值 - - 切片元素从大到小排序 - - 切片元素最小值 - - 切片元素绝对值最小值 - - 切片元素从小到大排序 - - 矩阵1范数 - - 矩阵无穷范数 - - 向量的范数 - - 次幂扩展 - - 角度的三角函数和反三角函数 - - 向量在三维空间的旋转 - - Fibonacci数列 - - 多项式求导 - -- 数据结构 - - 单向链表 - - 双向链表 - - 树 - -- 矩阵 - - 矩阵定义与操作 - - 求矩阵行列式的列主元消去法 - - 返回n阶单位矩阵(二维切片表示) - - 求矩阵逆的列主元消去法 - - 求对称正定矩阵的平方根分解法 - - 求矩阵Doolittlede LU分解 - - 求对称矩阵全部特征值及其特征向量,经典雅可比法 - - 求对称矩阵全部特征值及其特征向量,雅可比过关法 - - 求矩阵A的主特征值及其特征向量 - -- 解一般方程 - - 求解非线性方程的牛顿迭代 - - 搜索法求方程解 - - 单点弦截法 - - 双点弦截法 - - 简单迭代求解类x=g(x)方程的解 - - 简单迭代求解类x=g(x)方程的解(Aitken加速) - - Muller法求f(x)=0的解 - -- 插值 - - Hermite插值 - - Hermite插值函数 - - Lagrange插值 - - Lagrange插值函数 - - Newton插值 - - Newton前向插值 - - 用节点处的一阶导数表示的三次样条插值函数(一阶导数边界条件) - - 用节点处的一阶导数表示的三次样条插值函数(二阶导数边界条件) - - 用节点处的二阶导数表示的三次样条插值函数(一阶导数边界条件) - - 用节点处的二阶导数表示的三次样条插值函数(二阶导数边界条件) - -- 数值积分 - - 1-8级复化Newton-Cotes求积分公式 - - 1-8级逐次分半复化Newton-Cotes求积分公式 - - 不超过8次的Gauss-Lagendre求积分公式 - - 1-8级Newton-Cotes求积分公式 - - Rumberg(龙贝格)求积分公式 - -- 解线性方程组 - - 求解矛盾方程组的最小二乘法 - - 追赶法求解严格对角占优的三对角系数矩阵方程组 - - 线性代数方程组的列主元消去法 - - 解n阶线性方程组的Jocobi迭代法(简单迭代法) - - 解n阶线性方程组的Seidel迭代法 - - 解n阶线性方程组的SOR(逐次超松弛)迭代法 - -- 解非线性方程组 - - 多元非线性方程组Seidel迭代 - -- 数据拟合 - - 多项式拟合 - - 线性最小二乘拟合 - - Bezier曲线拟合控制点 - - 基于傅立叶(Fourier)级数的三角多项式拟合 - -- 误差评估 - - 最大误差 - - 平均误差 - - 均方根误差 - -- 优化 - - 黄金分割法求单峰单自变量极小值 - - Fibonacci搜索法求单峰单自变量极小值 - - 单纯形法求多自变量函数极小值 - -- 常微分方程 - - 4步Adams外推(ODE) - - 三步Adams内插公式(ODE) - - Euler法(ODE) - - Euler预估校正(ODE) - - 梯形法(ODE) - - 二级二阶Runge-Kutta法 - - 四级四阶Runge-Kutta法 - - 四阶Runge-Kutta-Fehlberg变步长 - - Heun法 - - Adams-Bashforth-Moulton预估校正法 - - Milne-Simpson预估校正法 - - Hamming预估校正法 - - 差分法 - -- 偏微分方程 - - 双曲型偏微分方程差分解法(第一种差分格式) - - 双曲型偏微分方程差分解法(第二种差分格式) - - 抛物型偏微分方程差分解法(显式) - - 抛物型偏微分方程差分解法(隐式) - - 抛物型偏微分方程差分解法(六点对称) - - 椭圆型偏微分方程(Laplace)差分解法(五点格式) - - 椭圆型偏微分方程(Poisson)的差分解法(五点格式) - - 椭圆型偏微分方程(Helmholtz)的差分解法(五点格式) - -- 排序 - - 冒泡排序 - - 选择排序 - - 插入排序 - - 希尔(Shell)排序 - - 归并排序 - - 快速排序 - - 堆排序 - - 计数排序 - - 桶排序 - - 基数排序 - -作者 -===== -详见AUTHOR.MD文件 - -许可证书 -========= -goNum是一款开源自由算法库,您可以根据自己的需求发布或者修改,但这一切需要在GNU GPL(General Public License) v3.0 -或者较新版本的许可下进行。关于此许可证内容详见根目录下LICENSE文件或者。 - -程锋 版权所有 2018 - -致谢 -===== -00. 非常感谢家人朋友们的支持和理解,为此推辞了许多业余活动. -01. 特别感谢Google提供如此美妙的编程语言,希望再接再励,继续改善使之丰富。 -10. 感谢某实验室提供的免费服务器。 - - diff --git a/vendor/github.com/nuknal/goNum/RK22.go b/vendor/github.com/nuknal/goNum/RK22.go deleted file mode 100644 index 1dced41..0000000 --- a/vendor/github.com/nuknal/goNum/RK22.go +++ /dev/null @@ -1,104 +0,0 @@ -// RK22 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-8 -版本 : 0.0.0 ------------------------------------------------------- - 二级二阶Runge-Kutta法求解常微分方程组 -理论: - - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 192-199. ------------------------------------------------------- -输入 : - fun 第i个方程(计算变量值向量, i) - x0 初值向量,(fn+1)x1,一个x,fn个因变量 - xend 终止x - fn 方程个数 - n 最大迭代步数 -输出 : - B 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// RK22 二级二阶Runge-Kutta法求解常微分方程组 -func RK22(fun func(Matrix, int) float64, x0 Matrix, - xend float64, fn, n int) (Matrix, bool) { - /* - 二级二阶Runge-Kutta法求解常微分方程组 - 输入 : - fun 第i个方程(计算变量值向量, i) - x0 初值向量,(fn+1)x1,一个x,fn个因变量 - xend 终止x - fn 方程个数 - n 最大迭代步数 - 输出 : - B 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断方程个数是否对应初值个数 - if x0.Rows != fn+1 { - panic("Error in goNum.RK22: Quantities of x0 and fn+1 are not equal") - } - - sol := ZeroMatrix(fn+1, n+1) - var err bool = false - h := (xend - x0.Data[0]) / float64(n) //步长 - - //稳定性条件,建议迭代时即时判断,但此举会拖慢速度 - // if true { - // lambda := ZeroMatrix(fn, 1) - // for j := 0; j < fn; j++ { //微分方程迭代 - // lambda.Data[j] = fun(x0, j) / x0.Data[j+1] - // } - // maxl, _, _ := Max(lambda.Data) - // stab := 1.0 + maxl*h + math.Pow(maxl*h, 2.0)/2.0 - // if math.Abs(stab) > 1 { - // panic("Error in goNum.RK22: Step length too large or step number little less") - // } - // } - - //把初值赋给sol - for i := 0; i < fn+1; i++ { - sol.SetMatrix(i, 0, x0.Data[i]) - } - - for i := 1; i < n+1; i++ { //最大迭代次数迭代 - temp0 := ZeroMatrix(fn+1, 1) - //给temp0赋i-1步值,每一步开始 - for j := 0; j < fn+1; j++ { - temp0.Data[j] = sol.GetFromMatrix(j, i-1) - } - k1 := ZeroMatrix(fn, 1) - k2 := ZeroMatrix(fn, 1) - //1. k1 - for j := 0; j < fn; j++ { //微分方程迭代 - k1.Data[j] = h * fun(temp0, j) - } - //2. k2 - temp0.Data[0] = sol.GetFromMatrix(0, i-1) + 2.0*h/3.0 //xn+2h/3 - for j := 1; j < fn+1; j++ { //yn+2k1/3 - temp0.Data[j] = sol.GetFromMatrix(j, i-1) + 2.0*k1.Data[j-1]/3.0 - } - for j := 0; j < fn; j++ { //微分方程迭代 - k2.Data[j] = h * fun(temp0, j) - } - - //i步值 - sol.SetMatrix(0, i, sol.GetFromMatrix(0, i-1)+h) //xi - for j := 1; j < fn+1; j++ { - temp1 := sol.GetFromMatrix(j, i-1) + (k1.Data[j-1]+3.0*k2.Data[j-1])/4.0 - sol.SetMatrix(j, i, temp1) - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/RK44.go b/vendor/github.com/nuknal/goNum/RK44.go deleted file mode 100644 index a09e2f6..0000000 --- a/vendor/github.com/nuknal/goNum/RK44.go +++ /dev/null @@ -1,123 +0,0 @@ -// RK44 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-8 -版本 : 0.0.0 ------------------------------------------------------- - 四级四阶Runge-Kutta法求解常微分方程组 -理论: - - - 参考 李信真, 车刚明, 欧阳洁, 等. 计算方法. 西北工业大学 - 出版社, 2000, pp 192-199. ------------------------------------------------------- -输入 : - fun 第i个方程(计算变量值向量, i) - x0 初值向量,(fn+1)x1,一个x,fn个因变量 - xend 终止x - fn 方程个数 - n 最大迭代步数 -输出 : - sol 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// RK44 四级四阶Runge-Kutta法求解常微分方程组 -func RK44(fun func(Matrix, int) float64, x0 Matrix, - xend float64, fn, n int) (Matrix, bool) { - /* - 四级四阶Runge-Kutta法求解常微分方程组 - 输入 : - fun 第i个方程(计算变量值向量, i) - x0 初值向量,(fn+1)x1,一个x,fn个因变量 - xend 终止x - fn 方程个数 - n 最大迭代步数 - 输出 : - sol 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断方程个数是否对应初值个数 - if x0.Rows != fn+1 { - panic("Error in goNum.RK44: Quantities of x0 and fn+1 are not equal") - } - - sol := ZeroMatrix(fn+1, n+1) - var err bool = false - h := (xend - x0.Data[0]) / float64(n) //步长 - - //稳定性条件,建议迭代时即时判断,但此举会拖慢速度 - // if true { - // lambda := ZeroMatrix(fn, 1) - // for j := 0; j < fn; j++ { //微分方程迭代 - // lambda.Data[j] = fun(x0, j) / x0.Data[j+1] - // } - // maxl, _, _ := Max(lambda.Data) - // stab := 1.0 + maxl*h + math.Pow(maxl*h, 2.0)/2.0 - // stab += math.Pow(maxl*h, 3.0)/6.0 + math.Pow(maxl*h, 4.0)/24.0 - // if math.Abs(stab) > 1 { - // panic("Error in goNum.RK44: Step length too large or step number little less") - // } - // } - - //把初值赋给sol - for i := 0; i < fn+1; i++ { - sol.SetMatrix(i, 0, x0.Data[i]) - } - - for i := 1; i < n+1; i++ { //最大迭代次数迭代 - temp0 := ZeroMatrix(fn+1, 1) - //给temp0赋i-1步值,每一步开始 - for j := 0; j < fn+1; j++ { - temp0.Data[j] = sol.GetFromMatrix(j, i-1) - } - k1 := ZeroMatrix(fn, 1) - k2 := ZeroMatrix(fn, 1) - k3 := ZeroMatrix(fn, 1) - k4 := ZeroMatrix(fn, 1) - //1. k1 - for j := 0; j < fn; j++ { //微分方程迭代 - k1.Data[j] = h * fun(temp0, j) - } - //2. k2 - temp0.Data[0] = sol.GetFromMatrix(0, i-1) + h/2.0 //xn+h/2 - for j := 1; j < fn+1; j++ { //yn+k1/2 - temp0.Data[j] = sol.GetFromMatrix(j, i-1) + k1.Data[j-1]/2.0 - } - for j := 0; j < fn; j++ { //微分方程迭代 - k2.Data[j] = h * fun(temp0, j) - } - //3. k3 - for j := 1; j < fn+1; j++ { //yn+k2/2 - temp0.Data[j] = sol.GetFromMatrix(j, i-1) + k2.Data[j-1]/2.0 - } - for j := 0; j < fn; j++ { //微分方程迭代 - k3.Data[j] = h * fun(temp0, j) - } - //4. k4 - temp0.Data[0] = sol.GetFromMatrix(0, i-1) + h //xn+h - for j := 1; j < fn+1; j++ { //yn+k3 - temp0.Data[j] = sol.GetFromMatrix(j, i-1) + k3.Data[j-1] - } - for j := 0; j < fn; j++ { //微分方程迭代 - k4.Data[j] = h * fun(temp0, j) - } - - //i步值 - sol.SetMatrix(0, i, sol.GetFromMatrix(0, i-1)+h) //xi - for j := 1; j < fn+1; j++ { - temp1 := k1.Data[j-1] + 2.0*k2.Data[j-1] + 2.0*k3.Data[j-1] + k4.Data[j-1] - temp1 = sol.GetFromMatrix(j, i-1) + temp1/6.0 - sol.SetMatrix(j, i, temp1) - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/RKF45.go b/vendor/github.com/nuknal/goNum/RKF45.go deleted file mode 100644 index e26f072..0000000 --- a/vendor/github.com/nuknal/goNum/RKF45.go +++ /dev/null @@ -1,187 +0,0 @@ -// RKF45 -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-19 -版本 : 0.0.0 ------------------------------------------------------- - 四级五阶变步长Runge-Kutta法求解常微分方程组 -理论: - - 参考 John H. Mathews and Kurtis D. Fink. Numerical - methods using MATLAB, 4th ed. Pearson - Education, 2004. ss 9.5.4. ------------------------------------------------------- -输入 : - fun 第i个方程(计算变量值向量, i) - x0 初值向量,(fn+1)x1,一个x,fn个因变量 - xend 终止x - tol 步长控制误差 - fn 方程个数 - n 最大迭代步数 -输出 : - sol 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// RKF45 四级五阶变步长Runge-Kutta法求解常微分方程组 -func RKF45(fun func(Matrix, int) float64, x0 Matrix, - xend, tol float64, fn, n int) (Matrix, bool) { - /* - 四级五阶变步长Runge-Kutta法求解常微分方程组 - 输入 : - fun 第i个方程(计算变量值向量, i) - x0 初值向量,(fn+1)x1,一个x,fn个因变量 - xend 终止x - tol 步长控制误差 - fn 方程个数 - n 最大迭代步数 - 输出 : - sol 解向量 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断方程个数是否对应初值个数 - if x0.Rows != fn+1 { - panic("Error in goNum.RKF45: Quantities of x0 and fn+1 are not equal") - } - //判断tol值 - if tol <= 0.0 { - panic("Error in goNum.RKF45: tol less than or euqals to zero") - } - //判断xend值 - if xend <= x0.Data[0] { - panic("Error in goNum.RKF45: xend less than or euqals to x0") - } - - sol0 := ZeroMatrix(fn+1, n+1) - var err bool = false - h := 100.0 * (xend - x0.Data[0]) / float64(n) //初始步长,100倍最小步长,可修改 - - //把初值赋给sol - for i := 0; i < fn+1; i++ { - sol0.SetMatrix(i, 0, x0.Data[i]) - } - - //nreal解矩阵实际长度 - var i, nreal int = 1, 1 - - for sol0.GetFromMatrix(0, i-1) < xend { //最大迭代次数控制 - temp0 := ZeroMatrix(fn+1, 1) - //给temp0赋i-1步值,每一步开始 - for j := 0; j < fn+1; j++ { - temp0.Data[j] = sol0.GetFromMatrix(j, i-1) - } - k1 := ZeroMatrix(fn, 1) - k2 := ZeroMatrix(fn, 1) - k3 := ZeroMatrix(fn, 1) - k4 := ZeroMatrix(fn, 1) - k5 := ZeroMatrix(fn, 1) - k6 := ZeroMatrix(fn, 1) - //1. k1 - for j := 0; j < fn; j++ { //微分方程迭代 - k1.Data[j] = h * fun(temp0, j) - } - //2. k2 - temp0.Data[0] = sol0.GetFromMatrix(0, i-1) + h/4.0 //xn+h/4 - for j := 1; j < fn+1; j++ { //yn+k1/4 - temp0.Data[j] = sol0.GetFromMatrix(j, i-1) + k1.Data[j-1]/4.0 - } - for j := 0; j < fn; j++ { //微分方程迭代 - k2.Data[j] = h * fun(temp0, j) - } - //3. k3 - temp0.Data[0] = sol0.GetFromMatrix(0, i-1) + 3.0*h/8.0 //xn+3h/8 - for j := 1; j < fn+1; j++ { //yn+3k1/32+9k2/32 - temp0.Data[j] = sol0.GetFromMatrix(j, i-1) + 3.0*k1.Data[j-1]/32.0 + - 9.0*k2.Data[j-1]/32.0 - } - for j := 0; j < fn; j++ { //微分方程迭代 - k3.Data[j] = h * fun(temp0, j) - } - //4. k4 - temp0.Data[0] = sol0.GetFromMatrix(0, i-1) + 12.0*h/13.0 //xn+12h/13 - for j := 1; j < fn+1; j++ { //yn+1932k1/2197-7200k2/2197+7296k3/2197 - temp0.Data[j] = sol0.GetFromMatrix(j, i-1) + 1932.0*k1.Data[j-1]/2197.0 - - 7200.0*k2.Data[j-1]/2197.0 + 7296.0*k3.Data[j-1]/2197.0 - } - for j := 0; j < fn; j++ { //微分方程迭代 - k4.Data[j] = h * fun(temp0, j) - } - //5. k5 - temp0.Data[0] = sol0.GetFromMatrix(0, i-1) + h //xn+h - for j := 1; j < fn+1; j++ { //yn+439k1/216-8k2+3680k3/513-845k4/4104 - temp0.Data[j] = sol0.GetFromMatrix(j, i-1) + 439.0*k1.Data[j-1]/216.0 - - 8.0*k2.Data[j-1] + 3680.0*k3.Data[j-1]/513.0 - 845.0*k4.Data[j-1]/4104.0 - } - for j := 0; j < fn; j++ { //微分方程迭代 - k5.Data[j] = h * fun(temp0, j) - } - //6. k6 - temp0.Data[0] = sol0.GetFromMatrix(0, i-1) + h/2.0 //xn+h/2 - for j := 1; j < fn+1; j++ { //yn-8k1/27+2k2-3544k3/2565+1859k4/4104-11k5/40 - temp0.Data[j] = sol0.GetFromMatrix(j, i-1) - 8.0*k1.Data[j-1]/27.0 + - 2.0*k2.Data[j-1] - 3544.0*k3.Data[j-1]/2565.0 + 1859.0*k4.Data[j-1]/4104.0 - - 11.0*k5.Data[j-1]/40.0 - } - for j := 0; j < fn; j++ { //微分方程迭代 - k6.Data[j] = h * fun(temp0, j) - } - - //误差与步长 - errtemp := ZeroMatrix(fn, 1) //=ABS(z_(k+1)-y_(k+1)) - for j := 1; j < fn+1; j++ { - errtemp.Data[j-1] = k1.Data[j-1]/360.0 - 128.0*k3.Data[j-1]/4275.0 - - 2197.0*k4.Data[j-1]/75240.0 + k5.Data[j-1]/50.0 + 2.0*k6.Data[j-1]/55.0 - } - errtemp0, _, _ := MaxAbs(errtemp.Data) - - //正常推进 - if math.Abs(errtemp0) < tol { - //i步值 - sol0.SetMatrix(0, i, sol0.GetFromMatrix(0, i-1)+h) //xi - for j := 1; j < fn+1; j++ { - soltemp1 := 25.0*k1.Data[j-1]/216.0 + 1408.0*k3.Data[j-1]/2565.0 + - 2197.0*k4.Data[j-1]/4104.0 - k5.Data[j-1]/5.0 - soltemp1 = sol0.GetFromMatrix(j, i-1) + soltemp1 - sol0.SetMatrix(j, i, soltemp1) - } - i++ - nreal = i - continue - } - - //最大步数强边界 - if i >= n { - break - } - - //变步长 - scale := tol * h / (2.0 * math.Abs(errtemp0)) - scale = math.Pow(scale, 0.25) - if scale < 0.75 { - h = h / 2.0 - } else if scale > 1.5 { - h = h * 2.0 - } - } - - //解矩阵缩减 - sol := ZeroMatrix(fn+1, nreal) - for j := 0; j < nreal; j++ { - for k := 0; k < fn+1; k++ { - sol.SetMatrix(k, j, sol0.GetFromMatrix(k, j)) - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/RadixSort.go b/vendor/github.com/nuknal/goNum/RadixSort.go deleted file mode 100644 index 1f7019b..0000000 --- a/vendor/github.com/nuknal/goNum/RadixSort.go +++ /dev/null @@ -1,86 +0,0 @@ -// RadixSort -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-03-06 -版本 : 0.0.0 ------------------------------------------------------- - 基数排序法 -理论: - 时间复杂度: O(n*k) - 最好情况 : O(n*k) - 最坏情况 : O(n*k) - 空间复杂度: O(n+k) - 稳定性 : 稳定 ------------------------------------------------------- -输入 : - in 输入矩阵, 1xn -输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -注意: - 仅对整数排序有效 ------------------------------------------------------- -*/ - -package goNum - -// RadixSort 基数排序法 -func RadixSort(in []int) ([]int, bool) { - /* - 基数排序法 - 输入 : - in 输入矩阵, 1xn - 输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断初值维数 - if len(in) < 1 { - panic("Error in goNum.BucketSort: Empty input Matrix") - } else if len(in) == 1 { - return in, true - } - - n := len(in) - var err bool = false - var maxDigit, mod, div int = 0, 10, 1 - - soltemp := make([]int, n) - sol := make([]int, n) - for i := 0; i < n; i++ { - soltemp[i] = in[i] - } - temp := make([][]int, 10) - - //排序开始 - //最大数的位数 - max := IntMax(soltemp) - for max != 0 { - max = max / 10 - maxDigit++ - } - - for i := 0; i < maxDigit; i++ { - for j := 0; j < n; j++ { - var num int = (soltemp[j] % mod) / div - temp[num] = append(temp[num], soltemp[j]) - } - ind := 0 - for j := 0; j < len(temp); j++ { - for k := 0; k < len(temp[j]); k++ { - sol[ind] = temp[j][k] - ind++ - temp[j] = []int{} //必须置空, - } - } - mod = mod * 10 - div = div * 10 - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/SearchByStep.go b/vendor/github.com/nuknal/goNum/SearchByStep.go deleted file mode 100644 index e0cd3f4..0000000 --- a/vendor/github.com/nuknal/goNum/SearchByStep.go +++ /dev/null @@ -1,97 +0,0 @@ -// goNum 是一个开源的go语言数值算法库[goNum is an open -// numerical library purely based on go programming language] -package goNum - -// SearchByStep -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-10-31 -版本 : 0.0.0 ------------------------------------------------------- - 此程序设计使用搜索法来求解连续、单自变量函数指定有限区间 -上的解 ------------------------------------------------------- -输入 : - fn 函数,定义为等式左侧部分,右侧为零 - a, b 求解区间,一般要求a 0 && fn(a+float64(i-1)*h) < 0) || (fn(a+float64(i)*h) < 0 && fn(a+float64(i-1)*h) > 0) { - ab0 = append(ab0, a+float64(i-1)*h) - ab1 = append(ab1, a+float64(i)*h) - sol = append(sol, (ab0[j]+ab1[j])/2.0) - j++ - } - } - - //单解区间内循环细化,直至精度满足要求 - - for i := 0; i < j; i++ { - Nn := 0 //死循环约束 - solved := 0 //解得标志 - - for { - Nn += 1 - //循环超过一定数 - if Nn > 1000 { - err = false - return sol, err - } - - h = (ab1[i] - ab0[i]) / float64(N) - - for ii := 1; ii < N+1; ii++ { - if (fn(ab0[i]+float64(ii)*h) > 0 && fn(ab0[i]+float64(ii-1)*h) < 0) || (fn(ab0[i]+float64(ii)*h) < 0 && fn(ab0[i]+float64(ii-1)*h) > 0) { - ab0[i] = ab0[i] + float64(ii-1)*h - ab1[i] = ab0[i] + float64(ii)*h - //是否满足精度要求 - if math.Abs(fn((ab0[i]+ab1[i])/2.0)) < tol { - sol[i] = (ab0[i] + ab1[i]) / 2.0 - solved = 1 - } - break //退出此区间的搜索循环 - } - } - //如果解除此区间的解,则退出死循环 - if solved == 1 { - break - } - } - } - //返回 - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/Secant1P.go b/vendor/github.com/nuknal/goNum/Secant1P.go deleted file mode 100644 index 4432ff1..0000000 --- a/vendor/github.com/nuknal/goNum/Secant1P.go +++ /dev/null @@ -1,84 +0,0 @@ -// Secant1P -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-02 -版本 : 0.0.0 ------------------------------------------------------- - 单点弦截法求解方程 f(x)=0 在区间[a, b]内的根 -理论: - 1. 当xE[a, b],f'(x)、f''(x)连续且不变号 - 2. 选取初值x0E[a, b],使f(x0)*f''(x0) > 0,x0选取其中 - 一个,则x1选另外一个 - 线性收敛 ------------------------------------------------------- -输入 : - fn f(x)函数,定义为等式左侧部分,右侧为0 - fn2 f''(x)函数 - a, b 求解区间 - N 步数上限 - tol 误差上限 -输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// Secant1P 单点弦截法求解方程 f(x)=0 在区间[a, b]内的根 -func Secant1P(fn, fn2 func(float64) float64, a, b float64, - N int, tol float64) (float64, bool) { - /* - 单点弦截法求解方程 f(x)=0 在区间[a, b]内的根 - 输入 : - fn f(x)函数,定义为等式左侧部分,右侧为0 - fn2 f''(x)函数 - a, b 求解区间 - N 步数上限 - tol 误差上限 - 输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var sol float64 - var err bool = false - - //判断a b的次序以及选取初值 - if b < a { - return sol, err - } - switch { - // a - case fn(a)*fn2(a) > 0: - for i := 0; i < N; i++ { - sol = a - (b-a)*fn(a)/(fn(b)-fn(a)) - // 求解成功 - if math.Abs(sol-b) < tol { - err = true - return sol, err - } - b = sol - } - return sol, err - // b - case fn(b)*fn2(b) > 0: - for i := 0; i < N; i++ { - sol = b - (a-b)*fn(b)/(fn(a)-fn(b)) - // 求解成功 - if math.Abs(sol-a) < tol { - err = true - return sol, err - } - a = sol - } - return sol, err - } - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/Secant2P.go b/vendor/github.com/nuknal/goNum/Secant2P.go deleted file mode 100644 index 0bcf580..0000000 --- a/vendor/github.com/nuknal/goNum/Secant2P.go +++ /dev/null @@ -1,79 +0,0 @@ -// Secant2P -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-02 -版本 : 0.0.0 ------------------------------------------------------- - 双点弦截法求解方程 f(x)=0 在区间[a, b]内的根 -理论: - 1. 当xE[a, b],f''(x)连续,f'(x) != 0 - - xn0*f(xn1) - xn1*f(xn0) - xn2 = ------------------------- - f(xn1) - f(xn0) - - 超线性收敛,收敛阶(1+5^0.5)/2 ------------------------------------------------------- -输入 : - fn f(x)函数,定义为等式左侧部分,右侧为0 - a, b 求解区间 - N 步数上限 - tol 误差上限 -输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// Secant2P 双点弦截法求解方程 f(x)=0 在区间[a, b]内的根 -func Secant2P(fn func(float64) float64, a, b float64, - N int, tol float64) (float64, bool) { - /* - 双点弦截法求解方程 f(x)=0 在区间[a, b]内的根 - 输入 : - fn f(x)函数,定义为等式左侧部分,右侧为0 - a, b 求解区间 - N 步数上限 - tol 误差上限 - 输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var sol float64 - var err bool = false - - //判断a b的次序 - if (b < a) || (fn(a)*fn(b) > 0) { - return sol, err - } - // 求解 - sol = (a*fn(b) - b*fn(a)) / (fn(b) - fn(a)) - for i := 0; i < N; i++ { - //判断是否解得 - if (fn(a)*fn(sol) > 0) && (math.Abs(sol-a) < tol) { - err = true - return sol, err - } else if (fn(a)*fn(sol) < 0) && (math.Abs(sol-b) < tol) { - err = true - return sol, err - } - //下一步 - switch { - case fn(a)*fn(sol) > 0: - a = sol - default: - b = sol - } - sol = (a*fn(b) - b*fn(a)) / (fn(b) - fn(a)) - } - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/SelectSort.go b/vendor/github.com/nuknal/goNum/SelectSort.go deleted file mode 100644 index 5ee8c32..0000000 --- a/vendor/github.com/nuknal/goNum/SelectSort.go +++ /dev/null @@ -1,69 +0,0 @@ -// SelectSort -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-03-05 -版本 : 0.0.0 ------------------------------------------------------- - 选择排序法 -理论: - 时间复杂度: O(n^2) - 最好情况 : O(n^2) - 最坏情况 : O(n^2) - 空间复杂度: O(1) - 稳定性 : 不稳定 ------------------------------------------------------- -输入 : - in 输入矩阵, 1xn -输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// SelectSort 选择排序法 -func SelectSort(in Matrix) (Matrix, bool) { - /* - 选择排序法 - 输入 : - in 输入矩阵, 1xn - 输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断初值维数 - if in.Rows != 1 { - panic("Error in goNum.SelectSort: Input Matrix error") - } - if in.Columns < 1 { - panic("Error in goNum.SelectSort: Empty input Matrix") - } else if in.Columns == 1 { - return in, true - } - - n := in.Columns - sol := ZeroMatrix(1, n) - var err bool = false - - //初始化sol - for i := 0; i < n; i++ { - sol.Data[i] = in.Data[i] - } - //排序开始 - for i := 0; i < n-1; i++ { - mini := i - for j := i + 1; j < n; j++ { - if sol.Data[mini] > sol.Data[j] { - mini = j - } - } - sol.Data[i], sol.Data[mini] = sol.Data[mini], sol.Data[i] - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/ShellSort.go b/vendor/github.com/nuknal/goNum/ShellSort.go deleted file mode 100644 index 1ff088b..0000000 --- a/vendor/github.com/nuknal/goNum/ShellSort.go +++ /dev/null @@ -1,71 +0,0 @@ -// ShellSort -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2019-03-05 -版本 : 0.0.0 ------------------------------------------------------- - 希尔(Shell)排序法 -理论: - 时间复杂度: O(n^1.3) - 最好情况 : O(n) - 最坏情况 : O(n^2) - 空间复杂度: O(1) - 稳定性 : 不稳定 ------------------------------------------------------- -输入 : - in 输入矩阵, 1xn -输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -// ShellSort 希尔(Shell)排序法 -func ShellSort(in Matrix) (Matrix, bool) { - /* - 希尔(Shell)排序法 - 输入 : - in 输入矩阵, 1xn - 输出 : - sol 排序结果 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - //判断初值维数 - if in.Rows != 1 { - panic("Error in goNum.ShellSort: Input Matrix error") - } - if in.Columns < 1 { - panic("Error in goNum.ShellSort: Empty input Matrix") - } else if in.Columns == 1 { - return in, true - } - - n := in.Columns - sol := ZeroMatrix(1, n) - subn := n / 2 - var err bool = false - - //初始化sol - for i := 0; i < n; i++ { - sol.Data[i] = in.Data[i] - } - //排序开始 - for ; subn > 0; subn = subn / 2 { //循环到增量减小为1 - for i := subn; i < n; i++ { - temp := sol.Data[i] - j := i - subn - for ; j >= 0 && sol.Data[j] > temp; j -= subn { - sol.Data[j+subn] = sol.Data[j] - } - sol.Data[j+subn] = temp - } - } - - err = true - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/SimpleIterate.go b/vendor/github.com/nuknal/goNum/SimpleIterate.go deleted file mode 100644 index 8b8004c..0000000 --- a/vendor/github.com/nuknal/goNum/SimpleIterate.go +++ /dev/null @@ -1,85 +0,0 @@ -// SimpleIterate -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-01 -版本 : 0.0.0 ------------------------------------------------------- - 简单迭代求解类x=g(x)方程的解 xn+1=g(xn) -理论: - 1. g(x)在区间[a, b]可导; - 2. 当xE[a, b],g(x)E[a, b]; - 3. 对于任意xE[a, b],|g‘(x)| <= L < 1 - 线性收敛 - - 则求解所得的根xn与真实根xr的的误差: - L^n - |xn-xr| <= ----- |x1-x0| - 1-L ------------------------------------------------------- -输入 : - fn g(x)函数,定义为等式右侧部分,左侧为x - a, b 求解区间 - c 求解初值 - N 步数上限 - tol 误差上限 -输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// SimpleIterate 简单迭代求解类x=g(x)方程的解 xn+1=g(xn) -func SimpleIterate(fn func(float64) float64, a, b, c float64, - N int, tol float64) (float64, bool) { - /* - 简单迭代求解类x=g(x)方程的解 xn+1=g(xn) - 输入 : - fn g(x)函数,定义为等式右侧部分,左侧为x - a, b 求解区间 - c 求解初值 - N 步数上限 - tol 误差上限 - 输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var sol float64 - var err bool = false - - // 判断端点和初值是否为所求之解 - switch { - case math.Abs(fn(a)-a) < tol: - sol = a - err = true - return sol, err - case math.Abs(fn(b)-b) < tol: - sol = b - err = true - return sol, err - case math.Abs(fn(c)-c) < tol: - sol = c - err = true - return sol, err - } - - //求解 - sol = fn(c) - for i := 0; i < N; i++ { - if (math.Abs(sol - c)) < tol { - err = true - return sol, err - } - c = sol - sol = fn(c) - } - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/SimpleIterateAitken.go b/vendor/github.com/nuknal/goNum/SimpleIterateAitken.go deleted file mode 100644 index fb80a95..0000000 --- a/vendor/github.com/nuknal/goNum/SimpleIterateAitken.go +++ /dev/null @@ -1,95 +0,0 @@ -// SimpleIterateAitken -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-11-01 -版本 : 0.0.0 ------------------------------------------------------- - 简单迭代求解类x=g(x)方程的解 xn+1=g(xn) -理论: - 1. g(x)在区间[a, b]可导; - 2. 当xE[a, b],g(x)E[a, b]; - 3. 对于任意xE[a, b],|g‘(x)| <= L < 1 - 线性收敛 - - 则求解所得的根xn与真实根xr的的误差: - L^n - |xn-xr| <= ----- |x1-x0| - 1-L -Aitken boost method - xn1 = g(xn) - xn2 = g(xn1) - xn2*xn - xn1^2 - xn1 = ------------------ (n = 0, 1, 2,...) - xn2 - 2*xn1 + xn ------------------------------------------------------- -输入 : - fn g(x)函数,定义为等式右侧部分,左侧为x - a, b 求解区间 - c 求解初值 - N 步数上限 - tol 误差上限 -输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// SimpleIterateAitken 简单迭代求解类x=g(x)方程的解 xn+1=g(xn) -func SimpleIterateAitken(fn func(float64) float64, a, b, c float64, - N int, tol float64) (float64, bool) { - /* - 简单迭代求解类x=g(x)方程的解 xn+1=g(xn) - 输入 : - fn g(x)函数,定义为等式右侧部分,左侧为x - a, b 求解区间 - c 求解初值 - N 步数上限 - tol 误差上限 - 输出 : - sol 解值 - err 解出标志:false-未解出或达到步数上限; - true-全部解出 - */ - var sol, n2 float64 - var err bool = false - - // 判断端点和初值是否为所求之解 - switch { - case math.Abs(fn(a)-a) < tol: - sol = a - err = true - return sol, err - case math.Abs(fn(b)-b) < tol: - sol = b - err = true - return sol, err - case math.Abs(fn(c)-c) < tol: - sol = c - err = true - return sol, err - } - - //求解 - sol = fn(c) - n2 = fn(sol) - sol = (n2*c - sol*sol) / (n2 - 2.0*sol + c) - for i := 0; i < N; i++ { - if (math.Abs(sol - c)) < tol { - err = true - return sol, err - } - c = sol - sol = fn(c) - n2 = fn(sol) - sol = (n2*c - sol*sol) / (n2 - 2.0*sol + c) - } - return sol, err -} diff --git a/vendor/github.com/nuknal/goNum/TriangleDegree.go b/vendor/github.com/nuknal/goNum/TriangleDegree.go deleted file mode 100644 index ba05644..0000000 --- a/vendor/github.com/nuknal/goNum/TriangleDegree.go +++ /dev/null @@ -1,58 +0,0 @@ -// TriangleDegree -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-13 -版本 : 0.0.0 ------------------------------------------------------- - 以角度为输入的三角函数计算 -理论: - ------------------------------------------------------- -输入 : - x 角度值 - y 数值 -输出 : - *** 数值或角度值 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -//三角函数 - -// Sind 角度的正弦 -func Sind(x float64) float64 { - return math.Sin(x * math.Pi / 180.0) -} - -// Cosd 角度的余弦 -func Cosd(x float64) float64 { - return math.Cos(x * math.Pi / 180.0) -} - -// Tand 角度的正切 -func Tand(x float64) float64 { - return math.Tan(x * math.Pi / 180.0) -} - -//反三角函数 - -// Asind 反正弦的角度 -func Asind(y float64) float64 { - return 180.0 * math.Asin(y) / math.Pi -} - -// Acosd 反余弦的角度 -func Acosd(y float64) float64 { - return 180.0 * math.Acos(y) / math.Pi -} - -// Atand 反正切的角度 -func Atand(y float64) float64 { - return 180.0 * math.Atan(y) / math.Pi -} diff --git a/vendor/github.com/nuknal/goNum/UPDATES.md b/vendor/github.com/nuknal/goNum/UPDATES.md deleted file mode 100644 index edb4f01..0000000 --- a/vendor/github.com/nuknal/goNum/UPDATES.md +++ /dev/null @@ -1,20 +0,0 @@ -- 2019-03-06 ӹ鲢򡢿򡢶򡢼Ͱ򡢻 -- 2019-03-05 ðѡ򡢲ϣShell -- 2019-03-01 ӺĵԱʹgodocLiteIDE༭ʾ -- 2019-01-08 Բƫ΢ַ(Poisson)IJֽⷨʽ - Բƫ΢ַ(Helmholtz)IJֽⷨʽ -- 2019-01-07 Բƫ΢ַ(Laplace)ֽⷨʽ -- 2018-12-27 ӸMatrixAppendRowAppendColumn -- 2018-12-26 EulerԤУηһЩӰ쾫ȵ - MatrixһЩӰ - HeunMilne-SimpsonԤУAdams-Bashforth-MoultonԤУHammingԤУַ΢ַ -- 2018-12-25 Ӷʽ󵼣ηԱСֵ -- 2018-12-24 FibonacciУƽָFibonacciСֵ -- 2018-12-23 СϣBezierϿƵ -- 2018-12-21 ԭȾ1֮ⷶԪԷSeidel -- 2018-12-20 ӽһ㷽̵Mullerάռת -- 2018-12-19 Runge-Kutta-Felhberg䲽ODE -- 2018-12-17 ƫ΢ַֽ̲ⷨ -- 2018-12-13 ӳ΢ֵַⷨ -- 2018-12-13 Ӷֵֵ㷨ǶȵǺͷǺ -- 2018-12-11 ӶʽϺݷչƬת diff --git a/vendor/github.com/nuknal/goNum/VectorRotation.go b/vendor/github.com/nuknal/goNum/VectorRotation.go deleted file mode 100644 index 2ef3c1f..0000000 --- a/vendor/github.com/nuknal/goNum/VectorRotation.go +++ /dev/null @@ -1,91 +0,0 @@ -// VectorRotation -/* ------------------------------------------------------- -作者 : Black Ghost -日期 : 2018-12-20 -版本 : 0.0.0 ------------------------------------------------------- - 向量在三维空间的旋转 -理论: - ------------------------------------------------------- -输入 : - u 初始向量,3x1 - angle 旋转角度,3x1,按绕x、y、z顺序,弧度 - seq 旋转顺序 []int -输出 : - sol 解,向量 - err 解出标志:false-未解出或达到边界; - true-全部解出 ------------------------------------------------------- -*/ - -package goNum - -import ( - "math" -) - -// VectorRotation 向量在三维空间的旋转 -func VectorRotation(u, angle Matrix, seq []int) (Matrix, bool) { - /* - 向量在三维空间的旋转 - 输入 : - u 初始向量,3x1 - angle 旋转角度,3x1,按绕x、y、z顺序,弧度 - seq 旋转顺序 []int - 输出 : - sol 解,向量 - err 解出标志:false-未解出或达到边界; - true-全部解出 - */ - //向量大小 - if u.Rows != 3 { - panic("Error in goNum.VectorRotation: Vector length is not right") - } - if angle.Rows != 3 { - panic("Error in goNum.VectorRotation: angles number is not right") - } - if len(seq) != 3 { - panic("Error in goNum.VectorRotation: seq length is not right") - } - //判断角度大小 - for i := 0; i < 3; i++ { - if angle.Data[i] > math.Pi/2.0 { - panic("Error in goNum.VectorRotation: angle value is not right") - } - } - sol := ZeroMatrix(3, 1) - var err bool = false - //matrix around x - Rx := NewMatrix(3, 3, []float64{ - 1.0, 0.0, 0.0, - 0.0, math.Cos(angle.Data[0]), -1.0 * math.Sin(angle.Data[0]), - 0.0, math.Sin(angle.Data[0]), math.Cos(angle.Data[0])}) - //matrix around y - Ry := NewMatrix(3, 3, []float64{ - math.Cos(angle.Data[1]), 0.0, math.Sin(angle.Data[1]), - 0.0, 1.0, 0.0, - -1.0 * math.Sin(angle.Data[1]), 0.0, math.Cos(angle.Data[1])}) - //matrix around z - Rz := NewMatrix(3, 3, []float64{ - math.Cos(angle.Data[2]), -1.0 * math.Sin(angle.Data[2]), 0.0, - math.Sin(angle.Data[2]), math.Cos(angle.Data[2]), 0.0, - 0.0, 0.0, 1.0}) - W := IdentityE(3) - for i := 0; i < 3; i++ { - switch seq[i] { - case 1: - W = DotPruduct(Rx, W) - case 2: - W = DotPruduct(Ry, W) - case 3: - W = DotPruduct(Rz, W) - default: - panic("Error in goNum.VectorRotation: sequence number is not right") - } - } - sol = DotPruduct(W, u) - err = true - return sol, err -} diff --git a/vendor/github.com/paulmach/orb/CHANGELOG.md b/vendor/github.com/paulmach/orb/CHANGELOG.md deleted file mode 100644 index 1783940..0000000 --- a/vendor/github.com/paulmach/orb/CHANGELOG.md +++ /dev/null @@ -1,176 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -## [v0.11.1](https://github.com/paulmach/orb/compare/v0.11.0...v0.11.1) - 2024-01-29 - -### Fixed - -- geojson: `null` json into non-pointer Feature/FeatureCollection will set them to empty by [@paulmach](https://github.com/paulmach)in https://github.com/paulmach/orb/pull/145 - -## [v0.11.0](https://github.com/paulmach/orb/compare/v0.10.0...v0.11.0) - 2024-01-11 - -### Fixed - -- quadtree: InBoundMatching does not properly accept passed-in buffer by [@nirmal-vuppuluri](https://github.com/nirmal-vuppuluri) in https://github.com/paulmach/orb/pull/139 -- mvt: Do not swallow error cause by [@m-pavel](https://github.com/m-pavel) in https://github.com/paulmach/orb/pull/137 - -### Changed - -- simplify: Visvalingam, by default, keeps 3 points for "areas" by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/140 -- encoding/mvt: skip encoding of features will nil geometry by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/141 -- encoding/wkt: improve unmarshalling performance by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/142 - -## [v0.10.0](https://github.com/paulmach/orb/compare/v0.9.2...v0.10.0) - 2023-07-16 - -### Added - -- add ChildrenInZoomRange method to maptile.Tile by [@peitili](https://github.com/peitili) in https://github.com/paulmach/orb/pull/133 - -## [v0.9.2](https://github.com/paulmach/orb/compare/v0.9.1...v0.9.2) - 2023-05-04 - -### Fixed - -- encoding/wkt: better handling/validation of missing parens by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/131 - -## [v0.9.1](https://github.com/paulmach/orb/compare/v0.9.0...v0.9.1) - 2023-04-26 - -### Fixed - -- Bump up mongo driver to 1.11.4 by [@m-pavel](https://github.com/m-pavel) in https://github.com/paulmach/orb/pull/129 -- encoding/wkt: split strings with regexp by [@m-pavel](https://github.com/m-pavel) in https://github.com/paulmach/orb/pull/128 - -## [v0.9.0](https://github.com/paulmach/orb/compare/v0.8.0...v0.9.0) - 2023-02-19 - -### Added - -- geojson: marshal/unmarshal BSON [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/123 - -## [v0.8.0](https://github.com/paulmach/orb/compare/v0.7.1...v0.8.0) - 2023-01-05 - -### Fixed - -- quadtree: fix bad sort due to pointer allocation issue by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/115 -- geojson: ensure geometry unmarshal errors get returned by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/117 -- encoding/mvt: remove use of crypto/md5 to compare marshalling in tests by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/118 -- encoding/wkt: fix panic for some invalid wkt data by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/119 - -### Other - -- fix typo by [@rubenpoppe](https://github.com/rubenpoppe) in https://github.com/paulmach/orb/pull/107 -- Fixed a small twister in README.md by [@Timahawk](https://github.com/Timahawk) in https://github.com/paulmach/orb/pull/108 -- update github ci to use go 1.19 by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/116 - -## [v0.7.1](https://github.com/paulmach/orb/compare/v0.7.0...v0.7.1) - 2022-05-16 - -No changes - -The v0.7.0 tag was updated since it initially pointed to the wrong commit. This is causing caching issues. - -## [v0.7.0](https://github.com/paulmach/orb/compare/v0.6.0...v0.7.0) - 2022-05-10 - -This tag is broken, please use v0.7.1 instead. - -### Breaking Changes - -- tilecover now returns an error (vs. panicing) on non-closed 2d geometry by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/87 - - This changes the signature of many of the methods in the [maptile/tilecover](https://github.com/paulmach/orb/tree/master/maptile/tilecover) package. - To emulate the old behavior replace: - - tiles := tilecover.Geometry(poly, zoom) - - with - - tiles, err := tilecover.Geometry(poly, zoom) - if err != nil { - panic(err) - } - -## [v0.6.0](https://github.com/paulmach/orb/compare/v0.5.0...v0.6.0) - 2022-05-04 - -### Added - -- geo: add correctly spelled LengthHaversine by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/97 -- geojson: add support for "external" json encoders/decoders by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/98 -- Add ewkb encoding/decoding support by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/88 - -## [v0.5.0](https://github.com/paulmach/orb/compare/v0.4.0...v0.5.0) - 2022-04-06 - -### Added - -- encoding/mvt: stable marshalling by [@travisgrigsby](https://github.com/travisgrigsby) in https://github.com/paulmach/orb/pull/93 -- encoding/mvt: support mvt marshal for GeometryCollection by [@dadadamarine](https://github.com/dadadamarine) in https://github.com/paulmach/orb/pull/89 - -### Fixed - -- quadtree: fix cleanup of nodes during removal by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/94 - -### Other - -- encoding/wkt: various code improvements by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/95 -- update protoscan to 0.2.1 by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/83 - -## [v0.4.0](https://github.com/paulmach/orb/compare/v0.3.0...v0.4.0) - 2021-11-11 - -### Added - -- geo: Add functions to calculate points based on distance and bearing by [@thzinc](https://github.com/thzinc) in https://github.com/paulmach/orb/pull/76 - -### Fixed - -- encoding/mvt: avoid reflect nil value by [@nicklasaven](https://github.com/nicklasaven) in https://github.com/paulmach/orb/pull/78 - -## [v0.3.0](https://github.com/paulmach/orb/compare/v0.2.2...v0.3.0) - 2021-10-16 - -### Changed - -- quadtree: sort KNearest results closest first by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/75 -- ring: require >=4 points to return true when calling Closed() by [@missinglink](https://github.com/missinglink) in https://github.com/paulmach/orb/pull/70 - -### Fixed - -- encoding/mvt: verify tile coord does not overflow for z > 20 by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/74 -- quadtree: Address panic-ing quadtree.Matching(…) method when finding no closest node by [@willsalz](https://github.com/willsalz) in https://github.com/paulmach/orb/pull/73 - -## [v0.2.2](https://github.com/paulmach/orb/compare/v0.2.1...v0.2.2) - 2021-06-05 - -### Fixed - -- Dependency resolution problems in some cases, issue https://github.com/paulmach/orb/issues/65, pr https://github.com/paulmach/orb/pull/66 - -## [v0.2.1](https://github.com/paulmach/orb/compare/v0.2.0...v0.2.1) - 2021-01-16 - -### Changed - -- encoding/mvt: upgrade protoscan v0.1 -> v0.2 [`ad31566`](https://github.com/paulmach/orb/commit/ad31566942027c1cd30dd341f35123fb54676599) -- encoding/mvt: remove github.com/pkg/errors as a dependency [`d2e235`](https://github.com/paulmach/orb/commit/d2e23529a295a0d973cc787ad2742cb6ccbd5306) - -## v0.2.0 - 2021-01-16 - -### Breaking Changes - -- Foreign Members in Feature Collections - - Extra attributes in a feature collection object will now be put into `featureCollection.ExtraMembers`. - Similarly, stuff in `ExtraMembers will be marshalled into the feature collection base. - The break happens if you were decoding these foreign members using something like - - ```go - type MyFeatureCollection struct { - geojson.FeatureCollection - Title string `json:"title"` - } - ``` - - **The above will no longer work** in this release and it never supported marshalling. See https://github.com/paulmach/orb/pull/56 for more details. - -- Features with nil/missing geometry will no longer return an errors - - Previously missing or invalid geometry in a feature collection would return a `ErrInvalidGeometry` error. - However missing geometry is compliant with [section 3.2](https://tools.ietf.org/html/rfc7946#section-3.2) of the spec. - See https://github.com/paulmach/orb/issues/38 and https://github.com/paulmach/orb/pull/58 for more details. - -### Changed - -- encoding/mvt: faster unmarshalling for Mapbox Vector Tiles (MVT) see https://github.com/paulmach/orb/pull/57 diff --git a/vendor/github.com/paulmach/orb/LICENSE.md b/vendor/github.com/paulmach/orb/LICENSE.md deleted file mode 100644 index 526962a..0000000 --- a/vendor/github.com/paulmach/orb/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Paul Mach - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/paulmach/orb/README.md b/vendor/github.com/paulmach/orb/README.md deleted file mode 100644 index 03fe463..0000000 --- a/vendor/github.com/paulmach/orb/README.md +++ /dev/null @@ -1,181 +0,0 @@ -# orb [![CI](https://github.com/paulmach/orb/workflows/CI/badge.svg)](https://github.com/paulmach/orb/actions?query=workflow%3ACI+event%3Apush) [![codecov](https://codecov.io/gh/paulmach/orb/branch/master/graph/badge.svg?token=NuuTjLVpKW)](https://codecov.io/gh/paulmach/orb) [![Go Report Card](https://goreportcard.com/badge/github.com/paulmach/orb)](https://goreportcard.com/report/github.com/paulmach/orb) [![Go Reference](https://pkg.go.dev/badge/github.com/paulmach/orb.svg)](https://pkg.go.dev/github.com/paulmach/orb) - -Package `orb` defines a set of types for working with 2d geo and planar/projected geometric data in Golang. -There are a set of sub-packages that use these types to do interesting things. -They each provide their own README with extra info. - -## Interesting features - -- **Simple types** - allow for natural operations using the `make`, `append`, `len`, `[s:e]` builtins. -- **GeoJSON** - support as part of the [`geojson`](geojson) sub-package. -- **Mapbox Vector Tile** - encoding and decoding as part of the [`encoding/mvt`](encoding/mvt) sub-package. -- **Direct to type from DB query results** - by scanning WKB data directly into types. -- **Rich set of sub-packages** - including [`clipping`](clip), [`simplifing`](simplify), [`quadtree`](quadtree) and more. - -## Type definitions - -```go -type Point [2]float64 -type MultiPoint []Point - -type LineString []Point -type MultiLineString []LineString - -type Ring LineString -type Polygon []Ring -type MultiPolygon []Polygon - -type Collection []Geometry - -type Bound struct { Min, Max Point } -``` - -Defining the types as slices allows them to be accessed in an idiomatic way -using Go's built-in functions such at `make`, `append`, `len` -and with slice notation like `[s:e]`. For example: - -```go -ls := make(orb.LineString, 0, 100) -ls = append(ls, orb.Point{1, 1}) -point := ls[0] -``` - -### Shared `Geometry` interface - -All of the base types implement the `orb.Geometry` interface defined as: - -```go -type Geometry interface { - GeoJSONType() string - Dimensions() int // e.g. 0d, 1d, 2d - Bound() Bound -} -``` - -This interface is accepted by functions in the sub-packages which then act on the -base types correctly. For example: - -```go -l := clip.Geometry(bound, geom) -``` - -will use the appropriate clipping algorithm depending on if the input is 1d or 2d, -e.g. a `orb.LineString` or a `orb.Polygon`. - -Only a few methods are defined directly on these type, for example `Clone`, `Equal`, `GeoJSONType`. -Other operation that depend on geo vs. planar contexts are defined in the respective sub-package. -For example: - -- Computing the geo distance between two point: - - ```go - p1 := orb.Point{-72.796408, -45.407131} - p2 := orb.Point{-72.688541, -45.384987} - - geo.Distance(p1, p2) - ``` - -- Compute the planar area and centroid of a polygon: - - ```go - poly := orb.Polygon{...} - centroid, area := planar.CentroidArea(poly) - ``` - -## GeoJSON - -The [geojson](geojson) sub-package implements Marshalling and Unmarshalling of GeoJSON data. -Features are defined as: - -```go -type Feature struct { - ID interface{} `json:"id,omitempty"` - Type string `json:"type"` - Geometry orb.Geometry `json:"geometry"` - Properties Properties `json:"properties"` -} -``` - -Defining the geometry as an `orb.Geometry` interface along with sub-package functions -accepting geometries allows them to work together to create easy to follow code. -For example, clipping all the geometries in a collection: - -```go -fc, err := geojson.UnmarshalFeatureCollection(data) -for _, f := range fc { - f.Geometry = clip.Geometry(bound, f.Geometry) -} -``` - -The library supports third party "encoding/json" replacements -such [github.com/json-iterator/go](https://github.com/json-iterator/go). -See the [geojson](geojson) readme for more details. - -The types also support BSON so they can be used directly when working with MongoDB. - -## Mapbox Vector Tiles - -The [encoding/mvt](encoding/mvt) sub-package implements Marshalling and -Unmarshalling [MVT](https://www.mapbox.com/vector-tiles/) data. -This package uses sets of `geojson.FeatureCollection` to define the layers, -keyed by the layer name. For example: - -```go -collections := map[string]*geojson.FeatureCollection{} - -// Convert to a layers object and project to tile coordinates. -layers := mvt.NewLayers(collections) -layers.ProjectToTile(maptile.New(x, y, z)) - -// In order to be used as source for MapboxGL geometries need to be clipped -// to max allowed extent. (uncomment next line) -// layers.Clip(mvt.MapboxGLDefaultExtentBound) - -// Simplify the geometry now that it's in tile coordinate space. -layers.Simplify(simplify.DouglasPeucker(1.0)) - -// Depending on use-case remove empty geometry, those too small to be -// represented in this tile space. -// In this case lines shorter than 1, and areas smaller than 2. -layers.RemoveEmpty(1.0, 2.0) - -// encoding using the Mapbox Vector Tile protobuf encoding. -data, err := mvt.Marshal(layers) // this data is NOT gzipped. - -// Sometimes MVT data is stored and transfered gzip compressed. In that case: -data, err := mvt.MarshalGzipped(layers) -``` - -## Decoding WKB/EWKB from a database query - -Geometries are usually returned from databases in WKB or EWKB format. The [encoding/ewkb](encoding/ewkb) -sub-package offers helpers to "scan" the data into the base types directly. -For example: - -```go -db.Exec( - "INSERT INTO postgis_table (point_column) VALUES (ST_GeomFromEWKB(?))", - ewkb.Value(orb.Point{1, 2}, 4326), -) - -row := db.QueryRow("SELECT ST_AsBinary(point_column) FROM postgis_table") - -var p orb.Point -err := row.Scan(ewkb.Scanner(&p)) -``` - -For more information see the readme in the [encoding/ewkb](encoding/ewkb) package. - -## List of sub-package utilities - -- [`clip`](clip) - clipping geometry to a bounding box -- [`encoding/mvt`](encoding/mvt) - encoded and decoding from [Mapbox Vector Tiles](https://www.mapbox.com/vector-tiles/) -- [`encoding/wkb`](encoding/wkb) - well-known binary as well as helpers to decode from the database queries -- [`encoding/ewkb`](encoding/ewkb) - extended well-known binary format that includes the SRID -- [`encoding/wkt`](encoding/wkt) - well-known text encoding -- [`geojson`](geojson) - working with geojson and the types in this package -- [`maptile`](maptile) - working with mercator map tiles and quadkeys -- [`project`](project) - project geometries between geo and planar contexts -- [`quadtree`](quadtree) - quadtree implementation using the types in this package -- [`resample`](resample) - resample points in a line string geometry -- [`simplify`](simplify) - linear geometry simplifications like Douglas-Peucker diff --git a/vendor/github.com/paulmach/orb/bound.go b/vendor/github.com/paulmach/orb/bound.go deleted file mode 100644 index a0726d6..0000000 --- a/vendor/github.com/paulmach/orb/bound.go +++ /dev/null @@ -1,172 +0,0 @@ -package orb - -import ( - "math" -) - -var emptyBound = Bound{Min: Point{1, 1}, Max: Point{-1, -1}} - -// A Bound represents a closed box or rectangle. -// To create a bound with two points you can do something like: -// orb.MultiPoint{p1, p2}.Bound() -type Bound struct { - Min, Max Point -} - -// GeoJSONType returns the GeoJSON type for the object. -func (b Bound) GeoJSONType() string { - return "Polygon" -} - -// Dimensions returns 2 because a Bound is a 2d object. -func (b Bound) Dimensions() int { - return 2 -} - -// ToPolygon converts the bound into a Polygon object. -func (b Bound) ToPolygon() Polygon { - return Polygon{b.ToRing()} -} - -// ToRing converts the bound into a loop defined -// by the boundary of the box. -func (b Bound) ToRing() Ring { - return Ring{ - b.Min, - Point{b.Max[0], b.Min[1]}, - b.Max, - Point{b.Min[0], b.Max[1]}, - b.Min, - } -} - -// Extend grows the bound to include the new point. -func (b Bound) Extend(point Point) Bound { - // already included, no big deal - if b.Contains(point) { - return b - } - - return Bound{ - Min: Point{ - math.Min(b.Min[0], point[0]), - math.Min(b.Min[1], point[1]), - }, - Max: Point{ - math.Max(b.Max[0], point[0]), - math.Max(b.Max[1], point[1]), - }, - } -} - -// Union extends this bound to contain the union of this and the given bound. -func (b Bound) Union(other Bound) Bound { - if other.IsEmpty() { - return b - } - - b = b.Extend(other.Min) - b = b.Extend(other.Max) - b = b.Extend(other.LeftTop()) - b = b.Extend(other.RightBottom()) - - return b -} - -// Contains determines if the point is within the bound. -// Points on the boundary are considered within. -func (b Bound) Contains(point Point) bool { - if point[1] < b.Min[1] || b.Max[1] < point[1] { - return false - } - - if point[0] < b.Min[0] || b.Max[0] < point[0] { - return false - } - - return true -} - -// Intersects determines if two bounds intersect. -// Returns true if they are touching. -func (b Bound) Intersects(bound Bound) bool { - if (b.Max[0] < bound.Min[0]) || - (b.Min[0] > bound.Max[0]) || - (b.Max[1] < bound.Min[1]) || - (b.Min[1] > bound.Max[1]) { - return false - } - - return true -} - -// Pad extends the bound in all directions by the given value. -func (b Bound) Pad(d float64) Bound { - b.Min[0] -= d - b.Min[1] -= d - - b.Max[0] += d - b.Max[1] += d - - return b -} - -// Center returns the center of the bounds by "averaging" the x and y coords. -func (b Bound) Center() Point { - return Point{ - (b.Min[0] + b.Max[0]) / 2.0, - (b.Min[1] + b.Max[1]) / 2.0, - } -} - -// Top returns the top of the bound. -func (b Bound) Top() float64 { - return b.Max[1] -} - -// Bottom returns the bottom of the bound. -func (b Bound) Bottom() float64 { - return b.Min[1] -} - -// Right returns the right of the bound. -func (b Bound) Right() float64 { - return b.Max[0] -} - -// Left returns the left of the bound. -func (b Bound) Left() float64 { - return b.Min[0] -} - -// LeftTop returns the upper left point of the bound. -func (b Bound) LeftTop() Point { - return Point{b.Left(), b.Top()} -} - -// RightBottom return the lower right point of the bound. -func (b Bound) RightBottom() Point { - return Point{b.Right(), b.Bottom()} -} - -// IsEmpty returns true if it contains zero area or if -// it's in some malformed negative state where the left point is larger than the right. -// This can be caused by padding too much negative. -func (b Bound) IsEmpty() bool { - return b.Min[0] > b.Max[0] || b.Min[1] > b.Max[1] -} - -// IsZero return true if the bound just includes just null island. -func (b Bound) IsZero() bool { - return b.Max == Point{} && b.Min == Point{} -} - -// Bound returns the the same bound. -func (b Bound) Bound() Bound { - return b -} - -// Equal returns if two bounds are equal. -func (b Bound) Equal(c Bound) bool { - return b.Min == c.Min && b.Max == c.Max -} diff --git a/vendor/github.com/paulmach/orb/clone.go b/vendor/github.com/paulmach/orb/clone.go deleted file mode 100644 index ac757b7..0000000 --- a/vendor/github.com/paulmach/orb/clone.go +++ /dev/null @@ -1,56 +0,0 @@ -package orb - -import ( - "fmt" -) - -// Clone will make a deep copy of the geometry. -func Clone(g Geometry) Geometry { - if g == nil { - return nil - } - - switch g := g.(type) { - case Point: - return g - case MultiPoint: - if g == nil { - return nil - } - return g.Clone() - case LineString: - if g == nil { - return nil - } - return g.Clone() - case MultiLineString: - if g == nil { - return nil - } - return g.Clone() - case Ring: - if g == nil { - return nil - } - return g.Clone() - case Polygon: - if g == nil { - return nil - } - return g.Clone() - case MultiPolygon: - if g == nil { - return nil - } - return g.Clone() - case Collection: - if g == nil { - return nil - } - return g.Clone() - case Bound: - return g - } - - panic(fmt.Sprintf("geometry type not supported: %T", g)) -} diff --git a/vendor/github.com/paulmach/orb/codecov.yml b/vendor/github.com/paulmach/orb/codecov.yml deleted file mode 100644 index 8bf5754..0000000 --- a/vendor/github.com/paulmach/orb/codecov.yml +++ /dev/null @@ -1,10 +0,0 @@ -coverage: - status: - project: off - patch: off - - precision: 2 - round: down - range: "70...90" - -comment: false diff --git a/vendor/github.com/paulmach/orb/define.go b/vendor/github.com/paulmach/orb/define.go deleted file mode 100644 index a0b08f3..0000000 --- a/vendor/github.com/paulmach/orb/define.go +++ /dev/null @@ -1,44 +0,0 @@ -package orb - -// EarthRadius is the radius of the earth in meters. It is used in geo distance calculations. -// To keep things consistent, this value matches WGS84 Web Mercator (EPSG:3857). -const EarthRadius = 6378137.0 // meters - -// DefaultRoundingFactor is the default rounding factor used by the Round func. -var DefaultRoundingFactor = 1e6 // 6 decimal places - -// Orientation defines the order of the points in a polygon -// or closed ring. -type Orientation int8 - -// Constants to define orientation. -// They follow the right hand rule for orientation. -const ( - // CCW stands for Counter Clock Wise - CCW Orientation = 1 - - // CW stands for Clock Wise - CW Orientation = -1 -) - -// A DistanceFunc is a function that computes the distance between two points. -type DistanceFunc func(Point, Point) float64 - -// A Projection a function that moves a point from one space to another. -type Projection func(Point) Point - -// Pointer is something that can be represented by a point. -type Pointer interface { - Point() Point -} - -// A Simplifier is something that can simplify geometry. -type Simplifier interface { - Simplify(g Geometry) Geometry - LineString(ls LineString) LineString - MultiLineString(mls MultiLineString) MultiLineString - Ring(r Ring) Ring - Polygon(p Polygon) Polygon - MultiPolygon(mp MultiPolygon) MultiPolygon - Collection(c Collection) Collection -} diff --git a/vendor/github.com/paulmach/orb/equal.go b/vendor/github.com/paulmach/orb/equal.go deleted file mode 100644 index 7cc87dd..0000000 --- a/vendor/github.com/paulmach/orb/equal.go +++ /dev/null @@ -1,51 +0,0 @@ -package orb - -import ( - "fmt" -) - -// Equal returns if the two geometrires are equal. -func Equal(g1, g2 Geometry) bool { - if g1 == nil || g2 == nil { - return g1 == g2 - } - - if g1.GeoJSONType() != g2.GeoJSONType() { - return false - } - - switch g1 := g1.(type) { - case Point: - return g1.Equal(g2.(Point)) - case MultiPoint: - return g1.Equal(g2.(MultiPoint)) - case LineString: - return g1.Equal(g2.(LineString)) - case MultiLineString: - return g1.Equal(g2.(MultiLineString)) - case Ring: - g2, ok := g2.(Ring) - if !ok { - return false - } - return g1.Equal(g2) - case Polygon: - g2, ok := g2.(Polygon) - if !ok { - return false - } - return g1.Equal(g2) - case MultiPolygon: - return g1.Equal(g2.(MultiPolygon)) - case Collection: - return g1.Equal(g2.(Collection)) - case Bound: - g2, ok := g2.(Bound) - if !ok { - return false - } - return g1.Equal(g2) - } - - panic(fmt.Sprintf("geometry type not supported: %T", g1)) -} diff --git a/vendor/github.com/paulmach/orb/geo/README.md b/vendor/github.com/paulmach/orb/geo/README.md deleted file mode 100644 index 778407c..0000000 --- a/vendor/github.com/paulmach/orb/geo/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# orb/geo [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/geo) - -The geometries defined in the `orb` package are generic 2d geometries. -Depending on what projection they're in, e.g. lon/lat or flat on the plane, -area and distance calculations are different. This package implements methods -that assume the lon/lat or WGS84 projection. - -## Examples - -Area of the [San Francisco Main Library](https://www.openstreetmap.org/way/24446086): - -```go -poly := orb.Polygon{ - { - { -122.4163816, 37.7792782 }, - { -122.4162786, 37.7787626 }, - { -122.4151027, 37.7789118 }, - { -122.4152143, 37.7794274 }, - { -122.4163816, 37.7792782 }, - }, -} - -a := geo.Area(poly) - -fmt.Printf("%f m^2", a) -// Output: -// 6073.368008 m^2 -``` - -Distance between two points: - -```go -oakland := orb.Point{-122.270833, 37.804444} -sf := orb.Point{-122.416667, 37.783333} - -d := geo.Distance(oakland, sf) - -fmt.Printf("%0.3f meters", d) -// Output: -// 13042.047 meters -``` - -Circumference of the [San Francisco Main Library](https://www.openstreetmap.org/way/24446086): - -```go -poly := orb.Polygon{ - { - { -122.4163816, 37.7792782 }, - { -122.4162786, 37.7787626 }, - { -122.4151027, 37.7789118 }, - { -122.4152143, 37.7794274 }, - { -122.4163816, 37.7792782 }, - }, -} -l := geo.Length(poly) - -fmt.Printf("%0.0f meters", l) -// Output: -// 325 meters -``` diff --git a/vendor/github.com/paulmach/orb/geo/area.go b/vendor/github.com/paulmach/orb/geo/area.go deleted file mode 100644 index 4cf5d17..0000000 --- a/vendor/github.com/paulmach/orb/geo/area.go +++ /dev/null @@ -1,112 +0,0 @@ -// Package geo computes properties on geometries assuming they are lon/lat data. -package geo - -import ( - "fmt" - "math" - - "github.com/paulmach/orb" -) - -// Area returns the area of the geometry on the earth. -func Area(g orb.Geometry) float64 { - if g == nil { - return 0 - } - - switch g := g.(type) { - case orb.Point, orb.MultiPoint, orb.LineString, orb.MultiLineString: - return 0 - case orb.Ring: - return math.Abs(ringArea(g)) - case orb.Polygon: - return polygonArea(g) - case orb.MultiPolygon: - return multiPolygonArea(g) - case orb.Collection: - return collectionArea(g) - case orb.Bound: - return Area(g.ToRing()) - } - - panic(fmt.Sprintf("geometry type not supported: %T", g)) -} - -// SignedArea will return the signed area of the ring. -// Will return negative if the ring is in the clockwise direction. -// Will implicitly close the ring. -func SignedArea(r orb.Ring) float64 { - return ringArea(r) -} - -func ringArea(r orb.Ring) float64 { - if len(r) < 3 { - return 0 - } - var lo, mi, hi int - - l := len(r) - if r[0] != r[len(r)-1] { - // if not a closed ring, add an implicit calc for that last point. - l++ - } - - // To support implicit closing of ring, replace references to - // the last point in r to the first 1. - - area := 0.0 - for i := 0; i < l; i++ { - if i == l-3 { // i = N-3 - lo = l - 3 - mi = l - 2 - hi = 0 - } else if i == l-2 { // i = N-2 - lo = l - 2 - mi = 0 - hi = 0 - } else if i == l-1 { // i = N-1 - lo = 0 - mi = 0 - hi = 1 - } else { // i = 0 to N-3 - lo = i - mi = i + 1 - hi = i + 2 - } - - area += (deg2rad(r[hi][0]) - deg2rad(r[lo][0])) * math.Sin(deg2rad(r[mi][1])) - } - - return -area * orb.EarthRadius * orb.EarthRadius / 2 -} - -func polygonArea(p orb.Polygon) float64 { - if len(p) == 0 { - return 0 - } - - sum := math.Abs(ringArea(p[0])) - for i := 1; i < len(p); i++ { - sum -= math.Abs(ringArea(p[i])) - } - - return sum -} - -func multiPolygonArea(mp orb.MultiPolygon) float64 { - sum := 0.0 - for _, p := range mp { - sum += polygonArea(p) - } - - return sum -} - -func collectionArea(c orb.Collection) float64 { - area := 0.0 - for _, g := range c { - area += Area(g) - } - - return area -} diff --git a/vendor/github.com/paulmach/orb/geo/bound.go b/vendor/github.com/paulmach/orb/geo/bound.go deleted file mode 100644 index d9c1c29..0000000 --- a/vendor/github.com/paulmach/orb/geo/bound.go +++ /dev/null @@ -1,97 +0,0 @@ -package geo - -import ( - "math" - - "github.com/paulmach/orb" -) - -// NewBoundAroundPoint creates a new bound given a center point, -// and a distance from the center point in meters. -func NewBoundAroundPoint(center orb.Point, distance float64) orb.Bound { - radDist := distance / orb.EarthRadius - radLat := deg2rad(center[1]) - radLon := deg2rad(center[0]) - minLat := radLat - radDist - maxLat := radLat + radDist - - var minLon, maxLon float64 - if minLat > minLatitude && maxLat < maxLatitude { - deltaLon := math.Asin(math.Sin(radDist) / math.Cos(radLat)) - minLon = radLon - deltaLon - if minLon < minLongitude { - minLon += 2 * math.Pi - } - maxLon = radLon + deltaLon - if maxLon > maxLongitude { - maxLon -= 2 * math.Pi - } - } else { - minLat = math.Max(minLat, minLatitude) - maxLat = math.Min(maxLat, maxLatitude) - minLon = minLongitude - maxLon = maxLongitude - } - - return orb.Bound{ - Min: orb.Point{rad2deg(minLon), rad2deg(minLat)}, - Max: orb.Point{rad2deg(maxLon), rad2deg(maxLat)}, - } -} - -// BoundPad expands the bound in all directions by the given amount of meters. -func BoundPad(b orb.Bound, meters float64) orb.Bound { - dy := meters / 111131.75 - dx := dy / math.Cos(deg2rad(b.Max[1])) - dx = math.Max(dx, dy/math.Cos(deg2rad(b.Min[1]))) - - b.Min[0] -= dx - b.Min[1] -= dy - - b.Max[0] += dx - b.Max[1] += dy - - b.Min[0] = math.Max(b.Min[0], -180) - b.Min[1] = math.Max(b.Min[1], -90) - - b.Max[0] = math.Min(b.Max[0], 180) - b.Max[1] = math.Min(b.Max[1], 90) - - return b -} - -// BoundHeight returns the approximate height in meters. -func BoundHeight(b orb.Bound) float64 { - return 111131.75 * (b.Max[1] - b.Min[1]) -} - -// BoundWidth returns the approximate width in meters -// of the center of the bound. -func BoundWidth(b orb.Bound) float64 { - c := (b.Min[1] + b.Max[1]) / 2.0 - - s1 := orb.Point{b.Min[0], c} - s2 := orb.Point{b.Max[0], c} - - return Distance(s1, s2) -} - -//MinLatitude is the minimum possible latitude -var minLatitude = deg2rad(-90) - -//MaxLatitude is the maxiumum possible latitude -var maxLatitude = deg2rad(90) - -//MinLongitude is the minimum possible longitude -var minLongitude = deg2rad(-180) - -//MaxLongitude is the maxiumum possible longitude -var maxLongitude = deg2rad(180) - -func deg2rad(d float64) float64 { - return d * math.Pi / 180.0 -} - -func rad2deg(r float64) float64 { - return 180.0 * r / math.Pi -} diff --git a/vendor/github.com/paulmach/orb/geo/distance.go b/vendor/github.com/paulmach/orb/geo/distance.go deleted file mode 100644 index f7aed9e..0000000 --- a/vendor/github.com/paulmach/orb/geo/distance.go +++ /dev/null @@ -1,119 +0,0 @@ -package geo - -import ( - "math" - - "github.com/paulmach/orb" -) - -// Distance returns the distance between two points on the earth. -func Distance(p1, p2 orb.Point) float64 { - dLat := deg2rad(p1[1] - p2[1]) - dLon := deg2rad(p1[0] - p2[0]) - - dLon = math.Abs(dLon) - if dLon > math.Pi { - dLon = 2*math.Pi - dLon - } - - // fast way using pythagorean theorem on an equirectangular projection - x := dLon * math.Cos(deg2rad((p1[1]+p2[1])/2.0)) - return math.Sqrt(dLat*dLat+x*x) * orb.EarthRadius -} - -// DistanceHaversine computes the distance on the earth using the -// more accurate haversine formula. -func DistanceHaversine(p1, p2 orb.Point) float64 { - dLat := deg2rad(p1[1] - p2[1]) - dLon := deg2rad(p1[0] - p2[0]) - - dLat2Sin := math.Sin(dLat / 2) - dLon2Sin := math.Sin(dLon / 2) - a := dLat2Sin*dLat2Sin + math.Cos(deg2rad(p2[1]))*math.Cos(deg2rad(p1[1]))*dLon2Sin*dLon2Sin - - return 2.0 * orb.EarthRadius * math.Atan2(math.Sqrt(a), math.Sqrt(1-a)) -} - -// Bearing computes the direction one must start traveling on earth -// to be heading from, to the given points. -func Bearing(from, to orb.Point) float64 { - dLon := deg2rad(to[0] - from[0]) - - fromLatRad := deg2rad(from[1]) - toLatRad := deg2rad(to[1]) - - y := math.Sin(dLon) * math.Cos(toLatRad) - x := math.Cos(fromLatRad)*math.Sin(toLatRad) - math.Sin(fromLatRad)*math.Cos(toLatRad)*math.Cos(dLon) - - return rad2deg(math.Atan2(y, x)) -} - -// Midpoint returns the half-way point along a great circle path between the two points. -func Midpoint(p, p2 orb.Point) orb.Point { - dLon := deg2rad(p2[0] - p[0]) - - aLatRad := deg2rad(p[1]) - bLatRad := deg2rad(p2[1]) - - x := math.Cos(bLatRad) * math.Cos(dLon) - y := math.Cos(bLatRad) * math.Sin(dLon) - - r := orb.Point{ - deg2rad(p[0]) + math.Atan2(y, math.Cos(aLatRad)+x), - math.Atan2(math.Sin(aLatRad)+math.Sin(bLatRad), math.Sqrt((math.Cos(aLatRad)+x)*(math.Cos(aLatRad)+x)+y*y)), - } - - // convert back to degrees - r[0] = rad2deg(r[0]) - r[1] = rad2deg(r[1]) - - return r -} - -// PointAtBearingAndDistance returns the point at the given bearing and distance in meters from the point -func PointAtBearingAndDistance(p orb.Point, bearing, distance float64) orb.Point { - aLat := deg2rad(p[1]) - aLon := deg2rad(p[0]) - - bearingRadians := deg2rad(bearing) - - distanceRatio := distance / orb.EarthRadius - bLat := math.Asin(math.Sin(aLat)*math.Cos(distanceRatio) + math.Cos(aLat)*math.Sin(distanceRatio)*math.Cos(bearingRadians)) - bLon := aLon + - math.Atan2( - math.Sin(bearingRadians)*math.Sin(distanceRatio)*math.Cos(aLat), - math.Cos(distanceRatio)-math.Sin(aLat)*math.Sin(bLat), - ) - - return orb.Point{rad2deg(bLon), rad2deg(bLat)} -} - -func PointAtDistanceAlongLine(ls orb.LineString, distance float64) (orb.Point, float64) { - if len(ls) == 0 { - panic("empty LineString") - } - - if distance < 0 || len(ls) == 1 { - return ls[0], 0.0 - } - - var ( - travelled = 0.0 - from, to orb.Point - ) - - for i := 1; i < len(ls); i++ { - from, to = ls[i-1], ls[i] - - actualSegmentDistance := DistanceHaversine(from, to) - expectedSegmentDistance := distance - travelled - - if expectedSegmentDistance < actualSegmentDistance { - bearing := Bearing(from, to) - return PointAtBearingAndDistance(from, bearing, expectedSegmentDistance), bearing - } - travelled += actualSegmentDistance - } - - return to, Bearing(from, to) -} diff --git a/vendor/github.com/paulmach/orb/geo/length.go b/vendor/github.com/paulmach/orb/geo/length.go deleted file mode 100644 index 7b86d4d..0000000 --- a/vendor/github.com/paulmach/orb/geo/length.go +++ /dev/null @@ -1,26 +0,0 @@ -package geo - -import ( - "github.com/paulmach/orb" - "github.com/paulmach/orb/internal/length" -) - -// Length returns the length of the boundary of the geometry -// using the geo distance function. -func Length(g orb.Geometry) float64 { - return length.Length(g, Distance) -} - -// LengthHaversign returns the length of the boundary of the geometry -// using the geo haversine formula -// -// Deprecated: misspelled, use correctly spelled `LengthHaversine` instead. -func LengthHaversign(g orb.Geometry) float64 { - return length.Length(g, DistanceHaversine) -} - -// LengthHaversine returns the length of the boundary of the geometry -// using the geo haversine formula -func LengthHaversine(g orb.Geometry) float64 { - return length.Length(g, DistanceHaversine) -} diff --git a/vendor/github.com/paulmach/orb/geojson/README.md b/vendor/github.com/paulmach/orb/geojson/README.md deleted file mode 100644 index 07ca932..0000000 --- a/vendor/github.com/paulmach/orb/geojson/README.md +++ /dev/null @@ -1,132 +0,0 @@ -# orb/geojson [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/geojson) - -This package **encodes and decodes** [GeoJSON](http://geojson.org/) into Go structs -using the geometries in the [orb](https://github.com/paulmach/orb) package. - -Supports both the [json.Marshaler](https://pkg.go.dev/encoding/json#Marshaler) and -[json.Unmarshaler](https://pkg.go.dev/encoding/json#Unmarshaler) interfaces. -The package also provides helper functions such as `UnmarshalFeatureCollection` and `UnmarshalFeature`. - -The types also support BSON via the [bson.Marshaler](https://pkg.go.dev/go.mongodb.org/mongo-driver/bson#Marshaler) and -[bson.Unmarshaler](https://pkg.go.dev/go.mongodb.org/mongo-driver/bson#Unmarshaler) interfaces. -These types can be used directly when working with MongoDB. - -## Unmarshalling (JSON -> Go) - -```go -rawJSON := []byte(` - { "type": "FeatureCollection", - "features": [ - { "type": "Feature", - "geometry": {"type": "Point", "coordinates": [102.0, 0.5]}, - "properties": {"prop0": "value0"} - } - ] - }`) - -fc, _ := geojson.UnmarshalFeatureCollection(rawJSON) - -// or - -fc := geojson.NewFeatureCollection() -err := json.Unmarshal(rawJSON, &fc) - -// Geometry will be unmarshalled into the correct geo.Geometry type. -point := fc.Features[0].Geometry.(orb.Point) -``` - -## Marshalling (Go -> JSON) - -```go -fc := geojson.NewFeatureCollection() -fc.Append(geojson.NewFeature(orb.Point{1, 2})) - -rawJSON, _ := fc.MarshalJSON() - -// or -blob, _ := json.Marshal(fc) -``` - -## Foreign/extra members in a feature collection - -```go -rawJSON := []byte(` - { "type": "FeatureCollection", - "generator": "myapp", - "timestamp": "2020-06-15T01:02:03Z", - "features": [ - { "type": "Feature", - "geometry": {"type": "Point", "coordinates": [102.0, 0.5]}, - "properties": {"prop0": "value0"} - } - ] - }`) - -fc, _ := geojson.UnmarshalFeatureCollection(rawJSON) - -fc.ExtraMembers["generator"] // == "myApp" -fc.ExtraMembers["timestamp"] // == "2020-06-15T01:02:03Z" - -// Marshalling will include values in `ExtraMembers` in the -// base featureCollection object. -``` - -## Performance - -For performance critical applications, consider a -third party replacement of "encoding/json" like [github.com/json-iterator/go](https://github.com/json-iterator/go) - -This can be enabled with something like this: - -```go -import ( - jsoniter "github.com/json-iterator/go" - "github.com/paulmach/orb" -) - -var c = jsoniter.Config{ - EscapeHTML: true, - SortMapKeys: false, - MarshalFloatWith6Digits: true, -}.Froze() - -CustomJSONMarshaler = c -CustomJSONUnmarshaler = c -``` - -The above change can have dramatic performance implications, see the benchmarks below -on a 100k feature collection file: - -``` -benchmark old ns/op new ns/op delta -BenchmarkFeatureMarshalJSON-12 2694543 733480 -72.78% -BenchmarkFeatureUnmarshalJSON-12 5383825 2738183 -49.14% -BenchmarkGeometryMarshalJSON-12 210107 62789 -70.12% -BenchmarkGeometryUnmarshalJSON-12 691472 144689 -79.08% - -benchmark old allocs new allocs delta -BenchmarkFeatureMarshalJSON-12 7818 2316 -70.38% -BenchmarkFeatureUnmarshalJSON-12 23047 31946 +38.61% -BenchmarkGeometryMarshalJSON-12 2 3 +50.00% -BenchmarkGeometryUnmarshalJSON-12 2042 18 -99.12% - -benchmark old bytes new bytes delta -BenchmarkFeatureMarshalJSON-12 794088 490251 -38.26% -BenchmarkFeatureUnmarshalJSON-12 766354 1068497 +39.43% -BenchmarkGeometryMarshalJSON-12 24787 18650 -24.76% -BenchmarkGeometryUnmarshalJSON-12 79784 51374 -35.61% -``` - -## Feature Properties - -GeoJSON features can have properties of any type. This can cause issues in a statically typed -language such as Go. Included is a `Properties` type with some helper methods that will try to -force convert a property. An optional default, will be used if the property is missing or the wrong -type. - -```go -f.Properties.MustBool(key string, def ...bool) bool -f.Properties.MustFloat64(key string, def ...float64) float64 -f.Properties.MustInt(key string, def ...int) int -f.Properties.MustString(key string, def ...string) string -``` diff --git a/vendor/github.com/paulmach/orb/geojson/bbox.go b/vendor/github.com/paulmach/orb/geojson/bbox.go deleted file mode 100644 index cd2c45e..0000000 --- a/vendor/github.com/paulmach/orb/geojson/bbox.go +++ /dev/null @@ -1,38 +0,0 @@ -package geojson - -import "github.com/paulmach/orb" - -// BBox is for the geojson bbox attribute which is an array with all axes -// of the most southwesterly point followed by all axes of the more northeasterly point. -type BBox []float64 - -// NewBBox creates a bbox from a a bound. -func NewBBox(b orb.Bound) BBox { - return []float64{ - b.Min[0], b.Min[1], - b.Max[0], b.Max[1], - } -} - -// Valid checks if the bbox is present and has at least 4 elements. -func (bb BBox) Valid() bool { - if bb == nil { - return false - } - - return len(bb) >= 4 && len(bb)%2 == 0 -} - -// Bound returns the orb.Bound for the BBox. -func (bb BBox) Bound() orb.Bound { - if !bb.Valid() { - return orb.Bound{} - } - - mid := len(bb) / 2 - - return orb.Bound{ - Min: orb.Point{bb[0], bb[1]}, - Max: orb.Point{bb[mid], bb[mid+1]}, - } -} diff --git a/vendor/github.com/paulmach/orb/geojson/feature.go b/vendor/github.com/paulmach/orb/geojson/feature.go deleted file mode 100644 index 0dd246d..0000000 --- a/vendor/github.com/paulmach/orb/geojson/feature.go +++ /dev/null @@ -1,138 +0,0 @@ -package geojson - -import ( - "bytes" - "fmt" - - "github.com/paulmach/orb" - "go.mongodb.org/mongo-driver/bson" -) - -// A Feature corresponds to GeoJSON feature object -type Feature struct { - ID interface{} `json:"id,omitempty"` - Type string `json:"type"` - BBox BBox `json:"bbox,omitempty"` - Geometry orb.Geometry `json:"geometry"` - Properties Properties `json:"properties"` -} - -// NewFeature creates and initializes a GeoJSON feature given the required attributes. -func NewFeature(geometry orb.Geometry) *Feature { - return &Feature{ - Type: "Feature", - Geometry: geometry, - Properties: make(map[string]interface{}), - } -} - -// Point implements the orb.Pointer interface so that Features can be used -// with quadtrees. The point returned is the center of the Bound of the geometry. -// To represent the geometry with another point you must create a wrapper type. -func (f *Feature) Point() orb.Point { - return f.Geometry.Bound().Center() -} - -var _ orb.Pointer = &Feature{} - -// MarshalJSON converts the feature object into the proper JSON. -// It will handle the encoding of all the child geometries. -// Alternately one can call json.Marshal(f) directly for the same result. -func (f Feature) MarshalJSON() ([]byte, error) { - return marshalJSON(newFeatureDoc(&f)) -} - -// MarshalBSON converts the feature object into the proper JSON. -// It will handle the encoding of all the child geometries. -// Alternately one can call json.Marshal(f) directly for the same result. -func (f Feature) MarshalBSON() ([]byte, error) { - return bson.Marshal(newFeatureDoc(&f)) -} - -func newFeatureDoc(f *Feature) *featureDoc { - doc := &featureDoc{ - ID: f.ID, - Type: "Feature", - Properties: f.Properties, - BBox: f.BBox, - Geometry: NewGeometry(f.Geometry), - } - - if len(doc.Properties) == 0 { - doc.Properties = nil - } - - return doc -} - -// UnmarshalFeature decodes the data into a GeoJSON feature. -// Alternately one can call json.Unmarshal(f) directly for the same result. -func UnmarshalFeature(data []byte) (*Feature, error) { - f := &Feature{} - err := f.UnmarshalJSON(data) - if err != nil { - return nil, err - } - - return f, nil -} - -// UnmarshalJSON handles the correct unmarshalling of the data -// into the orb.Geometry types. -func (f *Feature) UnmarshalJSON(data []byte) error { - if bytes.Equal(data, []byte(`null`)) { - *f = Feature{} - return nil - } - - doc := &featureDoc{} - err := unmarshalJSON(data, &doc) - if err != nil { - return err - } - - return featureUnmarshalFinish(doc, f) -} - -// UnmarshalBSON will unmarshal a BSON document created with bson.Marshal. -func (f *Feature) UnmarshalBSON(data []byte) error { - doc := &featureDoc{} - err := bson.Unmarshal(data, &doc) - if err != nil { - return err - } - - return featureUnmarshalFinish(doc, f) -} - -func featureUnmarshalFinish(doc *featureDoc, f *Feature) error { - if doc.Type != "Feature" { - return fmt.Errorf("geojson: not a feature: type=%s", doc.Type) - } - - var g orb.Geometry - if doc.Geometry != nil { - if doc.Geometry.Coordinates == nil && doc.Geometry.Geometries == nil { - return ErrInvalidGeometry - } - g = doc.Geometry.Geometry() - } - - *f = Feature{ - ID: doc.ID, - Type: doc.Type, - Properties: doc.Properties, - BBox: doc.BBox, - Geometry: g, - } - - return nil -} - -type featureDoc struct { - ID interface{} `json:"id,omitempty" bson:"id"` - Type string `json:"type" bson:"type"` - BBox BBox `json:"bbox,omitempty" bson:"bbox,omitempty"` - Geometry *Geometry `json:"geometry" bson:"geometry"` - Properties Properties `json:"properties" bson:"properties"` -} diff --git a/vendor/github.com/paulmach/orb/geojson/feature_collection.go b/vendor/github.com/paulmach/orb/geojson/feature_collection.go deleted file mode 100644 index 0235bc5..0000000 --- a/vendor/github.com/paulmach/orb/geojson/feature_collection.go +++ /dev/null @@ -1,197 +0,0 @@ -/* -Package geojson is a library for encoding and decoding GeoJSON into Go structs -using the geometries in the orb package. Supports both the json.Marshaler and -json.Unmarshaler interfaces as well as helper functions such as -`UnmarshalFeatureCollection` and `UnmarshalFeature`. -*/ -package geojson - -import ( - "bytes" - "fmt" - - "go.mongodb.org/mongo-driver/bson" -) - -const featureCollection = "FeatureCollection" - -// A FeatureCollection correlates to a GeoJSON feature collection. -type FeatureCollection struct { - Type string `json:"type"` - BBox BBox `json:"bbox,omitempty"` - Features []*Feature `json:"features"` - - // ExtraMembers can be used to encoded/decode extra key/members in - // the base of the feature collection. Note that keys of "type", "bbox" - // and "features" will not work as those are reserved by the GeoJSON spec. - ExtraMembers Properties `json:"-"` -} - -// NewFeatureCollection creates and initializes a new feature collection. -func NewFeatureCollection() *FeatureCollection { - return &FeatureCollection{ - Type: featureCollection, - Features: []*Feature{}, - } -} - -// Append appends a feature to the collection. -func (fc *FeatureCollection) Append(feature *Feature) *FeatureCollection { - fc.Features = append(fc.Features, feature) - return fc -} - -// MarshalJSON converts the feature collection object into the proper JSON. -// It will handle the encoding of all the child features and geometries. -// Alternately one can call json.Marshal(fc) directly for the same result. -// Items in the ExtraMembers map will be included in the base of the -// feature collection object. -func (fc FeatureCollection) MarshalJSON() ([]byte, error) { - m := newFeatureCollectionDoc(fc) - return marshalJSON(m) -} - -// MarshalBSON converts the feature collection object into a BSON document -// represented by bytes. It will handle the encoding of all the child features -// and geometries. -// Items in the ExtraMembers map will be included in the base of the -// feature collection object. -func (fc FeatureCollection) MarshalBSON() ([]byte, error) { - m := newFeatureCollectionDoc(fc) - return bson.Marshal(m) -} - -func newFeatureCollectionDoc(fc FeatureCollection) map[string]interface{} { - var tmp map[string]interface{} - if fc.ExtraMembers != nil { - tmp = fc.ExtraMembers.Clone() - } else { - tmp = make(map[string]interface{}, 3) - } - - tmp["type"] = featureCollection - delete(tmp, "bbox") - if fc.BBox != nil { - tmp["bbox"] = fc.BBox - } - if fc.Features == nil { - tmp["features"] = []*Feature{} - } else { - tmp["features"] = fc.Features - } - - return tmp -} - -// UnmarshalJSON decodes the data into a GeoJSON feature collection. -// Extra/foreign members will be put into the `ExtraMembers` attribute. -func (fc *FeatureCollection) UnmarshalJSON(data []byte) error { - if bytes.Equal(data, []byte(`null`)) { - *fc = FeatureCollection{} - return nil - } - - tmp := make(map[string]nocopyRawMessage, 4) - - err := unmarshalJSON(data, &tmp) - if err != nil { - return err - } - - *fc = FeatureCollection{} - for key, value := range tmp { - switch key { - case "type": - err := unmarshalJSON(value, &fc.Type) - if err != nil { - return err - } - case "bbox": - err := unmarshalJSON(value, &fc.BBox) - if err != nil { - return err - } - case "features": - err := unmarshalJSON(value, &fc.Features) - if err != nil { - return err - } - default: - if fc.ExtraMembers == nil { - fc.ExtraMembers = Properties{} - } - - var val interface{} - err := unmarshalJSON(value, &val) - if err != nil { - return err - } - fc.ExtraMembers[key] = val - } - } - - if fc.Type != featureCollection { - return fmt.Errorf("geojson: not a feature collection: type=%s", fc.Type) - } - - return nil -} - -// UnmarshalBSON will unmarshal a BSON document created with bson.Marshal. -// Extra/foreign members will be put into the `ExtraMembers` attribute. -func (fc *FeatureCollection) UnmarshalBSON(data []byte) error { - tmp := make(map[string]bson.RawValue, 4) - - err := bson.Unmarshal(data, &tmp) - if err != nil { - return err - } - - *fc = FeatureCollection{} - for key, value := range tmp { - switch key { - case "type": - fc.Type, _ = bson.RawValue(value).StringValueOK() - case "bbox": - err := value.Unmarshal(&fc.BBox) - if err != nil { - return err - } - case "features": - err := value.Unmarshal(&fc.Features) - if err != nil { - return err - } - default: - if fc.ExtraMembers == nil { - fc.ExtraMembers = Properties{} - } - - var val interface{} - err := value.Unmarshal(&val) - if err != nil { - return err - } - fc.ExtraMembers[key] = val - } - } - - if fc.Type != featureCollection { - return fmt.Errorf("geojson: not a feature collection: type=%s", fc.Type) - } - - return nil -} - -// UnmarshalFeatureCollection decodes the data into a GeoJSON feature collection. -// Alternately one can call json.Unmarshal(fc) directly for the same result. -func UnmarshalFeatureCollection(data []byte) (*FeatureCollection, error) { - fc := &FeatureCollection{} - - err := fc.UnmarshalJSON(data) - if err != nil { - return nil, err - } - - return fc, nil -} diff --git a/vendor/github.com/paulmach/orb/geojson/geometry.go b/vendor/github.com/paulmach/orb/geojson/geometry.go deleted file mode 100644 index 1524521..0000000 --- a/vendor/github.com/paulmach/orb/geojson/geometry.go +++ /dev/null @@ -1,586 +0,0 @@ -package geojson - -import ( - "errors" - - "github.com/paulmach/orb" - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/bson/bsontype" -) - -// ErrInvalidGeometry will be returned if a the json of the geometry is invalid. -var ErrInvalidGeometry = errors.New("geojson: invalid geometry") - -// A Geometry matches the structure of a GeoJSON Geometry. -type Geometry struct { - Type string `json:"type"` - Coordinates orb.Geometry `json:"coordinates,omitempty"` - Geometries []*Geometry `json:"geometries,omitempty"` -} - -// NewGeometry will create a Geometry object but will convert -// the input into a GoeJSON geometry. For example, it will convert -// Rings and Bounds into Polygons. -func NewGeometry(g orb.Geometry) *Geometry { - jg := &Geometry{} - switch g := g.(type) { - case orb.Ring: - jg.Coordinates = orb.Polygon{g} - case orb.Bound: - jg.Coordinates = g.ToPolygon() - case orb.Collection: - for _, c := range g { - jg.Geometries = append(jg.Geometries, NewGeometry(c)) - } - jg.Type = g.GeoJSONType() - default: - jg.Coordinates = g - } - - if jg.Coordinates != nil { - jg.Type = jg.Coordinates.GeoJSONType() - } - return jg -} - -// Geometry returns the orb.Geometry for the geojson Geometry. -// This will convert the "Geometries" into a orb.Collection if applicable. -func (g *Geometry) Geometry() orb.Geometry { - if g.Coordinates != nil { - return g.Coordinates - } - - c := make(orb.Collection, 0, len(g.Geometries)) - for _, geom := range g.Geometries { - c = append(c, geom.Geometry()) - } - return c -} - -// MarshalJSON will marshal the geometry into the correct JSON structure. -func (g *Geometry) MarshalJSON() ([]byte, error) { - if g.Coordinates == nil && len(g.Geometries) == 0 { - return []byte(`null`), nil - } - - ng := newGeometryMarshallDoc(g) - return marshalJSON(ng) -} - -// MarshalBSON will convert the geometry into a BSON document with the structure -// of a GeoJSON Geometry. This function is used when the geometry is the top level -// document to be marshalled. -func (g *Geometry) MarshalBSON() ([]byte, error) { - ng := newGeometryMarshallDoc(g) - return bson.Marshal(ng) -} - -// MarshalBSONValue will marshal the geometry into a BSON value -// with the structure of a GeoJSON Geometry. -func (g *Geometry) MarshalBSONValue() (bsontype.Type, []byte, error) { - // implementing MarshalBSONValue allows us to marshal into a null value - // needed to match behavior with the JSON marshalling. - - if g.Coordinates == nil && len(g.Geometries) == 0 { - return bsontype.Null, nil, nil - } - - ng := newGeometryMarshallDoc(g) - return bson.MarshalValue(ng) -} - -func newGeometryMarshallDoc(g *Geometry) *geometryMarshallDoc { - ng := &geometryMarshallDoc{} - switch g := g.Coordinates.(type) { - case orb.Ring: - ng.Coordinates = orb.Polygon{g} - case orb.Bound: - ng.Coordinates = g.ToPolygon() - case orb.Collection: - ng.Geometries = make([]*Geometry, 0, len(g)) - for _, c := range g { - ng.Geometries = append(ng.Geometries, NewGeometry(c)) - } - ng.Type = g.GeoJSONType() - default: - ng.Coordinates = g - } - - if ng.Coordinates != nil { - ng.Type = ng.Coordinates.GeoJSONType() - } - - if len(g.Geometries) > 0 { - ng.Geometries = g.Geometries - ng.Type = orb.Collection{}.GeoJSONType() - } - - return ng -} - -// UnmarshalGeometry decodes the JSON data into a GeoJSON feature. -// Alternately one can call json.Unmarshal(g) directly for the same result. -func UnmarshalGeometry(data []byte) (*Geometry, error) { - g := &Geometry{} - err := unmarshalJSON(data, g) - if err != nil { - return nil, err - } - - return g, nil -} - -// UnmarshalJSON will unmarshal the correct geometry from the JSON structure. -func (g *Geometry) UnmarshalJSON(data []byte) error { - jg := &jsonGeometry{} - err := unmarshalJSON(data, jg) - if err != nil { - return err - } - - switch jg.Type { - case "Point": - p := orb.Point{} - err = unmarshalJSON(jg.Coordinates, &p) - if err != nil { - return err - } - g.Coordinates = p - case "MultiPoint": - mp := orb.MultiPoint{} - err = unmarshalJSON(jg.Coordinates, &mp) - if err != nil { - return err - } - g.Coordinates = mp - case "LineString": - ls := orb.LineString{} - err = unmarshalJSON(jg.Coordinates, &ls) - if err != nil { - return err - } - g.Coordinates = ls - case "MultiLineString": - mls := orb.MultiLineString{} - err = unmarshalJSON(jg.Coordinates, &mls) - if err != nil { - return err - } - g.Coordinates = mls - case "Polygon": - p := orb.Polygon{} - err = unmarshalJSON(jg.Coordinates, &p) - if err != nil { - return err - } - g.Coordinates = p - case "MultiPolygon": - mp := orb.MultiPolygon{} - err = unmarshalJSON(jg.Coordinates, &mp) - if err != nil { - return err - } - g.Coordinates = mp - case "GeometryCollection": - g.Geometries = jg.Geometries - default: - return ErrInvalidGeometry - } - - g.Type = g.Geometry().GeoJSONType() - - return nil -} - -// UnmarshalBSON will unmarshal a BSON document created with bson.Marshal. -func (g *Geometry) UnmarshalBSON(data []byte) error { - bg := &bsonGeometry{} - err := bson.Unmarshal(data, bg) - if err != nil { - return err - } - - switch bg.Type { - case "Point": - p := orb.Point{} - err = bg.Coordinates.Unmarshal(&p) - if err != nil { - return err - } - g.Coordinates = p - case "MultiPoint": - mp := orb.MultiPoint{} - err = bg.Coordinates.Unmarshal(&mp) - if err != nil { - return err - } - g.Coordinates = mp - case "LineString": - ls := orb.LineString{} - - err = bg.Coordinates.Unmarshal(&ls) - if err != nil { - return err - } - g.Coordinates = ls - case "MultiLineString": - mls := orb.MultiLineString{} - err = bg.Coordinates.Unmarshal(&mls) - if err != nil { - return err - } - g.Coordinates = mls - case "Polygon": - p := orb.Polygon{} - err = bg.Coordinates.Unmarshal(&p) - if err != nil { - return err - } - g.Coordinates = p - case "MultiPolygon": - mp := orb.MultiPolygon{} - err = bg.Coordinates.Unmarshal(&mp) - if err != nil { - return err - } - g.Coordinates = mp - case "GeometryCollection": - g.Geometries = bg.Geometries - default: - return ErrInvalidGeometry - } - - g.Type = g.Geometry().GeoJSONType() - - return nil -} - -// A Point is a helper type that will marshal to/from a GeoJSON Point geometry. -type Point orb.Point - -// Geometry will return the orb.Geometry version of the data. -func (p Point) Geometry() orb.Geometry { - return orb.Point(p) -} - -// MarshalJSON will convert the Point into a GeoJSON Point geometry. -func (p Point) MarshalJSON() ([]byte, error) { - return marshalJSON(&Geometry{Coordinates: orb.Point(p)}) -} - -// MarshalBSON will convert the Point into a BSON value following the GeoJSON Point structure. -func (p Point) MarshalBSON() ([]byte, error) { - return bson.Marshal(&Geometry{Coordinates: orb.Point(p)}) -} - -// UnmarshalJSON will unmarshal the GeoJSON Point geometry. -func (p *Point) UnmarshalJSON(data []byte) error { - g := &Geometry{} - err := unmarshalJSON(data, &g) - if err != nil { - return err - } - - point, ok := g.Coordinates.(orb.Point) - if !ok { - return errors.New("geojson: not a Point type") - } - - *p = Point(point) - return nil -} - -// UnmarshalBSON will unmarshal GeoJSON Point geometry. -func (p *Point) UnmarshalBSON(data []byte) error { - g := &Geometry{} - err := bson.Unmarshal(data, &g) - if err != nil { - return err - } - - point, ok := g.Coordinates.(orb.Point) - if !ok { - return errors.New("geojson: not a Point type") - } - - *p = Point(point) - return nil -} - -// A MultiPoint is a helper type that will marshal to/from a GeoJSON MultiPoint geometry. -type MultiPoint orb.MultiPoint - -// Geometry will return the orb.Geometry version of the data. -func (mp MultiPoint) Geometry() orb.Geometry { - return orb.MultiPoint(mp) -} - -// MarshalJSON will convert the MultiPoint into a GeoJSON MultiPoint geometry. -func (mp MultiPoint) MarshalJSON() ([]byte, error) { - return marshalJSON(&Geometry{Coordinates: orb.MultiPoint(mp)}) -} - -// MarshalBSON will convert the MultiPoint into a GeoJSON MultiPoint geometry BSON. -func (mp MultiPoint) MarshalBSON() ([]byte, error) { - return bson.Marshal(&Geometry{Coordinates: orb.MultiPoint(mp)}) -} - -// UnmarshalJSON will unmarshal the GeoJSON MultiPoint geometry. -func (mp *MultiPoint) UnmarshalJSON(data []byte) error { - g := &Geometry{} - err := unmarshalJSON(data, &g) - if err != nil { - return err - } - - multiPoint, ok := g.Coordinates.(orb.MultiPoint) - if !ok { - return errors.New("geojson: not a MultiPoint type") - } - - *mp = MultiPoint(multiPoint) - return nil -} - -// UnmarshalBSON will unmarshal the GeoJSON MultiPoint geometry. -func (mp *MultiPoint) UnmarshalBSON(data []byte) error { - g := &Geometry{} - err := bson.Unmarshal(data, &g) - if err != nil { - return err - } - - multiPoint, ok := g.Coordinates.(orb.MultiPoint) - if !ok { - return errors.New("geojson: not a MultiPoint type") - } - - *mp = MultiPoint(multiPoint) - return nil -} - -// A LineString is a helper type that will marshal to/from a GeoJSON LineString geometry. -type LineString orb.LineString - -// Geometry will return the orb.Geometry version of the data. -func (ls LineString) Geometry() orb.Geometry { - return orb.LineString(ls) -} - -// MarshalJSON will convert the LineString into a GeoJSON LineString geometry. -func (ls LineString) MarshalJSON() ([]byte, error) { - return marshalJSON(&Geometry{Coordinates: orb.LineString(ls)}) -} - -// MarshalBSON will convert the LineString into a GeoJSON LineString geometry. -func (ls LineString) MarshalBSON() ([]byte, error) { - return bson.Marshal(&Geometry{Coordinates: orb.LineString(ls)}) -} - -// UnmarshalJSON will unmarshal the GeoJSON MultiPoint geometry. -func (ls *LineString) UnmarshalJSON(data []byte) error { - g := &Geometry{} - err := unmarshalJSON(data, &g) - if err != nil { - return err - } - - lineString, ok := g.Coordinates.(orb.LineString) - if !ok { - return errors.New("geojson: not a LineString type") - } - - *ls = LineString(lineString) - return nil -} - -// UnmarshalBSON will unmarshal the GeoJSON MultiPoint geometry. -func (ls *LineString) UnmarshalBSON(data []byte) error { - g := &Geometry{} - err := bson.Unmarshal(data, &g) - if err != nil { - return err - } - - lineString, ok := g.Coordinates.(orb.LineString) - if !ok { - return errors.New("geojson: not a LineString type") - } - - *ls = LineString(lineString) - return nil -} - -// A MultiLineString is a helper type that will marshal to/from a GeoJSON MultiLineString geometry. -type MultiLineString orb.MultiLineString - -// Geometry will return the orb.Geometry version of the data. -func (mls MultiLineString) Geometry() orb.Geometry { - return orb.MultiLineString(mls) -} - -// MarshalJSON will convert the MultiLineString into a GeoJSON MultiLineString geometry. -func (mls MultiLineString) MarshalJSON() ([]byte, error) { - return marshalJSON(&Geometry{Coordinates: orb.MultiLineString(mls)}) -} - -// MarshalBSON will convert the MultiLineString into a GeoJSON MultiLineString geometry. -func (mls MultiLineString) MarshalBSON() ([]byte, error) { - return bson.Marshal(&Geometry{Coordinates: orb.MultiLineString(mls)}) -} - -// UnmarshalJSON will unmarshal the GeoJSON MultiPoint geometry. -func (mls *MultiLineString) UnmarshalJSON(data []byte) error { - g := &Geometry{} - err := unmarshalJSON(data, &g) - if err != nil { - return err - } - - multilineString, ok := g.Coordinates.(orb.MultiLineString) - if !ok { - return errors.New("geojson: not a MultiLineString type") - } - - *mls = MultiLineString(multilineString) - return nil -} - -// UnmarshalBSON will unmarshal the GeoJSON MultiPoint geometry. -func (mls *MultiLineString) UnmarshalBSON(data []byte) error { - g := &Geometry{} - err := bson.Unmarshal(data, &g) - if err != nil { - return err - } - - multilineString, ok := g.Coordinates.(orb.MultiLineString) - if !ok { - return errors.New("geojson: not a MultiLineString type") - } - - *mls = MultiLineString(multilineString) - return nil -} - -// A Polygon is a helper type that will marshal to/from a GeoJSON Polygon geometry. -type Polygon orb.Polygon - -// Geometry will return the orb.Geometry version of the data. -func (p Polygon) Geometry() orb.Geometry { - return orb.Polygon(p) -} - -// MarshalJSON will convert the Polygon into a GeoJSON Polygon geometry. -func (p Polygon) MarshalJSON() ([]byte, error) { - return marshalJSON(&Geometry{Coordinates: orb.Polygon(p)}) -} - -// MarshalBSON will convert the Polygon into a GeoJSON Polygon geometry. -func (p Polygon) MarshalBSON() ([]byte, error) { - return bson.Marshal(&Geometry{Coordinates: orb.Polygon(p)}) -} - -// UnmarshalJSON will unmarshal the GeoJSON Polygon geometry. -func (p *Polygon) UnmarshalJSON(data []byte) error { - g := &Geometry{} - err := unmarshalJSON(data, &g) - if err != nil { - return err - } - - polygon, ok := g.Coordinates.(orb.Polygon) - if !ok { - return errors.New("geojson: not a Polygon type") - } - - *p = Polygon(polygon) - return nil -} - -// UnmarshalBSON will unmarshal the GeoJSON Polygon geometry. -func (p *Polygon) UnmarshalBSON(data []byte) error { - g := &Geometry{} - err := bson.Unmarshal(data, &g) - if err != nil { - return err - } - - polygon, ok := g.Coordinates.(orb.Polygon) - if !ok { - return errors.New("geojson: not a Polygon type") - } - - *p = Polygon(polygon) - return nil -} - -// A MultiPolygon is a helper type that will marshal to/from a GeoJSON MultiPolygon geometry. -type MultiPolygon orb.MultiPolygon - -// Geometry will return the orb.Geometry version of the data. -func (mp MultiPolygon) Geometry() orb.Geometry { - return orb.MultiPolygon(mp) -} - -// MarshalJSON will convert the MultiPolygon into a GeoJSON MultiPolygon geometry. -func (mp MultiPolygon) MarshalJSON() ([]byte, error) { - return marshalJSON(&Geometry{Coordinates: orb.MultiPolygon(mp)}) -} - -// MarshalBSON will convert the MultiPolygon into a GeoJSON MultiPolygon geometry. -func (mp MultiPolygon) MarshalBSON() ([]byte, error) { - return bson.Marshal(&Geometry{Coordinates: orb.MultiPolygon(mp)}) -} - -// UnmarshalJSON will unmarshal the GeoJSON MultiPolygon geometry. -func (mp *MultiPolygon) UnmarshalJSON(data []byte) error { - g := &Geometry{} - err := unmarshalJSON(data, &g) - if err != nil { - return err - } - - multiPolygon, ok := g.Coordinates.(orb.MultiPolygon) - if !ok { - return errors.New("geojson: not a MultiPolygon type") - } - - *mp = MultiPolygon(multiPolygon) - return nil -} - -// UnmarshalBSON will unmarshal the GeoJSON MultiPolygon geometry. -func (mp *MultiPolygon) UnmarshalBSON(data []byte) error { - g := &Geometry{} - err := bson.Unmarshal(data, &g) - if err != nil { - return err - } - - multiPolygon, ok := g.Coordinates.(orb.MultiPolygon) - if !ok { - return errors.New("geojson: not a MultiPolygon type") - } - - *mp = MultiPolygon(multiPolygon) - return nil -} - -type bsonGeometry struct { - Type string `json:"type" bson:"type"` - Coordinates bson.RawValue `json:"coordinates" bson:"coordinates"` - Geometries []*Geometry `json:"geometries,omitempty" bson:"geometries"` -} - -type jsonGeometry struct { - Type string `json:"type"` - Coordinates nocopyRawMessage `json:"coordinates"` - Geometries []*Geometry `json:"geometries,omitempty"` -} - -type geometryMarshallDoc struct { - Type string `json:"type" bson:"type"` - Coordinates orb.Geometry `json:"coordinates,omitempty" bson:"coordinates,omitempty"` - Geometries []*Geometry `json:"geometries,omitempty" bson:"geometries,omitempty"` -} diff --git a/vendor/github.com/paulmach/orb/geojson/json.go b/vendor/github.com/paulmach/orb/geojson/json.go deleted file mode 100644 index 7b8d654..0000000 --- a/vendor/github.com/paulmach/orb/geojson/json.go +++ /dev/null @@ -1,74 +0,0 @@ -package geojson - -import "encoding/json" - -// CustomJSONMarshaler can be set to have the code use a different -// json marshaler than the default in the standard library. -// One use case in enabling `github.com/json-iterator/go` -// with something like this: -// -// import ( -// jsoniter "github.com/json-iterator/go" -// "github.com/paulmach/orb" -// ) -// -// var c = jsoniter.Config{ -// EscapeHTML: true, -// SortMapKeys: false, -// MarshalFloatWith6Digits: true, -// }.Froze() -// -// orb.CustomJSONMarshaler = c -// orb.CustomJSONUnmarshaler = c -// -// Note that any errors encountered during marshaling will be different. -var CustomJSONMarshaler interface { - Marshal(v interface{}) ([]byte, error) -} = nil - -// CustomJSONUnmarshaler can be set to have the code use a different -// json unmarshaler than the default in the standard library. -// One use case in enabling `github.com/json-iterator/go` -// with something like this: -// -// import ( -// jsoniter "github.com/json-iterator/go" -// "github.com/paulmach/orb" -// ) -// -// var c = jsoniter.Config{ -// EscapeHTML: true, -// SortMapKeys: false, -// MarshalFloatWith6Digits: true, -// }.Froze() -// -// orb.CustomJSONMarshaler = c -// orb.CustomJSONUnmarshaler = c -// -// Note that any errors encountered during unmarshaling will be different. -var CustomJSONUnmarshaler interface { - Unmarshal(data []byte, v interface{}) error -} = nil - -func marshalJSON(v interface{}) ([]byte, error) { - if CustomJSONMarshaler == nil { - return json.Marshal(v) - } - - return CustomJSONMarshaler.Marshal(v) -} - -func unmarshalJSON(data []byte, v interface{}) error { - if CustomJSONUnmarshaler == nil { - return json.Unmarshal(data, v) - } - - return CustomJSONUnmarshaler.Unmarshal(data, v) -} - -type nocopyRawMessage []byte - -func (m *nocopyRawMessage) UnmarshalJSON(data []byte) error { - *m = data - return nil -} diff --git a/vendor/github.com/paulmach/orb/geojson/properties.go b/vendor/github.com/paulmach/orb/geojson/properties.go deleted file mode 100644 index 0e0eca9..0000000 --- a/vendor/github.com/paulmach/orb/geojson/properties.go +++ /dev/null @@ -1,112 +0,0 @@ -package geojson - -import "fmt" - -// Properties defines the feature properties with some helper methods. -type Properties map[string]interface{} - -// MustBool guarantees the return of a `bool` (with optional default). -// This function useful when you explicitly want a `bool` in a single -// value return context, for example: -// myFunc(f.Properties.MustBool("param1"), f.Properties.MustBool("optional_param", true)) -// This function will panic if the value is present but not a bool. -func (p Properties) MustBool(key string, def ...bool) bool { - v := p[key] - if b, ok := v.(bool); ok { - return b - } - - if v != nil { - panic(fmt.Sprintf("not a bool, but a %T: %v", v, v)) - } - - if len(def) > 0 { - return def[0] - } - - panic("property not found") -} - -// MustInt guarantees the return of an `int` (with optional default). -// This function useful when you explicitly want a `int` in a single -// value return context, for example: -// myFunc(f.Properties.MustInt("param1"), f.Properties.MustInt("optional_param", 123)) -// This function will panic if the value is present but not a number. -func (p Properties) MustInt(key string, def ...int) int { - v := p[key] - if i, ok := v.(int); ok { - return i - } - - if f, ok := v.(float64); ok { - return int(f) - } - - if v != nil { - panic(fmt.Sprintf("not a number, but a %T: %v", v, v)) - } - - if len(def) > 0 { - return def[0] - } - - panic("property not found") -} - -// MustFloat64 guarantees the return of a `float64` (with optional default) -// This function useful when you explicitly want a `float64` in a single -// value return context, for example: -// myFunc(f.Properties.MustFloat64("param1"), f.Properties.MustFloat64("optional_param", 10.1)) -// This function will panic if the value is present but not a number. -func (p Properties) MustFloat64(key string, def ...float64) float64 { - v := p[key] - if f, ok := v.(float64); ok { - return f - } - - if i, ok := v.(int); ok { - return float64(i) - } - - if v != nil { - panic(fmt.Sprintf("not a number, but a %T: %v", v, v)) - } - - if len(def) > 0 { - return def[0] - } - - panic("property not found") -} - -// MustString guarantees the return of a `string` (with optional default) -// This function useful when you explicitly want a `string` in a single -// value return context, for example: -// myFunc(f.Properties.MustString("param1"), f.Properties.MustString("optional_param", "default")) -// This function will panic if the value is present but not a string. -func (p Properties) MustString(key string, def ...string) string { - v := p[key] - if s, ok := v.(string); ok { - return s - } - - if v != nil { - panic(fmt.Sprintf("not a string, but a %T: %v", v, v)) - } - - if len(def) > 0 { - return def[0] - } - - panic("property not found") -} - -// Clone returns a shallow copy of the properties. -func (p Properties) Clone() Properties { - n := make(Properties, len(p)+3) - for k, v := range p { - n[k] = v - } - - return n -} diff --git a/vendor/github.com/paulmach/orb/geojson/types.go b/vendor/github.com/paulmach/orb/geojson/types.go deleted file mode 100644 index 7a6a7e7..0000000 --- a/vendor/github.com/paulmach/orb/geojson/types.go +++ /dev/null @@ -1,11 +0,0 @@ -package geojson - -// A list of the geojson types that are currently supported. -const ( - TypePoint = "Point" - TypeMultiPoint = "MultiPoint" - TypeLineString = "LineString" - TypeMultiLineString = "MultiLineString" - TypePolygon = "Polygon" - TypeMultiPolygon = "MultiPolygon" -) diff --git a/vendor/github.com/paulmach/orb/geometry.go b/vendor/github.com/paulmach/orb/geometry.go deleted file mode 100644 index a15e36b..0000000 --- a/vendor/github.com/paulmach/orb/geometry.go +++ /dev/null @@ -1,146 +0,0 @@ -package orb - -// Geometry is an interface that represents the shared attributes -// of a geometry. -type Geometry interface { - GeoJSONType() string - Dimensions() int // e.g. 0d, 1d, 2d - Bound() Bound - - // requiring because sub package type switch over all possible types. - private() -} - -// compile time checks -var ( - _ Geometry = Point{} - _ Geometry = MultiPoint{} - _ Geometry = LineString{} - _ Geometry = MultiLineString{} - _ Geometry = Ring{} - _ Geometry = Polygon{} - _ Geometry = MultiPolygon{} - _ Geometry = Bound{} - - _ Geometry = Collection{} -) - -func (p Point) private() {} -func (mp MultiPoint) private() {} -func (ls LineString) private() {} -func (mls MultiLineString) private() {} -func (r Ring) private() {} -func (p Polygon) private() {} -func (mp MultiPolygon) private() {} -func (b Bound) private() {} -func (c Collection) private() {} - -// AllGeometries lists all possible types and values that a geometry -// interface can be. It should be used only for testing to verify -// functions that accept a Geometry will work in all cases. -var AllGeometries = []Geometry{ - nil, - Point{}, - MultiPoint{}, - LineString{}, - MultiLineString{}, - Ring{}, - Polygon{}, - MultiPolygon{}, - Bound{}, - Collection{}, - - // nil values - MultiPoint(nil), - LineString(nil), - MultiLineString(nil), - Ring(nil), - Polygon(nil), - MultiPolygon(nil), - Collection(nil), - - // Collection of Collection - Collection{Collection{Point{}}}, -} - -// A Collection is a collection of geometries that is also a Geometry. -type Collection []Geometry - -// GeoJSONType returns the geometry collection type. -func (c Collection) GeoJSONType() string { - return "GeometryCollection" -} - -// Dimensions returns the max of the dimensions of the collection. -func (c Collection) Dimensions() int { - max := -1 - for _, g := range c { - if d := g.Dimensions(); d > max { - max = d - } - } - - return max -} - -// Bound returns the bounding box of all the Geometries combined. -func (c Collection) Bound() Bound { - if len(c) == 0 { - return emptyBound - } - - var b Bound - start := -1 - - for i, g := range c { - if g != nil { - start = i - b = g.Bound() - break - } - } - - if start == -1 { - return emptyBound - } - - for i := start + 1; i < len(c); i++ { - if c[i] == nil { - continue - } - - b = b.Union(c[i].Bound()) - } - - return b -} - -// Equal compares two collections. Returns true if lengths are the same -// and all the sub geometries are the same and in the same order. -func (c Collection) Equal(collection Collection) bool { - if len(c) != len(collection) { - return false - } - - for i, g := range c { - if !Equal(g, collection[i]) { - return false - } - } - - return true -} - -// Clone returns a deep copy of the collection. -func (c Collection) Clone() Collection { - if c == nil { - return nil - } - - nc := make(Collection, len(c)) - for i, g := range c { - nc[i] = Clone(g) - } - - return nc -} diff --git a/vendor/github.com/paulmach/orb/internal/length/length.go b/vendor/github.com/paulmach/orb/internal/length/length.go deleted file mode 100644 index 62e5f50..0000000 --- a/vendor/github.com/paulmach/orb/internal/length/length.go +++ /dev/null @@ -1,71 +0,0 @@ -package length - -import ( - "fmt" - - "github.com/paulmach/orb" -) - -// Length returns the length of the boundary of the geometry -// using 2d euclidean geometry. -func Length(g orb.Geometry, df orb.DistanceFunc) float64 { - if g == nil { - return 0 - } - - switch g := g.(type) { - case orb.Point: - return 0 - case orb.MultiPoint: - return 0 - case orb.LineString: - return lineStringLength(g, df) - case orb.MultiLineString: - sum := 0.0 - for _, ls := range g { - sum += lineStringLength(ls, df) - } - - return sum - case orb.Ring: - return lineStringLength(orb.LineString(g), df) - case orb.Polygon: - return polygonLength(g, df) - case orb.MultiPolygon: - sum := 0.0 - for _, p := range g { - sum += polygonLength(p, df) - } - - return sum - case orb.Collection: - sum := 0.0 - for _, c := range g { - sum += Length(c, df) - } - - return sum - case orb.Bound: - return Length(g.ToRing(), df) - } - - panic(fmt.Sprintf("geometry type not supported: %T", g)) -} - -func lineStringLength(ls orb.LineString, df orb.DistanceFunc) float64 { - sum := 0.0 - for i := 1; i < len(ls); i++ { - sum += df(ls[i], ls[i-1]) - } - - return sum -} - -func polygonLength(p orb.Polygon, df orb.DistanceFunc) float64 { - sum := 0.0 - for _, r := range p { - sum += lineStringLength(orb.LineString(r), df) - } - - return sum -} diff --git a/vendor/github.com/paulmach/orb/line_string.go b/vendor/github.com/paulmach/orb/line_string.go deleted file mode 100644 index 6f48939..0000000 --- a/vendor/github.com/paulmach/orb/line_string.go +++ /dev/null @@ -1,40 +0,0 @@ -package orb - -// LineString represents a set of points to be thought of as a polyline. -type LineString []Point - -// GeoJSONType returns the GeoJSON type for the object. -func (ls LineString) GeoJSONType() string { - return "LineString" -} - -// Dimensions returns 1 because a LineString is a 1d object. -func (ls LineString) Dimensions() int { - return 1 -} - -// Reverse will reverse the line string. -// This is done inplace, ie. it modifies the original data. -func (ls LineString) Reverse() { - l := len(ls) - 1 - for i := 0; i <= l/2; i++ { - ls[i], ls[l-i] = ls[l-i], ls[i] - } -} - -// Bound returns a rect around the line string. Uses rectangular coordinates. -func (ls LineString) Bound() Bound { - return MultiPoint(ls).Bound() -} - -// Equal compares two line strings. Returns true if lengths are the same -// and all points are Equal. -func (ls LineString) Equal(lineString LineString) bool { - return MultiPoint(ls).Equal(MultiPoint(lineString)) -} - -// Clone returns a new copy of the line string. -func (ls LineString) Clone() LineString { - ps := MultiPoint(ls) - return LineString(ps.Clone()) -} diff --git a/vendor/github.com/paulmach/orb/multi_line_string.go b/vendor/github.com/paulmach/orb/multi_line_string.go deleted file mode 100644 index 2b67f20..0000000 --- a/vendor/github.com/paulmach/orb/multi_line_string.go +++ /dev/null @@ -1,58 +0,0 @@ -package orb - -// MultiLineString is a set of polylines. -type MultiLineString []LineString - -// GeoJSONType returns the GeoJSON type for the object. -func (mls MultiLineString) GeoJSONType() string { - return "MultiLineString" -} - -// Dimensions returns 1 because a MultiLineString is a 2d object. -func (mls MultiLineString) Dimensions() int { - return 1 -} - -// Bound returns a bound around all the line strings. -func (mls MultiLineString) Bound() Bound { - if len(mls) == 0 { - return emptyBound - } - - bound := mls[0].Bound() - for i := 1; i < len(mls); i++ { - bound = bound.Union(mls[i].Bound()) - } - - return bound -} - -// Equal compares two multi line strings. Returns true if lengths are the same -// and all points are Equal. -func (mls MultiLineString) Equal(multiLineString MultiLineString) bool { - if len(mls) != len(multiLineString) { - return false - } - - for i, ls := range mls { - if !ls.Equal(multiLineString[i]) { - return false - } - } - - return true -} - -// Clone returns a new deep copy of the multi line string. -func (mls MultiLineString) Clone() MultiLineString { - if mls == nil { - return nil - } - - nmls := make(MultiLineString, 0, len(mls)) - for _, ls := range mls { - nmls = append(nmls, ls.Clone()) - } - - return nmls -} diff --git a/vendor/github.com/paulmach/orb/multi_point.go b/vendor/github.com/paulmach/orb/multi_point.go deleted file mode 100644 index cee955c..0000000 --- a/vendor/github.com/paulmach/orb/multi_point.go +++ /dev/null @@ -1,56 +0,0 @@ -package orb - -// A MultiPoint represents a set of points in the 2D Eucledian or Cartesian plane. -type MultiPoint []Point - -// GeoJSONType returns the GeoJSON type for the object. -func (mp MultiPoint) GeoJSONType() string { - return "MultiPoint" -} - -// Dimensions returns 0 because a MultiPoint is a 0d object. -func (mp MultiPoint) Dimensions() int { - return 0 -} - -// Clone returns a new copy of the points. -func (mp MultiPoint) Clone() MultiPoint { - if mp == nil { - return nil - } - - points := make([]Point, len(mp)) - copy(points, mp) - - return MultiPoint(points) -} - -// Bound returns a bound around the points. Uses rectangular coordinates. -func (mp MultiPoint) Bound() Bound { - if len(mp) == 0 { - return emptyBound - } - - b := Bound{mp[0], mp[0]} - for _, p := range mp { - b = b.Extend(p) - } - - return b -} - -// Equal compares two MultiPoint objects. Returns true if lengths are the same -// and all points are Equal, and in the same order. -func (mp MultiPoint) Equal(multiPoint MultiPoint) bool { - if len(mp) != len(multiPoint) { - return false - } - - for i := range mp { - if !mp[i].Equal(multiPoint[i]) { - return false - } - } - - return true -} diff --git a/vendor/github.com/paulmach/orb/multi_polygon.go b/vendor/github.com/paulmach/orb/multi_polygon.go deleted file mode 100644 index 938a9a9..0000000 --- a/vendor/github.com/paulmach/orb/multi_polygon.go +++ /dev/null @@ -1,56 +0,0 @@ -package orb - -// MultiPolygon is a set of polygons. -type MultiPolygon []Polygon - -// GeoJSONType returns the GeoJSON type for the object. -func (mp MultiPolygon) GeoJSONType() string { - return "MultiPolygon" -} - -// Dimensions returns 2 because a MultiPolygon is a 2d object. -func (mp MultiPolygon) Dimensions() int { - return 2 -} - -// Bound returns a bound around the multi-polygon. -func (mp MultiPolygon) Bound() Bound { - if len(mp) == 0 { - return emptyBound - } - bound := mp[0].Bound() - for i := 1; i < len(mp); i++ { - bound = bound.Union(mp[i].Bound()) - } - - return bound -} - -// Equal compares two multi-polygons. -func (mp MultiPolygon) Equal(multiPolygon MultiPolygon) bool { - if len(mp) != len(multiPolygon) { - return false - } - - for i, p := range mp { - if !p.Equal(multiPolygon[i]) { - return false - } - } - - return true -} - -// Clone returns a new deep copy of the multi-polygon. -func (mp MultiPolygon) Clone() MultiPolygon { - if mp == nil { - return nil - } - - nmp := make(MultiPolygon, 0, len(mp)) - for _, p := range mp { - nmp = append(nmp, p.Clone()) - } - - return nmp -} diff --git a/vendor/github.com/paulmach/orb/planar/README.md b/vendor/github.com/paulmach/orb/planar/README.md deleted file mode 100644 index b62a215..0000000 --- a/vendor/github.com/paulmach/orb/planar/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# orb/planar [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/planar) - -The geometries defined in the `orb` package are generic 2d geometries. -Depending on what projection they're in, e.g. lon/lat or flat on the plane, -area and distance calculations are different. This package implements methods -that assume the planar or Euclidean context. - -## Examples - -Area of 3-4-5 triangle: - -```go -r := orb.Ring{{0, 0}, {3, 0}, {0, 4}, {0, 0}} -a := planar.Area(r) - -fmt.Println(a) -// Output: -// 6 -``` - -Distance between two points: - -```go -d := planar.Distance(orb.Point{0, 0}, orb.Point{3, 4}) - -fmt.Println(d) -// Output: -// 5 -``` - -Length/circumference of a 3-4-5 triangle: - -```go -r := orb.Ring{{0, 0}, {3, 0}, {0, 4}, {0, 0}} -l := planar.Length(r) - -fmt.Println(l) -// Output: -// 12 -``` diff --git a/vendor/github.com/paulmach/orb/planar/area.go b/vendor/github.com/paulmach/orb/planar/area.go deleted file mode 100644 index 0482bbd..0000000 --- a/vendor/github.com/paulmach/orb/planar/area.go +++ /dev/null @@ -1,284 +0,0 @@ -// Package planar computes properties on geometries assuming they are -// in 2d euclidean space. -package planar - -import ( - "fmt" - "math" - - "github.com/paulmach/orb" -) - -// Area returns the area of the geometry in the 2d plane. -func Area(g orb.Geometry) float64 { - // TODO: make faster non-centroid version. - _, a := CentroidArea(g) - return a -} - -// CentroidArea returns both the centroid and the area in the 2d plane. -// Since the area is need for the centroid, return both. -// Polygon area will always be >= zero. Ring area my be negative if it has -// a clockwise winding orider. -func CentroidArea(g orb.Geometry) (orb.Point, float64) { - if g == nil { - return orb.Point{}, 0 - } - - switch g := g.(type) { - case orb.Point: - return multiPointCentroid(orb.MultiPoint{g}), 0 - case orb.MultiPoint: - return multiPointCentroid(g), 0 - case orb.LineString: - return multiLineStringCentroid(orb.MultiLineString{g}), 0 - case orb.MultiLineString: - return multiLineStringCentroid(g), 0 - case orb.Ring: - return ringCentroidArea(g) - case orb.Polygon: - return polygonCentroidArea(g) - case orb.MultiPolygon: - return multiPolygonCentroidArea(g) - case orb.Collection: - return collectionCentroidArea(g) - case orb.Bound: - return CentroidArea(g.ToRing()) - } - - panic(fmt.Sprintf("geometry type not supported: %T", g)) -} - -func multiPointCentroid(mp orb.MultiPoint) orb.Point { - if len(mp) == 0 { - return orb.Point{} - } - - x, y := 0.0, 0.0 - for _, p := range mp { - x += p[0] - y += p[1] - } - - num := float64(len(mp)) - return orb.Point{x / num, y / num} -} - -func multiLineStringCentroid(mls orb.MultiLineString) orb.Point { - point := orb.Point{} - dist := 0.0 - - if len(mls) == 0 { - return orb.Point{} - } - - validCount := 0 - for _, ls := range mls { - c, d := lineStringCentroidDist(ls) - if d == math.Inf(1) { - continue - } - - dist += d - validCount++ - - if d == 0 { - d = 1.0 - } - - point[0] += c[0] * d - point[1] += c[1] * d - } - - if validCount == 0 { - return orb.Point{} - } - - if dist == math.Inf(1) || dist == 0.0 { - point[0] /= float64(validCount) - point[1] /= float64(validCount) - return point - } - - point[0] /= dist - point[1] /= dist - - return point -} - -func lineStringCentroidDist(ls orb.LineString) (orb.Point, float64) { - dist := 0.0 - point := orb.Point{} - - if len(ls) == 0 { - return orb.Point{}, math.Inf(1) - } - - // implicitly move everything to near the origin to help with roundoff - offset := ls[0] - for i := 0; i < len(ls)-1; i++ { - p1 := orb.Point{ - ls[i][0] - offset[0], - ls[i][1] - offset[1], - } - - p2 := orb.Point{ - ls[i+1][0] - offset[0], - ls[i+1][1] - offset[1], - } - - d := Distance(p1, p2) - - point[0] += (p1[0] + p2[0]) / 2.0 * d - point[1] += (p1[1] + p2[1]) / 2.0 * d - dist += d - } - - if dist == 0 { - return ls[0], 0 - } - - point[0] /= dist - point[1] /= dist - - point[0] += ls[0][0] - point[1] += ls[0][1] - return point, dist -} - -func ringCentroidArea(r orb.Ring) (orb.Point, float64) { - centroid := orb.Point{} - area := 0.0 - - if len(r) == 0 { - return orb.Point{}, 0 - } - - // implicitly move everything to near the origin to help with roundoff - offsetX := r[0][0] - offsetY := r[0][1] - for i := 1; i < len(r)-1; i++ { - a := (r[i][0]-offsetX)*(r[i+1][1]-offsetY) - - (r[i+1][0]-offsetX)*(r[i][1]-offsetY) - area += a - - centroid[0] += (r[i][0] + r[i+1][0] - 2*offsetX) * a - centroid[1] += (r[i][1] + r[i+1][1] - 2*offsetY) * a - } - - if area == 0 { - return r[0], 0 - } - - // no need to deal with first and last vertex since we "moved" - // that point the origin (multiply by 0 == 0) - - area /= 2 - centroid[0] /= 6 * area - centroid[1] /= 6 * area - - centroid[0] += offsetX - centroid[1] += offsetY - - return centroid, area -} - -func polygonCentroidArea(p orb.Polygon) (orb.Point, float64) { - if len(p) == 0 { - return orb.Point{}, 0 - } - - centroid, area := ringCentroidArea(p[0]) - area = math.Abs(area) - if len(p) == 1 { - if area == 0 { - c, _ := lineStringCentroidDist(orb.LineString(p[0])) - return c, 0 - } - return centroid, area - } - - holeArea := 0.0 - weightedHoleCentroid := orb.Point{} - for i := 1; i < len(p); i++ { - hc, ha := ringCentroidArea(p[i]) - ha = math.Abs(ha) - - holeArea += ha - weightedHoleCentroid[0] += hc[0] * ha - weightedHoleCentroid[1] += hc[1] * ha - } - - totalArea := area - holeArea - if totalArea == 0 { - c, _ := lineStringCentroidDist(orb.LineString(p[0])) - return c, 0 - } - - centroid[0] = (area*centroid[0] - weightedHoleCentroid[0]) / totalArea - centroid[1] = (area*centroid[1] - weightedHoleCentroid[1]) / totalArea - - return centroid, totalArea -} - -func multiPolygonCentroidArea(mp orb.MultiPolygon) (orb.Point, float64) { - point := orb.Point{} - area := 0.0 - - for _, p := range mp { - c, a := polygonCentroidArea(p) - - point[0] += c[0] * a - point[1] += c[1] * a - - area += a - } - - if area == 0 { - return orb.Point{}, 0 - } - - point[0] /= area - point[1] /= area - - return point, area -} - -func collectionCentroidArea(c orb.Collection) (orb.Point, float64) { - point := orb.Point{} - area := 0.0 - - max := maxDim(c) - for _, g := range c { - if g.Dimensions() != max { - continue - } - - c, a := CentroidArea(g) - - point[0] += c[0] * a - point[1] += c[1] * a - - area += a - } - - if area == 0 { - return orb.Point{}, 0 - } - - point[0] /= area - point[1] /= area - - return point, area -} - -func maxDim(c orb.Collection) int { - max := 0 - for _, g := range c { - if d := g.Dimensions(); d > max { - max = d - } - } - - return max -} diff --git a/vendor/github.com/paulmach/orb/planar/contains.go b/vendor/github.com/paulmach/orb/planar/contains.go deleted file mode 100644 index fbfc455..0000000 --- a/vendor/github.com/paulmach/orb/planar/contains.go +++ /dev/null @@ -1,122 +0,0 @@ -package planar - -import ( - "math" - - "github.com/paulmach/orb" -) - -// RingContains returns true if the point is inside the ring. -// Points on the boundary are considered in. -func RingContains(r orb.Ring, point orb.Point) bool { - if !r.Bound().Contains(point) { - return false - } - - c, on := rayIntersect(point, r[0], r[len(r)-1]) - if on { - return true - } - - for i := 0; i < len(r)-1; i++ { - inter, on := rayIntersect(point, r[i], r[i+1]) - if on { - return true - } - - if inter { - c = !c - } - } - - return c -} - -// PolygonContains checks if the point is within the polygon. -// Points on the boundary are considered in. -func PolygonContains(p orb.Polygon, point orb.Point) bool { - if !RingContains(p[0], point) { - return false - } - - for i := 1; i < len(p); i++ { - if RingContains(p[i], point) { - return false - } - } - - return true -} - -// MultiPolygonContains checks if the point is within the multi-polygon. -// Points on the boundary are considered in. -func MultiPolygonContains(mp orb.MultiPolygon, point orb.Point) bool { - for _, p := range mp { - if PolygonContains(p, point) { - return true - } - } - - return false -} - -// Original implementation: http://rosettacode.org/wiki/Ray-casting_algorithm#Go -func rayIntersect(p, s, e orb.Point) (intersects, on bool) { - if s[0] > e[0] { - s, e = e, s - } - - if p[0] == s[0] { - if p[1] == s[1] { - // p == start - return false, true - } else if s[0] == e[0] { - // vertical segment (s -> e) - // return true if within the line, check to see if start or end is greater. - if s[1] > e[1] && s[1] >= p[1] && p[1] >= e[1] { - return false, true - } - - if e[1] > s[1] && e[1] >= p[1] && p[1] >= s[1] { - return false, true - } - } - - // Move the y coordinate to deal with degenerate case - p[0] = math.Nextafter(p[0], math.Inf(1)) - } else if p[0] == e[0] { - if p[1] == e[1] { - // matching the end point - return false, true - } - - p[0] = math.Nextafter(p[0], math.Inf(1)) - } - - if p[0] < s[0] || p[0] > e[0] { - return false, false - } - - if s[1] > e[1] { - if p[1] > s[1] { - return false, false - } else if p[1] < e[1] { - return true, false - } - } else { - if p[1] > e[1] { - return false, false - } else if p[1] < s[1] { - return true, false - } - } - - rs := (p[1] - s[1]) / (p[0] - s[0]) - ds := (e[1] - s[1]) / (e[0] - s[0]) - - if rs == ds { - return false, true - } - - return rs <= ds, false -} diff --git a/vendor/github.com/paulmach/orb/planar/distance.go b/vendor/github.com/paulmach/orb/planar/distance.go deleted file mode 100644 index a0304a7..0000000 --- a/vendor/github.com/paulmach/orb/planar/distance.go +++ /dev/null @@ -1,21 +0,0 @@ -package planar - -import ( - "math" - - "github.com/paulmach/orb" -) - -// Distance returns the distance between two points in 2d euclidean geometry. -func Distance(p1, p2 orb.Point) float64 { - d0 := (p1[0] - p2[0]) - d1 := (p1[1] - p2[1]) - return math.Sqrt(d0*d0 + d1*d1) -} - -// DistanceSquared returns the square of the distance between two points in 2d euclidean geometry. -func DistanceSquared(p1, p2 orb.Point) float64 { - d0 := (p1[0] - p2[0]) - d1 := (p1[1] - p2[1]) - return d0*d0 + d1*d1 -} diff --git a/vendor/github.com/paulmach/orb/planar/distance_from.go b/vendor/github.com/paulmach/orb/planar/distance_from.go deleted file mode 100644 index da4fffc..0000000 --- a/vendor/github.com/paulmach/orb/planar/distance_from.go +++ /dev/null @@ -1,173 +0,0 @@ -package planar - -import ( - "fmt" - "math" - - "github.com/paulmach/orb" -) - -// DistanceFromSegment returns the point's distance from the segment [a, b]. -func DistanceFromSegment(a, b, point orb.Point) float64 { - return math.Sqrt(DistanceFromSegmentSquared(a, b, point)) -} - -// DistanceFromSegmentSquared returns point's squared distance from the segement [a, b]. -func DistanceFromSegmentSquared(a, b, point orb.Point) float64 { - x := a[0] - y := a[1] - dx := b[0] - x - dy := b[1] - y - - if dx != 0 || dy != 0 { - t := ((point[0]-x)*dx + (point[1]-y)*dy) / (dx*dx + dy*dy) - - if t > 1 { - x = b[0] - y = b[1] - } else if t > 0 { - x += dx * t - y += dy * t - } - } - - dx = point[0] - x - dy = point[1] - y - - return dx*dx + dy*dy -} - -// DistanceFrom returns the distance from the boundary of the geometry in -// the units of the geometry. -func DistanceFrom(g orb.Geometry, p orb.Point) float64 { - d, _ := DistanceFromWithIndex(g, p) - return d -} - -// DistanceFromWithIndex returns the minimum euclidean distance -// from the boundary of the geometry plus the index of the sub-geometry -// that was the match. -func DistanceFromWithIndex(g orb.Geometry, p orb.Point) (float64, int) { - if g == nil { - return math.Inf(1), -1 - } - - switch g := g.(type) { - case orb.Point: - return Distance(g, p), 0 - case orb.MultiPoint: - return multiPointDistanceFrom(g, p) - case orb.LineString: - return lineStringDistanceFrom(g, p) - case orb.MultiLineString: - dist := math.Inf(1) - index := -1 - for i, ls := range g { - if d, _ := lineStringDistanceFrom(ls, p); d < dist { - dist = d - index = i - } - } - - return dist, index - case orb.Ring: - return lineStringDistanceFrom(orb.LineString(g), p) - case orb.Polygon: - return polygonDistanceFrom(g, p) - case orb.MultiPolygon: - dist := math.Inf(1) - index := -1 - for i, poly := range g { - if d, _ := polygonDistanceFrom(poly, p); d < dist { - dist = d - index = i - } - } - - return dist, index - case orb.Collection: - dist := math.Inf(1) - index := -1 - for i, ge := range g { - if d, _ := DistanceFromWithIndex(ge, p); d < dist { - dist = d - index = i - } - } - - return dist, index - case orb.Bound: - return DistanceFromWithIndex(g.ToRing(), p) - } - - panic(fmt.Sprintf("geometry type not supported: %T", g)) -} - -func multiPointDistanceFrom(mp orb.MultiPoint, p orb.Point) (float64, int) { - dist := math.Inf(1) - index := -1 - - for i := range mp { - if d := DistanceSquared(mp[i], p); d < dist { - dist = d - index = i - } - } - - return math.Sqrt(dist), index -} - -func lineStringDistanceFrom(ls orb.LineString, p orb.Point) (float64, int) { - dist := math.Inf(1) - index := -1 - - for i := 0; i < len(ls)-1; i++ { - if d := segmentDistanceFromSquared(ls[i], ls[i+1], p); d < dist { - dist = d - index = i - } - } - - return math.Sqrt(dist), index -} - -func polygonDistanceFrom(p orb.Polygon, point orb.Point) (float64, int) { - if len(p) == 0 { - return math.Inf(1), -1 - } - - dist, index := lineStringDistanceFrom(orb.LineString(p[0]), point) - for i := 1; i < len(p); i++ { - d, i := lineStringDistanceFrom(orb.LineString(p[i]), point) - if d < dist { - dist = d - index = i - } - } - - return dist, index -} - -func segmentDistanceFromSquared(p1, p2, point orb.Point) float64 { - x := p1[0] - y := p1[1] - dx := p2[0] - x - dy := p2[1] - y - - if dx != 0 || dy != 0 { - t := ((point[0]-x)*dx + (point[1]-y)*dy) / (dx*dx + dy*dy) - - if t > 1 { - x = p2[0] - y = p2[1] - } else if t > 0 { - x += dx * t - y += dy * t - } - } - - dx = point[0] - x - dy = point[1] - y - - return dx*dx + dy*dy -} diff --git a/vendor/github.com/paulmach/orb/planar/length.go b/vendor/github.com/paulmach/orb/planar/length.go deleted file mode 100644 index 4eae415..0000000 --- a/vendor/github.com/paulmach/orb/planar/length.go +++ /dev/null @@ -1,12 +0,0 @@ -package planar - -import ( - "github.com/paulmach/orb" - "github.com/paulmach/orb/internal/length" -) - -// Length returns the length of the boundary of the geometry -// using 2d euclidean geometry. -func Length(g orb.Geometry) float64 { - return length.Length(g, Distance) -} diff --git a/vendor/github.com/paulmach/orb/point.go b/vendor/github.com/paulmach/orb/point.go deleted file mode 100644 index c459c35..0000000 --- a/vendor/github.com/paulmach/orb/point.go +++ /dev/null @@ -1,51 +0,0 @@ -package orb - -// A Point is a Lon/Lat 2d point. -type Point [2]float64 - -var _ Pointer = Point{} - -// GeoJSONType returns the GeoJSON type for the object. -func (p Point) GeoJSONType() string { - return "Point" -} - -// Dimensions returns 0 because a point is a 0d object. -func (p Point) Dimensions() int { - return 0 -} - -// Bound returns a single point bound of the point. -func (p Point) Bound() Bound { - return Bound{p, p} -} - -// Point returns itself so it implements the Pointer interface. -func (p Point) Point() Point { - return p -} - -// Y returns the vertical coordinate of the point. -func (p Point) Y() float64 { - return p[1] -} - -// X returns the horizontal coordinate of the point. -func (p Point) X() float64 { - return p[0] -} - -// Lat returns the vertical, latitude coordinate of the point. -func (p Point) Lat() float64 { - return p[1] -} - -// Lon returns the horizontal, longitude coordinate of the point. -func (p Point) Lon() float64 { - return p[0] -} - -// Equal checks if the point represents the same point or vector. -func (p Point) Equal(point Point) bool { - return p[0] == point[0] && p[1] == point[1] -} diff --git a/vendor/github.com/paulmach/orb/polygon.go b/vendor/github.com/paulmach/orb/polygon.go deleted file mode 100644 index b3e7d29..0000000 --- a/vendor/github.com/paulmach/orb/polygon.go +++ /dev/null @@ -1,55 +0,0 @@ -package orb - -// Polygon is a closed area. The first LineString is the outer ring. -// The others are the holes. Each LineString is expected to be closed -// ie. the first point matches the last. -type Polygon []Ring - -// GeoJSONType returns the GeoJSON type for the object. -func (p Polygon) GeoJSONType() string { - return "Polygon" -} - -// Dimensions returns 2 because a Polygon is a 2d object. -func (p Polygon) Dimensions() int { - return 2 -} - -// Bound returns a bound around the polygon. -func (p Polygon) Bound() Bound { - if len(p) == 0 { - return emptyBound - } - return p[0].Bound() -} - -// Equal compares two polygons. Returns true if lengths are the same -// and all points are Equal. -func (p Polygon) Equal(polygon Polygon) bool { - if len(p) != len(polygon) { - return false - } - - for i := range p { - if !p[i].Equal(polygon[i]) { - return false - } - } - - return true -} - -// Clone returns a new deep copy of the polygon. -// All of the rings are also cloned. -func (p Polygon) Clone() Polygon { - if p == nil { - return p - } - - np := make(Polygon, 0, len(p)) - for _, r := range p { - np = append(np, r.Clone()) - } - - return np -} diff --git a/vendor/github.com/paulmach/orb/ring.go b/vendor/github.com/paulmach/orb/ring.go deleted file mode 100644 index 5fe88ac..0000000 --- a/vendor/github.com/paulmach/orb/ring.go +++ /dev/null @@ -1,75 +0,0 @@ -package orb - -// Ring represents a set of ring on the earth. -type Ring LineString - -// GeoJSONType returns the GeoJSON type for the object. -func (r Ring) GeoJSONType() string { - return "Polygon" -} - -// Dimensions returns 2 because a Ring is a 2d object. -func (r Ring) Dimensions() int { - return 2 -} - -// Closed will return true if the ring is a real ring. -// ie. 4+ points and the first and last points match. -// NOTE: this will not check for self-intersection. -func (r Ring) Closed() bool { - return (len(r) >= 4) && (r[0] == r[len(r)-1]) -} - -// Reverse changes the direction of the ring. -// This is done inplace, ie. it modifies the original data. -func (r Ring) Reverse() { - LineString(r).Reverse() -} - -// Bound returns a rect around the ring. Uses rectangular coordinates. -func (r Ring) Bound() Bound { - return MultiPoint(r).Bound() -} - -// Orientation returns 1 if the the ring is in couter-clockwise order, -// return -1 if the ring is the clockwise order and 0 if the ring is -// degenerate and had no area. -func (r Ring) Orientation() Orientation { - area := 0.0 - - // This is a fast planar area computation, which is okay for this use. - // implicitly move everything to near the origin to help with roundoff - offsetX := r[0][0] - offsetY := r[0][1] - for i := 1; i < len(r)-1; i++ { - area += (r[i][0]-offsetX)*(r[i+1][1]-offsetY) - - (r[i+1][0]-offsetX)*(r[i][1]-offsetY) - } - - if area > 0 { - return CCW - } - - if area < 0 { - return CW - } - - // degenerate case, no area - return 0 -} - -// Equal compares two rings. Returns true if lengths are the same -// and all points are Equal. -func (r Ring) Equal(ring Ring) bool { - return MultiPoint(r).Equal(MultiPoint(ring)) -} - -// Clone returns a new copy of the ring. -func (r Ring) Clone() Ring { - if r == nil { - return nil - } - - ps := MultiPoint(r) - return Ring(ps.Clone()) -} diff --git a/vendor/github.com/paulmach/orb/round.go b/vendor/github.com/paulmach/orb/round.go deleted file mode 100644 index b6c7799..0000000 --- a/vendor/github.com/paulmach/orb/round.go +++ /dev/null @@ -1,100 +0,0 @@ -package orb - -import ( - "fmt" - "math" -) - -// Round will round all the coordinates of the geometry to the given factor. -// The default is 6 decimal places. -func Round(g Geometry, factor ...int) Geometry { - if g == nil { - return nil - } - - f := float64(DefaultRoundingFactor) - if len(factor) > 0 { - f = float64(factor[0]) - } - - switch g := g.(type) { - case Point: - return Point{ - math.Round(g[0]*f) / f, - math.Round(g[1]*f) / f, - } - case MultiPoint: - if g == nil { - return nil - } - roundPoints([]Point(g), f) - return g - case LineString: - if g == nil { - return nil - } - roundPoints([]Point(g), f) - return g - case MultiLineString: - if g == nil { - return nil - } - for _, ls := range g { - roundPoints([]Point(ls), f) - } - return g - case Ring: - if g == nil { - return nil - } - roundPoints([]Point(g), f) - return g - case Polygon: - if g == nil { - return nil - } - for _, r := range g { - roundPoints([]Point(r), f) - } - return g - case MultiPolygon: - if g == nil { - return nil - } - for _, p := range g { - for _, r := range p { - roundPoints([]Point(r), f) - } - } - return g - case Collection: - if g == nil { - return nil - } - - for i := range g { - g[i] = Round(g[i], int(f)) - } - return g - case Bound: - return Bound{ - Min: Point{ - math.Round(g.Min[0]*f) / f, - math.Round(g.Min[1]*f) / f, - }, - Max: Point{ - math.Round(g.Max[0]*f) / f, - math.Round(g.Max[1]*f) / f, - }, - } - } - - panic(fmt.Sprintf("geometry type not supported: %T", g)) -} - -func roundPoints(ps []Point, f float64) { - for i := range ps { - ps[i][0] = math.Round(ps[i][0]*f) / f - ps[i][1] = math.Round(ps[i][1]*f) / f - } -} diff --git a/vendor/github.com/pelletier/go-toml/v2/.dockerignore b/vendor/github.com/pelletier/go-toml/v2/.dockerignore deleted file mode 100644 index 7b58834..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -cmd/tomll/tomll -cmd/tomljson/tomljson diff --git a/vendor/github.com/pelletier/go-toml/v2/.gitattributes b/vendor/github.com/pelletier/go-toml/v2/.gitattributes deleted file mode 100644 index 34a0a21..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -* text=auto - -benchmark/benchmark.toml text eol=lf -testdata/** text eol=lf diff --git a/vendor/github.com/pelletier/go-toml/v2/.gitignore b/vendor/github.com/pelletier/go-toml/v2/.gitignore deleted file mode 100644 index a69e2b0..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -test_program/test_program_bin -fuzz/ -cmd/tomll/tomll -cmd/tomljson/tomljson -cmd/tomltestgen/tomltestgen -dist \ No newline at end of file diff --git a/vendor/github.com/pelletier/go-toml/v2/.golangci.toml b/vendor/github.com/pelletier/go-toml/v2/.golangci.toml deleted file mode 100644 index 067db55..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/.golangci.toml +++ /dev/null @@ -1,84 +0,0 @@ -[service] -golangci-lint-version = "1.39.0" - -[linters-settings.wsl] -allow-assign-and-anything = true - -[linters-settings.exhaustive] -default-signifies-exhaustive = true - -[linters] -disable-all = true -enable = [ - "asciicheck", - "bodyclose", - "cyclop", - "deadcode", - "depguard", - "dogsled", - "dupl", - "durationcheck", - "errcheck", - "errorlint", - "exhaustive", - # "exhaustivestruct", - "exportloopref", - "forbidigo", - # "forcetypeassert", - "funlen", - "gci", - # "gochecknoglobals", - "gochecknoinits", - "gocognit", - "goconst", - "gocritic", - "gocyclo", - "godot", - "godox", - # "goerr113", - "gofmt", - "gofumpt", - "goheader", - "goimports", - "golint", - "gomnd", - # "gomoddirectives", - "gomodguard", - "goprintffuncname", - "gosec", - "gosimple", - "govet", - # "ifshort", - "importas", - "ineffassign", - "lll", - "makezero", - "misspell", - "nakedret", - "nestif", - "nilerr", - # "nlreturn", - "noctx", - "nolintlint", - #"paralleltest", - "prealloc", - "predeclared", - "revive", - "rowserrcheck", - "sqlclosecheck", - "staticcheck", - "structcheck", - "stylecheck", - # "testpackage", - "thelper", - "tparallel", - "typecheck", - "unconvert", - "unparam", - "unused", - "varcheck", - "wastedassign", - "whitespace", - # "wrapcheck", - # "wsl" -] diff --git a/vendor/github.com/pelletier/go-toml/v2/.goreleaser.yaml b/vendor/github.com/pelletier/go-toml/v2/.goreleaser.yaml deleted file mode 100644 index 1d8b69e..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/.goreleaser.yaml +++ /dev/null @@ -1,126 +0,0 @@ -before: - hooks: - - go mod tidy - - go fmt ./... - - go test ./... -builds: - - id: tomll - main: ./cmd/tomll - binary: tomll - env: - - CGO_ENABLED=0 - flags: - - -trimpath - ldflags: - - -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}} - mod_timestamp: '{{ .CommitTimestamp }}' - targets: - - linux_amd64 - - linux_arm64 - - linux_arm - - linux_riscv64 - - windows_amd64 - - windows_arm64 - - windows_arm - - darwin_amd64 - - darwin_arm64 - - id: tomljson - main: ./cmd/tomljson - binary: tomljson - env: - - CGO_ENABLED=0 - flags: - - -trimpath - ldflags: - - -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}} - mod_timestamp: '{{ .CommitTimestamp }}' - targets: - - linux_amd64 - - linux_arm64 - - linux_arm - - linux_riscv64 - - windows_amd64 - - windows_arm64 - - windows_arm - - darwin_amd64 - - darwin_arm64 - - id: jsontoml - main: ./cmd/jsontoml - binary: jsontoml - env: - - CGO_ENABLED=0 - flags: - - -trimpath - ldflags: - - -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}} - mod_timestamp: '{{ .CommitTimestamp }}' - targets: - - linux_amd64 - - linux_arm64 - - linux_riscv64 - - linux_arm - - windows_amd64 - - windows_arm64 - - windows_arm - - darwin_amd64 - - darwin_arm64 -universal_binaries: - - id: tomll - replace: true - name_template: tomll - - id: tomljson - replace: true - name_template: tomljson - - id: jsontoml - replace: true - name_template: jsontoml -archives: -- id: jsontoml - format: tar.xz - builds: - - jsontoml - files: - - none* - name_template: "{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}" -- id: tomljson - format: tar.xz - builds: - - tomljson - files: - - none* - name_template: "{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}" -- id: tomll - format: tar.xz - builds: - - tomll - files: - - none* - name_template: "{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}" -dockers: - - id: tools - goos: linux - goarch: amd64 - ids: - - jsontoml - - tomljson - - tomll - image_templates: - - "ghcr.io/pelletier/go-toml:latest" - - "ghcr.io/pelletier/go-toml:{{ .Tag }}" - - "ghcr.io/pelletier/go-toml:v{{ .Major }}" - skip_push: false -checksum: - name_template: 'sha256sums.txt' -snapshot: - name_template: "{{ incpatch .Version }}-next" -release: - github: - owner: pelletier - name: go-toml - draft: true - prerelease: auto - mode: replace -changelog: - use: github-native -announce: - skip: true diff --git a/vendor/github.com/pelletier/go-toml/v2/CONTRIBUTING.md b/vendor/github.com/pelletier/go-toml/v2/CONTRIBUTING.md deleted file mode 100644 index 04dd12b..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/CONTRIBUTING.md +++ /dev/null @@ -1,196 +0,0 @@ -# Contributing - -Thank you for your interest in go-toml! We appreciate you considering -contributing to go-toml! - -The main goal is the project is to provide an easy-to-use and efficient TOML -implementation for Go that gets the job done and gets out of your way – dealing -with TOML is probably not the central piece of your project. - -As the single maintainer of go-toml, time is scarce. All help, big or small, is -more than welcomed! - -## Ask questions - -Any question you may have, somebody else might have it too. Always feel free to -ask them on the [discussion board][discussions]. We will try to answer them as -clearly and quickly as possible, time permitting. - -Asking questions also helps us identify areas where the documentation needs -improvement, or new features that weren't envisioned before. Sometimes, a -seemingly innocent question leads to the fix of a bug. Don't hesitate and ask -away! - -[discussions]: https://github.com/pelletier/go-toml/discussions - -## Improve the documentation - -The best way to share your knowledge and experience with go-toml is to improve -the documentation. Fix a typo, clarify an interface, add an example, anything -goes! - -The documentation is present in the [README][readme] and thorough the source -code. On release, it gets updated on [pkg.go.dev][pkg.go.dev]. To make a change -to the documentation, create a pull request with your proposed changes. For -simple changes like that, the easiest way to go is probably the "Fork this -project and edit the file" button on Github, displayed at the top right of the -file. Unless it's a trivial change (for example a typo), provide a little bit of -context in your pull request description or commit message. - -## Report a bug - -Found a bug! Sorry to hear that :(. Help us and other track them down and fix by -reporting it. [File a new bug report][bug-report] on the [issues -tracker][issues-tracker]. The template should provide enough guidance on what to -include. When in doubt: add more details! By reducing ambiguity and providing -more information, it decreases back and forth and saves everyone time. - -## Code changes - -Want to contribute a patch? Very happy to hear that! - -First, some high-level rules: - -- A short proposal with some POC code is better than a lengthy piece of text - with no code. Code speaks louder than words. That being said, bigger changes - should probably start with a [discussion][discussions]. -- No backward-incompatible patch will be accepted unless discussed. Sometimes - it's hard, but we try not to break people's programs unless we absolutely have - to. -- If you are writing a new feature or extending an existing one, make sure to - write some documentation. -- Bug fixes need to be accompanied with regression tests. -- New code needs to be tested. -- Your commit messages need to explain why the change is needed, even if already - included in the PR description. - -It does sound like a lot, but those best practices are here to save time overall -and continuously improve the quality of the project, which is something everyone -benefits from. - -### Get started - -The fairly standard code contribution process looks like that: - -1. [Fork the project][fork]. -2. Make your changes, commit on any branch you like. -3. [Open up a pull request][pull-request] -4. Review, potential ask for changes. -5. Merge. - -Feel free to ask for help! You can create draft pull requests to gather -some early feedback! - -### Run the tests - -You can run tests for go-toml using Go's test tool: `go test -race ./...`. - -During the pull request process, all tests will be ran on Linux, Windows, and -MacOS on the last two versions of Go. - -However, given GitHub's new policy to _not_ run Actions on pull requests until a -maintainer clicks on button, it is highly recommended that you run them locally -as you make changes. - -### Check coverage - -We use `go tool cover` to compute test coverage. Most code editors have a way to -run and display code coverage, but at the end of the day, we do this: - -``` -go test -covermode=atomic -coverprofile=coverage.out -go tool cover -func=coverage.out -``` - -and verify that the overall percentage of tested code does not go down. This is -a requirement. As a rule of thumb, all lines of code touched by your changes -should be covered. On Unix you can use `./ci.sh coverage -d v2` to check if your -code lowers the coverage. - -### Verify performance - -Go-toml aims to stay efficient. We rely on a set of scenarios executed with Go's -builtin benchmark systems. Because of their noisy nature, containers provided by -Github Actions cannot be reliably used for benchmarking. As a result, you are -responsible for checking that your changes do not incur a performance penalty. -You can run their following to execute benchmarks: - -``` -go test ./... -bench=. -count=10 -``` - -Benchmark results should be compared against each other with -[benchstat][benchstat]. Typical flow looks like this: - -1. On the `v2` branch, run `go test ./... -bench=. -count 10` and save output to - a file (for example `old.txt`). -2. Make some code changes. -3. Run `go test ....` again, and save the output to an other file (for example - `new.txt`). -4. Run `benchstat old.txt new.txt` to check that time/op does not go up in any - test. - -On Unix you can use `./ci.sh benchmark -d v2` to verify how your code impacts -performance. - -It is highly encouraged to add the benchstat results to your pull request -description. Pull requests that lower performance will receive more scrutiny. - -[benchstat]: https://pkg.go.dev/golang.org/x/perf/cmd/benchstat - -### Style - -Try to look around and follow the same format and structure as the rest of the -code. We enforce using `go fmt` on the whole code base. - ---- - -## Maintainers-only - -### Merge pull request - -Checklist: - -- Passing CI. -- Does not introduce backward-incompatible changes (unless discussed). -- Has relevant doc changes. -- Benchstat does not show performance regression. -- Pull request is [labeled appropriately][pr-labels]. -- Title will be understandable in the changelog. - -1. Merge using "squash and merge". -2. Make sure to edit the commit message to keep all the useful information - nice and clean. -3. Make sure the commit title is clear and contains the PR number (#123). - -### New release - -1. Decide on the next version number. Use semver. -2. Generate release notes using [`gh`][gh]. Example: -``` -$ gh api -X POST \ - -F tag_name='v2.0.0-beta.5' \ - -F target_commitish='v2' \ - -F previous_tag_name='v2.0.0-beta.4' \ - --jq '.body' \ - repos/pelletier/go-toml/releases/generate-notes -``` -3. Look for "Other changes". That would indicate a pull request not labeled - properly. Tweak labels and pull request titles until changelog looks good for - users. -4. [Draft new release][new-release]. -5. Fill tag and target with the same value used to generate the changelog. -6. Set title to the new tag value. -7. Paste the generated changelog. -8. Check "create discussion", in the "Releases" category. -9. Check pre-release if new version is an alpha or beta. - -[issues-tracker]: https://github.com/pelletier/go-toml/issues -[bug-report]: https://github.com/pelletier/go-toml/issues/new?template=bug_report.md -[pkg.go.dev]: https://pkg.go.dev/github.com/pelletier/go-toml -[readme]: ./README.md -[fork]: https://help.github.com/articles/fork-a-repo -[pull-request]: https://help.github.com/en/articles/creating-a-pull-request -[new-release]: https://github.com/pelletier/go-toml/releases/new -[gh]: https://github.com/cli/cli -[pr-labels]: https://github.com/pelletier/go-toml/blob/v2/.github/release.yml diff --git a/vendor/github.com/pelletier/go-toml/v2/Dockerfile b/vendor/github.com/pelletier/go-toml/v2/Dockerfile deleted file mode 100644 index b9e9332..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM scratch -ENV PATH "$PATH:/bin" -COPY tomll /bin/tomll -COPY tomljson /bin/tomljson -COPY jsontoml /bin/jsontoml diff --git a/vendor/github.com/pelletier/go-toml/v2/LICENSE b/vendor/github.com/pelletier/go-toml/v2/LICENSE deleted file mode 100644 index 991e2ae..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -go-toml v2 -Copyright (c) 2021 - 2023 Thomas Pelletier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/pelletier/go-toml/v2/README.md b/vendor/github.com/pelletier/go-toml/v2/README.md deleted file mode 100644 index 63b92f3..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/README.md +++ /dev/null @@ -1,575 +0,0 @@ -# go-toml v2 - -Go library for the [TOML](https://toml.io/en/) format. - -This library supports [TOML v1.0.0](https://toml.io/en/v1.0.0). - -[🐞 Bug Reports](https://github.com/pelletier/go-toml/issues) - -[💬 Anything else](https://github.com/pelletier/go-toml/discussions) - -## Documentation - -Full API, examples, and implementation notes are available in the Go -documentation. - -[![Go Reference](https://pkg.go.dev/badge/github.com/pelletier/go-toml/v2.svg)](https://pkg.go.dev/github.com/pelletier/go-toml/v2) - -## Import - -```go -import "github.com/pelletier/go-toml/v2" -``` - -See [Modules](#Modules). - -## Features - -### Stdlib behavior - -As much as possible, this library is designed to behave similarly as the -standard library's `encoding/json`. - -### Performance - -While go-toml favors usability, it is written with performance in mind. Most -operations should not be shockingly slow. See [benchmarks](#benchmarks). - -### Strict mode - -`Decoder` can be set to "strict mode", which makes it error when some parts of -the TOML document was not present in the target structure. This is a great way -to check for typos. [See example in the documentation][strict]. - -[strict]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#example-Decoder.DisallowUnknownFields - -### Contextualized errors - -When most decoding errors occur, go-toml returns [`DecodeError`][decode-err], -which contains a human readable contextualized version of the error. For -example: - -``` -1| [server] -2| path = 100 - | ~~~ cannot decode TOML integer into struct field toml_test.Server.Path of type string -3| port = 50 -``` - -[decode-err]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#DecodeError - -### Local date and time support - -TOML supports native [local date/times][ldt]. It allows to represent a given -date, time, or date-time without relation to a timezone or offset. To support -this use-case, go-toml provides [`LocalDate`][tld], [`LocalTime`][tlt], and -[`LocalDateTime`][tldt]. Those types can be transformed to and from `time.Time`, -making them convenient yet unambiguous structures for their respective TOML -representation. - -[ldt]: https://toml.io/en/v1.0.0#local-date-time -[tld]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#LocalDate -[tlt]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#LocalTime -[tldt]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#LocalDateTime - -### Commented config - -Since TOML is often used for configuration files, go-toml can emit documents -annotated with [comments and commented-out values][comments-example]. For -example, it can generate the following file: - -```toml -# Host IP to connect to. -host = '127.0.0.1' -# Port of the remote server. -port = 4242 - -# Encryption parameters (optional) -# [TLS] -# cipher = 'AEAD-AES128-GCM-SHA256' -# version = 'TLS 1.3' -``` - -[comments-example]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#example-Marshal-Commented - -## Getting started - -Given the following struct, let's see how to read it and write it as TOML: - -```go -type MyConfig struct { - Version int - Name string - Tags []string -} -``` - -### Unmarshaling - -[`Unmarshal`][unmarshal] reads a TOML document and fills a Go structure with its -content. For example: - -```go -doc := ` -version = 2 -name = "go-toml" -tags = ["go", "toml"] -` - -var cfg MyConfig -err := toml.Unmarshal([]byte(doc), &cfg) -if err != nil { - panic(err) -} -fmt.Println("version:", cfg.Version) -fmt.Println("name:", cfg.Name) -fmt.Println("tags:", cfg.Tags) - -// Output: -// version: 2 -// name: go-toml -// tags: [go toml] -``` - -[unmarshal]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#Unmarshal - -### Marshaling - -[`Marshal`][marshal] is the opposite of Unmarshal: it represents a Go structure -as a TOML document: - -```go -cfg := MyConfig{ - Version: 2, - Name: "go-toml", - Tags: []string{"go", "toml"}, -} - -b, err := toml.Marshal(cfg) -if err != nil { - panic(err) -} -fmt.Println(string(b)) - -// Output: -// Version = 2 -// Name = 'go-toml' -// Tags = ['go', 'toml'] -``` - -[marshal]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#Marshal - -## Unstable API - -This API does not yet follow the backward compatibility guarantees of this -library. They provide early access to features that may have rough edges or an -API subject to change. - -### Parser - -Parser is the unstable API that allows iterative parsing of a TOML document at -the AST level. See https://pkg.go.dev/github.com/pelletier/go-toml/v2/unstable. - -## Benchmarks - -Execution time speedup compared to other Go TOML libraries: - - - - - - - - - - - - - -
Benchmarkgo-toml v1BurntSushi/toml
Marshal/HugoFrontMatter-21.9x1.9x
Marshal/ReferenceFile/map-21.7x1.8x
Marshal/ReferenceFile/struct-22.2x2.5x
Unmarshal/HugoFrontMatter-22.9x2.9x
Unmarshal/ReferenceFile/map-22.6x2.9x
Unmarshal/ReferenceFile/struct-24.4x5.3x
-
See more -

The table above has the results of the most common use-cases. The table below -contains the results of all benchmarks, including unrealistic ones. It is -provided for completeness.

- - - - - - - - - - - - - - - - - - -
Benchmarkgo-toml v1BurntSushi/toml
Marshal/SimpleDocument/map-21.8x2.9x
Marshal/SimpleDocument/struct-22.7x4.2x
Unmarshal/SimpleDocument/map-24.5x3.1x
Unmarshal/SimpleDocument/struct-26.2x3.9x
UnmarshalDataset/example-23.1x3.5x
UnmarshalDataset/code-22.3x3.1x
UnmarshalDataset/twitter-22.5x2.6x
UnmarshalDataset/citm_catalog-22.1x2.2x
UnmarshalDataset/canada-21.6x1.3x
UnmarshalDataset/config-24.3x3.2x
[Geo mean]2.7x2.8x
-

This table can be generated with ./ci.sh benchmark -a -html.

-
- -## Modules - -go-toml uses Go's standard modules system. - -Installation instructions: - -- Go ≥ 1.16: Nothing to do. Use the import in your code. The `go` command deals - with it automatically. -- Go ≥ 1.13: `GO111MODULE=on go get github.com/pelletier/go-toml/v2`. - -In case of trouble: [Go Modules FAQ][mod-faq]. - -[mod-faq]: https://github.com/golang/go/wiki/Modules#why-does-installing-a-tool-via-go-get-fail-with-error-cannot-find-main-module - -## Tools - -Go-toml provides three handy command line tools: - - * `tomljson`: Reads a TOML file and outputs its JSON representation. - - ``` - $ go install github.com/pelletier/go-toml/v2/cmd/tomljson@latest - $ tomljson --help - ``` - - * `jsontoml`: Reads a JSON file and outputs a TOML representation. - - ``` - $ go install github.com/pelletier/go-toml/v2/cmd/jsontoml@latest - $ jsontoml --help - ``` - - * `tomll`: Lints and reformats a TOML file. - - ``` - $ go install github.com/pelletier/go-toml/v2/cmd/tomll@latest - $ tomll --help - ``` - -### Docker image - -Those tools are also available as a [Docker image][docker]. For example, to use -`tomljson`: - -``` -docker run -i ghcr.io/pelletier/go-toml:v2 tomljson < example.toml -``` - -Multiple versions are availble on [ghcr.io][docker]. - -[docker]: https://github.com/pelletier/go-toml/pkgs/container/go-toml - -## Migrating from v1 - -This section describes the differences between v1 and v2, with some pointers on -how to get the original behavior when possible. - -### Decoding / Unmarshal - -#### Automatic field name guessing - -When unmarshaling to a struct, if a key in the TOML document does not exactly -match the name of a struct field or any of the `toml`-tagged field, v1 tries -multiple variations of the key ([code][v1-keys]). - -V2 instead does a case-insensitive matching, like `encoding/json`. - -This could impact you if you are relying on casing to differentiate two fields, -and one of them is a not using the `toml` struct tag. The recommended solution -is to be specific about tag names for those fields using the `toml` struct tag. - -[v1-keys]: https://github.com/pelletier/go-toml/blob/a2e52561804c6cd9392ebf0048ca64fe4af67a43/marshal.go#L775-L781 - -#### Ignore preexisting value in interface - -When decoding into a non-nil `interface{}`, go-toml v1 uses the type of the -element in the interface to decode the object. For example: - -```go -type inner struct { - B interface{} -} -type doc struct { - A interface{} -} - -d := doc{ - A: inner{ - B: "Before", - }, -} - -data := ` -[A] -B = "After" -` - -toml.Unmarshal([]byte(data), &d) -fmt.Printf("toml v1: %#v\n", d) - -// toml v1: main.doc{A:main.inner{B:"After"}} -``` - -In this case, field `A` is of type `interface{}`, containing a `inner` struct. -V1 sees that type and uses it when decoding the object. - -When decoding an object into an `interface{}`, V2 instead disregards whatever -value the `interface{}` may contain and replaces it with a -`map[string]interface{}`. With the same data structure as above, here is what -the result looks like: - -```go -toml.Unmarshal([]byte(data), &d) -fmt.Printf("toml v2: %#v\n", d) - -// toml v2: main.doc{A:map[string]interface {}{"B":"After"}} -``` - -This is to match `encoding/json`'s behavior. There is no way to make the v2 -decoder behave like v1. - -#### Values out of array bounds ignored - -When decoding into an array, v1 returns an error when the number of elements -contained in the doc is superior to the capacity of the array. For example: - -```go -type doc struct { - A [2]string -} -d := doc{} -err := toml.Unmarshal([]byte(`A = ["one", "two", "many"]`), &d) -fmt.Println(err) - -// (1, 1): unmarshal: TOML array length (3) exceeds destination array length (2) -``` - -In the same situation, v2 ignores the last value: - -```go -err := toml.Unmarshal([]byte(`A = ["one", "two", "many"]`), &d) -fmt.Println("err:", err, "d:", d) -// err: d: {[one two]} -``` - -This is to match `encoding/json`'s behavior. There is no way to make the v2 -decoder behave like v1. - -#### Support for `toml.Unmarshaler` has been dropped - -This method was not widely used, poorly defined, and added a lot of complexity. -A similar effect can be achieved by implementing the `encoding.TextUnmarshaler` -interface and use strings. - -#### Support for `default` struct tag has been dropped - -This feature adds complexity and a poorly defined API for an effect that can be -accomplished outside of the library. - -It does not seem like other format parsers in Go support that feature (the -project referenced in the original ticket #202 has not been updated since 2017). -Given that go-toml v2 should not touch values not in the document, the same -effect can be achieved by pre-filling the struct with defaults (libraries like -[go-defaults][go-defaults] can help). Also, string representation is not well -defined for all types: it creates issues like #278. - -The recommended replacement is pre-filling the struct before unmarshaling. - -[go-defaults]: https://github.com/mcuadros/go-defaults - -#### `toml.Tree` replacement - -This structure was the initial attempt at providing a document model for -go-toml. It allows manipulating the structure of any document, encoding and -decoding from their TOML representation. While a more robust feature was -initially planned in go-toml v2, this has been ultimately [removed from -scope][nodoc] of this library, with no plan to add it back at the moment. The -closest equivalent at the moment would be to unmarshal into an `interface{}` and -use type assertions and/or reflection to manipulate the arbitrary -structure. However this would fall short of providing all of the TOML features -such as adding comments and be specific about whitespace. - - -#### `toml.Position` are not retrievable anymore - -The API for retrieving the position (line, column) of a specific TOML element do -not exist anymore. This was done to minimize the amount of concepts introduced -by the library (query path), and avoid the performance hit related to storing -positions in the absence of a document model, for a feature that seemed to have -little use. Errors however have gained more detailed position -information. Position retrieval seems better fitted for a document model, which -has been [removed from the scope][nodoc] of go-toml v2 at the moment. - -### Encoding / Marshal - -#### Default struct fields order - -V1 emits struct fields order alphabetically by default. V2 struct fields are -emitted in order they are defined. For example: - -```go -type S struct { - B string - A string -} - -data := S{ - B: "B", - A: "A", -} - -b, _ := tomlv1.Marshal(data) -fmt.Println("v1:\n" + string(b)) - -b, _ = tomlv2.Marshal(data) -fmt.Println("v2:\n" + string(b)) - -// Output: -// v1: -// A = "A" -// B = "B" - -// v2: -// B = 'B' -// A = 'A' -``` - -There is no way to make v2 encoder behave like v1. A workaround could be to -manually sort the fields alphabetically in the struct definition, or generate -struct types using `reflect.StructOf`. - -#### No indentation by default - -V1 automatically indents content of tables by default. V2 does not. However the -same behavior can be obtained using [`Encoder.SetIndentTables`][sit]. For example: - -```go -data := map[string]interface{}{ - "table": map[string]string{ - "key": "value", - }, -} - -b, _ := tomlv1.Marshal(data) -fmt.Println("v1:\n" + string(b)) - -b, _ = tomlv2.Marshal(data) -fmt.Println("v2:\n" + string(b)) - -buf := bytes.Buffer{} -enc := tomlv2.NewEncoder(&buf) -enc.SetIndentTables(true) -enc.Encode(data) -fmt.Println("v2 Encoder:\n" + string(buf.Bytes())) - -// Output: -// v1: -// -// [table] -// key = "value" -// -// v2: -// [table] -// key = 'value' -// -// -// v2 Encoder: -// [table] -// key = 'value' -``` - -[sit]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#Encoder.SetIndentTables - -#### Keys and strings are single quoted - -V1 always uses double quotes (`"`) around strings and keys that cannot be -represented bare (unquoted). V2 uses single quotes instead by default (`'`), -unless a character cannot be represented, then falls back to double quotes. As a -result of this change, `Encoder.QuoteMapKeys` has been removed, as it is not -useful anymore. - -There is no way to make v2 encoder behave like v1. - -#### `TextMarshaler` emits as a string, not TOML - -Types that implement [`encoding.TextMarshaler`][tm] can emit arbitrary TOML in -v1. The encoder would append the result to the output directly. In v2 the result -is wrapped in a string. As a result, this interface cannot be implemented by the -root object. - -There is no way to make v2 encoder behave like v1. - -[tm]: https://golang.org/pkg/encoding/#TextMarshaler - -#### `Encoder.CompactComments` has been removed - -Emitting compact comments is now the default behavior of go-toml. This option -is not necessary anymore. - -#### Struct tags have been merged - -V1 used to provide multiple struct tags: `comment`, `commented`, `multiline`, -`toml`, and `omitempty`. To behave more like the standard library, v2 has merged -`toml`, `multiline`, `commented`, and `omitempty`. For example: - -```go -type doc struct { - // v1 - F string `toml:"field" multiline:"true" omitempty:"true" commented:"true"` - // v2 - F string `toml:"field,multiline,omitempty,commented"` -} -``` - -Has a result, the `Encoder.SetTag*` methods have been removed, as there is just -one tag now. - -#### `Encoder.ArraysWithOneElementPerLine` has been renamed - -The new name is `Encoder.SetArraysMultiline`. The behavior should be the same. - -#### `Encoder.Indentation` has been renamed - -The new name is `Encoder.SetIndentSymbol`. The behavior should be the same. - - -#### Embedded structs behave like stdlib - -V1 defaults to merging embedded struct fields into the embedding struct. This -behavior was unexpected because it does not follow the standard library. To -avoid breaking backward compatibility, the `Encoder.PromoteAnonymous` method was -added to make the encoder behave correctly. Given backward compatibility is not -a problem anymore, v2 does the right thing by default: it follows the behavior -of `encoding/json`. `Encoder.PromoteAnonymous` has been removed. - -[nodoc]: https://github.com/pelletier/go-toml/discussions/506#discussioncomment-1526038 - -### `query` - -go-toml v1 provided the [`go-toml/query`][query] package. It allowed to run -JSONPath-style queries on TOML files. This feature is not available in v2. For a -replacement, check out [dasel][dasel]. - -This package has been removed because it was essentially not supported anymore -(last commit May 2020), increased the complexity of the code base, and more -complete solutions exist out there. - -[query]: https://github.com/pelletier/go-toml/tree/f99d6bbca119636aeafcf351ee52b3d202782627/query -[dasel]: https://github.com/TomWright/dasel - -## Versioning - -Go-toml follows [Semantic Versioning](https://semver.org). The supported version -of [TOML](https://github.com/toml-lang/toml) is indicated at the beginning of -this document. The last two major versions of Go are supported -(see [Go Release Policy](https://golang.org/doc/devel/release.html#policy)). - -## License - -The MIT License (MIT). Read [LICENSE](LICENSE). diff --git a/vendor/github.com/pelletier/go-toml/v2/SECURITY.md b/vendor/github.com/pelletier/go-toml/v2/SECURITY.md deleted file mode 100644 index b2f21cf..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/SECURITY.md +++ /dev/null @@ -1,19 +0,0 @@ -# Security Policy - -## Supported Versions - -Use this section to tell people about which versions of your project are -currently being supported with security updates. - -| Version | Supported | -| ---------- | ------------------ | -| Latest 2.x | :white_check_mark: | -| All 1.x | :x: | -| All 0.x | :x: | - -## Reporting a Vulnerability - -Email a vulnerability report to `security@pelletier.codes`. Make sure to include -as many details as possible to reproduce the vulnerability. This is a -side-project: I will try to get back to you as quickly as possible, time -permitting in my personal life. Providing a working patch helps very much! diff --git a/vendor/github.com/pelletier/go-toml/v2/ci.sh b/vendor/github.com/pelletier/go-toml/v2/ci.sh deleted file mode 100644 index 9ae8b75..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/ci.sh +++ /dev/null @@ -1,280 +0,0 @@ -#!/usr/bin/env bash - - -stderr() { - echo "$@" 1>&2 -} - -usage() { - b=$(basename "$0") - echo $b: ERROR: "$@" 1>&2 - - cat 1>&2 < coverage.out - go tool cover -func=coverage.out - echo "Coverage profile for ${branch}: ${dir}/coverage.out" >&2 - popd - - if [ "${branch}" != "HEAD" ]; then - git worktree remove --force "$dir" - fi -} - -coverage() { - case "$1" in - -d) - shift - target="${1?Need to provide a target branch argument}" - - output_dir="$(mktemp -d)" - target_out="${output_dir}/target.txt" - head_out="${output_dir}/head.txt" - - cover "${target}" > "${target_out}" - cover "HEAD" > "${head_out}" - - cat "${target_out}" - cat "${head_out}" - - echo "" - - target_pct="$(tail -n2 ${target_out} | head -n1 | sed -E 's/.*total.*\t([0-9.]+)%.*/\1/')" - head_pct="$(tail -n2 ${head_out} | head -n1 | sed -E 's/.*total.*\t([0-9.]+)%/\1/')" - echo "Results: ${target} ${target_pct}% HEAD ${head_pct}%" - - delta_pct=$(echo "$head_pct - $target_pct" | bc -l) - echo "Delta: ${delta_pct}" - - if [[ $delta_pct = \-* ]]; then - echo "Regression!"; - - target_diff="${output_dir}/target.diff.txt" - head_diff="${output_dir}/head.diff.txt" - cat "${target_out}" | grep -E '^github.com/pelletier/go-toml' | tr -s "\t " | cut -f 2,3 | sort > "${target_diff}" - cat "${head_out}" | grep -E '^github.com/pelletier/go-toml' | tr -s "\t " | cut -f 2,3 | sort > "${head_diff}" - - diff --side-by-side --suppress-common-lines "${target_diff}" "${head_diff}" - return 1 - fi - return 0 - ;; - esac - - cover "${1-HEAD}" -} - -bench() { - branch="${1}" - out="${2}" - replace="${3}" - dir="$(mktemp -d)" - - stderr "Executing benchmark for ${branch} at ${dir}" - - if [ "${branch}" = "HEAD" ]; then - cp -r . "${dir}/" - else - git worktree add "$dir" "$branch" - fi - - pushd "$dir" - - if [ "${replace}" != "" ]; then - find ./benchmark/ -iname '*.go' -exec sed -i -E "s|github.com/pelletier/go-toml/v2|${replace}|g" {} \; - go get "${replace}" - fi - - export GOMAXPROCS=2 - nice -n -19 taskset --cpu-list 0,1 go test '-bench=^Benchmark(Un)?[mM]arshal' -count=5 -run=Nothing ./... | tee "${out}" - popd - - if [ "${branch}" != "HEAD" ]; then - git worktree remove --force "$dir" - fi -} - -fmktemp() { - if mktemp --version|grep GNU >/dev/null; then - mktemp --suffix=-$1; - else - mktemp -t $1; - fi -} - -benchstathtml() { -python3 - $1 <<'EOF' -import sys - -lines = [] -stop = False - -with open(sys.argv[1]) as f: - for line in f.readlines(): - line = line.strip() - if line == "": - stop = True - if not stop: - lines.append(line.split(',')) - -results = [] -for line in reversed(lines[1:]): - v2 = float(line[1]) - results.append([ - line[0].replace("-32", ""), - "%.1fx" % (float(line[3])/v2), # v1 - "%.1fx" % (float(line[5])/v2), # bs - ]) -# move geomean to the end -results.append(results[0]) -del results[0] - - -def printtable(data): - print(""" - - - - - """) - - for r in data: - print(" ".format(*r)) - - print(""" -
Benchmarkgo-toml v1BurntSushi/toml
{}{}{}
""") - - -def match(x): - return "ReferenceFile" in x[0] or "HugoFrontMatter" in x[0] - -above = [x for x in results if match(x)] -below = [x for x in results if not match(x)] - -printtable(above) -print("
See more") -print("""

The table above has the results of the most common use-cases. The table below -contains the results of all benchmarks, including unrealistic ones. It is -provided for completeness.

""") -printtable(below) -print('

This table can be generated with ./ci.sh benchmark -a -html.

') -print("
") - -EOF -} - -benchmark() { - case "$1" in - -d) - shift - target="${1?Need to provide a target branch argument}" - - old=`fmktemp ${target}` - bench "${target}" "${old}" - - new=`fmktemp HEAD` - bench HEAD "${new}" - - benchstat "${old}" "${new}" - return 0 - ;; - -a) - shift - - v2stats=`fmktemp go-toml-v2` - bench HEAD "${v2stats}" "github.com/pelletier/go-toml/v2" - v1stats=`fmktemp go-toml-v1` - bench HEAD "${v1stats}" "github.com/pelletier/go-toml" - bsstats=`fmktemp bs-toml` - bench HEAD "${bsstats}" "github.com/BurntSushi/toml" - - cp "${v2stats}" go-toml-v2.txt - cp "${v1stats}" go-toml-v1.txt - cp "${bsstats}" bs-toml.txt - - if [ "$1" = "-html" ]; then - tmpcsv=`fmktemp csv` - benchstat -csv -geomean go-toml-v2.txt go-toml-v1.txt bs-toml.txt > $tmpcsv - benchstathtml $tmpcsv - else - benchstat -geomean go-toml-v2.txt go-toml-v1.txt bs-toml.txt - fi - - rm -f go-toml-v2.txt go-toml-v1.txt bs-toml.txt - return $? - esac - - bench "${1-HEAD}" `mktemp` -} - -case "$1" in - coverage) shift; coverage $@;; - benchmark) shift; benchmark $@;; - *) usage "bad argument $1";; -esac diff --git a/vendor/github.com/pelletier/go-toml/v2/decode.go b/vendor/github.com/pelletier/go-toml/v2/decode.go deleted file mode 100644 index f0ec3b1..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/decode.go +++ /dev/null @@ -1,550 +0,0 @@ -package toml - -import ( - "fmt" - "math" - "strconv" - "time" - - "github.com/pelletier/go-toml/v2/unstable" -) - -func parseInteger(b []byte) (int64, error) { - if len(b) > 2 && b[0] == '0' { - switch b[1] { - case 'x': - return parseIntHex(b) - case 'b': - return parseIntBin(b) - case 'o': - return parseIntOct(b) - default: - panic(fmt.Errorf("invalid base '%c', should have been checked by scanIntOrFloat", b[1])) - } - } - - return parseIntDec(b) -} - -func parseLocalDate(b []byte) (LocalDate, error) { - // full-date = date-fullyear "-" date-month "-" date-mday - // date-fullyear = 4DIGIT - // date-month = 2DIGIT ; 01-12 - // date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on month/year - var date LocalDate - - if len(b) != 10 || b[4] != '-' || b[7] != '-' { - return date, unstable.NewParserError(b, "dates are expected to have the format YYYY-MM-DD") - } - - var err error - - date.Year, err = parseDecimalDigits(b[0:4]) - if err != nil { - return LocalDate{}, err - } - - date.Month, err = parseDecimalDigits(b[5:7]) - if err != nil { - return LocalDate{}, err - } - - date.Day, err = parseDecimalDigits(b[8:10]) - if err != nil { - return LocalDate{}, err - } - - if !isValidDate(date.Year, date.Month, date.Day) { - return LocalDate{}, unstable.NewParserError(b, "impossible date") - } - - return date, nil -} - -func parseDecimalDigits(b []byte) (int, error) { - v := 0 - - for i, c := range b { - if c < '0' || c > '9' { - return 0, unstable.NewParserError(b[i:i+1], "expected digit (0-9)") - } - v *= 10 - v += int(c - '0') - } - - return v, nil -} - -func parseDateTime(b []byte) (time.Time, error) { - // offset-date-time = full-date time-delim full-time - // full-time = partial-time time-offset - // time-offset = "Z" / time-numoffset - // time-numoffset = ( "+" / "-" ) time-hour ":" time-minute - - dt, b, err := parseLocalDateTime(b) - if err != nil { - return time.Time{}, err - } - - var zone *time.Location - - if len(b) == 0 { - // parser should have checked that when assigning the date time node - panic("date time should have a timezone") - } - - if b[0] == 'Z' || b[0] == 'z' { - b = b[1:] - zone = time.UTC - } else { - const dateTimeByteLen = 6 - if len(b) != dateTimeByteLen { - return time.Time{}, unstable.NewParserError(b, "invalid date-time timezone") - } - var direction int - switch b[0] { - case '-': - direction = -1 - case '+': - direction = +1 - default: - return time.Time{}, unstable.NewParserError(b[:1], "invalid timezone offset character") - } - - if b[3] != ':' { - return time.Time{}, unstable.NewParserError(b[3:4], "expected a : separator") - } - - hours, err := parseDecimalDigits(b[1:3]) - if err != nil { - return time.Time{}, err - } - if hours > 23 { - return time.Time{}, unstable.NewParserError(b[:1], "invalid timezone offset hours") - } - - minutes, err := parseDecimalDigits(b[4:6]) - if err != nil { - return time.Time{}, err - } - if minutes > 59 { - return time.Time{}, unstable.NewParserError(b[:1], "invalid timezone offset minutes") - } - - seconds := direction * (hours*3600 + minutes*60) - if seconds == 0 { - zone = time.UTC - } else { - zone = time.FixedZone("", seconds) - } - b = b[dateTimeByteLen:] - } - - if len(b) > 0 { - return time.Time{}, unstable.NewParserError(b, "extra bytes at the end of the timezone") - } - - t := time.Date( - dt.Year, - time.Month(dt.Month), - dt.Day, - dt.Hour, - dt.Minute, - dt.Second, - dt.Nanosecond, - zone) - - return t, nil -} - -func parseLocalDateTime(b []byte) (LocalDateTime, []byte, error) { - var dt LocalDateTime - - const localDateTimeByteMinLen = 11 - if len(b) < localDateTimeByteMinLen { - return dt, nil, unstable.NewParserError(b, "local datetimes are expected to have the format YYYY-MM-DDTHH:MM:SS[.NNNNNNNNN]") - } - - date, err := parseLocalDate(b[:10]) - if err != nil { - return dt, nil, err - } - dt.LocalDate = date - - sep := b[10] - if sep != 'T' && sep != ' ' && sep != 't' { - return dt, nil, unstable.NewParserError(b[10:11], "datetime separator is expected to be T or a space") - } - - t, rest, err := parseLocalTime(b[11:]) - if err != nil { - return dt, nil, err - } - dt.LocalTime = t - - return dt, rest, nil -} - -// parseLocalTime is a bit different because it also returns the remaining -// []byte that is didn't need. This is to allow parseDateTime to parse those -// remaining bytes as a timezone. -func parseLocalTime(b []byte) (LocalTime, []byte, error) { - var ( - nspow = [10]int{0, 1e8, 1e7, 1e6, 1e5, 1e4, 1e3, 1e2, 1e1, 1e0} - t LocalTime - ) - - // check if b matches to have expected format HH:MM:SS[.NNNNNN] - const localTimeByteLen = 8 - if len(b) < localTimeByteLen { - return t, nil, unstable.NewParserError(b, "times are expected to have the format HH:MM:SS[.NNNNNN]") - } - - var err error - - t.Hour, err = parseDecimalDigits(b[0:2]) - if err != nil { - return t, nil, err - } - - if t.Hour > 23 { - return t, nil, unstable.NewParserError(b[0:2], "hour cannot be greater 23") - } - if b[2] != ':' { - return t, nil, unstable.NewParserError(b[2:3], "expecting colon between hours and minutes") - } - - t.Minute, err = parseDecimalDigits(b[3:5]) - if err != nil { - return t, nil, err - } - if t.Minute > 59 { - return t, nil, unstable.NewParserError(b[3:5], "minutes cannot be greater 59") - } - if b[5] != ':' { - return t, nil, unstable.NewParserError(b[5:6], "expecting colon between minutes and seconds") - } - - t.Second, err = parseDecimalDigits(b[6:8]) - if err != nil { - return t, nil, err - } - - if t.Second > 60 { - return t, nil, unstable.NewParserError(b[6:8], "seconds cannot be greater 60") - } - - b = b[8:] - - if len(b) >= 1 && b[0] == '.' { - frac := 0 - precision := 0 - digits := 0 - - for i, c := range b[1:] { - if !isDigit(c) { - if i == 0 { - return t, nil, unstable.NewParserError(b[0:1], "need at least one digit after fraction point") - } - break - } - digits++ - - const maxFracPrecision = 9 - if i >= maxFracPrecision { - // go-toml allows decoding fractional seconds - // beyond the supported precision of 9 - // digits. It truncates the fractional component - // to the supported precision and ignores the - // remaining digits. - // - // https://github.com/pelletier/go-toml/discussions/707 - continue - } - - frac *= 10 - frac += int(c - '0') - precision++ - } - - if precision == 0 { - return t, nil, unstable.NewParserError(b[:1], "nanoseconds need at least one digit") - } - - t.Nanosecond = frac * nspow[precision] - t.Precision = precision - - return t, b[1+digits:], nil - } - return t, b, nil -} - -//nolint:cyclop -func parseFloat(b []byte) (float64, error) { - if len(b) == 4 && (b[0] == '+' || b[0] == '-') && b[1] == 'n' && b[2] == 'a' && b[3] == 'n' { - return math.NaN(), nil - } - - cleaned, err := checkAndRemoveUnderscoresFloats(b) - if err != nil { - return 0, err - } - - if cleaned[0] == '.' { - return 0, unstable.NewParserError(b, "float cannot start with a dot") - } - - if cleaned[len(cleaned)-1] == '.' { - return 0, unstable.NewParserError(b, "float cannot end with a dot") - } - - dotAlreadySeen := false - for i, c := range cleaned { - if c == '.' { - if dotAlreadySeen { - return 0, unstable.NewParserError(b[i:i+1], "float can have at most one decimal point") - } - if !isDigit(cleaned[i-1]) { - return 0, unstable.NewParserError(b[i-1:i+1], "float decimal point must be preceded by a digit") - } - if !isDigit(cleaned[i+1]) { - return 0, unstable.NewParserError(b[i:i+2], "float decimal point must be followed by a digit") - } - dotAlreadySeen = true - } - } - - start := 0 - if cleaned[0] == '+' || cleaned[0] == '-' { - start = 1 - } - if cleaned[start] == '0' && len(cleaned) > start+1 && isDigit(cleaned[start+1]) { - return 0, unstable.NewParserError(b, "float integer part cannot have leading zeroes") - } - - f, err := strconv.ParseFloat(string(cleaned), 64) - if err != nil { - return 0, unstable.NewParserError(b, "unable to parse float: %w", err) - } - - return f, nil -} - -func parseIntHex(b []byte) (int64, error) { - cleaned, err := checkAndRemoveUnderscoresIntegers(b[2:]) - if err != nil { - return 0, err - } - - i, err := strconv.ParseInt(string(cleaned), 16, 64) - if err != nil { - return 0, unstable.NewParserError(b, "couldn't parse hexadecimal number: %w", err) - } - - return i, nil -} - -func parseIntOct(b []byte) (int64, error) { - cleaned, err := checkAndRemoveUnderscoresIntegers(b[2:]) - if err != nil { - return 0, err - } - - i, err := strconv.ParseInt(string(cleaned), 8, 64) - if err != nil { - return 0, unstable.NewParserError(b, "couldn't parse octal number: %w", err) - } - - return i, nil -} - -func parseIntBin(b []byte) (int64, error) { - cleaned, err := checkAndRemoveUnderscoresIntegers(b[2:]) - if err != nil { - return 0, err - } - - i, err := strconv.ParseInt(string(cleaned), 2, 64) - if err != nil { - return 0, unstable.NewParserError(b, "couldn't parse binary number: %w", err) - } - - return i, nil -} - -func isSign(b byte) bool { - return b == '+' || b == '-' -} - -func parseIntDec(b []byte) (int64, error) { - cleaned, err := checkAndRemoveUnderscoresIntegers(b) - if err != nil { - return 0, err - } - - startIdx := 0 - - if isSign(cleaned[0]) { - startIdx++ - } - - if len(cleaned) > startIdx+1 && cleaned[startIdx] == '0' { - return 0, unstable.NewParserError(b, "leading zero not allowed on decimal number") - } - - i, err := strconv.ParseInt(string(cleaned), 10, 64) - if err != nil { - return 0, unstable.NewParserError(b, "couldn't parse decimal number: %w", err) - } - - return i, nil -} - -func checkAndRemoveUnderscoresIntegers(b []byte) ([]byte, error) { - start := 0 - if b[start] == '+' || b[start] == '-' { - start++ - } - - if len(b) == start { - return b, nil - } - - if b[start] == '_' { - return nil, unstable.NewParserError(b[start:start+1], "number cannot start with underscore") - } - - if b[len(b)-1] == '_' { - return nil, unstable.NewParserError(b[len(b)-1:], "number cannot end with underscore") - } - - // fast path - i := 0 - for ; i < len(b); i++ { - if b[i] == '_' { - break - } - } - if i == len(b) { - return b, nil - } - - before := false - cleaned := make([]byte, i, len(b)) - copy(cleaned, b) - - for i++; i < len(b); i++ { - c := b[i] - if c == '_' { - if !before { - return nil, unstable.NewParserError(b[i-1:i+1], "number must have at least one digit between underscores") - } - before = false - } else { - before = true - cleaned = append(cleaned, c) - } - } - - return cleaned, nil -} - -func checkAndRemoveUnderscoresFloats(b []byte) ([]byte, error) { - if b[0] == '_' { - return nil, unstable.NewParserError(b[0:1], "number cannot start with underscore") - } - - if b[len(b)-1] == '_' { - return nil, unstable.NewParserError(b[len(b)-1:], "number cannot end with underscore") - } - - // fast path - i := 0 - for ; i < len(b); i++ { - if b[i] == '_' { - break - } - } - if i == len(b) { - return b, nil - } - - before := false - cleaned := make([]byte, 0, len(b)) - - for i := 0; i < len(b); i++ { - c := b[i] - - switch c { - case '_': - if !before { - return nil, unstable.NewParserError(b[i-1:i+1], "number must have at least one digit between underscores") - } - if i < len(b)-1 && (b[i+1] == 'e' || b[i+1] == 'E') { - return nil, unstable.NewParserError(b[i+1:i+2], "cannot have underscore before exponent") - } - before = false - case '+', '-': - // signed exponents - cleaned = append(cleaned, c) - before = false - case 'e', 'E': - if i < len(b)-1 && b[i+1] == '_' { - return nil, unstable.NewParserError(b[i+1:i+2], "cannot have underscore after exponent") - } - cleaned = append(cleaned, c) - case '.': - if i < len(b)-1 && b[i+1] == '_' { - return nil, unstable.NewParserError(b[i+1:i+2], "cannot have underscore after decimal point") - } - if i > 0 && b[i-1] == '_' { - return nil, unstable.NewParserError(b[i-1:i], "cannot have underscore before decimal point") - } - cleaned = append(cleaned, c) - default: - before = true - cleaned = append(cleaned, c) - } - } - - return cleaned, nil -} - -// isValidDate checks if a provided date is a date that exists. -func isValidDate(year int, month int, day int) bool { - return month > 0 && month < 13 && day > 0 && day <= daysIn(month, year) -} - -// daysBefore[m] counts the number of days in a non-leap year -// before month m begins. There is an entry for m=12, counting -// the number of days before January of next year (365). -var daysBefore = [...]int32{ - 0, - 31, - 31 + 28, - 31 + 28 + 31, - 31 + 28 + 31 + 30, - 31 + 28 + 31 + 30 + 31, - 31 + 28 + 31 + 30 + 31 + 30, - 31 + 28 + 31 + 30 + 31 + 30 + 31, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31, -} - -func daysIn(m int, year int) int { - if m == 2 && isLeap(year) { - return 29 - } - return int(daysBefore[m] - daysBefore[m-1]) -} - -func isLeap(year int) bool { - return year%4 == 0 && (year%100 != 0 || year%400 == 0) -} - -func isDigit(r byte) bool { - return r >= '0' && r <= '9' -} diff --git a/vendor/github.com/pelletier/go-toml/v2/doc.go b/vendor/github.com/pelletier/go-toml/v2/doc.go deleted file mode 100644 index b7bc599..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package toml is a library to read and write TOML documents. -package toml diff --git a/vendor/github.com/pelletier/go-toml/v2/errors.go b/vendor/github.com/pelletier/go-toml/v2/errors.go deleted file mode 100644 index 309733f..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/errors.go +++ /dev/null @@ -1,252 +0,0 @@ -package toml - -import ( - "fmt" - "strconv" - "strings" - - "github.com/pelletier/go-toml/v2/internal/danger" - "github.com/pelletier/go-toml/v2/unstable" -) - -// DecodeError represents an error encountered during the parsing or decoding -// of a TOML document. -// -// In addition to the error message, it contains the position in the document -// where it happened, as well as a human-readable representation that shows -// where the error occurred in the document. -type DecodeError struct { - message string - line int - column int - key Key - - human string -} - -// StrictMissingError occurs in a TOML document that does not have a -// corresponding field in the target value. It contains all the missing fields -// in Errors. -// -// Emitted by Decoder when DisallowUnknownFields() was called. -type StrictMissingError struct { - // One error per field that could not be found. - Errors []DecodeError -} - -// Error returns the canonical string for this error. -func (s *StrictMissingError) Error() string { - return "strict mode: fields in the document are missing in the target struct" -} - -// String returns a human readable description of all errors. -func (s *StrictMissingError) String() string { - var buf strings.Builder - - for i, e := range s.Errors { - if i > 0 { - buf.WriteString("\n---\n") - } - - buf.WriteString(e.String()) - } - - return buf.String() -} - -type Key []string - -// Error returns the error message contained in the DecodeError. -func (e *DecodeError) Error() string { - return "toml: " + e.message -} - -// String returns the human-readable contextualized error. This string is multi-line. -func (e *DecodeError) String() string { - return e.human -} - -// Position returns the (line, column) pair indicating where the error -// occurred in the document. Positions are 1-indexed. -func (e *DecodeError) Position() (row int, column int) { - return e.line, e.column -} - -// Key that was being processed when the error occurred. The key is present only -// if this DecodeError is part of a StrictMissingError. -func (e *DecodeError) Key() Key { - return e.key -} - -// decodeErrorFromHighlight creates a DecodeError referencing a highlighted -// range of bytes from document. -// -// highlight needs to be a sub-slice of document, or this function panics. -// -// The function copies all bytes used in DecodeError, so that document and -// highlight can be freely deallocated. -// -//nolint:funlen -func wrapDecodeError(document []byte, de *unstable.ParserError) *DecodeError { - offset := danger.SubsliceOffset(document, de.Highlight) - - errMessage := de.Error() - errLine, errColumn := positionAtEnd(document[:offset]) - before, after := linesOfContext(document, de.Highlight, offset, 3) - - var buf strings.Builder - - maxLine := errLine + len(after) - 1 - lineColumnWidth := len(strconv.Itoa(maxLine)) - - // Write the lines of context strictly before the error. - for i := len(before) - 1; i > 0; i-- { - line := errLine - i - buf.WriteString(formatLineNumber(line, lineColumnWidth)) - buf.WriteString("|") - - if len(before[i]) > 0 { - buf.WriteString(" ") - buf.Write(before[i]) - } - - buf.WriteRune('\n') - } - - // Write the document line that contains the error. - - buf.WriteString(formatLineNumber(errLine, lineColumnWidth)) - buf.WriteString("| ") - - if len(before) > 0 { - buf.Write(before[0]) - } - - buf.Write(de.Highlight) - - if len(after) > 0 { - buf.Write(after[0]) - } - - buf.WriteRune('\n') - - // Write the line with the error message itself (so it does not have a line - // number). - - buf.WriteString(strings.Repeat(" ", lineColumnWidth)) - buf.WriteString("| ") - - if len(before) > 0 { - buf.WriteString(strings.Repeat(" ", len(before[0]))) - } - - buf.WriteString(strings.Repeat("~", len(de.Highlight))) - - if len(errMessage) > 0 { - buf.WriteString(" ") - buf.WriteString(errMessage) - } - - // Write the lines of context strictly after the error. - - for i := 1; i < len(after); i++ { - buf.WriteRune('\n') - line := errLine + i - buf.WriteString(formatLineNumber(line, lineColumnWidth)) - buf.WriteString("|") - - if len(after[i]) > 0 { - buf.WriteString(" ") - buf.Write(after[i]) - } - } - - return &DecodeError{ - message: errMessage, - line: errLine, - column: errColumn, - key: de.Key, - human: buf.String(), - } -} - -func formatLineNumber(line int, width int) string { - format := "%" + strconv.Itoa(width) + "d" - - return fmt.Sprintf(format, line) -} - -func linesOfContext(document []byte, highlight []byte, offset int, linesAround int) ([][]byte, [][]byte) { - return beforeLines(document, offset, linesAround), afterLines(document, highlight, offset, linesAround) -} - -func beforeLines(document []byte, offset int, linesAround int) [][]byte { - var beforeLines [][]byte - - // Walk the document backward from the highlight to find previous lines - // of context. - rest := document[:offset] -backward: - for o := len(rest) - 1; o >= 0 && len(beforeLines) <= linesAround && len(rest) > 0; { - switch { - case rest[o] == '\n': - // handle individual lines - beforeLines = append(beforeLines, rest[o+1:]) - rest = rest[:o] - o = len(rest) - 1 - case o == 0: - // add the first line only if it's non-empty - beforeLines = append(beforeLines, rest) - - break backward - default: - o-- - } - } - - return beforeLines -} - -func afterLines(document []byte, highlight []byte, offset int, linesAround int) [][]byte { - var afterLines [][]byte - - // Walk the document forward from the highlight to find the following - // lines of context. - rest := document[offset+len(highlight):] -forward: - for o := 0; o < len(rest) && len(afterLines) <= linesAround; { - switch { - case rest[o] == '\n': - // handle individual lines - afterLines = append(afterLines, rest[:o]) - rest = rest[o+1:] - o = 0 - - case o == len(rest)-1: - // add last line only if it's non-empty - afterLines = append(afterLines, rest) - - break forward - default: - o++ - } - } - - return afterLines -} - -func positionAtEnd(b []byte) (row int, column int) { - row = 1 - column = 1 - - for _, c := range b { - if c == '\n' { - row++ - column = 1 - } else { - column++ - } - } - - return -} diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/characters/ascii.go b/vendor/github.com/pelletier/go-toml/v2/internal/characters/ascii.go deleted file mode 100644 index 80f698d..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/internal/characters/ascii.go +++ /dev/null @@ -1,42 +0,0 @@ -package characters - -var invalidAsciiTable = [256]bool{ - 0x00: true, - 0x01: true, - 0x02: true, - 0x03: true, - 0x04: true, - 0x05: true, - 0x06: true, - 0x07: true, - 0x08: true, - // 0x09 TAB - // 0x0A LF - 0x0B: true, - 0x0C: true, - // 0x0D CR - 0x0E: true, - 0x0F: true, - 0x10: true, - 0x11: true, - 0x12: true, - 0x13: true, - 0x14: true, - 0x15: true, - 0x16: true, - 0x17: true, - 0x18: true, - 0x19: true, - 0x1A: true, - 0x1B: true, - 0x1C: true, - 0x1D: true, - 0x1E: true, - 0x1F: true, - // 0x20 - 0x7E Printable ASCII characters - 0x7F: true, -} - -func InvalidAscii(b byte) bool { - return invalidAsciiTable[b] -} diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/characters/utf8.go b/vendor/github.com/pelletier/go-toml/v2/internal/characters/utf8.go deleted file mode 100644 index db4f45a..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/internal/characters/utf8.go +++ /dev/null @@ -1,199 +0,0 @@ -package characters - -import ( - "unicode/utf8" -) - -type utf8Err struct { - Index int - Size int -} - -func (u utf8Err) Zero() bool { - return u.Size == 0 -} - -// Verified that a given string is only made of valid UTF-8 characters allowed -// by the TOML spec: -// -// Any Unicode character may be used except those that must be escaped: -// quotation mark, backslash, and the control characters other than tab (U+0000 -// to U+0008, U+000A to U+001F, U+007F). -// -// It is a copy of the Go 1.17 utf8.Valid implementation, tweaked to exit early -// when a character is not allowed. -// -// The returned utf8Err is Zero() if the string is valid, or contains the byte -// index and size of the invalid character. -// -// quotation mark => already checked -// backslash => already checked -// 0-0x8 => invalid -// 0x9 => tab, ok -// 0xA - 0x1F => invalid -// 0x7F => invalid -func Utf8TomlValidAlreadyEscaped(p []byte) (err utf8Err) { - // Fast path. Check for and skip 8 bytes of ASCII characters per iteration. - offset := 0 - for len(p) >= 8 { - // Combining two 32 bit loads allows the same code to be used - // for 32 and 64 bit platforms. - // The compiler can generate a 32bit load for first32 and second32 - // on many platforms. See test/codegen/memcombine.go. - first32 := uint32(p[0]) | uint32(p[1])<<8 | uint32(p[2])<<16 | uint32(p[3])<<24 - second32 := uint32(p[4]) | uint32(p[5])<<8 | uint32(p[6])<<16 | uint32(p[7])<<24 - if (first32|second32)&0x80808080 != 0 { - // Found a non ASCII byte (>= RuneSelf). - break - } - - for i, b := range p[:8] { - if InvalidAscii(b) { - err.Index = offset + i - err.Size = 1 - return - } - } - - p = p[8:] - offset += 8 - } - n := len(p) - for i := 0; i < n; { - pi := p[i] - if pi < utf8.RuneSelf { - if InvalidAscii(pi) { - err.Index = offset + i - err.Size = 1 - return - } - i++ - continue - } - x := first[pi] - if x == xx { - // Illegal starter byte. - err.Index = offset + i - err.Size = 1 - return - } - size := int(x & 7) - if i+size > n { - // Short or invalid. - err.Index = offset + i - err.Size = n - i - return - } - accept := acceptRanges[x>>4] - if c := p[i+1]; c < accept.lo || accept.hi < c { - err.Index = offset + i - err.Size = 2 - return - } else if size == 2 { - } else if c := p[i+2]; c < locb || hicb < c { - err.Index = offset + i - err.Size = 3 - return - } else if size == 3 { - } else if c := p[i+3]; c < locb || hicb < c { - err.Index = offset + i - err.Size = 4 - return - } - i += size - } - return -} - -// Return the size of the next rune if valid, 0 otherwise. -func Utf8ValidNext(p []byte) int { - c := p[0] - - if c < utf8.RuneSelf { - if InvalidAscii(c) { - return 0 - } - return 1 - } - - x := first[c] - if x == xx { - // Illegal starter byte. - return 0 - } - size := int(x & 7) - if size > len(p) { - // Short or invalid. - return 0 - } - accept := acceptRanges[x>>4] - if c := p[1]; c < accept.lo || accept.hi < c { - return 0 - } else if size == 2 { - } else if c := p[2]; c < locb || hicb < c { - return 0 - } else if size == 3 { - } else if c := p[3]; c < locb || hicb < c { - return 0 - } - - return size -} - -// acceptRange gives the range of valid values for the second byte in a UTF-8 -// sequence. -type acceptRange struct { - lo uint8 // lowest value for second byte. - hi uint8 // highest value for second byte. -} - -// acceptRanges has size 16 to avoid bounds checks in the code that uses it. -var acceptRanges = [16]acceptRange{ - 0: {locb, hicb}, - 1: {0xA0, hicb}, - 2: {locb, 0x9F}, - 3: {0x90, hicb}, - 4: {locb, 0x8F}, -} - -// first is information about the first byte in a UTF-8 sequence. -var first = [256]uint8{ - // 1 2 3 4 5 6 7 8 9 A B C D E F - as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x00-0x0F - as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x10-0x1F - as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x20-0x2F - as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x30-0x3F - as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x40-0x4F - as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x50-0x5F - as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x60-0x6F - as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x70-0x7F - // 1 2 3 4 5 6 7 8 9 A B C D E F - xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0x80-0x8F - xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0x90-0x9F - xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0xA0-0xAF - xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0xB0-0xBF - xx, xx, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, // 0xC0-0xCF - s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, // 0xD0-0xDF - s2, s3, s3, s3, s3, s3, s3, s3, s3, s3, s3, s3, s3, s4, s3, s3, // 0xE0-0xEF - s5, s6, s6, s6, s7, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0xF0-0xFF -} - -const ( - // The default lowest and highest continuation byte. - locb = 0b10000000 - hicb = 0b10111111 - - // These names of these constants are chosen to give nice alignment in the - // table below. The first nibble is an index into acceptRanges or F for - // special one-byte cases. The second nibble is the Rune length or the - // Status for the special one-byte case. - xx = 0xF1 // invalid: size 1 - as = 0xF0 // ASCII: size 1 - s1 = 0x02 // accept 0, size 2 - s2 = 0x13 // accept 1, size 3 - s3 = 0x03 // accept 0, size 3 - s4 = 0x23 // accept 2, size 3 - s5 = 0x34 // accept 3, size 4 - s6 = 0x04 // accept 0, size 4 - s7 = 0x44 // accept 4, size 4 -) diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/danger/danger.go b/vendor/github.com/pelletier/go-toml/v2/internal/danger/danger.go deleted file mode 100644 index e38e113..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/internal/danger/danger.go +++ /dev/null @@ -1,65 +0,0 @@ -package danger - -import ( - "fmt" - "reflect" - "unsafe" -) - -const maxInt = uintptr(int(^uint(0) >> 1)) - -func SubsliceOffset(data []byte, subslice []byte) int { - datap := (*reflect.SliceHeader)(unsafe.Pointer(&data)) - hlp := (*reflect.SliceHeader)(unsafe.Pointer(&subslice)) - - if hlp.Data < datap.Data { - panic(fmt.Errorf("subslice address (%d) is before data address (%d)", hlp.Data, datap.Data)) - } - offset := hlp.Data - datap.Data - - if offset > maxInt { - panic(fmt.Errorf("slice offset larger than int (%d)", offset)) - } - - intoffset := int(offset) - - if intoffset > datap.Len { - panic(fmt.Errorf("slice offset (%d) is farther than data length (%d)", intoffset, datap.Len)) - } - - if intoffset+hlp.Len > datap.Len { - panic(fmt.Errorf("slice ends (%d+%d) is farther than data length (%d)", intoffset, hlp.Len, datap.Len)) - } - - return intoffset -} - -func BytesRange(start []byte, end []byte) []byte { - if start == nil || end == nil { - panic("cannot call BytesRange with nil") - } - startp := (*reflect.SliceHeader)(unsafe.Pointer(&start)) - endp := (*reflect.SliceHeader)(unsafe.Pointer(&end)) - - if startp.Data > endp.Data { - panic(fmt.Errorf("start pointer address (%d) is after end pointer address (%d)", startp.Data, endp.Data)) - } - - l := startp.Len - endLen := int(endp.Data-startp.Data) + endp.Len - if endLen > l { - l = endLen - } - - if l > startp.Cap { - panic(fmt.Errorf("range length is larger than capacity")) - } - - return start[:l] -} - -func Stride(ptr unsafe.Pointer, size uintptr, offset int) unsafe.Pointer { - // TODO: replace with unsafe.Add when Go 1.17 is released - // https://github.com/golang/go/issues/40481 - return unsafe.Pointer(uintptr(ptr) + uintptr(int(size)*offset)) -} diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/danger/typeid.go b/vendor/github.com/pelletier/go-toml/v2/internal/danger/typeid.go deleted file mode 100644 index 9d41c28..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/internal/danger/typeid.go +++ /dev/null @@ -1,23 +0,0 @@ -package danger - -import ( - "reflect" - "unsafe" -) - -// typeID is used as key in encoder and decoder caches to enable using -// the optimize runtime.mapaccess2_fast64 function instead of the more -// expensive lookup if we were to use reflect.Type as map key. -// -// typeID holds the pointer to the reflect.Type value, which is unique -// in the program. -// -// https://github.com/segmentio/encoding/blob/master/json/codec.go#L59-L61 -type TypeID unsafe.Pointer - -func MakeTypeID(t reflect.Type) TypeID { - // reflect.Type has the fields: - // typ unsafe.Pointer - // ptr unsafe.Pointer - return TypeID((*[2]unsafe.Pointer)(unsafe.Pointer(&t))[1]) -} diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/key.go b/vendor/github.com/pelletier/go-toml/v2/internal/tracker/key.go deleted file mode 100644 index 149b17f..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/key.go +++ /dev/null @@ -1,48 +0,0 @@ -package tracker - -import "github.com/pelletier/go-toml/v2/unstable" - -// KeyTracker is a tracker that keeps track of the current Key as the AST is -// walked. -type KeyTracker struct { - k []string -} - -// UpdateTable sets the state of the tracker with the AST table node. -func (t *KeyTracker) UpdateTable(node *unstable.Node) { - t.reset() - t.Push(node) -} - -// UpdateArrayTable sets the state of the tracker with the AST array table node. -func (t *KeyTracker) UpdateArrayTable(node *unstable.Node) { - t.reset() - t.Push(node) -} - -// Push the given key on the stack. -func (t *KeyTracker) Push(node *unstable.Node) { - it := node.Key() - for it.Next() { - t.k = append(t.k, string(it.Node().Data)) - } -} - -// Pop key from stack. -func (t *KeyTracker) Pop(node *unstable.Node) { - it := node.Key() - for it.Next() { - t.k = t.k[:len(t.k)-1] - } -} - -// Key returns the current key -func (t *KeyTracker) Key() []string { - k := make([]string, len(t.k)) - copy(k, t.k) - return k -} - -func (t *KeyTracker) reset() { - t.k = t.k[:0] -} diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/seen.go b/vendor/github.com/pelletier/go-toml/v2/internal/tracker/seen.go deleted file mode 100644 index 40e23f8..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/seen.go +++ /dev/null @@ -1,356 +0,0 @@ -package tracker - -import ( - "bytes" - "fmt" - "sync" - - "github.com/pelletier/go-toml/v2/unstable" -) - -type keyKind uint8 - -const ( - invalidKind keyKind = iota - valueKind - tableKind - arrayTableKind -) - -func (k keyKind) String() string { - switch k { - case invalidKind: - return "invalid" - case valueKind: - return "value" - case tableKind: - return "table" - case arrayTableKind: - return "array table" - } - panic("missing keyKind string mapping") -} - -// SeenTracker tracks which keys have been seen with which TOML type to flag -// duplicates and mismatches according to the spec. -// -// Each node in the visited tree is represented by an entry. Each entry has an -// identifier, which is provided by a counter. Entries are stored in the array -// entries. As new nodes are discovered (referenced for the first time in the -// TOML document), entries are created and appended to the array. An entry -// points to its parent using its id. -// -// To find whether a given key (sequence of []byte) has already been visited, -// the entries are linearly searched, looking for one with the right name and -// parent id. -// -// Given that all keys appear in the document after their parent, it is -// guaranteed that all descendants of a node are stored after the node, this -// speeds up the search process. -// -// When encountering [[array tables]], the descendants of that node are removed -// to allow that branch of the tree to be "rediscovered". To maintain the -// invariant above, the deletion process needs to keep the order of entries. -// This results in more copies in that case. -type SeenTracker struct { - entries []entry - currentIdx int -} - -var pool sync.Pool - -func (s *SeenTracker) reset() { - // Always contains a root element at index 0. - s.currentIdx = 0 - if len(s.entries) == 0 { - s.entries = make([]entry, 1, 2) - } else { - s.entries = s.entries[:1] - } - s.entries[0].child = -1 - s.entries[0].next = -1 -} - -type entry struct { - // Use -1 to indicate no child or no sibling. - child int - next int - - name []byte - kind keyKind - explicit bool - kv bool -} - -// Find the index of the child of parentIdx with key k. Returns -1 if -// it does not exist. -func (s *SeenTracker) find(parentIdx int, k []byte) int { - for i := s.entries[parentIdx].child; i >= 0; i = s.entries[i].next { - if bytes.Equal(s.entries[i].name, k) { - return i - } - } - return -1 -} - -// Remove all descendants of node at position idx. -func (s *SeenTracker) clear(idx int) { - if idx >= len(s.entries) { - return - } - - for i := s.entries[idx].child; i >= 0; { - next := s.entries[i].next - n := s.entries[0].next - s.entries[0].next = i - s.entries[i].next = n - s.entries[i].name = nil - s.clear(i) - i = next - } - - s.entries[idx].child = -1 -} - -func (s *SeenTracker) create(parentIdx int, name []byte, kind keyKind, explicit bool, kv bool) int { - e := entry{ - child: -1, - next: s.entries[parentIdx].child, - - name: name, - kind: kind, - explicit: explicit, - kv: kv, - } - var idx int - if s.entries[0].next >= 0 { - idx = s.entries[0].next - s.entries[0].next = s.entries[idx].next - s.entries[idx] = e - } else { - idx = len(s.entries) - s.entries = append(s.entries, e) - } - - s.entries[parentIdx].child = idx - - return idx -} - -func (s *SeenTracker) setExplicitFlag(parentIdx int) { - for i := s.entries[parentIdx].child; i >= 0; i = s.entries[i].next { - if s.entries[i].kv { - s.entries[i].explicit = true - s.entries[i].kv = false - } - s.setExplicitFlag(i) - } -} - -// CheckExpression takes a top-level node and checks that it does not contain -// keys that have been seen in previous calls, and validates that types are -// consistent. -func (s *SeenTracker) CheckExpression(node *unstable.Node) error { - if s.entries == nil { - s.reset() - } - switch node.Kind { - case unstable.KeyValue: - return s.checkKeyValue(node) - case unstable.Table: - return s.checkTable(node) - case unstable.ArrayTable: - return s.checkArrayTable(node) - default: - panic(fmt.Errorf("this should not be a top level node type: %s", node.Kind)) - } -} - -func (s *SeenTracker) checkTable(node *unstable.Node) error { - if s.currentIdx >= 0 { - s.setExplicitFlag(s.currentIdx) - } - - it := node.Key() - - parentIdx := 0 - - // This code is duplicated in checkArrayTable. This is because factoring - // it in a function requires to copy the iterator, or allocate it to the - // heap, which is not cheap. - for it.Next() { - if it.IsLast() { - break - } - - k := it.Node().Data - - idx := s.find(parentIdx, k) - - if idx < 0 { - idx = s.create(parentIdx, k, tableKind, false, false) - } else { - entry := s.entries[idx] - if entry.kind == valueKind { - return fmt.Errorf("toml: expected %s to be a table, not a %s", string(k), entry.kind) - } - } - parentIdx = idx - } - - k := it.Node().Data - idx := s.find(parentIdx, k) - - if idx >= 0 { - kind := s.entries[idx].kind - if kind != tableKind { - return fmt.Errorf("toml: key %s should be a table, not a %s", string(k), kind) - } - if s.entries[idx].explicit { - return fmt.Errorf("toml: table %s already exists", string(k)) - } - s.entries[idx].explicit = true - } else { - idx = s.create(parentIdx, k, tableKind, true, false) - } - - s.currentIdx = idx - - return nil -} - -func (s *SeenTracker) checkArrayTable(node *unstable.Node) error { - if s.currentIdx >= 0 { - s.setExplicitFlag(s.currentIdx) - } - - it := node.Key() - - parentIdx := 0 - - for it.Next() { - if it.IsLast() { - break - } - - k := it.Node().Data - - idx := s.find(parentIdx, k) - - if idx < 0 { - idx = s.create(parentIdx, k, tableKind, false, false) - } else { - entry := s.entries[idx] - if entry.kind == valueKind { - return fmt.Errorf("toml: expected %s to be a table, not a %s", string(k), entry.kind) - } - } - - parentIdx = idx - } - - k := it.Node().Data - idx := s.find(parentIdx, k) - - if idx >= 0 { - kind := s.entries[idx].kind - if kind != arrayTableKind { - return fmt.Errorf("toml: key %s already exists as a %s, but should be an array table", kind, string(k)) - } - s.clear(idx) - } else { - idx = s.create(parentIdx, k, arrayTableKind, true, false) - } - - s.currentIdx = idx - - return nil -} - -func (s *SeenTracker) checkKeyValue(node *unstable.Node) error { - parentIdx := s.currentIdx - it := node.Key() - - for it.Next() { - k := it.Node().Data - - idx := s.find(parentIdx, k) - - if idx < 0 { - idx = s.create(parentIdx, k, tableKind, false, true) - } else { - entry := s.entries[idx] - if it.IsLast() { - return fmt.Errorf("toml: key %s is already defined", string(k)) - } else if entry.kind != tableKind { - return fmt.Errorf("toml: expected %s to be a table, not a %s", string(k), entry.kind) - } else if entry.explicit { - return fmt.Errorf("toml: cannot redefine table %s that has already been explicitly defined", string(k)) - } - } - - parentIdx = idx - } - - s.entries[parentIdx].kind = valueKind - - value := node.Value() - - switch value.Kind { - case unstable.InlineTable: - return s.checkInlineTable(value) - case unstable.Array: - return s.checkArray(value) - } - - return nil -} - -func (s *SeenTracker) checkArray(node *unstable.Node) error { - it := node.Children() - for it.Next() { - n := it.Node() - switch n.Kind { - case unstable.InlineTable: - err := s.checkInlineTable(n) - if err != nil { - return err - } - case unstable.Array: - err := s.checkArray(n) - if err != nil { - return err - } - } - } - return nil -} - -func (s *SeenTracker) checkInlineTable(node *unstable.Node) error { - if pool.New == nil { - pool.New = func() interface{} { - return &SeenTracker{} - } - } - - s = pool.Get().(*SeenTracker) - s.reset() - - it := node.Children() - for it.Next() { - n := it.Node() - err := s.checkKeyValue(n) - if err != nil { - return err - } - } - - // As inline tables are self-contained, the tracker does not - // need to retain the details of what they contain. The - // keyValue element that creates the inline table is kept to - // mark the presence of the inline table and prevent - // redefinition of its keys: check* functions cannot walk into - // a value. - pool.Put(s) - return nil -} diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/tracker.go b/vendor/github.com/pelletier/go-toml/v2/internal/tracker/tracker.go deleted file mode 100644 index bf03173..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/tracker.go +++ /dev/null @@ -1 +0,0 @@ -package tracker diff --git a/vendor/github.com/pelletier/go-toml/v2/localtime.go b/vendor/github.com/pelletier/go-toml/v2/localtime.go deleted file mode 100644 index a856bfd..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/localtime.go +++ /dev/null @@ -1,122 +0,0 @@ -package toml - -import ( - "fmt" - "strings" - "time" - - "github.com/pelletier/go-toml/v2/unstable" -) - -// LocalDate represents a calendar day in no specific timezone. -type LocalDate struct { - Year int - Month int - Day int -} - -// AsTime converts d into a specific time instance at midnight in zone. -func (d LocalDate) AsTime(zone *time.Location) time.Time { - return time.Date(d.Year, time.Month(d.Month), d.Day, 0, 0, 0, 0, zone) -} - -// String returns RFC 3339 representation of d. -func (d LocalDate) String() string { - return fmt.Sprintf("%04d-%02d-%02d", d.Year, d.Month, d.Day) -} - -// MarshalText returns RFC 3339 representation of d. -func (d LocalDate) MarshalText() ([]byte, error) { - return []byte(d.String()), nil -} - -// UnmarshalText parses b using RFC 3339 to fill d. -func (d *LocalDate) UnmarshalText(b []byte) error { - res, err := parseLocalDate(b) - if err != nil { - return err - } - *d = res - return nil -} - -// LocalTime represents a time of day of no specific day in no specific -// timezone. -type LocalTime struct { - Hour int // Hour of the day: [0; 24[ - Minute int // Minute of the hour: [0; 60[ - Second int // Second of the minute: [0; 60[ - Nanosecond int // Nanoseconds within the second: [0, 1000000000[ - Precision int // Number of digits to display for Nanosecond. -} - -// String returns RFC 3339 representation of d. -// If d.Nanosecond and d.Precision are zero, the time won't have a nanosecond -// component. If d.Nanosecond > 0 but d.Precision = 0, then the minimum number -// of digits for nanoseconds is provided. -func (d LocalTime) String() string { - s := fmt.Sprintf("%02d:%02d:%02d", d.Hour, d.Minute, d.Second) - - if d.Precision > 0 { - s += fmt.Sprintf(".%09d", d.Nanosecond)[:d.Precision+1] - } else if d.Nanosecond > 0 { - // Nanoseconds are specified, but precision is not provided. Use the - // minimum. - s += strings.Trim(fmt.Sprintf(".%09d", d.Nanosecond), "0") - } - - return s -} - -// MarshalText returns RFC 3339 representation of d. -func (d LocalTime) MarshalText() ([]byte, error) { - return []byte(d.String()), nil -} - -// UnmarshalText parses b using RFC 3339 to fill d. -func (d *LocalTime) UnmarshalText(b []byte) error { - res, left, err := parseLocalTime(b) - if err == nil && len(left) != 0 { - err = unstable.NewParserError(left, "extra characters") - } - if err != nil { - return err - } - *d = res - return nil -} - -// LocalDateTime represents a time of a specific day in no specific timezone. -type LocalDateTime struct { - LocalDate - LocalTime -} - -// AsTime converts d into a specific time instance in zone. -func (d LocalDateTime) AsTime(zone *time.Location) time.Time { - return time.Date(d.Year, time.Month(d.Month), d.Day, d.Hour, d.Minute, d.Second, d.Nanosecond, zone) -} - -// String returns RFC 3339 representation of d. -func (d LocalDateTime) String() string { - return d.LocalDate.String() + "T" + d.LocalTime.String() -} - -// MarshalText returns RFC 3339 representation of d. -func (d LocalDateTime) MarshalText() ([]byte, error) { - return []byte(d.String()), nil -} - -// UnmarshalText parses b using RFC 3339 to fill d. -func (d *LocalDateTime) UnmarshalText(data []byte) error { - res, left, err := parseLocalDateTime(data) - if err == nil && len(left) != 0 { - err = unstable.NewParserError(left, "extra characters") - } - if err != nil { - return err - } - - *d = res - return nil -} diff --git a/vendor/github.com/pelletier/go-toml/v2/marshaler.go b/vendor/github.com/pelletier/go-toml/v2/marshaler.go deleted file mode 100644 index 6fe7853..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/marshaler.go +++ /dev/null @@ -1,1090 +0,0 @@ -package toml - -import ( - "bytes" - "encoding" - "fmt" - "io" - "math" - "reflect" - "sort" - "strconv" - "strings" - "time" - "unicode" - - "github.com/pelletier/go-toml/v2/internal/characters" -) - -// Marshal serializes a Go value as a TOML document. -// -// It is a shortcut for Encoder.Encode() with the default options. -func Marshal(v interface{}) ([]byte, error) { - var buf bytes.Buffer - enc := NewEncoder(&buf) - - err := enc.Encode(v) - if err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -// Encoder writes a TOML document to an output stream. -type Encoder struct { - // output - w io.Writer - - // global settings - tablesInline bool - arraysMultiline bool - indentSymbol string - indentTables bool -} - -// NewEncoder returns a new Encoder that writes to w. -func NewEncoder(w io.Writer) *Encoder { - return &Encoder{ - w: w, - indentSymbol: " ", - } -} - -// SetTablesInline forces the encoder to emit all tables inline. -// -// This behavior can be controlled on an individual struct field basis with the -// inline tag: -// -// MyField `toml:",inline"` -func (enc *Encoder) SetTablesInline(inline bool) *Encoder { - enc.tablesInline = inline - return enc -} - -// SetArraysMultiline forces the encoder to emit all arrays with one element per -// line. -// -// This behavior can be controlled on an individual struct field basis with the multiline tag: -// -// MyField `multiline:"true"` -func (enc *Encoder) SetArraysMultiline(multiline bool) *Encoder { - enc.arraysMultiline = multiline - return enc -} - -// SetIndentSymbol defines the string that should be used for indentation. The -// provided string is repeated for each indentation level. Defaults to two -// spaces. -func (enc *Encoder) SetIndentSymbol(s string) *Encoder { - enc.indentSymbol = s - return enc -} - -// SetIndentTables forces the encoder to intent tables and array tables. -func (enc *Encoder) SetIndentTables(indent bool) *Encoder { - enc.indentTables = indent - return enc -} - -// Encode writes a TOML representation of v to the stream. -// -// If v cannot be represented to TOML it returns an error. -// -// # Encoding rules -// -// A top level slice containing only maps or structs is encoded as [[table -// array]]. -// -// All slices not matching rule 1 are encoded as [array]. As a result, any map -// or struct they contain is encoded as an {inline table}. -// -// Nil interfaces and nil pointers are not supported. -// -// Keys in key-values always have one part. -// -// Intermediate tables are always printed. -// -// By default, strings are encoded as literal string, unless they contain either -// a newline character or a single quote. In that case they are emitted as -// quoted strings. -// -// Unsigned integers larger than math.MaxInt64 cannot be encoded. Doing so -// results in an error. This rule exists because the TOML specification only -// requires parsers to support at least the 64 bits integer range. Allowing -// larger numbers would create non-standard TOML documents, which may not be -// readable (at best) by other implementations. To encode such numbers, a -// solution is a custom type that implements encoding.TextMarshaler. -// -// When encoding structs, fields are encoded in order of definition, with their -// exact name. -// -// Tables and array tables are separated by empty lines. However, consecutive -// subtables definitions are not. For example: -// -// [top1] -// -// [top2] -// [top2.child1] -// -// [[array]] -// -// [[array]] -// [array.child2] -// -// # Struct tags -// -// The encoding of each public struct field can be customized by the format -// string in the "toml" key of the struct field's tag. This follows -// encoding/json's convention. The format string starts with the name of the -// field, optionally followed by a comma-separated list of options. The name may -// be empty in order to provide options without overriding the default name. -// -// The "multiline" option emits strings as quoted multi-line TOML strings. It -// has no effect on fields that would not be encoded as strings. -// -// The "inline" option turns fields that would be emitted as tables into inline -// tables instead. It has no effect on other fields. -// -// The "omitempty" option prevents empty values or groups from being emitted. -// -// The "commented" option prefixes the value and all its children with a comment -// symbol. -// -// In addition to the "toml" tag struct tag, a "comment" tag can be used to emit -// a TOML comment before the value being annotated. Comments are ignored inside -// inline tables. For array tables, the comment is only present before the first -// element of the array. -func (enc *Encoder) Encode(v interface{}) error { - var ( - b []byte - ctx encoderCtx - ) - - ctx.inline = enc.tablesInline - - if v == nil { - return fmt.Errorf("toml: cannot encode a nil interface") - } - - b, err := enc.encode(b, ctx, reflect.ValueOf(v)) - if err != nil { - return err - } - - _, err = enc.w.Write(b) - if err != nil { - return fmt.Errorf("toml: cannot write: %w", err) - } - - return nil -} - -type valueOptions struct { - multiline bool - omitempty bool - commented bool - comment string -} - -type encoderCtx struct { - // Current top-level key. - parentKey []string - - // Key that should be used for a KV. - key string - // Extra flag to account for the empty string - hasKey bool - - // Set to true to indicate that the encoder is inside a KV, so that all - // tables need to be inlined. - insideKv bool - - // Set to true to skip the first table header in an array table. - skipTableHeader bool - - // Should the next table be encoded as inline - inline bool - - // Indentation level - indent int - - // Prefix the current value with a comment. - commented bool - - // Options coming from struct tags - options valueOptions -} - -func (ctx *encoderCtx) shiftKey() { - if ctx.hasKey { - ctx.parentKey = append(ctx.parentKey, ctx.key) - ctx.clearKey() - } -} - -func (ctx *encoderCtx) setKey(k string) { - ctx.key = k - ctx.hasKey = true -} - -func (ctx *encoderCtx) clearKey() { - ctx.key = "" - ctx.hasKey = false -} - -func (ctx *encoderCtx) isRoot() bool { - return len(ctx.parentKey) == 0 && !ctx.hasKey -} - -func (enc *Encoder) encode(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) { - i := v.Interface() - - switch x := i.(type) { - case time.Time: - if x.Nanosecond() > 0 { - return x.AppendFormat(b, time.RFC3339Nano), nil - } - return x.AppendFormat(b, time.RFC3339), nil - case LocalTime: - return append(b, x.String()...), nil - case LocalDate: - return append(b, x.String()...), nil - case LocalDateTime: - return append(b, x.String()...), nil - } - - hasTextMarshaler := v.Type().Implements(textMarshalerType) - if hasTextMarshaler || (v.CanAddr() && reflect.PtrTo(v.Type()).Implements(textMarshalerType)) { - if !hasTextMarshaler { - v = v.Addr() - } - - if ctx.isRoot() { - return nil, fmt.Errorf("toml: type %s implementing the TextMarshaler interface cannot be a root element", v.Type()) - } - - text, err := v.Interface().(encoding.TextMarshaler).MarshalText() - if err != nil { - return nil, err - } - - b = enc.encodeString(b, string(text), ctx.options) - - return b, nil - } - - switch v.Kind() { - // containers - case reflect.Map: - return enc.encodeMap(b, ctx, v) - case reflect.Struct: - return enc.encodeStruct(b, ctx, v) - case reflect.Slice, reflect.Array: - return enc.encodeSlice(b, ctx, v) - case reflect.Interface: - if v.IsNil() { - return nil, fmt.Errorf("toml: encoding a nil interface is not supported") - } - - return enc.encode(b, ctx, v.Elem()) - case reflect.Ptr: - if v.IsNil() { - return enc.encode(b, ctx, reflect.Zero(v.Type().Elem())) - } - - return enc.encode(b, ctx, v.Elem()) - - // values - case reflect.String: - b = enc.encodeString(b, v.String(), ctx.options) - case reflect.Float32: - f := v.Float() - - if math.IsNaN(f) { - b = append(b, "nan"...) - } else if f > math.MaxFloat32 { - b = append(b, "inf"...) - } else if f < -math.MaxFloat32 { - b = append(b, "-inf"...) - } else if math.Trunc(f) == f { - b = strconv.AppendFloat(b, f, 'f', 1, 32) - } else { - b = strconv.AppendFloat(b, f, 'f', -1, 32) - } - case reflect.Float64: - f := v.Float() - if math.IsNaN(f) { - b = append(b, "nan"...) - } else if f > math.MaxFloat64 { - b = append(b, "inf"...) - } else if f < -math.MaxFloat64 { - b = append(b, "-inf"...) - } else if math.Trunc(f) == f { - b = strconv.AppendFloat(b, f, 'f', 1, 64) - } else { - b = strconv.AppendFloat(b, f, 'f', -1, 64) - } - case reflect.Bool: - if v.Bool() { - b = append(b, "true"...) - } else { - b = append(b, "false"...) - } - case reflect.Uint64, reflect.Uint32, reflect.Uint16, reflect.Uint8, reflect.Uint: - x := v.Uint() - if x > uint64(math.MaxInt64) { - return nil, fmt.Errorf("toml: not encoding uint (%d) greater than max int64 (%d)", x, int64(math.MaxInt64)) - } - b = strconv.AppendUint(b, x, 10) - case reflect.Int64, reflect.Int32, reflect.Int16, reflect.Int8, reflect.Int: - b = strconv.AppendInt(b, v.Int(), 10) - default: - return nil, fmt.Errorf("toml: cannot encode value of type %s", v.Kind()) - } - - return b, nil -} - -func isNil(v reflect.Value) bool { - switch v.Kind() { - case reflect.Ptr, reflect.Interface, reflect.Map: - return v.IsNil() - default: - return false - } -} - -func shouldOmitEmpty(options valueOptions, v reflect.Value) bool { - return options.omitempty && isEmptyValue(v) -} - -func (enc *Encoder) encodeKv(b []byte, ctx encoderCtx, options valueOptions, v reflect.Value) ([]byte, error) { - var err error - - if !ctx.inline { - b = enc.encodeComment(ctx.indent, options.comment, b) - b = enc.commented(ctx.commented, b) - b = enc.indent(ctx.indent, b) - } - - b = enc.encodeKey(b, ctx.key) - b = append(b, " = "...) - - // create a copy of the context because the value of a KV shouldn't - // modify the global context. - subctx := ctx - subctx.insideKv = true - subctx.shiftKey() - subctx.options = options - - b, err = enc.encode(b, subctx, v) - if err != nil { - return nil, err - } - - return b, nil -} - -func (enc *Encoder) commented(commented bool, b []byte) []byte { - if commented { - return append(b, "# "...) - } - return b -} - -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.Struct: - return isEmptyStruct(v) - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - return false -} - -func isEmptyStruct(v reflect.Value) bool { - // TODO: merge with walkStruct and cache. - typ := v.Type() - for i := 0; i < typ.NumField(); i++ { - fieldType := typ.Field(i) - - // only consider exported fields - if fieldType.PkgPath != "" { - continue - } - - tag := fieldType.Tag.Get("toml") - - // special field name to skip field - if tag == "-" { - continue - } - - f := v.Field(i) - - if !isEmptyValue(f) { - return false - } - } - - return true -} - -const literalQuote = '\'' - -func (enc *Encoder) encodeString(b []byte, v string, options valueOptions) []byte { - if needsQuoting(v) { - return enc.encodeQuotedString(options.multiline, b, v) - } - - return enc.encodeLiteralString(b, v) -} - -func needsQuoting(v string) bool { - // TODO: vectorize - for _, b := range []byte(v) { - if b == '\'' || b == '\r' || b == '\n' || characters.InvalidAscii(b) { - return true - } - } - return false -} - -// caller should have checked that the string does not contain new lines or ' . -func (enc *Encoder) encodeLiteralString(b []byte, v string) []byte { - b = append(b, literalQuote) - b = append(b, v...) - b = append(b, literalQuote) - - return b -} - -func (enc *Encoder) encodeQuotedString(multiline bool, b []byte, v string) []byte { - stringQuote := `"` - - if multiline { - stringQuote = `"""` - } - - b = append(b, stringQuote...) - if multiline { - b = append(b, '\n') - } - - const ( - hextable = "0123456789ABCDEF" - // U+0000 to U+0008, U+000A to U+001F, U+007F - nul = 0x0 - bs = 0x8 - lf = 0xa - us = 0x1f - del = 0x7f - ) - - for _, r := range []byte(v) { - switch r { - case '\\': - b = append(b, `\\`...) - case '"': - b = append(b, `\"`...) - case '\b': - b = append(b, `\b`...) - case '\f': - b = append(b, `\f`...) - case '\n': - if multiline { - b = append(b, r) - } else { - b = append(b, `\n`...) - } - case '\r': - b = append(b, `\r`...) - case '\t': - b = append(b, `\t`...) - default: - switch { - case r >= nul && r <= bs, r >= lf && r <= us, r == del: - b = append(b, `\u00`...) - b = append(b, hextable[r>>4]) - b = append(b, hextable[r&0x0f]) - default: - b = append(b, r) - } - } - } - - b = append(b, stringQuote...) - - return b -} - -// caller should have checked that the string is in A-Z / a-z / 0-9 / - / _ . -func (enc *Encoder) encodeUnquotedKey(b []byte, v string) []byte { - return append(b, v...) -} - -func (enc *Encoder) encodeTableHeader(ctx encoderCtx, b []byte) ([]byte, error) { - if len(ctx.parentKey) == 0 { - return b, nil - } - - b = enc.encodeComment(ctx.indent, ctx.options.comment, b) - - b = enc.commented(ctx.commented, b) - - b = enc.indent(ctx.indent, b) - - b = append(b, '[') - - b = enc.encodeKey(b, ctx.parentKey[0]) - - for _, k := range ctx.parentKey[1:] { - b = append(b, '.') - b = enc.encodeKey(b, k) - } - - b = append(b, "]\n"...) - - return b, nil -} - -//nolint:cyclop -func (enc *Encoder) encodeKey(b []byte, k string) []byte { - needsQuotation := false - cannotUseLiteral := false - - if len(k) == 0 { - return append(b, "''"...) - } - - for _, c := range k { - if (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '-' || c == '_' { - continue - } - - if c == literalQuote { - cannotUseLiteral = true - } - - needsQuotation = true - } - - if needsQuotation && needsQuoting(k) { - cannotUseLiteral = true - } - - switch { - case cannotUseLiteral: - return enc.encodeQuotedString(false, b, k) - case needsQuotation: - return enc.encodeLiteralString(b, k) - default: - return enc.encodeUnquotedKey(b, k) - } -} - -func (enc *Encoder) keyToString(k reflect.Value) (string, error) { - keyType := k.Type() - switch { - case keyType.Kind() == reflect.String: - return k.String(), nil - - case keyType.Implements(textMarshalerType): - keyB, err := k.Interface().(encoding.TextMarshaler).MarshalText() - if err != nil { - return "", fmt.Errorf("toml: error marshalling key %v from text: %w", k, err) - } - return string(keyB), nil - } - return "", fmt.Errorf("toml: type %s is not supported as a map key", keyType.Kind()) -} - -func (enc *Encoder) encodeMap(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) { - var ( - t table - emptyValueOptions valueOptions - ) - - iter := v.MapRange() - for iter.Next() { - v := iter.Value() - - if isNil(v) { - continue - } - - k, err := enc.keyToString(iter.Key()) - if err != nil { - return nil, err - } - - if willConvertToTableOrArrayTable(ctx, v) { - t.pushTable(k, v, emptyValueOptions) - } else { - t.pushKV(k, v, emptyValueOptions) - } - } - - sortEntriesByKey(t.kvs) - sortEntriesByKey(t.tables) - - return enc.encodeTable(b, ctx, t) -} - -func sortEntriesByKey(e []entry) { - sort.Slice(e, func(i, j int) bool { - return e[i].Key < e[j].Key - }) -} - -type entry struct { - Key string - Value reflect.Value - Options valueOptions -} - -type table struct { - kvs []entry - tables []entry -} - -func (t *table) pushKV(k string, v reflect.Value, options valueOptions) { - for _, e := range t.kvs { - if e.Key == k { - return - } - } - - t.kvs = append(t.kvs, entry{Key: k, Value: v, Options: options}) -} - -func (t *table) pushTable(k string, v reflect.Value, options valueOptions) { - for _, e := range t.tables { - if e.Key == k { - return - } - } - t.tables = append(t.tables, entry{Key: k, Value: v, Options: options}) -} - -func walkStruct(ctx encoderCtx, t *table, v reflect.Value) { - // TODO: cache this - typ := v.Type() - for i := 0; i < typ.NumField(); i++ { - fieldType := typ.Field(i) - - // only consider exported fields - if fieldType.PkgPath != "" { - continue - } - - tag := fieldType.Tag.Get("toml") - - // special field name to skip field - if tag == "-" { - continue - } - - k, opts := parseTag(tag) - if !isValidName(k) { - k = "" - } - - f := v.Field(i) - - if k == "" { - if fieldType.Anonymous { - if fieldType.Type.Kind() == reflect.Struct { - walkStruct(ctx, t, f) - } - continue - } else { - k = fieldType.Name - } - } - - if isNil(f) { - continue - } - - options := valueOptions{ - multiline: opts.multiline, - omitempty: opts.omitempty, - commented: opts.commented, - comment: fieldType.Tag.Get("comment"), - } - - if opts.inline || !willConvertToTableOrArrayTable(ctx, f) { - t.pushKV(k, f, options) - } else { - t.pushTable(k, f, options) - } - } -} - -func (enc *Encoder) encodeStruct(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) { - var t table - - walkStruct(ctx, &t, v) - - return enc.encodeTable(b, ctx, t) -} - -func (enc *Encoder) encodeComment(indent int, comment string, b []byte) []byte { - for len(comment) > 0 { - var line string - idx := strings.IndexByte(comment, '\n') - if idx >= 0 { - line = comment[:idx] - comment = comment[idx+1:] - } else { - line = comment - comment = "" - } - b = enc.indent(indent, b) - b = append(b, "# "...) - b = append(b, line...) - b = append(b, '\n') - } - return b -} - -func isValidName(s string) bool { - if s == "" { - return false - } - for _, c := range s { - switch { - case strings.ContainsRune("!#$%&()*+-./:;<=>?@[]^_{|}~ ", c): - // Backslash and quote chars are reserved, but - // otherwise any punctuation chars are allowed - // in a tag name. - case !unicode.IsLetter(c) && !unicode.IsDigit(c): - return false - } - } - return true -} - -type tagOptions struct { - multiline bool - inline bool - omitempty bool - commented bool -} - -func parseTag(tag string) (string, tagOptions) { - opts := tagOptions{} - - idx := strings.Index(tag, ",") - if idx == -1 { - return tag, opts - } - - raw := tag[idx+1:] - tag = string(tag[:idx]) - for raw != "" { - var o string - i := strings.Index(raw, ",") - if i >= 0 { - o, raw = raw[:i], raw[i+1:] - } else { - o, raw = raw, "" - } - switch o { - case "multiline": - opts.multiline = true - case "inline": - opts.inline = true - case "omitempty": - opts.omitempty = true - case "commented": - opts.commented = true - } - } - - return tag, opts -} - -func (enc *Encoder) encodeTable(b []byte, ctx encoderCtx, t table) ([]byte, error) { - var err error - - ctx.shiftKey() - - if ctx.insideKv || (ctx.inline && !ctx.isRoot()) { - return enc.encodeTableInline(b, ctx, t) - } - - if !ctx.skipTableHeader { - b, err = enc.encodeTableHeader(ctx, b) - if err != nil { - return nil, err - } - - if enc.indentTables && len(ctx.parentKey) > 0 { - ctx.indent++ - } - } - ctx.skipTableHeader = false - - hasNonEmptyKV := false - for _, kv := range t.kvs { - if shouldOmitEmpty(kv.Options, kv.Value) { - continue - } - hasNonEmptyKV = true - - ctx.setKey(kv.Key) - ctx2 := ctx - ctx2.commented = kv.Options.commented || ctx2.commented - - b, err = enc.encodeKv(b, ctx2, kv.Options, kv.Value) - if err != nil { - return nil, err - } - - b = append(b, '\n') - } - - first := true - for _, table := range t.tables { - if shouldOmitEmpty(table.Options, table.Value) { - continue - } - if first { - first = false - if hasNonEmptyKV { - b = append(b, '\n') - } - } else { - b = append(b, "\n"...) - } - - ctx.setKey(table.Key) - - ctx.options = table.Options - ctx2 := ctx - ctx2.commented = ctx2.commented || ctx.options.commented - - b, err = enc.encode(b, ctx2, table.Value) - if err != nil { - return nil, err - } - } - - return b, nil -} - -func (enc *Encoder) encodeTableInline(b []byte, ctx encoderCtx, t table) ([]byte, error) { - var err error - - b = append(b, '{') - - first := true - for _, kv := range t.kvs { - if shouldOmitEmpty(kv.Options, kv.Value) { - continue - } - - if first { - first = false - } else { - b = append(b, `, `...) - } - - ctx.setKey(kv.Key) - - b, err = enc.encodeKv(b, ctx, kv.Options, kv.Value) - if err != nil { - return nil, err - } - } - - if len(t.tables) > 0 { - panic("inline table cannot contain nested tables, only key-values") - } - - b = append(b, "}"...) - - return b, nil -} - -func willConvertToTable(ctx encoderCtx, v reflect.Value) bool { - if !v.IsValid() { - return false - } - if v.Type() == timeType || v.Type().Implements(textMarshalerType) || (v.Kind() != reflect.Ptr && v.CanAddr() && reflect.PtrTo(v.Type()).Implements(textMarshalerType)) { - return false - } - - t := v.Type() - switch t.Kind() { - case reflect.Map, reflect.Struct: - return !ctx.inline - case reflect.Interface: - return willConvertToTable(ctx, v.Elem()) - case reflect.Ptr: - if v.IsNil() { - return false - } - - return willConvertToTable(ctx, v.Elem()) - default: - return false - } -} - -func willConvertToTableOrArrayTable(ctx encoderCtx, v reflect.Value) bool { - if ctx.insideKv { - return false - } - t := v.Type() - - if t.Kind() == reflect.Interface { - return willConvertToTableOrArrayTable(ctx, v.Elem()) - } - - if t.Kind() == reflect.Slice || t.Kind() == reflect.Array { - if v.Len() == 0 { - // An empty slice should be a kv = []. - return false - } - - for i := 0; i < v.Len(); i++ { - t := willConvertToTable(ctx, v.Index(i)) - - if !t { - return false - } - } - - return true - } - - return willConvertToTable(ctx, v) -} - -func (enc *Encoder) encodeSlice(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) { - if v.Len() == 0 { - b = append(b, "[]"...) - - return b, nil - } - - if willConvertToTableOrArrayTable(ctx, v) { - return enc.encodeSliceAsArrayTable(b, ctx, v) - } - - return enc.encodeSliceAsArray(b, ctx, v) -} - -// caller should have checked that v is a slice that only contains values that -// encode into tables. -func (enc *Encoder) encodeSliceAsArrayTable(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) { - ctx.shiftKey() - - scratch := make([]byte, 0, 64) - - scratch = enc.commented(ctx.commented, scratch) - - scratch = append(scratch, "[["...) - - for i, k := range ctx.parentKey { - if i > 0 { - scratch = append(scratch, '.') - } - - scratch = enc.encodeKey(scratch, k) - } - - scratch = append(scratch, "]]\n"...) - ctx.skipTableHeader = true - - b = enc.encodeComment(ctx.indent, ctx.options.comment, b) - - if enc.indentTables { - ctx.indent++ - } - - for i := 0; i < v.Len(); i++ { - if i != 0 { - b = append(b, "\n"...) - } - - b = append(b, scratch...) - - var err error - b, err = enc.encode(b, ctx, v.Index(i)) - if err != nil { - return nil, err - } - } - - return b, nil -} - -func (enc *Encoder) encodeSliceAsArray(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) { - multiline := ctx.options.multiline || enc.arraysMultiline - separator := ", " - - b = append(b, '[') - - subCtx := ctx - subCtx.options = valueOptions{} - - if multiline { - separator = ",\n" - - b = append(b, '\n') - - subCtx.indent++ - } - - var err error - first := true - - for i := 0; i < v.Len(); i++ { - if first { - first = false - } else { - b = append(b, separator...) - } - - if multiline { - b = enc.indent(subCtx.indent, b) - } - - b, err = enc.encode(b, subCtx, v.Index(i)) - if err != nil { - return nil, err - } - } - - if multiline { - b = append(b, '\n') - b = enc.indent(ctx.indent, b) - } - - b = append(b, ']') - - return b, nil -} - -func (enc *Encoder) indent(level int, b []byte) []byte { - for i := 0; i < level; i++ { - b = append(b, enc.indentSymbol...) - } - - return b -} diff --git a/vendor/github.com/pelletier/go-toml/v2/strict.go b/vendor/github.com/pelletier/go-toml/v2/strict.go deleted file mode 100644 index 802e7e4..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/strict.go +++ /dev/null @@ -1,107 +0,0 @@ -package toml - -import ( - "github.com/pelletier/go-toml/v2/internal/danger" - "github.com/pelletier/go-toml/v2/internal/tracker" - "github.com/pelletier/go-toml/v2/unstable" -) - -type strict struct { - Enabled bool - - // Tracks the current key being processed. - key tracker.KeyTracker - - missing []unstable.ParserError -} - -func (s *strict) EnterTable(node *unstable.Node) { - if !s.Enabled { - return - } - - s.key.UpdateTable(node) -} - -func (s *strict) EnterArrayTable(node *unstable.Node) { - if !s.Enabled { - return - } - - s.key.UpdateArrayTable(node) -} - -func (s *strict) EnterKeyValue(node *unstable.Node) { - if !s.Enabled { - return - } - - s.key.Push(node) -} - -func (s *strict) ExitKeyValue(node *unstable.Node) { - if !s.Enabled { - return - } - - s.key.Pop(node) -} - -func (s *strict) MissingTable(node *unstable.Node) { - if !s.Enabled { - return - } - - s.missing = append(s.missing, unstable.ParserError{ - Highlight: keyLocation(node), - Message: "missing table", - Key: s.key.Key(), - }) -} - -func (s *strict) MissingField(node *unstable.Node) { - if !s.Enabled { - return - } - - s.missing = append(s.missing, unstable.ParserError{ - Highlight: keyLocation(node), - Message: "missing field", - Key: s.key.Key(), - }) -} - -func (s *strict) Error(doc []byte) error { - if !s.Enabled || len(s.missing) == 0 { - return nil - } - - err := &StrictMissingError{ - Errors: make([]DecodeError, 0, len(s.missing)), - } - - for _, derr := range s.missing { - derr := derr - err.Errors = append(err.Errors, *wrapDecodeError(doc, &derr)) - } - - return err -} - -func keyLocation(node *unstable.Node) []byte { - k := node.Key() - - hasOne := k.Next() - if !hasOne { - panic("should not be called with empty key") - } - - start := k.Node().Data - end := k.Node().Data - - for k.Next() { - end = k.Node().Data - } - - return danger.BytesRange(start, end) -} diff --git a/vendor/github.com/pelletier/go-toml/v2/toml.abnf b/vendor/github.com/pelletier/go-toml/v2/toml.abnf deleted file mode 100644 index 473f374..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/toml.abnf +++ /dev/null @@ -1,243 +0,0 @@ -;; This document describes TOML's syntax, using the ABNF format (defined in -;; RFC 5234 -- https://www.ietf.org/rfc/rfc5234.txt). -;; -;; All valid TOML documents will match this description, however certain -;; invalid documents would need to be rejected as per the semantics described -;; in the supporting text description. - -;; It is possible to try this grammar interactively, using instaparse. -;; http://instaparse.mojombo.com/ -;; -;; To do so, in the lower right, click on Options and change `:input-format` to -;; ':abnf'. Then paste this entire ABNF document into the grammar entry box -;; (above the options). Then you can type or paste a sample TOML document into -;; the beige box on the left. Tada! - -;; Overall Structure - -toml = expression *( newline expression ) - -expression = ws [ comment ] -expression =/ ws keyval ws [ comment ] -expression =/ ws table ws [ comment ] - -;; Whitespace - -ws = *wschar -wschar = %x20 ; Space -wschar =/ %x09 ; Horizontal tab - -;; Newline - -newline = %x0A ; LF -newline =/ %x0D.0A ; CRLF - -;; Comment - -comment-start-symbol = %x23 ; # -non-ascii = %x80-D7FF / %xE000-10FFFF -non-eol = %x09 / %x20-7F / non-ascii - -comment = comment-start-symbol *non-eol - -;; Key-Value pairs - -keyval = key keyval-sep val - -key = simple-key / dotted-key -simple-key = quoted-key / unquoted-key - -unquoted-key = 1*( ALPHA / DIGIT / %x2D / %x5F ) ; A-Z / a-z / 0-9 / - / _ -quoted-key = basic-string / literal-string -dotted-key = simple-key 1*( dot-sep simple-key ) - -dot-sep = ws %x2E ws ; . Period -keyval-sep = ws %x3D ws ; = - -val = string / boolean / array / inline-table / date-time / float / integer - -;; String - -string = ml-basic-string / basic-string / ml-literal-string / literal-string - -;; Basic String - -basic-string = quotation-mark *basic-char quotation-mark - -quotation-mark = %x22 ; " - -basic-char = basic-unescaped / escaped -basic-unescaped = wschar / %x21 / %x23-5B / %x5D-7E / non-ascii -escaped = escape escape-seq-char - -escape = %x5C ; \ -escape-seq-char = %x22 ; " quotation mark U+0022 -escape-seq-char =/ %x5C ; \ reverse solidus U+005C -escape-seq-char =/ %x62 ; b backspace U+0008 -escape-seq-char =/ %x66 ; f form feed U+000C -escape-seq-char =/ %x6E ; n line feed U+000A -escape-seq-char =/ %x72 ; r carriage return U+000D -escape-seq-char =/ %x74 ; t tab U+0009 -escape-seq-char =/ %x75 4HEXDIG ; uXXXX U+XXXX -escape-seq-char =/ %x55 8HEXDIG ; UXXXXXXXX U+XXXXXXXX - -;; Multiline Basic String - -ml-basic-string = ml-basic-string-delim [ newline ] ml-basic-body - ml-basic-string-delim -ml-basic-string-delim = 3quotation-mark -ml-basic-body = *mlb-content *( mlb-quotes 1*mlb-content ) [ mlb-quotes ] - -mlb-content = mlb-char / newline / mlb-escaped-nl -mlb-char = mlb-unescaped / escaped -mlb-quotes = 1*2quotation-mark -mlb-unescaped = wschar / %x21 / %x23-5B / %x5D-7E / non-ascii -mlb-escaped-nl = escape ws newline *( wschar / newline ) - -;; Literal String - -literal-string = apostrophe *literal-char apostrophe - -apostrophe = %x27 ; ' apostrophe - -literal-char = %x09 / %x20-26 / %x28-7E / non-ascii - -;; Multiline Literal String - -ml-literal-string = ml-literal-string-delim [ newline ] ml-literal-body - ml-literal-string-delim -ml-literal-string-delim = 3apostrophe -ml-literal-body = *mll-content *( mll-quotes 1*mll-content ) [ mll-quotes ] - -mll-content = mll-char / newline -mll-char = %x09 / %x20-26 / %x28-7E / non-ascii -mll-quotes = 1*2apostrophe - -;; Integer - -integer = dec-int / hex-int / oct-int / bin-int - -minus = %x2D ; - -plus = %x2B ; + -underscore = %x5F ; _ -digit1-9 = %x31-39 ; 1-9 -digit0-7 = %x30-37 ; 0-7 -digit0-1 = %x30-31 ; 0-1 - -hex-prefix = %x30.78 ; 0x -oct-prefix = %x30.6F ; 0o -bin-prefix = %x30.62 ; 0b - -dec-int = [ minus / plus ] unsigned-dec-int -unsigned-dec-int = DIGIT / digit1-9 1*( DIGIT / underscore DIGIT ) - -hex-int = hex-prefix HEXDIG *( HEXDIG / underscore HEXDIG ) -oct-int = oct-prefix digit0-7 *( digit0-7 / underscore digit0-7 ) -bin-int = bin-prefix digit0-1 *( digit0-1 / underscore digit0-1 ) - -;; Float - -float = float-int-part ( exp / frac [ exp ] ) -float =/ special-float - -float-int-part = dec-int -frac = decimal-point zero-prefixable-int -decimal-point = %x2E ; . -zero-prefixable-int = DIGIT *( DIGIT / underscore DIGIT ) - -exp = "e" float-exp-part -float-exp-part = [ minus / plus ] zero-prefixable-int - -special-float = [ minus / plus ] ( inf / nan ) -inf = %x69.6e.66 ; inf -nan = %x6e.61.6e ; nan - -;; Boolean - -boolean = true / false - -true = %x74.72.75.65 ; true -false = %x66.61.6C.73.65 ; false - -;; Date and Time (as defined in RFC 3339) - -date-time = offset-date-time / local-date-time / local-date / local-time - -date-fullyear = 4DIGIT -date-month = 2DIGIT ; 01-12 -date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on month/year -time-delim = "T" / %x20 ; T, t, or space -time-hour = 2DIGIT ; 00-23 -time-minute = 2DIGIT ; 00-59 -time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second rules -time-secfrac = "." 1*DIGIT -time-numoffset = ( "+" / "-" ) time-hour ":" time-minute -time-offset = "Z" / time-numoffset - -partial-time = time-hour ":" time-minute ":" time-second [ time-secfrac ] -full-date = date-fullyear "-" date-month "-" date-mday -full-time = partial-time time-offset - -;; Offset Date-Time - -offset-date-time = full-date time-delim full-time - -;; Local Date-Time - -local-date-time = full-date time-delim partial-time - -;; Local Date - -local-date = full-date - -;; Local Time - -local-time = partial-time - -;; Array - -array = array-open [ array-values ] ws-comment-newline array-close - -array-open = %x5B ; [ -array-close = %x5D ; ] - -array-values = ws-comment-newline val ws-comment-newline array-sep array-values -array-values =/ ws-comment-newline val ws-comment-newline [ array-sep ] - -array-sep = %x2C ; , Comma - -ws-comment-newline = *( wschar / [ comment ] newline ) - -;; Table - -table = std-table / array-table - -;; Standard Table - -std-table = std-table-open key std-table-close - -std-table-open = %x5B ws ; [ Left square bracket -std-table-close = ws %x5D ; ] Right square bracket - -;; Inline Table - -inline-table = inline-table-open [ inline-table-keyvals ] inline-table-close - -inline-table-open = %x7B ws ; { -inline-table-close = ws %x7D ; } -inline-table-sep = ws %x2C ws ; , Comma - -inline-table-keyvals = keyval [ inline-table-sep inline-table-keyvals ] - -;; Array Table - -array-table = array-table-open key array-table-close - -array-table-open = %x5B.5B ws ; [[ Double left square bracket -array-table-close = ws %x5D.5D ; ]] Double right square bracket - -;; Built-in ABNF terms, reproduced here for clarity - -ALPHA = %x41-5A / %x61-7A ; A-Z / a-z -DIGIT = %x30-39 ; 0-9 -HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" diff --git a/vendor/github.com/pelletier/go-toml/v2/types.go b/vendor/github.com/pelletier/go-toml/v2/types.go deleted file mode 100644 index 3c6b8fe..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/types.go +++ /dev/null @@ -1,14 +0,0 @@ -package toml - -import ( - "encoding" - "reflect" - "time" -) - -var timeType = reflect.TypeOf((*time.Time)(nil)).Elem() -var textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() -var textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() -var mapStringInterfaceType = reflect.TypeOf(map[string]interface{}(nil)) -var sliceInterfaceType = reflect.TypeOf([]interface{}(nil)) -var stringType = reflect.TypeOf("") diff --git a/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go b/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go deleted file mode 100644 index 868c74c..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go +++ /dev/null @@ -1,1264 +0,0 @@ -package toml - -import ( - "encoding" - "errors" - "fmt" - "io" - "io/ioutil" - "math" - "reflect" - "strings" - "sync/atomic" - "time" - - "github.com/pelletier/go-toml/v2/internal/danger" - "github.com/pelletier/go-toml/v2/internal/tracker" - "github.com/pelletier/go-toml/v2/unstable" -) - -// Unmarshal deserializes a TOML document into a Go value. -// -// It is a shortcut for Decoder.Decode() with the default options. -func Unmarshal(data []byte, v interface{}) error { - p := unstable.Parser{} - p.Reset(data) - d := decoder{p: &p} - - return d.FromParser(v) -} - -// Decoder reads and decode a TOML document from an input stream. -type Decoder struct { - // input - r io.Reader - - // global settings - strict bool -} - -// NewDecoder creates a new Decoder that will read from r. -func NewDecoder(r io.Reader) *Decoder { - return &Decoder{r: r} -} - -// DisallowUnknownFields causes the Decoder to return an error when the -// destination is a struct and the input contains a key that does not match a -// non-ignored field. -// -// In that case, the Decoder returns a StrictMissingError that can be used to -// retrieve the individual errors as well as generate a human readable -// description of the missing fields. -func (d *Decoder) DisallowUnknownFields() *Decoder { - d.strict = true - return d -} - -// Decode the whole content of r into v. -// -// By default, values in the document that don't exist in the target Go value -// are ignored. See Decoder.DisallowUnknownFields() to change this behavior. -// -// When a TOML local date, time, or date-time is decoded into a time.Time, its -// value is represented in time.Local timezone. Otherwise the appropriate Local* -// structure is used. For time values, precision up to the nanosecond is -// supported by truncating extra digits. -// -// Empty tables decoded in an interface{} create an empty initialized -// map[string]interface{}. -// -// Types implementing the encoding.TextUnmarshaler interface are decoded from a -// TOML string. -// -// When decoding a number, go-toml will return an error if the number is out of -// bounds for the target type (which includes negative numbers when decoding -// into an unsigned int). -// -// If an error occurs while decoding the content of the document, this function -// returns a toml.DecodeError, providing context about the issue. When using -// strict mode and a field is missing, a `toml.StrictMissingError` is -// returned. In any other case, this function returns a standard Go error. -// -// # Type mapping -// -// List of supported TOML types and their associated accepted Go types: -// -// String -> string -// Integer -> uint*, int*, depending on size -// Float -> float*, depending on size -// Boolean -> bool -// Offset Date-Time -> time.Time -// Local Date-time -> LocalDateTime, time.Time -// Local Date -> LocalDate, time.Time -// Local Time -> LocalTime, time.Time -// Array -> slice and array, depending on elements types -// Table -> map and struct -// Inline Table -> same as Table -// Array of Tables -> same as Array and Table -func (d *Decoder) Decode(v interface{}) error { - b, err := ioutil.ReadAll(d.r) - if err != nil { - return fmt.Errorf("toml: %w", err) - } - - p := unstable.Parser{} - p.Reset(b) - dec := decoder{ - p: &p, - strict: strict{ - Enabled: d.strict, - }, - } - - return dec.FromParser(v) -} - -type decoder struct { - // Which parser instance in use for this decoding session. - p *unstable.Parser - - // Flag indicating that the current expression is stashed. - // If set to true, calling nextExpr will not actually pull a new expression - // but turn off the flag instead. - stashedExpr bool - - // Skip expressions until a table is found. This is set to true when a - // table could not be created (missing field in map), so all KV expressions - // need to be skipped. - skipUntilTable bool - - // Tracks position in Go arrays. - // This is used when decoding [[array tables]] into Go arrays. Given array - // tables are separate TOML expression, we need to keep track of where we - // are at in the Go array, as we can't just introspect its size. - arrayIndexes map[reflect.Value]int - - // Tracks keys that have been seen, with which type. - seen tracker.SeenTracker - - // Strict mode - strict strict - - // Current context for the error. - errorContext *errorContext -} - -type errorContext struct { - Struct reflect.Type - Field []int -} - -func (d *decoder) typeMismatchError(toml string, target reflect.Type) error { - return fmt.Errorf("toml: %s", d.typeMismatchString(toml, target)) -} - -func (d *decoder) typeMismatchString(toml string, target reflect.Type) string { - if d.errorContext != nil && d.errorContext.Struct != nil { - ctx := d.errorContext - f := ctx.Struct.FieldByIndex(ctx.Field) - return fmt.Sprintf("cannot decode TOML %s into struct field %s.%s of type %s", toml, ctx.Struct, f.Name, f.Type) - } - return fmt.Sprintf("cannot decode TOML %s into a Go value of type %s", toml, target) -} - -func (d *decoder) expr() *unstable.Node { - return d.p.Expression() -} - -func (d *decoder) nextExpr() bool { - if d.stashedExpr { - d.stashedExpr = false - return true - } - return d.p.NextExpression() -} - -func (d *decoder) stashExpr() { - d.stashedExpr = true -} - -func (d *decoder) arrayIndex(shouldAppend bool, v reflect.Value) int { - if d.arrayIndexes == nil { - d.arrayIndexes = make(map[reflect.Value]int, 1) - } - - idx, ok := d.arrayIndexes[v] - - if !ok { - d.arrayIndexes[v] = 0 - } else if shouldAppend { - idx++ - d.arrayIndexes[v] = idx - } - - return idx -} - -func (d *decoder) FromParser(v interface{}) error { - r := reflect.ValueOf(v) - if r.Kind() != reflect.Ptr { - return fmt.Errorf("toml: decoding can only be performed into a pointer, not %s", r.Kind()) - } - - if r.IsNil() { - return fmt.Errorf("toml: decoding pointer target cannot be nil") - } - - r = r.Elem() - if r.Kind() == reflect.Interface && r.IsNil() { - newMap := map[string]interface{}{} - r.Set(reflect.ValueOf(newMap)) - } - - err := d.fromParser(r) - if err == nil { - return d.strict.Error(d.p.Data()) - } - - var e *unstable.ParserError - if errors.As(err, &e) { - return wrapDecodeError(d.p.Data(), e) - } - - return err -} - -func (d *decoder) fromParser(root reflect.Value) error { - for d.nextExpr() { - err := d.handleRootExpression(d.expr(), root) - if err != nil { - return err - } - } - - return d.p.Error() -} - -/* -Rules for the unmarshal code: - -- The stack is used to keep track of which values need to be set where. -- handle* functions <=> switch on a given unstable.Kind. -- unmarshalX* functions need to unmarshal a node of kind X. -- An "object" is either a struct or a map. -*/ - -func (d *decoder) handleRootExpression(expr *unstable.Node, v reflect.Value) error { - var x reflect.Value - var err error - - if !(d.skipUntilTable && expr.Kind == unstable.KeyValue) { - err = d.seen.CheckExpression(expr) - if err != nil { - return err - } - } - - switch expr.Kind { - case unstable.KeyValue: - if d.skipUntilTable { - return nil - } - x, err = d.handleKeyValue(expr, v) - case unstable.Table: - d.skipUntilTable = false - d.strict.EnterTable(expr) - x, err = d.handleTable(expr.Key(), v) - case unstable.ArrayTable: - d.skipUntilTable = false - d.strict.EnterArrayTable(expr) - x, err = d.handleArrayTable(expr.Key(), v) - default: - panic(fmt.Errorf("parser should not permit expression of kind %s at document root", expr.Kind)) - } - - if d.skipUntilTable { - if expr.Kind == unstable.Table || expr.Kind == unstable.ArrayTable { - d.strict.MissingTable(expr) - } - } else if err == nil && x.IsValid() { - v.Set(x) - } - - return err -} - -func (d *decoder) handleArrayTable(key unstable.Iterator, v reflect.Value) (reflect.Value, error) { - if key.Next() { - return d.handleArrayTablePart(key, v) - } - return d.handleKeyValues(v) -} - -func (d *decoder) handleArrayTableCollectionLast(key unstable.Iterator, v reflect.Value) (reflect.Value, error) { - switch v.Kind() { - case reflect.Interface: - elem := v.Elem() - if !elem.IsValid() { - elem = reflect.New(sliceInterfaceType).Elem() - elem.Set(reflect.MakeSlice(sliceInterfaceType, 0, 16)) - } else if elem.Kind() == reflect.Slice { - if elem.Type() != sliceInterfaceType { - elem = reflect.New(sliceInterfaceType).Elem() - elem.Set(reflect.MakeSlice(sliceInterfaceType, 0, 16)) - } else if !elem.CanSet() { - nelem := reflect.New(sliceInterfaceType).Elem() - nelem.Set(reflect.MakeSlice(sliceInterfaceType, elem.Len(), elem.Cap())) - reflect.Copy(nelem, elem) - elem = nelem - } - } - return d.handleArrayTableCollectionLast(key, elem) - case reflect.Ptr: - elem := v.Elem() - if !elem.IsValid() { - ptr := reflect.New(v.Type().Elem()) - v.Set(ptr) - elem = ptr.Elem() - } - - elem, err := d.handleArrayTableCollectionLast(key, elem) - if err != nil { - return reflect.Value{}, err - } - v.Elem().Set(elem) - - return v, nil - case reflect.Slice: - elemType := v.Type().Elem() - var elem reflect.Value - if elemType.Kind() == reflect.Interface { - elem = makeMapStringInterface() - } else { - elem = reflect.New(elemType).Elem() - } - elem2, err := d.handleArrayTable(key, elem) - if err != nil { - return reflect.Value{}, err - } - if elem2.IsValid() { - elem = elem2 - } - return reflect.Append(v, elem), nil - case reflect.Array: - idx := d.arrayIndex(true, v) - if idx >= v.Len() { - return v, fmt.Errorf("%s at position %d", d.typeMismatchError("array table", v.Type()), idx) - } - elem := v.Index(idx) - _, err := d.handleArrayTable(key, elem) - return v, err - default: - return reflect.Value{}, d.typeMismatchError("array table", v.Type()) - } -} - -// When parsing an array table expression, each part of the key needs to be -// evaluated like a normal key, but if it returns a collection, it also needs to -// point to the last element of the collection. Unless it is the last part of -// the key, then it needs to create a new element at the end. -func (d *decoder) handleArrayTableCollection(key unstable.Iterator, v reflect.Value) (reflect.Value, error) { - if key.IsLast() { - return d.handleArrayTableCollectionLast(key, v) - } - - switch v.Kind() { - case reflect.Ptr: - elem := v.Elem() - if !elem.IsValid() { - ptr := reflect.New(v.Type().Elem()) - v.Set(ptr) - elem = ptr.Elem() - } - - elem, err := d.handleArrayTableCollection(key, elem) - if err != nil { - return reflect.Value{}, err - } - if elem.IsValid() { - v.Elem().Set(elem) - } - - return v, nil - case reflect.Slice: - elem := v.Index(v.Len() - 1) - x, err := d.handleArrayTable(key, elem) - if err != nil || d.skipUntilTable { - return reflect.Value{}, err - } - if x.IsValid() { - elem.Set(x) - } - - return v, err - case reflect.Array: - idx := d.arrayIndex(false, v) - if idx >= v.Len() { - return v, fmt.Errorf("%s at position %d", d.typeMismatchError("array table", v.Type()), idx) - } - elem := v.Index(idx) - _, err := d.handleArrayTable(key, elem) - return v, err - } - - return d.handleArrayTable(key, v) -} - -func (d *decoder) handleKeyPart(key unstable.Iterator, v reflect.Value, nextFn handlerFn, makeFn valueMakerFn) (reflect.Value, error) { - var rv reflect.Value - - // First, dispatch over v to make sure it is a valid object. - // There is no guarantee over what it could be. - switch v.Kind() { - case reflect.Ptr: - elem := v.Elem() - if !elem.IsValid() { - v.Set(reflect.New(v.Type().Elem())) - } - elem = v.Elem() - return d.handleKeyPart(key, elem, nextFn, makeFn) - case reflect.Map: - vt := v.Type() - - // Create the key for the map element. Convert to key type. - mk, err := d.keyFromData(vt.Key(), key.Node().Data) - if err != nil { - return reflect.Value{}, err - } - - // If the map does not exist, create it. - if v.IsNil() { - vt := v.Type() - v = reflect.MakeMap(vt) - rv = v - } - - mv := v.MapIndex(mk) - set := false - if !mv.IsValid() { - // If there is no value in the map, create a new one according to - // the map type. If the element type is interface, create either a - // map[string]interface{} or a []interface{} depending on whether - // this is the last part of the array table key. - - t := vt.Elem() - if t.Kind() == reflect.Interface { - mv = makeFn() - } else { - mv = reflect.New(t).Elem() - } - set = true - } else if mv.Kind() == reflect.Interface { - mv = mv.Elem() - if !mv.IsValid() { - mv = makeFn() - } - set = true - } else if !mv.CanAddr() { - vt := v.Type() - t := vt.Elem() - oldmv := mv - mv = reflect.New(t).Elem() - mv.Set(oldmv) - set = true - } - - x, err := nextFn(key, mv) - if err != nil { - return reflect.Value{}, err - } - - if x.IsValid() { - mv = x - set = true - } - - if set { - v.SetMapIndex(mk, mv) - } - case reflect.Struct: - path, found := structFieldPath(v, string(key.Node().Data)) - if !found { - d.skipUntilTable = true - return reflect.Value{}, nil - } - - if d.errorContext == nil { - d.errorContext = new(errorContext) - } - t := v.Type() - d.errorContext.Struct = t - d.errorContext.Field = path - - f := fieldByIndex(v, path) - x, err := nextFn(key, f) - if err != nil || d.skipUntilTable { - return reflect.Value{}, err - } - if x.IsValid() { - f.Set(x) - } - d.errorContext.Field = nil - d.errorContext.Struct = nil - case reflect.Interface: - if v.Elem().IsValid() { - v = v.Elem() - } else { - v = makeMapStringInterface() - } - - x, err := d.handleKeyPart(key, v, nextFn, makeFn) - if err != nil { - return reflect.Value{}, err - } - if x.IsValid() { - v = x - } - rv = v - default: - panic(fmt.Errorf("unhandled part: %s", v.Kind())) - } - - return rv, nil -} - -// HandleArrayTablePart navigates the Go structure v using the key v. It is -// only used for the prefix (non-last) parts of an array-table. When -// encountering a collection, it should go to the last element. -func (d *decoder) handleArrayTablePart(key unstable.Iterator, v reflect.Value) (reflect.Value, error) { - var makeFn valueMakerFn - if key.IsLast() { - makeFn = makeSliceInterface - } else { - makeFn = makeMapStringInterface - } - return d.handleKeyPart(key, v, d.handleArrayTableCollection, makeFn) -} - -// HandleTable returns a reference when it has checked the next expression but -// cannot handle it. -func (d *decoder) handleTable(key unstable.Iterator, v reflect.Value) (reflect.Value, error) { - if v.Kind() == reflect.Slice { - if v.Len() == 0 { - return reflect.Value{}, unstable.NewParserError(key.Node().Data, "cannot store a table in a slice") - } - elem := v.Index(v.Len() - 1) - x, err := d.handleTable(key, elem) - if err != nil { - return reflect.Value{}, err - } - if x.IsValid() { - elem.Set(x) - } - return reflect.Value{}, nil - } - if key.Next() { - // Still scoping the key - return d.handleTablePart(key, v) - } - // Done scoping the key. - // Now handle all the key-value expressions in this table. - return d.handleKeyValues(v) -} - -// Handle root expressions until the end of the document or the next -// non-key-value. -func (d *decoder) handleKeyValues(v reflect.Value) (reflect.Value, error) { - var rv reflect.Value - for d.nextExpr() { - expr := d.expr() - if expr.Kind != unstable.KeyValue { - // Stash the expression so that fromParser can just loop and use - // the right handler. - // We could just recurse ourselves here, but at least this gives a - // chance to pop the stack a bit. - d.stashExpr() - break - } - - err := d.seen.CheckExpression(expr) - if err != nil { - return reflect.Value{}, err - } - - x, err := d.handleKeyValue(expr, v) - if err != nil { - return reflect.Value{}, err - } - if x.IsValid() { - v = x - rv = x - } - } - return rv, nil -} - -type ( - handlerFn func(key unstable.Iterator, v reflect.Value) (reflect.Value, error) - valueMakerFn func() reflect.Value -) - -func makeMapStringInterface() reflect.Value { - return reflect.MakeMap(mapStringInterfaceType) -} - -func makeSliceInterface() reflect.Value { - return reflect.MakeSlice(sliceInterfaceType, 0, 16) -} - -func (d *decoder) handleTablePart(key unstable.Iterator, v reflect.Value) (reflect.Value, error) { - return d.handleKeyPart(key, v, d.handleTable, makeMapStringInterface) -} - -func (d *decoder) tryTextUnmarshaler(node *unstable.Node, v reflect.Value) (bool, error) { - // Special case for time, because we allow to unmarshal to it from - // different kind of AST nodes. - if v.Type() == timeType { - return false, nil - } - - if v.CanAddr() && v.Addr().Type().Implements(textUnmarshalerType) { - err := v.Addr().Interface().(encoding.TextUnmarshaler).UnmarshalText(node.Data) - if err != nil { - return false, unstable.NewParserError(d.p.Raw(node.Raw), "%w", err) - } - - return true, nil - } - - return false, nil -} - -func (d *decoder) handleValue(value *unstable.Node, v reflect.Value) error { - for v.Kind() == reflect.Ptr { - v = initAndDereferencePointer(v) - } - - ok, err := d.tryTextUnmarshaler(value, v) - if ok || err != nil { - return err - } - - switch value.Kind { - case unstable.String: - return d.unmarshalString(value, v) - case unstable.Integer: - return d.unmarshalInteger(value, v) - case unstable.Float: - return d.unmarshalFloat(value, v) - case unstable.Bool: - return d.unmarshalBool(value, v) - case unstable.DateTime: - return d.unmarshalDateTime(value, v) - case unstable.LocalDate: - return d.unmarshalLocalDate(value, v) - case unstable.LocalTime: - return d.unmarshalLocalTime(value, v) - case unstable.LocalDateTime: - return d.unmarshalLocalDateTime(value, v) - case unstable.InlineTable: - return d.unmarshalInlineTable(value, v) - case unstable.Array: - return d.unmarshalArray(value, v) - default: - panic(fmt.Errorf("handleValue not implemented for %s", value.Kind)) - } -} - -func (d *decoder) unmarshalArray(array *unstable.Node, v reflect.Value) error { - switch v.Kind() { - case reflect.Slice: - if v.IsNil() { - v.Set(reflect.MakeSlice(v.Type(), 0, 16)) - } else { - v.SetLen(0) - } - case reflect.Array: - // arrays are always initialized - case reflect.Interface: - elem := v.Elem() - if !elem.IsValid() { - elem = reflect.New(sliceInterfaceType).Elem() - elem.Set(reflect.MakeSlice(sliceInterfaceType, 0, 16)) - } else if elem.Kind() == reflect.Slice { - if elem.Type() != sliceInterfaceType { - elem = reflect.New(sliceInterfaceType).Elem() - elem.Set(reflect.MakeSlice(sliceInterfaceType, 0, 16)) - } else if !elem.CanSet() { - nelem := reflect.New(sliceInterfaceType).Elem() - nelem.Set(reflect.MakeSlice(sliceInterfaceType, elem.Len(), elem.Cap())) - reflect.Copy(nelem, elem) - elem = nelem - } - } - err := d.unmarshalArray(array, elem) - if err != nil { - return err - } - v.Set(elem) - return nil - default: - // TODO: use newDecodeError, but first the parser needs to fill - // array.Data. - return d.typeMismatchError("array", v.Type()) - } - - elemType := v.Type().Elem() - - it := array.Children() - idx := 0 - for it.Next() { - n := it.Node() - - // TODO: optimize - if v.Kind() == reflect.Slice { - elem := reflect.New(elemType).Elem() - - err := d.handleValue(n, elem) - if err != nil { - return err - } - - v.Set(reflect.Append(v, elem)) - } else { // array - if idx >= v.Len() { - return nil - } - elem := v.Index(idx) - err := d.handleValue(n, elem) - if err != nil { - return err - } - idx++ - } - } - - return nil -} - -func (d *decoder) unmarshalInlineTable(itable *unstable.Node, v reflect.Value) error { - // Make sure v is an initialized object. - switch v.Kind() { - case reflect.Map: - if v.IsNil() { - v.Set(reflect.MakeMap(v.Type())) - } - case reflect.Struct: - // structs are always initialized. - case reflect.Interface: - elem := v.Elem() - if !elem.IsValid() { - elem = makeMapStringInterface() - v.Set(elem) - } - return d.unmarshalInlineTable(itable, elem) - default: - return unstable.NewParserError(d.p.Raw(itable.Raw), "cannot store inline table in Go type %s", v.Kind()) - } - - it := itable.Children() - for it.Next() { - n := it.Node() - - x, err := d.handleKeyValue(n, v) - if err != nil { - return err - } - if x.IsValid() { - v = x - } - } - - return nil -} - -func (d *decoder) unmarshalDateTime(value *unstable.Node, v reflect.Value) error { - dt, err := parseDateTime(value.Data) - if err != nil { - return err - } - - v.Set(reflect.ValueOf(dt)) - return nil -} - -func (d *decoder) unmarshalLocalDate(value *unstable.Node, v reflect.Value) error { - ld, err := parseLocalDate(value.Data) - if err != nil { - return err - } - - if v.Type() == timeType { - cast := ld.AsTime(time.Local) - v.Set(reflect.ValueOf(cast)) - return nil - } - - v.Set(reflect.ValueOf(ld)) - - return nil -} - -func (d *decoder) unmarshalLocalTime(value *unstable.Node, v reflect.Value) error { - lt, rest, err := parseLocalTime(value.Data) - if err != nil { - return err - } - - if len(rest) > 0 { - return unstable.NewParserError(rest, "extra characters at the end of a local time") - } - - v.Set(reflect.ValueOf(lt)) - return nil -} - -func (d *decoder) unmarshalLocalDateTime(value *unstable.Node, v reflect.Value) error { - ldt, rest, err := parseLocalDateTime(value.Data) - if err != nil { - return err - } - - if len(rest) > 0 { - return unstable.NewParserError(rest, "extra characters at the end of a local date time") - } - - if v.Type() == timeType { - cast := ldt.AsTime(time.Local) - - v.Set(reflect.ValueOf(cast)) - return nil - } - - v.Set(reflect.ValueOf(ldt)) - - return nil -} - -func (d *decoder) unmarshalBool(value *unstable.Node, v reflect.Value) error { - b := value.Data[0] == 't' - - switch v.Kind() { - case reflect.Bool: - v.SetBool(b) - case reflect.Interface: - v.Set(reflect.ValueOf(b)) - default: - return unstable.NewParserError(value.Data, "cannot assign boolean to a %t", b) - } - - return nil -} - -func (d *decoder) unmarshalFloat(value *unstable.Node, v reflect.Value) error { - f, err := parseFloat(value.Data) - if err != nil { - return err - } - - switch v.Kind() { - case reflect.Float64: - v.SetFloat(f) - case reflect.Float32: - if f > math.MaxFloat32 { - return unstable.NewParserError(value.Data, "number %f does not fit in a float32", f) - } - v.SetFloat(f) - case reflect.Interface: - v.Set(reflect.ValueOf(f)) - default: - return unstable.NewParserError(value.Data, "float cannot be assigned to %s", v.Kind()) - } - - return nil -} - -const ( - maxInt = int64(^uint(0) >> 1) - minInt = -maxInt - 1 -) - -// Maximum value of uint for decoding. Currently the decoder parses the integer -// into an int64. As a result, on architectures where uint is 64 bits, the -// effective maximum uint we can decode is the maximum of int64. On -// architectures where uint is 32 bits, the maximum value we can decode is -// lower: the maximum of uint32. I didn't find a way to figure out this value at -// compile time, so it is computed during initialization. -var maxUint int64 = math.MaxInt64 - -func init() { - m := uint64(^uint(0)) - if m < uint64(maxUint) { - maxUint = int64(m) - } -} - -func (d *decoder) unmarshalInteger(value *unstable.Node, v reflect.Value) error { - kind := v.Kind() - if kind == reflect.Float32 || kind == reflect.Float64 { - return d.unmarshalFloat(value, v) - } - - i, err := parseInteger(value.Data) - if err != nil { - return err - } - - var r reflect.Value - - switch kind { - case reflect.Int64: - v.SetInt(i) - return nil - case reflect.Int32: - if i < math.MinInt32 || i > math.MaxInt32 { - return fmt.Errorf("toml: number %d does not fit in an int32", i) - } - - r = reflect.ValueOf(int32(i)) - case reflect.Int16: - if i < math.MinInt16 || i > math.MaxInt16 { - return fmt.Errorf("toml: number %d does not fit in an int16", i) - } - - r = reflect.ValueOf(int16(i)) - case reflect.Int8: - if i < math.MinInt8 || i > math.MaxInt8 { - return fmt.Errorf("toml: number %d does not fit in an int8", i) - } - - r = reflect.ValueOf(int8(i)) - case reflect.Int: - if i < minInt || i > maxInt { - return fmt.Errorf("toml: number %d does not fit in an int", i) - } - - r = reflect.ValueOf(int(i)) - case reflect.Uint64: - if i < 0 { - return fmt.Errorf("toml: negative number %d does not fit in an uint64", i) - } - - r = reflect.ValueOf(uint64(i)) - case reflect.Uint32: - if i < 0 || i > math.MaxUint32 { - return fmt.Errorf("toml: negative number %d does not fit in an uint32", i) - } - - r = reflect.ValueOf(uint32(i)) - case reflect.Uint16: - if i < 0 || i > math.MaxUint16 { - return fmt.Errorf("toml: negative number %d does not fit in an uint16", i) - } - - r = reflect.ValueOf(uint16(i)) - case reflect.Uint8: - if i < 0 || i > math.MaxUint8 { - return fmt.Errorf("toml: negative number %d does not fit in an uint8", i) - } - - r = reflect.ValueOf(uint8(i)) - case reflect.Uint: - if i < 0 || i > maxUint { - return fmt.Errorf("toml: negative number %d does not fit in an uint", i) - } - - r = reflect.ValueOf(uint(i)) - case reflect.Interface: - r = reflect.ValueOf(i) - default: - return unstable.NewParserError(d.p.Raw(value.Raw), d.typeMismatchString("integer", v.Type())) - } - - if !r.Type().AssignableTo(v.Type()) { - r = r.Convert(v.Type()) - } - - v.Set(r) - - return nil -} - -func (d *decoder) unmarshalString(value *unstable.Node, v reflect.Value) error { - switch v.Kind() { - case reflect.String: - v.SetString(string(value.Data)) - case reflect.Interface: - v.Set(reflect.ValueOf(string(value.Data))) - default: - return unstable.NewParserError(d.p.Raw(value.Raw), d.typeMismatchString("string", v.Type())) - } - - return nil -} - -func (d *decoder) handleKeyValue(expr *unstable.Node, v reflect.Value) (reflect.Value, error) { - d.strict.EnterKeyValue(expr) - - v, err := d.handleKeyValueInner(expr.Key(), expr.Value(), v) - if d.skipUntilTable { - d.strict.MissingField(expr) - d.skipUntilTable = false - } - - d.strict.ExitKeyValue(expr) - - return v, err -} - -func (d *decoder) handleKeyValueInner(key unstable.Iterator, value *unstable.Node, v reflect.Value) (reflect.Value, error) { - if key.Next() { - // Still scoping the key - return d.handleKeyValuePart(key, value, v) - } - // Done scoping the key. - // v is whatever Go value we need to fill. - return reflect.Value{}, d.handleValue(value, v) -} - -func (d *decoder) keyFromData(keyType reflect.Type, data []byte) (reflect.Value, error) { - switch { - case stringType.AssignableTo(keyType): - return reflect.ValueOf(string(data)), nil - - case stringType.ConvertibleTo(keyType): - return reflect.ValueOf(string(data)).Convert(keyType), nil - - case keyType.Implements(textUnmarshalerType): - mk := reflect.New(keyType.Elem()) - if err := mk.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil { - return reflect.Value{}, fmt.Errorf("toml: error unmarshalling key type %s from text: %w", stringType, err) - } - return mk, nil - - case reflect.PtrTo(keyType).Implements(textUnmarshalerType): - mk := reflect.New(keyType) - if err := mk.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil { - return reflect.Value{}, fmt.Errorf("toml: error unmarshalling key type %s from text: %w", stringType, err) - } - return mk.Elem(), nil - } - return reflect.Value{}, fmt.Errorf("toml: cannot convert map key of type %s to expected type %s", stringType, keyType) -} - -func (d *decoder) handleKeyValuePart(key unstable.Iterator, value *unstable.Node, v reflect.Value) (reflect.Value, error) { - // contains the replacement for v - var rv reflect.Value - - // First, dispatch over v to make sure it is a valid object. - // There is no guarantee over what it could be. - switch v.Kind() { - case reflect.Map: - vt := v.Type() - - mk, err := d.keyFromData(vt.Key(), key.Node().Data) - if err != nil { - return reflect.Value{}, err - } - - // If the map does not exist, create it. - if v.IsNil() { - v = reflect.MakeMap(vt) - rv = v - } - - mv := v.MapIndex(mk) - set := false - if !mv.IsValid() || key.IsLast() { - set = true - mv = reflect.New(v.Type().Elem()).Elem() - } - - nv, err := d.handleKeyValueInner(key, value, mv) - if err != nil { - return reflect.Value{}, err - } - if nv.IsValid() { - mv = nv - set = true - } - - if set { - v.SetMapIndex(mk, mv) - } - case reflect.Struct: - path, found := structFieldPath(v, string(key.Node().Data)) - if !found { - d.skipUntilTable = true - break - } - - if d.errorContext == nil { - d.errorContext = new(errorContext) - } - t := v.Type() - d.errorContext.Struct = t - d.errorContext.Field = path - - f := fieldByIndex(v, path) - - if !f.CanSet() { - // If the field is not settable, need to take a slower path and make a copy of - // the struct itself to a new location. - nvp := reflect.New(v.Type()) - nvp.Elem().Set(v) - v = nvp.Elem() - _, err := d.handleKeyValuePart(key, value, v) - if err != nil { - return reflect.Value{}, err - } - return nvp.Elem(), nil - } - x, err := d.handleKeyValueInner(key, value, f) - if err != nil { - return reflect.Value{}, err - } - - if x.IsValid() { - f.Set(x) - } - d.errorContext.Struct = nil - d.errorContext.Field = nil - case reflect.Interface: - v = v.Elem() - - // Following encoding/json: decoding an object into an - // interface{}, it needs to always hold a - // map[string]interface{}. This is for the types to be - // consistent whether a previous value was set or not. - if !v.IsValid() || v.Type() != mapStringInterfaceType { - v = makeMapStringInterface() - } - - x, err := d.handleKeyValuePart(key, value, v) - if err != nil { - return reflect.Value{}, err - } - if x.IsValid() { - v = x - } - rv = v - case reflect.Ptr: - elem := v.Elem() - if !elem.IsValid() { - ptr := reflect.New(v.Type().Elem()) - v.Set(ptr) - rv = v - elem = ptr.Elem() - } - - elem2, err := d.handleKeyValuePart(key, value, elem) - if err != nil { - return reflect.Value{}, err - } - if elem2.IsValid() { - elem = elem2 - } - v.Elem().Set(elem) - default: - return reflect.Value{}, fmt.Errorf("unhandled kv part: %s", v.Kind()) - } - - return rv, nil -} - -func initAndDereferencePointer(v reflect.Value) reflect.Value { - var elem reflect.Value - if v.IsNil() { - ptr := reflect.New(v.Type().Elem()) - v.Set(ptr) - } - elem = v.Elem() - return elem -} - -// Same as reflect.Value.FieldByIndex, but creates pointers if needed. -func fieldByIndex(v reflect.Value, path []int) reflect.Value { - for _, x := range path { - v = v.Field(x) - - if v.Kind() == reflect.Ptr { - if v.IsNil() { - v.Set(reflect.New(v.Type().Elem())) - } - v = v.Elem() - } - } - return v -} - -type fieldPathsMap = map[string][]int - -var globalFieldPathsCache atomic.Value // map[danger.TypeID]fieldPathsMap - -func structFieldPath(v reflect.Value, name string) ([]int, bool) { - t := v.Type() - - cache, _ := globalFieldPathsCache.Load().(map[danger.TypeID]fieldPathsMap) - fieldPaths, ok := cache[danger.MakeTypeID(t)] - - if !ok { - fieldPaths = map[string][]int{} - - forEachField(t, nil, func(name string, path []int) { - fieldPaths[name] = path - // extra copy for the case-insensitive match - fieldPaths[strings.ToLower(name)] = path - }) - - newCache := make(map[danger.TypeID]fieldPathsMap, len(cache)+1) - newCache[danger.MakeTypeID(t)] = fieldPaths - for k, v := range cache { - newCache[k] = v - } - globalFieldPathsCache.Store(newCache) - } - - path, ok := fieldPaths[name] - if !ok { - path, ok = fieldPaths[strings.ToLower(name)] - } - return path, ok -} - -func forEachField(t reflect.Type, path []int, do func(name string, path []int)) { - n := t.NumField() - for i := 0; i < n; i++ { - f := t.Field(i) - - if !f.Anonymous && f.PkgPath != "" { - // only consider exported fields. - continue - } - - fieldPath := append(path, i) - fieldPath = fieldPath[:len(fieldPath):len(fieldPath)] - - name := f.Tag.Get("toml") - if name == "-" { - continue - } - - if i := strings.IndexByte(name, ','); i >= 0 { - name = name[:i] - } - - if f.Anonymous && name == "" { - t2 := f.Type - if t2.Kind() == reflect.Ptr { - t2 = t2.Elem() - } - - if t2.Kind() == reflect.Struct { - forEachField(t2, fieldPath, do) - } - continue - } - - if name == "" { - name = f.Name - } - - do(name, fieldPath) - } -} diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/ast.go b/vendor/github.com/pelletier/go-toml/v2/unstable/ast.go deleted file mode 100644 index f526bf2..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/unstable/ast.go +++ /dev/null @@ -1,136 +0,0 @@ -package unstable - -import ( - "fmt" - "unsafe" - - "github.com/pelletier/go-toml/v2/internal/danger" -) - -// Iterator over a sequence of nodes. -// -// Starts uninitialized, you need to call Next() first. -// -// For example: -// -// it := n.Children() -// for it.Next() { -// n := it.Node() -// // do something with n -// } -type Iterator struct { - started bool - node *Node -} - -// Next moves the iterator forward and returns true if points to a -// node, false otherwise. -func (c *Iterator) Next() bool { - if !c.started { - c.started = true - } else if c.node.Valid() { - c.node = c.node.Next() - } - return c.node.Valid() -} - -// IsLast returns true if the current node of the iterator is the last -// one. Subsequent calls to Next() will return false. -func (c *Iterator) IsLast() bool { - return c.node.next == 0 -} - -// Node returns a pointer to the node pointed at by the iterator. -func (c *Iterator) Node() *Node { - return c.node -} - -// Node in a TOML expression AST. -// -// Depending on Kind, its sequence of children should be interpreted -// differently. -// -// - Array have one child per element in the array. -// - InlineTable have one child per key-value in the table (each of kind -// InlineTable). -// - KeyValue have at least two children. The first one is the value. The rest -// make a potentially dotted key. -// - Table and ArrayTable's children represent a dotted key (same as -// KeyValue, but without the first node being the value). -// -// When relevant, Raw describes the range of bytes this node is referring to in -// the input document. Use Parser.Raw() to retrieve the actual bytes. -type Node struct { - Kind Kind - Raw Range // Raw bytes from the input. - Data []byte // Node value (either allocated or referencing the input). - - // References to other nodes, as offsets in the backing array - // from this node. References can go backward, so those can be - // negative. - next int // 0 if last element - child int // 0 if no child -} - -// Range of bytes in the document. -type Range struct { - Offset uint32 - Length uint32 -} - -// Next returns a pointer to the next node, or nil if there is no next node. -func (n *Node) Next() *Node { - if n.next == 0 { - return nil - } - ptr := unsafe.Pointer(n) - size := unsafe.Sizeof(Node{}) - return (*Node)(danger.Stride(ptr, size, n.next)) -} - -// Child returns a pointer to the first child node of this node. Other children -// can be accessed calling Next on the first child. Returns an nil if this Node -// has no child. -func (n *Node) Child() *Node { - if n.child == 0 { - return nil - } - ptr := unsafe.Pointer(n) - size := unsafe.Sizeof(Node{}) - return (*Node)(danger.Stride(ptr, size, n.child)) -} - -// Valid returns true if the node's kind is set (not to Invalid). -func (n *Node) Valid() bool { - return n != nil -} - -// Key returns the children nodes making the Key on a supported node. Panics -// otherwise. They are guaranteed to be all be of the Kind Key. A simple key -// would return just one element. -func (n *Node) Key() Iterator { - switch n.Kind { - case KeyValue: - value := n.Child() - if !value.Valid() { - panic(fmt.Errorf("KeyValue should have at least two children")) - } - return Iterator{node: value.Next()} - case Table, ArrayTable: - return Iterator{node: n.Child()} - default: - panic(fmt.Errorf("Key() is not supported on a %s", n.Kind)) - } -} - -// Value returns a pointer to the value node of a KeyValue. -// Guaranteed to be non-nil. Panics if not called on a KeyValue node, -// or if the Children are malformed. -func (n *Node) Value() *Node { - return n.Child() -} - -// Children returns an iterator over a node's children. -func (n *Node) Children() Iterator { - return Iterator{node: n.Child()} -} diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/builder.go b/vendor/github.com/pelletier/go-toml/v2/unstable/builder.go deleted file mode 100644 index 9538e30..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/unstable/builder.go +++ /dev/null @@ -1,71 +0,0 @@ -package unstable - -// root contains a full AST. -// -// It is immutable once constructed with Builder. -type root struct { - nodes []Node -} - -// Iterator over the top level nodes. -func (r *root) Iterator() Iterator { - it := Iterator{} - if len(r.nodes) > 0 { - it.node = &r.nodes[0] - } - return it -} - -func (r *root) at(idx reference) *Node { - return &r.nodes[idx] -} - -type reference int - -const invalidReference reference = -1 - -func (r reference) Valid() bool { - return r != invalidReference -} - -type builder struct { - tree root - lastIdx int -} - -func (b *builder) Tree() *root { - return &b.tree -} - -func (b *builder) NodeAt(ref reference) *Node { - return b.tree.at(ref) -} - -func (b *builder) Reset() { - b.tree.nodes = b.tree.nodes[:0] - b.lastIdx = 0 -} - -func (b *builder) Push(n Node) reference { - b.lastIdx = len(b.tree.nodes) - b.tree.nodes = append(b.tree.nodes, n) - return reference(b.lastIdx) -} - -func (b *builder) PushAndChain(n Node) reference { - newIdx := len(b.tree.nodes) - b.tree.nodes = append(b.tree.nodes, n) - if b.lastIdx >= 0 { - b.tree.nodes[b.lastIdx].next = newIdx - b.lastIdx - } - b.lastIdx = newIdx - return reference(b.lastIdx) -} - -func (b *builder) AttachChild(parent reference, child reference) { - b.tree.nodes[parent].child = int(child) - int(parent) -} - -func (b *builder) Chain(from reference, to reference) { - b.tree.nodes[from].next = int(to) - int(from) -} diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/doc.go b/vendor/github.com/pelletier/go-toml/v2/unstable/doc.go deleted file mode 100644 index 7ff26c5..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/unstable/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package unstable provides APIs that do not meet the backward compatibility -// guarantees yet. -package unstable diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go b/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go deleted file mode 100644 index ff9df1b..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go +++ /dev/null @@ -1,71 +0,0 @@ -package unstable - -import "fmt" - -// Kind represents the type of TOML structure contained in a given Node. -type Kind int - -const ( - // Meta - Invalid Kind = iota - Comment - Key - - // Top level structures - Table - ArrayTable - KeyValue - - // Containers values - Array - InlineTable - - // Values - String - Bool - Float - Integer - LocalDate - LocalTime - LocalDateTime - DateTime -) - -// String implementation of fmt.Stringer. -func (k Kind) String() string { - switch k { - case Invalid: - return "Invalid" - case Comment: - return "Comment" - case Key: - return "Key" - case Table: - return "Table" - case ArrayTable: - return "ArrayTable" - case KeyValue: - return "KeyValue" - case Array: - return "Array" - case InlineTable: - return "InlineTable" - case String: - return "String" - case Bool: - return "Bool" - case Float: - return "Float" - case Integer: - return "Integer" - case LocalDate: - return "LocalDate" - case LocalTime: - return "LocalTime" - case LocalDateTime: - return "LocalDateTime" - case DateTime: - return "DateTime" - } - panic(fmt.Errorf("Kind.String() not implemented for '%d'", k)) -} diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go b/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go deleted file mode 100644 index 50358a4..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go +++ /dev/null @@ -1,1245 +0,0 @@ -package unstable - -import ( - "bytes" - "fmt" - "unicode" - - "github.com/pelletier/go-toml/v2/internal/characters" - "github.com/pelletier/go-toml/v2/internal/danger" -) - -// ParserError describes an error relative to the content of the document. -// -// It cannot outlive the instance of Parser it refers to, and may cause panics -// if the parser is reset. -type ParserError struct { - Highlight []byte - Message string - Key []string // optional -} - -// Error is the implementation of the error interface. -func (e *ParserError) Error() string { - return e.Message -} - -// NewParserError is a convenience function to create a ParserError -// -// Warning: Highlight needs to be a subslice of Parser.data, so only slices -// returned by Parser.Raw are valid candidates. -func NewParserError(highlight []byte, format string, args ...interface{}) error { - return &ParserError{ - Highlight: highlight, - Message: fmt.Errorf(format, args...).Error(), - } -} - -// Parser scans over a TOML-encoded document and generates an iterative AST. -// -// To prime the Parser, first reset it with the contents of a TOML document. -// Then, process all top-level expressions sequentially. See Example. -// -// Don't forget to check Error() after you're done parsing. -// -// Each top-level expression needs to be fully processed before calling -// NextExpression() again. Otherwise, calls to various Node methods may panic if -// the parser has moved on the next expression. -// -// For performance reasons, go-toml doesn't make a copy of the input bytes to -// the parser. Make sure to copy all the bytes you need to outlive the slice -// given to the parser. -type Parser struct { - data []byte - builder builder - ref reference - left []byte - err error - first bool - - KeepComments bool -} - -// Data returns the slice provided to the last call to Reset. -func (p *Parser) Data() []byte { - return p.data -} - -// Range returns a range description that corresponds to a given slice of the -// input. If the argument is not a subslice of the parser input, this function -// panics. -func (p *Parser) Range(b []byte) Range { - return Range{ - Offset: uint32(danger.SubsliceOffset(p.data, b)), - Length: uint32(len(b)), - } -} - -// Raw returns the slice corresponding to the bytes in the given range. -func (p *Parser) Raw(raw Range) []byte { - return p.data[raw.Offset : raw.Offset+raw.Length] -} - -// Reset brings the parser to its initial state for a given input. It wipes an -// reuses internal storage to reduce allocation. -func (p *Parser) Reset(b []byte) { - p.builder.Reset() - p.ref = invalidReference - p.data = b - p.left = b - p.err = nil - p.first = true -} - -// NextExpression parses the next top-level expression. If an expression was -// successfully parsed, it returns true. If the parser is at the end of the -// document or an error occurred, it returns false. -// -// Retrieve the parsed expression with Expression(). -func (p *Parser) NextExpression() bool { - if len(p.left) == 0 || p.err != nil { - return false - } - - p.builder.Reset() - p.ref = invalidReference - - for { - if len(p.left) == 0 || p.err != nil { - return false - } - - if !p.first { - p.left, p.err = p.parseNewline(p.left) - } - - if len(p.left) == 0 || p.err != nil { - return false - } - - p.ref, p.left, p.err = p.parseExpression(p.left) - - if p.err != nil { - return false - } - - p.first = false - - if p.ref.Valid() { - return true - } - } -} - -// Expression returns a pointer to the node representing the last successfully -// parsed expression. -func (p *Parser) Expression() *Node { - return p.builder.NodeAt(p.ref) -} - -// Error returns any error that has occurred during parsing. -func (p *Parser) Error() error { - return p.err -} - -// Position describes a position in the input. -type Position struct { - // Number of bytes from the beginning of the input. - Offset int - // Line number, starting at 1. - Line int - // Column number, starting at 1. - Column int -} - -// Shape describes the position of a range in the input. -type Shape struct { - Start Position - End Position -} - -func (p *Parser) position(b []byte) Position { - offset := danger.SubsliceOffset(p.data, b) - - lead := p.data[:offset] - - return Position{ - Offset: offset, - Line: bytes.Count(lead, []byte{'\n'}) + 1, - Column: len(lead) - bytes.LastIndex(lead, []byte{'\n'}), - } -} - -// Shape returns the shape of the given range in the input. Will -// panic if the range is not a subslice of the input. -func (p *Parser) Shape(r Range) Shape { - raw := p.Raw(r) - return Shape{ - Start: p.position(raw), - End: p.position(raw[r.Length:]), - } -} - -func (p *Parser) parseNewline(b []byte) ([]byte, error) { - if b[0] == '\n' { - return b[1:], nil - } - - if b[0] == '\r' { - _, rest, err := scanWindowsNewline(b) - return rest, err - } - - return nil, NewParserError(b[0:1], "expected newline but got %#U", b[0]) -} - -func (p *Parser) parseComment(b []byte) (reference, []byte, error) { - ref := invalidReference - data, rest, err := scanComment(b) - if p.KeepComments && err == nil { - ref = p.builder.Push(Node{ - Kind: Comment, - Raw: p.Range(data), - Data: data, - }) - } - return ref, rest, err -} - -func (p *Parser) parseExpression(b []byte) (reference, []byte, error) { - // expression = ws [ comment ] - // expression =/ ws keyval ws [ comment ] - // expression =/ ws table ws [ comment ] - ref := invalidReference - - b = p.parseWhitespace(b) - - if len(b) == 0 { - return ref, b, nil - } - - if b[0] == '#' { - ref, rest, err := p.parseComment(b) - return ref, rest, err - } - - if b[0] == '\n' || b[0] == '\r' { - return ref, b, nil - } - - var err error - if b[0] == '[' { - ref, b, err = p.parseTable(b) - } else { - ref, b, err = p.parseKeyval(b) - } - - if err != nil { - return ref, nil, err - } - - b = p.parseWhitespace(b) - - if len(b) > 0 && b[0] == '#' { - cref, rest, err := p.parseComment(b) - if cref != invalidReference { - p.builder.Chain(ref, cref) - } - return ref, rest, err - } - - return ref, b, nil -} - -func (p *Parser) parseTable(b []byte) (reference, []byte, error) { - // table = std-table / array-table - if len(b) > 1 && b[1] == '[' { - return p.parseArrayTable(b) - } - - return p.parseStdTable(b) -} - -func (p *Parser) parseArrayTable(b []byte) (reference, []byte, error) { - // array-table = array-table-open key array-table-close - // array-table-open = %x5B.5B ws ; [[ Double left square bracket - // array-table-close = ws %x5D.5D ; ]] Double right square bracket - ref := p.builder.Push(Node{ - Kind: ArrayTable, - }) - - b = b[2:] - b = p.parseWhitespace(b) - - k, b, err := p.parseKey(b) - if err != nil { - return ref, nil, err - } - - p.builder.AttachChild(ref, k) - b = p.parseWhitespace(b) - - b, err = expect(']', b) - if err != nil { - return ref, nil, err - } - - b, err = expect(']', b) - - return ref, b, err -} - -func (p *Parser) parseStdTable(b []byte) (reference, []byte, error) { - // std-table = std-table-open key std-table-close - // std-table-open = %x5B ws ; [ Left square bracket - // std-table-close = ws %x5D ; ] Right square bracket - ref := p.builder.Push(Node{ - Kind: Table, - }) - - b = b[1:] - b = p.parseWhitespace(b) - - key, b, err := p.parseKey(b) - if err != nil { - return ref, nil, err - } - - p.builder.AttachChild(ref, key) - - b = p.parseWhitespace(b) - - b, err = expect(']', b) - - return ref, b, err -} - -func (p *Parser) parseKeyval(b []byte) (reference, []byte, error) { - // keyval = key keyval-sep val - ref := p.builder.Push(Node{ - Kind: KeyValue, - }) - - key, b, err := p.parseKey(b) - if err != nil { - return invalidReference, nil, err - } - - // keyval-sep = ws %x3D ws ; = - - b = p.parseWhitespace(b) - - if len(b) == 0 { - return invalidReference, nil, NewParserError(b, "expected = after a key, but the document ends there") - } - - b, err = expect('=', b) - if err != nil { - return invalidReference, nil, err - } - - b = p.parseWhitespace(b) - - valRef, b, err := p.parseVal(b) - if err != nil { - return ref, b, err - } - - p.builder.Chain(valRef, key) - p.builder.AttachChild(ref, valRef) - - return ref, b, err -} - -//nolint:cyclop,funlen -func (p *Parser) parseVal(b []byte) (reference, []byte, error) { - // val = string / boolean / array / inline-table / date-time / float / integer - ref := invalidReference - - if len(b) == 0 { - return ref, nil, NewParserError(b, "expected value, not eof") - } - - var err error - c := b[0] - - switch c { - case '"': - var raw []byte - var v []byte - if scanFollowsMultilineBasicStringDelimiter(b) { - raw, v, b, err = p.parseMultilineBasicString(b) - } else { - raw, v, b, err = p.parseBasicString(b) - } - - if err == nil { - ref = p.builder.Push(Node{ - Kind: String, - Raw: p.Range(raw), - Data: v, - }) - } - - return ref, b, err - case '\'': - var raw []byte - var v []byte - if scanFollowsMultilineLiteralStringDelimiter(b) { - raw, v, b, err = p.parseMultilineLiteralString(b) - } else { - raw, v, b, err = p.parseLiteralString(b) - } - - if err == nil { - ref = p.builder.Push(Node{ - Kind: String, - Raw: p.Range(raw), - Data: v, - }) - } - - return ref, b, err - case 't': - if !scanFollowsTrue(b) { - return ref, nil, NewParserError(atmost(b, 4), "expected 'true'") - } - - ref = p.builder.Push(Node{ - Kind: Bool, - Data: b[:4], - }) - - return ref, b[4:], nil - case 'f': - if !scanFollowsFalse(b) { - return ref, nil, NewParserError(atmost(b, 5), "expected 'false'") - } - - ref = p.builder.Push(Node{ - Kind: Bool, - Data: b[:5], - }) - - return ref, b[5:], nil - case '[': - return p.parseValArray(b) - case '{': - return p.parseInlineTable(b) - default: - return p.parseIntOrFloatOrDateTime(b) - } -} - -func atmost(b []byte, n int) []byte { - if n >= len(b) { - return b - } - - return b[:n] -} - -func (p *Parser) parseLiteralString(b []byte) ([]byte, []byte, []byte, error) { - v, rest, err := scanLiteralString(b) - if err != nil { - return nil, nil, nil, err - } - - return v, v[1 : len(v)-1], rest, nil -} - -func (p *Parser) parseInlineTable(b []byte) (reference, []byte, error) { - // inline-table = inline-table-open [ inline-table-keyvals ] inline-table-close - // inline-table-open = %x7B ws ; { - // inline-table-close = ws %x7D ; } - // inline-table-sep = ws %x2C ws ; , Comma - // inline-table-keyvals = keyval [ inline-table-sep inline-table-keyvals ] - parent := p.builder.Push(Node{ - Kind: InlineTable, - Raw: p.Range(b[:1]), - }) - - first := true - - var child reference - - b = b[1:] - - var err error - - for len(b) > 0 { - previousB := b - b = p.parseWhitespace(b) - - if len(b) == 0 { - return parent, nil, NewParserError(previousB[:1], "inline table is incomplete") - } - - if b[0] == '}' { - break - } - - if !first { - b, err = expect(',', b) - if err != nil { - return parent, nil, err - } - b = p.parseWhitespace(b) - } - - var kv reference - - kv, b, err = p.parseKeyval(b) - if err != nil { - return parent, nil, err - } - - if first { - p.builder.AttachChild(parent, kv) - } else { - p.builder.Chain(child, kv) - } - child = kv - - first = false - } - - rest, err := expect('}', b) - - return parent, rest, err -} - -//nolint:funlen,cyclop -func (p *Parser) parseValArray(b []byte) (reference, []byte, error) { - // array = array-open [ array-values ] ws-comment-newline array-close - // array-open = %x5B ; [ - // array-close = %x5D ; ] - // array-values = ws-comment-newline val ws-comment-newline array-sep array-values - // array-values =/ ws-comment-newline val ws-comment-newline [ array-sep ] - // array-sep = %x2C ; , Comma - // ws-comment-newline = *( wschar / [ comment ] newline ) - arrayStart := b - b = b[1:] - - parent := p.builder.Push(Node{ - Kind: Array, - }) - - // First indicates whether the parser is looking for the first element - // (non-comment) of the array. - first := true - - lastChild := invalidReference - - addChild := func(valueRef reference) { - if lastChild == invalidReference { - p.builder.AttachChild(parent, valueRef) - } else { - p.builder.Chain(lastChild, valueRef) - } - lastChild = valueRef - } - - var err error - for len(b) > 0 { - cref := invalidReference - cref, b, err = p.parseOptionalWhitespaceCommentNewline(b) - if err != nil { - return parent, nil, err - } - - if cref != invalidReference { - addChild(cref) - } - - if len(b) == 0 { - return parent, nil, NewParserError(arrayStart[:1], "array is incomplete") - } - - if b[0] == ']' { - break - } - - if b[0] == ',' { - if first { - return parent, nil, NewParserError(b[0:1], "array cannot start with comma") - } - b = b[1:] - - cref, b, err = p.parseOptionalWhitespaceCommentNewline(b) - if err != nil { - return parent, nil, err - } - if cref != invalidReference { - addChild(cref) - } - } else if !first { - return parent, nil, NewParserError(b[0:1], "array elements must be separated by commas") - } - - // TOML allows trailing commas in arrays. - if len(b) > 0 && b[0] == ']' { - break - } - - var valueRef reference - valueRef, b, err = p.parseVal(b) - if err != nil { - return parent, nil, err - } - - addChild(valueRef) - - cref, b, err = p.parseOptionalWhitespaceCommentNewline(b) - if err != nil { - return parent, nil, err - } - if cref != invalidReference { - addChild(cref) - } - - first = false - } - - rest, err := expect(']', b) - - return parent, rest, err -} - -func (p *Parser) parseOptionalWhitespaceCommentNewline(b []byte) (reference, []byte, error) { - rootCommentRef := invalidReference - latestCommentRef := invalidReference - - addComment := func(ref reference) { - if rootCommentRef == invalidReference { - rootCommentRef = ref - } else if latestCommentRef == invalidReference { - p.builder.AttachChild(rootCommentRef, ref) - latestCommentRef = ref - } else { - p.builder.Chain(latestCommentRef, ref) - latestCommentRef = ref - } - } - - for len(b) > 0 { - var err error - b = p.parseWhitespace(b) - - if len(b) > 0 && b[0] == '#' { - var ref reference - ref, b, err = p.parseComment(b) - if err != nil { - return invalidReference, nil, err - } - if ref != invalidReference { - addComment(ref) - } - } - - if len(b) == 0 { - break - } - - if b[0] == '\n' || b[0] == '\r' { - b, err = p.parseNewline(b) - if err != nil { - return invalidReference, nil, err - } - } else { - break - } - } - - return rootCommentRef, b, nil -} - -func (p *Parser) parseMultilineLiteralString(b []byte) ([]byte, []byte, []byte, error) { - token, rest, err := scanMultilineLiteralString(b) - if err != nil { - return nil, nil, nil, err - } - - i := 3 - - // skip the immediate new line - if token[i] == '\n' { - i++ - } else if token[i] == '\r' && token[i+1] == '\n' { - i += 2 - } - - return token, token[i : len(token)-3], rest, err -} - -//nolint:funlen,gocognit,cyclop -func (p *Parser) parseMultilineBasicString(b []byte) ([]byte, []byte, []byte, error) { - // ml-basic-string = ml-basic-string-delim [ newline ] ml-basic-body - // ml-basic-string-delim - // ml-basic-string-delim = 3quotation-mark - // ml-basic-body = *mlb-content *( mlb-quotes 1*mlb-content ) [ mlb-quotes ] - // - // mlb-content = mlb-char / newline / mlb-escaped-nl - // mlb-char = mlb-unescaped / escaped - // mlb-quotes = 1*2quotation-mark - // mlb-unescaped = wschar / %x21 / %x23-5B / %x5D-7E / non-ascii - // mlb-escaped-nl = escape ws newline *( wschar / newline ) - token, escaped, rest, err := scanMultilineBasicString(b) - if err != nil { - return nil, nil, nil, err - } - - i := 3 - - // skip the immediate new line - if token[i] == '\n' { - i++ - } else if token[i] == '\r' && token[i+1] == '\n' { - i += 2 - } - - // fast path - startIdx := i - endIdx := len(token) - len(`"""`) - - if !escaped { - str := token[startIdx:endIdx] - verr := characters.Utf8TomlValidAlreadyEscaped(str) - if verr.Zero() { - return token, str, rest, nil - } - return nil, nil, nil, NewParserError(str[verr.Index:verr.Index+verr.Size], "invalid UTF-8") - } - - var builder bytes.Buffer - - // The scanner ensures that the token starts and ends with quotes and that - // escapes are balanced. - for i < len(token)-3 { - c := token[i] - - //nolint:nestif - if c == '\\' { - // When the last non-whitespace character on a line is an unescaped \, - // it will be trimmed along with all whitespace (including newlines) up - // to the next non-whitespace character or closing delimiter. - - isLastNonWhitespaceOnLine := false - j := 1 - findEOLLoop: - for ; j < len(token)-3-i; j++ { - switch token[i+j] { - case ' ', '\t': - continue - case '\r': - if token[i+j+1] == '\n' { - continue - } - case '\n': - isLastNonWhitespaceOnLine = true - } - break findEOLLoop - } - if isLastNonWhitespaceOnLine { - i += j - for ; i < len(token)-3; i++ { - c := token[i] - if !(c == '\n' || c == '\r' || c == ' ' || c == '\t') { - i-- - break - } - } - i++ - continue - } - - // handle escaping - i++ - c = token[i] - - switch c { - case '"', '\\': - builder.WriteByte(c) - case 'b': - builder.WriteByte('\b') - case 'f': - builder.WriteByte('\f') - case 'n': - builder.WriteByte('\n') - case 'r': - builder.WriteByte('\r') - case 't': - builder.WriteByte('\t') - case 'e': - builder.WriteByte(0x1B) - case 'u': - x, err := hexToRune(atmost(token[i+1:], 4), 4) - if err != nil { - return nil, nil, nil, err - } - builder.WriteRune(x) - i += 4 - case 'U': - x, err := hexToRune(atmost(token[i+1:], 8), 8) - if err != nil { - return nil, nil, nil, err - } - - builder.WriteRune(x) - i += 8 - default: - return nil, nil, nil, NewParserError(token[i:i+1], "invalid escaped character %#U", c) - } - i++ - } else { - size := characters.Utf8ValidNext(token[i:]) - if size == 0 { - return nil, nil, nil, NewParserError(token[i:i+1], "invalid character %#U", c) - } - builder.Write(token[i : i+size]) - i += size - } - } - - return token, builder.Bytes(), rest, nil -} - -func (p *Parser) parseKey(b []byte) (reference, []byte, error) { - // key = simple-key / dotted-key - // simple-key = quoted-key / unquoted-key - // - // unquoted-key = 1*( ALPHA / DIGIT / %x2D / %x5F ) ; A-Z / a-z / 0-9 / - / _ - // quoted-key = basic-string / literal-string - // dotted-key = simple-key 1*( dot-sep simple-key ) - // - // dot-sep = ws %x2E ws ; . Period - raw, key, b, err := p.parseSimpleKey(b) - if err != nil { - return invalidReference, nil, err - } - - ref := p.builder.Push(Node{ - Kind: Key, - Raw: p.Range(raw), - Data: key, - }) - - for { - b = p.parseWhitespace(b) - if len(b) > 0 && b[0] == '.' { - b = p.parseWhitespace(b[1:]) - - raw, key, b, err = p.parseSimpleKey(b) - if err != nil { - return ref, nil, err - } - - p.builder.PushAndChain(Node{ - Kind: Key, - Raw: p.Range(raw), - Data: key, - }) - } else { - break - } - } - - return ref, b, nil -} - -func (p *Parser) parseSimpleKey(b []byte) (raw, key, rest []byte, err error) { - if len(b) == 0 { - return nil, nil, nil, NewParserError(b, "expected key but found none") - } - - // simple-key = quoted-key / unquoted-key - // unquoted-key = 1*( ALPHA / DIGIT / %x2D / %x5F ) ; A-Z / a-z / 0-9 / - / _ - // quoted-key = basic-string / literal-string - switch { - case b[0] == '\'': - return p.parseLiteralString(b) - case b[0] == '"': - return p.parseBasicString(b) - case isUnquotedKeyChar(b[0]): - key, rest = scanUnquotedKey(b) - return key, key, rest, nil - default: - return nil, nil, nil, NewParserError(b[0:1], "invalid character at start of key: %c", b[0]) - } -} - -//nolint:funlen,cyclop -func (p *Parser) parseBasicString(b []byte) ([]byte, []byte, []byte, error) { - // basic-string = quotation-mark *basic-char quotation-mark - // quotation-mark = %x22 ; " - // basic-char = basic-unescaped / escaped - // basic-unescaped = wschar / %x21 / %x23-5B / %x5D-7E / non-ascii - // escaped = escape escape-seq-char - // escape-seq-char = %x22 ; " quotation mark U+0022 - // escape-seq-char =/ %x5C ; \ reverse solidus U+005C - // escape-seq-char =/ %x62 ; b backspace U+0008 - // escape-seq-char =/ %x66 ; f form feed U+000C - // escape-seq-char =/ %x6E ; n line feed U+000A - // escape-seq-char =/ %x72 ; r carriage return U+000D - // escape-seq-char =/ %x74 ; t tab U+0009 - // escape-seq-char =/ %x75 4HEXDIG ; uXXXX U+XXXX - // escape-seq-char =/ %x55 8HEXDIG ; UXXXXXXXX U+XXXXXXXX - token, escaped, rest, err := scanBasicString(b) - if err != nil { - return nil, nil, nil, err - } - - startIdx := len(`"`) - endIdx := len(token) - len(`"`) - - // Fast path. If there is no escape sequence, the string should just be - // an UTF-8 encoded string, which is the same as Go. In that case, - // validate the string and return a direct reference to the buffer. - if !escaped { - str := token[startIdx:endIdx] - verr := characters.Utf8TomlValidAlreadyEscaped(str) - if verr.Zero() { - return token, str, rest, nil - } - return nil, nil, nil, NewParserError(str[verr.Index:verr.Index+verr.Size], "invalid UTF-8") - } - - i := startIdx - - var builder bytes.Buffer - - // The scanner ensures that the token starts and ends with quotes and that - // escapes are balanced. - for i < len(token)-1 { - c := token[i] - if c == '\\' { - i++ - c = token[i] - - switch c { - case '"', '\\': - builder.WriteByte(c) - case 'b': - builder.WriteByte('\b') - case 'f': - builder.WriteByte('\f') - case 'n': - builder.WriteByte('\n') - case 'r': - builder.WriteByte('\r') - case 't': - builder.WriteByte('\t') - case 'e': - builder.WriteByte(0x1B) - case 'u': - x, err := hexToRune(token[i+1:len(token)-1], 4) - if err != nil { - return nil, nil, nil, err - } - - builder.WriteRune(x) - i += 4 - case 'U': - x, err := hexToRune(token[i+1:len(token)-1], 8) - if err != nil { - return nil, nil, nil, err - } - - builder.WriteRune(x) - i += 8 - default: - return nil, nil, nil, NewParserError(token[i:i+1], "invalid escaped character %#U", c) - } - i++ - } else { - size := characters.Utf8ValidNext(token[i:]) - if size == 0 { - return nil, nil, nil, NewParserError(token[i:i+1], "invalid character %#U", c) - } - builder.Write(token[i : i+size]) - i += size - } - } - - return token, builder.Bytes(), rest, nil -} - -func hexToRune(b []byte, length int) (rune, error) { - if len(b) < length { - return -1, NewParserError(b, "unicode point needs %d character, not %d", length, len(b)) - } - b = b[:length] - - var r uint32 - for i, c := range b { - d := uint32(0) - switch { - case '0' <= c && c <= '9': - d = uint32(c - '0') - case 'a' <= c && c <= 'f': - d = uint32(c - 'a' + 10) - case 'A' <= c && c <= 'F': - d = uint32(c - 'A' + 10) - default: - return -1, NewParserError(b[i:i+1], "non-hex character") - } - r = r*16 + d - } - - if r > unicode.MaxRune || 0xD800 <= r && r < 0xE000 { - return -1, NewParserError(b, "escape sequence is invalid Unicode code point") - } - - return rune(r), nil -} - -func (p *Parser) parseWhitespace(b []byte) []byte { - // ws = *wschar - // wschar = %x20 ; Space - // wschar =/ %x09 ; Horizontal tab - _, rest := scanWhitespace(b) - - return rest -} - -//nolint:cyclop -func (p *Parser) parseIntOrFloatOrDateTime(b []byte) (reference, []byte, error) { - switch b[0] { - case 'i': - if !scanFollowsInf(b) { - return invalidReference, nil, NewParserError(atmost(b, 3), "expected 'inf'") - } - - return p.builder.Push(Node{ - Kind: Float, - Data: b[:3], - Raw: p.Range(b[:3]), - }), b[3:], nil - case 'n': - if !scanFollowsNan(b) { - return invalidReference, nil, NewParserError(atmost(b, 3), "expected 'nan'") - } - - return p.builder.Push(Node{ - Kind: Float, - Data: b[:3], - Raw: p.Range(b[:3]), - }), b[3:], nil - case '+', '-': - return p.scanIntOrFloat(b) - } - - if len(b) < 3 { - return p.scanIntOrFloat(b) - } - - s := 5 - if len(b) < s { - s = len(b) - } - - for idx, c := range b[:s] { - if isDigit(c) { - continue - } - - if idx == 2 && c == ':' || (idx == 4 && c == '-') { - return p.scanDateTime(b) - } - - break - } - - return p.scanIntOrFloat(b) -} - -func (p *Parser) scanDateTime(b []byte) (reference, []byte, error) { - // scans for contiguous characters in [0-9T:Z.+-], and up to one space if - // followed by a digit. - hasDate := false - hasTime := false - hasTz := false - seenSpace := false - - i := 0 -byteLoop: - for ; i < len(b); i++ { - c := b[i] - - switch { - case isDigit(c): - case c == '-': - hasDate = true - const minOffsetOfTz = 8 - if i >= minOffsetOfTz { - hasTz = true - } - case c == 'T' || c == 't' || c == ':' || c == '.': - hasTime = true - case c == '+' || c == '-' || c == 'Z' || c == 'z': - hasTz = true - case c == ' ': - if !seenSpace && i+1 < len(b) && isDigit(b[i+1]) { - i += 2 - // Avoid reaching past the end of the document in case the time - // is malformed. See TestIssue585. - if i >= len(b) { - i-- - } - seenSpace = true - hasTime = true - } else { - break byteLoop - } - default: - break byteLoop - } - } - - var kind Kind - - if hasTime { - if hasDate { - if hasTz { - kind = DateTime - } else { - kind = LocalDateTime - } - } else { - kind = LocalTime - } - } else { - kind = LocalDate - } - - return p.builder.Push(Node{ - Kind: kind, - Data: b[:i], - }), b[i:], nil -} - -//nolint:funlen,gocognit,cyclop -func (p *Parser) scanIntOrFloat(b []byte) (reference, []byte, error) { - i := 0 - - if len(b) > 2 && b[0] == '0' && b[1] != '.' && b[1] != 'e' && b[1] != 'E' { - var isValidRune validRuneFn - - switch b[1] { - case 'x': - isValidRune = isValidHexRune - case 'o': - isValidRune = isValidOctalRune - case 'b': - isValidRune = isValidBinaryRune - default: - i++ - } - - if isValidRune != nil { - i += 2 - for ; i < len(b); i++ { - if !isValidRune(b[i]) { - break - } - } - } - - return p.builder.Push(Node{ - Kind: Integer, - Data: b[:i], - Raw: p.Range(b[:i]), - }), b[i:], nil - } - - isFloat := false - - for ; i < len(b); i++ { - c := b[i] - - if c >= '0' && c <= '9' || c == '+' || c == '-' || c == '_' { - continue - } - - if c == '.' || c == 'e' || c == 'E' { - isFloat = true - - continue - } - - if c == 'i' { - if scanFollowsInf(b[i:]) { - return p.builder.Push(Node{ - Kind: Float, - Data: b[:i+3], - Raw: p.Range(b[:i+3]), - }), b[i+3:], nil - } - - return invalidReference, nil, NewParserError(b[i:i+1], "unexpected character 'i' while scanning for a number") - } - - if c == 'n' { - if scanFollowsNan(b[i:]) { - return p.builder.Push(Node{ - Kind: Float, - Data: b[:i+3], - Raw: p.Range(b[:i+3]), - }), b[i+3:], nil - } - - return invalidReference, nil, NewParserError(b[i:i+1], "unexpected character 'n' while scanning for a number") - } - - break - } - - if i == 0 { - return invalidReference, b, NewParserError(b, "incomplete number") - } - - kind := Integer - - if isFloat { - kind = Float - } - - return p.builder.Push(Node{ - Kind: kind, - Data: b[:i], - Raw: p.Range(b[:i]), - }), b[i:], nil -} - -func isDigit(r byte) bool { - return r >= '0' && r <= '9' -} - -type validRuneFn func(r byte) bool - -func isValidHexRune(r byte) bool { - return r >= 'a' && r <= 'f' || - r >= 'A' && r <= 'F' || - r >= '0' && r <= '9' || - r == '_' -} - -func isValidOctalRune(r byte) bool { - return r >= '0' && r <= '7' || r == '_' -} - -func isValidBinaryRune(r byte) bool { - return r == '0' || r == '1' || r == '_' -} - -func expect(x byte, b []byte) ([]byte, error) { - if len(b) == 0 { - return nil, NewParserError(b, "expected character %c but the document ended here", x) - } - - if b[0] != x { - return nil, NewParserError(b[0:1], "expected character %c", x) - } - - return b[1:], nil -} diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/scanner.go b/vendor/github.com/pelletier/go-toml/v2/unstable/scanner.go deleted file mode 100644 index 0512181..0000000 --- a/vendor/github.com/pelletier/go-toml/v2/unstable/scanner.go +++ /dev/null @@ -1,270 +0,0 @@ -package unstable - -import "github.com/pelletier/go-toml/v2/internal/characters" - -func scanFollows(b []byte, pattern string) bool { - n := len(pattern) - - return len(b) >= n && string(b[:n]) == pattern -} - -func scanFollowsMultilineBasicStringDelimiter(b []byte) bool { - return scanFollows(b, `"""`) -} - -func scanFollowsMultilineLiteralStringDelimiter(b []byte) bool { - return scanFollows(b, `'''`) -} - -func scanFollowsTrue(b []byte) bool { - return scanFollows(b, `true`) -} - -func scanFollowsFalse(b []byte) bool { - return scanFollows(b, `false`) -} - -func scanFollowsInf(b []byte) bool { - return scanFollows(b, `inf`) -} - -func scanFollowsNan(b []byte) bool { - return scanFollows(b, `nan`) -} - -func scanUnquotedKey(b []byte) ([]byte, []byte) { - // unquoted-key = 1*( ALPHA / DIGIT / %x2D / %x5F ) ; A-Z / a-z / 0-9 / - / _ - for i := 0; i < len(b); i++ { - if !isUnquotedKeyChar(b[i]) { - return b[:i], b[i:] - } - } - - return b, b[len(b):] -} - -func isUnquotedKeyChar(r byte) bool { - return (r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9') || r == '-' || r == '_' -} - -func scanLiteralString(b []byte) ([]byte, []byte, error) { - // literal-string = apostrophe *literal-char apostrophe - // apostrophe = %x27 ; ' apostrophe - // literal-char = %x09 / %x20-26 / %x28-7E / non-ascii - for i := 1; i < len(b); { - switch b[i] { - case '\'': - return b[:i+1], b[i+1:], nil - case '\n', '\r': - return nil, nil, NewParserError(b[i:i+1], "literal strings cannot have new lines") - } - size := characters.Utf8ValidNext(b[i:]) - if size == 0 { - return nil, nil, NewParserError(b[i:i+1], "invalid character") - } - i += size - } - - return nil, nil, NewParserError(b[len(b):], "unterminated literal string") -} - -func scanMultilineLiteralString(b []byte) ([]byte, []byte, error) { - // ml-literal-string = ml-literal-string-delim [ newline ] ml-literal-body - // ml-literal-string-delim - // ml-literal-string-delim = 3apostrophe - // ml-literal-body = *mll-content *( mll-quotes 1*mll-content ) [ mll-quotes ] - // - // mll-content = mll-char / newline - // mll-char = %x09 / %x20-26 / %x28-7E / non-ascii - // mll-quotes = 1*2apostrophe - for i := 3; i < len(b); { - switch b[i] { - case '\'': - if scanFollowsMultilineLiteralStringDelimiter(b[i:]) { - i += 3 - - // At that point we found 3 apostrophe, and i is the - // index of the byte after the third one. The scanner - // needs to be eager, because there can be an extra 2 - // apostrophe that can be accepted at the end of the - // string. - - if i >= len(b) || b[i] != '\'' { - return b[:i], b[i:], nil - } - i++ - - if i >= len(b) || b[i] != '\'' { - return b[:i], b[i:], nil - } - i++ - - if i < len(b) && b[i] == '\'' { - return nil, nil, NewParserError(b[i-3:i+1], "''' not allowed in multiline literal string") - } - - return b[:i], b[i:], nil - } - case '\r': - if len(b) < i+2 { - return nil, nil, NewParserError(b[len(b):], `need a \n after \r`) - } - if b[i+1] != '\n' { - return nil, nil, NewParserError(b[i:i+2], `need a \n after \r`) - } - i += 2 // skip the \n - continue - } - size := characters.Utf8ValidNext(b[i:]) - if size == 0 { - return nil, nil, NewParserError(b[i:i+1], "invalid character") - } - i += size - } - - return nil, nil, NewParserError(b[len(b):], `multiline literal string not terminated by '''`) -} - -func scanWindowsNewline(b []byte) ([]byte, []byte, error) { - const lenCRLF = 2 - if len(b) < lenCRLF { - return nil, nil, NewParserError(b, "windows new line expected") - } - - if b[1] != '\n' { - return nil, nil, NewParserError(b, `windows new line should be \r\n`) - } - - return b[:lenCRLF], b[lenCRLF:], nil -} - -func scanWhitespace(b []byte) ([]byte, []byte) { - for i := 0; i < len(b); i++ { - switch b[i] { - case ' ', '\t': - continue - default: - return b[:i], b[i:] - } - } - - return b, b[len(b):] -} - -func scanComment(b []byte) ([]byte, []byte, error) { - // comment-start-symbol = %x23 ; # - // non-ascii = %x80-D7FF / %xE000-10FFFF - // non-eol = %x09 / %x20-7F / non-ascii - // - // comment = comment-start-symbol *non-eol - - for i := 1; i < len(b); { - if b[i] == '\n' { - return b[:i], b[i:], nil - } - if b[i] == '\r' { - if i+1 < len(b) && b[i+1] == '\n' { - return b[:i+1], b[i+1:], nil - } - return nil, nil, NewParserError(b[i:i+1], "invalid character in comment") - } - size := characters.Utf8ValidNext(b[i:]) - if size == 0 { - return nil, nil, NewParserError(b[i:i+1], "invalid character in comment") - } - - i += size - } - - return b, b[len(b):], nil -} - -func scanBasicString(b []byte) ([]byte, bool, []byte, error) { - // basic-string = quotation-mark *basic-char quotation-mark - // quotation-mark = %x22 ; " - // basic-char = basic-unescaped / escaped - // basic-unescaped = wschar / %x21 / %x23-5B / %x5D-7E / non-ascii - // escaped = escape escape-seq-char - escaped := false - i := 1 - - for ; i < len(b); i++ { - switch b[i] { - case '"': - return b[:i+1], escaped, b[i+1:], nil - case '\n', '\r': - return nil, escaped, nil, NewParserError(b[i:i+1], "basic strings cannot have new lines") - case '\\': - if len(b) < i+2 { - return nil, escaped, nil, NewParserError(b[i:i+1], "need a character after \\") - } - escaped = true - i++ // skip the next character - } - } - - return nil, escaped, nil, NewParserError(b[len(b):], `basic string not terminated by "`) -} - -func scanMultilineBasicString(b []byte) ([]byte, bool, []byte, error) { - // ml-basic-string = ml-basic-string-delim [ newline ] ml-basic-body - // ml-basic-string-delim - // ml-basic-string-delim = 3quotation-mark - // ml-basic-body = *mlb-content *( mlb-quotes 1*mlb-content ) [ mlb-quotes ] - // - // mlb-content = mlb-char / newline / mlb-escaped-nl - // mlb-char = mlb-unescaped / escaped - // mlb-quotes = 1*2quotation-mark - // mlb-unescaped = wschar / %x21 / %x23-5B / %x5D-7E / non-ascii - // mlb-escaped-nl = escape ws newline *( wschar / newline ) - - escaped := false - i := 3 - - for ; i < len(b); i++ { - switch b[i] { - case '"': - if scanFollowsMultilineBasicStringDelimiter(b[i:]) { - i += 3 - - // At that point we found 3 apostrophe, and i is the - // index of the byte after the third one. The scanner - // needs to be eager, because there can be an extra 2 - // apostrophe that can be accepted at the end of the - // string. - - if i >= len(b) || b[i] != '"' { - return b[:i], escaped, b[i:], nil - } - i++ - - if i >= len(b) || b[i] != '"' { - return b[:i], escaped, b[i:], nil - } - i++ - - if i < len(b) && b[i] == '"' { - return nil, escaped, nil, NewParserError(b[i-3:i+1], `""" not allowed in multiline basic string`) - } - - return b[:i], escaped, b[i:], nil - } - case '\\': - if len(b) < i+2 { - return nil, escaped, nil, NewParserError(b[len(b):], "need a character after \\") - } - escaped = true - i++ // skip the next character - case '\r': - if len(b) < i+2 { - return nil, escaped, nil, NewParserError(b[len(b):], `need a \n after \r`) - } - if b[i+1] != '\n' { - return nil, escaped, nil, NewParserError(b[i:i+2], `need a \n after \r`) - } - i++ // skip the \n - } - } - - return nil, escaped, nil, NewParserError(b[len(b):], `multiline basic string not terminated by """`) -} diff --git a/vendor/github.com/pkg/errors/.gitignore b/vendor/github.com/pkg/errors/.gitignore deleted file mode 100644 index daf913b..0000000 --- a/vendor/github.com/pkg/errors/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/vendor/github.com/pkg/errors/.travis.yml b/vendor/github.com/pkg/errors/.travis.yml deleted file mode 100644 index 9159de0..0000000 --- a/vendor/github.com/pkg/errors/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: go -go_import_path: github.com/pkg/errors -go: - - 1.11.x - - 1.12.x - - 1.13.x - - tip - -script: - - make check diff --git a/vendor/github.com/pkg/errors/LICENSE b/vendor/github.com/pkg/errors/LICENSE deleted file mode 100644 index 835ba3e..0000000 --- a/vendor/github.com/pkg/errors/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2015, Dave Cheney -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/pkg/errors/Makefile b/vendor/github.com/pkg/errors/Makefile deleted file mode 100644 index ce9d7cd..0000000 --- a/vendor/github.com/pkg/errors/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -PKGS := github.com/pkg/errors -SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS)) -GO := go - -check: test vet gofmt misspell unconvert staticcheck ineffassign unparam - -test: - $(GO) test $(PKGS) - -vet: | test - $(GO) vet $(PKGS) - -staticcheck: - $(GO) get honnef.co/go/tools/cmd/staticcheck - staticcheck -checks all $(PKGS) - -misspell: - $(GO) get github.com/client9/misspell/cmd/misspell - misspell \ - -locale GB \ - -error \ - *.md *.go - -unconvert: - $(GO) get github.com/mdempsky/unconvert - unconvert -v $(PKGS) - -ineffassign: - $(GO) get github.com/gordonklaus/ineffassign - find $(SRCDIRS) -name '*.go' | xargs ineffassign - -pedantic: check errcheck - -unparam: - $(GO) get mvdan.cc/unparam - unparam ./... - -errcheck: - $(GO) get github.com/kisielk/errcheck - errcheck $(PKGS) - -gofmt: - @echo Checking code is gofmted - @test -z "$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)" diff --git a/vendor/github.com/pkg/errors/README.md b/vendor/github.com/pkg/errors/README.md deleted file mode 100644 index 54dfdcb..0000000 --- a/vendor/github.com/pkg/errors/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# errors [![Travis-CI](https://travis-ci.org/pkg/errors.svg)](https://travis-ci.org/pkg/errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/b98mptawhudj53ep/branch/master?svg=true)](https://ci.appveyor.com/project/davecheney/errors/branch/master) [![GoDoc](https://godoc.org/github.com/pkg/errors?status.svg)](http://godoc.org/github.com/pkg/errors) [![Report card](https://goreportcard.com/badge/github.com/pkg/errors)](https://goreportcard.com/report/github.com/pkg/errors) [![Sourcegraph](https://sourcegraph.com/github.com/pkg/errors/-/badge.svg)](https://sourcegraph.com/github.com/pkg/errors?badge) - -Package errors provides simple error handling primitives. - -`go get github.com/pkg/errors` - -The traditional error handling idiom in Go is roughly akin to -```go -if err != nil { - return err -} -``` -which applied recursively up the call stack results in error reports without context or debugging information. The errors package allows programmers to add context to the failure path in their code in a way that does not destroy the original value of the error. - -## Adding context to an error - -The errors.Wrap function returns a new error that adds context to the original error. For example -```go -_, err := ioutil.ReadAll(r) -if err != nil { - return errors.Wrap(err, "read failed") -} -``` -## Retrieving the cause of an error - -Using `errors.Wrap` constructs a stack of errors, adding context to the preceding error. Depending on the nature of the error it may be necessary to reverse the operation of errors.Wrap to retrieve the original error for inspection. Any error value which implements this interface can be inspected by `errors.Cause`. -```go -type causer interface { - Cause() error -} -``` -`errors.Cause` will recursively retrieve the topmost error which does not implement `causer`, which is assumed to be the original cause. For example: -```go -switch err := errors.Cause(err).(type) { -case *MyError: - // handle specifically -default: - // unknown error -} -``` - -[Read the package documentation for more information](https://godoc.org/github.com/pkg/errors). - -## Roadmap - -With the upcoming [Go2 error proposals](https://go.googlesource.com/proposal/+/master/design/go2draft.md) this package is moving into maintenance mode. The roadmap for a 1.0 release is as follows: - -- 0.9. Remove pre Go 1.9 and Go 1.10 support, address outstanding pull requests (if possible) -- 1.0. Final release. - -## Contributing - -Because of the Go2 errors changes, this package is not accepting proposals for new functionality. With that said, we welcome pull requests, bug fixes and issue reports. - -Before sending a PR, please discuss your change by raising an issue. - -## License - -BSD-2-Clause diff --git a/vendor/github.com/pkg/errors/appveyor.yml b/vendor/github.com/pkg/errors/appveyor.yml deleted file mode 100644 index a932ead..0000000 --- a/vendor/github.com/pkg/errors/appveyor.yml +++ /dev/null @@ -1,32 +0,0 @@ -version: build-{build}.{branch} - -clone_folder: C:\gopath\src\github.com\pkg\errors -shallow_clone: true # for startup speed - -environment: - GOPATH: C:\gopath - -platform: - - x64 - -# http://www.appveyor.com/docs/installed-software -install: - # some helpful output for debugging builds - - go version - - go env - # pre-installed MinGW at C:\MinGW is 32bit only - # but MSYS2 at C:\msys64 has mingw64 - - set PATH=C:\msys64\mingw64\bin;%PATH% - - gcc --version - - g++ --version - -build_script: - - go install -v ./... - -test_script: - - set PATH=C:\gopath\bin;%PATH% - - go test -v ./... - -#artifacts: -# - path: '%GOPATH%\bin\*.exe' -deploy: off diff --git a/vendor/github.com/pkg/errors/errors.go b/vendor/github.com/pkg/errors/errors.go deleted file mode 100644 index 161aea2..0000000 --- a/vendor/github.com/pkg/errors/errors.go +++ /dev/null @@ -1,288 +0,0 @@ -// Package errors provides simple error handling primitives. -// -// The traditional error handling idiom in Go is roughly akin to -// -// if err != nil { -// return err -// } -// -// which when applied recursively up the call stack results in error reports -// without context or debugging information. The errors package allows -// programmers to add context to the failure path in their code in a way -// that does not destroy the original value of the error. -// -// Adding context to an error -// -// The errors.Wrap function returns a new error that adds context to the -// original error by recording a stack trace at the point Wrap is called, -// together with the supplied message. For example -// -// _, err := ioutil.ReadAll(r) -// if err != nil { -// return errors.Wrap(err, "read failed") -// } -// -// If additional control is required, the errors.WithStack and -// errors.WithMessage functions destructure errors.Wrap into its component -// operations: annotating an error with a stack trace and with a message, -// respectively. -// -// Retrieving the cause of an error -// -// Using errors.Wrap constructs a stack of errors, adding context to the -// preceding error. Depending on the nature of the error it may be necessary -// to reverse the operation of errors.Wrap to retrieve the original error -// for inspection. Any error value which implements this interface -// -// type causer interface { -// Cause() error -// } -// -// can be inspected by errors.Cause. errors.Cause will recursively retrieve -// the topmost error that does not implement causer, which is assumed to be -// the original cause. For example: -// -// switch err := errors.Cause(err).(type) { -// case *MyError: -// // handle specifically -// default: -// // unknown error -// } -// -// Although the causer interface is not exported by this package, it is -// considered a part of its stable public interface. -// -// Formatted printing of errors -// -// All error values returned from this package implement fmt.Formatter and can -// be formatted by the fmt package. The following verbs are supported: -// -// %s print the error. If the error has a Cause it will be -// printed recursively. -// %v see %s -// %+v extended format. Each Frame of the error's StackTrace will -// be printed in detail. -// -// Retrieving the stack trace of an error or wrapper -// -// New, Errorf, Wrap, and Wrapf record a stack trace at the point they are -// invoked. This information can be retrieved with the following interface: -// -// type stackTracer interface { -// StackTrace() errors.StackTrace -// } -// -// The returned errors.StackTrace type is defined as -// -// type StackTrace []Frame -// -// The Frame type represents a call site in the stack trace. Frame supports -// the fmt.Formatter interface that can be used for printing information about -// the stack trace of this error. For example: -// -// if err, ok := err.(stackTracer); ok { -// for _, f := range err.StackTrace() { -// fmt.Printf("%+s:%d\n", f, f) -// } -// } -// -// Although the stackTracer interface is not exported by this package, it is -// considered a part of its stable public interface. -// -// See the documentation for Frame.Format for more details. -package errors - -import ( - "fmt" - "io" -) - -// New returns an error with the supplied message. -// New also records the stack trace at the point it was called. -func New(message string) error { - return &fundamental{ - msg: message, - stack: callers(), - } -} - -// Errorf formats according to a format specifier and returns the string -// as a value that satisfies error. -// Errorf also records the stack trace at the point it was called. -func Errorf(format string, args ...interface{}) error { - return &fundamental{ - msg: fmt.Sprintf(format, args...), - stack: callers(), - } -} - -// fundamental is an error that has a message and a stack, but no caller. -type fundamental struct { - msg string - *stack -} - -func (f *fundamental) Error() string { return f.msg } - -func (f *fundamental) Format(s fmt.State, verb rune) { - switch verb { - case 'v': - if s.Flag('+') { - io.WriteString(s, f.msg) - f.stack.Format(s, verb) - return - } - fallthrough - case 's': - io.WriteString(s, f.msg) - case 'q': - fmt.Fprintf(s, "%q", f.msg) - } -} - -// WithStack annotates err with a stack trace at the point WithStack was called. -// If err is nil, WithStack returns nil. -func WithStack(err error) error { - if err == nil { - return nil - } - return &withStack{ - err, - callers(), - } -} - -type withStack struct { - error - *stack -} - -func (w *withStack) Cause() error { return w.error } - -// Unwrap provides compatibility for Go 1.13 error chains. -func (w *withStack) Unwrap() error { return w.error } - -func (w *withStack) Format(s fmt.State, verb rune) { - switch verb { - case 'v': - if s.Flag('+') { - fmt.Fprintf(s, "%+v", w.Cause()) - w.stack.Format(s, verb) - return - } - fallthrough - case 's': - io.WriteString(s, w.Error()) - case 'q': - fmt.Fprintf(s, "%q", w.Error()) - } -} - -// Wrap returns an error annotating err with a stack trace -// at the point Wrap is called, and the supplied message. -// If err is nil, Wrap returns nil. -func Wrap(err error, message string) error { - if err == nil { - return nil - } - err = &withMessage{ - cause: err, - msg: message, - } - return &withStack{ - err, - callers(), - } -} - -// Wrapf returns an error annotating err with a stack trace -// at the point Wrapf is called, and the format specifier. -// If err is nil, Wrapf returns nil. -func Wrapf(err error, format string, args ...interface{}) error { - if err == nil { - return nil - } - err = &withMessage{ - cause: err, - msg: fmt.Sprintf(format, args...), - } - return &withStack{ - err, - callers(), - } -} - -// WithMessage annotates err with a new message. -// If err is nil, WithMessage returns nil. -func WithMessage(err error, message string) error { - if err == nil { - return nil - } - return &withMessage{ - cause: err, - msg: message, - } -} - -// WithMessagef annotates err with the format specifier. -// If err is nil, WithMessagef returns nil. -func WithMessagef(err error, format string, args ...interface{}) error { - if err == nil { - return nil - } - return &withMessage{ - cause: err, - msg: fmt.Sprintf(format, args...), - } -} - -type withMessage struct { - cause error - msg string -} - -func (w *withMessage) Error() string { return w.msg + ": " + w.cause.Error() } -func (w *withMessage) Cause() error { return w.cause } - -// Unwrap provides compatibility for Go 1.13 error chains. -func (w *withMessage) Unwrap() error { return w.cause } - -func (w *withMessage) Format(s fmt.State, verb rune) { - switch verb { - case 'v': - if s.Flag('+') { - fmt.Fprintf(s, "%+v\n", w.Cause()) - io.WriteString(s, w.msg) - return - } - fallthrough - case 's', 'q': - io.WriteString(s, w.Error()) - } -} - -// Cause returns the underlying cause of the error, if possible. -// An error value has a cause if it implements the following -// interface: -// -// type causer interface { -// Cause() error -// } -// -// If the error does not implement Cause, the original error will -// be returned. If the error is nil, nil will be returned without further -// investigation. -func Cause(err error) error { - type causer interface { - Cause() error - } - - for err != nil { - cause, ok := err.(causer) - if !ok { - break - } - err = cause.Cause() - } - return err -} diff --git a/vendor/github.com/pkg/errors/go113.go b/vendor/github.com/pkg/errors/go113.go deleted file mode 100644 index be0d10d..0000000 --- a/vendor/github.com/pkg/errors/go113.go +++ /dev/null @@ -1,38 +0,0 @@ -// +build go1.13 - -package errors - -import ( - stderrors "errors" -) - -// Is reports whether any error in err's chain matches target. -// -// The chain consists of err itself followed by the sequence of errors obtained by -// repeatedly calling Unwrap. -// -// An error is considered to match a target if it is equal to that target or if -// it implements a method Is(error) bool such that Is(target) returns true. -func Is(err, target error) bool { return stderrors.Is(err, target) } - -// As finds the first error in err's chain that matches target, and if so, sets -// target to that error value and returns true. -// -// The chain consists of err itself followed by the sequence of errors obtained by -// repeatedly calling Unwrap. -// -// An error matches target if the error's concrete value is assignable to the value -// pointed to by target, or if the error has a method As(interface{}) bool such that -// As(target) returns true. In the latter case, the As method is responsible for -// setting target. -// -// As will panic if target is not a non-nil pointer to either a type that implements -// error, or to any interface type. As returns false if err is nil. -func As(err error, target interface{}) bool { return stderrors.As(err, target) } - -// Unwrap returns the result of calling the Unwrap method on err, if err's -// type contains an Unwrap method returning error. -// Otherwise, Unwrap returns nil. -func Unwrap(err error) error { - return stderrors.Unwrap(err) -} diff --git a/vendor/github.com/pkg/errors/stack.go b/vendor/github.com/pkg/errors/stack.go deleted file mode 100644 index 779a834..0000000 --- a/vendor/github.com/pkg/errors/stack.go +++ /dev/null @@ -1,177 +0,0 @@ -package errors - -import ( - "fmt" - "io" - "path" - "runtime" - "strconv" - "strings" -) - -// Frame represents a program counter inside a stack frame. -// For historical reasons if Frame is interpreted as a uintptr -// its value represents the program counter + 1. -type Frame uintptr - -// pc returns the program counter for this frame; -// multiple frames may have the same PC value. -func (f Frame) pc() uintptr { return uintptr(f) - 1 } - -// file returns the full path to the file that contains the -// function for this Frame's pc. -func (f Frame) file() string { - fn := runtime.FuncForPC(f.pc()) - if fn == nil { - return "unknown" - } - file, _ := fn.FileLine(f.pc()) - return file -} - -// line returns the line number of source code of the -// function for this Frame's pc. -func (f Frame) line() int { - fn := runtime.FuncForPC(f.pc()) - if fn == nil { - return 0 - } - _, line := fn.FileLine(f.pc()) - return line -} - -// name returns the name of this function, if known. -func (f Frame) name() string { - fn := runtime.FuncForPC(f.pc()) - if fn == nil { - return "unknown" - } - return fn.Name() -} - -// Format formats the frame according to the fmt.Formatter interface. -// -// %s source file -// %d source line -// %n function name -// %v equivalent to %s:%d -// -// Format accepts flags that alter the printing of some verbs, as follows: -// -// %+s function name and path of source file relative to the compile time -// GOPATH separated by \n\t (\n\t) -// %+v equivalent to %+s:%d -func (f Frame) Format(s fmt.State, verb rune) { - switch verb { - case 's': - switch { - case s.Flag('+'): - io.WriteString(s, f.name()) - io.WriteString(s, "\n\t") - io.WriteString(s, f.file()) - default: - io.WriteString(s, path.Base(f.file())) - } - case 'd': - io.WriteString(s, strconv.Itoa(f.line())) - case 'n': - io.WriteString(s, funcname(f.name())) - case 'v': - f.Format(s, 's') - io.WriteString(s, ":") - f.Format(s, 'd') - } -} - -// MarshalText formats a stacktrace Frame as a text string. The output is the -// same as that of fmt.Sprintf("%+v", f), but without newlines or tabs. -func (f Frame) MarshalText() ([]byte, error) { - name := f.name() - if name == "unknown" { - return []byte(name), nil - } - return []byte(fmt.Sprintf("%s %s:%d", name, f.file(), f.line())), nil -} - -// StackTrace is stack of Frames from innermost (newest) to outermost (oldest). -type StackTrace []Frame - -// Format formats the stack of Frames according to the fmt.Formatter interface. -// -// %s lists source files for each Frame in the stack -// %v lists the source file and line number for each Frame in the stack -// -// Format accepts flags that alter the printing of some verbs, as follows: -// -// %+v Prints filename, function, and line number for each Frame in the stack. -func (st StackTrace) Format(s fmt.State, verb rune) { - switch verb { - case 'v': - switch { - case s.Flag('+'): - for _, f := range st { - io.WriteString(s, "\n") - f.Format(s, verb) - } - case s.Flag('#'): - fmt.Fprintf(s, "%#v", []Frame(st)) - default: - st.formatSlice(s, verb) - } - case 's': - st.formatSlice(s, verb) - } -} - -// formatSlice will format this StackTrace into the given buffer as a slice of -// Frame, only valid when called with '%s' or '%v'. -func (st StackTrace) formatSlice(s fmt.State, verb rune) { - io.WriteString(s, "[") - for i, f := range st { - if i > 0 { - io.WriteString(s, " ") - } - f.Format(s, verb) - } - io.WriteString(s, "]") -} - -// stack represents a stack of program counters. -type stack []uintptr - -func (s *stack) Format(st fmt.State, verb rune) { - switch verb { - case 'v': - switch { - case st.Flag('+'): - for _, pc := range *s { - f := Frame(pc) - fmt.Fprintf(st, "\n%+v", f) - } - } - } -} - -func (s *stack) StackTrace() StackTrace { - f := make([]Frame, len(*s)) - for i := 0; i < len(f); i++ { - f[i] = Frame((*s)[i]) - } - return f -} - -func callers() *stack { - const depth = 32 - var pcs [depth]uintptr - n := runtime.Callers(3, pcs[:]) - var st stack = pcs[0:n] - return &st -} - -// funcname removes the path prefix component of a function's name reported by func.Name(). -func funcname(name string) string { - i := strings.LastIndex(name, "/") - name = name[i+1:] - i = strings.Index(name, ".") - return name[i+1:] -} diff --git a/vendor/github.com/pmezard/go-difflib/LICENSE b/vendor/github.com/pmezard/go-difflib/LICENSE deleted file mode 100644 index c67dad6..0000000 --- a/vendor/github.com/pmezard/go-difflib/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013, Patrick Mezard -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - The names of its contributors may not be used to endorse or promote -products derived from this software without specific prior written -permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/pmezard/go-difflib/difflib/difflib.go b/vendor/github.com/pmezard/go-difflib/difflib/difflib.go deleted file mode 100644 index 003e99f..0000000 --- a/vendor/github.com/pmezard/go-difflib/difflib/difflib.go +++ /dev/null @@ -1,772 +0,0 @@ -// Package difflib is a partial port of Python difflib module. -// -// It provides tools to compare sequences of strings and generate textual diffs. -// -// The following class and functions have been ported: -// -// - SequenceMatcher -// -// - unified_diff -// -// - context_diff -// -// Getting unified diffs was the main goal of the port. Keep in mind this code -// is mostly suitable to output text differences in a human friendly way, there -// are no guarantees generated diffs are consumable by patch(1). -package difflib - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strings" -) - -func min(a, b int) int { - if a < b { - return a - } - return b -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} - -func calculateRatio(matches, length int) float64 { - if length > 0 { - return 2.0 * float64(matches) / float64(length) - } - return 1.0 -} - -type Match struct { - A int - B int - Size int -} - -type OpCode struct { - Tag byte - I1 int - I2 int - J1 int - J2 int -} - -// SequenceMatcher compares sequence of strings. The basic -// algorithm predates, and is a little fancier than, an algorithm -// published in the late 1980's by Ratcliff and Obershelp under the -// hyperbolic name "gestalt pattern matching". The basic idea is to find -// the longest contiguous matching subsequence that contains no "junk" -// elements (R-O doesn't address junk). The same idea is then applied -// recursively to the pieces of the sequences to the left and to the right -// of the matching subsequence. This does not yield minimal edit -// sequences, but does tend to yield matches that "look right" to people. -// -// SequenceMatcher tries to compute a "human-friendly diff" between two -// sequences. Unlike e.g. UNIX(tm) diff, the fundamental notion is the -// longest *contiguous* & junk-free matching subsequence. That's what -// catches peoples' eyes. The Windows(tm) windiff has another interesting -// notion, pairing up elements that appear uniquely in each sequence. -// That, and the method here, appear to yield more intuitive difference -// reports than does diff. This method appears to be the least vulnerable -// to synching up on blocks of "junk lines", though (like blank lines in -// ordinary text files, or maybe "

" lines in HTML files). That may be -// because this is the only method of the 3 that has a *concept* of -// "junk" . -// -// Timing: Basic R-O is cubic time worst case and quadratic time expected -// case. SequenceMatcher is quadratic time for the worst case and has -// expected-case behavior dependent in a complicated way on how many -// elements the sequences have in common; best case time is linear. -type SequenceMatcher struct { - a []string - b []string - b2j map[string][]int - IsJunk func(string) bool - autoJunk bool - bJunk map[string]struct{} - matchingBlocks []Match - fullBCount map[string]int - bPopular map[string]struct{} - opCodes []OpCode -} - -func NewMatcher(a, b []string) *SequenceMatcher { - m := SequenceMatcher{autoJunk: true} - m.SetSeqs(a, b) - return &m -} - -func NewMatcherWithJunk(a, b []string, autoJunk bool, - isJunk func(string) bool) *SequenceMatcher { - - m := SequenceMatcher{IsJunk: isJunk, autoJunk: autoJunk} - m.SetSeqs(a, b) - return &m -} - -// Set two sequences to be compared. -func (m *SequenceMatcher) SetSeqs(a, b []string) { - m.SetSeq1(a) - m.SetSeq2(b) -} - -// Set the first sequence to be compared. The second sequence to be compared is -// not changed. -// -// SequenceMatcher computes and caches detailed information about the second -// sequence, so if you want to compare one sequence S against many sequences, -// use .SetSeq2(s) once and call .SetSeq1(x) repeatedly for each of the other -// sequences. -// -// See also SetSeqs() and SetSeq2(). -func (m *SequenceMatcher) SetSeq1(a []string) { - if &a == &m.a { - return - } - m.a = a - m.matchingBlocks = nil - m.opCodes = nil -} - -// Set the second sequence to be compared. The first sequence to be compared is -// not changed. -func (m *SequenceMatcher) SetSeq2(b []string) { - if &b == &m.b { - return - } - m.b = b - m.matchingBlocks = nil - m.opCodes = nil - m.fullBCount = nil - m.chainB() -} - -func (m *SequenceMatcher) chainB() { - // Populate line -> index mapping - b2j := map[string][]int{} - for i, s := range m.b { - indices := b2j[s] - indices = append(indices, i) - b2j[s] = indices - } - - // Purge junk elements - m.bJunk = map[string]struct{}{} - if m.IsJunk != nil { - junk := m.bJunk - for s, _ := range b2j { - if m.IsJunk(s) { - junk[s] = struct{}{} - } - } - for s, _ := range junk { - delete(b2j, s) - } - } - - // Purge remaining popular elements - popular := map[string]struct{}{} - n := len(m.b) - if m.autoJunk && n >= 200 { - ntest := n/100 + 1 - for s, indices := range b2j { - if len(indices) > ntest { - popular[s] = struct{}{} - } - } - for s, _ := range popular { - delete(b2j, s) - } - } - m.bPopular = popular - m.b2j = b2j -} - -func (m *SequenceMatcher) isBJunk(s string) bool { - _, ok := m.bJunk[s] - return ok -} - -// Find longest matching block in a[alo:ahi] and b[blo:bhi]. -// -// If IsJunk is not defined: -// -// Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where -// alo <= i <= i+k <= ahi -// blo <= j <= j+k <= bhi -// and for all (i',j',k') meeting those conditions, -// k >= k' -// i <= i' -// and if i == i', j <= j' -// -// In other words, of all maximal matching blocks, return one that -// starts earliest in a, and of all those maximal matching blocks that -// start earliest in a, return the one that starts earliest in b. -// -// If IsJunk is defined, first the longest matching block is -// determined as above, but with the additional restriction that no -// junk element appears in the block. Then that block is extended as -// far as possible by matching (only) junk elements on both sides. So -// the resulting block never matches on junk except as identical junk -// happens to be adjacent to an "interesting" match. -// -// If no blocks match, return (alo, blo, 0). -func (m *SequenceMatcher) findLongestMatch(alo, ahi, blo, bhi int) Match { - // CAUTION: stripping common prefix or suffix would be incorrect. - // E.g., - // ab - // acab - // Longest matching block is "ab", but if common prefix is - // stripped, it's "a" (tied with "b"). UNIX(tm) diff does so - // strip, so ends up claiming that ab is changed to acab by - // inserting "ca" in the middle. That's minimal but unintuitive: - // "it's obvious" that someone inserted "ac" at the front. - // Windiff ends up at the same place as diff, but by pairing up - // the unique 'b's and then matching the first two 'a's. - besti, bestj, bestsize := alo, blo, 0 - - // find longest junk-free match - // during an iteration of the loop, j2len[j] = length of longest - // junk-free match ending with a[i-1] and b[j] - j2len := map[int]int{} - for i := alo; i != ahi; i++ { - // look at all instances of a[i] in b; note that because - // b2j has no junk keys, the loop is skipped if a[i] is junk - newj2len := map[int]int{} - for _, j := range m.b2j[m.a[i]] { - // a[i] matches b[j] - if j < blo { - continue - } - if j >= bhi { - break - } - k := j2len[j-1] + 1 - newj2len[j] = k - if k > bestsize { - besti, bestj, bestsize = i-k+1, j-k+1, k - } - } - j2len = newj2len - } - - // Extend the best by non-junk elements on each end. In particular, - // "popular" non-junk elements aren't in b2j, which greatly speeds - // the inner loop above, but also means "the best" match so far - // doesn't contain any junk *or* popular non-junk elements. - for besti > alo && bestj > blo && !m.isBJunk(m.b[bestj-1]) && - m.a[besti-1] == m.b[bestj-1] { - besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 - } - for besti+bestsize < ahi && bestj+bestsize < bhi && - !m.isBJunk(m.b[bestj+bestsize]) && - m.a[besti+bestsize] == m.b[bestj+bestsize] { - bestsize += 1 - } - - // Now that we have a wholly interesting match (albeit possibly - // empty!), we may as well suck up the matching junk on each - // side of it too. Can't think of a good reason not to, and it - // saves post-processing the (possibly considerable) expense of - // figuring out what to do with it. In the case of an empty - // interesting match, this is clearly the right thing to do, - // because no other kind of match is possible in the regions. - for besti > alo && bestj > blo && m.isBJunk(m.b[bestj-1]) && - m.a[besti-1] == m.b[bestj-1] { - besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 - } - for besti+bestsize < ahi && bestj+bestsize < bhi && - m.isBJunk(m.b[bestj+bestsize]) && - m.a[besti+bestsize] == m.b[bestj+bestsize] { - bestsize += 1 - } - - return Match{A: besti, B: bestj, Size: bestsize} -} - -// Return list of triples describing matching subsequences. -// -// Each triple is of the form (i, j, n), and means that -// a[i:i+n] == b[j:j+n]. The triples are monotonically increasing in -// i and in j. It's also guaranteed that if (i, j, n) and (i', j', n') are -// adjacent triples in the list, and the second is not the last triple in the -// list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe -// adjacent equal blocks. -// -// The last triple is a dummy, (len(a), len(b), 0), and is the only -// triple with n==0. -func (m *SequenceMatcher) GetMatchingBlocks() []Match { - if m.matchingBlocks != nil { - return m.matchingBlocks - } - - var matchBlocks func(alo, ahi, blo, bhi int, matched []Match) []Match - matchBlocks = func(alo, ahi, blo, bhi int, matched []Match) []Match { - match := m.findLongestMatch(alo, ahi, blo, bhi) - i, j, k := match.A, match.B, match.Size - if match.Size > 0 { - if alo < i && blo < j { - matched = matchBlocks(alo, i, blo, j, matched) - } - matched = append(matched, match) - if i+k < ahi && j+k < bhi { - matched = matchBlocks(i+k, ahi, j+k, bhi, matched) - } - } - return matched - } - matched := matchBlocks(0, len(m.a), 0, len(m.b), nil) - - // It's possible that we have adjacent equal blocks in the - // matching_blocks list now. - nonAdjacent := []Match{} - i1, j1, k1 := 0, 0, 0 - for _, b := range matched { - // Is this block adjacent to i1, j1, k1? - i2, j2, k2 := b.A, b.B, b.Size - if i1+k1 == i2 && j1+k1 == j2 { - // Yes, so collapse them -- this just increases the length of - // the first block by the length of the second, and the first - // block so lengthened remains the block to compare against. - k1 += k2 - } else { - // Not adjacent. Remember the first block (k1==0 means it's - // the dummy we started with), and make the second block the - // new block to compare against. - if k1 > 0 { - nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) - } - i1, j1, k1 = i2, j2, k2 - } - } - if k1 > 0 { - nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) - } - - nonAdjacent = append(nonAdjacent, Match{len(m.a), len(m.b), 0}) - m.matchingBlocks = nonAdjacent - return m.matchingBlocks -} - -// Return list of 5-tuples describing how to turn a into b. -// -// Each tuple is of the form (tag, i1, i2, j1, j2). The first tuple -// has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the -// tuple preceding it, and likewise for j1 == the previous j2. -// -// The tags are characters, with these meanings: -// -// 'r' (replace): a[i1:i2] should be replaced by b[j1:j2] -// -// 'd' (delete): a[i1:i2] should be deleted, j1==j2 in this case. -// -// 'i' (insert): b[j1:j2] should be inserted at a[i1:i1], i1==i2 in this case. -// -// 'e' (equal): a[i1:i2] == b[j1:j2] -func (m *SequenceMatcher) GetOpCodes() []OpCode { - if m.opCodes != nil { - return m.opCodes - } - i, j := 0, 0 - matching := m.GetMatchingBlocks() - opCodes := make([]OpCode, 0, len(matching)) - for _, m := range matching { - // invariant: we've pumped out correct diffs to change - // a[:i] into b[:j], and the next matching block is - // a[ai:ai+size] == b[bj:bj+size]. So we need to pump - // out a diff to change a[i:ai] into b[j:bj], pump out - // the matching block, and move (i,j) beyond the match - ai, bj, size := m.A, m.B, m.Size - tag := byte(0) - if i < ai && j < bj { - tag = 'r' - } else if i < ai { - tag = 'd' - } else if j < bj { - tag = 'i' - } - if tag > 0 { - opCodes = append(opCodes, OpCode{tag, i, ai, j, bj}) - } - i, j = ai+size, bj+size - // the list of matching blocks is terminated by a - // sentinel with size 0 - if size > 0 { - opCodes = append(opCodes, OpCode{'e', ai, i, bj, j}) - } - } - m.opCodes = opCodes - return m.opCodes -} - -// Isolate change clusters by eliminating ranges with no changes. -// -// Return a generator of groups with up to n lines of context. -// Each group is in the same format as returned by GetOpCodes(). -func (m *SequenceMatcher) GetGroupedOpCodes(n int) [][]OpCode { - if n < 0 { - n = 3 - } - codes := m.GetOpCodes() - if len(codes) == 0 { - codes = []OpCode{OpCode{'e', 0, 1, 0, 1}} - } - // Fixup leading and trailing groups if they show no changes. - if codes[0].Tag == 'e' { - c := codes[0] - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - codes[0] = OpCode{c.Tag, max(i1, i2-n), i2, max(j1, j2-n), j2} - } - if codes[len(codes)-1].Tag == 'e' { - c := codes[len(codes)-1] - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - codes[len(codes)-1] = OpCode{c.Tag, i1, min(i2, i1+n), j1, min(j2, j1+n)} - } - nn := n + n - groups := [][]OpCode{} - group := []OpCode{} - for _, c := range codes { - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - // End the current group and start a new one whenever - // there is a large range with no changes. - if c.Tag == 'e' && i2-i1 > nn { - group = append(group, OpCode{c.Tag, i1, min(i2, i1+n), - j1, min(j2, j1+n)}) - groups = append(groups, group) - group = []OpCode{} - i1, j1 = max(i1, i2-n), max(j1, j2-n) - } - group = append(group, OpCode{c.Tag, i1, i2, j1, j2}) - } - if len(group) > 0 && !(len(group) == 1 && group[0].Tag == 'e') { - groups = append(groups, group) - } - return groups -} - -// Return a measure of the sequences' similarity (float in [0,1]). -// -// Where T is the total number of elements in both sequences, and -// M is the number of matches, this is 2.0*M / T. -// Note that this is 1 if the sequences are identical, and 0 if -// they have nothing in common. -// -// .Ratio() is expensive to compute if you haven't already computed -// .GetMatchingBlocks() or .GetOpCodes(), in which case you may -// want to try .QuickRatio() or .RealQuickRation() first to get an -// upper bound. -func (m *SequenceMatcher) Ratio() float64 { - matches := 0 - for _, m := range m.GetMatchingBlocks() { - matches += m.Size - } - return calculateRatio(matches, len(m.a)+len(m.b)) -} - -// Return an upper bound on ratio() relatively quickly. -// -// This isn't defined beyond that it is an upper bound on .Ratio(), and -// is faster to compute. -func (m *SequenceMatcher) QuickRatio() float64 { - // viewing a and b as multisets, set matches to the cardinality - // of their intersection; this counts the number of matches - // without regard to order, so is clearly an upper bound - if m.fullBCount == nil { - m.fullBCount = map[string]int{} - for _, s := range m.b { - m.fullBCount[s] = m.fullBCount[s] + 1 - } - } - - // avail[x] is the number of times x appears in 'b' less the - // number of times we've seen it in 'a' so far ... kinda - avail := map[string]int{} - matches := 0 - for _, s := range m.a { - n, ok := avail[s] - if !ok { - n = m.fullBCount[s] - } - avail[s] = n - 1 - if n > 0 { - matches += 1 - } - } - return calculateRatio(matches, len(m.a)+len(m.b)) -} - -// Return an upper bound on ratio() very quickly. -// -// This isn't defined beyond that it is an upper bound on .Ratio(), and -// is faster to compute than either .Ratio() or .QuickRatio(). -func (m *SequenceMatcher) RealQuickRatio() float64 { - la, lb := len(m.a), len(m.b) - return calculateRatio(min(la, lb), la+lb) -} - -// Convert range to the "ed" format -func formatRangeUnified(start, stop int) string { - // Per the diff spec at http://www.unix.org/single_unix_specification/ - beginning := start + 1 // lines start numbering with one - length := stop - start - if length == 1 { - return fmt.Sprintf("%d", beginning) - } - if length == 0 { - beginning -= 1 // empty ranges begin at line just before the range - } - return fmt.Sprintf("%d,%d", beginning, length) -} - -// Unified diff parameters -type UnifiedDiff struct { - A []string // First sequence lines - FromFile string // First file name - FromDate string // First file time - B []string // Second sequence lines - ToFile string // Second file name - ToDate string // Second file time - Eol string // Headers end of line, defaults to LF - Context int // Number of context lines -} - -// Compare two sequences of lines; generate the delta as a unified diff. -// -// Unified diffs are a compact way of showing line changes and a few -// lines of context. The number of context lines is set by 'n' which -// defaults to three. -// -// By default, the diff control lines (those with ---, +++, or @@) are -// created with a trailing newline. This is helpful so that inputs -// created from file.readlines() result in diffs that are suitable for -// file.writelines() since both the inputs and outputs have trailing -// newlines. -// -// For inputs that do not have trailing newlines, set the lineterm -// argument to "" so that the output will be uniformly newline free. -// -// The unidiff format normally has a header for filenames and modification -// times. Any or all of these may be specified using strings for -// 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'. -// The modification times are normally expressed in the ISO 8601 format. -func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error { - buf := bufio.NewWriter(writer) - defer buf.Flush() - wf := func(format string, args ...interface{}) error { - _, err := buf.WriteString(fmt.Sprintf(format, args...)) - return err - } - ws := func(s string) error { - _, err := buf.WriteString(s) - return err - } - - if len(diff.Eol) == 0 { - diff.Eol = "\n" - } - - started := false - m := NewMatcher(diff.A, diff.B) - for _, g := range m.GetGroupedOpCodes(diff.Context) { - if !started { - started = true - fromDate := "" - if len(diff.FromDate) > 0 { - fromDate = "\t" + diff.FromDate - } - toDate := "" - if len(diff.ToDate) > 0 { - toDate = "\t" + diff.ToDate - } - if diff.FromFile != "" || diff.ToFile != "" { - err := wf("--- %s%s%s", diff.FromFile, fromDate, diff.Eol) - if err != nil { - return err - } - err = wf("+++ %s%s%s", diff.ToFile, toDate, diff.Eol) - if err != nil { - return err - } - } - } - first, last := g[0], g[len(g)-1] - range1 := formatRangeUnified(first.I1, last.I2) - range2 := formatRangeUnified(first.J1, last.J2) - if err := wf("@@ -%s +%s @@%s", range1, range2, diff.Eol); err != nil { - return err - } - for _, c := range g { - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - if c.Tag == 'e' { - for _, line := range diff.A[i1:i2] { - if err := ws(" " + line); err != nil { - return err - } - } - continue - } - if c.Tag == 'r' || c.Tag == 'd' { - for _, line := range diff.A[i1:i2] { - if err := ws("-" + line); err != nil { - return err - } - } - } - if c.Tag == 'r' || c.Tag == 'i' { - for _, line := range diff.B[j1:j2] { - if err := ws("+" + line); err != nil { - return err - } - } - } - } - } - return nil -} - -// Like WriteUnifiedDiff but returns the diff a string. -func GetUnifiedDiffString(diff UnifiedDiff) (string, error) { - w := &bytes.Buffer{} - err := WriteUnifiedDiff(w, diff) - return string(w.Bytes()), err -} - -// Convert range to the "ed" format. -func formatRangeContext(start, stop int) string { - // Per the diff spec at http://www.unix.org/single_unix_specification/ - beginning := start + 1 // lines start numbering with one - length := stop - start - if length == 0 { - beginning -= 1 // empty ranges begin at line just before the range - } - if length <= 1 { - return fmt.Sprintf("%d", beginning) - } - return fmt.Sprintf("%d,%d", beginning, beginning+length-1) -} - -type ContextDiff UnifiedDiff - -// Compare two sequences of lines; generate the delta as a context diff. -// -// Context diffs are a compact way of showing line changes and a few -// lines of context. The number of context lines is set by diff.Context -// which defaults to three. -// -// By default, the diff control lines (those with *** or ---) are -// created with a trailing newline. -// -// For inputs that do not have trailing newlines, set the diff.Eol -// argument to "" so that the output will be uniformly newline free. -// -// The context diff format normally has a header for filenames and -// modification times. Any or all of these may be specified using -// strings for diff.FromFile, diff.ToFile, diff.FromDate, diff.ToDate. -// The modification times are normally expressed in the ISO 8601 format. -// If not specified, the strings default to blanks. -func WriteContextDiff(writer io.Writer, diff ContextDiff) error { - buf := bufio.NewWriter(writer) - defer buf.Flush() - var diffErr error - wf := func(format string, args ...interface{}) { - _, err := buf.WriteString(fmt.Sprintf(format, args...)) - if diffErr == nil && err != nil { - diffErr = err - } - } - ws := func(s string) { - _, err := buf.WriteString(s) - if diffErr == nil && err != nil { - diffErr = err - } - } - - if len(diff.Eol) == 0 { - diff.Eol = "\n" - } - - prefix := map[byte]string{ - 'i': "+ ", - 'd': "- ", - 'r': "! ", - 'e': " ", - } - - started := false - m := NewMatcher(diff.A, diff.B) - for _, g := range m.GetGroupedOpCodes(diff.Context) { - if !started { - started = true - fromDate := "" - if len(diff.FromDate) > 0 { - fromDate = "\t" + diff.FromDate - } - toDate := "" - if len(diff.ToDate) > 0 { - toDate = "\t" + diff.ToDate - } - if diff.FromFile != "" || diff.ToFile != "" { - wf("*** %s%s%s", diff.FromFile, fromDate, diff.Eol) - wf("--- %s%s%s", diff.ToFile, toDate, diff.Eol) - } - } - - first, last := g[0], g[len(g)-1] - ws("***************" + diff.Eol) - - range1 := formatRangeContext(first.I1, last.I2) - wf("*** %s ****%s", range1, diff.Eol) - for _, c := range g { - if c.Tag == 'r' || c.Tag == 'd' { - for _, cc := range g { - if cc.Tag == 'i' { - continue - } - for _, line := range diff.A[cc.I1:cc.I2] { - ws(prefix[cc.Tag] + line) - } - } - break - } - } - - range2 := formatRangeContext(first.J1, last.J2) - wf("--- %s ----%s", range2, diff.Eol) - for _, c := range g { - if c.Tag == 'r' || c.Tag == 'i' { - for _, cc := range g { - if cc.Tag == 'd' { - continue - } - for _, line := range diff.B[cc.J1:cc.J2] { - ws(prefix[cc.Tag] + line) - } - } - break - } - } - } - return diffErr -} - -// Like WriteContextDiff but returns the diff a string. -func GetContextDiffString(diff ContextDiff) (string, error) { - w := &bytes.Buffer{} - err := WriteContextDiff(w, diff) - return string(w.Bytes()), err -} - -// Split a string on "\n" while preserving them. The output can be used -// as input for UnifiedDiff and ContextDiff structures. -func SplitLines(s string) []string { - lines := strings.SplitAfter(s, "\n") - lines[len(lines)-1] += "\n" - return lines -} diff --git a/vendor/github.com/rifflock/lfshook/LICENSE b/vendor/github.com/rifflock/lfshook/LICENSE deleted file mode 100644 index eb9d321..0000000 --- a/vendor/github.com/rifflock/lfshook/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Michael Riffle - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/rifflock/lfshook/README.md b/vendor/github.com/rifflock/lfshook/README.md deleted file mode 100644 index ece313e..0000000 --- a/vendor/github.com/rifflock/lfshook/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# Local Filesystem Hook for Logrus - -[![GoDoc](https://godoc.org/github.com/rifflock/lfshook?status.svg)](http://godoc.org/github.com/rifflock/lfshook) - -Sometimes developers like to write directly to a file on the filesystem. This is a hook for [`logrus`](https://github.com/sirupsen/logrus) which designed to allow users to do that. The log levels are dynamic at instantiation of the hook, so it is capable of logging at some or all levels. - -## Example -```go -import ( - "github.com/rifflock/lfshook" - "github.com/sirupsen/logrus" -) - -var Log *logrus.Logger - -func NewLogger() *logrus.Logger { - if Log != nil { - return Log - } - - pathMap := lfshook.PathMap{ - logrus.InfoLevel: "/var/log/info.log", - logrus.ErrorLevel: "/var/log/error.log", - } - - Log = logrus.New() - Log.Hooks.Add(lfshook.NewHook( - pathMap, - &logrus.JSONFormatter{}, - )) - return Log -} -``` - -### Formatters -`lfshook` will strip colors from any `TextFormatter` type formatters when writing to local file, because the color codes don't look great in file. - -If no formatter is provided via `lfshook.NewHook`, a default text formatter will be used. - -### Log rotation -In order to enable automatic log rotation it's possible to provide an io.Writer instead of the path string of a log file. -In combination with packages like [file-rotatelogs](https://github.com/lestrrat-go/file-rotatelogs) log rotation can easily be achieved. - -```go -package main - -import ( - rotatelogs "github.com/lestrrat-go/file-rotatelogs" - "github.com/rifflock/lfshook" - "github.com/sirupsen/logrus" -) - -var Log *logrus.Logger - -func NewLogger() *logrus.Logger { - if Log != nil { - return Log - } - - path := "/var/log/go.log" - writer := rotatelogs.New( - path+".%Y%m%d%H%M", - rotatelogs.WithLinkName(path), - rotatelogs.WithMaxAge(time.Duration(86400)*time.Second), - rotatelogs.WithRotationTime(time.Duration(604800)*time.Second), - ) - - logrus.Hooks.Add(lfshook.NewHook( - lfshook.WriterMap{ - logrus.InfoLevel: writer, - logrus.ErrorLevel: writer, - }, - &logrus.JSONFormatter, - )) - - Log = logrus.New() - Log.Hooks.Add(lfshook.NewHook( - pathMap, - &logrus.JSONFormatter{}, - )) - - return Log -} -``` - -### Note: -User who run the go application must have read/write permissions to the selected log files. If the files do not exists yet, then user must have permission to the target directory. diff --git a/vendor/github.com/rifflock/lfshook/lfshook.go b/vendor/github.com/rifflock/lfshook/lfshook.go deleted file mode 100644 index 1e8d22a..0000000 --- a/vendor/github.com/rifflock/lfshook/lfshook.go +++ /dev/null @@ -1,194 +0,0 @@ -// Package lfshook is hook for sirupsen/logrus that used for writing the logs to local files. -package lfshook - -import ( - "fmt" - "github.com/sirupsen/logrus" - "io" - "log" - "os" - "path/filepath" - "reflect" - "sync" -) - -// We are logging to file, strip colors to make the output more readable. -var defaultFormatter = &logrus.TextFormatter{DisableColors: true} - -// PathMap is map for mapping a log level to a file's path. -// Multiple levels may share a file, but multiple files may not be used for one level. -type PathMap map[logrus.Level]string - -// WriterMap is map for mapping a log level to an io.Writer. -// Multiple levels may share a writer, but multiple writers may not be used for one level. -type WriterMap map[logrus.Level]io.Writer - -// LfsHook is a hook to handle writing to local log files. -type LfsHook struct { - paths PathMap - writers WriterMap - levels []logrus.Level - lock *sync.Mutex - formatter logrus.Formatter - - defaultPath string - defaultWriter io.Writer - hasDefaultPath bool - hasDefaultWriter bool -} - -// NewHook returns new LFS hook. -// Output can be a string, io.Writer, WriterMap or PathMap. -// If using io.Writer or WriterMap, user is responsible for closing the used io.Writer. -func NewHook(output interface{}, formatter logrus.Formatter) *LfsHook { - hook := &LfsHook{ - lock: new(sync.Mutex), - } - - hook.SetFormatter(formatter) - - switch output.(type) { - case string: - hook.SetDefaultPath(output.(string)) - break - case io.Writer: - hook.SetDefaultWriter(output.(io.Writer)) - break - case PathMap: - hook.paths = output.(PathMap) - for level := range output.(PathMap) { - hook.levels = append(hook.levels, level) - } - break - case WriterMap: - hook.writers = output.(WriterMap) - for level := range output.(WriterMap) { - hook.levels = append(hook.levels, level) - } - break - default: - panic(fmt.Sprintf("unsupported level map type: %v", reflect.TypeOf(output))) - } - - return hook -} - -// SetFormatter sets the format that will be used by hook. -// If using text formatter, this method will disable color output to make the log file more readable. -func (hook *LfsHook) SetFormatter(formatter logrus.Formatter) { - hook.lock.Lock() - defer hook.lock.Unlock() - if formatter == nil { - formatter = defaultFormatter - } else { - switch formatter.(type) { - case *logrus.TextFormatter: - textFormatter := formatter.(*logrus.TextFormatter) - textFormatter.DisableColors = true - } - } - - hook.formatter = formatter -} - -// SetDefaultPath sets default path for levels that don't have any defined output path. -func (hook *LfsHook) SetDefaultPath(defaultPath string) { - hook.lock.Lock() - defer hook.lock.Unlock() - hook.defaultPath = defaultPath - hook.hasDefaultPath = true -} - -// SetDefaultWriter sets default writer for levels that don't have any defined writer. -func (hook *LfsHook) SetDefaultWriter(defaultWriter io.Writer) { - hook.lock.Lock() - defer hook.lock.Unlock() - hook.defaultWriter = defaultWriter - hook.hasDefaultWriter = true -} - -// Fire writes the log file to defined path or using the defined writer. -// User who run this function needs write permissions to the file or directory if the file does not yet exist. -func (hook *LfsHook) Fire(entry *logrus.Entry) error { - hook.lock.Lock() - defer hook.lock.Unlock() - if hook.writers != nil || hook.hasDefaultWriter { - return hook.ioWrite(entry) - } else if hook.paths != nil || hook.hasDefaultPath { - return hook.fileWrite(entry) - } - - return nil -} - -// Write a log line to an io.Writer. -func (hook *LfsHook) ioWrite(entry *logrus.Entry) error { - var ( - writer io.Writer - msg []byte - err error - ok bool - ) - - if writer, ok = hook.writers[entry.Level]; !ok { - if hook.hasDefaultWriter { - writer = hook.defaultWriter - } else { - return nil - } - } - - // use our formatter instead of entry.String() - msg, err = hook.formatter.Format(entry) - - if err != nil { - log.Println("failed to generate string for entry:", err) - return err - } - _, err = writer.Write(msg) - return err -} - -// Write a log line directly to a file. -func (hook *LfsHook) fileWrite(entry *logrus.Entry) error { - var ( - fd *os.File - path string - msg []byte - err error - ok bool - ) - - if path, ok = hook.paths[entry.Level]; !ok { - if hook.hasDefaultPath { - path = hook.defaultPath - } else { - return nil - } - } - - dir := filepath.Dir(path) - os.MkdirAll(dir, os.ModePerm) - - fd, err = os.OpenFile(path, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0666) - if err != nil { - log.Println("failed to open logfile:", path, err) - return err - } - defer fd.Close() - - // use our formatter instead of entry.String() - msg, err = hook.formatter.Format(entry) - - if err != nil { - log.Println("failed to generate string for entry:", err) - return err - } - fd.Write(msg) - return nil -} - -// Levels returns configured log levels. -func (hook *LfsHook) Levels() []logrus.Level { - return logrus.AllLevels -} diff --git a/vendor/github.com/sagikazarmark/locafero/.editorconfig b/vendor/github.com/sagikazarmark/locafero/.editorconfig deleted file mode 100644 index 6f944f5..0000000 --- a/vendor/github.com/sagikazarmark/locafero/.editorconfig +++ /dev/null @@ -1,21 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 4 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true - -[{Makefile,*.mk}] -indent_style = tab - -[*.nix] -indent_size = 2 - -[*.go] -indent_style = tab - -[{*.yml,*.yaml}] -indent_size = 2 diff --git a/vendor/github.com/sagikazarmark/locafero/.envrc b/vendor/github.com/sagikazarmark/locafero/.envrc deleted file mode 100644 index 3ce7171..0000000 --- a/vendor/github.com/sagikazarmark/locafero/.envrc +++ /dev/null @@ -1,4 +0,0 @@ -if ! has nix_direnv_version || ! nix_direnv_version 2.3.0; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.3.0/direnvrc" "sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8=" -fi -use flake . --impure diff --git a/vendor/github.com/sagikazarmark/locafero/.gitignore b/vendor/github.com/sagikazarmark/locafero/.gitignore deleted file mode 100644 index 8f07e60..0000000 --- a/vendor/github.com/sagikazarmark/locafero/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/.devenv/ -/.direnv/ -/.task/ -/bin/ -/build/ -/tmp/ -/var/ -/vendor/ diff --git a/vendor/github.com/sagikazarmark/locafero/.golangci.yaml b/vendor/github.com/sagikazarmark/locafero/.golangci.yaml deleted file mode 100644 index 829de2a..0000000 --- a/vendor/github.com/sagikazarmark/locafero/.golangci.yaml +++ /dev/null @@ -1,27 +0,0 @@ -run: - timeout: 10m - -linters-settings: - gci: - sections: - - standard - - default - - prefix(github.com/sagikazarmark/locafero) - goimports: - local-prefixes: github.com/sagikazarmark/locafero - misspell: - locale: US - nolintlint: - allow-leading-space: false # require machine-readable nolint directives (with no leading space) - allow-unused: false # report any unused nolint directives - require-specific: false # don't require nolint directives to be specific about which linter is being skipped - revive: - confidence: 0 - -linters: - enable: - - gci - - goimports - - misspell - - nolintlint - - revive diff --git a/vendor/github.com/sagikazarmark/locafero/LICENSE b/vendor/github.com/sagikazarmark/locafero/LICENSE deleted file mode 100644 index a70b0f2..0000000 --- a/vendor/github.com/sagikazarmark/locafero/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2023 Márk Sági-Kazár - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/sagikazarmark/locafero/README.md b/vendor/github.com/sagikazarmark/locafero/README.md deleted file mode 100644 index a48e8e9..0000000 --- a/vendor/github.com/sagikazarmark/locafero/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Finder library for [Afero](https://github.com/spf13/afero) - -[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/sagikazarmark/locafero/ci.yaml?style=flat-square)](https://github.com/sagikazarmark/locafero/actions/workflows/ci.yaml) -[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/mod/github.com/sagikazarmark/locafero) -![Go Version](https://img.shields.io/badge/go%20version-%3E=1.20-61CFDD.svg?style=flat-square) -[![built with nix](https://img.shields.io/badge/builtwith-nix-7d81f7?style=flat-square)](https://builtwithnix.org) - -**Finder library for [Afero](https://github.com/spf13/afero) ported from [go-finder](https://github.com/sagikazarmark/go-finder).** - -> [!WARNING] -> This is an experimental library under development. -> -> **Backwards compatibility is not guaranteed, expect breaking changes.** - -## Installation - -```shell -go get github.com/sagikazarmark/locafero -``` - -## Usage - -Check out the [package example](https://pkg.go.dev/github.com/sagikazarmark/locafero#example-package) on go.dev. - -## Development - -**For an optimal developer experience, it is recommended to install [Nix](https://nixos.org/download.html) and [direnv](https://direnv.net/docs/installation.html).** - -Run the test suite: - -```shell -just test -``` - -## License - -The project is licensed under the [MIT License](LICENSE). diff --git a/vendor/github.com/sagikazarmark/locafero/file_type.go b/vendor/github.com/sagikazarmark/locafero/file_type.go deleted file mode 100644 index 9a9b140..0000000 --- a/vendor/github.com/sagikazarmark/locafero/file_type.go +++ /dev/null @@ -1,28 +0,0 @@ -package locafero - -import "io/fs" - -// FileType represents the kind of entries [Finder] can return. -type FileType int - -const ( - FileTypeAll FileType = iota - FileTypeFile - FileTypeDir -) - -func (ft FileType) matchFileInfo(info fs.FileInfo) bool { - switch ft { - case FileTypeAll: - return true - - case FileTypeFile: - return !info.IsDir() - - case FileTypeDir: - return info.IsDir() - - default: - return false - } -} diff --git a/vendor/github.com/sagikazarmark/locafero/finder.go b/vendor/github.com/sagikazarmark/locafero/finder.go deleted file mode 100644 index 754c8b2..0000000 --- a/vendor/github.com/sagikazarmark/locafero/finder.go +++ /dev/null @@ -1,165 +0,0 @@ -// Package finder looks for files and directories in an {fs.Fs} filesystem. -package locafero - -import ( - "errors" - "io/fs" - "path/filepath" - "strings" - - "github.com/sourcegraph/conc/iter" - "github.com/spf13/afero" -) - -// Finder looks for files and directories in an [afero.Fs] filesystem. -type Finder struct { - // Paths represents a list of locations that the [Finder] will search in. - // - // They are essentially the root directories or starting points for the search. - // - // Examples: - // - home/user - // - etc - Paths []string - - // Names are specific entries that the [Finder] will look for within the given Paths. - // - // It provides the capability to search for entries with depth, - // meaning it can target deeper locations within the directory structure. - // - // It also supports glob syntax (as defined by [filepat.Match]), offering greater flexibility in search patterns. - // - // Examples: - // - config.yaml - // - home/*/config.yaml - // - home/*/config.* - Names []string - - // Type restricts the kind of entries returned by the [Finder]. - // - // This parameter helps in differentiating and filtering out files from directories or vice versa. - Type FileType -} - -// Find looks for files and directories in an [afero.Fs] filesystem. -func (f Finder) Find(fsys afero.Fs) ([]string, error) { - // Arbitrary go routine limit (TODO: make this a parameter) - // pool := pool.NewWithResults[[]string]().WithMaxGoroutines(5).WithErrors().WithFirstError() - - type searchItem struct { - path string - name string - } - - var searchItems []searchItem - - for _, searchPath := range f.Paths { - searchPath := searchPath - - for _, searchName := range f.Names { - searchName := searchName - - searchItems = append(searchItems, searchItem{searchPath, searchName}) - - // pool.Go(func() ([]string, error) { - // // If the name contains any glob character, perform a glob match - // if strings.ContainsAny(searchName, "*?[]\\^") { - // return globWalkSearch(fsys, searchPath, searchName, f.Type) - // } - // - // return statSearch(fsys, searchPath, searchName, f.Type) - // }) - } - } - - // allResults, err := pool.Wait() - // if err != nil { - // return nil, err - // } - - allResults, err := iter.MapErr(searchItems, func(item *searchItem) ([]string, error) { - // If the name contains any glob character, perform a glob match - if strings.ContainsAny(item.name, "*?[]\\^") { - return globWalkSearch(fsys, item.path, item.name, f.Type) - } - - return statSearch(fsys, item.path, item.name, f.Type) - }) - if err != nil { - return nil, err - } - - var results []string - - for _, r := range allResults { - results = append(results, r...) - } - - // Sort results in alphabetical order for now - // sort.Strings(results) - - return results, nil -} - -func globWalkSearch(fsys afero.Fs, searchPath string, searchName string, searchType FileType) ([]string, error) { - var results []string - - err := afero.Walk(fsys, searchPath, func(p string, fileInfo fs.FileInfo, err error) error { - if err != nil { - return err - } - - // Skip the root path - if p == searchPath { - return nil - } - - var result error - - // Stop reading subdirectories - // TODO: add depth detection here - if fileInfo.IsDir() && filepath.Dir(p) == searchPath { - result = fs.SkipDir - } - - // Skip unmatching type - if !searchType.matchFileInfo(fileInfo) { - return result - } - - match, err := filepath.Match(searchName, fileInfo.Name()) - if err != nil { - return err - } - - if match { - results = append(results, p) - } - - return result - }) - if err != nil { - return results, err - } - - return results, nil -} - -func statSearch(fsys afero.Fs, searchPath string, searchName string, searchType FileType) ([]string, error) { - filePath := filepath.Join(searchPath, searchName) - - fileInfo, err := fsys.Stat(filePath) - if errors.Is(err, fs.ErrNotExist) { - return nil, nil - } - if err != nil { - return nil, err - } - - // Skip unmatching type - if !searchType.matchFileInfo(fileInfo) { - return nil, nil - } - - return []string{filePath}, nil -} diff --git a/vendor/github.com/sagikazarmark/locafero/flake.lock b/vendor/github.com/sagikazarmark/locafero/flake.lock deleted file mode 100644 index 46d28f8..0000000 --- a/vendor/github.com/sagikazarmark/locafero/flake.lock +++ /dev/null @@ -1,273 +0,0 @@ -{ - "nodes": { - "devenv": { - "inputs": { - "flake-compat": "flake-compat", - "nix": "nix", - "nixpkgs": "nixpkgs", - "pre-commit-hooks": "pre-commit-hooks" - }, - "locked": { - "lastModified": 1694097209, - "narHash": "sha256-gQmBjjxeSyySjbh0yQVBKApo2KWIFqqbRUvG+Fa+QpM=", - "owner": "cachix", - "repo": "devenv", - "rev": "7a8e6a91510efe89d8dcb8e43233f93e86f6b189", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "devenv", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1693611461, - "narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1685518550, - "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "devenv", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": [ - "devenv", - "nixpkgs" - ], - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1676545802, - "narHash": "sha256-EK4rZ+Hd5hsvXnzSzk2ikhStJnD63odF7SzsQ8CuSPU=", - "owner": "domenkozar", - "repo": "nix", - "rev": "7c91803598ffbcfe4a55c44ac6d49b2cf07a527f", - "type": "github" - }, - "original": { - "owner": "domenkozar", - "ref": "relaxed-flakes", - "repo": "nix", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1678875422, - "narHash": "sha256-T3o6NcQPwXjxJMn2shz86Chch4ljXgZn746c2caGxd8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "126f49a01de5b7e35a43fd43f891ecf6d3a51459", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1693471703, - "narHash": "sha256-0l03ZBL8P1P6z8MaSDS/MvuU8E75rVxe5eE1N6gxeTo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3e52e76b70d5508f3cec70b882a29199f4d1ee85", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1685801374, - "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c37ca420157f4abc31e26f436c1145f8951ff373", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1694343207, - "narHash": "sha256-jWi7OwFxU5Owi4k2JmiL1sa/OuBCQtpaAesuj5LXC8w=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "78058d810644f5ed276804ce7ea9e82d92bee293", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": [ - "devenv", - "flake-compat" - ], - "flake-utils": "flake-utils", - "gitignore": "gitignore", - "nixpkgs": [ - "devenv", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1688056373, - "narHash": "sha256-2+SDlNRTKsgo3LBRiMUcoEUb6sDViRNQhzJquZ4koOI=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "5843cf069272d92b60c3ed9e55b7a8989c01d4c7", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "root": { - "inputs": { - "devenv": "devenv", - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/vendor/github.com/sagikazarmark/locafero/flake.nix b/vendor/github.com/sagikazarmark/locafero/flake.nix deleted file mode 100644 index 209ecf2..0000000 --- a/vendor/github.com/sagikazarmark/locafero/flake.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - description = "Finder library for Afero"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - flake-parts.url = "github:hercules-ci/flake-parts"; - devenv.url = "github:cachix/devenv"; - }; - - outputs = inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ - inputs.devenv.flakeModule - ]; - - systems = [ "x86_64-linux" "aarch64-darwin" ]; - - perSystem = { config, self', inputs', pkgs, system, ... }: rec { - devenv.shells = { - default = { - languages = { - go.enable = true; - }; - - packages = with pkgs; [ - just - - golangci-lint - ]; - - # https://github.com/cachix/devenv/issues/528#issuecomment-1556108767 - containers = pkgs.lib.mkForce { }; - }; - - ci = devenv.shells.default; - - ci_1_20 = { - imports = [ devenv.shells.ci ]; - - languages = { - go.package = pkgs.go_1_20; - }; - }; - }; - }; - }; -} diff --git a/vendor/github.com/sagikazarmark/locafero/helpers.go b/vendor/github.com/sagikazarmark/locafero/helpers.go deleted file mode 100644 index 05b4344..0000000 --- a/vendor/github.com/sagikazarmark/locafero/helpers.go +++ /dev/null @@ -1,41 +0,0 @@ -package locafero - -import "fmt" - -// NameWithExtensions creates a list of names from a base name and a list of extensions. -// -// TODO: find a better name for this function. -func NameWithExtensions(baseName string, extensions ...string) []string { - var names []string - - if baseName == "" { - return names - } - - for _, ext := range extensions { - if ext == "" { - continue - } - - names = append(names, fmt.Sprintf("%s.%s", baseName, ext)) - } - - return names -} - -// NameWithOptionalExtensions creates a list of names from a base name and a list of extensions, -// plus it adds the base name (without any extensions) to the end of the list. -// -// TODO: find a better name for this function. -func NameWithOptionalExtensions(baseName string, extensions ...string) []string { - var names []string - - if baseName == "" { - return names - } - - names = NameWithExtensions(baseName, extensions...) - names = append(names, baseName) - - return names -} diff --git a/vendor/github.com/sagikazarmark/locafero/justfile b/vendor/github.com/sagikazarmark/locafero/justfile deleted file mode 100644 index 00a8885..0000000 --- a/vendor/github.com/sagikazarmark/locafero/justfile +++ /dev/null @@ -1,11 +0,0 @@ -default: - just --list - -test: - go test -race -v ./... - -lint: - golangci-lint run - -fmt: - golangci-lint run --fix diff --git a/vendor/github.com/sagikazarmark/slog-shim/.editorconfig b/vendor/github.com/sagikazarmark/slog-shim/.editorconfig deleted file mode 100644 index 1fb0e1b..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/.editorconfig +++ /dev/null @@ -1,18 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 4 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true - -[*.nix] -indent_size = 2 - -[{Makefile,*.mk}] -indent_style = tab - -[Taskfile.yaml] -indent_size = 2 diff --git a/vendor/github.com/sagikazarmark/slog-shim/.envrc b/vendor/github.com/sagikazarmark/slog-shim/.envrc deleted file mode 100644 index 3ce7171..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/.envrc +++ /dev/null @@ -1,4 +0,0 @@ -if ! has nix_direnv_version || ! nix_direnv_version 2.3.0; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.3.0/direnvrc" "sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8=" -fi -use flake . --impure diff --git a/vendor/github.com/sagikazarmark/slog-shim/.gitignore b/vendor/github.com/sagikazarmark/slog-shim/.gitignore deleted file mode 100644 index dc6d8b5..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/.devenv/ -/.direnv/ -/.task/ -/build/ diff --git a/vendor/github.com/sagikazarmark/slog-shim/LICENSE b/vendor/github.com/sagikazarmark/slog-shim/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/sagikazarmark/slog-shim/README.md b/vendor/github.com/sagikazarmark/slog-shim/README.md deleted file mode 100644 index 1f5be85..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# [slog](https://pkg.go.dev/log/slog) shim - -[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/sagikazarmark/slog-shim/ci.yaml?style=flat-square)](https://github.com/sagikazarmark/slog-shim/actions/workflows/ci.yaml) -[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/mod/github.com/sagikazarmark/slog-shim) -![Go Version](https://img.shields.io/badge/go%20version-%3E=1.20-61CFDD.svg?style=flat-square) -[![built with nix](https://img.shields.io/badge/builtwith-nix-7d81f7?style=flat-square)](https://builtwithnix.org) - -Go 1.21 introduced a [new structured logging package](https://golang.org/doc/go1.21#slog), `log/slog`, to the standard library. -Although it's been eagerly anticipated by many, widespread adoption isn't expected to occur immediately, -especially since updating to Go 1.21 is a decision that most libraries won't make overnight. - -Before this package was added to the standard library, there was an _experimental_ version available at [golang.org/x/exp/slog](https://pkg.go.dev/golang.org/x/exp/slog). -While it's generally advised against using experimental packages in production, -this one served as a sort of backport package for the last few years, -incorporating new features before they were added to the standard library (like `slices`, `maps` or `errors`). - -This package serves as a bridge, helping libraries integrate slog in a backward-compatible way without having to immediately update their Go version requirement to 1.21. On Go 1.21 (and above), it acts as a drop-in replacement for `log/slog`, while below 1.21 it falls back to `golang.org/x/exp/slog`. - -**How does it achieve backwards compatibility?** - -Although there's no consensus on whether dropping support for older Go versions is considered backward compatible, a majority seems to believe it is. -(I don't have scientific proof for this, but it's based on conversations with various individuals across different channels.) - -This package adheres to that interpretation of backward compatibility. On Go 1.21, the shim uses type aliases to offer the same API as `slog/log`. -Once a library upgrades its version requirement to Go 1.21, it should be able to discard this shim and use `log/slog` directly. - -For older Go versions, the library might become unstable after removing the shim. -However, since those older versions are no longer supported, the promise of backward compatibility remains intact. - -## Installation - -```shell -go get github.com/sagikazarmark/slog-shim -``` - -## Usage - -Import this package into your library and use it in your public API: - -```go -package mylib - -import slog "github.com/sagikazarmark/slog-shim" - -func New(logger *slog.Logger) MyLib { - // ... -} -``` - -When using the library, clients can either use `log/slog` (when on Go 1.21) or `golang.org/x/exp/slog` (below Go 1.21): - -```go -package main - -import "log/slog" - -// OR - -import "golang.org/x/exp/slog" - -mylib.New(slog.Default()) -``` - -**Make sure consumers are aware that your API behaves differently on different Go versions.** - -Once you bump your Go version requirement to Go 1.21, you can drop the shim entirely from your code: - -```diff -package mylib - -- import slog "github.com/sagikazarmark/slog-shim" -+ import "log/slog" - -func New(logger *slog.Logger) MyLib { - // ... -} -``` - -## License - -The project is licensed under a [BSD-style license](LICENSE). diff --git a/vendor/github.com/sagikazarmark/slog-shim/attr.go b/vendor/github.com/sagikazarmark/slog-shim/attr.go deleted file mode 100644 index 89608bf..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/attr.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.21 - -package slog - -import ( - "log/slog" - "time" -) - -// An Attr is a key-value pair. -type Attr = slog.Attr - -// String returns an Attr for a string value. -func String(key, value string) Attr { - return slog.String(key, value) -} - -// Int64 returns an Attr for an int64. -func Int64(key string, value int64) Attr { - return slog.Int64(key, value) -} - -// Int converts an int to an int64 and returns -// an Attr with that value. -func Int(key string, value int) Attr { - return slog.Int(key, value) -} - -// Uint64 returns an Attr for a uint64. -func Uint64(key string, v uint64) Attr { - return slog.Uint64(key, v) -} - -// Float64 returns an Attr for a floating-point number. -func Float64(key string, v float64) Attr { - return slog.Float64(key, v) -} - -// Bool returns an Attr for a bool. -func Bool(key string, v bool) Attr { - return slog.Bool(key, v) -} - -// Time returns an Attr for a time.Time. -// It discards the monotonic portion. -func Time(key string, v time.Time) Attr { - return slog.Time(key, v) -} - -// Duration returns an Attr for a time.Duration. -func Duration(key string, v time.Duration) Attr { - return slog.Duration(key, v) -} - -// Group returns an Attr for a Group Value. -// The first argument is the key; the remaining arguments -// are converted to Attrs as in [Logger.Log]. -// -// Use Group to collect several key-value pairs under a single -// key on a log line, or as the result of LogValue -// in order to log a single value as multiple Attrs. -func Group(key string, args ...any) Attr { - return slog.Group(key, args...) -} - -// Any returns an Attr for the supplied value. -// See [Value.AnyValue] for how values are treated. -func Any(key string, value any) Attr { - return slog.Any(key, value) -} diff --git a/vendor/github.com/sagikazarmark/slog-shim/attr_120.go b/vendor/github.com/sagikazarmark/slog-shim/attr_120.go deleted file mode 100644 index b664813..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/attr_120.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.21 - -package slog - -import ( - "time" - - "golang.org/x/exp/slog" -) - -// An Attr is a key-value pair. -type Attr = slog.Attr - -// String returns an Attr for a string value. -func String(key, value string) Attr { - return slog.String(key, value) -} - -// Int64 returns an Attr for an int64. -func Int64(key string, value int64) Attr { - return slog.Int64(key, value) -} - -// Int converts an int to an int64 and returns -// an Attr with that value. -func Int(key string, value int) Attr { - return slog.Int(key, value) -} - -// Uint64 returns an Attr for a uint64. -func Uint64(key string, v uint64) Attr { - return slog.Uint64(key, v) -} - -// Float64 returns an Attr for a floating-point number. -func Float64(key string, v float64) Attr { - return slog.Float64(key, v) -} - -// Bool returns an Attr for a bool. -func Bool(key string, v bool) Attr { - return slog.Bool(key, v) -} - -// Time returns an Attr for a time.Time. -// It discards the monotonic portion. -func Time(key string, v time.Time) Attr { - return slog.Time(key, v) -} - -// Duration returns an Attr for a time.Duration. -func Duration(key string, v time.Duration) Attr { - return slog.Duration(key, v) -} - -// Group returns an Attr for a Group Value. -// The first argument is the key; the remaining arguments -// are converted to Attrs as in [Logger.Log]. -// -// Use Group to collect several key-value pairs under a single -// key on a log line, or as the result of LogValue -// in order to log a single value as multiple Attrs. -func Group(key string, args ...any) Attr { - return slog.Group(key, args...) -} - -// Any returns an Attr for the supplied value. -// See [Value.AnyValue] for how values are treated. -func Any(key string, value any) Attr { - return slog.Any(key, value) -} diff --git a/vendor/github.com/sagikazarmark/slog-shim/flake.lock b/vendor/github.com/sagikazarmark/slog-shim/flake.lock deleted file mode 100644 index 7e8898e..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/flake.lock +++ /dev/null @@ -1,273 +0,0 @@ -{ - "nodes": { - "devenv": { - "inputs": { - "flake-compat": "flake-compat", - "nix": "nix", - "nixpkgs": "nixpkgs", - "pre-commit-hooks": "pre-commit-hooks" - }, - "locked": { - "lastModified": 1694097209, - "narHash": "sha256-gQmBjjxeSyySjbh0yQVBKApo2KWIFqqbRUvG+Fa+QpM=", - "owner": "cachix", - "repo": "devenv", - "rev": "7a8e6a91510efe89d8dcb8e43233f93e86f6b189", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "devenv", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1693611461, - "narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1685518550, - "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "devenv", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": [ - "devenv", - "nixpkgs" - ], - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1676545802, - "narHash": "sha256-EK4rZ+Hd5hsvXnzSzk2ikhStJnD63odF7SzsQ8CuSPU=", - "owner": "domenkozar", - "repo": "nix", - "rev": "7c91803598ffbcfe4a55c44ac6d49b2cf07a527f", - "type": "github" - }, - "original": { - "owner": "domenkozar", - "ref": "relaxed-flakes", - "repo": "nix", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1678875422, - "narHash": "sha256-T3o6NcQPwXjxJMn2shz86Chch4ljXgZn746c2caGxd8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "126f49a01de5b7e35a43fd43f891ecf6d3a51459", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1693471703, - "narHash": "sha256-0l03ZBL8P1P6z8MaSDS/MvuU8E75rVxe5eE1N6gxeTo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3e52e76b70d5508f3cec70b882a29199f4d1ee85", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1685801374, - "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c37ca420157f4abc31e26f436c1145f8951ff373", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1694345580, - "narHash": "sha256-BbG0NUxQTz1dN/Y87yPWZc/0Kp/coJ0vM3+7sNa5kUM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f002de6834fdde9c864f33c1ec51da7df19cd832", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "master", - "repo": "nixpkgs", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": [ - "devenv", - "flake-compat" - ], - "flake-utils": "flake-utils", - "gitignore": "gitignore", - "nixpkgs": [ - "devenv", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1688056373, - "narHash": "sha256-2+SDlNRTKsgo3LBRiMUcoEUb6sDViRNQhzJquZ4koOI=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "5843cf069272d92b60c3ed9e55b7a8989c01d4c7", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "root": { - "inputs": { - "devenv": "devenv", - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/vendor/github.com/sagikazarmark/slog-shim/flake.nix b/vendor/github.com/sagikazarmark/slog-shim/flake.nix deleted file mode 100644 index 7239bbc..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/flake.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ - inputs = { - # nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - nixpkgs.url = "github:NixOS/nixpkgs/master"; - flake-parts.url = "github:hercules-ci/flake-parts"; - devenv.url = "github:cachix/devenv"; - }; - - outputs = inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ - inputs.devenv.flakeModule - ]; - - systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]; - - perSystem = { config, self', inputs', pkgs, system, ... }: rec { - devenv.shells = { - default = { - languages = { - go.enable = true; - go.package = pkgs.lib.mkDefault pkgs.go_1_21; - }; - - # https://github.com/cachix/devenv/issues/528#issuecomment-1556108767 - containers = pkgs.lib.mkForce { }; - }; - - ci = devenv.shells.default; - - ci_1_19 = { - imports = [ devenv.shells.ci ]; - - languages = { - go.package = pkgs.go_1_19; - }; - }; - - ci_1_20 = { - imports = [ devenv.shells.ci ]; - - languages = { - go.package = pkgs.go_1_20; - }; - }; - - ci_1_21 = { - imports = [ devenv.shells.ci ]; - - languages = { - go.package = pkgs.go_1_21; - }; - }; - }; - }; - }; -} diff --git a/vendor/github.com/sagikazarmark/slog-shim/handler.go b/vendor/github.com/sagikazarmark/slog-shim/handler.go deleted file mode 100644 index f55556a..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/handler.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.21 - -package slog - -import ( - "log/slog" -) - -// A Handler handles log records produced by a Logger.. -// -// A typical handler may print log records to standard error, -// or write them to a file or database, or perhaps augment them -// with additional attributes and pass them on to another handler. -// -// Any of the Handler's methods may be called concurrently with itself -// or with other methods. It is the responsibility of the Handler to -// manage this concurrency. -// -// Users of the slog package should not invoke Handler methods directly. -// They should use the methods of [Logger] instead. -type Handler = slog.Handler - -// HandlerOptions are options for a TextHandler or JSONHandler. -// A zero HandlerOptions consists entirely of default values. -type HandlerOptions = slog.HandlerOptions - -// Keys for "built-in" attributes. -const ( - // TimeKey is the key used by the built-in handlers for the time - // when the log method is called. The associated Value is a [time.Time]. - TimeKey = slog.TimeKey - // LevelKey is the key used by the built-in handlers for the level - // of the log call. The associated value is a [Level]. - LevelKey = slog.LevelKey - // MessageKey is the key used by the built-in handlers for the - // message of the log call. The associated value is a string. - MessageKey = slog.MessageKey - // SourceKey is the key used by the built-in handlers for the source file - // and line of the log call. The associated value is a string. - SourceKey = slog.SourceKey -) diff --git a/vendor/github.com/sagikazarmark/slog-shim/handler_120.go b/vendor/github.com/sagikazarmark/slog-shim/handler_120.go deleted file mode 100644 index 6700575..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/handler_120.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.21 - -package slog - -import ( - "golang.org/x/exp/slog" -) - -// A Handler handles log records produced by a Logger.. -// -// A typical handler may print log records to standard error, -// or write them to a file or database, or perhaps augment them -// with additional attributes and pass them on to another handler. -// -// Any of the Handler's methods may be called concurrently with itself -// or with other methods. It is the responsibility of the Handler to -// manage this concurrency. -// -// Users of the slog package should not invoke Handler methods directly. -// They should use the methods of [Logger] instead. -type Handler = slog.Handler - -// HandlerOptions are options for a TextHandler or JSONHandler. -// A zero HandlerOptions consists entirely of default values. -type HandlerOptions = slog.HandlerOptions - -// Keys for "built-in" attributes. -const ( - // TimeKey is the key used by the built-in handlers for the time - // when the log method is called. The associated Value is a [time.Time]. - TimeKey = slog.TimeKey - // LevelKey is the key used by the built-in handlers for the level - // of the log call. The associated value is a [Level]. - LevelKey = slog.LevelKey - // MessageKey is the key used by the built-in handlers for the - // message of the log call. The associated value is a string. - MessageKey = slog.MessageKey - // SourceKey is the key used by the built-in handlers for the source file - // and line of the log call. The associated value is a string. - SourceKey = slog.SourceKey -) diff --git a/vendor/github.com/sagikazarmark/slog-shim/json_handler.go b/vendor/github.com/sagikazarmark/slog-shim/json_handler.go deleted file mode 100644 index 7c22bd8..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/json_handler.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.21 - -package slog - -import ( - "io" - "log/slog" -) - -// JSONHandler is a Handler that writes Records to an io.Writer as -// line-delimited JSON objects. -type JSONHandler = slog.JSONHandler - -// NewJSONHandler creates a JSONHandler that writes to w, -// using the given options. -// If opts is nil, the default options are used. -func NewJSONHandler(w io.Writer, opts *HandlerOptions) *JSONHandler { - return slog.NewJSONHandler(w, opts) -} diff --git a/vendor/github.com/sagikazarmark/slog-shim/json_handler_120.go b/vendor/github.com/sagikazarmark/slog-shim/json_handler_120.go deleted file mode 100644 index 7b14f10..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/json_handler_120.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.21 - -package slog - -import ( - "io" - - "golang.org/x/exp/slog" -) - -// JSONHandler is a Handler that writes Records to an io.Writer as -// line-delimited JSON objects. -type JSONHandler = slog.JSONHandler - -// NewJSONHandler creates a JSONHandler that writes to w, -// using the given options. -// If opts is nil, the default options are used. -func NewJSONHandler(w io.Writer, opts *HandlerOptions) *JSONHandler { - return slog.NewJSONHandler(w, opts) -} diff --git a/vendor/github.com/sagikazarmark/slog-shim/level.go b/vendor/github.com/sagikazarmark/slog-shim/level.go deleted file mode 100644 index 07288cf..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/level.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.21 - -package slog - -import ( - "log/slog" -) - -// A Level is the importance or severity of a log event. -// The higher the level, the more important or severe the event. -type Level = slog.Level - -// Level numbers are inherently arbitrary, -// but we picked them to satisfy three constraints. -// Any system can map them to another numbering scheme if it wishes. -// -// First, we wanted the default level to be Info, Since Levels are ints, Info is -// the default value for int, zero. -// -// Second, we wanted to make it easy to use levels to specify logger verbosity. -// Since a larger level means a more severe event, a logger that accepts events -// with smaller (or more negative) level means a more verbose logger. Logger -// verbosity is thus the negation of event severity, and the default verbosity -// of 0 accepts all events at least as severe as INFO. -// -// Third, we wanted some room between levels to accommodate schemes with named -// levels between ours. For example, Google Cloud Logging defines a Notice level -// between Info and Warn. Since there are only a few of these intermediate -// levels, the gap between the numbers need not be large. Our gap of 4 matches -// OpenTelemetry's mapping. Subtracting 9 from an OpenTelemetry level in the -// DEBUG, INFO, WARN and ERROR ranges converts it to the corresponding slog -// Level range. OpenTelemetry also has the names TRACE and FATAL, which slog -// does not. But those OpenTelemetry levels can still be represented as slog -// Levels by using the appropriate integers. -// -// Names for common levels. -const ( - LevelDebug Level = slog.LevelDebug - LevelInfo Level = slog.LevelInfo - LevelWarn Level = slog.LevelWarn - LevelError Level = slog.LevelError -) - -// A LevelVar is a Level variable, to allow a Handler level to change -// dynamically. -// It implements Leveler as well as a Set method, -// and it is safe for use by multiple goroutines. -// The zero LevelVar corresponds to LevelInfo. -type LevelVar = slog.LevelVar - -// A Leveler provides a Level value. -// -// As Level itself implements Leveler, clients typically supply -// a Level value wherever a Leveler is needed, such as in HandlerOptions. -// Clients who need to vary the level dynamically can provide a more complex -// Leveler implementation such as *LevelVar. -type Leveler = slog.Leveler diff --git a/vendor/github.com/sagikazarmark/slog-shim/level_120.go b/vendor/github.com/sagikazarmark/slog-shim/level_120.go deleted file mode 100644 index d3feb94..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/level_120.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.21 - -package slog - -import ( - "golang.org/x/exp/slog" -) - -// A Level is the importance or severity of a log event. -// The higher the level, the more important or severe the event. -type Level = slog.Level - -// Level numbers are inherently arbitrary, -// but we picked them to satisfy three constraints. -// Any system can map them to another numbering scheme if it wishes. -// -// First, we wanted the default level to be Info, Since Levels are ints, Info is -// the default value for int, zero. -// -// Second, we wanted to make it easy to use levels to specify logger verbosity. -// Since a larger level means a more severe event, a logger that accepts events -// with smaller (or more negative) level means a more verbose logger. Logger -// verbosity is thus the negation of event severity, and the default verbosity -// of 0 accepts all events at least as severe as INFO. -// -// Third, we wanted some room between levels to accommodate schemes with named -// levels between ours. For example, Google Cloud Logging defines a Notice level -// between Info and Warn. Since there are only a few of these intermediate -// levels, the gap between the numbers need not be large. Our gap of 4 matches -// OpenTelemetry's mapping. Subtracting 9 from an OpenTelemetry level in the -// DEBUG, INFO, WARN and ERROR ranges converts it to the corresponding slog -// Level range. OpenTelemetry also has the names TRACE and FATAL, which slog -// does not. But those OpenTelemetry levels can still be represented as slog -// Levels by using the appropriate integers. -// -// Names for common levels. -const ( - LevelDebug Level = slog.LevelDebug - LevelInfo Level = slog.LevelInfo - LevelWarn Level = slog.LevelWarn - LevelError Level = slog.LevelError -) - -// A LevelVar is a Level variable, to allow a Handler level to change -// dynamically. -// It implements Leveler as well as a Set method, -// and it is safe for use by multiple goroutines. -// The zero LevelVar corresponds to LevelInfo. -type LevelVar = slog.LevelVar - -// A Leveler provides a Level value. -// -// As Level itself implements Leveler, clients typically supply -// a Level value wherever a Leveler is needed, such as in HandlerOptions. -// Clients who need to vary the level dynamically can provide a more complex -// Leveler implementation such as *LevelVar. -type Leveler = slog.Leveler diff --git a/vendor/github.com/sagikazarmark/slog-shim/logger.go b/vendor/github.com/sagikazarmark/slog-shim/logger.go deleted file mode 100644 index e80036b..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/logger.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.21 - -package slog - -import ( - "context" - "log" - "log/slog" -) - -// Default returns the default Logger. -func Default() *Logger { return slog.Default() } - -// SetDefault makes l the default Logger. -// After this call, output from the log package's default Logger -// (as with [log.Print], etc.) will be logged at LevelInfo using l's Handler. -func SetDefault(l *Logger) { - slog.SetDefault(l) -} - -// A Logger records structured information about each call to its -// Log, Debug, Info, Warn, and Error methods. -// For each call, it creates a Record and passes it to a Handler. -// -// To create a new Logger, call [New] or a Logger method -// that begins "With". -type Logger = slog.Logger - -// New creates a new Logger with the given non-nil Handler. -func New(h Handler) *Logger { - return slog.New(h) -} - -// With calls Logger.With on the default logger. -func With(args ...any) *Logger { - return slog.With(args...) -} - -// NewLogLogger returns a new log.Logger such that each call to its Output method -// dispatches a Record to the specified handler. The logger acts as a bridge from -// the older log API to newer structured logging handlers. -func NewLogLogger(h Handler, level Level) *log.Logger { - return slog.NewLogLogger(h, level) -} - -// Debug calls Logger.Debug on the default logger. -func Debug(msg string, args ...any) { - slog.Debug(msg, args...) -} - -// DebugContext calls Logger.DebugContext on the default logger. -func DebugContext(ctx context.Context, msg string, args ...any) { - slog.DebugContext(ctx, msg, args...) -} - -// Info calls Logger.Info on the default logger. -func Info(msg string, args ...any) { - slog.Info(msg, args...) -} - -// InfoContext calls Logger.InfoContext on the default logger. -func InfoContext(ctx context.Context, msg string, args ...any) { - slog.InfoContext(ctx, msg, args...) -} - -// Warn calls Logger.Warn on the default logger. -func Warn(msg string, args ...any) { - slog.Warn(msg, args...) -} - -// WarnContext calls Logger.WarnContext on the default logger. -func WarnContext(ctx context.Context, msg string, args ...any) { - slog.WarnContext(ctx, msg, args...) -} - -// Error calls Logger.Error on the default logger. -func Error(msg string, args ...any) { - slog.Error(msg, args...) -} - -// ErrorContext calls Logger.ErrorContext on the default logger. -func ErrorContext(ctx context.Context, msg string, args ...any) { - slog.ErrorContext(ctx, msg, args...) -} - -// Log calls Logger.Log on the default logger. -func Log(ctx context.Context, level Level, msg string, args ...any) { - slog.Log(ctx, level, msg, args...) -} - -// LogAttrs calls Logger.LogAttrs on the default logger. -func LogAttrs(ctx context.Context, level Level, msg string, attrs ...Attr) { - slog.LogAttrs(ctx, level, msg, attrs...) -} diff --git a/vendor/github.com/sagikazarmark/slog-shim/logger_120.go b/vendor/github.com/sagikazarmark/slog-shim/logger_120.go deleted file mode 100644 index 97ebdd5..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/logger_120.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.21 - -package slog - -import ( - "context" - "log" - - "golang.org/x/exp/slog" -) - -// Default returns the default Logger. -func Default() *Logger { return slog.Default() } - -// SetDefault makes l the default Logger. -// After this call, output from the log package's default Logger -// (as with [log.Print], etc.) will be logged at LevelInfo using l's Handler. -func SetDefault(l *Logger) { - slog.SetDefault(l) -} - -// A Logger records structured information about each call to its -// Log, Debug, Info, Warn, and Error methods. -// For each call, it creates a Record and passes it to a Handler. -// -// To create a new Logger, call [New] or a Logger method -// that begins "With". -type Logger = slog.Logger - -// New creates a new Logger with the given non-nil Handler. -func New(h Handler) *Logger { - return slog.New(h) -} - -// With calls Logger.With on the default logger. -func With(args ...any) *Logger { - return slog.With(args...) -} - -// NewLogLogger returns a new log.Logger such that each call to its Output method -// dispatches a Record to the specified handler. The logger acts as a bridge from -// the older log API to newer structured logging handlers. -func NewLogLogger(h Handler, level Level) *log.Logger { - return slog.NewLogLogger(h, level) -} - -// Debug calls Logger.Debug on the default logger. -func Debug(msg string, args ...any) { - slog.Debug(msg, args...) -} - -// DebugContext calls Logger.DebugContext on the default logger. -func DebugContext(ctx context.Context, msg string, args ...any) { - slog.DebugContext(ctx, msg, args...) -} - -// Info calls Logger.Info on the default logger. -func Info(msg string, args ...any) { - slog.Info(msg, args...) -} - -// InfoContext calls Logger.InfoContext on the default logger. -func InfoContext(ctx context.Context, msg string, args ...any) { - slog.InfoContext(ctx, msg, args...) -} - -// Warn calls Logger.Warn on the default logger. -func Warn(msg string, args ...any) { - slog.Warn(msg, args...) -} - -// WarnContext calls Logger.WarnContext on the default logger. -func WarnContext(ctx context.Context, msg string, args ...any) { - slog.WarnContext(ctx, msg, args...) -} - -// Error calls Logger.Error on the default logger. -func Error(msg string, args ...any) { - slog.Error(msg, args...) -} - -// ErrorContext calls Logger.ErrorContext on the default logger. -func ErrorContext(ctx context.Context, msg string, args ...any) { - slog.ErrorContext(ctx, msg, args...) -} - -// Log calls Logger.Log on the default logger. -func Log(ctx context.Context, level Level, msg string, args ...any) { - slog.Log(ctx, level, msg, args...) -} - -// LogAttrs calls Logger.LogAttrs on the default logger. -func LogAttrs(ctx context.Context, level Level, msg string, attrs ...Attr) { - slog.LogAttrs(ctx, level, msg, attrs...) -} diff --git a/vendor/github.com/sagikazarmark/slog-shim/record.go b/vendor/github.com/sagikazarmark/slog-shim/record.go deleted file mode 100644 index 85ad1f7..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/record.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.21 - -package slog - -import ( - "log/slog" - "time" -) - -// A Record holds information about a log event. -// Copies of a Record share state. -// Do not modify a Record after handing out a copy to it. -// Call [NewRecord] to create a new Record. -// Use [Record.Clone] to create a copy with no shared state. -type Record = slog.Record - -// NewRecord creates a Record from the given arguments. -// Use [Record.AddAttrs] to add attributes to the Record. -// -// NewRecord is intended for logging APIs that want to support a [Handler] as -// a backend. -func NewRecord(t time.Time, level Level, msg string, pc uintptr) Record { - return slog.NewRecord(t, level, msg, pc) -} - -// Source describes the location of a line of source code. -type Source = slog.Source diff --git a/vendor/github.com/sagikazarmark/slog-shim/record_120.go b/vendor/github.com/sagikazarmark/slog-shim/record_120.go deleted file mode 100644 index c2eaf4e..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/record_120.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.21 - -package slog - -import ( - "time" - - "golang.org/x/exp/slog" -) - -// A Record holds information about a log event. -// Copies of a Record share state. -// Do not modify a Record after handing out a copy to it. -// Call [NewRecord] to create a new Record. -// Use [Record.Clone] to create a copy with no shared state. -type Record = slog.Record - -// NewRecord creates a Record from the given arguments. -// Use [Record.AddAttrs] to add attributes to the Record. -// -// NewRecord is intended for logging APIs that want to support a [Handler] as -// a backend. -func NewRecord(t time.Time, level Level, msg string, pc uintptr) Record { - return slog.NewRecord(t, level, msg, pc) -} - -// Source describes the location of a line of source code. -type Source = slog.Source diff --git a/vendor/github.com/sagikazarmark/slog-shim/text_handler.go b/vendor/github.com/sagikazarmark/slog-shim/text_handler.go deleted file mode 100644 index 45f6cfc..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/text_handler.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.21 - -package slog - -import ( - "io" - "log/slog" -) - -// TextHandler is a Handler that writes Records to an io.Writer as a -// sequence of key=value pairs separated by spaces and followed by a newline. -type TextHandler = slog.TextHandler - -// NewTextHandler creates a TextHandler that writes to w, -// using the given options. -// If opts is nil, the default options are used. -func NewTextHandler(w io.Writer, opts *HandlerOptions) *TextHandler { - return slog.NewTextHandler(w, opts) -} diff --git a/vendor/github.com/sagikazarmark/slog-shim/text_handler_120.go b/vendor/github.com/sagikazarmark/slog-shim/text_handler_120.go deleted file mode 100644 index a69d63c..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/text_handler_120.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.21 - -package slog - -import ( - "io" - - "golang.org/x/exp/slog" -) - -// TextHandler is a Handler that writes Records to an io.Writer as a -// sequence of key=value pairs separated by spaces and followed by a newline. -type TextHandler = slog.TextHandler - -// NewTextHandler creates a TextHandler that writes to w, -// using the given options. -// If opts is nil, the default options are used. -func NewTextHandler(w io.Writer, opts *HandlerOptions) *TextHandler { - return slog.NewTextHandler(w, opts) -} diff --git a/vendor/github.com/sagikazarmark/slog-shim/value.go b/vendor/github.com/sagikazarmark/slog-shim/value.go deleted file mode 100644 index 61173eb..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/value.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.21 - -package slog - -import ( - "log/slog" - "time" -) - -// A Value can represent any Go value, but unlike type any, -// it can represent most small values without an allocation. -// The zero Value corresponds to nil. -type Value = slog.Value - -// Kind is the kind of a Value. -type Kind = slog.Kind - -// The following list is sorted alphabetically, but it's also important that -// KindAny is 0 so that a zero Value represents nil. -const ( - KindAny = slog.KindAny - KindBool = slog.KindBool - KindDuration = slog.KindDuration - KindFloat64 = slog.KindFloat64 - KindInt64 = slog.KindInt64 - KindString = slog.KindString - KindTime = slog.KindTime - KindUint64 = slog.KindUint64 - KindGroup = slog.KindGroup - KindLogValuer = slog.KindLogValuer -) - -//////////////// Constructors - -// StringValue returns a new Value for a string. -func StringValue(value string) Value { - return slog.StringValue(value) -} - -// IntValue returns a Value for an int. -func IntValue(v int) Value { - return slog.IntValue(v) -} - -// Int64Value returns a Value for an int64. -func Int64Value(v int64) Value { - return slog.Int64Value(v) -} - -// Uint64Value returns a Value for a uint64. -func Uint64Value(v uint64) Value { - return slog.Uint64Value(v) -} - -// Float64Value returns a Value for a floating-point number. -func Float64Value(v float64) Value { - return slog.Float64Value(v) -} - -// BoolValue returns a Value for a bool. -func BoolValue(v bool) Value { - return slog.BoolValue(v) -} - -// TimeValue returns a Value for a time.Time. -// It discards the monotonic portion. -func TimeValue(v time.Time) Value { - return slog.TimeValue(v) -} - -// DurationValue returns a Value for a time.Duration. -func DurationValue(v time.Duration) Value { - return slog.DurationValue(v) -} - -// GroupValue returns a new Value for a list of Attrs. -// The caller must not subsequently mutate the argument slice. -func GroupValue(as ...Attr) Value { - return slog.GroupValue(as...) -} - -// AnyValue returns a Value for the supplied value. -// -// If the supplied value is of type Value, it is returned -// unmodified. -// -// Given a value of one of Go's predeclared string, bool, or -// (non-complex) numeric types, AnyValue returns a Value of kind -// String, Bool, Uint64, Int64, or Float64. The width of the -// original numeric type is not preserved. -// -// Given a time.Time or time.Duration value, AnyValue returns a Value of kind -// KindTime or KindDuration. The monotonic time is not preserved. -// -// For nil, or values of all other types, including named types whose -// underlying type is numeric, AnyValue returns a value of kind KindAny. -func AnyValue(v any) Value { - return slog.AnyValue(v) -} - -// A LogValuer is any Go value that can convert itself into a Value for logging. -// -// This mechanism may be used to defer expensive operations until they are -// needed, or to expand a single value into a sequence of components. -type LogValuer = slog.LogValuer diff --git a/vendor/github.com/sagikazarmark/slog-shim/value_120.go b/vendor/github.com/sagikazarmark/slog-shim/value_120.go deleted file mode 100644 index 0f9f871..0000000 --- a/vendor/github.com/sagikazarmark/slog-shim/value_120.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.21 - -package slog - -import ( - "time" - - "golang.org/x/exp/slog" -) - -// A Value can represent any Go value, but unlike type any, -// it can represent most small values without an allocation. -// The zero Value corresponds to nil. -type Value = slog.Value - -// Kind is the kind of a Value. -type Kind = slog.Kind - -// The following list is sorted alphabetically, but it's also important that -// KindAny is 0 so that a zero Value represents nil. -const ( - KindAny = slog.KindAny - KindBool = slog.KindBool - KindDuration = slog.KindDuration - KindFloat64 = slog.KindFloat64 - KindInt64 = slog.KindInt64 - KindString = slog.KindString - KindTime = slog.KindTime - KindUint64 = slog.KindUint64 - KindGroup = slog.KindGroup - KindLogValuer = slog.KindLogValuer -) - -//////////////// Constructors - -// StringValue returns a new Value for a string. -func StringValue(value string) Value { - return slog.StringValue(value) -} - -// IntValue returns a Value for an int. -func IntValue(v int) Value { - return slog.IntValue(v) -} - -// Int64Value returns a Value for an int64. -func Int64Value(v int64) Value { - return slog.Int64Value(v) -} - -// Uint64Value returns a Value for a uint64. -func Uint64Value(v uint64) Value { - return slog.Uint64Value(v) -} - -// Float64Value returns a Value for a floating-point number. -func Float64Value(v float64) Value { - return slog.Float64Value(v) -} - -// BoolValue returns a Value for a bool. -func BoolValue(v bool) Value { - return slog.BoolValue(v) -} - -// TimeValue returns a Value for a time.Time. -// It discards the monotonic portion. -func TimeValue(v time.Time) Value { - return slog.TimeValue(v) -} - -// DurationValue returns a Value for a time.Duration. -func DurationValue(v time.Duration) Value { - return slog.DurationValue(v) -} - -// GroupValue returns a new Value for a list of Attrs. -// The caller must not subsequently mutate the argument slice. -func GroupValue(as ...Attr) Value { - return slog.GroupValue(as...) -} - -// AnyValue returns a Value for the supplied value. -// -// If the supplied value is of type Value, it is returned -// unmodified. -// -// Given a value of one of Go's predeclared string, bool, or -// (non-complex) numeric types, AnyValue returns a Value of kind -// String, Bool, Uint64, Int64, or Float64. The width of the -// original numeric type is not preserved. -// -// Given a time.Time or time.Duration value, AnyValue returns a Value of kind -// KindTime or KindDuration. The monotonic time is not preserved. -// -// For nil, or values of all other types, including named types whose -// underlying type is numeric, AnyValue returns a value of kind KindAny. -func AnyValue(v any) Value { - return slog.AnyValue(v) -} - -// A LogValuer is any Go value that can convert itself into a Value for logging. -// -// This mechanism may be used to defer expensive operations until they are -// needed, or to expand a single value into a sequence of components. -type LogValuer = slog.LogValuer diff --git a/vendor/github.com/sirupsen/logrus/.gitignore b/vendor/github.com/sirupsen/logrus/.gitignore deleted file mode 100644 index 1fb13ab..0000000 --- a/vendor/github.com/sirupsen/logrus/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -logrus -vendor - -.idea/ diff --git a/vendor/github.com/sirupsen/logrus/.golangci.yml b/vendor/github.com/sirupsen/logrus/.golangci.yml deleted file mode 100644 index 65dc285..0000000 --- a/vendor/github.com/sirupsen/logrus/.golangci.yml +++ /dev/null @@ -1,40 +0,0 @@ -run: - # do not run on test files yet - tests: false - -# all available settings of specific linters -linters-settings: - errcheck: - # report about not checking of errors in type assetions: `a := b.(MyStruct)`; - # default is false: such cases aren't reported by default. - check-type-assertions: false - - # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; - # default is false: such cases aren't reported by default. - check-blank: false - - lll: - line-length: 100 - tab-width: 4 - - prealloc: - simple: false - range-loops: false - for-loops: false - - whitespace: - multi-if: false # Enforces newlines (or comments) after every multi-line if statement - multi-func: false # Enforces newlines (or comments) after every multi-line function signature - -linters: - enable: - - megacheck - - govet - disable: - - maligned - - prealloc - disable-all: false - presets: - - bugs - - unused - fast: false diff --git a/vendor/github.com/sirupsen/logrus/.travis.yml b/vendor/github.com/sirupsen/logrus/.travis.yml deleted file mode 100644 index c1dbd5a..0000000 --- a/vendor/github.com/sirupsen/logrus/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: go -go_import_path: github.com/sirupsen/logrus -git: - depth: 1 -env: - - GO111MODULE=on -go: 1.15.x -os: linux -install: - - ./travis/install.sh -script: - - cd ci - - go run mage.go -v -w ../ crossBuild - - go run mage.go -v -w ../ lint - - go run mage.go -v -w ../ test diff --git a/vendor/github.com/sirupsen/logrus/CHANGELOG.md b/vendor/github.com/sirupsen/logrus/CHANGELOG.md deleted file mode 100644 index 7567f61..0000000 --- a/vendor/github.com/sirupsen/logrus/CHANGELOG.md +++ /dev/null @@ -1,259 +0,0 @@ -# 1.8.1 -Code quality: - * move magefile in its own subdir/submodule to remove magefile dependency on logrus consumer - * improve timestamp format documentation - -Fixes: - * fix race condition on logger hooks - - -# 1.8.0 - -Correct versioning number replacing v1.7.1. - -# 1.7.1 - -Beware this release has introduced a new public API and its semver is therefore incorrect. - -Code quality: - * use go 1.15 in travis - * use magefile as task runner - -Fixes: - * small fixes about new go 1.13 error formatting system - * Fix for long time race condiction with mutating data hooks - -Features: - * build support for zos - -# 1.7.0 -Fixes: - * the dependency toward a windows terminal library has been removed - -Features: - * a new buffer pool management API has been added - * a set of `Fn()` functions have been added - -# 1.6.0 -Fixes: - * end of line cleanup - * revert the entry concurrency bug fix whic leads to deadlock under some circumstances - * update dependency on go-windows-terminal-sequences to fix a crash with go 1.14 - -Features: - * add an option to the `TextFormatter` to completely disable fields quoting - -# 1.5.0 -Code quality: - * add golangci linter run on travis - -Fixes: - * add mutex for hooks concurrent access on `Entry` data - * caller function field for go1.14 - * fix build issue for gopherjs target - -Feature: - * add an hooks/writer sub-package whose goal is to split output on different stream depending on the trace level - * add a `DisableHTMLEscape` option in the `JSONFormatter` - * add `ForceQuote` and `PadLevelText` options in the `TextFormatter` - -# 1.4.2 - * Fixes build break for plan9, nacl, solaris -# 1.4.1 -This new release introduces: - * Enhance TextFormatter to not print caller information when they are empty (#944) - * Remove dependency on golang.org/x/crypto (#932, #943) - -Fixes: - * Fix Entry.WithContext method to return a copy of the initial entry (#941) - -# 1.4.0 -This new release introduces: - * Add `DeferExitHandler`, similar to `RegisterExitHandler` but prepending the handler to the list of handlers (semantically like `defer`) (#848). - * Add `CallerPrettyfier` to `JSONFormatter` and `TextFormatter` (#909, #911) - * Add `Entry.WithContext()` and `Entry.Context`, to set a context on entries to be used e.g. in hooks (#919). - -Fixes: - * Fix wrong method calls `Logger.Print` and `Logger.Warningln` (#893). - * Update `Entry.Logf` to not do string formatting unless the log level is enabled (#903) - * Fix infinite recursion on unknown `Level.String()` (#907) - * Fix race condition in `getCaller` (#916). - - -# 1.3.0 -This new release introduces: - * Log, Logf, Logln functions for Logger and Entry that take a Level - -Fixes: - * Building prometheus node_exporter on AIX (#840) - * Race condition in TextFormatter (#468) - * Travis CI import path (#868) - * Remove coloured output on Windows (#862) - * Pointer to func as field in JSONFormatter (#870) - * Properly marshal Levels (#873) - -# 1.2.0 -This new release introduces: - * A new method `SetReportCaller` in the `Logger` to enable the file, line and calling function from which the trace has been issued - * A new trace level named `Trace` whose level is below `Debug` - * A configurable exit function to be called upon a Fatal trace - * The `Level` object now implements `encoding.TextUnmarshaler` interface - -# 1.1.1 -This is a bug fix release. - * fix the build break on Solaris - * don't drop a whole trace in JSONFormatter when a field param is a function pointer which can not be serialized - -# 1.1.0 -This new release introduces: - * several fixes: - * a fix for a race condition on entry formatting - * proper cleanup of previously used entries before putting them back in the pool - * the extra new line at the end of message in text formatter has been removed - * a new global public API to check if a level is activated: IsLevelEnabled - * the following methods have been added to the Logger object - * IsLevelEnabled - * SetFormatter - * SetOutput - * ReplaceHooks - * introduction of go module - * an indent configuration for the json formatter - * output colour support for windows - * the field sort function is now configurable for text formatter - * the CLICOLOR and CLICOLOR\_FORCE environment variable support in text formater - -# 1.0.6 - -This new release introduces: - * a new api WithTime which allows to easily force the time of the log entry - which is mostly useful for logger wrapper - * a fix reverting the immutability of the entry given as parameter to the hooks - a new configuration field of the json formatter in order to put all the fields - in a nested dictionnary - * a new SetOutput method in the Logger - * a new configuration of the textformatter to configure the name of the default keys - * a new configuration of the text formatter to disable the level truncation - -# 1.0.5 - -* Fix hooks race (#707) -* Fix panic deadlock (#695) - -# 1.0.4 - -* Fix race when adding hooks (#612) -* Fix terminal check in AppEngine (#635) - -# 1.0.3 - -* Replace example files with testable examples - -# 1.0.2 - -* bug: quote non-string values in text formatter (#583) -* Make (*Logger) SetLevel a public method - -# 1.0.1 - -* bug: fix escaping in text formatter (#575) - -# 1.0.0 - -* Officially changed name to lower-case -* bug: colors on Windows 10 (#541) -* bug: fix race in accessing level (#512) - -# 0.11.5 - -* feature: add writer and writerlevel to entry (#372) - -# 0.11.4 - -* bug: fix undefined variable on solaris (#493) - -# 0.11.3 - -* formatter: configure quoting of empty values (#484) -* formatter: configure quoting character (default is `"`) (#484) -* bug: fix not importing io correctly in non-linux environments (#481) - -# 0.11.2 - -* bug: fix windows terminal detection (#476) - -# 0.11.1 - -* bug: fix tty detection with custom out (#471) - -# 0.11.0 - -* performance: Use bufferpool to allocate (#370) -* terminal: terminal detection for app-engine (#343) -* feature: exit handler (#375) - -# 0.10.0 - -* feature: Add a test hook (#180) -* feature: `ParseLevel` is now case-insensitive (#326) -* feature: `FieldLogger` interface that generalizes `Logger` and `Entry` (#308) -* performance: avoid re-allocations on `WithFields` (#335) - -# 0.9.0 - -* logrus/text_formatter: don't emit empty msg -* logrus/hooks/airbrake: move out of main repository -* logrus/hooks/sentry: move out of main repository -* logrus/hooks/papertrail: move out of main repository -* logrus/hooks/bugsnag: move out of main repository -* logrus/core: run tests with `-race` -* logrus/core: detect TTY based on `stderr` -* logrus/core: support `WithError` on logger -* logrus/core: Solaris support - -# 0.8.7 - -* logrus/core: fix possible race (#216) -* logrus/doc: small typo fixes and doc improvements - - -# 0.8.6 - -* hooks/raven: allow passing an initialized client - -# 0.8.5 - -* logrus/core: revert #208 - -# 0.8.4 - -* formatter/text: fix data race (#218) - -# 0.8.3 - -* logrus/core: fix entry log level (#208) -* logrus/core: improve performance of text formatter by 40% -* logrus/core: expose `LevelHooks` type -* logrus/core: add support for DragonflyBSD and NetBSD -* formatter/text: print structs more verbosely - -# 0.8.2 - -* logrus: fix more Fatal family functions - -# 0.8.1 - -* logrus: fix not exiting on `Fatalf` and `Fatalln` - -# 0.8.0 - -* logrus: defaults to stderr instead of stdout -* hooks/sentry: add special field for `*http.Request` -* formatter/text: ignore Windows for colors - -# 0.7.3 - -* formatter/\*: allow configuration of timestamp layout - -# 0.7.2 - -* formatter/text: Add configuration option for time format (#158) diff --git a/vendor/github.com/sirupsen/logrus/LICENSE b/vendor/github.com/sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/vendor/github.com/sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/sirupsen/logrus/README.md b/vendor/github.com/sirupsen/logrus/README.md deleted file mode 100644 index d1d4a85..0000000 --- a/vendor/github.com/sirupsen/logrus/README.md +++ /dev/null @@ -1,515 +0,0 @@ -# Logrus :walrus: [![Build Status](https://github.com/sirupsen/logrus/workflows/CI/badge.svg)](https://github.com/sirupsen/logrus/actions?query=workflow%3ACI) [![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://travis-ci.org/sirupsen/logrus) [![Go Reference](https://pkg.go.dev/badge/github.com/sirupsen/logrus.svg)](https://pkg.go.dev/github.com/sirupsen/logrus) - -Logrus is a structured logger for Go (golang), completely API compatible with -the standard library logger. - -**Logrus is in maintenance-mode.** We will not be introducing new features. It's -simply too hard to do in a way that won't break many people's projects, which is -the last thing you want from your Logging library (again...). - -This does not mean Logrus is dead. Logrus will continue to be maintained for -security, (backwards compatible) bug fixes, and performance (where we are -limited by the interface). - -I believe Logrus' biggest contribution is to have played a part in today's -widespread use of structured logging in Golang. There doesn't seem to be a -reason to do a major, breaking iteration into Logrus V2, since the fantastic Go -community has built those independently. Many fantastic alternatives have sprung -up. Logrus would look like those, had it been re-designed with what we know -about structured logging in Go today. Check out, for example, -[Zerolog][zerolog], [Zap][zap], and [Apex][apex]. - -[zerolog]: https://github.com/rs/zerolog -[zap]: https://github.com/uber-go/zap -[apex]: https://github.com/apex/log - -**Seeing weird case-sensitive problems?** It's in the past been possible to -import Logrus as both upper- and lower-case. Due to the Go package environment, -this caused issues in the community and we needed a standard. Some environments -experienced problems with the upper-case variant, so the lower-case was decided. -Everything using `logrus` will need to use the lower-case: -`github.com/sirupsen/logrus`. Any package that isn't, should be changed. - -To fix Glide, see [these -comments](https://github.com/sirupsen/logrus/issues/553#issuecomment-306591437). -For an in-depth explanation of the casing issue, see [this -comment](https://github.com/sirupsen/logrus/issues/570#issuecomment-313933276). - -Nicely color-coded in development (when a TTY is attached, otherwise just -plain text): - -![Colored](http://i.imgur.com/PY7qMwd.png) - -With `log.SetFormatter(&log.JSONFormatter{})`, for easy parsing by logstash -or Splunk: - -```text -{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the -ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"} - -{"level":"warning","msg":"The group's number increased tremendously!", -"number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"} - -{"animal":"walrus","level":"info","msg":"A giant walrus appears!", -"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"} - -{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.", -"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"} - -{"level":"fatal","msg":"The ice breaks!","number":100,"omg":true, -"time":"2014-03-10 19:57:38.562543128 -0400 EDT"} -``` - -With the default `log.SetFormatter(&log.TextFormatter{})` when a TTY is not -attached, the output is compatible with the -[logfmt](http://godoc.org/github.com/kr/logfmt) format: - -```text -time="2015-03-26T01:27:38-04:00" level=debug msg="Started observing beach" animal=walrus number=8 -time="2015-03-26T01:27:38-04:00" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10 -time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased tremendously!" number=122 omg=true -time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4 -time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009 -time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true -``` -To ensure this behaviour even if a TTY is attached, set your formatter as follows: - -```go - log.SetFormatter(&log.TextFormatter{ - DisableColors: true, - FullTimestamp: true, - }) -``` - -#### Logging Method Name - -If you wish to add the calling method as a field, instruct the logger via: -```go -log.SetReportCaller(true) -``` -This adds the caller as 'method' like so: - -```json -{"animal":"penguin","level":"fatal","method":"github.com/sirupsen/arcticcreatures.migrate","msg":"a penguin swims by", -"time":"2014-03-10 19:57:38.562543129 -0400 EDT"} -``` - -```text -time="2015-03-26T01:27:38-04:00" level=fatal method=github.com/sirupsen/arcticcreatures.migrate msg="a penguin swims by" animal=penguin -``` -Note that this does add measurable overhead - the cost will depend on the version of Go, but is -between 20 and 40% in recent tests with 1.6 and 1.7. You can validate this in your -environment via benchmarks: -``` -go test -bench=.*CallerTracing -``` - - -#### Case-sensitivity - -The organization's name was changed to lower-case--and this will not be changed -back. If you are getting import conflicts due to case sensitivity, please use -the lower-case import: `github.com/sirupsen/logrus`. - -#### Example - -The simplest way to use Logrus is simply the package-level exported logger: - -```go -package main - -import ( - log "github.com/sirupsen/logrus" -) - -func main() { - log.WithFields(log.Fields{ - "animal": "walrus", - }).Info("A walrus appears") -} -``` - -Note that it's completely api-compatible with the stdlib logger, so you can -replace your `log` imports everywhere with `log "github.com/sirupsen/logrus"` -and you'll now have the flexibility of Logrus. You can customize it all you -want: - -```go -package main - -import ( - "os" - log "github.com/sirupsen/logrus" -) - -func init() { - // Log as JSON instead of the default ASCII formatter. - log.SetFormatter(&log.JSONFormatter{}) - - // Output to stdout instead of the default stderr - // Can be any io.Writer, see below for File example - log.SetOutput(os.Stdout) - - // Only log the warning severity or above. - log.SetLevel(log.WarnLevel) -} - -func main() { - log.WithFields(log.Fields{ - "animal": "walrus", - "size": 10, - }).Info("A group of walrus emerges from the ocean") - - log.WithFields(log.Fields{ - "omg": true, - "number": 122, - }).Warn("The group's number increased tremendously!") - - log.WithFields(log.Fields{ - "omg": true, - "number": 100, - }).Fatal("The ice breaks!") - - // A common pattern is to re-use fields between logging statements by re-using - // the logrus.Entry returned from WithFields() - contextLogger := log.WithFields(log.Fields{ - "common": "this is a common field", - "other": "I also should be logged always", - }) - - contextLogger.Info("I'll be logged with common and other field") - contextLogger.Info("Me too") -} -``` - -For more advanced usage such as logging to multiple locations from the same -application, you can also create an instance of the `logrus` Logger: - -```go -package main - -import ( - "os" - "github.com/sirupsen/logrus" -) - -// Create a new instance of the logger. You can have any number of instances. -var log = logrus.New() - -func main() { - // The API for setting attributes is a little different than the package level - // exported logger. See Godoc. - log.Out = os.Stdout - - // You could set this to any `io.Writer` such as a file - // file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) - // if err == nil { - // log.Out = file - // } else { - // log.Info("Failed to log to file, using default stderr") - // } - - log.WithFields(logrus.Fields{ - "animal": "walrus", - "size": 10, - }).Info("A group of walrus emerges from the ocean") -} -``` - -#### Fields - -Logrus encourages careful, structured logging through logging fields instead of -long, unparseable error messages. For example, instead of: `log.Fatalf("Failed -to send event %s to topic %s with key %d")`, you should log the much more -discoverable: - -```go -log.WithFields(log.Fields{ - "event": event, - "topic": topic, - "key": key, -}).Fatal("Failed to send event") -``` - -We've found this API forces you to think about logging in a way that produces -much more useful logging messages. We've been in countless situations where just -a single added field to a log statement that was already there would've saved us -hours. The `WithFields` call is optional. - -In general, with Logrus using any of the `printf`-family functions should be -seen as a hint you should add a field, however, you can still use the -`printf`-family functions with Logrus. - -#### Default Fields - -Often it's helpful to have fields _always_ attached to log statements in an -application or parts of one. For example, you may want to always log the -`request_id` and `user_ip` in the context of a request. Instead of writing -`log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})` on -every line, you can create a `logrus.Entry` to pass around instead: - -```go -requestLogger := log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip}) -requestLogger.Info("something happened on that request") # will log request_id and user_ip -requestLogger.Warn("something not great happened") -``` - -#### Hooks - -You can add hooks for logging levels. For example to send errors to an exception -tracking service on `Error`, `Fatal` and `Panic`, info to StatsD or log to -multiple places simultaneously, e.g. syslog. - -Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in -`init`: - -```go -import ( - log "github.com/sirupsen/logrus" - "gopkg.in/gemnasium/logrus-airbrake-hook.v2" // the package is named "airbrake" - logrus_syslog "github.com/sirupsen/logrus/hooks/syslog" - "log/syslog" -) - -func init() { - - // Use the Airbrake hook to report errors that have Error severity or above to - // an exception tracker. You can create custom hooks, see the Hooks section. - log.AddHook(airbrake.NewHook(123, "xyz", "production")) - - hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") - if err != nil { - log.Error("Unable to connect to local syslog daemon") - } else { - log.AddHook(hook) - } -} -``` -Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). For the detail, please check the [syslog hook README](hooks/syslog/README.md). - -A list of currently known service hooks can be found in this wiki [page](https://github.com/sirupsen/logrus/wiki/Hooks) - - -#### Level logging - -Logrus has seven logging levels: Trace, Debug, Info, Warning, Error, Fatal and Panic. - -```go -log.Trace("Something very low level.") -log.Debug("Useful debugging information.") -log.Info("Something noteworthy happened!") -log.Warn("You should probably take a look at this.") -log.Error("Something failed but I'm not quitting.") -// Calls os.Exit(1) after logging -log.Fatal("Bye.") -// Calls panic() after logging -log.Panic("I'm bailing.") -``` - -You can set the logging level on a `Logger`, then it will only log entries with -that severity or anything above it: - -```go -// Will log anything that is info or above (warn, error, fatal, panic). Default. -log.SetLevel(log.InfoLevel) -``` - -It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose -environment if your application has that. - -Note: If you want different log levels for global (`log.SetLevel(...)`) and syslog logging, please check the [syslog hook README](hooks/syslog/README.md#different-log-levels-for-local-and-remote-logging). - -#### Entries - -Besides the fields added with `WithField` or `WithFields` some fields are -automatically added to all logging events: - -1. `time`. The timestamp when the entry was created. -2. `msg`. The logging message passed to `{Info,Warn,Error,Fatal,Panic}` after - the `AddFields` call. E.g. `Failed to send event.` -3. `level`. The logging level. E.g. `info`. - -#### Environments - -Logrus has no notion of environment. - -If you wish for hooks and formatters to only be used in specific environments, -you should handle that yourself. For example, if your application has a global -variable `Environment`, which is a string representation of the environment you -could do: - -```go -import ( - log "github.com/sirupsen/logrus" -) - -func init() { - // do something here to set environment depending on an environment variable - // or command-line flag - if Environment == "production" { - log.SetFormatter(&log.JSONFormatter{}) - } else { - // The TextFormatter is default, you don't actually have to do this. - log.SetFormatter(&log.TextFormatter{}) - } -} -``` - -This configuration is how `logrus` was intended to be used, but JSON in -production is mostly only useful if you do log aggregation with tools like -Splunk or Logstash. - -#### Formatters - -The built-in logging formatters are: - -* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise - without colors. - * *Note:* to force colored output when there is no TTY, set the `ForceColors` - field to `true`. To force no colored output even if there is a TTY set the - `DisableColors` field to `true`. For Windows, see - [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable). - * When colors are enabled, levels are truncated to 4 characters by default. To disable - truncation set the `DisableLevelTruncation` field to `true`. - * When outputting to a TTY, it's often helpful to visually scan down a column where all the levels are the same width. Setting the `PadLevelText` field to `true` enables this behavior, by adding padding to the level text. - * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#TextFormatter). -* `logrus.JSONFormatter`. Logs fields as JSON. - * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#JSONFormatter). - -Third party logging formatters: - -* [`FluentdFormatter`](https://github.com/joonix/log). Formats entries that can be parsed by Kubernetes and Google Container Engine. -* [`GELF`](https://github.com/fabienm/go-logrus-formatters). Formats entries so they comply to Graylog's [GELF 1.1 specification](http://docs.graylog.org/en/2.4/pages/gelf.html). -* [`logstash`](https://github.com/bshuster-repo/logrus-logstash-hook). Logs fields as [Logstash](http://logstash.net) Events. -* [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout. -* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the Power of Zalgo. -* [`nested-logrus-formatter`](https://github.com/antonfisher/nested-logrus-formatter). Converts logrus fields to a nested structure. -* [`powerful-logrus-formatter`](https://github.com/zput/zxcTool). get fileName, log's line number and the latest function's name when print log; Sava log to files. -* [`caption-json-formatter`](https://github.com/nolleh/caption_json_formatter). logrus's message json formatter with human-readable caption added. - -You can define your formatter by implementing the `Formatter` interface, -requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a -`Fields` type (`map[string]interface{}`) with all your fields as well as the -default ones (see Entries section above): - -```go -type MyJSONFormatter struct { -} - -log.SetFormatter(new(MyJSONFormatter)) - -func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) { - // Note this doesn't include Time, Level and Message which are available on - // the Entry. Consult `godoc` on information about those fields or read the - // source of the official loggers. - serialized, err := json.Marshal(entry.Data) - if err != nil { - return nil, fmt.Errorf("Failed to marshal fields to JSON, %w", err) - } - return append(serialized, '\n'), nil -} -``` - -#### Logger as an `io.Writer` - -Logrus can be transformed into an `io.Writer`. That writer is the end of an `io.Pipe` and it is your responsibility to close it. - -```go -w := logger.Writer() -defer w.Close() - -srv := http.Server{ - // create a stdlib log.Logger that writes to - // logrus.Logger. - ErrorLog: log.New(w, "", 0), -} -``` - -Each line written to that writer will be printed the usual way, using formatters -and hooks. The level for those entries is `info`. - -This means that we can override the standard library logger easily: - -```go -logger := logrus.New() -logger.Formatter = &logrus.JSONFormatter{} - -// Use logrus for standard log output -// Note that `log` here references stdlib's log -// Not logrus imported under the name `log`. -log.SetOutput(logger.Writer()) -``` - -#### Rotation - -Log rotation is not provided with Logrus. Log rotation should be done by an -external program (like `logrotate(8)`) that can compress and delete old log -entries. It should not be a feature of the application-level logger. - -#### Tools - -| Tool | Description | -| ---- | ----------- | -|[Logrus Mate](https://github.com/gogap/logrus_mate)|Logrus mate is a tool for Logrus to manage loggers, you can initial logger's level, hook and formatter by config file, the logger will be generated with different configs in different environments.| -|[Logrus Viper Helper](https://github.com/heirko/go-contrib/tree/master/logrusHelper)|An Helper around Logrus to wrap with spf13/Viper to load configuration with fangs! And to simplify Logrus configuration use some behavior of [Logrus Mate](https://github.com/gogap/logrus_mate). [sample](https://github.com/heirko/iris-contrib/blob/master/middleware/logrus-logger/example) | - -#### Testing - -Logrus has a built in facility for asserting the presence of log messages. This is implemented through the `test` hook and provides: - -* decorators for existing logger (`test.NewLocal` and `test.NewGlobal`) which basically just adds the `test` hook -* a test logger (`test.NewNullLogger`) that just records log messages (and does not output any): - -```go -import( - "github.com/sirupsen/logrus" - "github.com/sirupsen/logrus/hooks/test" - "github.com/stretchr/testify/assert" - "testing" -) - -func TestSomething(t*testing.T){ - logger, hook := test.NewNullLogger() - logger.Error("Helloerror") - - assert.Equal(t, 1, len(hook.Entries)) - assert.Equal(t, logrus.ErrorLevel, hook.LastEntry().Level) - assert.Equal(t, "Helloerror", hook.LastEntry().Message) - - hook.Reset() - assert.Nil(t, hook.LastEntry()) -} -``` - -#### Fatal handlers - -Logrus can register one or more functions that will be called when any `fatal` -level message is logged. The registered handlers will be executed before -logrus performs an `os.Exit(1)`. This behavior may be helpful if callers need -to gracefully shutdown. Unlike a `panic("Something went wrong...")` call which can be intercepted with a deferred `recover` a call to `os.Exit(1)` can not be intercepted. - -``` -... -handler := func() { - // gracefully shutdown something... -} -logrus.RegisterExitHandler(handler) -... -``` - -#### Thread safety - -By default, Logger is protected by a mutex for concurrent writes. The mutex is held when calling hooks and writing logs. -If you are sure such locking is not needed, you can call logger.SetNoLock() to disable the locking. - -Situation when locking is not needed includes: - -* You have no hooks registered, or hooks calling is already thread-safe. - -* Writing to logger.Out is already thread-safe, for example: - - 1) logger.Out is protected by locks. - - 2) logger.Out is an os.File handler opened with `O_APPEND` flag, and every write is smaller than 4k. (This allows multi-thread/multi-process writing) - - (Refer to http://www.notthewizard.com/2014/06/17/are-files-appends-really-atomic/) diff --git a/vendor/github.com/sirupsen/logrus/alt_exit.go b/vendor/github.com/sirupsen/logrus/alt_exit.go deleted file mode 100644 index 8fd189e..0000000 --- a/vendor/github.com/sirupsen/logrus/alt_exit.go +++ /dev/null @@ -1,76 +0,0 @@ -package logrus - -// The following code was sourced and modified from the -// https://github.com/tebeka/atexit package governed by the following license: -// -// Copyright (c) 2012 Miki Tebeka . -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -import ( - "fmt" - "os" -) - -var handlers = []func(){} - -func runHandler(handler func()) { - defer func() { - if err := recover(); err != nil { - fmt.Fprintln(os.Stderr, "Error: Logrus exit handler error:", err) - } - }() - - handler() -} - -func runHandlers() { - for _, handler := range handlers { - runHandler(handler) - } -} - -// Exit runs all the Logrus atexit handlers and then terminates the program using os.Exit(code) -func Exit(code int) { - runHandlers() - os.Exit(code) -} - -// RegisterExitHandler appends a Logrus Exit handler to the list of handlers, -// call logrus.Exit to invoke all handlers. The handlers will also be invoked when -// any Fatal log entry is made. -// -// This method is useful when a caller wishes to use logrus to log a fatal -// message but also needs to gracefully shutdown. An example usecase could be -// closing database connections, or sending a alert that the application is -// closing. -func RegisterExitHandler(handler func()) { - handlers = append(handlers, handler) -} - -// DeferExitHandler prepends a Logrus Exit handler to the list of handlers, -// call logrus.Exit to invoke all handlers. The handlers will also be invoked when -// any Fatal log entry is made. -// -// This method is useful when a caller wishes to use logrus to log a fatal -// message but also needs to gracefully shutdown. An example usecase could be -// closing database connections, or sending a alert that the application is -// closing. -func DeferExitHandler(handler func()) { - handlers = append([]func(){handler}, handlers...) -} diff --git a/vendor/github.com/sirupsen/logrus/appveyor.yml b/vendor/github.com/sirupsen/logrus/appveyor.yml deleted file mode 100644 index df9d65c..0000000 --- a/vendor/github.com/sirupsen/logrus/appveyor.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: "{build}" -platform: x64 -clone_folder: c:\gopath\src\github.com\sirupsen\logrus -environment: - GOPATH: c:\gopath -branches: - only: - - master -install: - - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% - - go version -build_script: - - go get -t - - go test diff --git a/vendor/github.com/sirupsen/logrus/buffer_pool.go b/vendor/github.com/sirupsen/logrus/buffer_pool.go deleted file mode 100644 index c7787f7..0000000 --- a/vendor/github.com/sirupsen/logrus/buffer_pool.go +++ /dev/null @@ -1,43 +0,0 @@ -package logrus - -import ( - "bytes" - "sync" -) - -var ( - bufferPool BufferPool -) - -type BufferPool interface { - Put(*bytes.Buffer) - Get() *bytes.Buffer -} - -type defaultPool struct { - pool *sync.Pool -} - -func (p *defaultPool) Put(buf *bytes.Buffer) { - p.pool.Put(buf) -} - -func (p *defaultPool) Get() *bytes.Buffer { - return p.pool.Get().(*bytes.Buffer) -} - -// SetBufferPool allows to replace the default logrus buffer pool -// to better meets the specific needs of an application. -func SetBufferPool(bp BufferPool) { - bufferPool = bp -} - -func init() { - SetBufferPool(&defaultPool{ - pool: &sync.Pool{ - New: func() interface{} { - return new(bytes.Buffer) - }, - }, - }) -} diff --git a/vendor/github.com/sirupsen/logrus/doc.go b/vendor/github.com/sirupsen/logrus/doc.go deleted file mode 100644 index da67aba..0000000 --- a/vendor/github.com/sirupsen/logrus/doc.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Package logrus is a structured logger for Go, completely API compatible with the standard library logger. - - -The simplest way to use Logrus is simply the package-level exported logger: - - package main - - import ( - log "github.com/sirupsen/logrus" - ) - - func main() { - log.WithFields(log.Fields{ - "animal": "walrus", - "number": 1, - "size": 10, - }).Info("A walrus appears") - } - -Output: - time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 - -For a full guide visit https://github.com/sirupsen/logrus -*/ -package logrus diff --git a/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go deleted file mode 100644 index 71cdbbc..0000000 --- a/vendor/github.com/sirupsen/logrus/entry.go +++ /dev/null @@ -1,442 +0,0 @@ -package logrus - -import ( - "bytes" - "context" - "fmt" - "os" - "reflect" - "runtime" - "strings" - "sync" - "time" -) - -var ( - - // qualified package name, cached at first use - logrusPackage string - - // Positions in the call stack when tracing to report the calling method - minimumCallerDepth int - - // Used for caller information initialisation - callerInitOnce sync.Once -) - -const ( - maximumCallerDepth int = 25 - knownLogrusFrames int = 4 -) - -func init() { - // start at the bottom of the stack before the package-name cache is primed - minimumCallerDepth = 1 -} - -// Defines the key when adding errors using WithError. -var ErrorKey = "error" - -// An entry is the final or intermediate Logrus logging entry. It contains all -// the fields passed with WithField{,s}. It's finally logged when Trace, Debug, -// Info, Warn, Error, Fatal or Panic is called on it. These objects can be -// reused and passed around as much as you wish to avoid field duplication. -type Entry struct { - Logger *Logger - - // Contains all the fields set by the user. - Data Fields - - // Time at which the log entry was created - Time time.Time - - // Level the log entry was logged at: Trace, Debug, Info, Warn, Error, Fatal or Panic - // This field will be set on entry firing and the value will be equal to the one in Logger struct field. - Level Level - - // Calling method, with package name - Caller *runtime.Frame - - // Message passed to Trace, Debug, Info, Warn, Error, Fatal or Panic - Message string - - // When formatter is called in entry.log(), a Buffer may be set to entry - Buffer *bytes.Buffer - - // Contains the context set by the user. Useful for hook processing etc. - Context context.Context - - // err may contain a field formatting error - err string -} - -func NewEntry(logger *Logger) *Entry { - return &Entry{ - Logger: logger, - // Default is three fields, plus one optional. Give a little extra room. - Data: make(Fields, 6), - } -} - -func (entry *Entry) Dup() *Entry { - data := make(Fields, len(entry.Data)) - for k, v := range entry.Data { - data[k] = v - } - return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time, Context: entry.Context, err: entry.err} -} - -// Returns the bytes representation of this entry from the formatter. -func (entry *Entry) Bytes() ([]byte, error) { - return entry.Logger.Formatter.Format(entry) -} - -// Returns the string representation from the reader and ultimately the -// formatter. -func (entry *Entry) String() (string, error) { - serialized, err := entry.Bytes() - if err != nil { - return "", err - } - str := string(serialized) - return str, nil -} - -// Add an error as single field (using the key defined in ErrorKey) to the Entry. -func (entry *Entry) WithError(err error) *Entry { - return entry.WithField(ErrorKey, err) -} - -// Add a context to the Entry. -func (entry *Entry) WithContext(ctx context.Context) *Entry { - dataCopy := make(Fields, len(entry.Data)) - for k, v := range entry.Data { - dataCopy[k] = v - } - return &Entry{Logger: entry.Logger, Data: dataCopy, Time: entry.Time, err: entry.err, Context: ctx} -} - -// Add a single field to the Entry. -func (entry *Entry) WithField(key string, value interface{}) *Entry { - return entry.WithFields(Fields{key: value}) -} - -// Add a map of fields to the Entry. -func (entry *Entry) WithFields(fields Fields) *Entry { - data := make(Fields, len(entry.Data)+len(fields)) - for k, v := range entry.Data { - data[k] = v - } - fieldErr := entry.err - for k, v := range fields { - isErrField := false - if t := reflect.TypeOf(v); t != nil { - switch { - case t.Kind() == reflect.Func, t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Func: - isErrField = true - } - } - if isErrField { - tmp := fmt.Sprintf("can not add field %q", k) - if fieldErr != "" { - fieldErr = entry.err + ", " + tmp - } else { - fieldErr = tmp - } - } else { - data[k] = v - } - } - return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time, err: fieldErr, Context: entry.Context} -} - -// Overrides the time of the Entry. -func (entry *Entry) WithTime(t time.Time) *Entry { - dataCopy := make(Fields, len(entry.Data)) - for k, v := range entry.Data { - dataCopy[k] = v - } - return &Entry{Logger: entry.Logger, Data: dataCopy, Time: t, err: entry.err, Context: entry.Context} -} - -// getPackageName reduces a fully qualified function name to the package name -// There really ought to be to be a better way... -func getPackageName(f string) string { - for { - lastPeriod := strings.LastIndex(f, ".") - lastSlash := strings.LastIndex(f, "/") - if lastPeriod > lastSlash { - f = f[:lastPeriod] - } else { - break - } - } - - return f -} - -// getCaller retrieves the name of the first non-logrus calling function -func getCaller() *runtime.Frame { - // cache this package's fully-qualified name - callerInitOnce.Do(func() { - pcs := make([]uintptr, maximumCallerDepth) - _ = runtime.Callers(0, pcs) - - // dynamic get the package name and the minimum caller depth - for i := 0; i < maximumCallerDepth; i++ { - funcName := runtime.FuncForPC(pcs[i]).Name() - if strings.Contains(funcName, "getCaller") { - logrusPackage = getPackageName(funcName) - break - } - } - - minimumCallerDepth = knownLogrusFrames - }) - - // Restrict the lookback frames to avoid runaway lookups - pcs := make([]uintptr, maximumCallerDepth) - depth := runtime.Callers(minimumCallerDepth, pcs) - frames := runtime.CallersFrames(pcs[:depth]) - - for f, again := frames.Next(); again; f, again = frames.Next() { - pkg := getPackageName(f.Function) - - // If the caller isn't part of this package, we're done - if pkg != logrusPackage { - return &f //nolint:scopelint - } - } - - // if we got here, we failed to find the caller's context - return nil -} - -func (entry Entry) HasCaller() (has bool) { - return entry.Logger != nil && - entry.Logger.ReportCaller && - entry.Caller != nil -} - -func (entry *Entry) log(level Level, msg string) { - var buffer *bytes.Buffer - - newEntry := entry.Dup() - - if newEntry.Time.IsZero() { - newEntry.Time = time.Now() - } - - newEntry.Level = level - newEntry.Message = msg - - newEntry.Logger.mu.Lock() - reportCaller := newEntry.Logger.ReportCaller - bufPool := newEntry.getBufferPool() - newEntry.Logger.mu.Unlock() - - if reportCaller { - newEntry.Caller = getCaller() - } - - newEntry.fireHooks() - buffer = bufPool.Get() - defer func() { - newEntry.Buffer = nil - buffer.Reset() - bufPool.Put(buffer) - }() - buffer.Reset() - newEntry.Buffer = buffer - - newEntry.write() - - newEntry.Buffer = nil - - // To avoid Entry#log() returning a value that only would make sense for - // panic() to use in Entry#Panic(), we avoid the allocation by checking - // directly here. - if level <= PanicLevel { - panic(newEntry) - } -} - -func (entry *Entry) getBufferPool() (pool BufferPool) { - if entry.Logger.BufferPool != nil { - return entry.Logger.BufferPool - } - return bufferPool -} - -func (entry *Entry) fireHooks() { - var tmpHooks LevelHooks - entry.Logger.mu.Lock() - tmpHooks = make(LevelHooks, len(entry.Logger.Hooks)) - for k, v := range entry.Logger.Hooks { - tmpHooks[k] = v - } - entry.Logger.mu.Unlock() - - err := tmpHooks.Fire(entry.Level, entry) - if err != nil { - fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err) - } -} - -func (entry *Entry) write() { - entry.Logger.mu.Lock() - defer entry.Logger.mu.Unlock() - serialized, err := entry.Logger.Formatter.Format(entry) - if err != nil { - fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err) - return - } - if _, err := entry.Logger.Out.Write(serialized); err != nil { - fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err) - } -} - -// Log will log a message at the level given as parameter. -// Warning: using Log at Panic or Fatal level will not respectively Panic nor Exit. -// For this behaviour Entry.Panic or Entry.Fatal should be used instead. -func (entry *Entry) Log(level Level, args ...interface{}) { - if entry.Logger.IsLevelEnabled(level) { - entry.log(level, fmt.Sprint(args...)) - } -} - -func (entry *Entry) Trace(args ...interface{}) { - entry.Log(TraceLevel, args...) -} - -func (entry *Entry) Debug(args ...interface{}) { - entry.Log(DebugLevel, args...) -} - -func (entry *Entry) Print(args ...interface{}) { - entry.Info(args...) -} - -func (entry *Entry) Info(args ...interface{}) { - entry.Log(InfoLevel, args...) -} - -func (entry *Entry) Warn(args ...interface{}) { - entry.Log(WarnLevel, args...) -} - -func (entry *Entry) Warning(args ...interface{}) { - entry.Warn(args...) -} - -func (entry *Entry) Error(args ...interface{}) { - entry.Log(ErrorLevel, args...) -} - -func (entry *Entry) Fatal(args ...interface{}) { - entry.Log(FatalLevel, args...) - entry.Logger.Exit(1) -} - -func (entry *Entry) Panic(args ...interface{}) { - entry.Log(PanicLevel, args...) -} - -// Entry Printf family functions - -func (entry *Entry) Logf(level Level, format string, args ...interface{}) { - if entry.Logger.IsLevelEnabled(level) { - entry.Log(level, fmt.Sprintf(format, args...)) - } -} - -func (entry *Entry) Tracef(format string, args ...interface{}) { - entry.Logf(TraceLevel, format, args...) -} - -func (entry *Entry) Debugf(format string, args ...interface{}) { - entry.Logf(DebugLevel, format, args...) -} - -func (entry *Entry) Infof(format string, args ...interface{}) { - entry.Logf(InfoLevel, format, args...) -} - -func (entry *Entry) Printf(format string, args ...interface{}) { - entry.Infof(format, args...) -} - -func (entry *Entry) Warnf(format string, args ...interface{}) { - entry.Logf(WarnLevel, format, args...) -} - -func (entry *Entry) Warningf(format string, args ...interface{}) { - entry.Warnf(format, args...) -} - -func (entry *Entry) Errorf(format string, args ...interface{}) { - entry.Logf(ErrorLevel, format, args...) -} - -func (entry *Entry) Fatalf(format string, args ...interface{}) { - entry.Logf(FatalLevel, format, args...) - entry.Logger.Exit(1) -} - -func (entry *Entry) Panicf(format string, args ...interface{}) { - entry.Logf(PanicLevel, format, args...) -} - -// Entry Println family functions - -func (entry *Entry) Logln(level Level, args ...interface{}) { - if entry.Logger.IsLevelEnabled(level) { - entry.Log(level, entry.sprintlnn(args...)) - } -} - -func (entry *Entry) Traceln(args ...interface{}) { - entry.Logln(TraceLevel, args...) -} - -func (entry *Entry) Debugln(args ...interface{}) { - entry.Logln(DebugLevel, args...) -} - -func (entry *Entry) Infoln(args ...interface{}) { - entry.Logln(InfoLevel, args...) -} - -func (entry *Entry) Println(args ...interface{}) { - entry.Infoln(args...) -} - -func (entry *Entry) Warnln(args ...interface{}) { - entry.Logln(WarnLevel, args...) -} - -func (entry *Entry) Warningln(args ...interface{}) { - entry.Warnln(args...) -} - -func (entry *Entry) Errorln(args ...interface{}) { - entry.Logln(ErrorLevel, args...) -} - -func (entry *Entry) Fatalln(args ...interface{}) { - entry.Logln(FatalLevel, args...) - entry.Logger.Exit(1) -} - -func (entry *Entry) Panicln(args ...interface{}) { - entry.Logln(PanicLevel, args...) -} - -// Sprintlnn => Sprint no newline. This is to get the behavior of how -// fmt.Sprintln where spaces are always added between operands, regardless of -// their type. Instead of vendoring the Sprintln implementation to spare a -// string allocation, we do the simplest thing. -func (entry *Entry) sprintlnn(args ...interface{}) string { - msg := fmt.Sprintln(args...) - return msg[:len(msg)-1] -} diff --git a/vendor/github.com/sirupsen/logrus/exported.go b/vendor/github.com/sirupsen/logrus/exported.go deleted file mode 100644 index 017c30c..0000000 --- a/vendor/github.com/sirupsen/logrus/exported.go +++ /dev/null @@ -1,270 +0,0 @@ -package logrus - -import ( - "context" - "io" - "time" -) - -var ( - // std is the name of the standard logger in stdlib `log` - std = New() -) - -func StandardLogger() *Logger { - return std -} - -// SetOutput sets the standard logger output. -func SetOutput(out io.Writer) { - std.SetOutput(out) -} - -// SetFormatter sets the standard logger formatter. -func SetFormatter(formatter Formatter) { - std.SetFormatter(formatter) -} - -// SetReportCaller sets whether the standard logger will include the calling -// method as a field. -func SetReportCaller(include bool) { - std.SetReportCaller(include) -} - -// SetLevel sets the standard logger level. -func SetLevel(level Level) { - std.SetLevel(level) -} - -// GetLevel returns the standard logger level. -func GetLevel() Level { - return std.GetLevel() -} - -// IsLevelEnabled checks if the log level of the standard logger is greater than the level param -func IsLevelEnabled(level Level) bool { - return std.IsLevelEnabled(level) -} - -// AddHook adds a hook to the standard logger hooks. -func AddHook(hook Hook) { - std.AddHook(hook) -} - -// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key. -func WithError(err error) *Entry { - return std.WithField(ErrorKey, err) -} - -// WithContext creates an entry from the standard logger and adds a context to it. -func WithContext(ctx context.Context) *Entry { - return std.WithContext(ctx) -} - -// WithField creates an entry from the standard logger and adds a field to -// it. If you want multiple fields, use `WithFields`. -// -// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal -// or Panic on the Entry it returns. -func WithField(key string, value interface{}) *Entry { - return std.WithField(key, value) -} - -// WithFields creates an entry from the standard logger and adds multiple -// fields to it. This is simply a helper for `WithField`, invoking it -// once for each field. -// -// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal -// or Panic on the Entry it returns. -func WithFields(fields Fields) *Entry { - return std.WithFields(fields) -} - -// WithTime creates an entry from the standard logger and overrides the time of -// logs generated with it. -// -// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal -// or Panic on the Entry it returns. -func WithTime(t time.Time) *Entry { - return std.WithTime(t) -} - -// Trace logs a message at level Trace on the standard logger. -func Trace(args ...interface{}) { - std.Trace(args...) -} - -// Debug logs a message at level Debug on the standard logger. -func Debug(args ...interface{}) { - std.Debug(args...) -} - -// Print logs a message at level Info on the standard logger. -func Print(args ...interface{}) { - std.Print(args...) -} - -// Info logs a message at level Info on the standard logger. -func Info(args ...interface{}) { - std.Info(args...) -} - -// Warn logs a message at level Warn on the standard logger. -func Warn(args ...interface{}) { - std.Warn(args...) -} - -// Warning logs a message at level Warn on the standard logger. -func Warning(args ...interface{}) { - std.Warning(args...) -} - -// Error logs a message at level Error on the standard logger. -func Error(args ...interface{}) { - std.Error(args...) -} - -// Panic logs a message at level Panic on the standard logger. -func Panic(args ...interface{}) { - std.Panic(args...) -} - -// Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1. -func Fatal(args ...interface{}) { - std.Fatal(args...) -} - -// TraceFn logs a message from a func at level Trace on the standard logger. -func TraceFn(fn LogFunction) { - std.TraceFn(fn) -} - -// DebugFn logs a message from a func at level Debug on the standard logger. -func DebugFn(fn LogFunction) { - std.DebugFn(fn) -} - -// PrintFn logs a message from a func at level Info on the standard logger. -func PrintFn(fn LogFunction) { - std.PrintFn(fn) -} - -// InfoFn logs a message from a func at level Info on the standard logger. -func InfoFn(fn LogFunction) { - std.InfoFn(fn) -} - -// WarnFn logs a message from a func at level Warn on the standard logger. -func WarnFn(fn LogFunction) { - std.WarnFn(fn) -} - -// WarningFn logs a message from a func at level Warn on the standard logger. -func WarningFn(fn LogFunction) { - std.WarningFn(fn) -} - -// ErrorFn logs a message from a func at level Error on the standard logger. -func ErrorFn(fn LogFunction) { - std.ErrorFn(fn) -} - -// PanicFn logs a message from a func at level Panic on the standard logger. -func PanicFn(fn LogFunction) { - std.PanicFn(fn) -} - -// FatalFn logs a message from a func at level Fatal on the standard logger then the process will exit with status set to 1. -func FatalFn(fn LogFunction) { - std.FatalFn(fn) -} - -// Tracef logs a message at level Trace on the standard logger. -func Tracef(format string, args ...interface{}) { - std.Tracef(format, args...) -} - -// Debugf logs a message at level Debug on the standard logger. -func Debugf(format string, args ...interface{}) { - std.Debugf(format, args...) -} - -// Printf logs a message at level Info on the standard logger. -func Printf(format string, args ...interface{}) { - std.Printf(format, args...) -} - -// Infof logs a message at level Info on the standard logger. -func Infof(format string, args ...interface{}) { - std.Infof(format, args...) -} - -// Warnf logs a message at level Warn on the standard logger. -func Warnf(format string, args ...interface{}) { - std.Warnf(format, args...) -} - -// Warningf logs a message at level Warn on the standard logger. -func Warningf(format string, args ...interface{}) { - std.Warningf(format, args...) -} - -// Errorf logs a message at level Error on the standard logger. -func Errorf(format string, args ...interface{}) { - std.Errorf(format, args...) -} - -// Panicf logs a message at level Panic on the standard logger. -func Panicf(format string, args ...interface{}) { - std.Panicf(format, args...) -} - -// Fatalf logs a message at level Fatal on the standard logger then the process will exit with status set to 1. -func Fatalf(format string, args ...interface{}) { - std.Fatalf(format, args...) -} - -// Traceln logs a message at level Trace on the standard logger. -func Traceln(args ...interface{}) { - std.Traceln(args...) -} - -// Debugln logs a message at level Debug on the standard logger. -func Debugln(args ...interface{}) { - std.Debugln(args...) -} - -// Println logs a message at level Info on the standard logger. -func Println(args ...interface{}) { - std.Println(args...) -} - -// Infoln logs a message at level Info on the standard logger. -func Infoln(args ...interface{}) { - std.Infoln(args...) -} - -// Warnln logs a message at level Warn on the standard logger. -func Warnln(args ...interface{}) { - std.Warnln(args...) -} - -// Warningln logs a message at level Warn on the standard logger. -func Warningln(args ...interface{}) { - std.Warningln(args...) -} - -// Errorln logs a message at level Error on the standard logger. -func Errorln(args ...interface{}) { - std.Errorln(args...) -} - -// Panicln logs a message at level Panic on the standard logger. -func Panicln(args ...interface{}) { - std.Panicln(args...) -} - -// Fatalln logs a message at level Fatal on the standard logger then the process will exit with status set to 1. -func Fatalln(args ...interface{}) { - std.Fatalln(args...) -} diff --git a/vendor/github.com/sirupsen/logrus/formatter.go b/vendor/github.com/sirupsen/logrus/formatter.go deleted file mode 100644 index 4088837..0000000 --- a/vendor/github.com/sirupsen/logrus/formatter.go +++ /dev/null @@ -1,78 +0,0 @@ -package logrus - -import "time" - -// Default key names for the default fields -const ( - defaultTimestampFormat = time.RFC3339 - FieldKeyMsg = "msg" - FieldKeyLevel = "level" - FieldKeyTime = "time" - FieldKeyLogrusError = "logrus_error" - FieldKeyFunc = "func" - FieldKeyFile = "file" -) - -// The Formatter interface is used to implement a custom Formatter. It takes an -// `Entry`. It exposes all the fields, including the default ones: -// -// * `entry.Data["msg"]`. The message passed from Info, Warn, Error .. -// * `entry.Data["time"]`. The timestamp. -// * `entry.Data["level"]. The level the entry was logged at. -// -// Any additional fields added with `WithField` or `WithFields` are also in -// `entry.Data`. Format is expected to return an array of bytes which are then -// logged to `logger.Out`. -type Formatter interface { - Format(*Entry) ([]byte, error) -} - -// This is to not silently overwrite `time`, `msg`, `func` and `level` fields when -// dumping it. If this code wasn't there doing: -// -// logrus.WithField("level", 1).Info("hello") -// -// Would just silently drop the user provided level. Instead with this code -// it'll logged as: -// -// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."} -// -// It's not exported because it's still using Data in an opinionated way. It's to -// avoid code duplication between the two default formatters. -func prefixFieldClashes(data Fields, fieldMap FieldMap, reportCaller bool) { - timeKey := fieldMap.resolve(FieldKeyTime) - if t, ok := data[timeKey]; ok { - data["fields."+timeKey] = t - delete(data, timeKey) - } - - msgKey := fieldMap.resolve(FieldKeyMsg) - if m, ok := data[msgKey]; ok { - data["fields."+msgKey] = m - delete(data, msgKey) - } - - levelKey := fieldMap.resolve(FieldKeyLevel) - if l, ok := data[levelKey]; ok { - data["fields."+levelKey] = l - delete(data, levelKey) - } - - logrusErrKey := fieldMap.resolve(FieldKeyLogrusError) - if l, ok := data[logrusErrKey]; ok { - data["fields."+logrusErrKey] = l - delete(data, logrusErrKey) - } - - // If reportCaller is not set, 'func' will not conflict. - if reportCaller { - funcKey := fieldMap.resolve(FieldKeyFunc) - if l, ok := data[funcKey]; ok { - data["fields."+funcKey] = l - } - fileKey := fieldMap.resolve(FieldKeyFile) - if l, ok := data[fileKey]; ok { - data["fields."+fileKey] = l - } - } -} diff --git a/vendor/github.com/sirupsen/logrus/hooks.go b/vendor/github.com/sirupsen/logrus/hooks.go deleted file mode 100644 index 3f151cd..0000000 --- a/vendor/github.com/sirupsen/logrus/hooks.go +++ /dev/null @@ -1,34 +0,0 @@ -package logrus - -// A hook to be fired when logging on the logging levels returned from -// `Levels()` on your implementation of the interface. Note that this is not -// fired in a goroutine or a channel with workers, you should handle such -// functionality yourself if your call is non-blocking and you don't wish for -// the logging calls for levels returned from `Levels()` to block. -type Hook interface { - Levels() []Level - Fire(*Entry) error -} - -// Internal type for storing the hooks on a logger instance. -type LevelHooks map[Level][]Hook - -// Add a hook to an instance of logger. This is called with -// `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface. -func (hooks LevelHooks) Add(hook Hook) { - for _, level := range hook.Levels() { - hooks[level] = append(hooks[level], hook) - } -} - -// Fire all the hooks for the passed level. Used by `entry.log` to fire -// appropriate hooks for a log entry. -func (hooks LevelHooks) Fire(level Level, entry *Entry) error { - for _, hook := range hooks[level] { - if err := hook.Fire(entry); err != nil { - return err - } - } - - return nil -} diff --git a/vendor/github.com/sirupsen/logrus/json_formatter.go b/vendor/github.com/sirupsen/logrus/json_formatter.go deleted file mode 100644 index c96dc56..0000000 --- a/vendor/github.com/sirupsen/logrus/json_formatter.go +++ /dev/null @@ -1,128 +0,0 @@ -package logrus - -import ( - "bytes" - "encoding/json" - "fmt" - "runtime" -) - -type fieldKey string - -// FieldMap allows customization of the key names for default fields. -type FieldMap map[fieldKey]string - -func (f FieldMap) resolve(key fieldKey) string { - if k, ok := f[key]; ok { - return k - } - - return string(key) -} - -// JSONFormatter formats logs into parsable json -type JSONFormatter struct { - // TimestampFormat sets the format used for marshaling timestamps. - // The format to use is the same than for time.Format or time.Parse from the standard - // library. - // The standard Library already provides a set of predefined format. - TimestampFormat string - - // DisableTimestamp allows disabling automatic timestamps in output - DisableTimestamp bool - - // DisableHTMLEscape allows disabling html escaping in output - DisableHTMLEscape bool - - // DataKey allows users to put all the log entry parameters into a nested dictionary at a given key. - DataKey string - - // FieldMap allows users to customize the names of keys for default fields. - // As an example: - // formatter := &JSONFormatter{ - // FieldMap: FieldMap{ - // FieldKeyTime: "@timestamp", - // FieldKeyLevel: "@level", - // FieldKeyMsg: "@message", - // FieldKeyFunc: "@caller", - // }, - // } - FieldMap FieldMap - - // CallerPrettyfier can be set by the user to modify the content - // of the function and file keys in the json data when ReportCaller is - // activated. If any of the returned value is the empty string the - // corresponding key will be removed from json fields. - CallerPrettyfier func(*runtime.Frame) (function string, file string) - - // PrettyPrint will indent all json logs - PrettyPrint bool -} - -// Format renders a single log entry -func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { - data := make(Fields, len(entry.Data)+4) - for k, v := range entry.Data { - switch v := v.(type) { - case error: - // Otherwise errors are ignored by `encoding/json` - // https://github.com/sirupsen/logrus/issues/137 - data[k] = v.Error() - default: - data[k] = v - } - } - - if f.DataKey != "" { - newData := make(Fields, 4) - newData[f.DataKey] = data - data = newData - } - - prefixFieldClashes(data, f.FieldMap, entry.HasCaller()) - - timestampFormat := f.TimestampFormat - if timestampFormat == "" { - timestampFormat = defaultTimestampFormat - } - - if entry.err != "" { - data[f.FieldMap.resolve(FieldKeyLogrusError)] = entry.err - } - if !f.DisableTimestamp { - data[f.FieldMap.resolve(FieldKeyTime)] = entry.Time.Format(timestampFormat) - } - data[f.FieldMap.resolve(FieldKeyMsg)] = entry.Message - data[f.FieldMap.resolve(FieldKeyLevel)] = entry.Level.String() - if entry.HasCaller() { - funcVal := entry.Caller.Function - fileVal := fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) - if f.CallerPrettyfier != nil { - funcVal, fileVal = f.CallerPrettyfier(entry.Caller) - } - if funcVal != "" { - data[f.FieldMap.resolve(FieldKeyFunc)] = funcVal - } - if fileVal != "" { - data[f.FieldMap.resolve(FieldKeyFile)] = fileVal - } - } - - var b *bytes.Buffer - if entry.Buffer != nil { - b = entry.Buffer - } else { - b = &bytes.Buffer{} - } - - encoder := json.NewEncoder(b) - encoder.SetEscapeHTML(!f.DisableHTMLEscape) - if f.PrettyPrint { - encoder.SetIndent("", " ") - } - if err := encoder.Encode(data); err != nil { - return nil, fmt.Errorf("failed to marshal fields to JSON, %w", err) - } - - return b.Bytes(), nil -} diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go deleted file mode 100644 index 5ff0aef..0000000 --- a/vendor/github.com/sirupsen/logrus/logger.go +++ /dev/null @@ -1,417 +0,0 @@ -package logrus - -import ( - "context" - "io" - "os" - "sync" - "sync/atomic" - "time" -) - -// LogFunction For big messages, it can be more efficient to pass a function -// and only call it if the log level is actually enables rather than -// generating the log message and then checking if the level is enabled -type LogFunction func() []interface{} - -type Logger struct { - // The logs are `io.Copy`'d to this in a mutex. It's common to set this to a - // file, or leave it default which is `os.Stderr`. You can also set this to - // something more adventurous, such as logging to Kafka. - Out io.Writer - // Hooks for the logger instance. These allow firing events based on logging - // levels and log entries. For example, to send errors to an error tracking - // service, log to StatsD or dump the core on fatal errors. - Hooks LevelHooks - // All log entries pass through the formatter before logged to Out. The - // included formatters are `TextFormatter` and `JSONFormatter` for which - // TextFormatter is the default. In development (when a TTY is attached) it - // logs with colors, but to a file it wouldn't. You can easily implement your - // own that implements the `Formatter` interface, see the `README` or included - // formatters for examples. - Formatter Formatter - - // Flag for whether to log caller info (off by default) - ReportCaller bool - - // The logging level the logger should log at. This is typically (and defaults - // to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be - // logged. - Level Level - // Used to sync writing to the log. Locking is enabled by Default - mu MutexWrap - // Reusable empty entry - entryPool sync.Pool - // Function to exit the application, defaults to `os.Exit()` - ExitFunc exitFunc - // The buffer pool used to format the log. If it is nil, the default global - // buffer pool will be used. - BufferPool BufferPool -} - -type exitFunc func(int) - -type MutexWrap struct { - lock sync.Mutex - disabled bool -} - -func (mw *MutexWrap) Lock() { - if !mw.disabled { - mw.lock.Lock() - } -} - -func (mw *MutexWrap) Unlock() { - if !mw.disabled { - mw.lock.Unlock() - } -} - -func (mw *MutexWrap) Disable() { - mw.disabled = true -} - -// Creates a new logger. Configuration should be set by changing `Formatter`, -// `Out` and `Hooks` directly on the default logger instance. You can also just -// instantiate your own: -// -// var log = &logrus.Logger{ -// Out: os.Stderr, -// Formatter: new(logrus.TextFormatter), -// Hooks: make(logrus.LevelHooks), -// Level: logrus.DebugLevel, -// } -// -// It's recommended to make this a global instance called `log`. -func New() *Logger { - return &Logger{ - Out: os.Stderr, - Formatter: new(TextFormatter), - Hooks: make(LevelHooks), - Level: InfoLevel, - ExitFunc: os.Exit, - ReportCaller: false, - } -} - -func (logger *Logger) newEntry() *Entry { - entry, ok := logger.entryPool.Get().(*Entry) - if ok { - return entry - } - return NewEntry(logger) -} - -func (logger *Logger) releaseEntry(entry *Entry) { - entry.Data = map[string]interface{}{} - logger.entryPool.Put(entry) -} - -// WithField allocates a new entry and adds a field to it. -// Debug, Print, Info, Warn, Error, Fatal or Panic must be then applied to -// this new returned entry. -// If you want multiple fields, use `WithFields`. -func (logger *Logger) WithField(key string, value interface{}) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithField(key, value) -} - -// Adds a struct of fields to the log entry. All it does is call `WithField` for -// each `Field`. -func (logger *Logger) WithFields(fields Fields) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithFields(fields) -} - -// Add an error as single field to the log entry. All it does is call -// `WithError` for the given `error`. -func (logger *Logger) WithError(err error) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithError(err) -} - -// Add a context to the log entry. -func (logger *Logger) WithContext(ctx context.Context) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithContext(ctx) -} - -// Overrides the time of the log entry. -func (logger *Logger) WithTime(t time.Time) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithTime(t) -} - -func (logger *Logger) Logf(level Level, format string, args ...interface{}) { - if logger.IsLevelEnabled(level) { - entry := logger.newEntry() - entry.Logf(level, format, args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Tracef(format string, args ...interface{}) { - logger.Logf(TraceLevel, format, args...) -} - -func (logger *Logger) Debugf(format string, args ...interface{}) { - logger.Logf(DebugLevel, format, args...) -} - -func (logger *Logger) Infof(format string, args ...interface{}) { - logger.Logf(InfoLevel, format, args...) -} - -func (logger *Logger) Printf(format string, args ...interface{}) { - entry := logger.newEntry() - entry.Printf(format, args...) - logger.releaseEntry(entry) -} - -func (logger *Logger) Warnf(format string, args ...interface{}) { - logger.Logf(WarnLevel, format, args...) -} - -func (logger *Logger) Warningf(format string, args ...interface{}) { - logger.Warnf(format, args...) -} - -func (logger *Logger) Errorf(format string, args ...interface{}) { - logger.Logf(ErrorLevel, format, args...) -} - -func (logger *Logger) Fatalf(format string, args ...interface{}) { - logger.Logf(FatalLevel, format, args...) - logger.Exit(1) -} - -func (logger *Logger) Panicf(format string, args ...interface{}) { - logger.Logf(PanicLevel, format, args...) -} - -// Log will log a message at the level given as parameter. -// Warning: using Log at Panic or Fatal level will not respectively Panic nor Exit. -// For this behaviour Logger.Panic or Logger.Fatal should be used instead. -func (logger *Logger) Log(level Level, args ...interface{}) { - if logger.IsLevelEnabled(level) { - entry := logger.newEntry() - entry.Log(level, args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) LogFn(level Level, fn LogFunction) { - if logger.IsLevelEnabled(level) { - entry := logger.newEntry() - entry.Log(level, fn()...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Trace(args ...interface{}) { - logger.Log(TraceLevel, args...) -} - -func (logger *Logger) Debug(args ...interface{}) { - logger.Log(DebugLevel, args...) -} - -func (logger *Logger) Info(args ...interface{}) { - logger.Log(InfoLevel, args...) -} - -func (logger *Logger) Print(args ...interface{}) { - entry := logger.newEntry() - entry.Print(args...) - logger.releaseEntry(entry) -} - -func (logger *Logger) Warn(args ...interface{}) { - logger.Log(WarnLevel, args...) -} - -func (logger *Logger) Warning(args ...interface{}) { - logger.Warn(args...) -} - -func (logger *Logger) Error(args ...interface{}) { - logger.Log(ErrorLevel, args...) -} - -func (logger *Logger) Fatal(args ...interface{}) { - logger.Log(FatalLevel, args...) - logger.Exit(1) -} - -func (logger *Logger) Panic(args ...interface{}) { - logger.Log(PanicLevel, args...) -} - -func (logger *Logger) TraceFn(fn LogFunction) { - logger.LogFn(TraceLevel, fn) -} - -func (logger *Logger) DebugFn(fn LogFunction) { - logger.LogFn(DebugLevel, fn) -} - -func (logger *Logger) InfoFn(fn LogFunction) { - logger.LogFn(InfoLevel, fn) -} - -func (logger *Logger) PrintFn(fn LogFunction) { - entry := logger.newEntry() - entry.Print(fn()...) - logger.releaseEntry(entry) -} - -func (logger *Logger) WarnFn(fn LogFunction) { - logger.LogFn(WarnLevel, fn) -} - -func (logger *Logger) WarningFn(fn LogFunction) { - logger.WarnFn(fn) -} - -func (logger *Logger) ErrorFn(fn LogFunction) { - logger.LogFn(ErrorLevel, fn) -} - -func (logger *Logger) FatalFn(fn LogFunction) { - logger.LogFn(FatalLevel, fn) - logger.Exit(1) -} - -func (logger *Logger) PanicFn(fn LogFunction) { - logger.LogFn(PanicLevel, fn) -} - -func (logger *Logger) Logln(level Level, args ...interface{}) { - if logger.IsLevelEnabled(level) { - entry := logger.newEntry() - entry.Logln(level, args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Traceln(args ...interface{}) { - logger.Logln(TraceLevel, args...) -} - -func (logger *Logger) Debugln(args ...interface{}) { - logger.Logln(DebugLevel, args...) -} - -func (logger *Logger) Infoln(args ...interface{}) { - logger.Logln(InfoLevel, args...) -} - -func (logger *Logger) Println(args ...interface{}) { - entry := logger.newEntry() - entry.Println(args...) - logger.releaseEntry(entry) -} - -func (logger *Logger) Warnln(args ...interface{}) { - logger.Logln(WarnLevel, args...) -} - -func (logger *Logger) Warningln(args ...interface{}) { - logger.Warnln(args...) -} - -func (logger *Logger) Errorln(args ...interface{}) { - logger.Logln(ErrorLevel, args...) -} - -func (logger *Logger) Fatalln(args ...interface{}) { - logger.Logln(FatalLevel, args...) - logger.Exit(1) -} - -func (logger *Logger) Panicln(args ...interface{}) { - logger.Logln(PanicLevel, args...) -} - -func (logger *Logger) Exit(code int) { - runHandlers() - if logger.ExitFunc == nil { - logger.ExitFunc = os.Exit - } - logger.ExitFunc(code) -} - -//When file is opened with appending mode, it's safe to -//write concurrently to a file (within 4k message on Linux). -//In these cases user can choose to disable the lock. -func (logger *Logger) SetNoLock() { - logger.mu.Disable() -} - -func (logger *Logger) level() Level { - return Level(atomic.LoadUint32((*uint32)(&logger.Level))) -} - -// SetLevel sets the logger level. -func (logger *Logger) SetLevel(level Level) { - atomic.StoreUint32((*uint32)(&logger.Level), uint32(level)) -} - -// GetLevel returns the logger level. -func (logger *Logger) GetLevel() Level { - return logger.level() -} - -// AddHook adds a hook to the logger hooks. -func (logger *Logger) AddHook(hook Hook) { - logger.mu.Lock() - defer logger.mu.Unlock() - logger.Hooks.Add(hook) -} - -// IsLevelEnabled checks if the log level of the logger is greater than the level param -func (logger *Logger) IsLevelEnabled(level Level) bool { - return logger.level() >= level -} - -// SetFormatter sets the logger formatter. -func (logger *Logger) SetFormatter(formatter Formatter) { - logger.mu.Lock() - defer logger.mu.Unlock() - logger.Formatter = formatter -} - -// SetOutput sets the logger output. -func (logger *Logger) SetOutput(output io.Writer) { - logger.mu.Lock() - defer logger.mu.Unlock() - logger.Out = output -} - -func (logger *Logger) SetReportCaller(reportCaller bool) { - logger.mu.Lock() - defer logger.mu.Unlock() - logger.ReportCaller = reportCaller -} - -// ReplaceHooks replaces the logger hooks and returns the old ones -func (logger *Logger) ReplaceHooks(hooks LevelHooks) LevelHooks { - logger.mu.Lock() - oldHooks := logger.Hooks - logger.Hooks = hooks - logger.mu.Unlock() - return oldHooks -} - -// SetBufferPool sets the logger buffer pool. -func (logger *Logger) SetBufferPool(pool BufferPool) { - logger.mu.Lock() - defer logger.mu.Unlock() - logger.BufferPool = pool -} diff --git a/vendor/github.com/sirupsen/logrus/logrus.go b/vendor/github.com/sirupsen/logrus/logrus.go deleted file mode 100644 index 2f16224..0000000 --- a/vendor/github.com/sirupsen/logrus/logrus.go +++ /dev/null @@ -1,186 +0,0 @@ -package logrus - -import ( - "fmt" - "log" - "strings" -) - -// Fields type, used to pass to `WithFields`. -type Fields map[string]interface{} - -// Level type -type Level uint32 - -// Convert the Level to a string. E.g. PanicLevel becomes "panic". -func (level Level) String() string { - if b, err := level.MarshalText(); err == nil { - return string(b) - } else { - return "unknown" - } -} - -// ParseLevel takes a string level and returns the Logrus log level constant. -func ParseLevel(lvl string) (Level, error) { - switch strings.ToLower(lvl) { - case "panic": - return PanicLevel, nil - case "fatal": - return FatalLevel, nil - case "error": - return ErrorLevel, nil - case "warn", "warning": - return WarnLevel, nil - case "info": - return InfoLevel, nil - case "debug": - return DebugLevel, nil - case "trace": - return TraceLevel, nil - } - - var l Level - return l, fmt.Errorf("not a valid logrus Level: %q", lvl) -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (level *Level) UnmarshalText(text []byte) error { - l, err := ParseLevel(string(text)) - if err != nil { - return err - } - - *level = l - - return nil -} - -func (level Level) MarshalText() ([]byte, error) { - switch level { - case TraceLevel: - return []byte("trace"), nil - case DebugLevel: - return []byte("debug"), nil - case InfoLevel: - return []byte("info"), nil - case WarnLevel: - return []byte("warning"), nil - case ErrorLevel: - return []byte("error"), nil - case FatalLevel: - return []byte("fatal"), nil - case PanicLevel: - return []byte("panic"), nil - } - - return nil, fmt.Errorf("not a valid logrus level %d", level) -} - -// A constant exposing all logging levels -var AllLevels = []Level{ - PanicLevel, - FatalLevel, - ErrorLevel, - WarnLevel, - InfoLevel, - DebugLevel, - TraceLevel, -} - -// These are the different logging levels. You can set the logging level to log -// on your instance of logger, obtained with `logrus.New()`. -const ( - // PanicLevel level, highest level of severity. Logs and then calls panic with the - // message passed to Debug, Info, ... - PanicLevel Level = iota - // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the - // logging level is set to Panic. - FatalLevel - // ErrorLevel level. Logs. Used for errors that should definitely be noted. - // Commonly used for hooks to send errors to an error tracking service. - ErrorLevel - // WarnLevel level. Non-critical entries that deserve eyes. - WarnLevel - // InfoLevel level. General operational entries about what's going on inside the - // application. - InfoLevel - // DebugLevel level. Usually only enabled when debugging. Very verbose logging. - DebugLevel - // TraceLevel level. Designates finer-grained informational events than the Debug. - TraceLevel -) - -// Won't compile if StdLogger can't be realized by a log.Logger -var ( - _ StdLogger = &log.Logger{} - _ StdLogger = &Entry{} - _ StdLogger = &Logger{} -) - -// StdLogger is what your logrus-enabled library should take, that way -// it'll accept a stdlib logger and a logrus logger. There's no standard -// interface, this is the closest we get, unfortunately. -type StdLogger interface { - Print(...interface{}) - Printf(string, ...interface{}) - Println(...interface{}) - - Fatal(...interface{}) - Fatalf(string, ...interface{}) - Fatalln(...interface{}) - - Panic(...interface{}) - Panicf(string, ...interface{}) - Panicln(...interface{}) -} - -// The FieldLogger interface generalizes the Entry and Logger types -type FieldLogger interface { - WithField(key string, value interface{}) *Entry - WithFields(fields Fields) *Entry - WithError(err error) *Entry - - Debugf(format string, args ...interface{}) - Infof(format string, args ...interface{}) - Printf(format string, args ...interface{}) - Warnf(format string, args ...interface{}) - Warningf(format string, args ...interface{}) - Errorf(format string, args ...interface{}) - Fatalf(format string, args ...interface{}) - Panicf(format string, args ...interface{}) - - Debug(args ...interface{}) - Info(args ...interface{}) - Print(args ...interface{}) - Warn(args ...interface{}) - Warning(args ...interface{}) - Error(args ...interface{}) - Fatal(args ...interface{}) - Panic(args ...interface{}) - - Debugln(args ...interface{}) - Infoln(args ...interface{}) - Println(args ...interface{}) - Warnln(args ...interface{}) - Warningln(args ...interface{}) - Errorln(args ...interface{}) - Fatalln(args ...interface{}) - Panicln(args ...interface{}) - - // IsDebugEnabled() bool - // IsInfoEnabled() bool - // IsWarnEnabled() bool - // IsErrorEnabled() bool - // IsFatalEnabled() bool - // IsPanicEnabled() bool -} - -// Ext1FieldLogger (the first extension to FieldLogger) is superfluous, it is -// here for consistancy. Do not use. Use Logger or Entry instead. -type Ext1FieldLogger interface { - FieldLogger - Tracef(format string, args ...interface{}) - Trace(args ...interface{}) - Traceln(args ...interface{}) -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go deleted file mode 100644 index 2403de9..0000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build appengine - -package logrus - -import ( - "io" -) - -func checkIfTerminal(w io.Writer) bool { - return true -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go b/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go deleted file mode 100644 index 4997899..0000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go +++ /dev/null @@ -1,13 +0,0 @@ -// +build darwin dragonfly freebsd netbsd openbsd -// +build !js - -package logrus - -import "golang.org/x/sys/unix" - -const ioctlReadTermios = unix.TIOCGETA - -func isTerminal(fd int) bool { - _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) - return err == nil -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_js.go b/vendor/github.com/sirupsen/logrus/terminal_check_js.go deleted file mode 100644 index ebdae3e..0000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_js.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build js - -package logrus - -func isTerminal(fd int) bool { - return false -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go b/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go deleted file mode 100644 index 97af92c..0000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build js nacl plan9 - -package logrus - -import ( - "io" -) - -func checkIfTerminal(w io.Writer) bool { - return false -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go deleted file mode 100644 index 3293fb3..0000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go +++ /dev/null @@ -1,17 +0,0 @@ -// +build !appengine,!js,!windows,!nacl,!plan9 - -package logrus - -import ( - "io" - "os" -) - -func checkIfTerminal(w io.Writer) bool { - switch v := w.(type) { - case *os.File: - return isTerminal(int(v.Fd())) - default: - return false - } -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go b/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go deleted file mode 100644 index f6710b3..0000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go +++ /dev/null @@ -1,11 +0,0 @@ -package logrus - -import ( - "golang.org/x/sys/unix" -) - -// IsTerminal returns true if the given file descriptor is a terminal. -func isTerminal(fd int) bool { - _, err := unix.IoctlGetTermio(fd, unix.TCGETA) - return err == nil -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_unix.go b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go deleted file mode 100644 index 04748b8..0000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_unix.go +++ /dev/null @@ -1,13 +0,0 @@ -// +build linux aix zos -// +build !js - -package logrus - -import "golang.org/x/sys/unix" - -const ioctlReadTermios = unix.TCGETS - -func isTerminal(fd int) bool { - _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) - return err == nil -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_windows.go b/vendor/github.com/sirupsen/logrus/terminal_check_windows.go deleted file mode 100644 index 2879eb5..0000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_windows.go +++ /dev/null @@ -1,27 +0,0 @@ -// +build !appengine,!js,windows - -package logrus - -import ( - "io" - "os" - - "golang.org/x/sys/windows" -) - -func checkIfTerminal(w io.Writer) bool { - switch v := w.(type) { - case *os.File: - handle := windows.Handle(v.Fd()) - var mode uint32 - if err := windows.GetConsoleMode(handle, &mode); err != nil { - return false - } - mode |= windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING - if err := windows.SetConsoleMode(handle, mode); err != nil { - return false - } - return true - } - return false -} diff --git a/vendor/github.com/sirupsen/logrus/text_formatter.go b/vendor/github.com/sirupsen/logrus/text_formatter.go deleted file mode 100644 index be2c6ef..0000000 --- a/vendor/github.com/sirupsen/logrus/text_formatter.go +++ /dev/null @@ -1,339 +0,0 @@ -package logrus - -import ( - "bytes" - "fmt" - "os" - "runtime" - "sort" - "strconv" - "strings" - "sync" - "time" - "unicode/utf8" -) - -const ( - red = 31 - yellow = 33 - blue = 36 - gray = 37 -) - -var baseTimestamp time.Time - -func init() { - baseTimestamp = time.Now() -} - -// TextFormatter formats logs into text -type TextFormatter struct { - // Set to true to bypass checking for a TTY before outputting colors. - ForceColors bool - - // Force disabling colors. - DisableColors bool - - // Force quoting of all values - ForceQuote bool - - // DisableQuote disables quoting for all values. - // DisableQuote will have a lower priority than ForceQuote. - // If both of them are set to true, quote will be forced on all values. - DisableQuote bool - - // Override coloring based on CLICOLOR and CLICOLOR_FORCE. - https://bixense.com/clicolors/ - EnvironmentOverrideColors bool - - // Disable timestamp logging. useful when output is redirected to logging - // system that already adds timestamps. - DisableTimestamp bool - - // Enable logging the full timestamp when a TTY is attached instead of just - // the time passed since beginning of execution. - FullTimestamp bool - - // TimestampFormat to use for display when a full timestamp is printed. - // The format to use is the same than for time.Format or time.Parse from the standard - // library. - // The standard Library already provides a set of predefined format. - TimestampFormat string - - // The fields are sorted by default for a consistent output. For applications - // that log extremely frequently and don't use the JSON formatter this may not - // be desired. - DisableSorting bool - - // The keys sorting function, when uninitialized it uses sort.Strings. - SortingFunc func([]string) - - // Disables the truncation of the level text to 4 characters. - DisableLevelTruncation bool - - // PadLevelText Adds padding the level text so that all the levels output at the same length - // PadLevelText is a superset of the DisableLevelTruncation option - PadLevelText bool - - // QuoteEmptyFields will wrap empty fields in quotes if true - QuoteEmptyFields bool - - // Whether the logger's out is to a terminal - isTerminal bool - - // FieldMap allows users to customize the names of keys for default fields. - // As an example: - // formatter := &TextFormatter{ - // FieldMap: FieldMap{ - // FieldKeyTime: "@timestamp", - // FieldKeyLevel: "@level", - // FieldKeyMsg: "@message"}} - FieldMap FieldMap - - // CallerPrettyfier can be set by the user to modify the content - // of the function and file keys in the data when ReportCaller is - // activated. If any of the returned value is the empty string the - // corresponding key will be removed from fields. - CallerPrettyfier func(*runtime.Frame) (function string, file string) - - terminalInitOnce sync.Once - - // The max length of the level text, generated dynamically on init - levelTextMaxLength int -} - -func (f *TextFormatter) init(entry *Entry) { - if entry.Logger != nil { - f.isTerminal = checkIfTerminal(entry.Logger.Out) - } - // Get the max length of the level text - for _, level := range AllLevels { - levelTextLength := utf8.RuneCount([]byte(level.String())) - if levelTextLength > f.levelTextMaxLength { - f.levelTextMaxLength = levelTextLength - } - } -} - -func (f *TextFormatter) isColored() bool { - isColored := f.ForceColors || (f.isTerminal && (runtime.GOOS != "windows")) - - if f.EnvironmentOverrideColors { - switch force, ok := os.LookupEnv("CLICOLOR_FORCE"); { - case ok && force != "0": - isColored = true - case ok && force == "0", os.Getenv("CLICOLOR") == "0": - isColored = false - } - } - - return isColored && !f.DisableColors -} - -// Format renders a single log entry -func (f *TextFormatter) Format(entry *Entry) ([]byte, error) { - data := make(Fields) - for k, v := range entry.Data { - data[k] = v - } - prefixFieldClashes(data, f.FieldMap, entry.HasCaller()) - keys := make([]string, 0, len(data)) - for k := range data { - keys = append(keys, k) - } - - var funcVal, fileVal string - - fixedKeys := make([]string, 0, 4+len(data)) - if !f.DisableTimestamp { - fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyTime)) - } - fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyLevel)) - if entry.Message != "" { - fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyMsg)) - } - if entry.err != "" { - fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyLogrusError)) - } - if entry.HasCaller() { - if f.CallerPrettyfier != nil { - funcVal, fileVal = f.CallerPrettyfier(entry.Caller) - } else { - funcVal = entry.Caller.Function - fileVal = fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) - } - - if funcVal != "" { - fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFunc)) - } - if fileVal != "" { - fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFile)) - } - } - - if !f.DisableSorting { - if f.SortingFunc == nil { - sort.Strings(keys) - fixedKeys = append(fixedKeys, keys...) - } else { - if !f.isColored() { - fixedKeys = append(fixedKeys, keys...) - f.SortingFunc(fixedKeys) - } else { - f.SortingFunc(keys) - } - } - } else { - fixedKeys = append(fixedKeys, keys...) - } - - var b *bytes.Buffer - if entry.Buffer != nil { - b = entry.Buffer - } else { - b = &bytes.Buffer{} - } - - f.terminalInitOnce.Do(func() { f.init(entry) }) - - timestampFormat := f.TimestampFormat - if timestampFormat == "" { - timestampFormat = defaultTimestampFormat - } - if f.isColored() { - f.printColored(b, entry, keys, data, timestampFormat) - } else { - - for _, key := range fixedKeys { - var value interface{} - switch { - case key == f.FieldMap.resolve(FieldKeyTime): - value = entry.Time.Format(timestampFormat) - case key == f.FieldMap.resolve(FieldKeyLevel): - value = entry.Level.String() - case key == f.FieldMap.resolve(FieldKeyMsg): - value = entry.Message - case key == f.FieldMap.resolve(FieldKeyLogrusError): - value = entry.err - case key == f.FieldMap.resolve(FieldKeyFunc) && entry.HasCaller(): - value = funcVal - case key == f.FieldMap.resolve(FieldKeyFile) && entry.HasCaller(): - value = fileVal - default: - value = data[key] - } - f.appendKeyValue(b, key, value) - } - } - - b.WriteByte('\n') - return b.Bytes(), nil -} - -func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, data Fields, timestampFormat string) { - var levelColor int - switch entry.Level { - case DebugLevel, TraceLevel: - levelColor = gray - case WarnLevel: - levelColor = yellow - case ErrorLevel, FatalLevel, PanicLevel: - levelColor = red - case InfoLevel: - levelColor = blue - default: - levelColor = blue - } - - levelText := strings.ToUpper(entry.Level.String()) - if !f.DisableLevelTruncation && !f.PadLevelText { - levelText = levelText[0:4] - } - if f.PadLevelText { - // Generates the format string used in the next line, for example "%-6s" or "%-7s". - // Based on the max level text length. - formatString := "%-" + strconv.Itoa(f.levelTextMaxLength) + "s" - // Formats the level text by appending spaces up to the max length, for example: - // - "INFO " - // - "WARNING" - levelText = fmt.Sprintf(formatString, levelText) - } - - // Remove a single newline if it already exists in the message to keep - // the behavior of logrus text_formatter the same as the stdlib log package - entry.Message = strings.TrimSuffix(entry.Message, "\n") - - caller := "" - if entry.HasCaller() { - funcVal := fmt.Sprintf("%s()", entry.Caller.Function) - fileVal := fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) - - if f.CallerPrettyfier != nil { - funcVal, fileVal = f.CallerPrettyfier(entry.Caller) - } - - if fileVal == "" { - caller = funcVal - } else if funcVal == "" { - caller = fileVal - } else { - caller = fileVal + " " + funcVal - } - } - - switch { - case f.DisableTimestamp: - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m%s %-44s ", levelColor, levelText, caller, entry.Message) - case !f.FullTimestamp: - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d]%s %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), caller, entry.Message) - default: - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s]%s %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), caller, entry.Message) - } - for _, k := range keys { - v := data[k] - fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=", levelColor, k) - f.appendValue(b, v) - } -} - -func (f *TextFormatter) needsQuoting(text string) bool { - if f.ForceQuote { - return true - } - if f.QuoteEmptyFields && len(text) == 0 { - return true - } - if f.DisableQuote { - return false - } - for _, ch := range text { - if !((ch >= 'a' && ch <= 'z') || - (ch >= 'A' && ch <= 'Z') || - (ch >= '0' && ch <= '9') || - ch == '-' || ch == '.' || ch == '_' || ch == '/' || ch == '@' || ch == '^' || ch == '+') { - return true - } - } - return false -} - -func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) { - if b.Len() > 0 { - b.WriteByte(' ') - } - b.WriteString(key) - b.WriteByte('=') - f.appendValue(b, value) -} - -func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) { - stringVal, ok := value.(string) - if !ok { - stringVal = fmt.Sprint(value) - } - - if !f.needsQuoting(stringVal) { - b.WriteString(stringVal) - } else { - b.WriteString(fmt.Sprintf("%q", stringVal)) - } -} diff --git a/vendor/github.com/sirupsen/logrus/writer.go b/vendor/github.com/sirupsen/logrus/writer.go deleted file mode 100644 index 074fd4b..0000000 --- a/vendor/github.com/sirupsen/logrus/writer.go +++ /dev/null @@ -1,102 +0,0 @@ -package logrus - -import ( - "bufio" - "io" - "runtime" - "strings" -) - -// Writer at INFO level. See WriterLevel for details. -func (logger *Logger) Writer() *io.PipeWriter { - return logger.WriterLevel(InfoLevel) -} - -// WriterLevel returns an io.Writer that can be used to write arbitrary text to -// the logger at the given log level. Each line written to the writer will be -// printed in the usual way using formatters and hooks. The writer is part of an -// io.Pipe and it is the callers responsibility to close the writer when done. -// This can be used to override the standard library logger easily. -func (logger *Logger) WriterLevel(level Level) *io.PipeWriter { - return NewEntry(logger).WriterLevel(level) -} - -// Writer returns an io.Writer that writes to the logger at the info log level -func (entry *Entry) Writer() *io.PipeWriter { - return entry.WriterLevel(InfoLevel) -} - -// WriterLevel returns an io.Writer that writes to the logger at the given log level -func (entry *Entry) WriterLevel(level Level) *io.PipeWriter { - reader, writer := io.Pipe() - - var printFunc func(args ...interface{}) - - // Determine which log function to use based on the specified log level - switch level { - case TraceLevel: - printFunc = entry.Trace - case DebugLevel: - printFunc = entry.Debug - case InfoLevel: - printFunc = entry.Info - case WarnLevel: - printFunc = entry.Warn - case ErrorLevel: - printFunc = entry.Error - case FatalLevel: - printFunc = entry.Fatal - case PanicLevel: - printFunc = entry.Panic - default: - printFunc = entry.Print - } - - // Start a new goroutine to scan the input and write it to the logger using the specified print function. - // It splits the input into chunks of up to 64KB to avoid buffer overflows. - go entry.writerScanner(reader, printFunc) - - // Set a finalizer function to close the writer when it is garbage collected - runtime.SetFinalizer(writer, writerFinalizer) - - return writer -} - -// writerScanner scans the input from the reader and writes it to the logger -func (entry *Entry) writerScanner(reader *io.PipeReader, printFunc func(args ...interface{})) { - scanner := bufio.NewScanner(reader) - - // Set the buffer size to the maximum token size to avoid buffer overflows - scanner.Buffer(make([]byte, bufio.MaxScanTokenSize), bufio.MaxScanTokenSize) - - // Define a split function to split the input into chunks of up to 64KB - chunkSize := bufio.MaxScanTokenSize // 64KB - splitFunc := func(data []byte, atEOF bool) (int, []byte, error) { - if len(data) >= chunkSize { - return chunkSize, data[:chunkSize], nil - } - - return bufio.ScanLines(data, atEOF) - } - - // Use the custom split function to split the input - scanner.Split(splitFunc) - - // Scan the input and write it to the logger using the specified print function - for scanner.Scan() { - printFunc(strings.TrimRight(scanner.Text(), "\r\n")) - } - - // If there was an error while scanning the input, log an error - if err := scanner.Err(); err != nil { - entry.Errorf("Error while reading from Writer: %s", err) - } - - // Close the reader when we are done - reader.Close() -} - -// WriterFinalizer is a finalizer function that closes then given writer when it is garbage collected -func writerFinalizer(writer *io.PipeWriter) { - writer.Close() -} diff --git a/vendor/github.com/sourcegraph/conc/.golangci.yml b/vendor/github.com/sourcegraph/conc/.golangci.yml deleted file mode 100644 index ae65a76..0000000 --- a/vendor/github.com/sourcegraph/conc/.golangci.yml +++ /dev/null @@ -1,11 +0,0 @@ -linters: - disable-all: true - enable: - - errcheck - - godot - - gosimple - - govet - - ineffassign - - staticcheck - - typecheck - - unused diff --git a/vendor/github.com/sourcegraph/conc/LICENSE b/vendor/github.com/sourcegraph/conc/LICENSE deleted file mode 100644 index 1081f4e..0000000 --- a/vendor/github.com/sourcegraph/conc/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Sourcegraph - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/sourcegraph/conc/README.md b/vendor/github.com/sourcegraph/conc/README.md deleted file mode 100644 index 1c87c3c..0000000 --- a/vendor/github.com/sourcegraph/conc/README.md +++ /dev/null @@ -1,464 +0,0 @@ -![conch](https://user-images.githubusercontent.com/12631702/210295964-785cc63d-d697-420c-99ff-f492eb81dec9.svg) - -# `conc`: better structured concurrency for go - -[![Go Reference](https://pkg.go.dev/badge/github.com/sourcegraph/conc.svg)](https://pkg.go.dev/github.com/sourcegraph/conc) -[![Sourcegraph](https://img.shields.io/badge/view%20on-sourcegraph-A112FE?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAEZklEQVRoQ+2aXWgUZxSG3292sxtNN43BhBakFPyhxSujRSxiU1pr7SaGXqgUxOIEW0IFkeYighYUxAuLUlq0lrq2iCDpjWtmFVtoG6QVNOCFVShVLyxIk0DVjZLMxt3xTGTccd2ZOd/8JBHci0CY9zvnPPN+/7sCIXwKavOwAcy2QgngQiIztDSE0OwQlDPYR1ebiaH6J5kZChyfW12gRG4QVgGTBfMchMbFP9Sn5nlZL2D0JjLD6710lc+z0NfqSGTXQRQ4bX07Mq423yoBL3OSyHSvUxirMuaEvgbJWrdcvkHMoJwxYuq4INUhyuWvQa1jvdMGxAvCxJlyEC9XOBCWL04wwRzpbDoDQ7wfZJzIQLi5Eggk6DiRhZgWIAbE3NrM4A3LPT8Q7UgqAqLqTmLSHLGPkyzG/qXEczhd0q6RH+zaSBfaUoc4iQx19pIClIscrTkNZzG6gd7qMY6eC2Hqyo705ZfTf+eqJmhMzcSbYtQpOXc92ZsZjLVAL4YNUQbJ5Ttg4CQrQdGYj44Xr9m1XJCzmZusFDJOWNpHjmh5x624a2ZFtOKDVL+uNo2TuXE3bZQQZUf8gtgqP31uI94Z/rMqix+IGiRfWw3xN9dCgVx+L3WrHm4Dju6PXz/EkjuXJ6R+IGgyOE1TbZqTq9y1eo0EZo7oMo1ktPu3xjHvuiLT5AFNszUyDULtWpzE2/fEsey8O5TbWuGWwxrs5rS7nFNMWJrNh2No74s9Ec4vRNmRRzPXMP19fBMSVsGcOJ98G8N3Wl2gXcbTjbX7vUBxLaeASDQCm5Cu/0E2tvtb0Ea+BowtskFD0wvlc6Rf2M+Jx7dTu7ubFr2dnKDRaMQe2v/tcIrNB7FH0O50AcrBaApmRDVwFO31ql3pD8QW4dP0feNwl/Q+kFEtRyIGyaWXnpy1OO0qNJWHo1y6iCmAGkBb/Ru+HenDWIF2mo4r8G+tRRzoniSn2uqFLxANhe9LKHVyTbz6egk9+x5w5fK6ulSNNMhZ/Feno+GebLZV6isTTa6k5qNl5RnZ5u56Ib6SBvFzaWBBVFZzvnERWlt/Cg4l27XChLCqFyLekjhy6xJyoytgjPf7opIB8QPx7sYFiMXHPGt76m741MhCKMZfng0nBOIjmoJPsLqWHwgFpe6V6qtfcopxveR2Oy+J0ntIN/zCWkf8QNAJ7y6d8Bq4lxLc2/qJl5K7t432XwcqX5CrI34gzATWuYILQtdQPyePDK3iuOekCR3Efjhig1B1Uq5UoXEEoZX7d1q535J5S9VOeFyYyEBku5XTMXXKQTToX5Rg7OI44nbW5oKYeYK4EniMeF0YFNSmb+grhc84LyRCEP1/OurOcipCQbKxDeK2V5FcVyIDMQvsgz5gwFhcWWwKyRlvQ3gv29RwWoDYAbIofNyBxI9eDlQ+n3YgsgCWnr4MStGXQXmv9pF2La/k3OccV54JEBM4yp9EsXa/3LfO0dGPcYq0Y7DfZB8nJzZw2rppHgKgVHs8L5wvRwAAAABJRU5ErkJggg==)](https://sourcegraph.com/github.com/sourcegraph/conc) -[![Go Report Card](https://goreportcard.com/badge/github.com/sourcegraph/conc)](https://goreportcard.com/report/github.com/sourcegraph/conc) -[![codecov](https://codecov.io/gh/sourcegraph/conc/branch/main/graph/badge.svg?token=MQZTEA1QWT)](https://codecov.io/gh/sourcegraph/conc) -[![Discord](https://img.shields.io/badge/discord-chat-%235765F2)](https://discord.gg/bvXQXmtRjN) - -`conc` is your toolbelt for structured concurrency in go, making common tasks -easier and safer. - -```sh -go get github.com/sourcegraph/conc -``` - -# At a glance - -- Use [`conc.WaitGroup`](https://pkg.go.dev/github.com/sourcegraph/conc#WaitGroup) if you just want a safer version of `sync.WaitGroup` -- Use [`pool.Pool`](https://pkg.go.dev/github.com/sourcegraph/conc/pool#Pool) if you want a concurrency-limited task runner -- Use [`pool.ResultPool`](https://pkg.go.dev/github.com/sourcegraph/conc/pool#ResultPool) if you want a concurrent task runner that collects task results -- Use [`pool.(Result)?ErrorPool`](https://pkg.go.dev/github.com/sourcegraph/conc/pool#ErrorPool) if your tasks are fallible -- Use [`pool.(Result)?ContextPool`](https://pkg.go.dev/github.com/sourcegraph/conc/pool#ContextPool) if your tasks should be canceled on failure -- Use [`stream.Stream`](https://pkg.go.dev/github.com/sourcegraph/conc/stream#Stream) if you want to process an ordered stream of tasks in parallel with serial callbacks -- Use [`iter.Map`](https://pkg.go.dev/github.com/sourcegraph/conc/iter#Map) if you want to concurrently map a slice -- Use [`iter.ForEach`](https://pkg.go.dev/github.com/sourcegraph/conc/iter#ForEach) if you want to concurrently iterate over a slice -- Use [`panics.Catcher`](https://pkg.go.dev/github.com/sourcegraph/conc/panics#Catcher) if you want to catch panics in your own goroutines - -All pools are created with -[`pool.New()`](https://pkg.go.dev/github.com/sourcegraph/conc/pool#New) -or -[`pool.NewWithResults[T]()`](https://pkg.go.dev/github.com/sourcegraph/conc/pool#NewWithResults), -then configured with methods: - -- [`p.WithMaxGoroutines()`](https://pkg.go.dev/github.com/sourcegraph/conc/pool#Pool.MaxGoroutines) configures the maximum number of goroutines in the pool -- [`p.WithErrors()`](https://pkg.go.dev/github.com/sourcegraph/conc/pool#Pool.WithErrors) configures the pool to run tasks that return errors -- [`p.WithContext(ctx)`](https://pkg.go.dev/github.com/sourcegraph/conc/pool#Pool.WithContext) configures the pool to run tasks that should be canceled on first error -- [`p.WithFirstError()`](https://pkg.go.dev/github.com/sourcegraph/conc/pool#ErrorPool.WithFirstError) configures error pools to only keep the first returned error rather than an aggregated error -- [`p.WithCollectErrored()`](https://pkg.go.dev/github.com/sourcegraph/conc/pool#ResultContextPool.WithCollectErrored) configures result pools to collect results even when the task errored - -# Goals - -The main goals of the package are: -1) Make it harder to leak goroutines -2) Handle panics gracefully -3) Make concurrent code easier to read - -## Goal #1: Make it harder to leak goroutines - -A common pain point when working with goroutines is cleaning them up. It's -really easy to fire off a `go` statement and fail to properly wait for it to -complete. - -`conc` takes the opinionated stance that all concurrency should be scoped. -That is, goroutines should have an owner and that owner should always -ensure that its owned goroutines exit properly. - -In `conc`, the owner of a goroutine is always a `conc.WaitGroup`. Goroutines -are spawned in a `WaitGroup` with `(*WaitGroup).Go()`, and -`(*WaitGroup).Wait()` should always be called before the `WaitGroup` goes out -of scope. - -In some cases, you might want a spawned goroutine to outlast the scope of the -caller. In that case, you could pass a `WaitGroup` into the spawning function. - -```go -func main() { - var wg conc.WaitGroup - defer wg.Wait() - - startTheThing(&wg) -} - -func startTheThing(wg *conc.WaitGroup) { - wg.Go(func() { ... }) -} -``` - -For some more discussion on why scoped concurrency is nice, check out [this -blog -post](https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/). - -## Goal #2: Handle panics gracefully - -A frequent problem with goroutines in long-running applications is handling -panics. A goroutine spawned without a panic handler will crash the whole process -on panic. This is usually undesirable. - -However, if you do add a panic handler to a goroutine, what do you do with the -panic once you catch it? Some options: -1) Ignore it -2) Log it -3) Turn it into an error and return that to the goroutine spawner -4) Propagate the panic to the goroutine spawner - -Ignoring panics is a bad idea since panics usually mean there is actually -something wrong and someone should fix it. - -Just logging panics isn't great either because then there is no indication to the spawner -that something bad happened, and it might just continue on as normal even though your -program is in a really bad state. - -Both (3) and (4) are reasonable options, but both require the goroutine to have -an owner that can actually receive the message that something went wrong. This -is generally not true with a goroutine spawned with `go`, but in the `conc` -package, all goroutines have an owner that must collect the spawned goroutine. -In the conc package, any call to `Wait()` will panic if any of the spawned goroutines -panicked. Additionally, it decorates the panic value with a stacktrace from the child -goroutine so that you don't lose information about what caused the panic. - -Doing this all correctly every time you spawn something with `go` is not -trivial and it requires a lot of boilerplate that makes the important parts of -the code more difficult to read, so `conc` does this for you. - - - - - - - - - - -
stdlibconc
- -```go -type caughtPanicError struct { - val any - stack []byte -} - -func (e *caughtPanicError) Error() string { - return fmt.Sprintf( - "panic: %q\n%s", - e.val, - string(e.stack) - ) -} - -func main() { - done := make(chan error) - go func() { - defer func() { - if v := recover(); v != nil { - done <- &caughtPanicError{ - val: v, - stack: debug.Stack() - } - } else { - done <- nil - } - }() - doSomethingThatMightPanic() - }() - err := <-done - if err != nil { - panic(err) - } -} -``` - - -```go -func main() { - var wg conc.WaitGroup - wg.Go(doSomethingThatMightPanic) - // panics with a nice stacktrace - wg.Wait() -} -``` -
- -## Goal #3: Make concurrent code easier to read - -Doing concurrency correctly is difficult. Doing it in a way that doesn't -obfuscate what the code is actually doing is more difficult. The `conc` package -attempts to make common operations easier by abstracting as much boilerplate -complexity as possible. - -Want to run a set of concurrent tasks with a bounded set of goroutines? Use -`pool.New()`. Want to process an ordered stream of results concurrently, but -still maintain order? Try `stream.New()`. What about a concurrent map over -a slice? Take a peek at `iter.Map()`. - -Browse some examples below for some comparisons with doing these by hand. - -# Examples - -Each of these examples forgoes propagating panics for simplicity. To see -what kind of complexity that would add, check out the "Goal #2" header above. - -Spawn a set of goroutines and waiting for them to finish: - - - - - - - - - - -
stdlibconc
- -```go -func main() { - var wg sync.WaitGroup - for i := 0; i < 10; i++ { - wg.Add(1) - go func() { - defer wg.Done() - // crashes on panic! - doSomething() - }() - } - wg.Wait() -} -``` - - -```go -func main() { - var wg conc.WaitGroup - for i := 0; i < 10; i++ { - wg.Go(doSomething) - } - wg.Wait() -} -``` -
- -Process each element of a stream in a static pool of goroutines: - - - - - - - - - - -
stdlibconc
- -```go -func process(stream chan int) { - var wg sync.WaitGroup - for i := 0; i < 10; i++ { - wg.Add(1) - go func() { - defer wg.Done() - for elem := range stream { - handle(elem) - } - }() - } - wg.Wait() -} -``` - - -```go -func process(stream chan int) { - p := pool.New().WithMaxGoroutines(10) - for elem := range stream { - elem := elem - p.Go(func() { - handle(elem) - }) - } - p.Wait() -} -``` -
- -Process each element of a slice in a static pool of goroutines: - - - - - - - - - - -
stdlibconc
- -```go -func process(values []int) { - feeder := make(chan int, 8) - - var wg sync.WaitGroup - for i := 0; i < 10; i++ { - wg.Add(1) - go func() { - defer wg.Done() - for elem := range feeder { - handle(elem) - } - }() - } - - for _, value := range values { - feeder <- value - } - close(feeder) - wg.Wait() -} -``` - - -```go -func process(values []int) { - iter.ForEach(values, handle) -} -``` -
- -Concurrently map a slice: - - - - - - - - - - -
stdlibconc
- -```go -func concMap( - input []int, - f func(int) int, -) []int { - res := make([]int, len(input)) - var idx atomic.Int64 - - var wg sync.WaitGroup - for i := 0; i < 10; i++ { - wg.Add(1) - go func() { - defer wg.Done() - - for { - i := int(idx.Add(1) - 1) - if i >= len(input) { - return - } - - res[i] = f(input[i]) - } - }() - } - wg.Wait() - return res -} -``` - - -```go -func concMap( - input []int, - f func(*int) int, -) []int { - return iter.Map(input, f) -} -``` -
- -Process an ordered stream concurrently: - - - - - - - - - - - -
stdlibconc
- -```go -func mapStream( - in chan int, - out chan int, - f func(int) int, -) { - tasks := make(chan func()) - taskResults := make(chan chan int) - - // Worker goroutines - var workerWg sync.WaitGroup - for i := 0; i < 10; i++ { - workerWg.Add(1) - go func() { - defer workerWg.Done() - for task := range tasks { - task() - } - }() - } - - // Ordered reader goroutines - var readerWg sync.WaitGroup - readerWg.Add(1) - go func() { - defer readerWg.Done() - for result := range taskResults { - item := <-result - out <- item - } - }() - - // Feed the workers with tasks - for elem := range in { - resultCh := make(chan int, 1) - taskResults <- resultCh - tasks <- func() { - resultCh <- f(elem) - } - } - - // We've exhausted input. - // Wait for everything to finish - close(tasks) - workerWg.Wait() - close(taskResults) - readerWg.Wait() -} -``` - - -```go -func mapStream( - in chan int, - out chan int, - f func(int) int, -) { - s := stream.New().WithMaxGoroutines(10) - for elem := range in { - elem := elem - s.Go(func() stream.Callback { - res := f(elem) - return func() { out <- res } - }) - } - s.Wait() -} -``` -
- -# Status - -This package is currently pre-1.0. There are likely to be minor breaking -changes before a 1.0 release as we stabilize the APIs and tweak defaults. -Please open an issue if you have questions, concerns, or requests that you'd -like addressed before the 1.0 release. Currently, a 1.0 is targeted for -March 2023. diff --git a/vendor/github.com/sourcegraph/conc/internal/multierror/multierror_go119.go b/vendor/github.com/sourcegraph/conc/internal/multierror/multierror_go119.go deleted file mode 100644 index 7087e32..0000000 --- a/vendor/github.com/sourcegraph/conc/internal/multierror/multierror_go119.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build !go1.20 -// +build !go1.20 - -package multierror - -import "go.uber.org/multierr" - -var ( - Join = multierr.Combine -) diff --git a/vendor/github.com/sourcegraph/conc/internal/multierror/multierror_go120.go b/vendor/github.com/sourcegraph/conc/internal/multierror/multierror_go120.go deleted file mode 100644 index 39cff82..0000000 --- a/vendor/github.com/sourcegraph/conc/internal/multierror/multierror_go120.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build go1.20 -// +build go1.20 - -package multierror - -import "errors" - -var ( - Join = errors.Join -) diff --git a/vendor/github.com/sourcegraph/conc/iter/iter.go b/vendor/github.com/sourcegraph/conc/iter/iter.go deleted file mode 100644 index 124b4f9..0000000 --- a/vendor/github.com/sourcegraph/conc/iter/iter.go +++ /dev/null @@ -1,85 +0,0 @@ -package iter - -import ( - "runtime" - "sync/atomic" - - "github.com/sourcegraph/conc" -) - -// defaultMaxGoroutines returns the default maximum number of -// goroutines to use within this package. -func defaultMaxGoroutines() int { return runtime.GOMAXPROCS(0) } - -// Iterator can be used to configure the behaviour of ForEach -// and ForEachIdx. The zero value is safe to use with reasonable -// defaults. -// -// Iterator is also safe for reuse and concurrent use. -type Iterator[T any] struct { - // MaxGoroutines controls the maximum number of goroutines - // to use on this Iterator's methods. - // - // If unset, MaxGoroutines defaults to runtime.GOMAXPROCS(0). - MaxGoroutines int -} - -// ForEach executes f in parallel over each element in input. -// -// It is safe to mutate the input parameter, which makes it -// possible to map in place. -// -// ForEach always uses at most runtime.GOMAXPROCS goroutines. -// It takes roughly 2µs to start up the goroutines and adds -// an overhead of roughly 50ns per element of input. For -// a configurable goroutine limit, use a custom Iterator. -func ForEach[T any](input []T, f func(*T)) { Iterator[T]{}.ForEach(input, f) } - -// ForEach executes f in parallel over each element in input, -// using up to the Iterator's configured maximum number of -// goroutines. -// -// It is safe to mutate the input parameter, which makes it -// possible to map in place. -// -// It takes roughly 2µs to start up the goroutines and adds -// an overhead of roughly 50ns per element of input. -func (iter Iterator[T]) ForEach(input []T, f func(*T)) { - iter.ForEachIdx(input, func(_ int, t *T) { - f(t) - }) -} - -// ForEachIdx is the same as ForEach except it also provides the -// index of the element to the callback. -func ForEachIdx[T any](input []T, f func(int, *T)) { Iterator[T]{}.ForEachIdx(input, f) } - -// ForEachIdx is the same as ForEach except it also provides the -// index of the element to the callback. -func (iter Iterator[T]) ForEachIdx(input []T, f func(int, *T)) { - if iter.MaxGoroutines == 0 { - // iter is a value receiver and is hence safe to mutate - iter.MaxGoroutines = defaultMaxGoroutines() - } - - numInput := len(input) - if iter.MaxGoroutines > numInput { - // No more concurrent tasks than the number of input items. - iter.MaxGoroutines = numInput - } - - var idx atomic.Int64 - // Create the task outside the loop to avoid extra closure allocations. - task := func() { - i := int(idx.Add(1) - 1) - for ; i < numInput; i = int(idx.Add(1) - 1) { - f(i, &input[i]) - } - } - - var wg conc.WaitGroup - for i := 0; i < iter.MaxGoroutines; i++ { - wg.Go(task) - } - wg.Wait() -} diff --git a/vendor/github.com/sourcegraph/conc/iter/map.go b/vendor/github.com/sourcegraph/conc/iter/map.go deleted file mode 100644 index efbe6bf..0000000 --- a/vendor/github.com/sourcegraph/conc/iter/map.go +++ /dev/null @@ -1,65 +0,0 @@ -package iter - -import ( - "sync" - - "github.com/sourcegraph/conc/internal/multierror" -) - -// Mapper is an Iterator with a result type R. It can be used to configure -// the behaviour of Map and MapErr. The zero value is safe to use with -// reasonable defaults. -// -// Mapper is also safe for reuse and concurrent use. -type Mapper[T, R any] Iterator[T] - -// Map applies f to each element of input, returning the mapped result. -// -// Map always uses at most runtime.GOMAXPROCS goroutines. For a configurable -// goroutine limit, use a custom Mapper. -func Map[T, R any](input []T, f func(*T) R) []R { - return Mapper[T, R]{}.Map(input, f) -} - -// Map applies f to each element of input, returning the mapped result. -// -// Map uses up to the configured Mapper's maximum number of goroutines. -func (m Mapper[T, R]) Map(input []T, f func(*T) R) []R { - res := make([]R, len(input)) - Iterator[T](m).ForEachIdx(input, func(i int, t *T) { - res[i] = f(t) - }) - return res -} - -// MapErr applies f to each element of the input, returning the mapped result -// and a combined error of all returned errors. -// -// Map always uses at most runtime.GOMAXPROCS goroutines. For a configurable -// goroutine limit, use a custom Mapper. -func MapErr[T, R any](input []T, f func(*T) (R, error)) ([]R, error) { - return Mapper[T, R]{}.MapErr(input, f) -} - -// MapErr applies f to each element of the input, returning the mapped result -// and a combined error of all returned errors. -// -// Map uses up to the configured Mapper's maximum number of goroutines. -func (m Mapper[T, R]) MapErr(input []T, f func(*T) (R, error)) ([]R, error) { - var ( - res = make([]R, len(input)) - errMux sync.Mutex - errs error - ) - Iterator[T](m).ForEachIdx(input, func(i int, t *T) { - var err error - res[i], err = f(t) - if err != nil { - errMux.Lock() - // TODO: use stdlib errors once multierrors land in go 1.20 - errs = multierror.Join(errs, err) - errMux.Unlock() - } - }) - return res, errs -} diff --git a/vendor/github.com/sourcegraph/conc/panics/panics.go b/vendor/github.com/sourcegraph/conc/panics/panics.go deleted file mode 100644 index abbed7f..0000000 --- a/vendor/github.com/sourcegraph/conc/panics/panics.go +++ /dev/null @@ -1,102 +0,0 @@ -package panics - -import ( - "fmt" - "runtime" - "runtime/debug" - "sync/atomic" -) - -// Catcher is used to catch panics. You can execute a function with Try, -// which will catch any spawned panic. Try can be called any number of times, -// from any number of goroutines. Once all calls to Try have completed, you can -// get the value of the first panic (if any) with Recovered(), or you can just -// propagate the panic (re-panic) with Repanic(). -type Catcher struct { - recovered atomic.Pointer[Recovered] -} - -// Try executes f, catching any panic it might spawn. It is safe -// to call from multiple goroutines simultaneously. -func (p *Catcher) Try(f func()) { - defer p.tryRecover() - f() -} - -func (p *Catcher) tryRecover() { - if val := recover(); val != nil { - rp := NewRecovered(1, val) - p.recovered.CompareAndSwap(nil, &rp) - } -} - -// Repanic panics if any calls to Try caught a panic. It will panic with the -// value of the first panic caught, wrapped in a panics.Recovered with caller -// information. -func (p *Catcher) Repanic() { - if val := p.Recovered(); val != nil { - panic(val) - } -} - -// Recovered returns the value of the first panic caught by Try, or nil if -// no calls to Try panicked. -func (p *Catcher) Recovered() *Recovered { - return p.recovered.Load() -} - -// NewRecovered creates a panics.Recovered from a panic value and a collected -// stacktrace. The skip parameter allows the caller to skip stack frames when -// collecting the stacktrace. Calling with a skip of 0 means include the call to -// NewRecovered in the stacktrace. -func NewRecovered(skip int, value any) Recovered { - // 64 frames should be plenty - var callers [64]uintptr - n := runtime.Callers(skip+1, callers[:]) - return Recovered{ - Value: value, - Callers: callers[:n], - Stack: debug.Stack(), - } -} - -// Recovered is a panic that was caught with recover(). -type Recovered struct { - // The original value of the panic. - Value any - // The caller list as returned by runtime.Callers when the panic was - // recovered. Can be used to produce a more detailed stack information with - // runtime.CallersFrames. - Callers []uintptr - // The formatted stacktrace from the goroutine where the panic was recovered. - // Easier to use than Callers. - Stack []byte -} - -// String renders a human-readable formatting of the panic. -func (p *Recovered) String() string { - return fmt.Sprintf("panic: %v\nstacktrace:\n%s\n", p.Value, p.Stack) -} - -// AsError casts the panic into an error implementation. The implementation -// is unwrappable with the cause of the panic, if the panic was provided one. -func (p *Recovered) AsError() error { - if p == nil { - return nil - } - return &ErrRecovered{*p} -} - -// ErrRecovered wraps a panics.Recovered in an error implementation. -type ErrRecovered struct{ Recovered } - -var _ error = (*ErrRecovered)(nil) - -func (p *ErrRecovered) Error() string { return p.String() } - -func (p *ErrRecovered) Unwrap() error { - if err, ok := p.Value.(error); ok { - return err - } - return nil -} diff --git a/vendor/github.com/sourcegraph/conc/panics/try.go b/vendor/github.com/sourcegraph/conc/panics/try.go deleted file mode 100644 index 4ded92a..0000000 --- a/vendor/github.com/sourcegraph/conc/panics/try.go +++ /dev/null @@ -1,11 +0,0 @@ -package panics - -// Try executes f, catching and returning any panic it might spawn. -// -// The recovered panic can be propagated with panic(), or handled as a normal error with -// (*panics.Recovered).AsError(). -func Try(f func()) *Recovered { - var c Catcher - c.Try(f) - return c.Recovered() -} diff --git a/vendor/github.com/sourcegraph/conc/waitgroup.go b/vendor/github.com/sourcegraph/conc/waitgroup.go deleted file mode 100644 index 47b1bc1..0000000 --- a/vendor/github.com/sourcegraph/conc/waitgroup.go +++ /dev/null @@ -1,52 +0,0 @@ -package conc - -import ( - "sync" - - "github.com/sourcegraph/conc/panics" -) - -// NewWaitGroup creates a new WaitGroup. -func NewWaitGroup() *WaitGroup { - return &WaitGroup{} -} - -// WaitGroup is the primary building block for scoped concurrency. -// Goroutines can be spawned in the WaitGroup with the Go method, -// and calling Wait() will ensure that each of those goroutines exits -// before continuing. Any panics in a child goroutine will be caught -// and propagated to the caller of Wait(). -// -// The zero value of WaitGroup is usable, just like sync.WaitGroup. -// Also like sync.WaitGroup, it must not be copied after first use. -type WaitGroup struct { - wg sync.WaitGroup - pc panics.Catcher -} - -// Go spawns a new goroutine in the WaitGroup. -func (h *WaitGroup) Go(f func()) { - h.wg.Add(1) - go func() { - defer h.wg.Done() - h.pc.Try(f) - }() -} - -// Wait will block until all goroutines spawned with Go exit and will -// propagate any panics spawned in a child goroutine. -func (h *WaitGroup) Wait() { - h.wg.Wait() - - // Propagate a panic if we caught one from a child goroutine. - h.pc.Repanic() -} - -// WaitAndRecover will block until all goroutines spawned with Go exit and -// will return a *panics.Recovered if one of the child goroutines panics. -func (h *WaitGroup) WaitAndRecover() *panics.Recovered { - h.wg.Wait() - - // Return a recovered panic if we caught one from a child goroutine. - return h.pc.Recovered() -} diff --git a/vendor/github.com/spf13/afero/.gitignore b/vendor/github.com/spf13/afero/.gitignore deleted file mode 100644 index 9c1d986..0000000 --- a/vendor/github.com/spf13/afero/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -sftpfs/file1 -sftpfs/test/ diff --git a/vendor/github.com/spf13/afero/LICENSE.txt b/vendor/github.com/spf13/afero/LICENSE.txt deleted file mode 100644 index 298f0e2..0000000 --- a/vendor/github.com/spf13/afero/LICENSE.txt +++ /dev/null @@ -1,174 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/vendor/github.com/spf13/afero/README.md b/vendor/github.com/spf13/afero/README.md deleted file mode 100644 index 3bafbfd..0000000 --- a/vendor/github.com/spf13/afero/README.md +++ /dev/null @@ -1,442 +0,0 @@ -![afero logo-sm](https://cloud.githubusercontent.com/assets/173412/11490338/d50e16dc-97a5-11e5-8b12-019a300d0fcb.png) - -A FileSystem Abstraction System for Go - -[![Test](https://github.com/spf13/afero/actions/workflows/test.yml/badge.svg)](https://github.com/spf13/afero/actions/workflows/test.yml) [![GoDoc](https://godoc.org/github.com/spf13/afero?status.svg)](https://godoc.org/github.com/spf13/afero) [![Join the chat at https://gitter.im/spf13/afero](https://badges.gitter.im/Dev%20Chat.svg)](https://gitter.im/spf13/afero?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - -# Overview - -Afero is a filesystem framework providing a simple, uniform and universal API -interacting with any filesystem, as an abstraction layer providing interfaces, -types and methods. Afero has an exceptionally clean interface and simple design -without needless constructors or initialization methods. - -Afero is also a library providing a base set of interoperable backend -filesystems that make it easy to work with afero while retaining all the power -and benefit of the os and ioutil packages. - -Afero provides significant improvements over using the os package alone, most -notably the ability to create mock and testing filesystems without relying on the disk. - -It is suitable for use in any situation where you would consider using the OS -package as it provides an additional abstraction that makes it easy to use a -memory backed file system during testing. It also adds support for the http -filesystem for full interoperability. - - -## Afero Features - -* A single consistent API for accessing a variety of filesystems -* Interoperation between a variety of file system types -* A set of interfaces to encourage and enforce interoperability between backends -* An atomic cross platform memory backed file system -* Support for compositional (union) file systems by combining multiple file systems acting as one -* Specialized backends which modify existing filesystems (Read Only, Regexp filtered) -* A set of utility functions ported from io, ioutil & hugo to be afero aware -* Wrapper for go 1.16 filesystem abstraction `io/fs.FS` - -# Using Afero - -Afero is easy to use and easier to adopt. - -A few different ways you could use Afero: - -* Use the interfaces alone to define your own file system. -* Wrapper for the OS packages. -* Define different filesystems for different parts of your application. -* Use Afero for mock filesystems while testing - -## Step 1: Install Afero - -First use go get to install the latest version of the library. - - $ go get github.com/spf13/afero - -Next include Afero in your application. -```go -import "github.com/spf13/afero" -``` - -## Step 2: Declare a backend - -First define a package variable and set it to a pointer to a filesystem. -```go -var AppFs = afero.NewMemMapFs() - -or - -var AppFs = afero.NewOsFs() -``` -It is important to note that if you repeat the composite literal you -will be using a completely new and isolated filesystem. In the case of -OsFs it will still use the same underlying filesystem but will reduce -the ability to drop in other filesystems as desired. - -## Step 3: Use it like you would the OS package - -Throughout your application use any function and method like you normally -would. - -So if my application before had: -```go -os.Open("/tmp/foo") -``` -We would replace it with: -```go -AppFs.Open("/tmp/foo") -``` - -`AppFs` being the variable we defined above. - - -## List of all available functions - -File System Methods Available: -```go -Chmod(name string, mode os.FileMode) : error -Chown(name string, uid, gid int) : error -Chtimes(name string, atime time.Time, mtime time.Time) : error -Create(name string) : File, error -Mkdir(name string, perm os.FileMode) : error -MkdirAll(path string, perm os.FileMode) : error -Name() : string -Open(name string) : File, error -OpenFile(name string, flag int, perm os.FileMode) : File, error -Remove(name string) : error -RemoveAll(path string) : error -Rename(oldname, newname string) : error -Stat(name string) : os.FileInfo, error -``` -File Interfaces and Methods Available: -```go -io.Closer -io.Reader -io.ReaderAt -io.Seeker -io.Writer -io.WriterAt - -Name() : string -Readdir(count int) : []os.FileInfo, error -Readdirnames(n int) : []string, error -Stat() : os.FileInfo, error -Sync() : error -Truncate(size int64) : error -WriteString(s string) : ret int, err error -``` -In some applications it may make sense to define a new package that -simply exports the file system variable for easy access from anywhere. - -## Using Afero's utility functions - -Afero provides a set of functions to make it easier to use the underlying file systems. -These functions have been primarily ported from io & ioutil with some developed for Hugo. - -The afero utilities support all afero compatible backends. - -The list of utilities includes: - -```go -DirExists(path string) (bool, error) -Exists(path string) (bool, error) -FileContainsBytes(filename string, subslice []byte) (bool, error) -GetTempDir(subPath string) string -IsDir(path string) (bool, error) -IsEmpty(path string) (bool, error) -ReadDir(dirname string) ([]os.FileInfo, error) -ReadFile(filename string) ([]byte, error) -SafeWriteReader(path string, r io.Reader) (err error) -TempDir(dir, prefix string) (name string, err error) -TempFile(dir, prefix string) (f File, err error) -Walk(root string, walkFn filepath.WalkFunc) error -WriteFile(filename string, data []byte, perm os.FileMode) error -WriteReader(path string, r io.Reader) (err error) -``` -For a complete list see [Afero's GoDoc](https://godoc.org/github.com/spf13/afero) - -They are available under two different approaches to use. You can either call -them directly where the first parameter of each function will be the file -system, or you can declare a new `Afero`, a custom type used to bind these -functions as methods to a given filesystem. - -### Calling utilities directly - -```go -fs := new(afero.MemMapFs) -f, err := afero.TempFile(fs,"", "ioutil-test") - -``` - -### Calling via Afero - -```go -fs := afero.NewMemMapFs() -afs := &afero.Afero{Fs: fs} -f, err := afs.TempFile("", "ioutil-test") -``` - -## Using Afero for Testing - -There is a large benefit to using a mock filesystem for testing. It has a -completely blank state every time it is initialized and can be easily -reproducible regardless of OS. You could create files to your heart’s content -and the file access would be fast while also saving you from all the annoying -issues with deleting temporary files, Windows file locking, etc. The MemMapFs -backend is perfect for testing. - -* Much faster than performing I/O operations on disk -* Avoid security issues and permissions -* Far more control. 'rm -rf /' with confidence -* Test setup is far more easier to do -* No test cleanup needed - -One way to accomplish this is to define a variable as mentioned above. -In your application this will be set to afero.NewOsFs() during testing you -can set it to afero.NewMemMapFs(). - -It wouldn't be uncommon to have each test initialize a blank slate memory -backend. To do this I would define my `appFS = afero.NewOsFs()` somewhere -appropriate in my application code. This approach ensures that Tests are order -independent, with no test relying on the state left by an earlier test. - -Then in my tests I would initialize a new MemMapFs for each test: -```go -func TestExist(t *testing.T) { - appFS := afero.NewMemMapFs() - // create test files and directories - appFS.MkdirAll("src/a", 0755) - afero.WriteFile(appFS, "src/a/b", []byte("file b"), 0644) - afero.WriteFile(appFS, "src/c", []byte("file c"), 0644) - name := "src/c" - _, err := appFS.Stat(name) - if os.IsNotExist(err) { - t.Errorf("file \"%s\" does not exist.\n", name) - } -} -``` - -# Available Backends - -## Operating System Native - -### OsFs - -The first is simply a wrapper around the native OS calls. This makes it -very easy to use as all of the calls are the same as the existing OS -calls. It also makes it trivial to have your code use the OS during -operation and a mock filesystem during testing or as needed. - -```go -appfs := afero.NewOsFs() -appfs.MkdirAll("src/a", 0755) -``` - -## Memory Backed Storage - -### MemMapFs - -Afero also provides a fully atomic memory backed filesystem perfect for use in -mocking and to speed up unnecessary disk io when persistence isn’t -necessary. It is fully concurrent and will work within go routines -safely. - -```go -mm := afero.NewMemMapFs() -mm.MkdirAll("src/a", 0755) -``` - -#### InMemoryFile - -As part of MemMapFs, Afero also provides an atomic, fully concurrent memory -backed file implementation. This can be used in other memory backed file -systems with ease. Plans are to add a radix tree memory stored file -system using InMemoryFile. - -## Network Interfaces - -### SftpFs - -Afero has experimental support for secure file transfer protocol (sftp). Which can -be used to perform file operations over a encrypted channel. - -### GCSFs - -Afero has experimental support for Google Cloud Storage (GCS). You can either set the -`GOOGLE_APPLICATION_CREDENTIALS_JSON` env variable to your JSON credentials or use `opts` in -`NewGcsFS` to configure access to your GCS bucket. - -Some known limitations of the existing implementation: -* No Chmod support - The GCS ACL could probably be mapped to *nix style permissions but that would add another level of complexity and is ignored in this version. -* No Chtimes support - Could be simulated with attributes (gcs a/m-times are set implicitly) but that's is left for another version. -* Not thread safe - Also assumes all file operations are done through the same instance of the GcsFs. File operations between different GcsFs instances are not guaranteed to be consistent. - - -## Filtering Backends - -### BasePathFs - -The BasePathFs restricts all operations to a given path within an Fs. -The given file name to the operations on this Fs will be prepended with -the base path before calling the source Fs. - -```go -bp := afero.NewBasePathFs(afero.NewOsFs(), "/base/path") -``` - -### ReadOnlyFs - -A thin wrapper around the source Fs providing a read only view. - -```go -fs := afero.NewReadOnlyFs(afero.NewOsFs()) -_, err := fs.Create("/file.txt") -// err = syscall.EPERM -``` - -# RegexpFs - -A filtered view on file names, any file NOT matching -the passed regexp will be treated as non-existing. -Files not matching the regexp provided will not be created. -Directories are not filtered. - -```go -fs := afero.NewRegexpFs(afero.NewMemMapFs(), regexp.MustCompile(`\.txt$`)) -_, err := fs.Create("/file.html") -// err = syscall.ENOENT -``` - -### HttpFs - -Afero provides an http compatible backend which can wrap any of the existing -backends. - -The Http package requires a slightly specific version of Open which -returns an http.File type. - -Afero provides an httpFs file system which satisfies this requirement. -Any Afero FileSystem can be used as an httpFs. - -```go -httpFs := afero.NewHttpFs() -fileserver := http.FileServer(httpFs.Dir()) -http.Handle("/", fileserver) -``` - -## Composite Backends - -Afero provides the ability have two filesystems (or more) act as a single -file system. - -### CacheOnReadFs - -The CacheOnReadFs will lazily make copies of any accessed files from the base -layer into the overlay. Subsequent reads will be pulled from the overlay -directly permitting the request is within the cache duration of when it was -created in the overlay. - -If the base filesystem is writeable, any changes to files will be -done first to the base, then to the overlay layer. Write calls to open file -handles like `Write()` or `Truncate()` to the overlay first. - -To writing files to the overlay only, you can use the overlay Fs directly (not -via the union Fs). - -Cache files in the layer for the given time.Duration, a cache duration of 0 -means "forever" meaning the file will not be re-requested from the base ever. - -A read-only base will make the overlay also read-only but still copy files -from the base to the overlay when they're not present (or outdated) in the -caching layer. - -```go -base := afero.NewOsFs() -layer := afero.NewMemMapFs() -ufs := afero.NewCacheOnReadFs(base, layer, 100 * time.Second) -``` - -### CopyOnWriteFs() - -The CopyOnWriteFs is a read only base file system with a potentially -writeable layer on top. - -Read operations will first look in the overlay and if not found there, will -serve the file from the base. - -Changes to the file system will only be made in the overlay. - -Any attempt to modify a file found only in the base will copy the file to the -overlay layer before modification (including opening a file with a writable -handle). - -Removing and Renaming files present only in the base layer is not currently -permitted. If a file is present in the base layer and the overlay, only the -overlay will be removed/renamed. - -```go - base := afero.NewOsFs() - roBase := afero.NewReadOnlyFs(base) - ufs := afero.NewCopyOnWriteFs(roBase, afero.NewMemMapFs()) - - fh, _ = ufs.Create("/home/test/file2.txt") - fh.WriteString("This is a test") - fh.Close() -``` - -In this example all write operations will only occur in memory (MemMapFs) -leaving the base filesystem (OsFs) untouched. - - -## Desired/possible backends - -The following is a short list of possible backends we hope someone will -implement: - -* SSH -* S3 - -# About the project - -## What's in the name - -Afero comes from the latin roots Ad-Facere. - -**"Ad"** is a prefix meaning "to". - -**"Facere"** is a form of the root "faciō" making "make or do". - -The literal meaning of afero is "to make" or "to do" which seems very fitting -for a library that allows one to make files and directories and do things with them. - -The English word that shares the same roots as Afero is "affair". Affair shares -the same concept but as a noun it means "something that is made or done" or "an -object of a particular type". - -It's also nice that unlike some of my other libraries (hugo, cobra, viper) it -Googles very well. - -## Release Notes - -See the [Releases Page](https://github.com/spf13/afero/releases). - -## Contributing - -1. Fork it -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create new Pull Request - -## Contributors - -Names in no particular order: - -* [spf13](https://github.com/spf13) -* [jaqx0r](https://github.com/jaqx0r) -* [mbertschler](https://github.com/mbertschler) -* [xor-gate](https://github.com/xor-gate) - -## License - -Afero is released under the Apache 2.0 license. See -[LICENSE.txt](https://github.com/spf13/afero/blob/master/LICENSE.txt) diff --git a/vendor/github.com/spf13/afero/afero.go b/vendor/github.com/spf13/afero/afero.go deleted file mode 100644 index 39f6585..0000000 --- a/vendor/github.com/spf13/afero/afero.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright © 2014 Steve Francia . -// Copyright 2013 tsuru authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package afero provides types and methods for interacting with the filesystem, -// as an abstraction layer. - -// Afero also provides a few implementations that are mostly interoperable. One that -// uses the operating system filesystem, one that uses memory to store files -// (cross platform) and an interface that should be implemented if you want to -// provide your own filesystem. - -package afero - -import ( - "errors" - "io" - "os" - "time" -) - -type Afero struct { - Fs -} - -// File represents a file in the filesystem. -type File interface { - io.Closer - io.Reader - io.ReaderAt - io.Seeker - io.Writer - io.WriterAt - - Name() string - Readdir(count int) ([]os.FileInfo, error) - Readdirnames(n int) ([]string, error) - Stat() (os.FileInfo, error) - Sync() error - Truncate(size int64) error - WriteString(s string) (ret int, err error) -} - -// Fs is the filesystem interface. -// -// Any simulated or real filesystem should implement this interface. -type Fs interface { - // Create creates a file in the filesystem, returning the file and an - // error, if any happens. - Create(name string) (File, error) - - // Mkdir creates a directory in the filesystem, return an error if any - // happens. - Mkdir(name string, perm os.FileMode) error - - // MkdirAll creates a directory path and all parents that does not exist - // yet. - MkdirAll(path string, perm os.FileMode) error - - // Open opens a file, returning it or an error, if any happens. - Open(name string) (File, error) - - // OpenFile opens a file using the given flags and the given mode. - OpenFile(name string, flag int, perm os.FileMode) (File, error) - - // Remove removes a file identified by name, returning an error, if any - // happens. - Remove(name string) error - - // RemoveAll removes a directory path and any children it contains. It - // does not fail if the path does not exist (return nil). - RemoveAll(path string) error - - // Rename renames a file. - Rename(oldname, newname string) error - - // Stat returns a FileInfo describing the named file, or an error, if any - // happens. - Stat(name string) (os.FileInfo, error) - - // The name of this FileSystem - Name() string - - // Chmod changes the mode of the named file to mode. - Chmod(name string, mode os.FileMode) error - - // Chown changes the uid and gid of the named file. - Chown(name string, uid, gid int) error - - // Chtimes changes the access and modification times of the named file - Chtimes(name string, atime time.Time, mtime time.Time) error -} - -var ( - ErrFileClosed = errors.New("File is closed") - ErrOutOfRange = errors.New("out of range") - ErrTooLarge = errors.New("too large") - ErrFileNotFound = os.ErrNotExist - ErrFileExists = os.ErrExist - ErrDestinationExists = os.ErrExist -) diff --git a/vendor/github.com/spf13/afero/appveyor.yml b/vendor/github.com/spf13/afero/appveyor.yml deleted file mode 100644 index 65e20e8..0000000 --- a/vendor/github.com/spf13/afero/appveyor.yml +++ /dev/null @@ -1,10 +0,0 @@ -# This currently does nothing. We have moved to GitHub action, but this is kept -# until spf13 has disabled this project in AppVeyor. -version: '{build}' -clone_folder: C:\gopath\src\github.com\spf13\afero -environment: - GOPATH: C:\gopath -build_script: -- cmd: >- - go version - diff --git a/vendor/github.com/spf13/afero/basepath.go b/vendor/github.com/spf13/afero/basepath.go deleted file mode 100644 index 2e72793..0000000 --- a/vendor/github.com/spf13/afero/basepath.go +++ /dev/null @@ -1,222 +0,0 @@ -package afero - -import ( - "io/fs" - "os" - "path/filepath" - "runtime" - "strings" - "time" -) - -var ( - _ Lstater = (*BasePathFs)(nil) - _ fs.ReadDirFile = (*BasePathFile)(nil) -) - -// The BasePathFs restricts all operations to a given path within an Fs. -// The given file name to the operations on this Fs will be prepended with -// the base path before calling the base Fs. -// Any file name (after filepath.Clean()) outside this base path will be -// treated as non existing file. -// -// Note that it does not clean the error messages on return, so you may -// reveal the real path on errors. -type BasePathFs struct { - source Fs - path string -} - -type BasePathFile struct { - File - path string -} - -func (f *BasePathFile) Name() string { - sourcename := f.File.Name() - return strings.TrimPrefix(sourcename, filepath.Clean(f.path)) -} - -func (f *BasePathFile) ReadDir(n int) ([]fs.DirEntry, error) { - if rdf, ok := f.File.(fs.ReadDirFile); ok { - return rdf.ReadDir(n) - } - return readDirFile{f.File}.ReadDir(n) -} - -func NewBasePathFs(source Fs, path string) Fs { - return &BasePathFs{source: source, path: path} -} - -// on a file outside the base path it returns the given file name and an error, -// else the given file with the base path prepended -func (b *BasePathFs) RealPath(name string) (path string, err error) { - if err := validateBasePathName(name); err != nil { - return name, err - } - - bpath := filepath.Clean(b.path) - path = filepath.Clean(filepath.Join(bpath, name)) - if !strings.HasPrefix(path, bpath) { - return name, os.ErrNotExist - } - - return path, nil -} - -func validateBasePathName(name string) error { - if runtime.GOOS != "windows" { - // Not much to do here; - // the virtual file paths all look absolute on *nix. - return nil - } - - // On Windows a common mistake would be to provide an absolute OS path - // We could strip out the base part, but that would not be very portable. - if filepath.IsAbs(name) { - return os.ErrNotExist - } - - return nil -} - -func (b *BasePathFs) Chtimes(name string, atime, mtime time.Time) (err error) { - if name, err = b.RealPath(name); err != nil { - return &os.PathError{Op: "chtimes", Path: name, Err: err} - } - return b.source.Chtimes(name, atime, mtime) -} - -func (b *BasePathFs) Chmod(name string, mode os.FileMode) (err error) { - if name, err = b.RealPath(name); err != nil { - return &os.PathError{Op: "chmod", Path: name, Err: err} - } - return b.source.Chmod(name, mode) -} - -func (b *BasePathFs) Chown(name string, uid, gid int) (err error) { - if name, err = b.RealPath(name); err != nil { - return &os.PathError{Op: "chown", Path: name, Err: err} - } - return b.source.Chown(name, uid, gid) -} - -func (b *BasePathFs) Name() string { - return "BasePathFs" -} - -func (b *BasePathFs) Stat(name string) (fi os.FileInfo, err error) { - if name, err = b.RealPath(name); err != nil { - return nil, &os.PathError{Op: "stat", Path: name, Err: err} - } - return b.source.Stat(name) -} - -func (b *BasePathFs) Rename(oldname, newname string) (err error) { - if oldname, err = b.RealPath(oldname); err != nil { - return &os.PathError{Op: "rename", Path: oldname, Err: err} - } - if newname, err = b.RealPath(newname); err != nil { - return &os.PathError{Op: "rename", Path: newname, Err: err} - } - return b.source.Rename(oldname, newname) -} - -func (b *BasePathFs) RemoveAll(name string) (err error) { - if name, err = b.RealPath(name); err != nil { - return &os.PathError{Op: "remove_all", Path: name, Err: err} - } - return b.source.RemoveAll(name) -} - -func (b *BasePathFs) Remove(name string) (err error) { - if name, err = b.RealPath(name); err != nil { - return &os.PathError{Op: "remove", Path: name, Err: err} - } - return b.source.Remove(name) -} - -func (b *BasePathFs) OpenFile(name string, flag int, mode os.FileMode) (f File, err error) { - if name, err = b.RealPath(name); err != nil { - return nil, &os.PathError{Op: "openfile", Path: name, Err: err} - } - sourcef, err := b.source.OpenFile(name, flag, mode) - if err != nil { - return nil, err - } - return &BasePathFile{sourcef, b.path}, nil -} - -func (b *BasePathFs) Open(name string) (f File, err error) { - if name, err = b.RealPath(name); err != nil { - return nil, &os.PathError{Op: "open", Path: name, Err: err} - } - sourcef, err := b.source.Open(name) - if err != nil { - return nil, err - } - return &BasePathFile{File: sourcef, path: b.path}, nil -} - -func (b *BasePathFs) Mkdir(name string, mode os.FileMode) (err error) { - if name, err = b.RealPath(name); err != nil { - return &os.PathError{Op: "mkdir", Path: name, Err: err} - } - return b.source.Mkdir(name, mode) -} - -func (b *BasePathFs) MkdirAll(name string, mode os.FileMode) (err error) { - if name, err = b.RealPath(name); err != nil { - return &os.PathError{Op: "mkdir", Path: name, Err: err} - } - return b.source.MkdirAll(name, mode) -} - -func (b *BasePathFs) Create(name string) (f File, err error) { - if name, err = b.RealPath(name); err != nil { - return nil, &os.PathError{Op: "create", Path: name, Err: err} - } - sourcef, err := b.source.Create(name) - if err != nil { - return nil, err - } - return &BasePathFile{File: sourcef, path: b.path}, nil -} - -func (b *BasePathFs) LstatIfPossible(name string) (os.FileInfo, bool, error) { - name, err := b.RealPath(name) - if err != nil { - return nil, false, &os.PathError{Op: "lstat", Path: name, Err: err} - } - if lstater, ok := b.source.(Lstater); ok { - return lstater.LstatIfPossible(name) - } - fi, err := b.source.Stat(name) - return fi, false, err -} - -func (b *BasePathFs) SymlinkIfPossible(oldname, newname string) error { - oldname, err := b.RealPath(oldname) - if err != nil { - return &os.LinkError{Op: "symlink", Old: oldname, New: newname, Err: err} - } - newname, err = b.RealPath(newname) - if err != nil { - return &os.LinkError{Op: "symlink", Old: oldname, New: newname, Err: err} - } - if linker, ok := b.source.(Linker); ok { - return linker.SymlinkIfPossible(oldname, newname) - } - return &os.LinkError{Op: "symlink", Old: oldname, New: newname, Err: ErrNoSymlink} -} - -func (b *BasePathFs) ReadlinkIfPossible(name string) (string, error) { - name, err := b.RealPath(name) - if err != nil { - return "", &os.PathError{Op: "readlink", Path: name, Err: err} - } - if reader, ok := b.source.(LinkReader); ok { - return reader.ReadlinkIfPossible(name) - } - return "", &os.PathError{Op: "readlink", Path: name, Err: ErrNoReadlink} -} diff --git a/vendor/github.com/spf13/afero/cacheOnReadFs.go b/vendor/github.com/spf13/afero/cacheOnReadFs.go deleted file mode 100644 index 017d344..0000000 --- a/vendor/github.com/spf13/afero/cacheOnReadFs.go +++ /dev/null @@ -1,315 +0,0 @@ -package afero - -import ( - "os" - "syscall" - "time" -) - -// If the cache duration is 0, cache time will be unlimited, i.e. once -// a file is in the layer, the base will never be read again for this file. -// -// For cache times greater than 0, the modification time of a file is -// checked. Note that a lot of file system implementations only allow a -// resolution of a second for timestamps... or as the godoc for os.Chtimes() -// states: "The underlying filesystem may truncate or round the values to a -// less precise time unit." -// -// This caching union will forward all write calls also to the base file -// system first. To prevent writing to the base Fs, wrap it in a read-only -// filter - Note: this will also make the overlay read-only, for writing files -// in the overlay, use the overlay Fs directly, not via the union Fs. -type CacheOnReadFs struct { - base Fs - layer Fs - cacheTime time.Duration -} - -func NewCacheOnReadFs(base Fs, layer Fs, cacheTime time.Duration) Fs { - return &CacheOnReadFs{base: base, layer: layer, cacheTime: cacheTime} -} - -type cacheState int - -const ( - // not present in the overlay, unknown if it exists in the base: - cacheMiss cacheState = iota - // present in the overlay and in base, base file is newer: - cacheStale - // present in the overlay - with cache time == 0 it may exist in the base, - // with cacheTime > 0 it exists in the base and is same age or newer in the - // overlay - cacheHit - // happens if someone writes directly to the overlay without - // going through this union - cacheLocal -) - -func (u *CacheOnReadFs) cacheStatus(name string) (state cacheState, fi os.FileInfo, err error) { - var lfi, bfi os.FileInfo - lfi, err = u.layer.Stat(name) - if err == nil { - if u.cacheTime == 0 { - return cacheHit, lfi, nil - } - if lfi.ModTime().Add(u.cacheTime).Before(time.Now()) { - bfi, err = u.base.Stat(name) - if err != nil { - return cacheLocal, lfi, nil - } - if bfi.ModTime().After(lfi.ModTime()) { - return cacheStale, bfi, nil - } - } - return cacheHit, lfi, nil - } - - if err == syscall.ENOENT || os.IsNotExist(err) { - return cacheMiss, nil, nil - } - - return cacheMiss, nil, err -} - -func (u *CacheOnReadFs) copyToLayer(name string) error { - return copyToLayer(u.base, u.layer, name) -} - -func (u *CacheOnReadFs) copyFileToLayer(name string, flag int, perm os.FileMode) error { - return copyFileToLayer(u.base, u.layer, name, flag, perm) -} - -func (u *CacheOnReadFs) Chtimes(name string, atime, mtime time.Time) error { - st, _, err := u.cacheStatus(name) - if err != nil { - return err - } - switch st { - case cacheLocal: - case cacheHit: - err = u.base.Chtimes(name, atime, mtime) - case cacheStale, cacheMiss: - if err := u.copyToLayer(name); err != nil { - return err - } - err = u.base.Chtimes(name, atime, mtime) - } - if err != nil { - return err - } - return u.layer.Chtimes(name, atime, mtime) -} - -func (u *CacheOnReadFs) Chmod(name string, mode os.FileMode) error { - st, _, err := u.cacheStatus(name) - if err != nil { - return err - } - switch st { - case cacheLocal: - case cacheHit: - err = u.base.Chmod(name, mode) - case cacheStale, cacheMiss: - if err := u.copyToLayer(name); err != nil { - return err - } - err = u.base.Chmod(name, mode) - } - if err != nil { - return err - } - return u.layer.Chmod(name, mode) -} - -func (u *CacheOnReadFs) Chown(name string, uid, gid int) error { - st, _, err := u.cacheStatus(name) - if err != nil { - return err - } - switch st { - case cacheLocal: - case cacheHit: - err = u.base.Chown(name, uid, gid) - case cacheStale, cacheMiss: - if err := u.copyToLayer(name); err != nil { - return err - } - err = u.base.Chown(name, uid, gid) - } - if err != nil { - return err - } - return u.layer.Chown(name, uid, gid) -} - -func (u *CacheOnReadFs) Stat(name string) (os.FileInfo, error) { - st, fi, err := u.cacheStatus(name) - if err != nil { - return nil, err - } - switch st { - case cacheMiss: - return u.base.Stat(name) - default: // cacheStale has base, cacheHit and cacheLocal the layer os.FileInfo - return fi, nil - } -} - -func (u *CacheOnReadFs) Rename(oldname, newname string) error { - st, _, err := u.cacheStatus(oldname) - if err != nil { - return err - } - switch st { - case cacheLocal: - case cacheHit: - err = u.base.Rename(oldname, newname) - case cacheStale, cacheMiss: - if err := u.copyToLayer(oldname); err != nil { - return err - } - err = u.base.Rename(oldname, newname) - } - if err != nil { - return err - } - return u.layer.Rename(oldname, newname) -} - -func (u *CacheOnReadFs) Remove(name string) error { - st, _, err := u.cacheStatus(name) - if err != nil { - return err - } - switch st { - case cacheLocal: - case cacheHit, cacheStale, cacheMiss: - err = u.base.Remove(name) - } - if err != nil { - return err - } - return u.layer.Remove(name) -} - -func (u *CacheOnReadFs) RemoveAll(name string) error { - st, _, err := u.cacheStatus(name) - if err != nil { - return err - } - switch st { - case cacheLocal: - case cacheHit, cacheStale, cacheMiss: - err = u.base.RemoveAll(name) - } - if err != nil { - return err - } - return u.layer.RemoveAll(name) -} - -func (u *CacheOnReadFs) OpenFile(name string, flag int, perm os.FileMode) (File, error) { - st, _, err := u.cacheStatus(name) - if err != nil { - return nil, err - } - switch st { - case cacheLocal, cacheHit: - default: - if err := u.copyFileToLayer(name, flag, perm); err != nil { - return nil, err - } - } - if flag&(os.O_WRONLY|syscall.O_RDWR|os.O_APPEND|os.O_CREATE|os.O_TRUNC) != 0 { - bfi, err := u.base.OpenFile(name, flag, perm) - if err != nil { - return nil, err - } - lfi, err := u.layer.OpenFile(name, flag, perm) - if err != nil { - bfi.Close() // oops, what if O_TRUNC was set and file opening in the layer failed...? - return nil, err - } - return &UnionFile{Base: bfi, Layer: lfi}, nil - } - return u.layer.OpenFile(name, flag, perm) -} - -func (u *CacheOnReadFs) Open(name string) (File, error) { - st, fi, err := u.cacheStatus(name) - if err != nil { - return nil, err - } - - switch st { - case cacheLocal: - return u.layer.Open(name) - - case cacheMiss: - bfi, err := u.base.Stat(name) - if err != nil { - return nil, err - } - if bfi.IsDir() { - return u.base.Open(name) - } - if err := u.copyToLayer(name); err != nil { - return nil, err - } - return u.layer.Open(name) - - case cacheStale: - if !fi.IsDir() { - if err := u.copyToLayer(name); err != nil { - return nil, err - } - return u.layer.Open(name) - } - case cacheHit: - if !fi.IsDir() { - return u.layer.Open(name) - } - } - // the dirs from cacheHit, cacheStale fall down here: - bfile, _ := u.base.Open(name) - lfile, err := u.layer.Open(name) - if err != nil && bfile == nil { - return nil, err - } - return &UnionFile{Base: bfile, Layer: lfile}, nil -} - -func (u *CacheOnReadFs) Mkdir(name string, perm os.FileMode) error { - err := u.base.Mkdir(name, perm) - if err != nil { - return err - } - return u.layer.MkdirAll(name, perm) // yes, MkdirAll... we cannot assume it exists in the cache -} - -func (u *CacheOnReadFs) Name() string { - return "CacheOnReadFs" -} - -func (u *CacheOnReadFs) MkdirAll(name string, perm os.FileMode) error { - err := u.base.MkdirAll(name, perm) - if err != nil { - return err - } - return u.layer.MkdirAll(name, perm) -} - -func (u *CacheOnReadFs) Create(name string) (File, error) { - bfh, err := u.base.Create(name) - if err != nil { - return nil, err - } - lfh, err := u.layer.Create(name) - if err != nil { - // oops, see comment about OS_TRUNC above, should we remove? then we have to - // remember if the file did not exist before - bfh.Close() - return nil, err - } - return &UnionFile{Base: bfh, Layer: lfh}, nil -} diff --git a/vendor/github.com/spf13/afero/const_bsds.go b/vendor/github.com/spf13/afero/const_bsds.go deleted file mode 100644 index 30855de..0000000 --- a/vendor/github.com/spf13/afero/const_bsds.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright © 2016 Steve Francia . -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build aix || darwin || openbsd || freebsd || netbsd || dragonfly || zos -// +build aix darwin openbsd freebsd netbsd dragonfly zos - -package afero - -import ( - "syscall" -) - -const BADFD = syscall.EBADF diff --git a/vendor/github.com/spf13/afero/const_win_unix.go b/vendor/github.com/spf13/afero/const_win_unix.go deleted file mode 100644 index 12792d2..0000000 --- a/vendor/github.com/spf13/afero/const_win_unix.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © 2016 Steve Francia . -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//go:build !darwin && !openbsd && !freebsd && !dragonfly && !netbsd && !aix && !zos -// +build !darwin,!openbsd,!freebsd,!dragonfly,!netbsd,!aix,!zos - -package afero - -import ( - "syscall" -) - -const BADFD = syscall.EBADFD diff --git a/vendor/github.com/spf13/afero/copyOnWriteFs.go b/vendor/github.com/spf13/afero/copyOnWriteFs.go deleted file mode 100644 index 184d6dd..0000000 --- a/vendor/github.com/spf13/afero/copyOnWriteFs.go +++ /dev/null @@ -1,327 +0,0 @@ -package afero - -import ( - "fmt" - "os" - "path/filepath" - "syscall" - "time" -) - -var _ Lstater = (*CopyOnWriteFs)(nil) - -// The CopyOnWriteFs is a union filesystem: a read only base file system with -// a possibly writeable layer on top. Changes to the file system will only -// be made in the overlay: Changing an existing file in the base layer which -// is not present in the overlay will copy the file to the overlay ("changing" -// includes also calls to e.g. Chtimes(), Chmod() and Chown()). -// -// Reading directories is currently only supported via Open(), not OpenFile(). -type CopyOnWriteFs struct { - base Fs - layer Fs -} - -func NewCopyOnWriteFs(base Fs, layer Fs) Fs { - return &CopyOnWriteFs{base: base, layer: layer} -} - -// Returns true if the file is not in the overlay -func (u *CopyOnWriteFs) isBaseFile(name string) (bool, error) { - if _, err := u.layer.Stat(name); err == nil { - return false, nil - } - _, err := u.base.Stat(name) - if err != nil { - if oerr, ok := err.(*os.PathError); ok { - if oerr.Err == os.ErrNotExist || oerr.Err == syscall.ENOENT || oerr.Err == syscall.ENOTDIR { - return false, nil - } - } - if err == syscall.ENOENT { - return false, nil - } - } - return true, err -} - -func (u *CopyOnWriteFs) copyToLayer(name string) error { - return copyToLayer(u.base, u.layer, name) -} - -func (u *CopyOnWriteFs) Chtimes(name string, atime, mtime time.Time) error { - b, err := u.isBaseFile(name) - if err != nil { - return err - } - if b { - if err := u.copyToLayer(name); err != nil { - return err - } - } - return u.layer.Chtimes(name, atime, mtime) -} - -func (u *CopyOnWriteFs) Chmod(name string, mode os.FileMode) error { - b, err := u.isBaseFile(name) - if err != nil { - return err - } - if b { - if err := u.copyToLayer(name); err != nil { - return err - } - } - return u.layer.Chmod(name, mode) -} - -func (u *CopyOnWriteFs) Chown(name string, uid, gid int) error { - b, err := u.isBaseFile(name) - if err != nil { - return err - } - if b { - if err := u.copyToLayer(name); err != nil { - return err - } - } - return u.layer.Chown(name, uid, gid) -} - -func (u *CopyOnWriteFs) Stat(name string) (os.FileInfo, error) { - fi, err := u.layer.Stat(name) - if err != nil { - isNotExist := u.isNotExist(err) - if isNotExist { - return u.base.Stat(name) - } - return nil, err - } - return fi, nil -} - -func (u *CopyOnWriteFs) LstatIfPossible(name string) (os.FileInfo, bool, error) { - llayer, ok1 := u.layer.(Lstater) - lbase, ok2 := u.base.(Lstater) - - if ok1 { - fi, b, err := llayer.LstatIfPossible(name) - if err == nil { - return fi, b, nil - } - - if !u.isNotExist(err) { - return nil, b, err - } - } - - if ok2 { - fi, b, err := lbase.LstatIfPossible(name) - if err == nil { - return fi, b, nil - } - if !u.isNotExist(err) { - return nil, b, err - } - } - - fi, err := u.Stat(name) - - return fi, false, err -} - -func (u *CopyOnWriteFs) SymlinkIfPossible(oldname, newname string) error { - if slayer, ok := u.layer.(Linker); ok { - return slayer.SymlinkIfPossible(oldname, newname) - } - - return &os.LinkError{Op: "symlink", Old: oldname, New: newname, Err: ErrNoSymlink} -} - -func (u *CopyOnWriteFs) ReadlinkIfPossible(name string) (string, error) { - if rlayer, ok := u.layer.(LinkReader); ok { - return rlayer.ReadlinkIfPossible(name) - } - - if rbase, ok := u.base.(LinkReader); ok { - return rbase.ReadlinkIfPossible(name) - } - - return "", &os.PathError{Op: "readlink", Path: name, Err: ErrNoReadlink} -} - -func (u *CopyOnWriteFs) isNotExist(err error) bool { - if e, ok := err.(*os.PathError); ok { - err = e.Err - } - if err == os.ErrNotExist || err == syscall.ENOENT || err == syscall.ENOTDIR { - return true - } - return false -} - -// Renaming files present only in the base layer is not permitted -func (u *CopyOnWriteFs) Rename(oldname, newname string) error { - b, err := u.isBaseFile(oldname) - if err != nil { - return err - } - if b { - return syscall.EPERM - } - return u.layer.Rename(oldname, newname) -} - -// Removing files present only in the base layer is not permitted. If -// a file is present in the base layer and the overlay, only the overlay -// will be removed. -func (u *CopyOnWriteFs) Remove(name string) error { - err := u.layer.Remove(name) - switch err { - case syscall.ENOENT: - _, err = u.base.Stat(name) - if err == nil { - return syscall.EPERM - } - return syscall.ENOENT - default: - return err - } -} - -func (u *CopyOnWriteFs) RemoveAll(name string) error { - err := u.layer.RemoveAll(name) - switch err { - case syscall.ENOENT: - _, err = u.base.Stat(name) - if err == nil { - return syscall.EPERM - } - return syscall.ENOENT - default: - return err - } -} - -func (u *CopyOnWriteFs) OpenFile(name string, flag int, perm os.FileMode) (File, error) { - b, err := u.isBaseFile(name) - if err != nil { - return nil, err - } - - if flag&(os.O_WRONLY|os.O_RDWR|os.O_APPEND|os.O_CREATE|os.O_TRUNC) != 0 { - if b { - if err = u.copyToLayer(name); err != nil { - return nil, err - } - return u.layer.OpenFile(name, flag, perm) - } - - dir := filepath.Dir(name) - isaDir, err := IsDir(u.base, dir) - if err != nil && !os.IsNotExist(err) { - return nil, err - } - if isaDir { - if err = u.layer.MkdirAll(dir, 0o777); err != nil { - return nil, err - } - return u.layer.OpenFile(name, flag, perm) - } - - isaDir, err = IsDir(u.layer, dir) - if err != nil { - return nil, err - } - if isaDir { - return u.layer.OpenFile(name, flag, perm) - } - - return nil, &os.PathError{Op: "open", Path: name, Err: syscall.ENOTDIR} // ...or os.ErrNotExist? - } - if b { - return u.base.OpenFile(name, flag, perm) - } - return u.layer.OpenFile(name, flag, perm) -} - -// This function handles the 9 different possibilities caused -// by the union which are the intersection of the following... -// -// layer: doesn't exist, exists as a file, and exists as a directory -// base: doesn't exist, exists as a file, and exists as a directory -func (u *CopyOnWriteFs) Open(name string) (File, error) { - // Since the overlay overrides the base we check that first - b, err := u.isBaseFile(name) - if err != nil { - return nil, err - } - - // If overlay doesn't exist, return the base (base state irrelevant) - if b { - return u.base.Open(name) - } - - // If overlay is a file, return it (base state irrelevant) - dir, err := IsDir(u.layer, name) - if err != nil { - return nil, err - } - if !dir { - return u.layer.Open(name) - } - - // Overlay is a directory, base state now matters. - // Base state has 3 states to check but 2 outcomes: - // A. It's a file or non-readable in the base (return just the overlay) - // B. It's an accessible directory in the base (return a UnionFile) - - // If base is file or nonreadable, return overlay - dir, err = IsDir(u.base, name) - if !dir || err != nil { - return u.layer.Open(name) - } - - // Both base & layer are directories - // Return union file (if opens are without error) - bfile, bErr := u.base.Open(name) - lfile, lErr := u.layer.Open(name) - - // If either have errors at this point something is very wrong. Return nil and the errors - if bErr != nil || lErr != nil { - return nil, fmt.Errorf("BaseErr: %v\nOverlayErr: %v", bErr, lErr) - } - - return &UnionFile{Base: bfile, Layer: lfile}, nil -} - -func (u *CopyOnWriteFs) Mkdir(name string, perm os.FileMode) error { - dir, err := IsDir(u.base, name) - if err != nil { - return u.layer.MkdirAll(name, perm) - } - if dir { - return ErrFileExists - } - return u.layer.MkdirAll(name, perm) -} - -func (u *CopyOnWriteFs) Name() string { - return "CopyOnWriteFs" -} - -func (u *CopyOnWriteFs) MkdirAll(name string, perm os.FileMode) error { - dir, err := IsDir(u.base, name) - if err != nil { - return u.layer.MkdirAll(name, perm) - } - if dir { - // This is in line with how os.MkdirAll behaves. - return nil - } - return u.layer.MkdirAll(name, perm) -} - -func (u *CopyOnWriteFs) Create(name string) (File, error) { - return u.OpenFile(name, os.O_CREATE|os.O_TRUNC|os.O_RDWR, 0o666) -} diff --git a/vendor/github.com/spf13/afero/httpFs.go b/vendor/github.com/spf13/afero/httpFs.go deleted file mode 100644 index ac0de6d..0000000 --- a/vendor/github.com/spf13/afero/httpFs.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package afero - -import ( - "errors" - "net/http" - "os" - "path" - "path/filepath" - "strings" - "time" -) - -type httpDir struct { - basePath string - fs HttpFs -} - -func (d httpDir) Open(name string) (http.File, error) { - if filepath.Separator != '/' && strings.ContainsRune(name, filepath.Separator) || - strings.Contains(name, "\x00") { - return nil, errors.New("http: invalid character in file path") - } - dir := string(d.basePath) - if dir == "" { - dir = "." - } - - f, err := d.fs.Open(filepath.Join(dir, filepath.FromSlash(path.Clean("/"+name)))) - if err != nil { - return nil, err - } - return f, nil -} - -type HttpFs struct { - source Fs -} - -func NewHttpFs(source Fs) *HttpFs { - return &HttpFs{source: source} -} - -func (h HttpFs) Dir(s string) *httpDir { - return &httpDir{basePath: s, fs: h} -} - -func (h HttpFs) Name() string { return "h HttpFs" } - -func (h HttpFs) Create(name string) (File, error) { - return h.source.Create(name) -} - -func (h HttpFs) Chmod(name string, mode os.FileMode) error { - return h.source.Chmod(name, mode) -} - -func (h HttpFs) Chown(name string, uid, gid int) error { - return h.source.Chown(name, uid, gid) -} - -func (h HttpFs) Chtimes(name string, atime time.Time, mtime time.Time) error { - return h.source.Chtimes(name, atime, mtime) -} - -func (h HttpFs) Mkdir(name string, perm os.FileMode) error { - return h.source.Mkdir(name, perm) -} - -func (h HttpFs) MkdirAll(path string, perm os.FileMode) error { - return h.source.MkdirAll(path, perm) -} - -func (h HttpFs) Open(name string) (http.File, error) { - f, err := h.source.Open(name) - if err == nil { - if httpfile, ok := f.(http.File); ok { - return httpfile, nil - } - } - return nil, err -} - -func (h HttpFs) OpenFile(name string, flag int, perm os.FileMode) (File, error) { - return h.source.OpenFile(name, flag, perm) -} - -func (h HttpFs) Remove(name string) error { - return h.source.Remove(name) -} - -func (h HttpFs) RemoveAll(path string) error { - return h.source.RemoveAll(path) -} - -func (h HttpFs) Rename(oldname, newname string) error { - return h.source.Rename(oldname, newname) -} - -func (h HttpFs) Stat(name string) (os.FileInfo, error) { - return h.source.Stat(name) -} diff --git a/vendor/github.com/spf13/afero/internal/common/adapters.go b/vendor/github.com/spf13/afero/internal/common/adapters.go deleted file mode 100644 index 60685ca..0000000 --- a/vendor/github.com/spf13/afero/internal/common/adapters.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright © 2022 Steve Francia . -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package common - -import "io/fs" - -// FileInfoDirEntry provides an adapter from os.FileInfo to fs.DirEntry -type FileInfoDirEntry struct { - fs.FileInfo -} - -var _ fs.DirEntry = FileInfoDirEntry{} - -func (d FileInfoDirEntry) Type() fs.FileMode { return d.FileInfo.Mode().Type() } - -func (d FileInfoDirEntry) Info() (fs.FileInfo, error) { return d.FileInfo, nil } diff --git a/vendor/github.com/spf13/afero/iofs.go b/vendor/github.com/spf13/afero/iofs.go deleted file mode 100644 index 938b931..0000000 --- a/vendor/github.com/spf13/afero/iofs.go +++ /dev/null @@ -1,298 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -package afero - -import ( - "io" - "io/fs" - "os" - "path" - "sort" - "time" - - "github.com/spf13/afero/internal/common" -) - -// IOFS adopts afero.Fs to stdlib io/fs.FS -type IOFS struct { - Fs -} - -func NewIOFS(fs Fs) IOFS { - return IOFS{Fs: fs} -} - -var ( - _ fs.FS = IOFS{} - _ fs.GlobFS = IOFS{} - _ fs.ReadDirFS = IOFS{} - _ fs.ReadFileFS = IOFS{} - _ fs.StatFS = IOFS{} - _ fs.SubFS = IOFS{} -) - -func (iofs IOFS) Open(name string) (fs.File, error) { - const op = "open" - - // by convention for fs.FS implementations we should perform this check - if !fs.ValidPath(name) { - return nil, iofs.wrapError(op, name, fs.ErrInvalid) - } - - file, err := iofs.Fs.Open(name) - if err != nil { - return nil, iofs.wrapError(op, name, err) - } - - // file should implement fs.ReadDirFile - if _, ok := file.(fs.ReadDirFile); !ok { - file = readDirFile{file} - } - - return file, nil -} - -func (iofs IOFS) Glob(pattern string) ([]string, error) { - const op = "glob" - - // afero.Glob does not perform this check but it's required for implementations - if _, err := path.Match(pattern, ""); err != nil { - return nil, iofs.wrapError(op, pattern, err) - } - - items, err := Glob(iofs.Fs, pattern) - if err != nil { - return nil, iofs.wrapError(op, pattern, err) - } - - return items, nil -} - -func (iofs IOFS) ReadDir(name string) ([]fs.DirEntry, error) { - f, err := iofs.Fs.Open(name) - if err != nil { - return nil, iofs.wrapError("readdir", name, err) - } - - defer f.Close() - - if rdf, ok := f.(fs.ReadDirFile); ok { - items, err := rdf.ReadDir(-1) - if err != nil { - return nil, iofs.wrapError("readdir", name, err) - } - sort.Slice(items, func(i, j int) bool { return items[i].Name() < items[j].Name() }) - return items, nil - } - - items, err := f.Readdir(-1) - if err != nil { - return nil, iofs.wrapError("readdir", name, err) - } - sort.Sort(byName(items)) - - ret := make([]fs.DirEntry, len(items)) - for i := range items { - ret[i] = common.FileInfoDirEntry{FileInfo: items[i]} - } - - return ret, nil -} - -func (iofs IOFS) ReadFile(name string) ([]byte, error) { - const op = "readfile" - - if !fs.ValidPath(name) { - return nil, iofs.wrapError(op, name, fs.ErrInvalid) - } - - bytes, err := ReadFile(iofs.Fs, name) - if err != nil { - return nil, iofs.wrapError(op, name, err) - } - - return bytes, nil -} - -func (iofs IOFS) Sub(dir string) (fs.FS, error) { return IOFS{NewBasePathFs(iofs.Fs, dir)}, nil } - -func (IOFS) wrapError(op, path string, err error) error { - if _, ok := err.(*fs.PathError); ok { - return err // don't need to wrap again - } - - return &fs.PathError{ - Op: op, - Path: path, - Err: err, - } -} - -// readDirFile provides adapter from afero.File to fs.ReadDirFile needed for correct Open -type readDirFile struct { - File -} - -var _ fs.ReadDirFile = readDirFile{} - -func (r readDirFile) ReadDir(n int) ([]fs.DirEntry, error) { - items, err := r.File.Readdir(n) - if err != nil { - return nil, err - } - - ret := make([]fs.DirEntry, len(items)) - for i := range items { - ret[i] = common.FileInfoDirEntry{FileInfo: items[i]} - } - - return ret, nil -} - -// FromIOFS adopts io/fs.FS to use it as afero.Fs -// Note that io/fs.FS is read-only so all mutating methods will return fs.PathError with fs.ErrPermission -// To store modifications you may use afero.CopyOnWriteFs -type FromIOFS struct { - fs.FS -} - -var _ Fs = FromIOFS{} - -func (f FromIOFS) Create(name string) (File, error) { return nil, notImplemented("create", name) } - -func (f FromIOFS) Mkdir(name string, perm os.FileMode) error { return notImplemented("mkdir", name) } - -func (f FromIOFS) MkdirAll(path string, perm os.FileMode) error { - return notImplemented("mkdirall", path) -} - -func (f FromIOFS) Open(name string) (File, error) { - file, err := f.FS.Open(name) - if err != nil { - return nil, err - } - - return fromIOFSFile{File: file, name: name}, nil -} - -func (f FromIOFS) OpenFile(name string, flag int, perm os.FileMode) (File, error) { - return f.Open(name) -} - -func (f FromIOFS) Remove(name string) error { - return notImplemented("remove", name) -} - -func (f FromIOFS) RemoveAll(path string) error { - return notImplemented("removeall", path) -} - -func (f FromIOFS) Rename(oldname, newname string) error { - return notImplemented("rename", oldname) -} - -func (f FromIOFS) Stat(name string) (os.FileInfo, error) { return fs.Stat(f.FS, name) } - -func (f FromIOFS) Name() string { return "fromiofs" } - -func (f FromIOFS) Chmod(name string, mode os.FileMode) error { - return notImplemented("chmod", name) -} - -func (f FromIOFS) Chown(name string, uid, gid int) error { - return notImplemented("chown", name) -} - -func (f FromIOFS) Chtimes(name string, atime time.Time, mtime time.Time) error { - return notImplemented("chtimes", name) -} - -type fromIOFSFile struct { - fs.File - name string -} - -func (f fromIOFSFile) ReadAt(p []byte, off int64) (n int, err error) { - readerAt, ok := f.File.(io.ReaderAt) - if !ok { - return -1, notImplemented("readat", f.name) - } - - return readerAt.ReadAt(p, off) -} - -func (f fromIOFSFile) Seek(offset int64, whence int) (int64, error) { - seeker, ok := f.File.(io.Seeker) - if !ok { - return -1, notImplemented("seek", f.name) - } - - return seeker.Seek(offset, whence) -} - -func (f fromIOFSFile) Write(p []byte) (n int, err error) { - return -1, notImplemented("write", f.name) -} - -func (f fromIOFSFile) WriteAt(p []byte, off int64) (n int, err error) { - return -1, notImplemented("writeat", f.name) -} - -func (f fromIOFSFile) Name() string { return f.name } - -func (f fromIOFSFile) Readdir(count int) ([]os.FileInfo, error) { - rdfile, ok := f.File.(fs.ReadDirFile) - if !ok { - return nil, notImplemented("readdir", f.name) - } - - entries, err := rdfile.ReadDir(count) - if err != nil { - return nil, err - } - - ret := make([]os.FileInfo, len(entries)) - for i := range entries { - ret[i], err = entries[i].Info() - - if err != nil { - return nil, err - } - } - - return ret, nil -} - -func (f fromIOFSFile) Readdirnames(n int) ([]string, error) { - rdfile, ok := f.File.(fs.ReadDirFile) - if !ok { - return nil, notImplemented("readdir", f.name) - } - - entries, err := rdfile.ReadDir(n) - if err != nil { - return nil, err - } - - ret := make([]string, len(entries)) - for i := range entries { - ret[i] = entries[i].Name() - } - - return ret, nil -} - -func (f fromIOFSFile) Sync() error { return nil } - -func (f fromIOFSFile) Truncate(size int64) error { - return notImplemented("truncate", f.name) -} - -func (f fromIOFSFile) WriteString(s string) (ret int, err error) { - return -1, notImplemented("writestring", f.name) -} - -func notImplemented(op, path string) error { - return &fs.PathError{Op: op, Path: path, Err: fs.ErrPermission} -} diff --git a/vendor/github.com/spf13/afero/ioutil.go b/vendor/github.com/spf13/afero/ioutil.go deleted file mode 100644 index fa6abe1..0000000 --- a/vendor/github.com/spf13/afero/ioutil.go +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright ©2015 The Go Authors -// Copyright ©2015 Steve Francia -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package afero - -import ( - "bytes" - "io" - "os" - "path/filepath" - "sort" - "strconv" - "strings" - "sync" - "time" -) - -// byName implements sort.Interface. -type byName []os.FileInfo - -func (f byName) Len() int { return len(f) } -func (f byName) Less(i, j int) bool { return f[i].Name() < f[j].Name() } -func (f byName) Swap(i, j int) { f[i], f[j] = f[j], f[i] } - -// ReadDir reads the directory named by dirname and returns -// a list of sorted directory entries. -func (a Afero) ReadDir(dirname string) ([]os.FileInfo, error) { - return ReadDir(a.Fs, dirname) -} - -func ReadDir(fs Fs, dirname string) ([]os.FileInfo, error) { - f, err := fs.Open(dirname) - if err != nil { - return nil, err - } - list, err := f.Readdir(-1) - f.Close() - if err != nil { - return nil, err - } - sort.Sort(byName(list)) - return list, nil -} - -// ReadFile reads the file named by filename and returns the contents. -// A successful call returns err == nil, not err == EOF. Because ReadFile -// reads the whole file, it does not treat an EOF from Read as an error -// to be reported. -func (a Afero) ReadFile(filename string) ([]byte, error) { - return ReadFile(a.Fs, filename) -} - -func ReadFile(fs Fs, filename string) ([]byte, error) { - f, err := fs.Open(filename) - if err != nil { - return nil, err - } - defer f.Close() - // It's a good but not certain bet that FileInfo will tell us exactly how much to - // read, so let's try it but be prepared for the answer to be wrong. - var n int64 - - if fi, err := f.Stat(); err == nil { - // Don't preallocate a huge buffer, just in case. - if size := fi.Size(); size < 1e9 { - n = size - } - } - // As initial capacity for readAll, use n + a little extra in case Size is zero, - // and to avoid another allocation after Read has filled the buffer. The readAll - // call will read into its allocated internal buffer cheaply. If the size was - // wrong, we'll either waste some space off the end or reallocate as needed, but - // in the overwhelmingly common case we'll get it just right. - return readAll(f, n+bytes.MinRead) -} - -// readAll reads from r until an error or EOF and returns the data it read -// from the internal buffer allocated with a specified capacity. -func readAll(r io.Reader, capacity int64) (b []byte, err error) { - buf := bytes.NewBuffer(make([]byte, 0, capacity)) - // If the buffer overflows, we will get bytes.ErrTooLarge. - // Return that as an error. Any other panic remains. - defer func() { - e := recover() - if e == nil { - return - } - if panicErr, ok := e.(error); ok && panicErr == bytes.ErrTooLarge { - err = panicErr - } else { - panic(e) - } - }() - _, err = buf.ReadFrom(r) - return buf.Bytes(), err -} - -// ReadAll reads from r until an error or EOF and returns the data it read. -// A successful call returns err == nil, not err == EOF. Because ReadAll is -// defined to read from src until EOF, it does not treat an EOF from Read -// as an error to be reported. -func ReadAll(r io.Reader) ([]byte, error) { - return readAll(r, bytes.MinRead) -} - -// WriteFile writes data to a file named by filename. -// If the file does not exist, WriteFile creates it with permissions perm; -// otherwise WriteFile truncates it before writing. -func (a Afero) WriteFile(filename string, data []byte, perm os.FileMode) error { - return WriteFile(a.Fs, filename, data, perm) -} - -func WriteFile(fs Fs, filename string, data []byte, perm os.FileMode) error { - f, err := fs.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm) - if err != nil { - return err - } - n, err := f.Write(data) - if err == nil && n < len(data) { - err = io.ErrShortWrite - } - if err1 := f.Close(); err == nil { - err = err1 - } - return err -} - -// Random number state. -// We generate random temporary file names so that there's a good -// chance the file doesn't exist yet - keeps the number of tries in -// TempFile to a minimum. -var ( - randNum uint32 - randmu sync.Mutex -) - -func reseed() uint32 { - return uint32(time.Now().UnixNano() + int64(os.Getpid())) -} - -func nextRandom() string { - randmu.Lock() - r := randNum - if r == 0 { - r = reseed() - } - r = r*1664525 + 1013904223 // constants from Numerical Recipes - randNum = r - randmu.Unlock() - return strconv.Itoa(int(1e9 + r%1e9))[1:] -} - -// TempFile creates a new temporary file in the directory dir, -// opens the file for reading and writing, and returns the resulting *os.File. -// The filename is generated by taking pattern and adding a random -// string to the end. If pattern includes a "*", the random string -// replaces the last "*". -// If dir is the empty string, TempFile uses the default directory -// for temporary files (see os.TempDir). -// Multiple programs calling TempFile simultaneously -// will not choose the same file. The caller can use f.Name() -// to find the pathname of the file. It is the caller's responsibility -// to remove the file when no longer needed. -func (a Afero) TempFile(dir, pattern string) (f File, err error) { - return TempFile(a.Fs, dir, pattern) -} - -func TempFile(fs Fs, dir, pattern string) (f File, err error) { - if dir == "" { - dir = os.TempDir() - } - - var prefix, suffix string - if pos := strings.LastIndex(pattern, "*"); pos != -1 { - prefix, suffix = pattern[:pos], pattern[pos+1:] - } else { - prefix = pattern - } - - nconflict := 0 - for i := 0; i < 10000; i++ { - name := filepath.Join(dir, prefix+nextRandom()+suffix) - f, err = fs.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0o600) - if os.IsExist(err) { - if nconflict++; nconflict > 10 { - randmu.Lock() - randNum = reseed() - randmu.Unlock() - } - continue - } - break - } - return -} - -// TempDir creates a new temporary directory in the directory dir -// with a name beginning with prefix and returns the path of the -// new directory. If dir is the empty string, TempDir uses the -// default directory for temporary files (see os.TempDir). -// Multiple programs calling TempDir simultaneously -// will not choose the same directory. It is the caller's responsibility -// to remove the directory when no longer needed. -func (a Afero) TempDir(dir, prefix string) (name string, err error) { - return TempDir(a.Fs, dir, prefix) -} - -func TempDir(fs Fs, dir, prefix string) (name string, err error) { - if dir == "" { - dir = os.TempDir() - } - - nconflict := 0 - for i := 0; i < 10000; i++ { - try := filepath.Join(dir, prefix+nextRandom()) - err = fs.Mkdir(try, 0o700) - if os.IsExist(err) { - if nconflict++; nconflict > 10 { - randmu.Lock() - randNum = reseed() - randmu.Unlock() - } - continue - } - if err == nil { - name = try - } - break - } - return -} diff --git a/vendor/github.com/spf13/afero/lstater.go b/vendor/github.com/spf13/afero/lstater.go deleted file mode 100644 index 89c1bfc..0000000 --- a/vendor/github.com/spf13/afero/lstater.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright © 2018 Steve Francia . -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package afero - -import ( - "os" -) - -// Lstater is an optional interface in Afero. It is only implemented by the -// filesystems saying so. -// It will call Lstat if the filesystem iself is, or it delegates to, the os filesystem. -// Else it will call Stat. -// In addtion to the FileInfo, it will return a boolean telling whether Lstat was called or not. -type Lstater interface { - LstatIfPossible(name string) (os.FileInfo, bool, error) -} diff --git a/vendor/github.com/spf13/afero/match.go b/vendor/github.com/spf13/afero/match.go deleted file mode 100644 index 7db4b7d..0000000 --- a/vendor/github.com/spf13/afero/match.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright © 2014 Steve Francia . -// Copyright 2009 The Go Authors. All rights reserved. - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package afero - -import ( - "path/filepath" - "sort" - "strings" -) - -// Glob returns the names of all files matching pattern or nil -// if there is no matching file. The syntax of patterns is the same -// as in Match. The pattern may describe hierarchical names such as -// /usr/*/bin/ed (assuming the Separator is '/'). -// -// Glob ignores file system errors such as I/O errors reading directories. -// The only possible returned error is ErrBadPattern, when pattern -// is malformed. -// -// This was adapted from (http://golang.org/pkg/path/filepath) and uses several -// built-ins from that package. -func Glob(fs Fs, pattern string) (matches []string, err error) { - if !hasMeta(pattern) { - // Lstat not supported by a ll filesystems. - if _, err = lstatIfPossible(fs, pattern); err != nil { - return nil, nil - } - return []string{pattern}, nil - } - - dir, file := filepath.Split(pattern) - switch dir { - case "": - dir = "." - case string(filepath.Separator): - // nothing - default: - dir = dir[0 : len(dir)-1] // chop off trailing separator - } - - if !hasMeta(dir) { - return glob(fs, dir, file, nil) - } - - var m []string - m, err = Glob(fs, dir) - if err != nil { - return - } - for _, d := range m { - matches, err = glob(fs, d, file, matches) - if err != nil { - return - } - } - return -} - -// glob searches for files matching pattern in the directory dir -// and appends them to matches. If the directory cannot be -// opened, it returns the existing matches. New matches are -// added in lexicographical order. -func glob(fs Fs, dir, pattern string, matches []string) (m []string, e error) { - m = matches - fi, err := fs.Stat(dir) - if err != nil { - return - } - if !fi.IsDir() { - return - } - d, err := fs.Open(dir) - if err != nil { - return - } - defer d.Close() - - names, _ := d.Readdirnames(-1) - sort.Strings(names) - - for _, n := range names { - matched, err := filepath.Match(pattern, n) - if err != nil { - return m, err - } - if matched { - m = append(m, filepath.Join(dir, n)) - } - } - return -} - -// hasMeta reports whether path contains any of the magic characters -// recognized by Match. -func hasMeta(path string) bool { - // TODO(niemeyer): Should other magic characters be added here? - return strings.ContainsAny(path, "*?[") -} diff --git a/vendor/github.com/spf13/afero/mem/dir.go b/vendor/github.com/spf13/afero/mem/dir.go deleted file mode 100644 index e104013..0000000 --- a/vendor/github.com/spf13/afero/mem/dir.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package mem - -type Dir interface { - Len() int - Names() []string - Files() []*FileData - Add(*FileData) - Remove(*FileData) -} - -func RemoveFromMemDir(dir *FileData, f *FileData) { - dir.memDir.Remove(f) -} - -func AddToMemDir(dir *FileData, f *FileData) { - dir.memDir.Add(f) -} - -func InitializeDir(d *FileData) { - if d.memDir == nil { - d.dir = true - d.memDir = &DirMap{} - } -} diff --git a/vendor/github.com/spf13/afero/mem/dirmap.go b/vendor/github.com/spf13/afero/mem/dirmap.go deleted file mode 100644 index 03a57ee..0000000 --- a/vendor/github.com/spf13/afero/mem/dirmap.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright © 2015 Steve Francia . -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package mem - -import "sort" - -type DirMap map[string]*FileData - -func (m DirMap) Len() int { return len(m) } -func (m DirMap) Add(f *FileData) { m[f.name] = f } -func (m DirMap) Remove(f *FileData) { delete(m, f.name) } -func (m DirMap) Files() (files []*FileData) { - for _, f := range m { - files = append(files, f) - } - sort.Sort(filesSorter(files)) - return files -} - -// implement sort.Interface for []*FileData -type filesSorter []*FileData - -func (s filesSorter) Len() int { return len(s) } -func (s filesSorter) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s filesSorter) Less(i, j int) bool { return s[i].name < s[j].name } - -func (m DirMap) Names() (names []string) { - for x := range m { - names = append(names, x) - } - return names -} diff --git a/vendor/github.com/spf13/afero/mem/file.go b/vendor/github.com/spf13/afero/mem/file.go deleted file mode 100644 index 62fe449..0000000 --- a/vendor/github.com/spf13/afero/mem/file.go +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright © 2015 Steve Francia . -// Copyright 2013 tsuru authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package mem - -import ( - "bytes" - "errors" - "io" - "io/fs" - "os" - "path/filepath" - "sync" - "sync/atomic" - "time" - - "github.com/spf13/afero/internal/common" -) - -const FilePathSeparator = string(filepath.Separator) - -var _ fs.ReadDirFile = &File{} - -type File struct { - // atomic requires 64-bit alignment for struct field access - at int64 - readDirCount int64 - closed bool - readOnly bool - fileData *FileData -} - -func NewFileHandle(data *FileData) *File { - return &File{fileData: data} -} - -func NewReadOnlyFileHandle(data *FileData) *File { - return &File{fileData: data, readOnly: true} -} - -func (f File) Data() *FileData { - return f.fileData -} - -type FileData struct { - sync.Mutex - name string - data []byte - memDir Dir - dir bool - mode os.FileMode - modtime time.Time - uid int - gid int -} - -func (d *FileData) Name() string { - d.Lock() - defer d.Unlock() - return d.name -} - -func CreateFile(name string) *FileData { - return &FileData{name: name, mode: os.ModeTemporary, modtime: time.Now()} -} - -func CreateDir(name string) *FileData { - return &FileData{name: name, memDir: &DirMap{}, dir: true, modtime: time.Now()} -} - -func ChangeFileName(f *FileData, newname string) { - f.Lock() - f.name = newname - f.Unlock() -} - -func SetMode(f *FileData, mode os.FileMode) { - f.Lock() - f.mode = mode - f.Unlock() -} - -func SetModTime(f *FileData, mtime time.Time) { - f.Lock() - setModTime(f, mtime) - f.Unlock() -} - -func setModTime(f *FileData, mtime time.Time) { - f.modtime = mtime -} - -func SetUID(f *FileData, uid int) { - f.Lock() - f.uid = uid - f.Unlock() -} - -func SetGID(f *FileData, gid int) { - f.Lock() - f.gid = gid - f.Unlock() -} - -func GetFileInfo(f *FileData) *FileInfo { - return &FileInfo{f} -} - -func (f *File) Open() error { - atomic.StoreInt64(&f.at, 0) - atomic.StoreInt64(&f.readDirCount, 0) - f.fileData.Lock() - f.closed = false - f.fileData.Unlock() - return nil -} - -func (f *File) Close() error { - f.fileData.Lock() - f.closed = true - if !f.readOnly { - setModTime(f.fileData, time.Now()) - } - f.fileData.Unlock() - return nil -} - -func (f *File) Name() string { - return f.fileData.Name() -} - -func (f *File) Stat() (os.FileInfo, error) { - return &FileInfo{f.fileData}, nil -} - -func (f *File) Sync() error { - return nil -} - -func (f *File) Readdir(count int) (res []os.FileInfo, err error) { - if !f.fileData.dir { - return nil, &os.PathError{Op: "readdir", Path: f.fileData.name, Err: errors.New("not a dir")} - } - var outLength int64 - - f.fileData.Lock() - files := f.fileData.memDir.Files()[f.readDirCount:] - if count > 0 { - if len(files) < count { - outLength = int64(len(files)) - } else { - outLength = int64(count) - } - if len(files) == 0 { - err = io.EOF - } - } else { - outLength = int64(len(files)) - } - f.readDirCount += outLength - f.fileData.Unlock() - - res = make([]os.FileInfo, outLength) - for i := range res { - res[i] = &FileInfo{files[i]} - } - - return res, err -} - -func (f *File) Readdirnames(n int) (names []string, err error) { - fi, err := f.Readdir(n) - names = make([]string, len(fi)) - for i, f := range fi { - _, names[i] = filepath.Split(f.Name()) - } - return names, err -} - -// Implements fs.ReadDirFile -func (f *File) ReadDir(n int) ([]fs.DirEntry, error) { - fi, err := f.Readdir(n) - if err != nil { - return nil, err - } - di := make([]fs.DirEntry, len(fi)) - for i, f := range fi { - di[i] = common.FileInfoDirEntry{FileInfo: f} - } - return di, nil -} - -func (f *File) Read(b []byte) (n int, err error) { - f.fileData.Lock() - defer f.fileData.Unlock() - if f.closed { - return 0, ErrFileClosed - } - if len(b) > 0 && int(f.at) == len(f.fileData.data) { - return 0, io.EOF - } - if int(f.at) > len(f.fileData.data) { - return 0, io.ErrUnexpectedEOF - } - if len(f.fileData.data)-int(f.at) >= len(b) { - n = len(b) - } else { - n = len(f.fileData.data) - int(f.at) - } - copy(b, f.fileData.data[f.at:f.at+int64(n)]) - atomic.AddInt64(&f.at, int64(n)) - return -} - -func (f *File) ReadAt(b []byte, off int64) (n int, err error) { - prev := atomic.LoadInt64(&f.at) - atomic.StoreInt64(&f.at, off) - n, err = f.Read(b) - atomic.StoreInt64(&f.at, prev) - return -} - -func (f *File) Truncate(size int64) error { - if f.closed { - return ErrFileClosed - } - if f.readOnly { - return &os.PathError{Op: "truncate", Path: f.fileData.name, Err: errors.New("file handle is read only")} - } - if size < 0 { - return ErrOutOfRange - } - f.fileData.Lock() - defer f.fileData.Unlock() - if size > int64(len(f.fileData.data)) { - diff := size - int64(len(f.fileData.data)) - f.fileData.data = append(f.fileData.data, bytes.Repeat([]byte{0o0}, int(diff))...) - } else { - f.fileData.data = f.fileData.data[0:size] - } - setModTime(f.fileData, time.Now()) - return nil -} - -func (f *File) Seek(offset int64, whence int) (int64, error) { - if f.closed { - return 0, ErrFileClosed - } - switch whence { - case io.SeekStart: - atomic.StoreInt64(&f.at, offset) - case io.SeekCurrent: - atomic.AddInt64(&f.at, offset) - case io.SeekEnd: - atomic.StoreInt64(&f.at, int64(len(f.fileData.data))+offset) - } - return f.at, nil -} - -func (f *File) Write(b []byte) (n int, err error) { - if f.closed { - return 0, ErrFileClosed - } - if f.readOnly { - return 0, &os.PathError{Op: "write", Path: f.fileData.name, Err: errors.New("file handle is read only")} - } - n = len(b) - cur := atomic.LoadInt64(&f.at) - f.fileData.Lock() - defer f.fileData.Unlock() - diff := cur - int64(len(f.fileData.data)) - var tail []byte - if n+int(cur) < len(f.fileData.data) { - tail = f.fileData.data[n+int(cur):] - } - if diff > 0 { - f.fileData.data = append(f.fileData.data, append(bytes.Repeat([]byte{0o0}, int(diff)), b...)...) - f.fileData.data = append(f.fileData.data, tail...) - } else { - f.fileData.data = append(f.fileData.data[:cur], b...) - f.fileData.data = append(f.fileData.data, tail...) - } - setModTime(f.fileData, time.Now()) - - atomic.AddInt64(&f.at, int64(n)) - return -} - -func (f *File) WriteAt(b []byte, off int64) (n int, err error) { - atomic.StoreInt64(&f.at, off) - return f.Write(b) -} - -func (f *File) WriteString(s string) (ret int, err error) { - return f.Write([]byte(s)) -} - -func (f *File) Info() *FileInfo { - return &FileInfo{f.fileData} -} - -type FileInfo struct { - *FileData -} - -// Implements os.FileInfo -func (s *FileInfo) Name() string { - s.Lock() - _, name := filepath.Split(s.name) - s.Unlock() - return name -} - -func (s *FileInfo) Mode() os.FileMode { - s.Lock() - defer s.Unlock() - return s.mode -} - -func (s *FileInfo) ModTime() time.Time { - s.Lock() - defer s.Unlock() - return s.modtime -} - -func (s *FileInfo) IsDir() bool { - s.Lock() - defer s.Unlock() - return s.dir -} -func (s *FileInfo) Sys() interface{} { return nil } -func (s *FileInfo) Size() int64 { - if s.IsDir() { - return int64(42) - } - s.Lock() - defer s.Unlock() - return int64(len(s.data)) -} - -var ( - ErrFileClosed = errors.New("File is closed") - ErrOutOfRange = errors.New("out of range") - ErrTooLarge = errors.New("too large") - ErrFileNotFound = os.ErrNotExist - ErrFileExists = os.ErrExist - ErrDestinationExists = os.ErrExist -) diff --git a/vendor/github.com/spf13/afero/memmap.go b/vendor/github.com/spf13/afero/memmap.go deleted file mode 100644 index d6c744e..0000000 --- a/vendor/github.com/spf13/afero/memmap.go +++ /dev/null @@ -1,465 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package afero - -import ( - "fmt" - "io" - - "log" - "os" - "path/filepath" - - "sort" - "strings" - "sync" - "time" - - "github.com/spf13/afero/mem" -) - -const chmodBits = os.ModePerm | os.ModeSetuid | os.ModeSetgid | os.ModeSticky // Only a subset of bits are allowed to be changed. Documented under os.Chmod() - -type MemMapFs struct { - mu sync.RWMutex - data map[string]*mem.FileData - init sync.Once -} - -func NewMemMapFs() Fs { - return &MemMapFs{} -} - -func (m *MemMapFs) getData() map[string]*mem.FileData { - m.init.Do(func() { - m.data = make(map[string]*mem.FileData) - // Root should always exist, right? - // TODO: what about windows? - root := mem.CreateDir(FilePathSeparator) - mem.SetMode(root, os.ModeDir|0o755) - m.data[FilePathSeparator] = root - }) - return m.data -} - -func (*MemMapFs) Name() string { return "MemMapFS" } - -func (m *MemMapFs) Create(name string) (File, error) { - name = normalizePath(name) - m.mu.Lock() - file := mem.CreateFile(name) - m.getData()[name] = file - m.registerWithParent(file, 0) - m.mu.Unlock() - return mem.NewFileHandle(file), nil -} - -func (m *MemMapFs) unRegisterWithParent(fileName string) error { - f, err := m.lockfreeOpen(fileName) - if err != nil { - return err - } - parent := m.findParent(f) - if parent == nil { - log.Panic("parent of ", f.Name(), " is nil") - } - - parent.Lock() - mem.RemoveFromMemDir(parent, f) - parent.Unlock() - return nil -} - -func (m *MemMapFs) findParent(f *mem.FileData) *mem.FileData { - pdir, _ := filepath.Split(f.Name()) - pdir = filepath.Clean(pdir) - pfile, err := m.lockfreeOpen(pdir) - if err != nil { - return nil - } - return pfile -} - -func (m *MemMapFs) findDescendants(name string) []*mem.FileData { - fData := m.getData() - descendants := make([]*mem.FileData, 0, len(fData)) - for p, dFile := range fData { - if strings.HasPrefix(p, name+FilePathSeparator) { - descendants = append(descendants, dFile) - } - } - - sort.Slice(descendants, func(i, j int) bool { - cur := len(strings.Split(descendants[i].Name(), FilePathSeparator)) - next := len(strings.Split(descendants[j].Name(), FilePathSeparator)) - return cur < next - }) - - return descendants -} - -func (m *MemMapFs) registerWithParent(f *mem.FileData, perm os.FileMode) { - if f == nil { - return - } - parent := m.findParent(f) - if parent == nil { - pdir := filepath.Dir(filepath.Clean(f.Name())) - err := m.lockfreeMkdir(pdir, perm) - if err != nil { - // log.Println("Mkdir error:", err) - return - } - parent, err = m.lockfreeOpen(pdir) - if err != nil { - // log.Println("Open after Mkdir error:", err) - return - } - } - - parent.Lock() - mem.InitializeDir(parent) - mem.AddToMemDir(parent, f) - parent.Unlock() -} - -func (m *MemMapFs) lockfreeMkdir(name string, perm os.FileMode) error { - name = normalizePath(name) - x, ok := m.getData()[name] - if ok { - // Only return ErrFileExists if it's a file, not a directory. - i := mem.FileInfo{FileData: x} - if !i.IsDir() { - return ErrFileExists - } - } else { - item := mem.CreateDir(name) - mem.SetMode(item, os.ModeDir|perm) - m.getData()[name] = item - m.registerWithParent(item, perm) - } - return nil -} - -func (m *MemMapFs) Mkdir(name string, perm os.FileMode) error { - perm &= chmodBits - name = normalizePath(name) - - m.mu.RLock() - _, ok := m.getData()[name] - m.mu.RUnlock() - if ok { - return &os.PathError{Op: "mkdir", Path: name, Err: ErrFileExists} - } - - m.mu.Lock() - // Dobule check that it doesn't exist. - if _, ok := m.getData()[name]; ok { - m.mu.Unlock() - return &os.PathError{Op: "mkdir", Path: name, Err: ErrFileExists} - } - item := mem.CreateDir(name) - mem.SetMode(item, os.ModeDir|perm) - m.getData()[name] = item - m.registerWithParent(item, perm) - m.mu.Unlock() - - return m.setFileMode(name, perm|os.ModeDir) -} - -func (m *MemMapFs) MkdirAll(path string, perm os.FileMode) error { - err := m.Mkdir(path, perm) - if err != nil { - if err.(*os.PathError).Err == ErrFileExists { - return nil - } - return err - } - return nil -} - -// Handle some relative paths -func normalizePath(path string) string { - path = filepath.Clean(path) - - switch path { - case ".": - return FilePathSeparator - case "..": - return FilePathSeparator - default: - return path - } -} - -func (m *MemMapFs) Open(name string) (File, error) { - f, err := m.open(name) - if f != nil { - return mem.NewReadOnlyFileHandle(f), err - } - return nil, err -} - -func (m *MemMapFs) openWrite(name string) (File, error) { - f, err := m.open(name) - if f != nil { - return mem.NewFileHandle(f), err - } - return nil, err -} - -func (m *MemMapFs) open(name string) (*mem.FileData, error) { - name = normalizePath(name) - - m.mu.RLock() - f, ok := m.getData()[name] - m.mu.RUnlock() - if !ok { - return nil, &os.PathError{Op: "open", Path: name, Err: ErrFileNotFound} - } - return f, nil -} - -func (m *MemMapFs) lockfreeOpen(name string) (*mem.FileData, error) { - name = normalizePath(name) - f, ok := m.getData()[name] - if ok { - return f, nil - } else { - return nil, ErrFileNotFound - } -} - -func (m *MemMapFs) OpenFile(name string, flag int, perm os.FileMode) (File, error) { - perm &= chmodBits - chmod := false - file, err := m.openWrite(name) - if err == nil && (flag&os.O_EXCL > 0) { - return nil, &os.PathError{Op: "open", Path: name, Err: ErrFileExists} - } - if os.IsNotExist(err) && (flag&os.O_CREATE > 0) { - file, err = m.Create(name) - chmod = true - } - if err != nil { - return nil, err - } - if flag == os.O_RDONLY { - file = mem.NewReadOnlyFileHandle(file.(*mem.File).Data()) - } - if flag&os.O_APPEND > 0 { - _, err = file.Seek(0, io.SeekEnd) - if err != nil { - file.Close() - return nil, err - } - } - if flag&os.O_TRUNC > 0 && flag&(os.O_RDWR|os.O_WRONLY) > 0 { - err = file.Truncate(0) - if err != nil { - file.Close() - return nil, err - } - } - if chmod { - return file, m.setFileMode(name, perm) - } - return file, nil -} - -func (m *MemMapFs) Remove(name string) error { - name = normalizePath(name) - - m.mu.Lock() - defer m.mu.Unlock() - - if _, ok := m.getData()[name]; ok { - err := m.unRegisterWithParent(name) - if err != nil { - return &os.PathError{Op: "remove", Path: name, Err: err} - } - delete(m.getData(), name) - } else { - return &os.PathError{Op: "remove", Path: name, Err: os.ErrNotExist} - } - return nil -} - -func (m *MemMapFs) RemoveAll(path string) error { - path = normalizePath(path) - m.mu.Lock() - m.unRegisterWithParent(path) - m.mu.Unlock() - - m.mu.RLock() - defer m.mu.RUnlock() - - for p := range m.getData() { - if p == path || strings.HasPrefix(p, path+FilePathSeparator) { - m.mu.RUnlock() - m.mu.Lock() - delete(m.getData(), p) - m.mu.Unlock() - m.mu.RLock() - } - } - return nil -} - -func (m *MemMapFs) Rename(oldname, newname string) error { - oldname = normalizePath(oldname) - newname = normalizePath(newname) - - if oldname == newname { - return nil - } - - m.mu.RLock() - defer m.mu.RUnlock() - if _, ok := m.getData()[oldname]; ok { - m.mu.RUnlock() - m.mu.Lock() - err := m.unRegisterWithParent(oldname) - if err != nil { - return err - } - - fileData := m.getData()[oldname] - mem.ChangeFileName(fileData, newname) - m.getData()[newname] = fileData - - err = m.renameDescendants(oldname, newname) - if err != nil { - return err - } - - delete(m.getData(), oldname) - - m.registerWithParent(fileData, 0) - m.mu.Unlock() - m.mu.RLock() - } else { - return &os.PathError{Op: "rename", Path: oldname, Err: ErrFileNotFound} - } - return nil -} - -func (m *MemMapFs) renameDescendants(oldname, newname string) error { - descendants := m.findDescendants(oldname) - removes := make([]string, 0, len(descendants)) - for _, desc := range descendants { - descNewName := strings.Replace(desc.Name(), oldname, newname, 1) - err := m.unRegisterWithParent(desc.Name()) - if err != nil { - return err - } - - removes = append(removes, desc.Name()) - mem.ChangeFileName(desc, descNewName) - m.getData()[descNewName] = desc - - m.registerWithParent(desc, 0) - } - for _, r := range removes { - delete(m.getData(), r) - } - - return nil -} - -func (m *MemMapFs) LstatIfPossible(name string) (os.FileInfo, bool, error) { - fileInfo, err := m.Stat(name) - return fileInfo, false, err -} - -func (m *MemMapFs) Stat(name string) (os.FileInfo, error) { - f, err := m.Open(name) - if err != nil { - return nil, err - } - fi := mem.GetFileInfo(f.(*mem.File).Data()) - return fi, nil -} - -func (m *MemMapFs) Chmod(name string, mode os.FileMode) error { - mode &= chmodBits - - m.mu.RLock() - f, ok := m.getData()[name] - m.mu.RUnlock() - if !ok { - return &os.PathError{Op: "chmod", Path: name, Err: ErrFileNotFound} - } - prevOtherBits := mem.GetFileInfo(f).Mode() & ^chmodBits - - mode = prevOtherBits | mode - return m.setFileMode(name, mode) -} - -func (m *MemMapFs) setFileMode(name string, mode os.FileMode) error { - name = normalizePath(name) - - m.mu.RLock() - f, ok := m.getData()[name] - m.mu.RUnlock() - if !ok { - return &os.PathError{Op: "chmod", Path: name, Err: ErrFileNotFound} - } - - m.mu.Lock() - mem.SetMode(f, mode) - m.mu.Unlock() - - return nil -} - -func (m *MemMapFs) Chown(name string, uid, gid int) error { - name = normalizePath(name) - - m.mu.RLock() - f, ok := m.getData()[name] - m.mu.RUnlock() - if !ok { - return &os.PathError{Op: "chown", Path: name, Err: ErrFileNotFound} - } - - mem.SetUID(f, uid) - mem.SetGID(f, gid) - - return nil -} - -func (m *MemMapFs) Chtimes(name string, atime time.Time, mtime time.Time) error { - name = normalizePath(name) - - m.mu.RLock() - f, ok := m.getData()[name] - m.mu.RUnlock() - if !ok { - return &os.PathError{Op: "chtimes", Path: name, Err: ErrFileNotFound} - } - - m.mu.Lock() - mem.SetModTime(f, mtime) - m.mu.Unlock() - - return nil -} - -func (m *MemMapFs) List() { - for _, x := range m.data { - y := mem.FileInfo{FileData: x} - fmt.Println(x.Name(), y.Size()) - } -} diff --git a/vendor/github.com/spf13/afero/os.go b/vendor/github.com/spf13/afero/os.go deleted file mode 100644 index f136632..0000000 --- a/vendor/github.com/spf13/afero/os.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright © 2014 Steve Francia . -// Copyright 2013 tsuru authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package afero - -import ( - "os" - "time" -) - -var _ Lstater = (*OsFs)(nil) - -// OsFs is a Fs implementation that uses functions provided by the os package. -// -// For details in any method, check the documentation of the os package -// (http://golang.org/pkg/os/). -type OsFs struct{} - -func NewOsFs() Fs { - return &OsFs{} -} - -func (OsFs) Name() string { return "OsFs" } - -func (OsFs) Create(name string) (File, error) { - f, e := os.Create(name) - if f == nil { - // while this looks strange, we need to return a bare nil (of type nil) not - // a nil value of type *os.File or nil won't be nil - return nil, e - } - return f, e -} - -func (OsFs) Mkdir(name string, perm os.FileMode) error { - return os.Mkdir(name, perm) -} - -func (OsFs) MkdirAll(path string, perm os.FileMode) error { - return os.MkdirAll(path, perm) -} - -func (OsFs) Open(name string) (File, error) { - f, e := os.Open(name) - if f == nil { - // while this looks strange, we need to return a bare nil (of type nil) not - // a nil value of type *os.File or nil won't be nil - return nil, e - } - return f, e -} - -func (OsFs) OpenFile(name string, flag int, perm os.FileMode) (File, error) { - f, e := os.OpenFile(name, flag, perm) - if f == nil { - // while this looks strange, we need to return a bare nil (of type nil) not - // a nil value of type *os.File or nil won't be nil - return nil, e - } - return f, e -} - -func (OsFs) Remove(name string) error { - return os.Remove(name) -} - -func (OsFs) RemoveAll(path string) error { - return os.RemoveAll(path) -} - -func (OsFs) Rename(oldname, newname string) error { - return os.Rename(oldname, newname) -} - -func (OsFs) Stat(name string) (os.FileInfo, error) { - return os.Stat(name) -} - -func (OsFs) Chmod(name string, mode os.FileMode) error { - return os.Chmod(name, mode) -} - -func (OsFs) Chown(name string, uid, gid int) error { - return os.Chown(name, uid, gid) -} - -func (OsFs) Chtimes(name string, atime time.Time, mtime time.Time) error { - return os.Chtimes(name, atime, mtime) -} - -func (OsFs) LstatIfPossible(name string) (os.FileInfo, bool, error) { - fi, err := os.Lstat(name) - return fi, true, err -} - -func (OsFs) SymlinkIfPossible(oldname, newname string) error { - return os.Symlink(oldname, newname) -} - -func (OsFs) ReadlinkIfPossible(name string) (string, error) { - return os.Readlink(name) -} diff --git a/vendor/github.com/spf13/afero/path.go b/vendor/github.com/spf13/afero/path.go deleted file mode 100644 index 18f60a0..0000000 --- a/vendor/github.com/spf13/afero/path.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright ©2015 The Go Authors -// Copyright ©2015 Steve Francia -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package afero - -import ( - "os" - "path/filepath" - "sort" -) - -// readDirNames reads the directory named by dirname and returns -// a sorted list of directory entries. -// adapted from https://golang.org/src/path/filepath/path.go -func readDirNames(fs Fs, dirname string) ([]string, error) { - f, err := fs.Open(dirname) - if err != nil { - return nil, err - } - names, err := f.Readdirnames(-1) - f.Close() - if err != nil { - return nil, err - } - sort.Strings(names) - return names, nil -} - -// walk recursively descends path, calling walkFn -// adapted from https://golang.org/src/path/filepath/path.go -func walk(fs Fs, path string, info os.FileInfo, walkFn filepath.WalkFunc) error { - err := walkFn(path, info, nil) - if err != nil { - if info.IsDir() && err == filepath.SkipDir { - return nil - } - return err - } - - if !info.IsDir() { - return nil - } - - names, err := readDirNames(fs, path) - if err != nil { - return walkFn(path, info, err) - } - - for _, name := range names { - filename := filepath.Join(path, name) - fileInfo, err := lstatIfPossible(fs, filename) - if err != nil { - if err := walkFn(filename, fileInfo, err); err != nil && err != filepath.SkipDir { - return err - } - } else { - err = walk(fs, filename, fileInfo, walkFn) - if err != nil { - if !fileInfo.IsDir() || err != filepath.SkipDir { - return err - } - } - } - } - return nil -} - -// if the filesystem supports it, use Lstat, else use fs.Stat -func lstatIfPossible(fs Fs, path string) (os.FileInfo, error) { - if lfs, ok := fs.(Lstater); ok { - fi, _, err := lfs.LstatIfPossible(path) - return fi, err - } - return fs.Stat(path) -} - -// Walk walks the file tree rooted at root, calling walkFn for each file or -// directory in the tree, including root. All errors that arise visiting files -// and directories are filtered by walkFn. The files are walked in lexical -// order, which makes the output deterministic but means that for very -// large directories Walk can be inefficient. -// Walk does not follow symbolic links. - -func (a Afero) Walk(root string, walkFn filepath.WalkFunc) error { - return Walk(a.Fs, root, walkFn) -} - -func Walk(fs Fs, root string, walkFn filepath.WalkFunc) error { - info, err := lstatIfPossible(fs, root) - if err != nil { - return walkFn(root, nil, err) - } - return walk(fs, root, info, walkFn) -} diff --git a/vendor/github.com/spf13/afero/readonlyfs.go b/vendor/github.com/spf13/afero/readonlyfs.go deleted file mode 100644 index bd8f926..0000000 --- a/vendor/github.com/spf13/afero/readonlyfs.go +++ /dev/null @@ -1,96 +0,0 @@ -package afero - -import ( - "os" - "syscall" - "time" -) - -var _ Lstater = (*ReadOnlyFs)(nil) - -type ReadOnlyFs struct { - source Fs -} - -func NewReadOnlyFs(source Fs) Fs { - return &ReadOnlyFs{source: source} -} - -func (r *ReadOnlyFs) ReadDir(name string) ([]os.FileInfo, error) { - return ReadDir(r.source, name) -} - -func (r *ReadOnlyFs) Chtimes(n string, a, m time.Time) error { - return syscall.EPERM -} - -func (r *ReadOnlyFs) Chmod(n string, m os.FileMode) error { - return syscall.EPERM -} - -func (r *ReadOnlyFs) Chown(n string, uid, gid int) error { - return syscall.EPERM -} - -func (r *ReadOnlyFs) Name() string { - return "ReadOnlyFilter" -} - -func (r *ReadOnlyFs) Stat(name string) (os.FileInfo, error) { - return r.source.Stat(name) -} - -func (r *ReadOnlyFs) LstatIfPossible(name string) (os.FileInfo, bool, error) { - if lsf, ok := r.source.(Lstater); ok { - return lsf.LstatIfPossible(name) - } - fi, err := r.Stat(name) - return fi, false, err -} - -func (r *ReadOnlyFs) SymlinkIfPossible(oldname, newname string) error { - return &os.LinkError{Op: "symlink", Old: oldname, New: newname, Err: ErrNoSymlink} -} - -func (r *ReadOnlyFs) ReadlinkIfPossible(name string) (string, error) { - if srdr, ok := r.source.(LinkReader); ok { - return srdr.ReadlinkIfPossible(name) - } - - return "", &os.PathError{Op: "readlink", Path: name, Err: ErrNoReadlink} -} - -func (r *ReadOnlyFs) Rename(o, n string) error { - return syscall.EPERM -} - -func (r *ReadOnlyFs) RemoveAll(p string) error { - return syscall.EPERM -} - -func (r *ReadOnlyFs) Remove(n string) error { - return syscall.EPERM -} - -func (r *ReadOnlyFs) OpenFile(name string, flag int, perm os.FileMode) (File, error) { - if flag&(os.O_WRONLY|syscall.O_RDWR|os.O_APPEND|os.O_CREATE|os.O_TRUNC) != 0 { - return nil, syscall.EPERM - } - return r.source.OpenFile(name, flag, perm) -} - -func (r *ReadOnlyFs) Open(n string) (File, error) { - return r.source.Open(n) -} - -func (r *ReadOnlyFs) Mkdir(n string, p os.FileMode) error { - return syscall.EPERM -} - -func (r *ReadOnlyFs) MkdirAll(n string, p os.FileMode) error { - return syscall.EPERM -} - -func (r *ReadOnlyFs) Create(n string) (File, error) { - return nil, syscall.EPERM -} diff --git a/vendor/github.com/spf13/afero/regexpfs.go b/vendor/github.com/spf13/afero/regexpfs.go deleted file mode 100644 index 218f3b2..0000000 --- a/vendor/github.com/spf13/afero/regexpfs.go +++ /dev/null @@ -1,223 +0,0 @@ -package afero - -import ( - "os" - "regexp" - "syscall" - "time" -) - -// The RegexpFs filters files (not directories) by regular expression. Only -// files matching the given regexp will be allowed, all others get a ENOENT error ( -// "No such file or directory"). -type RegexpFs struct { - re *regexp.Regexp - source Fs -} - -func NewRegexpFs(source Fs, re *regexp.Regexp) Fs { - return &RegexpFs{source: source, re: re} -} - -type RegexpFile struct { - f File - re *regexp.Regexp -} - -func (r *RegexpFs) matchesName(name string) error { - if r.re == nil { - return nil - } - if r.re.MatchString(name) { - return nil - } - return syscall.ENOENT -} - -func (r *RegexpFs) dirOrMatches(name string) error { - dir, err := IsDir(r.source, name) - if err != nil { - return err - } - if dir { - return nil - } - return r.matchesName(name) -} - -func (r *RegexpFs) Chtimes(name string, a, m time.Time) error { - if err := r.dirOrMatches(name); err != nil { - return err - } - return r.source.Chtimes(name, a, m) -} - -func (r *RegexpFs) Chmod(name string, mode os.FileMode) error { - if err := r.dirOrMatches(name); err != nil { - return err - } - return r.source.Chmod(name, mode) -} - -func (r *RegexpFs) Chown(name string, uid, gid int) error { - if err := r.dirOrMatches(name); err != nil { - return err - } - return r.source.Chown(name, uid, gid) -} - -func (r *RegexpFs) Name() string { - return "RegexpFs" -} - -func (r *RegexpFs) Stat(name string) (os.FileInfo, error) { - if err := r.dirOrMatches(name); err != nil { - return nil, err - } - return r.source.Stat(name) -} - -func (r *RegexpFs) Rename(oldname, newname string) error { - dir, err := IsDir(r.source, oldname) - if err != nil { - return err - } - if dir { - return nil - } - if err := r.matchesName(oldname); err != nil { - return err - } - if err := r.matchesName(newname); err != nil { - return err - } - return r.source.Rename(oldname, newname) -} - -func (r *RegexpFs) RemoveAll(p string) error { - dir, err := IsDir(r.source, p) - if err != nil { - return err - } - if !dir { - if err := r.matchesName(p); err != nil { - return err - } - } - return r.source.RemoveAll(p) -} - -func (r *RegexpFs) Remove(name string) error { - if err := r.dirOrMatches(name); err != nil { - return err - } - return r.source.Remove(name) -} - -func (r *RegexpFs) OpenFile(name string, flag int, perm os.FileMode) (File, error) { - if err := r.dirOrMatches(name); err != nil { - return nil, err - } - return r.source.OpenFile(name, flag, perm) -} - -func (r *RegexpFs) Open(name string) (File, error) { - dir, err := IsDir(r.source, name) - if err != nil { - return nil, err - } - if !dir { - if err := r.matchesName(name); err != nil { - return nil, err - } - } - f, err := r.source.Open(name) - if err != nil { - return nil, err - } - return &RegexpFile{f: f, re: r.re}, nil -} - -func (r *RegexpFs) Mkdir(n string, p os.FileMode) error { - return r.source.Mkdir(n, p) -} - -func (r *RegexpFs) MkdirAll(n string, p os.FileMode) error { - return r.source.MkdirAll(n, p) -} - -func (r *RegexpFs) Create(name string) (File, error) { - if err := r.matchesName(name); err != nil { - return nil, err - } - return r.source.Create(name) -} - -func (f *RegexpFile) Close() error { - return f.f.Close() -} - -func (f *RegexpFile) Read(s []byte) (int, error) { - return f.f.Read(s) -} - -func (f *RegexpFile) ReadAt(s []byte, o int64) (int, error) { - return f.f.ReadAt(s, o) -} - -func (f *RegexpFile) Seek(o int64, w int) (int64, error) { - return f.f.Seek(o, w) -} - -func (f *RegexpFile) Write(s []byte) (int, error) { - return f.f.Write(s) -} - -func (f *RegexpFile) WriteAt(s []byte, o int64) (int, error) { - return f.f.WriteAt(s, o) -} - -func (f *RegexpFile) Name() string { - return f.f.Name() -} - -func (f *RegexpFile) Readdir(c int) (fi []os.FileInfo, err error) { - var rfi []os.FileInfo - rfi, err = f.f.Readdir(c) - if err != nil { - return nil, err - } - for _, i := range rfi { - if i.IsDir() || f.re.MatchString(i.Name()) { - fi = append(fi, i) - } - } - return fi, nil -} - -func (f *RegexpFile) Readdirnames(c int) (n []string, err error) { - fi, err := f.Readdir(c) - if err != nil { - return nil, err - } - for _, s := range fi { - n = append(n, s.Name()) - } - return n, nil -} - -func (f *RegexpFile) Stat() (os.FileInfo, error) { - return f.f.Stat() -} - -func (f *RegexpFile) Sync() error { - return f.f.Sync() -} - -func (f *RegexpFile) Truncate(s int64) error { - return f.f.Truncate(s) -} - -func (f *RegexpFile) WriteString(s string) (int, error) { - return f.f.WriteString(s) -} diff --git a/vendor/github.com/spf13/afero/symlink.go b/vendor/github.com/spf13/afero/symlink.go deleted file mode 100644 index aa6ae12..0000000 --- a/vendor/github.com/spf13/afero/symlink.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright © 2018 Steve Francia . -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package afero - -import ( - "errors" -) - -// Symlinker is an optional interface in Afero. It is only implemented by the -// filesystems saying so. -// It indicates support for 3 symlink related interfaces that implement the -// behaviors of the os methods: -// - Lstat -// - Symlink, and -// - Readlink -type Symlinker interface { - Lstater - Linker - LinkReader -} - -// Linker is an optional interface in Afero. It is only implemented by the -// filesystems saying so. -// It will call Symlink if the filesystem itself is, or it delegates to, the os filesystem, -// or the filesystem otherwise supports Symlink's. -type Linker interface { - SymlinkIfPossible(oldname, newname string) error -} - -// ErrNoSymlink is the error that will be wrapped in an os.LinkError if a file system -// does not support Symlink's either directly or through its delegated filesystem. -// As expressed by support for the Linker interface. -var ErrNoSymlink = errors.New("symlink not supported") - -// LinkReader is an optional interface in Afero. It is only implemented by the -// filesystems saying so. -type LinkReader interface { - ReadlinkIfPossible(name string) (string, error) -} - -// ErrNoReadlink is the error that will be wrapped in an os.Path if a file system -// does not support the readlink operation either directly or through its delegated filesystem. -// As expressed by support for the LinkReader interface. -var ErrNoReadlink = errors.New("readlink not supported") diff --git a/vendor/github.com/spf13/afero/unionFile.go b/vendor/github.com/spf13/afero/unionFile.go deleted file mode 100644 index 62dd6c9..0000000 --- a/vendor/github.com/spf13/afero/unionFile.go +++ /dev/null @@ -1,330 +0,0 @@ -package afero - -import ( - "io" - "os" - "path/filepath" - "syscall" -) - -// The UnionFile implements the afero.File interface and will be returned -// when reading a directory present at least in the overlay or opening a file -// for writing. -// -// The calls to -// Readdir() and Readdirnames() merge the file os.FileInfo / names from the -// base and the overlay - for files present in both layers, only those -// from the overlay will be used. -// -// When opening files for writing (Create() / OpenFile() with the right flags) -// the operations will be done in both layers, starting with the overlay. A -// successful read in the overlay will move the cursor position in the base layer -// by the number of bytes read. -type UnionFile struct { - Base File - Layer File - Merger DirsMerger - off int - files []os.FileInfo -} - -func (f *UnionFile) Close() error { - // first close base, so we have a newer timestamp in the overlay. If we'd close - // the overlay first, we'd get a cacheStale the next time we access this file - // -> cache would be useless ;-) - if f.Base != nil { - f.Base.Close() - } - if f.Layer != nil { - return f.Layer.Close() - } - return BADFD -} - -func (f *UnionFile) Read(s []byte) (int, error) { - if f.Layer != nil { - n, err := f.Layer.Read(s) - if (err == nil || err == io.EOF) && f.Base != nil { - // advance the file position also in the base file, the next - // call may be a write at this position (or a seek with SEEK_CUR) - if _, seekErr := f.Base.Seek(int64(n), io.SeekCurrent); seekErr != nil { - // only overwrite err in case the seek fails: we need to - // report an eventual io.EOF to the caller - err = seekErr - } - } - return n, err - } - if f.Base != nil { - return f.Base.Read(s) - } - return 0, BADFD -} - -func (f *UnionFile) ReadAt(s []byte, o int64) (int, error) { - if f.Layer != nil { - n, err := f.Layer.ReadAt(s, o) - if (err == nil || err == io.EOF) && f.Base != nil { - _, err = f.Base.Seek(o+int64(n), io.SeekStart) - } - return n, err - } - if f.Base != nil { - return f.Base.ReadAt(s, o) - } - return 0, BADFD -} - -func (f *UnionFile) Seek(o int64, w int) (pos int64, err error) { - if f.Layer != nil { - pos, err = f.Layer.Seek(o, w) - if (err == nil || err == io.EOF) && f.Base != nil { - _, err = f.Base.Seek(o, w) - } - return pos, err - } - if f.Base != nil { - return f.Base.Seek(o, w) - } - return 0, BADFD -} - -func (f *UnionFile) Write(s []byte) (n int, err error) { - if f.Layer != nil { - n, err = f.Layer.Write(s) - if err == nil && f.Base != nil { // hmm, do we have fixed size files where a write may hit the EOF mark? - _, err = f.Base.Write(s) - } - return n, err - } - if f.Base != nil { - return f.Base.Write(s) - } - return 0, BADFD -} - -func (f *UnionFile) WriteAt(s []byte, o int64) (n int, err error) { - if f.Layer != nil { - n, err = f.Layer.WriteAt(s, o) - if err == nil && f.Base != nil { - _, err = f.Base.WriteAt(s, o) - } - return n, err - } - if f.Base != nil { - return f.Base.WriteAt(s, o) - } - return 0, BADFD -} - -func (f *UnionFile) Name() string { - if f.Layer != nil { - return f.Layer.Name() - } - return f.Base.Name() -} - -// DirsMerger is how UnionFile weaves two directories together. -// It takes the FileInfo slices from the layer and the base and returns a -// single view. -type DirsMerger func(lofi, bofi []os.FileInfo) ([]os.FileInfo, error) - -var defaultUnionMergeDirsFn = func(lofi, bofi []os.FileInfo) ([]os.FileInfo, error) { - files := make(map[string]os.FileInfo) - - for _, fi := range lofi { - files[fi.Name()] = fi - } - - for _, fi := range bofi { - if _, exists := files[fi.Name()]; !exists { - files[fi.Name()] = fi - } - } - - rfi := make([]os.FileInfo, len(files)) - - i := 0 - for _, fi := range files { - rfi[i] = fi - i++ - } - - return rfi, nil -} - -// Readdir will weave the two directories together and -// return a single view of the overlayed directories. -// At the end of the directory view, the error is io.EOF if c > 0. -func (f *UnionFile) Readdir(c int) (ofi []os.FileInfo, err error) { - var merge DirsMerger = f.Merger - if merge == nil { - merge = defaultUnionMergeDirsFn - } - - if f.off == 0 { - var lfi []os.FileInfo - if f.Layer != nil { - lfi, err = f.Layer.Readdir(-1) - if err != nil { - return nil, err - } - } - - var bfi []os.FileInfo - if f.Base != nil { - bfi, err = f.Base.Readdir(-1) - if err != nil { - return nil, err - } - - } - merged, err := merge(lfi, bfi) - if err != nil { - return nil, err - } - f.files = append(f.files, merged...) - } - files := f.files[f.off:] - - if c <= 0 { - return files, nil - } - - if len(files) == 0 { - return nil, io.EOF - } - - if c > len(files) { - c = len(files) - } - - defer func() { f.off += c }() - return files[:c], nil -} - -func (f *UnionFile) Readdirnames(c int) ([]string, error) { - rfi, err := f.Readdir(c) - if err != nil { - return nil, err - } - var names []string - for _, fi := range rfi { - names = append(names, fi.Name()) - } - return names, nil -} - -func (f *UnionFile) Stat() (os.FileInfo, error) { - if f.Layer != nil { - return f.Layer.Stat() - } - if f.Base != nil { - return f.Base.Stat() - } - return nil, BADFD -} - -func (f *UnionFile) Sync() (err error) { - if f.Layer != nil { - err = f.Layer.Sync() - if err == nil && f.Base != nil { - err = f.Base.Sync() - } - return err - } - if f.Base != nil { - return f.Base.Sync() - } - return BADFD -} - -func (f *UnionFile) Truncate(s int64) (err error) { - if f.Layer != nil { - err = f.Layer.Truncate(s) - if err == nil && f.Base != nil { - err = f.Base.Truncate(s) - } - return err - } - if f.Base != nil { - return f.Base.Truncate(s) - } - return BADFD -} - -func (f *UnionFile) WriteString(s string) (n int, err error) { - if f.Layer != nil { - n, err = f.Layer.WriteString(s) - if err == nil && f.Base != nil { - _, err = f.Base.WriteString(s) - } - return n, err - } - if f.Base != nil { - return f.Base.WriteString(s) - } - return 0, BADFD -} - -func copyFile(base Fs, layer Fs, name string, bfh File) error { - // First make sure the directory exists - exists, err := Exists(layer, filepath.Dir(name)) - if err != nil { - return err - } - if !exists { - err = layer.MkdirAll(filepath.Dir(name), 0o777) // FIXME? - if err != nil { - return err - } - } - - // Create the file on the overlay - lfh, err := layer.Create(name) - if err != nil { - return err - } - n, err := io.Copy(lfh, bfh) - if err != nil { - // If anything fails, clean up the file - layer.Remove(name) - lfh.Close() - return err - } - - bfi, err := bfh.Stat() - if err != nil || bfi.Size() != n { - layer.Remove(name) - lfh.Close() - return syscall.EIO - } - - err = lfh.Close() - if err != nil { - layer.Remove(name) - lfh.Close() - return err - } - return layer.Chtimes(name, bfi.ModTime(), bfi.ModTime()) -} - -func copyToLayer(base Fs, layer Fs, name string) error { - bfh, err := base.Open(name) - if err != nil { - return err - } - defer bfh.Close() - - return copyFile(base, layer, name, bfh) -} - -func copyFileToLayer(base Fs, layer Fs, name string, flag int, perm os.FileMode) error { - bfh, err := base.OpenFile(name, flag, perm) - if err != nil { - return err - } - defer bfh.Close() - - return copyFile(base, layer, name, bfh) -} diff --git a/vendor/github.com/spf13/afero/util.go b/vendor/github.com/spf13/afero/util.go deleted file mode 100644 index 9e4cba2..0000000 --- a/vendor/github.com/spf13/afero/util.go +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright ©2015 Steve Francia -// Portions Copyright ©2015 The Hugo Authors -// Portions Copyright 2016-present Bjørn Erik Pedersen -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package afero - -import ( - "bytes" - "fmt" - "io" - "os" - "path/filepath" - "strings" - "unicode" - - "golang.org/x/text/runes" - "golang.org/x/text/transform" - "golang.org/x/text/unicode/norm" -) - -// Filepath separator defined by os.Separator. -const FilePathSeparator = string(filepath.Separator) - -// Takes a reader and a path and writes the content -func (a Afero) WriteReader(path string, r io.Reader) (err error) { - return WriteReader(a.Fs, path, r) -} - -func WriteReader(fs Fs, path string, r io.Reader) (err error) { - dir, _ := filepath.Split(path) - ospath := filepath.FromSlash(dir) - - if ospath != "" { - err = fs.MkdirAll(ospath, 0o777) // rwx, rw, r - if err != nil { - if err != os.ErrExist { - return err - } - } - } - - file, err := fs.Create(path) - if err != nil { - return - } - defer file.Close() - - _, err = io.Copy(file, r) - return -} - -// Same as WriteReader but checks to see if file/directory already exists. -func (a Afero) SafeWriteReader(path string, r io.Reader) (err error) { - return SafeWriteReader(a.Fs, path, r) -} - -func SafeWriteReader(fs Fs, path string, r io.Reader) (err error) { - dir, _ := filepath.Split(path) - ospath := filepath.FromSlash(dir) - - if ospath != "" { - err = fs.MkdirAll(ospath, 0o777) // rwx, rw, r - if err != nil { - return - } - } - - exists, err := Exists(fs, path) - if err != nil { - return - } - if exists { - return fmt.Errorf("%v already exists", path) - } - - file, err := fs.Create(path) - if err != nil { - return - } - defer file.Close() - - _, err = io.Copy(file, r) - return -} - -func (a Afero) GetTempDir(subPath string) string { - return GetTempDir(a.Fs, subPath) -} - -// GetTempDir returns the default temp directory with trailing slash -// if subPath is not empty then it will be created recursively with mode 777 rwx rwx rwx -func GetTempDir(fs Fs, subPath string) string { - addSlash := func(p string) string { - if FilePathSeparator != p[len(p)-1:] { - p = p + FilePathSeparator - } - return p - } - dir := addSlash(os.TempDir()) - - if subPath != "" { - // preserve windows backslash :-( - if FilePathSeparator == "\\" { - subPath = strings.Replace(subPath, "\\", "____", -1) - } - dir = dir + UnicodeSanitize((subPath)) - if FilePathSeparator == "\\" { - dir = strings.Replace(dir, "____", "\\", -1) - } - - if exists, _ := Exists(fs, dir); exists { - return addSlash(dir) - } - - err := fs.MkdirAll(dir, 0o777) - if err != nil { - panic(err) - } - dir = addSlash(dir) - } - return dir -} - -// Rewrite string to remove non-standard path characters -func UnicodeSanitize(s string) string { - source := []rune(s) - target := make([]rune, 0, len(source)) - - for _, r := range source { - if unicode.IsLetter(r) || - unicode.IsDigit(r) || - unicode.IsMark(r) || - r == '.' || - r == '/' || - r == '\\' || - r == '_' || - r == '-' || - r == '%' || - r == ' ' || - r == '#' { - target = append(target, r) - } - } - - return string(target) -} - -// Transform characters with accents into plain forms. -func NeuterAccents(s string) string { - t := transform.Chain(norm.NFD, runes.Remove(runes.In(unicode.Mn)), norm.NFC) - result, _, _ := transform.String(t, string(s)) - - return result -} - -func (a Afero) FileContainsBytes(filename string, subslice []byte) (bool, error) { - return FileContainsBytes(a.Fs, filename, subslice) -} - -// Check if a file contains a specified byte slice. -func FileContainsBytes(fs Fs, filename string, subslice []byte) (bool, error) { - f, err := fs.Open(filename) - if err != nil { - return false, err - } - defer f.Close() - - return readerContainsAny(f, subslice), nil -} - -func (a Afero) FileContainsAnyBytes(filename string, subslices [][]byte) (bool, error) { - return FileContainsAnyBytes(a.Fs, filename, subslices) -} - -// Check if a file contains any of the specified byte slices. -func FileContainsAnyBytes(fs Fs, filename string, subslices [][]byte) (bool, error) { - f, err := fs.Open(filename) - if err != nil { - return false, err - } - defer f.Close() - - return readerContainsAny(f, subslices...), nil -} - -// readerContains reports whether any of the subslices is within r. -func readerContainsAny(r io.Reader, subslices ...[]byte) bool { - if r == nil || len(subslices) == 0 { - return false - } - - largestSlice := 0 - - for _, sl := range subslices { - if len(sl) > largestSlice { - largestSlice = len(sl) - } - } - - if largestSlice == 0 { - return false - } - - bufflen := largestSlice * 4 - halflen := bufflen / 2 - buff := make([]byte, bufflen) - var err error - var n, i int - - for { - i++ - if i == 1 { - n, err = io.ReadAtLeast(r, buff[:halflen], halflen) - } else { - if i != 2 { - // shift left to catch overlapping matches - copy(buff[:], buff[halflen:]) - } - n, err = io.ReadAtLeast(r, buff[halflen:], halflen) - } - - if n > 0 { - for _, sl := range subslices { - if bytes.Contains(buff, sl) { - return true - } - } - } - - if err != nil { - break - } - } - return false -} - -func (a Afero) DirExists(path string) (bool, error) { - return DirExists(a.Fs, path) -} - -// DirExists checks if a path exists and is a directory. -func DirExists(fs Fs, path string) (bool, error) { - fi, err := fs.Stat(path) - if err == nil && fi.IsDir() { - return true, nil - } - if os.IsNotExist(err) { - return false, nil - } - return false, err -} - -func (a Afero) IsDir(path string) (bool, error) { - return IsDir(a.Fs, path) -} - -// IsDir checks if a given path is a directory. -func IsDir(fs Fs, path string) (bool, error) { - fi, err := fs.Stat(path) - if err != nil { - return false, err - } - return fi.IsDir(), nil -} - -func (a Afero) IsEmpty(path string) (bool, error) { - return IsEmpty(a.Fs, path) -} - -// IsEmpty checks if a given file or directory is empty. -func IsEmpty(fs Fs, path string) (bool, error) { - if b, _ := Exists(fs, path); !b { - return false, fmt.Errorf("%q path does not exist", path) - } - fi, err := fs.Stat(path) - if err != nil { - return false, err - } - if fi.IsDir() { - f, err := fs.Open(path) - if err != nil { - return false, err - } - defer f.Close() - list, err := f.Readdir(-1) - if err != nil { - return false, err - } - return len(list) == 0, nil - } - return fi.Size() == 0, nil -} - -func (a Afero) Exists(path string) (bool, error) { - return Exists(a.Fs, path) -} - -// Check if a file or directory exists. -func Exists(fs Fs, path string) (bool, error) { - _, err := fs.Stat(path) - if err == nil { - return true, nil - } - if os.IsNotExist(err) { - return false, nil - } - return false, err -} - -func FullBaseFsPath(basePathFs *BasePathFs, relativePath string) string { - combinedPath := filepath.Join(basePathFs.path, relativePath) - if parent, ok := basePathFs.source.(*BasePathFs); ok { - return FullBaseFsPath(parent, combinedPath) - } - - return combinedPath -} diff --git a/vendor/github.com/spf13/cast/.gitignore b/vendor/github.com/spf13/cast/.gitignore deleted file mode 100644 index 53053a8..0000000 --- a/vendor/github.com/spf13/cast/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test - -*.bench diff --git a/vendor/github.com/spf13/cast/LICENSE b/vendor/github.com/spf13/cast/LICENSE deleted file mode 100644 index 4527efb..0000000 --- a/vendor/github.com/spf13/cast/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Steve Francia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/spf13/cast/Makefile b/vendor/github.com/spf13/cast/Makefile deleted file mode 100644 index f01a5db..0000000 --- a/vendor/github.com/spf13/cast/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -GOVERSION := $(shell go version | cut -d ' ' -f 3 | cut -d '.' -f 2) - -.PHONY: check fmt lint test test-race vet test-cover-html help -.DEFAULT_GOAL := help - -check: test-race fmt vet lint ## Run tests and linters - -test: ## Run tests - go test ./... - -test-race: ## Run tests with race detector - go test -race ./... - -fmt: ## Run gofmt linter -ifeq "$(GOVERSION)" "12" - @for d in `go list` ; do \ - if [ "`gofmt -l -s $$GOPATH/src/$$d | tee /dev/stderr`" ]; then \ - echo "^ improperly formatted go files" && echo && exit 1; \ - fi \ - done -endif - -lint: ## Run golint linter - @for d in `go list` ; do \ - if [ "`golint $$d | tee /dev/stderr`" ]; then \ - echo "^ golint errors!" && echo && exit 1; \ - fi \ - done - -vet: ## Run go vet linter - @if [ "`go vet | tee /dev/stderr`" ]; then \ - echo "^ go vet errors!" && echo && exit 1; \ - fi - -test-cover-html: ## Generate test coverage report - go test -coverprofile=coverage.out -covermode=count - go tool cover -func=coverage.out - -help: - @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' diff --git a/vendor/github.com/spf13/cast/README.md b/vendor/github.com/spf13/cast/README.md deleted file mode 100644 index 0e9e145..0000000 --- a/vendor/github.com/spf13/cast/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# cast - -[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/spf13/cast/ci.yaml?branch=master&style=flat-square)](https://github.com/spf13/cast/actions/workflows/ci.yaml) -[![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/spf13/cast)](https://pkg.go.dev/mod/github.com/spf13/cast) -![Go Version](https://img.shields.io/badge/go%20version-%3E=1.16-61CFDD.svg?style=flat-square) -[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cast?style=flat-square)](https://goreportcard.com/report/github.com/spf13/cast) - -Easy and safe casting from one type to another in Go - -Don’t Panic! ... Cast - -## What is Cast? - -Cast is a library to convert between different go types in a consistent and easy way. - -Cast provides simple functions to easily convert a number to a string, an -interface into a bool, etc. Cast does this intelligently when an obvious -conversion is possible. It doesn’t make any attempts to guess what you meant, -for example you can only convert a string to an int when it is a string -representation of an int such as “8”. Cast was developed for use in -[Hugo](https://gohugo.io), a website engine which uses YAML, TOML or JSON -for meta data. - -## Why use Cast? - -When working with dynamic data in Go you often need to cast or convert the data -from one type into another. Cast goes beyond just using type assertion (though -it uses that when possible) to provide a very straightforward and convenient -library. - -If you are working with interfaces to handle things like dynamic content -you’ll need an easy way to convert an interface into a given type. This -is the library for you. - -If you are taking in data from YAML, TOML or JSON or other formats which lack -full types, then Cast is the library for you. - -## Usage - -Cast provides a handful of To_____ methods. These methods will always return -the desired type. **If input is provided that will not convert to that type, the -0 or nil value for that type will be returned**. - -Cast also provides identical methods To_____E. These return the same result as -the To_____ methods, plus an additional error which tells you if it successfully -converted. Using these methods you can tell the difference between when the -input matched the zero value or when the conversion failed and the zero value -was returned. - -The following examples are merely a sample of what is available. Please review -the code for a complete set. - -### Example ‘ToString’: - - cast.ToString("mayonegg") // "mayonegg" - cast.ToString(8) // "8" - cast.ToString(8.31) // "8.31" - cast.ToString([]byte("one time")) // "one time" - cast.ToString(nil) // "" - - var foo interface{} = "one more time" - cast.ToString(foo) // "one more time" - - -### Example ‘ToInt’: - - cast.ToInt(8) // 8 - cast.ToInt(8.31) // 8 - cast.ToInt("8") // 8 - cast.ToInt(true) // 1 - cast.ToInt(false) // 0 - - var eight interface{} = 8 - cast.ToInt(eight) // 8 - cast.ToInt(nil) // 0 diff --git a/vendor/github.com/spf13/cast/cast.go b/vendor/github.com/spf13/cast/cast.go deleted file mode 100644 index 0cfe941..0000000 --- a/vendor/github.com/spf13/cast/cast.go +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -// Package cast provides easy and safe casting in Go. -package cast - -import "time" - -// ToBool casts an interface to a bool type. -func ToBool(i interface{}) bool { - v, _ := ToBoolE(i) - return v -} - -// ToTime casts an interface to a time.Time type. -func ToTime(i interface{}) time.Time { - v, _ := ToTimeE(i) - return v -} - -func ToTimeInDefaultLocation(i interface{}, location *time.Location) time.Time { - v, _ := ToTimeInDefaultLocationE(i, location) - return v -} - -// ToDuration casts an interface to a time.Duration type. -func ToDuration(i interface{}) time.Duration { - v, _ := ToDurationE(i) - return v -} - -// ToFloat64 casts an interface to a float64 type. -func ToFloat64(i interface{}) float64 { - v, _ := ToFloat64E(i) - return v -} - -// ToFloat32 casts an interface to a float32 type. -func ToFloat32(i interface{}) float32 { - v, _ := ToFloat32E(i) - return v -} - -// ToInt64 casts an interface to an int64 type. -func ToInt64(i interface{}) int64 { - v, _ := ToInt64E(i) - return v -} - -// ToInt32 casts an interface to an int32 type. -func ToInt32(i interface{}) int32 { - v, _ := ToInt32E(i) - return v -} - -// ToInt16 casts an interface to an int16 type. -func ToInt16(i interface{}) int16 { - v, _ := ToInt16E(i) - return v -} - -// ToInt8 casts an interface to an int8 type. -func ToInt8(i interface{}) int8 { - v, _ := ToInt8E(i) - return v -} - -// ToInt casts an interface to an int type. -func ToInt(i interface{}) int { - v, _ := ToIntE(i) - return v -} - -// ToUint casts an interface to a uint type. -func ToUint(i interface{}) uint { - v, _ := ToUintE(i) - return v -} - -// ToUint64 casts an interface to a uint64 type. -func ToUint64(i interface{}) uint64 { - v, _ := ToUint64E(i) - return v -} - -// ToUint32 casts an interface to a uint32 type. -func ToUint32(i interface{}) uint32 { - v, _ := ToUint32E(i) - return v -} - -// ToUint16 casts an interface to a uint16 type. -func ToUint16(i interface{}) uint16 { - v, _ := ToUint16E(i) - return v -} - -// ToUint8 casts an interface to a uint8 type. -func ToUint8(i interface{}) uint8 { - v, _ := ToUint8E(i) - return v -} - -// ToString casts an interface to a string type. -func ToString(i interface{}) string { - v, _ := ToStringE(i) - return v -} - -// ToStringMapString casts an interface to a map[string]string type. -func ToStringMapString(i interface{}) map[string]string { - v, _ := ToStringMapStringE(i) - return v -} - -// ToStringMapStringSlice casts an interface to a map[string][]string type. -func ToStringMapStringSlice(i interface{}) map[string][]string { - v, _ := ToStringMapStringSliceE(i) - return v -} - -// ToStringMapBool casts an interface to a map[string]bool type. -func ToStringMapBool(i interface{}) map[string]bool { - v, _ := ToStringMapBoolE(i) - return v -} - -// ToStringMapInt casts an interface to a map[string]int type. -func ToStringMapInt(i interface{}) map[string]int { - v, _ := ToStringMapIntE(i) - return v -} - -// ToStringMapInt64 casts an interface to a map[string]int64 type. -func ToStringMapInt64(i interface{}) map[string]int64 { - v, _ := ToStringMapInt64E(i) - return v -} - -// ToStringMap casts an interface to a map[string]interface{} type. -func ToStringMap(i interface{}) map[string]interface{} { - v, _ := ToStringMapE(i) - return v -} - -// ToSlice casts an interface to a []interface{} type. -func ToSlice(i interface{}) []interface{} { - v, _ := ToSliceE(i) - return v -} - -// ToBoolSlice casts an interface to a []bool type. -func ToBoolSlice(i interface{}) []bool { - v, _ := ToBoolSliceE(i) - return v -} - -// ToStringSlice casts an interface to a []string type. -func ToStringSlice(i interface{}) []string { - v, _ := ToStringSliceE(i) - return v -} - -// ToIntSlice casts an interface to a []int type. -func ToIntSlice(i interface{}) []int { - v, _ := ToIntSliceE(i) - return v -} - -// ToDurationSlice casts an interface to a []time.Duration type. -func ToDurationSlice(i interface{}) []time.Duration { - v, _ := ToDurationSliceE(i) - return v -} diff --git a/vendor/github.com/spf13/cast/caste.go b/vendor/github.com/spf13/cast/caste.go deleted file mode 100644 index d49bbf8..0000000 --- a/vendor/github.com/spf13/cast/caste.go +++ /dev/null @@ -1,1498 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -package cast - -import ( - "encoding/json" - "errors" - "fmt" - "html/template" - "reflect" - "strconv" - "strings" - "time" -) - -var errNegativeNotAllowed = errors.New("unable to cast negative value") - -// ToTimeE casts an interface to a time.Time type. -func ToTimeE(i interface{}) (tim time.Time, err error) { - return ToTimeInDefaultLocationE(i, time.UTC) -} - -// ToTimeInDefaultLocationE casts an empty interface to time.Time, -// interpreting inputs without a timezone to be in the given location, -// or the local timezone if nil. -func ToTimeInDefaultLocationE(i interface{}, location *time.Location) (tim time.Time, err error) { - i = indirect(i) - - switch v := i.(type) { - case time.Time: - return v, nil - case string: - return StringToDateInDefaultLocation(v, location) - case json.Number: - s, err1 := ToInt64E(v) - if err1 != nil { - return time.Time{}, fmt.Errorf("unable to cast %#v of type %T to Time", i, i) - } - return time.Unix(s, 0), nil - case int: - return time.Unix(int64(v), 0), nil - case int64: - return time.Unix(v, 0), nil - case int32: - return time.Unix(int64(v), 0), nil - case uint: - return time.Unix(int64(v), 0), nil - case uint64: - return time.Unix(int64(v), 0), nil - case uint32: - return time.Unix(int64(v), 0), nil - default: - return time.Time{}, fmt.Errorf("unable to cast %#v of type %T to Time", i, i) - } -} - -// ToDurationE casts an interface to a time.Duration type. -func ToDurationE(i interface{}) (d time.Duration, err error) { - i = indirect(i) - - switch s := i.(type) { - case time.Duration: - return s, nil - case int, int64, int32, int16, int8, uint, uint64, uint32, uint16, uint8: - d = time.Duration(ToInt64(s)) - return - case float32, float64: - d = time.Duration(ToFloat64(s)) - return - case string: - if strings.ContainsAny(s, "nsuµmh") { - d, err = time.ParseDuration(s) - } else { - d, err = time.ParseDuration(s + "ns") - } - return - case json.Number: - var v float64 - v, err = s.Float64() - d = time.Duration(v) - return - default: - err = fmt.Errorf("unable to cast %#v of type %T to Duration", i, i) - return - } -} - -// ToBoolE casts an interface to a bool type. -func ToBoolE(i interface{}) (bool, error) { - i = indirect(i) - - switch b := i.(type) { - case bool: - return b, nil - case nil: - return false, nil - case int: - return b != 0, nil - case int64: - return b != 0, nil - case int32: - return b != 0, nil - case int16: - return b != 0, nil - case int8: - return b != 0, nil - case uint: - return b != 0, nil - case uint64: - return b != 0, nil - case uint32: - return b != 0, nil - case uint16: - return b != 0, nil - case uint8: - return b != 0, nil - case float64: - return b != 0, nil - case float32: - return b != 0, nil - case time.Duration: - return b != 0, nil - case string: - return strconv.ParseBool(i.(string)) - case json.Number: - v, err := ToInt64E(b) - if err == nil { - return v != 0, nil - } - return false, fmt.Errorf("unable to cast %#v of type %T to bool", i, i) - default: - return false, fmt.Errorf("unable to cast %#v of type %T to bool", i, i) - } -} - -// ToFloat64E casts an interface to a float64 type. -func ToFloat64E(i interface{}) (float64, error) { - i = indirect(i) - - intv, ok := toInt(i) - if ok { - return float64(intv), nil - } - - switch s := i.(type) { - case float64: - return s, nil - case float32: - return float64(s), nil - case int64: - return float64(s), nil - case int32: - return float64(s), nil - case int16: - return float64(s), nil - case int8: - return float64(s), nil - case uint: - return float64(s), nil - case uint64: - return float64(s), nil - case uint32: - return float64(s), nil - case uint16: - return float64(s), nil - case uint8: - return float64(s), nil - case string: - v, err := strconv.ParseFloat(s, 64) - if err == nil { - return v, nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i) - case json.Number: - v, err := s.Float64() - if err == nil { - return v, nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i) - case bool: - if s { - return 1, nil - } - return 0, nil - case nil: - return 0, nil - default: - return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i) - } -} - -// ToFloat32E casts an interface to a float32 type. -func ToFloat32E(i interface{}) (float32, error) { - i = indirect(i) - - intv, ok := toInt(i) - if ok { - return float32(intv), nil - } - - switch s := i.(type) { - case float64: - return float32(s), nil - case float32: - return s, nil - case int64: - return float32(s), nil - case int32: - return float32(s), nil - case int16: - return float32(s), nil - case int8: - return float32(s), nil - case uint: - return float32(s), nil - case uint64: - return float32(s), nil - case uint32: - return float32(s), nil - case uint16: - return float32(s), nil - case uint8: - return float32(s), nil - case string: - v, err := strconv.ParseFloat(s, 32) - if err == nil { - return float32(v), nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i) - case json.Number: - v, err := s.Float64() - if err == nil { - return float32(v), nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i) - case bool: - if s { - return 1, nil - } - return 0, nil - case nil: - return 0, nil - default: - return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i) - } -} - -// ToInt64E casts an interface to an int64 type. -func ToInt64E(i interface{}) (int64, error) { - i = indirect(i) - - intv, ok := toInt(i) - if ok { - return int64(intv), nil - } - - switch s := i.(type) { - case int64: - return s, nil - case int32: - return int64(s), nil - case int16: - return int64(s), nil - case int8: - return int64(s), nil - case uint: - return int64(s), nil - case uint64: - return int64(s), nil - case uint32: - return int64(s), nil - case uint16: - return int64(s), nil - case uint8: - return int64(s), nil - case float64: - return int64(s), nil - case float32: - return int64(s), nil - case string: - v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) - if err == nil { - return v, nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to int64", i, i) - case json.Number: - return ToInt64E(string(s)) - case bool: - if s { - return 1, nil - } - return 0, nil - case nil: - return 0, nil - default: - return 0, fmt.Errorf("unable to cast %#v of type %T to int64", i, i) - } -} - -// ToInt32E casts an interface to an int32 type. -func ToInt32E(i interface{}) (int32, error) { - i = indirect(i) - - intv, ok := toInt(i) - if ok { - return int32(intv), nil - } - - switch s := i.(type) { - case int64: - return int32(s), nil - case int32: - return s, nil - case int16: - return int32(s), nil - case int8: - return int32(s), nil - case uint: - return int32(s), nil - case uint64: - return int32(s), nil - case uint32: - return int32(s), nil - case uint16: - return int32(s), nil - case uint8: - return int32(s), nil - case float64: - return int32(s), nil - case float32: - return int32(s), nil - case string: - v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) - if err == nil { - return int32(v), nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to int32", i, i) - case json.Number: - return ToInt32E(string(s)) - case bool: - if s { - return 1, nil - } - return 0, nil - case nil: - return 0, nil - default: - return 0, fmt.Errorf("unable to cast %#v of type %T to int32", i, i) - } -} - -// ToInt16E casts an interface to an int16 type. -func ToInt16E(i interface{}) (int16, error) { - i = indirect(i) - - intv, ok := toInt(i) - if ok { - return int16(intv), nil - } - - switch s := i.(type) { - case int64: - return int16(s), nil - case int32: - return int16(s), nil - case int16: - return s, nil - case int8: - return int16(s), nil - case uint: - return int16(s), nil - case uint64: - return int16(s), nil - case uint32: - return int16(s), nil - case uint16: - return int16(s), nil - case uint8: - return int16(s), nil - case float64: - return int16(s), nil - case float32: - return int16(s), nil - case string: - v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) - if err == nil { - return int16(v), nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to int16", i, i) - case json.Number: - return ToInt16E(string(s)) - case bool: - if s { - return 1, nil - } - return 0, nil - case nil: - return 0, nil - default: - return 0, fmt.Errorf("unable to cast %#v of type %T to int16", i, i) - } -} - -// ToInt8E casts an interface to an int8 type. -func ToInt8E(i interface{}) (int8, error) { - i = indirect(i) - - intv, ok := toInt(i) - if ok { - return int8(intv), nil - } - - switch s := i.(type) { - case int64: - return int8(s), nil - case int32: - return int8(s), nil - case int16: - return int8(s), nil - case int8: - return s, nil - case uint: - return int8(s), nil - case uint64: - return int8(s), nil - case uint32: - return int8(s), nil - case uint16: - return int8(s), nil - case uint8: - return int8(s), nil - case float64: - return int8(s), nil - case float32: - return int8(s), nil - case string: - v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) - if err == nil { - return int8(v), nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to int8", i, i) - case json.Number: - return ToInt8E(string(s)) - case bool: - if s { - return 1, nil - } - return 0, nil - case nil: - return 0, nil - default: - return 0, fmt.Errorf("unable to cast %#v of type %T to int8", i, i) - } -} - -// ToIntE casts an interface to an int type. -func ToIntE(i interface{}) (int, error) { - i = indirect(i) - - intv, ok := toInt(i) - if ok { - return intv, nil - } - - switch s := i.(type) { - case int64: - return int(s), nil - case int32: - return int(s), nil - case int16: - return int(s), nil - case int8: - return int(s), nil - case uint: - return int(s), nil - case uint64: - return int(s), nil - case uint32: - return int(s), nil - case uint16: - return int(s), nil - case uint8: - return int(s), nil - case float64: - return int(s), nil - case float32: - return int(s), nil - case string: - v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) - if err == nil { - return int(v), nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to int64", i, i) - case json.Number: - return ToIntE(string(s)) - case bool: - if s { - return 1, nil - } - return 0, nil - case nil: - return 0, nil - default: - return 0, fmt.Errorf("unable to cast %#v of type %T to int", i, i) - } -} - -// ToUintE casts an interface to a uint type. -func ToUintE(i interface{}) (uint, error) { - i = indirect(i) - - intv, ok := toInt(i) - if ok { - if intv < 0 { - return 0, errNegativeNotAllowed - } - return uint(intv), nil - } - - switch s := i.(type) { - case string: - v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) - if err == nil { - if v < 0 { - return 0, errNegativeNotAllowed - } - return uint(v), nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to uint", i, i) - case json.Number: - return ToUintE(string(s)) - case int64: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint(s), nil - case int32: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint(s), nil - case int16: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint(s), nil - case int8: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint(s), nil - case uint: - return s, nil - case uint64: - return uint(s), nil - case uint32: - return uint(s), nil - case uint16: - return uint(s), nil - case uint8: - return uint(s), nil - case float64: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint(s), nil - case float32: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint(s), nil - case bool: - if s { - return 1, nil - } - return 0, nil - case nil: - return 0, nil - default: - return 0, fmt.Errorf("unable to cast %#v of type %T to uint", i, i) - } -} - -// ToUint64E casts an interface to a uint64 type. -func ToUint64E(i interface{}) (uint64, error) { - i = indirect(i) - - intv, ok := toInt(i) - if ok { - if intv < 0 { - return 0, errNegativeNotAllowed - } - return uint64(intv), nil - } - - switch s := i.(type) { - case string: - v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) - if err == nil { - if v < 0 { - return 0, errNegativeNotAllowed - } - return uint64(v), nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to uint64", i, i) - case json.Number: - return ToUint64E(string(s)) - case int64: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint64(s), nil - case int32: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint64(s), nil - case int16: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint64(s), nil - case int8: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint64(s), nil - case uint: - return uint64(s), nil - case uint64: - return s, nil - case uint32: - return uint64(s), nil - case uint16: - return uint64(s), nil - case uint8: - return uint64(s), nil - case float32: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint64(s), nil - case float64: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint64(s), nil - case bool: - if s { - return 1, nil - } - return 0, nil - case nil: - return 0, nil - default: - return 0, fmt.Errorf("unable to cast %#v of type %T to uint64", i, i) - } -} - -// ToUint32E casts an interface to a uint32 type. -func ToUint32E(i interface{}) (uint32, error) { - i = indirect(i) - - intv, ok := toInt(i) - if ok { - if intv < 0 { - return 0, errNegativeNotAllowed - } - return uint32(intv), nil - } - - switch s := i.(type) { - case string: - v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) - if err == nil { - if v < 0 { - return 0, errNegativeNotAllowed - } - return uint32(v), nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to uint32", i, i) - case json.Number: - return ToUint32E(string(s)) - case int64: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint32(s), nil - case int32: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint32(s), nil - case int16: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint32(s), nil - case int8: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint32(s), nil - case uint: - return uint32(s), nil - case uint64: - return uint32(s), nil - case uint32: - return s, nil - case uint16: - return uint32(s), nil - case uint8: - return uint32(s), nil - case float64: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint32(s), nil - case float32: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint32(s), nil - case bool: - if s { - return 1, nil - } - return 0, nil - case nil: - return 0, nil - default: - return 0, fmt.Errorf("unable to cast %#v of type %T to uint32", i, i) - } -} - -// ToUint16E casts an interface to a uint16 type. -func ToUint16E(i interface{}) (uint16, error) { - i = indirect(i) - - intv, ok := toInt(i) - if ok { - if intv < 0 { - return 0, errNegativeNotAllowed - } - return uint16(intv), nil - } - - switch s := i.(type) { - case string: - v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) - if err == nil { - if v < 0 { - return 0, errNegativeNotAllowed - } - return uint16(v), nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to uint16", i, i) - case json.Number: - return ToUint16E(string(s)) - case int64: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint16(s), nil - case int32: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint16(s), nil - case int16: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint16(s), nil - case int8: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint16(s), nil - case uint: - return uint16(s), nil - case uint64: - return uint16(s), nil - case uint32: - return uint16(s), nil - case uint16: - return s, nil - case uint8: - return uint16(s), nil - case float64: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint16(s), nil - case float32: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint16(s), nil - case bool: - if s { - return 1, nil - } - return 0, nil - case nil: - return 0, nil - default: - return 0, fmt.Errorf("unable to cast %#v of type %T to uint16", i, i) - } -} - -// ToUint8E casts an interface to a uint type. -func ToUint8E(i interface{}) (uint8, error) { - i = indirect(i) - - intv, ok := toInt(i) - if ok { - if intv < 0 { - return 0, errNegativeNotAllowed - } - return uint8(intv), nil - } - - switch s := i.(type) { - case string: - v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) - if err == nil { - if v < 0 { - return 0, errNegativeNotAllowed - } - return uint8(v), nil - } - return 0, fmt.Errorf("unable to cast %#v of type %T to uint8", i, i) - case json.Number: - return ToUint8E(string(s)) - case int64: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint8(s), nil - case int32: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint8(s), nil - case int16: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint8(s), nil - case int8: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint8(s), nil - case uint: - return uint8(s), nil - case uint64: - return uint8(s), nil - case uint32: - return uint8(s), nil - case uint16: - return uint8(s), nil - case uint8: - return s, nil - case float64: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint8(s), nil - case float32: - if s < 0 { - return 0, errNegativeNotAllowed - } - return uint8(s), nil - case bool: - if s { - return 1, nil - } - return 0, nil - case nil: - return 0, nil - default: - return 0, fmt.Errorf("unable to cast %#v of type %T to uint8", i, i) - } -} - -// From html/template/content.go -// Copyright 2011 The Go Authors. All rights reserved. -// indirect returns the value, after dereferencing as many times -// as necessary to reach the base type (or nil). -func indirect(a interface{}) interface{} { - if a == nil { - return nil - } - if t := reflect.TypeOf(a); t.Kind() != reflect.Ptr { - // Avoid creating a reflect.Value if it's not a pointer. - return a - } - v := reflect.ValueOf(a) - for v.Kind() == reflect.Ptr && !v.IsNil() { - v = v.Elem() - } - return v.Interface() -} - -// From html/template/content.go -// Copyright 2011 The Go Authors. All rights reserved. -// indirectToStringerOrError returns the value, after dereferencing as many times -// as necessary to reach the base type (or nil) or an implementation of fmt.Stringer -// or error, -func indirectToStringerOrError(a interface{}) interface{} { - if a == nil { - return nil - } - - var errorType = reflect.TypeOf((*error)(nil)).Elem() - var fmtStringerType = reflect.TypeOf((*fmt.Stringer)(nil)).Elem() - - v := reflect.ValueOf(a) - for !v.Type().Implements(fmtStringerType) && !v.Type().Implements(errorType) && v.Kind() == reflect.Ptr && !v.IsNil() { - v = v.Elem() - } - return v.Interface() -} - -// ToStringE casts an interface to a string type. -func ToStringE(i interface{}) (string, error) { - i = indirectToStringerOrError(i) - - switch s := i.(type) { - case string: - return s, nil - case bool: - return strconv.FormatBool(s), nil - case float64: - return strconv.FormatFloat(s, 'f', -1, 64), nil - case float32: - return strconv.FormatFloat(float64(s), 'f', -1, 32), nil - case int: - return strconv.Itoa(s), nil - case int64: - return strconv.FormatInt(s, 10), nil - case int32: - return strconv.Itoa(int(s)), nil - case int16: - return strconv.FormatInt(int64(s), 10), nil - case int8: - return strconv.FormatInt(int64(s), 10), nil - case uint: - return strconv.FormatUint(uint64(s), 10), nil - case uint64: - return strconv.FormatUint(uint64(s), 10), nil - case uint32: - return strconv.FormatUint(uint64(s), 10), nil - case uint16: - return strconv.FormatUint(uint64(s), 10), nil - case uint8: - return strconv.FormatUint(uint64(s), 10), nil - case json.Number: - return s.String(), nil - case []byte: - return string(s), nil - case template.HTML: - return string(s), nil - case template.URL: - return string(s), nil - case template.JS: - return string(s), nil - case template.CSS: - return string(s), nil - case template.HTMLAttr: - return string(s), nil - case nil: - return "", nil - case fmt.Stringer: - return s.String(), nil - case error: - return s.Error(), nil - default: - return "", fmt.Errorf("unable to cast %#v of type %T to string", i, i) - } -} - -// ToStringMapStringE casts an interface to a map[string]string type. -func ToStringMapStringE(i interface{}) (map[string]string, error) { - var m = map[string]string{} - - switch v := i.(type) { - case map[string]string: - return v, nil - case map[string]interface{}: - for k, val := range v { - m[ToString(k)] = ToString(val) - } - return m, nil - case map[interface{}]string: - for k, val := range v { - m[ToString(k)] = ToString(val) - } - return m, nil - case map[interface{}]interface{}: - for k, val := range v { - m[ToString(k)] = ToString(val) - } - return m, nil - case string: - err := jsonStringToObject(v, &m) - return m, err - default: - return m, fmt.Errorf("unable to cast %#v of type %T to map[string]string", i, i) - } -} - -// ToStringMapStringSliceE casts an interface to a map[string][]string type. -func ToStringMapStringSliceE(i interface{}) (map[string][]string, error) { - var m = map[string][]string{} - - switch v := i.(type) { - case map[string][]string: - return v, nil - case map[string][]interface{}: - for k, val := range v { - m[ToString(k)] = ToStringSlice(val) - } - return m, nil - case map[string]string: - for k, val := range v { - m[ToString(k)] = []string{val} - } - case map[string]interface{}: - for k, val := range v { - switch vt := val.(type) { - case []interface{}: - m[ToString(k)] = ToStringSlice(vt) - case []string: - m[ToString(k)] = vt - default: - m[ToString(k)] = []string{ToString(val)} - } - } - return m, nil - case map[interface{}][]string: - for k, val := range v { - m[ToString(k)] = ToStringSlice(val) - } - return m, nil - case map[interface{}]string: - for k, val := range v { - m[ToString(k)] = ToStringSlice(val) - } - return m, nil - case map[interface{}][]interface{}: - for k, val := range v { - m[ToString(k)] = ToStringSlice(val) - } - return m, nil - case map[interface{}]interface{}: - for k, val := range v { - key, err := ToStringE(k) - if err != nil { - return m, fmt.Errorf("unable to cast %#v of type %T to map[string][]string", i, i) - } - value, err := ToStringSliceE(val) - if err != nil { - return m, fmt.Errorf("unable to cast %#v of type %T to map[string][]string", i, i) - } - m[key] = value - } - case string: - err := jsonStringToObject(v, &m) - return m, err - default: - return m, fmt.Errorf("unable to cast %#v of type %T to map[string][]string", i, i) - } - return m, nil -} - -// ToStringMapBoolE casts an interface to a map[string]bool type. -func ToStringMapBoolE(i interface{}) (map[string]bool, error) { - var m = map[string]bool{} - - switch v := i.(type) { - case map[interface{}]interface{}: - for k, val := range v { - m[ToString(k)] = ToBool(val) - } - return m, nil - case map[string]interface{}: - for k, val := range v { - m[ToString(k)] = ToBool(val) - } - return m, nil - case map[string]bool: - return v, nil - case string: - err := jsonStringToObject(v, &m) - return m, err - default: - return m, fmt.Errorf("unable to cast %#v of type %T to map[string]bool", i, i) - } -} - -// ToStringMapE casts an interface to a map[string]interface{} type. -func ToStringMapE(i interface{}) (map[string]interface{}, error) { - var m = map[string]interface{}{} - - switch v := i.(type) { - case map[interface{}]interface{}: - for k, val := range v { - m[ToString(k)] = val - } - return m, nil - case map[string]interface{}: - return v, nil - case string: - err := jsonStringToObject(v, &m) - return m, err - default: - return m, fmt.Errorf("unable to cast %#v of type %T to map[string]interface{}", i, i) - } -} - -// ToStringMapIntE casts an interface to a map[string]int{} type. -func ToStringMapIntE(i interface{}) (map[string]int, error) { - var m = map[string]int{} - if i == nil { - return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int", i, i) - } - - switch v := i.(type) { - case map[interface{}]interface{}: - for k, val := range v { - m[ToString(k)] = ToInt(val) - } - return m, nil - case map[string]interface{}: - for k, val := range v { - m[k] = ToInt(val) - } - return m, nil - case map[string]int: - return v, nil - case string: - err := jsonStringToObject(v, &m) - return m, err - } - - if reflect.TypeOf(i).Kind() != reflect.Map { - return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int", i, i) - } - - mVal := reflect.ValueOf(m) - v := reflect.ValueOf(i) - for _, keyVal := range v.MapKeys() { - val, err := ToIntE(v.MapIndex(keyVal).Interface()) - if err != nil { - return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int", i, i) - } - mVal.SetMapIndex(keyVal, reflect.ValueOf(val)) - } - return m, nil -} - -// ToStringMapInt64E casts an interface to a map[string]int64{} type. -func ToStringMapInt64E(i interface{}) (map[string]int64, error) { - var m = map[string]int64{} - if i == nil { - return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int64", i, i) - } - - switch v := i.(type) { - case map[interface{}]interface{}: - for k, val := range v { - m[ToString(k)] = ToInt64(val) - } - return m, nil - case map[string]interface{}: - for k, val := range v { - m[k] = ToInt64(val) - } - return m, nil - case map[string]int64: - return v, nil - case string: - err := jsonStringToObject(v, &m) - return m, err - } - - if reflect.TypeOf(i).Kind() != reflect.Map { - return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int64", i, i) - } - mVal := reflect.ValueOf(m) - v := reflect.ValueOf(i) - for _, keyVal := range v.MapKeys() { - val, err := ToInt64E(v.MapIndex(keyVal).Interface()) - if err != nil { - return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int64", i, i) - } - mVal.SetMapIndex(keyVal, reflect.ValueOf(val)) - } - return m, nil -} - -// ToSliceE casts an interface to a []interface{} type. -func ToSliceE(i interface{}) ([]interface{}, error) { - var s []interface{} - - switch v := i.(type) { - case []interface{}: - return append(s, v...), nil - case []map[string]interface{}: - for _, u := range v { - s = append(s, u) - } - return s, nil - default: - return s, fmt.Errorf("unable to cast %#v of type %T to []interface{}", i, i) - } -} - -// ToBoolSliceE casts an interface to a []bool type. -func ToBoolSliceE(i interface{}) ([]bool, error) { - if i == nil { - return []bool{}, fmt.Errorf("unable to cast %#v of type %T to []bool", i, i) - } - - switch v := i.(type) { - case []bool: - return v, nil - } - - kind := reflect.TypeOf(i).Kind() - switch kind { - case reflect.Slice, reflect.Array: - s := reflect.ValueOf(i) - a := make([]bool, s.Len()) - for j := 0; j < s.Len(); j++ { - val, err := ToBoolE(s.Index(j).Interface()) - if err != nil { - return []bool{}, fmt.Errorf("unable to cast %#v of type %T to []bool", i, i) - } - a[j] = val - } - return a, nil - default: - return []bool{}, fmt.Errorf("unable to cast %#v of type %T to []bool", i, i) - } -} - -// ToStringSliceE casts an interface to a []string type. -func ToStringSliceE(i interface{}) ([]string, error) { - var a []string - - switch v := i.(type) { - case []interface{}: - for _, u := range v { - a = append(a, ToString(u)) - } - return a, nil - case []string: - return v, nil - case []int8: - for _, u := range v { - a = append(a, ToString(u)) - } - return a, nil - case []int: - for _, u := range v { - a = append(a, ToString(u)) - } - return a, nil - case []int32: - for _, u := range v { - a = append(a, ToString(u)) - } - return a, nil - case []int64: - for _, u := range v { - a = append(a, ToString(u)) - } - return a, nil - case []float32: - for _, u := range v { - a = append(a, ToString(u)) - } - return a, nil - case []float64: - for _, u := range v { - a = append(a, ToString(u)) - } - return a, nil - case string: - return strings.Fields(v), nil - case []error: - for _, err := range i.([]error) { - a = append(a, err.Error()) - } - return a, nil - case interface{}: - str, err := ToStringE(v) - if err != nil { - return a, fmt.Errorf("unable to cast %#v of type %T to []string", i, i) - } - return []string{str}, nil - default: - return a, fmt.Errorf("unable to cast %#v of type %T to []string", i, i) - } -} - -// ToIntSliceE casts an interface to a []int type. -func ToIntSliceE(i interface{}) ([]int, error) { - if i == nil { - return []int{}, fmt.Errorf("unable to cast %#v of type %T to []int", i, i) - } - - switch v := i.(type) { - case []int: - return v, nil - } - - kind := reflect.TypeOf(i).Kind() - switch kind { - case reflect.Slice, reflect.Array: - s := reflect.ValueOf(i) - a := make([]int, s.Len()) - for j := 0; j < s.Len(); j++ { - val, err := ToIntE(s.Index(j).Interface()) - if err != nil { - return []int{}, fmt.Errorf("unable to cast %#v of type %T to []int", i, i) - } - a[j] = val - } - return a, nil - default: - return []int{}, fmt.Errorf("unable to cast %#v of type %T to []int", i, i) - } -} - -// ToDurationSliceE casts an interface to a []time.Duration type. -func ToDurationSliceE(i interface{}) ([]time.Duration, error) { - if i == nil { - return []time.Duration{}, fmt.Errorf("unable to cast %#v of type %T to []time.Duration", i, i) - } - - switch v := i.(type) { - case []time.Duration: - return v, nil - } - - kind := reflect.TypeOf(i).Kind() - switch kind { - case reflect.Slice, reflect.Array: - s := reflect.ValueOf(i) - a := make([]time.Duration, s.Len()) - for j := 0; j < s.Len(); j++ { - val, err := ToDurationE(s.Index(j).Interface()) - if err != nil { - return []time.Duration{}, fmt.Errorf("unable to cast %#v of type %T to []time.Duration", i, i) - } - a[j] = val - } - return a, nil - default: - return []time.Duration{}, fmt.Errorf("unable to cast %#v of type %T to []time.Duration", i, i) - } -} - -// StringToDate attempts to parse a string into a time.Time type using a -// predefined list of formats. If no suitable format is found, an error is -// returned. -func StringToDate(s string) (time.Time, error) { - return parseDateWith(s, time.UTC, timeFormats) -} - -// StringToDateInDefaultLocation casts an empty interface to a time.Time, -// interpreting inputs without a timezone to be in the given location, -// or the local timezone if nil. -func StringToDateInDefaultLocation(s string, location *time.Location) (time.Time, error) { - return parseDateWith(s, location, timeFormats) -} - -type timeFormatType int - -const ( - timeFormatNoTimezone timeFormatType = iota - timeFormatNamedTimezone - timeFormatNumericTimezone - timeFormatNumericAndNamedTimezone - timeFormatTimeOnly -) - -type timeFormat struct { - format string - typ timeFormatType -} - -func (f timeFormat) hasTimezone() bool { - // We don't include the formats with only named timezones, see - // https://github.com/golang/go/issues/19694#issuecomment-289103522 - return f.typ >= timeFormatNumericTimezone && f.typ <= timeFormatNumericAndNamedTimezone -} - -var ( - timeFormats = []timeFormat{ - // Keep common formats at the top. - {"2006-01-02", timeFormatNoTimezone}, - {time.RFC3339, timeFormatNumericTimezone}, - {"2006-01-02T15:04:05", timeFormatNoTimezone}, // iso8601 without timezone - {time.RFC1123Z, timeFormatNumericTimezone}, - {time.RFC1123, timeFormatNamedTimezone}, - {time.RFC822Z, timeFormatNumericTimezone}, - {time.RFC822, timeFormatNamedTimezone}, - {time.RFC850, timeFormatNamedTimezone}, - {"2006-01-02 15:04:05.999999999 -0700 MST", timeFormatNumericAndNamedTimezone}, // Time.String() - {"2006-01-02T15:04:05-0700", timeFormatNumericTimezone}, // RFC3339 without timezone hh:mm colon - {"2006-01-02 15:04:05Z0700", timeFormatNumericTimezone}, // RFC3339 without T or timezone hh:mm colon - {"2006-01-02 15:04:05", timeFormatNoTimezone}, - {time.ANSIC, timeFormatNoTimezone}, - {time.UnixDate, timeFormatNamedTimezone}, - {time.RubyDate, timeFormatNumericTimezone}, - {"2006-01-02 15:04:05Z07:00", timeFormatNumericTimezone}, - {"02 Jan 2006", timeFormatNoTimezone}, - {"2006-01-02 15:04:05 -07:00", timeFormatNumericTimezone}, - {"2006-01-02 15:04:05 -0700", timeFormatNumericTimezone}, - {time.Kitchen, timeFormatTimeOnly}, - {time.Stamp, timeFormatTimeOnly}, - {time.StampMilli, timeFormatTimeOnly}, - {time.StampMicro, timeFormatTimeOnly}, - {time.StampNano, timeFormatTimeOnly}, - } -) - -func parseDateWith(s string, location *time.Location, formats []timeFormat) (d time.Time, e error) { - - for _, format := range formats { - if d, e = time.Parse(format.format, s); e == nil { - - // Some time formats have a zone name, but no offset, so it gets - // put in that zone name (not the default one passed in to us), but - // without that zone's offset. So set the location manually. - if format.typ <= timeFormatNamedTimezone { - if location == nil { - location = time.Local - } - year, month, day := d.Date() - hour, min, sec := d.Clock() - d = time.Date(year, month, day, hour, min, sec, d.Nanosecond(), location) - } - - return - } - } - return d, fmt.Errorf("unable to parse date: %s", s) -} - -// jsonStringToObject attempts to unmarshall a string as JSON into -// the object passed as pointer. -func jsonStringToObject(s string, v interface{}) error { - data := []byte(s) - return json.Unmarshal(data, v) -} - -// toInt returns the int value of v if v or v's underlying type -// is an int. -// Note that this will return false for int64 etc. types. -func toInt(v interface{}) (int, bool) { - switch v := v.(type) { - case int: - return v, true - case time.Weekday: - return int(v), true - case time.Month: - return int(v), true - default: - return 0, false - } -} - -func trimZeroDecimal(s string) string { - var foundZero bool - for i := len(s); i > 0; i-- { - switch s[i-1] { - case '.': - if foundZero { - return s[:i-1] - } - case '0': - foundZero = true - default: - return s - } - } - return s -} diff --git a/vendor/github.com/spf13/cast/timeformattype_string.go b/vendor/github.com/spf13/cast/timeformattype_string.go deleted file mode 100644 index 1524fc8..0000000 --- a/vendor/github.com/spf13/cast/timeformattype_string.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by "stringer -type timeFormatType"; DO NOT EDIT. - -package cast - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[timeFormatNoTimezone-0] - _ = x[timeFormatNamedTimezone-1] - _ = x[timeFormatNumericTimezone-2] - _ = x[timeFormatNumericAndNamedTimezone-3] - _ = x[timeFormatTimeOnly-4] -} - -const _timeFormatType_name = "timeFormatNoTimezonetimeFormatNamedTimezonetimeFormatNumericTimezonetimeFormatNumericAndNamedTimezonetimeFormatTimeOnly" - -var _timeFormatType_index = [...]uint8{0, 20, 43, 68, 101, 119} - -func (i timeFormatType) String() string { - if i < 0 || i >= timeFormatType(len(_timeFormatType_index)-1) { - return "timeFormatType(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _timeFormatType_name[_timeFormatType_index[i]:_timeFormatType_index[i+1]] -} diff --git a/vendor/github.com/spf13/cobra/.gitignore b/vendor/github.com/spf13/cobra/.gitignore deleted file mode 100644 index c7b459e..0000000 --- a/vendor/github.com/spf13/cobra/.gitignore +++ /dev/null @@ -1,39 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -# Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore -# swap -[._]*.s[a-w][a-z] -[._]s[a-w][a-z] -# session -Session.vim -# temporary -.netrwhist -*~ -# auto-generated tag files -tags - -*.exe -cobra.test -bin - -.idea/ -*.iml diff --git a/vendor/github.com/spf13/cobra/.golangci.yml b/vendor/github.com/spf13/cobra/.golangci.yml deleted file mode 100644 index a618ec2..0000000 --- a/vendor/github.com/spf13/cobra/.golangci.yml +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 2013-2023 The Cobra Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -run: - deadline: 5m - -linters: - disable-all: true - enable: - #- bodyclose - # - deadcode ! deprecated since v1.49.0; replaced by 'unused' - #- depguard - #- dogsled - #- dupl - - errcheck - #- exhaustive - #- funlen - - gas - #- gochecknoinits - - goconst - #- gocritic - #- gocyclo - #- gofmt - - goimports - - golint - #- gomnd - #- goprintffuncname - #- gosec - #- gosimple - - govet - - ineffassign - - interfacer - #- lll - - maligned - - megacheck - #- misspell - #- nakedret - #- noctx - #- nolintlint - #- rowserrcheck - #- scopelint - #- staticcheck - #- structcheck ! deprecated since v1.49.0; replaced by 'unused' - #- stylecheck - #- typecheck - - unconvert - #- unparam - - unused - # - varcheck ! deprecated since v1.49.0; replaced by 'unused' - #- whitespace - fast: false diff --git a/vendor/github.com/spf13/cobra/.mailmap b/vendor/github.com/spf13/cobra/.mailmap deleted file mode 100644 index 94ec530..0000000 --- a/vendor/github.com/spf13/cobra/.mailmap +++ /dev/null @@ -1,3 +0,0 @@ -Steve Francia -Bjørn Erik Pedersen -Fabiano Franz diff --git a/vendor/github.com/spf13/cobra/CONDUCT.md b/vendor/github.com/spf13/cobra/CONDUCT.md deleted file mode 100644 index 9d16f88..0000000 --- a/vendor/github.com/spf13/cobra/CONDUCT.md +++ /dev/null @@ -1,37 +0,0 @@ -## Cobra User Contract - -### Versioning -Cobra will follow a steady release cadence. Non breaking changes will be released as minor versions quarterly. Patch bug releases are at the discretion of the maintainers. Users can expect security patch fixes to be released within relatively short order of a CVE becoming known. For more information on security patch fixes see the CVE section below. Releases will follow [Semantic Versioning](https://semver.org/). Users tracking the Master branch should expect unpredictable breaking changes as the project continues to move forward. For stability, it is highly recommended to use a release. - -### Backward Compatibility -We will maintain two major releases in a moving window. The N-1 release will only receive bug fixes and security updates and will be dropped once N+1 is released. - -### Deprecation -Deprecation of Go versions or dependent packages will only occur in major releases. To reduce the change of this taking users by surprise, any large deprecation will be preceded by an announcement in the [#cobra slack channel](https://gophers.slack.com/archives/CD3LP1199) and an Issue on Github. - -### CVE -Maintainers will make every effort to release security patches in the case of a medium to high severity CVE directly impacting the library. The speed in which these patches reach a release is up to the discretion of the maintainers. A low severity CVE may be a lower priority than a high severity one. - -### Communication -Cobra maintainers will use GitHub issues and the [#cobra slack channel](https://gophers.slack.com/archives/CD3LP1199) as the primary means of communication with the community. This is to foster open communication with all users and contributors. - -### Breaking Changes -Breaking changes are generally allowed in the master branch, as this is the branch used to develop the next release of Cobra. - -There may be times, however, when master is closed for breaking changes. This is likely to happen as we near the release of a new version. - -Breaking changes are not allowed in release branches, as these represent minor versions that have already been released. These version have consumers who expect the APIs, behaviors, etc, to remain stable during the lifetime of the patch stream for the minor release. - -Examples of breaking changes include: -- Removing or renaming exported constant, variable, type, or function. -- Updating the version of critical libraries such as `spf13/pflag`, `spf13/viper` etc... - - Some version updates may be acceptable for picking up bug fixes, but maintainers must exercise caution when reviewing. - -There may, at times, need to be exceptions where breaking changes are allowed in release branches. These are at the discretion of the project's maintainers, and must be carefully considered before merging. - -### CI Testing -Maintainers will ensure the Cobra test suite utilizes the current supported versions of Golang. - -### Disclaimer -Changes to this document and the contents therein are at the discretion of the maintainers. -None of the contents of this document are legally binding in any way to the maintainers or the users. diff --git a/vendor/github.com/spf13/cobra/CONTRIBUTING.md b/vendor/github.com/spf13/cobra/CONTRIBUTING.md deleted file mode 100644 index 6f356e6..0000000 --- a/vendor/github.com/spf13/cobra/CONTRIBUTING.md +++ /dev/null @@ -1,50 +0,0 @@ -# Contributing to Cobra - -Thank you so much for contributing to Cobra. We appreciate your time and help. -Here are some guidelines to help you get started. - -## Code of Conduct - -Be kind and respectful to the members of the community. Take time to educate -others who are seeking help. Harassment of any kind will not be tolerated. - -## Questions - -If you have questions regarding Cobra, feel free to ask it in the community -[#cobra Slack channel][cobra-slack] - -## Filing a bug or feature - -1. Before filing an issue, please check the existing issues to see if a - similar one was already opened. If there is one already opened, feel free - to comment on it. -1. If you believe you've found a bug, please provide detailed steps of - reproduction, the version of Cobra and anything else you believe will be - useful to help troubleshoot it (e.g. OS environment, environment variables, - etc...). Also state the current behavior vs. the expected behavior. -1. If you'd like to see a feature or an enhancement please open an issue with - a clear title and description of what the feature is and why it would be - beneficial to the project and its users. - -## Submitting changes - -1. CLA: Upon submitting a Pull Request (PR), contributors will be prompted to - sign a CLA. Please sign the CLA :slightly_smiling_face: -1. Tests: If you are submitting code, please ensure you have adequate tests - for the feature. Tests can be run via `go test ./...` or `make test`. -1. Since this is golang project, ensure the new code is properly formatted to - ensure code consistency. Run `make all`. - -### Quick steps to contribute - -1. Fork the project. -1. Download your fork to your PC (`git clone https://github.com/your_username/cobra && cd cobra`) -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Make changes and run tests (`make test`) -1. Add them to staging (`git add .`) -1. Commit your changes (`git commit -m 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new pull request - - -[cobra-slack]: https://gophers.slack.com/archives/CD3LP1199 diff --git a/vendor/github.com/spf13/cobra/LICENSE.txt b/vendor/github.com/spf13/cobra/LICENSE.txt deleted file mode 100644 index 298f0e2..0000000 --- a/vendor/github.com/spf13/cobra/LICENSE.txt +++ /dev/null @@ -1,174 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/vendor/github.com/spf13/cobra/MAINTAINERS b/vendor/github.com/spf13/cobra/MAINTAINERS deleted file mode 100644 index 4c5ac3d..0000000 --- a/vendor/github.com/spf13/cobra/MAINTAINERS +++ /dev/null @@ -1,13 +0,0 @@ -maintainers: -- spf13 -- johnSchnake -- jpmcb -- marckhouzam -inactive: -- anthonyfok -- bep -- bogem -- broady -- eparis -- jharshman -- wfernandes diff --git a/vendor/github.com/spf13/cobra/Makefile b/vendor/github.com/spf13/cobra/Makefile deleted file mode 100644 index 0da8d7a..0000000 --- a/vendor/github.com/spf13/cobra/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -BIN="./bin" -SRC=$(shell find . -name "*.go") - -ifeq (, $(shell which golangci-lint)) -$(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh") -endif - -.PHONY: fmt lint test install_deps clean - -default: all - -all: fmt test - -fmt: - $(info ******************** checking formatting ********************) - @test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1) - -lint: - $(info ******************** running lint tools ********************) - golangci-lint run -v - -test: install_deps - $(info ******************** running tests ********************) - go test -v ./... - -richtest: install_deps - $(info ******************** running tests with kyoh86/richgo ********************) - richgo test -v ./... - -install_deps: - $(info ******************** downloading dependencies ********************) - go get -v ./... - -clean: - rm -rf $(BIN) diff --git a/vendor/github.com/spf13/cobra/README.md b/vendor/github.com/spf13/cobra/README.md deleted file mode 100644 index 6444f4b..0000000 --- a/vendor/github.com/spf13/cobra/README.md +++ /dev/null @@ -1,112 +0,0 @@ -![cobra logo](assets/CobraMain.png) - -Cobra is a library for creating powerful modern CLI applications. - -Cobra is used in many Go projects such as [Kubernetes](https://kubernetes.io/), -[Hugo](https://gohugo.io), and [GitHub CLI](https://github.com/cli/cli) to -name a few. [This list](site/content/projects_using_cobra.md) contains a more extensive list of projects using Cobra. - -[![](https://img.shields.io/github/actions/workflow/status/spf13/cobra/test.yml?branch=main&longCache=true&label=Test&logo=github%20actions&logoColor=fff)](https://github.com/spf13/cobra/actions?query=workflow%3ATest) -[![Go Reference](https://pkg.go.dev/badge/github.com/spf13/cobra.svg)](https://pkg.go.dev/github.com/spf13/cobra) -[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cobra)](https://goreportcard.com/report/github.com/spf13/cobra) -[![Slack](https://img.shields.io/badge/Slack-cobra-brightgreen)](https://gophers.slack.com/archives/CD3LP1199) - -# Overview - -Cobra is a library providing a simple interface to create powerful modern CLI -interfaces similar to git & go tools. - -Cobra provides: -* Easy subcommand-based CLIs: `app server`, `app fetch`, etc. -* Fully POSIX-compliant flags (including short & long versions) -* Nested subcommands -* Global, local and cascading flags -* Intelligent suggestions (`app srver`... did you mean `app server`?) -* Automatic help generation for commands and flags -* Grouping help for subcommands -* Automatic help flag recognition of `-h`, `--help`, etc. -* Automatically generated shell autocomplete for your application (bash, zsh, fish, powershell) -* Automatically generated man pages for your application -* Command aliases so you can change things without breaking them -* The flexibility to define your own help, usage, etc. -* Optional seamless integration with [viper](https://github.com/spf13/viper) for 12-factor apps - -# Concepts - -Cobra is built on a structure of commands, arguments & flags. - -**Commands** represent actions, **Args** are things and **Flags** are modifiers for those actions. - -The best applications read like sentences when used, and as a result, users -intuitively know how to interact with them. - -The pattern to follow is -`APPNAME VERB NOUN --ADJECTIVE` - or -`APPNAME COMMAND ARG --FLAG`. - -A few good real world examples may better illustrate this point. - -In the following example, 'server' is a command, and 'port' is a flag: - - hugo server --port=1313 - -In this command we are telling Git to clone the url bare. - - git clone URL --bare - -## Commands - -Command is the central point of the application. Each interaction that -the application supports will be contained in a Command. A command can -have children commands and optionally run an action. - -In the example above, 'server' is the command. - -[More about cobra.Command](https://pkg.go.dev/github.com/spf13/cobra#Command) - -## Flags - -A flag is a way to modify the behavior of a command. Cobra supports -fully POSIX-compliant flags as well as the Go [flag package](https://golang.org/pkg/flag/). -A Cobra command can define flags that persist through to children commands -and flags that are only available to that command. - -In the example above, 'port' is the flag. - -Flag functionality is provided by the [pflag -library](https://github.com/spf13/pflag), a fork of the flag standard library -which maintains the same interface while adding POSIX compliance. - -# Installing -Using Cobra is easy. First, use `go get` to install the latest version -of the library. - -``` -go get -u github.com/spf13/cobra@latest -``` - -Next, include Cobra in your application: - -```go -import "github.com/spf13/cobra" -``` - -# Usage -`cobra-cli` is a command line program to generate cobra applications and command files. -It will bootstrap your application scaffolding to rapidly -develop a Cobra-based application. It is the easiest way to incorporate Cobra into your application. - -It can be installed by running: - -``` -go install github.com/spf13/cobra-cli@latest -``` - -For complete details on using the Cobra-CLI generator, please read [The Cobra Generator README](https://github.com/spf13/cobra-cli/blob/main/README.md) - -For complete details on using the Cobra library, please read the [The Cobra User Guide](site/content/user_guide.md). - -# License - -Cobra is released under the Apache 2.0 license. See [LICENSE.txt](LICENSE.txt) diff --git a/vendor/github.com/spf13/cobra/active_help.go b/vendor/github.com/spf13/cobra/active_help.go deleted file mode 100644 index 5f965e0..0000000 --- a/vendor/github.com/spf13/cobra/active_help.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cobra - -import ( - "fmt" - "os" - "regexp" - "strings" -) - -const ( - activeHelpMarker = "_activeHelp_ " - // The below values should not be changed: programs will be using them explicitly - // in their user documentation, and users will be using them explicitly. - activeHelpEnvVarSuffix = "_ACTIVE_HELP" - activeHelpGlobalEnvVar = "COBRA_ACTIVE_HELP" - activeHelpGlobalDisable = "0" -) - -var activeHelpEnvVarPrefixSubstRegexp = regexp.MustCompile(`[^A-Z0-9_]`) - -// AppendActiveHelp adds the specified string to the specified array to be used as ActiveHelp. -// Such strings will be processed by the completion script and will be shown as ActiveHelp -// to the user. -// The array parameter should be the array that will contain the completions. -// This function can be called multiple times before and/or after completions are added to -// the array. Each time this function is called with the same array, the new -// ActiveHelp line will be shown below the previous ones when completion is triggered. -func AppendActiveHelp(compArray []string, activeHelpStr string) []string { - return append(compArray, fmt.Sprintf("%s%s", activeHelpMarker, activeHelpStr)) -} - -// GetActiveHelpConfig returns the value of the ActiveHelp environment variable -// _ACTIVE_HELP where is the name of the root command in upper -// case, with all non-ASCII-alphanumeric characters replaced by `_`. -// It will always return "0" if the global environment variable COBRA_ACTIVE_HELP -// is set to "0". -func GetActiveHelpConfig(cmd *Command) string { - activeHelpCfg := os.Getenv(activeHelpGlobalEnvVar) - if activeHelpCfg != activeHelpGlobalDisable { - activeHelpCfg = os.Getenv(activeHelpEnvVar(cmd.Root().Name())) - } - return activeHelpCfg -} - -// activeHelpEnvVar returns the name of the program-specific ActiveHelp environment -// variable. It has the format _ACTIVE_HELP where is the name of the -// root command in upper case, with all non-ASCII-alphanumeric characters replaced by `_`. -func activeHelpEnvVar(name string) string { - // This format should not be changed: users will be using it explicitly. - activeHelpEnvVar := strings.ToUpper(fmt.Sprintf("%s%s", name, activeHelpEnvVarSuffix)) - activeHelpEnvVar = activeHelpEnvVarPrefixSubstRegexp.ReplaceAllString(activeHelpEnvVar, "_") - return activeHelpEnvVar -} diff --git a/vendor/github.com/spf13/cobra/args.go b/vendor/github.com/spf13/cobra/args.go deleted file mode 100644 index e79ec33..0000000 --- a/vendor/github.com/spf13/cobra/args.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cobra - -import ( - "fmt" - "strings" -) - -type PositionalArgs func(cmd *Command, args []string) error - -// legacyArgs validation has the following behaviour: -// - root commands with no subcommands can take arbitrary arguments -// - root commands with subcommands will do subcommand validity checking -// - subcommands will always accept arbitrary arguments -func legacyArgs(cmd *Command, args []string) error { - // no subcommand, always take args - if !cmd.HasSubCommands() { - return nil - } - - // root command with subcommands, do subcommand checking. - if !cmd.HasParent() && len(args) > 0 { - return fmt.Errorf("unknown command %q for %q%s", args[0], cmd.CommandPath(), cmd.findSuggestions(args[0])) - } - return nil -} - -// NoArgs returns an error if any args are included. -func NoArgs(cmd *Command, args []string) error { - if len(args) > 0 { - return fmt.Errorf("unknown command %q for %q", args[0], cmd.CommandPath()) - } - return nil -} - -// OnlyValidArgs returns an error if there are any positional args that are not in -// the `ValidArgs` field of `Command` -func OnlyValidArgs(cmd *Command, args []string) error { - if len(cmd.ValidArgs) > 0 { - // Remove any description that may be included in ValidArgs. - // A description is following a tab character. - var validArgs []string - for _, v := range cmd.ValidArgs { - validArgs = append(validArgs, strings.Split(v, "\t")[0]) - } - for _, v := range args { - if !stringInSlice(v, validArgs) { - return fmt.Errorf("invalid argument %q for %q%s", v, cmd.CommandPath(), cmd.findSuggestions(args[0])) - } - } - } - return nil -} - -// ArbitraryArgs never returns an error. -func ArbitraryArgs(cmd *Command, args []string) error { - return nil -} - -// MinimumNArgs returns an error if there is not at least N args. -func MinimumNArgs(n int) PositionalArgs { - return func(cmd *Command, args []string) error { - if len(args) < n { - return fmt.Errorf("requires at least %d arg(s), only received %d", n, len(args)) - } - return nil - } -} - -// MaximumNArgs returns an error if there are more than N args. -func MaximumNArgs(n int) PositionalArgs { - return func(cmd *Command, args []string) error { - if len(args) > n { - return fmt.Errorf("accepts at most %d arg(s), received %d", n, len(args)) - } - return nil - } -} - -// ExactArgs returns an error if there are not exactly n args. -func ExactArgs(n int) PositionalArgs { - return func(cmd *Command, args []string) error { - if len(args) != n { - return fmt.Errorf("accepts %d arg(s), received %d", n, len(args)) - } - return nil - } -} - -// RangeArgs returns an error if the number of args is not within the expected range. -func RangeArgs(min int, max int) PositionalArgs { - return func(cmd *Command, args []string) error { - if len(args) < min || len(args) > max { - return fmt.Errorf("accepts between %d and %d arg(s), received %d", min, max, len(args)) - } - return nil - } -} - -// MatchAll allows combining several PositionalArgs to work in concert. -func MatchAll(pargs ...PositionalArgs) PositionalArgs { - return func(cmd *Command, args []string) error { - for _, parg := range pargs { - if err := parg(cmd, args); err != nil { - return err - } - } - return nil - } -} - -// ExactValidArgs returns an error if there are not exactly N positional args OR -// there are any positional args that are not in the `ValidArgs` field of `Command` -// -// Deprecated: use MatchAll(ExactArgs(n), OnlyValidArgs) instead -func ExactValidArgs(n int) PositionalArgs { - return MatchAll(ExactArgs(n), OnlyValidArgs) -} diff --git a/vendor/github.com/spf13/cobra/bash_completions.go b/vendor/github.com/spf13/cobra/bash_completions.go deleted file mode 100644 index 8a53151..0000000 --- a/vendor/github.com/spf13/cobra/bash_completions.go +++ /dev/null @@ -1,712 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cobra - -import ( - "bytes" - "fmt" - "io" - "os" - "sort" - "strings" - - "github.com/spf13/pflag" -) - -// Annotations for Bash completion. -const ( - BashCompFilenameExt = "cobra_annotation_bash_completion_filename_extensions" - BashCompCustom = "cobra_annotation_bash_completion_custom" - BashCompOneRequiredFlag = "cobra_annotation_bash_completion_one_required_flag" - BashCompSubdirsInDir = "cobra_annotation_bash_completion_subdirs_in_dir" -) - -func writePreamble(buf io.StringWriter, name string) { - WriteStringAndCheck(buf, fmt.Sprintf("# bash completion for %-36s -*- shell-script -*-\n", name)) - WriteStringAndCheck(buf, fmt.Sprintf(` -__%[1]s_debug() -{ - if [[ -n ${BASH_COMP_DEBUG_FILE:-} ]]; then - echo "$*" >> "${BASH_COMP_DEBUG_FILE}" - fi -} - -# Homebrew on Macs have version 1.3 of bash-completion which doesn't include -# _init_completion. This is a very minimal version of that function. -__%[1]s_init_completion() -{ - COMPREPLY=() - _get_comp_words_by_ref "$@" cur prev words cword -} - -__%[1]s_index_of_word() -{ - local w word=$1 - shift - index=0 - for w in "$@"; do - [[ $w = "$word" ]] && return - index=$((index+1)) - done - index=-1 -} - -__%[1]s_contains_word() -{ - local w word=$1; shift - for w in "$@"; do - [[ $w = "$word" ]] && return - done - return 1 -} - -__%[1]s_handle_go_custom_completion() -{ - __%[1]s_debug "${FUNCNAME[0]}: cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}" - - local shellCompDirectiveError=%[3]d - local shellCompDirectiveNoSpace=%[4]d - local shellCompDirectiveNoFileComp=%[5]d - local shellCompDirectiveFilterFileExt=%[6]d - local shellCompDirectiveFilterDirs=%[7]d - - local out requestComp lastParam lastChar comp directive args - - # Prepare the command to request completions for the program. - # Calling ${words[0]} instead of directly %[1]s allows handling aliases - args=("${words[@]:1}") - # Disable ActiveHelp which is not supported for bash completion v1 - requestComp="%[8]s=0 ${words[0]} %[2]s ${args[*]}" - - lastParam=${words[$((${#words[@]}-1))]} - lastChar=${lastParam:$((${#lastParam}-1)):1} - __%[1]s_debug "${FUNCNAME[0]}: lastParam ${lastParam}, lastChar ${lastChar}" - - if [ -z "${cur}" ] && [ "${lastChar}" != "=" ]; then - # If the last parameter is complete (there is a space following it) - # We add an extra empty parameter so we can indicate this to the go method. - __%[1]s_debug "${FUNCNAME[0]}: Adding extra empty parameter" - requestComp="${requestComp} \"\"" - fi - - __%[1]s_debug "${FUNCNAME[0]}: calling ${requestComp}" - # Use eval to handle any environment variables and such - out=$(eval "${requestComp}" 2>/dev/null) - - # Extract the directive integer at the very end of the output following a colon (:) - directive=${out##*:} - # Remove the directive - out=${out%%:*} - if [ "${directive}" = "${out}" ]; then - # There is not directive specified - directive=0 - fi - __%[1]s_debug "${FUNCNAME[0]}: the completion directive is: ${directive}" - __%[1]s_debug "${FUNCNAME[0]}: the completions are: ${out}" - - if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then - # Error code. No completion. - __%[1]s_debug "${FUNCNAME[0]}: received error from custom completion go code" - return - else - if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then - if [[ $(type -t compopt) = "builtin" ]]; then - __%[1]s_debug "${FUNCNAME[0]}: activating no space" - compopt -o nospace - fi - fi - if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then - if [[ $(type -t compopt) = "builtin" ]]; then - __%[1]s_debug "${FUNCNAME[0]}: activating no file completion" - compopt +o default - fi - fi - fi - - if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then - # File extension filtering - local fullFilter filter filteringCmd - # Do not use quotes around the $out variable or else newline - # characters will be kept. - for filter in ${out}; do - fullFilter+="$filter|" - done - - filteringCmd="_filedir $fullFilter" - __%[1]s_debug "File filtering command: $filteringCmd" - $filteringCmd - elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then - # File completion for directories only - local subdir - # Use printf to strip any trailing newline - subdir=$(printf "%%s" "${out}") - if [ -n "$subdir" ]; then - __%[1]s_debug "Listing directories in $subdir" - __%[1]s_handle_subdirs_in_dir_flag "$subdir" - else - __%[1]s_debug "Listing directories in ." - _filedir -d - fi - else - while IFS='' read -r comp; do - COMPREPLY+=("$comp") - done < <(compgen -W "${out}" -- "$cur") - fi -} - -__%[1]s_handle_reply() -{ - __%[1]s_debug "${FUNCNAME[0]}" - local comp - case $cur in - -*) - if [[ $(type -t compopt) = "builtin" ]]; then - compopt -o nospace - fi - local allflags - if [ ${#must_have_one_flag[@]} -ne 0 ]; then - allflags=("${must_have_one_flag[@]}") - else - allflags=("${flags[*]} ${two_word_flags[*]}") - fi - while IFS='' read -r comp; do - COMPREPLY+=("$comp") - done < <(compgen -W "${allflags[*]}" -- "$cur") - if [[ $(type -t compopt) = "builtin" ]]; then - [[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace - fi - - # complete after --flag=abc - if [[ $cur == *=* ]]; then - if [[ $(type -t compopt) = "builtin" ]]; then - compopt +o nospace - fi - - local index flag - flag="${cur%%=*}" - __%[1]s_index_of_word "${flag}" "${flags_with_completion[@]}" - COMPREPLY=() - if [[ ${index} -ge 0 ]]; then - PREFIX="" - cur="${cur#*=}" - ${flags_completion[${index}]} - if [ -n "${ZSH_VERSION:-}" ]; then - # zsh completion needs --flag= prefix - eval "COMPREPLY=( \"\${COMPREPLY[@]/#/${flag}=}\" )" - fi - fi - fi - - if [[ -z "${flag_parsing_disabled}" ]]; then - # If flag parsing is enabled, we have completed the flags and can return. - # If flag parsing is disabled, we may not know all (or any) of the flags, so we fallthrough - # to possibly call handle_go_custom_completion. - return 0; - fi - ;; - esac - - # check if we are handling a flag with special work handling - local index - __%[1]s_index_of_word "${prev}" "${flags_with_completion[@]}" - if [[ ${index} -ge 0 ]]; then - ${flags_completion[${index}]} - return - fi - - # we are parsing a flag and don't have a special handler, no completion - if [[ ${cur} != "${words[cword]}" ]]; then - return - fi - - local completions - completions=("${commands[@]}") - if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then - completions+=("${must_have_one_noun[@]}") - elif [[ -n "${has_completion_function}" ]]; then - # if a go completion function is provided, defer to that function - __%[1]s_handle_go_custom_completion - fi - if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then - completions+=("${must_have_one_flag[@]}") - fi - while IFS='' read -r comp; do - COMPREPLY+=("$comp") - done < <(compgen -W "${completions[*]}" -- "$cur") - - if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then - while IFS='' read -r comp; do - COMPREPLY+=("$comp") - done < <(compgen -W "${noun_aliases[*]}" -- "$cur") - fi - - if [[ ${#COMPREPLY[@]} -eq 0 ]]; then - if declare -F __%[1]s_custom_func >/dev/null; then - # try command name qualified custom func - __%[1]s_custom_func - else - # otherwise fall back to unqualified for compatibility - declare -F __custom_func >/dev/null && __custom_func - fi - fi - - # available in bash-completion >= 2, not always present on macOS - if declare -F __ltrim_colon_completions >/dev/null; then - __ltrim_colon_completions "$cur" - fi - - # If there is only 1 completion and it is a flag with an = it will be completed - # but we don't want a space after the = - if [[ "${#COMPREPLY[@]}" -eq "1" ]] && [[ $(type -t compopt) = "builtin" ]] && [[ "${COMPREPLY[0]}" == --*= ]]; then - compopt -o nospace - fi -} - -# The arguments should be in the form "ext1|ext2|extn" -__%[1]s_handle_filename_extension_flag() -{ - local ext="$1" - _filedir "@(${ext})" -} - -__%[1]s_handle_subdirs_in_dir_flag() -{ - local dir="$1" - pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return -} - -__%[1]s_handle_flag() -{ - __%[1]s_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" - - # if a command required a flag, and we found it, unset must_have_one_flag() - local flagname=${words[c]} - local flagvalue="" - # if the word contained an = - if [[ ${words[c]} == *"="* ]]; then - flagvalue=${flagname#*=} # take in as flagvalue after the = - flagname=${flagname%%=*} # strip everything after the = - flagname="${flagname}=" # but put the = back - fi - __%[1]s_debug "${FUNCNAME[0]}: looking for ${flagname}" - if __%[1]s_contains_word "${flagname}" "${must_have_one_flag[@]}"; then - must_have_one_flag=() - fi - - # if you set a flag which only applies to this command, don't show subcommands - if __%[1]s_contains_word "${flagname}" "${local_nonpersistent_flags[@]}"; then - commands=() - fi - - # keep flag value with flagname as flaghash - # flaghash variable is an associative array which is only supported in bash > 3. - if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then - if [ -n "${flagvalue}" ] ; then - flaghash[${flagname}]=${flagvalue} - elif [ -n "${words[ $((c+1)) ]}" ] ; then - flaghash[${flagname}]=${words[ $((c+1)) ]} - else - flaghash[${flagname}]="true" # pad "true" for bool flag - fi - fi - - # skip the argument to a two word flag - if [[ ${words[c]} != *"="* ]] && __%[1]s_contains_word "${words[c]}" "${two_word_flags[@]}"; then - __%[1]s_debug "${FUNCNAME[0]}: found a flag ${words[c]}, skip the next argument" - c=$((c+1)) - # if we are looking for a flags value, don't show commands - if [[ $c -eq $cword ]]; then - commands=() - fi - fi - - c=$((c+1)) - -} - -__%[1]s_handle_noun() -{ - __%[1]s_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" - - if __%[1]s_contains_word "${words[c]}" "${must_have_one_noun[@]}"; then - must_have_one_noun=() - elif __%[1]s_contains_word "${words[c]}" "${noun_aliases[@]}"; then - must_have_one_noun=() - fi - - nouns+=("${words[c]}") - c=$((c+1)) -} - -__%[1]s_handle_command() -{ - __%[1]s_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" - - local next_command - if [[ -n ${last_command} ]]; then - next_command="_${last_command}_${words[c]//:/__}" - else - if [[ $c -eq 0 ]]; then - next_command="_%[1]s_root_command" - else - next_command="_${words[c]//:/__}" - fi - fi - c=$((c+1)) - __%[1]s_debug "${FUNCNAME[0]}: looking for ${next_command}" - declare -F "$next_command" >/dev/null && $next_command -} - -__%[1]s_handle_word() -{ - if [[ $c -ge $cword ]]; then - __%[1]s_handle_reply - return - fi - __%[1]s_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" - if [[ "${words[c]}" == -* ]]; then - __%[1]s_handle_flag - elif __%[1]s_contains_word "${words[c]}" "${commands[@]}"; then - __%[1]s_handle_command - elif [[ $c -eq 0 ]]; then - __%[1]s_handle_command - elif __%[1]s_contains_word "${words[c]}" "${command_aliases[@]}"; then - # aliashash variable is an associative array which is only supported in bash > 3. - if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then - words[c]=${aliashash[${words[c]}]} - __%[1]s_handle_command - else - __%[1]s_handle_noun - fi - else - __%[1]s_handle_noun - fi - __%[1]s_handle_word -} - -`, name, ShellCompNoDescRequestCmd, - ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, - ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, activeHelpEnvVar(name))) -} - -func writePostscript(buf io.StringWriter, name string) { - name = strings.ReplaceAll(name, ":", "__") - WriteStringAndCheck(buf, fmt.Sprintf("__start_%s()\n", name)) - WriteStringAndCheck(buf, fmt.Sprintf(`{ - local cur prev words cword split - declare -A flaghash 2>/dev/null || : - declare -A aliashash 2>/dev/null || : - if declare -F _init_completion >/dev/null 2>&1; then - _init_completion -s || return - else - __%[1]s_init_completion -n "=" || return - fi - - local c=0 - local flag_parsing_disabled= - local flags=() - local two_word_flags=() - local local_nonpersistent_flags=() - local flags_with_completion=() - local flags_completion=() - local commands=("%[1]s") - local command_aliases=() - local must_have_one_flag=() - local must_have_one_noun=() - local has_completion_function="" - local last_command="" - local nouns=() - local noun_aliases=() - - __%[1]s_handle_word -} - -`, name)) - WriteStringAndCheck(buf, fmt.Sprintf(`if [[ $(type -t compopt) = "builtin" ]]; then - complete -o default -F __start_%s %s -else - complete -o default -o nospace -F __start_%s %s -fi - -`, name, name, name, name)) - WriteStringAndCheck(buf, "# ex: ts=4 sw=4 et filetype=sh\n") -} - -func writeCommands(buf io.StringWriter, cmd *Command) { - WriteStringAndCheck(buf, " commands=()\n") - for _, c := range cmd.Commands() { - if !c.IsAvailableCommand() && c != cmd.helpCommand { - continue - } - WriteStringAndCheck(buf, fmt.Sprintf(" commands+=(%q)\n", c.Name())) - writeCmdAliases(buf, c) - } - WriteStringAndCheck(buf, "\n") -} - -func writeFlagHandler(buf io.StringWriter, name string, annotations map[string][]string, cmd *Command) { - for key, value := range annotations { - switch key { - case BashCompFilenameExt: - WriteStringAndCheck(buf, fmt.Sprintf(" flags_with_completion+=(%q)\n", name)) - - var ext string - if len(value) > 0 { - ext = fmt.Sprintf("__%s_handle_filename_extension_flag ", cmd.Root().Name()) + strings.Join(value, "|") - } else { - ext = "_filedir" - } - WriteStringAndCheck(buf, fmt.Sprintf(" flags_completion+=(%q)\n", ext)) - case BashCompCustom: - WriteStringAndCheck(buf, fmt.Sprintf(" flags_with_completion+=(%q)\n", name)) - - if len(value) > 0 { - handlers := strings.Join(value, "; ") - WriteStringAndCheck(buf, fmt.Sprintf(" flags_completion+=(%q)\n", handlers)) - } else { - WriteStringAndCheck(buf, " flags_completion+=(:)\n") - } - case BashCompSubdirsInDir: - WriteStringAndCheck(buf, fmt.Sprintf(" flags_with_completion+=(%q)\n", name)) - - var ext string - if len(value) == 1 { - ext = fmt.Sprintf("__%s_handle_subdirs_in_dir_flag ", cmd.Root().Name()) + value[0] - } else { - ext = "_filedir -d" - } - WriteStringAndCheck(buf, fmt.Sprintf(" flags_completion+=(%q)\n", ext)) - } - } -} - -const cbn = "\")\n" - -func writeShortFlag(buf io.StringWriter, flag *pflag.Flag, cmd *Command) { - name := flag.Shorthand - format := " " - if len(flag.NoOptDefVal) == 0 { - format += "two_word_" - } - format += "flags+=(\"-%s" + cbn - WriteStringAndCheck(buf, fmt.Sprintf(format, name)) - writeFlagHandler(buf, "-"+name, flag.Annotations, cmd) -} - -func writeFlag(buf io.StringWriter, flag *pflag.Flag, cmd *Command) { - name := flag.Name - format := " flags+=(\"--%s" - if len(flag.NoOptDefVal) == 0 { - format += "=" - } - format += cbn - WriteStringAndCheck(buf, fmt.Sprintf(format, name)) - if len(flag.NoOptDefVal) == 0 { - format = " two_word_flags+=(\"--%s" + cbn - WriteStringAndCheck(buf, fmt.Sprintf(format, name)) - } - writeFlagHandler(buf, "--"+name, flag.Annotations, cmd) -} - -func writeLocalNonPersistentFlag(buf io.StringWriter, flag *pflag.Flag) { - name := flag.Name - format := " local_nonpersistent_flags+=(\"--%[1]s" + cbn - if len(flag.NoOptDefVal) == 0 { - format += " local_nonpersistent_flags+=(\"--%[1]s=" + cbn - } - WriteStringAndCheck(buf, fmt.Sprintf(format, name)) - if len(flag.Shorthand) > 0 { - WriteStringAndCheck(buf, fmt.Sprintf(" local_nonpersistent_flags+=(\"-%s\")\n", flag.Shorthand)) - } -} - -// prepareCustomAnnotationsForFlags setup annotations for go completions for registered flags -func prepareCustomAnnotationsForFlags(cmd *Command) { - flagCompletionMutex.RLock() - defer flagCompletionMutex.RUnlock() - for flag := range flagCompletionFunctions { - // Make sure the completion script calls the __*_go_custom_completion function for - // every registered flag. We need to do this here (and not when the flag was registered - // for completion) so that we can know the root command name for the prefix - // of ___go_custom_completion - if flag.Annotations == nil { - flag.Annotations = map[string][]string{} - } - flag.Annotations[BashCompCustom] = []string{fmt.Sprintf("__%[1]s_handle_go_custom_completion", cmd.Root().Name())} - } -} - -func writeFlags(buf io.StringWriter, cmd *Command) { - prepareCustomAnnotationsForFlags(cmd) - WriteStringAndCheck(buf, ` flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - -`) - - if cmd.DisableFlagParsing { - WriteStringAndCheck(buf, " flag_parsing_disabled=1\n") - } - - localNonPersistentFlags := cmd.LocalNonPersistentFlags() - cmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { - if nonCompletableFlag(flag) { - return - } - writeFlag(buf, flag, cmd) - if len(flag.Shorthand) > 0 { - writeShortFlag(buf, flag, cmd) - } - // localNonPersistentFlags are used to stop the completion of subcommands when one is set - // if TraverseChildren is true we should allow to complete subcommands - if localNonPersistentFlags.Lookup(flag.Name) != nil && !cmd.Root().TraverseChildren { - writeLocalNonPersistentFlag(buf, flag) - } - }) - cmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) { - if nonCompletableFlag(flag) { - return - } - writeFlag(buf, flag, cmd) - if len(flag.Shorthand) > 0 { - writeShortFlag(buf, flag, cmd) - } - }) - - WriteStringAndCheck(buf, "\n") -} - -func writeRequiredFlag(buf io.StringWriter, cmd *Command) { - WriteStringAndCheck(buf, " must_have_one_flag=()\n") - flags := cmd.NonInheritedFlags() - flags.VisitAll(func(flag *pflag.Flag) { - if nonCompletableFlag(flag) { - return - } - for key := range flag.Annotations { - switch key { - case BashCompOneRequiredFlag: - format := " must_have_one_flag+=(\"--%s" - if flag.Value.Type() != "bool" { - format += "=" - } - format += cbn - WriteStringAndCheck(buf, fmt.Sprintf(format, flag.Name)) - - if len(flag.Shorthand) > 0 { - WriteStringAndCheck(buf, fmt.Sprintf(" must_have_one_flag+=(\"-%s"+cbn, flag.Shorthand)) - } - } - } - }) -} - -func writeRequiredNouns(buf io.StringWriter, cmd *Command) { - WriteStringAndCheck(buf, " must_have_one_noun=()\n") - sort.Strings(cmd.ValidArgs) - for _, value := range cmd.ValidArgs { - // Remove any description that may be included following a tab character. - // Descriptions are not supported by bash completion. - value = strings.Split(value, "\t")[0] - WriteStringAndCheck(buf, fmt.Sprintf(" must_have_one_noun+=(%q)\n", value)) - } - if cmd.ValidArgsFunction != nil { - WriteStringAndCheck(buf, " has_completion_function=1\n") - } -} - -func writeCmdAliases(buf io.StringWriter, cmd *Command) { - if len(cmd.Aliases) == 0 { - return - } - - sort.Strings(cmd.Aliases) - - WriteStringAndCheck(buf, fmt.Sprint(` if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then`, "\n")) - for _, value := range cmd.Aliases { - WriteStringAndCheck(buf, fmt.Sprintf(" command_aliases+=(%q)\n", value)) - WriteStringAndCheck(buf, fmt.Sprintf(" aliashash[%q]=%q\n", value, cmd.Name())) - } - WriteStringAndCheck(buf, ` fi`) - WriteStringAndCheck(buf, "\n") -} -func writeArgAliases(buf io.StringWriter, cmd *Command) { - WriteStringAndCheck(buf, " noun_aliases=()\n") - sort.Strings(cmd.ArgAliases) - for _, value := range cmd.ArgAliases { - WriteStringAndCheck(buf, fmt.Sprintf(" noun_aliases+=(%q)\n", value)) - } -} - -func gen(buf io.StringWriter, cmd *Command) { - for _, c := range cmd.Commands() { - if !c.IsAvailableCommand() && c != cmd.helpCommand { - continue - } - gen(buf, c) - } - commandName := cmd.CommandPath() - commandName = strings.ReplaceAll(commandName, " ", "_") - commandName = strings.ReplaceAll(commandName, ":", "__") - - if cmd.Root() == cmd { - WriteStringAndCheck(buf, fmt.Sprintf("_%s_root_command()\n{\n", commandName)) - } else { - WriteStringAndCheck(buf, fmt.Sprintf("_%s()\n{\n", commandName)) - } - - WriteStringAndCheck(buf, fmt.Sprintf(" last_command=%q\n", commandName)) - WriteStringAndCheck(buf, "\n") - WriteStringAndCheck(buf, " command_aliases=()\n") - WriteStringAndCheck(buf, "\n") - - writeCommands(buf, cmd) - writeFlags(buf, cmd) - writeRequiredFlag(buf, cmd) - writeRequiredNouns(buf, cmd) - writeArgAliases(buf, cmd) - WriteStringAndCheck(buf, "}\n\n") -} - -// GenBashCompletion generates bash completion file and writes to the passed writer. -func (c *Command) GenBashCompletion(w io.Writer) error { - buf := new(bytes.Buffer) - writePreamble(buf, c.Name()) - if len(c.BashCompletionFunction) > 0 { - buf.WriteString(c.BashCompletionFunction + "\n") - } - gen(buf, c) - writePostscript(buf, c.Name()) - - _, err := buf.WriteTo(w) - return err -} - -func nonCompletableFlag(flag *pflag.Flag) bool { - return flag.Hidden || len(flag.Deprecated) > 0 -} - -// GenBashCompletionFile generates bash completion file. -func (c *Command) GenBashCompletionFile(filename string) error { - outFile, err := os.Create(filename) - if err != nil { - return err - } - defer outFile.Close() - - return c.GenBashCompletion(outFile) -} diff --git a/vendor/github.com/spf13/cobra/bash_completionsV2.go b/vendor/github.com/spf13/cobra/bash_completionsV2.go deleted file mode 100644 index 1cce5c3..0000000 --- a/vendor/github.com/spf13/cobra/bash_completionsV2.go +++ /dev/null @@ -1,396 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cobra - -import ( - "bytes" - "fmt" - "io" - "os" -) - -func (c *Command) genBashCompletion(w io.Writer, includeDesc bool) error { - buf := new(bytes.Buffer) - genBashComp(buf, c.Name(), includeDesc) - _, err := buf.WriteTo(w) - return err -} - -func genBashComp(buf io.StringWriter, name string, includeDesc bool) { - compCmd := ShellCompRequestCmd - if !includeDesc { - compCmd = ShellCompNoDescRequestCmd - } - - WriteStringAndCheck(buf, fmt.Sprintf(`# bash completion V2 for %-36[1]s -*- shell-script -*- - -__%[1]s_debug() -{ - if [[ -n ${BASH_COMP_DEBUG_FILE-} ]]; then - echo "$*" >> "${BASH_COMP_DEBUG_FILE}" - fi -} - -# Macs have bash3 for which the bash-completion package doesn't include -# _init_completion. This is a minimal version of that function. -__%[1]s_init_completion() -{ - COMPREPLY=() - _get_comp_words_by_ref "$@" cur prev words cword -} - -# This function calls the %[1]s program to obtain the completion -# results and the directive. It fills the 'out' and 'directive' vars. -__%[1]s_get_completion_results() { - local requestComp lastParam lastChar args - - # Prepare the command to request completions for the program. - # Calling ${words[0]} instead of directly %[1]s allows handling aliases - args=("${words[@]:1}") - requestComp="${words[0]} %[2]s ${args[*]}" - - lastParam=${words[$((${#words[@]}-1))]} - lastChar=${lastParam:$((${#lastParam}-1)):1} - __%[1]s_debug "lastParam ${lastParam}, lastChar ${lastChar}" - - if [[ -z ${cur} && ${lastChar} != = ]]; then - # If the last parameter is complete (there is a space following it) - # We add an extra empty parameter so we can indicate this to the go method. - __%[1]s_debug "Adding extra empty parameter" - requestComp="${requestComp} ''" - fi - - # When completing a flag with an = (e.g., %[1]s -n=) - # bash focuses on the part after the =, so we need to remove - # the flag part from $cur - if [[ ${cur} == -*=* ]]; then - cur="${cur#*=}" - fi - - __%[1]s_debug "Calling ${requestComp}" - # Use eval to handle any environment variables and such - out=$(eval "${requestComp}" 2>/dev/null) - - # Extract the directive integer at the very end of the output following a colon (:) - directive=${out##*:} - # Remove the directive - out=${out%%:*} - if [[ ${directive} == "${out}" ]]; then - # There is not directive specified - directive=0 - fi - __%[1]s_debug "The completion directive is: ${directive}" - __%[1]s_debug "The completions are: ${out}" -} - -__%[1]s_process_completion_results() { - local shellCompDirectiveError=%[3]d - local shellCompDirectiveNoSpace=%[4]d - local shellCompDirectiveNoFileComp=%[5]d - local shellCompDirectiveFilterFileExt=%[6]d - local shellCompDirectiveFilterDirs=%[7]d - local shellCompDirectiveKeepOrder=%[8]d - - if (((directive & shellCompDirectiveError) != 0)); then - # Error code. No completion. - __%[1]s_debug "Received error from custom completion go code" - return - else - if (((directive & shellCompDirectiveNoSpace) != 0)); then - if [[ $(type -t compopt) == builtin ]]; then - __%[1]s_debug "Activating no space" - compopt -o nospace - else - __%[1]s_debug "No space directive not supported in this version of bash" - fi - fi - if (((directive & shellCompDirectiveKeepOrder) != 0)); then - if [[ $(type -t compopt) == builtin ]]; then - # no sort isn't supported for bash less than < 4.4 - if [[ ${BASH_VERSINFO[0]} -lt 4 || ( ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -lt 4 ) ]]; then - __%[1]s_debug "No sort directive not supported in this version of bash" - else - __%[1]s_debug "Activating keep order" - compopt -o nosort - fi - else - __%[1]s_debug "No sort directive not supported in this version of bash" - fi - fi - if (((directive & shellCompDirectiveNoFileComp) != 0)); then - if [[ $(type -t compopt) == builtin ]]; then - __%[1]s_debug "Activating no file completion" - compopt +o default - else - __%[1]s_debug "No file completion directive not supported in this version of bash" - fi - fi - fi - - # Separate activeHelp from normal completions - local completions=() - local activeHelp=() - __%[1]s_extract_activeHelp - - if (((directive & shellCompDirectiveFilterFileExt) != 0)); then - # File extension filtering - local fullFilter filter filteringCmd - - # Do not use quotes around the $completions variable or else newline - # characters will be kept. - for filter in ${completions[*]}; do - fullFilter+="$filter|" - done - - filteringCmd="_filedir $fullFilter" - __%[1]s_debug "File filtering command: $filteringCmd" - $filteringCmd - elif (((directive & shellCompDirectiveFilterDirs) != 0)); then - # File completion for directories only - - local subdir - subdir=${completions[0]} - if [[ -n $subdir ]]; then - __%[1]s_debug "Listing directories in $subdir" - pushd "$subdir" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return - else - __%[1]s_debug "Listing directories in ." - _filedir -d - fi - else - __%[1]s_handle_completion_types - fi - - __%[1]s_handle_special_char "$cur" : - __%[1]s_handle_special_char "$cur" = - - # Print the activeHelp statements before we finish - if ((${#activeHelp[*]} != 0)); then - printf "\n"; - printf "%%s\n" "${activeHelp[@]}" - printf "\n" - - # The prompt format is only available from bash 4.4. - # We test if it is available before using it. - if (x=${PS1@P}) 2> /dev/null; then - printf "%%s" "${PS1@P}${COMP_LINE[@]}" - else - # Can't print the prompt. Just print the - # text the user had typed, it is workable enough. - printf "%%s" "${COMP_LINE[@]}" - fi - fi -} - -# Separate activeHelp lines from real completions. -# Fills the $activeHelp and $completions arrays. -__%[1]s_extract_activeHelp() { - local activeHelpMarker="%[9]s" - local endIndex=${#activeHelpMarker} - - while IFS='' read -r comp; do - if [[ ${comp:0:endIndex} == $activeHelpMarker ]]; then - comp=${comp:endIndex} - __%[1]s_debug "ActiveHelp found: $comp" - if [[ -n $comp ]]; then - activeHelp+=("$comp") - fi - else - # Not an activeHelp line but a normal completion - completions+=("$comp") - fi - done <<<"${out}" -} - -__%[1]s_handle_completion_types() { - __%[1]s_debug "__%[1]s_handle_completion_types: COMP_TYPE is $COMP_TYPE" - - case $COMP_TYPE in - 37|42) - # Type: menu-complete/menu-complete-backward and insert-completions - # If the user requested inserting one completion at a time, or all - # completions at once on the command-line we must remove the descriptions. - # https://github.com/spf13/cobra/issues/1508 - local tab=$'\t' comp - while IFS='' read -r comp; do - [[ -z $comp ]] && continue - # Strip any description - comp=${comp%%%%$tab*} - # Only consider the completions that match - if [[ $comp == "$cur"* ]]; then - COMPREPLY+=("$comp") - fi - done < <(printf "%%s\n" "${completions[@]}") - ;; - - *) - # Type: complete (normal completion) - __%[1]s_handle_standard_completion_case - ;; - esac -} - -__%[1]s_handle_standard_completion_case() { - local tab=$'\t' comp - - # Short circuit to optimize if we don't have descriptions - if [[ "${completions[*]}" != *$tab* ]]; then - IFS=$'\n' read -ra COMPREPLY -d '' < <(compgen -W "${completions[*]}" -- "$cur") - return 0 - fi - - local longest=0 - local compline - # Look for the longest completion so that we can format things nicely - while IFS='' read -r compline; do - [[ -z $compline ]] && continue - # Strip any description before checking the length - comp=${compline%%%%$tab*} - # Only consider the completions that match - [[ $comp == "$cur"* ]] || continue - COMPREPLY+=("$compline") - if ((${#comp}>longest)); then - longest=${#comp} - fi - done < <(printf "%%s\n" "${completions[@]}") - - # If there is a single completion left, remove the description text - if ((${#COMPREPLY[*]} == 1)); then - __%[1]s_debug "COMPREPLY[0]: ${COMPREPLY[0]}" - comp="${COMPREPLY[0]%%%%$tab*}" - __%[1]s_debug "Removed description from single completion, which is now: ${comp}" - COMPREPLY[0]=$comp - else # Format the descriptions - __%[1]s_format_comp_descriptions $longest - fi -} - -__%[1]s_handle_special_char() -{ - local comp="$1" - local char=$2 - if [[ "$comp" == *${char}* && "$COMP_WORDBREAKS" == *${char}* ]]; then - local word=${comp%%"${comp##*${char}}"} - local idx=${#COMPREPLY[*]} - while ((--idx >= 0)); do - COMPREPLY[idx]=${COMPREPLY[idx]#"$word"} - done - fi -} - -__%[1]s_format_comp_descriptions() -{ - local tab=$'\t' - local comp desc maxdesclength - local longest=$1 - - local i ci - for ci in ${!COMPREPLY[*]}; do - comp=${COMPREPLY[ci]} - # Properly format the description string which follows a tab character if there is one - if [[ "$comp" == *$tab* ]]; then - __%[1]s_debug "Original comp: $comp" - desc=${comp#*$tab} - comp=${comp%%%%$tab*} - - # $COLUMNS stores the current shell width. - # Remove an extra 4 because we add 2 spaces and 2 parentheses. - maxdesclength=$(( COLUMNS - longest - 4 )) - - # Make sure we can fit a description of at least 8 characters - # if we are to align the descriptions. - if ((maxdesclength > 8)); then - # Add the proper number of spaces to align the descriptions - for ((i = ${#comp} ; i < longest ; i++)); do - comp+=" " - done - else - # Don't pad the descriptions so we can fit more text after the completion - maxdesclength=$(( COLUMNS - ${#comp} - 4 )) - fi - - # If there is enough space for any description text, - # truncate the descriptions that are too long for the shell width - if ((maxdesclength > 0)); then - if ((${#desc} > maxdesclength)); then - desc=${desc:0:$(( maxdesclength - 1 ))} - desc+="…" - fi - comp+=" ($desc)" - fi - COMPREPLY[ci]=$comp - __%[1]s_debug "Final comp: $comp" - fi - done -} - -__start_%[1]s() -{ - local cur prev words cword split - - COMPREPLY=() - - # Call _init_completion from the bash-completion package - # to prepare the arguments properly - if declare -F _init_completion >/dev/null 2>&1; then - _init_completion -n =: || return - else - __%[1]s_init_completion -n =: || return - fi - - __%[1]s_debug - __%[1]s_debug "========= starting completion logic ==========" - __%[1]s_debug "cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}, cword is $cword" - - # The user could have moved the cursor backwards on the command-line. - # We need to trigger completion from the $cword location, so we need - # to truncate the command-line ($words) up to the $cword location. - words=("${words[@]:0:$cword+1}") - __%[1]s_debug "Truncated words[*]: ${words[*]}," - - local out directive - __%[1]s_get_completion_results - __%[1]s_process_completion_results -} - -if [[ $(type -t compopt) = "builtin" ]]; then - complete -o default -F __start_%[1]s %[1]s -else - complete -o default -o nospace -F __start_%[1]s %[1]s -fi - -# ex: ts=4 sw=4 et filetype=sh -`, name, compCmd, - ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, - ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, - activeHelpMarker)) -} - -// GenBashCompletionFileV2 generates Bash completion version 2. -func (c *Command) GenBashCompletionFileV2(filename string, includeDesc bool) error { - outFile, err := os.Create(filename) - if err != nil { - return err - } - defer outFile.Close() - - return c.GenBashCompletionV2(outFile, includeDesc) -} - -// GenBashCompletionV2 generates Bash completion file version 2 -// and writes it to the passed writer. -func (c *Command) GenBashCompletionV2(w io.Writer, includeDesc bool) error { - return c.genBashCompletion(w, includeDesc) -} diff --git a/vendor/github.com/spf13/cobra/cobra.go b/vendor/github.com/spf13/cobra/cobra.go deleted file mode 100644 index a6b160c..0000000 --- a/vendor/github.com/spf13/cobra/cobra.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Commands similar to git, go tools and other modern CLI tools -// inspired by go, go-Commander, gh and subcommand - -package cobra - -import ( - "fmt" - "io" - "os" - "reflect" - "strconv" - "strings" - "text/template" - "time" - "unicode" -) - -var templateFuncs = template.FuncMap{ - "trim": strings.TrimSpace, - "trimRightSpace": trimRightSpace, - "trimTrailingWhitespaces": trimRightSpace, - "appendIfNotPresent": appendIfNotPresent, - "rpad": rpad, - "gt": Gt, - "eq": Eq, -} - -var initializers []func() -var finalizers []func() - -const ( - defaultPrefixMatching = false - defaultCommandSorting = true - defaultCaseInsensitive = false - defaultTraverseRunHooks = false -) - -// EnablePrefixMatching allows setting automatic prefix matching. Automatic prefix matching can be a dangerous thing -// to automatically enable in CLI tools. -// Set this to true to enable it. -var EnablePrefixMatching = defaultPrefixMatching - -// EnableCommandSorting controls sorting of the slice of commands, which is turned on by default. -// To disable sorting, set it to false. -var EnableCommandSorting = defaultCommandSorting - -// EnableCaseInsensitive allows case-insensitive commands names. (case sensitive by default) -var EnableCaseInsensitive = defaultCaseInsensitive - -// EnableTraverseRunHooks executes persistent pre-run and post-run hooks from all parents. -// By default this is disabled, which means only the first run hook to be found is executed. -var EnableTraverseRunHooks = defaultTraverseRunHooks - -// MousetrapHelpText enables an information splash screen on Windows -// if the CLI is started from explorer.exe. -// To disable the mousetrap, just set this variable to blank string (""). -// Works only on Microsoft Windows. -var MousetrapHelpText = `This is a command line tool. - -You need to open cmd.exe and run it from there. -` - -// MousetrapDisplayDuration controls how long the MousetrapHelpText message is displayed on Windows -// if the CLI is started from explorer.exe. Set to 0 to wait for the return key to be pressed. -// To disable the mousetrap, just set MousetrapHelpText to blank string (""). -// Works only on Microsoft Windows. -var MousetrapDisplayDuration = 5 * time.Second - -// AddTemplateFunc adds a template function that's available to Usage and Help -// template generation. -func AddTemplateFunc(name string, tmplFunc interface{}) { - templateFuncs[name] = tmplFunc -} - -// AddTemplateFuncs adds multiple template functions that are available to Usage and -// Help template generation. -func AddTemplateFuncs(tmplFuncs template.FuncMap) { - for k, v := range tmplFuncs { - templateFuncs[k] = v - } -} - -// OnInitialize sets the passed functions to be run when each command's -// Execute method is called. -func OnInitialize(y ...func()) { - initializers = append(initializers, y...) -} - -// OnFinalize sets the passed functions to be run when each command's -// Execute method is terminated. -func OnFinalize(y ...func()) { - finalizers = append(finalizers, y...) -} - -// FIXME Gt is unused by cobra and should be removed in a version 2. It exists only for compatibility with users of cobra. - -// Gt takes two types and checks whether the first type is greater than the second. In case of types Arrays, Chans, -// Maps and Slices, Gt will compare their lengths. Ints are compared directly while strings are first parsed as -// ints and then compared. -func Gt(a interface{}, b interface{}) bool { - var left, right int64 - av := reflect.ValueOf(a) - - switch av.Kind() { - case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice: - left = int64(av.Len()) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - left = av.Int() - case reflect.String: - left, _ = strconv.ParseInt(av.String(), 10, 64) - } - - bv := reflect.ValueOf(b) - - switch bv.Kind() { - case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice: - right = int64(bv.Len()) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - right = bv.Int() - case reflect.String: - right, _ = strconv.ParseInt(bv.String(), 10, 64) - } - - return left > right -} - -// FIXME Eq is unused by cobra and should be removed in a version 2. It exists only for compatibility with users of cobra. - -// Eq takes two types and checks whether they are equal. Supported types are int and string. Unsupported types will panic. -func Eq(a interface{}, b interface{}) bool { - av := reflect.ValueOf(a) - bv := reflect.ValueOf(b) - - switch av.Kind() { - case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice: - panic("Eq called on unsupported type") - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return av.Int() == bv.Int() - case reflect.String: - return av.String() == bv.String() - } - return false -} - -func trimRightSpace(s string) string { - return strings.TrimRightFunc(s, unicode.IsSpace) -} - -// FIXME appendIfNotPresent is unused by cobra and should be removed in a version 2. It exists only for compatibility with users of cobra. - -// appendIfNotPresent will append stringToAppend to the end of s, but only if it's not yet present in s. -func appendIfNotPresent(s, stringToAppend string) string { - if strings.Contains(s, stringToAppend) { - return s - } - return s + " " + stringToAppend -} - -// rpad adds padding to the right of a string. -func rpad(s string, padding int) string { - formattedString := fmt.Sprintf("%%-%ds", padding) - return fmt.Sprintf(formattedString, s) -} - -// tmpl executes the given template text on data, writing the result to w. -func tmpl(w io.Writer, text string, data interface{}) error { - t := template.New("top") - t.Funcs(templateFuncs) - template.Must(t.Parse(text)) - return t.Execute(w, data) -} - -// ld compares two strings and returns the levenshtein distance between them. -func ld(s, t string, ignoreCase bool) int { - if ignoreCase { - s = strings.ToLower(s) - t = strings.ToLower(t) - } - d := make([][]int, len(s)+1) - for i := range d { - d[i] = make([]int, len(t)+1) - } - for i := range d { - d[i][0] = i - } - for j := range d[0] { - d[0][j] = j - } - for j := 1; j <= len(t); j++ { - for i := 1; i <= len(s); i++ { - if s[i-1] == t[j-1] { - d[i][j] = d[i-1][j-1] - } else { - min := d[i-1][j] - if d[i][j-1] < min { - min = d[i][j-1] - } - if d[i-1][j-1] < min { - min = d[i-1][j-1] - } - d[i][j] = min + 1 - } - } - - } - return d[len(s)][len(t)] -} - -func stringInSlice(a string, list []string) bool { - for _, b := range list { - if b == a { - return true - } - } - return false -} - -// CheckErr prints the msg with the prefix 'Error:' and exits with error code 1. If the msg is nil, it does nothing. -func CheckErr(msg interface{}) { - if msg != nil { - fmt.Fprintln(os.Stderr, "Error:", msg) - os.Exit(1) - } -} - -// WriteStringAndCheck writes a string into a buffer, and checks if the error is not nil. -func WriteStringAndCheck(b io.StringWriter, s string) { - _, err := b.WriteString(s) - CheckErr(err) -} diff --git a/vendor/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go deleted file mode 100644 index 2fbe6c1..0000000 --- a/vendor/github.com/spf13/cobra/command.go +++ /dev/null @@ -1,1885 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces. -// In addition to providing an interface, Cobra simultaneously provides a controller to organize your application code. -package cobra - -import ( - "bytes" - "context" - "errors" - "fmt" - "io" - "os" - "path/filepath" - "sort" - "strings" - - flag "github.com/spf13/pflag" -) - -const ( - FlagSetByCobraAnnotation = "cobra_annotation_flag_set_by_cobra" - CommandDisplayNameAnnotation = "cobra_annotation_command_display_name" -) - -// FParseErrWhitelist configures Flag parse errors to be ignored -type FParseErrWhitelist flag.ParseErrorsWhitelist - -// Group Structure to manage groups for commands -type Group struct { - ID string - Title string -} - -// Command is just that, a command for your application. -// E.g. 'go run ...' - 'run' is the command. Cobra requires -// you to define the usage and description as part of your command -// definition to ensure usability. -type Command struct { - // Use is the one-line usage message. - // Recommended syntax is as follows: - // [ ] identifies an optional argument. Arguments that are not enclosed in brackets are required. - // ... indicates that you can specify multiple values for the previous argument. - // | indicates mutually exclusive information. You can use the argument to the left of the separator or the - // argument to the right of the separator. You cannot use both arguments in a single use of the command. - // { } delimits a set of mutually exclusive arguments when one of the arguments is required. If the arguments are - // optional, they are enclosed in brackets ([ ]). - // Example: add [-F file | -D dir]... [-f format] profile - Use string - - // Aliases is an array of aliases that can be used instead of the first word in Use. - Aliases []string - - // SuggestFor is an array of command names for which this command will be suggested - - // similar to aliases but only suggests. - SuggestFor []string - - // Short is the short description shown in the 'help' output. - Short string - - // The group id under which this subcommand is grouped in the 'help' output of its parent. - GroupID string - - // Long is the long message shown in the 'help ' output. - Long string - - // Example is examples of how to use the command. - Example string - - // ValidArgs is list of all valid non-flag arguments that are accepted in shell completions - ValidArgs []string - // ValidArgsFunction is an optional function that provides valid non-flag arguments for shell completion. - // It is a dynamic version of using ValidArgs. - // Only one of ValidArgs and ValidArgsFunction can be used for a command. - ValidArgsFunction func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) - - // Expected arguments - Args PositionalArgs - - // ArgAliases is List of aliases for ValidArgs. - // These are not suggested to the user in the shell completion, - // but accepted if entered manually. - ArgAliases []string - - // BashCompletionFunction is custom bash functions used by the legacy bash autocompletion generator. - // For portability with other shells, it is recommended to instead use ValidArgsFunction - BashCompletionFunction string - - // Deprecated defines, if this command is deprecated and should print this string when used. - Deprecated string - - // Annotations are key/value pairs that can be used by applications to identify or - // group commands or set special options. - Annotations map[string]string - - // Version defines the version for this command. If this value is non-empty and the command does not - // define a "version" flag, a "version" boolean flag will be added to the command and, if specified, - // will print content of the "Version" variable. A shorthand "v" flag will also be added if the - // command does not define one. - Version string - - // The *Run functions are executed in the following order: - // * PersistentPreRun() - // * PreRun() - // * Run() - // * PostRun() - // * PersistentPostRun() - // All functions get the same args, the arguments after the command name. - // The *PreRun and *PostRun functions will only be executed if the Run function of the current - // command has been declared. - // - // PersistentPreRun: children of this command will inherit and execute. - PersistentPreRun func(cmd *Command, args []string) - // PersistentPreRunE: PersistentPreRun but returns an error. - PersistentPreRunE func(cmd *Command, args []string) error - // PreRun: children of this command will not inherit. - PreRun func(cmd *Command, args []string) - // PreRunE: PreRun but returns an error. - PreRunE func(cmd *Command, args []string) error - // Run: Typically the actual work function. Most commands will only implement this. - Run func(cmd *Command, args []string) - // RunE: Run but returns an error. - RunE func(cmd *Command, args []string) error - // PostRun: run after the Run command. - PostRun func(cmd *Command, args []string) - // PostRunE: PostRun but returns an error. - PostRunE func(cmd *Command, args []string) error - // PersistentPostRun: children of this command will inherit and execute after PostRun. - PersistentPostRun func(cmd *Command, args []string) - // PersistentPostRunE: PersistentPostRun but returns an error. - PersistentPostRunE func(cmd *Command, args []string) error - - // groups for subcommands - commandgroups []*Group - - // args is actual args parsed from flags. - args []string - // flagErrorBuf contains all error messages from pflag. - flagErrorBuf *bytes.Buffer - // flags is full set of flags. - flags *flag.FlagSet - // pflags contains persistent flags. - pflags *flag.FlagSet - // lflags contains local flags. - lflags *flag.FlagSet - // iflags contains inherited flags. - iflags *flag.FlagSet - // parentsPflags is all persistent flags of cmd's parents. - parentsPflags *flag.FlagSet - // globNormFunc is the global normalization function - // that we can use on every pflag set and children commands - globNormFunc func(f *flag.FlagSet, name string) flag.NormalizedName - - // usageFunc is usage func defined by user. - usageFunc func(*Command) error - // usageTemplate is usage template defined by user. - usageTemplate string - // flagErrorFunc is func defined by user and it's called when the parsing of - // flags returns an error. - flagErrorFunc func(*Command, error) error - // helpTemplate is help template defined by user. - helpTemplate string - // helpFunc is help func defined by user. - helpFunc func(*Command, []string) - // helpCommand is command with usage 'help'. If it's not defined by user, - // cobra uses default help command. - helpCommand *Command - // helpCommandGroupID is the group id for the helpCommand - helpCommandGroupID string - - // completionCommandGroupID is the group id for the completion command - completionCommandGroupID string - - // versionTemplate is the version template defined by user. - versionTemplate string - - // errPrefix is the error message prefix defined by user. - errPrefix string - - // inReader is a reader defined by the user that replaces stdin - inReader io.Reader - // outWriter is a writer defined by the user that replaces stdout - outWriter io.Writer - // errWriter is a writer defined by the user that replaces stderr - errWriter io.Writer - - // FParseErrWhitelist flag parse errors to be ignored - FParseErrWhitelist FParseErrWhitelist - - // CompletionOptions is a set of options to control the handling of shell completion - CompletionOptions CompletionOptions - - // commandsAreSorted defines, if command slice are sorted or not. - commandsAreSorted bool - // commandCalledAs is the name or alias value used to call this command. - commandCalledAs struct { - name string - called bool - } - - ctx context.Context - - // commands is the list of commands supported by this program. - commands []*Command - // parent is a parent command for this command. - parent *Command - // Max lengths of commands' string lengths for use in padding. - commandsMaxUseLen int - commandsMaxCommandPathLen int - commandsMaxNameLen int - - // TraverseChildren parses flags on all parents before executing child command. - TraverseChildren bool - - // Hidden defines, if this command is hidden and should NOT show up in the list of available commands. - Hidden bool - - // SilenceErrors is an option to quiet errors down stream. - SilenceErrors bool - - // SilenceUsage is an option to silence usage when an error occurs. - SilenceUsage bool - - // DisableFlagParsing disables the flag parsing. - // If this is true all flags will be passed to the command as arguments. - DisableFlagParsing bool - - // DisableAutoGenTag defines, if gen tag ("Auto generated by spf13/cobra...") - // will be printed by generating docs for this command. - DisableAutoGenTag bool - - // DisableFlagsInUseLine will disable the addition of [flags] to the usage - // line of a command when printing help or generating docs - DisableFlagsInUseLine bool - - // DisableSuggestions disables the suggestions based on Levenshtein distance - // that go along with 'unknown command' messages. - DisableSuggestions bool - - // SuggestionsMinimumDistance defines minimum levenshtein distance to display suggestions. - // Must be > 0. - SuggestionsMinimumDistance int -} - -// Context returns underlying command context. If command was executed -// with ExecuteContext or the context was set with SetContext, the -// previously set context will be returned. Otherwise, nil is returned. -// -// Notice that a call to Execute and ExecuteC will replace a nil context of -// a command with a context.Background, so a background context will be -// returned by Context after one of these functions has been called. -func (c *Command) Context() context.Context { - return c.ctx -} - -// SetContext sets context for the command. This context will be overwritten by -// Command.ExecuteContext or Command.ExecuteContextC. -func (c *Command) SetContext(ctx context.Context) { - c.ctx = ctx -} - -// SetArgs sets arguments for the command. It is set to os.Args[1:] by default, if desired, can be overridden -// particularly useful when testing. -func (c *Command) SetArgs(a []string) { - c.args = a -} - -// SetOutput sets the destination for usage and error messages. -// If output is nil, os.Stderr is used. -// Deprecated: Use SetOut and/or SetErr instead -func (c *Command) SetOutput(output io.Writer) { - c.outWriter = output - c.errWriter = output -} - -// SetOut sets the destination for usage messages. -// If newOut is nil, os.Stdout is used. -func (c *Command) SetOut(newOut io.Writer) { - c.outWriter = newOut -} - -// SetErr sets the destination for error messages. -// If newErr is nil, os.Stderr is used. -func (c *Command) SetErr(newErr io.Writer) { - c.errWriter = newErr -} - -// SetIn sets the source for input data -// If newIn is nil, os.Stdin is used. -func (c *Command) SetIn(newIn io.Reader) { - c.inReader = newIn -} - -// SetUsageFunc sets usage function. Usage can be defined by application. -func (c *Command) SetUsageFunc(f func(*Command) error) { - c.usageFunc = f -} - -// SetUsageTemplate sets usage template. Can be defined by Application. -func (c *Command) SetUsageTemplate(s string) { - c.usageTemplate = s -} - -// SetFlagErrorFunc sets a function to generate an error when flag parsing -// fails. -func (c *Command) SetFlagErrorFunc(f func(*Command, error) error) { - c.flagErrorFunc = f -} - -// SetHelpFunc sets help function. Can be defined by Application. -func (c *Command) SetHelpFunc(f func(*Command, []string)) { - c.helpFunc = f -} - -// SetHelpCommand sets help command. -func (c *Command) SetHelpCommand(cmd *Command) { - c.helpCommand = cmd -} - -// SetHelpCommandGroupID sets the group id of the help command. -func (c *Command) SetHelpCommandGroupID(groupID string) { - if c.helpCommand != nil { - c.helpCommand.GroupID = groupID - } - // helpCommandGroupID is used if no helpCommand is defined by the user - c.helpCommandGroupID = groupID -} - -// SetCompletionCommandGroupID sets the group id of the completion command. -func (c *Command) SetCompletionCommandGroupID(groupID string) { - // completionCommandGroupID is used if no completion command is defined by the user - c.Root().completionCommandGroupID = groupID -} - -// SetHelpTemplate sets help template to be used. Application can use it to set custom template. -func (c *Command) SetHelpTemplate(s string) { - c.helpTemplate = s -} - -// SetVersionTemplate sets version template to be used. Application can use it to set custom template. -func (c *Command) SetVersionTemplate(s string) { - c.versionTemplate = s -} - -// SetErrPrefix sets error message prefix to be used. Application can use it to set custom prefix. -func (c *Command) SetErrPrefix(s string) { - c.errPrefix = s -} - -// SetGlobalNormalizationFunc sets a normalization function to all flag sets and also to child commands. -// The user should not have a cyclic dependency on commands. -func (c *Command) SetGlobalNormalizationFunc(n func(f *flag.FlagSet, name string) flag.NormalizedName) { - c.Flags().SetNormalizeFunc(n) - c.PersistentFlags().SetNormalizeFunc(n) - c.globNormFunc = n - - for _, command := range c.commands { - command.SetGlobalNormalizationFunc(n) - } -} - -// OutOrStdout returns output to stdout. -func (c *Command) OutOrStdout() io.Writer { - return c.getOut(os.Stdout) -} - -// OutOrStderr returns output to stderr -func (c *Command) OutOrStderr() io.Writer { - return c.getOut(os.Stderr) -} - -// ErrOrStderr returns output to stderr -func (c *Command) ErrOrStderr() io.Writer { - return c.getErr(os.Stderr) -} - -// InOrStdin returns input to stdin -func (c *Command) InOrStdin() io.Reader { - return c.getIn(os.Stdin) -} - -func (c *Command) getOut(def io.Writer) io.Writer { - if c.outWriter != nil { - return c.outWriter - } - if c.HasParent() { - return c.parent.getOut(def) - } - return def -} - -func (c *Command) getErr(def io.Writer) io.Writer { - if c.errWriter != nil { - return c.errWriter - } - if c.HasParent() { - return c.parent.getErr(def) - } - return def -} - -func (c *Command) getIn(def io.Reader) io.Reader { - if c.inReader != nil { - return c.inReader - } - if c.HasParent() { - return c.parent.getIn(def) - } - return def -} - -// UsageFunc returns either the function set by SetUsageFunc for this command -// or a parent, or it returns a default usage function. -func (c *Command) UsageFunc() (f func(*Command) error) { - if c.usageFunc != nil { - return c.usageFunc - } - if c.HasParent() { - return c.Parent().UsageFunc() - } - return func(c *Command) error { - c.mergePersistentFlags() - err := tmpl(c.OutOrStderr(), c.UsageTemplate(), c) - if err != nil { - c.PrintErrln(err) - } - return err - } -} - -// Usage puts out the usage for the command. -// Used when a user provides invalid input. -// Can be defined by user by overriding UsageFunc. -func (c *Command) Usage() error { - return c.UsageFunc()(c) -} - -// HelpFunc returns either the function set by SetHelpFunc for this command -// or a parent, or it returns a function with default help behavior. -func (c *Command) HelpFunc() func(*Command, []string) { - if c.helpFunc != nil { - return c.helpFunc - } - if c.HasParent() { - return c.Parent().HelpFunc() - } - return func(c *Command, a []string) { - c.mergePersistentFlags() - // The help should be sent to stdout - // See https://github.com/spf13/cobra/issues/1002 - err := tmpl(c.OutOrStdout(), c.HelpTemplate(), c) - if err != nil { - c.PrintErrln(err) - } - } -} - -// Help puts out the help for the command. -// Used when a user calls help [command]. -// Can be defined by user by overriding HelpFunc. -func (c *Command) Help() error { - c.HelpFunc()(c, []string{}) - return nil -} - -// UsageString returns usage string. -func (c *Command) UsageString() string { - // Storing normal writers - tmpOutput := c.outWriter - tmpErr := c.errWriter - - bb := new(bytes.Buffer) - c.outWriter = bb - c.errWriter = bb - - CheckErr(c.Usage()) - - // Setting things back to normal - c.outWriter = tmpOutput - c.errWriter = tmpErr - - return bb.String() -} - -// FlagErrorFunc returns either the function set by SetFlagErrorFunc for this -// command or a parent, or it returns a function which returns the original -// error. -func (c *Command) FlagErrorFunc() (f func(*Command, error) error) { - if c.flagErrorFunc != nil { - return c.flagErrorFunc - } - - if c.HasParent() { - return c.parent.FlagErrorFunc() - } - return func(c *Command, err error) error { - return err - } -} - -var minUsagePadding = 25 - -// UsagePadding return padding for the usage. -func (c *Command) UsagePadding() int { - if c.parent == nil || minUsagePadding > c.parent.commandsMaxUseLen { - return minUsagePadding - } - return c.parent.commandsMaxUseLen -} - -var minCommandPathPadding = 11 - -// CommandPathPadding return padding for the command path. -func (c *Command) CommandPathPadding() int { - if c.parent == nil || minCommandPathPadding > c.parent.commandsMaxCommandPathLen { - return minCommandPathPadding - } - return c.parent.commandsMaxCommandPathLen -} - -var minNamePadding = 11 - -// NamePadding returns padding for the name. -func (c *Command) NamePadding() int { - if c.parent == nil || minNamePadding > c.parent.commandsMaxNameLen { - return minNamePadding - } - return c.parent.commandsMaxNameLen -} - -// UsageTemplate returns usage template for the command. -func (c *Command) UsageTemplate() string { - if c.usageTemplate != "" { - return c.usageTemplate - } - - if c.HasParent() { - return c.parent.UsageTemplate() - } - return `Usage:{{if .Runnable}} - {{.UseLine}}{{end}}{{if .HasAvailableSubCommands}} - {{.CommandPath}} [command]{{end}}{{if gt (len .Aliases) 0}} - -Aliases: - {{.NameAndAliases}}{{end}}{{if .HasExample}} - -Examples: -{{.Example}}{{end}}{{if .HasAvailableSubCommands}}{{$cmds := .Commands}}{{if eq (len .Groups) 0}} - -Available Commands:{{range $cmds}}{{if (or .IsAvailableCommand (eq .Name "help"))}} - {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{else}}{{range $group := .Groups}} - -{{.Title}}{{range $cmds}}{{if (and (eq .GroupID $group.ID) (or .IsAvailableCommand (eq .Name "help")))}} - {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if not .AllChildCommandsHaveGroup}} - -Additional Commands:{{range $cmds}}{{if (and (eq .GroupID "") (or .IsAvailableCommand (eq .Name "help")))}} - {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}} - -Flags: -{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}} - -Global Flags: -{{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasHelpSubCommands}} - -Additional help topics:{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}} - {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableSubCommands}} - -Use "{{.CommandPath}} [command] --help" for more information about a command.{{end}} -` -} - -// HelpTemplate return help template for the command. -func (c *Command) HelpTemplate() string { - if c.helpTemplate != "" { - return c.helpTemplate - } - - if c.HasParent() { - return c.parent.HelpTemplate() - } - return `{{with (or .Long .Short)}}{{. | trimTrailingWhitespaces}} - -{{end}}{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}` -} - -// VersionTemplate return version template for the command. -func (c *Command) VersionTemplate() string { - if c.versionTemplate != "" { - return c.versionTemplate - } - - if c.HasParent() { - return c.parent.VersionTemplate() - } - return `{{with .Name}}{{printf "%s " .}}{{end}}{{printf "version %s" .Version}} -` -} - -// ErrPrefix return error message prefix for the command -func (c *Command) ErrPrefix() string { - if c.errPrefix != "" { - return c.errPrefix - } - - if c.HasParent() { - return c.parent.ErrPrefix() - } - return "Error:" -} - -func hasNoOptDefVal(name string, fs *flag.FlagSet) bool { - flag := fs.Lookup(name) - if flag == nil { - return false - } - return flag.NoOptDefVal != "" -} - -func shortHasNoOptDefVal(name string, fs *flag.FlagSet) bool { - if len(name) == 0 { - return false - } - - flag := fs.ShorthandLookup(name[:1]) - if flag == nil { - return false - } - return flag.NoOptDefVal != "" -} - -func stripFlags(args []string, c *Command) []string { - if len(args) == 0 { - return args - } - c.mergePersistentFlags() - - commands := []string{} - flags := c.Flags() - -Loop: - for len(args) > 0 { - s := args[0] - args = args[1:] - switch { - case s == "--": - // "--" terminates the flags - break Loop - case strings.HasPrefix(s, "--") && !strings.Contains(s, "=") && !hasNoOptDefVal(s[2:], flags): - // If '--flag arg' then - // delete arg from args. - fallthrough // (do the same as below) - case strings.HasPrefix(s, "-") && !strings.Contains(s, "=") && len(s) == 2 && !shortHasNoOptDefVal(s[1:], flags): - // If '-f arg' then - // delete 'arg' from args or break the loop if len(args) <= 1. - if len(args) <= 1 { - break Loop - } else { - args = args[1:] - continue - } - case s != "" && !strings.HasPrefix(s, "-"): - commands = append(commands, s) - } - } - - return commands -} - -// argsMinusFirstX removes only the first x from args. Otherwise, commands that look like -// openshift admin policy add-role-to-user admin my-user, lose the admin argument (arg[4]). -// Special care needs to be taken not to remove a flag value. -func (c *Command) argsMinusFirstX(args []string, x string) []string { - if len(args) == 0 { - return args - } - c.mergePersistentFlags() - flags := c.Flags() - -Loop: - for pos := 0; pos < len(args); pos++ { - s := args[pos] - switch { - case s == "--": - // -- means we have reached the end of the parseable args. Break out of the loop now. - break Loop - case strings.HasPrefix(s, "--") && !strings.Contains(s, "=") && !hasNoOptDefVal(s[2:], flags): - fallthrough - case strings.HasPrefix(s, "-") && !strings.Contains(s, "=") && len(s) == 2 && !shortHasNoOptDefVal(s[1:], flags): - // This is a flag without a default value, and an equal sign is not used. Increment pos in order to skip - // over the next arg, because that is the value of this flag. - pos++ - continue - case !strings.HasPrefix(s, "-"): - // This is not a flag or a flag value. Check to see if it matches what we're looking for, and if so, - // return the args, excluding the one at this position. - if s == x { - ret := []string{} - ret = append(ret, args[:pos]...) - ret = append(ret, args[pos+1:]...) - return ret - } - } - } - return args -} - -func isFlagArg(arg string) bool { - return ((len(arg) >= 3 && arg[0:2] == "--") || - (len(arg) >= 2 && arg[0] == '-' && arg[1] != '-')) -} - -// Find the target command given the args and command tree -// Meant to be run on the highest node. Only searches down. -func (c *Command) Find(args []string) (*Command, []string, error) { - var innerfind func(*Command, []string) (*Command, []string) - - innerfind = func(c *Command, innerArgs []string) (*Command, []string) { - argsWOflags := stripFlags(innerArgs, c) - if len(argsWOflags) == 0 { - return c, innerArgs - } - nextSubCmd := argsWOflags[0] - - cmd := c.findNext(nextSubCmd) - if cmd != nil { - return innerfind(cmd, c.argsMinusFirstX(innerArgs, nextSubCmd)) - } - return c, innerArgs - } - - commandFound, a := innerfind(c, args) - if commandFound.Args == nil { - return commandFound, a, legacyArgs(commandFound, stripFlags(a, commandFound)) - } - return commandFound, a, nil -} - -func (c *Command) findSuggestions(arg string) string { - if c.DisableSuggestions { - return "" - } - if c.SuggestionsMinimumDistance <= 0 { - c.SuggestionsMinimumDistance = 2 - } - suggestionsString := "" - if suggestions := c.SuggestionsFor(arg); len(suggestions) > 0 { - suggestionsString += "\n\nDid you mean this?\n" - for _, s := range suggestions { - suggestionsString += fmt.Sprintf("\t%v\n", s) - } - } - return suggestionsString -} - -func (c *Command) findNext(next string) *Command { - matches := make([]*Command, 0) - for _, cmd := range c.commands { - if commandNameMatches(cmd.Name(), next) || cmd.HasAlias(next) { - cmd.commandCalledAs.name = next - return cmd - } - if EnablePrefixMatching && cmd.hasNameOrAliasPrefix(next) { - matches = append(matches, cmd) - } - } - - if len(matches) == 1 { - // Temporarily disable gosec G602, which produces a false positive. - // See https://github.com/securego/gosec/issues/1005. - return matches[0] // #nosec G602 - } - - return nil -} - -// Traverse the command tree to find the command, and parse args for -// each parent. -func (c *Command) Traverse(args []string) (*Command, []string, error) { - flags := []string{} - inFlag := false - - for i, arg := range args { - switch { - // A long flag with a space separated value - case strings.HasPrefix(arg, "--") && !strings.Contains(arg, "="): - // TODO: this isn't quite right, we should really check ahead for 'true' or 'false' - inFlag = !hasNoOptDefVal(arg[2:], c.Flags()) - flags = append(flags, arg) - continue - // A short flag with a space separated value - case strings.HasPrefix(arg, "-") && !strings.Contains(arg, "=") && len(arg) == 2 && !shortHasNoOptDefVal(arg[1:], c.Flags()): - inFlag = true - flags = append(flags, arg) - continue - // The value for a flag - case inFlag: - inFlag = false - flags = append(flags, arg) - continue - // A flag without a value, or with an `=` separated value - case isFlagArg(arg): - flags = append(flags, arg) - continue - } - - cmd := c.findNext(arg) - if cmd == nil { - return c, args, nil - } - - if err := c.ParseFlags(flags); err != nil { - return nil, args, err - } - return cmd.Traverse(args[i+1:]) - } - return c, args, nil -} - -// SuggestionsFor provides suggestions for the typedName. -func (c *Command) SuggestionsFor(typedName string) []string { - suggestions := []string{} - for _, cmd := range c.commands { - if cmd.IsAvailableCommand() { - levenshteinDistance := ld(typedName, cmd.Name(), true) - suggestByLevenshtein := levenshteinDistance <= c.SuggestionsMinimumDistance - suggestByPrefix := strings.HasPrefix(strings.ToLower(cmd.Name()), strings.ToLower(typedName)) - if suggestByLevenshtein || suggestByPrefix { - suggestions = append(suggestions, cmd.Name()) - } - for _, explicitSuggestion := range cmd.SuggestFor { - if strings.EqualFold(typedName, explicitSuggestion) { - suggestions = append(suggestions, cmd.Name()) - } - } - } - } - return suggestions -} - -// VisitParents visits all parents of the command and invokes fn on each parent. -func (c *Command) VisitParents(fn func(*Command)) { - if c.HasParent() { - fn(c.Parent()) - c.Parent().VisitParents(fn) - } -} - -// Root finds root command. -func (c *Command) Root() *Command { - if c.HasParent() { - return c.Parent().Root() - } - return c -} - -// ArgsLenAtDash will return the length of c.Flags().Args at the moment -// when a -- was found during args parsing. -func (c *Command) ArgsLenAtDash() int { - return c.Flags().ArgsLenAtDash() -} - -func (c *Command) execute(a []string) (err error) { - if c == nil { - return fmt.Errorf("Called Execute() on a nil Command") - } - - if len(c.Deprecated) > 0 { - c.Printf("Command %q is deprecated, %s\n", c.Name(), c.Deprecated) - } - - // initialize help and version flag at the last point possible to allow for user - // overriding - c.InitDefaultHelpFlag() - c.InitDefaultVersionFlag() - - err = c.ParseFlags(a) - if err != nil { - return c.FlagErrorFunc()(c, err) - } - - // If help is called, regardless of other flags, return we want help. - // Also say we need help if the command isn't runnable. - helpVal, err := c.Flags().GetBool("help") - if err != nil { - // should be impossible to get here as we always declare a help - // flag in InitDefaultHelpFlag() - c.Println("\"help\" flag declared as non-bool. Please correct your code") - return err - } - - if helpVal { - return flag.ErrHelp - } - - // for back-compat, only add version flag behavior if version is defined - if c.Version != "" { - versionVal, err := c.Flags().GetBool("version") - if err != nil { - c.Println("\"version\" flag declared as non-bool. Please correct your code") - return err - } - if versionVal { - err := tmpl(c.OutOrStdout(), c.VersionTemplate(), c) - if err != nil { - c.Println(err) - } - return err - } - } - - if !c.Runnable() { - return flag.ErrHelp - } - - c.preRun() - - defer c.postRun() - - argWoFlags := c.Flags().Args() - if c.DisableFlagParsing { - argWoFlags = a - } - - if err := c.ValidateArgs(argWoFlags); err != nil { - return err - } - - parents := make([]*Command, 0, 5) - for p := c; p != nil; p = p.Parent() { - if EnableTraverseRunHooks { - // When EnableTraverseRunHooks is set: - // - Execute all persistent pre-runs from the root parent till this command. - // - Execute all persistent post-runs from this command till the root parent. - parents = append([]*Command{p}, parents...) - } else { - // Otherwise, execute only the first found persistent hook. - parents = append(parents, p) - } - } - for _, p := range parents { - if p.PersistentPreRunE != nil { - if err := p.PersistentPreRunE(c, argWoFlags); err != nil { - return err - } - if !EnableTraverseRunHooks { - break - } - } else if p.PersistentPreRun != nil { - p.PersistentPreRun(c, argWoFlags) - if !EnableTraverseRunHooks { - break - } - } - } - if c.PreRunE != nil { - if err := c.PreRunE(c, argWoFlags); err != nil { - return err - } - } else if c.PreRun != nil { - c.PreRun(c, argWoFlags) - } - - if err := c.ValidateRequiredFlags(); err != nil { - return err - } - if err := c.ValidateFlagGroups(); err != nil { - return err - } - - if c.RunE != nil { - if err := c.RunE(c, argWoFlags); err != nil { - return err - } - } else { - c.Run(c, argWoFlags) - } - if c.PostRunE != nil { - if err := c.PostRunE(c, argWoFlags); err != nil { - return err - } - } else if c.PostRun != nil { - c.PostRun(c, argWoFlags) - } - for p := c; p != nil; p = p.Parent() { - if p.PersistentPostRunE != nil { - if err := p.PersistentPostRunE(c, argWoFlags); err != nil { - return err - } - if !EnableTraverseRunHooks { - break - } - } else if p.PersistentPostRun != nil { - p.PersistentPostRun(c, argWoFlags) - if !EnableTraverseRunHooks { - break - } - } - } - - return nil -} - -func (c *Command) preRun() { - for _, x := range initializers { - x() - } -} - -func (c *Command) postRun() { - for _, x := range finalizers { - x() - } -} - -// ExecuteContext is the same as Execute(), but sets the ctx on the command. -// Retrieve ctx by calling cmd.Context() inside your *Run lifecycle or ValidArgs -// functions. -func (c *Command) ExecuteContext(ctx context.Context) error { - c.ctx = ctx - return c.Execute() -} - -// Execute uses the args (os.Args[1:] by default) -// and run through the command tree finding appropriate matches -// for commands and then corresponding flags. -func (c *Command) Execute() error { - _, err := c.ExecuteC() - return err -} - -// ExecuteContextC is the same as ExecuteC(), but sets the ctx on the command. -// Retrieve ctx by calling cmd.Context() inside your *Run lifecycle or ValidArgs -// functions. -func (c *Command) ExecuteContextC(ctx context.Context) (*Command, error) { - c.ctx = ctx - return c.ExecuteC() -} - -// ExecuteC executes the command. -func (c *Command) ExecuteC() (cmd *Command, err error) { - if c.ctx == nil { - c.ctx = context.Background() - } - - // Regardless of what command execute is called on, run on Root only - if c.HasParent() { - return c.Root().ExecuteC() - } - - // windows hook - if preExecHookFn != nil { - preExecHookFn(c) - } - - // initialize help at the last point to allow for user overriding - c.InitDefaultHelpCmd() - // initialize completion at the last point to allow for user overriding - c.InitDefaultCompletionCmd() - - // Now that all commands have been created, let's make sure all groups - // are properly created also - c.checkCommandGroups() - - args := c.args - - // Workaround FAIL with "go test -v" or "cobra.test -test.v", see #155 - if c.args == nil && filepath.Base(os.Args[0]) != "cobra.test" { - args = os.Args[1:] - } - - // initialize the hidden command to be used for shell completion - c.initCompleteCmd(args) - - var flags []string - if c.TraverseChildren { - cmd, flags, err = c.Traverse(args) - } else { - cmd, flags, err = c.Find(args) - } - if err != nil { - // If found parse to a subcommand and then failed, talk about the subcommand - if cmd != nil { - c = cmd - } - if !c.SilenceErrors { - c.PrintErrln(c.ErrPrefix(), err.Error()) - c.PrintErrf("Run '%v --help' for usage.\n", c.CommandPath()) - } - return c, err - } - - cmd.commandCalledAs.called = true - if cmd.commandCalledAs.name == "" { - cmd.commandCalledAs.name = cmd.Name() - } - - // We have to pass global context to children command - // if context is present on the parent command. - if cmd.ctx == nil { - cmd.ctx = c.ctx - } - - err = cmd.execute(flags) - if err != nil { - // Always show help if requested, even if SilenceErrors is in - // effect - if errors.Is(err, flag.ErrHelp) { - cmd.HelpFunc()(cmd, args) - return cmd, nil - } - - // If root command has SilenceErrors flagged, - // all subcommands should respect it - if !cmd.SilenceErrors && !c.SilenceErrors { - c.PrintErrln(cmd.ErrPrefix(), err.Error()) - } - - // If root command has SilenceUsage flagged, - // all subcommands should respect it - if !cmd.SilenceUsage && !c.SilenceUsage { - c.Println(cmd.UsageString()) - } - } - return cmd, err -} - -func (c *Command) ValidateArgs(args []string) error { - if c.Args == nil { - return ArbitraryArgs(c, args) - } - return c.Args(c, args) -} - -// ValidateRequiredFlags validates all required flags are present and returns an error otherwise -func (c *Command) ValidateRequiredFlags() error { - if c.DisableFlagParsing { - return nil - } - - flags := c.Flags() - missingFlagNames := []string{} - flags.VisitAll(func(pflag *flag.Flag) { - requiredAnnotation, found := pflag.Annotations[BashCompOneRequiredFlag] - if !found { - return - } - if (requiredAnnotation[0] == "true") && !pflag.Changed { - missingFlagNames = append(missingFlagNames, pflag.Name) - } - }) - - if len(missingFlagNames) > 0 { - return fmt.Errorf(`required flag(s) "%s" not set`, strings.Join(missingFlagNames, `", "`)) - } - return nil -} - -// checkCommandGroups checks if a command has been added to a group that does not exists. -// If so, we panic because it indicates a coding error that should be corrected. -func (c *Command) checkCommandGroups() { - for _, sub := range c.commands { - // if Group is not defined let the developer know right away - if sub.GroupID != "" && !c.ContainsGroup(sub.GroupID) { - panic(fmt.Sprintf("group id '%s' is not defined for subcommand '%s'", sub.GroupID, sub.CommandPath())) - } - - sub.checkCommandGroups() - } -} - -// InitDefaultHelpFlag adds default help flag to c. -// It is called automatically by executing the c or by calling help and usage. -// If c already has help flag, it will do nothing. -func (c *Command) InitDefaultHelpFlag() { - c.mergePersistentFlags() - if c.Flags().Lookup("help") == nil { - usage := "help for " - if c.Name() == "" { - usage += "this command" - } else { - usage += c.Name() - } - c.Flags().BoolP("help", "h", false, usage) - _ = c.Flags().SetAnnotation("help", FlagSetByCobraAnnotation, []string{"true"}) - } -} - -// InitDefaultVersionFlag adds default version flag to c. -// It is called automatically by executing the c. -// If c already has a version flag, it will do nothing. -// If c.Version is empty, it will do nothing. -func (c *Command) InitDefaultVersionFlag() { - if c.Version == "" { - return - } - - c.mergePersistentFlags() - if c.Flags().Lookup("version") == nil { - usage := "version for " - if c.Name() == "" { - usage += "this command" - } else { - usage += c.Name() - } - if c.Flags().ShorthandLookup("v") == nil { - c.Flags().BoolP("version", "v", false, usage) - } else { - c.Flags().Bool("version", false, usage) - } - _ = c.Flags().SetAnnotation("version", FlagSetByCobraAnnotation, []string{"true"}) - } -} - -// InitDefaultHelpCmd adds default help command to c. -// It is called automatically by executing the c or by calling help and usage. -// If c already has help command or c has no subcommands, it will do nothing. -func (c *Command) InitDefaultHelpCmd() { - if !c.HasSubCommands() { - return - } - - if c.helpCommand == nil { - c.helpCommand = &Command{ - Use: "help [command]", - Short: "Help about any command", - Long: `Help provides help for any command in the application. -Simply type ` + c.Name() + ` help [path to command] for full details.`, - ValidArgsFunction: func(c *Command, args []string, toComplete string) ([]string, ShellCompDirective) { - var completions []string - cmd, _, e := c.Root().Find(args) - if e != nil { - return nil, ShellCompDirectiveNoFileComp - } - if cmd == nil { - // Root help command. - cmd = c.Root() - } - for _, subCmd := range cmd.Commands() { - if subCmd.IsAvailableCommand() || subCmd == cmd.helpCommand { - if strings.HasPrefix(subCmd.Name(), toComplete) { - completions = append(completions, fmt.Sprintf("%s\t%s", subCmd.Name(), subCmd.Short)) - } - } - } - return completions, ShellCompDirectiveNoFileComp - }, - Run: func(c *Command, args []string) { - cmd, _, e := c.Root().Find(args) - if cmd == nil || e != nil { - c.Printf("Unknown help topic %#q\n", args) - CheckErr(c.Root().Usage()) - } else { - cmd.InitDefaultHelpFlag() // make possible 'help' flag to be shown - cmd.InitDefaultVersionFlag() // make possible 'version' flag to be shown - CheckErr(cmd.Help()) - } - }, - GroupID: c.helpCommandGroupID, - } - } - c.RemoveCommand(c.helpCommand) - c.AddCommand(c.helpCommand) -} - -// ResetCommands delete parent, subcommand and help command from c. -func (c *Command) ResetCommands() { - c.parent = nil - c.commands = nil - c.helpCommand = nil - c.parentsPflags = nil -} - -// Sorts commands by their names. -type commandSorterByName []*Command - -func (c commandSorterByName) Len() int { return len(c) } -func (c commandSorterByName) Swap(i, j int) { c[i], c[j] = c[j], c[i] } -func (c commandSorterByName) Less(i, j int) bool { return c[i].Name() < c[j].Name() } - -// Commands returns a sorted slice of child commands. -func (c *Command) Commands() []*Command { - // do not sort commands if it already sorted or sorting was disabled - if EnableCommandSorting && !c.commandsAreSorted { - sort.Sort(commandSorterByName(c.commands)) - c.commandsAreSorted = true - } - return c.commands -} - -// AddCommand adds one or more commands to this parent command. -func (c *Command) AddCommand(cmds ...*Command) { - for i, x := range cmds { - if cmds[i] == c { - panic("Command can't be a child of itself") - } - cmds[i].parent = c - // update max lengths - usageLen := len(x.Use) - if usageLen > c.commandsMaxUseLen { - c.commandsMaxUseLen = usageLen - } - commandPathLen := len(x.CommandPath()) - if commandPathLen > c.commandsMaxCommandPathLen { - c.commandsMaxCommandPathLen = commandPathLen - } - nameLen := len(x.Name()) - if nameLen > c.commandsMaxNameLen { - c.commandsMaxNameLen = nameLen - } - // If global normalization function exists, update all children - if c.globNormFunc != nil { - x.SetGlobalNormalizationFunc(c.globNormFunc) - } - c.commands = append(c.commands, x) - c.commandsAreSorted = false - } -} - -// Groups returns a slice of child command groups. -func (c *Command) Groups() []*Group { - return c.commandgroups -} - -// AllChildCommandsHaveGroup returns if all subcommands are assigned to a group -func (c *Command) AllChildCommandsHaveGroup() bool { - for _, sub := range c.commands { - if (sub.IsAvailableCommand() || sub == c.helpCommand) && sub.GroupID == "" { - return false - } - } - return true -} - -// ContainsGroup return if groupID exists in the list of command groups. -func (c *Command) ContainsGroup(groupID string) bool { - for _, x := range c.commandgroups { - if x.ID == groupID { - return true - } - } - return false -} - -// AddGroup adds one or more command groups to this parent command. -func (c *Command) AddGroup(groups ...*Group) { - c.commandgroups = append(c.commandgroups, groups...) -} - -// RemoveCommand removes one or more commands from a parent command. -func (c *Command) RemoveCommand(cmds ...*Command) { - commands := []*Command{} -main: - for _, command := range c.commands { - for _, cmd := range cmds { - if command == cmd { - command.parent = nil - continue main - } - } - commands = append(commands, command) - } - c.commands = commands - // recompute all lengths - c.commandsMaxUseLen = 0 - c.commandsMaxCommandPathLen = 0 - c.commandsMaxNameLen = 0 - for _, command := range c.commands { - usageLen := len(command.Use) - if usageLen > c.commandsMaxUseLen { - c.commandsMaxUseLen = usageLen - } - commandPathLen := len(command.CommandPath()) - if commandPathLen > c.commandsMaxCommandPathLen { - c.commandsMaxCommandPathLen = commandPathLen - } - nameLen := len(command.Name()) - if nameLen > c.commandsMaxNameLen { - c.commandsMaxNameLen = nameLen - } - } -} - -// Print is a convenience method to Print to the defined output, fallback to Stderr if not set. -func (c *Command) Print(i ...interface{}) { - fmt.Fprint(c.OutOrStderr(), i...) -} - -// Println is a convenience method to Println to the defined output, fallback to Stderr if not set. -func (c *Command) Println(i ...interface{}) { - c.Print(fmt.Sprintln(i...)) -} - -// Printf is a convenience method to Printf to the defined output, fallback to Stderr if not set. -func (c *Command) Printf(format string, i ...interface{}) { - c.Print(fmt.Sprintf(format, i...)) -} - -// PrintErr is a convenience method to Print to the defined Err output, fallback to Stderr if not set. -func (c *Command) PrintErr(i ...interface{}) { - fmt.Fprint(c.ErrOrStderr(), i...) -} - -// PrintErrln is a convenience method to Println to the defined Err output, fallback to Stderr if not set. -func (c *Command) PrintErrln(i ...interface{}) { - c.PrintErr(fmt.Sprintln(i...)) -} - -// PrintErrf is a convenience method to Printf to the defined Err output, fallback to Stderr if not set. -func (c *Command) PrintErrf(format string, i ...interface{}) { - c.PrintErr(fmt.Sprintf(format, i...)) -} - -// CommandPath returns the full path to this command. -func (c *Command) CommandPath() string { - if c.HasParent() { - return c.Parent().CommandPath() + " " + c.Name() - } - if displayName, ok := c.Annotations[CommandDisplayNameAnnotation]; ok { - return displayName - } - return c.Name() -} - -// UseLine puts out the full usage for a given command (including parents). -func (c *Command) UseLine() string { - var useline string - if c.HasParent() { - useline = c.parent.CommandPath() + " " + c.Use - } else { - useline = c.Use - } - if c.DisableFlagsInUseLine { - return useline - } - if c.HasAvailableFlags() && !strings.Contains(useline, "[flags]") { - useline += " [flags]" - } - return useline -} - -// DebugFlags used to determine which flags have been assigned to which commands -// and which persist. -// nolint:goconst -func (c *Command) DebugFlags() { - c.Println("DebugFlags called on", c.Name()) - var debugflags func(*Command) - - debugflags = func(x *Command) { - if x.HasFlags() || x.HasPersistentFlags() { - c.Println(x.Name()) - } - if x.HasFlags() { - x.flags.VisitAll(func(f *flag.Flag) { - if x.HasPersistentFlags() && x.persistentFlag(f.Name) != nil { - c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [LP]") - } else { - c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [L]") - } - }) - } - if x.HasPersistentFlags() { - x.pflags.VisitAll(func(f *flag.Flag) { - if x.HasFlags() { - if x.flags.Lookup(f.Name) == nil { - c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [P]") - } - } else { - c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [P]") - } - }) - } - c.Println(x.flagErrorBuf) - if x.HasSubCommands() { - for _, y := range x.commands { - debugflags(y) - } - } - } - - debugflags(c) -} - -// Name returns the command's name: the first word in the use line. -func (c *Command) Name() string { - name := c.Use - i := strings.Index(name, " ") - if i >= 0 { - name = name[:i] - } - return name -} - -// HasAlias determines if a given string is an alias of the command. -func (c *Command) HasAlias(s string) bool { - for _, a := range c.Aliases { - if commandNameMatches(a, s) { - return true - } - } - return false -} - -// CalledAs returns the command name or alias that was used to invoke -// this command or an empty string if the command has not been called. -func (c *Command) CalledAs() string { - if c.commandCalledAs.called { - return c.commandCalledAs.name - } - return "" -} - -// hasNameOrAliasPrefix returns true if the Name or any of aliases start -// with prefix -func (c *Command) hasNameOrAliasPrefix(prefix string) bool { - if strings.HasPrefix(c.Name(), prefix) { - c.commandCalledAs.name = c.Name() - return true - } - for _, alias := range c.Aliases { - if strings.HasPrefix(alias, prefix) { - c.commandCalledAs.name = alias - return true - } - } - return false -} - -// NameAndAliases returns a list of the command name and all aliases -func (c *Command) NameAndAliases() string { - return strings.Join(append([]string{c.Name()}, c.Aliases...), ", ") -} - -// HasExample determines if the command has example. -func (c *Command) HasExample() bool { - return len(c.Example) > 0 -} - -// Runnable determines if the command is itself runnable. -func (c *Command) Runnable() bool { - return c.Run != nil || c.RunE != nil -} - -// HasSubCommands determines if the command has children commands. -func (c *Command) HasSubCommands() bool { - return len(c.commands) > 0 -} - -// IsAvailableCommand determines if a command is available as a non-help command -// (this includes all non deprecated/hidden commands). -func (c *Command) IsAvailableCommand() bool { - if len(c.Deprecated) != 0 || c.Hidden { - return false - } - - if c.HasParent() && c.Parent().helpCommand == c { - return false - } - - if c.Runnable() || c.HasAvailableSubCommands() { - return true - } - - return false -} - -// IsAdditionalHelpTopicCommand determines if a command is an additional -// help topic command; additional help topic command is determined by the -// fact that it is NOT runnable/hidden/deprecated, and has no sub commands that -// are runnable/hidden/deprecated. -// Concrete example: https://github.com/spf13/cobra/issues/393#issuecomment-282741924. -func (c *Command) IsAdditionalHelpTopicCommand() bool { - // if a command is runnable, deprecated, or hidden it is not a 'help' command - if c.Runnable() || len(c.Deprecated) != 0 || c.Hidden { - return false - } - - // if any non-help sub commands are found, the command is not a 'help' command - for _, sub := range c.commands { - if !sub.IsAdditionalHelpTopicCommand() { - return false - } - } - - // the command either has no sub commands, or no non-help sub commands - return true -} - -// HasHelpSubCommands determines if a command has any available 'help' sub commands -// that need to be shown in the usage/help default template under 'additional help -// topics'. -func (c *Command) HasHelpSubCommands() bool { - // return true on the first found available 'help' sub command - for _, sub := range c.commands { - if sub.IsAdditionalHelpTopicCommand() { - return true - } - } - - // the command either has no sub commands, or no available 'help' sub commands - return false -} - -// HasAvailableSubCommands determines if a command has available sub commands that -// need to be shown in the usage/help default template under 'available commands'. -func (c *Command) HasAvailableSubCommands() bool { - // return true on the first found available (non deprecated/help/hidden) - // sub command - for _, sub := range c.commands { - if sub.IsAvailableCommand() { - return true - } - } - - // the command either has no sub commands, or no available (non deprecated/help/hidden) - // sub commands - return false -} - -// HasParent determines if the command is a child command. -func (c *Command) HasParent() bool { - return c.parent != nil -} - -// GlobalNormalizationFunc returns the global normalization function or nil if it doesn't exist. -func (c *Command) GlobalNormalizationFunc() func(f *flag.FlagSet, name string) flag.NormalizedName { - return c.globNormFunc -} - -// Flags returns the complete FlagSet that applies -// to this command (local and persistent declared here and by all parents). -func (c *Command) Flags() *flag.FlagSet { - if c.flags == nil { - c.flags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - if c.flagErrorBuf == nil { - c.flagErrorBuf = new(bytes.Buffer) - } - c.flags.SetOutput(c.flagErrorBuf) - } - - return c.flags -} - -// LocalNonPersistentFlags are flags specific to this command which will NOT persist to subcommands. -func (c *Command) LocalNonPersistentFlags() *flag.FlagSet { - persistentFlags := c.PersistentFlags() - - out := flag.NewFlagSet(c.Name(), flag.ContinueOnError) - c.LocalFlags().VisitAll(func(f *flag.Flag) { - if persistentFlags.Lookup(f.Name) == nil { - out.AddFlag(f) - } - }) - return out -} - -// LocalFlags returns the local FlagSet specifically set in the current command. -func (c *Command) LocalFlags() *flag.FlagSet { - c.mergePersistentFlags() - - if c.lflags == nil { - c.lflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - if c.flagErrorBuf == nil { - c.flagErrorBuf = new(bytes.Buffer) - } - c.lflags.SetOutput(c.flagErrorBuf) - } - c.lflags.SortFlags = c.Flags().SortFlags - if c.globNormFunc != nil { - c.lflags.SetNormalizeFunc(c.globNormFunc) - } - - addToLocal := func(f *flag.Flag) { - // Add the flag if it is not a parent PFlag, or it shadows a parent PFlag - if c.lflags.Lookup(f.Name) == nil && f != c.parentsPflags.Lookup(f.Name) { - c.lflags.AddFlag(f) - } - } - c.Flags().VisitAll(addToLocal) - c.PersistentFlags().VisitAll(addToLocal) - return c.lflags -} - -// InheritedFlags returns all flags which were inherited from parent commands. -func (c *Command) InheritedFlags() *flag.FlagSet { - c.mergePersistentFlags() - - if c.iflags == nil { - c.iflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - if c.flagErrorBuf == nil { - c.flagErrorBuf = new(bytes.Buffer) - } - c.iflags.SetOutput(c.flagErrorBuf) - } - - local := c.LocalFlags() - if c.globNormFunc != nil { - c.iflags.SetNormalizeFunc(c.globNormFunc) - } - - c.parentsPflags.VisitAll(func(f *flag.Flag) { - if c.iflags.Lookup(f.Name) == nil && local.Lookup(f.Name) == nil { - c.iflags.AddFlag(f) - } - }) - return c.iflags -} - -// NonInheritedFlags returns all flags which were not inherited from parent commands. -func (c *Command) NonInheritedFlags() *flag.FlagSet { - return c.LocalFlags() -} - -// PersistentFlags returns the persistent FlagSet specifically set in the current command. -func (c *Command) PersistentFlags() *flag.FlagSet { - if c.pflags == nil { - c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - if c.flagErrorBuf == nil { - c.flagErrorBuf = new(bytes.Buffer) - } - c.pflags.SetOutput(c.flagErrorBuf) - } - return c.pflags -} - -// ResetFlags deletes all flags from command. -func (c *Command) ResetFlags() { - c.flagErrorBuf = new(bytes.Buffer) - c.flagErrorBuf.Reset() - c.flags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - c.flags.SetOutput(c.flagErrorBuf) - c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - c.pflags.SetOutput(c.flagErrorBuf) - - c.lflags = nil - c.iflags = nil - c.parentsPflags = nil -} - -// HasFlags checks if the command contains any flags (local plus persistent from the entire structure). -func (c *Command) HasFlags() bool { - return c.Flags().HasFlags() -} - -// HasPersistentFlags checks if the command contains persistent flags. -func (c *Command) HasPersistentFlags() bool { - return c.PersistentFlags().HasFlags() -} - -// HasLocalFlags checks if the command has flags specifically declared locally. -func (c *Command) HasLocalFlags() bool { - return c.LocalFlags().HasFlags() -} - -// HasInheritedFlags checks if the command has flags inherited from its parent command. -func (c *Command) HasInheritedFlags() bool { - return c.InheritedFlags().HasFlags() -} - -// HasAvailableFlags checks if the command contains any flags (local plus persistent from the entire -// structure) which are not hidden or deprecated. -func (c *Command) HasAvailableFlags() bool { - return c.Flags().HasAvailableFlags() -} - -// HasAvailablePersistentFlags checks if the command contains persistent flags which are not hidden or deprecated. -func (c *Command) HasAvailablePersistentFlags() bool { - return c.PersistentFlags().HasAvailableFlags() -} - -// HasAvailableLocalFlags checks if the command has flags specifically declared locally which are not hidden -// or deprecated. -func (c *Command) HasAvailableLocalFlags() bool { - return c.LocalFlags().HasAvailableFlags() -} - -// HasAvailableInheritedFlags checks if the command has flags inherited from its parent command which are -// not hidden or deprecated. -func (c *Command) HasAvailableInheritedFlags() bool { - return c.InheritedFlags().HasAvailableFlags() -} - -// Flag climbs up the command tree looking for matching flag. -func (c *Command) Flag(name string) (flag *flag.Flag) { - flag = c.Flags().Lookup(name) - - if flag == nil { - flag = c.persistentFlag(name) - } - - return -} - -// Recursively find matching persistent flag. -func (c *Command) persistentFlag(name string) (flag *flag.Flag) { - if c.HasPersistentFlags() { - flag = c.PersistentFlags().Lookup(name) - } - - if flag == nil { - c.updateParentsPflags() - flag = c.parentsPflags.Lookup(name) - } - return -} - -// ParseFlags parses persistent flag tree and local flags. -func (c *Command) ParseFlags(args []string) error { - if c.DisableFlagParsing { - return nil - } - - if c.flagErrorBuf == nil { - c.flagErrorBuf = new(bytes.Buffer) - } - beforeErrorBufLen := c.flagErrorBuf.Len() - c.mergePersistentFlags() - - // do it here after merging all flags and just before parse - c.Flags().ParseErrorsWhitelist = flag.ParseErrorsWhitelist(c.FParseErrWhitelist) - - err := c.Flags().Parse(args) - // Print warnings if they occurred (e.g. deprecated flag messages). - if c.flagErrorBuf.Len()-beforeErrorBufLen > 0 && err == nil { - c.Print(c.flagErrorBuf.String()) - } - - return err -} - -// Parent returns a commands parent command. -func (c *Command) Parent() *Command { - return c.parent -} - -// mergePersistentFlags merges c.PersistentFlags() to c.Flags() -// and adds missing persistent flags of all parents. -func (c *Command) mergePersistentFlags() { - c.updateParentsPflags() - c.Flags().AddFlagSet(c.PersistentFlags()) - c.Flags().AddFlagSet(c.parentsPflags) -} - -// updateParentsPflags updates c.parentsPflags by adding -// new persistent flags of all parents. -// If c.parentsPflags == nil, it makes new. -func (c *Command) updateParentsPflags() { - if c.parentsPflags == nil { - c.parentsPflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) - c.parentsPflags.SetOutput(c.flagErrorBuf) - c.parentsPflags.SortFlags = false - } - - if c.globNormFunc != nil { - c.parentsPflags.SetNormalizeFunc(c.globNormFunc) - } - - c.Root().PersistentFlags().AddFlagSet(flag.CommandLine) - - c.VisitParents(func(parent *Command) { - c.parentsPflags.AddFlagSet(parent.PersistentFlags()) - }) -} - -// commandNameMatches checks if two command names are equal -// taking into account case sensitivity according to -// EnableCaseInsensitive global configuration. -func commandNameMatches(s string, t string) bool { - if EnableCaseInsensitive { - return strings.EqualFold(s, t) - } - - return s == t -} diff --git a/vendor/github.com/spf13/cobra/command_notwin.go b/vendor/github.com/spf13/cobra/command_notwin.go deleted file mode 100644 index 307f0c1..0000000 --- a/vendor/github.com/spf13/cobra/command_notwin.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build !windows -// +build !windows - -package cobra - -var preExecHookFn func(*Command) diff --git a/vendor/github.com/spf13/cobra/command_win.go b/vendor/github.com/spf13/cobra/command_win.go deleted file mode 100644 index adbef39..0000000 --- a/vendor/github.com/spf13/cobra/command_win.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build windows -// +build windows - -package cobra - -import ( - "fmt" - "os" - "time" - - "github.com/inconshreveable/mousetrap" -) - -var preExecHookFn = preExecHook - -func preExecHook(c *Command) { - if MousetrapHelpText != "" && mousetrap.StartedByExplorer() { - c.Print(MousetrapHelpText) - if MousetrapDisplayDuration > 0 { - time.Sleep(MousetrapDisplayDuration) - } else { - c.Println("Press return to continue...") - fmt.Scanln() - } - os.Exit(1) - } -} diff --git a/vendor/github.com/spf13/cobra/completions.go b/vendor/github.com/spf13/cobra/completions.go deleted file mode 100644 index b60f6b2..0000000 --- a/vendor/github.com/spf13/cobra/completions.go +++ /dev/null @@ -1,901 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cobra - -import ( - "fmt" - "os" - "strings" - "sync" - - "github.com/spf13/pflag" -) - -const ( - // ShellCompRequestCmd is the name of the hidden command that is used to request - // completion results from the program. It is used by the shell completion scripts. - ShellCompRequestCmd = "__complete" - // ShellCompNoDescRequestCmd is the name of the hidden command that is used to request - // completion results without their description. It is used by the shell completion scripts. - ShellCompNoDescRequestCmd = "__completeNoDesc" -) - -// Global map of flag completion functions. Make sure to use flagCompletionMutex before you try to read and write from it. -var flagCompletionFunctions = map[*pflag.Flag]func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective){} - -// lock for reading and writing from flagCompletionFunctions -var flagCompletionMutex = &sync.RWMutex{} - -// ShellCompDirective is a bit map representing the different behaviors the shell -// can be instructed to have once completions have been provided. -type ShellCompDirective int - -type flagCompError struct { - subCommand string - flagName string -} - -func (e *flagCompError) Error() string { - return "Subcommand '" + e.subCommand + "' does not support flag '" + e.flagName + "'" -} - -const ( - // ShellCompDirectiveError indicates an error occurred and completions should be ignored. - ShellCompDirectiveError ShellCompDirective = 1 << iota - - // ShellCompDirectiveNoSpace indicates that the shell should not add a space - // after the completion even if there is a single completion provided. - ShellCompDirectiveNoSpace - - // ShellCompDirectiveNoFileComp indicates that the shell should not provide - // file completion even when no completion is provided. - ShellCompDirectiveNoFileComp - - // ShellCompDirectiveFilterFileExt indicates that the provided completions - // should be used as file extension filters. - // For flags, using Command.MarkFlagFilename() and Command.MarkPersistentFlagFilename() - // is a shortcut to using this directive explicitly. The BashCompFilenameExt - // annotation can also be used to obtain the same behavior for flags. - ShellCompDirectiveFilterFileExt - - // ShellCompDirectiveFilterDirs indicates that only directory names should - // be provided in file completion. To request directory names within another - // directory, the returned completions should specify the directory within - // which to search. The BashCompSubdirsInDir annotation can be used to - // obtain the same behavior but only for flags. - ShellCompDirectiveFilterDirs - - // ShellCompDirectiveKeepOrder indicates that the shell should preserve the order - // in which the completions are provided - ShellCompDirectiveKeepOrder - - // =========================================================================== - - // All directives using iota should be above this one. - // For internal use. - shellCompDirectiveMaxValue - - // ShellCompDirectiveDefault indicates to let the shell perform its default - // behavior after completions have been provided. - // This one must be last to avoid messing up the iota count. - ShellCompDirectiveDefault ShellCompDirective = 0 -) - -const ( - // Constants for the completion command - compCmdName = "completion" - compCmdNoDescFlagName = "no-descriptions" - compCmdNoDescFlagDesc = "disable completion descriptions" - compCmdNoDescFlagDefault = false -) - -// CompletionOptions are the options to control shell completion -type CompletionOptions struct { - // DisableDefaultCmd prevents Cobra from creating a default 'completion' command - DisableDefaultCmd bool - // DisableNoDescFlag prevents Cobra from creating the '--no-descriptions' flag - // for shells that support completion descriptions - DisableNoDescFlag bool - // DisableDescriptions turns off all completion descriptions for shells - // that support them - DisableDescriptions bool - // HiddenDefaultCmd makes the default 'completion' command hidden - HiddenDefaultCmd bool -} - -// NoFileCompletions can be used to disable file completion for commands that should -// not trigger file completions. -func NoFileCompletions(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) { - return nil, ShellCompDirectiveNoFileComp -} - -// FixedCompletions can be used to create a completion function which always -// returns the same results. -func FixedCompletions(choices []string, directive ShellCompDirective) func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) { - return func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) { - return choices, directive - } -} - -// RegisterFlagCompletionFunc should be called to register a function to provide completion for a flag. -func (c *Command) RegisterFlagCompletionFunc(flagName string, f func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective)) error { - flag := c.Flag(flagName) - if flag == nil { - return fmt.Errorf("RegisterFlagCompletionFunc: flag '%s' does not exist", flagName) - } - flagCompletionMutex.Lock() - defer flagCompletionMutex.Unlock() - - if _, exists := flagCompletionFunctions[flag]; exists { - return fmt.Errorf("RegisterFlagCompletionFunc: flag '%s' already registered", flagName) - } - flagCompletionFunctions[flag] = f - return nil -} - -// GetFlagCompletionFunc returns the completion function for the given flag of the command, if available. -func (c *Command) GetFlagCompletionFunc(flagName string) (func(*Command, []string, string) ([]string, ShellCompDirective), bool) { - flag := c.Flag(flagName) - if flag == nil { - return nil, false - } - - flagCompletionMutex.RLock() - defer flagCompletionMutex.RUnlock() - - completionFunc, exists := flagCompletionFunctions[flag] - return completionFunc, exists -} - -// Returns a string listing the different directive enabled in the specified parameter -func (d ShellCompDirective) string() string { - var directives []string - if d&ShellCompDirectiveError != 0 { - directives = append(directives, "ShellCompDirectiveError") - } - if d&ShellCompDirectiveNoSpace != 0 { - directives = append(directives, "ShellCompDirectiveNoSpace") - } - if d&ShellCompDirectiveNoFileComp != 0 { - directives = append(directives, "ShellCompDirectiveNoFileComp") - } - if d&ShellCompDirectiveFilterFileExt != 0 { - directives = append(directives, "ShellCompDirectiveFilterFileExt") - } - if d&ShellCompDirectiveFilterDirs != 0 { - directives = append(directives, "ShellCompDirectiveFilterDirs") - } - if d&ShellCompDirectiveKeepOrder != 0 { - directives = append(directives, "ShellCompDirectiveKeepOrder") - } - if len(directives) == 0 { - directives = append(directives, "ShellCompDirectiveDefault") - } - - if d >= shellCompDirectiveMaxValue { - return fmt.Sprintf("ERROR: unexpected ShellCompDirective value: %d", d) - } - return strings.Join(directives, ", ") -} - -// initCompleteCmd adds a special hidden command that can be used to request custom completions. -func (c *Command) initCompleteCmd(args []string) { - completeCmd := &Command{ - Use: fmt.Sprintf("%s [command-line]", ShellCompRequestCmd), - Aliases: []string{ShellCompNoDescRequestCmd}, - DisableFlagsInUseLine: true, - Hidden: true, - DisableFlagParsing: true, - Args: MinimumNArgs(1), - Short: "Request shell completion choices for the specified command-line", - Long: fmt.Sprintf("%[2]s is a special command that is used by the shell completion logic\n%[1]s", - "to request completion choices for the specified command-line.", ShellCompRequestCmd), - Run: func(cmd *Command, args []string) { - finalCmd, completions, directive, err := cmd.getCompletions(args) - if err != nil { - CompErrorln(err.Error()) - // Keep going for multiple reasons: - // 1- There could be some valid completions even though there was an error - // 2- Even without completions, we need to print the directive - } - - noDescriptions := (cmd.CalledAs() == ShellCompNoDescRequestCmd) - for _, comp := range completions { - if GetActiveHelpConfig(finalCmd) == activeHelpGlobalDisable { - // Remove all activeHelp entries in this case - if strings.HasPrefix(comp, activeHelpMarker) { - continue - } - } - if noDescriptions { - // Remove any description that may be included following a tab character. - comp = strings.Split(comp, "\t")[0] - } - - // Make sure we only write the first line to the output. - // This is needed if a description contains a linebreak. - // Otherwise the shell scripts will interpret the other lines as new flags - // and could therefore provide a wrong completion. - comp = strings.Split(comp, "\n")[0] - - // Finally trim the completion. This is especially important to get rid - // of a trailing tab when there are no description following it. - // For example, a sub-command without a description should not be completed - // with a tab at the end (or else zsh will show a -- following it - // although there is no description). - comp = strings.TrimSpace(comp) - - // Print each possible completion to stdout for the completion script to consume. - fmt.Fprintln(finalCmd.OutOrStdout(), comp) - } - - // As the last printout, print the completion directive for the completion script to parse. - // The directive integer must be that last character following a single colon (:). - // The completion script expects : - fmt.Fprintf(finalCmd.OutOrStdout(), ":%d\n", directive) - - // Print some helpful info to stderr for the user to understand. - // Output from stderr must be ignored by the completion script. - fmt.Fprintf(finalCmd.ErrOrStderr(), "Completion ended with directive: %s\n", directive.string()) - }, - } - c.AddCommand(completeCmd) - subCmd, _, err := c.Find(args) - if err != nil || subCmd.Name() != ShellCompRequestCmd { - // Only create this special command if it is actually being called. - // This reduces possible side-effects of creating such a command; - // for example, having this command would cause problems to a - // cobra program that only consists of the root command, since this - // command would cause the root command to suddenly have a subcommand. - c.RemoveCommand(completeCmd) - } -} - -func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDirective, error) { - // The last argument, which is not completely typed by the user, - // should not be part of the list of arguments - toComplete := args[len(args)-1] - trimmedArgs := args[:len(args)-1] - - var finalCmd *Command - var finalArgs []string - var err error - // Find the real command for which completion must be performed - // check if we need to traverse here to parse local flags on parent commands - if c.Root().TraverseChildren { - finalCmd, finalArgs, err = c.Root().Traverse(trimmedArgs) - } else { - // For Root commands that don't specify any value for their Args fields, when we call - // Find(), if those Root commands don't have any sub-commands, they will accept arguments. - // However, because we have added the __complete sub-command in the current code path, the - // call to Find() -> legacyArgs() will return an error if there are any arguments. - // To avoid this, we first remove the __complete command to get back to having no sub-commands. - rootCmd := c.Root() - if len(rootCmd.Commands()) == 1 { - rootCmd.RemoveCommand(c) - } - - finalCmd, finalArgs, err = rootCmd.Find(trimmedArgs) - } - if err != nil { - // Unable to find the real command. E.g., someInvalidCmd - return c, []string{}, ShellCompDirectiveDefault, fmt.Errorf("Unable to find a command for arguments: %v", trimmedArgs) - } - finalCmd.ctx = c.ctx - - // These flags are normally added when `execute()` is called on `finalCmd`, - // however, when doing completion, we don't call `finalCmd.execute()`. - // Let's add the --help and --version flag ourselves but only if the finalCmd - // has not disabled flag parsing; if flag parsing is disabled, it is up to the - // finalCmd itself to handle the completion of *all* flags. - if !finalCmd.DisableFlagParsing { - finalCmd.InitDefaultHelpFlag() - finalCmd.InitDefaultVersionFlag() - } - - // Check if we are doing flag value completion before parsing the flags. - // This is important because if we are completing a flag value, we need to also - // remove the flag name argument from the list of finalArgs or else the parsing - // could fail due to an invalid value (incomplete) for the flag. - flag, finalArgs, toComplete, flagErr := checkIfFlagCompletion(finalCmd, finalArgs, toComplete) - - // Check if interspersed is false or -- was set on a previous arg. - // This works by counting the arguments. Normally -- is not counted as arg but - // if -- was already set or interspersed is false and there is already one arg then - // the extra added -- is counted as arg. - flagCompletion := true - _ = finalCmd.ParseFlags(append(finalArgs, "--")) - newArgCount := finalCmd.Flags().NArg() - - // Parse the flags early so we can check if required flags are set - if err = finalCmd.ParseFlags(finalArgs); err != nil { - return finalCmd, []string{}, ShellCompDirectiveDefault, fmt.Errorf("Error while parsing flags from args %v: %s", finalArgs, err.Error()) - } - - realArgCount := finalCmd.Flags().NArg() - if newArgCount > realArgCount { - // don't do flag completion (see above) - flagCompletion = false - } - // Error while attempting to parse flags - if flagErr != nil { - // If error type is flagCompError and we don't want flagCompletion we should ignore the error - if _, ok := flagErr.(*flagCompError); !(ok && !flagCompletion) { - return finalCmd, []string{}, ShellCompDirectiveDefault, flagErr - } - } - - // Look for the --help or --version flags. If they are present, - // there should be no further completions. - if helpOrVersionFlagPresent(finalCmd) { - return finalCmd, []string{}, ShellCompDirectiveNoFileComp, nil - } - - // We only remove the flags from the arguments if DisableFlagParsing is not set. - // This is important for commands which have requested to do their own flag completion. - if !finalCmd.DisableFlagParsing { - finalArgs = finalCmd.Flags().Args() - } - - if flag != nil && flagCompletion { - // Check if we are completing a flag value subject to annotations - if validExts, present := flag.Annotations[BashCompFilenameExt]; present { - if len(validExts) != 0 { - // File completion filtered by extensions - return finalCmd, validExts, ShellCompDirectiveFilterFileExt, nil - } - - // The annotation requests simple file completion. There is no reason to do - // that since it is the default behavior anyway. Let's ignore this annotation - // in case the program also registered a completion function for this flag. - // Even though it is a mistake on the program's side, let's be nice when we can. - } - - if subDir, present := flag.Annotations[BashCompSubdirsInDir]; present { - if len(subDir) == 1 { - // Directory completion from within a directory - return finalCmd, subDir, ShellCompDirectiveFilterDirs, nil - } - // Directory completion - return finalCmd, []string{}, ShellCompDirectiveFilterDirs, nil - } - } - - var completions []string - var directive ShellCompDirective - - // Enforce flag groups before doing flag completions - finalCmd.enforceFlagGroupsForCompletion() - - // Note that we want to perform flagname completion even if finalCmd.DisableFlagParsing==true; - // doing this allows for completion of persistent flag names even for commands that disable flag parsing. - // - // When doing completion of a flag name, as soon as an argument starts with - // a '-' we know it is a flag. We cannot use isFlagArg() here as it requires - // the flag name to be complete - if flag == nil && len(toComplete) > 0 && toComplete[0] == '-' && !strings.Contains(toComplete, "=") && flagCompletion { - // First check for required flags - completions = completeRequireFlags(finalCmd, toComplete) - - // If we have not found any required flags, only then can we show regular flags - if len(completions) == 0 { - doCompleteFlags := func(flag *pflag.Flag) { - if !flag.Changed || - strings.Contains(flag.Value.Type(), "Slice") || - strings.Contains(flag.Value.Type(), "Array") { - // If the flag is not already present, or if it can be specified multiple times (Array or Slice) - // we suggest it as a completion - completions = append(completions, getFlagNameCompletions(flag, toComplete)...) - } - } - - // We cannot use finalCmd.Flags() because we may not have called ParsedFlags() for commands - // that have set DisableFlagParsing; it is ParseFlags() that merges the inherited and - // non-inherited flags. - finalCmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) { - doCompleteFlags(flag) - }) - // Try to complete non-inherited flags even if DisableFlagParsing==true. - // This allows programs to tell Cobra about flags for completion even - // if the actual parsing of flags is not done by Cobra. - // For instance, Helm uses this to provide flag name completion for - // some of its plugins. - finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { - doCompleteFlags(flag) - }) - } - - directive = ShellCompDirectiveNoFileComp - if len(completions) == 1 && strings.HasSuffix(completions[0], "=") { - // If there is a single completion, the shell usually adds a space - // after the completion. We don't want that if the flag ends with an = - directive = ShellCompDirectiveNoSpace - } - - if !finalCmd.DisableFlagParsing { - // If DisableFlagParsing==false, we have completed the flags as known by Cobra; - // we can return what we found. - // If DisableFlagParsing==true, Cobra may not be aware of all flags, so we - // let the logic continue to see if ValidArgsFunction needs to be called. - return finalCmd, completions, directive, nil - } - } else { - directive = ShellCompDirectiveDefault - if flag == nil { - foundLocalNonPersistentFlag := false - // If TraverseChildren is true on the root command we don't check for - // local flags because we can use a local flag on a parent command - if !finalCmd.Root().TraverseChildren { - // Check if there are any local, non-persistent flags on the command-line - localNonPersistentFlags := finalCmd.LocalNonPersistentFlags() - finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { - if localNonPersistentFlags.Lookup(flag.Name) != nil && flag.Changed { - foundLocalNonPersistentFlag = true - } - }) - } - - // Complete subcommand names, including the help command - if len(finalArgs) == 0 && !foundLocalNonPersistentFlag { - // We only complete sub-commands if: - // - there are no arguments on the command-line and - // - there are no local, non-persistent flags on the command-line or TraverseChildren is true - for _, subCmd := range finalCmd.Commands() { - if subCmd.IsAvailableCommand() || subCmd == finalCmd.helpCommand { - if strings.HasPrefix(subCmd.Name(), toComplete) { - completions = append(completions, fmt.Sprintf("%s\t%s", subCmd.Name(), subCmd.Short)) - } - directive = ShellCompDirectiveNoFileComp - } - } - } - - // Complete required flags even without the '-' prefix - completions = append(completions, completeRequireFlags(finalCmd, toComplete)...) - - // Always complete ValidArgs, even if we are completing a subcommand name. - // This is for commands that have both subcommands and ValidArgs. - if len(finalCmd.ValidArgs) > 0 { - if len(finalArgs) == 0 { - // ValidArgs are only for the first argument - for _, validArg := range finalCmd.ValidArgs { - if strings.HasPrefix(validArg, toComplete) { - completions = append(completions, validArg) - } - } - directive = ShellCompDirectiveNoFileComp - - // If no completions were found within commands or ValidArgs, - // see if there are any ArgAliases that should be completed. - if len(completions) == 0 { - for _, argAlias := range finalCmd.ArgAliases { - if strings.HasPrefix(argAlias, toComplete) { - completions = append(completions, argAlias) - } - } - } - } - - // If there are ValidArgs specified (even if they don't match), we stop completion. - // Only one of ValidArgs or ValidArgsFunction can be used for a single command. - return finalCmd, completions, directive, nil - } - - // Let the logic continue so as to add any ValidArgsFunction completions, - // even if we already found sub-commands. - // This is for commands that have subcommands but also specify a ValidArgsFunction. - } - } - - // Find the completion function for the flag or command - var completionFn func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) - if flag != nil && flagCompletion { - flagCompletionMutex.RLock() - completionFn = flagCompletionFunctions[flag] - flagCompletionMutex.RUnlock() - } else { - completionFn = finalCmd.ValidArgsFunction - } - if completionFn != nil { - // Go custom completion defined for this flag or command. - // Call the registered completion function to get the completions. - var comps []string - comps, directive = completionFn(finalCmd, finalArgs, toComplete) - completions = append(completions, comps...) - } - - return finalCmd, completions, directive, nil -} - -func helpOrVersionFlagPresent(cmd *Command) bool { - if versionFlag := cmd.Flags().Lookup("version"); versionFlag != nil && - len(versionFlag.Annotations[FlagSetByCobraAnnotation]) > 0 && versionFlag.Changed { - return true - } - if helpFlag := cmd.Flags().Lookup("help"); helpFlag != nil && - len(helpFlag.Annotations[FlagSetByCobraAnnotation]) > 0 && helpFlag.Changed { - return true - } - return false -} - -func getFlagNameCompletions(flag *pflag.Flag, toComplete string) []string { - if nonCompletableFlag(flag) { - return []string{} - } - - var completions []string - flagName := "--" + flag.Name - if strings.HasPrefix(flagName, toComplete) { - // Flag without the = - completions = append(completions, fmt.Sprintf("%s\t%s", flagName, flag.Usage)) - - // Why suggest both long forms: --flag and --flag= ? - // This forces the user to *always* have to type either an = or a space after the flag name. - // Let's be nice and avoid making users have to do that. - // Since boolean flags and shortname flags don't show the = form, let's go that route and never show it. - // The = form will still work, we just won't suggest it. - // This also makes the list of suggested flags shorter as we avoid all the = forms. - // - // if len(flag.NoOptDefVal) == 0 { - // // Flag requires a value, so it can be suffixed with = - // flagName += "=" - // completions = append(completions, fmt.Sprintf("%s\t%s", flagName, flag.Usage)) - // } - } - - flagName = "-" + flag.Shorthand - if len(flag.Shorthand) > 0 && strings.HasPrefix(flagName, toComplete) { - completions = append(completions, fmt.Sprintf("%s\t%s", flagName, flag.Usage)) - } - - return completions -} - -func completeRequireFlags(finalCmd *Command, toComplete string) []string { - var completions []string - - doCompleteRequiredFlags := func(flag *pflag.Flag) { - if _, present := flag.Annotations[BashCompOneRequiredFlag]; present { - if !flag.Changed { - // If the flag is not already present, we suggest it as a completion - completions = append(completions, getFlagNameCompletions(flag, toComplete)...) - } - } - } - - // We cannot use finalCmd.Flags() because we may not have called ParsedFlags() for commands - // that have set DisableFlagParsing; it is ParseFlags() that merges the inherited and - // non-inherited flags. - finalCmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) { - doCompleteRequiredFlags(flag) - }) - finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { - doCompleteRequiredFlags(flag) - }) - - return completions -} - -func checkIfFlagCompletion(finalCmd *Command, args []string, lastArg string) (*pflag.Flag, []string, string, error) { - if finalCmd.DisableFlagParsing { - // We only do flag completion if we are allowed to parse flags - // This is important for commands which have requested to do their own flag completion. - return nil, args, lastArg, nil - } - - var flagName string - trimmedArgs := args - flagWithEqual := false - orgLastArg := lastArg - - // When doing completion of a flag name, as soon as an argument starts with - // a '-' we know it is a flag. We cannot use isFlagArg() here as that function - // requires the flag name to be complete - if len(lastArg) > 0 && lastArg[0] == '-' { - if index := strings.Index(lastArg, "="); index >= 0 { - // Flag with an = - if strings.HasPrefix(lastArg[:index], "--") { - // Flag has full name - flagName = lastArg[2:index] - } else { - // Flag is shorthand - // We have to get the last shorthand flag name - // e.g. `-asd` => d to provide the correct completion - // https://github.com/spf13/cobra/issues/1257 - flagName = lastArg[index-1 : index] - } - lastArg = lastArg[index+1:] - flagWithEqual = true - } else { - // Normal flag completion - return nil, args, lastArg, nil - } - } - - if len(flagName) == 0 { - if len(args) > 0 { - prevArg := args[len(args)-1] - if isFlagArg(prevArg) { - // Only consider the case where the flag does not contain an =. - // If the flag contains an = it means it has already been fully processed, - // so we don't need to deal with it here. - if index := strings.Index(prevArg, "="); index < 0 { - if strings.HasPrefix(prevArg, "--") { - // Flag has full name - flagName = prevArg[2:] - } else { - // Flag is shorthand - // We have to get the last shorthand flag name - // e.g. `-asd` => d to provide the correct completion - // https://github.com/spf13/cobra/issues/1257 - flagName = prevArg[len(prevArg)-1:] - } - // Remove the uncompleted flag or else there could be an error created - // for an invalid value for that flag - trimmedArgs = args[:len(args)-1] - } - } - } - } - - if len(flagName) == 0 { - // Not doing flag completion - return nil, trimmedArgs, lastArg, nil - } - - flag := findFlag(finalCmd, flagName) - if flag == nil { - // Flag not supported by this command, the interspersed option might be set so return the original args - return nil, args, orgLastArg, &flagCompError{subCommand: finalCmd.Name(), flagName: flagName} - } - - if !flagWithEqual { - if len(flag.NoOptDefVal) != 0 { - // We had assumed dealing with a two-word flag but the flag is a boolean flag. - // In that case, there is no value following it, so we are not really doing flag completion. - // Reset everything to do noun completion. - trimmedArgs = args - flag = nil - } - } - - return flag, trimmedArgs, lastArg, nil -} - -// InitDefaultCompletionCmd adds a default 'completion' command to c. -// This function will do nothing if any of the following is true: -// 1- the feature has been explicitly disabled by the program, -// 2- c has no subcommands (to avoid creating one), -// 3- c already has a 'completion' command provided by the program. -func (c *Command) InitDefaultCompletionCmd() { - if c.CompletionOptions.DisableDefaultCmd || !c.HasSubCommands() { - return - } - - for _, cmd := range c.commands { - if cmd.Name() == compCmdName || cmd.HasAlias(compCmdName) { - // A completion command is already available - return - } - } - - haveNoDescFlag := !c.CompletionOptions.DisableNoDescFlag && !c.CompletionOptions.DisableDescriptions - - completionCmd := &Command{ - Use: compCmdName, - Short: "Generate the autocompletion script for the specified shell", - Long: fmt.Sprintf(`Generate the autocompletion script for %[1]s for the specified shell. -See each sub-command's help for details on how to use the generated script. -`, c.Root().Name()), - Args: NoArgs, - ValidArgsFunction: NoFileCompletions, - Hidden: c.CompletionOptions.HiddenDefaultCmd, - GroupID: c.completionCommandGroupID, - } - c.AddCommand(completionCmd) - - out := c.OutOrStdout() - noDesc := c.CompletionOptions.DisableDescriptions - shortDesc := "Generate the autocompletion script for %s" - bash := &Command{ - Use: "bash", - Short: fmt.Sprintf(shortDesc, "bash"), - Long: fmt.Sprintf(`Generate the autocompletion script for the bash shell. - -This script depends on the 'bash-completion' package. -If it is not installed already, you can install it via your OS's package manager. - -To load completions in your current shell session: - - source <(%[1]s completion bash) - -To load completions for every new session, execute once: - -#### Linux: - - %[1]s completion bash > /etc/bash_completion.d/%[1]s - -#### macOS: - - %[1]s completion bash > $(brew --prefix)/etc/bash_completion.d/%[1]s - -You will need to start a new shell for this setup to take effect. -`, c.Root().Name()), - Args: NoArgs, - DisableFlagsInUseLine: true, - ValidArgsFunction: NoFileCompletions, - RunE: func(cmd *Command, args []string) error { - return cmd.Root().GenBashCompletionV2(out, !noDesc) - }, - } - if haveNoDescFlag { - bash.Flags().BoolVar(&noDesc, compCmdNoDescFlagName, compCmdNoDescFlagDefault, compCmdNoDescFlagDesc) - } - - zsh := &Command{ - Use: "zsh", - Short: fmt.Sprintf(shortDesc, "zsh"), - Long: fmt.Sprintf(`Generate the autocompletion script for the zsh shell. - -If shell completion is not already enabled in your environment you will need -to enable it. You can execute the following once: - - echo "autoload -U compinit; compinit" >> ~/.zshrc - -To load completions in your current shell session: - - source <(%[1]s completion zsh) - -To load completions for every new session, execute once: - -#### Linux: - - %[1]s completion zsh > "${fpath[1]}/_%[1]s" - -#### macOS: - - %[1]s completion zsh > $(brew --prefix)/share/zsh/site-functions/_%[1]s - -You will need to start a new shell for this setup to take effect. -`, c.Root().Name()), - Args: NoArgs, - ValidArgsFunction: NoFileCompletions, - RunE: func(cmd *Command, args []string) error { - if noDesc { - return cmd.Root().GenZshCompletionNoDesc(out) - } - return cmd.Root().GenZshCompletion(out) - }, - } - if haveNoDescFlag { - zsh.Flags().BoolVar(&noDesc, compCmdNoDescFlagName, compCmdNoDescFlagDefault, compCmdNoDescFlagDesc) - } - - fish := &Command{ - Use: "fish", - Short: fmt.Sprintf(shortDesc, "fish"), - Long: fmt.Sprintf(`Generate the autocompletion script for the fish shell. - -To load completions in your current shell session: - - %[1]s completion fish | source - -To load completions for every new session, execute once: - - %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish - -You will need to start a new shell for this setup to take effect. -`, c.Root().Name()), - Args: NoArgs, - ValidArgsFunction: NoFileCompletions, - RunE: func(cmd *Command, args []string) error { - return cmd.Root().GenFishCompletion(out, !noDesc) - }, - } - if haveNoDescFlag { - fish.Flags().BoolVar(&noDesc, compCmdNoDescFlagName, compCmdNoDescFlagDefault, compCmdNoDescFlagDesc) - } - - powershell := &Command{ - Use: "powershell", - Short: fmt.Sprintf(shortDesc, "powershell"), - Long: fmt.Sprintf(`Generate the autocompletion script for powershell. - -To load completions in your current shell session: - - %[1]s completion powershell | Out-String | Invoke-Expression - -To load completions for every new session, add the output of the above command -to your powershell profile. -`, c.Root().Name()), - Args: NoArgs, - ValidArgsFunction: NoFileCompletions, - RunE: func(cmd *Command, args []string) error { - if noDesc { - return cmd.Root().GenPowerShellCompletion(out) - } - return cmd.Root().GenPowerShellCompletionWithDesc(out) - - }, - } - if haveNoDescFlag { - powershell.Flags().BoolVar(&noDesc, compCmdNoDescFlagName, compCmdNoDescFlagDefault, compCmdNoDescFlagDesc) - } - - completionCmd.AddCommand(bash, zsh, fish, powershell) -} - -func findFlag(cmd *Command, name string) *pflag.Flag { - flagSet := cmd.Flags() - if len(name) == 1 { - // First convert the short flag into a long flag - // as the cmd.Flag() search only accepts long flags - if short := flagSet.ShorthandLookup(name); short != nil { - name = short.Name - } else { - set := cmd.InheritedFlags() - if short = set.ShorthandLookup(name); short != nil { - name = short.Name - } else { - return nil - } - } - } - return cmd.Flag(name) -} - -// CompDebug prints the specified string to the same file as where the -// completion script prints its logs. -// Note that completion printouts should never be on stdout as they would -// be wrongly interpreted as actual completion choices by the completion script. -func CompDebug(msg string, printToStdErr bool) { - msg = fmt.Sprintf("[Debug] %s", msg) - - // Such logs are only printed when the user has set the environment - // variable BASH_COMP_DEBUG_FILE to the path of some file to be used. - if path := os.Getenv("BASH_COMP_DEBUG_FILE"); path != "" { - f, err := os.OpenFile(path, - os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) - if err == nil { - defer f.Close() - WriteStringAndCheck(f, msg) - } - } - - if printToStdErr { - // Must print to stderr for this not to be read by the completion script. - fmt.Fprint(os.Stderr, msg) - } -} - -// CompDebugln prints the specified string with a newline at the end -// to the same file as where the completion script prints its logs. -// Such logs are only printed when the user has set the environment -// variable BASH_COMP_DEBUG_FILE to the path of some file to be used. -func CompDebugln(msg string, printToStdErr bool) { - CompDebug(fmt.Sprintf("%s\n", msg), printToStdErr) -} - -// CompError prints the specified completion message to stderr. -func CompError(msg string) { - msg = fmt.Sprintf("[Error] %s", msg) - CompDebug(msg, true) -} - -// CompErrorln prints the specified completion message to stderr with a newline at the end. -func CompErrorln(msg string) { - CompError(fmt.Sprintf("%s\n", msg)) -} diff --git a/vendor/github.com/spf13/cobra/fish_completions.go b/vendor/github.com/spf13/cobra/fish_completions.go deleted file mode 100644 index 12d61b6..0000000 --- a/vendor/github.com/spf13/cobra/fish_completions.go +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cobra - -import ( - "bytes" - "fmt" - "io" - "os" - "strings" -) - -func genFishComp(buf io.StringWriter, name string, includeDesc bool) { - // Variables should not contain a '-' or ':' character - nameForVar := name - nameForVar = strings.ReplaceAll(nameForVar, "-", "_") - nameForVar = strings.ReplaceAll(nameForVar, ":", "_") - - compCmd := ShellCompRequestCmd - if !includeDesc { - compCmd = ShellCompNoDescRequestCmd - } - WriteStringAndCheck(buf, fmt.Sprintf("# fish completion for %-36s -*- shell-script -*-\n", name)) - WriteStringAndCheck(buf, fmt.Sprintf(` -function __%[1]s_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __%[1]s_perform_completion - __%[1]s_debug "Starting __%[1]s_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __%[1]s_debug "args: $args" - __%[1]s_debug "last arg: $lastArg" - - # Disable ActiveHelp which is not supported for fish shell - set -l requestComp "%[10]s=0 $args[1] %[3]s $args[2..-1] $lastArg" - - __%[1]s_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., -n=) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __%[1]s_debug "Comps: $comps" - __%[1]s_debug "DirectiveLine: $directiveLine" - __%[1]s_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%%s%%s\n" "$flagPrefix" "$comp" - end - - printf "%%s\n" "$directiveLine" -end - -# this function limits calls to __%[1]s_perform_completion, by caching the result behind $__%[1]s_perform_completion_once_result -function __%[1]s_perform_completion_once - __%[1]s_debug "Starting __%[1]s_perform_completion_once" - - if test -n "$__%[1]s_perform_completion_once_result" - __%[1]s_debug "Seems like a valid result already exists, skipping __%[1]s_perform_completion" - return 0 - end - - set --global __%[1]s_perform_completion_once_result (__%[1]s_perform_completion) - if test -z "$__%[1]s_perform_completion_once_result" - __%[1]s_debug "No completions, probably due to a failure" - return 1 - end - - __%[1]s_debug "Performed completions and set __%[1]s_perform_completion_once_result" - return 0 -end - -# this function is used to clear the $__%[1]s_perform_completion_once_result variable after completions are run -function __%[1]s_clear_perform_completion_once_result - __%[1]s_debug "" - __%[1]s_debug "========= clearing previously set __%[1]s_perform_completion_once_result variable ==========" - set --erase __%[1]s_perform_completion_once_result - __%[1]s_debug "Successfully erased the variable __%[1]s_perform_completion_once_result" -end - -function __%[1]s_requires_order_preservation - __%[1]s_debug "" - __%[1]s_debug "========= checking if order preservation is required ==========" - - __%[1]s_perform_completion_once - if test -z "$__%[1]s_perform_completion_once_result" - __%[1]s_debug "Error determining if order preservation is required" - return 1 - end - - set -l directive (string sub --start 2 $__%[1]s_perform_completion_once_result[-1]) - __%[1]s_debug "Directive is: $directive" - - set -l shellCompDirectiveKeepOrder %[9]d - set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) %% 2) - __%[1]s_debug "Keeporder is: $keeporder" - - if test $keeporder -ne 0 - __%[1]s_debug "This does require order preservation" - return 0 - end - - __%[1]s_debug "This doesn't require order preservation" - return 1 -end - - -# This function does two things: -# - Obtain the completions and store them in the global __%[1]s_comp_results -# - Return false if file completion should be performed -function __%[1]s_prepare_completions - __%[1]s_debug "" - __%[1]s_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __%[1]s_comp_results - - __%[1]s_perform_completion_once - __%[1]s_debug "Completion results: $__%[1]s_perform_completion_once_result" - - if test -z "$__%[1]s_perform_completion_once_result" - __%[1]s_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $__%[1]s_perform_completion_once_result[-1]) - set --global __%[1]s_comp_results $__%[1]s_perform_completion_once_result[1..-2] - - __%[1]s_debug "Completions are: $__%[1]s_comp_results" - __%[1]s_debug "Directive is: $directive" - - set -l shellCompDirectiveError %[4]d - set -l shellCompDirectiveNoSpace %[5]d - set -l shellCompDirectiveNoFileComp %[6]d - set -l shellCompDirectiveFilterFileExt %[7]d - set -l shellCompDirectiveFilterDirs %[8]d - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) %% 2) - if test $compErr -eq 1 - __%[1]s_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) %% 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) %% 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __%[1]s_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) %% 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) %% 2) - - __%[1]s_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __%[1]s_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__%[1]s_comp_results) - set --global __%[1]s_comp_results $completions - __%[1]s_debug "Filtered completions are: $__%[1]s_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__%[1]s_comp_results) - __%[1]s_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__%[1]s_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __%[1]s_debug "Adding second completion to perform nospace directive" - set --global __%[1]s_comp_results $split[1] $split[1]. - __%[1]s_debug "Completions are now: $__%[1]s_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __%[1]s_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "%[2]s" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "%[2]s " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c %[2]s -e - -# this will get called after the two calls below and clear the $__%[1]s_perform_completion_once_result global -complete -c %[2]s -n '__%[1]s_clear_perform_completion_once_result' -# The call to __%[1]s_prepare_completions will setup __%[1]s_comp_results -# which provides the program's completion choices. -# If this doesn't require order preservation, we don't use the -k flag -complete -c %[2]s -n 'not __%[1]s_requires_order_preservation && __%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results' -# otherwise we use the -k flag -complete -k -c %[2]s -n '__%[1]s_requires_order_preservation && __%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results' -`, nameForVar, name, compCmd, - ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, - ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, activeHelpEnvVar(name))) -} - -// GenFishCompletion generates fish completion file and writes to the passed writer. -func (c *Command) GenFishCompletion(w io.Writer, includeDesc bool) error { - buf := new(bytes.Buffer) - genFishComp(buf, c.Name(), includeDesc) - _, err := buf.WriteTo(w) - return err -} - -// GenFishCompletionFile generates fish completion file. -func (c *Command) GenFishCompletionFile(filename string, includeDesc bool) error { - outFile, err := os.Create(filename) - if err != nil { - return err - } - defer outFile.Close() - - return c.GenFishCompletion(outFile, includeDesc) -} diff --git a/vendor/github.com/spf13/cobra/flag_groups.go b/vendor/github.com/spf13/cobra/flag_groups.go deleted file mode 100644 index 0671ec5..0000000 --- a/vendor/github.com/spf13/cobra/flag_groups.go +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cobra - -import ( - "fmt" - "sort" - "strings" - - flag "github.com/spf13/pflag" -) - -const ( - requiredAsGroup = "cobra_annotation_required_if_others_set" - oneRequired = "cobra_annotation_one_required" - mutuallyExclusive = "cobra_annotation_mutually_exclusive" -) - -// MarkFlagsRequiredTogether marks the given flags with annotations so that Cobra errors -// if the command is invoked with a subset (but not all) of the given flags. -func (c *Command) MarkFlagsRequiredTogether(flagNames ...string) { - c.mergePersistentFlags() - for _, v := range flagNames { - f := c.Flags().Lookup(v) - if f == nil { - panic(fmt.Sprintf("Failed to find flag %q and mark it as being required in a flag group", v)) - } - if err := c.Flags().SetAnnotation(v, requiredAsGroup, append(f.Annotations[requiredAsGroup], strings.Join(flagNames, " "))); err != nil { - // Only errs if the flag isn't found. - panic(err) - } - } -} - -// MarkFlagsOneRequired marks the given flags with annotations so that Cobra errors -// if the command is invoked without at least one flag from the given set of flags. -func (c *Command) MarkFlagsOneRequired(flagNames ...string) { - c.mergePersistentFlags() - for _, v := range flagNames { - f := c.Flags().Lookup(v) - if f == nil { - panic(fmt.Sprintf("Failed to find flag %q and mark it as being in a one-required flag group", v)) - } - if err := c.Flags().SetAnnotation(v, oneRequired, append(f.Annotations[oneRequired], strings.Join(flagNames, " "))); err != nil { - // Only errs if the flag isn't found. - panic(err) - } - } -} - -// MarkFlagsMutuallyExclusive marks the given flags with annotations so that Cobra errors -// if the command is invoked with more than one flag from the given set of flags. -func (c *Command) MarkFlagsMutuallyExclusive(flagNames ...string) { - c.mergePersistentFlags() - for _, v := range flagNames { - f := c.Flags().Lookup(v) - if f == nil { - panic(fmt.Sprintf("Failed to find flag %q and mark it as being in a mutually exclusive flag group", v)) - } - // Each time this is called is a single new entry; this allows it to be a member of multiple groups if needed. - if err := c.Flags().SetAnnotation(v, mutuallyExclusive, append(f.Annotations[mutuallyExclusive], strings.Join(flagNames, " "))); err != nil { - panic(err) - } - } -} - -// ValidateFlagGroups validates the mutuallyExclusive/oneRequired/requiredAsGroup logic and returns the -// first error encountered. -func (c *Command) ValidateFlagGroups() error { - if c.DisableFlagParsing { - return nil - } - - flags := c.Flags() - - // groupStatus format is the list of flags as a unique ID, - // then a map of each flag name and whether it is set or not. - groupStatus := map[string]map[string]bool{} - oneRequiredGroupStatus := map[string]map[string]bool{} - mutuallyExclusiveGroupStatus := map[string]map[string]bool{} - flags.VisitAll(func(pflag *flag.Flag) { - processFlagForGroupAnnotation(flags, pflag, requiredAsGroup, groupStatus) - processFlagForGroupAnnotation(flags, pflag, oneRequired, oneRequiredGroupStatus) - processFlagForGroupAnnotation(flags, pflag, mutuallyExclusive, mutuallyExclusiveGroupStatus) - }) - - if err := validateRequiredFlagGroups(groupStatus); err != nil { - return err - } - if err := validateOneRequiredFlagGroups(oneRequiredGroupStatus); err != nil { - return err - } - if err := validateExclusiveFlagGroups(mutuallyExclusiveGroupStatus); err != nil { - return err - } - return nil -} - -func hasAllFlags(fs *flag.FlagSet, flagnames ...string) bool { - for _, fname := range flagnames { - f := fs.Lookup(fname) - if f == nil { - return false - } - } - return true -} - -func processFlagForGroupAnnotation(flags *flag.FlagSet, pflag *flag.Flag, annotation string, groupStatus map[string]map[string]bool) { - groupInfo, found := pflag.Annotations[annotation] - if found { - for _, group := range groupInfo { - if groupStatus[group] == nil { - flagnames := strings.Split(group, " ") - - // Only consider this flag group at all if all the flags are defined. - if !hasAllFlags(flags, flagnames...) { - continue - } - - groupStatus[group] = map[string]bool{} - for _, name := range flagnames { - groupStatus[group][name] = false - } - } - - groupStatus[group][pflag.Name] = pflag.Changed - } - } -} - -func validateRequiredFlagGroups(data map[string]map[string]bool) error { - keys := sortedKeys(data) - for _, flagList := range keys { - flagnameAndStatus := data[flagList] - - unset := []string{} - for flagname, isSet := range flagnameAndStatus { - if !isSet { - unset = append(unset, flagname) - } - } - if len(unset) == len(flagnameAndStatus) || len(unset) == 0 { - continue - } - - // Sort values, so they can be tested/scripted against consistently. - sort.Strings(unset) - return fmt.Errorf("if any flags in the group [%v] are set they must all be set; missing %v", flagList, unset) - } - - return nil -} - -func validateOneRequiredFlagGroups(data map[string]map[string]bool) error { - keys := sortedKeys(data) - for _, flagList := range keys { - flagnameAndStatus := data[flagList] - var set []string - for flagname, isSet := range flagnameAndStatus { - if isSet { - set = append(set, flagname) - } - } - if len(set) >= 1 { - continue - } - - // Sort values, so they can be tested/scripted against consistently. - sort.Strings(set) - return fmt.Errorf("at least one of the flags in the group [%v] is required", flagList) - } - return nil -} - -func validateExclusiveFlagGroups(data map[string]map[string]bool) error { - keys := sortedKeys(data) - for _, flagList := range keys { - flagnameAndStatus := data[flagList] - var set []string - for flagname, isSet := range flagnameAndStatus { - if isSet { - set = append(set, flagname) - } - } - if len(set) == 0 || len(set) == 1 { - continue - } - - // Sort values, so they can be tested/scripted against consistently. - sort.Strings(set) - return fmt.Errorf("if any flags in the group [%v] are set none of the others can be; %v were all set", flagList, set) - } - return nil -} - -func sortedKeys(m map[string]map[string]bool) []string { - keys := make([]string, len(m)) - i := 0 - for k := range m { - keys[i] = k - i++ - } - sort.Strings(keys) - return keys -} - -// enforceFlagGroupsForCompletion will do the following: -// - when a flag in a group is present, other flags in the group will be marked required -// - when none of the flags in a one-required group are present, all flags in the group will be marked required -// - when a flag in a mutually exclusive group is present, other flags in the group will be marked as hidden -// This allows the standard completion logic to behave appropriately for flag groups -func (c *Command) enforceFlagGroupsForCompletion() { - if c.DisableFlagParsing { - return - } - - flags := c.Flags() - groupStatus := map[string]map[string]bool{} - oneRequiredGroupStatus := map[string]map[string]bool{} - mutuallyExclusiveGroupStatus := map[string]map[string]bool{} - c.Flags().VisitAll(func(pflag *flag.Flag) { - processFlagForGroupAnnotation(flags, pflag, requiredAsGroup, groupStatus) - processFlagForGroupAnnotation(flags, pflag, oneRequired, oneRequiredGroupStatus) - processFlagForGroupAnnotation(flags, pflag, mutuallyExclusive, mutuallyExclusiveGroupStatus) - }) - - // If a flag that is part of a group is present, we make all the other flags - // of that group required so that the shell completion suggests them automatically - for flagList, flagnameAndStatus := range groupStatus { - for _, isSet := range flagnameAndStatus { - if isSet { - // One of the flags of the group is set, mark the other ones as required - for _, fName := range strings.Split(flagList, " ") { - _ = c.MarkFlagRequired(fName) - } - } - } - } - - // If none of the flags of a one-required group are present, we make all the flags - // of that group required so that the shell completion suggests them automatically - for flagList, flagnameAndStatus := range oneRequiredGroupStatus { - set := 0 - - for _, isSet := range flagnameAndStatus { - if isSet { - set++ - } - } - - // None of the flags of the group are set, mark all flags in the group - // as required - if set == 0 { - for _, fName := range strings.Split(flagList, " ") { - _ = c.MarkFlagRequired(fName) - } - } - } - - // If a flag that is mutually exclusive to others is present, we hide the other - // flags of that group so the shell completion does not suggest them - for flagList, flagnameAndStatus := range mutuallyExclusiveGroupStatus { - for flagName, isSet := range flagnameAndStatus { - if isSet { - // One of the flags of the mutually exclusive group is set, mark the other ones as hidden - // Don't mark the flag that is already set as hidden because it may be an - // array or slice flag and therefore must continue being suggested - for _, fName := range strings.Split(flagList, " ") { - if fName != flagName { - flag := c.Flags().Lookup(fName) - flag.Hidden = true - } - } - } - } - } -} diff --git a/vendor/github.com/spf13/cobra/powershell_completions.go b/vendor/github.com/spf13/cobra/powershell_completions.go deleted file mode 100644 index 5519519..0000000 --- a/vendor/github.com/spf13/cobra/powershell_completions.go +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// The generated scripts require PowerShell v5.0+ (which comes Windows 10, but -// can be downloaded separately for windows 7 or 8.1). - -package cobra - -import ( - "bytes" - "fmt" - "io" - "os" - "strings" -) - -func genPowerShellComp(buf io.StringWriter, name string, includeDesc bool) { - // Variables should not contain a '-' or ':' character - nameForVar := name - nameForVar = strings.Replace(nameForVar, "-", "_", -1) - nameForVar = strings.Replace(nameForVar, ":", "_", -1) - - compCmd := ShellCompRequestCmd - if !includeDesc { - compCmd = ShellCompNoDescRequestCmd - } - WriteStringAndCheck(buf, fmt.Sprintf(`# powershell completion for %-36[1]s -*- shell-script -*- - -function __%[1]s_debug { - if ($env:BASH_COMP_DEBUG_FILE) { - "$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE" - } -} - -filter __%[1]s_escapeStringWithSpecialChars { -`+" $_ -replace '\\s|#|@|\\$|;|,|''|\\{|\\}|\\(|\\)|\"|`|\\||<|>|&','`$&'"+` -} - -[scriptblock]${__%[2]sCompleterBlock} = { - param( - $WordToComplete, - $CommandAst, - $CursorPosition - ) - - # Get the current command line and convert into a string - $Command = $CommandAst.CommandElements - $Command = "$Command" - - __%[1]s_debug "" - __%[1]s_debug "========= starting completion logic ==========" - __%[1]s_debug "WordToComplete: $WordToComplete Command: $Command CursorPosition: $CursorPosition" - - # The user could have moved the cursor backwards on the command-line. - # We need to trigger completion from the $CursorPosition location, so we need - # to truncate the command-line ($Command) up to the $CursorPosition location. - # Make sure the $Command is longer then the $CursorPosition before we truncate. - # This happens because the $Command does not include the last space. - if ($Command.Length -gt $CursorPosition) { - $Command=$Command.Substring(0,$CursorPosition) - } - __%[1]s_debug "Truncated command: $Command" - - $ShellCompDirectiveError=%[4]d - $ShellCompDirectiveNoSpace=%[5]d - $ShellCompDirectiveNoFileComp=%[6]d - $ShellCompDirectiveFilterFileExt=%[7]d - $ShellCompDirectiveFilterDirs=%[8]d - $ShellCompDirectiveKeepOrder=%[9]d - - # Prepare the command to request completions for the program. - # Split the command at the first space to separate the program and arguments. - $Program,$Arguments = $Command.Split(" ",2) - - $RequestComp="$Program %[3]s $Arguments" - __%[1]s_debug "RequestComp: $RequestComp" - - # we cannot use $WordToComplete because it - # has the wrong values if the cursor was moved - # so use the last argument - if ($WordToComplete -ne "" ) { - $WordToComplete = $Arguments.Split(" ")[-1] - } - __%[1]s_debug "New WordToComplete: $WordToComplete" - - - # Check for flag with equal sign - $IsEqualFlag = ($WordToComplete -Like "--*=*" ) - if ( $IsEqualFlag ) { - __%[1]s_debug "Completing equal sign flag" - # Remove the flag part - $Flag,$WordToComplete = $WordToComplete.Split("=",2) - } - - if ( $WordToComplete -eq "" -And ( -Not $IsEqualFlag )) { - # If the last parameter is complete (there is a space following it) - # We add an extra empty parameter so we can indicate this to the go method. - __%[1]s_debug "Adding extra empty parameter" - # PowerShell 7.2+ changed the way how the arguments are passed to executables, - # so for pre-7.2 or when Legacy argument passing is enabled we need to use -`+" # `\"`\" to pass an empty argument, a \"\" or '' does not work!!!"+` - if ($PSVersionTable.PsVersion -lt [version]'7.2.0' -or - ($PSVersionTable.PsVersion -lt [version]'7.3.0' -and -not [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -or - (($PSVersionTable.PsVersion -ge [version]'7.3.0' -or [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -and - $PSNativeCommandArgumentPassing -eq 'Legacy')) { -`+" $RequestComp=\"$RequestComp\" + ' `\"`\"'"+` - } else { - $RequestComp="$RequestComp" + ' ""' - } - } - - __%[1]s_debug "Calling $RequestComp" - # First disable ActiveHelp which is not supported for Powershell - ${env:%[10]s}=0 - - #call the command store the output in $out and redirect stderr and stdout to null - # $Out is an array contains each line per element - Invoke-Expression -OutVariable out "$RequestComp" 2>&1 | Out-Null - - # get directive from last line - [int]$Directive = $Out[-1].TrimStart(':') - if ($Directive -eq "") { - # There is no directive specified - $Directive = 0 - } - __%[1]s_debug "The completion directive is: $Directive" - - # remove directive (last element) from out - $Out = $Out | Where-Object { $_ -ne $Out[-1] } - __%[1]s_debug "The completions are: $Out" - - if (($Directive -band $ShellCompDirectiveError) -ne 0 ) { - # Error code. No completion. - __%[1]s_debug "Received error from custom completion go code" - return - } - - $Longest = 0 - [Array]$Values = $Out | ForEach-Object { - #Split the output in name and description -`+" $Name, $Description = $_.Split(\"`t\",2)"+` - __%[1]s_debug "Name: $Name Description: $Description" - - # Look for the longest completion so that we can format things nicely - if ($Longest -lt $Name.Length) { - $Longest = $Name.Length - } - - # Set the description to a one space string if there is none set. - # This is needed because the CompletionResult does not accept an empty string as argument - if (-Not $Description) { - $Description = " " - } - @{Name="$Name";Description="$Description"} - } - - - $Space = " " - if (($Directive -band $ShellCompDirectiveNoSpace) -ne 0 ) { - # remove the space here - __%[1]s_debug "ShellCompDirectiveNoSpace is called" - $Space = "" - } - - if ((($Directive -band $ShellCompDirectiveFilterFileExt) -ne 0 ) -or - (($Directive -band $ShellCompDirectiveFilterDirs) -ne 0 )) { - __%[1]s_debug "ShellCompDirectiveFilterFileExt ShellCompDirectiveFilterDirs are not supported" - - # return here to prevent the completion of the extensions - return - } - - $Values = $Values | Where-Object { - # filter the result - $_.Name -like "$WordToComplete*" - - # Join the flag back if we have an equal sign flag - if ( $IsEqualFlag ) { - __%[1]s_debug "Join the equal sign flag back to the completion value" - $_.Name = $Flag + "=" + $_.Name - } - } - - # we sort the values in ascending order by name if keep order isn't passed - if (($Directive -band $ShellCompDirectiveKeepOrder) -eq 0 ) { - $Values = $Values | Sort-Object -Property Name - } - - if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) { - __%[1]s_debug "ShellCompDirectiveNoFileComp is called" - - if ($Values.Length -eq 0) { - # Just print an empty string here so the - # shell does not start to complete paths. - # We cannot use CompletionResult here because - # it does not accept an empty string as argument. - "" - return - } - } - - # Get the current mode - $Mode = (Get-PSReadLineKeyHandler | Where-Object {$_.Key -eq "Tab" }).Function - __%[1]s_debug "Mode: $Mode" - - $Values | ForEach-Object { - - # store temporary because switch will overwrite $_ - $comp = $_ - - # PowerShell supports three different completion modes - # - TabCompleteNext (default windows style - on each key press the next option is displayed) - # - Complete (works like bash) - # - MenuComplete (works like zsh) - # You set the mode with Set-PSReadLineKeyHandler -Key Tab -Function - - # CompletionResult Arguments: - # 1) CompletionText text to be used as the auto completion result - # 2) ListItemText text to be displayed in the suggestion list - # 3) ResultType type of completion result - # 4) ToolTip text for the tooltip with details about the object - - switch ($Mode) { - - # bash like - "Complete" { - - if ($Values.Length -eq 1) { - __%[1]s_debug "Only one completion left" - - # insert space after value - [System.Management.Automation.CompletionResult]::new($($comp.Name | __%[1]s_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") - - } else { - # Add the proper number of spaces to align the descriptions - while($comp.Name.Length -lt $Longest) { - $comp.Name = $comp.Name + " " - } - - # Check for empty description and only add parentheses if needed - if ($($comp.Description) -eq " " ) { - $Description = "" - } else { - $Description = " ($($comp.Description))" - } - - [System.Management.Automation.CompletionResult]::new("$($comp.Name)$Description", "$($comp.Name)$Description", 'ParameterValue', "$($comp.Description)") - } - } - - # zsh like - "MenuComplete" { - # insert space after value - # MenuComplete will automatically show the ToolTip of - # the highlighted value at the bottom of the suggestions. - [System.Management.Automation.CompletionResult]::new($($comp.Name | __%[1]s_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") - } - - # TabCompleteNext and in case we get something unknown - Default { - # Like MenuComplete but we don't want to add a space here because - # the user need to press space anyway to get the completion. - # Description will not be shown because that's not possible with TabCompleteNext - [System.Management.Automation.CompletionResult]::new($($comp.Name | __%[1]s_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)") - } - } - - } -} - -Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock ${__%[2]sCompleterBlock} -`, name, nameForVar, compCmd, - ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, - ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, activeHelpEnvVar(name))) -} - -func (c *Command) genPowerShellCompletion(w io.Writer, includeDesc bool) error { - buf := new(bytes.Buffer) - genPowerShellComp(buf, c.Name(), includeDesc) - _, err := buf.WriteTo(w) - return err -} - -func (c *Command) genPowerShellCompletionFile(filename string, includeDesc bool) error { - outFile, err := os.Create(filename) - if err != nil { - return err - } - defer outFile.Close() - - return c.genPowerShellCompletion(outFile, includeDesc) -} - -// GenPowerShellCompletionFile generates powershell completion file without descriptions. -func (c *Command) GenPowerShellCompletionFile(filename string) error { - return c.genPowerShellCompletionFile(filename, false) -} - -// GenPowerShellCompletion generates powershell completion file without descriptions -// and writes it to the passed writer. -func (c *Command) GenPowerShellCompletion(w io.Writer) error { - return c.genPowerShellCompletion(w, false) -} - -// GenPowerShellCompletionFileWithDesc generates powershell completion file with descriptions. -func (c *Command) GenPowerShellCompletionFileWithDesc(filename string) error { - return c.genPowerShellCompletionFile(filename, true) -} - -// GenPowerShellCompletionWithDesc generates powershell completion file with descriptions -// and writes it to the passed writer. -func (c *Command) GenPowerShellCompletionWithDesc(w io.Writer) error { - return c.genPowerShellCompletion(w, true) -} diff --git a/vendor/github.com/spf13/cobra/shell_completions.go b/vendor/github.com/spf13/cobra/shell_completions.go deleted file mode 100644 index b035742..0000000 --- a/vendor/github.com/spf13/cobra/shell_completions.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cobra - -import ( - "github.com/spf13/pflag" -) - -// MarkFlagRequired instructs the various shell completion implementations to -// prioritize the named flag when performing completion, -// and causes your command to report an error if invoked without the flag. -func (c *Command) MarkFlagRequired(name string) error { - return MarkFlagRequired(c.Flags(), name) -} - -// MarkPersistentFlagRequired instructs the various shell completion implementations to -// prioritize the named persistent flag when performing completion, -// and causes your command to report an error if invoked without the flag. -func (c *Command) MarkPersistentFlagRequired(name string) error { - return MarkFlagRequired(c.PersistentFlags(), name) -} - -// MarkFlagRequired instructs the various shell completion implementations to -// prioritize the named flag when performing completion, -// and causes your command to report an error if invoked without the flag. -func MarkFlagRequired(flags *pflag.FlagSet, name string) error { - return flags.SetAnnotation(name, BashCompOneRequiredFlag, []string{"true"}) -} - -// MarkFlagFilename instructs the various shell completion implementations to -// limit completions for the named flag to the specified file extensions. -func (c *Command) MarkFlagFilename(name string, extensions ...string) error { - return MarkFlagFilename(c.Flags(), name, extensions...) -} - -// MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. -// The bash completion script will call the bash function f for the flag. -// -// This will only work for bash completion. -// It is recommended to instead use c.RegisterFlagCompletionFunc(...) which allows -// to register a Go function which will work across all shells. -func (c *Command) MarkFlagCustom(name string, f string) error { - return MarkFlagCustom(c.Flags(), name, f) -} - -// MarkPersistentFlagFilename instructs the various shell completion -// implementations to limit completions for the named persistent flag to the -// specified file extensions. -func (c *Command) MarkPersistentFlagFilename(name string, extensions ...string) error { - return MarkFlagFilename(c.PersistentFlags(), name, extensions...) -} - -// MarkFlagFilename instructs the various shell completion implementations to -// limit completions for the named flag to the specified file extensions. -func MarkFlagFilename(flags *pflag.FlagSet, name string, extensions ...string) error { - return flags.SetAnnotation(name, BashCompFilenameExt, extensions) -} - -// MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. -// The bash completion script will call the bash function f for the flag. -// -// This will only work for bash completion. -// It is recommended to instead use c.RegisterFlagCompletionFunc(...) which allows -// to register a Go function which will work across all shells. -func MarkFlagCustom(flags *pflag.FlagSet, name string, f string) error { - return flags.SetAnnotation(name, BashCompCustom, []string{f}) -} - -// MarkFlagDirname instructs the various shell completion implementations to -// limit completions for the named flag to directory names. -func (c *Command) MarkFlagDirname(name string) error { - return MarkFlagDirname(c.Flags(), name) -} - -// MarkPersistentFlagDirname instructs the various shell completion -// implementations to limit completions for the named persistent flag to -// directory names. -func (c *Command) MarkPersistentFlagDirname(name string) error { - return MarkFlagDirname(c.PersistentFlags(), name) -} - -// MarkFlagDirname instructs the various shell completion implementations to -// limit completions for the named flag to directory names. -func MarkFlagDirname(flags *pflag.FlagSet, name string) error { - return flags.SetAnnotation(name, BashCompSubdirsInDir, []string{}) -} diff --git a/vendor/github.com/spf13/cobra/zsh_completions.go b/vendor/github.com/spf13/cobra/zsh_completions.go deleted file mode 100644 index 1856e4c..0000000 --- a/vendor/github.com/spf13/cobra/zsh_completions.go +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright 2013-2023 The Cobra Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cobra - -import ( - "bytes" - "fmt" - "io" - "os" -) - -// GenZshCompletionFile generates zsh completion file including descriptions. -func (c *Command) GenZshCompletionFile(filename string) error { - return c.genZshCompletionFile(filename, true) -} - -// GenZshCompletion generates zsh completion file including descriptions -// and writes it to the passed writer. -func (c *Command) GenZshCompletion(w io.Writer) error { - return c.genZshCompletion(w, true) -} - -// GenZshCompletionFileNoDesc generates zsh completion file without descriptions. -func (c *Command) GenZshCompletionFileNoDesc(filename string) error { - return c.genZshCompletionFile(filename, false) -} - -// GenZshCompletionNoDesc generates zsh completion file without descriptions -// and writes it to the passed writer. -func (c *Command) GenZshCompletionNoDesc(w io.Writer) error { - return c.genZshCompletion(w, false) -} - -// MarkZshCompPositionalArgumentFile only worked for zsh and its behavior was -// not consistent with Bash completion. It has therefore been disabled. -// Instead, when no other completion is specified, file completion is done by -// default for every argument. One can disable file completion on a per-argument -// basis by using ValidArgsFunction and ShellCompDirectiveNoFileComp. -// To achieve file extension filtering, one can use ValidArgsFunction and -// ShellCompDirectiveFilterFileExt. -// -// Deprecated -func (c *Command) MarkZshCompPositionalArgumentFile(argPosition int, patterns ...string) error { - return nil -} - -// MarkZshCompPositionalArgumentWords only worked for zsh. It has therefore -// been disabled. -// To achieve the same behavior across all shells, one can use -// ValidArgs (for the first argument only) or ValidArgsFunction for -// any argument (can include the first one also). -// -// Deprecated -func (c *Command) MarkZshCompPositionalArgumentWords(argPosition int, words ...string) error { - return nil -} - -func (c *Command) genZshCompletionFile(filename string, includeDesc bool) error { - outFile, err := os.Create(filename) - if err != nil { - return err - } - defer outFile.Close() - - return c.genZshCompletion(outFile, includeDesc) -} - -func (c *Command) genZshCompletion(w io.Writer, includeDesc bool) error { - buf := new(bytes.Buffer) - genZshComp(buf, c.Name(), includeDesc) - _, err := buf.WriteTo(w) - return err -} - -func genZshComp(buf io.StringWriter, name string, includeDesc bool) { - compCmd := ShellCompRequestCmd - if !includeDesc { - compCmd = ShellCompNoDescRequestCmd - } - WriteStringAndCheck(buf, fmt.Sprintf(`#compdef %[1]s -compdef _%[1]s %[1]s - -# zsh completion for %-36[1]s -*- shell-script -*- - -__%[1]s_debug() -{ - local file="$BASH_COMP_DEBUG_FILE" - if [[ -n ${file} ]]; then - echo "$*" >> "${file}" - fi -} - -_%[1]s() -{ - local shellCompDirectiveError=%[3]d - local shellCompDirectiveNoSpace=%[4]d - local shellCompDirectiveNoFileComp=%[5]d - local shellCompDirectiveFilterFileExt=%[6]d - local shellCompDirectiveFilterDirs=%[7]d - local shellCompDirectiveKeepOrder=%[8]d - - local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder - local -a completions - - __%[1]s_debug "\n========= starting completion logic ==========" - __%[1]s_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}" - - # The user could have moved the cursor backwards on the command-line. - # We need to trigger completion from the $CURRENT location, so we need - # to truncate the command-line ($words) up to the $CURRENT location. - # (We cannot use $CURSOR as its value does not work when a command is an alias.) - words=("${=words[1,CURRENT]}") - __%[1]s_debug "Truncated words[*]: ${words[*]}," - - lastParam=${words[-1]} - lastChar=${lastParam[-1]} - __%[1]s_debug "lastParam: ${lastParam}, lastChar: ${lastChar}" - - # For zsh, when completing a flag with an = (e.g., %[1]s -n=) - # completions must be prefixed with the flag - setopt local_options BASH_REMATCH - if [[ "${lastParam}" =~ '-.*=' ]]; then - # We are dealing with a flag with an = - flagPrefix="-P ${BASH_REMATCH}" - fi - - # Prepare the command to obtain completions - requestComp="${words[1]} %[2]s ${words[2,-1]}" - if [ "${lastChar}" = "" ]; then - # If the last parameter is complete (there is a space following it) - # We add an extra empty parameter so we can indicate this to the go completion code. - __%[1]s_debug "Adding extra empty parameter" - requestComp="${requestComp} \"\"" - fi - - __%[1]s_debug "About to call: eval ${requestComp}" - - # Use eval to handle any environment variables and such - out=$(eval ${requestComp} 2>/dev/null) - __%[1]s_debug "completion output: ${out}" - - # Extract the directive integer following a : from the last line - local lastLine - while IFS='\n' read -r line; do - lastLine=${line} - done < <(printf "%%s\n" "${out[@]}") - __%[1]s_debug "last line: ${lastLine}" - - if [ "${lastLine[1]}" = : ]; then - directive=${lastLine[2,-1]} - # Remove the directive including the : and the newline - local suffix - (( suffix=${#lastLine}+2)) - out=${out[1,-$suffix]} - else - # There is no directive specified. Leave $out as is. - __%[1]s_debug "No directive found. Setting do default" - directive=0 - fi - - __%[1]s_debug "directive: ${directive}" - __%[1]s_debug "completions: ${out}" - __%[1]s_debug "flagPrefix: ${flagPrefix}" - - if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then - __%[1]s_debug "Completion received error. Ignoring completions." - return - fi - - local activeHelpMarker="%[9]s" - local endIndex=${#activeHelpMarker} - local startIndex=$((${#activeHelpMarker}+1)) - local hasActiveHelp=0 - while IFS='\n' read -r comp; do - # Check if this is an activeHelp statement (i.e., prefixed with $activeHelpMarker) - if [ "${comp[1,$endIndex]}" = "$activeHelpMarker" ];then - __%[1]s_debug "ActiveHelp found: $comp" - comp="${comp[$startIndex,-1]}" - if [ -n "$comp" ]; then - compadd -x "${comp}" - __%[1]s_debug "ActiveHelp will need delimiter" - hasActiveHelp=1 - fi - - continue - fi - - if [ -n "$comp" ]; then - # If requested, completions are returned with a description. - # The description is preceded by a TAB character. - # For zsh's _describe, we need to use a : instead of a TAB. - # We first need to escape any : as part of the completion itself. - comp=${comp//:/\\:} - - local tab="$(printf '\t')" - comp=${comp//$tab/:} - - __%[1]s_debug "Adding completion: ${comp}" - completions+=${comp} - lastComp=$comp - fi - done < <(printf "%%s\n" "${out[@]}") - - # Add a delimiter after the activeHelp statements, but only if: - # - there are completions following the activeHelp statements, or - # - file completion will be performed (so there will be choices after the activeHelp) - if [ $hasActiveHelp -eq 1 ]; then - if [ ${#completions} -ne 0 ] || [ $((directive & shellCompDirectiveNoFileComp)) -eq 0 ]; then - __%[1]s_debug "Adding activeHelp delimiter" - compadd -x "--" - hasActiveHelp=0 - fi - fi - - if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then - __%[1]s_debug "Activating nospace." - noSpace="-S ''" - fi - - if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then - __%[1]s_debug "Activating keep order." - keepOrder="-V" - fi - - if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then - # File extension filtering - local filteringCmd - filteringCmd='_files' - for filter in ${completions[@]}; do - if [ ${filter[1]} != '*' ]; then - # zsh requires a glob pattern to do file filtering - filter="\*.$filter" - fi - filteringCmd+=" -g $filter" - done - filteringCmd+=" ${flagPrefix}" - - __%[1]s_debug "File filtering command: $filteringCmd" - _arguments '*:filename:'"$filteringCmd" - elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then - # File completion for directories only - local subdir - subdir="${completions[1]}" - if [ -n "$subdir" ]; then - __%[1]s_debug "Listing directories in $subdir" - pushd "${subdir}" >/dev/null 2>&1 - else - __%[1]s_debug "Listing directories in ." - fi - - local result - _arguments '*:dirname:_files -/'" ${flagPrefix}" - result=$? - if [ -n "$subdir" ]; then - popd >/dev/null 2>&1 - fi - return $result - else - __%[1]s_debug "Calling _describe" - if eval _describe $keepOrder "completions" completions $flagPrefix $noSpace; then - __%[1]s_debug "_describe found some completions" - - # Return the success of having called _describe - return 0 - else - __%[1]s_debug "_describe did not find completions." - __%[1]s_debug "Checking if we should do file completion." - if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then - __%[1]s_debug "deactivating file completion" - - # We must return an error code here to let zsh know that there were no - # completions found by _describe; this is what will trigger other - # matching algorithms to attempt to find completions. - # For example zsh can match letters in the middle of words. - return 1 - else - # Perform file completion - __%[1]s_debug "Activating file completion" - - # We must return the result of this command, so it must be the - # last command, or else we must store its result to return it. - _arguments '*:filename:_files'" ${flagPrefix}" - fi - fi - fi -} - -# don't run the completion function when being source-ed or eval-ed -if [ "$funcstack[1]" = "_%[1]s" ]; then - _%[1]s -fi -`, name, compCmd, - ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, - ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, - activeHelpMarker)) -} diff --git a/vendor/github.com/spf13/pflag/.gitignore b/vendor/github.com/spf13/pflag/.gitignore deleted file mode 100644 index c3da290..0000000 --- a/vendor/github.com/spf13/pflag/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.idea/* - diff --git a/vendor/github.com/spf13/pflag/.travis.yml b/vendor/github.com/spf13/pflag/.travis.yml deleted file mode 100644 index 00d04cb..0000000 --- a/vendor/github.com/spf13/pflag/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -sudo: false - -language: go - -go: - - 1.9.x - - 1.10.x - - 1.11.x - - tip - -matrix: - allow_failures: - - go: tip - -install: - - go get golang.org/x/lint/golint - - export PATH=$GOPATH/bin:$PATH - - go install ./... - -script: - - verify/all.sh -v - - go test ./... diff --git a/vendor/github.com/spf13/pflag/LICENSE b/vendor/github.com/spf13/pflag/LICENSE deleted file mode 100644 index 63ed1cf..0000000 --- a/vendor/github.com/spf13/pflag/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Alex Ogier. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/spf13/pflag/README.md b/vendor/github.com/spf13/pflag/README.md deleted file mode 100644 index 7eacc5b..0000000 --- a/vendor/github.com/spf13/pflag/README.md +++ /dev/null @@ -1,296 +0,0 @@ -[![Build Status](https://travis-ci.org/spf13/pflag.svg?branch=master)](https://travis-ci.org/spf13/pflag) -[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/pflag)](https://goreportcard.com/report/github.com/spf13/pflag) -[![GoDoc](https://godoc.org/github.com/spf13/pflag?status.svg)](https://godoc.org/github.com/spf13/pflag) - -## Description - -pflag is a drop-in replacement for Go's flag package, implementing -POSIX/GNU-style --flags. - -pflag is compatible with the [GNU extensions to the POSIX recommendations -for command-line options][1]. For a more precise description, see the -"Command-line flag syntax" section below. - -[1]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html - -pflag is available under the same style of BSD license as the Go language, -which can be found in the LICENSE file. - -## Installation - -pflag is available using the standard `go get` command. - -Install by running: - - go get github.com/spf13/pflag - -Run tests by running: - - go test github.com/spf13/pflag - -## Usage - -pflag is a drop-in replacement of Go's native flag package. If you import -pflag under the name "flag" then all code should continue to function -with no changes. - -``` go -import flag "github.com/spf13/pflag" -``` - -There is one exception to this: if you directly instantiate the Flag struct -there is one more field "Shorthand" that you will need to set. -Most code never instantiates this struct directly, and instead uses -functions such as String(), BoolVar(), and Var(), and is therefore -unaffected. - -Define flags using flag.String(), Bool(), Int(), etc. - -This declares an integer flag, -flagname, stored in the pointer ip, with type *int. - -``` go -var ip *int = flag.Int("flagname", 1234, "help message for flagname") -``` - -If you like, you can bind the flag to a variable using the Var() functions. - -``` go -var flagvar int -func init() { - flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") -} -``` - -Or you can create custom flags that satisfy the Value interface (with -pointer receivers) and couple them to flag parsing by - -``` go -flag.Var(&flagVal, "name", "help message for flagname") -``` - -For such flags, the default value is just the initial value of the variable. - -After all flags are defined, call - -``` go -flag.Parse() -``` - -to parse the command line into the defined flags. - -Flags may then be used directly. If you're using the flags themselves, -they are all pointers; if you bind to variables, they're values. - -``` go -fmt.Println("ip has value ", *ip) -fmt.Println("flagvar has value ", flagvar) -``` - -There are helper functions available to get the value stored in a Flag if you have a FlagSet but find -it difficult to keep up with all of the pointers in your code. -If you have a pflag.FlagSet with a flag called 'flagname' of type int you -can use GetInt() to get the int value. But notice that 'flagname' must exist -and it must be an int. GetString("flagname") will fail. - -``` go -i, err := flagset.GetInt("flagname") -``` - -After parsing, the arguments after the flag are available as the -slice flag.Args() or individually as flag.Arg(i). -The arguments are indexed from 0 through flag.NArg()-1. - -The pflag package also defines some new functions that are not in flag, -that give one-letter shorthands for flags. You can use these by appending -'P' to the name of any function that defines a flag. - -``` go -var ip = flag.IntP("flagname", "f", 1234, "help message") -var flagvar bool -func init() { - flag.BoolVarP(&flagvar, "boolname", "b", true, "help message") -} -flag.VarP(&flagVal, "varname", "v", "help message") -``` - -Shorthand letters can be used with single dashes on the command line. -Boolean shorthand flags can be combined with other shorthand flags. - -The default set of command-line flags is controlled by -top-level functions. The FlagSet type allows one to define -independent sets of flags, such as to implement subcommands -in a command-line interface. The methods of FlagSet are -analogous to the top-level functions for the command-line -flag set. - -## Setting no option default values for flags - -After you create a flag it is possible to set the pflag.NoOptDefVal for -the given flag. Doing this changes the meaning of the flag slightly. If -a flag has a NoOptDefVal and the flag is set on the command line without -an option the flag will be set to the NoOptDefVal. For example given: - -``` go -var ip = flag.IntP("flagname", "f", 1234, "help message") -flag.Lookup("flagname").NoOptDefVal = "4321" -``` - -Would result in something like - -| Parsed Arguments | Resulting Value | -| ------------- | ------------- | -| --flagname=1357 | ip=1357 | -| --flagname | ip=4321 | -| [nothing] | ip=1234 | - -## Command line flag syntax - -``` ---flag // boolean flags, or flags with no option default values ---flag x // only on flags without a default value ---flag=x -``` - -Unlike the flag package, a single dash before an option means something -different than a double dash. Single dashes signify a series of shorthand -letters for flags. All but the last shorthand letter must be boolean flags -or a flag with a default value - -``` -// boolean or flags where the 'no option default value' is set --f --f=true --abc -but --b true is INVALID - -// non-boolean and flags without a 'no option default value' --n 1234 --n=1234 --n1234 - -// mixed --abcs "hello" --absd="hello" --abcs1234 -``` - -Flag parsing stops after the terminator "--". Unlike the flag package, -flags can be interspersed with arguments anywhere on the command line -before this terminator. - -Integer flags accept 1234, 0664, 0x1234 and may be negative. -Boolean flags (in their long form) accept 1, 0, t, f, true, false, -TRUE, FALSE, True, False. -Duration flags accept any input valid for time.ParseDuration. - -## Mutating or "Normalizing" Flag names - -It is possible to set a custom flag name 'normalization function.' It allows flag names to be mutated both when created in the code and when used on the command line to some 'normalized' form. The 'normalized' form is used for comparison. Two examples of using the custom normalization func follow. - -**Example #1**: You want -, _, and . in flags to compare the same. aka --my-flag == --my_flag == --my.flag - -``` go -func wordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName { - from := []string{"-", "_"} - to := "." - for _, sep := range from { - name = strings.Replace(name, sep, to, -1) - } - return pflag.NormalizedName(name) -} - -myFlagSet.SetNormalizeFunc(wordSepNormalizeFunc) -``` - -**Example #2**: You want to alias two flags. aka --old-flag-name == --new-flag-name - -``` go -func aliasNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName { - switch name { - case "old-flag-name": - name = "new-flag-name" - break - } - return pflag.NormalizedName(name) -} - -myFlagSet.SetNormalizeFunc(aliasNormalizeFunc) -``` - -## Deprecating a flag or its shorthand -It is possible to deprecate a flag, or just its shorthand. Deprecating a flag/shorthand hides it from help text and prints a usage message when the deprecated flag/shorthand is used. - -**Example #1**: You want to deprecate a flag named "badflag" as well as inform the users what flag they should use instead. -```go -// deprecate a flag by specifying its name and a usage message -flags.MarkDeprecated("badflag", "please use --good-flag instead") -``` -This hides "badflag" from help text, and prints `Flag --badflag has been deprecated, please use --good-flag instead` when "badflag" is used. - -**Example #2**: You want to keep a flag name "noshorthandflag" but deprecate its shortname "n". -```go -// deprecate a flag shorthand by specifying its flag name and a usage message -flags.MarkShorthandDeprecated("noshorthandflag", "please use --noshorthandflag only") -``` -This hides the shortname "n" from help text, and prints `Flag shorthand -n has been deprecated, please use --noshorthandflag only` when the shorthand "n" is used. - -Note that usage message is essential here, and it should not be empty. - -## Hidden flags -It is possible to mark a flag as hidden, meaning it will still function as normal, however will not show up in usage/help text. - -**Example**: You have a flag named "secretFlag" that you need for internal use only and don't want it showing up in help text, or for its usage text to be available. -```go -// hide a flag by specifying its name -flags.MarkHidden("secretFlag") -``` - -## Disable sorting of flags -`pflag` allows you to disable sorting of flags for help and usage message. - -**Example**: -```go -flags.BoolP("verbose", "v", false, "verbose output") -flags.String("coolflag", "yeaah", "it's really cool flag") -flags.Int("usefulflag", 777, "sometimes it's very useful") -flags.SortFlags = false -flags.PrintDefaults() -``` -**Output**: -``` - -v, --verbose verbose output - --coolflag string it's really cool flag (default "yeaah") - --usefulflag int sometimes it's very useful (default 777) -``` - - -## Supporting Go flags when using pflag -In order to support flags defined using Go's `flag` package, they must be added to the `pflag` flagset. This is usually necessary -to support flags defined by third-party dependencies (e.g. `golang/glog`). - -**Example**: You want to add the Go flags to the `CommandLine` flagset -```go -import ( - goflag "flag" - flag "github.com/spf13/pflag" -) - -var ip *int = flag.Int("flagname", 1234, "help message for flagname") - -func main() { - flag.CommandLine.AddGoFlagSet(goflag.CommandLine) - flag.Parse() -} -``` - -## More info - -You can see the full reference documentation of the pflag package -[at godoc.org][3], or through go's standard documentation system by -running `godoc -http=:6060` and browsing to -[http://localhost:6060/pkg/github.com/spf13/pflag][2] after -installation. - -[2]: http://localhost:6060/pkg/github.com/spf13/pflag -[3]: http://godoc.org/github.com/spf13/pflag diff --git a/vendor/github.com/spf13/pflag/bool.go b/vendor/github.com/spf13/pflag/bool.go deleted file mode 100644 index c4c5c0b..0000000 --- a/vendor/github.com/spf13/pflag/bool.go +++ /dev/null @@ -1,94 +0,0 @@ -package pflag - -import "strconv" - -// optional interface to indicate boolean flags that can be -// supplied without "=value" text -type boolFlag interface { - Value - IsBoolFlag() bool -} - -// -- bool Value -type boolValue bool - -func newBoolValue(val bool, p *bool) *boolValue { - *p = val - return (*boolValue)(p) -} - -func (b *boolValue) Set(s string) error { - v, err := strconv.ParseBool(s) - *b = boolValue(v) - return err -} - -func (b *boolValue) Type() string { - return "bool" -} - -func (b *boolValue) String() string { return strconv.FormatBool(bool(*b)) } - -func (b *boolValue) IsBoolFlag() bool { return true } - -func boolConv(sval string) (interface{}, error) { - return strconv.ParseBool(sval) -} - -// GetBool return the bool value of a flag with the given name -func (f *FlagSet) GetBool(name string) (bool, error) { - val, err := f.getFlagType(name, "bool", boolConv) - if err != nil { - return false, err - } - return val.(bool), nil -} - -// BoolVar defines a bool flag with specified name, default value, and usage string. -// The argument p points to a bool variable in which to store the value of the flag. -func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string) { - f.BoolVarP(p, name, "", value, usage) -} - -// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string) { - flag := f.VarPF(newBoolValue(value, p), name, shorthand, usage) - flag.NoOptDefVal = "true" -} - -// BoolVar defines a bool flag with specified name, default value, and usage string. -// The argument p points to a bool variable in which to store the value of the flag. -func BoolVar(p *bool, name string, value bool, usage string) { - BoolVarP(p, name, "", value, usage) -} - -// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash. -func BoolVarP(p *bool, name, shorthand string, value bool, usage string) { - flag := CommandLine.VarPF(newBoolValue(value, p), name, shorthand, usage) - flag.NoOptDefVal = "true" -} - -// Bool defines a bool flag with specified name, default value, and usage string. -// The return value is the address of a bool variable that stores the value of the flag. -func (f *FlagSet) Bool(name string, value bool, usage string) *bool { - return f.BoolP(name, "", value, usage) -} - -// BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool { - p := new(bool) - f.BoolVarP(p, name, shorthand, value, usage) - return p -} - -// Bool defines a bool flag with specified name, default value, and usage string. -// The return value is the address of a bool variable that stores the value of the flag. -func Bool(name string, value bool, usage string) *bool { - return BoolP(name, "", value, usage) -} - -// BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash. -func BoolP(name, shorthand string, value bool, usage string) *bool { - b := CommandLine.BoolP(name, shorthand, value, usage) - return b -} diff --git a/vendor/github.com/spf13/pflag/bool_slice.go b/vendor/github.com/spf13/pflag/bool_slice.go deleted file mode 100644 index 3731370..0000000 --- a/vendor/github.com/spf13/pflag/bool_slice.go +++ /dev/null @@ -1,185 +0,0 @@ -package pflag - -import ( - "io" - "strconv" - "strings" -) - -// -- boolSlice Value -type boolSliceValue struct { - value *[]bool - changed bool -} - -func newBoolSliceValue(val []bool, p *[]bool) *boolSliceValue { - bsv := new(boolSliceValue) - bsv.value = p - *bsv.value = val - return bsv -} - -// Set converts, and assigns, the comma-separated boolean argument string representation as the []bool value of this flag. -// If Set is called on a flag that already has a []bool assigned, the newly converted values will be appended. -func (s *boolSliceValue) Set(val string) error { - - // remove all quote characters - rmQuote := strings.NewReplacer(`"`, "", `'`, "", "`", "") - - // read flag arguments with CSV parser - boolStrSlice, err := readAsCSV(rmQuote.Replace(val)) - if err != nil && err != io.EOF { - return err - } - - // parse boolean values into slice - out := make([]bool, 0, len(boolStrSlice)) - for _, boolStr := range boolStrSlice { - b, err := strconv.ParseBool(strings.TrimSpace(boolStr)) - if err != nil { - return err - } - out = append(out, b) - } - - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - - s.changed = true - - return nil -} - -// Type returns a string that uniquely represents this flag's type. -func (s *boolSliceValue) Type() string { - return "boolSlice" -} - -// String defines a "native" format for this boolean slice flag value. -func (s *boolSliceValue) String() string { - - boolStrSlice := make([]string, len(*s.value)) - for i, b := range *s.value { - boolStrSlice[i] = strconv.FormatBool(b) - } - - out, _ := writeAsCSV(boolStrSlice) - - return "[" + out + "]" -} - -func (s *boolSliceValue) fromString(val string) (bool, error) { - return strconv.ParseBool(val) -} - -func (s *boolSliceValue) toString(val bool) string { - return strconv.FormatBool(val) -} - -func (s *boolSliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *boolSliceValue) Replace(val []string) error { - out := make([]bool, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *boolSliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func boolSliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []bool{}, nil - } - ss := strings.Split(val, ",") - out := make([]bool, len(ss)) - for i, t := range ss { - var err error - out[i], err = strconv.ParseBool(t) - if err != nil { - return nil, err - } - } - return out, nil -} - -// GetBoolSlice returns the []bool value of a flag with the given name. -func (f *FlagSet) GetBoolSlice(name string) ([]bool, error) { - val, err := f.getFlagType(name, "boolSlice", boolSliceConv) - if err != nil { - return []bool{}, err - } - return val.([]bool), nil -} - -// BoolSliceVar defines a boolSlice flag with specified name, default value, and usage string. -// The argument p points to a []bool variable in which to store the value of the flag. -func (f *FlagSet) BoolSliceVar(p *[]bool, name string, value []bool, usage string) { - f.VarP(newBoolSliceValue(value, p), name, "", usage) -} - -// BoolSliceVarP is like BoolSliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BoolSliceVarP(p *[]bool, name, shorthand string, value []bool, usage string) { - f.VarP(newBoolSliceValue(value, p), name, shorthand, usage) -} - -// BoolSliceVar defines a []bool flag with specified name, default value, and usage string. -// The argument p points to a []bool variable in which to store the value of the flag. -func BoolSliceVar(p *[]bool, name string, value []bool, usage string) { - CommandLine.VarP(newBoolSliceValue(value, p), name, "", usage) -} - -// BoolSliceVarP is like BoolSliceVar, but accepts a shorthand letter that can be used after a single dash. -func BoolSliceVarP(p *[]bool, name, shorthand string, value []bool, usage string) { - CommandLine.VarP(newBoolSliceValue(value, p), name, shorthand, usage) -} - -// BoolSlice defines a []bool flag with specified name, default value, and usage string. -// The return value is the address of a []bool variable that stores the value of the flag. -func (f *FlagSet) BoolSlice(name string, value []bool, usage string) *[]bool { - p := []bool{} - f.BoolSliceVarP(&p, name, "", value, usage) - return &p -} - -// BoolSliceP is like BoolSlice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BoolSliceP(name, shorthand string, value []bool, usage string) *[]bool { - p := []bool{} - f.BoolSliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// BoolSlice defines a []bool flag with specified name, default value, and usage string. -// The return value is the address of a []bool variable that stores the value of the flag. -func BoolSlice(name string, value []bool, usage string) *[]bool { - return CommandLine.BoolSliceP(name, "", value, usage) -} - -// BoolSliceP is like BoolSlice, but accepts a shorthand letter that can be used after a single dash. -func BoolSliceP(name, shorthand string, value []bool, usage string) *[]bool { - return CommandLine.BoolSliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/bytes.go b/vendor/github.com/spf13/pflag/bytes.go deleted file mode 100644 index 67d5304..0000000 --- a/vendor/github.com/spf13/pflag/bytes.go +++ /dev/null @@ -1,209 +0,0 @@ -package pflag - -import ( - "encoding/base64" - "encoding/hex" - "fmt" - "strings" -) - -// BytesHex adapts []byte for use as a flag. Value of flag is HEX encoded -type bytesHexValue []byte - -// String implements pflag.Value.String. -func (bytesHex bytesHexValue) String() string { - return fmt.Sprintf("%X", []byte(bytesHex)) -} - -// Set implements pflag.Value.Set. -func (bytesHex *bytesHexValue) Set(value string) error { - bin, err := hex.DecodeString(strings.TrimSpace(value)) - - if err != nil { - return err - } - - *bytesHex = bin - - return nil -} - -// Type implements pflag.Value.Type. -func (*bytesHexValue) Type() string { - return "bytesHex" -} - -func newBytesHexValue(val []byte, p *[]byte) *bytesHexValue { - *p = val - return (*bytesHexValue)(p) -} - -func bytesHexConv(sval string) (interface{}, error) { - - bin, err := hex.DecodeString(sval) - - if err == nil { - return bin, nil - } - - return nil, fmt.Errorf("invalid string being converted to Bytes: %s %s", sval, err) -} - -// GetBytesHex return the []byte value of a flag with the given name -func (f *FlagSet) GetBytesHex(name string) ([]byte, error) { - val, err := f.getFlagType(name, "bytesHex", bytesHexConv) - - if err != nil { - return []byte{}, err - } - - return val.([]byte), nil -} - -// BytesHexVar defines an []byte flag with specified name, default value, and usage string. -// The argument p points to an []byte variable in which to store the value of the flag. -func (f *FlagSet) BytesHexVar(p *[]byte, name string, value []byte, usage string) { - f.VarP(newBytesHexValue(value, p), name, "", usage) -} - -// BytesHexVarP is like BytesHexVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BytesHexVarP(p *[]byte, name, shorthand string, value []byte, usage string) { - f.VarP(newBytesHexValue(value, p), name, shorthand, usage) -} - -// BytesHexVar defines an []byte flag with specified name, default value, and usage string. -// The argument p points to an []byte variable in which to store the value of the flag. -func BytesHexVar(p *[]byte, name string, value []byte, usage string) { - CommandLine.VarP(newBytesHexValue(value, p), name, "", usage) -} - -// BytesHexVarP is like BytesHexVar, but accepts a shorthand letter that can be used after a single dash. -func BytesHexVarP(p *[]byte, name, shorthand string, value []byte, usage string) { - CommandLine.VarP(newBytesHexValue(value, p), name, shorthand, usage) -} - -// BytesHex defines an []byte flag with specified name, default value, and usage string. -// The return value is the address of an []byte variable that stores the value of the flag. -func (f *FlagSet) BytesHex(name string, value []byte, usage string) *[]byte { - p := new([]byte) - f.BytesHexVarP(p, name, "", value, usage) - return p -} - -// BytesHexP is like BytesHex, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BytesHexP(name, shorthand string, value []byte, usage string) *[]byte { - p := new([]byte) - f.BytesHexVarP(p, name, shorthand, value, usage) - return p -} - -// BytesHex defines an []byte flag with specified name, default value, and usage string. -// The return value is the address of an []byte variable that stores the value of the flag. -func BytesHex(name string, value []byte, usage string) *[]byte { - return CommandLine.BytesHexP(name, "", value, usage) -} - -// BytesHexP is like BytesHex, but accepts a shorthand letter that can be used after a single dash. -func BytesHexP(name, shorthand string, value []byte, usage string) *[]byte { - return CommandLine.BytesHexP(name, shorthand, value, usage) -} - -// BytesBase64 adapts []byte for use as a flag. Value of flag is Base64 encoded -type bytesBase64Value []byte - -// String implements pflag.Value.String. -func (bytesBase64 bytesBase64Value) String() string { - return base64.StdEncoding.EncodeToString([]byte(bytesBase64)) -} - -// Set implements pflag.Value.Set. -func (bytesBase64 *bytesBase64Value) Set(value string) error { - bin, err := base64.StdEncoding.DecodeString(strings.TrimSpace(value)) - - if err != nil { - return err - } - - *bytesBase64 = bin - - return nil -} - -// Type implements pflag.Value.Type. -func (*bytesBase64Value) Type() string { - return "bytesBase64" -} - -func newBytesBase64Value(val []byte, p *[]byte) *bytesBase64Value { - *p = val - return (*bytesBase64Value)(p) -} - -func bytesBase64ValueConv(sval string) (interface{}, error) { - - bin, err := base64.StdEncoding.DecodeString(sval) - if err == nil { - return bin, nil - } - - return nil, fmt.Errorf("invalid string being converted to Bytes: %s %s", sval, err) -} - -// GetBytesBase64 return the []byte value of a flag with the given name -func (f *FlagSet) GetBytesBase64(name string) ([]byte, error) { - val, err := f.getFlagType(name, "bytesBase64", bytesBase64ValueConv) - - if err != nil { - return []byte{}, err - } - - return val.([]byte), nil -} - -// BytesBase64Var defines an []byte flag with specified name, default value, and usage string. -// The argument p points to an []byte variable in which to store the value of the flag. -func (f *FlagSet) BytesBase64Var(p *[]byte, name string, value []byte, usage string) { - f.VarP(newBytesBase64Value(value, p), name, "", usage) -} - -// BytesBase64VarP is like BytesBase64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BytesBase64VarP(p *[]byte, name, shorthand string, value []byte, usage string) { - f.VarP(newBytesBase64Value(value, p), name, shorthand, usage) -} - -// BytesBase64Var defines an []byte flag with specified name, default value, and usage string. -// The argument p points to an []byte variable in which to store the value of the flag. -func BytesBase64Var(p *[]byte, name string, value []byte, usage string) { - CommandLine.VarP(newBytesBase64Value(value, p), name, "", usage) -} - -// BytesBase64VarP is like BytesBase64Var, but accepts a shorthand letter that can be used after a single dash. -func BytesBase64VarP(p *[]byte, name, shorthand string, value []byte, usage string) { - CommandLine.VarP(newBytesBase64Value(value, p), name, shorthand, usage) -} - -// BytesBase64 defines an []byte flag with specified name, default value, and usage string. -// The return value is the address of an []byte variable that stores the value of the flag. -func (f *FlagSet) BytesBase64(name string, value []byte, usage string) *[]byte { - p := new([]byte) - f.BytesBase64VarP(p, name, "", value, usage) - return p -} - -// BytesBase64P is like BytesBase64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BytesBase64P(name, shorthand string, value []byte, usage string) *[]byte { - p := new([]byte) - f.BytesBase64VarP(p, name, shorthand, value, usage) - return p -} - -// BytesBase64 defines an []byte flag with specified name, default value, and usage string. -// The return value is the address of an []byte variable that stores the value of the flag. -func BytesBase64(name string, value []byte, usage string) *[]byte { - return CommandLine.BytesBase64P(name, "", value, usage) -} - -// BytesBase64P is like BytesBase64, but accepts a shorthand letter that can be used after a single dash. -func BytesBase64P(name, shorthand string, value []byte, usage string) *[]byte { - return CommandLine.BytesBase64P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/count.go b/vendor/github.com/spf13/pflag/count.go deleted file mode 100644 index a0b2679..0000000 --- a/vendor/github.com/spf13/pflag/count.go +++ /dev/null @@ -1,96 +0,0 @@ -package pflag - -import "strconv" - -// -- count Value -type countValue int - -func newCountValue(val int, p *int) *countValue { - *p = val - return (*countValue)(p) -} - -func (i *countValue) Set(s string) error { - // "+1" means that no specific value was passed, so increment - if s == "+1" { - *i = countValue(*i + 1) - return nil - } - v, err := strconv.ParseInt(s, 0, 0) - *i = countValue(v) - return err -} - -func (i *countValue) Type() string { - return "count" -} - -func (i *countValue) String() string { return strconv.Itoa(int(*i)) } - -func countConv(sval string) (interface{}, error) { - i, err := strconv.Atoi(sval) - if err != nil { - return nil, err - } - return i, nil -} - -// GetCount return the int value of a flag with the given name -func (f *FlagSet) GetCount(name string) (int, error) { - val, err := f.getFlagType(name, "count", countConv) - if err != nil { - return 0, err - } - return val.(int), nil -} - -// CountVar defines a count flag with specified name, default value, and usage string. -// The argument p points to an int variable in which to store the value of the flag. -// A count flag will add 1 to its value every time it is found on the command line -func (f *FlagSet) CountVar(p *int, name string, usage string) { - f.CountVarP(p, name, "", usage) -} - -// CountVarP is like CountVar only take a shorthand for the flag name. -func (f *FlagSet) CountVarP(p *int, name, shorthand string, usage string) { - flag := f.VarPF(newCountValue(0, p), name, shorthand, usage) - flag.NoOptDefVal = "+1" -} - -// CountVar like CountVar only the flag is placed on the CommandLine instead of a given flag set -func CountVar(p *int, name string, usage string) { - CommandLine.CountVar(p, name, usage) -} - -// CountVarP is like CountVar only take a shorthand for the flag name. -func CountVarP(p *int, name, shorthand string, usage string) { - CommandLine.CountVarP(p, name, shorthand, usage) -} - -// Count defines a count flag with specified name, default value, and usage string. -// The return value is the address of an int variable that stores the value of the flag. -// A count flag will add 1 to its value every time it is found on the command line -func (f *FlagSet) Count(name string, usage string) *int { - p := new(int) - f.CountVarP(p, name, "", usage) - return p -} - -// CountP is like Count only takes a shorthand for the flag name. -func (f *FlagSet) CountP(name, shorthand string, usage string) *int { - p := new(int) - f.CountVarP(p, name, shorthand, usage) - return p -} - -// Count defines a count flag with specified name, default value, and usage string. -// The return value is the address of an int variable that stores the value of the flag. -// A count flag will add 1 to its value evey time it is found on the command line -func Count(name string, usage string) *int { - return CommandLine.CountP(name, "", usage) -} - -// CountP is like Count only takes a shorthand for the flag name. -func CountP(name, shorthand string, usage string) *int { - return CommandLine.CountP(name, shorthand, usage) -} diff --git a/vendor/github.com/spf13/pflag/duration.go b/vendor/github.com/spf13/pflag/duration.go deleted file mode 100644 index e9debef..0000000 --- a/vendor/github.com/spf13/pflag/duration.go +++ /dev/null @@ -1,86 +0,0 @@ -package pflag - -import ( - "time" -) - -// -- time.Duration Value -type durationValue time.Duration - -func newDurationValue(val time.Duration, p *time.Duration) *durationValue { - *p = val - return (*durationValue)(p) -} - -func (d *durationValue) Set(s string) error { - v, err := time.ParseDuration(s) - *d = durationValue(v) - return err -} - -func (d *durationValue) Type() string { - return "duration" -} - -func (d *durationValue) String() string { return (*time.Duration)(d).String() } - -func durationConv(sval string) (interface{}, error) { - return time.ParseDuration(sval) -} - -// GetDuration return the duration value of a flag with the given name -func (f *FlagSet) GetDuration(name string) (time.Duration, error) { - val, err := f.getFlagType(name, "duration", durationConv) - if err != nil { - return 0, err - } - return val.(time.Duration), nil -} - -// DurationVar defines a time.Duration flag with specified name, default value, and usage string. -// The argument p points to a time.Duration variable in which to store the value of the flag. -func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string) { - f.VarP(newDurationValue(value, p), name, "", usage) -} - -// DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) { - f.VarP(newDurationValue(value, p), name, shorthand, usage) -} - -// DurationVar defines a time.Duration flag with specified name, default value, and usage string. -// The argument p points to a time.Duration variable in which to store the value of the flag. -func DurationVar(p *time.Duration, name string, value time.Duration, usage string) { - CommandLine.VarP(newDurationValue(value, p), name, "", usage) -} - -// DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash. -func DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) { - CommandLine.VarP(newDurationValue(value, p), name, shorthand, usage) -} - -// Duration defines a time.Duration flag with specified name, default value, and usage string. -// The return value is the address of a time.Duration variable that stores the value of the flag. -func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration { - p := new(time.Duration) - f.DurationVarP(p, name, "", value, usage) - return p -} - -// DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration { - p := new(time.Duration) - f.DurationVarP(p, name, shorthand, value, usage) - return p -} - -// Duration defines a time.Duration flag with specified name, default value, and usage string. -// The return value is the address of a time.Duration variable that stores the value of the flag. -func Duration(name string, value time.Duration, usage string) *time.Duration { - return CommandLine.DurationP(name, "", value, usage) -} - -// DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash. -func DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration { - return CommandLine.DurationP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/duration_slice.go b/vendor/github.com/spf13/pflag/duration_slice.go deleted file mode 100644 index badadda..0000000 --- a/vendor/github.com/spf13/pflag/duration_slice.go +++ /dev/null @@ -1,166 +0,0 @@ -package pflag - -import ( - "fmt" - "strings" - "time" -) - -// -- durationSlice Value -type durationSliceValue struct { - value *[]time.Duration - changed bool -} - -func newDurationSliceValue(val []time.Duration, p *[]time.Duration) *durationSliceValue { - dsv := new(durationSliceValue) - dsv.value = p - *dsv.value = val - return dsv -} - -func (s *durationSliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]time.Duration, len(ss)) - for i, d := range ss { - var err error - out[i], err = time.ParseDuration(d) - if err != nil { - return err - } - - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *durationSliceValue) Type() string { - return "durationSlice" -} - -func (s *durationSliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%s", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *durationSliceValue) fromString(val string) (time.Duration, error) { - return time.ParseDuration(val) -} - -func (s *durationSliceValue) toString(val time.Duration) string { - return fmt.Sprintf("%s", val) -} - -func (s *durationSliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *durationSliceValue) Replace(val []string) error { - out := make([]time.Duration, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *durationSliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func durationSliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []time.Duration{}, nil - } - ss := strings.Split(val, ",") - out := make([]time.Duration, len(ss)) - for i, d := range ss { - var err error - out[i], err = time.ParseDuration(d) - if err != nil { - return nil, err - } - - } - return out, nil -} - -// GetDurationSlice returns the []time.Duration value of a flag with the given name -func (f *FlagSet) GetDurationSlice(name string) ([]time.Duration, error) { - val, err := f.getFlagType(name, "durationSlice", durationSliceConv) - if err != nil { - return []time.Duration{}, err - } - return val.([]time.Duration), nil -} - -// DurationSliceVar defines a durationSlice flag with specified name, default value, and usage string. -// The argument p points to a []time.Duration variable in which to store the value of the flag. -func (f *FlagSet) DurationSliceVar(p *[]time.Duration, name string, value []time.Duration, usage string) { - f.VarP(newDurationSliceValue(value, p), name, "", usage) -} - -// DurationSliceVarP is like DurationSliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) DurationSliceVarP(p *[]time.Duration, name, shorthand string, value []time.Duration, usage string) { - f.VarP(newDurationSliceValue(value, p), name, shorthand, usage) -} - -// DurationSliceVar defines a duration[] flag with specified name, default value, and usage string. -// The argument p points to a duration[] variable in which to store the value of the flag. -func DurationSliceVar(p *[]time.Duration, name string, value []time.Duration, usage string) { - CommandLine.VarP(newDurationSliceValue(value, p), name, "", usage) -} - -// DurationSliceVarP is like DurationSliceVar, but accepts a shorthand letter that can be used after a single dash. -func DurationSliceVarP(p *[]time.Duration, name, shorthand string, value []time.Duration, usage string) { - CommandLine.VarP(newDurationSliceValue(value, p), name, shorthand, usage) -} - -// DurationSlice defines a []time.Duration flag with specified name, default value, and usage string. -// The return value is the address of a []time.Duration variable that stores the value of the flag. -func (f *FlagSet) DurationSlice(name string, value []time.Duration, usage string) *[]time.Duration { - p := []time.Duration{} - f.DurationSliceVarP(&p, name, "", value, usage) - return &p -} - -// DurationSliceP is like DurationSlice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) DurationSliceP(name, shorthand string, value []time.Duration, usage string) *[]time.Duration { - p := []time.Duration{} - f.DurationSliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// DurationSlice defines a []time.Duration flag with specified name, default value, and usage string. -// The return value is the address of a []time.Duration variable that stores the value of the flag. -func DurationSlice(name string, value []time.Duration, usage string) *[]time.Duration { - return CommandLine.DurationSliceP(name, "", value, usage) -} - -// DurationSliceP is like DurationSlice, but accepts a shorthand letter that can be used after a single dash. -func DurationSliceP(name, shorthand string, value []time.Duration, usage string) *[]time.Duration { - return CommandLine.DurationSliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/flag.go b/vendor/github.com/spf13/pflag/flag.go deleted file mode 100644 index 24a5036..0000000 --- a/vendor/github.com/spf13/pflag/flag.go +++ /dev/null @@ -1,1239 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -Package pflag is a drop-in replacement for Go's flag package, implementing -POSIX/GNU-style --flags. - -pflag is compatible with the GNU extensions to the POSIX recommendations -for command-line options. See -http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html - -Usage: - -pflag is a drop-in replacement of Go's native flag package. If you import -pflag under the name "flag" then all code should continue to function -with no changes. - - import flag "github.com/spf13/pflag" - -There is one exception to this: if you directly instantiate the Flag struct -there is one more field "Shorthand" that you will need to set. -Most code never instantiates this struct directly, and instead uses -functions such as String(), BoolVar(), and Var(), and is therefore -unaffected. - -Define flags using flag.String(), Bool(), Int(), etc. - -This declares an integer flag, -flagname, stored in the pointer ip, with type *int. - var ip = flag.Int("flagname", 1234, "help message for flagname") -If you like, you can bind the flag to a variable using the Var() functions. - var flagvar int - func init() { - flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") - } -Or you can create custom flags that satisfy the Value interface (with -pointer receivers) and couple them to flag parsing by - flag.Var(&flagVal, "name", "help message for flagname") -For such flags, the default value is just the initial value of the variable. - -After all flags are defined, call - flag.Parse() -to parse the command line into the defined flags. - -Flags may then be used directly. If you're using the flags themselves, -they are all pointers; if you bind to variables, they're values. - fmt.Println("ip has value ", *ip) - fmt.Println("flagvar has value ", flagvar) - -After parsing, the arguments after the flag are available as the -slice flag.Args() or individually as flag.Arg(i). -The arguments are indexed from 0 through flag.NArg()-1. - -The pflag package also defines some new functions that are not in flag, -that give one-letter shorthands for flags. You can use these by appending -'P' to the name of any function that defines a flag. - var ip = flag.IntP("flagname", "f", 1234, "help message") - var flagvar bool - func init() { - flag.BoolVarP(&flagvar, "boolname", "b", true, "help message") - } - flag.VarP(&flagval, "varname", "v", "help message") -Shorthand letters can be used with single dashes on the command line. -Boolean shorthand flags can be combined with other shorthand flags. - -Command line flag syntax: - --flag // boolean flags only - --flag=x - -Unlike the flag package, a single dash before an option means something -different than a double dash. Single dashes signify a series of shorthand -letters for flags. All but the last shorthand letter must be boolean flags. - // boolean flags - -f - -abc - // non-boolean flags - -n 1234 - -Ifile - // mixed - -abcs "hello" - -abcn1234 - -Flag parsing stops after the terminator "--". Unlike the flag package, -flags can be interspersed with arguments anywhere on the command line -before this terminator. - -Integer flags accept 1234, 0664, 0x1234 and may be negative. -Boolean flags (in their long form) accept 1, 0, t, f, true, false, -TRUE, FALSE, True, False. -Duration flags accept any input valid for time.ParseDuration. - -The default set of command-line flags is controlled by -top-level functions. The FlagSet type allows one to define -independent sets of flags, such as to implement subcommands -in a command-line interface. The methods of FlagSet are -analogous to the top-level functions for the command-line -flag set. -*/ -package pflag - -import ( - "bytes" - "errors" - goflag "flag" - "fmt" - "io" - "os" - "sort" - "strings" -) - -// ErrHelp is the error returned if the flag -help is invoked but no such flag is defined. -var ErrHelp = errors.New("pflag: help requested") - -// ErrorHandling defines how to handle flag parsing errors. -type ErrorHandling int - -const ( - // ContinueOnError will return an err from Parse() if an error is found - ContinueOnError ErrorHandling = iota - // ExitOnError will call os.Exit(2) if an error is found when parsing - ExitOnError - // PanicOnError will panic() if an error is found when parsing flags - PanicOnError -) - -// ParseErrorsWhitelist defines the parsing errors that can be ignored -type ParseErrorsWhitelist struct { - // UnknownFlags will ignore unknown flags errors and continue parsing rest of the flags - UnknownFlags bool -} - -// NormalizedName is a flag name that has been normalized according to rules -// for the FlagSet (e.g. making '-' and '_' equivalent). -type NormalizedName string - -// A FlagSet represents a set of defined flags. -type FlagSet struct { - // Usage is the function called when an error occurs while parsing flags. - // The field is a function (not a method) that may be changed to point to - // a custom error handler. - Usage func() - - // SortFlags is used to indicate, if user wants to have sorted flags in - // help/usage messages. - SortFlags bool - - // ParseErrorsWhitelist is used to configure a whitelist of errors - ParseErrorsWhitelist ParseErrorsWhitelist - - name string - parsed bool - actual map[NormalizedName]*Flag - orderedActual []*Flag - sortedActual []*Flag - formal map[NormalizedName]*Flag - orderedFormal []*Flag - sortedFormal []*Flag - shorthands map[byte]*Flag - args []string // arguments after flags - argsLenAtDash int // len(args) when a '--' was located when parsing, or -1 if no -- - errorHandling ErrorHandling - output io.Writer // nil means stderr; use out() accessor - interspersed bool // allow interspersed option/non-option args - normalizeNameFunc func(f *FlagSet, name string) NormalizedName - - addedGoFlagSets []*goflag.FlagSet -} - -// A Flag represents the state of a flag. -type Flag struct { - Name string // name as it appears on command line - Shorthand string // one-letter abbreviated flag - Usage string // help message - Value Value // value as set - DefValue string // default value (as text); for usage message - Changed bool // If the user set the value (or if left to default) - NoOptDefVal string // default value (as text); if the flag is on the command line without any options - Deprecated string // If this flag is deprecated, this string is the new or now thing to use - Hidden bool // used by cobra.Command to allow flags to be hidden from help/usage text - ShorthandDeprecated string // If the shorthand of this flag is deprecated, this string is the new or now thing to use - Annotations map[string][]string // used by cobra.Command bash autocomple code -} - -// Value is the interface to the dynamic value stored in a flag. -// (The default value is represented as a string.) -type Value interface { - String() string - Set(string) error - Type() string -} - -// SliceValue is a secondary interface to all flags which hold a list -// of values. This allows full control over the value of list flags, -// and avoids complicated marshalling and unmarshalling to csv. -type SliceValue interface { - // Append adds the specified value to the end of the flag value list. - Append(string) error - // Replace will fully overwrite any data currently in the flag value list. - Replace([]string) error - // GetSlice returns the flag value list as an array of strings. - GetSlice() []string -} - -// sortFlags returns the flags as a slice in lexicographical sorted order. -func sortFlags(flags map[NormalizedName]*Flag) []*Flag { - list := make(sort.StringSlice, len(flags)) - i := 0 - for k := range flags { - list[i] = string(k) - i++ - } - list.Sort() - result := make([]*Flag, len(list)) - for i, name := range list { - result[i] = flags[NormalizedName(name)] - } - return result -} - -// SetNormalizeFunc allows you to add a function which can translate flag names. -// Flags added to the FlagSet will be translated and then when anything tries to -// look up the flag that will also be translated. So it would be possible to create -// a flag named "getURL" and have it translated to "geturl". A user could then pass -// "--getUrl" which may also be translated to "geturl" and everything will work. -func (f *FlagSet) SetNormalizeFunc(n func(f *FlagSet, name string) NormalizedName) { - f.normalizeNameFunc = n - f.sortedFormal = f.sortedFormal[:0] - for fname, flag := range f.formal { - nname := f.normalizeFlagName(flag.Name) - if fname == nname { - continue - } - flag.Name = string(nname) - delete(f.formal, fname) - f.formal[nname] = flag - if _, set := f.actual[fname]; set { - delete(f.actual, fname) - f.actual[nname] = flag - } - } -} - -// GetNormalizeFunc returns the previously set NormalizeFunc of a function which -// does no translation, if not set previously. -func (f *FlagSet) GetNormalizeFunc() func(f *FlagSet, name string) NormalizedName { - if f.normalizeNameFunc != nil { - return f.normalizeNameFunc - } - return func(f *FlagSet, name string) NormalizedName { return NormalizedName(name) } -} - -func (f *FlagSet) normalizeFlagName(name string) NormalizedName { - n := f.GetNormalizeFunc() - return n(f, name) -} - -func (f *FlagSet) out() io.Writer { - if f.output == nil { - return os.Stderr - } - return f.output -} - -// SetOutput sets the destination for usage and error messages. -// If output is nil, os.Stderr is used. -func (f *FlagSet) SetOutput(output io.Writer) { - f.output = output -} - -// VisitAll visits the flags in lexicographical order or -// in primordial order if f.SortFlags is false, calling fn for each. -// It visits all flags, even those not set. -func (f *FlagSet) VisitAll(fn func(*Flag)) { - if len(f.formal) == 0 { - return - } - - var flags []*Flag - if f.SortFlags { - if len(f.formal) != len(f.sortedFormal) { - f.sortedFormal = sortFlags(f.formal) - } - flags = f.sortedFormal - } else { - flags = f.orderedFormal - } - - for _, flag := range flags { - fn(flag) - } -} - -// HasFlags returns a bool to indicate if the FlagSet has any flags defined. -func (f *FlagSet) HasFlags() bool { - return len(f.formal) > 0 -} - -// HasAvailableFlags returns a bool to indicate if the FlagSet has any flags -// that are not hidden. -func (f *FlagSet) HasAvailableFlags() bool { - for _, flag := range f.formal { - if !flag.Hidden { - return true - } - } - return false -} - -// VisitAll visits the command-line flags in lexicographical order or -// in primordial order if f.SortFlags is false, calling fn for each. -// It visits all flags, even those not set. -func VisitAll(fn func(*Flag)) { - CommandLine.VisitAll(fn) -} - -// Visit visits the flags in lexicographical order or -// in primordial order if f.SortFlags is false, calling fn for each. -// It visits only those flags that have been set. -func (f *FlagSet) Visit(fn func(*Flag)) { - if len(f.actual) == 0 { - return - } - - var flags []*Flag - if f.SortFlags { - if len(f.actual) != len(f.sortedActual) { - f.sortedActual = sortFlags(f.actual) - } - flags = f.sortedActual - } else { - flags = f.orderedActual - } - - for _, flag := range flags { - fn(flag) - } -} - -// Visit visits the command-line flags in lexicographical order or -// in primordial order if f.SortFlags is false, calling fn for each. -// It visits only those flags that have been set. -func Visit(fn func(*Flag)) { - CommandLine.Visit(fn) -} - -// Lookup returns the Flag structure of the named flag, returning nil if none exists. -func (f *FlagSet) Lookup(name string) *Flag { - return f.lookup(f.normalizeFlagName(name)) -} - -// ShorthandLookup returns the Flag structure of the short handed flag, -// returning nil if none exists. -// It panics, if len(name) > 1. -func (f *FlagSet) ShorthandLookup(name string) *Flag { - if name == "" { - return nil - } - if len(name) > 1 { - msg := fmt.Sprintf("can not look up shorthand which is more than one ASCII character: %q", name) - fmt.Fprintf(f.out(), msg) - panic(msg) - } - c := name[0] - return f.shorthands[c] -} - -// lookup returns the Flag structure of the named flag, returning nil if none exists. -func (f *FlagSet) lookup(name NormalizedName) *Flag { - return f.formal[name] -} - -// func to return a given type for a given flag name -func (f *FlagSet) getFlagType(name string, ftype string, convFunc func(sval string) (interface{}, error)) (interface{}, error) { - flag := f.Lookup(name) - if flag == nil { - err := fmt.Errorf("flag accessed but not defined: %s", name) - return nil, err - } - - if flag.Value.Type() != ftype { - err := fmt.Errorf("trying to get %s value of flag of type %s", ftype, flag.Value.Type()) - return nil, err - } - - sval := flag.Value.String() - result, err := convFunc(sval) - if err != nil { - return nil, err - } - return result, nil -} - -// ArgsLenAtDash will return the length of f.Args at the moment when a -- was -// found during arg parsing. This allows your program to know which args were -// before the -- and which came after. -func (f *FlagSet) ArgsLenAtDash() int { - return f.argsLenAtDash -} - -// MarkDeprecated indicated that a flag is deprecated in your program. It will -// continue to function but will not show up in help or usage messages. Using -// this flag will also print the given usageMessage. -func (f *FlagSet) MarkDeprecated(name string, usageMessage string) error { - flag := f.Lookup(name) - if flag == nil { - return fmt.Errorf("flag %q does not exist", name) - } - if usageMessage == "" { - return fmt.Errorf("deprecated message for flag %q must be set", name) - } - flag.Deprecated = usageMessage - flag.Hidden = true - return nil -} - -// MarkShorthandDeprecated will mark the shorthand of a flag deprecated in your -// program. It will continue to function but will not show up in help or usage -// messages. Using this flag will also print the given usageMessage. -func (f *FlagSet) MarkShorthandDeprecated(name string, usageMessage string) error { - flag := f.Lookup(name) - if flag == nil { - return fmt.Errorf("flag %q does not exist", name) - } - if usageMessage == "" { - return fmt.Errorf("deprecated message for flag %q must be set", name) - } - flag.ShorthandDeprecated = usageMessage - return nil -} - -// MarkHidden sets a flag to 'hidden' in your program. It will continue to -// function but will not show up in help or usage messages. -func (f *FlagSet) MarkHidden(name string) error { - flag := f.Lookup(name) - if flag == nil { - return fmt.Errorf("flag %q does not exist", name) - } - flag.Hidden = true - return nil -} - -// Lookup returns the Flag structure of the named command-line flag, -// returning nil if none exists. -func Lookup(name string) *Flag { - return CommandLine.Lookup(name) -} - -// ShorthandLookup returns the Flag structure of the short handed flag, -// returning nil if none exists. -func ShorthandLookup(name string) *Flag { - return CommandLine.ShorthandLookup(name) -} - -// Set sets the value of the named flag. -func (f *FlagSet) Set(name, value string) error { - normalName := f.normalizeFlagName(name) - flag, ok := f.formal[normalName] - if !ok { - return fmt.Errorf("no such flag -%v", name) - } - - err := flag.Value.Set(value) - if err != nil { - var flagName string - if flag.Shorthand != "" && flag.ShorthandDeprecated == "" { - flagName = fmt.Sprintf("-%s, --%s", flag.Shorthand, flag.Name) - } else { - flagName = fmt.Sprintf("--%s", flag.Name) - } - return fmt.Errorf("invalid argument %q for %q flag: %v", value, flagName, err) - } - - if !flag.Changed { - if f.actual == nil { - f.actual = make(map[NormalizedName]*Flag) - } - f.actual[normalName] = flag - f.orderedActual = append(f.orderedActual, flag) - - flag.Changed = true - } - - if flag.Deprecated != "" { - fmt.Fprintf(f.out(), "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated) - } - return nil -} - -// SetAnnotation allows one to set arbitrary annotations on a flag in the FlagSet. -// This is sometimes used by spf13/cobra programs which want to generate additional -// bash completion information. -func (f *FlagSet) SetAnnotation(name, key string, values []string) error { - normalName := f.normalizeFlagName(name) - flag, ok := f.formal[normalName] - if !ok { - return fmt.Errorf("no such flag -%v", name) - } - if flag.Annotations == nil { - flag.Annotations = map[string][]string{} - } - flag.Annotations[key] = values - return nil -} - -// Changed returns true if the flag was explicitly set during Parse() and false -// otherwise -func (f *FlagSet) Changed(name string) bool { - flag := f.Lookup(name) - // If a flag doesn't exist, it wasn't changed.... - if flag == nil { - return false - } - return flag.Changed -} - -// Set sets the value of the named command-line flag. -func Set(name, value string) error { - return CommandLine.Set(name, value) -} - -// PrintDefaults prints, to standard error unless configured -// otherwise, the default values of all defined flags in the set. -func (f *FlagSet) PrintDefaults() { - usages := f.FlagUsages() - fmt.Fprint(f.out(), usages) -} - -// defaultIsZeroValue returns true if the default value for this flag represents -// a zero value. -func (f *Flag) defaultIsZeroValue() bool { - switch f.Value.(type) { - case boolFlag: - return f.DefValue == "false" - case *durationValue: - // Beginning in Go 1.7, duration zero values are "0s" - return f.DefValue == "0" || f.DefValue == "0s" - case *intValue, *int8Value, *int32Value, *int64Value, *uintValue, *uint8Value, *uint16Value, *uint32Value, *uint64Value, *countValue, *float32Value, *float64Value: - return f.DefValue == "0" - case *stringValue: - return f.DefValue == "" - case *ipValue, *ipMaskValue, *ipNetValue: - return f.DefValue == "" - case *intSliceValue, *stringSliceValue, *stringArrayValue: - return f.DefValue == "[]" - default: - switch f.Value.String() { - case "false": - return true - case "": - return true - case "": - return true - case "0": - return true - } - return false - } -} - -// UnquoteUsage extracts a back-quoted name from the usage -// string for a flag and returns it and the un-quoted usage. -// Given "a `name` to show" it returns ("name", "a name to show"). -// If there are no back quotes, the name is an educated guess of the -// type of the flag's value, or the empty string if the flag is boolean. -func UnquoteUsage(flag *Flag) (name string, usage string) { - // Look for a back-quoted name, but avoid the strings package. - usage = flag.Usage - for i := 0; i < len(usage); i++ { - if usage[i] == '`' { - for j := i + 1; j < len(usage); j++ { - if usage[j] == '`' { - name = usage[i+1 : j] - usage = usage[:i] + name + usage[j+1:] - return name, usage - } - } - break // Only one back quote; use type name. - } - } - - name = flag.Value.Type() - switch name { - case "bool": - name = "" - case "float64": - name = "float" - case "int64": - name = "int" - case "uint64": - name = "uint" - case "stringSlice": - name = "strings" - case "intSlice": - name = "ints" - case "uintSlice": - name = "uints" - case "boolSlice": - name = "bools" - } - - return -} - -// Splits the string `s` on whitespace into an initial substring up to -// `i` runes in length and the remainder. Will go `slop` over `i` if -// that encompasses the entire string (which allows the caller to -// avoid short orphan words on the final line). -func wrapN(i, slop int, s string) (string, string) { - if i+slop > len(s) { - return s, "" - } - - w := strings.LastIndexAny(s[:i], " \t\n") - if w <= 0 { - return s, "" - } - nlPos := strings.LastIndex(s[:i], "\n") - if nlPos > 0 && nlPos < w { - return s[:nlPos], s[nlPos+1:] - } - return s[:w], s[w+1:] -} - -// Wraps the string `s` to a maximum width `w` with leading indent -// `i`. The first line is not indented (this is assumed to be done by -// caller). Pass `w` == 0 to do no wrapping -func wrap(i, w int, s string) string { - if w == 0 { - return strings.Replace(s, "\n", "\n"+strings.Repeat(" ", i), -1) - } - - // space between indent i and end of line width w into which - // we should wrap the text. - wrap := w - i - - var r, l string - - // Not enough space for sensible wrapping. Wrap as a block on - // the next line instead. - if wrap < 24 { - i = 16 - wrap = w - i - r += "\n" + strings.Repeat(" ", i) - } - // If still not enough space then don't even try to wrap. - if wrap < 24 { - return strings.Replace(s, "\n", r, -1) - } - - // Try to avoid short orphan words on the final line, by - // allowing wrapN to go a bit over if that would fit in the - // remainder of the line. - slop := 5 - wrap = wrap - slop - - // Handle first line, which is indented by the caller (or the - // special case above) - l, s = wrapN(wrap, slop, s) - r = r + strings.Replace(l, "\n", "\n"+strings.Repeat(" ", i), -1) - - // Now wrap the rest - for s != "" { - var t string - - t, s = wrapN(wrap, slop, s) - r = r + "\n" + strings.Repeat(" ", i) + strings.Replace(t, "\n", "\n"+strings.Repeat(" ", i), -1) - } - - return r - -} - -// FlagUsagesWrapped returns a string containing the usage information -// for all flags in the FlagSet. Wrapped to `cols` columns (0 for no -// wrapping) -func (f *FlagSet) FlagUsagesWrapped(cols int) string { - buf := new(bytes.Buffer) - - lines := make([]string, 0, len(f.formal)) - - maxlen := 0 - f.VisitAll(func(flag *Flag) { - if flag.Hidden { - return - } - - line := "" - if flag.Shorthand != "" && flag.ShorthandDeprecated == "" { - line = fmt.Sprintf(" -%s, --%s", flag.Shorthand, flag.Name) - } else { - line = fmt.Sprintf(" --%s", flag.Name) - } - - varname, usage := UnquoteUsage(flag) - if varname != "" { - line += " " + varname - } - if flag.NoOptDefVal != "" { - switch flag.Value.Type() { - case "string": - line += fmt.Sprintf("[=\"%s\"]", flag.NoOptDefVal) - case "bool": - if flag.NoOptDefVal != "true" { - line += fmt.Sprintf("[=%s]", flag.NoOptDefVal) - } - case "count": - if flag.NoOptDefVal != "+1" { - line += fmt.Sprintf("[=%s]", flag.NoOptDefVal) - } - default: - line += fmt.Sprintf("[=%s]", flag.NoOptDefVal) - } - } - - // This special character will be replaced with spacing once the - // correct alignment is calculated - line += "\x00" - if len(line) > maxlen { - maxlen = len(line) - } - - line += usage - if !flag.defaultIsZeroValue() { - if flag.Value.Type() == "string" { - line += fmt.Sprintf(" (default %q)", flag.DefValue) - } else { - line += fmt.Sprintf(" (default %s)", flag.DefValue) - } - } - if len(flag.Deprecated) != 0 { - line += fmt.Sprintf(" (DEPRECATED: %s)", flag.Deprecated) - } - - lines = append(lines, line) - }) - - for _, line := range lines { - sidx := strings.Index(line, "\x00") - spacing := strings.Repeat(" ", maxlen-sidx) - // maxlen + 2 comes from + 1 for the \x00 and + 1 for the (deliberate) off-by-one in maxlen-sidx - fmt.Fprintln(buf, line[:sidx], spacing, wrap(maxlen+2, cols, line[sidx+1:])) - } - - return buf.String() -} - -// FlagUsages returns a string containing the usage information for all flags in -// the FlagSet -func (f *FlagSet) FlagUsages() string { - return f.FlagUsagesWrapped(0) -} - -// PrintDefaults prints to standard error the default values of all defined command-line flags. -func PrintDefaults() { - CommandLine.PrintDefaults() -} - -// defaultUsage is the default function to print a usage message. -func defaultUsage(f *FlagSet) { - fmt.Fprintf(f.out(), "Usage of %s:\n", f.name) - f.PrintDefaults() -} - -// NOTE: Usage is not just defaultUsage(CommandLine) -// because it serves (via godoc flag Usage) as the example -// for how to write your own usage function. - -// Usage prints to standard error a usage message documenting all defined command-line flags. -// The function is a variable that may be changed to point to a custom function. -// By default it prints a simple header and calls PrintDefaults; for details about the -// format of the output and how to control it, see the documentation for PrintDefaults. -var Usage = func() { - fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0]) - PrintDefaults() -} - -// NFlag returns the number of flags that have been set. -func (f *FlagSet) NFlag() int { return len(f.actual) } - -// NFlag returns the number of command-line flags that have been set. -func NFlag() int { return len(CommandLine.actual) } - -// Arg returns the i'th argument. Arg(0) is the first remaining argument -// after flags have been processed. -func (f *FlagSet) Arg(i int) string { - if i < 0 || i >= len(f.args) { - return "" - } - return f.args[i] -} - -// Arg returns the i'th command-line argument. Arg(0) is the first remaining argument -// after flags have been processed. -func Arg(i int) string { - return CommandLine.Arg(i) -} - -// NArg is the number of arguments remaining after flags have been processed. -func (f *FlagSet) NArg() int { return len(f.args) } - -// NArg is the number of arguments remaining after flags have been processed. -func NArg() int { return len(CommandLine.args) } - -// Args returns the non-flag arguments. -func (f *FlagSet) Args() []string { return f.args } - -// Args returns the non-flag command-line arguments. -func Args() []string { return CommandLine.args } - -// Var defines a flag with the specified name and usage string. The type and -// value of the flag are represented by the first argument, of type Value, which -// typically holds a user-defined implementation of Value. For instance, the -// caller could create a flag that turns a comma-separated string into a slice -// of strings by giving the slice the methods of Value; in particular, Set would -// decompose the comma-separated string into the slice. -func (f *FlagSet) Var(value Value, name string, usage string) { - f.VarP(value, name, "", usage) -} - -// VarPF is like VarP, but returns the flag created -func (f *FlagSet) VarPF(value Value, name, shorthand, usage string) *Flag { - // Remember the default value as a string; it won't change. - flag := &Flag{ - Name: name, - Shorthand: shorthand, - Usage: usage, - Value: value, - DefValue: value.String(), - } - f.AddFlag(flag) - return flag -} - -// VarP is like Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) VarP(value Value, name, shorthand, usage string) { - f.VarPF(value, name, shorthand, usage) -} - -// AddFlag will add the flag to the FlagSet -func (f *FlagSet) AddFlag(flag *Flag) { - normalizedFlagName := f.normalizeFlagName(flag.Name) - - _, alreadyThere := f.formal[normalizedFlagName] - if alreadyThere { - msg := fmt.Sprintf("%s flag redefined: %s", f.name, flag.Name) - fmt.Fprintln(f.out(), msg) - panic(msg) // Happens only if flags are declared with identical names - } - if f.formal == nil { - f.formal = make(map[NormalizedName]*Flag) - } - - flag.Name = string(normalizedFlagName) - f.formal[normalizedFlagName] = flag - f.orderedFormal = append(f.orderedFormal, flag) - - if flag.Shorthand == "" { - return - } - if len(flag.Shorthand) > 1 { - msg := fmt.Sprintf("%q shorthand is more than one ASCII character", flag.Shorthand) - fmt.Fprintf(f.out(), msg) - panic(msg) - } - if f.shorthands == nil { - f.shorthands = make(map[byte]*Flag) - } - c := flag.Shorthand[0] - used, alreadyThere := f.shorthands[c] - if alreadyThere { - msg := fmt.Sprintf("unable to redefine %q shorthand in %q flagset: it's already used for %q flag", c, f.name, used.Name) - fmt.Fprintf(f.out(), msg) - panic(msg) - } - f.shorthands[c] = flag -} - -// AddFlagSet adds one FlagSet to another. If a flag is already present in f -// the flag from newSet will be ignored. -func (f *FlagSet) AddFlagSet(newSet *FlagSet) { - if newSet == nil { - return - } - newSet.VisitAll(func(flag *Flag) { - if f.Lookup(flag.Name) == nil { - f.AddFlag(flag) - } - }) -} - -// Var defines a flag with the specified name and usage string. The type and -// value of the flag are represented by the first argument, of type Value, which -// typically holds a user-defined implementation of Value. For instance, the -// caller could create a flag that turns a comma-separated string into a slice -// of strings by giving the slice the methods of Value; in particular, Set would -// decompose the comma-separated string into the slice. -func Var(value Value, name string, usage string) { - CommandLine.VarP(value, name, "", usage) -} - -// VarP is like Var, but accepts a shorthand letter that can be used after a single dash. -func VarP(value Value, name, shorthand, usage string) { - CommandLine.VarP(value, name, shorthand, usage) -} - -// failf prints to standard error a formatted error and usage message and -// returns the error. -func (f *FlagSet) failf(format string, a ...interface{}) error { - err := fmt.Errorf(format, a...) - if f.errorHandling != ContinueOnError { - fmt.Fprintln(f.out(), err) - f.usage() - } - return err -} - -// usage calls the Usage method for the flag set, or the usage function if -// the flag set is CommandLine. -func (f *FlagSet) usage() { - if f == CommandLine { - Usage() - } else if f.Usage == nil { - defaultUsage(f) - } else { - f.Usage() - } -} - -//--unknown (args will be empty) -//--unknown --next-flag ... (args will be --next-flag ...) -//--unknown arg ... (args will be arg ...) -func stripUnknownFlagValue(args []string) []string { - if len(args) == 0 { - //--unknown - return args - } - - first := args[0] - if len(first) > 0 && first[0] == '-' { - //--unknown --next-flag ... - return args - } - - //--unknown arg ... (args will be arg ...) - if len(args) > 1 { - return args[1:] - } - return nil -} - -func (f *FlagSet) parseLongArg(s string, args []string, fn parseFunc) (a []string, err error) { - a = args - name := s[2:] - if len(name) == 0 || name[0] == '-' || name[0] == '=' { - err = f.failf("bad flag syntax: %s", s) - return - } - - split := strings.SplitN(name, "=", 2) - name = split[0] - flag, exists := f.formal[f.normalizeFlagName(name)] - - if !exists { - switch { - case name == "help": - f.usage() - return a, ErrHelp - case f.ParseErrorsWhitelist.UnknownFlags: - // --unknown=unknownval arg ... - // we do not want to lose arg in this case - if len(split) >= 2 { - return a, nil - } - - return stripUnknownFlagValue(a), nil - default: - err = f.failf("unknown flag: --%s", name) - return - } - } - - var value string - if len(split) == 2 { - // '--flag=arg' - value = split[1] - } else if flag.NoOptDefVal != "" { - // '--flag' (arg was optional) - value = flag.NoOptDefVal - } else if len(a) > 0 { - // '--flag arg' - value = a[0] - a = a[1:] - } else { - // '--flag' (arg was required) - err = f.failf("flag needs an argument: %s", s) - return - } - - err = fn(flag, value) - if err != nil { - f.failf(err.Error()) - } - return -} - -func (f *FlagSet) parseSingleShortArg(shorthands string, args []string, fn parseFunc) (outShorts string, outArgs []string, err error) { - outArgs = args - - if strings.HasPrefix(shorthands, "test.") { - return - } - - outShorts = shorthands[1:] - c := shorthands[0] - - flag, exists := f.shorthands[c] - if !exists { - switch { - case c == 'h': - f.usage() - err = ErrHelp - return - case f.ParseErrorsWhitelist.UnknownFlags: - // '-f=arg arg ...' - // we do not want to lose arg in this case - if len(shorthands) > 2 && shorthands[1] == '=' { - outShorts = "" - return - } - - outArgs = stripUnknownFlagValue(outArgs) - return - default: - err = f.failf("unknown shorthand flag: %q in -%s", c, shorthands) - return - } - } - - var value string - if len(shorthands) > 2 && shorthands[1] == '=' { - // '-f=arg' - value = shorthands[2:] - outShorts = "" - } else if flag.NoOptDefVal != "" { - // '-f' (arg was optional) - value = flag.NoOptDefVal - } else if len(shorthands) > 1 { - // '-farg' - value = shorthands[1:] - outShorts = "" - } else if len(args) > 0 { - // '-f arg' - value = args[0] - outArgs = args[1:] - } else { - // '-f' (arg was required) - err = f.failf("flag needs an argument: %q in -%s", c, shorthands) - return - } - - if flag.ShorthandDeprecated != "" { - fmt.Fprintf(f.out(), "Flag shorthand -%s has been deprecated, %s\n", flag.Shorthand, flag.ShorthandDeprecated) - } - - err = fn(flag, value) - if err != nil { - f.failf(err.Error()) - } - return -} - -func (f *FlagSet) parseShortArg(s string, args []string, fn parseFunc) (a []string, err error) { - a = args - shorthands := s[1:] - - // "shorthands" can be a series of shorthand letters of flags (e.g. "-vvv"). - for len(shorthands) > 0 { - shorthands, a, err = f.parseSingleShortArg(shorthands, args, fn) - if err != nil { - return - } - } - - return -} - -func (f *FlagSet) parseArgs(args []string, fn parseFunc) (err error) { - for len(args) > 0 { - s := args[0] - args = args[1:] - if len(s) == 0 || s[0] != '-' || len(s) == 1 { - if !f.interspersed { - f.args = append(f.args, s) - f.args = append(f.args, args...) - return nil - } - f.args = append(f.args, s) - continue - } - - if s[1] == '-' { - if len(s) == 2 { // "--" terminates the flags - f.argsLenAtDash = len(f.args) - f.args = append(f.args, args...) - break - } - args, err = f.parseLongArg(s, args, fn) - } else { - args, err = f.parseShortArg(s, args, fn) - } - if err != nil { - return - } - } - return -} - -// Parse parses flag definitions from the argument list, which should not -// include the command name. Must be called after all flags in the FlagSet -// are defined and before flags are accessed by the program. -// The return value will be ErrHelp if -help was set but not defined. -func (f *FlagSet) Parse(arguments []string) error { - if f.addedGoFlagSets != nil { - for _, goFlagSet := range f.addedGoFlagSets { - goFlagSet.Parse(nil) - } - } - f.parsed = true - - if len(arguments) < 0 { - return nil - } - - f.args = make([]string, 0, len(arguments)) - - set := func(flag *Flag, value string) error { - return f.Set(flag.Name, value) - } - - err := f.parseArgs(arguments, set) - if err != nil { - switch f.errorHandling { - case ContinueOnError: - return err - case ExitOnError: - fmt.Println(err) - os.Exit(2) - case PanicOnError: - panic(err) - } - } - return nil -} - -type parseFunc func(flag *Flag, value string) error - -// ParseAll parses flag definitions from the argument list, which should not -// include the command name. The arguments for fn are flag and value. Must be -// called after all flags in the FlagSet are defined and before flags are -// accessed by the program. The return value will be ErrHelp if -help was set -// but not defined. -func (f *FlagSet) ParseAll(arguments []string, fn func(flag *Flag, value string) error) error { - f.parsed = true - f.args = make([]string, 0, len(arguments)) - - err := f.parseArgs(arguments, fn) - if err != nil { - switch f.errorHandling { - case ContinueOnError: - return err - case ExitOnError: - os.Exit(2) - case PanicOnError: - panic(err) - } - } - return nil -} - -// Parsed reports whether f.Parse has been called. -func (f *FlagSet) Parsed() bool { - return f.parsed -} - -// Parse parses the command-line flags from os.Args[1:]. Must be called -// after all flags are defined and before flags are accessed by the program. -func Parse() { - // Ignore errors; CommandLine is set for ExitOnError. - CommandLine.Parse(os.Args[1:]) -} - -// ParseAll parses the command-line flags from os.Args[1:] and called fn for each. -// The arguments for fn are flag and value. Must be called after all flags are -// defined and before flags are accessed by the program. -func ParseAll(fn func(flag *Flag, value string) error) { - // Ignore errors; CommandLine is set for ExitOnError. - CommandLine.ParseAll(os.Args[1:], fn) -} - -// SetInterspersed sets whether to support interspersed option/non-option arguments. -func SetInterspersed(interspersed bool) { - CommandLine.SetInterspersed(interspersed) -} - -// Parsed returns true if the command-line flags have been parsed. -func Parsed() bool { - return CommandLine.Parsed() -} - -// CommandLine is the default set of command-line flags, parsed from os.Args. -var CommandLine = NewFlagSet(os.Args[0], ExitOnError) - -// NewFlagSet returns a new, empty flag set with the specified name, -// error handling property and SortFlags set to true. -func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet { - f := &FlagSet{ - name: name, - errorHandling: errorHandling, - argsLenAtDash: -1, - interspersed: true, - SortFlags: true, - } - return f -} - -// SetInterspersed sets whether to support interspersed option/non-option arguments. -func (f *FlagSet) SetInterspersed(interspersed bool) { - f.interspersed = interspersed -} - -// Init sets the name and error handling property for a flag set. -// By default, the zero FlagSet uses an empty name and the -// ContinueOnError error handling policy. -func (f *FlagSet) Init(name string, errorHandling ErrorHandling) { - f.name = name - f.errorHandling = errorHandling - f.argsLenAtDash = -1 -} diff --git a/vendor/github.com/spf13/pflag/float32.go b/vendor/github.com/spf13/pflag/float32.go deleted file mode 100644 index a243f81..0000000 --- a/vendor/github.com/spf13/pflag/float32.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- float32 Value -type float32Value float32 - -func newFloat32Value(val float32, p *float32) *float32Value { - *p = val - return (*float32Value)(p) -} - -func (f *float32Value) Set(s string) error { - v, err := strconv.ParseFloat(s, 32) - *f = float32Value(v) - return err -} - -func (f *float32Value) Type() string { - return "float32" -} - -func (f *float32Value) String() string { return strconv.FormatFloat(float64(*f), 'g', -1, 32) } - -func float32Conv(sval string) (interface{}, error) { - v, err := strconv.ParseFloat(sval, 32) - if err != nil { - return 0, err - } - return float32(v), nil -} - -// GetFloat32 return the float32 value of a flag with the given name -func (f *FlagSet) GetFloat32(name string) (float32, error) { - val, err := f.getFlagType(name, "float32", float32Conv) - if err != nil { - return 0, err - } - return val.(float32), nil -} - -// Float32Var defines a float32 flag with specified name, default value, and usage string. -// The argument p points to a float32 variable in which to store the value of the flag. -func (f *FlagSet) Float32Var(p *float32, name string, value float32, usage string) { - f.VarP(newFloat32Value(value, p), name, "", usage) -} - -// Float32VarP is like Float32Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float32VarP(p *float32, name, shorthand string, value float32, usage string) { - f.VarP(newFloat32Value(value, p), name, shorthand, usage) -} - -// Float32Var defines a float32 flag with specified name, default value, and usage string. -// The argument p points to a float32 variable in which to store the value of the flag. -func Float32Var(p *float32, name string, value float32, usage string) { - CommandLine.VarP(newFloat32Value(value, p), name, "", usage) -} - -// Float32VarP is like Float32Var, but accepts a shorthand letter that can be used after a single dash. -func Float32VarP(p *float32, name, shorthand string, value float32, usage string) { - CommandLine.VarP(newFloat32Value(value, p), name, shorthand, usage) -} - -// Float32 defines a float32 flag with specified name, default value, and usage string. -// The return value is the address of a float32 variable that stores the value of the flag. -func (f *FlagSet) Float32(name string, value float32, usage string) *float32 { - p := new(float32) - f.Float32VarP(p, name, "", value, usage) - return p -} - -// Float32P is like Float32, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float32P(name, shorthand string, value float32, usage string) *float32 { - p := new(float32) - f.Float32VarP(p, name, shorthand, value, usage) - return p -} - -// Float32 defines a float32 flag with specified name, default value, and usage string. -// The return value is the address of a float32 variable that stores the value of the flag. -func Float32(name string, value float32, usage string) *float32 { - return CommandLine.Float32P(name, "", value, usage) -} - -// Float32P is like Float32, but accepts a shorthand letter that can be used after a single dash. -func Float32P(name, shorthand string, value float32, usage string) *float32 { - return CommandLine.Float32P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/float32_slice.go b/vendor/github.com/spf13/pflag/float32_slice.go deleted file mode 100644 index caa3527..0000000 --- a/vendor/github.com/spf13/pflag/float32_slice.go +++ /dev/null @@ -1,174 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" -) - -// -- float32Slice Value -type float32SliceValue struct { - value *[]float32 - changed bool -} - -func newFloat32SliceValue(val []float32, p *[]float32) *float32SliceValue { - isv := new(float32SliceValue) - isv.value = p - *isv.value = val - return isv -} - -func (s *float32SliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]float32, len(ss)) - for i, d := range ss { - var err error - var temp64 float64 - temp64, err = strconv.ParseFloat(d, 32) - if err != nil { - return err - } - out[i] = float32(temp64) - - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *float32SliceValue) Type() string { - return "float32Slice" -} - -func (s *float32SliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%f", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *float32SliceValue) fromString(val string) (float32, error) { - t64, err := strconv.ParseFloat(val, 32) - if err != nil { - return 0, err - } - return float32(t64), nil -} - -func (s *float32SliceValue) toString(val float32) string { - return fmt.Sprintf("%f", val) -} - -func (s *float32SliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *float32SliceValue) Replace(val []string) error { - out := make([]float32, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *float32SliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func float32SliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []float32{}, nil - } - ss := strings.Split(val, ",") - out := make([]float32, len(ss)) - for i, d := range ss { - var err error - var temp64 float64 - temp64, err = strconv.ParseFloat(d, 32) - if err != nil { - return nil, err - } - out[i] = float32(temp64) - - } - return out, nil -} - -// GetFloat32Slice return the []float32 value of a flag with the given name -func (f *FlagSet) GetFloat32Slice(name string) ([]float32, error) { - val, err := f.getFlagType(name, "float32Slice", float32SliceConv) - if err != nil { - return []float32{}, err - } - return val.([]float32), nil -} - -// Float32SliceVar defines a float32Slice flag with specified name, default value, and usage string. -// The argument p points to a []float32 variable in which to store the value of the flag. -func (f *FlagSet) Float32SliceVar(p *[]float32, name string, value []float32, usage string) { - f.VarP(newFloat32SliceValue(value, p), name, "", usage) -} - -// Float32SliceVarP is like Float32SliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float32SliceVarP(p *[]float32, name, shorthand string, value []float32, usage string) { - f.VarP(newFloat32SliceValue(value, p), name, shorthand, usage) -} - -// Float32SliceVar defines a float32[] flag with specified name, default value, and usage string. -// The argument p points to a float32[] variable in which to store the value of the flag. -func Float32SliceVar(p *[]float32, name string, value []float32, usage string) { - CommandLine.VarP(newFloat32SliceValue(value, p), name, "", usage) -} - -// Float32SliceVarP is like Float32SliceVar, but accepts a shorthand letter that can be used after a single dash. -func Float32SliceVarP(p *[]float32, name, shorthand string, value []float32, usage string) { - CommandLine.VarP(newFloat32SliceValue(value, p), name, shorthand, usage) -} - -// Float32Slice defines a []float32 flag with specified name, default value, and usage string. -// The return value is the address of a []float32 variable that stores the value of the flag. -func (f *FlagSet) Float32Slice(name string, value []float32, usage string) *[]float32 { - p := []float32{} - f.Float32SliceVarP(&p, name, "", value, usage) - return &p -} - -// Float32SliceP is like Float32Slice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float32SliceP(name, shorthand string, value []float32, usage string) *[]float32 { - p := []float32{} - f.Float32SliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// Float32Slice defines a []float32 flag with specified name, default value, and usage string. -// The return value is the address of a []float32 variable that stores the value of the flag. -func Float32Slice(name string, value []float32, usage string) *[]float32 { - return CommandLine.Float32SliceP(name, "", value, usage) -} - -// Float32SliceP is like Float32Slice, but accepts a shorthand letter that can be used after a single dash. -func Float32SliceP(name, shorthand string, value []float32, usage string) *[]float32 { - return CommandLine.Float32SliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/float64.go b/vendor/github.com/spf13/pflag/float64.go deleted file mode 100644 index 04b5492..0000000 --- a/vendor/github.com/spf13/pflag/float64.go +++ /dev/null @@ -1,84 +0,0 @@ -package pflag - -import "strconv" - -// -- float64 Value -type float64Value float64 - -func newFloat64Value(val float64, p *float64) *float64Value { - *p = val - return (*float64Value)(p) -} - -func (f *float64Value) Set(s string) error { - v, err := strconv.ParseFloat(s, 64) - *f = float64Value(v) - return err -} - -func (f *float64Value) Type() string { - return "float64" -} - -func (f *float64Value) String() string { return strconv.FormatFloat(float64(*f), 'g', -1, 64) } - -func float64Conv(sval string) (interface{}, error) { - return strconv.ParseFloat(sval, 64) -} - -// GetFloat64 return the float64 value of a flag with the given name -func (f *FlagSet) GetFloat64(name string) (float64, error) { - val, err := f.getFlagType(name, "float64", float64Conv) - if err != nil { - return 0, err - } - return val.(float64), nil -} - -// Float64Var defines a float64 flag with specified name, default value, and usage string. -// The argument p points to a float64 variable in which to store the value of the flag. -func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string) { - f.VarP(newFloat64Value(value, p), name, "", usage) -} - -// Float64VarP is like Float64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float64VarP(p *float64, name, shorthand string, value float64, usage string) { - f.VarP(newFloat64Value(value, p), name, shorthand, usage) -} - -// Float64Var defines a float64 flag with specified name, default value, and usage string. -// The argument p points to a float64 variable in which to store the value of the flag. -func Float64Var(p *float64, name string, value float64, usage string) { - CommandLine.VarP(newFloat64Value(value, p), name, "", usage) -} - -// Float64VarP is like Float64Var, but accepts a shorthand letter that can be used after a single dash. -func Float64VarP(p *float64, name, shorthand string, value float64, usage string) { - CommandLine.VarP(newFloat64Value(value, p), name, shorthand, usage) -} - -// Float64 defines a float64 flag with specified name, default value, and usage string. -// The return value is the address of a float64 variable that stores the value of the flag. -func (f *FlagSet) Float64(name string, value float64, usage string) *float64 { - p := new(float64) - f.Float64VarP(p, name, "", value, usage) - return p -} - -// Float64P is like Float64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float64P(name, shorthand string, value float64, usage string) *float64 { - p := new(float64) - f.Float64VarP(p, name, shorthand, value, usage) - return p -} - -// Float64 defines a float64 flag with specified name, default value, and usage string. -// The return value is the address of a float64 variable that stores the value of the flag. -func Float64(name string, value float64, usage string) *float64 { - return CommandLine.Float64P(name, "", value, usage) -} - -// Float64P is like Float64, but accepts a shorthand letter that can be used after a single dash. -func Float64P(name, shorthand string, value float64, usage string) *float64 { - return CommandLine.Float64P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/float64_slice.go b/vendor/github.com/spf13/pflag/float64_slice.go deleted file mode 100644 index 85bf307..0000000 --- a/vendor/github.com/spf13/pflag/float64_slice.go +++ /dev/null @@ -1,166 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" -) - -// -- float64Slice Value -type float64SliceValue struct { - value *[]float64 - changed bool -} - -func newFloat64SliceValue(val []float64, p *[]float64) *float64SliceValue { - isv := new(float64SliceValue) - isv.value = p - *isv.value = val - return isv -} - -func (s *float64SliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]float64, len(ss)) - for i, d := range ss { - var err error - out[i], err = strconv.ParseFloat(d, 64) - if err != nil { - return err - } - - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *float64SliceValue) Type() string { - return "float64Slice" -} - -func (s *float64SliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%f", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *float64SliceValue) fromString(val string) (float64, error) { - return strconv.ParseFloat(val, 64) -} - -func (s *float64SliceValue) toString(val float64) string { - return fmt.Sprintf("%f", val) -} - -func (s *float64SliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *float64SliceValue) Replace(val []string) error { - out := make([]float64, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *float64SliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func float64SliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []float64{}, nil - } - ss := strings.Split(val, ",") - out := make([]float64, len(ss)) - for i, d := range ss { - var err error - out[i], err = strconv.ParseFloat(d, 64) - if err != nil { - return nil, err - } - - } - return out, nil -} - -// GetFloat64Slice return the []float64 value of a flag with the given name -func (f *FlagSet) GetFloat64Slice(name string) ([]float64, error) { - val, err := f.getFlagType(name, "float64Slice", float64SliceConv) - if err != nil { - return []float64{}, err - } - return val.([]float64), nil -} - -// Float64SliceVar defines a float64Slice flag with specified name, default value, and usage string. -// The argument p points to a []float64 variable in which to store the value of the flag. -func (f *FlagSet) Float64SliceVar(p *[]float64, name string, value []float64, usage string) { - f.VarP(newFloat64SliceValue(value, p), name, "", usage) -} - -// Float64SliceVarP is like Float64SliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float64SliceVarP(p *[]float64, name, shorthand string, value []float64, usage string) { - f.VarP(newFloat64SliceValue(value, p), name, shorthand, usage) -} - -// Float64SliceVar defines a float64[] flag with specified name, default value, and usage string. -// The argument p points to a float64[] variable in which to store the value of the flag. -func Float64SliceVar(p *[]float64, name string, value []float64, usage string) { - CommandLine.VarP(newFloat64SliceValue(value, p), name, "", usage) -} - -// Float64SliceVarP is like Float64SliceVar, but accepts a shorthand letter that can be used after a single dash. -func Float64SliceVarP(p *[]float64, name, shorthand string, value []float64, usage string) { - CommandLine.VarP(newFloat64SliceValue(value, p), name, shorthand, usage) -} - -// Float64Slice defines a []float64 flag with specified name, default value, and usage string. -// The return value is the address of a []float64 variable that stores the value of the flag. -func (f *FlagSet) Float64Slice(name string, value []float64, usage string) *[]float64 { - p := []float64{} - f.Float64SliceVarP(&p, name, "", value, usage) - return &p -} - -// Float64SliceP is like Float64Slice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float64SliceP(name, shorthand string, value []float64, usage string) *[]float64 { - p := []float64{} - f.Float64SliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// Float64Slice defines a []float64 flag with specified name, default value, and usage string. -// The return value is the address of a []float64 variable that stores the value of the flag. -func Float64Slice(name string, value []float64, usage string) *[]float64 { - return CommandLine.Float64SliceP(name, "", value, usage) -} - -// Float64SliceP is like Float64Slice, but accepts a shorthand letter that can be used after a single dash. -func Float64SliceP(name, shorthand string, value []float64, usage string) *[]float64 { - return CommandLine.Float64SliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/golangflag.go b/vendor/github.com/spf13/pflag/golangflag.go deleted file mode 100644 index d3dd72b..0000000 --- a/vendor/github.com/spf13/pflag/golangflag.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package pflag - -import ( - goflag "flag" - "reflect" - "strings" -) - -// flagValueWrapper implements pflag.Value around a flag.Value. The main -// difference here is the addition of the Type method that returns a string -// name of the type. As this is generally unknown, we approximate that with -// reflection. -type flagValueWrapper struct { - inner goflag.Value - flagType string -} - -// We are just copying the boolFlag interface out of goflag as that is what -// they use to decide if a flag should get "true" when no arg is given. -type goBoolFlag interface { - goflag.Value - IsBoolFlag() bool -} - -func wrapFlagValue(v goflag.Value) Value { - // If the flag.Value happens to also be a pflag.Value, just use it directly. - if pv, ok := v.(Value); ok { - return pv - } - - pv := &flagValueWrapper{ - inner: v, - } - - t := reflect.TypeOf(v) - if t.Kind() == reflect.Interface || t.Kind() == reflect.Ptr { - t = t.Elem() - } - - pv.flagType = strings.TrimSuffix(t.Name(), "Value") - return pv -} - -func (v *flagValueWrapper) String() string { - return v.inner.String() -} - -func (v *flagValueWrapper) Set(s string) error { - return v.inner.Set(s) -} - -func (v *flagValueWrapper) Type() string { - return v.flagType -} - -// PFlagFromGoFlag will return a *pflag.Flag given a *flag.Flag -// If the *flag.Flag.Name was a single character (ex: `v`) it will be accessiblei -// with both `-v` and `--v` in flags. If the golang flag was more than a single -// character (ex: `verbose`) it will only be accessible via `--verbose` -func PFlagFromGoFlag(goflag *goflag.Flag) *Flag { - // Remember the default value as a string; it won't change. - flag := &Flag{ - Name: goflag.Name, - Usage: goflag.Usage, - Value: wrapFlagValue(goflag.Value), - // Looks like golang flags don't set DefValue correctly :-( - //DefValue: goflag.DefValue, - DefValue: goflag.Value.String(), - } - // Ex: if the golang flag was -v, allow both -v and --v to work - if len(flag.Name) == 1 { - flag.Shorthand = flag.Name - } - if fv, ok := goflag.Value.(goBoolFlag); ok && fv.IsBoolFlag() { - flag.NoOptDefVal = "true" - } - return flag -} - -// AddGoFlag will add the given *flag.Flag to the pflag.FlagSet -func (f *FlagSet) AddGoFlag(goflag *goflag.Flag) { - if f.Lookup(goflag.Name) != nil { - return - } - newflag := PFlagFromGoFlag(goflag) - f.AddFlag(newflag) -} - -// AddGoFlagSet will add the given *flag.FlagSet to the pflag.FlagSet -func (f *FlagSet) AddGoFlagSet(newSet *goflag.FlagSet) { - if newSet == nil { - return - } - newSet.VisitAll(func(goflag *goflag.Flag) { - f.AddGoFlag(goflag) - }) - if f.addedGoFlagSets == nil { - f.addedGoFlagSets = make([]*goflag.FlagSet, 0) - } - f.addedGoFlagSets = append(f.addedGoFlagSets, newSet) -} diff --git a/vendor/github.com/spf13/pflag/int.go b/vendor/github.com/spf13/pflag/int.go deleted file mode 100644 index 1474b89..0000000 --- a/vendor/github.com/spf13/pflag/int.go +++ /dev/null @@ -1,84 +0,0 @@ -package pflag - -import "strconv" - -// -- int Value -type intValue int - -func newIntValue(val int, p *int) *intValue { - *p = val - return (*intValue)(p) -} - -func (i *intValue) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 64) - *i = intValue(v) - return err -} - -func (i *intValue) Type() string { - return "int" -} - -func (i *intValue) String() string { return strconv.Itoa(int(*i)) } - -func intConv(sval string) (interface{}, error) { - return strconv.Atoi(sval) -} - -// GetInt return the int value of a flag with the given name -func (f *FlagSet) GetInt(name string) (int, error) { - val, err := f.getFlagType(name, "int", intConv) - if err != nil { - return 0, err - } - return val.(int), nil -} - -// IntVar defines an int flag with specified name, default value, and usage string. -// The argument p points to an int variable in which to store the value of the flag. -func (f *FlagSet) IntVar(p *int, name string, value int, usage string) { - f.VarP(newIntValue(value, p), name, "", usage) -} - -// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IntVarP(p *int, name, shorthand string, value int, usage string) { - f.VarP(newIntValue(value, p), name, shorthand, usage) -} - -// IntVar defines an int flag with specified name, default value, and usage string. -// The argument p points to an int variable in which to store the value of the flag. -func IntVar(p *int, name string, value int, usage string) { - CommandLine.VarP(newIntValue(value, p), name, "", usage) -} - -// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash. -func IntVarP(p *int, name, shorthand string, value int, usage string) { - CommandLine.VarP(newIntValue(value, p), name, shorthand, usage) -} - -// Int defines an int flag with specified name, default value, and usage string. -// The return value is the address of an int variable that stores the value of the flag. -func (f *FlagSet) Int(name string, value int, usage string) *int { - p := new(int) - f.IntVarP(p, name, "", value, usage) - return p -} - -// IntP is like Int, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IntP(name, shorthand string, value int, usage string) *int { - p := new(int) - f.IntVarP(p, name, shorthand, value, usage) - return p -} - -// Int defines an int flag with specified name, default value, and usage string. -// The return value is the address of an int variable that stores the value of the flag. -func Int(name string, value int, usage string) *int { - return CommandLine.IntP(name, "", value, usage) -} - -// IntP is like Int, but accepts a shorthand letter that can be used after a single dash. -func IntP(name, shorthand string, value int, usage string) *int { - return CommandLine.IntP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int16.go b/vendor/github.com/spf13/pflag/int16.go deleted file mode 100644 index f1a01d0..0000000 --- a/vendor/github.com/spf13/pflag/int16.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- int16 Value -type int16Value int16 - -func newInt16Value(val int16, p *int16) *int16Value { - *p = val - return (*int16Value)(p) -} - -func (i *int16Value) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 16) - *i = int16Value(v) - return err -} - -func (i *int16Value) Type() string { - return "int16" -} - -func (i *int16Value) String() string { return strconv.FormatInt(int64(*i), 10) } - -func int16Conv(sval string) (interface{}, error) { - v, err := strconv.ParseInt(sval, 0, 16) - if err != nil { - return 0, err - } - return int16(v), nil -} - -// GetInt16 returns the int16 value of a flag with the given name -func (f *FlagSet) GetInt16(name string) (int16, error) { - val, err := f.getFlagType(name, "int16", int16Conv) - if err != nil { - return 0, err - } - return val.(int16), nil -} - -// Int16Var defines an int16 flag with specified name, default value, and usage string. -// The argument p points to an int16 variable in which to store the value of the flag. -func (f *FlagSet) Int16Var(p *int16, name string, value int16, usage string) { - f.VarP(newInt16Value(value, p), name, "", usage) -} - -// Int16VarP is like Int16Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int16VarP(p *int16, name, shorthand string, value int16, usage string) { - f.VarP(newInt16Value(value, p), name, shorthand, usage) -} - -// Int16Var defines an int16 flag with specified name, default value, and usage string. -// The argument p points to an int16 variable in which to store the value of the flag. -func Int16Var(p *int16, name string, value int16, usage string) { - CommandLine.VarP(newInt16Value(value, p), name, "", usage) -} - -// Int16VarP is like Int16Var, but accepts a shorthand letter that can be used after a single dash. -func Int16VarP(p *int16, name, shorthand string, value int16, usage string) { - CommandLine.VarP(newInt16Value(value, p), name, shorthand, usage) -} - -// Int16 defines an int16 flag with specified name, default value, and usage string. -// The return value is the address of an int16 variable that stores the value of the flag. -func (f *FlagSet) Int16(name string, value int16, usage string) *int16 { - p := new(int16) - f.Int16VarP(p, name, "", value, usage) - return p -} - -// Int16P is like Int16, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int16P(name, shorthand string, value int16, usage string) *int16 { - p := new(int16) - f.Int16VarP(p, name, shorthand, value, usage) - return p -} - -// Int16 defines an int16 flag with specified name, default value, and usage string. -// The return value is the address of an int16 variable that stores the value of the flag. -func Int16(name string, value int16, usage string) *int16 { - return CommandLine.Int16P(name, "", value, usage) -} - -// Int16P is like Int16, but accepts a shorthand letter that can be used after a single dash. -func Int16P(name, shorthand string, value int16, usage string) *int16 { - return CommandLine.Int16P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int32.go b/vendor/github.com/spf13/pflag/int32.go deleted file mode 100644 index 9b95944..0000000 --- a/vendor/github.com/spf13/pflag/int32.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- int32 Value -type int32Value int32 - -func newInt32Value(val int32, p *int32) *int32Value { - *p = val - return (*int32Value)(p) -} - -func (i *int32Value) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 32) - *i = int32Value(v) - return err -} - -func (i *int32Value) Type() string { - return "int32" -} - -func (i *int32Value) String() string { return strconv.FormatInt(int64(*i), 10) } - -func int32Conv(sval string) (interface{}, error) { - v, err := strconv.ParseInt(sval, 0, 32) - if err != nil { - return 0, err - } - return int32(v), nil -} - -// GetInt32 return the int32 value of a flag with the given name -func (f *FlagSet) GetInt32(name string) (int32, error) { - val, err := f.getFlagType(name, "int32", int32Conv) - if err != nil { - return 0, err - } - return val.(int32), nil -} - -// Int32Var defines an int32 flag with specified name, default value, and usage string. -// The argument p points to an int32 variable in which to store the value of the flag. -func (f *FlagSet) Int32Var(p *int32, name string, value int32, usage string) { - f.VarP(newInt32Value(value, p), name, "", usage) -} - -// Int32VarP is like Int32Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int32VarP(p *int32, name, shorthand string, value int32, usage string) { - f.VarP(newInt32Value(value, p), name, shorthand, usage) -} - -// Int32Var defines an int32 flag with specified name, default value, and usage string. -// The argument p points to an int32 variable in which to store the value of the flag. -func Int32Var(p *int32, name string, value int32, usage string) { - CommandLine.VarP(newInt32Value(value, p), name, "", usage) -} - -// Int32VarP is like Int32Var, but accepts a shorthand letter that can be used after a single dash. -func Int32VarP(p *int32, name, shorthand string, value int32, usage string) { - CommandLine.VarP(newInt32Value(value, p), name, shorthand, usage) -} - -// Int32 defines an int32 flag with specified name, default value, and usage string. -// The return value is the address of an int32 variable that stores the value of the flag. -func (f *FlagSet) Int32(name string, value int32, usage string) *int32 { - p := new(int32) - f.Int32VarP(p, name, "", value, usage) - return p -} - -// Int32P is like Int32, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int32P(name, shorthand string, value int32, usage string) *int32 { - p := new(int32) - f.Int32VarP(p, name, shorthand, value, usage) - return p -} - -// Int32 defines an int32 flag with specified name, default value, and usage string. -// The return value is the address of an int32 variable that stores the value of the flag. -func Int32(name string, value int32, usage string) *int32 { - return CommandLine.Int32P(name, "", value, usage) -} - -// Int32P is like Int32, but accepts a shorthand letter that can be used after a single dash. -func Int32P(name, shorthand string, value int32, usage string) *int32 { - return CommandLine.Int32P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int32_slice.go b/vendor/github.com/spf13/pflag/int32_slice.go deleted file mode 100644 index ff128ff..0000000 --- a/vendor/github.com/spf13/pflag/int32_slice.go +++ /dev/null @@ -1,174 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" -) - -// -- int32Slice Value -type int32SliceValue struct { - value *[]int32 - changed bool -} - -func newInt32SliceValue(val []int32, p *[]int32) *int32SliceValue { - isv := new(int32SliceValue) - isv.value = p - *isv.value = val - return isv -} - -func (s *int32SliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]int32, len(ss)) - for i, d := range ss { - var err error - var temp64 int64 - temp64, err = strconv.ParseInt(d, 0, 32) - if err != nil { - return err - } - out[i] = int32(temp64) - - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *int32SliceValue) Type() string { - return "int32Slice" -} - -func (s *int32SliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%d", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *int32SliceValue) fromString(val string) (int32, error) { - t64, err := strconv.ParseInt(val, 0, 32) - if err != nil { - return 0, err - } - return int32(t64), nil -} - -func (s *int32SliceValue) toString(val int32) string { - return fmt.Sprintf("%d", val) -} - -func (s *int32SliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *int32SliceValue) Replace(val []string) error { - out := make([]int32, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *int32SliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func int32SliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []int32{}, nil - } - ss := strings.Split(val, ",") - out := make([]int32, len(ss)) - for i, d := range ss { - var err error - var temp64 int64 - temp64, err = strconv.ParseInt(d, 0, 32) - if err != nil { - return nil, err - } - out[i] = int32(temp64) - - } - return out, nil -} - -// GetInt32Slice return the []int32 value of a flag with the given name -func (f *FlagSet) GetInt32Slice(name string) ([]int32, error) { - val, err := f.getFlagType(name, "int32Slice", int32SliceConv) - if err != nil { - return []int32{}, err - } - return val.([]int32), nil -} - -// Int32SliceVar defines a int32Slice flag with specified name, default value, and usage string. -// The argument p points to a []int32 variable in which to store the value of the flag. -func (f *FlagSet) Int32SliceVar(p *[]int32, name string, value []int32, usage string) { - f.VarP(newInt32SliceValue(value, p), name, "", usage) -} - -// Int32SliceVarP is like Int32SliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int32SliceVarP(p *[]int32, name, shorthand string, value []int32, usage string) { - f.VarP(newInt32SliceValue(value, p), name, shorthand, usage) -} - -// Int32SliceVar defines a int32[] flag with specified name, default value, and usage string. -// The argument p points to a int32[] variable in which to store the value of the flag. -func Int32SliceVar(p *[]int32, name string, value []int32, usage string) { - CommandLine.VarP(newInt32SliceValue(value, p), name, "", usage) -} - -// Int32SliceVarP is like Int32SliceVar, but accepts a shorthand letter that can be used after a single dash. -func Int32SliceVarP(p *[]int32, name, shorthand string, value []int32, usage string) { - CommandLine.VarP(newInt32SliceValue(value, p), name, shorthand, usage) -} - -// Int32Slice defines a []int32 flag with specified name, default value, and usage string. -// The return value is the address of a []int32 variable that stores the value of the flag. -func (f *FlagSet) Int32Slice(name string, value []int32, usage string) *[]int32 { - p := []int32{} - f.Int32SliceVarP(&p, name, "", value, usage) - return &p -} - -// Int32SliceP is like Int32Slice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int32SliceP(name, shorthand string, value []int32, usage string) *[]int32 { - p := []int32{} - f.Int32SliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// Int32Slice defines a []int32 flag with specified name, default value, and usage string. -// The return value is the address of a []int32 variable that stores the value of the flag. -func Int32Slice(name string, value []int32, usage string) *[]int32 { - return CommandLine.Int32SliceP(name, "", value, usage) -} - -// Int32SliceP is like Int32Slice, but accepts a shorthand letter that can be used after a single dash. -func Int32SliceP(name, shorthand string, value []int32, usage string) *[]int32 { - return CommandLine.Int32SliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int64.go b/vendor/github.com/spf13/pflag/int64.go deleted file mode 100644 index 0026d78..0000000 --- a/vendor/github.com/spf13/pflag/int64.go +++ /dev/null @@ -1,84 +0,0 @@ -package pflag - -import "strconv" - -// -- int64 Value -type int64Value int64 - -func newInt64Value(val int64, p *int64) *int64Value { - *p = val - return (*int64Value)(p) -} - -func (i *int64Value) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 64) - *i = int64Value(v) - return err -} - -func (i *int64Value) Type() string { - return "int64" -} - -func (i *int64Value) String() string { return strconv.FormatInt(int64(*i), 10) } - -func int64Conv(sval string) (interface{}, error) { - return strconv.ParseInt(sval, 0, 64) -} - -// GetInt64 return the int64 value of a flag with the given name -func (f *FlagSet) GetInt64(name string) (int64, error) { - val, err := f.getFlagType(name, "int64", int64Conv) - if err != nil { - return 0, err - } - return val.(int64), nil -} - -// Int64Var defines an int64 flag with specified name, default value, and usage string. -// The argument p points to an int64 variable in which to store the value of the flag. -func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string) { - f.VarP(newInt64Value(value, p), name, "", usage) -} - -// Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int64VarP(p *int64, name, shorthand string, value int64, usage string) { - f.VarP(newInt64Value(value, p), name, shorthand, usage) -} - -// Int64Var defines an int64 flag with specified name, default value, and usage string. -// The argument p points to an int64 variable in which to store the value of the flag. -func Int64Var(p *int64, name string, value int64, usage string) { - CommandLine.VarP(newInt64Value(value, p), name, "", usage) -} - -// Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash. -func Int64VarP(p *int64, name, shorthand string, value int64, usage string) { - CommandLine.VarP(newInt64Value(value, p), name, shorthand, usage) -} - -// Int64 defines an int64 flag with specified name, default value, and usage string. -// The return value is the address of an int64 variable that stores the value of the flag. -func (f *FlagSet) Int64(name string, value int64, usage string) *int64 { - p := new(int64) - f.Int64VarP(p, name, "", value, usage) - return p -} - -// Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int64P(name, shorthand string, value int64, usage string) *int64 { - p := new(int64) - f.Int64VarP(p, name, shorthand, value, usage) - return p -} - -// Int64 defines an int64 flag with specified name, default value, and usage string. -// The return value is the address of an int64 variable that stores the value of the flag. -func Int64(name string, value int64, usage string) *int64 { - return CommandLine.Int64P(name, "", value, usage) -} - -// Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash. -func Int64P(name, shorthand string, value int64, usage string) *int64 { - return CommandLine.Int64P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int64_slice.go b/vendor/github.com/spf13/pflag/int64_slice.go deleted file mode 100644 index 2546463..0000000 --- a/vendor/github.com/spf13/pflag/int64_slice.go +++ /dev/null @@ -1,166 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" -) - -// -- int64Slice Value -type int64SliceValue struct { - value *[]int64 - changed bool -} - -func newInt64SliceValue(val []int64, p *[]int64) *int64SliceValue { - isv := new(int64SliceValue) - isv.value = p - *isv.value = val - return isv -} - -func (s *int64SliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]int64, len(ss)) - for i, d := range ss { - var err error - out[i], err = strconv.ParseInt(d, 0, 64) - if err != nil { - return err - } - - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *int64SliceValue) Type() string { - return "int64Slice" -} - -func (s *int64SliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%d", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *int64SliceValue) fromString(val string) (int64, error) { - return strconv.ParseInt(val, 0, 64) -} - -func (s *int64SliceValue) toString(val int64) string { - return fmt.Sprintf("%d", val) -} - -func (s *int64SliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *int64SliceValue) Replace(val []string) error { - out := make([]int64, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *int64SliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func int64SliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []int64{}, nil - } - ss := strings.Split(val, ",") - out := make([]int64, len(ss)) - for i, d := range ss { - var err error - out[i], err = strconv.ParseInt(d, 0, 64) - if err != nil { - return nil, err - } - - } - return out, nil -} - -// GetInt64Slice return the []int64 value of a flag with the given name -func (f *FlagSet) GetInt64Slice(name string) ([]int64, error) { - val, err := f.getFlagType(name, "int64Slice", int64SliceConv) - if err != nil { - return []int64{}, err - } - return val.([]int64), nil -} - -// Int64SliceVar defines a int64Slice flag with specified name, default value, and usage string. -// The argument p points to a []int64 variable in which to store the value of the flag. -func (f *FlagSet) Int64SliceVar(p *[]int64, name string, value []int64, usage string) { - f.VarP(newInt64SliceValue(value, p), name, "", usage) -} - -// Int64SliceVarP is like Int64SliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int64SliceVarP(p *[]int64, name, shorthand string, value []int64, usage string) { - f.VarP(newInt64SliceValue(value, p), name, shorthand, usage) -} - -// Int64SliceVar defines a int64[] flag with specified name, default value, and usage string. -// The argument p points to a int64[] variable in which to store the value of the flag. -func Int64SliceVar(p *[]int64, name string, value []int64, usage string) { - CommandLine.VarP(newInt64SliceValue(value, p), name, "", usage) -} - -// Int64SliceVarP is like Int64SliceVar, but accepts a shorthand letter that can be used after a single dash. -func Int64SliceVarP(p *[]int64, name, shorthand string, value []int64, usage string) { - CommandLine.VarP(newInt64SliceValue(value, p), name, shorthand, usage) -} - -// Int64Slice defines a []int64 flag with specified name, default value, and usage string. -// The return value is the address of a []int64 variable that stores the value of the flag. -func (f *FlagSet) Int64Slice(name string, value []int64, usage string) *[]int64 { - p := []int64{} - f.Int64SliceVarP(&p, name, "", value, usage) - return &p -} - -// Int64SliceP is like Int64Slice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int64SliceP(name, shorthand string, value []int64, usage string) *[]int64 { - p := []int64{} - f.Int64SliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// Int64Slice defines a []int64 flag with specified name, default value, and usage string. -// The return value is the address of a []int64 variable that stores the value of the flag. -func Int64Slice(name string, value []int64, usage string) *[]int64 { - return CommandLine.Int64SliceP(name, "", value, usage) -} - -// Int64SliceP is like Int64Slice, but accepts a shorthand letter that can be used after a single dash. -func Int64SliceP(name, shorthand string, value []int64, usage string) *[]int64 { - return CommandLine.Int64SliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int8.go b/vendor/github.com/spf13/pflag/int8.go deleted file mode 100644 index 4da9222..0000000 --- a/vendor/github.com/spf13/pflag/int8.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- int8 Value -type int8Value int8 - -func newInt8Value(val int8, p *int8) *int8Value { - *p = val - return (*int8Value)(p) -} - -func (i *int8Value) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 8) - *i = int8Value(v) - return err -} - -func (i *int8Value) Type() string { - return "int8" -} - -func (i *int8Value) String() string { return strconv.FormatInt(int64(*i), 10) } - -func int8Conv(sval string) (interface{}, error) { - v, err := strconv.ParseInt(sval, 0, 8) - if err != nil { - return 0, err - } - return int8(v), nil -} - -// GetInt8 return the int8 value of a flag with the given name -func (f *FlagSet) GetInt8(name string) (int8, error) { - val, err := f.getFlagType(name, "int8", int8Conv) - if err != nil { - return 0, err - } - return val.(int8), nil -} - -// Int8Var defines an int8 flag with specified name, default value, and usage string. -// The argument p points to an int8 variable in which to store the value of the flag. -func (f *FlagSet) Int8Var(p *int8, name string, value int8, usage string) { - f.VarP(newInt8Value(value, p), name, "", usage) -} - -// Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int8VarP(p *int8, name, shorthand string, value int8, usage string) { - f.VarP(newInt8Value(value, p), name, shorthand, usage) -} - -// Int8Var defines an int8 flag with specified name, default value, and usage string. -// The argument p points to an int8 variable in which to store the value of the flag. -func Int8Var(p *int8, name string, value int8, usage string) { - CommandLine.VarP(newInt8Value(value, p), name, "", usage) -} - -// Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash. -func Int8VarP(p *int8, name, shorthand string, value int8, usage string) { - CommandLine.VarP(newInt8Value(value, p), name, shorthand, usage) -} - -// Int8 defines an int8 flag with specified name, default value, and usage string. -// The return value is the address of an int8 variable that stores the value of the flag. -func (f *FlagSet) Int8(name string, value int8, usage string) *int8 { - p := new(int8) - f.Int8VarP(p, name, "", value, usage) - return p -} - -// Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int8P(name, shorthand string, value int8, usage string) *int8 { - p := new(int8) - f.Int8VarP(p, name, shorthand, value, usage) - return p -} - -// Int8 defines an int8 flag with specified name, default value, and usage string. -// The return value is the address of an int8 variable that stores the value of the flag. -func Int8(name string, value int8, usage string) *int8 { - return CommandLine.Int8P(name, "", value, usage) -} - -// Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash. -func Int8P(name, shorthand string, value int8, usage string) *int8 { - return CommandLine.Int8P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/int_slice.go b/vendor/github.com/spf13/pflag/int_slice.go deleted file mode 100644 index e71c39d..0000000 --- a/vendor/github.com/spf13/pflag/int_slice.go +++ /dev/null @@ -1,158 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" -) - -// -- intSlice Value -type intSliceValue struct { - value *[]int - changed bool -} - -func newIntSliceValue(val []int, p *[]int) *intSliceValue { - isv := new(intSliceValue) - isv.value = p - *isv.value = val - return isv -} - -func (s *intSliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]int, len(ss)) - for i, d := range ss { - var err error - out[i], err = strconv.Atoi(d) - if err != nil { - return err - } - - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *intSliceValue) Type() string { - return "intSlice" -} - -func (s *intSliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%d", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *intSliceValue) Append(val string) error { - i, err := strconv.Atoi(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *intSliceValue) Replace(val []string) error { - out := make([]int, len(val)) - for i, d := range val { - var err error - out[i], err = strconv.Atoi(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *intSliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = strconv.Itoa(d) - } - return out -} - -func intSliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []int{}, nil - } - ss := strings.Split(val, ",") - out := make([]int, len(ss)) - for i, d := range ss { - var err error - out[i], err = strconv.Atoi(d) - if err != nil { - return nil, err - } - - } - return out, nil -} - -// GetIntSlice return the []int value of a flag with the given name -func (f *FlagSet) GetIntSlice(name string) ([]int, error) { - val, err := f.getFlagType(name, "intSlice", intSliceConv) - if err != nil { - return []int{}, err - } - return val.([]int), nil -} - -// IntSliceVar defines a intSlice flag with specified name, default value, and usage string. -// The argument p points to a []int variable in which to store the value of the flag. -func (f *FlagSet) IntSliceVar(p *[]int, name string, value []int, usage string) { - f.VarP(newIntSliceValue(value, p), name, "", usage) -} - -// IntSliceVarP is like IntSliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IntSliceVarP(p *[]int, name, shorthand string, value []int, usage string) { - f.VarP(newIntSliceValue(value, p), name, shorthand, usage) -} - -// IntSliceVar defines a int[] flag with specified name, default value, and usage string. -// The argument p points to a int[] variable in which to store the value of the flag. -func IntSliceVar(p *[]int, name string, value []int, usage string) { - CommandLine.VarP(newIntSliceValue(value, p), name, "", usage) -} - -// IntSliceVarP is like IntSliceVar, but accepts a shorthand letter that can be used after a single dash. -func IntSliceVarP(p *[]int, name, shorthand string, value []int, usage string) { - CommandLine.VarP(newIntSliceValue(value, p), name, shorthand, usage) -} - -// IntSlice defines a []int flag with specified name, default value, and usage string. -// The return value is the address of a []int variable that stores the value of the flag. -func (f *FlagSet) IntSlice(name string, value []int, usage string) *[]int { - p := []int{} - f.IntSliceVarP(&p, name, "", value, usage) - return &p -} - -// IntSliceP is like IntSlice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IntSliceP(name, shorthand string, value []int, usage string) *[]int { - p := []int{} - f.IntSliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// IntSlice defines a []int flag with specified name, default value, and usage string. -// The return value is the address of a []int variable that stores the value of the flag. -func IntSlice(name string, value []int, usage string) *[]int { - return CommandLine.IntSliceP(name, "", value, usage) -} - -// IntSliceP is like IntSlice, but accepts a shorthand letter that can be used after a single dash. -func IntSliceP(name, shorthand string, value []int, usage string) *[]int { - return CommandLine.IntSliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/ip.go b/vendor/github.com/spf13/pflag/ip.go deleted file mode 100644 index 3d414ba..0000000 --- a/vendor/github.com/spf13/pflag/ip.go +++ /dev/null @@ -1,94 +0,0 @@ -package pflag - -import ( - "fmt" - "net" - "strings" -) - -// -- net.IP value -type ipValue net.IP - -func newIPValue(val net.IP, p *net.IP) *ipValue { - *p = val - return (*ipValue)(p) -} - -func (i *ipValue) String() string { return net.IP(*i).String() } -func (i *ipValue) Set(s string) error { - ip := net.ParseIP(strings.TrimSpace(s)) - if ip == nil { - return fmt.Errorf("failed to parse IP: %q", s) - } - *i = ipValue(ip) - return nil -} - -func (i *ipValue) Type() string { - return "ip" -} - -func ipConv(sval string) (interface{}, error) { - ip := net.ParseIP(sval) - if ip != nil { - return ip, nil - } - return nil, fmt.Errorf("invalid string being converted to IP address: %s", sval) -} - -// GetIP return the net.IP value of a flag with the given name -func (f *FlagSet) GetIP(name string) (net.IP, error) { - val, err := f.getFlagType(name, "ip", ipConv) - if err != nil { - return nil, err - } - return val.(net.IP), nil -} - -// IPVar defines an net.IP flag with specified name, default value, and usage string. -// The argument p points to an net.IP variable in which to store the value of the flag. -func (f *FlagSet) IPVar(p *net.IP, name string, value net.IP, usage string) { - f.VarP(newIPValue(value, p), name, "", usage) -} - -// IPVarP is like IPVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string) { - f.VarP(newIPValue(value, p), name, shorthand, usage) -} - -// IPVar defines an net.IP flag with specified name, default value, and usage string. -// The argument p points to an net.IP variable in which to store the value of the flag. -func IPVar(p *net.IP, name string, value net.IP, usage string) { - CommandLine.VarP(newIPValue(value, p), name, "", usage) -} - -// IPVarP is like IPVar, but accepts a shorthand letter that can be used after a single dash. -func IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string) { - CommandLine.VarP(newIPValue(value, p), name, shorthand, usage) -} - -// IP defines an net.IP flag with specified name, default value, and usage string. -// The return value is the address of an net.IP variable that stores the value of the flag. -func (f *FlagSet) IP(name string, value net.IP, usage string) *net.IP { - p := new(net.IP) - f.IPVarP(p, name, "", value, usage) - return p -} - -// IPP is like IP, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPP(name, shorthand string, value net.IP, usage string) *net.IP { - p := new(net.IP) - f.IPVarP(p, name, shorthand, value, usage) - return p -} - -// IP defines an net.IP flag with specified name, default value, and usage string. -// The return value is the address of an net.IP variable that stores the value of the flag. -func IP(name string, value net.IP, usage string) *net.IP { - return CommandLine.IPP(name, "", value, usage) -} - -// IPP is like IP, but accepts a shorthand letter that can be used after a single dash. -func IPP(name, shorthand string, value net.IP, usage string) *net.IP { - return CommandLine.IPP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/ip_slice.go b/vendor/github.com/spf13/pflag/ip_slice.go deleted file mode 100644 index 775faae..0000000 --- a/vendor/github.com/spf13/pflag/ip_slice.go +++ /dev/null @@ -1,186 +0,0 @@ -package pflag - -import ( - "fmt" - "io" - "net" - "strings" -) - -// -- ipSlice Value -type ipSliceValue struct { - value *[]net.IP - changed bool -} - -func newIPSliceValue(val []net.IP, p *[]net.IP) *ipSliceValue { - ipsv := new(ipSliceValue) - ipsv.value = p - *ipsv.value = val - return ipsv -} - -// Set converts, and assigns, the comma-separated IP argument string representation as the []net.IP value of this flag. -// If Set is called on a flag that already has a []net.IP assigned, the newly converted values will be appended. -func (s *ipSliceValue) Set(val string) error { - - // remove all quote characters - rmQuote := strings.NewReplacer(`"`, "", `'`, "", "`", "") - - // read flag arguments with CSV parser - ipStrSlice, err := readAsCSV(rmQuote.Replace(val)) - if err != nil && err != io.EOF { - return err - } - - // parse ip values into slice - out := make([]net.IP, 0, len(ipStrSlice)) - for _, ipStr := range ipStrSlice { - ip := net.ParseIP(strings.TrimSpace(ipStr)) - if ip == nil { - return fmt.Errorf("invalid string being converted to IP address: %s", ipStr) - } - out = append(out, ip) - } - - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - - s.changed = true - - return nil -} - -// Type returns a string that uniquely represents this flag's type. -func (s *ipSliceValue) Type() string { - return "ipSlice" -} - -// String defines a "native" format for this net.IP slice flag value. -func (s *ipSliceValue) String() string { - - ipStrSlice := make([]string, len(*s.value)) - for i, ip := range *s.value { - ipStrSlice[i] = ip.String() - } - - out, _ := writeAsCSV(ipStrSlice) - - return "[" + out + "]" -} - -func (s *ipSliceValue) fromString(val string) (net.IP, error) { - return net.ParseIP(strings.TrimSpace(val)), nil -} - -func (s *ipSliceValue) toString(val net.IP) string { - return val.String() -} - -func (s *ipSliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *ipSliceValue) Replace(val []string) error { - out := make([]net.IP, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *ipSliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func ipSliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []net.IP{}, nil - } - ss := strings.Split(val, ",") - out := make([]net.IP, len(ss)) - for i, sval := range ss { - ip := net.ParseIP(strings.TrimSpace(sval)) - if ip == nil { - return nil, fmt.Errorf("invalid string being converted to IP address: %s", sval) - } - out[i] = ip - } - return out, nil -} - -// GetIPSlice returns the []net.IP value of a flag with the given name -func (f *FlagSet) GetIPSlice(name string) ([]net.IP, error) { - val, err := f.getFlagType(name, "ipSlice", ipSliceConv) - if err != nil { - return []net.IP{}, err - } - return val.([]net.IP), nil -} - -// IPSliceVar defines a ipSlice flag with specified name, default value, and usage string. -// The argument p points to a []net.IP variable in which to store the value of the flag. -func (f *FlagSet) IPSliceVar(p *[]net.IP, name string, value []net.IP, usage string) { - f.VarP(newIPSliceValue(value, p), name, "", usage) -} - -// IPSliceVarP is like IPSliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPSliceVarP(p *[]net.IP, name, shorthand string, value []net.IP, usage string) { - f.VarP(newIPSliceValue(value, p), name, shorthand, usage) -} - -// IPSliceVar defines a []net.IP flag with specified name, default value, and usage string. -// The argument p points to a []net.IP variable in which to store the value of the flag. -func IPSliceVar(p *[]net.IP, name string, value []net.IP, usage string) { - CommandLine.VarP(newIPSliceValue(value, p), name, "", usage) -} - -// IPSliceVarP is like IPSliceVar, but accepts a shorthand letter that can be used after a single dash. -func IPSliceVarP(p *[]net.IP, name, shorthand string, value []net.IP, usage string) { - CommandLine.VarP(newIPSliceValue(value, p), name, shorthand, usage) -} - -// IPSlice defines a []net.IP flag with specified name, default value, and usage string. -// The return value is the address of a []net.IP variable that stores the value of that flag. -func (f *FlagSet) IPSlice(name string, value []net.IP, usage string) *[]net.IP { - p := []net.IP{} - f.IPSliceVarP(&p, name, "", value, usage) - return &p -} - -// IPSliceP is like IPSlice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPSliceP(name, shorthand string, value []net.IP, usage string) *[]net.IP { - p := []net.IP{} - f.IPSliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// IPSlice defines a []net.IP flag with specified name, default value, and usage string. -// The return value is the address of a []net.IP variable that stores the value of the flag. -func IPSlice(name string, value []net.IP, usage string) *[]net.IP { - return CommandLine.IPSliceP(name, "", value, usage) -} - -// IPSliceP is like IPSlice, but accepts a shorthand letter that can be used after a single dash. -func IPSliceP(name, shorthand string, value []net.IP, usage string) *[]net.IP { - return CommandLine.IPSliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/ipmask.go b/vendor/github.com/spf13/pflag/ipmask.go deleted file mode 100644 index 5bd44bd..0000000 --- a/vendor/github.com/spf13/pflag/ipmask.go +++ /dev/null @@ -1,122 +0,0 @@ -package pflag - -import ( - "fmt" - "net" - "strconv" -) - -// -- net.IPMask value -type ipMaskValue net.IPMask - -func newIPMaskValue(val net.IPMask, p *net.IPMask) *ipMaskValue { - *p = val - return (*ipMaskValue)(p) -} - -func (i *ipMaskValue) String() string { return net.IPMask(*i).String() } -func (i *ipMaskValue) Set(s string) error { - ip := ParseIPv4Mask(s) - if ip == nil { - return fmt.Errorf("failed to parse IP mask: %q", s) - } - *i = ipMaskValue(ip) - return nil -} - -func (i *ipMaskValue) Type() string { - return "ipMask" -} - -// ParseIPv4Mask written in IP form (e.g. 255.255.255.0). -// This function should really belong to the net package. -func ParseIPv4Mask(s string) net.IPMask { - mask := net.ParseIP(s) - if mask == nil { - if len(s) != 8 { - return nil - } - // net.IPMask.String() actually outputs things like ffffff00 - // so write a horrible parser for that as well :-( - m := []int{} - for i := 0; i < 4; i++ { - b := "0x" + s[2*i:2*i+2] - d, err := strconv.ParseInt(b, 0, 0) - if err != nil { - return nil - } - m = append(m, int(d)) - } - s := fmt.Sprintf("%d.%d.%d.%d", m[0], m[1], m[2], m[3]) - mask = net.ParseIP(s) - if mask == nil { - return nil - } - } - return net.IPv4Mask(mask[12], mask[13], mask[14], mask[15]) -} - -func parseIPv4Mask(sval string) (interface{}, error) { - mask := ParseIPv4Mask(sval) - if mask == nil { - return nil, fmt.Errorf("unable to parse %s as net.IPMask", sval) - } - return mask, nil -} - -// GetIPv4Mask return the net.IPv4Mask value of a flag with the given name -func (f *FlagSet) GetIPv4Mask(name string) (net.IPMask, error) { - val, err := f.getFlagType(name, "ipMask", parseIPv4Mask) - if err != nil { - return nil, err - } - return val.(net.IPMask), nil -} - -// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string. -// The argument p points to an net.IPMask variable in which to store the value of the flag. -func (f *FlagSet) IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) { - f.VarP(newIPMaskValue(value, p), name, "", usage) -} - -// IPMaskVarP is like IPMaskVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string) { - f.VarP(newIPMaskValue(value, p), name, shorthand, usage) -} - -// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string. -// The argument p points to an net.IPMask variable in which to store the value of the flag. -func IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) { - CommandLine.VarP(newIPMaskValue(value, p), name, "", usage) -} - -// IPMaskVarP is like IPMaskVar, but accepts a shorthand letter that can be used after a single dash. -func IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string) { - CommandLine.VarP(newIPMaskValue(value, p), name, shorthand, usage) -} - -// IPMask defines an net.IPMask flag with specified name, default value, and usage string. -// The return value is the address of an net.IPMask variable that stores the value of the flag. -func (f *FlagSet) IPMask(name string, value net.IPMask, usage string) *net.IPMask { - p := new(net.IPMask) - f.IPMaskVarP(p, name, "", value, usage) - return p -} - -// IPMaskP is like IPMask, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask { - p := new(net.IPMask) - f.IPMaskVarP(p, name, shorthand, value, usage) - return p -} - -// IPMask defines an net.IPMask flag with specified name, default value, and usage string. -// The return value is the address of an net.IPMask variable that stores the value of the flag. -func IPMask(name string, value net.IPMask, usage string) *net.IPMask { - return CommandLine.IPMaskP(name, "", value, usage) -} - -// IPMaskP is like IP, but accepts a shorthand letter that can be used after a single dash. -func IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask { - return CommandLine.IPMaskP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/ipnet.go b/vendor/github.com/spf13/pflag/ipnet.go deleted file mode 100644 index e2c1b8b..0000000 --- a/vendor/github.com/spf13/pflag/ipnet.go +++ /dev/null @@ -1,98 +0,0 @@ -package pflag - -import ( - "fmt" - "net" - "strings" -) - -// IPNet adapts net.IPNet for use as a flag. -type ipNetValue net.IPNet - -func (ipnet ipNetValue) String() string { - n := net.IPNet(ipnet) - return n.String() -} - -func (ipnet *ipNetValue) Set(value string) error { - _, n, err := net.ParseCIDR(strings.TrimSpace(value)) - if err != nil { - return err - } - *ipnet = ipNetValue(*n) - return nil -} - -func (*ipNetValue) Type() string { - return "ipNet" -} - -func newIPNetValue(val net.IPNet, p *net.IPNet) *ipNetValue { - *p = val - return (*ipNetValue)(p) -} - -func ipNetConv(sval string) (interface{}, error) { - _, n, err := net.ParseCIDR(strings.TrimSpace(sval)) - if err == nil { - return *n, nil - } - return nil, fmt.Errorf("invalid string being converted to IPNet: %s", sval) -} - -// GetIPNet return the net.IPNet value of a flag with the given name -func (f *FlagSet) GetIPNet(name string) (net.IPNet, error) { - val, err := f.getFlagType(name, "ipNet", ipNetConv) - if err != nil { - return net.IPNet{}, err - } - return val.(net.IPNet), nil -} - -// IPNetVar defines an net.IPNet flag with specified name, default value, and usage string. -// The argument p points to an net.IPNet variable in which to store the value of the flag. -func (f *FlagSet) IPNetVar(p *net.IPNet, name string, value net.IPNet, usage string) { - f.VarP(newIPNetValue(value, p), name, "", usage) -} - -// IPNetVarP is like IPNetVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPNetVarP(p *net.IPNet, name, shorthand string, value net.IPNet, usage string) { - f.VarP(newIPNetValue(value, p), name, shorthand, usage) -} - -// IPNetVar defines an net.IPNet flag with specified name, default value, and usage string. -// The argument p points to an net.IPNet variable in which to store the value of the flag. -func IPNetVar(p *net.IPNet, name string, value net.IPNet, usage string) { - CommandLine.VarP(newIPNetValue(value, p), name, "", usage) -} - -// IPNetVarP is like IPNetVar, but accepts a shorthand letter that can be used after a single dash. -func IPNetVarP(p *net.IPNet, name, shorthand string, value net.IPNet, usage string) { - CommandLine.VarP(newIPNetValue(value, p), name, shorthand, usage) -} - -// IPNet defines an net.IPNet flag with specified name, default value, and usage string. -// The return value is the address of an net.IPNet variable that stores the value of the flag. -func (f *FlagSet) IPNet(name string, value net.IPNet, usage string) *net.IPNet { - p := new(net.IPNet) - f.IPNetVarP(p, name, "", value, usage) - return p -} - -// IPNetP is like IPNet, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet { - p := new(net.IPNet) - f.IPNetVarP(p, name, shorthand, value, usage) - return p -} - -// IPNet defines an net.IPNet flag with specified name, default value, and usage string. -// The return value is the address of an net.IPNet variable that stores the value of the flag. -func IPNet(name string, value net.IPNet, usage string) *net.IPNet { - return CommandLine.IPNetP(name, "", value, usage) -} - -// IPNetP is like IPNet, but accepts a shorthand letter that can be used after a single dash. -func IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet { - return CommandLine.IPNetP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/string.go b/vendor/github.com/spf13/pflag/string.go deleted file mode 100644 index 04e0a26..0000000 --- a/vendor/github.com/spf13/pflag/string.go +++ /dev/null @@ -1,80 +0,0 @@ -package pflag - -// -- string Value -type stringValue string - -func newStringValue(val string, p *string) *stringValue { - *p = val - return (*stringValue)(p) -} - -func (s *stringValue) Set(val string) error { - *s = stringValue(val) - return nil -} -func (s *stringValue) Type() string { - return "string" -} - -func (s *stringValue) String() string { return string(*s) } - -func stringConv(sval string) (interface{}, error) { - return sval, nil -} - -// GetString return the string value of a flag with the given name -func (f *FlagSet) GetString(name string) (string, error) { - val, err := f.getFlagType(name, "string", stringConv) - if err != nil { - return "", err - } - return val.(string), nil -} - -// StringVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a string variable in which to store the value of the flag. -func (f *FlagSet) StringVar(p *string, name string, value string, usage string) { - f.VarP(newStringValue(value, p), name, "", usage) -} - -// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringVarP(p *string, name, shorthand string, value string, usage string) { - f.VarP(newStringValue(value, p), name, shorthand, usage) -} - -// StringVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a string variable in which to store the value of the flag. -func StringVar(p *string, name string, value string, usage string) { - CommandLine.VarP(newStringValue(value, p), name, "", usage) -} - -// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash. -func StringVarP(p *string, name, shorthand string, value string, usage string) { - CommandLine.VarP(newStringValue(value, p), name, shorthand, usage) -} - -// String defines a string flag with specified name, default value, and usage string. -// The return value is the address of a string variable that stores the value of the flag. -func (f *FlagSet) String(name string, value string, usage string) *string { - p := new(string) - f.StringVarP(p, name, "", value, usage) - return p -} - -// StringP is like String, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringP(name, shorthand string, value string, usage string) *string { - p := new(string) - f.StringVarP(p, name, shorthand, value, usage) - return p -} - -// String defines a string flag with specified name, default value, and usage string. -// The return value is the address of a string variable that stores the value of the flag. -func String(name string, value string, usage string) *string { - return CommandLine.StringP(name, "", value, usage) -} - -// StringP is like String, but accepts a shorthand letter that can be used after a single dash. -func StringP(name, shorthand string, value string, usage string) *string { - return CommandLine.StringP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/string_array.go b/vendor/github.com/spf13/pflag/string_array.go deleted file mode 100644 index 4894af8..0000000 --- a/vendor/github.com/spf13/pflag/string_array.go +++ /dev/null @@ -1,129 +0,0 @@ -package pflag - -// -- stringArray Value -type stringArrayValue struct { - value *[]string - changed bool -} - -func newStringArrayValue(val []string, p *[]string) *stringArrayValue { - ssv := new(stringArrayValue) - ssv.value = p - *ssv.value = val - return ssv -} - -func (s *stringArrayValue) Set(val string) error { - if !s.changed { - *s.value = []string{val} - s.changed = true - } else { - *s.value = append(*s.value, val) - } - return nil -} - -func (s *stringArrayValue) Append(val string) error { - *s.value = append(*s.value, val) - return nil -} - -func (s *stringArrayValue) Replace(val []string) error { - out := make([]string, len(val)) - for i, d := range val { - var err error - out[i] = d - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *stringArrayValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = d - } - return out -} - -func (s *stringArrayValue) Type() string { - return "stringArray" -} - -func (s *stringArrayValue) String() string { - str, _ := writeAsCSV(*s.value) - return "[" + str + "]" -} - -func stringArrayConv(sval string) (interface{}, error) { - sval = sval[1 : len(sval)-1] - // An empty string would cause a array with one (empty) string - if len(sval) == 0 { - return []string{}, nil - } - return readAsCSV(sval) -} - -// GetStringArray return the []string value of a flag with the given name -func (f *FlagSet) GetStringArray(name string) ([]string, error) { - val, err := f.getFlagType(name, "stringArray", stringArrayConv) - if err != nil { - return []string{}, err - } - return val.([]string), nil -} - -// StringArrayVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a []string variable in which to store the values of the multiple flags. -// The value of each argument will not try to be separated by comma. Use a StringSlice for that. -func (f *FlagSet) StringArrayVar(p *[]string, name string, value []string, usage string) { - f.VarP(newStringArrayValue(value, p), name, "", usage) -} - -// StringArrayVarP is like StringArrayVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringArrayVarP(p *[]string, name, shorthand string, value []string, usage string) { - f.VarP(newStringArrayValue(value, p), name, shorthand, usage) -} - -// StringArrayVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a []string variable in which to store the value of the flag. -// The value of each argument will not try to be separated by comma. Use a StringSlice for that. -func StringArrayVar(p *[]string, name string, value []string, usage string) { - CommandLine.VarP(newStringArrayValue(value, p), name, "", usage) -} - -// StringArrayVarP is like StringArrayVar, but accepts a shorthand letter that can be used after a single dash. -func StringArrayVarP(p *[]string, name, shorthand string, value []string, usage string) { - CommandLine.VarP(newStringArrayValue(value, p), name, shorthand, usage) -} - -// StringArray defines a string flag with specified name, default value, and usage string. -// The return value is the address of a []string variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma. Use a StringSlice for that. -func (f *FlagSet) StringArray(name string, value []string, usage string) *[]string { - p := []string{} - f.StringArrayVarP(&p, name, "", value, usage) - return &p -} - -// StringArrayP is like StringArray, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringArrayP(name, shorthand string, value []string, usage string) *[]string { - p := []string{} - f.StringArrayVarP(&p, name, shorthand, value, usage) - return &p -} - -// StringArray defines a string flag with specified name, default value, and usage string. -// The return value is the address of a []string variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma. Use a StringSlice for that. -func StringArray(name string, value []string, usage string) *[]string { - return CommandLine.StringArrayP(name, "", value, usage) -} - -// StringArrayP is like StringArray, but accepts a shorthand letter that can be used after a single dash. -func StringArrayP(name, shorthand string, value []string, usage string) *[]string { - return CommandLine.StringArrayP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/string_slice.go b/vendor/github.com/spf13/pflag/string_slice.go deleted file mode 100644 index 3cb2e69..0000000 --- a/vendor/github.com/spf13/pflag/string_slice.go +++ /dev/null @@ -1,163 +0,0 @@ -package pflag - -import ( - "bytes" - "encoding/csv" - "strings" -) - -// -- stringSlice Value -type stringSliceValue struct { - value *[]string - changed bool -} - -func newStringSliceValue(val []string, p *[]string) *stringSliceValue { - ssv := new(stringSliceValue) - ssv.value = p - *ssv.value = val - return ssv -} - -func readAsCSV(val string) ([]string, error) { - if val == "" { - return []string{}, nil - } - stringReader := strings.NewReader(val) - csvReader := csv.NewReader(stringReader) - return csvReader.Read() -} - -func writeAsCSV(vals []string) (string, error) { - b := &bytes.Buffer{} - w := csv.NewWriter(b) - err := w.Write(vals) - if err != nil { - return "", err - } - w.Flush() - return strings.TrimSuffix(b.String(), "\n"), nil -} - -func (s *stringSliceValue) Set(val string) error { - v, err := readAsCSV(val) - if err != nil { - return err - } - if !s.changed { - *s.value = v - } else { - *s.value = append(*s.value, v...) - } - s.changed = true - return nil -} - -func (s *stringSliceValue) Type() string { - return "stringSlice" -} - -func (s *stringSliceValue) String() string { - str, _ := writeAsCSV(*s.value) - return "[" + str + "]" -} - -func (s *stringSliceValue) Append(val string) error { - *s.value = append(*s.value, val) - return nil -} - -func (s *stringSliceValue) Replace(val []string) error { - *s.value = val - return nil -} - -func (s *stringSliceValue) GetSlice() []string { - return *s.value -} - -func stringSliceConv(sval string) (interface{}, error) { - sval = sval[1 : len(sval)-1] - // An empty string would cause a slice with one (empty) string - if len(sval) == 0 { - return []string{}, nil - } - return readAsCSV(sval) -} - -// GetStringSlice return the []string value of a flag with the given name -func (f *FlagSet) GetStringSlice(name string) ([]string, error) { - val, err := f.getFlagType(name, "stringSlice", stringSliceConv) - if err != nil { - return []string{}, err - } - return val.([]string), nil -} - -// StringSliceVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a []string variable in which to store the value of the flag. -// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. -// For example: -// --ss="v1,v2" --ss="v3" -// will result in -// []string{"v1", "v2", "v3"} -func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string) { - f.VarP(newStringSliceValue(value, p), name, "", usage) -} - -// StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string) { - f.VarP(newStringSliceValue(value, p), name, shorthand, usage) -} - -// StringSliceVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a []string variable in which to store the value of the flag. -// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. -// For example: -// --ss="v1,v2" --ss="v3" -// will result in -// []string{"v1", "v2", "v3"} -func StringSliceVar(p *[]string, name string, value []string, usage string) { - CommandLine.VarP(newStringSliceValue(value, p), name, "", usage) -} - -// StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash. -func StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string) { - CommandLine.VarP(newStringSliceValue(value, p), name, shorthand, usage) -} - -// StringSlice defines a string flag with specified name, default value, and usage string. -// The return value is the address of a []string variable that stores the value of the flag. -// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. -// For example: -// --ss="v1,v2" --ss="v3" -// will result in -// []string{"v1", "v2", "v3"} -func (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string { - p := []string{} - f.StringSliceVarP(&p, name, "", value, usage) - return &p -} - -// StringSliceP is like StringSlice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage string) *[]string { - p := []string{} - f.StringSliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// StringSlice defines a string flag with specified name, default value, and usage string. -// The return value is the address of a []string variable that stores the value of the flag. -// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. -// For example: -// --ss="v1,v2" --ss="v3" -// will result in -// []string{"v1", "v2", "v3"} -func StringSlice(name string, value []string, usage string) *[]string { - return CommandLine.StringSliceP(name, "", value, usage) -} - -// StringSliceP is like StringSlice, but accepts a shorthand letter that can be used after a single dash. -func StringSliceP(name, shorthand string, value []string, usage string) *[]string { - return CommandLine.StringSliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/string_to_int.go b/vendor/github.com/spf13/pflag/string_to_int.go deleted file mode 100644 index 5ceda39..0000000 --- a/vendor/github.com/spf13/pflag/string_to_int.go +++ /dev/null @@ -1,149 +0,0 @@ -package pflag - -import ( - "bytes" - "fmt" - "strconv" - "strings" -) - -// -- stringToInt Value -type stringToIntValue struct { - value *map[string]int - changed bool -} - -func newStringToIntValue(val map[string]int, p *map[string]int) *stringToIntValue { - ssv := new(stringToIntValue) - ssv.value = p - *ssv.value = val - return ssv -} - -// Format: a=1,b=2 -func (s *stringToIntValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make(map[string]int, len(ss)) - for _, pair := range ss { - kv := strings.SplitN(pair, "=", 2) - if len(kv) != 2 { - return fmt.Errorf("%s must be formatted as key=value", pair) - } - var err error - out[kv[0]], err = strconv.Atoi(kv[1]) - if err != nil { - return err - } - } - if !s.changed { - *s.value = out - } else { - for k, v := range out { - (*s.value)[k] = v - } - } - s.changed = true - return nil -} - -func (s *stringToIntValue) Type() string { - return "stringToInt" -} - -func (s *stringToIntValue) String() string { - var buf bytes.Buffer - i := 0 - for k, v := range *s.value { - if i > 0 { - buf.WriteRune(',') - } - buf.WriteString(k) - buf.WriteRune('=') - buf.WriteString(strconv.Itoa(v)) - i++ - } - return "[" + buf.String() + "]" -} - -func stringToIntConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // An empty string would cause an empty map - if len(val) == 0 { - return map[string]int{}, nil - } - ss := strings.Split(val, ",") - out := make(map[string]int, len(ss)) - for _, pair := range ss { - kv := strings.SplitN(pair, "=", 2) - if len(kv) != 2 { - return nil, fmt.Errorf("%s must be formatted as key=value", pair) - } - var err error - out[kv[0]], err = strconv.Atoi(kv[1]) - if err != nil { - return nil, err - } - } - return out, nil -} - -// GetStringToInt return the map[string]int value of a flag with the given name -func (f *FlagSet) GetStringToInt(name string) (map[string]int, error) { - val, err := f.getFlagType(name, "stringToInt", stringToIntConv) - if err != nil { - return map[string]int{}, err - } - return val.(map[string]int), nil -} - -// StringToIntVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a map[string]int variable in which to store the values of the multiple flags. -// The value of each argument will not try to be separated by comma -func (f *FlagSet) StringToIntVar(p *map[string]int, name string, value map[string]int, usage string) { - f.VarP(newStringToIntValue(value, p), name, "", usage) -} - -// StringToIntVarP is like StringToIntVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringToIntVarP(p *map[string]int, name, shorthand string, value map[string]int, usage string) { - f.VarP(newStringToIntValue(value, p), name, shorthand, usage) -} - -// StringToIntVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a map[string]int variable in which to store the value of the flag. -// The value of each argument will not try to be separated by comma -func StringToIntVar(p *map[string]int, name string, value map[string]int, usage string) { - CommandLine.VarP(newStringToIntValue(value, p), name, "", usage) -} - -// StringToIntVarP is like StringToIntVar, but accepts a shorthand letter that can be used after a single dash. -func StringToIntVarP(p *map[string]int, name, shorthand string, value map[string]int, usage string) { - CommandLine.VarP(newStringToIntValue(value, p), name, shorthand, usage) -} - -// StringToInt defines a string flag with specified name, default value, and usage string. -// The return value is the address of a map[string]int variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma -func (f *FlagSet) StringToInt(name string, value map[string]int, usage string) *map[string]int { - p := map[string]int{} - f.StringToIntVarP(&p, name, "", value, usage) - return &p -} - -// StringToIntP is like StringToInt, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringToIntP(name, shorthand string, value map[string]int, usage string) *map[string]int { - p := map[string]int{} - f.StringToIntVarP(&p, name, shorthand, value, usage) - return &p -} - -// StringToInt defines a string flag with specified name, default value, and usage string. -// The return value is the address of a map[string]int variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma -func StringToInt(name string, value map[string]int, usage string) *map[string]int { - return CommandLine.StringToIntP(name, "", value, usage) -} - -// StringToIntP is like StringToInt, but accepts a shorthand letter that can be used after a single dash. -func StringToIntP(name, shorthand string, value map[string]int, usage string) *map[string]int { - return CommandLine.StringToIntP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/string_to_int64.go b/vendor/github.com/spf13/pflag/string_to_int64.go deleted file mode 100644 index a807a04..0000000 --- a/vendor/github.com/spf13/pflag/string_to_int64.go +++ /dev/null @@ -1,149 +0,0 @@ -package pflag - -import ( - "bytes" - "fmt" - "strconv" - "strings" -) - -// -- stringToInt64 Value -type stringToInt64Value struct { - value *map[string]int64 - changed bool -} - -func newStringToInt64Value(val map[string]int64, p *map[string]int64) *stringToInt64Value { - ssv := new(stringToInt64Value) - ssv.value = p - *ssv.value = val - return ssv -} - -// Format: a=1,b=2 -func (s *stringToInt64Value) Set(val string) error { - ss := strings.Split(val, ",") - out := make(map[string]int64, len(ss)) - for _, pair := range ss { - kv := strings.SplitN(pair, "=", 2) - if len(kv) != 2 { - return fmt.Errorf("%s must be formatted as key=value", pair) - } - var err error - out[kv[0]], err = strconv.ParseInt(kv[1], 10, 64) - if err != nil { - return err - } - } - if !s.changed { - *s.value = out - } else { - for k, v := range out { - (*s.value)[k] = v - } - } - s.changed = true - return nil -} - -func (s *stringToInt64Value) Type() string { - return "stringToInt64" -} - -func (s *stringToInt64Value) String() string { - var buf bytes.Buffer - i := 0 - for k, v := range *s.value { - if i > 0 { - buf.WriteRune(',') - } - buf.WriteString(k) - buf.WriteRune('=') - buf.WriteString(strconv.FormatInt(v, 10)) - i++ - } - return "[" + buf.String() + "]" -} - -func stringToInt64Conv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // An empty string would cause an empty map - if len(val) == 0 { - return map[string]int64{}, nil - } - ss := strings.Split(val, ",") - out := make(map[string]int64, len(ss)) - for _, pair := range ss { - kv := strings.SplitN(pair, "=", 2) - if len(kv) != 2 { - return nil, fmt.Errorf("%s must be formatted as key=value", pair) - } - var err error - out[kv[0]], err = strconv.ParseInt(kv[1], 10, 64) - if err != nil { - return nil, err - } - } - return out, nil -} - -// GetStringToInt64 return the map[string]int64 value of a flag with the given name -func (f *FlagSet) GetStringToInt64(name string) (map[string]int64, error) { - val, err := f.getFlagType(name, "stringToInt64", stringToInt64Conv) - if err != nil { - return map[string]int64{}, err - } - return val.(map[string]int64), nil -} - -// StringToInt64Var defines a string flag with specified name, default value, and usage string. -// The argument p point64s to a map[string]int64 variable in which to store the values of the multiple flags. -// The value of each argument will not try to be separated by comma -func (f *FlagSet) StringToInt64Var(p *map[string]int64, name string, value map[string]int64, usage string) { - f.VarP(newStringToInt64Value(value, p), name, "", usage) -} - -// StringToInt64VarP is like StringToInt64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringToInt64VarP(p *map[string]int64, name, shorthand string, value map[string]int64, usage string) { - f.VarP(newStringToInt64Value(value, p), name, shorthand, usage) -} - -// StringToInt64Var defines a string flag with specified name, default value, and usage string. -// The argument p point64s to a map[string]int64 variable in which to store the value of the flag. -// The value of each argument will not try to be separated by comma -func StringToInt64Var(p *map[string]int64, name string, value map[string]int64, usage string) { - CommandLine.VarP(newStringToInt64Value(value, p), name, "", usage) -} - -// StringToInt64VarP is like StringToInt64Var, but accepts a shorthand letter that can be used after a single dash. -func StringToInt64VarP(p *map[string]int64, name, shorthand string, value map[string]int64, usage string) { - CommandLine.VarP(newStringToInt64Value(value, p), name, shorthand, usage) -} - -// StringToInt64 defines a string flag with specified name, default value, and usage string. -// The return value is the address of a map[string]int64 variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma -func (f *FlagSet) StringToInt64(name string, value map[string]int64, usage string) *map[string]int64 { - p := map[string]int64{} - f.StringToInt64VarP(&p, name, "", value, usage) - return &p -} - -// StringToInt64P is like StringToInt64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringToInt64P(name, shorthand string, value map[string]int64, usage string) *map[string]int64 { - p := map[string]int64{} - f.StringToInt64VarP(&p, name, shorthand, value, usage) - return &p -} - -// StringToInt64 defines a string flag with specified name, default value, and usage string. -// The return value is the address of a map[string]int64 variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma -func StringToInt64(name string, value map[string]int64, usage string) *map[string]int64 { - return CommandLine.StringToInt64P(name, "", value, usage) -} - -// StringToInt64P is like StringToInt64, but accepts a shorthand letter that can be used after a single dash. -func StringToInt64P(name, shorthand string, value map[string]int64, usage string) *map[string]int64 { - return CommandLine.StringToInt64P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/string_to_string.go b/vendor/github.com/spf13/pflag/string_to_string.go deleted file mode 100644 index 890a01a..0000000 --- a/vendor/github.com/spf13/pflag/string_to_string.go +++ /dev/null @@ -1,160 +0,0 @@ -package pflag - -import ( - "bytes" - "encoding/csv" - "fmt" - "strings" -) - -// -- stringToString Value -type stringToStringValue struct { - value *map[string]string - changed bool -} - -func newStringToStringValue(val map[string]string, p *map[string]string) *stringToStringValue { - ssv := new(stringToStringValue) - ssv.value = p - *ssv.value = val - return ssv -} - -// Format: a=1,b=2 -func (s *stringToStringValue) Set(val string) error { - var ss []string - n := strings.Count(val, "=") - switch n { - case 0: - return fmt.Errorf("%s must be formatted as key=value", val) - case 1: - ss = append(ss, strings.Trim(val, `"`)) - default: - r := csv.NewReader(strings.NewReader(val)) - var err error - ss, err = r.Read() - if err != nil { - return err - } - } - - out := make(map[string]string, len(ss)) - for _, pair := range ss { - kv := strings.SplitN(pair, "=", 2) - if len(kv) != 2 { - return fmt.Errorf("%s must be formatted as key=value", pair) - } - out[kv[0]] = kv[1] - } - if !s.changed { - *s.value = out - } else { - for k, v := range out { - (*s.value)[k] = v - } - } - s.changed = true - return nil -} - -func (s *stringToStringValue) Type() string { - return "stringToString" -} - -func (s *stringToStringValue) String() string { - records := make([]string, 0, len(*s.value)>>1) - for k, v := range *s.value { - records = append(records, k+"="+v) - } - - var buf bytes.Buffer - w := csv.NewWriter(&buf) - if err := w.Write(records); err != nil { - panic(err) - } - w.Flush() - return "[" + strings.TrimSpace(buf.String()) + "]" -} - -func stringToStringConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // An empty string would cause an empty map - if len(val) == 0 { - return map[string]string{}, nil - } - r := csv.NewReader(strings.NewReader(val)) - ss, err := r.Read() - if err != nil { - return nil, err - } - out := make(map[string]string, len(ss)) - for _, pair := range ss { - kv := strings.SplitN(pair, "=", 2) - if len(kv) != 2 { - return nil, fmt.Errorf("%s must be formatted as key=value", pair) - } - out[kv[0]] = kv[1] - } - return out, nil -} - -// GetStringToString return the map[string]string value of a flag with the given name -func (f *FlagSet) GetStringToString(name string) (map[string]string, error) { - val, err := f.getFlagType(name, "stringToString", stringToStringConv) - if err != nil { - return map[string]string{}, err - } - return val.(map[string]string), nil -} - -// StringToStringVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a map[string]string variable in which to store the values of the multiple flags. -// The value of each argument will not try to be separated by comma -func (f *FlagSet) StringToStringVar(p *map[string]string, name string, value map[string]string, usage string) { - f.VarP(newStringToStringValue(value, p), name, "", usage) -} - -// StringToStringVarP is like StringToStringVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringToStringVarP(p *map[string]string, name, shorthand string, value map[string]string, usage string) { - f.VarP(newStringToStringValue(value, p), name, shorthand, usage) -} - -// StringToStringVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a map[string]string variable in which to store the value of the flag. -// The value of each argument will not try to be separated by comma -func StringToStringVar(p *map[string]string, name string, value map[string]string, usage string) { - CommandLine.VarP(newStringToStringValue(value, p), name, "", usage) -} - -// StringToStringVarP is like StringToStringVar, but accepts a shorthand letter that can be used after a single dash. -func StringToStringVarP(p *map[string]string, name, shorthand string, value map[string]string, usage string) { - CommandLine.VarP(newStringToStringValue(value, p), name, shorthand, usage) -} - -// StringToString defines a string flag with specified name, default value, and usage string. -// The return value is the address of a map[string]string variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma -func (f *FlagSet) StringToString(name string, value map[string]string, usage string) *map[string]string { - p := map[string]string{} - f.StringToStringVarP(&p, name, "", value, usage) - return &p -} - -// StringToStringP is like StringToString, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringToStringP(name, shorthand string, value map[string]string, usage string) *map[string]string { - p := map[string]string{} - f.StringToStringVarP(&p, name, shorthand, value, usage) - return &p -} - -// StringToString defines a string flag with specified name, default value, and usage string. -// The return value is the address of a map[string]string variable that stores the value of the flag. -// The value of each argument will not try to be separated by comma -func StringToString(name string, value map[string]string, usage string) *map[string]string { - return CommandLine.StringToStringP(name, "", value, usage) -} - -// StringToStringP is like StringToString, but accepts a shorthand letter that can be used after a single dash. -func StringToStringP(name, shorthand string, value map[string]string, usage string) *map[string]string { - return CommandLine.StringToStringP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/uint.go b/vendor/github.com/spf13/pflag/uint.go deleted file mode 100644 index dcbc2b7..0000000 --- a/vendor/github.com/spf13/pflag/uint.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- uint Value -type uintValue uint - -func newUintValue(val uint, p *uint) *uintValue { - *p = val - return (*uintValue)(p) -} - -func (i *uintValue) Set(s string) error { - v, err := strconv.ParseUint(s, 0, 64) - *i = uintValue(v) - return err -} - -func (i *uintValue) Type() string { - return "uint" -} - -func (i *uintValue) String() string { return strconv.FormatUint(uint64(*i), 10) } - -func uintConv(sval string) (interface{}, error) { - v, err := strconv.ParseUint(sval, 0, 0) - if err != nil { - return 0, err - } - return uint(v), nil -} - -// GetUint return the uint value of a flag with the given name -func (f *FlagSet) GetUint(name string) (uint, error) { - val, err := f.getFlagType(name, "uint", uintConv) - if err != nil { - return 0, err - } - return val.(uint), nil -} - -// UintVar defines a uint flag with specified name, default value, and usage string. -// The argument p points to a uint variable in which to store the value of the flag. -func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string) { - f.VarP(newUintValue(value, p), name, "", usage) -} - -// UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) UintVarP(p *uint, name, shorthand string, value uint, usage string) { - f.VarP(newUintValue(value, p), name, shorthand, usage) -} - -// UintVar defines a uint flag with specified name, default value, and usage string. -// The argument p points to a uint variable in which to store the value of the flag. -func UintVar(p *uint, name string, value uint, usage string) { - CommandLine.VarP(newUintValue(value, p), name, "", usage) -} - -// UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash. -func UintVarP(p *uint, name, shorthand string, value uint, usage string) { - CommandLine.VarP(newUintValue(value, p), name, shorthand, usage) -} - -// Uint defines a uint flag with specified name, default value, and usage string. -// The return value is the address of a uint variable that stores the value of the flag. -func (f *FlagSet) Uint(name string, value uint, usage string) *uint { - p := new(uint) - f.UintVarP(p, name, "", value, usage) - return p -} - -// UintP is like Uint, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) UintP(name, shorthand string, value uint, usage string) *uint { - p := new(uint) - f.UintVarP(p, name, shorthand, value, usage) - return p -} - -// Uint defines a uint flag with specified name, default value, and usage string. -// The return value is the address of a uint variable that stores the value of the flag. -func Uint(name string, value uint, usage string) *uint { - return CommandLine.UintP(name, "", value, usage) -} - -// UintP is like Uint, but accepts a shorthand letter that can be used after a single dash. -func UintP(name, shorthand string, value uint, usage string) *uint { - return CommandLine.UintP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/uint16.go b/vendor/github.com/spf13/pflag/uint16.go deleted file mode 100644 index 7e9914e..0000000 --- a/vendor/github.com/spf13/pflag/uint16.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- uint16 value -type uint16Value uint16 - -func newUint16Value(val uint16, p *uint16) *uint16Value { - *p = val - return (*uint16Value)(p) -} - -func (i *uint16Value) Set(s string) error { - v, err := strconv.ParseUint(s, 0, 16) - *i = uint16Value(v) - return err -} - -func (i *uint16Value) Type() string { - return "uint16" -} - -func (i *uint16Value) String() string { return strconv.FormatUint(uint64(*i), 10) } - -func uint16Conv(sval string) (interface{}, error) { - v, err := strconv.ParseUint(sval, 0, 16) - if err != nil { - return 0, err - } - return uint16(v), nil -} - -// GetUint16 return the uint16 value of a flag with the given name -func (f *FlagSet) GetUint16(name string) (uint16, error) { - val, err := f.getFlagType(name, "uint16", uint16Conv) - if err != nil { - return 0, err - } - return val.(uint16), nil -} - -// Uint16Var defines a uint flag with specified name, default value, and usage string. -// The argument p points to a uint variable in which to store the value of the flag. -func (f *FlagSet) Uint16Var(p *uint16, name string, value uint16, usage string) { - f.VarP(newUint16Value(value, p), name, "", usage) -} - -// Uint16VarP is like Uint16Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) { - f.VarP(newUint16Value(value, p), name, shorthand, usage) -} - -// Uint16Var defines a uint flag with specified name, default value, and usage string. -// The argument p points to a uint variable in which to store the value of the flag. -func Uint16Var(p *uint16, name string, value uint16, usage string) { - CommandLine.VarP(newUint16Value(value, p), name, "", usage) -} - -// Uint16VarP is like Uint16Var, but accepts a shorthand letter that can be used after a single dash. -func Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) { - CommandLine.VarP(newUint16Value(value, p), name, shorthand, usage) -} - -// Uint16 defines a uint flag with specified name, default value, and usage string. -// The return value is the address of a uint variable that stores the value of the flag. -func (f *FlagSet) Uint16(name string, value uint16, usage string) *uint16 { - p := new(uint16) - f.Uint16VarP(p, name, "", value, usage) - return p -} - -// Uint16P is like Uint16, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint16P(name, shorthand string, value uint16, usage string) *uint16 { - p := new(uint16) - f.Uint16VarP(p, name, shorthand, value, usage) - return p -} - -// Uint16 defines a uint flag with specified name, default value, and usage string. -// The return value is the address of a uint variable that stores the value of the flag. -func Uint16(name string, value uint16, usage string) *uint16 { - return CommandLine.Uint16P(name, "", value, usage) -} - -// Uint16P is like Uint16, but accepts a shorthand letter that can be used after a single dash. -func Uint16P(name, shorthand string, value uint16, usage string) *uint16 { - return CommandLine.Uint16P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/uint32.go b/vendor/github.com/spf13/pflag/uint32.go deleted file mode 100644 index d802453..0000000 --- a/vendor/github.com/spf13/pflag/uint32.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- uint32 value -type uint32Value uint32 - -func newUint32Value(val uint32, p *uint32) *uint32Value { - *p = val - return (*uint32Value)(p) -} - -func (i *uint32Value) Set(s string) error { - v, err := strconv.ParseUint(s, 0, 32) - *i = uint32Value(v) - return err -} - -func (i *uint32Value) Type() string { - return "uint32" -} - -func (i *uint32Value) String() string { return strconv.FormatUint(uint64(*i), 10) } - -func uint32Conv(sval string) (interface{}, error) { - v, err := strconv.ParseUint(sval, 0, 32) - if err != nil { - return 0, err - } - return uint32(v), nil -} - -// GetUint32 return the uint32 value of a flag with the given name -func (f *FlagSet) GetUint32(name string) (uint32, error) { - val, err := f.getFlagType(name, "uint32", uint32Conv) - if err != nil { - return 0, err - } - return val.(uint32), nil -} - -// Uint32Var defines a uint32 flag with specified name, default value, and usage string. -// The argument p points to a uint32 variable in which to store the value of the flag. -func (f *FlagSet) Uint32Var(p *uint32, name string, value uint32, usage string) { - f.VarP(newUint32Value(value, p), name, "", usage) -} - -// Uint32VarP is like Uint32Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string) { - f.VarP(newUint32Value(value, p), name, shorthand, usage) -} - -// Uint32Var defines a uint32 flag with specified name, default value, and usage string. -// The argument p points to a uint32 variable in which to store the value of the flag. -func Uint32Var(p *uint32, name string, value uint32, usage string) { - CommandLine.VarP(newUint32Value(value, p), name, "", usage) -} - -// Uint32VarP is like Uint32Var, but accepts a shorthand letter that can be used after a single dash. -func Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string) { - CommandLine.VarP(newUint32Value(value, p), name, shorthand, usage) -} - -// Uint32 defines a uint32 flag with specified name, default value, and usage string. -// The return value is the address of a uint32 variable that stores the value of the flag. -func (f *FlagSet) Uint32(name string, value uint32, usage string) *uint32 { - p := new(uint32) - f.Uint32VarP(p, name, "", value, usage) - return p -} - -// Uint32P is like Uint32, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint32P(name, shorthand string, value uint32, usage string) *uint32 { - p := new(uint32) - f.Uint32VarP(p, name, shorthand, value, usage) - return p -} - -// Uint32 defines a uint32 flag with specified name, default value, and usage string. -// The return value is the address of a uint32 variable that stores the value of the flag. -func Uint32(name string, value uint32, usage string) *uint32 { - return CommandLine.Uint32P(name, "", value, usage) -} - -// Uint32P is like Uint32, but accepts a shorthand letter that can be used after a single dash. -func Uint32P(name, shorthand string, value uint32, usage string) *uint32 { - return CommandLine.Uint32P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/uint64.go b/vendor/github.com/spf13/pflag/uint64.go deleted file mode 100644 index f62240f..0000000 --- a/vendor/github.com/spf13/pflag/uint64.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- uint64 Value -type uint64Value uint64 - -func newUint64Value(val uint64, p *uint64) *uint64Value { - *p = val - return (*uint64Value)(p) -} - -func (i *uint64Value) Set(s string) error { - v, err := strconv.ParseUint(s, 0, 64) - *i = uint64Value(v) - return err -} - -func (i *uint64Value) Type() string { - return "uint64" -} - -func (i *uint64Value) String() string { return strconv.FormatUint(uint64(*i), 10) } - -func uint64Conv(sval string) (interface{}, error) { - v, err := strconv.ParseUint(sval, 0, 64) - if err != nil { - return 0, err - } - return uint64(v), nil -} - -// GetUint64 return the uint64 value of a flag with the given name -func (f *FlagSet) GetUint64(name string) (uint64, error) { - val, err := f.getFlagType(name, "uint64", uint64Conv) - if err != nil { - return 0, err - } - return val.(uint64), nil -} - -// Uint64Var defines a uint64 flag with specified name, default value, and usage string. -// The argument p points to a uint64 variable in which to store the value of the flag. -func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string) { - f.VarP(newUint64Value(value, p), name, "", usage) -} - -// Uint64VarP is like Uint64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) { - f.VarP(newUint64Value(value, p), name, shorthand, usage) -} - -// Uint64Var defines a uint64 flag with specified name, default value, and usage string. -// The argument p points to a uint64 variable in which to store the value of the flag. -func Uint64Var(p *uint64, name string, value uint64, usage string) { - CommandLine.VarP(newUint64Value(value, p), name, "", usage) -} - -// Uint64VarP is like Uint64Var, but accepts a shorthand letter that can be used after a single dash. -func Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) { - CommandLine.VarP(newUint64Value(value, p), name, shorthand, usage) -} - -// Uint64 defines a uint64 flag with specified name, default value, and usage string. -// The return value is the address of a uint64 variable that stores the value of the flag. -func (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64 { - p := new(uint64) - f.Uint64VarP(p, name, "", value, usage) - return p -} - -// Uint64P is like Uint64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint64P(name, shorthand string, value uint64, usage string) *uint64 { - p := new(uint64) - f.Uint64VarP(p, name, shorthand, value, usage) - return p -} - -// Uint64 defines a uint64 flag with specified name, default value, and usage string. -// The return value is the address of a uint64 variable that stores the value of the flag. -func Uint64(name string, value uint64, usage string) *uint64 { - return CommandLine.Uint64P(name, "", value, usage) -} - -// Uint64P is like Uint64, but accepts a shorthand letter that can be used after a single dash. -func Uint64P(name, shorthand string, value uint64, usage string) *uint64 { - return CommandLine.Uint64P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/uint8.go b/vendor/github.com/spf13/pflag/uint8.go deleted file mode 100644 index bb0e83c..0000000 --- a/vendor/github.com/spf13/pflag/uint8.go +++ /dev/null @@ -1,88 +0,0 @@ -package pflag - -import "strconv" - -// -- uint8 Value -type uint8Value uint8 - -func newUint8Value(val uint8, p *uint8) *uint8Value { - *p = val - return (*uint8Value)(p) -} - -func (i *uint8Value) Set(s string) error { - v, err := strconv.ParseUint(s, 0, 8) - *i = uint8Value(v) - return err -} - -func (i *uint8Value) Type() string { - return "uint8" -} - -func (i *uint8Value) String() string { return strconv.FormatUint(uint64(*i), 10) } - -func uint8Conv(sval string) (interface{}, error) { - v, err := strconv.ParseUint(sval, 0, 8) - if err != nil { - return 0, err - } - return uint8(v), nil -} - -// GetUint8 return the uint8 value of a flag with the given name -func (f *FlagSet) GetUint8(name string) (uint8, error) { - val, err := f.getFlagType(name, "uint8", uint8Conv) - if err != nil { - return 0, err - } - return val.(uint8), nil -} - -// Uint8Var defines a uint8 flag with specified name, default value, and usage string. -// The argument p points to a uint8 variable in which to store the value of the flag. -func (f *FlagSet) Uint8Var(p *uint8, name string, value uint8, usage string) { - f.VarP(newUint8Value(value, p), name, "", usage) -} - -// Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string) { - f.VarP(newUint8Value(value, p), name, shorthand, usage) -} - -// Uint8Var defines a uint8 flag with specified name, default value, and usage string. -// The argument p points to a uint8 variable in which to store the value of the flag. -func Uint8Var(p *uint8, name string, value uint8, usage string) { - CommandLine.VarP(newUint8Value(value, p), name, "", usage) -} - -// Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash. -func Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string) { - CommandLine.VarP(newUint8Value(value, p), name, shorthand, usage) -} - -// Uint8 defines a uint8 flag with specified name, default value, and usage string. -// The return value is the address of a uint8 variable that stores the value of the flag. -func (f *FlagSet) Uint8(name string, value uint8, usage string) *uint8 { - p := new(uint8) - f.Uint8VarP(p, name, "", value, usage) - return p -} - -// Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint8P(name, shorthand string, value uint8, usage string) *uint8 { - p := new(uint8) - f.Uint8VarP(p, name, shorthand, value, usage) - return p -} - -// Uint8 defines a uint8 flag with specified name, default value, and usage string. -// The return value is the address of a uint8 variable that stores the value of the flag. -func Uint8(name string, value uint8, usage string) *uint8 { - return CommandLine.Uint8P(name, "", value, usage) -} - -// Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash. -func Uint8P(name, shorthand string, value uint8, usage string) *uint8 { - return CommandLine.Uint8P(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/pflag/uint_slice.go b/vendor/github.com/spf13/pflag/uint_slice.go deleted file mode 100644 index 5fa9248..0000000 --- a/vendor/github.com/spf13/pflag/uint_slice.go +++ /dev/null @@ -1,168 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" -) - -// -- uintSlice Value -type uintSliceValue struct { - value *[]uint - changed bool -} - -func newUintSliceValue(val []uint, p *[]uint) *uintSliceValue { - uisv := new(uintSliceValue) - uisv.value = p - *uisv.value = val - return uisv -} - -func (s *uintSliceValue) Set(val string) error { - ss := strings.Split(val, ",") - out := make([]uint, len(ss)) - for i, d := range ss { - u, err := strconv.ParseUint(d, 10, 0) - if err != nil { - return err - } - out[i] = uint(u) - } - if !s.changed { - *s.value = out - } else { - *s.value = append(*s.value, out...) - } - s.changed = true - return nil -} - -func (s *uintSliceValue) Type() string { - return "uintSlice" -} - -func (s *uintSliceValue) String() string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = fmt.Sprintf("%d", d) - } - return "[" + strings.Join(out, ",") + "]" -} - -func (s *uintSliceValue) fromString(val string) (uint, error) { - t, err := strconv.ParseUint(val, 10, 0) - if err != nil { - return 0, err - } - return uint(t), nil -} - -func (s *uintSliceValue) toString(val uint) string { - return fmt.Sprintf("%d", val) -} - -func (s *uintSliceValue) Append(val string) error { - i, err := s.fromString(val) - if err != nil { - return err - } - *s.value = append(*s.value, i) - return nil -} - -func (s *uintSliceValue) Replace(val []string) error { - out := make([]uint, len(val)) - for i, d := range val { - var err error - out[i], err = s.fromString(d) - if err != nil { - return err - } - } - *s.value = out - return nil -} - -func (s *uintSliceValue) GetSlice() []string { - out := make([]string, len(*s.value)) - for i, d := range *s.value { - out[i] = s.toString(d) - } - return out -} - -func uintSliceConv(val string) (interface{}, error) { - val = strings.Trim(val, "[]") - // Empty string would cause a slice with one (empty) entry - if len(val) == 0 { - return []uint{}, nil - } - ss := strings.Split(val, ",") - out := make([]uint, len(ss)) - for i, d := range ss { - u, err := strconv.ParseUint(d, 10, 0) - if err != nil { - return nil, err - } - out[i] = uint(u) - } - return out, nil -} - -// GetUintSlice returns the []uint value of a flag with the given name. -func (f *FlagSet) GetUintSlice(name string) ([]uint, error) { - val, err := f.getFlagType(name, "uintSlice", uintSliceConv) - if err != nil { - return []uint{}, err - } - return val.([]uint), nil -} - -// UintSliceVar defines a uintSlice flag with specified name, default value, and usage string. -// The argument p points to a []uint variable in which to store the value of the flag. -func (f *FlagSet) UintSliceVar(p *[]uint, name string, value []uint, usage string) { - f.VarP(newUintSliceValue(value, p), name, "", usage) -} - -// UintSliceVarP is like UintSliceVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) UintSliceVarP(p *[]uint, name, shorthand string, value []uint, usage string) { - f.VarP(newUintSliceValue(value, p), name, shorthand, usage) -} - -// UintSliceVar defines a uint[] flag with specified name, default value, and usage string. -// The argument p points to a uint[] variable in which to store the value of the flag. -func UintSliceVar(p *[]uint, name string, value []uint, usage string) { - CommandLine.VarP(newUintSliceValue(value, p), name, "", usage) -} - -// UintSliceVarP is like the UintSliceVar, but accepts a shorthand letter that can be used after a single dash. -func UintSliceVarP(p *[]uint, name, shorthand string, value []uint, usage string) { - CommandLine.VarP(newUintSliceValue(value, p), name, shorthand, usage) -} - -// UintSlice defines a []uint flag with specified name, default value, and usage string. -// The return value is the address of a []uint variable that stores the value of the flag. -func (f *FlagSet) UintSlice(name string, value []uint, usage string) *[]uint { - p := []uint{} - f.UintSliceVarP(&p, name, "", value, usage) - return &p -} - -// UintSliceP is like UintSlice, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) UintSliceP(name, shorthand string, value []uint, usage string) *[]uint { - p := []uint{} - f.UintSliceVarP(&p, name, shorthand, value, usage) - return &p -} - -// UintSlice defines a []uint flag with specified name, default value, and usage string. -// The return value is the address of a []uint variable that stores the value of the flag. -func UintSlice(name string, value []uint, usage string) *[]uint { - return CommandLine.UintSliceP(name, "", value, usage) -} - -// UintSliceP is like UintSlice, but accepts a shorthand letter that can be used after a single dash. -func UintSliceP(name, shorthand string, value []uint, usage string) *[]uint { - return CommandLine.UintSliceP(name, shorthand, value, usage) -} diff --git a/vendor/github.com/spf13/viper/.editorconfig b/vendor/github.com/spf13/viper/.editorconfig deleted file mode 100644 index 1f664d1..0000000 --- a/vendor/github.com/spf13/viper/.editorconfig +++ /dev/null @@ -1,18 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 4 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true - -[*.go] -indent_style = tab - -[{Makefile,*.mk}] -indent_style = tab - -[*.nix] -indent_size = 2 diff --git a/vendor/github.com/spf13/viper/.envrc b/vendor/github.com/spf13/viper/.envrc deleted file mode 100644 index 3ce7171..0000000 --- a/vendor/github.com/spf13/viper/.envrc +++ /dev/null @@ -1,4 +0,0 @@ -if ! has nix_direnv_version || ! nix_direnv_version 2.3.0; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.3.0/direnvrc" "sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8=" -fi -use flake . --impure diff --git a/vendor/github.com/spf13/viper/.gitignore b/vendor/github.com/spf13/viper/.gitignore deleted file mode 100644 index f1bbd42..0000000 --- a/vendor/github.com/spf13/viper/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/.devenv/ -/.direnv/ -/.idea/ -/.pre-commit-config.yaml -/bin/ -/build/ -/var/ -/vendor/ diff --git a/vendor/github.com/spf13/viper/.golangci.yaml b/vendor/github.com/spf13/viper/.golangci.yaml deleted file mode 100644 index 1faeae4..0000000 --- a/vendor/github.com/spf13/viper/.golangci.yaml +++ /dev/null @@ -1,108 +0,0 @@ -run: - timeout: 5m - -linters-settings: - gci: - sections: - - standard - - default - - prefix(github.com/spf13/viper) - gocritic: - # Enable multiple checks by tags. See "Tags" section in https://github.com/go-critic/go-critic#usage. - enabled-tags: - - diagnostic - - experimental - - opinionated - - style - disabled-checks: - - importShadow - - unnamedResult - golint: - min-confidence: 0 - goimports: - local-prefixes: github.com/spf13/viper - -linters: - disable-all: true - enable: - - bodyclose - - dogsled - - dupl - - durationcheck - - exhaustive - - exportloopref - - gci - - gocritic - - godot - - gofmt - - gofumpt - - goimports - - gomoddirectives - - goprintffuncname - - govet - - importas - - ineffassign - - makezero - - misspell - - nakedret - - nilerr - - noctx - - nolintlint - - prealloc - - predeclared - - revive - - rowserrcheck - - sqlclosecheck - - staticcheck - - stylecheck - - tparallel - - typecheck - - unconvert - - unparam - - unused - - wastedassign - - whitespace - - # fixme - # - cyclop - # - errcheck - # - errorlint - # - exhaustivestruct - # - forbidigo - # - forcetypeassert - # - gochecknoglobals - # - gochecknoinits - # - gocognit - # - goconst - # - gocyclo - # - gosec - # - gosimple - # - ifshort - # - lll - # - nlreturn - # - paralleltest - # - scopelint - # - thelper - # - wrapcheck - - # unused - # - depguard - # - goheader - # - gomodguard - - # deprecated - # - deadcode - # - structcheck - # - varcheck - - # don't enable: - # - asciicheck - # - funlen - # - godox - # - goerr113 - # - gomnd - # - interfacer - # - maligned - # - nestif - # - testpackage - # - wsl diff --git a/vendor/github.com/spf13/viper/.yamlignore b/vendor/github.com/spf13/viper/.yamlignore deleted file mode 100644 index c04c4de..0000000 --- a/vendor/github.com/spf13/viper/.yamlignore +++ /dev/null @@ -1,2 +0,0 @@ -# TODO: FIXME -/.github/ diff --git a/vendor/github.com/spf13/viper/.yamllint.yaml b/vendor/github.com/spf13/viper/.yamllint.yaml deleted file mode 100644 index bac19ce..0000000 --- a/vendor/github.com/spf13/viper/.yamllint.yaml +++ /dev/null @@ -1,6 +0,0 @@ -ignore-from-file: [.gitignore, .yamlignore] - -extends: default - -rules: - line-length: disable diff --git a/vendor/github.com/spf13/viper/LICENSE b/vendor/github.com/spf13/viper/LICENSE deleted file mode 100644 index 4527efb..0000000 --- a/vendor/github.com/spf13/viper/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Steve Francia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/spf13/viper/Makefile b/vendor/github.com/spf13/viper/Makefile deleted file mode 100644 index a77b9c8..0000000 --- a/vendor/github.com/spf13/viper/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html - -OS = $(shell uname | tr A-Z a-z) -export PATH := $(abspath bin/):${PATH} - -# Build variables -BUILD_DIR ?= build -export CGO_ENABLED ?= 0 -export GOOS = $(shell go env GOOS) -ifeq (${VERBOSE}, 1) -ifeq ($(filter -v,${GOARGS}),) - GOARGS += -v -endif -TEST_FORMAT = short-verbose -endif - -# Dependency versions -GOTESTSUM_VERSION = 1.9.0 -GOLANGCI_VERSION = 1.53.3 - -# Add the ability to override some variables -# Use with care --include override.mk - -.PHONY: clear -clear: ## Clear the working area and the project - rm -rf bin/ - -.PHONY: check -check: test lint ## Run tests and linters - - -TEST_PKGS ?= ./... -.PHONY: test -test: TEST_FORMAT ?= short -test: SHELL = /bin/bash -test: export CGO_ENABLED=1 -test: bin/gotestsum ## Run tests - @mkdir -p ${BUILD_DIR} - bin/gotestsum --no-summary=skipped --junitfile ${BUILD_DIR}/coverage.xml --format ${TEST_FORMAT} -- -race -coverprofile=${BUILD_DIR}/coverage.txt -covermode=atomic $(filter-out -v,${GOARGS}) $(if ${TEST_PKGS},${TEST_PKGS},./...) - -.PHONY: lint -lint: lint-go lint-yaml -lint: ## Run linters - -.PHONY: lint-go -lint-go: - golangci-lint run $(if ${CI},--out-format github-actions,) - -.PHONY: lint-yaml -lint-yaml: - yamllint $(if ${CI},-f github,) --no-warnings . - -.PHONY: fmt -fmt: ## Format code - golangci-lint run --fix - -deps: bin/golangci-lint bin/gotestsum yamllint -deps: ## Install dependencies - -bin/gotestsum: - @mkdir -p bin - curl -L https://github.com/gotestyourself/gotestsum/releases/download/v${GOTESTSUM_VERSION}/gotestsum_${GOTESTSUM_VERSION}_${OS}_amd64.tar.gz | tar -zOxf - gotestsum > ./bin/gotestsum && chmod +x ./bin/gotestsum - -bin/golangci-lint: - @mkdir -p bin - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- v${GOLANGCI_VERSION} - -.PHONY: yamllint -yamllint: - pip3 install --user yamllint - -# Add custom targets here --include custom.mk - -.PHONY: list -list: ## List all make targets - @${MAKE} -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | sort - -.PHONY: help -.DEFAULT_GOAL := help -help: - @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' - -# Variable outputting/exporting rules -var-%: ; @echo $($*) -varexport-%: ; @echo $*=$($*) diff --git a/vendor/github.com/spf13/viper/README.md b/vendor/github.com/spf13/viper/README.md deleted file mode 100644 index b96180b..0000000 --- a/vendor/github.com/spf13/viper/README.md +++ /dev/null @@ -1,928 +0,0 @@ -> ## Viper v2 feedback -> Viper is heading towards v2 and we would love to hear what _**you**_ would like to see in it. Share your thoughts here: https://forms.gle/R6faU74qPRPAzchZ9 -> -> **Thank you!** - -![Viper](.github/logo.png?raw=true) - -[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#configuration) -[![run on repl.it](https://repl.it/badge/github/sagikazarmark/Viper-example)](https://repl.it/@sagikazarmark/Viper-example#main.go) - -[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/spf13/viper/ci.yaml?branch=master&style=flat-square)](https://github.com/spf13/viper/actions?query=workflow%3ACI) -[![Join the chat at https://gitter.im/spf13/viper](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/spf13/viper?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/viper?style=flat-square)](https://goreportcard.com/report/github.com/spf13/viper) -![Go Version](https://img.shields.io/badge/go%20version-%3E=1.19-61CFDD.svg?style=flat-square) -[![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/spf13/viper)](https://pkg.go.dev/mod/github.com/spf13/viper) - -**Go configuration with fangs!** - -Many Go projects are built using Viper including: - -* [Hugo](http://gohugo.io) -* [EMC RexRay](http://rexray.readthedocs.org/en/stable/) -* [Imgur’s Incus](https://github.com/Imgur/incus) -* [Nanobox](https://github.com/nanobox-io/nanobox)/[Nanopack](https://github.com/nanopack) -* [Docker Notary](https://github.com/docker/Notary) -* [BloomApi](https://www.bloomapi.com/) -* [doctl](https://github.com/digitalocean/doctl) -* [Clairctl](https://github.com/jgsqware/clairctl) -* [Mercure](https://mercure.rocks) -* [Meshery](https://github.com/meshery/meshery) -* [Bearer](https://github.com/bearer/bearer) -* [Coder](https://github.com/coder/coder) -* [Vitess](https://vitess.io/) - - -## Install - -```shell -go get github.com/spf13/viper -``` - -**Note:** Viper uses [Go Modules](https://github.com/golang/go/wiki/Modules) to manage dependencies. - - -## What is Viper? - -Viper is a complete configuration solution for Go applications including [12-Factor apps](https://12factor.net/#the_twelve_factors). -It is designed to work within an application, and can handle all types of configuration needs -and formats. It supports: - -* setting defaults -* reading from JSON, TOML, YAML, HCL, envfile and Java properties config files -* live watching and re-reading of config files (optional) -* reading from environment variables -* reading from remote config systems (etcd or Consul), and watching changes -* reading from command line flags -* reading from buffer -* setting explicit values - -Viper can be thought of as a registry for all of your applications configuration needs. - - -## Why Viper? - -When building a modern application, you don’t want to worry about -configuration file formats; you want to focus on building awesome software. -Viper is here to help with that. - -Viper does the following for you: - -1. Find, load, and unmarshal a configuration file in JSON, TOML, YAML, HCL, INI, envfile or Java properties formats. -2. Provide a mechanism to set default values for your different configuration options. -3. Provide a mechanism to set override values for options specified through command line flags. -4. Provide an alias system to easily rename parameters without breaking existing code. -5. Make it easy to tell the difference between when a user has provided a command line or config file which is the same as the default. - -Viper uses the following precedence order. Each item takes precedence over the item below it: - - * explicit call to `Set` - * flag - * env - * config - * key/value store - * default - -**Important:** Viper configuration keys are case insensitive. -There are ongoing discussions about making that optional. - - -## Putting Values into Viper - -### Establishing Defaults - -A good configuration system will support default values. A default value is not -required for a key, but it’s useful in the event that a key hasn't been set via -config file, environment variable, remote configuration or flag. - -Examples: - -```go -viper.SetDefault("ContentDir", "content") -viper.SetDefault("LayoutDir", "layouts") -viper.SetDefault("Taxonomies", map[string]string{"tag": "tags", "category": "categories"}) -``` - -### Reading Config Files - -Viper requires minimal configuration so it knows where to look for config files. -Viper supports JSON, TOML, YAML, HCL, INI, envfile and Java Properties files. Viper can search multiple paths, but -currently a single Viper instance only supports a single configuration file. -Viper does not default to any configuration search paths leaving defaults decision -to an application. - -Here is an example of how to use Viper to search for and read a configuration file. -None of the specific paths are required, but at least one path should be provided -where a configuration file is expected. - -```go -viper.SetConfigName("config") // name of config file (without extension) -viper.SetConfigType("yaml") // REQUIRED if the config file does not have the extension in the name -viper.AddConfigPath("/etc/appname/") // path to look for the config file in -viper.AddConfigPath("$HOME/.appname") // call multiple times to add many search paths -viper.AddConfigPath(".") // optionally look for config in the working directory -err := viper.ReadInConfig() // Find and read the config file -if err != nil { // Handle errors reading the config file - panic(fmt.Errorf("fatal error config file: %w", err)) -} -``` - -You can handle the specific case where no config file is found like this: - -```go -if err := viper.ReadInConfig(); err != nil { - if _, ok := err.(viper.ConfigFileNotFoundError); ok { - // Config file not found; ignore error if desired - } else { - // Config file was found but another error was produced - } -} - -// Config file found and successfully parsed -``` - -*NOTE [since 1.6]:* You can also have a file without an extension and specify the format programmatically. For those configuration files that lie in the home of the user without any extension like `.bashrc` - -### Writing Config Files - -Reading from config files is useful, but at times you want to store all modifications made at run time. -For that, a bunch of commands are available, each with its own purpose: - -* WriteConfig - writes the current viper configuration to the predefined path, if exists. Errors if no predefined path. Will overwrite the current config file, if it exists. -* SafeWriteConfig - writes the current viper configuration to the predefined path. Errors if no predefined path. Will not overwrite the current config file, if it exists. -* WriteConfigAs - writes the current viper configuration to the given filepath. Will overwrite the given file, if it exists. -* SafeWriteConfigAs - writes the current viper configuration to the given filepath. Will not overwrite the given file, if it exists. - -As a rule of the thumb, everything marked with safe won't overwrite any file, but just create if not existent, whilst the default behavior is to create or truncate. - -A small examples section: - -```go -viper.WriteConfig() // writes current config to predefined path set by 'viper.AddConfigPath()' and 'viper.SetConfigName' -viper.SafeWriteConfig() -viper.WriteConfigAs("/path/to/my/.config") -viper.SafeWriteConfigAs("/path/to/my/.config") // will error since it has already been written -viper.SafeWriteConfigAs("/path/to/my/.other_config") -``` - -### Watching and re-reading config files - -Viper supports the ability to have your application live read a config file while running. - -Gone are the days of needing to restart a server to have a config take effect, -viper powered applications can read an update to a config file while running and -not miss a beat. - -Simply tell the viper instance to watchConfig. -Optionally you can provide a function for Viper to run each time a change occurs. - -**Make sure you add all of the configPaths prior to calling `WatchConfig()`** - -```go -viper.OnConfigChange(func(e fsnotify.Event) { - fmt.Println("Config file changed:", e.Name) -}) -viper.WatchConfig() -``` - -### Reading Config from io.Reader - -Viper predefines many configuration sources such as files, environment -variables, flags, and remote K/V store, but you are not bound to them. You can -also implement your own required configuration source and feed it to viper. - -```go -viper.SetConfigType("yaml") // or viper.SetConfigType("YAML") - -// any approach to require this configuration into your program. -var yamlExample = []byte(` -Hacker: true -name: steve -hobbies: -- skateboarding -- snowboarding -- go -clothing: - jacket: leather - trousers: denim -age: 35 -eyes : brown -beard: true -`) - -viper.ReadConfig(bytes.NewBuffer(yamlExample)) - -viper.Get("name") // this would be "steve" -``` - -### Setting Overrides - -These could be from a command line flag, or from your own application logic. - -```go -viper.Set("Verbose", true) -viper.Set("LogFile", LogFile) -viper.Set("host.port", 5899) // set subset -``` - -### Registering and Using Aliases - -Aliases permit a single value to be referenced by multiple keys - -```go -viper.RegisterAlias("loud", "Verbose") - -viper.Set("verbose", true) // same result as next line -viper.Set("loud", true) // same result as prior line - -viper.GetBool("loud") // true -viper.GetBool("verbose") // true -``` - -### Working with Environment Variables - -Viper has full support for environment variables. This enables 12 factor -applications out of the box. There are five methods that exist to aid working -with ENV: - - * `AutomaticEnv()` - * `BindEnv(string...) : error` - * `SetEnvPrefix(string)` - * `SetEnvKeyReplacer(string...) *strings.Replacer` - * `AllowEmptyEnv(bool)` - -_When working with ENV variables, it’s important to recognize that Viper -treats ENV variables as case sensitive._ - -Viper provides a mechanism to try to ensure that ENV variables are unique. By -using `SetEnvPrefix`, you can tell Viper to use a prefix while reading from -the environment variables. Both `BindEnv` and `AutomaticEnv` will use this -prefix. - -`BindEnv` takes one or more parameters. The first parameter is the key name, the -rest are the name of the environment variables to bind to this key. If more than -one are provided, they will take precedence in the specified order. The name of -the environment variable is case sensitive. If the ENV variable name is not provided, then -Viper will automatically assume that the ENV variable matches the following format: prefix + "_" + the key name in ALL CAPS. When you explicitly provide the ENV variable name (the second parameter), -it **does not** automatically add the prefix. For example if the second parameter is "id", -Viper will look for the ENV variable "ID". - -One important thing to recognize when working with ENV variables is that the -value will be read each time it is accessed. Viper does not fix the value when -the `BindEnv` is called. - -`AutomaticEnv` is a powerful helper especially when combined with -`SetEnvPrefix`. When called, Viper will check for an environment variable any -time a `viper.Get` request is made. It will apply the following rules. It will -check for an environment variable with a name matching the key uppercased and -prefixed with the `EnvPrefix` if set. - -`SetEnvKeyReplacer` allows you to use a `strings.Replacer` object to rewrite Env -keys to an extent. This is useful if you want to use `-` or something in your -`Get()` calls, but want your environmental variables to use `_` delimiters. An -example of using it can be found in `viper_test.go`. - -Alternatively, you can use `EnvKeyReplacer` with `NewWithOptions` factory function. -Unlike `SetEnvKeyReplacer`, it accepts a `StringReplacer` interface allowing you to write custom string replacing logic. - -By default empty environment variables are considered unset and will fall back to -the next configuration source. To treat empty environment variables as set, use -the `AllowEmptyEnv` method. - -#### Env example - -```go -SetEnvPrefix("spf") // will be uppercased automatically -BindEnv("id") - -os.Setenv("SPF_ID", "13") // typically done outside of the app - -id := Get("id") // 13 -``` - -### Working with Flags - -Viper has the ability to bind to flags. Specifically, Viper supports `Pflags` -as used in the [Cobra](https://github.com/spf13/cobra) library. - -Like `BindEnv`, the value is not set when the binding method is called, but when -it is accessed. This means you can bind as early as you want, even in an -`init()` function. - -For individual flags, the `BindPFlag()` method provides this functionality. - -Example: - -```go -serverCmd.Flags().Int("port", 1138, "Port to run Application server on") -viper.BindPFlag("port", serverCmd.Flags().Lookup("port")) -``` - -You can also bind an existing set of pflags (pflag.FlagSet): - -Example: - -```go -pflag.Int("flagname", 1234, "help message for flagname") - -pflag.Parse() -viper.BindPFlags(pflag.CommandLine) - -i := viper.GetInt("flagname") // retrieve values from viper instead of pflag -``` - -The use of [pflag](https://github.com/spf13/pflag/) in Viper does not preclude -the use of other packages that use the [flag](https://golang.org/pkg/flag/) -package from the standard library. The pflag package can handle the flags -defined for the flag package by importing these flags. This is accomplished -by a calling a convenience function provided by the pflag package called -AddGoFlagSet(). - -Example: - -```go -package main - -import ( - "flag" - "github.com/spf13/pflag" -) - -func main() { - - // using standard library "flag" package - flag.Int("flagname", 1234, "help message for flagname") - - pflag.CommandLine.AddGoFlagSet(flag.CommandLine) - pflag.Parse() - viper.BindPFlags(pflag.CommandLine) - - i := viper.GetInt("flagname") // retrieve value from viper - - // ... -} -``` - -#### Flag interfaces - -Viper provides two Go interfaces to bind other flag systems if you don’t use `Pflags`. - -`FlagValue` represents a single flag. This is a very simple example on how to implement this interface: - -```go -type myFlag struct {} -func (f myFlag) HasChanged() bool { return false } -func (f myFlag) Name() string { return "my-flag-name" } -func (f myFlag) ValueString() string { return "my-flag-value" } -func (f myFlag) ValueType() string { return "string" } -``` - -Once your flag implements this interface, you can simply tell Viper to bind it: - -```go -viper.BindFlagValue("my-flag-name", myFlag{}) -``` - -`FlagValueSet` represents a group of flags. This is a very simple example on how to implement this interface: - -```go -type myFlagSet struct { - flags []myFlag -} - -func (f myFlagSet) VisitAll(fn func(FlagValue)) { - for _, flag := range flags { - fn(flag) - } -} -``` - -Once your flag set implements this interface, you can simply tell Viper to bind it: - -```go -fSet := myFlagSet{ - flags: []myFlag{myFlag{}, myFlag{}}, -} -viper.BindFlagValues("my-flags", fSet) -``` - -### Remote Key/Value Store Support - -To enable remote support in Viper, do a blank import of the `viper/remote` -package: - -`import _ "github.com/spf13/viper/remote"` - -Viper will read a config string (as JSON, TOML, YAML, HCL or envfile) retrieved from a path -in a Key/Value store such as etcd or Consul. These values take precedence over -default values, but are overridden by configuration values retrieved from disk, -flags, or environment variables. - -Viper supports multiple hosts. To use, pass a list of endpoints separated by `;`. For example `http://127.0.0.1:4001;http://127.0.0.1:4002`. - -Viper uses [crypt](https://github.com/bketelsen/crypt) to retrieve -configuration from the K/V store, which means that you can store your -configuration values encrypted and have them automatically decrypted if you have -the correct gpg keyring. Encryption is optional. - -You can use remote configuration in conjunction with local configuration, or -independently of it. - -`crypt` has a command-line helper that you can use to put configurations in your -K/V store. `crypt` defaults to etcd on http://127.0.0.1:4001. - -```bash -$ go get github.com/bketelsen/crypt/bin/crypt -$ crypt set -plaintext /config/hugo.json /Users/hugo/settings/config.json -``` - -Confirm that your value was set: - -```bash -$ crypt get -plaintext /config/hugo.json -``` - -See the `crypt` documentation for examples of how to set encrypted values, or -how to use Consul. - -### Remote Key/Value Store Example - Unencrypted - -#### etcd -```go -viper.AddRemoteProvider("etcd", "http://127.0.0.1:4001","/config/hugo.json") -viper.SetConfigType("json") // because there is no file extension in a stream of bytes, supported extensions are "json", "toml", "yaml", "yml", "properties", "props", "prop", "env", "dotenv" -err := viper.ReadRemoteConfig() -``` - -#### etcd3 -```go -viper.AddRemoteProvider("etcd3", "http://127.0.0.1:4001","/config/hugo.json") -viper.SetConfigType("json") // because there is no file extension in a stream of bytes, supported extensions are "json", "toml", "yaml", "yml", "properties", "props", "prop", "env", "dotenv" -err := viper.ReadRemoteConfig() -``` - -#### Consul -You need to set a key to Consul key/value storage with JSON value containing your desired config. -For example, create a Consul key/value store key `MY_CONSUL_KEY` with value: - -```json -{ - "port": 8080, - "hostname": "myhostname.com" -} -``` - -```go -viper.AddRemoteProvider("consul", "localhost:8500", "MY_CONSUL_KEY") -viper.SetConfigType("json") // Need to explicitly set this to json -err := viper.ReadRemoteConfig() - -fmt.Println(viper.Get("port")) // 8080 -fmt.Println(viper.Get("hostname")) // myhostname.com -``` - -#### Firestore - -```go -viper.AddRemoteProvider("firestore", "google-cloud-project-id", "collection/document") -viper.SetConfigType("json") // Config's format: "json", "toml", "yaml", "yml" -err := viper.ReadRemoteConfig() -``` - -Of course, you're allowed to use `SecureRemoteProvider` also - - -#### NATS - -```go -viper.AddRemoteProvider("nats", "nats://127.0.0.1:4222", "myapp.config") -viper.SetConfigType("json") -err := viper.ReadRemoteConfig() -``` - -### Remote Key/Value Store Example - Encrypted - -```go -viper.AddSecureRemoteProvider("etcd","http://127.0.0.1:4001","/config/hugo.json","/etc/secrets/mykeyring.gpg") -viper.SetConfigType("json") // because there is no file extension in a stream of bytes, supported extensions are "json", "toml", "yaml", "yml", "properties", "props", "prop", "env", "dotenv" -err := viper.ReadRemoteConfig() -``` - -### Watching Changes in etcd - Unencrypted - -```go -// alternatively, you can create a new viper instance. -var runtime_viper = viper.New() - -runtime_viper.AddRemoteProvider("etcd", "http://127.0.0.1:4001", "/config/hugo.yml") -runtime_viper.SetConfigType("yaml") // because there is no file extension in a stream of bytes, supported extensions are "json", "toml", "yaml", "yml", "properties", "props", "prop", "env", "dotenv" - -// read from remote config the first time. -err := runtime_viper.ReadRemoteConfig() - -// unmarshal config -runtime_viper.Unmarshal(&runtime_conf) - -// open a goroutine to watch remote changes forever -go func(){ - for { - time.Sleep(time.Second * 5) // delay after each request - - // currently, only tested with etcd support - err := runtime_viper.WatchRemoteConfig() - if err != nil { - log.Errorf("unable to read remote config: %v", err) - continue - } - - // unmarshal new config into our runtime config struct. you can also use channel - // to implement a signal to notify the system of the changes - runtime_viper.Unmarshal(&runtime_conf) - } -}() -``` - -## Getting Values From Viper - -In Viper, there are a few ways to get a value depending on the value’s type. -The following functions and methods exist: - - * `Get(key string) : any` - * `GetBool(key string) : bool` - * `GetFloat64(key string) : float64` - * `GetInt(key string) : int` - * `GetIntSlice(key string) : []int` - * `GetString(key string) : string` - * `GetStringMap(key string) : map[string]any` - * `GetStringMapString(key string) : map[string]string` - * `GetStringSlice(key string) : []string` - * `GetTime(key string) : time.Time` - * `GetDuration(key string) : time.Duration` - * `IsSet(key string) : bool` - * `AllSettings() : map[string]any` - -One important thing to recognize is that each Get function will return a zero -value if it’s not found. To check if a given key exists, the `IsSet()` method -has been provided. - -The zero value will also be returned if the value is set, but fails to parse -as the requested type. - -Example: -```go -viper.GetString("logfile") // case-insensitive Setting & Getting -if viper.GetBool("verbose") { - fmt.Println("verbose enabled") -} -``` -### Accessing nested keys - -The accessor methods also accept formatted paths to deeply nested keys. For -example, if the following JSON file is loaded: - -```json -{ - "host": { - "address": "localhost", - "port": 5799 - }, - "datastore": { - "metric": { - "host": "127.0.0.1", - "port": 3099 - }, - "warehouse": { - "host": "198.0.0.1", - "port": 2112 - } - } -} - -``` - -Viper can access a nested field by passing a `.` delimited path of keys: - -```go -GetString("datastore.metric.host") // (returns "127.0.0.1") -``` - -This obeys the precedence rules established above; the search for the path -will cascade through the remaining configuration registries until found. - -For example, given this configuration file, both `datastore.metric.host` and -`datastore.metric.port` are already defined (and may be overridden). If in addition -`datastore.metric.protocol` was defined in the defaults, Viper would also find it. - -However, if `datastore.metric` was overridden (by a flag, an environment variable, -the `Set()` method, …) with an immediate value, then all sub-keys of -`datastore.metric` become undefined, they are “shadowed” by the higher-priority -configuration level. - -Viper can access array indices by using numbers in the path. For example: - -```jsonc -{ - "host": { - "address": "localhost", - "ports": [ - 5799, - 6029 - ] - }, - "datastore": { - "metric": { - "host": "127.0.0.1", - "port": 3099 - }, - "warehouse": { - "host": "198.0.0.1", - "port": 2112 - } - } -} - -GetInt("host.ports.1") // returns 6029 - -``` - -Lastly, if there exists a key that matches the delimited key path, its value -will be returned instead. E.g. - -```jsonc -{ - "datastore.metric.host": "0.0.0.0", - "host": { - "address": "localhost", - "port": 5799 - }, - "datastore": { - "metric": { - "host": "127.0.0.1", - "port": 3099 - }, - "warehouse": { - "host": "198.0.0.1", - "port": 2112 - } - } -} - -GetString("datastore.metric.host") // returns "0.0.0.0" -``` - -### Extracting a sub-tree - -When developing reusable modules, it's often useful to extract a subset of the configuration -and pass it to a module. This way the module can be instantiated more than once, with different configurations. - -For example, an application might use multiple different cache stores for different purposes: - -```yaml -cache: - cache1: - max-items: 100 - item-size: 64 - cache2: - max-items: 200 - item-size: 80 -``` - -We could pass the cache name to a module (eg. `NewCache("cache1")`), -but it would require weird concatenation for accessing config keys and would be less separated from the global config. - -So instead of doing that let's pass a Viper instance to the constructor that represents a subset of the configuration: - -```go -cache1Config := viper.Sub("cache.cache1") -if cache1Config == nil { // Sub returns nil if the key cannot be found - panic("cache configuration not found") -} - -cache1 := NewCache(cache1Config) -``` - -**Note:** Always check the return value of `Sub`. It returns `nil` if a key cannot be found. - -Internally, the `NewCache` function can address `max-items` and `item-size` keys directly: - -```go -func NewCache(v *Viper) *Cache { - return &Cache{ - MaxItems: v.GetInt("max-items"), - ItemSize: v.GetInt("item-size"), - } -} -``` - -The resulting code is easy to test, since it's decoupled from the main config structure, -and easier to reuse (for the same reason). - - -### Unmarshaling - -You also have the option of Unmarshaling all or a specific value to a struct, map, -etc. - -There are two methods to do this: - - * `Unmarshal(rawVal any) : error` - * `UnmarshalKey(key string, rawVal any) : error` - -Example: - -```go -type config struct { - Port int - Name string - PathMap string `mapstructure:"path_map"` -} - -var C config - -err := viper.Unmarshal(&C) -if err != nil { - t.Fatalf("unable to decode into struct, %v", err) -} -``` - -If you want to unmarshal configuration where the keys themselves contain dot (the default key delimiter), -you have to change the delimiter: - -```go -v := viper.NewWithOptions(viper.KeyDelimiter("::")) - -v.SetDefault("chart::values", map[string]any{ - "ingress": map[string]any{ - "annotations": map[string]any{ - "traefik.frontend.rule.type": "PathPrefix", - "traefik.ingress.kubernetes.io/ssl-redirect": "true", - }, - }, -}) - -type config struct { - Chart struct{ - Values map[string]any - } -} - -var C config - -v.Unmarshal(&C) -``` - -Viper also supports unmarshaling into embedded structs: - -```go -/* -Example config: - -module: - enabled: true - token: 89h3f98hbwf987h3f98wenf89ehf -*/ -type config struct { - Module struct { - Enabled bool - - moduleConfig `mapstructure:",squash"` - } -} - -// moduleConfig could be in a module specific package -type moduleConfig struct { - Token string -} - -var C config - -err := viper.Unmarshal(&C) -if err != nil { - t.Fatalf("unable to decode into struct, %v", err) -} -``` - -Viper uses [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) under the hood for unmarshaling values which uses `mapstructure` tags by default. - -### Decoding custom formats - -A frequently requested feature for Viper is adding more value formats and decoders. -For example, parsing character (dot, comma, semicolon, etc) separated strings into slices. - -This is already available in Viper using mapstructure decode hooks. - -Read more about the details in [this blog post](https://sagikazarmark.hu/blog/decoding-custom-formats-with-viper/). - -### Marshalling to string - -You may need to marshal all the settings held in viper into a string rather than write them to a file. -You can use your favorite format's marshaller with the config returned by `AllSettings()`. - -```go -import ( - yaml "gopkg.in/yaml.v2" - // ... -) - -func yamlStringSettings() string { - c := viper.AllSettings() - bs, err := yaml.Marshal(c) - if err != nil { - log.Fatalf("unable to marshal config to YAML: %v", err) - } - return string(bs) -} -``` - -## Viper or Vipers? - -Viper comes ready to use out of the box. There is no configuration or -initialization needed to begin using Viper. Since most applications will want -to use a single central repository for their configuration, the viper package -provides this. It is similar to a singleton. - -In all of the examples above, they demonstrate using viper in its singleton -style approach. - -### Working with multiple vipers - -You can also create many different vipers for use in your application. Each will -have its own unique set of configurations and values. Each can read from a -different config file, key value store, etc. All of the functions that viper -package supports are mirrored as methods on a viper. - -Example: - -```go -x := viper.New() -y := viper.New() - -x.SetDefault("ContentDir", "content") -y.SetDefault("ContentDir", "foobar") - -//... -``` - -When working with multiple vipers, it is up to the user to keep track of the -different vipers. - - -## Q & A - -### Why is it called “Viper”? - -A: Viper is designed to be a [companion](http://en.wikipedia.org/wiki/Viper_(G.I._Joe)) -to [Cobra](https://github.com/spf13/cobra). While both can operate completely -independently, together they make a powerful pair to handle much of your -application foundation needs. - -### Why is it called “Cobra”? - -Is there a better name for a [commander](http://en.wikipedia.org/wiki/Cobra_Commander)? - -### Does Viper support case sensitive keys? - -**tl;dr:** No. - -Viper merges configuration from various sources, many of which are either case insensitive or uses different casing than the rest of the sources (eg. env vars). -In order to provide the best experience when using multiple sources, the decision has been made to make all keys case insensitive. - -There has been several attempts to implement case sensitivity, but unfortunately it's not that trivial. We might take a stab at implementing it in [Viper v2](https://github.com/spf13/viper/issues/772), but despite the initial noise, it does not seem to be requested that much. - -You can vote for case sensitivity by filling out this feedback form: https://forms.gle/R6faU74qPRPAzchZ9 - -### Is it safe to concurrently read and write to a viper? - -No, you will need to synchronize access to the viper yourself (for example by using the `sync` package). Concurrent reads and writes can cause a panic. - -## Troubleshooting - -See [TROUBLESHOOTING.md](TROUBLESHOOTING.md). - -## Development - -**For an optimal developer experience, it is recommended to install [Nix](https://nixos.org/download.html) and [direnv](https://direnv.net/docs/installation.html).** - -_Alternatively, install [Go](https://go.dev/dl/) on your computer then run `make deps` to install the rest of the dependencies._ - -Run the test suite: - -```shell -make test -``` - -Run linters: - -```shell -make lint # pass -j option to run them in parallel -``` - -Some linter violations can automatically be fixed: - -```shell -make fmt -``` - -## License - -The project is licensed under the [MIT License](LICENSE). diff --git a/vendor/github.com/spf13/viper/TROUBLESHOOTING.md b/vendor/github.com/spf13/viper/TROUBLESHOOTING.md deleted file mode 100644 index c4e36c6..0000000 --- a/vendor/github.com/spf13/viper/TROUBLESHOOTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# Troubleshooting - -## Unmarshaling doesn't work - -The most common reason for this issue is improper use of struct tags (eg. `yaml` or `json`). Viper uses [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) under the hood for unmarshaling values which uses `mapstructure` tags by default. Please refer to the library's documentation for using other struct tags. - -## Cannot find package - -Viper installation seems to fail a lot lately with the following (or a similar) error: - -``` -cannot find package "github.com/hashicorp/hcl/tree/hcl1" in any of: -/usr/local/Cellar/go/1.15.7_1/libexec/src/github.com/hashicorp/hcl/tree/hcl1 (from $GOROOT) -/Users/user/go/src/github.com/hashicorp/hcl/tree/hcl1 (from $GOPATH) -``` - -As the error message suggests, Go tries to look up dependencies in `GOPATH` mode (as it's commonly called) from the `GOPATH`. -Viper opted to use [Go Modules](https://github.com/golang/go/wiki/Modules) to manage its dependencies. While in many cases the two methods are interchangeable, once a dependency releases new (major) versions, `GOPATH` mode is no longer able to decide which version to use, so it'll either use one that's already present or pick a version (usually the `master` branch). - -The solution is easy: switch to using Go Modules. -Please refer to the [wiki](https://github.com/golang/go/wiki/Modules) on how to do that. - -**tl;dr* `export GO111MODULE=on` - -## Unquoted 'y' and 'n' characters get replaced with _true_ and _false_ when reading a YAML file - -This is a YAML 1.1 feature according to [go-yaml/yaml#740](https://github.com/go-yaml/yaml/issues/740). - -Potential solutions are: - -1. Quoting values resolved as boolean -1. Upgrading to YAML v3 (for the time being this is possible by passing the `viper_yaml3` tag to your build) diff --git a/vendor/github.com/spf13/viper/file.go b/vendor/github.com/spf13/viper/file.go deleted file mode 100644 index a54fe5a..0000000 --- a/vendor/github.com/spf13/viper/file.go +++ /dev/null @@ -1,56 +0,0 @@ -//go:build !finder - -package viper - -import ( - "fmt" - "os" - "path/filepath" - - "github.com/spf13/afero" -) - -// Search all configPaths for any config file. -// Returns the first path that exists (and is a config file). -func (v *Viper) findConfigFile() (string, error) { - v.logger.Info("searching for config in paths", "paths", v.configPaths) - - for _, cp := range v.configPaths { - file := v.searchInPath(cp) - if file != "" { - return file, nil - } - } - return "", ConfigFileNotFoundError{v.configName, fmt.Sprintf("%s", v.configPaths)} -} - -func (v *Viper) searchInPath(in string) (filename string) { - v.logger.Debug("searching for config in path", "path", in) - for _, ext := range SupportedExts { - v.logger.Debug("checking if file exists", "file", filepath.Join(in, v.configName+"."+ext)) - if b, _ := exists(v.fs, filepath.Join(in, v.configName+"."+ext)); b { - v.logger.Debug("found file", "file", filepath.Join(in, v.configName+"."+ext)) - return filepath.Join(in, v.configName+"."+ext) - } - } - - if v.configType != "" { - if b, _ := exists(v.fs, filepath.Join(in, v.configName)); b { - return filepath.Join(in, v.configName) - } - } - - return "" -} - -// exists checks if file exists. -func exists(fs afero.Fs, path string) (bool, error) { - stat, err := fs.Stat(path) - if err == nil { - return !stat.IsDir(), nil - } - if os.IsNotExist(err) { - return false, nil - } - return false, err -} diff --git a/vendor/github.com/spf13/viper/file_finder.go b/vendor/github.com/spf13/viper/file_finder.go deleted file mode 100644 index d96a1bd..0000000 --- a/vendor/github.com/spf13/viper/file_finder.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build finder - -package viper - -import ( - "fmt" - - "github.com/sagikazarmark/locafero" -) - -// Search all configPaths for any config file. -// Returns the first path that exists (and is a config file). -func (v *Viper) findConfigFile() (string, error) { - var names []string - - if v.configType != "" { - names = locafero.NameWithOptionalExtensions(v.configName, SupportedExts...) - } else { - names = locafero.NameWithExtensions(v.configName, SupportedExts...) - } - - finder := locafero.Finder{ - Paths: v.configPaths, - Names: names, - Type: locafero.FileTypeFile, - } - - results, err := finder.Find(v.fs) - if err != nil { - return "", err - } - - if len(results) == 0 { - return "", ConfigFileNotFoundError{v.configName, fmt.Sprintf("%s", v.configPaths)} - } - - return results[0], nil -} diff --git a/vendor/github.com/spf13/viper/flags.go b/vendor/github.com/spf13/viper/flags.go deleted file mode 100644 index de033ed..0000000 --- a/vendor/github.com/spf13/viper/flags.go +++ /dev/null @@ -1,57 +0,0 @@ -package viper - -import "github.com/spf13/pflag" - -// FlagValueSet is an interface that users can implement -// to bind a set of flags to viper. -type FlagValueSet interface { - VisitAll(fn func(FlagValue)) -} - -// FlagValue is an interface that users can implement -// to bind different flags to viper. -type FlagValue interface { - HasChanged() bool - Name() string - ValueString() string - ValueType() string -} - -// pflagValueSet is a wrapper around *pflag.ValueSet -// that implements FlagValueSet. -type pflagValueSet struct { - flags *pflag.FlagSet -} - -// VisitAll iterates over all *pflag.Flag inside the *pflag.FlagSet. -func (p pflagValueSet) VisitAll(fn func(flag FlagValue)) { - p.flags.VisitAll(func(flag *pflag.Flag) { - fn(pflagValue{flag}) - }) -} - -// pflagValue is a wrapper around *pflag.flag -// that implements FlagValue. -type pflagValue struct { - flag *pflag.Flag -} - -// HasChanged returns whether the flag has changes or not. -func (p pflagValue) HasChanged() bool { - return p.flag.Changed -} - -// Name returns the name of the flag. -func (p pflagValue) Name() string { - return p.flag.Name -} - -// ValueString returns the value of the flag as a string. -func (p pflagValue) ValueString() string { - return p.flag.Value.String() -} - -// ValueType returns the type of the flag as a string. -func (p pflagValue) ValueType() string { - return p.flag.Value.Type() -} diff --git a/vendor/github.com/spf13/viper/flake.lock b/vendor/github.com/spf13/viper/flake.lock deleted file mode 100644 index 78da510..0000000 --- a/vendor/github.com/spf13/viper/flake.lock +++ /dev/null @@ -1,255 +0,0 @@ -{ - "nodes": { - "devenv": { - "inputs": { - "flake-compat": "flake-compat", - "nix": "nix", - "nixpkgs": "nixpkgs", - "pre-commit-hooks": "pre-commit-hooks" - }, - "locked": { - "lastModified": 1687972261, - "narHash": "sha256-+mxvZfwMVoaZYETmuQWqTi/7T9UKoAE+WpdSQkOVJ2g=", - "owner": "cachix", - "repo": "devenv", - "rev": "e85df562088573305e55906eaa964341f8cb0d9f", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "devenv", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1687762428, - "narHash": "sha256-DIf7mi45PKo+s8dOYF+UlXHzE0Wl/+k3tXUyAoAnoGE=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "37dd7bb15791c86d55c5121740a1887ab55ee836", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "devenv", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": [ - "devenv", - "nixpkgs" - ], - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1676545802, - "narHash": "sha256-EK4rZ+Hd5hsvXnzSzk2ikhStJnD63odF7SzsQ8CuSPU=", - "owner": "domenkozar", - "repo": "nix", - "rev": "7c91803598ffbcfe4a55c44ac6d49b2cf07a527f", - "type": "github" - }, - "original": { - "owner": "domenkozar", - "ref": "relaxed-flakes", - "repo": "nix", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1678875422, - "narHash": "sha256-T3o6NcQPwXjxJMn2shz86Chch4ljXgZn746c2caGxd8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "126f49a01de5b7e35a43fd43f891ecf6d3a51459", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1685564631, - "narHash": "sha256-8ywr3AkblY4++3lIVxmrWZFzac7+f32ZEhH/A8pNscI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4f53efe34b3a8877ac923b9350c874e3dcd5dc0a", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1678872516, - "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1687886075, - "narHash": "sha256-PeayJDDDy+uw1Ats4moZnRdL1OFuZm1Tj+KiHlD67+o=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a565059a348422af5af9026b5174dc5c0dcefdae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": [ - "devenv", - "flake-compat" - ], - "flake-utils": "flake-utils", - "gitignore": "gitignore", - "nixpkgs": [ - "devenv", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1686050334, - "narHash": "sha256-R0mczWjDzBpIvM3XXhO908X5e2CQqjyh/gFbwZk/7/Q=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "6881eb2ae5d8a3516e34714e7a90d9d95914c4dc", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "root": { - "inputs": { - "devenv": "devenv", - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/vendor/github.com/spf13/viper/flake.nix b/vendor/github.com/spf13/viper/flake.nix deleted file mode 100644 index 9b26c3f..0000000 --- a/vendor/github.com/spf13/viper/flake.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ - description = "Viper"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - flake-parts.url = "github:hercules-ci/flake-parts"; - devenv.url = "github:cachix/devenv"; - }; - - outputs = inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ - inputs.devenv.flakeModule - ]; - - systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]; - - perSystem = { config, self', inputs', pkgs, system, ... }: rec { - devenv.shells = { - default = { - languages = { - go.enable = true; - }; - - pre-commit.hooks = { - nixpkgs-fmt.enable = true; - yamllint.enable = true; - }; - - packages = with pkgs; [ - gnumake - - golangci-lint - yamllint - ]; - - scripts = { - versions.exec = '' - go version - golangci-lint version - ''; - }; - - enterShell = '' - versions - ''; - - # https://github.com/cachix/devenv/issues/528#issuecomment-1556108767 - containers = pkgs.lib.mkForce { }; - }; - - ci = devenv.shells.default; - }; - }; - }; -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/decoder.go b/vendor/github.com/spf13/viper/internal/encoding/decoder.go deleted file mode 100644 index 8a7b1db..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/decoder.go +++ /dev/null @@ -1,61 +0,0 @@ -package encoding - -import ( - "sync" -) - -// Decoder decodes the contents of b into v. -// It's primarily used for decoding contents of a file into a map[string]any. -type Decoder interface { - Decode(b []byte, v map[string]any) error -} - -const ( - // ErrDecoderNotFound is returned when there is no decoder registered for a format. - ErrDecoderNotFound = encodingError("decoder not found for this format") - - // ErrDecoderFormatAlreadyRegistered is returned when an decoder is already registered for a format. - ErrDecoderFormatAlreadyRegistered = encodingError("decoder already registered for this format") -) - -// DecoderRegistry can choose an appropriate Decoder based on the provided format. -type DecoderRegistry struct { - decoders map[string]Decoder - - mu sync.RWMutex -} - -// NewDecoderRegistry returns a new, initialized DecoderRegistry. -func NewDecoderRegistry() *DecoderRegistry { - return &DecoderRegistry{ - decoders: make(map[string]Decoder), - } -} - -// RegisterDecoder registers a Decoder for a format. -// Registering a Decoder for an already existing format is not supported. -func (e *DecoderRegistry) RegisterDecoder(format string, enc Decoder) error { - e.mu.Lock() - defer e.mu.Unlock() - - if _, ok := e.decoders[format]; ok { - return ErrDecoderFormatAlreadyRegistered - } - - e.decoders[format] = enc - - return nil -} - -// Decode calls the underlying Decoder based on the format. -func (e *DecoderRegistry) Decode(format string, b []byte, v map[string]any) error { - e.mu.RLock() - decoder, ok := e.decoders[format] - e.mu.RUnlock() - - if !ok { - return ErrDecoderNotFound - } - - return decoder.Decode(b, v) -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/dotenv/codec.go b/vendor/github.com/spf13/viper/internal/encoding/dotenv/codec.go deleted file mode 100644 index 3ebc76f..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/dotenv/codec.go +++ /dev/null @@ -1,61 +0,0 @@ -package dotenv - -import ( - "bytes" - "fmt" - "sort" - "strings" - - "github.com/subosito/gotenv" -) - -const keyDelimiter = "_" - -// Codec implements the encoding.Encoder and encoding.Decoder interfaces for encoding data containing environment variables -// (commonly called as dotenv format). -type Codec struct{} - -func (Codec) Encode(v map[string]any) ([]byte, error) { - flattened := map[string]any{} - - flattened = flattenAndMergeMap(flattened, v, "", keyDelimiter) - - keys := make([]string, 0, len(flattened)) - - for key := range flattened { - keys = append(keys, key) - } - - sort.Strings(keys) - - var buf bytes.Buffer - - for _, key := range keys { - _, err := buf.WriteString(fmt.Sprintf("%v=%v\n", strings.ToUpper(key), flattened[key])) - if err != nil { - return nil, err - } - } - - return buf.Bytes(), nil -} - -func (Codec) Decode(b []byte, v map[string]any) error { - var buf bytes.Buffer - - _, err := buf.Write(b) - if err != nil { - return err - } - - env, err := gotenv.StrictParse(&buf) - if err != nil { - return err - } - - for key, value := range env { - v[key] = value - } - - return nil -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/dotenv/map_utils.go b/vendor/github.com/spf13/viper/internal/encoding/dotenv/map_utils.go deleted file mode 100644 index 8bfe0a9..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/dotenv/map_utils.go +++ /dev/null @@ -1,41 +0,0 @@ -package dotenv - -import ( - "strings" - - "github.com/spf13/cast" -) - -// flattenAndMergeMap recursively flattens the given map into a new map -// Code is based on the function with the same name in the main package. -// TODO: move it to a common place. -func flattenAndMergeMap(shadow, m map[string]any, prefix, delimiter string) map[string]any { - if shadow != nil && prefix != "" && shadow[prefix] != nil { - // prefix is shadowed => nothing more to flatten - return shadow - } - if shadow == nil { - shadow = make(map[string]any) - } - - var m2 map[string]any - if prefix != "" { - prefix += delimiter - } - for k, val := range m { - fullKey := prefix + k - switch val := val.(type) { - case map[string]any: - m2 = val - case map[any]any: - m2 = cast.ToStringMap(val) - default: - // immediate value - shadow[strings.ToLower(fullKey)] = val - continue - } - // recursively merge to shadow map - shadow = flattenAndMergeMap(shadow, m2, fullKey, delimiter) - } - return shadow -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/encoder.go b/vendor/github.com/spf13/viper/internal/encoding/encoder.go deleted file mode 100644 index 6595859..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/encoder.go +++ /dev/null @@ -1,60 +0,0 @@ -package encoding - -import ( - "sync" -) - -// Encoder encodes the contents of v into a byte representation. -// It's primarily used for encoding a map[string]any into a file format. -type Encoder interface { - Encode(v map[string]any) ([]byte, error) -} - -const ( - // ErrEncoderNotFound is returned when there is no encoder registered for a format. - ErrEncoderNotFound = encodingError("encoder not found for this format") - - // ErrEncoderFormatAlreadyRegistered is returned when an encoder is already registered for a format. - ErrEncoderFormatAlreadyRegistered = encodingError("encoder already registered for this format") -) - -// EncoderRegistry can choose an appropriate Encoder based on the provided format. -type EncoderRegistry struct { - encoders map[string]Encoder - - mu sync.RWMutex -} - -// NewEncoderRegistry returns a new, initialized EncoderRegistry. -func NewEncoderRegistry() *EncoderRegistry { - return &EncoderRegistry{ - encoders: make(map[string]Encoder), - } -} - -// RegisterEncoder registers an Encoder for a format. -// Registering a Encoder for an already existing format is not supported. -func (e *EncoderRegistry) RegisterEncoder(format string, enc Encoder) error { - e.mu.Lock() - defer e.mu.Unlock() - - if _, ok := e.encoders[format]; ok { - return ErrEncoderFormatAlreadyRegistered - } - - e.encoders[format] = enc - - return nil -} - -func (e *EncoderRegistry) Encode(format string, v map[string]any) ([]byte, error) { - e.mu.RLock() - encoder, ok := e.encoders[format] - e.mu.RUnlock() - - if !ok { - return nil, ErrEncoderNotFound - } - - return encoder.Encode(v) -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/error.go b/vendor/github.com/spf13/viper/internal/encoding/error.go deleted file mode 100644 index e4cde02..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/error.go +++ /dev/null @@ -1,7 +0,0 @@ -package encoding - -type encodingError string - -func (e encodingError) Error() string { - return string(e) -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/hcl/codec.go b/vendor/github.com/spf13/viper/internal/encoding/hcl/codec.go deleted file mode 100644 index d7fa8a1..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/hcl/codec.go +++ /dev/null @@ -1,40 +0,0 @@ -package hcl - -import ( - "bytes" - "encoding/json" - - "github.com/hashicorp/hcl" - "github.com/hashicorp/hcl/hcl/printer" -) - -// Codec implements the encoding.Encoder and encoding.Decoder interfaces for HCL encoding. -// TODO: add printer config to the codec? -type Codec struct{} - -func (Codec) Encode(v map[string]any) ([]byte, error) { - b, err := json.Marshal(v) - if err != nil { - return nil, err - } - - // TODO: use printer.Format? Is the trailing newline an issue? - - ast, err := hcl.Parse(string(b)) - if err != nil { - return nil, err - } - - var buf bytes.Buffer - - err = printer.Fprint(&buf, ast.Node) - if err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -func (Codec) Decode(b []byte, v map[string]any) error { - return hcl.Unmarshal(b, &v) -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/ini/codec.go b/vendor/github.com/spf13/viper/internal/encoding/ini/codec.go deleted file mode 100644 index d91cf59..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/ini/codec.go +++ /dev/null @@ -1,99 +0,0 @@ -package ini - -import ( - "bytes" - "sort" - "strings" - - "github.com/spf13/cast" - "gopkg.in/ini.v1" -) - -// LoadOptions contains all customized options used for load data source(s). -// This type is added here for convenience: this way consumers can import a single package called "ini". -type LoadOptions = ini.LoadOptions - -// Codec implements the encoding.Encoder and encoding.Decoder interfaces for INI encoding. -type Codec struct { - KeyDelimiter string - LoadOptions LoadOptions -} - -func (c Codec) Encode(v map[string]any) ([]byte, error) { - cfg := ini.Empty() - ini.PrettyFormat = false - - flattened := map[string]any{} - - flattened = flattenAndMergeMap(flattened, v, "", c.keyDelimiter()) - - keys := make([]string, 0, len(flattened)) - - for key := range flattened { - keys = append(keys, key) - } - - sort.Strings(keys) - - for _, key := range keys { - sectionName, keyName := "", key - - lastSep := strings.LastIndex(key, ".") - if lastSep != -1 { - sectionName = key[:(lastSep)] - keyName = key[(lastSep + 1):] - } - - // TODO: is this a good idea? - if sectionName == "default" { - sectionName = "" - } - - cfg.Section(sectionName).Key(keyName).SetValue(cast.ToString(flattened[key])) - } - - var buf bytes.Buffer - - _, err := cfg.WriteTo(&buf) - if err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -func (c Codec) Decode(b []byte, v map[string]any) error { - cfg := ini.Empty(c.LoadOptions) - - err := cfg.Append(b) - if err != nil { - return err - } - - sections := cfg.Sections() - - for i := 0; i < len(sections); i++ { - section := sections[i] - keys := section.Keys() - - for j := 0; j < len(keys); j++ { - key := keys[j] - value := cfg.Section(section.Name()).Key(key.Name()).String() - - deepestMap := deepSearch(v, strings.Split(section.Name(), c.keyDelimiter())) - - // set innermost value - deepestMap[key.Name()] = value - } - } - - return nil -} - -func (c Codec) keyDelimiter() string { - if c.KeyDelimiter == "" { - return "." - } - - return c.KeyDelimiter -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/ini/map_utils.go b/vendor/github.com/spf13/viper/internal/encoding/ini/map_utils.go deleted file mode 100644 index 490ab59..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/ini/map_utils.go +++ /dev/null @@ -1,74 +0,0 @@ -package ini - -import ( - "strings" - - "github.com/spf13/cast" -) - -// THIS CODE IS COPIED HERE: IT SHOULD NOT BE MODIFIED -// AT SOME POINT IT WILL BE MOVED TO A COMMON PLACE -// deepSearch scans deep maps, following the key indexes listed in the -// sequence "path". -// The last value is expected to be another map, and is returned. -// -// In case intermediate keys do not exist, or map to a non-map value, -// a new map is created and inserted, and the search continues from there: -// the initial map "m" may be modified! -func deepSearch(m map[string]any, path []string) map[string]any { - for _, k := range path { - m2, ok := m[k] - if !ok { - // intermediate key does not exist - // => create it and continue from there - m3 := make(map[string]any) - m[k] = m3 - m = m3 - continue - } - m3, ok := m2.(map[string]any) - if !ok { - // intermediate key is a value - // => replace with a new map - m3 = make(map[string]any) - m[k] = m3 - } - // continue search from here - m = m3 - } - return m -} - -// flattenAndMergeMap recursively flattens the given map into a new map -// Code is based on the function with the same name in the main package. -// TODO: move it to a common place. -func flattenAndMergeMap(shadow, m map[string]any, prefix, delimiter string) map[string]any { - if shadow != nil && prefix != "" && shadow[prefix] != nil { - // prefix is shadowed => nothing more to flatten - return shadow - } - if shadow == nil { - shadow = make(map[string]any) - } - - var m2 map[string]any - if prefix != "" { - prefix += delimiter - } - for k, val := range m { - fullKey := prefix + k - switch val := val.(type) { - case map[string]any: - m2 = val - case map[any]any: - m2 = cast.ToStringMap(val) - default: - // immediate value - shadow[strings.ToLower(fullKey)] = val - continue - } - // recursively merge to shadow map - shadow = flattenAndMergeMap(shadow, m2, fullKey, delimiter) - } - return shadow -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/javaproperties/codec.go b/vendor/github.com/spf13/viper/internal/encoding/javaproperties/codec.go deleted file mode 100644 index e92e517..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/javaproperties/codec.go +++ /dev/null @@ -1,86 +0,0 @@ -package javaproperties - -import ( - "bytes" - "sort" - "strings" - - "github.com/magiconair/properties" - "github.com/spf13/cast" -) - -// Codec implements the encoding.Encoder and encoding.Decoder interfaces for Java properties encoding. -type Codec struct { - KeyDelimiter string - - // Store read properties on the object so that we can write back in order with comments. - // This will only be used if the configuration read is a properties file. - // TODO: drop this feature in v2 - // TODO: make use of the global properties object optional - Properties *properties.Properties -} - -func (c *Codec) Encode(v map[string]any) ([]byte, error) { - if c.Properties == nil { - c.Properties = properties.NewProperties() - } - - flattened := map[string]any{} - - flattened = flattenAndMergeMap(flattened, v, "", c.keyDelimiter()) - - keys := make([]string, 0, len(flattened)) - - for key := range flattened { - keys = append(keys, key) - } - - sort.Strings(keys) - - for _, key := range keys { - _, _, err := c.Properties.Set(key, cast.ToString(flattened[key])) - if err != nil { - return nil, err - } - } - - var buf bytes.Buffer - - _, err := c.Properties.WriteComment(&buf, "#", properties.UTF8) - if err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -func (c *Codec) Decode(b []byte, v map[string]any) error { - var err error - c.Properties, err = properties.Load(b, properties.UTF8) - if err != nil { - return err - } - - for _, key := range c.Properties.Keys() { - // ignore existence check: we know it's there - value, _ := c.Properties.Get(key) - - // recursively build nested maps - path := strings.Split(key, c.keyDelimiter()) - lastKey := strings.ToLower(path[len(path)-1]) - deepestMap := deepSearch(v, path[0:len(path)-1]) - - // set innermost value - deepestMap[lastKey] = value - } - - return nil -} - -func (c Codec) keyDelimiter() string { - if c.KeyDelimiter == "" { - return "." - } - - return c.KeyDelimiter -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/javaproperties/map_utils.go b/vendor/github.com/spf13/viper/internal/encoding/javaproperties/map_utils.go deleted file mode 100644 index 6e1aff2..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/javaproperties/map_utils.go +++ /dev/null @@ -1,74 +0,0 @@ -package javaproperties - -import ( - "strings" - - "github.com/spf13/cast" -) - -// THIS CODE IS COPIED HERE: IT SHOULD NOT BE MODIFIED -// AT SOME POINT IT WILL BE MOVED TO A COMMON PLACE -// deepSearch scans deep maps, following the key indexes listed in the -// sequence "path". -// The last value is expected to be another map, and is returned. -// -// In case intermediate keys do not exist, or map to a non-map value, -// a new map is created and inserted, and the search continues from there: -// the initial map "m" may be modified! -func deepSearch(m map[string]any, path []string) map[string]any { - for _, k := range path { - m2, ok := m[k] - if !ok { - // intermediate key does not exist - // => create it and continue from there - m3 := make(map[string]any) - m[k] = m3 - m = m3 - continue - } - m3, ok := m2.(map[string]any) - if !ok { - // intermediate key is a value - // => replace with a new map - m3 = make(map[string]any) - m[k] = m3 - } - // continue search from here - m = m3 - } - return m -} - -// flattenAndMergeMap recursively flattens the given map into a new map -// Code is based on the function with the same name in the main package. -// TODO: move it to a common place. -func flattenAndMergeMap(shadow, m map[string]any, prefix, delimiter string) map[string]any { - if shadow != nil && prefix != "" && shadow[prefix] != nil { - // prefix is shadowed => nothing more to flatten - return shadow - } - if shadow == nil { - shadow = make(map[string]any) - } - - var m2 map[string]any - if prefix != "" { - prefix += delimiter - } - for k, val := range m { - fullKey := prefix + k - switch val := val.(type) { - case map[string]any: - m2 = val - case map[any]any: - m2 = cast.ToStringMap(val) - default: - // immediate value - shadow[strings.ToLower(fullKey)] = val - continue - } - // recursively merge to shadow map - shadow = flattenAndMergeMap(shadow, m2, fullKey, delimiter) - } - return shadow -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/json/codec.go b/vendor/github.com/spf13/viper/internal/encoding/json/codec.go deleted file mode 100644 index da7546b..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/json/codec.go +++ /dev/null @@ -1,17 +0,0 @@ -package json - -import ( - "encoding/json" -) - -// Codec implements the encoding.Encoder and encoding.Decoder interfaces for JSON encoding. -type Codec struct{} - -func (Codec) Encode(v map[string]any) ([]byte, error) { - // TODO: expose prefix and indent in the Codec as setting? - return json.MarshalIndent(v, "", " ") -} - -func (Codec) Decode(b []byte, v map[string]any) error { - return json.Unmarshal(b, &v) -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/toml/codec.go b/vendor/github.com/spf13/viper/internal/encoding/toml/codec.go deleted file mode 100644 index c70aa8d..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/toml/codec.go +++ /dev/null @@ -1,16 +0,0 @@ -package toml - -import ( - "github.com/pelletier/go-toml/v2" -) - -// Codec implements the encoding.Encoder and encoding.Decoder interfaces for TOML encoding. -type Codec struct{} - -func (Codec) Encode(v map[string]any) ([]byte, error) { - return toml.Marshal(v) -} - -func (Codec) Decode(b []byte, v map[string]any) error { - return toml.Unmarshal(b, &v) -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go b/vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go deleted file mode 100644 index 0368792..0000000 --- a/vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go +++ /dev/null @@ -1,14 +0,0 @@ -package yaml - -import "gopkg.in/yaml.v3" - -// Codec implements the encoding.Encoder and encoding.Decoder interfaces for YAML encoding. -type Codec struct{} - -func (Codec) Encode(v map[string]any) ([]byte, error) { - return yaml.Marshal(v) -} - -func (Codec) Decode(b []byte, v map[string]any) error { - return yaml.Unmarshal(b, &v) -} diff --git a/vendor/github.com/spf13/viper/internal/features/bind_struct.go b/vendor/github.com/spf13/viper/internal/features/bind_struct.go deleted file mode 100644 index 89302c2..0000000 --- a/vendor/github.com/spf13/viper/internal/features/bind_struct.go +++ /dev/null @@ -1,5 +0,0 @@ -//go:build viper_bind_struct - -package features - -const BindStruct = true diff --git a/vendor/github.com/spf13/viper/internal/features/bind_struct_default.go b/vendor/github.com/spf13/viper/internal/features/bind_struct_default.go deleted file mode 100644 index edfaf73..0000000 --- a/vendor/github.com/spf13/viper/internal/features/bind_struct_default.go +++ /dev/null @@ -1,5 +0,0 @@ -//go:build !viper_bind_struct - -package features - -const BindStruct = false diff --git a/vendor/github.com/spf13/viper/logger.go b/vendor/github.com/spf13/viper/logger.go deleted file mode 100644 index 8938053..0000000 --- a/vendor/github.com/spf13/viper/logger.go +++ /dev/null @@ -1,68 +0,0 @@ -package viper - -import ( - "context" - - slog "github.com/sagikazarmark/slog-shim" -) - -// Logger is a unified interface for various logging use cases and practices, including: -// - leveled logging -// - structured logging -// -// Deprecated: use `log/slog` instead. -type Logger interface { - // Trace logs a Trace event. - // - // Even more fine-grained information than Debug events. - // Loggers not supporting this level should fall back to Debug. - Trace(msg string, keyvals ...any) - - // Debug logs a Debug event. - // - // A verbose series of information events. - // They are useful when debugging the system. - Debug(msg string, keyvals ...any) - - // Info logs an Info event. - // - // General information about what's happening inside the system. - Info(msg string, keyvals ...any) - - // Warn logs a Warn(ing) event. - // - // Non-critical events that should be looked at. - Warn(msg string, keyvals ...any) - - // Error logs an Error event. - // - // Critical events that require immediate attention. - // Loggers commonly provide Fatal and Panic levels above Error level, - // but exiting and panicking is out of scope for a logging library. - Error(msg string, keyvals ...any) -} - -// WithLogger sets a custom logger. -func WithLogger(l *slog.Logger) Option { - return optionFunc(func(v *Viper) { - v.logger = l - }) -} - -type discardHandler struct{} - -func (n *discardHandler) Enabled(_ context.Context, _ slog.Level) bool { - return false -} - -func (n *discardHandler) Handle(_ context.Context, _ slog.Record) error { - return nil -} - -func (n *discardHandler) WithAttrs(_ []slog.Attr) slog.Handler { - return n -} - -func (n *discardHandler) WithGroup(_ string) slog.Handler { - return n -} diff --git a/vendor/github.com/spf13/viper/util.go b/vendor/github.com/spf13/viper/util.go deleted file mode 100644 index 117c6ac..0000000 --- a/vendor/github.com/spf13/viper/util.go +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -// Viper is a application configuration system. -// It believes that applications can be configured a variety of ways -// via flags, ENVIRONMENT variables, configuration files retrieved -// from the file system, or a remote key/value store. - -package viper - -import ( - "fmt" - "os" - "path/filepath" - "runtime" - "strings" - "unicode" - - slog "github.com/sagikazarmark/slog-shim" - "github.com/spf13/cast" -) - -// ConfigParseError denotes failing to parse configuration file. -type ConfigParseError struct { - err error -} - -// Error returns the formatted configuration error. -func (pe ConfigParseError) Error() string { - return fmt.Sprintf("While parsing config: %s", pe.err.Error()) -} - -// Unwrap returns the wrapped error. -func (pe ConfigParseError) Unwrap() error { - return pe.err -} - -// toCaseInsensitiveValue checks if the value is a map; -// if so, create a copy and lower-case the keys recursively. -func toCaseInsensitiveValue(value any) any { - switch v := value.(type) { - case map[any]any: - value = copyAndInsensitiviseMap(cast.ToStringMap(v)) - case map[string]any: - value = copyAndInsensitiviseMap(v) - } - - return value -} - -// copyAndInsensitiviseMap behaves like insensitiviseMap, but creates a copy of -// any map it makes case insensitive. -func copyAndInsensitiviseMap(m map[string]any) map[string]any { - nm := make(map[string]any) - - for key, val := range m { - lkey := strings.ToLower(key) - switch v := val.(type) { - case map[any]any: - nm[lkey] = copyAndInsensitiviseMap(cast.ToStringMap(v)) - case map[string]any: - nm[lkey] = copyAndInsensitiviseMap(v) - default: - nm[lkey] = v - } - } - - return nm -} - -func insensitiviseVal(val any) any { - switch v := val.(type) { - case map[any]any: - // nested map: cast and recursively insensitivise - val = cast.ToStringMap(val) - insensitiviseMap(val.(map[string]any)) - case map[string]any: - // nested map: recursively insensitivise - insensitiviseMap(v) - case []any: - // nested array: recursively insensitivise - insensitiveArray(v) - } - return val -} - -func insensitiviseMap(m map[string]any) { - for key, val := range m { - val = insensitiviseVal(val) - lower := strings.ToLower(key) - if key != lower { - // remove old key (not lower-cased) - delete(m, key) - } - // update map - m[lower] = val - } -} - -func insensitiveArray(a []any) { - for i, val := range a { - a[i] = insensitiviseVal(val) - } -} - -func absPathify(logger *slog.Logger, inPath string) string { - logger.Info("trying to resolve absolute path", "path", inPath) - - if inPath == "$HOME" || strings.HasPrefix(inPath, "$HOME"+string(os.PathSeparator)) { - inPath = userHomeDir() + inPath[5:] - } - - inPath = os.ExpandEnv(inPath) - - if filepath.IsAbs(inPath) { - return filepath.Clean(inPath) - } - - p, err := filepath.Abs(inPath) - if err == nil { - return filepath.Clean(p) - } - - logger.Error(fmt.Errorf("could not discover absolute path: %w", err).Error()) - - return "" -} - -func stringInSlice(a string, list []string) bool { - for _, b := range list { - if b == a { - return true - } - } - return false -} - -func userHomeDir() string { - if runtime.GOOS == "windows" { - home := os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH") - if home == "" { - home = os.Getenv("USERPROFILE") - } - return home - } - return os.Getenv("HOME") -} - -func safeMul(a, b uint) uint { - c := a * b - if a > 1 && b > 1 && c/b != a { - return 0 - } - return c -} - -// parseSizeInBytes converts strings like 1GB or 12 mb into an unsigned integer number of bytes. -func parseSizeInBytes(sizeStr string) uint { - sizeStr = strings.TrimSpace(sizeStr) - lastChar := len(sizeStr) - 1 - multiplier := uint(1) - - if lastChar > 0 { - if sizeStr[lastChar] == 'b' || sizeStr[lastChar] == 'B' { - if lastChar > 1 { - switch unicode.ToLower(rune(sizeStr[lastChar-1])) { - case 'k': - multiplier = 1 << 10 - sizeStr = strings.TrimSpace(sizeStr[:lastChar-1]) - case 'm': - multiplier = 1 << 20 - sizeStr = strings.TrimSpace(sizeStr[:lastChar-1]) - case 'g': - multiplier = 1 << 30 - sizeStr = strings.TrimSpace(sizeStr[:lastChar-1]) - default: - multiplier = 1 - sizeStr = strings.TrimSpace(sizeStr[:lastChar]) - } - } - } - } - - size := cast.ToInt(sizeStr) - if size < 0 { - size = 0 - } - - return safeMul(uint(size), multiplier) -} - -// deepSearch scans deep maps, following the key indexes listed in the -// sequence "path". -// The last value is expected to be another map, and is returned. -// -// In case intermediate keys do not exist, or map to a non-map value, -// a new map is created and inserted, and the search continues from there: -// the initial map "m" may be modified! -func deepSearch(m map[string]any, path []string) map[string]any { - for _, k := range path { - m2, ok := m[k] - if !ok { - // intermediate key does not exist - // => create it and continue from there - m3 := make(map[string]any) - m[k] = m3 - m = m3 - continue - } - m3, ok := m2.(map[string]any) - if !ok { - // intermediate key is a value - // => replace with a new map - m3 = make(map[string]any) - m[k] = m3 - } - // continue search from here - m = m3 - } - return m -} diff --git a/vendor/github.com/spf13/viper/viper.go b/vendor/github.com/spf13/viper/viper.go deleted file mode 100644 index 20eb4da..0000000 --- a/vendor/github.com/spf13/viper/viper.go +++ /dev/null @@ -1,2258 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -// Viper is an application configuration system. -// It believes that applications can be configured a variety of ways -// via flags, ENVIRONMENT variables, configuration files retrieved -// from the file system, or a remote key/value store. - -// Each item takes precedence over the item below it: - -// overrides -// flag -// env -// config -// key/value store -// default - -package viper - -import ( - "bytes" - "encoding/csv" - "errors" - "fmt" - "io" - "os" - "path/filepath" - "reflect" - "strconv" - "strings" - "sync" - "time" - - "github.com/fsnotify/fsnotify" - "github.com/mitchellh/mapstructure" - slog "github.com/sagikazarmark/slog-shim" - "github.com/spf13/afero" - "github.com/spf13/cast" - "github.com/spf13/pflag" - - "github.com/spf13/viper/internal/encoding" - "github.com/spf13/viper/internal/encoding/dotenv" - "github.com/spf13/viper/internal/encoding/hcl" - "github.com/spf13/viper/internal/encoding/ini" - "github.com/spf13/viper/internal/encoding/javaproperties" - "github.com/spf13/viper/internal/encoding/json" - "github.com/spf13/viper/internal/encoding/toml" - "github.com/spf13/viper/internal/encoding/yaml" - "github.com/spf13/viper/internal/features" -) - -// ConfigMarshalError happens when failing to marshal the configuration. -type ConfigMarshalError struct { - err error -} - -// Error returns the formatted configuration error. -func (e ConfigMarshalError) Error() string { - return fmt.Sprintf("While marshaling config: %s", e.err.Error()) -} - -var v *Viper - -type RemoteResponse struct { - Value []byte - Error error -} - -func init() { - v = New() -} - -type remoteConfigFactory interface { - Get(rp RemoteProvider) (io.Reader, error) - Watch(rp RemoteProvider) (io.Reader, error) - WatchChannel(rp RemoteProvider) (<-chan *RemoteResponse, chan bool) -} - -// RemoteConfig is optional, see the remote package. -var RemoteConfig remoteConfigFactory - -// UnsupportedConfigError denotes encountering an unsupported -// configuration filetype. -type UnsupportedConfigError string - -// Error returns the formatted configuration error. -func (str UnsupportedConfigError) Error() string { - return fmt.Sprintf("Unsupported Config Type %q", string(str)) -} - -// UnsupportedRemoteProviderError denotes encountering an unsupported remote -// provider. Currently only etcd and Consul are supported. -type UnsupportedRemoteProviderError string - -// Error returns the formatted remote provider error. -func (str UnsupportedRemoteProviderError) Error() string { - return fmt.Sprintf("Unsupported Remote Provider Type %q", string(str)) -} - -// RemoteConfigError denotes encountering an error while trying to -// pull the configuration from the remote provider. -type RemoteConfigError string - -// Error returns the formatted remote provider error. -func (rce RemoteConfigError) Error() string { - return fmt.Sprintf("Remote Configurations Error: %s", string(rce)) -} - -// ConfigFileNotFoundError denotes failing to find configuration file. -type ConfigFileNotFoundError struct { - name, locations string -} - -// Error returns the formatted configuration error. -func (fnfe ConfigFileNotFoundError) Error() string { - return fmt.Sprintf("Config File %q Not Found in %q", fnfe.name, fnfe.locations) -} - -// ConfigFileAlreadyExistsError denotes failure to write new configuration file. -type ConfigFileAlreadyExistsError string - -// Error returns the formatted error when configuration already exists. -func (faee ConfigFileAlreadyExistsError) Error() string { - return fmt.Sprintf("Config File %q Already Exists", string(faee)) -} - -// A DecoderConfigOption can be passed to viper.Unmarshal to configure -// mapstructure.DecoderConfig options. -type DecoderConfigOption func(*mapstructure.DecoderConfig) - -// DecodeHook returns a DecoderConfigOption which overrides the default -// DecoderConfig.DecodeHook value, the default is: -// -// mapstructure.ComposeDecodeHookFunc( -// mapstructure.StringToTimeDurationHookFunc(), -// mapstructure.StringToSliceHookFunc(","), -// ) -func DecodeHook(hook mapstructure.DecodeHookFunc) DecoderConfigOption { - return func(c *mapstructure.DecoderConfig) { - c.DecodeHook = hook - } -} - -// Viper is a prioritized configuration registry. It -// maintains a set of configuration sources, fetches -// values to populate those, and provides them according -// to the source's priority. -// The priority of the sources is the following: -// 1. overrides -// 2. flags -// 3. env. variables -// 4. config file -// 5. key/value store -// 6. defaults -// -// For example, if values from the following sources were loaded: -// -// Defaults : { -// "secret": "", -// "user": "default", -// "endpoint": "https://localhost" -// } -// Config : { -// "user": "root" -// "secret": "defaultsecret" -// } -// Env : { -// "secret": "somesecretkey" -// } -// -// The resulting config will have the following values: -// -// { -// "secret": "somesecretkey", -// "user": "root", -// "endpoint": "https://localhost" -// } -// -// Note: Vipers are not safe for concurrent Get() and Set() operations. -type Viper struct { - // Delimiter that separates a list of keys - // used to access a nested value in one go - keyDelim string - - // A set of paths to look for the config file in - configPaths []string - - // The filesystem to read config from. - fs afero.Fs - - // A set of remote providers to search for the configuration - remoteProviders []*defaultRemoteProvider - - // Name of file to look for inside the path - configName string - configFile string - configType string - configPermissions os.FileMode - envPrefix string - - // Specific commands for ini parsing - iniLoadOptions ini.LoadOptions - - automaticEnvApplied bool - envKeyReplacer StringReplacer - allowEmptyEnv bool - - parents []string - config map[string]any - override map[string]any - defaults map[string]any - kvstore map[string]any - pflags map[string]FlagValue - env map[string][]string - aliases map[string]string - typeByDefValue bool - - onConfigChange func(fsnotify.Event) - - logger *slog.Logger - - // TODO: should probably be protected with a mutex - encoderRegistry *encoding.EncoderRegistry - decoderRegistry *encoding.DecoderRegistry -} - -// New returns an initialized Viper instance. -func New() *Viper { - v := new(Viper) - v.keyDelim = "." - v.configName = "config" - v.configPermissions = os.FileMode(0o644) - v.fs = afero.NewOsFs() - v.config = make(map[string]any) - v.parents = []string{} - v.override = make(map[string]any) - v.defaults = make(map[string]any) - v.kvstore = make(map[string]any) - v.pflags = make(map[string]FlagValue) - v.env = make(map[string][]string) - v.aliases = make(map[string]string) - v.typeByDefValue = false - v.logger = slog.New(&discardHandler{}) - - v.resetEncoding() - - return v -} - -// Option configures Viper using the functional options paradigm popularized by Rob Pike and Dave Cheney. -// If you're unfamiliar with this style, -// see https://commandcenter.blogspot.com/2014/01/self-referential-functions-and-design.html and -// https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis. -type Option interface { - apply(v *Viper) -} - -type optionFunc func(v *Viper) - -func (fn optionFunc) apply(v *Viper) { - fn(v) -} - -// KeyDelimiter sets the delimiter used for determining key parts. -// By default it's value is ".". -func KeyDelimiter(d string) Option { - return optionFunc(func(v *Viper) { - v.keyDelim = d - }) -} - -// StringReplacer applies a set of replacements to a string. -type StringReplacer interface { - // Replace returns a copy of s with all replacements performed. - Replace(s string) string -} - -// EnvKeyReplacer sets a replacer used for mapping environment variables to internal keys. -func EnvKeyReplacer(r StringReplacer) Option { - return optionFunc(func(v *Viper) { - v.envKeyReplacer = r - }) -} - -// NewWithOptions creates a new Viper instance. -func NewWithOptions(opts ...Option) *Viper { - v := New() - - for _, opt := range opts { - opt.apply(v) - } - - v.resetEncoding() - - return v -} - -// Reset is intended for testing, will reset all to default settings. -// In the public interface for the viper package so applications -// can use it in their testing as well. -func Reset() { - v = New() - SupportedExts = []string{"json", "toml", "yaml", "yml", "properties", "props", "prop", "hcl", "tfvars", "dotenv", "env", "ini"} - SupportedRemoteProviders = []string{"etcd", "etcd3", "consul", "firestore", "nats"} -} - -// TODO: make this lazy initialization instead. -func (v *Viper) resetEncoding() { - encoderRegistry := encoding.NewEncoderRegistry() - decoderRegistry := encoding.NewDecoderRegistry() - - { - codec := yaml.Codec{} - - encoderRegistry.RegisterEncoder("yaml", codec) - decoderRegistry.RegisterDecoder("yaml", codec) - - encoderRegistry.RegisterEncoder("yml", codec) - decoderRegistry.RegisterDecoder("yml", codec) - } - - { - codec := json.Codec{} - - encoderRegistry.RegisterEncoder("json", codec) - decoderRegistry.RegisterDecoder("json", codec) - } - - { - codec := toml.Codec{} - - encoderRegistry.RegisterEncoder("toml", codec) - decoderRegistry.RegisterDecoder("toml", codec) - } - - { - codec := hcl.Codec{} - - encoderRegistry.RegisterEncoder("hcl", codec) - decoderRegistry.RegisterDecoder("hcl", codec) - - encoderRegistry.RegisterEncoder("tfvars", codec) - decoderRegistry.RegisterDecoder("tfvars", codec) - } - - { - codec := ini.Codec{ - KeyDelimiter: v.keyDelim, - LoadOptions: v.iniLoadOptions, - } - - encoderRegistry.RegisterEncoder("ini", codec) - decoderRegistry.RegisterDecoder("ini", codec) - } - - { - codec := &javaproperties.Codec{ - KeyDelimiter: v.keyDelim, - } - - encoderRegistry.RegisterEncoder("properties", codec) - decoderRegistry.RegisterDecoder("properties", codec) - - encoderRegistry.RegisterEncoder("props", codec) - decoderRegistry.RegisterDecoder("props", codec) - - encoderRegistry.RegisterEncoder("prop", codec) - decoderRegistry.RegisterDecoder("prop", codec) - } - - { - codec := &dotenv.Codec{} - - encoderRegistry.RegisterEncoder("dotenv", codec) - decoderRegistry.RegisterDecoder("dotenv", codec) - - encoderRegistry.RegisterEncoder("env", codec) - decoderRegistry.RegisterDecoder("env", codec) - } - - v.encoderRegistry = encoderRegistry - v.decoderRegistry = decoderRegistry -} - -type defaultRemoteProvider struct { - provider string - endpoint string - path string - secretKeyring string -} - -func (rp defaultRemoteProvider) Provider() string { - return rp.provider -} - -func (rp defaultRemoteProvider) Endpoint() string { - return rp.endpoint -} - -func (rp defaultRemoteProvider) Path() string { - return rp.path -} - -func (rp defaultRemoteProvider) SecretKeyring() string { - return rp.secretKeyring -} - -// RemoteProvider stores the configuration necessary -// to connect to a remote key/value store. -// Optional secretKeyring to unencrypt encrypted values -// can be provided. -type RemoteProvider interface { - Provider() string - Endpoint() string - Path() string - SecretKeyring() string -} - -// SupportedExts are universally supported extensions. -var SupportedExts = []string{"json", "toml", "yaml", "yml", "properties", "props", "prop", "hcl", "tfvars", "dotenv", "env", "ini"} - -// SupportedRemoteProviders are universally supported remote providers. -var SupportedRemoteProviders = []string{"etcd", "etcd3", "consul", "firestore", "nats"} - -// OnConfigChange sets the event handler that is called when a config file changes. -func OnConfigChange(run func(in fsnotify.Event)) { v.OnConfigChange(run) } - -// OnConfigChange sets the event handler that is called when a config file changes. -func (v *Viper) OnConfigChange(run func(in fsnotify.Event)) { - v.onConfigChange = run -} - -// WatchConfig starts watching a config file for changes. -func WatchConfig() { v.WatchConfig() } - -// WatchConfig starts watching a config file for changes. -func (v *Viper) WatchConfig() { - initWG := sync.WaitGroup{} - initWG.Add(1) - go func() { - watcher, err := fsnotify.NewWatcher() - if err != nil { - v.logger.Error(fmt.Sprintf("failed to create watcher: %s", err)) - os.Exit(1) - } - defer watcher.Close() - // we have to watch the entire directory to pick up renames/atomic saves in a cross-platform way - filename, err := v.getConfigFile() - if err != nil { - v.logger.Error(fmt.Sprintf("get config file: %s", err)) - initWG.Done() - return - } - - configFile := filepath.Clean(filename) - configDir, _ := filepath.Split(configFile) - realConfigFile, _ := filepath.EvalSymlinks(filename) - - eventsWG := sync.WaitGroup{} - eventsWG.Add(1) - go func() { - for { - select { - case event, ok := <-watcher.Events: - if !ok { // 'Events' channel is closed - eventsWG.Done() - return - } - currentConfigFile, _ := filepath.EvalSymlinks(filename) - // we only care about the config file with the following cases: - // 1 - if the config file was modified or created - // 2 - if the real path to the config file changed (eg: k8s ConfigMap replacement) - if (filepath.Clean(event.Name) == configFile && - (event.Has(fsnotify.Write) || event.Has(fsnotify.Create))) || - (currentConfigFile != "" && currentConfigFile != realConfigFile) { - realConfigFile = currentConfigFile - err := v.ReadInConfig() - if err != nil { - v.logger.Error(fmt.Sprintf("read config file: %s", err)) - } - if v.onConfigChange != nil { - v.onConfigChange(event) - } - } else if filepath.Clean(event.Name) == configFile && event.Has(fsnotify.Remove) { - eventsWG.Done() - return - } - - case err, ok := <-watcher.Errors: - if ok { // 'Errors' channel is not closed - v.logger.Error(fmt.Sprintf("watcher error: %s", err)) - } - eventsWG.Done() - return - } - } - }() - watcher.Add(configDir) - initWG.Done() // done initializing the watch in this go routine, so the parent routine can move on... - eventsWG.Wait() // now, wait for event loop to end in this go-routine... - }() - initWG.Wait() // make sure that the go routine above fully ended before returning -} - -// SetConfigFile explicitly defines the path, name and extension of the config file. -// Viper will use this and not check any of the config paths. -func SetConfigFile(in string) { v.SetConfigFile(in) } - -func (v *Viper) SetConfigFile(in string) { - if in != "" { - v.configFile = in - } -} - -// SetEnvPrefix defines a prefix that ENVIRONMENT variables will use. -// E.g. if your prefix is "spf", the env registry will look for env -// variables that start with "SPF_". -func SetEnvPrefix(in string) { v.SetEnvPrefix(in) } - -func (v *Viper) SetEnvPrefix(in string) { - if in != "" { - v.envPrefix = in - } -} - -func GetEnvPrefix() string { return v.GetEnvPrefix() } - -func (v *Viper) GetEnvPrefix() string { - return v.envPrefix -} - -func (v *Viper) mergeWithEnvPrefix(in string) string { - if v.envPrefix != "" { - return strings.ToUpper(v.envPrefix + "_" + in) - } - - return strings.ToUpper(in) -} - -// AllowEmptyEnv tells Viper to consider set, -// but empty environment variables as valid values instead of falling back. -// For backward compatibility reasons this is false by default. -func AllowEmptyEnv(allowEmptyEnv bool) { v.AllowEmptyEnv(allowEmptyEnv) } - -func (v *Viper) AllowEmptyEnv(allowEmptyEnv bool) { - v.allowEmptyEnv = allowEmptyEnv -} - -// TODO: should getEnv logic be moved into find(). Can generalize the use of -// rewriting keys many things, Ex: Get('someKey') -> some_key -// (camel case to snake case for JSON keys perhaps) - -// getEnv is a wrapper around os.Getenv which replaces characters in the original -// key. This allows env vars which have different keys than the config object -// keys. -func (v *Viper) getEnv(key string) (string, bool) { - if v.envKeyReplacer != nil { - key = v.envKeyReplacer.Replace(key) - } - - val, ok := os.LookupEnv(key) - - return val, ok && (v.allowEmptyEnv || val != "") -} - -// ConfigFileUsed returns the file used to populate the config registry. -func ConfigFileUsed() string { return v.ConfigFileUsed() } -func (v *Viper) ConfigFileUsed() string { return v.configFile } - -// AddConfigPath adds a path for Viper to search for the config file in. -// Can be called multiple times to define multiple search paths. -func AddConfigPath(in string) { v.AddConfigPath(in) } - -func (v *Viper) AddConfigPath(in string) { - if in != "" { - absin := absPathify(v.logger, in) - - v.logger.Info("adding path to search paths", "path", absin) - if !stringInSlice(absin, v.configPaths) { - v.configPaths = append(v.configPaths, absin) - } - } -} - -// AddRemoteProvider adds a remote configuration source. -// Remote Providers are searched in the order they are added. -// provider is a string value: "etcd", "etcd3", "consul", "firestore" or "nats" are currently supported. -// endpoint is the url. etcd requires http://ip:port, consul requires ip:port, nats requires nats://ip:port -// path is the path in the k/v store to retrieve configuration -// To retrieve a config file called myapp.json from /configs/myapp.json -// you should set path to /configs and set config name (SetConfigName()) to -// "myapp". -func AddRemoteProvider(provider, endpoint, path string) error { - return v.AddRemoteProvider(provider, endpoint, path) -} - -func (v *Viper) AddRemoteProvider(provider, endpoint, path string) error { - if !stringInSlice(provider, SupportedRemoteProviders) { - return UnsupportedRemoteProviderError(provider) - } - if provider != "" && endpoint != "" { - v.logger.Info("adding remote provider", "provider", provider, "endpoint", endpoint) - - rp := &defaultRemoteProvider{ - endpoint: endpoint, - provider: provider, - path: path, - } - if !v.providerPathExists(rp) { - v.remoteProviders = append(v.remoteProviders, rp) - } - } - return nil -} - -// AddSecureRemoteProvider adds a remote configuration source. -// Secure Remote Providers are searched in the order they are added. -// provider is a string value: "etcd", "etcd3", "consul", "firestore" or "nats" are currently supported. -// endpoint is the url. etcd requires http://ip:port consul requires ip:port -// secretkeyring is the filepath to your openpgp secret keyring. e.g. /etc/secrets/myring.gpg -// path is the path in the k/v store to retrieve configuration -// To retrieve a config file called myapp.json from /configs/myapp.json -// you should set path to /configs and set config name (SetConfigName()) to -// "myapp". -// Secure Remote Providers are implemented with github.com/bketelsen/crypt. -func AddSecureRemoteProvider(provider, endpoint, path, secretkeyring string) error { - return v.AddSecureRemoteProvider(provider, endpoint, path, secretkeyring) -} - -func (v *Viper) AddSecureRemoteProvider(provider, endpoint, path, secretkeyring string) error { - if !stringInSlice(provider, SupportedRemoteProviders) { - return UnsupportedRemoteProviderError(provider) - } - if provider != "" && endpoint != "" { - v.logger.Info("adding remote provider", "provider", provider, "endpoint", endpoint) - - rp := &defaultRemoteProvider{ - endpoint: endpoint, - provider: provider, - path: path, - secretKeyring: secretkeyring, - } - if !v.providerPathExists(rp) { - v.remoteProviders = append(v.remoteProviders, rp) - } - } - return nil -} - -func (v *Viper) providerPathExists(p *defaultRemoteProvider) bool { - for _, y := range v.remoteProviders { - if reflect.DeepEqual(y, p) { - return true - } - } - return false -} - -// searchMap recursively searches for a value for path in source map. -// Returns nil if not found. -// Note: This assumes that the path entries and map keys are lower cased. -func (v *Viper) searchMap(source map[string]any, path []string) any { - if len(path) == 0 { - return source - } - - next, ok := source[path[0]] - if ok { - // Fast path - if len(path) == 1 { - return next - } - - // Nested case - switch next := next.(type) { - case map[any]any: - return v.searchMap(cast.ToStringMap(next), path[1:]) - case map[string]any: - // Type assertion is safe here since it is only reached - // if the type of `next` is the same as the type being asserted - return v.searchMap(next, path[1:]) - default: - // got a value but nested key expected, return "nil" for not found - return nil - } - } - return nil -} - -// searchIndexableWithPathPrefixes recursively searches for a value for path in source map/slice. -// -// While searchMap() considers each path element as a single map key or slice index, this -// function searches for, and prioritizes, merged path elements. -// e.g., if in the source, "foo" is defined with a sub-key "bar", and "foo.bar" -// is also defined, this latter value is returned for path ["foo", "bar"]. -// -// This should be useful only at config level (other maps may not contain dots -// in their keys). -// -// Note: This assumes that the path entries and map keys are lower cased. -func (v *Viper) searchIndexableWithPathPrefixes(source any, path []string) any { - if len(path) == 0 { - return source - } - - // search for path prefixes, starting from the longest one - for i := len(path); i > 0; i-- { - prefixKey := strings.ToLower(strings.Join(path[0:i], v.keyDelim)) - - var val any - switch sourceIndexable := source.(type) { - case []any: - val = v.searchSliceWithPathPrefixes(sourceIndexable, prefixKey, i, path) - case map[string]any: - val = v.searchMapWithPathPrefixes(sourceIndexable, prefixKey, i, path) - } - if val != nil { - return val - } - } - - // not found - return nil -} - -// searchSliceWithPathPrefixes searches for a value for path in sourceSlice -// -// This function is part of the searchIndexableWithPathPrefixes recurring search and -// should not be called directly from functions other than searchIndexableWithPathPrefixes. -func (v *Viper) searchSliceWithPathPrefixes( - sourceSlice []any, - prefixKey string, - pathIndex int, - path []string, -) any { - // if the prefixKey is not a number or it is out of bounds of the slice - index, err := strconv.Atoi(prefixKey) - if err != nil || len(sourceSlice) <= index { - return nil - } - - next := sourceSlice[index] - - // Fast path - if pathIndex == len(path) { - return next - } - - switch n := next.(type) { - case map[any]any: - return v.searchIndexableWithPathPrefixes(cast.ToStringMap(n), path[pathIndex:]) - case map[string]any, []any: - return v.searchIndexableWithPathPrefixes(n, path[pathIndex:]) - default: - // got a value but nested key expected, do nothing and look for next prefix - } - - // not found - return nil -} - -// searchMapWithPathPrefixes searches for a value for path in sourceMap -// -// This function is part of the searchIndexableWithPathPrefixes recurring search and -// should not be called directly from functions other than searchIndexableWithPathPrefixes. -func (v *Viper) searchMapWithPathPrefixes( - sourceMap map[string]any, - prefixKey string, - pathIndex int, - path []string, -) any { - next, ok := sourceMap[prefixKey] - if !ok { - return nil - } - - // Fast path - if pathIndex == len(path) { - return next - } - - // Nested case - switch n := next.(type) { - case map[any]any: - return v.searchIndexableWithPathPrefixes(cast.ToStringMap(n), path[pathIndex:]) - case map[string]any, []any: - return v.searchIndexableWithPathPrefixes(n, path[pathIndex:]) - default: - // got a value but nested key expected, do nothing and look for next prefix - } - - // not found - return nil -} - -// isPathShadowedInDeepMap makes sure the given path is not shadowed somewhere -// on its path in the map. -// e.g., if "foo.bar" has a value in the given map, it “shadows” -// -// "foo.bar.baz" in a lower-priority map -func (v *Viper) isPathShadowedInDeepMap(path []string, m map[string]any) string { - var parentVal any - for i := 1; i < len(path); i++ { - parentVal = v.searchMap(m, path[0:i]) - if parentVal == nil { - // not found, no need to add more path elements - return "" - } - switch parentVal.(type) { - case map[any]any: - continue - case map[string]any: - continue - default: - // parentVal is a regular value which shadows "path" - return strings.Join(path[0:i], v.keyDelim) - } - } - return "" -} - -// isPathShadowedInFlatMap makes sure the given path is not shadowed somewhere -// in a sub-path of the map. -// e.g., if "foo.bar" has a value in the given map, it “shadows” -// -// "foo.bar.baz" in a lower-priority map -func (v *Viper) isPathShadowedInFlatMap(path []string, mi any) string { - // unify input map - var m map[string]interface{} - switch miv := mi.(type) { - case map[string]string: - m = castMapStringToMapInterface(miv) - case map[string]FlagValue: - m = castMapFlagToMapInterface(miv) - default: - return "" - } - - // scan paths - var parentKey string - for i := 1; i < len(path); i++ { - parentKey = strings.Join(path[0:i], v.keyDelim) - if _, ok := m[parentKey]; ok { - return parentKey - } - } - return "" -} - -// isPathShadowedInAutoEnv makes sure the given path is not shadowed somewhere -// in the environment, when automatic env is on. -// e.g., if "foo.bar" has a value in the environment, it “shadows” -// -// "foo.bar.baz" in a lower-priority map -func (v *Viper) isPathShadowedInAutoEnv(path []string) string { - var parentKey string - for i := 1; i < len(path); i++ { - parentKey = strings.Join(path[0:i], v.keyDelim) - if _, ok := v.getEnv(v.mergeWithEnvPrefix(parentKey)); ok { - return parentKey - } - } - return "" -} - -// SetTypeByDefaultValue enables or disables the inference of a key value's -// type when the Get function is used based upon a key's default value as -// opposed to the value returned based on the normal fetch logic. -// -// For example, if a key has a default value of []string{} and the same key -// is set via an environment variable to "a b c", a call to the Get function -// would return a string slice for the key if the key's type is inferred by -// the default value and the Get function would return: -// -// []string {"a", "b", "c"} -// -// Otherwise the Get function would return: -// -// "a b c" -func SetTypeByDefaultValue(enable bool) { v.SetTypeByDefaultValue(enable) } - -func (v *Viper) SetTypeByDefaultValue(enable bool) { - v.typeByDefValue = enable -} - -// GetViper gets the global Viper instance. -func GetViper() *Viper { - return v -} - -// Get can retrieve any value given the key to use. -// Get is case-insensitive for a key. -// Get has the behavior of returning the value associated with the first -// place from where it is set. Viper will check in the following order: -// override, flag, env, config file, key/value store, default -// -// Get returns an interface. For a specific value use one of the Get____ methods. -func Get(key string) any { return v.Get(key) } - -func (v *Viper) Get(key string) any { - lcaseKey := strings.ToLower(key) - val := v.find(lcaseKey, true) - if val == nil { - return nil - } - - if v.typeByDefValue { - // TODO(bep) this branch isn't covered by a single test. - valType := val - path := strings.Split(lcaseKey, v.keyDelim) - defVal := v.searchMap(v.defaults, path) - if defVal != nil { - valType = defVal - } - - switch valType.(type) { - case bool: - return cast.ToBool(val) - case string: - return cast.ToString(val) - case int32, int16, int8, int: - return cast.ToInt(val) - case uint: - return cast.ToUint(val) - case uint32: - return cast.ToUint32(val) - case uint64: - return cast.ToUint64(val) - case int64: - return cast.ToInt64(val) - case float64, float32: - return cast.ToFloat64(val) - case time.Time: - return cast.ToTime(val) - case time.Duration: - return cast.ToDuration(val) - case []string: - return cast.ToStringSlice(val) - case []int: - return cast.ToIntSlice(val) - case []time.Duration: - return cast.ToDurationSlice(val) - } - } - - return val -} - -// Sub returns new Viper instance representing a sub tree of this instance. -// Sub is case-insensitive for a key. -func Sub(key string) *Viper { return v.Sub(key) } - -func (v *Viper) Sub(key string) *Viper { - subv := New() - data := v.Get(key) - if data == nil { - return nil - } - - if reflect.TypeOf(data).Kind() == reflect.Map { - subv.parents = append([]string(nil), v.parents...) - subv.parents = append(subv.parents, strings.ToLower(key)) - subv.automaticEnvApplied = v.automaticEnvApplied - subv.envPrefix = v.envPrefix - subv.envKeyReplacer = v.envKeyReplacer - subv.config = cast.ToStringMap(data) - return subv - } - return nil -} - -// GetString returns the value associated with the key as a string. -func GetString(key string) string { return v.GetString(key) } - -func (v *Viper) GetString(key string) string { - return cast.ToString(v.Get(key)) -} - -// GetBool returns the value associated with the key as a boolean. -func GetBool(key string) bool { return v.GetBool(key) } - -func (v *Viper) GetBool(key string) bool { - return cast.ToBool(v.Get(key)) -} - -// GetInt returns the value associated with the key as an integer. -func GetInt(key string) int { return v.GetInt(key) } - -func (v *Viper) GetInt(key string) int { - return cast.ToInt(v.Get(key)) -} - -// GetInt32 returns the value associated with the key as an integer. -func GetInt32(key string) int32 { return v.GetInt32(key) } - -func (v *Viper) GetInt32(key string) int32 { - return cast.ToInt32(v.Get(key)) -} - -// GetInt64 returns the value associated with the key as an integer. -func GetInt64(key string) int64 { return v.GetInt64(key) } - -func (v *Viper) GetInt64(key string) int64 { - return cast.ToInt64(v.Get(key)) -} - -// GetUint returns the value associated with the key as an unsigned integer. -func GetUint(key string) uint { return v.GetUint(key) } - -func (v *Viper) GetUint(key string) uint { - return cast.ToUint(v.Get(key)) -} - -// GetUint16 returns the value associated with the key as an unsigned integer. -func GetUint16(key string) uint16 { return v.GetUint16(key) } - -func (v *Viper) GetUint16(key string) uint16 { - return cast.ToUint16(v.Get(key)) -} - -// GetUint32 returns the value associated with the key as an unsigned integer. -func GetUint32(key string) uint32 { return v.GetUint32(key) } - -func (v *Viper) GetUint32(key string) uint32 { - return cast.ToUint32(v.Get(key)) -} - -// GetUint64 returns the value associated with the key as an unsigned integer. -func GetUint64(key string) uint64 { return v.GetUint64(key) } - -func (v *Viper) GetUint64(key string) uint64 { - return cast.ToUint64(v.Get(key)) -} - -// GetFloat64 returns the value associated with the key as a float64. -func GetFloat64(key string) float64 { return v.GetFloat64(key) } - -func (v *Viper) GetFloat64(key string) float64 { - return cast.ToFloat64(v.Get(key)) -} - -// GetTime returns the value associated with the key as time. -func GetTime(key string) time.Time { return v.GetTime(key) } - -func (v *Viper) GetTime(key string) time.Time { - return cast.ToTime(v.Get(key)) -} - -// GetDuration returns the value associated with the key as a duration. -func GetDuration(key string) time.Duration { return v.GetDuration(key) } - -func (v *Viper) GetDuration(key string) time.Duration { - return cast.ToDuration(v.Get(key)) -} - -// GetIntSlice returns the value associated with the key as a slice of int values. -func GetIntSlice(key string) []int { return v.GetIntSlice(key) } - -func (v *Viper) GetIntSlice(key string) []int { - return cast.ToIntSlice(v.Get(key)) -} - -// GetStringSlice returns the value associated with the key as a slice of strings. -func GetStringSlice(key string) []string { return v.GetStringSlice(key) } - -func (v *Viper) GetStringSlice(key string) []string { - return cast.ToStringSlice(v.Get(key)) -} - -// GetStringMap returns the value associated with the key as a map of interfaces. -func GetStringMap(key string) map[string]any { return v.GetStringMap(key) } - -func (v *Viper) GetStringMap(key string) map[string]any { - return cast.ToStringMap(v.Get(key)) -} - -// GetStringMapString returns the value associated with the key as a map of strings. -func GetStringMapString(key string) map[string]string { return v.GetStringMapString(key) } - -func (v *Viper) GetStringMapString(key string) map[string]string { - return cast.ToStringMapString(v.Get(key)) -} - -// GetStringMapStringSlice returns the value associated with the key as a map to a slice of strings. -func GetStringMapStringSlice(key string) map[string][]string { return v.GetStringMapStringSlice(key) } - -func (v *Viper) GetStringMapStringSlice(key string) map[string][]string { - return cast.ToStringMapStringSlice(v.Get(key)) -} - -// GetSizeInBytes returns the size of the value associated with the given key -// in bytes. -func GetSizeInBytes(key string) uint { return v.GetSizeInBytes(key) } - -func (v *Viper) GetSizeInBytes(key string) uint { - sizeStr := cast.ToString(v.Get(key)) - return parseSizeInBytes(sizeStr) -} - -// UnmarshalKey takes a single key and unmarshals it into a Struct. -func UnmarshalKey(key string, rawVal any, opts ...DecoderConfigOption) error { - return v.UnmarshalKey(key, rawVal, opts...) -} - -func (v *Viper) UnmarshalKey(key string, rawVal any, opts ...DecoderConfigOption) error { - return decode(v.Get(key), defaultDecoderConfig(rawVal, opts...)) -} - -// Unmarshal unmarshals the config into a Struct. Make sure that the tags -// on the fields of the structure are properly set. -func Unmarshal(rawVal any, opts ...DecoderConfigOption) error { - return v.Unmarshal(rawVal, opts...) -} - -func (v *Viper) Unmarshal(rawVal any, opts ...DecoderConfigOption) error { - keys := v.AllKeys() - - if features.BindStruct { - // TODO: make this optional? - structKeys, err := v.decodeStructKeys(rawVal, opts...) - if err != nil { - return err - } - - keys = append(keys, structKeys...) - } - - // TODO: struct keys should be enough? - return decode(v.getSettings(keys), defaultDecoderConfig(rawVal, opts...)) -} - -func (v *Viper) decodeStructKeys(input any, opts ...DecoderConfigOption) ([]string, error) { - var structKeyMap map[string]any - - err := decode(input, defaultDecoderConfig(&structKeyMap, opts...)) - if err != nil { - return nil, err - } - - flattenedStructKeyMap := v.flattenAndMergeMap(map[string]bool{}, structKeyMap, "") - - r := make([]string, 0, len(flattenedStructKeyMap)) - for v := range flattenedStructKeyMap { - r = append(r, v) - } - - return r, nil -} - -// defaultDecoderConfig returns default mapstructure.DecoderConfig with support -// of time.Duration values & string slices. -func defaultDecoderConfig(output any, opts ...DecoderConfigOption) *mapstructure.DecoderConfig { - c := &mapstructure.DecoderConfig{ - Metadata: nil, - Result: output, - WeaklyTypedInput: true, - DecodeHook: mapstructure.ComposeDecodeHookFunc( - mapstructure.StringToTimeDurationHookFunc(), - mapstructure.StringToSliceHookFunc(","), - ), - } - for _, opt := range opts { - opt(c) - } - return c -} - -// decode is a wrapper around mapstructure.Decode that mimics the WeakDecode functionality. -func decode(input any, config *mapstructure.DecoderConfig) error { - decoder, err := mapstructure.NewDecoder(config) - if err != nil { - return err - } - return decoder.Decode(input) -} - -// UnmarshalExact unmarshals the config into a Struct, erroring if a field is nonexistent -// in the destination struct. -func UnmarshalExact(rawVal any, opts ...DecoderConfigOption) error { - return v.UnmarshalExact(rawVal, opts...) -} - -func (v *Viper) UnmarshalExact(rawVal any, opts ...DecoderConfigOption) error { - config := defaultDecoderConfig(rawVal, opts...) - config.ErrorUnused = true - - keys := v.AllKeys() - - if features.BindStruct { - // TODO: make this optional? - structKeys, err := v.decodeStructKeys(rawVal, opts...) - if err != nil { - return err - } - - keys = append(keys, structKeys...) - } - - // TODO: struct keys should be enough? - return decode(v.getSettings(keys), config) -} - -// BindPFlags binds a full flag set to the configuration, using each flag's long -// name as the config key. -func BindPFlags(flags *pflag.FlagSet) error { return v.BindPFlags(flags) } - -func (v *Viper) BindPFlags(flags *pflag.FlagSet) error { - return v.BindFlagValues(pflagValueSet{flags}) -} - -// BindPFlag binds a specific key to a pflag (as used by cobra). -// Example (where serverCmd is a Cobra instance): -// -// serverCmd.Flags().Int("port", 1138, "Port to run Application server on") -// Viper.BindPFlag("port", serverCmd.Flags().Lookup("port")) -func BindPFlag(key string, flag *pflag.Flag) error { return v.BindPFlag(key, flag) } - -func (v *Viper) BindPFlag(key string, flag *pflag.Flag) error { - if flag == nil { - return fmt.Errorf("flag for %q is nil", key) - } - return v.BindFlagValue(key, pflagValue{flag}) -} - -// BindFlagValues binds a full FlagValue set to the configuration, using each flag's long -// name as the config key. -func BindFlagValues(flags FlagValueSet) error { return v.BindFlagValues(flags) } - -func (v *Viper) BindFlagValues(flags FlagValueSet) (err error) { - flags.VisitAll(func(flag FlagValue) { - if err = v.BindFlagValue(flag.Name(), flag); err != nil { - return - } - }) - return nil -} - -// BindFlagValue binds a specific key to a FlagValue. -func BindFlagValue(key string, flag FlagValue) error { return v.BindFlagValue(key, flag) } - -func (v *Viper) BindFlagValue(key string, flag FlagValue) error { - if flag == nil { - return fmt.Errorf("flag for %q is nil", key) - } - v.pflags[strings.ToLower(key)] = flag - return nil -} - -// BindEnv binds a Viper key to a ENV variable. -// ENV variables are case sensitive. -// If only a key is provided, it will use the env key matching the key, uppercased. -// If more arguments are provided, they will represent the env variable names that -// should bind to this key and will be taken in the specified order. -// EnvPrefix will be used when set when env name is not provided. -func BindEnv(input ...string) error { return v.BindEnv(input...) } - -func (v *Viper) BindEnv(input ...string) error { - if len(input) == 0 { - return fmt.Errorf("missing key to bind to") - } - - key := strings.ToLower(input[0]) - - if len(input) == 1 { - v.env[key] = append(v.env[key], v.mergeWithEnvPrefix(key)) - } else { - v.env[key] = append(v.env[key], input[1:]...) - } - - return nil -} - -// MustBindEnv wraps BindEnv in a panic. -// If there is an error binding an environment variable, MustBindEnv will -// panic. -func MustBindEnv(input ...string) { v.MustBindEnv(input...) } - -func (v *Viper) MustBindEnv(input ...string) { - if err := v.BindEnv(input...); err != nil { - panic(fmt.Sprintf("error while binding environment variable: %v", err)) - } -} - -// Given a key, find the value. -// -// Viper will check to see if an alias exists first. -// Viper will then check in the following order: -// flag, env, config file, key/value store. -// Lastly, if no value was found and flagDefault is true, and if the key -// corresponds to a flag, the flag's default value is returned. -// -// Note: this assumes a lower-cased key given. -func (v *Viper) find(lcaseKey string, flagDefault bool) any { - var ( - val any - exists bool - path = strings.Split(lcaseKey, v.keyDelim) - nested = len(path) > 1 - ) - - // compute the path through the nested maps to the nested value - if nested && v.isPathShadowedInDeepMap(path, castMapStringToMapInterface(v.aliases)) != "" { - return nil - } - - // if the requested key is an alias, then return the proper key - lcaseKey = v.realKey(lcaseKey) - path = strings.Split(lcaseKey, v.keyDelim) - nested = len(path) > 1 - - // Set() override first - val = v.searchMap(v.override, path) - if val != nil { - return val - } - if nested && v.isPathShadowedInDeepMap(path, v.override) != "" { - return nil - } - - // PFlag override next - flag, exists := v.pflags[lcaseKey] - if exists && flag.HasChanged() { - switch flag.ValueType() { - case "int", "int8", "int16", "int32", "int64": - return cast.ToInt(flag.ValueString()) - case "bool": - return cast.ToBool(flag.ValueString()) - case "stringSlice", "stringArray": - s := strings.TrimPrefix(flag.ValueString(), "[") - s = strings.TrimSuffix(s, "]") - res, _ := readAsCSV(s) - return res - case "intSlice": - s := strings.TrimPrefix(flag.ValueString(), "[") - s = strings.TrimSuffix(s, "]") - res, _ := readAsCSV(s) - return cast.ToIntSlice(res) - case "durationSlice": - s := strings.TrimPrefix(flag.ValueString(), "[") - s = strings.TrimSuffix(s, "]") - slice := strings.Split(s, ",") - return cast.ToDurationSlice(slice) - case "stringToString": - return stringToStringConv(flag.ValueString()) - case "stringToInt": - return stringToIntConv(flag.ValueString()) - default: - return flag.ValueString() - } - } - if nested && v.isPathShadowedInFlatMap(path, v.pflags) != "" { - return nil - } - - // Env override next - if v.automaticEnvApplied { - envKey := strings.Join(append(v.parents, lcaseKey), ".") - // even if it hasn't been registered, if automaticEnv is used, - // check any Get request - if val, ok := v.getEnv(v.mergeWithEnvPrefix(envKey)); ok { - return val - } - if nested && v.isPathShadowedInAutoEnv(path) != "" { - return nil - } - } - envkeys, exists := v.env[lcaseKey] - if exists { - for _, envkey := range envkeys { - if val, ok := v.getEnv(envkey); ok { - return val - } - } - } - if nested && v.isPathShadowedInFlatMap(path, v.env) != "" { - return nil - } - - // Config file next - val = v.searchIndexableWithPathPrefixes(v.config, path) - if val != nil { - return val - } - if nested && v.isPathShadowedInDeepMap(path, v.config) != "" { - return nil - } - - // K/V store next - val = v.searchMap(v.kvstore, path) - if val != nil { - return val - } - if nested && v.isPathShadowedInDeepMap(path, v.kvstore) != "" { - return nil - } - - // Default next - val = v.searchMap(v.defaults, path) - if val != nil { - return val - } - if nested && v.isPathShadowedInDeepMap(path, v.defaults) != "" { - return nil - } - - if flagDefault { - // last chance: if no value is found and a flag does exist for the key, - // get the flag's default value even if the flag's value has not been set. - if flag, exists := v.pflags[lcaseKey]; exists { - switch flag.ValueType() { - case "int", "int8", "int16", "int32", "int64": - return cast.ToInt(flag.ValueString()) - case "bool": - return cast.ToBool(flag.ValueString()) - case "stringSlice", "stringArray": - s := strings.TrimPrefix(flag.ValueString(), "[") - s = strings.TrimSuffix(s, "]") - res, _ := readAsCSV(s) - return res - case "intSlice": - s := strings.TrimPrefix(flag.ValueString(), "[") - s = strings.TrimSuffix(s, "]") - res, _ := readAsCSV(s) - return cast.ToIntSlice(res) - case "stringToString": - return stringToStringConv(flag.ValueString()) - case "stringToInt": - return stringToIntConv(flag.ValueString()) - case "durationSlice": - s := strings.TrimPrefix(flag.ValueString(), "[") - s = strings.TrimSuffix(s, "]") - slice := strings.Split(s, ",") - return cast.ToDurationSlice(slice) - default: - return flag.ValueString() - } - } - // last item, no need to check shadowing - } - - return nil -} - -func readAsCSV(val string) ([]string, error) { - if val == "" { - return []string{}, nil - } - stringReader := strings.NewReader(val) - csvReader := csv.NewReader(stringReader) - return csvReader.Read() -} - -// mostly copied from pflag's implementation of this operation here https://github.com/spf13/pflag/blob/master/string_to_string.go#L79 -// alterations are: errors are swallowed, map[string]any is returned in order to enable cast.ToStringMap. -func stringToStringConv(val string) any { - val = strings.Trim(val, "[]") - // An empty string would cause an empty map - if val == "" { - return map[string]any{} - } - r := csv.NewReader(strings.NewReader(val)) - ss, err := r.Read() - if err != nil { - return nil - } - out := make(map[string]any, len(ss)) - for _, pair := range ss { - k, vv, found := strings.Cut(pair, "=") - if !found { - return nil - } - out[k] = vv - } - return out -} - -// mostly copied from pflag's implementation of this operation here https://github.com/spf13/pflag/blob/d5e0c0615acee7028e1e2740a11102313be88de1/string_to_int.go#L68 -// alterations are: errors are swallowed, map[string]any is returned in order to enable cast.ToStringMap. -func stringToIntConv(val string) any { - val = strings.Trim(val, "[]") - // An empty string would cause an empty map - if val == "" { - return map[string]any{} - } - ss := strings.Split(val, ",") - out := make(map[string]any, len(ss)) - for _, pair := range ss { - k, vv, found := strings.Cut(pair, "=") - if !found { - return nil - } - var err error - out[k], err = strconv.Atoi(vv) - if err != nil { - return nil - } - } - return out -} - -// IsSet checks to see if the key has been set in any of the data locations. -// IsSet is case-insensitive for a key. -func IsSet(key string) bool { return v.IsSet(key) } - -func (v *Viper) IsSet(key string) bool { - lcaseKey := strings.ToLower(key) - val := v.find(lcaseKey, false) - return val != nil -} - -// AutomaticEnv makes Viper check if environment variables match any of the existing keys -// (config, default or flags). If matching env vars are found, they are loaded into Viper. -func AutomaticEnv() { v.AutomaticEnv() } - -func (v *Viper) AutomaticEnv() { - v.automaticEnvApplied = true -} - -// SetEnvKeyReplacer sets the strings.Replacer on the viper object -// Useful for mapping an environmental variable to a key that does -// not match it. -func SetEnvKeyReplacer(r *strings.Replacer) { v.SetEnvKeyReplacer(r) } - -func (v *Viper) SetEnvKeyReplacer(r *strings.Replacer) { - v.envKeyReplacer = r -} - -// RegisterAlias creates an alias that provides another accessor for the same key. -// This enables one to change a name without breaking the application. -func RegisterAlias(alias, key string) { v.RegisterAlias(alias, key) } - -func (v *Viper) RegisterAlias(alias, key string) { - v.registerAlias(alias, strings.ToLower(key)) -} - -func (v *Viper) registerAlias(alias, key string) { - alias = strings.ToLower(alias) - if alias != key && alias != v.realKey(key) { - _, exists := v.aliases[alias] - - if !exists { - // if we alias something that exists in one of the maps to another - // name, we'll never be able to get that value using the original - // name, so move the config value to the new realkey. - if val, ok := v.config[alias]; ok { - delete(v.config, alias) - v.config[key] = val - } - if val, ok := v.kvstore[alias]; ok { - delete(v.kvstore, alias) - v.kvstore[key] = val - } - if val, ok := v.defaults[alias]; ok { - delete(v.defaults, alias) - v.defaults[key] = val - } - if val, ok := v.override[alias]; ok { - delete(v.override, alias) - v.override[key] = val - } - v.aliases[alias] = key - } - } else { - v.logger.Warn("creating circular reference alias", "alias", alias, "key", key, "real_key", v.realKey(key)) - } -} - -func (v *Viper) realKey(key string) string { - newkey, exists := v.aliases[key] - if exists { - v.logger.Debug("key is an alias", "alias", key, "to", newkey) - - return v.realKey(newkey) - } - return key -} - -// InConfig checks to see if the given key (or an alias) is in the config file. -func InConfig(key string) bool { return v.InConfig(key) } - -func (v *Viper) InConfig(key string) bool { - lcaseKey := strings.ToLower(key) - - // if the requested key is an alias, then return the proper key - lcaseKey = v.realKey(lcaseKey) - path := strings.Split(lcaseKey, v.keyDelim) - - return v.searchIndexableWithPathPrefixes(v.config, path) != nil -} - -// SetDefault sets the default value for this key. -// SetDefault is case-insensitive for a key. -// Default only used when no value is provided by the user via flag, config or ENV. -func SetDefault(key string, value any) { v.SetDefault(key, value) } - -func (v *Viper) SetDefault(key string, value any) { - // If alias passed in, then set the proper default - key = v.realKey(strings.ToLower(key)) - value = toCaseInsensitiveValue(value) - - path := strings.Split(key, v.keyDelim) - lastKey := strings.ToLower(path[len(path)-1]) - deepestMap := deepSearch(v.defaults, path[0:len(path)-1]) - - // set innermost value - deepestMap[lastKey] = value -} - -// Set sets the value for the key in the override register. -// Set is case-insensitive for a key. -// Will be used instead of values obtained via -// flags, config file, ENV, default, or key/value store. -func Set(key string, value any) { v.Set(key, value) } - -func (v *Viper) Set(key string, value any) { - // If alias passed in, then set the proper override - key = v.realKey(strings.ToLower(key)) - value = toCaseInsensitiveValue(value) - - path := strings.Split(key, v.keyDelim) - lastKey := strings.ToLower(path[len(path)-1]) - deepestMap := deepSearch(v.override, path[0:len(path)-1]) - - // set innermost value - deepestMap[lastKey] = value -} - -// ReadInConfig will discover and load the configuration file from disk -// and key/value stores, searching in one of the defined paths. -func ReadInConfig() error { return v.ReadInConfig() } - -func (v *Viper) ReadInConfig() error { - v.logger.Info("attempting to read in config file") - filename, err := v.getConfigFile() - if err != nil { - return err - } - - if !stringInSlice(v.getConfigType(), SupportedExts) { - return UnsupportedConfigError(v.getConfigType()) - } - - v.logger.Debug("reading file", "file", filename) - file, err := afero.ReadFile(v.fs, filename) - if err != nil { - return err - } - - config := make(map[string]any) - - err = v.unmarshalReader(bytes.NewReader(file), config) - if err != nil { - return err - } - - v.config = config - return nil -} - -// MergeInConfig merges a new configuration with an existing config. -func MergeInConfig() error { return v.MergeInConfig() } - -func (v *Viper) MergeInConfig() error { - v.logger.Info("attempting to merge in config file") - filename, err := v.getConfigFile() - if err != nil { - return err - } - - if !stringInSlice(v.getConfigType(), SupportedExts) { - return UnsupportedConfigError(v.getConfigType()) - } - - file, err := afero.ReadFile(v.fs, filename) - if err != nil { - return err - } - - return v.MergeConfig(bytes.NewReader(file)) -} - -// ReadConfig will read a configuration file, setting existing keys to nil if the -// key does not exist in the file. -func ReadConfig(in io.Reader) error { return v.ReadConfig(in) } - -func (v *Viper) ReadConfig(in io.Reader) error { - v.config = make(map[string]any) - return v.unmarshalReader(in, v.config) -} - -// MergeConfig merges a new configuration with an existing config. -func MergeConfig(in io.Reader) error { return v.MergeConfig(in) } - -func (v *Viper) MergeConfig(in io.Reader) error { - cfg := make(map[string]any) - if err := v.unmarshalReader(in, cfg); err != nil { - return err - } - return v.MergeConfigMap(cfg) -} - -// MergeConfigMap merges the configuration from the map given with an existing config. -// Note that the map given may be modified. -func MergeConfigMap(cfg map[string]any) error { return v.MergeConfigMap(cfg) } - -func (v *Viper) MergeConfigMap(cfg map[string]any) error { - if v.config == nil { - v.config = make(map[string]any) - } - insensitiviseMap(cfg) - mergeMaps(cfg, v.config, nil) - return nil -} - -// WriteConfig writes the current configuration to a file. -func WriteConfig() error { return v.WriteConfig() } - -func (v *Viper) WriteConfig() error { - filename, err := v.getConfigFile() - if err != nil { - return err - } - return v.writeConfig(filename, true) -} - -// SafeWriteConfig writes current configuration to file only if the file does not exist. -func SafeWriteConfig() error { return v.SafeWriteConfig() } - -func (v *Viper) SafeWriteConfig() error { - if len(v.configPaths) < 1 { - return errors.New("missing configuration for 'configPath'") - } - return v.SafeWriteConfigAs(filepath.Join(v.configPaths[0], v.configName+"."+v.configType)) -} - -// WriteConfigAs writes current configuration to a given filename. -func WriteConfigAs(filename string) error { return v.WriteConfigAs(filename) } - -func (v *Viper) WriteConfigAs(filename string) error { - return v.writeConfig(filename, true) -} - -// SafeWriteConfigAs writes current configuration to a given filename if it does not exist. -func SafeWriteConfigAs(filename string) error { return v.SafeWriteConfigAs(filename) } - -func (v *Viper) SafeWriteConfigAs(filename string) error { - alreadyExists, err := afero.Exists(v.fs, filename) - if alreadyExists && err == nil { - return ConfigFileAlreadyExistsError(filename) - } - return v.writeConfig(filename, false) -} - -func (v *Viper) writeConfig(filename string, force bool) error { - v.logger.Info("attempting to write configuration to file") - - var configType string - - ext := filepath.Ext(filename) - if ext != "" && ext != filepath.Base(filename) { - configType = ext[1:] - } else { - configType = v.configType - } - if configType == "" { - return fmt.Errorf("config type could not be determined for %s", filename) - } - - if !stringInSlice(configType, SupportedExts) { - return UnsupportedConfigError(configType) - } - if v.config == nil { - v.config = make(map[string]any) - } - flags := os.O_CREATE | os.O_TRUNC | os.O_WRONLY - if !force { - flags |= os.O_EXCL - } - f, err := v.fs.OpenFile(filename, flags, v.configPermissions) - if err != nil { - return err - } - defer f.Close() - - if err := v.marshalWriter(f, configType); err != nil { - return err - } - - return f.Sync() -} - -// Unmarshal a Reader into a map. -// Should probably be an unexported function. -func unmarshalReader(in io.Reader, c map[string]any) error { - return v.unmarshalReader(in, c) -} - -func (v *Viper) unmarshalReader(in io.Reader, c map[string]any) error { - buf := new(bytes.Buffer) - buf.ReadFrom(in) - - switch format := strings.ToLower(v.getConfigType()); format { - case "yaml", "yml", "json", "toml", "hcl", "tfvars", "ini", "properties", "props", "prop", "dotenv", "env": - err := v.decoderRegistry.Decode(format, buf.Bytes(), c) - if err != nil { - return ConfigParseError{err} - } - } - - insensitiviseMap(c) - return nil -} - -// Marshal a map into Writer. -func (v *Viper) marshalWriter(f afero.File, configType string) error { - c := v.AllSettings() - switch configType { - case "yaml", "yml", "json", "toml", "hcl", "tfvars", "ini", "prop", "props", "properties", "dotenv", "env": - b, err := v.encoderRegistry.Encode(configType, c) - if err != nil { - return ConfigMarshalError{err} - } - - _, err = f.WriteString(string(b)) - if err != nil { - return ConfigMarshalError{err} - } - } - return nil -} - -func keyExists(k string, m map[string]any) string { - lk := strings.ToLower(k) - for mk := range m { - lmk := strings.ToLower(mk) - if lmk == lk { - return mk - } - } - return "" -} - -func castToMapStringInterface( - src map[any]any, -) map[string]any { - tgt := map[string]any{} - for k, v := range src { - tgt[fmt.Sprintf("%v", k)] = v - } - return tgt -} - -func castMapStringSliceToMapInterface(src map[string][]string) map[string]any { - tgt := map[string]any{} - for k, v := range src { - tgt[k] = v - } - return tgt -} - -func castMapStringToMapInterface(src map[string]string) map[string]any { - tgt := map[string]any{} - for k, v := range src { - tgt[k] = v - } - return tgt -} - -func castMapFlagToMapInterface(src map[string]FlagValue) map[string]any { - tgt := map[string]any{} - for k, v := range src { - tgt[k] = v - } - return tgt -} - -// mergeMaps merges two maps. The `itgt` parameter is for handling go-yaml's -// insistence on parsing nested structures as `map[any]any` -// instead of using a `string` as the key for nest structures beyond one level -// deep. Both map types are supported as there is a go-yaml fork that uses -// `map[string]any` instead. -func mergeMaps(src, tgt map[string]any, itgt map[any]any) { - for sk, sv := range src { - tk := keyExists(sk, tgt) - if tk == "" { - v.logger.Debug("", "tk", "\"\"", fmt.Sprintf("tgt[%s]", sk), sv) - tgt[sk] = sv - if itgt != nil { - itgt[sk] = sv - } - continue - } - - tv, ok := tgt[tk] - if !ok { - v.logger.Debug("", fmt.Sprintf("ok[%s]", tk), false, fmt.Sprintf("tgt[%s]", sk), sv) - tgt[sk] = sv - if itgt != nil { - itgt[sk] = sv - } - continue - } - - svType := reflect.TypeOf(sv) - tvType := reflect.TypeOf(tv) - - v.logger.Debug( - "processing", - "key", sk, - "st", svType, - "tt", tvType, - "sv", sv, - "tv", tv, - ) - - switch ttv := tv.(type) { - case map[any]any: - v.logger.Debug("merging maps (must convert)") - tsv, ok := sv.(map[any]any) - if !ok { - v.logger.Error( - "Could not cast sv to map[any]any", - "key", sk, - "st", svType, - "tt", tvType, - "sv", sv, - "tv", tv, - ) - continue - } - - ssv := castToMapStringInterface(tsv) - stv := castToMapStringInterface(ttv) - mergeMaps(ssv, stv, ttv) - case map[string]any: - v.logger.Debug("merging maps") - tsv, ok := sv.(map[string]any) - if !ok { - v.logger.Error( - "Could not cast sv to map[string]any", - "key", sk, - "st", svType, - "tt", tvType, - "sv", sv, - "tv", tv, - ) - continue - } - mergeMaps(tsv, ttv, nil) - default: - v.logger.Debug("setting value") - tgt[tk] = sv - if itgt != nil { - itgt[tk] = sv - } - } - } -} - -// ReadRemoteConfig attempts to get configuration from a remote source -// and read it in the remote configuration registry. -func ReadRemoteConfig() error { return v.ReadRemoteConfig() } - -func (v *Viper) ReadRemoteConfig() error { - return v.getKeyValueConfig() -} - -func WatchRemoteConfig() error { return v.WatchRemoteConfig() } -func (v *Viper) WatchRemoteConfig() error { - return v.watchKeyValueConfig() -} - -func (v *Viper) WatchRemoteConfigOnChannel() error { - return v.watchKeyValueConfigOnChannel() -} - -// Retrieve the first found remote configuration. -func (v *Viper) getKeyValueConfig() error { - if RemoteConfig == nil { - return RemoteConfigError("Enable the remote features by doing a blank import of the viper/remote package: '_ github.com/spf13/viper/remote'") - } - - if len(v.remoteProviders) == 0 { - return RemoteConfigError("No Remote Providers") - } - - for _, rp := range v.remoteProviders { - val, err := v.getRemoteConfig(rp) - if err != nil { - v.logger.Error(fmt.Errorf("get remote config: %w", err).Error()) - - continue - } - - v.kvstore = val - - return nil - } - return RemoteConfigError("No Files Found") -} - -func (v *Viper) getRemoteConfig(provider RemoteProvider) (map[string]any, error) { - reader, err := RemoteConfig.Get(provider) - if err != nil { - return nil, err - } - err = v.unmarshalReader(reader, v.kvstore) - return v.kvstore, err -} - -// Retrieve the first found remote configuration. -func (v *Viper) watchKeyValueConfigOnChannel() error { - if len(v.remoteProviders) == 0 { - return RemoteConfigError("No Remote Providers") - } - - for _, rp := range v.remoteProviders { - respc, _ := RemoteConfig.WatchChannel(rp) - // Todo: Add quit channel - go func(rc <-chan *RemoteResponse) { - for { - b := <-rc - reader := bytes.NewReader(b.Value) - v.unmarshalReader(reader, v.kvstore) - } - }(respc) - return nil - } - return RemoteConfigError("No Files Found") -} - -// Retrieve the first found remote configuration. -func (v *Viper) watchKeyValueConfig() error { - if len(v.remoteProviders) == 0 { - return RemoteConfigError("No Remote Providers") - } - - for _, rp := range v.remoteProviders { - val, err := v.watchRemoteConfig(rp) - if err != nil { - v.logger.Error(fmt.Errorf("watch remote config: %w", err).Error()) - - continue - } - v.kvstore = val - return nil - } - return RemoteConfigError("No Files Found") -} - -func (v *Viper) watchRemoteConfig(provider RemoteProvider) (map[string]any, error) { - reader, err := RemoteConfig.Watch(provider) - if err != nil { - return nil, err - } - err = v.unmarshalReader(reader, v.kvstore) - return v.kvstore, err -} - -// AllKeys returns all keys holding a value, regardless of where they are set. -// Nested keys are returned with a v.keyDelim separator. -func AllKeys() []string { return v.AllKeys() } - -func (v *Viper) AllKeys() []string { - m := map[string]bool{} - // add all paths, by order of descending priority to ensure correct shadowing - m = v.flattenAndMergeMap(m, castMapStringToMapInterface(v.aliases), "") - m = v.flattenAndMergeMap(m, v.override, "") - m = v.mergeFlatMap(m, castMapFlagToMapInterface(v.pflags)) - m = v.mergeFlatMap(m, castMapStringSliceToMapInterface(v.env)) - m = v.flattenAndMergeMap(m, v.config, "") - m = v.flattenAndMergeMap(m, v.kvstore, "") - m = v.flattenAndMergeMap(m, v.defaults, "") - - // convert set of paths to list - a := make([]string, 0, len(m)) - for x := range m { - a = append(a, x) - } - return a -} - -// flattenAndMergeMap recursively flattens the given map into a map[string]bool -// of key paths (used as a set, easier to manipulate than a []string): -// - each path is merged into a single key string, delimited with v.keyDelim -// - if a path is shadowed by an earlier value in the initial shadow map, -// it is skipped. -// -// The resulting set of paths is merged to the given shadow set at the same time. -func (v *Viper) flattenAndMergeMap(shadow map[string]bool, m map[string]any, prefix string) map[string]bool { - if shadow != nil && prefix != "" && shadow[prefix] { - // prefix is shadowed => nothing more to flatten - return shadow - } - if shadow == nil { - shadow = make(map[string]bool) - } - - var m2 map[string]any - if prefix != "" { - prefix += v.keyDelim - } - for k, val := range m { - fullKey := prefix + k - switch val := val.(type) { - case map[string]any: - m2 = val - case map[any]any: - m2 = cast.ToStringMap(val) - default: - // immediate value - shadow[strings.ToLower(fullKey)] = true - continue - } - // recursively merge to shadow map - shadow = v.flattenAndMergeMap(shadow, m2, fullKey) - } - return shadow -} - -// mergeFlatMap merges the given maps, excluding values of the second map -// shadowed by values from the first map. -func (v *Viper) mergeFlatMap(shadow map[string]bool, m map[string]any) map[string]bool { - // scan keys -outer: - for k := range m { - path := strings.Split(k, v.keyDelim) - // scan intermediate paths - var parentKey string - for i := 1; i < len(path); i++ { - parentKey = strings.Join(path[0:i], v.keyDelim) - if shadow[parentKey] { - // path is shadowed, continue - continue outer - } - } - // add key - shadow[strings.ToLower(k)] = true - } - return shadow -} - -// AllSettings merges all settings and returns them as a map[string]any. -func AllSettings() map[string]any { return v.AllSettings() } - -func (v *Viper) AllSettings() map[string]any { - return v.getSettings(v.AllKeys()) -} - -func (v *Viper) getSettings(keys []string) map[string]any { - m := map[string]any{} - // start from the list of keys, and construct the map one value at a time - for _, k := range keys { - value := v.Get(k) - if value == nil { - // should not happen, since AllKeys() returns only keys holding a value, - // check just in case anything changes - continue - } - path := strings.Split(k, v.keyDelim) - lastKey := strings.ToLower(path[len(path)-1]) - deepestMap := deepSearch(m, path[0:len(path)-1]) - // set innermost value - deepestMap[lastKey] = value - } - return m -} - -// SetFs sets the filesystem to use to read configuration. -func SetFs(fs afero.Fs) { v.SetFs(fs) } - -func (v *Viper) SetFs(fs afero.Fs) { - v.fs = fs -} - -// SetConfigName sets name for the config file. -// Does not include extension. -func SetConfigName(in string) { v.SetConfigName(in) } - -func (v *Viper) SetConfigName(in string) { - if in != "" { - v.configName = in - v.configFile = "" - } -} - -// SetConfigType sets the type of the configuration returned by the -// remote source, e.g. "json". -func SetConfigType(in string) { v.SetConfigType(in) } - -func (v *Viper) SetConfigType(in string) { - if in != "" { - v.configType = in - } -} - -// SetConfigPermissions sets the permissions for the config file. -func SetConfigPermissions(perm os.FileMode) { v.SetConfigPermissions(perm) } - -func (v *Viper) SetConfigPermissions(perm os.FileMode) { - v.configPermissions = perm.Perm() -} - -// IniLoadOptions sets the load options for ini parsing. -func IniLoadOptions(in ini.LoadOptions) Option { - return optionFunc(func(v *Viper) { - v.iniLoadOptions = in - }) -} - -func (v *Viper) getConfigType() string { - if v.configType != "" { - return v.configType - } - - cf, err := v.getConfigFile() - if err != nil { - return "" - } - - ext := filepath.Ext(cf) - - if len(ext) > 1 { - return ext[1:] - } - - return "" -} - -func (v *Viper) getConfigFile() (string, error) { - if v.configFile == "" { - cf, err := v.findConfigFile() - if err != nil { - return "", err - } - v.configFile = cf - } - return v.configFile, nil -} - -// Debug prints all configuration registries for debugging -// purposes. -func Debug() { v.Debug() } -func DebugTo(w io.Writer) { v.DebugTo(w) } - -func (v *Viper) Debug() { v.DebugTo(os.Stdout) } - -func (v *Viper) DebugTo(w io.Writer) { - fmt.Fprintf(w, "Aliases:\n%#v\n", v.aliases) - fmt.Fprintf(w, "Override:\n%#v\n", v.override) - fmt.Fprintf(w, "PFlags:\n%#v\n", v.pflags) - fmt.Fprintf(w, "Env:\n%#v\n", v.env) - fmt.Fprintf(w, "Key/Value Store:\n%#v\n", v.kvstore) - fmt.Fprintf(w, "Config:\n%#v\n", v.config) - fmt.Fprintf(w, "Defaults:\n%#v\n", v.defaults) -} diff --git a/vendor/github.com/starainrt/astro/LICENSE b/vendor/github.com/starainrt/astro/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/vendor/github.com/starainrt/astro/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/starainrt/astro/basic/calendar.go b/vendor/github.com/starainrt/astro/basic/calendar.go deleted file mode 100644 index c3647e5..0000000 --- a/vendor/github.com/starainrt/astro/basic/calendar.go +++ /dev/null @@ -1,434 +0,0 @@ -package basic - -import ( - "fmt" - "math" - "strings" - "time" -) - -var defDeltaTFn = DefaultDeltaT - -/* -@name: 儒略日计算 -@dec: 计算给定时间的儒略日,1582年改力后为格里高利历,之前为儒略历 -@ 请注意,传入的时间在天文计算中一般为力学时,应当注意和世界时的转化 -*/ -func JDECalc(Year, Month int, Day float64) float64 { - if Month == 1 || Month == 2 { - Year-- - Month += 12 - } - var tmpvarB int - tmpvar := fmt.Sprintf("%04d-%02d-%2d", Year, Month, int(math.Floor(Day))) - if strings.Compare(tmpvar, `1582-10-04`) != 1 { - tmpvarB = 0 - } else { - tmpvarA := int(Year / 100) - tmpvarB = 2 - tmpvarA + int(tmpvarA/4) - } - return (math.Floor(365.25*(float64(Year)+4716.0)) + math.Floor(30.6001*float64(Month+1)) + Day + float64(tmpvarB) - 1524.5) -} - -/* -@name: 获得当前儒略日时间:当地世界时,非格林尼治时间 -*/ -func GetNowJDE() (NowJDE float64) { - Time := float64(time.Now().Second())/3600.0/24.0 + float64(time.Now().Minute())/60.0/24.0 + float64(time.Now().Hour())/24.0 - NowJDE = JDECalc(time.Now().Year(), int(time.Now().Month()), float64(time.Now().Day())+Time) - return -} - -func dt_ext(y, jsd float64) float64 { // 二次曲线外推,用于数值外插 - dy := (y - 1820) / 100.00 - return -20 + jsd*dy*dy -} -func dt_cal(y float64) float64 { //传入年, 返回世界时UT与原子时(力学时 TD)之差, ΔT = TD - UT - dt_at := []float64{ - -4000, 108371.7, -13036.80, 392.000, 0.0000, - -500, 17201.0, -627.82, 16.170, -0.3413, - -150, 12200.6, -346.41, 5.403, -0.1593, - 150, 9113.8, -328.13, -1.647, 0.0377, - 500, 5707.5, -391.41, 0.915, 0.3145, - 900, 2203.4, -283.45, 13.034, -0.1778, - 1300, 490.1, -57.35, 2.085, -0.0072, - 1600, 120.0, -9.81, -1.532, 0.1403, - 1700, 10.2, -0.91, 0.510, -0.0370, - 1800, 13.4, -0.72, 0.202, -0.0193, - 1830, 7.8, -1.81, 0.416, -0.0247, - 1860, 8.3, -0.13, -0.406, 0.0292, - 1880, -5.4, 0.32, -0.183, 0.0173, - 1900, -2.3, 2.06, 0.169, -0.0135, - 1920, 21.2, 1.69, -0.304, 0.0167, - 1940, 24.2, 1.22, -0.064, 0.0031, - 1960, 33.2, 0.51, 0.231, -0.0109, - 1980, 51.0, 1.29, -0.026, 0.0032, - 2000, 63.87, 0.1, 0, 0, - 2005, 64.7, 0.4, 0, 0, //一次项记为x,则 10x=0.4秒/年*(2015-2005),解得x=0.4 - 2015, 69, - } - y0 := dt_at[len(dt_at)-2] //表中最后一年 - t0 := dt_at[len(dt_at)-1] //表中最后一年的 deltatT - if y >= y0 { - jsd := float64(31) // sjd是y1年之后的加速度估计 - // 瑞士星历表jsd=31, NASA网站jsd=32, skmap的jsd=29 - if y > y0+100.00 { - return dt_ext(y, jsd) - } - v := dt_ext(y, jsd) //二次曲线外推 - dv := dt_ext(y0, jsd) - t0 // ye年的二次外推与te的差 - return (v - dv*(y0+100.00-y)/100.00) - } - d := dt_at - var i int - for i = 0; i < len(d); i += 5 { - if float64(y) < d[i+5] { - break - // 判断年所在的区间 - } - } - t1 := (y - d[i]) / (d[i+5] - d[i]) * 10.00 //////// 三次插值, 保证精确性 - t2 := t1 * t1 - t3 := t2 * t1 - res := d[i+1] + d[i+2]*t1 + d[i+3]*t2 + d[i+4]*t3 - return (res) -} - -func DeltaT(date float64, isJDE bool) float64 { - return defDeltaTFn(date, isJDE) -} - -func SetDeltaTFn(fn func(float64, bool) float64) { - if fn != nil { - defDeltaTFn = fn - } -} - -func GetDeltaTFn() func(float64, bool) float64 { - return defDeltaTFn -} - -func OldDefaultDeltaT(Date float64, IsJDE bool) (Result float64) { //传入年或儒略日,传出为秒 - var Year float64 - if IsJDE { - dates := JDE2Date(Date) - Year = float64(dates.Year()) + float64(dates.YearDay())/365.0 - } else { - Year = Date - } - if Year < 2100 && Year >= 2010 { - return dt_cal(Year) - } - return DefaultDeltaT(Date, IsJDE) -} - -func DefaultDeltaT(Date float64, IsJDE bool) (Result float64) { //传入年或儒略日,传出为秒 - var Year float64 - if IsJDE { - dates := JDE2Date(Date) - Year = float64(dates.Year()) + float64(dates.YearDay())/365.0 - } else { - Year = Date - } - if Year < 2010 { - Result = dt_cal(Year) - return - } - if Year < 2100 && Year >= 2010 { - var t = (Year - 2000.0) - Result = 62.92 + 0.32217*t + 0.005589*t*t - return - } - if Year >= 2100 && Year <= 2150 { - Result = -20 + 32*(((Year-1820.0)/100.0)*((Year-1820.0)/100.0)) - 0.5628*(2150-Year) - return - } - if Year > 2150 { - //tmp=(Year-1820)/100; - //Result= -20 + 32 * tmp*tmp; - Result = dt_cal(Year) - return - } - return -} - -func TD2UT(JDE float64, UT2TD bool) float64 { // true 世界时转力学时CC,false 力学时转世界时VV - - Deltat := DeltaT(JDE, true) - if UT2TD { - return JDE + Deltat/3600/24 - } else { - return JDE - Deltat/3600/24 - } -} - -/* - * @name: JDE转日期,输出为数组 - */ -func JDE2Date(JD float64) time.Time { - JD = JD + 0.5 - Z := float64(int(JD)) - F := JD - Z - var A, B, Years, Months, Days float64 - if Z < 2299161.0 { - A = Z - } else { - alpha := math.Floor((Z - 1867216.25) / 36524.25) - A = Z + 1 + alpha - math.Floor(alpha/4) - } - B = A + 1524 - C := math.Floor((B - 122.1) / 365.25) - D := math.Floor(365.25 * C) - E := math.Floor((B - D) / 30.6001) - Days = B - D - math.Floor(30.6001*E) + F - if E < 14 { - Months = E - 1 - } - if E == 14 || E == 15 { - Months = E - 13 - } - if Months > 2 { - Years = C - 4716 - } - if Months == 1 || Months == 2 { - Years = C - 4715 - } - tms := (Days - math.Floor(Days)) * 24 * 3600 - Days = math.Floor(Days) - tz, _ := time.LoadLocation("Local") - dates := time.Date(int(Years), time.Month(int(Months)), int(Days), 0, 0, 0, 0, tz) - dates = time.Unix(dates.Unix()+int64(tms), int64((tms-math.Floor(tms))*1000000000)) - return dates -} - -func JDE2DateByZone(JD float64, tz *time.Location, byZone bool) time.Time { - JD = JD + 0.5 - Z := float64(int(JD)) - F := JD - Z - var A, B, Years, Months, Days float64 - if Z < 2299161.0 { - A = Z - } else { - alpha := math.Floor((Z - 1867216.25) / 36524.25) - A = Z + 1 + alpha - math.Floor(alpha/4) - } - B = A + 1524 - C := math.Floor((B - 122.1) / 365.25) - D := math.Floor(365.25 * C) - E := math.Floor((B - D) / 30.6001) - Days = B - D - math.Floor(30.6001*E) + F - if E < 14 { - Months = E - 1 - } - if E == 14 || E == 15 { - Months = E - 13 - } - if Months > 2 { - Years = C - 4716 - } - if Months == 1 || Months == 2 { - Years = C - 4715 - } - tms := (Days - math.Floor(Days)) * 24 * 3600 - Days = math.Floor(Days) - if !byZone { - dates := time.Date(int(Years), time.Month(int(Months)), int(Days), 0, 0, 0, 0, time.UTC) - return time.Unix(dates.Unix()+int64(tms), int64((tms-math.Floor(tms))*1000000000)).In(tz) - } - dates := time.Date(int(Years), time.Month(int(Months)), int(Days), 0, 0, 0, 0, tz) - return time.Unix(dates.Unix()+int64(tms), int64((tms-math.Floor(tms))*1000000000)) -} - -func GetLunar(year, month, day int, tz float64) (lmonth, lday int, leap bool, result string) { - jde := JDECalc(year, month, float64(day)) //计算当前JDE时间 - if month == 11 || month == 12 { //判断当前日期属于前一年周期还是后一年周期 - //判断方法:当前日期与冬至日所在朔望月的关系 - winterday := GetJQTime(year, 270) + tz //冬至日日期(世界时,北京时间) - Fday := TD2UT(CalcMoonS(float64(year)+11.0/12.0+5.0/30.0/12.0, 0), true) + tz //朔月(世界时,北京时间) - Yday := TD2UT(CalcMoonS(float64(year)+1.0, 0), true) + tz //下一朔月(世界时,北京时间) - if Fday-math.Floor(Fday) > 0.5 { - Fday = math.Floor(Fday) + 0.5 - } else { - Fday = math.Floor(Fday) - 0.5 - } - if Yday-math.Floor(Yday) > 0.5 { - Yday = math.Floor(Yday) + 0.5 - } else { - Yday = math.Floor(Yday) - 0.5 - } - if winterday >= Fday && winterday < Yday && jde <= Fday { - year-- - } - if winterday >= Yday && jde < Yday { - year-- - } - } else { - year-- - } - jieqi := GetJieqiLoops(year, 25) //一年的节气 - moon := GetMoonLoops(float64(year), 17) //一年朔月日 - winter1 := jieqi[0] - 8.0/24 + tz //第一年冬至日 - winter2 := jieqi[24] - 8.0/24 + tz //第二年冬至日 - for idx, v := range moon { - if tz != 8.0/24 { - v = v - 8.0/24 + tz - } - if v-math.Floor(v) > 0.5 { - moon[idx] = math.Floor(v) + 0.5 - } else { - moon[idx] = math.Floor(v) - 0.5 - } - } //置闰月为0点 - for idx, v := range jieqi { - if tz != 8.0/24 { - v = v - 8.0/24 + tz - } - if v-math.Floor(v) > 0.5 { - jieqi[idx] = math.Floor(v) + 0.5 - } else { - jieqi[idx] = math.Floor(v) - 0.5 - } - } //置节气为0点 - mooncount := 0 //年内朔望月计数 - var min, max int = 20, 0 //最大最小计数 - for i := 0; i < 15; i++ { - if moon[i] >= winter1 && moon[i] < winter2 { - if i <= min { - min = i - } - if i >= max { - max = i - } - mooncount++ - } - } - leapmonth := 20 - if mooncount == 13 { //存在闰月 - var j, i = 2, 0 - for i = min; i <= max; i++ { - if !(moon[i] <= jieqi[j] && moon[i+1] > jieqi[j]) { - break - } - j += 2 - } - leapmonth = i - min + 1 - } - i := 0 - for i = min - 1; i <= max; i++ { - if moon[i] > jde { - break - } - } - lmonth = i - min - var sleap bool = false - leap = false - if lmonth >= leapmonth { - sleap = true - } - if lmonth == leapmonth { - leap = true - } - if lmonth < 2 { - lmonth += 11 - } else { - lmonth-- - } - if sleap { - lmonth-- - } - if lmonth <= 0 { - lmonth += 12 - } - lday = int(jde-moon[i-1]) + 1 - strmonth := []string{"十", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "冬", "腊"} - strday := []string{"初", "十", "廿", "三"} - if leap { - result += "闰" - } - if lmonth == 1 { - result += "正月" - } else { - result += strmonth[lmonth] + "月" - } - if lday == 20 { - result += "二十" - } else if lday == 10 { - result += "初十" - } else { - result += strday[lday/10] + strmonth[lday%10] - } - return -} - -func GetSolar(year, month, day int, leap bool, tz float64) float64 { - if month < 11 { - year-- - } - jieqi := GetJieqiLoops(year, 25) //一年的节气 - moon := GetMoonLoops(float64(year), 17) //一年朔月日 - winter1 := jieqi[0] - 8.0/24 + tz //第一年冬至日 - winter2 := jieqi[24] - 8.0/24 + tz //第二年冬至日 - for idx, v := range moon { - if tz != 8.0/24 { - v = v - 8.0/24 + tz - } - if v-math.Floor(v) > 0.5 { - moon[idx] = math.Floor(v) + 0.5 - } else { - moon[idx] = math.Floor(v) - 0.5 - } - } //置闰月为0点 - for idx, v := range jieqi { - if tz != 8.0/24 { - v = v - 8.0/24 + tz - } - if v-math.Floor(v) > 0.5 { - jieqi[idx] = math.Floor(v) + 0.5 - } else { - jieqi[idx] = math.Floor(v) - 0.5 - } - } //置节气为0点 - mooncount := 0 //年内朔望月计数 - var min, max int = 20, 0 //最大最小计数 - for i := 0; i < 15; i++ { - if moon[i] >= winter1 && moon[i] < winter2 { - if i <= min { - min = i - } - if i >= max { - max = i - } - mooncount++ - } - } - leapmonth := 20 - if mooncount == 13 { //存在闰月 - var j, i = 2, 0 - for i = min; i <= max; i++ { - if !(moon[i] <= jieqi[j] && moon[i+1] > jieqi[j]) { - break - } - j += 2 - } - leapmonth = i - min + 1 - } - if leap { - month++ - } - if month > 10 { - month -= 11 - } else { - month++ - } - if month >= leapmonth && !leap { - month++ - } - jde := moon[min-1+month] + float64(day) - 1 - return jde -} - -// Date2JDE 日期转儒略日 -func Date2JDE(date time.Time) float64 { - day := float64(date.Day()) + float64(date.Hour())/24.0 + float64(date.Minute())/24.0/60.0 + float64(date.Second())/24.0/3600.0 + float64(date.Nanosecond())/1000000000.0/3600.0/24.0 - return JDECalc(date.Year(), int(date.Month()), day) -} diff --git a/vendor/github.com/starainrt/astro/basic/coordinate.go b/vendor/github.com/starainrt/astro/basic/coordinate.go deleted file mode 100644 index 8724616..0000000 --- a/vendor/github.com/starainrt/astro/basic/coordinate.go +++ /dev/null @@ -1,173 +0,0 @@ -package basic - -import ( - "math" - - . "github.com/starainrt/astro/tools" -) - -/* - * 坐标变换,黄道转赤道 - */ -func LoToRa(jde, lo, bo float64) float64 { - ra := math.Atan2(Sin(lo)*Cos(Sita(jde))-Tan(bo)*Sin(Sita(jde)), Cos(lo)) - ra = ra * 180 / math.Pi - if ra < 0 { - ra += 360 - } - return ra -} - -func BoToDec(jde, lo, bo float64) float64 { - dec := ArcSin(Sin(bo)*Cos(Sita(jde)) + Cos(bo)*Sin(Sita(jde))*Sin(lo)) - return dec -} - -func LoBoToRaDec(jde, lo, bo float64) (float64, float64) { - dec := ArcSin(Sin(bo)*Cos(Sita(jde)) + Cos(bo)*Sin(Sita(jde))*Sin(lo)) - ra := math.Atan2(Sin(lo)*Cos(Sita(jde))-Tan(bo)*Sin(Sita(jde)), Cos(lo)) - ra = ra * 180 / math.Pi - if ra < 0 { - ra += 360 - } - return ra, dec -} - -func RaDecToLoBo(jde, ra, dec float64) (float64, float64) { - //tan(λ) = (sin(α)*cos(ε) + tan(δ)*sin(ε)) / cos(α) - //sin(β)=sin(δ)*cos(ε)-cos(δ)*sin(ε)*sin(α) - sita := Sita(jde) - sinBo := Sin(dec)*Cos(sita) - Cos(dec)*Sin(sita)*Sin(ra) - lo := math.Atan2((Sin(ra)*Cos(sita) + Tan(dec)*Sin(sita)), Cos(ra)) - lo = Limit360(lo * 180 / math.Pi) - return lo, ArcSin(sinBo) -} - -func RaToLo(jde, ra, dec float64) float64 { - //tan(λ) = (sin(α)*cos(ε) + tan(δ)*sin(ε)) / cos(α) - //sin(β)=sin(δ)*cos(ε)-cos(δ)*sin(ε)*sin(α) - sita := Sita(jde) - lo := math.Atan2((Sin(ra)*Cos(sita) + Tan(dec)*Sin(sita)), Cos(ra)) - lo = Limit360(lo * 180 / math.Pi) - return lo -} - -func DecToBo(jde, ra, dec float64) float64 { - //tan(λ) = (sin(α)*cos(ε) + tan(δ)*sin(ε)) / cos(α) - //sin(β)=sin(δ)*cos(ε)-cos(δ)*sin(ε)*sin(α) - sita := Sita(jde) - sinBo := Sin(dec)*Cos(sita) - Cos(dec)*Sin(sita)*Sin(ra) - return ArcSin(sinBo) -} - -/* - * 赤道坐标岁差变换st end 为JDE时刻 - */ -func ZuoBiaoSuiCha(ra, dec, st, end float64) (float64, float64) { - t := (end - st) / 36525.0 - l := (2306.2181*t + 0.30188*t*t + 0.017998*t*t*t) / 3600 - z := (2306.2181*t + 1.09468*t*t + 0.018203*t*t*t) / 3600 - o := (2004.3109*t - 0.42665*t*t + 0.041833*t*t*t) / 3600 - A := Cos(dec) * Sin(ra+l) - B := Cos(o)*Cos(dec)*Cos(ra+l) - Sin(o)*Sin(dec) - C := Sin(o)*Cos(dec)*Cos(ra+l) + Cos(o)*Sin(dec) - ras := math.Atan2(A, B) - ras = ras * 180 / math.Pi - if ras < 0 { - ras += 360 - } - ra = ras + z - dec = ArcSin(C) - return ra, dec -} - -/* - * 地心坐标转站心坐标,参数分别为,地心赤经赤纬 纬度经度,jde,离地心位置au - */ -func pcosi(lat, h float64) float64 { - b := 6356.755 - a := 6378.14 - u := ArcTan(b / a * Tan(lat)) - //psin=b/a*Sin(u)+h/6378140*Sin(lat); - pcos := Cos(u) + h/6378140.0*Cos(lat) - return pcos -} -func psini(lat, h float64) float64 { - b := 6356.755 - a := 6378.14 - u := ArcTan(b / a * Tan(lat)) - psin := b/a*Sin(u) + h/6378140*Sin(lat) - //pcos=Cos(u)+h/6378140*Cos(lat); - return psin -} - -func ZhanXinRaDec(ra, dec, lat, lon, jd, au, h float64) (float64, float64) { - sinpi := Sin(0.0024427777777) / au - pcosi := pcosi(lat, h) - psini := psini(lat, h) - tH := Limit360(TD2UT(ApparentSiderealTime(jd), false)*15 + lon - ra) - nra := math.Atan2(-pcosi*sinpi*Sin(tH), (Cos(dec)-pcosi*sinpi*Cos(tH))) * 180 / math.Pi - - ndec := math.Atan2((Sin(dec)-psini*sinpi)*Cos(nra), (Cos(dec)-pcosi*sinpi*Cos(tH))) * 180 / math.Pi - return ra + nra, ndec -} - -func ZhanXinRa(ra, dec, lat, lon, jd, au, h float64) float64 { //jd为格林尼治标准时 - sinpi := Sin(0.0024427777777) / au - pcosi := pcosi(lat, h) - tH := Limit360(TD2UT(ApparentSiderealTime(jd), false)*15 + lon - ra) - nra := math.Atan2(-pcosi*sinpi*Sin(tH), (Cos(dec)-pcosi*sinpi*Cos(tH))) * 180 / math.Pi - return ra + nra -} -func ZhanXinDec(ra, dec, lat, lon, jd, au, h float64) float64 { //jd为格林尼治标准时 - - sinpi := Sin(0.0024427777777) / au - pcosi := pcosi(lat, h) - psini := psini(lat, h) - tH := Limit360(TD2UT(ApparentSiderealTime(jd), false)*15 + lon - ra) - nra := math.Atan2(-pcosi*sinpi*Sin(tH), (Cos(dec)-pcosi*sinpi*Cos(tH))) * 180 / math.Pi - - ndec := math.Atan2((Sin(dec)-psini*sinpi)*Cos(nra), (Cos(dec)-pcosi*sinpi*Cos(tH))) * 180 / math.Pi - return ndec -} - -func ZhanXinLo(lo, bo, lat, lon, jd, au, h float64) float64 { //jd为格林尼治标准时 - C := pcosi(lat, h) - S := psini(lat, h) - sinpi := Sin(0.0024427777777) / au - ra := LoToRa(jd, lo, bo) - tH := Limit360(TD2UT(ApparentSiderealTime(jd), false)*15 + lon - ra) - N := Cos(lo)*Cos(bo) - C*sinpi*Cos(tH) - nlo := math.Atan2(Sin(lo)*Cos(bo)-sinpi*(S*Sin(Sita(jd))+C*Cos(Sita(jd))*Sin(tH)), N) * 180 / math.Pi - return nlo -} - -func ZhanXinBo(lo, bo, lat, lon, jd, au, h float64) float64 { //jd为格林尼治标准时 - C := pcosi(lat, h) - S := psini(lat, h) - sinpi := Sin(0.0024427777777) / au - ra := LoToRa(jd, lo, bo) - tH := Limit360(TD2UT(ApparentSiderealTime(jd), false)*15 + lon - ra) - N := Cos(lo)*Cos(bo) - C*sinpi*Cos(tH) - nlo := math.Atan2(Sin(lo)*Cos(bo)-sinpi*(S*Sin(Sita(jd))+C*Cos(Sita(jd))*Sin(tH)), N) * 180 / math.Pi - nbo := math.Atan2(Cos(nlo)*(Sin(bo)-sinpi*(S*Cos(Sita(jd))-C*Sin(Sita(jd))*Sin(tH))), N) * 180 / math.Pi - return nbo -} - -func GXCLo(lo, bo, jd float64) float64 { //光行差修正 - k := 20.49552 - sunlo := SunTrueLo(jd) - e := Earthe(jd) - epi := EarthPI(jd) - tmp := (-k*Cos(sunlo-lo) + e*k*Cos(epi-lo)) / Cos(bo) - return tmp -} - -func GXCBo(lo, bo, jd float64) float64 { - k := 20.49552 - sunlo := SunTrueLo(jd) - e := Earthe(jd) - epi := EarthPI(jd) - tmp := -k * Sin(bo) * (Sin(sunlo-lo) - e*Sin(epi-lo)) - return tmp -} diff --git a/vendor/github.com/starainrt/astro/basic/cst.go b/vendor/github.com/starainrt/astro/basic/cst.go deleted file mode 100644 index 4266337..0000000 --- a/vendor/github.com/starainrt/astro/basic/cst.go +++ /dev/null @@ -1,290 +0,0 @@ -package basic - -import ( - . "github.com/starainrt/astro/tools" -) - -type cst struct { - RA float64 //赤经 - DEC float64 //赤纬 -} - -var cstLists map[string][]cst - -func initCstData() { - cstLists = make(map[string][]cst, 89) - cstLists["AND"] = []cst{cst{344.46530375, 35.1682358}, cst{344.34285125, 53.1680298}, cst{351.45289375, 53.1870041}, cst{351.4656825, 50.6870193}, cst{355.27055708333, 50.6929131}, cst{355.27607875, 48.6929169}, cst{4.1463675, 48.6949348}, cst{4.14327875, 46.6949348}, cst{14.776077083333, 46.6757545}, cst{14.7888675, 48.6757393}, cst{18.588407916667, 48.6632690}, cst{18.60590375, 50.6632347}, cst{22.40793625, 50.6478767}, cst{26.96852375, 50.6257439}, cst{26.931439583333, 47.6258430}, cst{32.62149125, 47.5927505}, cst{32.67380125, 51.0925827}, cst{39.88547875, 51.0423737}, cst{39.67934125, 37.2931557}, cst{31.87109125, 37.3470840}, cst{31.854250416667, 35.5971375}, cst{22.910835, 35.6453362}, cst{22.89742625, 33.6453705}, cst{12.44306375, 33.6818962}, cst{12.41349125, 24.4319324}, cst{14.424064583333, 24.4266243}, cst{14.414815416667, 21.6766376}, cst{3.73992125, 21.6951923}, cst{3.7406445833333, 22.6951923}, cst{2.61001625, 22.6957588}, cst{2.6128425, 28.6957588}, cst{1.60621625, 28.6960354}, cst{1.6069770833333, 32.0293655}, cst{357.82874125, 32.0285034}, cst{357.8280825, 32.7785072}, cst{354.04915791667, 32.7746468}, cst{354.04417958333, 35.1913109}} - cstLists["ANT"] = []cst{cst{141.904335, -24.5425186}, cst{141.77159875, -37.2920151}, cst{141.73406125, -40.2918739}, cst{166.45650458333, -40.4246216}, cst{166.47936291667, -35.6746559}, cst{163.95851541667, -35.6664963}, cst{163.977885, -31.8332005}, cst{160.20137875, -31.8185863}, cst{160.21289375, -29.8186131}, cst{155.18132708333, -29.7947845}, cst{155.1993375, -27.1281624}, cst{147.65928291667, -27.0835037}, cst{147.67968125, -24.5835705}} - cstLists["APS"] = []cst{cst{209.11110875, -83.1200714}, cst{276.86599791667, -82.4582748}, cst{274.19506041667, -74.9745178}, cst{273.28007708333, -67.4800797}, cst{265.77572875, -67.5711060}, cst{258.2424825, -67.6610870}, cst{258.47067875, -70.1597443}, cst{224.16644125, -70.5115433}, cst{207.46087041667, -70.6244431}, cst{207.78143375, -75.6235962}} - cstLists["AQR"] = []cst{cst{309.59884625, 0.4361772}, cst{309.5798775, 2.4360874}, cst{314.08109708333, 2.4773185}, cst{321.58347125, 2.5393796}, cst{323.58427041667, 2.5544112}, cst{323.57874875, 3.3043909}, cst{326.58021875, 3.3256676}, cst{326.58708625, 2.3256910}, cst{331.588755, 2.3576119}, cst{331.58726708333, 2.6076074}, cst{342.84221708333, 2.6622071}, cst{342.8497125, 0.6622211}, cst{342.86470375, -3.3377509}, cst{359.10221125, -3.3042023}, cst{359.10329875, -6.3042021}, cst{359.11056458333, -24.8042011}, cst{346.68096625, -24.8250446}, cst{329.77028875, -24.9040413}, cst{329.6561625, -8.4043999}, cst{321.668415, -8.4602947}, cst{321.71645125, -14.4601107}, cst{309.74390125, -14.5631361}, cst{309.68464791667, -8.5634165}} - cstLists["AQL"] = []cst{cst{280.35020875, 0.1154895}, cst{280.3262325, 2.1153460}, cst{284.57642541667, 2.1659052}, cst{284.525985, 6.4156075}, cst{281.45856875, 6.3791943}, cst{281.388045, 12.1287737}, cst{284.45626208333, 12.1651964}, cst{284.37363625, 18.6647091}, cst{286.37549375, 18.6882229}, cst{286.4054775, 16.3550682}, cst{298.92116541667, 16.4957294}, cst{298.926, 16.0790844}, cst{303.5589975, 16.1275158}, cst{303.636675, 8.8779116}, cst{306.01395625, 8.9018240}, cst{306.07910125, 2.4021468}, cst{309.5798775, 2.4360874}, cst{309.59884625, 0.4361772}, cst{309.68464791667, -8.5634165}, cst{301.69369625, -8.6430750}, cst{301.72636958333, -11.6762342}, cst{284.74405375, -11.8664360}, cst{284.64729291667, -3.8336766}, cst{280.3981875, -3.8842230}} - cstLists["ARA"] = []cst{cst{249.03468125, -60.2644577}, cst{248.57062375, -45.7670517}, cst{269.80928375, -45.5163460}, cst{272.3090175, -45.4859734}, cst{272.67225291667, -56.9837723}, cst{265.16818958333, -57.0747757}, cst{265.77572875, -67.5711060}, cst{258.2424825, -67.6610870}, cst{255.72498291667, -67.6905823}, cst{255.5423925, -65.1916428}, cst{254.28351458333, -65.2062531}, cst{254.1951375, -63.7900925}, cst{251.67632125, -63.8189964}, cst{251.53784708333, -61.2364578}, cst{249.08163, -61.2641945}} - cstLists["ARI"] = []cst{cst{31.6652475, 10.5143948}, cst{26.65573375, 10.5432396}, cst{26.744674583333, 25.6263351}, cst{30.51371125, 25.6050701}, cst{30.53061625, 27.8550186}, cst{38.07014875, 27.8047638}, cst{38.10319375, 31.2213154}, cst{42.62838, 31.1865025}, cst{52.426667916667, 31.1003609}, cst{52.2906225, 19.4343338}, cst{51.037234583333, 19.4461136}, cst{50.94641125, 10.3632069}} - cstLists["AUR"] = []cst{cst{69.4869375, 30.9218750}, cst{69.57384125, 36.2547150}, cst{72.45734375, 36.2218513}, cst{72.840285, 52.7196465}, cst{77.484762083333, 52.6655540}, cst{77.606764583333, 56.1648331}, cst{94.13108875, 55.9658089}, cst{94.05736625, 53.9662552}, cst{100.04603125, 53.8938293}, cst{99.919459583333, 49.8945885}, cst{104.40635875, 49.8410034}, cst{104.26530291667, 44.3418388}, cst{112.73412458333, 44.2435493}, cst{112.56071875, 35.2445297}, cst{100.09027625, 35.3905640}, cst{99.965657916667, 27.8913116}, cst{90.22107125, 28.0092907}, cst{90.228902916667, 28.5092430}, cst{73.212475416667, 28.7124405}, cst{73.235342916667, 30.2123089}, cst{69.47678875, 30.2552605}} - cstLists["BOO"] = []cst{cst{227.78148625, 7.5253930}, cst{204.06384875, 7.3605771}, cst{204.02893041667, 14.3604937}, cst{203.95387208333, 27.8603134}, cst{210.7888275, 27.8976517}, cst{210.77085875, 30.1475964}, cst{211.88893375, 30.1545391}, cst{211.69873208333, 47.9039383}, cst{211.58439125, 54.9035759}, cst{217.25124875, 54.9422379}, cst{229.59105458333, 55.0448647}, cst{229.65737375, 52.5451736}, cst{237.08447375, 52.6174774}, cst{237.12458541667, 51.1176796}, cst{237.36542708333, 39.6189079}, cst{232.64365208333, 39.5721130}, cst{232.74697791667, 32.5726128}, cst{229.01591875, 32.5376778}, cst{229.09951625, 25.5380573}, cst{227.60549125, 25.5246105}} - cstLists["CAE"] = []cst{cst{65.0764125, -39.7007294}, cst{64.88238625, -48.6996651}, cst{68.362247916667, -48.7384491}, cst{68.42409625, -46.2387962}, cst{73.402082916667, -46.2959023}, cst{73.482370416667, -42.7963676}, cst{75.97444375, -42.8255501}, cst{76.2549375, -27.0772038}, cst{73.75929625, -27.0479794}, cst{71.76333125, -27.0248775}, cst{71.72241875, -29.7746429}, cst{69.97665125, -29.7546597}, cst{69.862375416667, -36.7540054}, cst{65.12985, -36.7010231}} - cstLists["CAM"] = []cst{cst{94.13108875, 55.9658089}, cst{77.606764583333, 56.1648331}, cst{77.484762083333, 52.6655540}, cst{72.840285, 52.7196465}, cst{52.31308625, 52.9366074}, cst{52.381900416667, 55.4362831}, cst{49.8540225, 55.4596519}, cst{49.91349625, 57.4593849}, cst{48.90093, 57.4684982}, cst{49.3954575, 68.4662857}, cst{54.237034583333, 68.4214401}, cst{55.30874875, 77.4163132}, cst{56.726209583333, 77.4025955}, cst{57.53049, 80.3986664}, cst{80.488894583333, 80.1478500}, cst{84.536117916667, 85.1239471}, cst{127.953615, 84.6103745}, cst{130.40275041667, 86.0975418}, cst{213.0229575, 85.9308090}, cst{216.78285625, 79.4449844}, cst{203.80918958333, 79.3629303}, cst{204.15701875, 76.3638153}, cst{195.8206125, 76.3289108}, cst{174.43479625, 76.3084106}, cst{174.53158375, 79.3083420}, cst{162.81859791667, 79.3401794}, cst{163.10541625, 81.3396072}, cst{142.191195, 81.4677658}, cst{140.61547375, 72.9741364}, cst{123.08622875, 73.1383743}, cst{122.12910125, 59.6433983}, cst{107.7531975, 59.8037262}, cst{107.8515525, 61.8031464}, cst{94.40745625, 61.9641266}} - cstLists["CNC"] = []cst{cst{140.40425875, 6.4700689}, cst{122.92139125, 6.6302376}, cst{120.54834291667, 6.6549850}, cst{120.5806725, 9.6548138}, cst{118.83248875, 9.6734257}, cst{118.87160541667, 13.1732168}, cst{118.94754458333, 19.6728077}, cst{120.07012375, 19.6608200}, cst{120.17164625, 27.6602821}, cst{121.91596958333, 27.6419144}, cst{121.99323125, 33.1415138}, cst{140.645985, 32.9691162}} - cstLists["CVN"] = []cst{cst{181.59450625, 33.3039627}, cst{181.59141625, 44.3039627}, cst{182.82643375, 44.3043365}, cst{182.8185225, 52.3043365}, cst{203.74239875, 52.3598061}, cst{203.79511375, 47.8599281}, cst{211.69873208333, 47.9039383}, cst{211.88893375, 30.1545391}, cst{210.77085875, 30.1475964}, cst{210.7888275, 27.8976517}, cst{203.95387208333, 27.8603134}, cst{200.22657458333, 27.8437748}, cst{200.20774791667, 31.3437366}, cst{186.55769375, 31.3074341}, cst{186.55426041667, 33.3074303}} - cstLists["CMA"] = []cst{cst{93.215625, -11.0301533}, cst{111.97339958333, -11.2521448}, cst{111.67719875, -33.2504692}, cst{99.903859583333, -33.1128159}, cst{92.899067916667, -33.0282326}, cst{92.99256625, -27.2787991}} - cstLists["CMI"] = []cst{cst{122.84900708333, -0.3693900}, cst{109.59966625, -0.2243290}, cst{109.61691875, 1.2755718}, cst{106.86739625, 1.3074419}, cst{106.91427458333, 5.3071680}, cst{106.66432208333, 5.3100886}, cst{106.71787958333, 9.8097754}, cst{106.7482275, 12.3095980}, cst{114.24100375, 12.2238722}, cst{114.2527275, 13.2238064}, cst{118.87160541667, 13.1732168}, cst{118.83248875, 9.6734257}, cst{120.5806725, 9.6548138}, cst{120.54834291667, 6.6549850}, cst{122.92139125, 6.6302376}} - cstLists["CAP"] = []cst{cst{309.68464791667, -8.5634165}, cst{301.69369625, -8.6430750}, cst{301.72636958333, -11.6762342}, cst{301.91596958333, -27.6419144}, cst{306.89795541667, -27.5913391}, cst{321.83163625, -27.4596672}, cst{321.80777541667, -24.9597607}, cst{329.77028875, -24.9040413}, cst{329.6561625, -8.4043999}, cst{321.668415, -8.4602947}, cst{321.71645125, -14.4601107}, cst{309.74390125, -14.5631361}} - cstLists["CAR"] = []cst{cst{170.15592125, -57.1843452}, cst{166.33725625, -57.1744423}, cst{133.32365541667, -56.9739723}, cst{133.38017375, -54.9742203}, cst{127.56711875, -54.9204712}, cst{127.60929125, -53.4206772}, cst{123.32011625, -53.3782196}, cst{123.38112875, -51.1285286}, cst{120.8616975, -51.1025848}, cst{90.748902083333, -50.7545471}, cst{90.693705, -52.5042114}, cst{93.19435375, -52.5345764}, cst{93.1074, -55.0340500}, cst{98.114275416667, -55.0945587}, cst{97.995077916667, -58.0938416}, cst{103.01111708333, -58.1537018}, cst{102.70331375, -64.1518784}, cst{136.09472708333, -64.4990387}, cst{135.24368708333, -75.4954681}, cst{169.85697291667, -75.6840134}, cst{170.08481125, -64.6842651}} - cstLists["CAS"] = []cst{cst{344.34285125, 53.1680298}, cst{344.30402708333, 56.9179611}, cst{344.26912375, 59.7512321}, cst{348.85966375, 59.7646751}, cst{348.81649041667, 63.6812897}, cst{355.21757125, 63.6928787}, cst{355.19785958333, 66.6928711}, cst{6.76376375, 66.6924438}, cst{6.92291375, 77.6923447}, cst{55.30874875, 77.4163132}, cst{54.237034583333, 68.4214401}, cst{49.3954575, 68.4662857}, cst{48.90093, 57.4684982}, cst{38.762337083333, 57.5513000}, cst{38.802355416667, 59.0511551}, cst{30.795625416667, 59.1046104}, cst{30.77362375, 58.1046753}, cst{27.5952225, 58.1227188}, cst{27.53364125, 54.6228828}, cst{22.45601375, 54.6477699}, cst{22.40793625, 50.6478767}, cst{18.60590375, 50.6632347}, cst{18.588407916667, 48.6632690}, cst{14.7888675, 48.6757393}, cst{14.776077083333, 46.6757545}, cst{4.14327875, 46.6949348}, cst{4.1463675, 48.6949348}, cst{355.27607875, 48.6929169}, cst{355.27055708333, 50.6929131}, cst{351.4656825, 50.6870193}, cst{351.45289375, 53.1870041}} - cstLists["CEN"] = []cst{cst{166.47936291667, -35.6746559}, cst{166.45650458333, -40.4246216}, cst{166.33725625, -57.1744423}, cst{170.15592125, -57.1843452}, cst{170.08481125, -64.6842651}, cst{179.05736375, -64.6957855}, cst{179.07076791667, -55.6957932}, cst{194.33451125, -55.6771049}, cst{194.43838041667, -64.6769638}, cst{204.68028625, -64.6379395}, cst{220.51497458333, -64.5390244}, cst{220.23446541667, -55.5400887}, cst{214.65681625, -55.5799522}, cst{214.45026458333, -42.5806465}, cst{225.79627958333, -42.4941750}, cst{225.63076958333, -29.9948788}, cst{190.41739958333, -30.1863899}, cst{190.42719875, -33.6863785}, cst{185.38743458333, -33.6938934}, cst{185.39029625, -35.6938896}} - cstLists["CEP"] = []cst{cst{300.5732625, 59.8510780}, cst{300.48520041667, 61.8506203}, cst{306.8118675, 61.9143791}, cst{306.51738125, 67.4129562}, cst{310.33401458333, 67.4490280}, cst{309.57304041667, 75.4455261}, cst{301.87339791667, 75.3708725}, cst{300.6738, 80.3647766}, cst{313.70587375, 80.4867859}, cst{308.72097, 86.4656219}, cst{308.33135541667, 86.6306305}, cst{343.51066625, 86.8368912}, cst{339.26098791667, 88.6638870}, cst{135.83247125, 87.5689163}, cst{130.40275041667, 86.0975418}, cst{127.953615, 84.6103745}, cst{84.536117916667, 85.1239471}, cst{80.488894583333, 80.1478500}, cst{57.53049, 80.3986664}, cst{56.726209583333, 77.4025955}, cst{55.30874875, 77.4163132}, cst{6.92291375, 77.6923447}, cst{6.76376375, 66.6924438}, cst{355.19785958333, 66.6928711}, cst{355.21757125, 63.6928787}, cst{348.81649041667, 63.6812897}, cst{348.85966375, 59.7646751}, cst{344.26912375, 59.7512321}, cst{344.30402708333, 56.9179611}, cst{335.91093, 56.8825760}, cst{335.93130125, 55.6326256}, cst{333.13762625, 55.6178436}, cst{333.17467625, 53.3679428}, cst{330.63921, 53.3532715}, cst{330.60218875, 55.4364891}, cst{309.83136125, 55.2753258}, cst{309.62379458333, 61.3576965}, cst{308.66080375, 61.3486443}, cst{308.71659291667, 59.9322395}} - cstLists["CET"] = []cst{cst{6.60132875, 0.6925398}, cst{6.6037875, 2.6925383}, cst{31.61526625, 2.5978806}, cst{31.6652475, 10.5143948}, cst{50.94641125, 10.3632069}, cst{50.85298375, 0.4469725}, cst{50.836682916667, -1.3029516}, cst{41.33922125, -1.2210265}, cst{41.14875875, -23.8536034}, cst{26.46599875, -23.7562580}, cst{26.45888875, -24.8729095}, cst{359.11056458333, -24.8042011}, cst{359.10329875, -6.3042021}, cst{6.5927025, -6.3074551}} - cstLists["CHA"] = []cst{cst{111.65211458333, -82.7758865}, cst{209.11110875, -83.1200714}, cst{207.78143375, -75.6235962}, cst{169.85697291667, -75.6840134}, cst{135.24368708333, -75.4954681}, cst{114.21470375, -75.2899170}} - cstLists["CIR"] = []cst{cst{204.68028625, -64.6379395}, cst{204.70747958333, -65.6378784}, cst{207.26802291667, -65.6249542}, cst{207.46087041667, -70.6244431}, cst{224.16644125, -70.5115433}, cst{224.00363375, -68.0122070}, cst{226.55712625, -67.9909286}, cst{226.35353541667, -64.0751266}, cst{230.16657875, -64.0415649}, cst{230.05456958333, -61.4587479}, cst{232.58976458333, -61.4353065}, cst{232.5498675, -60.4354935}, cst{232.38191125, -55.4362831}, cst{228.08351125, -55.4754944}, cst{220.23446541667, -55.5400887}, cst{220.51497458333, -64.5390244}} - cstLists["COL"] = []cst{cst{75.97444375, -42.8255501}, cst{76.2549375, -27.0772038}, cst{92.99256625, -27.2787991}, cst{92.899067916667, -33.0282326}, cst{99.903859583333, -33.1128159}, cst{99.70891625, -43.1116486}, cst{90.951777083333, -43.0057793}} - cstLists["COM"] = []cst{cst{179.60453541667, 13.3040485}, cst{179.60894125, 28.3040466}, cst{181.59566375, 28.3039627}, cst{181.59450625, 33.3039627}, cst{186.55426041667, 33.3074303}, cst{186.55769375, 31.3074341}, cst{200.20774791667, 31.3437366}, cst{200.22657458333, 27.8437748}, cst{203.95387208333, 27.8603134}, cst{204.02893041667, 14.3604937}, cst{194.05906625, 14.3225088}, cst{194.0620275, 13.3225126}} - cstLists["CRA"] = []cst{cst{269.62546375, -37.0174599}, cst{289.59631958333, -36.7785645}, cst{289.76964, -45.2775650}, cst{272.3090175, -45.4859734}, cst{269.80928375, -45.5163460}} - cstLists["CRB"] = []cst{cst{229.09951625, 25.5380573}, cst{229.01591875, 32.5376778}, cst{232.74697791667, 32.5726128}, cst{232.64365208333, 39.5721130}, cst{237.36542708333, 39.6189079}, cst{246.07194875, 39.7117195}, cst{246.2798025, 26.7128716}, cst{243.78670625, 26.6855240}, cst{243.8001825, 25.6855946}, cst{241.80573458333, 25.6641407}} - cstLists["CRV"] = []cst{cst{194.1330525, -11.6773882}, cst{179.09676, -11.6957970}, cst{179.09131041667, -25.1957951}, cst{190.404525, -25.1864014}, cst{190.3985025, -22.6864090}, cst{194.16687, -22.6773415}} - cstLists["CRT"] = []cst{cst{162.82713875, -6.6621790}, cst{162.80791375, -11.6621428}, cst{162.77554041667, -19.6620827}, cst{164.03058625, -19.6666222}, cst{164.00808291667, -25.1665821}, cst{179.09131041667, -25.1957951}, cst{179.09676, -11.6957970}, cst{179.09860625, -6.6957974}, cst{174.34229875, -6.6916924}} - cstLists["CRU"] = []cst{cst{179.07076791667, -55.6957932}, cst{179.05736375, -64.6957855}, cst{194.43838041667, -64.6769638}, cst{194.33451125, -55.6771049}} - cstLists["CYG"] = []cst{cst{290.13264625, 27.7324085}, cst{290.0952525, 30.2321968}, cst{291.5987775, 30.2493153}, cst{291.49260458333, 36.7487144}, cst{292.11965541667, 36.7558022}, cst{291.9835275, 43.7550354}, cst{288.47030708333, 43.7149391}, cst{288.37552041667, 47.7143936}, cst{287.1206475, 47.6998672}, cst{286.87645958333, 55.6984482}, cst{291.90459291667, 55.7560043}, cst{291.80955, 58.2554703}, cst{297.10055375, 58.3138733}, cst{297.03924125, 59.8135414}, cst{300.5732625, 59.8510780}, cst{308.71659291667, 59.9322395}, cst{308.66080375, 61.3486443}, cst{309.62379458333, 61.3576965}, cst{309.83136125, 55.2753258}, cst{330.60218875, 55.4364891}, cst{330.63921, 53.3532715}, cst{330.76266291667, 44.6036453}, cst{329.87860625, 44.5982513}, cst{329.88163958333, 44.3482628}, cst{329.37664041667, 44.3451195}, cst{329.4610125, 36.5953827}, cst{327.319965, 36.5815468}, cst{327.39518125, 28.5817947}, cst{322.62016375, 28.5480537}, cst{315.08391458333, 28.4871883}, cst{315.07258375, 29.4871387}, cst{296.25094375, 29.3010578}, cst{296.27220125, 27.8011742}} - cstLists["DEL"] = []cst{cst{309.5798775, 2.4360874}, cst{306.07910125, 2.4021468}, cst{306.01395625, 8.9018240}, cst{303.636675, 8.8779116}, cst{303.5589975, 16.1275158}, cst{305.18694875, 16.1439629}, cst{305.13404875, 20.8936996}, cst{309.89693708333, 20.9399471}, cst{309.907665, 19.9399967}, cst{317.17878291667, 20.0046406}, cst{317.24836375, 12.3382607}, cst{314.61859625, 12.3157644}, cst{314.67109625, 6.4826641}, cst{314.045505, 6.4771614}, cst{314.08109708333, 2.4773185}} - cstLists["DOR"] = []cst{cst{58.318787916667, -52.7968445}, cst{60.79789625, -52.8228111}, cst{60.69291875, -56.1555862}, cst{65.6504625, -56.2093849}, cst{65.55459, -58.7088547}, cst{69.274534583333, -58.7506638}, cst{68.79401875, -67.2479248}, cst{68.58152375, -69.7467194}, cst{98.454422916667, -70.1041336}, cst{98.93724875, -64.1070251}, cst{90.173642916667, -64.0010529}, cst{90.34506125, -61.0020981}, cst{82.85761375, -60.9112892}, cst{83.01880375, -57.4122620}, cst{75.547742916667, -57.3230400}, cst{75.6770175, -53.8238029}, cst{68.217745416667, -53.7376366}, cst{68.362247916667, -48.7384491}, cst{64.88238625, -48.6996651}, cst{62.149907916667, -48.6699715}, cst{62.098639583333, -50.6697006}, cst{58.37716625, -50.6304779}} - cstLists["DRA"] = []cst{cst{140.61547375, 72.9741364}, cst{142.191195, 81.4677658}, cst{163.10541625, 81.3396072}, cst{162.81859791667, 79.3401794}, cst{174.53158375, 79.3083420}, cst{174.43479625, 76.3084106}, cst{195.8206125, 76.3289108}, cst{196.09747375, 69.3293610}, cst{210.65081125, 69.3991165}, cst{210.82055541667, 65.3996506}, cst{235.32956541667, 65.6023483}, cst{235.05063, 69.6009445}, cst{247.8410625, 69.7383041}, cst{247.2207075, 74.7347870}, cst{261.53663708333, 74.9033127}, cst{260.21790458333, 79.8953476}, cst{267.65602041667, 79.9857483}, cst{261.72223041667, 85.9495697}, cst{308.72097, 86.4656219}, cst{313.70587375, 80.4867859}, cst{300.6738, 80.3647766}, cst{301.87339791667, 75.3708725}, cst{309.57304041667, 75.4455261}, cst{310.33401458333, 67.4490280}, cst{306.51738125, 67.4129562}, cst{306.8118675, 61.9143791}, cst{300.48520041667, 61.8506203}, cst{300.5732625, 59.8510780}, cst{297.03924125, 59.8135414}, cst{297.10055375, 58.3138733}, cst{291.80955, 58.2554703}, cst{291.90459291667, 55.7560043}, cst{286.87645958333, 55.6984482}, cst{287.1206475, 47.6998672}, cst{274.34237541667, 47.5476036}, cst{274.25768875, 50.5470886}, cst{255.7863525, 50.3244438}, cst{255.75682625, 51.3242683}, cst{237.12458541667, 51.1176796}, cst{237.08447375, 52.6174774}, cst{229.65737375, 52.5451736}, cst{229.59105458333, 55.0448647}, cst{217.25124875, 54.9422379}, cst{217.04525375, 62.4414825}, cst{203.57364125, 62.3593979}, cst{203.55053875, 63.3593445}, cst{181.58155958333, 63.3039627}, cst{181.57925541667, 65.8039627}, cst{171.84934625, 65.8126068}, cst{171.96136958333, 72.8125000}} - cstLists["EQU"] = []cst{cst{314.08109708333, 2.4773185}, cst{314.045505, 6.4771614}, cst{314.67109625, 6.4826641}, cst{314.61859625, 12.3157644}, cst{317.24836375, 12.3382607}, cst{318.25026458333, 12.3465548}, cst{318.244515, 13.0132008}, cst{321.50110208333, 13.0390635}, cst{321.58347125, 2.5393796}} - cstLists["ERI"] = []cst{cst{55.352905416667, 0.4037257}, cst{70.852360416667, 0.2375014}, cst{71.60231375, 0.2289162}, cst{71.55635875, -3.7708201}, cst{77.804395416667, -3.8437285}, cst{77.72003125, -10.8432293}, cst{75.22175125, -10.8138046}, cst{75.178714583333, -14.3135529}, cst{73.929797916667, -14.2989721}, cst{73.75929625, -27.0479794}, cst{71.76333125, -27.0248775}, cst{71.72241875, -29.7746429}, cst{69.97665125, -29.7546597}, cst{69.862375416667, -36.7540054}, cst{65.12985, -36.7010231}, cst{65.0764125, -39.7007294}, cst{59.105884583333, -39.6368256}, cst{59.031364583333, -43.6364403}, cst{52.3267725, -43.5694046}, cst{52.2890025, -45.5692215}, cst{46.09077125, -45.5124779}, cst{46.03451375, -48.5122337}, cst{41.08530875, -48.4710045}, cst{41.04769375, -50.4708595}, cst{37.34121, -50.4425697}, cst{37.28334625, -53.4423561}, cst{33.58414375, -53.4164696}, cst{33.489424583333, -57.9161568}, cst{21.20622875, -57.8484154}, cst{21.2732625, -52.8485603}, cst{24.967354583333, -52.8658562}, cst{24.9938475, -50.8659210}, cst{28.693257083333, -50.8859215}, cst{28.738322916667, -47.5527229}, cst{36.1529475, -47.6004944}, cst{36.26401375, -39.4342155}, cst{46.187260416667, -39.5128975}, cst{46.193322083333, -39.0962563}, cst{53.64428375, -39.1650963}, cst{53.699605416667, -35.5820351}, cst{57.430512083333, -35.6192436}, cst{57.58890125, -24.0033779}, cst{41.14875875, -23.8536034}, cst{41.33922125, -1.2210265}, cst{50.836682916667, -1.3029516}, cst{55.335582083333, -1.3461887}} - cstLists["FOR"] = []cst{cst{26.46599875, -23.7562580}, cst{41.14875875, -23.8536034}, cst{57.58890125, -24.0033779}, cst{57.430512083333, -35.6192436}, cst{53.699605416667, -35.5820351}, cst{53.64428375, -39.1650963}, cst{46.193322083333, -39.0962563}, cst{46.187260416667, -39.5128975}, cst{36.26401375, -39.4342155}, cst{26.350727916667, -39.3726234}, cst{26.45888875, -24.8729095}} - cstLists["GEM"] = []cst{cst{96.37276375, 11.9332972}, cst{96.4439175, 17.4328651}, cst{95.069575416667, 17.4495068}, cst{95.1241275, 21.4491768}, cst{90.125155416667, 21.5098724}, cst{90.1440375, 22.8430862}, cst{90.22107125, 28.0092907}, cst{99.965657916667, 27.8913116}, cst{100.09027625, 35.3905640}, cst{112.56071875, 35.2445297}, cst{118.28970875, 35.1810532}, cst{118.25808, 33.1812286}, cst{121.99323125, 33.1415138}, cst{121.91596958333, 27.6419144}, cst{120.17164625, 27.6602821}, cst{120.07012375, 19.6608200}, cst{118.94754458333, 19.6728077}, cst{118.87160541667, 13.1732168}, cst{114.2527275, 13.2238064}, cst{114.24100375, 12.2238722}, cst{106.7482275, 12.3095980}, cst{106.71787958333, 9.8097754}, cst{105.71845958333, 9.8214874}, cst{105.742815, 11.8213453}} - cstLists["GRU"] = []cst{cst{321.92805291667, -36.4592972}, cst{322.04232125, -44.9588585}, cst{322.11736625, -49.4585724}, cst{331.998825, -49.3911743}, cst{332.113695, -56.3908348}, cst{351.76852208333, -56.3126869}, cst{351.69270458333, -39.3127594}, cst{351.6833775, -36.3127670}, cst{346.72751375, -36.3249741}} - cstLists["HER"] = []cst{cst{245.558595, 3.7033811}, cst{242.80966791667, 3.6735139}, cst{242.67663, 15.6728001}, cst{240.18107375, 15.6463346}, cst{240.1110075, 21.6459675}, cst{241.85657541667, 21.6644115}, cst{241.80573458333, 25.6641407}, cst{243.8001825, 25.6855946}, cst{243.78670625, 26.6855240}, cst{246.2798025, 26.7128716}, cst{246.07194875, 39.7117195}, cst{237.36542708333, 39.6189079}, cst{237.12458541667, 51.1176796}, cst{255.75682625, 51.3242683}, cst{255.7863525, 50.3244438}, cst{274.25768875, 50.5470886}, cst{274.34237541667, 47.5476036}, cst{273.46687375, 47.5369873}, cst{273.82438625, 30.0391560}, cst{276.70077291667, 30.0739765}, cst{276.76288625, 26.0743504}, cst{284.2698675, 26.1640968}, cst{284.27716208333, 25.6641407}, cst{284.33913291667, 21.2478352}, cst{284.37363625, 18.6647091}, cst{284.45626208333, 12.1651964}, cst{281.388045, 12.1287737}, cst{275.20308458333, 12.0543308}, cst{275.17327375, 14.3874788}, cst{260.17687791667, 14.2060347}, cst{260.19584708333, 12.7061481}, cst{252.7014825, 12.6179380}, cst{252.80590958333, 3.7852108}} - cstLists["HOR"] = []cst{cst{65.0764125, -39.7007294}, cst{64.88238625, -48.6996651}, cst{62.149907916667, -48.6699715}, cst{62.098639583333, -50.6697006}, cst{58.37716625, -50.6304779}, cst{58.318787916667, -52.7968445}, cst{53.365002083333, -52.7470779}, cst{53.23681625, -57.0797844}, cst{48.79113125, -57.0377846}, cst{48.362689583333, -67.0358200}, cst{33.202360416667, -66.9151917}, cst{33.489424583333, -57.9161568}, cst{33.58414375, -53.4164696}, cst{37.28334625, -53.4423561}, cst{37.34121, -50.4425697}, cst{41.04769375, -50.4708595}, cst{41.08530875, -48.4710045}, cst{46.03451375, -48.5122337}, cst{46.09077125, -45.5124779}, cst{52.2890025, -45.5692215}, cst{52.3267725, -43.5694046}, cst{59.031364583333, -43.6364403}, cst{59.105884583333, -39.6368256}} - cstLists["HYA"] = []cst{cst{122.84900708333, -0.3693900}, cst{122.92139125, 6.6302376}, cst{140.40425875, 6.4700689}, cst{145.39841708333, 6.4327669}, cst{145.34890625, -0.5670585}, cst{145.27027208333, -11.5667810}, cst{162.80791375, -11.6621428}, cst{162.77554041667, -19.6620827}, cst{164.03058625, -19.6666222}, cst{164.00808291667, -25.1665821}, cst{179.09131041667, -25.1957951}, cst{190.404525, -25.1864014}, cst{190.3985025, -22.6864090}, cst{194.16687, -22.6773415}, cst{215.51309125, -22.5727749}, cst{215.53369041667, -25.0727024}, cst{225.57655375, -24.9951096}, cst{225.63076958333, -29.9948788}, cst{190.41739958333, -30.1863899}, cst{190.42719875, -33.6863785}, cst{185.38743458333, -33.6938934}, cst{185.39029625, -35.6938896}, cst{166.47936291667, -35.6746559}, cst{163.95851541667, -35.6664963}, cst{163.977885, -31.8332005}, cst{160.20137875, -31.8185863}, cst{160.21289375, -29.8186131}, cst{155.18132708333, -29.7947845}, cst{155.1993375, -27.1281624}, cst{147.65928291667, -27.0835037}, cst{147.67968125, -24.5835705}, cst{141.904335, -24.5425186}, cst{137.63677625, -24.5086308}, cst{137.68497, -19.5088310}, cst{130.1635125, -19.4423733}, cst{130.18434, -17.4424706}, cst{126.92709458333, -17.4112568}, cst{126.98977958333, -11.4115648}, cst{122.73417875, -11.3687992}} - cstLists["HYI"] = []cst{cst{68.79401875, -67.2479248}, cst{68.58152375, -69.7467194}, cst{67.957485, -74.7431641}, cst{52.075782083333, -74.5741272}, cst{50.091655416667, -82.0644531}, cst{1.53339125, -81.8039551}, cst{1.5662970833333, -74.3039627}, cst{12.3324375, -74.3185730}, cst{12.295414583333, -75.3185272}, cst{20.654050416667, -75.3472214}, cst{21.20622875, -57.8484154}, cst{33.489424583333, -57.9161568}, cst{33.202360416667, -66.9151917}, cst{48.362689583333, -67.0358200}} - cstLists["IND"] = []cst{cst{323.1847575, -74.4544678}, cst{351.99783291667, -74.3124619}, cst{351.86139125, -66.8125992}, cst{332.3985675, -66.8899918}, cst{332.113695, -56.3908348}, cst{331.998825, -49.3911743}, cst{322.11736625, -49.4585724}, cst{322.04232125, -44.9588585}, cst{307.169295, -45.0900002}, cst{307.45880125, -56.5885773}, cst{307.56480125, -59.5880547}, cst{322.34865125, -59.4576836}} - cstLists["LAC"] = []cst{cst{329.4610125, 36.5953827}, cst{329.37664041667, 44.3451195}, cst{329.88163958333, 44.3482628}, cst{329.87860625, 44.5982513}, cst{330.76266291667, 44.6036453}, cst{330.63921, 53.3532715}, cst{333.17467625, 53.3679428}, cst{333.13762625, 55.6178436}, cst{335.93130125, 55.6326256}, cst{335.91093, 56.8825760}, cst{344.30402708333, 56.9179611}, cst{344.34285125, 53.1680298}, cst{344.46530375, 35.1682358}, cst{343.70919291667, 35.1656151}, cst{343.70653208333, 35.6656113}, cst{331.35955791667, 35.6069336}, cst{331.35046041667, 36.6069069}} - cstLists["LEO"] = []cst{cst{162.8497125, -0.6622211}, cst{162.87601958333, 6.3377299}, cst{145.39841708333, 6.4327669}, cst{140.40425875, 6.4700689}, cst{140.645985, 32.9691162}, cst{150.08438541667, 32.9022789}, cst{150.04234375, 27.9024086}, cst{159.23840125, 27.8529167}, cst{159.2108775, 22.8529778}, cst{162.94253875, 22.8376045}, cst{162.95149375, 24.8375893}, cst{166.6809375, 24.8250446}, cst{166.69399791667, 28.3250256}, cst{179.60894125, 28.3040466}, cst{179.60453541667, 13.3040485}, cst{179.60373458333, 10.3040485}, cst{174.36568791667, 10.3082914}, cst{174.35052458333, -0.6916979}, cst{174.34229875, -6.6916924}, cst{162.82713875, -6.6621790}} - cstLists["LMI"] = []cst{cst{140.645985, 32.9691162}, cst{140.72163125, 39.2188187}, cst{145.6819725, 39.1817665}, cst{145.70923791667, 41.4316750}, cst{154.37822375, 41.3773613}, cst{154.3594125, 39.3774109}, cst{163.52316875, 39.3356133}, cst{163.48940875, 33.3356781}, cst{166.71422541667, 33.3249931}, cst{166.69399791667, 28.3250256}, cst{166.6809375, 24.8250446}, cst{162.95149375, 24.8375893}, cst{162.94253875, 22.8376045}, cst{159.2108775, 22.8529778}, cst{159.23840125, 27.8529167}, cst{150.04234375, 27.9024086}, cst{150.08438541667, 32.9022789}} - cstLists["LEP"] = []cst{cst{73.75929625, -27.0479794}, cst{76.2549375, -27.0772038}, cst{92.99256625, -27.2787991}, cst{93.215625, -11.0301533}, cst{88.965790416667, -10.9785318}, cst{77.72003125, -10.8432293}, cst{75.22175125, -10.8138046}, cst{75.178714583333, -14.3135529}, cst{73.929797916667, -14.2989721}} - cstLists["LIB"] = []cst{cst{227.85301208333, -0.4742887}, cst{221.6030925, -0.5269387}, cst{221.66710791667, -8.5266848}, cst{215.40850625, -8.5731344}, cst{215.51309125, -22.5727749}, cst{215.53369041667, -25.0727024}, cst{225.57655375, -24.9951096}, cst{225.63076958333, -29.9948788}, cst{236.92998, -29.8896160}, cst{236.81306375, -20.3902016}, cst{240.57177625, -20.3516178}, cst{240.43727875, -8.3523235}, cst{240.38695375, -3.6025870}, cst{227.88195125, -3.7241600}} - cstLists["LUP"] = []cst{cst{214.65681625, -55.5799522}, cst{220.23446541667, -55.5400887}, cst{228.08351125, -55.4754944}, cst{228.05671625, -54.4756165}, cst{232.35337208333, -54.4364166}, cst{232.20724625, -48.4371071}, cst{237.24728125, -48.3880234}, cst{237.12458541667, -42.3886375}, cst{242.15280625, -42.3366776}, cst{241.94769875, -29.8377628}, cst{236.92998, -29.8896160}, cst{225.63076958333, -29.9948788}, cst{225.79627958333, -42.4941750}, cst{214.45026458333, -42.5806465}} - cstLists["LYN"] = []cst{cst{112.56071875, 35.2445297}, cst{112.73412458333, 44.2435493}, cst{104.26530291667, 44.3418388}, cst{104.40635875, 49.8410034}, cst{99.919459583333, 49.8945885}, cst{100.04603125, 53.8938293}, cst{94.05736625, 53.9662552}, cst{94.13108875, 55.9658089}, cst{94.40745625, 61.9641266}, cst{107.8515525, 61.8031464}, cst{107.7531975, 59.8037262}, cst{122.12910125, 59.6433983}, cst{128.79913375, 59.5759888}, cst{128.44010375, 46.5777283}, cst{139.59071125, 46.4782791}, cst{139.51249041667, 41.4785957}, cst{145.70923791667, 41.4316750}, cst{145.6819725, 39.1817665}, cst{140.72163125, 39.2188187}, cst{140.645985, 32.9691162}, cst{121.99323125, 33.1415138}, cst{118.25808, 33.1812286}, cst{118.28970875, 35.1810532}} - cstLists["LYR"] = []cst{cst{284.27716208333, 25.6641407}, cst{284.2698675, 26.1640968}, cst{276.76288625, 26.0743504}, cst{276.70077291667, 30.0739765}, cst{273.82438625, 30.0391560}, cst{273.46687375, 47.5369873}, cst{274.34237541667, 47.5476036}, cst{287.1206475, 47.6998672}, cst{288.37552041667, 47.7143936}, cst{288.47030708333, 43.7149391}, cst{291.9835275, 43.7550354}, cst{292.11965541667, 36.7558022}, cst{291.49260458333, 36.7487144}, cst{291.5987775, 30.2493153}, cst{290.0952525, 30.2321968}, cst{290.13264625, 27.7324085}, cst{290.16131375, 25.7325745}} - cstLists["MEN"] = []cst{cst{109.01970875, -85.2614441}, cst{48.23292, -84.5553818}, cst{50.091655416667, -82.0644531}, cst{52.075782083333, -74.5741272}, cst{67.957485, -74.7431641}, cst{68.58152375, -69.7467194}, cst{98.454422916667, -70.1041336}, cst{97.770709583333, -75.1000366}, cst{114.21470375, -75.2899170}, cst{111.65211458333, -82.7758865}} - cstLists["MIC"] = []cst{cst{306.89795541667, -27.5913391}, cst{321.83163625, -27.4596672}, cst{321.92805291667, -36.4592972}, cst{322.04232125, -44.9588585}, cst{307.169295, -45.0900002}} - cstLists["MON"] = []cst{cst{95.225680416667, -0.0537102}, cst{95.34803125, 9.9455481}, cst{96.347665416667, 9.9334478}, cst{96.37276375, 11.9332972}, cst{105.742815, 11.8213453}, cst{105.71845958333, 9.8214874}, cst{106.71787958333, 9.8097754}, cst{106.66432208333, 5.3100886}, cst{106.91427458333, 5.3071680}, cst{106.86739625, 1.3074419}, cst{109.61691875, 1.2755718}, cst{109.59966625, -0.2243290}, cst{122.84900708333, -0.3693900}, cst{122.73417875, -11.3687992}, cst{111.97339958333, -11.2521448}, cst{93.215625, -11.0301533}, cst{88.965790416667, -10.9785318}, cst{89.052372083333, -3.9790573}, cst{95.177142083333, -4.0534163}} - cstLists["MUS"] = []cst{cst{170.08481125, -64.6842651}, cst{169.85697291667, -75.6840134}, cst{207.78143375, -75.6235962}, cst{207.46087041667, -70.6244431}, cst{207.26802291667, -65.6249542}, cst{204.70747958333, -65.6378784}, cst{204.68028625, -64.6379395}, cst{194.43838041667, -64.6769638}, cst{179.05736375, -64.6957855}} - cstLists["NOR"] = []cst{cst{232.5498675, -60.4354935}, cst{249.03468125, -60.2644577}, cst{248.57062375, -45.7670517}, cst{248.4947775, -42.2674789}, cst{242.15280625, -42.3366776}, cst{237.12458541667, -42.3886375}, cst{237.24728125, -48.3880234}, cst{232.20724625, -48.4371071}, cst{232.35337208333, -54.4364166}, cst{228.05671625, -54.4756165}, cst{228.08351125, -55.4754944}, cst{232.38191125, -55.4362831}} - cstLists["OCT"] = []cst{cst{0.80064625, -89.3039017}, cst{1.53339125, -81.8039551}, cst{50.091655416667, -82.0644531}, cst{48.23292, -84.5553818}, cst{109.01970875, -85.2614441}, cst{111.65211458333, -82.7758865}, cst{209.11110875, -83.1200714}, cst{276.86599791667, -82.4582748}, cst{274.19506041667, -74.9745178}, cst{323.1847575, -74.4544678}, cst{351.99783291667, -74.3124619}, cst{1.56630625, -74.3039627}, cst{0.80064625, -89.3039017}, cst{0.80065208333333, -89.3038940}} - cstLists["OPH"] = []cst{cst{245.6026275, -0.2963768}, cst{245.558595, 3.7033811}, cst{252.80590958333, 3.7852108}, cst{252.7014825, 12.6179380}, cst{260.19584708333, 12.7061481}, cst{260.17687791667, 14.2060347}, cst{275.17327375, 14.3874788}, cst{275.20308458333, 12.0543308}, cst{281.388045, 12.1287737}, cst{281.45856875, 6.3791943}, cst{275.27461041667, 6.3047633}, cst{275.29601125, 4.5548930}, cst{277.87113125, 4.5860157}, cst{277.88929958333, 3.0861249}, cst{275.31423625, 3.0550034}, cst{275.35059875, 0.0552235}, cst{269.10103791667, -0.0206471}, cst{269.14970375, -4.0203514}, cst{271.14967375, -3.9960551}, cst{271.22371625, -9.9956055}, cst{266.72375708333, -10.0502338}, cst{266.7447, -11.7167768}, cst{265.49440375, -11.7319136}, cst{265.47349041667, -10.0653696}, cst{259.22206958333, -10.1404381}, cst{259.29742791667, -16.1399899}, cst{265.80019041667, -16.0618820}, cst{266.00183541667, -30.0606632}, cst{253.23534875, -30.2123089}, cst{253.15567041667, -24.7960968}, cst{245.89144625, -24.8781185}, cst{245.82298375, -19.5451660}, cst{247.45067541667, -19.5271549}, cst{247.43823, -18.5272255}, cst{245.81068041667, -18.5452347}, cst{245.69120375, -8.2958899}, cst{240.43727875, -8.3523235}, cst{240.38695375, -3.6025870}, cst{245.63838875, -3.5461800}} - cstLists["ORI"] = []cst{cst{70.852360416667, 0.2375014}, cst{71.03402875, 15.7364635}, cst{76.28892625, 15.6755352}, cst{76.29527875, 16.1754990}, cst{81.7987125, 16.1101055}, cst{81.7922325, 15.6101446}, cst{85.79364625, 15.5619202}, cst{85.755057083333, 12.5621548}, cst{88.255369583333, 12.5318508}, cst{88.327167083333, 18.0314159}, cst{87.326982083333, 18.0435486}, cst{87.39379375, 22.8764725}, cst{90.1440375, 22.8430862}, cst{90.125155416667, 21.5098724}, cst{95.1241275, 21.4491768}, cst{95.069575416667, 17.4495068}, cst{96.4439175, 17.4328651}, cst{96.37276375, 11.9332972}, cst{96.347665416667, 9.9334478}, cst{95.34803125, 9.9455481}, cst{95.225680416667, -0.0537102}, cst{95.177142083333, -4.0534163}, cst{89.052372083333, -3.9790573}, cst{88.965790416667, -10.9785318}, cst{77.72003125, -10.8432293}, cst{77.804395416667, -3.8437285}, cst{71.55635875, -3.7708201}, cst{71.60231375, 0.2289162}} - cstLists["PAV"] = []cst{cst{274.19506041667, -74.9745178}, cst{323.1847575, -74.4544678}, cst{322.34865125, -59.4576836}, cst{307.56480125, -59.5880547}, cst{307.45880125, -56.5885773}, cst{272.67225291667, -56.9837723}, cst{265.16818958333, -57.0747757}, cst{265.77572875, -67.5711060}, cst{273.28007708333, -67.4800797}} - cstLists["PEG"] = []cst{cst{321.58347125, 2.5393796}, cst{321.50110208333, 13.0390635}, cst{318.244515, 13.0132008}, cst{318.25026458333, 12.3465548}, cst{317.24836375, 12.3382607}, cst{317.17878291667, 20.0046406}, cst{320.18840875, 20.0290813}, cst{320.15170041667, 24.0289364}, cst{322.66201958333, 24.0482101}, cst{322.62016375, 28.5480537}, cst{327.39518125, 28.5817947}, cst{327.319965, 36.5815468}, cst{329.4610125, 36.5953827}, cst{331.35046041667, 36.6069069}, cst{331.35955791667, 35.6069336}, cst{343.70653208333, 35.6656113}, cst{343.70919291667, 35.1656151}, cst{344.46530375, 35.1682358}, cst{354.04417958333, 35.1913109}, cst{354.04915791667, 32.7746468}, cst{357.8280825, 32.7785072}, cst{357.82874125, 32.0285034}, cst{1.6069770833333, 32.0293655}, cst{1.60621625, 28.6960354}, cst{2.6128425, 28.6957588}, cst{2.61001625, 22.6957588}, cst{3.7406445833333, 22.6951923}, cst{3.73992125, 21.6951923}, cst{3.7341179166667, 13.1951942}, cst{1.6031745833333, 13.1960354}, cst{1.6027304166667, 10.6960354}, cst{359.09711875, 10.6957970}, cst{359.09803375, 8.1957970}, cst{342.82141625, 8.1621685}, cst{342.84221708333, 2.6622071}, cst{331.58726708333, 2.6076074}, cst{331.588755, 2.3576119}, cst{326.58708625, 2.3256910}, cst{326.58021875, 3.3256676}, cst{323.57874875, 3.3043909}, cst{323.58427041667, 2.5544112}} - cstLists["PER"] = []cst{cst{42.62838, 31.1865025}, cst{42.666467916667, 34.5196762}, cst{40.402382916667, 34.5375137}, cst{40.43465875, 37.2873878}, cst{39.67934125, 37.2931557}, cst{39.88547875, 51.0423737}, cst{32.67380125, 51.0925827}, cst{32.62149125, 47.5927505}, cst{26.931439583333, 47.6258430}, cst{26.96852375, 50.6257439}, cst{22.40793625, 50.6478767}, cst{22.45601375, 54.6477699}, cst{27.53364125, 54.6228828}, cst{27.5952225, 58.1227188}, cst{30.77362375, 58.1046753}, cst{30.795625416667, 59.1046104}, cst{38.802355416667, 59.0511551}, cst{38.762337083333, 57.5513000}, cst{48.90093, 57.4684982}, cst{49.91349625, 57.4593849}, cst{49.8540225, 55.4596519}, cst{52.381900416667, 55.4362831}, cst{52.31308625, 52.9366074}, cst{72.840285, 52.7196465}, cst{72.45734375, 36.2218513}, cst{69.57384125, 36.2547150}, cst{69.4869375, 30.9218750}, cst{52.426667916667, 31.1003609}} - cstLists["PHE"] = []cst{cst{351.69270458333, -39.3127594}, cst{351.76852208333, -56.3126869}, cst{351.77839375, -57.8126793}, cst{21.20622875, -57.8484154}, cst{21.2732625, -52.8485603}, cst{24.967354583333, -52.8658562}, cst{24.9938475, -50.8659210}, cst{28.693257083333, -50.8859215}, cst{28.738322916667, -47.5527229}, cst{36.1529475, -47.6004944}, cst{36.26401375, -39.4342155}, cst{26.350727916667, -39.3726234}} - cstLists["PIC"] = []cst{cst{90.951777083333, -43.0057793}, cst{75.97444375, -42.8255501}, cst{73.482370416667, -42.7963676}, cst{73.402082916667, -46.2959023}, cst{68.42409625, -46.2387962}, cst{68.362247916667, -48.7384491}, cst{68.217745416667, -53.7376366}, cst{75.6770175, -53.8238029}, cst{75.547742916667, -57.3230400}, cst{83.01880375, -57.4122620}, cst{82.85761375, -60.9112892}, cst{90.34506125, -61.0020981}, cst{90.173642916667, -64.0010529}, cst{98.93724875, -64.1070251}, cst{102.70331375, -64.1518784}, cst{103.01111708333, -58.1537018}, cst{97.995077916667, -58.0938416}, cst{98.114275416667, -55.0945587}, cst{93.1074, -55.0340500}, cst{93.19435375, -52.5345764}, cst{90.693705, -52.5042114}, cst{90.748902083333, -50.7545471}} - cstLists["PSC"] = []cst{cst{342.8497125, 0.6622211}, cst{342.84221708333, 2.6622071}, cst{342.82141625, 8.1621685}, cst{359.09803375, 8.1957970}, cst{359.09711875, 10.6957970}, cst{1.6027304166667, 10.6960354}, cst{1.6031745833333, 13.1960354}, cst{3.7341179166667, 13.1951942}, cst{3.73992125, 21.6951923}, cst{14.414815416667, 21.6766376}, cst{14.424064583333, 24.4266243}, cst{12.41349125, 24.4319324}, cst{12.44306375, 33.6818962}, cst{22.89742625, 33.6453705}, cst{22.86642, 28.6454391}, cst{26.76471, 28.6262817}, cst{26.744674583333, 25.6263351}, cst{26.65573375, 10.5432396}, cst{31.6652475, 10.5143948}, cst{31.61526625, 2.5978806}, cst{6.6037875, 2.6925383}, cst{6.60132875, 0.6925398}, cst{6.5927025, -6.3074551}, cst{359.10329875, -6.3042021}, cst{359.10221125, -3.3042023}, cst{342.86470375, -3.3377509}} - cstLists["PSA"] = []cst{cst{346.68096625, -24.8250446}, cst{329.77028875, -24.9040413}, cst{321.80777541667, -24.9597607}, cst{321.83163625, -27.4596672}, cst{321.92805291667, -36.4592972}, cst{346.72751375, -36.3249741}} - cstLists["PUP"] = []cst{cst{111.97339958333, -11.2521448}, cst{111.67719875, -33.2504692}, cst{99.903859583333, -33.1128159}, cst{99.70891625, -43.1116486}, cst{90.951777083333, -43.0057793}, cst{90.748902083333, -50.7545471}, cst{120.8616975, -51.1025848}, cst{121.03827875, -43.3535042}, cst{126.57231291667, -43.4095192}, cst{126.67779875, -37.1600380}, cst{126.92709458333, -17.4112568}, cst{126.98977958333, -11.4115648}, cst{122.73417875, -11.3687992}} - cstLists["PYX"] = []cst{cst{126.92709458333, -17.4112568}, cst{130.18434, -17.4424706}, cst{130.1635125, -19.4423733}, cst{137.68497, -19.5088310}, cst{137.63677625, -24.5086308}, cst{141.904335, -24.5425186}, cst{141.77159875, -37.2920151}, cst{126.67779875, -37.1600380}} - cstLists["RET"] = []cst{cst{48.362689583333, -67.0358200}, cst{68.79401875, -67.2479248}, cst{69.274534583333, -58.7506638}, cst{65.55459, -58.7088547}, cst{65.6504625, -56.2093849}, cst{60.69291875, -56.1555862}, cst{60.79789625, -52.8228111}, cst{58.318787916667, -52.7968445}, cst{53.365002083333, -52.7470779}, cst{53.23681625, -57.0797844}, cst{48.79113125, -57.0377846}} - cstLists["SGE"] = []cst{cst{284.37363625, 18.6647091}, cst{284.33913291667, 21.2478352}, cst{290.09631125, 21.3148155}, cst{290.12128791667, 19.3982983}, cst{298.88568875, 19.4955387}, cst{298.860255, 21.5787334}, cst{305.12540875, 21.6436558}, cst{305.13404875, 20.8936996}, cst{305.18694875, 16.1439629}, cst{303.5589975, 16.1275158}, cst{298.926, 16.0790844}, cst{298.92116541667, 16.4957294}, cst{286.4054775, 16.3550682}, cst{286.37549375, 18.6882229}} - cstLists["SGR"] = []cst{cst{284.74405375, -11.8664360}, cst{284.79372, -15.8328123}, cst{275.54952625, -15.9435720}, cst{265.80019041667, -16.0618820}, cst{266.00183541667, -30.0606632}, cst{269.50281125, -30.0182076}, cst{269.62546375, -37.0174599}, cst{289.59631958333, -36.7785645}, cst{289.76964, -45.2775650}, cst{307.169295, -45.0900002}, cst{306.89795541667, -27.5913391}, cst{301.91596958333, -27.6419144}, cst{301.72636958333, -11.6762342}} - cstLists["SCO"] = []cst{cst{240.43727875, -8.3523235}, cst{245.69120375, -8.2958899}, cst{245.81068041667, -18.5452347}, cst{247.43823, -18.5272255}, cst{247.45067541667, -19.5271549}, cst{245.82298375, -19.5451660}, cst{245.89144625, -24.8781185}, cst{253.15567041667, -24.7960968}, cst{253.23534875, -30.2123089}, cst{266.00183541667, -30.0606632}, cst{269.50281125, -30.0182076}, cst{269.62546375, -37.0174599}, cst{269.80928375, -45.5163460}, cst{248.57062375, -45.7670517}, cst{248.4947775, -42.2674789}, cst{242.15280625, -42.3366776}, cst{241.94769875, -29.8377628}, cst{236.92998, -29.8896160}, cst{236.81306375, -20.3902016}, cst{240.57177625, -20.3516178}} - cstLists["SCL"] = []cst{cst{346.68096625, -24.8250446}, cst{359.11056458333, -24.8042011}, cst{26.45888875, -24.8729095}, cst{26.350727916667, -39.3726234}, cst{351.69270458333, -39.3127594}, cst{351.6833775, -36.3127670}, cst{346.72751375, -36.3249741}} - cstLists["SCT"] = []cst{cst{275.54952625, -15.9435720}, cst{284.79372, -15.8328123}, cst{284.74405375, -11.8664360}, cst{284.64729291667, -3.8336766}, cst{280.3981875, -3.8842230}, cst{275.3991225, -3.9444826}} - cstLists["SER1"] = []cst{cst{227.85301208333, -0.4742887}, cst{227.78148625, 7.5253930}, cst{227.60549125, 25.5246105}, cst{229.09951625, 25.5380573}, cst{241.80573458333, 25.6641407}, cst{241.85657541667, 21.6644115}, cst{240.1110075, 21.6459675}, cst{240.18107375, 15.6463346}, cst{242.67663, 15.6728001}, cst{242.80966791667, 3.6735139}, cst{245.558595, 3.7033811}, cst{245.6026275, -0.2963768}, cst{245.63838875, -3.5461800}, cst{240.38695375, -3.6025870}, cst{227.88195125, -3.7241600}} - cstLists["SER2"] = []cst{cst{275.35059875, 0.0552235}, cst{275.31423625, 3.0550034}, cst{277.93922375, 3.0867271}, cst{277.92105625, 4.5866175}, cst{275.29601125, 4.5548930}, cst{275.27461041667, 6.3047633}, cst{281.45856875, 6.3791943}, cst{284.525985, 6.4156075}, cst{284.57642541667, 2.1659052}, cst{280.3262325, 2.1153460}, cst{280.35020875, 0.1154895}, cst{280.3981875, -3.8842230}, cst{275.3991225, -3.9444826}, cst{275.54952625, -15.9435720}, cst{265.80019041667, -16.0618820}, cst{259.29742791667, -16.1399899}, cst{259.22206958333, -10.1404381}, cst{265.47349041667, -10.0653696}, cst{265.49440375, -11.7319136}, cst{266.7447, -11.7167768}, cst{266.72375708333, -10.0502338}, cst{271.22371625, -9.9956055}, cst{271.14967375, -3.9960551}, cst{269.14970375, -4.0203514}, cst{269.10103791667, -0.0206471}} - cstLists["SEX"] = []cst{cst{145.34890625, -0.5670585}, cst{145.39841708333, 6.4327669}, cst{162.87601958333, 6.3377299}, cst{162.8497125, -0.6622211}, cst{162.82713875, -6.6621790}, cst{162.80791375, -11.6621428}, cst{145.27027208333, -11.5667810}} - cstLists["TAU"] = []cst{cst{50.836682916667, -1.3029516}, cst{50.85298375, 0.4469725}, cst{50.94641125, 10.3632069}, cst{51.037234583333, 19.4461136}, cst{52.2906225, 19.4343338}, cst{52.426667916667, 31.1003609}, cst{69.4869375, 30.9218750}, cst{69.47678875, 30.2552605}, cst{73.235342916667, 30.2123089}, cst{73.212475416667, 28.7124405}, cst{90.228902916667, 28.5092430}, cst{90.22107125, 28.0092907}, cst{90.1440375, 22.8430862}, cst{87.39379375, 22.8764725}, cst{87.326982083333, 18.0435486}, cst{88.327167083333, 18.0314159}, cst{88.255369583333, 12.5318508}, cst{85.755057083333, 12.5621548}, cst{85.79364625, 15.5619202}, cst{81.7922325, 15.6101446}, cst{81.7987125, 16.1101055}, cst{76.29527875, 16.1754990}, cst{76.28892625, 15.6755352}, cst{71.03402875, 15.7364635}, cst{70.852360416667, 0.2375014}, cst{55.352905416667, 0.4037257}, cst{55.335582083333, -1.3461887}} - cstLists["TEL"] = []cst{cst{307.45880125, -56.5885773}, cst{307.169295, -45.0900002}, cst{289.76964, -45.2775650}, cst{272.3090175, -45.4859734}, cst{272.67225291667, -56.9837723}} - cstLists["TRI"] = []cst{cst{26.744674583333, 25.6263351}, cst{26.76471, 28.6262817}, cst{22.86642, 28.6454391}, cst{22.89742625, 33.6453705}, cst{22.910835, 35.6453362}, cst{31.854250416667, 35.5971375}, cst{31.87109125, 37.3470840}, cst{39.67934125, 37.2931557}, cst{40.43465875, 37.2873878}, cst{40.402382916667, 34.5375137}, cst{42.666467916667, 34.5196762}, cst{42.62838, 31.1865025}, cst{38.10319375, 31.2213154}, cst{38.07014875, 27.8047638}, cst{30.53061625, 27.8550186}, cst{30.51371125, 25.6050701}} - cstLists["TRA"] = []cst{cst{224.16644125, -70.5115433}, cst{224.00363375, -68.0122070}, cst{226.55712625, -67.9909286}, cst{226.35353541667, -64.0751266}, cst{230.16657875, -64.0415649}, cst{230.05456958333, -61.4587479}, cst{232.58976458333, -61.4353065}, cst{232.5498675, -60.4354935}, cst{249.03468125, -60.2644577}, cst{249.08163, -61.2641945}, cst{251.53784708333, -61.2364578}, cst{251.67632125, -63.8189964}, cst{254.1951375, -63.7900925}, cst{254.28351458333, -65.2062531}, cst{255.5423925, -65.1916428}, cst{255.72498291667, -67.6905823}, cst{258.2424825, -67.6610870}, cst{258.47067875, -70.1597443}} - cstLists["TUC"] = []cst{cst{351.99783291667, -74.3124619}, cst{1.5662970833333, -74.3039627}, cst{12.3324375, -74.3185730}, cst{12.295414583333, -75.3185272}, cst{20.654050416667, -75.3472214}, cst{21.20622875, -57.8484154}, cst{351.77839375, -57.8126793}, cst{351.76852208333, -56.3126869}, cst{332.113695, -56.3908348}, cst{332.3985675, -66.8899918}, cst{351.86139125, -66.8125992}} - cstLists["UMA"] = []cst{cst{145.70923791667, 41.4316750}, cst{139.51249041667, 41.4785957}, cst{139.59071125, 46.4782791}, cst{128.44010375, 46.5777283}, cst{128.79913375, 59.5759888}, cst{122.12910125, 59.6433983}, cst{123.08622875, 73.1383743}, cst{140.61547375, 72.9741364}, cst{171.96136958333, 72.8125000}, cst{171.84934625, 65.8126068}, cst{181.57925541667, 65.8039627}, cst{181.58155958333, 63.3039627}, cst{203.55053875, 63.3593445}, cst{203.57364125, 62.3593979}, cst{217.04525375, 62.4414825}, cst{217.25124875, 54.9422379}, cst{211.58439125, 54.9035759}, cst{211.69873208333, 47.9039383}, cst{203.79511375, 47.8599281}, cst{203.74239875, 52.3598061}, cst{182.8185225, 52.3043365}, cst{182.82643375, 44.3043365}, cst{181.59141625, 44.3039627}, cst{181.59450625, 33.3039627}, cst{181.59566375, 28.3039627}, cst{179.60894125, 28.3040466}, cst{166.69399791667, 28.3250256}, cst{166.71422541667, 33.3249931}, cst{163.48940875, 33.3356781}, cst{163.52316875, 39.3356133}, cst{154.3594125, 39.3774109}, cst{154.37822375, 41.3773613}} - cstLists["UMI"] = []cst{cst{195.8206125, 76.3289108}, cst{196.09747375, 69.3293610}, cst{210.65081125, 69.3991165}, cst{210.82055541667, 65.3996506}, cst{235.32956541667, 65.6023483}, cst{235.05063, 69.6009445}, cst{247.8410625, 69.7383041}, cst{247.2207075, 74.7347870}, cst{261.53663708333, 74.9033127}, cst{260.21790458333, 79.8953476}, cst{267.65602041667, 79.9857483}, cst{261.72223041667, 85.9495697}, cst{308.72097, 86.4656219}, cst{308.33135541667, 86.6306305}, cst{343.51066625, 86.8368912}, cst{339.26098791667, 88.6638870}, cst{135.83247125, 87.5689163}, cst{130.40275041667, 86.0975418}, cst{213.0229575, 85.9308090}, cst{216.78285625, 79.4449844}, cst{203.80918958333, 79.3629303}, cst{204.15701875, 76.3638153}} - cstLists["VEL"] = []cst{cst{166.33725625, -57.1744423}, cst{166.45650458333, -40.4246216}, cst{141.73406125, -40.2918739}, cst{141.77159875, -37.2920151}, cst{126.67779875, -37.1600380}, cst{126.57231291667, -43.4095192}, cst{121.03827875, -43.3535042}, cst{120.8616975, -51.1025848}, cst{123.38112875, -51.1285286}, cst{123.32011625, -53.3782196}, cst{127.60929125, -53.4206772}, cst{127.56711875, -54.9204712}, cst{133.38017375, -54.9742203}, cst{133.32365541667, -56.9739723}} - cstLists["VIR"] = []cst{cst{174.35052458333, -0.6916979}, cst{174.36568791667, 10.3082914}, cst{179.60373458333, 10.3040485}, cst{179.60453541667, 13.3040485}, cst{194.0620275, 13.3225126}, cst{194.05906625, 14.3225088}, cst{204.02893041667, 14.3604937}, cst{204.06384875, 7.3605771}, cst{227.78148625, 7.5253930}, cst{227.85301208333, -0.4742887}, cst{221.6030925, -0.5269387}, cst{221.66710791667, -8.5266848}, cst{215.40850625, -8.5731344}, cst{215.51309125, -22.5727749}, cst{194.16687, -22.6773415}, cst{194.1330525, -11.6773882}, cst{179.09676, -11.6957970}, cst{179.09860625, -6.6957974}, cst{174.34229875, -6.6916924}} - cstLists["VOL"] = []cst{cst{98.93724875, -64.1070251}, cst{98.454422916667, -70.1041336}, cst{97.770709583333, -75.1000366}, cst{114.21470375, -75.2899170}, cst{135.24368708333, -75.4954681}, cst{136.09472708333, -64.4990387}, cst{102.70331375, -64.1518784}} - cstLists["VUL"] = []cst{cst{284.33913291667, 21.2478352}, cst{284.27716208333, 25.6641407}, cst{290.16131375, 25.7325745}, cst{290.13264625, 27.7324085}, cst{296.27220125, 27.8011742}, cst{296.25094375, 29.3010578}, cst{315.07258375, 29.4871387}, cst{315.08391458333, 28.4871883}, cst{322.62016375, 28.5480537}, cst{322.66201958333, 24.0482101}, cst{320.15170041667, 24.0289364}, cst{320.18840875, 20.0290813}, cst{317.17878291667, 20.0046406}, cst{309.907665, 19.9399967}, cst{309.89693708333, 20.9399471}, cst{305.13404875, 20.8936996}, cst{305.12540875, 21.6436558}, cst{298.860255, 21.5787334}, cst{298.88568875, 19.4955387}, cst{290.12128791667, 19.3982983}, cst{290.09631125, 21.3148155}} - change := []string{"PSC", "TUC", "PHE", "SCL", "CET", "PEG", "AND", "CAS", "CEP"} - for _, v := range change { - for k, v2 := range cstLists[v] { - if v2.RA < 270 { - cstLists[v][k].RA = v2.RA + 360 - } - } - } -} - -//选定 RA=277.5 DEC=-40 - -func isCross(a, b, c, d cst) bool { - var ac, bc, ad, bd, ca, cb, da, db cst - var r1, r2 float64 - ac.RA = a.RA - c.RA - ac.DEC = a.DEC - c.DEC - ad.RA = a.RA - d.RA - ad.DEC = a.DEC - d.DEC - r1 = ac.RA*ad.DEC - ad.RA*ac.DEC - bc.RA = b.RA - c.RA - bc.DEC = b.DEC - c.DEC - bd.RA = b.RA - d.RA - bd.DEC = b.DEC - d.DEC - r2 = bc.RA*bd.DEC - bd.RA*bc.DEC - //echo r1.' '.r2; - if r1*r2 > 0 { - return false - } - ca.RA = c.RA - a.RA - ca.DEC = c.DEC - a.DEC - cb.RA = c.RA - b.RA - cb.DEC = c.DEC - b.DEC - r1 = ca.RA*cb.DEC - cb.RA*ca.DEC - da.RA = d.RA - a.RA - da.DEC = d.DEC - a.DEC - db.RA = d.RA - b.RA - db.DEC = d.DEC - b.DEC - r2 = da.RA*db.DEC - db.RA*da.DEC - if r1*r2 > 0 { - return false - } - return true -} - -func IsXZ(ra, dec, jde float64) string { - var nra, ndec float64 - if cstLists == nil || len(cstLists) == 0 { - initCstData() - } - nra = ra - if ra >= 360 { - nra -= 360 - } - nra, ndec = ZuoBiaoSuiCha(nra, dec, jde, 2451545.0) - if ra >= 360 && nra < 270 { - nra += 360 - } - for k, v := range cstLists { - var count int = 0 - for i := 0; i < len(v)-1; i++ { - if k == "UMI" || k == "OCT" { - continue - } - if i == 0 { - if isCross(cst{277.5, -100}, cst{nra, ndec}, v[len(v)-1], v[0]) { - count++ - } - } - if isCross(cst{277.5, -100}, cst{nra, ndec}, v[i], v[i+1]) { - count++ - } - if FR((nra-277.5)*(v[i].DEC+100)) == FR((v[i].RA-277.5)*(ndec+100)) { - count++ - } - } - if count%2 == 1 { - return k - } - } - if nra <= 270 { - ra = ra + 360 - return IsXZ(ra, dec, jde) - } - if ndec > 50 { - return "UMI" - } else if ndec < -50 { - return "OCT" - } - return "" -} - -func WhichCst(ra, dec, jde float64) string { - cst := make(map[string]string, 88) - cst["AND"] = "仙女座" - cst["ANT"] = "唧筒座" - cst["APS"] = "天燕座" - cst["AQR"] = "宝瓶座" - cst["AQL"] = "天鹰座" - cst["ARA"] = "天坛座" - cst["ARI"] = "白羊座" - cst["AUR"] = "御夫座" - cst["BOO"] = "牧夫座" - cst["CAE"] = "雕具座" - cst["CAM"] = "鹿豹座" - cst["CNC"] = "巨蟹座" - cst["CVN"] = "猎犬座" - cst["CMA"] = "大犬座" - cst["CMI"] = "小犬座" - cst["CAP"] = "摩羯座" - cst["CAR"] = "船底座" - cst["CAS"] = "仙后座" - cst["CEN"] = "半人马座" - cst["CEP"] = "仙王座" - cst["CET"] = "鲸鱼座" - cst["CHA"] = "蝘蜓座" - cst["CIR"] = "圆规座" - cst["COL"] = "天鸽座" - cst["COM"] = "后发座" - cst["CRA"] = "南冕座" - cst["CRB"] = "北冕座" - cst["CRV"] = "乌鸦座" - cst["CRT"] = "巨爵座" - cst["CRU"] = "南十字座" - cst["CYG"] = "天鹅座" - cst["DEL"] = "海豚座" - cst["DOR"] = "剑鱼座" - cst["DRA"] = "天龙座" - cst["EQU"] = "小马座" - cst["ERI"] = "波江座" - cst["FOR"] = "天炉座" - cst["GEM"] = "双子座" - cst["GRU"] = "天鹤座" - cst["HER"] = "武仙座" - cst["HOR"] = "时钟座" - cst["HYA"] = "长蛇座" - cst["HYI"] = "水蛇座" - cst["IND"] = "印第安座" - cst["LAC"] = "蝎虎座" - cst["LEO"] = "狮子座" - cst["LMI"] = "小狮座" - cst["LEP"] = "天兔座" - cst["LIB"] = "天秤座" - cst["LUP"] = "豺狼座" - cst["LYN"] = "天猫座" - cst["LYR"] = "天琴座" - cst["MEN"] = "山案座" - cst["MIC"] = "显微镜座" - cst["MON"] = "麒麟座" - cst["MUS"] = "苍蝇座" - cst["NOR"] = "矩尺座" - cst["OCT"] = "南极座" - cst["OPH"] = "蛇夫座" - cst["ORI"] = "猎户座" - cst["PAV"] = "孔雀座" - cst["PEG"] = "飞马座" - cst["PER"] = "英仙座" - cst["PHE"] = "凤凰座" - cst["PIC"] = "绘架座" - cst["PSC"] = "双鱼座" - cst["PSA"] = "南鱼座" - cst["PUP"] = "船尾座" - cst["PYX"] = "罗盘座" - cst["RET"] = "网罟座" - cst["SGE"] = "天箭座" - cst["SGR"] = "人马座" - cst["SCO"] = "天蝎座" - cst["SCL"] = "玉夫座" - cst["SCT"] = "盾牌座" - cst["SER1"] = "巨蛇座" - cst["SER2"] = "巨蛇座" - cst["SEX"] = "六分仪座" - cst["TAU"] = "金牛座" - cst["TEL"] = "望远镜座" - cst["TRI"] = "三角座" - cst["TRA"] = "南三角座" - cst["TUC"] = "杜鹃座" - cst["UMA"] = "大熊座" - cst["UMI"] = "小熊座" - cst["VEL"] = "船帆座" - cst["VIR"] = "室女座" - cst["VOL"] = "飞鱼座" - cst["VUL"] = "狐狸座" - mystar := IsXZ(ra, dec, jde) - return cst[mystar] -} diff --git a/vendor/github.com/starainrt/astro/basic/earth.go b/vendor/github.com/starainrt/astro/basic/earth.go deleted file mode 100644 index e402e0b..0000000 --- a/vendor/github.com/starainrt/astro/basic/earth.go +++ /dev/null @@ -1,49 +0,0 @@ -package basic - -import ( - . "github.com/starainrt/astro/tools" - "math" -) - -//地球常数 - -const ( - EARTH_EQUATORIAL_RADIUS float64 = 6378137.0 - EARTH_POLAR_RADIUS float64 = 6356752.3 - EARTH_AVERAGE_RADIUS float64 = 6371393.0 -) - -// HeightDistance 高度与地平线距离的关系(单位:米) -func HeightDistance(height float64) float64 { - return math.Acos((EARTH_AVERAGE_RADIUS)/(EARTH_AVERAGE_RADIUS+height)) * EARTH_AVERAGE_RADIUS -} - -// HeightDistance 高度(单位:米)与地平线下角度的关系(单位:度) -func HeightDegree(height float64) float64 { - return math.Acos((EARTH_AVERAGE_RADIUS)/(EARTH_AVERAGE_RADIUS+height)) * 180 / math.Pi / 2 -} - -// HeightDistanceByLat 不同纬度下高度与地平线距离的关系(单位:米) -func HeightDistanceByLat(height, lat float64) float64 { - raduis := GeocentricRadius(lat) - return math.Acos((raduis)/(raduis+height)) * raduis -} - -// HeightDegreeByLat 不同纬度下高度(单位:米)与地平线下角度的关系(单位:度) -func HeightDegreeByLat(height, lat float64) float64 { - raduis := GeocentricRadius(lat) - return math.Acos((raduis)/(raduis+height)) * 180 / math.Pi / 2 -} - -// GeocentricRadius 地心直径与纬度的关系 -func GeocentricRadius(lat float64) float64 { - a := (EARTH_EQUATORIAL_RADIUS * EARTH_EQUATORIAL_RADIUS * Cos(lat)) - a *= a - b := (EARTH_POLAR_RADIUS * EARTH_POLAR_RADIUS * Sin(lat)) - b *= b - c := (EARTH_EQUATORIAL_RADIUS * Cos(lat)) - c *= c - d := (EARTH_POLAR_RADIUS * Sin(lat)) - d *= d - return math.Sqrt((a + b) / (c + d)) -} diff --git a/vendor/github.com/starainrt/astro/basic/jupiter.go b/vendor/github.com/starainrt/astro/basic/jupiter.go deleted file mode 100644 index bd2ee8b..0000000 --- a/vendor/github.com/starainrt/astro/basic/jupiter.go +++ /dev/null @@ -1,437 +0,0 @@ -package basic - -import ( - "math" - - "github.com/starainrt/astro/planet" - . "github.com/starainrt/astro/tools" -) - -func JupiterL(JD float64) float64 { - return planet.WherePlanet(4, 0, JD) -} - -func JupiterB(JD float64) float64 { - return planet.WherePlanet(4, 1, JD) -} -func JupiterR(JD float64) float64 { - return planet.WherePlanet(4, 2, JD) -} -func AJupiterX(JD float64) float64 { - l := JupiterL(JD) - b := JupiterB(JD) - r := JupiterR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - return x -} - -func AJupiterY(JD float64) float64 { - - l := JupiterL(JD) - b := JupiterB(JD) - r := JupiterR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - return y -} -func AJupiterZ(JD float64) float64 { - //l := JupiterL(JD) - b := JupiterB(JD) - r := JupiterR(JD) - // el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - z := r*Sin(b) - er*Sin(eb) - return z -} - -func AJupiterXYZ(JD float64) (float64, float64, float64) { - l := JupiterL(JD) - b := JupiterB(JD) - r := JupiterR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - z := r*Sin(b) - er*Sin(eb) - return x, y, z -} - -func JupiterApparentRa(JD float64) float64 { - lo, bo := JupiterApparentLoBo(JD) - sita := Sita(JD) - ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo)) - ra = ra * 180 / math.Pi - return Limit360(ra) -} -func JupiterApparentDec(JD float64) float64 { - lo, bo := JupiterApparentLoBo(JD) - sita := Sita(JD) - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return dec -} - -func JupiterApparentRaDec(JD float64) (float64, float64) { - lo, bo := JupiterApparentLoBo(JD) - sita := Sita(JD) - ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo)) - ra = ra * 180 / math.Pi - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return Limit360(ra), dec -} - -func EarthJupiterAway(JD float64) float64 { - x, y, z := AJupiterXYZ(JD) - to := math.Sqrt(x*x + y*y + z*z) - return to -} - -func JupiterApparentLo(JD float64) float64 { - x, y, z := AJupiterXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AJupiterXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - lo += HJZD(JD) - return lo -} - -func JupiterApparentBo(JD float64) float64 { - x, y, z := AJupiterXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AJupiterXYZ(JD - to) - //lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - //lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - //lo+=GXCLo(lo,bo,JD); - //bo+=GXCBo(lo,bo,JD)/3600; - //lo+=HJZD(JD); - return bo -} - -func JupiterApparentLoBo(JD float64) (float64, float64) { - x, y, z := AJupiterXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AJupiterXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - lo += HJZD(JD) - return lo, bo -} - -func JupiterMag(JD float64) float64 { - AwaySun := JupiterR(JD) - AwayEarth := EarthJupiterAway(JD) - Away := planet.WherePlanet(-1, 2, JD) - i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth) - i = ArcCos(i) - Mag := -9.40 + 5*math.Log10(AwaySun*AwayEarth) + 0.0005*i - return FloatRound(Mag, 2) -} - -func JupiterHeight(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := JupiterApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 高度角、时角与天球座标三角转换公式 - // sin(h)=sin(lat)*sin(dec)+cos(dec)*cos(lat)*cos(H) - sinHeight := Sin(lat)*Sin(dec) + Cos(dec)*Cos(lat)*Cos(H) - return ArcSin(sinHeight) -} - -func JupiterAzimuth(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := JupiterApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 三角转换公式 - tanAzimuth := Sin(H) / (Cos(H)*Sin(lat) - Tan(dec)*Cos(lat)) - Azimuth := ArcTan(tanAzimuth) - if Azimuth < 0 { - if H/15 < 12 { - return Azimuth + 360 - } - return Azimuth + 180 - } - if H/15 < 12 { - return Azimuth + 180 - } - return Azimuth -} - -func JupiterHourAngle(JD, Lon, TZ float64) float64 { - startime := Limit360(ApparentSiderealTime(JD-TZ/24)*15 + Lon) - timeangle := startime - JupiterApparentRa(TD2UT(JD-TZ/24.0, true)) - if timeangle < 0 { - timeangle += 360 - } - return timeangle -} - -func JupiterCulminationTime(jde, lon, timezone float64) float64 { - //jde 世界时,非力学时,当地时区 0时,无需转换力学时 - //ra,dec 瞬时天球座标,非J2000等时间天球坐标 - jde = math.Floor(jde) + 0.5 - JD1 := jde + Limit360(360-JupiterHourAngle(jde, lon, timezone))/15.0/24.0*0.99726851851851851851 - limitHA := func(jde, lon, timezone float64) float64 { - ha := JupiterHourAngle(jde, lon, timezone) - if ha < 180 { - ha += 360 - } - return ha - } - for { - JD0 := JD1 - stDegree := limitHA(JD0, lon, timezone) - 360 - stDegreep := (limitHA(JD0+0.000005, lon, timezone) - limitHA(JD0-0.000005, lon, timezone)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func JupiterRiseTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return jupiterRiseDown(JD, Lon, Lat, TZ, ZS, HEI, true) -} - -func JupiterDownTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return jupiterRiseDown(JD, Lon, Lat, TZ, ZS, HEI, false) -} - -func jupiterRiseDown(JD, Lon, Lat, TZ, ZS, HEI float64, isRise bool) float64 { - var An float64 - JD = math.Floor(JD) + 0.5 - ntz := math.Round(Lon / 15) - if ZS != 0 { - An = -0.8333 - } - An = An - HeightDegreeByLat(HEI, Lat) - tztime := JupiterCulminationTime(JD, Lon, ntz) - if JupiterHeight(tztime, Lon, Lat, ntz) < An { - return -2 //极夜 - } - if JupiterHeight(tztime-0.5, Lon, Lat, ntz) > An { - return -1 //极昼 - } - dec := HSunApparentDec(TD2UT(tztime-ntz/24, true)) - //(sin(ho)-sin(φ)*sin(δ2))/(cos(φ)*cos(δ2)) - tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat)) - var rise float64 - if math.Abs(tmp) <= 1 { - rzsc := ArcCos(tmp) / 15 - if isRise { - rise = tztime - rzsc/24 - 25.0/24.0/60.0 - } else { - rise = tztime + rzsc/24 - 25.0/24.0/60.0 - } - } else { - rise = tztime - i := 0 - //TODO:使用二分法计算 - for JupiterHeight(rise, Lon, Lat, ntz) > An { - i++ - if isRise { - rise -= 15.0 / 60.0 / 24.0 - } else { - rise += 15.0 / 60.0 / 24.0 - } - if i > 48 { - break - } - } - } - JD1 := rise - for { - JD0 := JD1 - stDegree := JupiterHeight(JD0, Lon, Lat, ntz) - An - stDegreep := (JupiterHeight(JD0+0.000005, Lon, Lat, ntz) - JupiterHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 - ntz/24 + TZ/24 -} - -// Pos - -const JUPITER_S_PERIOD = 1 / ((1 / 365.256363004) - (1 / 4332.59)) - -func jupiterConjunction(jde, degree float64, next uint8) float64 { - //0=last 1=next - decSub := func(jde float64, degree float64, filter bool) float64 { - sub := Limit360(Limit360(JupiterApparentLo(jde)-HSunApparentLo(jde)) - degree) - if filter { - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - } - return sub - } - dayCost := JUPITER_S_PERIOD / 360 - nowSub := decSub(jde, degree, false) - if next == 0 { - jde -= (360 - nowSub) * dayCost - } else { - jde += dayCost * nowSub - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, degree, true) - stDegreep := (decSub(JD0+0.000005, degree, true) - decSub(JD0-0.000005, degree, true)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return TD2UT(JD1, false) -} - -func LastJupiterConjunction(jde float64) float64 { - return jupiterConjunction(jde, 0, 0) -} - -func NextJupiterConjunction(jde float64) float64 { - return jupiterConjunction(jde, 0, 1) -} - -func LastJupiterOpposition(jde float64) float64 { - return jupiterConjunction(jde, 180, 0) -} - -func NextJupiterOpposition(jde float64) float64 { - return jupiterConjunction(jde, 180, 1) -} - -func NextJupiterEasternQuadrature(jde float64) float64 { - return jupiterConjunction(jde, 90, 1) -} - -func LastJupiterEasternQuadrature(jde float64) float64 { - return jupiterConjunction(jde, 90, 0) -} - -func NextJupiterWesternQuadrature(jde float64) float64 { - return jupiterConjunction(jde, 270, 1) -} - -func LastJupiterWesternQuadrature(jde float64) float64 { - return jupiterConjunction(jde, 270, 0) -} - -func jupiterRetrograde(jde float64, isLeft bool) float64 { - //0=last 1=next - decSub := func(jde float64, val float64) float64 { - sub := JupiterApparentRa(jde+val) - JupiterApparentRa(jde-val) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub / (2 * val) - } - jde = NextJupiterOpposition(jde) - if isLeft { - jde -= 60 - } else { - jde += 60 - } - for { - nowSub := decSub(jde, 1.0/86400.0) - if math.Abs(nowSub) > 0.55 { - jde += 2 - continue - } - break - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, 2.0/86400.0) - stDegreep := (decSub(JD0+15.0/86400.0, 2.0/86400.0) - decSub(JD0-15.0/86400.0, 2.0/86400.0)) / (30.0 / 86400.0) - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 30.0/86400.0 { - break - } - } - JD1 = JD1 - 15.0/86400.0 - min := JD1 - minRa := 100.0 - for i := 0.0; i < 60.0; i++ { - tmp := decSub(JD1+i*0.5/86400.0, 0.5/86400.0) - if math.Abs(tmp) < math.Abs(minRa) { - minRa = tmp - min = JD1 + i*0.5/86400.0 - } - } - return TD2UT(min, false) -} - -func NextJupiterRetrogradeToPrograde(jde float64) float64 { - date := jupiterRetrograde(jde, false) - if date < jde { - op := NextJupiterOpposition(jde) - return jupiterRetrograde(op+10, false) - } - return date -} - -func LastJupiterRetrogradeToPrograde(jde float64) float64 { - jde = LastJupiterOpposition(jde) - 10 - date := jupiterRetrograde(jde, false) - if date > jde { - op := LastJupiterOpposition(jde) - return jupiterRetrograde(op-10, false) - } - return date -} - -func NextJupiterProgradeToRetrograde(jde float64) float64 { - date := jupiterRetrograde(jde, true) - if date < jde { - op := NextJupiterOpposition(jde) - return jupiterRetrograde(op+10, true) - } - return date -} - -func LastJupiterProgradeToRetrograde(jde float64) float64 { - jde = LastJupiterOpposition(jde) - 10 - date := jupiterRetrograde(jde, true) - if date > jde { - op := LastJupiterOpposition(jde) - return jupiterRetrograde(op-10, true) - } - return date -} diff --git a/vendor/github.com/starainrt/astro/basic/mars.go b/vendor/github.com/starainrt/astro/basic/mars.go deleted file mode 100644 index deeffff..0000000 --- a/vendor/github.com/starainrt/astro/basic/mars.go +++ /dev/null @@ -1,456 +0,0 @@ -package basic - -import ( - "math" - - "github.com/starainrt/astro/planet" - . "github.com/starainrt/astro/tools" -) - -func MarsL(JD float64) float64 { - return planet.WherePlanet(3, 0, JD) -} - -func MarsB(JD float64) float64 { - return planet.WherePlanet(3, 1, JD) -} -func MarsR(JD float64) float64 { - return planet.WherePlanet(3, 2, JD) -} -func AMarsX(JD float64) float64 { - l := MarsL(JD) - b := MarsB(JD) - r := MarsR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - return x -} - -func AMarsY(JD float64) float64 { - - l := MarsL(JD) - b := MarsB(JD) - r := MarsR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - return y -} -func AMarsZ(JD float64) float64 { - //l := MarsL(JD) - b := MarsB(JD) - r := MarsR(JD) - // el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - z := r*Sin(b) - er*Sin(eb) - return z -} - -func AMarsXYZ(JD float64) (float64, float64, float64) { - l := MarsL(JD) - b := MarsB(JD) - r := MarsR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - z := r*Sin(b) - er*Sin(eb) - return x, y, z -} - -func MarsApparentRa(JD float64) float64 { - lo, bo := MarsApparentLoBo(JD) - sita := Sita(JD) - ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo)) - ra = ra * 180 / math.Pi - return Limit360(ra) -} -func MarsApparentDec(JD float64) float64 { - lo, bo := MarsApparentLoBo(JD) - sita := Sita(JD) - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return dec -} - -func MarsApparentRaDec(JD float64) (float64, float64) { - lo, bo := MarsApparentLoBo(JD) - sita := Sita(JD) - ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo)) - ra = ra * 180 / math.Pi - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return Limit360(ra), dec -} - -func EarthMarsAway(JD float64) float64 { - x, y, z := AMarsXYZ(JD) - to := math.Sqrt(x*x + y*y + z*z) - return to -} - -func MarsApparentLo(JD float64) float64 { - x, y, z := AMarsXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AMarsXYZ(JD - to) - lo := math.Atan2(y, x) - //bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180.0 / math.Pi - //bo = bo * 180 / math.Pi - lo = Limit360(lo) + HJZD(JD) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - return lo -} - -func MarsApparentBo(JD float64) float64 { - x, y, z := AMarsXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AMarsXYZ(JD - to) - //lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - //lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - //lo+=GXCLo(lo,bo,JD); - //bo+=GXCBo(lo,bo,JD)/3600; - //lo+=HJZD(JD); - return bo -} - -func MarsApparentLoBo(JD float64) (float64, float64) { - x, y, z := AMarsXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AMarsXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - //lo -= GXCLo(lo, bo, JD) / 3600 - //bo += GXCBo(lo, bo, JD) - lo += HJZD(JD) - return lo, bo -} - -func MarsTrueLoBo(JD float64) (float64, float64) { - x, y, z := AMarsXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AMarsXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - return lo, bo -} - -func MarsTrueLo(JD float64) float64 { - x, y, _ := AMarsXYZ(JD) - lo := math.Atan2(y, x) - lo = lo * 180 / math.Pi - lo = Limit360(lo) - return lo -} - -func MarsMag(JD float64) float64 { - AwaySun := MarsR(JD) - AwayEarth := EarthMarsAway(JD) - Away := planet.WherePlanet(-1, 2, JD) - i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth) - i = ArcCos(i) - Mag := -1.52 + 5*math.Log10(AwaySun*AwayEarth) + 0.016*i - return FloatRound(Mag, 2) -} - -func MarsHeight(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := MarsApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 高度角、时角与天球座标三角转换公式 - // sin(h)=sin(lat)*sin(dec)+cos(dec)*cos(lat)*cos(H) - sinHeight := Sin(lat)*Sin(dec) + Cos(dec)*Cos(lat)*Cos(H) - return ArcSin(sinHeight) -} - -func MarsAzimuth(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := MarsApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 三角转换公式 - tanAzimuth := Sin(H) / (Cos(H)*Sin(lat) - Tan(dec)*Cos(lat)) - Azimuth := ArcTan(tanAzimuth) - if Azimuth < 0 { - if H/15 < 12 { - return Azimuth + 360 - } - return Azimuth + 180 - } - if H/15 < 12 { - return Azimuth + 180 - } - return Azimuth -} - -func MarsHourAngle(JD, Lon, TZ float64) float64 { - startime := Limit360(ApparentSiderealTime(JD-TZ/24)*15 + Lon) - timeangle := startime - MarsApparentRa(TD2UT(JD-TZ/24.0, true)) - if timeangle < 0 { - timeangle += 360 - } - return timeangle -} - -func MarsCulminationTime(jde, lon, timezone float64) float64 { - //jde 世界时,非力学时,当地时区 0时,无需转换力学时 - //ra,dec 瞬时天球座标,非J2000等时间天球坐标 - jde = math.Floor(jde) + 0.5 - JD1 := jde + Limit360(360-MarsHourAngle(jde, lon, timezone))/15.0/24.0*0.99726851851851851851 - limitHA := func(jde, lon, timezone float64) float64 { - ha := MarsHourAngle(jde, lon, timezone) - if ha < 180 { - ha += 360 - } - return ha - } - for { - JD0 := JD1 - stDegree := limitHA(JD0, lon, timezone) - 360 - stDegreep := (limitHA(JD0+0.000005, lon, timezone) - limitHA(JD0-0.000005, lon, timezone)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func MarsRiseTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return marsRiseDown(JD, Lon, Lat, TZ, ZS, HEI, true) -} - -func MarsDownTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return marsRiseDown(JD, Lon, Lat, TZ, ZS, HEI, false) -} - -func marsRiseDown(JD, Lon, Lat, TZ, ZS, HEI float64, isRise bool) float64 { - var An float64 - JD = math.Floor(JD) + 0.5 - ntz := math.Round(Lon / 15) - if ZS != 0 { - An = -0.8333 - } - An = An - HeightDegreeByLat(HEI, Lat) - tztime := MarsCulminationTime(JD, Lon, ntz) - if MarsHeight(tztime, Lon, Lat, ntz) < An { - return -2 //极夜 - } - if MarsHeight(tztime-0.5, Lon, Lat, ntz) > An { - return -1 //极昼 - } - dec := HSunApparentDec(TD2UT(tztime-ntz/24, true)) - //(sin(ho)-sin(φ)*sin(δ2))/(cos(φ)*cos(δ2)) - tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat)) - var rise float64 - if math.Abs(tmp) <= 1 { - rzsc := ArcCos(tmp) / 15 - if isRise { - rise = tztime - rzsc/24 - 25.0/24.0/60.0 - } else { - rise = tztime + rzsc/24 - 25.0/24.0/60.0 - } - } else { - rise = tztime - i := 0 - //TODO:使用二分法计算 - for MarsHeight(rise, Lon, Lat, ntz) > An { - i++ - if isRise { - rise -= 15.0 / 60.0 / 24.0 - } else { - rise += 15.0 / 60.0 / 24.0 - } - if i > 48 { - break - } - } - } - JD1 := rise - for { - JD0 := JD1 - stDegree := MarsHeight(JD0, Lon, Lat, ntz) - An - stDegreep := (MarsHeight(JD0+0.000005, Lon, Lat, ntz) - MarsHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 - ntz/24 + TZ/24 -} - -// Pos - -const MARS_S_PERIOD = 1 / ((1 / 365.256363004) - (1 / 686.98)) - -func marsConjunction(jde, degree float64, next uint8) float64 { - //0=last 1=next - decSub := func(jde float64, degree float64, filter bool) float64 { - sub := Limit360(Limit360(MarsApparentLo(jde)-HSunApparentLo(jde)) - degree) - if filter { - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - } - return sub - } - dayCost := MARS_S_PERIOD / 360 - nowSub := decSub(jde, degree, false) - if next == 0 { - jde -= (360 - nowSub) * dayCost - } else { - jde += dayCost * nowSub - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, degree, true) - stDegreep := (decSub(JD0+0.000005, degree, true) - decSub(JD0-0.000005, degree, true)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return TD2UT(JD1, false) -} - -func LastMarsConjunction(jde float64) float64 { - return marsConjunction(jde, 0, 0) -} - -func NextMarsConjunction(jde float64) float64 { - return marsConjunction(jde, 0, 1) -} - -func LastMarsOpposition(jde float64) float64 { - return marsConjunction(jde, 180, 0) -} - -func NextMarsOpposition(jde float64) float64 { - return marsConjunction(jde, 180, 1) -} - -func NextMarsEasternQuadrature(jde float64) float64 { - return marsConjunction(jde, 90, 1) -} - -func LastMarsEasternQuadrature(jde float64) float64 { - return marsConjunction(jde, 90, 0) -} - -func NextMarsWesternQuadrature(jde float64) float64 { - return marsConjunction(jde, 270, 1) -} - -func LastMarsWesternQuadrature(jde float64) float64 { - return marsConjunction(jde, 270, 0) -} - -func marsRetrograde(jde float64, isLeft bool) float64 { - //0=last 1=next - decSub := func(jde float64, val float64) float64 { - sub := MarsApparentRa(jde+val) - MarsApparentRa(jde-val) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub / (2 * val) - } - jde = NextMarsOpposition(jde) - if isLeft { - jde -= 60 - } else { - jde += 60 - } - for { - nowSub := decSub(jde, 1.0/86400.0) - if math.Abs(nowSub) > 0.55 { - jde += 2 - continue - } - break - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, 2.0/86400.0) - stDegreep := (decSub(JD0+15.0/86400.0, 2.0/86400.0) - decSub(JD0-15.0/86400.0, 2.0/86400.0)) / (30.0 / 86400.0) - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 30.0/86400.0 { - break - } - } - JD1 = JD1 - 15.0/86400.0 - min := JD1 - minRa := 100.0 - for i := 0.0; i < 60.0; i++ { - tmp := decSub(JD1+i*0.5/86400.0, 0.5/86400.0) - if math.Abs(tmp) < math.Abs(minRa) { - minRa = tmp - min = JD1 + i*0.5/86400.0 - } - } - return TD2UT(min, false) -} - -func NextMarsRetrogradeToPrograde(jde float64) float64 { - date := marsRetrograde(jde, false) - if date < jde { - op := NextMarsOpposition(jde) - return marsRetrograde(op+10, false) - } - return date -} - -func LastMarsRetrogradeToPrograde(jde float64) float64 { - jde = LastMarsOpposition(jde) - 10 - date := marsRetrograde(jde, false) - if date > jde { - op := LastMarsOpposition(jde) - return marsRetrograde(op-10, false) - } - return date -} - -func NextMarsProgradeToRetrograde(jde float64) float64 { - date := marsRetrograde(jde, true) - if date < jde { - op := NextMarsOpposition(jde) - return marsRetrograde(op+10, true) - } - return date -} - -func LastMarsProgradeToRetrograde(jde float64) float64 { - jde = LastMarsOpposition(jde) - 10 - date := marsRetrograde(jde, true) - if date > jde { - op := LastMarsOpposition(jde) - return marsRetrograde(op-10, true) - } - return date -} diff --git a/vendor/github.com/starainrt/astro/basic/mercury.go b/vendor/github.com/starainrt/astro/basic/mercury.go deleted file mode 100644 index 9f68324..0000000 --- a/vendor/github.com/starainrt/astro/basic/mercury.go +++ /dev/null @@ -1,608 +0,0 @@ -package basic - -import ( - "math" - - "github.com/starainrt/astro/planet" - . "github.com/starainrt/astro/tools" -) - -func MercuryL(JD float64) float64 { - return planet.WherePlanet(1, 0, JD) -} - -func MercuryB(JD float64) float64 { - return planet.WherePlanet(1, 1, JD) -} -func MercuryR(JD float64) float64 { - return planet.WherePlanet(1, 2, JD) -} -func AMercuryX(JD float64) float64 { - l := MercuryL(JD) - b := MercuryB(JD) - r := MercuryR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - return x -} - -func AMercuryY(JD float64) float64 { - - l := MercuryL(JD) - b := MercuryB(JD) - r := MercuryR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - return y -} -func AMercuryZ(JD float64) float64 { - //l := MercuryL(JD) - b := MercuryB(JD) - r := MercuryR(JD) - // el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - z := r*Sin(b) - er*Sin(eb) - return z -} - -func AMercuryXYZ(JD float64) (float64, float64, float64) { - l := MercuryL(JD) - b := MercuryB(JD) - r := MercuryR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - z := r*Sin(b) - er*Sin(eb) - return x, y, z -} - -func MercuryApparentRa(JD float64) float64 { - lo, bo := MercuryApparentLoBo(JD) - return LoToRa(JD, lo, bo) -} -func MercuryApparentDec(JD float64) float64 { - lo, bo := MercuryApparentLoBo(JD) - sita := Sita(JD) - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return dec -} - -func MercuryApparentRaDec(JD float64) (float64, float64) { - lo, bo := MercuryApparentLoBo(JD) - return LoBoToRaDec(JD, lo, bo) -} - -func EarthMercuryAway(JD float64) float64 { - x, y, z := AMercuryXYZ(JD) - to := math.Sqrt(x*x + y*y + z*z) - return to -} - -func MercuryApparentLo(JD float64) float64 { - x, y, z := AMercuryXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AMercuryXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - lo += HJZD(JD) - return lo -} - -func MercuryApparentBo(JD float64) float64 { - x, y, z := AMercuryXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AMercuryXYZ(JD - to) - //lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - //lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - //lo+=GXCLo(lo,bo,JD); - //bo+=GXCBo(lo,bo,JD)/3600; - //lo+=HJZD(JD); - return bo -} - -func MercuryApparentLoBo(JD float64) (float64, float64) { - x, y, z := AMercuryXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AMercuryXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) + HJZD(JD) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - return lo, bo -} - -func MercuryMag(JD float64) float64 { - AwaySun := MercuryR(JD) - AwayEarth := EarthMercuryAway(JD) - Away := planet.WherePlanet(-1, 2, JD) - i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth) - i = ArcCos(i) - Mag := -0.42 + 5*math.Log10(AwaySun*AwayEarth) + 0.0380*i - 0.000273*i*i + 0.000002*i*i*i - return FloatRound(Mag, 2) -} - -func MercuryHeight(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := MercuryApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 高度角、时角与天球座标三角转换公式 - // sin(h)=sin(lat)*sin(dec)+cos(dec)*cos(lat)*cos(H) - sinHeight := Sin(lat)*Sin(dec) + Cos(dec)*Cos(lat)*Cos(H) - return ArcSin(sinHeight) -} - -func MercuryAzimuth(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := MercuryApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 三角转换公式 - tanAzimuth := Sin(H) / (Cos(H)*Sin(lat) - Tan(dec)*Cos(lat)) - Azimuth := ArcTan(tanAzimuth) - if Azimuth < 0 { - if H/15 < 12 { - return Azimuth + 360 - } - return Azimuth + 180 - } - if H/15 < 12 { - return Azimuth + 180 - } - return Azimuth -} - -func MercuryHourAngle(JD, Lon, TZ float64) float64 { - startime := Limit360(ApparentSiderealTime(JD-TZ/24)*15 + Lon) - timeangle := startime - MercuryApparentRa(TD2UT(JD-TZ/24.0, true)) - if timeangle < 0 { - timeangle += 360 - } - return timeangle -} - -func MercuryCulminationTime(jde, lon, timezone float64) float64 { - //jde 世界时,非力学时,当地时区 0时,无需转换力学时 - //ra,dec 瞬时天球座标,非J2000等时间天球坐标 - jde = math.Floor(jde) + 0.5 - JD1 := jde + Limit360(360-MercuryHourAngle(jde, lon, timezone))/15.0/24.0*0.99726851851851851851 - limitHA := func(jde, lon, timezone float64) float64 { - ha := MercuryHourAngle(jde, lon, timezone) - if ha < 180 { - ha += 360 - } - return ha - } - for { - JD0 := JD1 - stDegree := limitHA(JD0, lon, timezone) - 360 - stDegreep := (limitHA(JD0+0.000005, lon, timezone) - limitHA(JD0-0.000005, lon, timezone)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func MercuryRiseTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return mercuryRiseDown(JD, Lon, Lat, TZ, ZS, HEI, true) -} - -func MercuryDownTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return mercuryRiseDown(JD, Lon, Lat, TZ, ZS, HEI, false) -} - -func mercuryRiseDown(JD, Lon, Lat, TZ, ZS, HEI float64, isRise bool) float64 { - var An float64 - JD = math.Floor(JD) + 0.5 - ntz := math.Round(Lon / 15) - if ZS != 0 { - An = -0.8333 - } - An = An - HeightDegreeByLat(HEI, Lat) - tztime := MercuryCulminationTime(JD, Lon, ntz) - if MercuryHeight(tztime, Lon, Lat, ntz) < An { - return -2 //极夜 - } - if MercuryHeight(tztime-0.5, Lon, Lat, ntz) > An { - return -1 //极昼 - } - dec := HSunApparentDec(TD2UT(tztime-ntz/24, true)) - //(sin(ho)-sin(φ)*sin(δ2))/(cos(φ)*cos(δ2)) - tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat)) - var rise float64 - if math.Abs(tmp) <= 1 { - rzsc := ArcCos(tmp) / 15 - if isRise { - rise = tztime - rzsc/24 - 25.0/24.0/60.0 - } else { - rise = tztime + rzsc/24 - 25.0/24.0/60.0 - } - } else { - rise = tztime - i := 0 - //TODO:使用二分法计算 - for MercuryHeight(rise, Lon, Lat, ntz) > An { - i++ - if isRise { - rise -= 15.0 / 60.0 / 24.0 - } else { - rise += 15.0 / 60.0 / 24.0 - } - if i > 48 { - break - } - } - } - JD1 := rise - for { - JD0 := JD1 - stDegree := MercuryHeight(JD0, Lon, Lat, ntz) - An - stDegreep := (MercuryHeight(JD0+0.000005, Lon, Lat, ntz) - MercuryHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 - ntz/24 + TZ/24 -} - -// Pos - -const MERCURY_S_PERIOD = 1 / ((1 / 87.9691) - (1 / 365.256363004)) - -func mercuryConjunction(jde float64, next uint8) float64 { - //0=last 1=next - decSub := func(jde float64) float64 { - sub := Limit360(MercuryApparentLo(jde) - HSunApparentLo(jde)) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub - } - nowSub := decSub(jde) - // pos 大于0:远离太阳 小于0:靠近太阳 - pos := math.Abs(decSub(jde+1/86400.0)) - math.Abs(nowSub) - if pos >= 0 && next == 1 && nowSub > 0 { - jde += MERCURY_S_PERIOD/8.0 + 2 - } - if pos >= 0 && next == 1 && nowSub < 0 { - jde += MERCURY_S_PERIOD/6.0 + 2 - } - if pos <= 0 && next == 0 && nowSub < 0 { - jde -= MERCURY_S_PERIOD/8.0 + 2 - } - if pos <= 0 && next == 0 && nowSub > 0 { - jde -= MERCURY_S_PERIOD/6.0 + 2 - } - for { - nowSub := decSub(jde) - pos := math.Abs(decSub(jde+1/86400.0)) - math.Abs(nowSub) - if math.Abs(nowSub) > 12 || (pos > 0 && next == 1) || (pos < 0 && next == 0) { - if next == 1 { - jde += 2 - } else { - jde -= 2 - } - continue - } - break - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0) - stDegreep := (decSub(JD0+0.000005) - decSub(JD0-0.000005)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return TD2UT(JD1, false) -} - -func LastMercuryConjunction(jde float64) float64 { - return mercuryConjunction(jde, 0) -} - -func NextMercuryConjunction(jde float64) float64 { - return mercuryConjunction(jde, 1) -} - -func NextMercuryInferiorConjunction(jde float64) float64 { - date := NextMercuryConjunction(jde) - if EarthMercuryAway(date) > EarthAway(date) { - return NextMercuryConjunction(date + 2) - } - return date -} - -func NextMercurySuperiorConjunction(jde float64) float64 { - date := NextMercuryConjunction(jde) - if EarthMercuryAway(date) < EarthAway(date) { - return NextMercuryConjunction(date + 2) - } - return date -} - -func LastMercuryInferiorConjunction(jde float64) float64 { - date := LastMercuryConjunction(jde) - if EarthMercuryAway(date) > EarthAway(date) { - return LastMercuryConjunction(date - 2) - } - return date -} - -func LastMercurySuperiorConjunction(jde float64) float64 { - date := LastMercuryConjunction(jde) - if EarthMercuryAway(date) < EarthAway(date) { - return LastMercuryConjunction(date - 2) - } - return date -} - -func mercuryRetrograde(jde float64) float64 { - //0=last 1=next - decSunSub := func(jde float64) float64 { - sub := Limit360(MercuryApparentRa(jde) - SunApparentRa(jde)) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub - } - decSub := func(jde float64, val float64) float64 { - sub := MercuryApparentRa(jde+val) - MercuryApparentRa(jde-val) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub / (2 * val) - } - lastHe := LastMercuryConjunction(jde) - nextHe := NextMercuryConjunction(jde) - nowSub := decSunSub(jde) - if nowSub > 0 { - jde = lastHe + ((nextHe - lastHe) / 5.0 * 3.5) - } else { - jde = lastHe + ((nextHe - lastHe) / 5.5) - } - for { - nowSub := decSub(jde, 1.0/86400.0) - if math.Abs(nowSub) > 0.55 { - jde += 2 - continue - } - break - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, 2.0/86400.0) - stDegreep := (decSub(JD0+15.0/86400.0, 2.0/86400.0) - decSub(JD0-15.0/86400.0, 2.0/86400.0)) / (30.0 / 86400.0) - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 30.0/86400.0 { - break - } - } - JD1 = JD1 - 15.0/86400.0 - min := JD1 - minRa := 100.0 - for i := 0.0; i < 60.0; i++ { - tmp := decSub(JD1+i*0.5/86400.0, 0.5/86400.0) - if math.Abs(tmp) < math.Abs(minRa) { - minRa = tmp - min = JD1 + i*0.5/86400.0 - } - } - //fmt.Println((min - lastHe) / (nextHe - lastHe)) - return TD2UT(min, false) -} - -func NextMercuryRetrograde(jde float64) float64 { - date := mercuryRetrograde(jde) - if date < jde { - nextHe := NextMercuryConjunction(jde) - return mercuryRetrograde(nextHe + 2) - } - return date -} - -func LastMercuryRetrograde(jde float64) float64 { - lastHe := LastMercuryConjunction(jde) - date := mercuryRetrograde(lastHe + 2) - if date > jde { - lastLastHe := LastMercuryConjunction(lastHe - 2) - return mercuryRetrograde(lastLastHe + 2) - } - return date -} - -func NextMercuryProgradeToRetrograde(jde float64) float64 { - date := NextMercuryRetrograde(jde) - sub := Limit360(MercuryApparentRa(date) - SunApparentRa(date)) - if sub > 180 { - return NextMercuryRetrograde(date + MERCURY_S_PERIOD/2) - } - return date -} - -func NextMercuryRetrogradeToPrograde(jde float64) float64 { - date := NextMercuryRetrograde(jde) - sub := Limit360(MercuryApparentRa(date) - SunApparentRa(date)) - if sub < 180 { - return NextMercuryRetrograde(date + 12) - } - return date -} - -func LastMercuryProgradeToRetrograde(jde float64) float64 { - date := LastMercuryRetrograde(jde) - sub := Limit360(MercuryApparentRa(date) - SunApparentRa(date)) - if sub > 180 { - return LastMercuryRetrograde(date - 12) - } - return date -} - -func LastMercuryRetrogradeToPrograde(jde float64) float64 { - date := LastMercuryRetrograde(jde) - sub := Limit360(MercuryApparentRa(date) - SunApparentRa(date)) - if sub < 180 { - return LastMercuryRetrograde(date - MERCURY_S_PERIOD/2) - } - return date -} - -func MercurySunElongation(jde float64) float64 { - lo1, bo1 := MercuryApparentLoBo(jde) - lo2 := SunApparentLo(jde) - bo2 := HSunTrueBo(jde) - return StarAngularSeparation(lo1, bo1, lo2, bo2) -} -func mercuryGreatestElongation(jde float64) float64 { - decSunSub := func(jde float64) float64 { - sub := Limit360(MercuryApparentRa(jde) - SunApparentRa(jde)) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub - } - decSub := func(jde float64, val float64) float64 { - sub := MercurySunElongation(jde+val) - MercurySunElongation(jde-val) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub / (2 * val) - } - lastHe := LastMercuryConjunction(jde) - nextHe := NextMercuryConjunction(jde) - nowSub := decSunSub(jde) - if nowSub > 0 { - jde = lastHe + ((nextHe - lastHe) / 5.0 * 2.0) - } else { - jde = lastHe + ((nextHe - lastHe) / 6.0) - } - for { - nowSub := decSub(jde, 1.0/86400.0) - if math.Abs(nowSub) > 0.4 { - jde += 2 - continue - } - break - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, 2.0/86400.0) - stDegreep := (decSub(JD0+15.0/86400.0, 2.0/86400.0) - decSub(JD0-15.0/86400.0, 2.0/86400.0)) / (30.0 / 86400.0) - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 30.0/86400.0 { - break - } - } - JD1 = JD1 - 15.0/86400.0 - min := JD1 - minRa := 100.0 - for i := 0.0; i < 60.0; i++ { - tmp := decSub(JD1+i*0.5/86400.0, 0.5/86400.0) - if math.Abs(tmp) < math.Abs(minRa) { - minRa = tmp - min = JD1 + i*0.5/86400.0 - } - } - //fmt.Println((min - lastHe) / (nextHe - lastHe)) - return TD2UT(min, false) -} - -func NextMercuryGreatestElongation(jde float64) float64 { - date := mercuryGreatestElongation(jde) - if date < jde { - nextHe := NextMercuryConjunction(jde) - return mercuryGreatestElongation(nextHe + 2) - } - return date -} - -func LastMercuryGreatestElongation(jde float64) float64 { - lastHe := LastMercuryConjunction(jde) - date := mercuryGreatestElongation(lastHe + 2) - if date > jde { - lastLastHe := LastMercuryConjunction(lastHe - 2) - return mercuryGreatestElongation(lastLastHe + 2) - } - return date -} - -func NextMercuryGreatestElongationEast(jde float64) float64 { - date := NextMercuryGreatestElongation(jde) - sub := Limit360(MercuryApparentRa(date) - SunApparentRa(date)) - if sub > 180 { - return NextMercuryGreatestElongation(date + 1) - } - return date -} - -func NextMercuryGreatestElongationWest(jde float64) float64 { - date := NextMercuryGreatestElongation(jde) - sub := Limit360(MercuryApparentRa(date) - SunApparentRa(date)) - if sub < 180 { - return NextMercuryGreatestElongation(date + 1) - } - return date -} - -func LastMercuryGreatestElongationEast(jde float64) float64 { - date := LastMercuryGreatestElongation(jde) - sub := Limit360(MercuryApparentRa(date) - SunApparentRa(date)) - if sub > 180 { - return LastMercuryGreatestElongation(date - 1) - } - return date -} - -func LastMercuryGreatestElongationWest(jde float64) float64 { - date := LastMercuryGreatestElongation(jde) - sub := Limit360(MercuryApparentRa(date) - SunApparentRa(date)) - if sub < 180 { - return LastMercuryGreatestElongation(date - 1) - } - return date -} diff --git a/vendor/github.com/starainrt/astro/basic/moon.go b/vendor/github.com/starainrt/astro/basic/moon.go deleted file mode 100644 index b527fda..0000000 --- a/vendor/github.com/starainrt/astro/basic/moon.go +++ /dev/null @@ -1,1740 +0,0 @@ -package basic - -import ( - "math" - - . "github.com/starainrt/astro/tools" -) - -func MoonLo(JD float64) float64 { //'月球平黄经 - T := (JD - 2451545) / 36525 - MoonLo := 218.3164591 + 481267.88134236*T - 0.0013268*T*T + T*T*T/538841 - T*T*T*T/65194000 - return MoonLo -} - -func SunMoonAngle(JD float64) float64 { // '月日距角 - // Dim T As Double - T := (JD - 2451545) / 36525 - SunMoonAngle := 297.8502042 + 445267.1115168*T - 0.00163*T*T + T*T*T/545868 - T*T*T*T/113065000 - return SunMoonAngle -} - -func MoonM(JD float64) float64 { // '月平近点角 - //Dim T As Double - T := (JD - 2451545) / 36525 - MoonM := 134.9634114 + 477198.8676313*T + 0.008997*T*T + T*T*T/69699 - T*T*T*T/14712000 - return MoonM -} - -func MoonLonX(JD float64) float64 { // As Double '月球经度参数(到升交点的平角距离) - //Dim T As Double - T := (JD - 2451545) / 36525 - MoonLonX := 93.2720993 + 483202.0175273*T - 0.0034029*T*T - T*T*T/3526000 + T*T*T*T/863310000 - return MoonLonX -} - -func MoonI(JD float64) float64 { - T := (JD - 2451545) / 36525 - D := Limit360(SunMoonAngle(JD)) - IsunM := SunM(JD) - IMoonM := MoonM(JD) - F := Limit360(MoonLonX(JD)) - E := 1 - 0.002516*T - 0.0000074*T*T - A1 := 119.75 + 131.849*T - A2 := Limit360(53.09 + 479264.29*T) - //A3 := Limit360(313.45 + 481266.484 * T); - //die(D." ".F." ".E); - Ifun := make(map[int]map[int]int) - for i := 1; i <= 60; i++ { - Ifun[i] = make(map[int]int) - } - Ifun[1][1] = 0 - Ifun[1][2] = 0 - Ifun[1][3] = 1 - Ifun[1][4] = 0 - Ifun[1][5] = 6288744 - Ifun[2][1] = 2 - Ifun[2][2] = 0 - Ifun[2][3] = -1 - Ifun[2][4] = 0 - Ifun[2][5] = 1274027 - Ifun[3][1] = 2 - Ifun[3][2] = 0 - Ifun[3][3] = 0 - Ifun[3][4] = 0 - Ifun[3][5] = 658314 - Ifun[4][1] = 0 - Ifun[4][2] = 0 - Ifun[4][3] = 2 - Ifun[4][4] = 0 - Ifun[4][5] = 213618 - Ifun[5][1] = 0 - Ifun[5][2] = 1 - Ifun[5][3] = 0 - Ifun[5][4] = 0 - Ifun[5][5] = -185116 - Ifun[6][1] = 0 - Ifun[6][2] = 0 - Ifun[6][3] = 0 - Ifun[6][4] = 2 - Ifun[6][5] = -114332 - Ifun[7][1] = 2 - Ifun[7][2] = 0 - Ifun[7][3] = -2 - Ifun[7][4] = 0 - Ifun[7][5] = 58793 - Ifun[8][1] = 2 - Ifun[8][2] = -1 - Ifun[8][3] = -1 - Ifun[8][4] = 0 - Ifun[8][5] = 57066 - Ifun[9][1] = 2 - Ifun[9][2] = 0 - Ifun[9][3] = 1 - Ifun[9][4] = 0 - Ifun[9][5] = 53322 - Ifun[10][1] = 2 - Ifun[10][2] = -1 - Ifun[10][3] = 0 - Ifun[10][4] = 0 - Ifun[10][5] = 45758 - Ifun[11][1] = 0 - Ifun[11][2] = 1 - Ifun[11][3] = -1 - Ifun[11][4] = 0 - Ifun[11][5] = -40923 - Ifun[12][1] = 1 - Ifun[12][2] = 0 - Ifun[12][3] = 0 - Ifun[12][4] = 0 - Ifun[12][5] = -34720 - Ifun[13][1] = 0 - Ifun[13][2] = 1 - Ifun[13][3] = 1 - Ifun[13][4] = 0 - Ifun[13][5] = -30383 - Ifun[14][1] = 2 - Ifun[14][2] = 0 - Ifun[14][3] = 0 - Ifun[14][4] = -2 - Ifun[14][5] = 15327 - Ifun[15][1] = 0 - Ifun[15][2] = 0 - Ifun[15][3] = 1 - Ifun[15][4] = 2 - Ifun[15][5] = -12528 - Ifun[16][1] = 0 - Ifun[16][2] = 0 - Ifun[16][3] = 1 - Ifun[16][4] = -2 - Ifun[16][5] = 10980 - Ifun[17][1] = 4 - Ifun[17][2] = 0 - Ifun[17][3] = -1 - Ifun[17][4] = 0 - Ifun[17][5] = 10675 - Ifun[18][1] = 0 - Ifun[18][2] = 0 - Ifun[18][3] = 3 - Ifun[18][4] = 0 - Ifun[18][5] = 10034 - Ifun[19][1] = 4 - Ifun[19][2] = 0 - Ifun[19][3] = -2 - Ifun[19][4] = 0 - Ifun[19][5] = 8548 - Ifun[20][1] = 2 - Ifun[20][2] = 1 - Ifun[20][3] = -1 - Ifun[20][4] = 0 - Ifun[20][5] = -7888 - Ifun[21][1] = 2 - Ifun[21][2] = 1 - Ifun[21][3] = 0 - Ifun[21][4] = 0 - Ifun[21][5] = -6766 - Ifun[22][1] = 1 - Ifun[22][2] = 0 - Ifun[22][3] = -1 - Ifun[22][4] = 0 - Ifun[22][5] = -5163 - Ifun[23][1] = 1 - Ifun[23][2] = 1 - Ifun[23][3] = 0 - Ifun[23][4] = 0 - Ifun[23][5] = 4987 - Ifun[24][1] = 2 - Ifun[24][2] = -1 - Ifun[24][3] = 1 - Ifun[24][4] = 0 - Ifun[24][5] = 4036 - Ifun[25][1] = 2 - Ifun[25][2] = 0 - Ifun[25][3] = 2 - Ifun[25][4] = 0 - Ifun[25][5] = 3994 - Ifun[26][1] = 4 - Ifun[26][2] = 0 - Ifun[26][3] = 0 - Ifun[26][4] = 0 - Ifun[26][5] = 3861 - Ifun[27][1] = 2 - Ifun[27][2] = 0 - Ifun[27][3] = -3 - Ifun[27][4] = 0 - Ifun[27][5] = 3665 - Ifun[28][1] = 0 - Ifun[28][2] = 1 - Ifun[28][3] = -2 - Ifun[28][4] = 0 - Ifun[28][5] = -2689 - Ifun[29][1] = 2 - Ifun[29][2] = 0 - Ifun[29][3] = -1 - Ifun[29][4] = 2 - Ifun[29][5] = -2602 - Ifun[30][1] = 2 - Ifun[30][2] = -1 - Ifun[30][3] = -2 - Ifun[30][4] = 0 - Ifun[30][5] = 2390 - Ifun[31][1] = 1 - Ifun[31][2] = 0 - Ifun[31][3] = 1 - Ifun[31][4] = 0 - Ifun[31][5] = -2348 - Ifun[32][1] = 2 - Ifun[32][2] = -2 - Ifun[32][3] = 0 - Ifun[32][4] = 0 - Ifun[32][5] = 2236 - Ifun[33][1] = 0 - Ifun[33][2] = 1 - Ifun[33][3] = 2 - Ifun[33][4] = 0 - Ifun[33][5] = -2120 - Ifun[34][1] = 0 - Ifun[34][2] = 2 - Ifun[34][3] = 0 - Ifun[34][4] = 0 - Ifun[34][5] = -2069 - Ifun[35][1] = 2 - Ifun[35][2] = -2 - Ifun[35][3] = -1 - Ifun[35][4] = 0 - Ifun[35][5] = 2048 - Ifun[36][1] = 2 - Ifun[36][2] = 0 - Ifun[36][3] = 1 - Ifun[36][4] = -2 - Ifun[36][5] = -1773 - Ifun[37][1] = 2 - Ifun[37][2] = 0 - Ifun[37][3] = 0 - Ifun[37][4] = 2 - Ifun[37][5] = -1595 - Ifun[38][1] = 4 - Ifun[38][2] = -1 - Ifun[38][3] = -1 - Ifun[38][4] = 0 - Ifun[38][5] = 1215 - Ifun[39][1] = 0 - Ifun[39][2] = 0 - Ifun[39][3] = 2 - Ifun[39][4] = 2 - Ifun[39][5] = -1110 - Ifun[40][1] = 3 - Ifun[40][2] = 0 - Ifun[40][3] = -1 - Ifun[40][4] = 0 - Ifun[40][5] = -892 - Ifun[41][1] = 2 - Ifun[41][2] = 1 - Ifun[41][3] = 1 - Ifun[41][4] = 0 - Ifun[41][5] = -810 - Ifun[42][1] = 4 - Ifun[42][2] = -1 - Ifun[42][3] = -2 - Ifun[42][4] = 0 - Ifun[42][5] = 759 - Ifun[43][1] = 0 - Ifun[43][2] = 2 - Ifun[43][3] = -1 - Ifun[43][4] = 0 - Ifun[43][5] = -713 - Ifun[44][1] = 2 - Ifun[44][2] = 2 - Ifun[44][3] = -1 - Ifun[44][4] = 0 - Ifun[44][5] = -700 - Ifun[45][1] = 2 - Ifun[45][2] = 1 - Ifun[45][3] = -2 - Ifun[45][4] = 0 - Ifun[45][5] = 691 - Ifun[46][1] = 2 - Ifun[46][2] = -1 - Ifun[46][3] = 0 - Ifun[46][4] = -2 - Ifun[46][5] = 596 - Ifun[47][1] = 4 - Ifun[47][2] = 0 - Ifun[47][3] = 1 - Ifun[47][4] = 0 - Ifun[47][5] = 549 - Ifun[48][1] = 0 - Ifun[48][2] = 0 - Ifun[48][3] = 4 - Ifun[48][4] = 0 - Ifun[48][5] = 537 - Ifun[49][1] = 4 - Ifun[49][2] = -1 - Ifun[49][3] = 0 - Ifun[49][4] = 0 - Ifun[49][5] = 520 - Ifun[50][1] = 1 - Ifun[50][2] = 0 - Ifun[50][3] = -2 - Ifun[50][4] = 0 - Ifun[50][5] = -487 - Ifun[51][1] = 2 - Ifun[51][2] = 1 - Ifun[51][3] = 0 - Ifun[51][4] = -2 - Ifun[51][5] = -399 - Ifun[52][1] = 0 - Ifun[52][2] = 0 - Ifun[52][3] = 2 - Ifun[52][4] = -2 - Ifun[52][5] = -381 - Ifun[53][1] = 1 - Ifun[53][2] = 1 - Ifun[53][3] = 1 - Ifun[53][4] = 0 - Ifun[53][5] = 351 - Ifun[54][1] = 3 - Ifun[54][2] = 0 - Ifun[54][3] = -2 - Ifun[54][4] = 0 - Ifun[54][5] = -340 - Ifun[55][1] = 4 - Ifun[55][2] = 0 - Ifun[55][3] = -3 - Ifun[55][4] = 0 - Ifun[55][5] = 330 - Ifun[56][1] = 2 - Ifun[56][2] = -1 - Ifun[56][3] = 2 - Ifun[56][4] = 0 - Ifun[56][5] = 327 - Ifun[57][1] = 0 - Ifun[57][2] = 2 - Ifun[57][3] = 1 - Ifun[57][4] = 0 - Ifun[57][5] = -323 - Ifun[58][1] = 1 - Ifun[58][2] = 1 - Ifun[58][3] = -1 - Ifun[58][4] = 0 - Ifun[58][5] = 299 - Ifun[59][1] = 2 - Ifun[59][2] = 0 - Ifun[59][3] = 3 - Ifun[59][4] = 0 - Ifun[59][5] = 294 - Ifun[60][1] = 2 - Ifun[60][2] = 0 - Ifun[60][3] = -1 - Ifun[60][4] = -2 - Ifun[60][5] = 0 - var MoonI float64 - var TEMP float64 - for i := 1; i < 61; i++ { - if Abs(Ifun[i][2]) == 1 { - TEMP = Sin(float64(Ifun[i][1])*D+float64(Ifun[i][2])*IsunM+float64(Ifun[i][3])*IMoonM+float64(Ifun[i][4])*F) * float64(Ifun[i][5]) * E - } else if Abs(Ifun[i][2]) == 2 { - TEMP = Sin(float64(Ifun[i][1])*D+float64(Ifun[i][2])*IsunM+float64(Ifun[i][3])*IMoonM+float64(Ifun[i][4])*F) * float64(Ifun[i][5]) * E * E - } else { - TEMP = Sin(float64(Ifun[i][1])*D+float64(Ifun[i][2])*IsunM+float64(Ifun[i][3])*IMoonM+float64(Ifun[i][4])*F) * float64(Ifun[i][5]) - } - MoonI = MoonI + TEMP - } - MoonI = MoonI + 3958*Sin(A1) + 1962*Sin(MoonLo(JD)-F) + 318*Sin(A2) - return FR(MoonI) -} - -func MoonR(JD float64) float64 { - T := (JD - 2451545) / 36525 - D := SunMoonAngle(JD) - IsunM := SunM(JD) - IMoonM := Limit360(MoonM(JD)) - F := Limit360(MoonLonX(JD)) - E := 1 - 0.002516*T - 0.0000074*T*T - Ifun := make(map[int]map[int]float64) - for i := 1; i <= 60; i++ { - Ifun[i] = make(map[int]float64) - } - Ifun[1][1] = 0 - Ifun[1][2] = 0 - Ifun[1][3] = 1 - Ifun[1][4] = 0 - Ifun[1][5] = -20905355 - Ifun[2][1] = 2 - Ifun[2][2] = 0 - Ifun[2][3] = -1 - Ifun[2][4] = 0 - Ifun[2][5] = -3699111 - Ifun[3][1] = 2 - Ifun[3][2] = 0 - Ifun[3][3] = 0 - Ifun[3][4] = 0 - Ifun[3][5] = -2955968 - Ifun[4][1] = 0 - Ifun[4][2] = 0 - Ifun[4][3] = 2 - Ifun[4][4] = 0 - Ifun[4][5] = -569925 - Ifun[5][1] = 0 - Ifun[5][2] = 1 - Ifun[5][3] = 0 - Ifun[5][4] = 0 - Ifun[5][5] = 48888 - Ifun[6][1] = 0 - Ifun[6][2] = 0 - Ifun[6][3] = 0 - Ifun[6][4] = 2 - Ifun[6][5] = -3149 - Ifun[7][1] = 2 - Ifun[7][2] = 0 - Ifun[7][3] = -2 - Ifun[7][4] = 0 - Ifun[7][5] = 246158 - Ifun[8][1] = 2 - Ifun[8][2] = -1 - Ifun[8][3] = -1 - Ifun[8][4] = 0 - Ifun[8][5] = -152138 - Ifun[9][1] = 2 - Ifun[9][2] = 0 - Ifun[9][3] = 1 - Ifun[9][4] = 0 - Ifun[9][5] = -170733 - Ifun[10][1] = 2 - Ifun[10][2] = -1 - Ifun[10][3] = 0 - Ifun[10][4] = 0 - Ifun[10][5] = -204586 - Ifun[11][1] = 0 - Ifun[11][2] = 1 - Ifun[11][3] = -1 - Ifun[11][4] = 0 - Ifun[11][5] = -129620 - Ifun[12][1] = 1 - Ifun[12][2] = 0 - Ifun[12][3] = 0 - Ifun[12][4] = 0 - Ifun[12][5] = 108743 - Ifun[13][1] = 0 - Ifun[13][2] = 1 - Ifun[13][3] = 1 - Ifun[13][4] = 0 - Ifun[13][5] = 104755 - Ifun[14][1] = 2 - Ifun[14][2] = 0 - Ifun[14][3] = 0 - Ifun[14][4] = -2 - Ifun[14][5] = 10321 - Ifun[15][1] = 0 - Ifun[15][2] = 0 - Ifun[15][3] = 1 - Ifun[15][4] = 2 - Ifun[15][5] = 0 - Ifun[16][1] = 0 - Ifun[16][2] = 0 - Ifun[16][3] = 1 - Ifun[16][4] = -2 - Ifun[16][5] = 79661 - Ifun[17][1] = 4 - Ifun[17][2] = 0 - Ifun[17][3] = -1 - Ifun[17][4] = 0 - Ifun[17][5] = -34782 - Ifun[18][1] = 0 - Ifun[18][2] = 0 - Ifun[18][3] = 3 - Ifun[18][4] = 0 - Ifun[18][5] = -23210 - Ifun[19][1] = 4 - Ifun[19][2] = 0 - Ifun[19][3] = -2 - Ifun[19][4] = 0 - Ifun[19][5] = -21636 - Ifun[20][1] = 2 - Ifun[20][2] = 1 - Ifun[20][3] = -1 - Ifun[20][4] = 0 - Ifun[20][5] = 24208 - Ifun[21][1] = 2 - Ifun[21][2] = 1 - Ifun[21][3] = 0 - Ifun[21][4] = 0 - Ifun[21][5] = 30824 - Ifun[22][1] = 1 - Ifun[22][2] = 0 - Ifun[22][3] = -1 - Ifun[22][4] = 0 - Ifun[22][5] = -8379 - Ifun[23][1] = 1 - Ifun[23][2] = 1 - Ifun[23][3] = 0 - Ifun[23][4] = 0 - Ifun[23][5] = -16675 - Ifun[24][1] = 2 - Ifun[24][2] = -1 - Ifun[24][3] = 1 - Ifun[24][4] = 0 - Ifun[24][5] = -12831 - Ifun[25][1] = 2 - Ifun[25][2] = 0 - Ifun[25][3] = 2 - Ifun[25][4] = 0 - Ifun[25][5] = -10445 - Ifun[26][1] = 4 - Ifun[26][2] = 0 - Ifun[26][3] = 0 - Ifun[26][4] = 0 - Ifun[26][5] = -11650 - Ifun[27][1] = 2 - Ifun[27][2] = 0 - Ifun[27][3] = -3 - Ifun[27][4] = 0 - Ifun[27][5] = 14403 - Ifun[28][1] = 0 - Ifun[28][2] = 1 - Ifun[28][3] = -2 - Ifun[28][4] = 0 - Ifun[28][5] = -7003 - Ifun[29][1] = 2 - Ifun[29][2] = 0 - Ifun[29][3] = -1 - Ifun[29][4] = 2 - Ifun[29][5] = 0 - Ifun[30][1] = 2 - Ifun[30][2] = -1 - Ifun[30][3] = -2 - Ifun[30][4] = 0 - Ifun[30][5] = 10056 - Ifun[31][1] = 1 - Ifun[31][2] = 0 - Ifun[31][3] = 1 - Ifun[31][4] = 0 - Ifun[31][5] = 6322 - Ifun[32][1] = 2 - Ifun[32][2] = -2 - Ifun[32][3] = 0 - Ifun[32][4] = 0 - Ifun[32][5] = -9884 - Ifun[33][1] = 0 - Ifun[33][2] = 1 - Ifun[33][3] = 2 - Ifun[33][4] = 0 - Ifun[33][5] = 5751 - Ifun[34][1] = 0 - Ifun[34][2] = 2 - Ifun[34][3] = 0 - Ifun[34][4] = 0 - Ifun[34][5] = 0 - Ifun[35][1] = 2 - Ifun[35][2] = -2 - Ifun[35][3] = -1 - Ifun[35][4] = 0 - Ifun[35][5] = -4950 - Ifun[36][1] = 2 - Ifun[36][2] = 0 - Ifun[36][3] = 1 - Ifun[36][4] = -2 - Ifun[36][5] = 4130 - Ifun[37][1] = 2 - Ifun[37][2] = 0 - Ifun[37][3] = 0 - Ifun[37][4] = 2 - Ifun[37][5] = 0 - Ifun[38][1] = 4 - Ifun[38][2] = -1 - Ifun[38][3] = -1 - Ifun[38][4] = 0 - Ifun[38][5] = -3958 - Ifun[39][1] = 0 - Ifun[39][2] = 0 - Ifun[39][3] = 2 - Ifun[39][4] = 2 - Ifun[39][5] = 0 - Ifun[40][1] = 3 - Ifun[40][2] = 0 - Ifun[40][3] = -1 - Ifun[40][4] = 0 - Ifun[40][5] = 3258 - Ifun[41][1] = 2 - Ifun[41][2] = 1 - Ifun[41][3] = 1 - Ifun[41][4] = 0 - Ifun[41][5] = 2616 - Ifun[42][1] = 4 - Ifun[42][2] = -1 - Ifun[42][3] = -2 - Ifun[42][4] = 0 - Ifun[42][5] = -1897 - Ifun[43][1] = 0 - Ifun[43][2] = 2 - Ifun[43][3] = -1 - Ifun[43][4] = 0 - Ifun[43][5] = -2117 - Ifun[44][1] = 2 - Ifun[44][2] = 2 - Ifun[44][3] = -1 - Ifun[44][4] = 0 - Ifun[44][5] = 2354 - Ifun[45][1] = 2 - Ifun[45][2] = 1 - Ifun[45][3] = -2 - Ifun[45][4] = 0 - Ifun[45][5] = 0 - Ifun[46][1] = 2 - Ifun[46][2] = -1 - Ifun[46][3] = 0 - Ifun[46][4] = -2 - Ifun[46][5] = 0 - Ifun[47][1] = 4 - Ifun[47][2] = 0 - Ifun[47][3] = 1 - Ifun[47][4] = 0 - Ifun[47][5] = -1423 - Ifun[48][1] = 0 - Ifun[48][2] = 0 - Ifun[48][3] = 4 - Ifun[48][4] = 0 - Ifun[48][5] = -1117 - Ifun[49][1] = 4 - Ifun[49][2] = -1 - Ifun[49][3] = 0 - Ifun[49][4] = 0 - Ifun[49][5] = -1571 - Ifun[50][1] = 1 - Ifun[50][2] = 0 - Ifun[50][3] = -2 - Ifun[50][4] = 0 - Ifun[50][5] = -1739 - Ifun[51][1] = 2 - Ifun[51][2] = 1 - Ifun[51][3] = 0 - Ifun[51][4] = -2 - Ifun[51][5] = 0 - Ifun[52][1] = 0 - Ifun[52][2] = 0 - Ifun[52][3] = 2 - Ifun[52][4] = -2 - Ifun[52][5] = -4421 - Ifun[53][1] = 1 - Ifun[53][2] = 1 - Ifun[53][3] = 1 - Ifun[53][4] = 0 - Ifun[53][5] = 0 - Ifun[54][1] = 3 - Ifun[54][2] = 0 - Ifun[54][3] = -2 - Ifun[54][4] = 0 - Ifun[54][5] = 0 - Ifun[55][1] = 4 - Ifun[55][2] = 0 - Ifun[55][3] = -3 - Ifun[55][4] = 0 - Ifun[55][5] = 0 - Ifun[56][1] = 2 - Ifun[56][2] = -1 - Ifun[56][3] = 2 - Ifun[56][4] = 0 - Ifun[56][5] = 0 - Ifun[57][1] = 0 - Ifun[57][2] = 2 - Ifun[57][3] = 1 - Ifun[57][4] = 0 - Ifun[57][5] = 1165 - Ifun[58][1] = 1 - Ifun[58][2] = 1 - Ifun[58][3] = -1 - Ifun[58][4] = 0 - Ifun[58][5] = 0 - Ifun[59][1] = 2 - Ifun[59][2] = 0 - Ifun[59][3] = 3 - Ifun[59][4] = 0 - Ifun[59][5] = 0 - Ifun[60][1] = 2 - Ifun[60][2] = 0 - Ifun[60][3] = -1 - Ifun[60][4] = -2 - Ifun[60][5] = 8752 - var MoonR, TEMP float64 = 0, 0 - for i := 1; i < 61; i++ { - if math.Abs(Ifun[i][2]) == float64(1) { - TEMP = Cos(Ifun[i][1]*D+Ifun[i][2]*IsunM+Ifun[i][3]*IMoonM+Ifun[i][4]*F) * Ifun[i][5] * E - } else if math.Abs(Ifun[i][2]) == float64(2) { - TEMP = Cos(Ifun[i][1]*D+Ifun[i][2]*IsunM+Ifun[i][3]*IMoonM+Ifun[i][4]*F) * Ifun[i][5] * E * E - } else { - TEMP = Cos(Ifun[i][1]*D+Ifun[i][2]*IsunM+Ifun[i][3]*IMoonM+Ifun[i][4]*F) * Ifun[i][5] - } - MoonR = MoonR + TEMP - } - return MoonR -} - -func MoonB(JD float64) float64 { - T := (JD - 2451545) / 36525 - D := Limit360(SunMoonAngle(JD)) - IsunM := Limit360(SunM(JD)) - IMoonM := Limit360(MoonM(JD)) - F := Limit360(MoonLonX(JD)) - E := 1 - 0.002516*T - 0.0000074*T*T - A1 := Limit360(119.75 + 131.849*T) - A3 := Limit360(313.45 + 481266.484*T) - Ifun := make(map[int]map[int]float64) - for i := 1; i <= 60; i++ { - Ifun[i] = make(map[int]float64) - } - //die(IsunM." ".IMoonM." ".A3); - Ifun[1][1] = 0 - Ifun[1][2] = 0 - Ifun[1][3] = 0 - Ifun[1][4] = 1 - Ifun[1][5] = 5128122 - Ifun[2][1] = 0 - Ifun[2][2] = 0 - Ifun[2][3] = 1 - Ifun[2][4] = 1 - Ifun[2][5] = 280602 - Ifun[3][1] = 0 - Ifun[3][2] = 0 - Ifun[3][3] = 1 - Ifun[3][4] = -1 - Ifun[3][5] = 277693 - Ifun[4][1] = 2 - Ifun[4][2] = 0 - Ifun[4][3] = 0 - Ifun[4][4] = -1 - Ifun[4][5] = 173237 - Ifun[5][1] = 2 - Ifun[5][2] = 0 - Ifun[5][3] = -1 - Ifun[5][4] = 1 - Ifun[5][5] = 55413 - Ifun[6][1] = 2 - Ifun[6][2] = 0 - Ifun[6][3] = -1 - Ifun[6][4] = -1 - Ifun[6][5] = 46271 - Ifun[7][1] = 2 - Ifun[7][2] = 0 - Ifun[7][3] = 0 - Ifun[7][4] = 1 - Ifun[7][5] = 32573 - Ifun[8][1] = 0 - Ifun[8][2] = 0 - Ifun[8][3] = 2 - Ifun[8][4] = 1 - Ifun[8][5] = 17198 - Ifun[9][1] = 2 - Ifun[9][2] = 0 - Ifun[9][3] = 1 - Ifun[9][4] = -1 - Ifun[9][5] = 9266 - Ifun[10][1] = 0 - Ifun[10][2] = 0 - Ifun[10][3] = 2 - Ifun[10][4] = -1 - Ifun[10][5] = 8822 - Ifun[11][1] = 2 - Ifun[11][2] = -1 - Ifun[11][3] = 0 - Ifun[11][4] = -1 - Ifun[11][5] = 8216 - Ifun[12][1] = 2 - Ifun[12][2] = 0 - Ifun[12][3] = -2 - Ifun[12][4] = -1 - Ifun[12][5] = 4324 - Ifun[13][1] = 2 - Ifun[13][2] = 0 - Ifun[13][3] = 1 - Ifun[13][4] = 1 - Ifun[13][5] = 4200 - Ifun[14][1] = 2 - Ifun[14][2] = 1 - Ifun[14][3] = 0 - Ifun[14][4] = -1 - Ifun[14][5] = -3359 - Ifun[15][1] = 2 - Ifun[15][2] = -1 - Ifun[15][3] = -1 - Ifun[15][4] = 1 - Ifun[15][5] = 2463 - Ifun[16][1] = 2 - Ifun[16][2] = -1 - Ifun[16][3] = 0 - Ifun[16][4] = 1 - Ifun[16][5] = 2211 - Ifun[17][1] = 2 - Ifun[17][2] = -1 - Ifun[17][3] = -1 - Ifun[17][4] = -1 - Ifun[17][5] = 2065 - Ifun[18][1] = 0 - Ifun[18][2] = 1 - Ifun[18][3] = -1 - Ifun[18][4] = -1 - Ifun[18][5] = -1870 - Ifun[19][1] = 4 - Ifun[19][2] = 0 - Ifun[19][3] = -1 - Ifun[19][4] = -1 - Ifun[19][5] = 1828 - Ifun[20][1] = 0 - Ifun[20][2] = 1 - Ifun[20][3] = 0 - Ifun[20][4] = 1 - Ifun[20][5] = -1794 - Ifun[21][1] = 0 - Ifun[21][2] = 0 - Ifun[21][3] = 0 - Ifun[21][4] = 3 - Ifun[21][5] = -1749 - Ifun[22][1] = 0 - Ifun[22][2] = 1 - Ifun[22][3] = -1 - Ifun[22][4] = 1 - Ifun[22][5] = -1565 - Ifun[23][1] = 1 - Ifun[23][2] = 0 - Ifun[23][3] = 0 - Ifun[23][4] = 1 - Ifun[23][5] = -1491 - Ifun[24][1] = 0 - Ifun[24][2] = 1 - Ifun[24][3] = 1 - Ifun[24][4] = 1 - Ifun[24][5] = -1475 - Ifun[25][1] = 0 - Ifun[25][2] = 1 - Ifun[25][3] = 1 - Ifun[25][4] = -1 - Ifun[25][5] = -1410 - Ifun[26][1] = 0 - Ifun[26][2] = 1 - Ifun[26][3] = 0 - Ifun[26][4] = -1 - Ifun[26][5] = -1344 - Ifun[27][1] = 1 - Ifun[27][2] = 0 - Ifun[27][3] = 0 - Ifun[27][4] = -1 - Ifun[27][5] = -1335 - Ifun[28][1] = 0 - Ifun[28][2] = 0 - Ifun[28][3] = 3 - Ifun[28][4] = 1 - Ifun[28][5] = 1107 - Ifun[29][1] = 4 - Ifun[29][2] = 0 - Ifun[29][3] = 0 - Ifun[29][4] = -1 - Ifun[29][5] = 1021 - Ifun[30][1] = 4 - Ifun[30][2] = 0 - Ifun[30][3] = -1 - Ifun[30][4] = 1 - Ifun[30][5] = 833 - Ifun[31][1] = 0 - Ifun[31][2] = 0 - Ifun[31][3] = 1 - Ifun[31][4] = -3 - Ifun[31][5] = 777 - Ifun[32][1] = 4 - Ifun[32][2] = 0 - Ifun[32][3] = -2 - Ifun[32][4] = 1 - Ifun[32][5] = 671 - Ifun[33][1] = 2 - Ifun[33][2] = 0 - Ifun[33][3] = 0 - Ifun[33][4] = -3 - Ifun[33][5] = 607 - Ifun[34][1] = 2 - Ifun[34][2] = 0 - Ifun[34][3] = 2 - Ifun[34][4] = -1 - Ifun[34][5] = 596 - Ifun[35][1] = 2 - Ifun[35][2] = -1 - Ifun[35][3] = 1 - Ifun[35][4] = -1 - Ifun[35][5] = 491 - Ifun[36][1] = 2 - Ifun[36][2] = 0 - Ifun[36][3] = -2 - Ifun[36][4] = 1 - Ifun[36][5] = -451 - Ifun[37][1] = 0 - Ifun[37][2] = 0 - Ifun[37][3] = 3 - Ifun[37][4] = -1 - Ifun[37][5] = 439 - Ifun[38][1] = 2 - Ifun[38][2] = 0 - Ifun[38][3] = 2 - Ifun[38][4] = 1 - Ifun[38][5] = 422 - Ifun[39][1] = 2 - Ifun[39][2] = 0 - Ifun[39][3] = -3 - Ifun[39][4] = -1 - Ifun[39][5] = 421 - Ifun[40][1] = 2 - Ifun[40][2] = 1 - Ifun[40][3] = -1 - Ifun[40][4] = 1 - Ifun[40][5] = -366 - Ifun[41][1] = 2 - Ifun[41][2] = 1 - Ifun[41][3] = 0 - Ifun[41][4] = 1 - Ifun[41][5] = -351 - Ifun[42][1] = 4 - Ifun[42][2] = 0 - Ifun[42][3] = 0 - Ifun[42][4] = 1 - Ifun[42][5] = 331 - Ifun[43][1] = 2 - Ifun[43][2] = -1 - Ifun[43][3] = 1 - Ifun[43][4] = 1 - Ifun[43][5] = 315 - Ifun[44][1] = 2 - Ifun[44][2] = -2 - Ifun[44][3] = 0 - Ifun[44][4] = -1 - Ifun[44][5] = 302 - Ifun[45][1] = 0 - Ifun[45][2] = 0 - Ifun[45][3] = 1 - Ifun[45][4] = 3 - Ifun[45][5] = -283 - Ifun[46][1] = 2 - Ifun[46][2] = 1 - Ifun[46][3] = 1 - Ifun[46][4] = -1 - Ifun[46][5] = -229 - Ifun[47][1] = 1 - Ifun[47][2] = 1 - Ifun[47][3] = 0 - Ifun[47][4] = -1 - Ifun[47][5] = 223 - Ifun[48][1] = 1 - Ifun[48][2] = 1 - Ifun[48][3] = 0 - Ifun[48][4] = 1 - Ifun[48][5] = 223 - Ifun[49][1] = 0 - Ifun[49][2] = 1 - Ifun[49][3] = -2 - Ifun[49][4] = -1 - Ifun[49][5] = -220 - Ifun[50][1] = 2 - Ifun[50][2] = 1 - Ifun[50][3] = -1 - Ifun[50][4] = -1 - Ifun[50][5] = -220 - Ifun[51][1] = 1 - Ifun[51][2] = 0 - Ifun[51][3] = 1 - Ifun[51][4] = 1 - Ifun[51][5] = -185 - Ifun[52][1] = 2 - Ifun[52][2] = -1 - Ifun[52][3] = -2 - Ifun[52][4] = -1 - Ifun[52][5] = 181 - Ifun[53][1] = 0 - Ifun[53][2] = 1 - Ifun[53][3] = 2 - Ifun[53][4] = 1 - Ifun[53][5] = -177 - Ifun[54][1] = 4 - Ifun[54][2] = 0 - Ifun[54][3] = -2 - Ifun[54][4] = -1 - Ifun[54][5] = 176 - Ifun[55][1] = 4 - Ifun[55][2] = -1 - Ifun[55][3] = -1 - Ifun[55][4] = -1 - Ifun[55][5] = 166 - Ifun[56][1] = 1 - Ifun[56][2] = 0 - Ifun[56][3] = 1 - Ifun[56][4] = -1 - Ifun[56][5] = -164 - Ifun[57][1] = 4 - Ifun[57][2] = 0 - Ifun[57][3] = 1 - Ifun[57][4] = -1 - Ifun[57][5] = 132 - Ifun[58][1] = 1 - Ifun[58][2] = 0 - Ifun[58][3] = -1 - Ifun[58][4] = -1 - Ifun[58][5] = -119 - Ifun[59][1] = 4 - Ifun[59][2] = -1 - Ifun[59][3] = 0 - Ifun[59][4] = -1 - Ifun[59][5] = 115 - Ifun[60][1] = 2 - Ifun[60][2] = -2 - Ifun[60][3] = 0 - Ifun[60][4] = 1 - Ifun[60][5] = 107 - var TEMP, MoonB float64 = 0, 0 - for i := 1; i < 61; i++ { - if math.Abs(Ifun[i][2]) == float64(1) { - TEMP = Sin(Ifun[i][1]*D+Ifun[i][2]*IsunM+Ifun[i][3]*IMoonM+Ifun[i][4]*F) * Ifun[i][5] * E - } else if math.Abs(Ifun[i][2]) == float64(2) { - TEMP = Sin(Ifun[i][1]*D+Ifun[i][2]*IsunM+Ifun[i][3]*IMoonM+Ifun[i][4]*F) * Ifun[i][5] * E * E - } else { - TEMP = Sin(Ifun[i][1]*D+Ifun[i][2]*IsunM+Ifun[i][3]*IMoonM+Ifun[i][4]*F) * Ifun[i][5] - } - MoonB = MoonB + TEMP - } - //MoonB = MoonB + 3958 * Sin(A1) + 1962 * Sin(MoonLo(JD) - F) + 318 * Sin(A2); - MoonB += -2235*Sin(MoonLo(JD)) + 382*Sin(A3) + 175*Sin(A1-F) + 175*Sin(A1+F) + 127*Sin(MoonLo(JD)-IMoonM) - 115*Sin(MoonLo(JD)+IMoonM) - return MoonB -} - -func MoonTrueLo(JD float64) float64 { - return (Limit360(MoonLo(JD) + (MoonI(JD) / 1000000))) -} -func MoonTrueBo(JD float64) float64 { - return (MoonB(JD) / 1000000) -} -func MoonAway(JD float64) float64 { //'月地距离 - MoonAway := 385000.56 + MoonR(JD)/1000 - return MoonAway -} - -/* - * @name 月球视黄经 - */ -func MoonApparentLo(JD float64) float64 { - return MoonTrueLo(JD) + HJZD(JD) -} - -/* - * 月球真赤纬 - */ -func MoonTrueDec(JD float64) float64 { - MoonLo := MoonApparentLo(JD) - MoonBo := MoonTrueBo(JD) - tmp := Sin(MoonBo)*Cos(Sita(JD)) + Cos(MoonBo)*Sin(Sita(JD))*Sin(MoonLo) - res := ArcSin(tmp) - return res -} - -/* - * 月球真赤经 - */ -func MoonTrueRa(JD float64) float64 { - return LoToRa(JD, MoonApparentLo(JD), MoonTrueBo(JD)) -} - -func MoonTrueRaDec(JD float64) (float64, float64) { - return LoBoToRaDec(JD, MoonApparentLo(JD), MoonTrueBo(JD)) -} - -/* -* - - * - 传入世界时 -*/ -func MoonApparentRa(JD, lon, lat float64, tz int) float64 { - jde := TD2UT(JD, true) - ra := MoonTrueRa(jde - float64(tz)/24.000) - dec := MoonTrueDec(jde - float64(tz)/24.000) - away := MoonAway(jde-float64(tz)/24.000) / 149597870.7 - nra := ZhanXinRa(ra, dec, lat, lon, JD-float64(tz)/24.000, away, 0) - return nra -} - -func MoonApparentDec(JD, lon, lat, tz float64) float64 { - jde := TD2UT(JD, true) - ra := MoonTrueRa(jde - tz/24.0) - dec := MoonTrueDec(jde - tz/24) - away := MoonAway(jde-tz/24) / 149597870.7 - ndec := ZhanXinDec(ra, dec, lat, lon, JD-tz/24, away, 0) - return ndec -} - -func MoonLight(JD float64) float64 { - MoonBo := HMoonTrueBo(JD) - SunLo := HSunApparentLo(JD) - MoonLo := HMoonApparentLo(JD) - tmp := Cos(MoonBo) * Cos(SunLo-MoonLo) - R := RDJL(JD) * 149597870.691 - i := R * Sin(ArcCos(tmp)) / (HMoonAway(JD) - R*tmp) - i = ArcTan(i) - if i < 0 { - i += 180 - } - if i > 180 { - i -= 180 - } - k := (1 + Cos(i)) / 2 - return k -} - -func SunMoonSeek(JDE float64, degree float64) float64 { - p := HMoonApparentLo(JDE) - (HSunApparentLo(JDE)) - degree - for p < -180 { - p += 360 - } - for p > 180 { - p -= 360 - } - return p -} - -func CalcMoonSHByJDE(JDE float64, C int) float64 { - C = C * 180 - JD1 := JDE - for { - JD0 := JD1 - stDegree := SunMoonSeek(JD0, float64(C)) - stDegreep := (SunMoonSeek(JD0+0.000005, float64(C)) - SunMoonSeek(JD0-0.000005, float64(C))) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func CalcMoonSH(Year float64, C int) float64 { - JDE := CalcMoonS(Year, C) - C = C * 180 - JD1 := JDE - for { - JD0 := JD1 - stDegree := SunMoonSeek(JD0, float64(C)) - stDegreep := (SunMoonSeek(JD0+0.000005, float64(C)) - SunMoonSeek(JD0-0.000005, float64(C))) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -/* - * C=0朔月时刻 =1 望月 - */ -func CalcMoonS(Year float64, C int) float64 { - k := math.Floor((Year - 2000) * 12.36827) - if C == 1 { - k += 0.5 - } - T := k / 1236.85 - JDE := 2451550.09765 + 29.530588853*k + 0.0001337*T*T - 0.000000150*T*T*T + 0.00000000073*T*T*T*T - //太阳平近点角: - M := Limit360(2.5534 + 29.10535669*k - 0.0000218*T*T - 0.00000011*T*T*T) - //月亮的平近点角: - N := Limit360(201.5643 + 385.81693528*k + 0.0107438*T*T + 0.00001239*T*T*T - 0.000000058*T*T*T*T) - //月亮的纬度参数: - F := Limit360(160.7108 + 390.67050274*k - 0.0016341*T*T - 0.00000227*T*T*T + 0.000000011*T*T*T*T) - //月亮轨道升交点经度: - O := Limit360(124.7746 - 1.56375580*k + 0.0020691*T*T + 0.00000215*T*T*T) - E := 1 - 0.002516*T - 0.0000074*T*T - //die(E." ".M." ".N." ".F." ".O); - ZQ := []float64{N, M, 2 * N, 2 * F, N - M, N + M, 2 * M, N - 2*F, N + 2*F, 2*N + M, 3 * N, M + 2*F, M - 2*F, 2*N - M, O, N + 2*M, 2*N - 2*F, 3 * M, N + M - 2*F, 2*N + 2*F, N + M + 2*F, N - M + 2*F, N - M - 2*F, 3*N + M, 4 * N} - var MN []float64 - if C == 0 { - MN = []float64{-0.40720, 0.17241 * E, 0.01608, 0.01039, 0.00739 * E, -0.00514 * E, 0.00208 * E * E, -0.00111, -0.00057, 0.00056 * E, -0.00042, 0.00042 * E, 0.00038 * E, -0.00024 * E, -0.00017, -0.00007, 0.00004, 0.00004, 0.00003, 0.00003, -0.00003, 0.00003, -0.00002, -0.00002, 0.00002} - } else { - MN = []float64{-0.40614, 0.17302 * E, 0.01614, 0.01043, 0.00734 * E, -0.00515 * E, 0.00209 * E * E, -0.00111, -0.00057, 0.00056 * E, -0.00042, 0.00042 * E, 0.00038 * E, -0.00024 * E, -0.00017, -0.00007, 0.00004, 0.00004, 0.00003, 0.00003, -0.00003, 0.00003, -0.00002, -0.00002, 0.00002} - } - var tmp float64 = 0 - for k, v := range ZQ { - tmp += Sin(v) * MN[k] - } - //die(tmp); - A1 := 299.77 + 0.107408*k - 0.009173*T*T - A2 := 251.88 + 0.016321*k - A3 := 251.83 + 26.651886*k - A4 := 349.42 + 36.412478*k - A5 := 84.66 + 18.206239*k - A6 := 141.74 + 53.303771*k - A7 := 207.14 + 2.453732*k - A8 := 154.84 + 7.306860*k - A9 := 34.52 + 27.261239*k - A10 := 207.19 + 0.121824*k - A11 := 291.34 + 1.844379*k - A12 := 161.72 + 24.198154*k - A13 := 239.56 + 25.513099*k - A14 := 331.55 + 3.592518*k - tmp2 := 325*Sin(A1) + 165*Sin(A2) + 164*Sin(A3) + 126*Sin(A4) + 110*Sin(A5) + 62*Sin(A6) + 60*Sin(A7) + 56*Sin(A8) + 47*Sin(A9) + 42*Sin(A10) + 40*Sin(A11) + 37*Sin(A12) + 35*Sin(A13) + 23*Sin(A14) - tmp2 /= 1000000 - JDE = JDE + tmp2 + tmp - return JDE -} - -func CalcMoonXHByJDE(JDE float64, C int) float64 { - if C == 0 { - C = 90 - } else { - C = -90 - } - JD1 := JDE - for { - JD0 := JD1 - stDegree := SunMoonSeek(JD0, float64(C)) - stDegreep := (SunMoonSeek(JD0+0.000005, float64(C)) - SunMoonSeek(JD0-0.000005, float64(C))) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func CalcMoonXH(Year float64, C int) float64 { - JDE := CalcMoonX(Year, C) - if C == 0 { - C = 90 - } else { - C = -90 - } - JD1 := JDE - for { - JD0 := JD1 - stDegree := SunMoonSeek(JD0, float64(C)) - stDegreep := (SunMoonSeek(JD0+0.000005, float64(C)) - SunMoonSeek(JD0-0.000005, float64(C))) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func CalcMoonX(Year float64, C int) float64 { - k := math.Floor((Year-2000)*12.36827) + 0.25 - if C == 1 { - k += 0.5 - } - T := k / 1236.85 - JDE := 2451550.09765 + 29.530588853*k + 0.0001337*T*T - 0.000000150*T*T*T + 0.00000000073*T*T*T*T - //太阳平近点角: - M := Limit360(2.5534 + 29.10535669*k - 0.0000218*T*T - 0.00000011*T*T*T) - //月亮的平近点角: - N := Limit360(201.5643 + 385.81693528*k + 0.0107438*T*T + 0.00001239*T*T*T - 0.000000058*T*T*T*T) - //月亮的纬度参数: - F := Limit360(160.7108 + 390.67050274*k - 0.0016341*T*T - 0.00000227*T*T*T + 0.000000011*T*T*T*T) - //月亮轨道升交点经度: - O := Limit360(124.7746 - 1.56375580*k + 0.0020691*T*T + 0.00000215*T*T*T) - E := 1 - 0.002516*T - 0.0000074*T*T - //die(E." ".M." ".N." ".F." ".O); - ZQ := []float64{N, M, N + M, 2 * N, 2 * F, N - M, 2 * M, N - 2*F, N + 2*F, 3 * N, 2*N - M, M + 2*F, M - 2*F, N + 2*M, 2*N + M, O, N - M - 2*F, 2*N + 2*F, N + M + 2*F, N - 2*F, N + M - 2*F, 3 * M, 2*N - 2*F, N - M + 2*F, M + 3*N} - MN := []float64{-0.62801, 0.17172 * E, -0.01183 * E, 0.00862, 0.00804, 0.00454 * E, 0.00204 * E * E, -0.00180, -0.00070, -0.00040, -0.00034 * E, 0.00032 * E, 0.00032 * E, -0.00028 * E * E, 0.00027 * E, -0.00017, -0.00005, 0.00004, -0.00004, 0.00004, 0.00003, 0.00003, 0.00002, 0.00002, -0.00002} - var tmp float64 = 0 - for k, v := range ZQ { - tmp += Sin(v) * MN[k] - } - W := 0.00306 - 0.00038*E*Cos(M) + 0.00026*Cos(N) - 0.00002*Cos(N-M) + 0.00002*Cos(N+M) + 0.00002*Cos(2*F) - A1 := 299.77 + 0.107408*k - 0.009173*T*T - A2 := 251.88 + 0.016321*k - A3 := 251.83 + 26.651886*k - A4 := 349.42 + 36.412478*k - A5 := 84.66 + 18.206239*k - A6 := 141.74 + 53.303771*k - A7 := 207.14 + 2.453732*k - A8 := 154.84 + 7.306860*k - A9 := 34.52 + 27.261239*k - A10 := 207.19 + 0.121824*k - A11 := 291.34 + 1.844379*k - A12 := 161.72 + 24.198154*k - A13 := 239.56 + 25.513099*k - A14 := 331.55 + 3.592518*k - tmp2 := 325*Sin(A1) + 165*Sin(A2) + 164*Sin(A3) + 126*Sin(A4) + 110*Sin(A5) + 62*Sin(A6) + 60*Sin(A7) + 56*Sin(A8) + 47*Sin(A9) + 42*Sin(A10) + 40*Sin(A11) + 37*Sin(A12) + 35*Sin(A13) + 23*Sin(A14) - tmp2 /= 1000000 - //die(tmp2); - //die(JDE." ".tmp." ".tmp2." ".W); - JDE = JDE + tmp2 + tmp - if C == 0 { - JDE += W - } else { - JDE -= W - } - return JDE -} - -/* - * 月球方位角 - */ -func MoonAngle(JD, Lon, Lat, TZ float64) float64 { - - //tmp := (TZ*15 - Lon) * 4 / 60 - calcjd := TD2UT(JD-TZ/24, true) - ra := MoonTrueRa(calcjd) - dec := MoonTrueDec(calcjd) - away := MoonAway(calcjd) / 149597870.7 - ndec := ZhanXinDec(ra, dec, Lat, Lon, JD-TZ/24, away, 0) - nra := ZhanXinRa(ra, dec, Lat, Lon, JD-TZ/24, away, 0) - calcjd = JD - TZ/24 - st := Limit360(ApparentSiderealTime(calcjd)*15 + Lon) - H := Limit360(st - nra) - tmp2 := Sin(H) / (Cos(H)*Sin(Lat) - Tan(ndec)*Cos(Lat)) - Angle := ArcTan(tmp2) - if Angle < 0 { - if H/15 < 12 { - return Angle + 360 - } else { - return Angle + 180 - } - } else { - if H/15 < 12 { - return Angle + 180 - } else { - return Angle - } - } - -} - -func MoonHeight(JD, Lon, Lat, TZ float64) float64 { - // tmp := (TZ*15 - Lon) * 4 / 60 - //truejd=JD-tmp/24; - calcjd := TD2UT(JD-TZ/24, true) - ra := MoonTrueRa(calcjd) - dec := MoonTrueDec(calcjd) - away := MoonAway(calcjd) / 149597870.7 - ndec := ZhanXinDec(ra, dec, Lat, Lon, JD-TZ/24, away, 0) - nra := ZhanXinRa(ra, dec, Lat, Lon, JD-TZ/24, away, 0) - calcjd = JD - TZ/24 - st := Limit360(ApparentSiderealTime(calcjd)*15 + Lon) - H := Limit360(st - nra) - tmp2 := Sin(Lat)*Sin(ndec) + Cos(ndec)*Cos(Lat)*Cos(H) - return ArcSin(tmp2) -} - -func HMoonAngle(JD, Lon, Lat, TZ float64) float64 { - //tmp := (TZ*15 - Lon) * 4 / 60 - //truejd=JD-tmp/24; - calcjd := TD2UT(JD-TZ/24, true) - ra := HMoonTrueRa(calcjd) - dec := HMoonTrueDec(calcjd) - away := HMoonAway(calcjd) / 149597870.7 - ndec := ZhanXinDec(ra, dec, Lat, Lon, JD-TZ/24, away, 0) - nra := ZhanXinRa(ra, dec, Lat, Lon, JD-TZ/24, away, 0) - calcjd = JD - TZ/24 - st := Limit360(ApparentSiderealTime(calcjd)*15 + Lon) - H := Limit360(st - nra) - tmp2 := Sin(H) / (Cos(H)*Sin(Lat) - Tan(ndec)*Cos(Lat)) - Angle := ArcTan(tmp2) - if Angle < 0 { - if H/15 < 12 { - return Angle + 360 - } else { - return Angle + 180 - } - } else { - if H/15 < 12 { - return Angle + 180 - } else { - return Angle - } - } - -} -func HMoonHeight(JD, Lon, Lat, TZ float64) float64 { - // tmp := (TZ*15 - Lon) * 4 / 60 - //truejd=JD-tmp/24; - calcjd := TD2UT(JD-TZ/24, true) - ra, dec := HMoonTrueRaDec(calcjd) - away := HMoonAway(calcjd) / 149597870.7 - nra, ndec := ZhanXinRaDec(ra, dec, Lat, Lon, calcjd, away, 0) - calcjd = JD - TZ/24 - st := Limit360(ApparentSiderealTime(calcjd)*15 + Lon) - H := Limit360(st - nra) - tmp2 := Sin(Lat)*Sin(ndec) + Cos(ndec)*Cos(Lat)*Cos(H) - return ArcSin(tmp2) -} - -// 废弃 -func GetMoonTZTime(JD, Lon, Lat, TZ float64) float64 { //实际中天时间{ - JD = math.Floor(JD) + 0.5 - ttm := MoonTimeAngle(JD, Lon, Lat, TZ) - if ttm > 0 && ttm < 180 { - JD += 0.5 - } - JD1 := JD - for { - JD0 := JD1 - stDegree := MoonTimeAngle(JD0, Lon, Lat, TZ) - 359.599 - stDegreep := (MoonTimeAngle(JD0+0.000005, Lon, Lat, TZ) - MoonTimeAngle(JD0-0.000005, Lon, Lat, TZ)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func MoonCulminationTime(jde, lon, lat, timezone float64) float64 { - //jde 世界时,非力学时,当地时区 0时,无需转换力学时 - //ra,dec 瞬时天球座标,非J2000等时间天球坐标 - jde = math.Floor(jde) + 0.5 - JD1 := jde + Limit360(360-MoonTimeAngle(jde, lon, lat, timezone))/15.0/24.0/0.9 - limitHA := func(jde, lon, timezone float64) float64 { - ha := MoonTimeAngle(jde, lon, lat, timezone) - if ha < 180 { - ha += 360 - } - return ha - } - for { - JD0 := JD1 - stDegree := limitHA(JD0, lon, timezone) - 360 - stDegreep := (limitHA(JD0+0.000005, lon, timezone) - limitHA(JD0-0.000005, lon, timezone)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func MoonTimeAngle(JD, Lon, Lat, TZ float64) float64 { - startime := Limit360(ApparentSiderealTime(JD-TZ/24)*15 + Lon) - timeangle := startime - HMoonApparentRa(JD, Lon, Lat, TZ) - if timeangle < 0 { - timeangle += 360 - } - return timeangle -} - -func GetMoonRiseTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - ntz := TZ - TZ = Lon / 15 - var An, tms float64 = 0, 0 - JDZ := math.Floor(JD) + 0.5 - JD = math.Floor(JD) + 0.5 - ntz/24 + TZ/24.0 //求0时JDE - JD1 := JD - moonheight := MoonHeight(JD, Lon, Lat, TZ) //求此时月亮高度 - if ZS != 0 { - An = -0.83333 //修正大气折射 - } - An = An - HeightDegreeByLat(HEI, Lat) - moonang := MoonTimeAngle(JD, Lon, Lat, TZ) - if moonheight > 0 { //月亮在地平线上或在落下与下中天之间 - if moonang > 180 { - tms = (180 + 360 - moonang) / 15 - } else { - tms = (180 - moonang) / 15 - } - JD1 += (tms/24 + (tms/24*12.0)/15.0/24.0) - - } - if moonheight < 0 && moonang > 180 { - tms = (180 - moonang) / 15 - JD1 += (tms/24 + (tms/24*12.0)/15.0/24.0) - } else if moonheight < 0 && moonang < 180 { - tms = (180 - moonang) / 15 - JD1 += (tms/24 + (tms/24*12.0)/15.0/24.0) - } - now := MoonTimeAngle(JD1, Lon, Lat, TZ) - if math.Abs(now-180) > 0.5 { - JD1 += (180 - now) * 4.0 / 60.0 / 24.0 - } - hei := HMoonHeight(JD1, Lon, Lat, TZ) - if !(hei < -10 && math.Abs(Lat) < 60) { - if hei > An { - return -1 //拱 - } - reJde := JD1 + 12.0/24.0 + 6.0/15.0/24.0 - mag := MoonTimeAngle(reJde, Lon, Lat, TZ) - if mag < 90 { - mag += 360 - } - reJde += (360 - mag) * 4.0 / 60.0 / 24.0 - if HMoonHeight(reJde, Lon, Lat, TZ) < An { - return -2 //沉 - } - } - dec := MoonApparentDec(JD1, Lon, Lat, TZ) - tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat)) - if math.Abs(tmp) <= 1 && Lat < 85 { - SJ := (180 - ArcCos(tmp)) / 15 - JD1 += SJ/24.00 + SJ/33.00/15.00 - } else { - i := 0 - for MoonHeight(JD1, Lon, Lat, TZ) < An { - i++ - JD1 += 15.0 / 60.0 / 24.0 - if i > 48 { - break - } - } - } - for { - JD0 := JD1 - stDegree := HMoonHeight(JD0, Lon, Lat, TZ) - An - stDegreep := (HMoonHeight(JD0+0.000005, Lon, Lat, TZ) - HMoonHeight(JD0-0.000005, Lon, Lat, TZ)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00002 { - break - } - } - JD1 = JD1 - TZ/24 + ntz/24 - - if JD1 > JDZ+1 || JD1 < JDZ { - return -3 //明日 - } else { - return JD1 - } -} - -func GetMoonDownTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - ntz := TZ - TZ = Lon / 15 - var An, tms float64 = 0, 0 - JDZ := math.Floor(JD) + 0.5 - JD = math.Floor(JD) + 0.5 - ntz/24 + TZ/24 //求0时JDE - JD1 := JD - moonheight := MoonHeight(JD, Lon, Lat, TZ) //求此时月亮高度 - if ZS != 0 { - An = -0.83333 //修正大气折射 - } - An = An - HeightDegreeByLat(HEI, Lat) - moonang := MoonTimeAngle(JD, Lon, Lat, TZ) - if moonheight < 0 { - tms = (360 - moonang) / 15 - JD1 += (tms/24 + (tms/24.0*12.0)/15.0/24.0) - } - //月亮在地平线上或在落下与下中天之间 - if moonheight > 0 && moonang < 180 { - tms = (-moonang) / 15 - JD1 += (tms/24.0 + (tms/24.0*12.0)/15.0/24.0) - } else if moonheight > 0 { - tms = (360 - moonang) / 15 - JD1 += (tms/24.0 + (tms/24.0*12.0)/15.0/24.0) - } - now := MoonTimeAngle(JD1, Lon, Lat, TZ) - if now < 180 { - now += 360 - } - if math.Abs(now-360) > 0.5 { - JD1 += (360 - now) * 4.0 / 60.0 / 24.0 - } - //JD1=月球中天时间 - hei := HMoonHeight(JD1, Lon, Lat, TZ) - if !(hei > 10 && math.Abs(Lat) < 60) { - if hei < An { - return -2 //沉 - } - reJde := JD1 + 12.0/24.0 + 6.0/15.0/24.0 - sub := 180 - MoonTimeAngle(reJde, Lon, Lat, TZ) - reJde += sub * 4.0 / 60.0 / 24.0 - if HMoonHeight(reJde, Lon, Lat, TZ) > An { - return -1 //拱 - } - } - dec := MoonApparentDec(JD1, Lon, Lat, TZ) - tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat)) - if math.Abs(tmp) <= 1 && Lat < 85 { - SJ := (ArcCos(tmp)) / 15.0 - JD1 += SJ/24 + SJ/33.0/15.0 - } else { - i := 0 - for MoonHeight(JD1, Lon, Lat, TZ) > An { - i++ - JD1 += 15.0 / 60.0 / 24.0 - if i > 48 { - break - } - } - } - for { - JD0 := JD1 - stDegree := HMoonHeight(JD0, Lon, Lat, TZ) - An - stDegreep := (HMoonHeight(JD0+0.000005, Lon, Lat, TZ) - HMoonHeight(JD0-0.000005, Lon, Lat, TZ)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00002 { - break - } - } - JD1 = JD1 - TZ/24 + ntz/24 - if JD1 > JDZ+1 || JD1 < JDZ { - return -3 //明日 - } else { - return JD1 - } -} - -func GetMoonCir() [][][]float64 { - XL1 := [][][]float64{{ - //ML0 - { - 22639.586, 0.78475822, 8328.691424623, 1.5229241, 25.0719, -0.123598, 4586.438, 0.1873974, 7214.06286536, -2.184756, -18.860, 0.08280, 2369.914, 2.5429520, 15542.75428998, -0.661832, 6.212, -0.04080, 769.026, 3.140313, 16657.38284925, 3.04585, 50.144, -0.2472, 666.418, 1.527671, 628.30195521, -0.02664, 0.062, -0.0054, 411.596, 4.826607, 16866.9323150, -1.28012, -1.07, -0.0059, 211.656, 4.115028, -1114.6285593, -3.70768, -43.93, 0.2064, 205.436, 0.230523, 6585.7609101, -2.15812, -18.92, 0.0882, 191.956, 4.898507, 23871.4457146, 0.86109, 31.28, -0.164, 164.729, 2.586078, 14914.4523348, -0.6352, 6.15, -0.035, 147.321, 5.45530, -7700.3894694, -1.5496, -25.01, 0.118, 124.988, 0.48608, 7771.3771450, -0.3309, 3.11, -0.020, 109.380, 3.88323, 8956.9933798, 1.4963, 25.13, -0.129, 55.177, 5.57033, -1324.1780250, 0.6183, 7.3, -0.035, 45.100, 0.89898, 25195.623740, 0.2428, 24.0, -0.129, 39.533, 3.81213, -8538.240890, 2.8030, 26.1, -0.118, 38.430, 4.30115, 22756.817155, -2.8466, -12.6, 0.042, 36.124, 5.49587, 24986.074274, 4.5688, 75.2, -0.371, 30.773, 1.94559, 14428.125731, -4.3695, -37.7, 0.166, 28.397, 3.28586, 7842.364821, -2.2114, -18.8, 0.077, 24.358, 5.64142, 16171.056245, -0.6885, 6.3, -0.046, 18.585, 4.41371, -557.314280, -1.8538, -22.0, 0.10, 17.954, 3.58454, 8399.679100, -0.3576, 3.2, -0.03, 14.530, 4.9416, 23243.143759, 0.888, 31.2, -0.16, 14.380, 0.9709, 32200.137139, 2.384, 56.4, -0.29, 14.251, 5.7641, -2.301200, 1.523, 25.1, -0.12, 13.899, 0.3735, 31085.508580, -1.324, 12.4, -0.08, 13.194, 1.7595, -9443.319984, -5.231, -69.0, 0.33, 9.679, 3.0997, -16029.080894, -3.072, -50.1, 0.24, 9.366, 0.3016, 24080.995180, -3.465, -19.9, 0.08, 8.606, 4.1582, -1742.930514, -3.681, -44.0, 0.21, 8.453, 2.8416, 16100.068570, 1.192, 28.2, -0.14, 8.050, 2.6292, 14286.150380, -0.609, 6.1, -0.03, 7.630, 6.2388, 17285.684804, 3.019, 50.2, -0.25, 7.447, 1.4845, 1256.603910, -0.053, 0.1, -0.01, 7.371, 0.2736, 5957.458955, -2.131, -19.0, 0.09, 7.063, 5.6715, 33.757047, -0.308, -3.6, 0.02, 6.383, 4.7843, 7004.513400, 2.141, 32.4, -0.16, 5.742, 2.6572, 32409.686605, -1.942, 5, -0.05, 4.374, 4.3443, 22128.51520, -2.820, -13, 0.05, 3.998, 3.2545, 33524.31516, 1.766, 49, -0.25, 3.210, 2.2443, 14985.44001, -2.516, -16, 0.06, 2.915, 1.7138, 24499.74767, 0.834, 31, -0.17, 2.732, 1.9887, 13799.82378, -4.343, -38, 0.17, 2.568, 5.4122, -7072.08751, -1.576, -25, 0.11, 2.521, 3.2427, 8470.66678, -2.238, -19, 0.07, 2.489, 4.0719, -486.32660, -3.734, -44, 0.20, 2.146, 5.6135, -1952.47998, 0.645, 7, -0.03, 1.978, 2.7291, 39414.20000, 0.199, 37, -0.21, 1.934, 1.5682, 33314.76570, 6.092, 100, -0.5, 1.871, 0.4166, 30457.20662, -1.297, 12, -0.1, 1.753, 2.0582, -8886.00570, -3.38, -47, 0.2, 1.437, 2.386, -695.87607, 0.59, 7, 0, 1.373, 3.026, -209.54947, 4.33, 51, -0.2, 1.262, 5.940, 16728.37052, 1.17, 28, -0.1, 1.224, 6.172, 6656.74859, -4.04, -41, 0.2, 1.187, 5.873, 6099.43431, -5.89, -63, 0.3, 1.177, 1.014, 31571.83518, 2.41, 56, -0.3, 1.162, 3.840, 9585.29534, 1.47, 25, -0.1, 1.143, 5.639, 8364.73984, -2.18, -19, 0.1, 1.078, 1.229, 70.98768, -1.88, -22, 0.1, 1.059, 3.326, 40528.82856, 3.91, 81, -0.4, 0.990, 5.013, 40738.37803, -0.42, 30, -0.2, 0.948, 5.687, -17772.01141, -6.75, -94, 0.5, 0.876, 0.298, -0.35232, 0, 0, 0, 0.822, 2.994, 393.02097, 0, 0, 0, 0.788, 1.836, 8326.39022, 3.05, 50, -0.2, 0.752, 4.985, 22614.84180, 0.91, 31, -0.2, 0.740, 2.875, 8330.99262, 0, 0, 0, 0.669, 0.744, -24357.77232, -4.60, -75, 0.4, 0.644, 1.314, 8393.12577, -2.18, -19, 0.1, 0.639, 5.888, 575.33849, 0, 0, 0, 0.635, 1.116, 23385.11911, -2.87, -13, 0, 0.584, 5.197, 24428.75999, 2.71, 53, -0.3, 0.583, 3.513, -9095.55517, 0.95, 4, 0, 0.572, 6.059, 29970.88002, -5.03, -32, 0.1, 0.565, 2.960, 0.32863, 1.52, 25, -0.1, 0.561, 4.001, -17981.56087, -2.43, -43, 0.2, 0.557, 0.529, 7143.07519, -0.30, 3, 0, 0.546, 2.311, 25614.37623, 4.54, 75, -0.4, 0.536, 4.229, 15752.30376, -4.99, -45, 0.2, 0.493, 3.316, -8294.9344, -1.83, -29, 0.1, 0.491, 1.744, 8362.4485, 1.21, 21, -0.1, 0.478, 1.803, -10071.6219, -5.20, -69, 0.3, 0.454, 0.857, 15333.2048, 3.66, 57, -0.3, 0.445, 2.071, 8311.7707, -2.18, -19, 0.1, 0.426, 0.345, 23452.6932, -3.44, -20, 0.1, 0.420, 4.941, 33733.8646, -2.56, -2, 0, 0.413, 1.642, 17495.2343, -1.31, -1, 0, 0.404, 1.458, 23314.1314, -0.99, 9, -0.1, 0.395, 2.132, 38299.5714, -3.51, -6, 0, 0.382, 2.700, 31781.3846, -1.92, 5, 0, 0.375, 4.827, 6376.2114, 2.17, 32, -0.2, 0.361, 3.867, 16833.1753, -0.97, 3, 0, 0.358, 5.044, 15056.4277, -4.40, -38, 0.2, 0.350, 5.157, -8257.7037, -3.40, -47, 0.2, 0.344, 4.233, 157.7344, 0, 0, 0, 0.340, 2.672, 13657.8484, -0.58, 6, 0, 0.329, 5.610, 41853.0066, 3.29, 74, -0.4, 0.325, 5.895, -39.8149, 0, 0, 0, 0.309, 4.387, 21500.2132, -2.79, -13, 0.1, 0.302, 1.278, 786.0419, 0, 0, 0, 0.302, 5.341, -24567.3218, -0.27, -24, 0.1, 0.301, 1.045, 5889.8848, -1.57, -12, 0, 0.294, 4.201, -2371.2325, -3.65, -44, 0.2, 0.293, 3.704, 21642.1886, -6.55, -57, 0.2, 0.290, 4.069, 32828.4391, 2.36, 56, -0.3, 0.289, 3.472, 31713.8105, -1.35, 12, -0.1, 0.285, 5.407, -33.7814, 0.31, 4, 0, 0.283, 5.998, -16.9207, -3.71, -44, 0.2, 0.283, 2.772, 38785.8980, 0.23, 37, -0.2, 0.274, 5.343, 15613.7420, -2.54, -16, 0.1, 0.263, 3.997, 25823.9257, 0.22, 24, -0.1, 0.254, 0.600, 24638.3095, -1.61, 2, 0, 0.253, 1.344, 6447.1991, 0.29, 10, -0.1, 0.250, 0.887, 141.9754, -3.76, -44, 0.2, 0.247, 0.317, 5329.1570, -2.10, -19, 0.1, 0.245, 0.141, 36.0484, -3.71, -44, 0.2, 0.231, 2.287, 14357.1381, -2.49, -16, 0.1, 0.227, 5.158, 2.6298, 0, 0, 0, 0.219, 5.085, 47742.8914, 1.72, 63, -0.3, 0.211, 2.145, 6638.7244, -2.18, -19, 0.1, 0.201, 4.415, 39623.7495, -4.13, -14, 0, 0.194, 2.091, 588.4927, 0, 0, 0, 0.193, 3.057, -15400.7789, -3.10, -50, 0, 0.186, 5.598, 16799.3582, -0.72, 6, 0, 0.185, 3.886, 1150.6770, 0, 0, 0, 0.183, 1.619, 7178.0144, 1.52, 25, 0, 0.181, 2.635, 8328.3391, 1.52, 25, 0, 0.181, 2.077, 8329.0437, 1.52, 25, 0, 0.179, 3.215, -9652.8694, -0.90, -18, 0, 0.176, 1.716, -8815.0180, -5.26, -69, 0, 0.175, 5.673, 550.7553, 0, 0, 0, 0.170, 2.060, 31295.0580, -5.6, -39, 0, 0.167, 1.239, 7211.7617, -0.7, 6, 0, 0.165, 4.499, 14967.4158, -0.7, 6, 0, 0.164, 3.595, 15540.4531, 0.9, 31, 0, 0.164, 4.237, 522.3694, 0, 0, 0, 0.163, 4.633, 15545.0555, -2.2, -19, 0, 0.161, 0.478, 6428.0209, -2.2, -19, 0, 0.158, 2.03, 13171.5218, -4.3, -38, 0, 0.157, 2.28, 7216.3641, -3.7, -44, 0, 0.154, 5.65, 7935.6705, 1.5, 25, 0, 0.152, 0.46, 29828.9047, -1.3, 12, 0, 0.151, 1.19, -0.7113, 0, 0, 0, 0.150, 1.42, 23942.4334, -1.0, 9, 0, 0.144, 2.75, 7753.3529, 1.5, 25, 0, 0.137, 2.08, 7213.7105, -2.2, -19, 0, 0.137, 1.44, 7214.4152, -2.2, -19, 0, 0.136, 4.46, -1185.6162, -1.8, -22, 0, 0.136, 3.03, 8000.1048, -2.2, -19, 0, 0.134, 2.83, 14756.7124, -0.7, 6, 0, 0.131, 5.05, 6821.0419, -2.2, -19, 0, 0.128, 5.99, -17214.6971, -4.9, -72, 0, 0.127, 5.35, 8721.7124, 1.5, 25, 0, 0.126, 4.49, 46628.2629, -2.0, 19, 0, 0.125, 5.94, 7149.6285, 1.5, 25, 0, 0.124, 1.09, 49067.0695, 1.1, 55, 0, 0.121, 2.88, 15471.7666, 1.2, 28, 0, 0.111, 3.92, 41643.4571, 7.6, 125, -1, 0.110, 1.96, 8904.0299, 1.5, 25, 0, 0.106, 3.30, -18.0489, -2.2, -19, 0, 0.105, 2.30, -4.9310, 1.5, 25, 0, 0.104, 2.22, -6.5590, -1.9, -22, 0, 0.101, 1.44, 1884.9059, -0.1, 0, 0, 0.100, 5.92, 5471.1324, -5.9, -63, 0, 0.099, 1.12, 15149.7333, -0.7, 6, 0, 0.096, 4.73, 15508.9972, -0.4, 10, 0, 0.095, 5.18, 7230.9835, 1.5, 25, 0, 0.093, 3.37, 39900.5266, 3.9, 81, 0, 0.092, 2.01, 25057.0619, 2.7, 53, 0, 0.092, 1.21, -79.6298, 0, 0, 0, 0.092, 1.65, -26310.2523, -4.0, -68, 0, 0.091, 1.01, 42062.5561, -1.0, 23, 0, 0.090, 6.10, 29342.5781, -5.0, -32, 0, 0.090, 4.43, 15542.4020, -0.7, 6, 0, 0.090, 3.80, 15543.1066, -0.7, 6, 0, 0.089, 4.15, 6063.3859, -2.2, -19, 0, 0.086, 4.03, 52.9691, 0, 0, 0, 0.085, 0.49, 47952.4409, -2.6, 11, 0, 0.085, 1.60, 7632.8154, 2.1, 32, 0, 0.084, 0.22, 14392.0773, -0.7, 6, 0, 0.083, 6.22, 6028.4466, -4.0, -41, 0, 0.083, 0.63, -7909.9389, 2.8, 26, 0, 0.083, 5.20, -77.5523, 0, 0, 0, 0.082, 2.74, 8786.1467, -2.2, -19, 0, 0.080, 2.43, 9166.5428, -2.8, -26, 0, 0.080, 3.70, -25405.1732, 4.1, 27, 0, 0.078, 5.68, 48857.5200, 5.4, 106, -1, 0.077, 1.85, 8315.5735, -2.2, -19, 0, 0.075, 5.46, -18191.1103, 1.9, 8, 0, 0.075, 1.41, -16238.6304, 1.3, 1, 0, 0.074, 5.06, 40110.0761, -0.4, 30, 0, 0.072, 2.10, 64.4343, -3.7, -44, 0, 0.071, 2.17, 37671.2695, -3.5, -6, 0, 0.069, 1.71, 16693.4313, -0.7, 6, 0, 0.069, 3.33, -26100.7028, -8.3, -119, 1, 0.068, 1.09, 8329.4028, 1.5, 25, 0, 0.068, 3.62, 8327.9801, 1.5, 25, 0, 0.068, 2.41, 16833.1509, -1.0, 3, 0, 0.067, 3.40, 24709.2971, -3.5, -20, 0, 0.067, 1.65, 8346.7156, -0.3, 3, 0, 0.066, 2.61, 22547.2677, 1.5, 39, 0, 0.066, 3.50, 15576.5113, -1.0, 3, 0, 0.065, 5.76, 33037.9886, -2.0, 5, 0, 0.065, 4.58, 8322.1325, -0.3, 3, 0, 0.065, 6.20, 17913.9868, 3.0, 50, 0, 0.065, 1.50, 22685.8295, -1.0, 9, 0, 0.065, 2.37, 7180.3058, -1.9, -15, 0, 0.064, 1.06, 30943.5332, 2.4, 56, 0, 0.064, 1.89, 8288.8765, 1.5, 25, 0, 0.064, 4.70, 6.0335, 0.3, 4, 0, 0.063, 2.83, 8368.5063, 1.5, 25, 0, 0.063, 5.66, -2580.7819, 0.7, 7, 0, 0.062, 3.78, 7056.3285, -2.2, -19, 0, 0.061, 1.49, 8294.9100, 1.8, 29, 0, 0.061, 0.12, -10281.1714, -0.9, -18, 0, 0.061, 3.06, -8362.4729, -1.2, -21, 0, 0.061, 4.43, 8170.9571, 1.5, 25, 0, 0.059, 5.78, -13.1179, -3.7, -44, 0, 0.059, 5.97, 6625.5702, -2.2, -19, 0, 0.058, 5.01, -0.5080, -0.3, 0, 0, 0.058, 2.73, 7161.0938, -2.2, -19, 0, 0.057, 0.19, 7214.0629, -2.2, -19, 0, 0.057, 4.00, 22199.5029, -4.7, -35, 0, 0.057, 5.38, 8119.1420, 5.8, 76, 0, 0.056, 1.07, 7542.6495, 1.5, 25, 0, 0.056, 0.28, 8486.4258, 1.5, 25, 0, 0.054, 4.19, 16655.0816, 4.6, 75, 0, 0.053, 0.72, 7267.0320, -2.2, -19, 0, 0.053, 3.12, 12.6192, 0.6, 7, 0, 0.052, 2.99, -32896.013, -1.8, -49, 0, 0.052, 3.46, 1097.708, 0, 0, 0, 0.051, 5.37, -6443.786, -1.6, -25, 0, 0.051, 1.35, 7789.401, -2.2, -19, 0, 0.051, 5.83, 40042.502, 0.2, 38, 0, 0.051, 3.63, 9114.733, 1.5, 25, 0, 0.050, 1.51, 8504.484, -2.5, -22, 0, 0.050, 5.23, 16659.684, 1.5, 25, 0, 0.050, 1.15, 7247.820, -2.5, -23, 0, 0.047, 0.25, -1290.421, 0.3, 0, 0, 0.047, 4.67, -32686.464, -6.1, -100, 0, 0.047, 3.49, 548.678, 0, 0, 0, 0.047, 2.37, 6663.308, -2.2, -19, 0, 0.046, 0.98, 1572.084, 0, 0, 0, 0.046, 2.04, 14954.262, -0.7, 6, 0, 0.046, 3.72, 6691.693, -2.2, -19, 0, 0.045, 6.19, -235.287, 0, 0, 0, 0.044, 2.96, 32967.001, -0.1, 27, 0, 0.044, 3.82, -1671.943, -5.6, -66, 0, 0.043, 5.82, 1179.063, 0, 0, 0, 0.043, 0.07, 34152.617, 1.7, 49, 0, 0.043, 3.71, 6514.773, -0.3, 0, 0, 0.043, 5.62, 15.732, -2.5, -23, 0, 0.043, 5.80, 8351.233, -2.2, -19, 0, 0.042, 0.27, 7740.199, 1.5, 25, 0, 0.042, 6.14, 15385.020, -0.7, 6, 0, 0.042, 6.13, 7285.051, -4.1, -41, 0, 0.041, 1.27, 32757.451, 4.2, 78, 0, 0.041, 4.46, 8275.722, 1.5, 25, 0, 0.040, 0.23, 8381.661, 1.5, 25, 0, 0.040, 5.87, -766.864, 2.5, 29, 0, 0.040, 1.66, 254.431, 0, 0, 0, 0.040, 0.40, 9027.981, -0.4, 0, 0, 0.040, 2.96, 7777.936, 1.5, 25, 0, 0.039, 4.67, 33943.068, 6.1, 100, 0, 0.039, 3.52, 8326.062, 1.5, 25, 0, 0.039, 3.75, 21013.887, -6.5, -57, 0, 0.039, 5.60, 606.978, 0, 0, 0, 0.039, 1.19, 8331.321, 1.5, 25, 0, 0.039, 2.84, 7211.433, -2.2, -19, 0, 0.038, 0.67, 7216.693, -2.2, -19, 0, 0.038, 6.22, 25161.867, 0.6, 28, 0, 0.038, 4.40, 7806.322, 1.5, 25, 0, 0.038, 4.16, 9179.168, -2.2, -19, 0, 0.037, 4.73, 14991.999, -0.7, 6, 0, 0.036, 0.35, 67.514, -0.6, -7, 0, 0.036, 3.70, 25266.611, -1.6, 0, 0, 0.036, 5.39, 16328.796, -0.7, 6, 0, 0.035, 1.44, 7174.248, -2.2, -19, 0, 0.035, 5.00, 15684.730, -4.4, -38, 0, 0.035, 0.39, -15.419, -2.2, -19, 0, 0.035, 6.07, 15020.385, -0.7, 6, 0, 0.034, 6.01, 7371.797, -2.2, -19, 0, 0.034, 0.96, -16623.626, -3.4, -54, 0, 0.033, 6.24, 9479.368, 1.5, 25, 0, 0.033, 3.21, 23661.896, 5.2, 82, 0, 0.033, 4.06, 8311.418, -2.2, -19, 0, 0.033, 2.40, 1965.105, 0, 0, 0, 0.033, 5.17, 15489.785, -0.7, 6, 0, 0.033, 5.03, 21986.540, 0.9, 31, 0, 0.033, 4.10, 16691.140, 2.7, 46, 0, 0.033, 5.13, 47114.589, 1.7, 63, 0, 0.033, 4.45, 8917.184, 1.5, 25, 0, 0.033, 4.23, 2.078, 0, 0, 0, 0.032, 2.33, 75.251, 1.5, 25, 0, 0.032, 2.10, 7253.878, -2.2, -19, 0, 0.032, 3.11, -0.224, 1.5, 25, 0, 0.032, 4.43, 16640.462, -0.7, 6, 0, 0.032, 5.68, 8328.363, 0, 0, 0, 0.031, 5.32, 8329.020, 3.0, 50, 0, 0.031, 3.70, 16118.093, -0.7, 6, 0, 0.030, 3.67, 16721.817, -0.7, 6, 0, 0.030, 5.27, -1881.492, -1.2, -15, 0, 0.030, 5.72, 8157.839, -2.2, -19, 0, 0.029, 5.73, -18400.313, -6.7, -94, 0, 0.029, 2.76, 16.000, -2.2, -19, 0, 0.029, 1.75, 8879.447, 1.5, 25, 0, 0.029, 0.32, 8851.061, 1.5, 25, 0, 0.029, 0.90, 14704.903, 3.7, 57, 0, 0.028, 2.90, 15595.723, -0.7, 6, 0, 0.028, 5.88, 16864.631, 0.2, 24, 0, 0.028, 0.63, 16869.234, -2.8, -26, 0, 0.028, 4.04, -18609.863, -2.4, -43, 0, 0.027, 5.83, 6727.736, -5.9, -63, 0, 0.027, 6.12, 418.752, 4.3, 51, 0, 0.027, 0.14, 41157.131, 3.9, 81, 0, 0.026, 3.80, 15.542, 0, 0, 0, 0.026, 1.68, 50181.698, 4.8, 99, -1, 0.026, 0.32, 315.469, 0, 0, 0, 0.025, 5.67, 19.188, 0.3, 0, 0, 0.025, 3.16, 62.133, -2.2, -19, 0, 0.025, 3.76, 15502.939, -0.7, 6, 0, 0.025, 4.53, 45999.961, -2.0, 19, 0, 0.024, 3.21, 837.851, -4.4, -51, 0, 0.024, 2.82, 38157.596, 0.3, 37, 0, 0.024, 5.21, 15540.124, -0.7, 6, 0, 0.024, 0.26, 14218.576, 0, 13, 0, 0.024, 3.01, 15545.384, -0.7, 6, 0, 0.024, 1.16, -17424.247, -0.6, -21, 0, 0.023, 2.34, -67.574, 0.6, 7, 0, 0.023, 2.44, 18.024, -1.9, -22, 0, 0.023, 3.70, 469.400, 0, 0, 0, 0.023, 0.72, 7136.511, -2.2, -19, 0, 0.023, 4.50, 15582.569, -0.7, 6, 0, 0.023, 2.80, -16586.395, -4.9, -72, 0, 0.023, 1.51, 80.182, 0, 0, 0, 0.023, 1.09, 5261.583, -1.5, -12, 0, 0.023, 0.56, 54956.954, -0.5, 44, 0, 0.023, 4.01, 8550.860, -2.2, -19, 0, 0.023, 4.46, 38995.448, -4.1, -14, 0, 0.023, 3.82, 2358.126, 0, 0, 0, 0.022, 3.77, 32271.125, 0.5, 34, 0, 0.022, 0.82, 15935.775, -0.7, 6, 0, 0.022, 1.07, 24013.421, -2.9, -13, 0, 0.022, 0.40, 8940.078, -2.2, -19, 0, 0.022, 2.06, 15700.489, -0.7, 6, 0, 0.022, 4.27, 15124.002, -5.0, -45, 0, 0.021, 1.16, 56071.583, 3.2, 88, 0, 0.021, 5.58, 9572.189, -2.2, -19, 0, 0.020, 1.70, -17.273, -3.7, -44, 0, 0.020, 3.05, 214.617, 0, 0, 0, 0.020, 4.41, 8391.048, -2.2, -19, 0, 0.020, 5.95, 23869.145, 2.4, 56, 0, 0.020, 0.42, 40947.927, -4.7, -21, 0, 0.019, 1.39, 5818.897, 0.3, 10, 0, 0.019, 0.71, 23873.747, -0.7, 6, 0, 0.019, 2.81, 7291.615, -2.2, -19, 0, 0.019, 5.09, 8428.018, -2.2, -19, 0, 0.019, 4.14, 6518.187, -1.6, -12, 0, 0.019, 3.85, 21.330, 0, 0, 0, 0.018, 0.66, 14445.046, -0.7, 6, 0, 0.018, 1.65, 0.966, -4.0, -48, 0, 0.018, 5.64, -17143.709, -6.8, -94, 0, 0.018, 6.01, 7736.432, -2.2, -19, 0, 0.018, 2.74, 31153.083, -1.9, 5, 0, 0.018, 4.58, 6116.355, -2.2, -19, 0, 0.018, 2.28, 46.401, 0.3, 0, 0, 0.018, 3.80, 10213.597, 1.4, 25, 0, 0.018, 2.84, 56281.132, -1.1, 36, 0, 0.018, 3.53, 8249.062, 1.5, 25, 0, 0.017, 4.43, 20871.911, -3, -13, 0, 0.017, 4.44, 627.596, 0, 0, 0, 0.017, 1.85, 628.308, 0, 0, 0, 0.017, 1.19, 8408.321, 2, 25, 0, 0.017, 1.95, 7214.056, -2, -19, 0, 0.017, 1.57, 7214.070, -2, -19, 0, 0.017, 1.65, 13870.811, -6, -60, 0, 0.017, 0.30, 22.542, -4, -44, 0, 0.017, 2.62, -119.445, 0, 0, 0, 0.016, 4.87, 5747.909, 2, 32, 0, 0.016, 4.45, 14339.108, -1, 6, 0, 0.016, 1.83, 41366.680, 0, 30, 0, 0.016, 4.53, 16309.618, -3, -23, 0, 0.016, 2.54, 15542.754, -1, 6, 0, 0.016, 6.05, 1203.646, 0, 0, 0, 0.015, 5.2, 2751.147, 0, 0, 0, 0.015, 1.8, -10699.924, -5, -69, 0, 0.015, 0.4, 22824.391, -3, -20, 0, 0.015, 2.1, 30666.756, -6, -39, 0, 0.015, 2.1, 6010.417, -2, -19, 0, 0.015, 0.7, -23729.470, -5, -75, 0, 0.015, 1.4, 14363.691, -1, 6, 0, 0.015, 5.8, 16900.689, -2, 0, 0, 0.015, 5.2, 23800.458, 3, 53, 0, 0.015, 5.3, 6035.000, -2, -19, 0, 0.015, 1.2, 8251.139, 2, 25, 0, 0.015, 3.6, -8.860, 0, 0, 0, 0.015, 0.8, 882.739, 0, 0, 0, 0.015, 3.0, 1021.329, 0, 0, 0, 0.015, 0.6, 23296.107, 1, 31, 0, 0.014, 5.4, 7227.181, 2, 25, 0, 0.014, 0.1, 7213.352, -2, -19, 0, 0.014, 4.0, 15506.706, 3, 50, 0, 0.014, 3.4, 7214.774, -2, -19, 0, 0.014, 4.6, 6665.385, -2, -19, 0, 0.014, 0.1, -8.636, -2, -22, 0, 0.014, 3.1, 15465.202, -1, 6, 0, 0.014, 4.9, 508.863, 0, 0, 0, 0.014, 3.5, 8406.244, 2, 25, 0, 0.014, 1.3, 13313.497, -8, -82, 0, 0.014, 2.8, 49276.619, -3, 0, 0, 0.014, 0.1, 30528.194, -3, -10, 0, 0.013, 1.7, 25128.050, 1, 31, 0, 0.013, 2.9, 14128.405, -1, 6, 0, 0.013, 3.4, 57395.761, 3, 80, 0, 0.013, 2.7, 13029.546, -1, 6, 0, 0.013, 3.9, 7802.556, -2, -19, 0, 0.013, 1.6, 8258.802, -2, -19, 0, 0.013, 2.2, 8417.709, -2, -19, 0, 0.013, 0.7, 9965.210, -2, -19, 0, 0.013, 3.4, 50391.247, 0, 48, 0, 0.013, 3.0, 7134.433, -2, -19, 0, 0.013, 2.9, 30599.182, -5, -31, 0, 0.013, 3.6, -9723.857, 1, 0, 0, 0.013, 4.8, 7607.084, -2, -19, 0, 0.012, 0.8, 23837.689, 1, 35, 0, 0.012, 3.6, 4.409, -4, -44, 0, 0.012, 5.0, 16657.031, 3, 50, 0, 0.012, 4.4, 16657.735, 3, 50, 0, 0.012, 1.1, 15578.803, -4, -38, 0, 0.012, 6.0, -11.490, 0, 0, 0, 0.012, 1.9, 8164.398, 0, 0, 0, 0.012, 2.4, 31852.372, -4, -17, 0, 0.012, 2.4, 6607.085, -2, -19, 0, 0.012, 4.2, 8359.870, 0, 0, 0, 0.012, 0.5, 5799.713, -2, -19, 0, 0.012, 2.7, 7220.622, 0, 0, 0, 0.012, 4.3, -139.720, 0, 0, 0, 0.012, 2.3, 13728.836, -2, -16, 0, 0.011, 3.6, 14912.146, 1, 31, 0, 0.011, 4.7, 14916.748, -2, -19, 0}, - //ML1 - { - 1.67680, 4.66926, 628.301955, -0.0266, 0.1, -0.005, 0.51642, 3.3721, 6585.760910, -2.158, -18.9, 0.09, 0.41383, 5.7277, 14914.452335, -0.635, 6.2, -0.04, 0.37115, 3.9695, 7700.389469, 1.550, 25.0, -0.12, 0.27560, 0.7416, 8956.993380, 1.496, 25.1, -0.13, 0.24599, 4.2253, -2.301200, 1.523, 25.1, -0.12, 0.07118, 0.1443, 7842.36482, -2.211, -19, 0.08, 0.06128, 2.4998, 16171.05625, -0.688, 6, 0, 0.04516, 0.443, 8399.67910, -0.36, 3, 0, 0.04048, 5.771, 14286.15038, -0.61, 6, 0, 0.03747, 4.626, 1256.60391, -0.05, 0, 0, 0.03707, 3.415, 5957.45895, -2.13, -19, 0.1, 0.03649, 1.800, 23243.14376, 0.89, 31, -0.2, 0.02438, 0.042, 16029.08089, 3.07, 50, -0.2, 0.02165, 1.017, -1742.93051, -3.68, -44, 0.2, 0.01923, 3.097, 17285.68480, 3.02, 50, -0.3, 0.01692, 1.280, 0.3286, 1.52, 25, -0.1, 0.01361, 0.298, 8326.3902, 3.05, 50, -0.2, 0.01293, 4.013, 7072.0875, 1.58, 25, -0.1, 0.01276, 4.413, 8330.9926, 0, 0, 0, 0.01270, 0.101, 8470.6668, -2.24, -19, 0.1, 0.01097, 1.203, 22128.5152, -2.82, -13, 0, 0.01088, 2.545, 15542.7543, -0.66, 6, 0, 0.00835, 0.190, 7214.0629, -2.18, -19, 0.1, 0.00734, 4.855, 24499.7477, 0.83, 31, -0.2, 0.00686, 5.130, 13799.8238, -4.34, -38, 0.2, 0.00631, 0.930, -486.3266, -3.73, -44, 0, 0.00585, 0.699, 9585.2953, 1.5, 25, 0, 0.00566, 4.073, 8328.3391, 1.5, 25, 0, 0.00566, 0.638, 8329.0437, 1.5, 25, 0, 0.00539, 2.472, -1952.4800, 0.6, 7, 0, 0.00509, 2.88, -0.7113, 0, 0, 0, 0.00469, 3.56, 30457.2066, -1.3, 12, 0, 0.00387, 0.78, -0.3523, 0, 0, 0, 0.00378, 1.84, 22614.8418, 0.9, 31, 0, 0.00362, 5.53, -695.8761, 0.6, 7, 0, 0.00317, 2.80, 16728.3705, 1.2, 28, 0, 0.00303, 6.07, 157.7344, 0, 0, 0, 0.00300, 2.53, 33.7570, -0.3, -4, 0, 0.00295, 4.16, 31571.8352, 2.4, 56, 0, 0.00289, 5.98, 7211.7617, -0.7, 6, 0, 0.00285, 2.06, 15540.4531, 0.9, 31, 0, 0.00283, 2.65, 2.6298, 0, 0, 0, 0.00282, 6.17, 15545.0555, -2.2, -19, 0, 0.00278, 1.23, -39.8149, 0, 0, 0, 0.00272, 3.82, 7216.3641, -3.7, -44, 0, 0.00270, 4.37, 70.9877, -1.9, -22, 0, 0.00256, 5.81, 13657.8484, -0.6, 6, 0, 0.00244, 5.64, -0.2237, 1.5, 25, 0, 0.00240, 2.96, 8311.7707, -2.2, -19, 0, 0.00239, 0.87, -33.7814, 0.3, 4, 0, 0.00216, 2.31, 15.9995, -2.2, -19, 0, 0.00186, 3.46, 5329.1570, -2.1, -19, 0, 0.00169, 2.40, 24357.772, 4.6, 75, 0, 0.00161, 5.80, 8329.403, 1.5, 25, 0, 0.00161, 5.20, 8327.980, 1.5, 25, 0, 0.00160, 4.26, 23385.119, -2.9, -13, 0, 0.00156, 1.26, 550.755, 0, 0, 0, 0.00155, 1.25, 21500.213, -2.8, -13, 0, 0.00152, 0.60, -16.921, -3.7, -44, 0, 0.00150, 2.71, -79.630, 0, 0, 0, 0.00150, 5.29, 15.542, 0, 0, 0, 0.00148, 1.06, -2371.232, -3.7, -44, 0, 0.00141, 0.77, 8328.691, 1.5, 25, 0, 0.00141, 3.67, 7143.075, -0.3, 0, 0, 0.00138, 5.45, 25614.376, 4.5, 75, 0, 0.00129, 4.90, 23871.446, 0.9, 31, 0, 0.00126, 4.03, 141.975, -3.8, -44, 0, 0.00124, 6.01, 522.369, 0, 0, 0, 0.00120, 4.94, -10071.622, -5.2, -69, 0, 0.00118, 5.07, -15.419, -2.2, -19, 0, 0.00107, 3.49, 23452.693, -3.4, -20, 0, 0.00104, 4.78, 17495.234, -1.3, 0, 0, 0.00103, 1.44, -18.049, -2.2, -19, 0, 0.00102, 5.63, 15542.402, -0.7, 6, 0, 0.00102, 2.59, 15543.107, -0.7, 6, 0, 0.00100, 4.11, -6.559, -1.9, -22, 0, 0.00097, 0.08, 15400.779, 3.1, 50, 0, 0.00096, 5.84, 31781.385, -1.9, 5, 0, 0.00094, 1.08, 8328.363, 0, 0, 0, 0.00094, 2.46, 16799.358, -0.7, 6, 0, 0.00094, 1.69, 6376.211, 2.2, 32, 0, 0.00093, 3.64, 8329.020, 3.0, 50, 0, 0.00093, 2.65, 16655.082, 4.6, 75, 0, 0.00090, 1.90, 15056.428, -4.4, -38, 0, 0.00089, 1.59, 52.969, 0, 0, 0, 0.00088, 2.02, -8257.704, -3.4, -47, 0, 0.00088, 3.02, 7213.711, -2.2, -19, 0, 0.00087, 0.50, 7214.415, -2.2, -19, 0, 0.00087, 0.49, 16659.684, 1.5, 25, 0, 0.00082, 5.64, -4.931, 1.5, 25, 0, 0.00079, 5.17, 13171.522, -4.3, -38, 0, 0.00076, 3.60, 29828.905, -1.3, 12, 0, 0.00076, 4.08, 24567.322, 0.3, 24, 0, 0.00076, 4.58, 1884.906, -0.1, 0, 0, 0.00073, 0.33, 31713.811, -1.4, 12, 0, 0.00073, 0.93, 32828.439, 2.4, 56, 0, 0.00071, 5.91, 38785.898, 0.2, 37, 0, 0.00069, 2.20, 15613.742, -2.5, -16, 0, 0.00066, 3.87, 15.732, -2.5, -23, 0, 0.00066, 0.86, 25823.926, 0.2, 24, 0, 0.00065, 2.52, 8170.957, 1.5, 25, 0, 0.00063, 0.18, 8322.132, -0.3, 0, 0, 0.00060, 5.84, 8326.062, 1.5, 25, 0, 0.00060, 5.15, 8331.321, 1.5, 25, 0, 0.00060, 2.18, 8486.426, 1.5, 25, 0, 0.00058, 2.30, -1.731, -4, -44, 0, 0.00058, 5.43, 14357.138, -2, -16, 0, 0.00057, 3.09, 8294.910, 2, 29, 0, 0.00057, 4.67, -8362.473, -1, -21, 0, 0.00056, 4.15, 16833.151, -1, 0, 0, 0.00054, 1.93, 7056.329, -2, -19, 0, 0.00054, 5.27, 8315.574, -2, -19, 0, 0.00052, 5.6, 8311.418, -2, -19, 0, 0.00052, 2.7, -77.552, 0, 0, 0, 0.00051, 4.3, 7230.984, 2, 25, 0, 0.00050, 0.4, -0.508, 0, 0, 0, 0.00049, 5.4, 7211.433, -2, -19, 0, 0.00049, 4.4, 7216.693, -2, -19, 0, 0.00049, 4.3, 16864.631, 0, 24, 0, 0.00049, 2.2, 16869.234, -3, -26, 0, 0.00047, 6.1, 627.596, 0, 0, 0, 0.00047, 5.0, 12.619, 1, 7, 0, 0.00045, 4.9, -8815.018, -5, -69, 0, 0.00044, 1.6, 62.133, -2, -19, 0, 0.00042, 2.9, -13.118, -4, -44, 0, 0.00042, 4.1, -119.445, 0, 0, 0, 0.00041, 4.3, 22756.817, -3, -13, 0, 0.00041, 3.6, 8288.877, 2, 25, 0, 0.00040, 0.5, 6663.308, -2, -19, 0, 0.00040, 1.1, 8368.506, 2, 25, 0, 0.00039, 4.1, 6443.786, 2, 25, 0, 0.00039, 3.1, 16657.383, 3, 50, 0, 0.00038, 0.1, 16657.031, 3, 50, 0, 0.00038, 3.0, 16657.735, 3, 50, 0, 0.00038, 4.6, 23942.433, -1, 9, 0, 0.00037, 4.3, 15385.020, -1, 6, 0, 0.00037, 5.0, 548.678, 0, 0, 0, 0.00036, 1.8, 7213.352, -2, -19, 0, 0.00036, 1.7, 7214.774, -2, -19, 0, 0.00035, 1.1, 7777.936, 2, 25, 0, 0.00035, 1.6, -8.860, 0, 0, 0, 0.00035, 4.4, 23869.145, 2, 56, 0, 0.00035, 2.0, 6691.693, -2, -19, 0, 0.00034, 1.3, -1185.616, -2, -22, 0, 0.00034, 2.2, 23873.747, -1, 6, 0, 0.00033, 2.0, -235.287, 0, 0, 0, 0.00033, 3.1, 17913.987, 3, 50, 0, 0.00033, 1.0, 8351.233, -2, -19, 0}, - //ML2 - {0.004870, 4.6693, 628.30196, -0.027, 0, -0.01, 0.002280, 2.6746, -2.30120, 1.523, 25, -0.12, 0.001500, 3.372, 6585.76091, -2.16, -19, 0.1, 0.001200, 5.728, 14914.45233, -0.64, 6, 0, 0.001080, 3.969, 7700.38947, 1.55, 25, -0.1, 0.000800, 0.742, 8956.99338, 1.50, 25, -0.1, 0.000254, 6.002, 0.3286, 1.52, 25, -0.1, 0.000210, 0.144, 7842.3648, -2.21, -19, 0, 0.000180, 2.500, 16171.0562, -0.7, 6, 0, 0.000130, 0.44, 8399.6791, -0.4, 3, 0, 0.000126, 5.03, 8326.3902, 3.0, 50, 0, 0.000120, 5.77, 14286.1504, -0.6, 6, 0, 0.000118, 5.96, 8330.9926, 0, 0, 0, 0.000110, 1.80, 23243.1438, 0.9, 31, 0, 0.000110, 3.42, 5957.4590, -2.1, -19, 0, 0.000110, 4.63, 1256.6039, -0.1, 0, 0, 0.000099, 4.70, -0.7113, 0, 0, 0, 0.000070, 0.04, 16029.0809, 3.1, 50, 0, 0.000070, 5.14, 8328.3391, 1.5, 25, 0, 0.000070, 5.85, 8329.0437, 1.5, 25, 0, 0.000060, 1.02, -1742.9305, -3.7, -44, 0, 0.000060, 3.10, 17285.6848, 3.0, 50, 0, 0.000054, 5.69, -0.352, 0, 0, 0, 0.000043, 0.52, 15.542, 0, 0, 0, 0.000041, 2.03, 2.630, 0, 0, 0, 0.000040, 0.10, 8470.667, -2.2, -19, 0, 0.000040, 4.01, 7072.088, 1.6, 25, 0, 0.000036, 2.93, -8.860, -0.3, 0, 0, 0.000030, 1.20, 22128.515, -2.8, -13, 0, 0.000030, 2.54, 15542.754, -0.7, 6, 0, 0.000027, 4.43, 7211.762, -0.7, 6, 0, 0.000026, 0.51, 15540.453, 0.9, 31, 0, 0.000026, 1.44, 15545.055, -2.2, -19, 0, 0.000025, 5.37, 7216.364, -3.7, -44, 0}, - //ML3 - {0.00001200, 1.041, -2.3012, 1.52, 25, -0.1, 0.00000170, 0.31, -0.711, 0, 0, 0}}, - - { //精度1角秒 - //MB0 - {18461.240, 0.05710892, 8433.466157492, -0.6400617, -0.5345, -0.00294, 1010.167, 2.412663, 16762.15758211, 0.88286, 24.537, -0.1265, 999.694, 5.440038, -104.77473287, 2.16299, 25.606, -0.1207, 623.652, 0.915047, 7109.28813249, -0.02177, 6.746, -0.0379, 199.484, 1.815303, 15647.5290228, -2.82482, -19.39, 0.0799, 166.574, 4.842677, -1219.4032921, -1.5447, -18.33, 0.086, 117.261, 4.17086, 23976.2204475, -1.3019, 5.68, -0.044, 61.912, 4.76822, 25090.8490067, 2.4058, 49.61, -0.250, 33.357, 3.27060, 15437.979557, 1.5012, 31.8, -0.161, 31.760, 1.51241, 8223.916692, 3.6859, 50.7, -0.244, 29.577, 0.95817, 6480.986177, 0.0049, 6.7, -0.032, 15.566, 2.4871, -9548.094717, -3.068, -43.4, 0.21, 15.122, 0.2432, 32304.911872, 0.221, 30.7, -0.17, 12.094, 4.0135, 7737.590088, -0.048, 6.8, -0.04, 8.868, 1.8584, 15019.227068, -2.798, -19.5, 0.09, 8.045, 5.3812, 8399.709110, -0.332, 3.1, -0.02, 7.959, 4.2140, 23347.918492, -1.275, 5.6, -0.04, 7.435, 4.8858, -1847.705247, -1.518, -18.4, 0.09, 6.731, 3.8274, -16133.855627, -0.910, -24.5, 0.12, 6.580, 2.6732, 14323.350998, -2.207, -12.1, 0.04, 6.460, 3.1556, 9061.768113, -0.667, -0.5, -0.01, 6.296, 0.1713, 25300.398472, -1.920, -1.6, -0.01, 5.632, 0.8000, 733.076688, -2.190, -26, 0.12, 5.368, 2.1140, 16204.843302, -0.971, 3, -0.02, 5.311, 5.5111, 17390.459537, 0.856, 25, -0.13, 5.076, 2.2553, 523.52722, 2.136, 26, -0.13, 4.840, 6.1830, -7805.16420, 0.613, 1, 0, 4.806, 5.1414, -662.08901, 0.309, 4, -0.02, 3.984, 0.8406, 33419.54043, 3.929, 75, -0.37, 3.674, 5.0288, 22652.04242, -0.684, 13, -0.08, 2.998, 5.9291, 31190.28331, -3.487, -13, 0.04, 2.799, 2.1842, -16971.70705, 3.443, 27, -0.11, 2.414, 3.5735, 22861.59189, -5.010, -38, 0.16, 2.186, 3.9424, -9757.64418, 1.258, 8, -0.03, 2.146, 5.6262, 23766.67098, 3.024, 57, -0.29, 1.766, 3.3137, 14809.67760, 1.528, 32, -0.2, 1.624, 2.6013, 7318.83760, -4.35, -44, 0.2, 1.581, 3.8680, 16552.60812, 5.21, 76, -0.4, 1.520, 2.599, 40633.60330, 1.74, 56, -0.3, 1.516, 0.132, -17876.78614, -4.59, -68, 0.3, 1.510, 3.927, 8399.68473, -0.33, 3, 0, 1.318, 4.914, 16275.83098, -2.85, -19, 0.1, 1.264, 0.986, 24604.52240, -1.33, 6, 0, 1.192, 2.001, 39518.97474, -1.96, 12, -0.1, 1.135, 0.286, 31676.60992, 0.25, 31, -0.2, 1.086, 1.001, 5852.68422, 0.03, 7, 0, 1.019, 2.527, 33629.08990, -0.40, 23, -0.1, 0.823, 0.086, 16066.28151, 1.47, 32, -0.2, 0.804, 1.957, -33.78706, 0.28, 4, 0, 0.803, 5.212, 16833.14526, -1.00, 3, 0, 0.793, 1.472, -24462.54705, -2.43, -50, 0.2, 0.791, 1.658, -591.10134, -1.57, -18, 0.1, 0.667, 4.470, 24533.53473, 0.55, 28, -0.1, 0.650, 2.530, -10176.39667, -3.04, -43, 0.2, 0.639, 1.583, 25719.15096, 2.38, 50, -0.3, 0.634, 0.318, 5994.65957, -3.73, -37, 0.2, 0.631, 2.147, 8435.76736, -2.16, -26, 0.1, 0.630, 1.109, 8431.16496, 0.88, 25, -0.1, 0.596, 2.716, 13695.04904, -2.18, -12, 0.1, 0.589, 1.214, 7666.60241, 1.83, 29, -0.1, 0.473, 1.101, 30980.7338, 0.84, 38, -0.2, 0.456, 0.116, -71.0177, 1.85, 22, -0.1, 0.430, 2.786, -8990.7804, -1.21, -21, 0.1, 0.416, 1.454, 16728.4005, 1.19, 28, -0.1, 0.415, 5.072, 22023.7405, -0.66, 13, -0.1, 0.383, 4.257, 22719.6165, -1.25, 6, 0, 0.352, 2.972, 14880.6653, -0.35, 10, -0.1, 0.339, 5.972, 30561.9814, -3.46, -13, 0, 0.329, 1.587, -18086.3356, -0.26, -17, 0.1, 0.326, 1.016, 8467.2232, -0.95, -4, 0, 0.315, 1.902, 14390.9251, -2.77, -20, 0.1, 0.313, 4.611, 8852.2186, 3.66, 51, -0.2, 0.305, 0.616, 6551.9739, -1.88, -15, 0.1, 0.301, 4.728, -7595.6147, -3.71, -51, 0.2, 0.299, 1.874, 7143.0452, -0.33, 3, 0, 0.291, 3.156, -1428.9528, 2.78, 33, -0.2, 0.269, 4.929, -2476.0072, -1.49, -18, 0.1, 0.263, 3.196, 41748.2319, 5.45, 100, -0.5, 0.254, 3.387, -1009.8538, -5.87, -70, 0.3, 0.245, 1.930, 32514.4613, -4.10, -20, 0.1, 0.237, 3.342, 32933.2138, 0.19, 31, -0.2, 0.214, 3.617, 22233.2899, -4.98, -38, 0.2, 0.213, 4.357, 47847.6662, -0.44, 37, -0.2, 0.206, 3.872, 23418.9062, -3.16, -16, 0.1, 0.172, 5.772, 14951.6530, -2.2, -12, 0, 0.158, 2.04, 38890.6728, -1.9, 12, 0, 0.146, 1.70, 32095.3624, 4.5, 82, 0, 0.145, 4.29, 40843.1528, -2.6, 5, 0, 0.139, 2.90, 7876.1519, -2.5, -23, 0, 0.138, 4.95, 48962.2947, 3.3, 81, 0, 0.134, 3.97, 8365.8920, -0.1, 7, 0, 0.134, 4.06, -26205.4776, -6.1, -94, 0, 0.130, 1.40, -8643.0156, 5.0, 52, 0, 0.129, 5.67, 23138.3690, 3.1, 57, 0, 0.124, 2.64, 40005.3013, 1.8, 56, 0, 0.118, 4.88, 41957.7813, 1.1, 49, 0, 0.113, 3.78, -15505.5537, -0.9, -24, 0, 0.113, 4.87, 16904.1329, -2.9, -19, 0, 0.113, 1.84, 23280.3444, -0.7, 13, 0, 0.110, 0.43, -17319.4719, -2.7, -47, 0, 0.105, 1.61, 37.2006, -1.6, -18, 0, 0.102, 1.28, 25161.8367, 0.5, 28, 0, 0.095, 0.76, 1361.3786, -2.2, -25, 0, 0.094, 0.50, 29866.1053, -2.9, -6, 0, 0.092, 6.22, 24881.2995, 6.7, 101, 0, 0.088, 3.99, -10385.9461, 1.3, 8, 0, 0.085, 4.71, 70.9933, -1.9, -22, 0, 0.084, 0.86, 15613.7720, -2.5, -16, 0, 0.081, 4.43, 21537.4139, -4.4, -31, 0, 0.080, 1.86, -8365.9521, 0, -7, 0, 0.080, 0, 16728.3762, 1.2, 28, 0, 0.079, 2.44, -8919.7928, -3.1, -43, 0, 0.078, 3.69, -452.5395, -4.0, -48, 0, 0.075, 5.40, -32791.2385, -4.0, -75, 0, 0.073, 5.80, -1185.6462, -1.9, -22, 0, 0.070, 3.46, 16759.8564, 2.4, 50, 0, 0.069, 3.36, 14181.3756, 1.6, 32, 0, 0.068, 4.50, 16764.4588, -0.6, -1, 0, 0.067, 4.74, 8446.0854, 0, 7, 0, 0.066, 5.86, 24185.7699, -5.6, -46, 0, 0.064, 0.54, 32862.2262, 2.1, 53, 0, 0.063, 2.44, 24394.9729, 3.0, 57, 0, 0.063, 1.77, 5785.1101, 0.6, 14, 0, 0.062, 2.64, 6690.5356, -4.3, -45, 0, 0.062, 2.21, 1151.8292, 2.1, 26, 0, 0.062, 3.94, 34047.8424, 3.9, 75, 0, 0.060, 1.40, 38404.3462, -5.7, -32, 0, 0.058, 0.33, 31048.3080, 0.3, 31, 0, 0.057, 3.11, 9690.0701, -0.7, 0, 0, 0.057, 1.14, 30352.4319, 0.9, 38, 0, 0.056, 6.00, 8504.4538, -2.5, -22, 0, 0.055, 5.47, 18018.7615, 0.8, 25, 0, 0.055, 0.17, -18505.0881, -4.6, -69, 0, 0.055, 0.76, -9129.3422, 1.2, 8, 0, 0.054, 5.70, 7947.1396, -4.4, -44, 0, 0.053, 0.36, 5366.358, -3.7, -37, 0, 0.052, 4.01, -68.726, -1.5, -18, 0, 0.051, 2.74, 31818.585, -3.5, -13, 0, 0.051, 0.98, 16798.206, -2.8, -19, 0, 0.050, 5.94, 8293.747, -0.3, 0, 0, 0.049, 1.52, 15090.215, -4.7, -41, 0, 0.048, 3.46, 39309.425, 2.4, 63, 0, 0.046, 3.21, 23942.463, -1.0, 9, 0, 0.046, 3.35, 7143.070, -0.3, 0, 0, 0.042, 3.76, 46733.038, -4.1, -7, 0, 0.042, 5.18, 8288.351, 0, 7, 0, 0.040, 3.37, 16795.915, 0.6, 21, 0, 0.039, 4.54, -1776.718, -3.4, -40, 0, 0.039, 0.04, 8439.500, -0.3, 0, 0, 0.037, 3.91, 8479.867, -0.3, 0, 0, 0.037, 2.86, 38194.797, -1.3, 19, 0, 0.036, 1.04, 5224.382, 0.1, 7, 0, 0.036, 3.57, 15995.294, 3.4, 54, 0, 0.036, 5.33, 23209.357, 1.2, 35, 0, 0.035, 1.02, 8452.654, -0.3, 0, 0, 0.035, 4.31, 8294.904, 1.8, 29, 0, 0.035, 2.76, 13066.747, -2.2, -12, 0, 0.034, 6.07, 15508.967, -0.4, 10, 0, 0.032, 1.89, -17529.021, 1.6, 0, 0, 0.031, 5.70, 41261.905, 1.7, 56, 0, 0.031, 5.33, 30075.655, -7.2, -57, 0, 0.031, 5.97, -40.340, -1.5, -18, 0, 0.030, 2.87, 6533.950, 0, 7, 0, 0.030, 0.36, 49171.844, -1.1, 30, 0, 0.030, 4.40, 47219.364, -0.4, 37, 0, 0.030, 0.39, 23489.894, -5.0, -38, 0, 0.029, 5.12, 21395.439, -0.6, 13, 0, 0.029, 2.62, 8715.153, -0.3, 0, 0, 0.029, 2.94, 16826.592, -2.8, -19, 0, 0.028, 6.23, 31747.598, -1.6, 9, 0, 0.028, 0.43, 56176.358, 1.1, 62, 0, 0.027, 2.32, 8792.706, -0.3, 0, 0, 0.026, 3.02, 14252.363, -0.3, 10, 0, 0.025, 5.10, 40147.277, -2.0, 12, 0, 0.025, 4.59, 8433.795, 0.9, 25, 0, 0.025, 4.95, 8433.138, -2.2, -26, 0, 0.025, 1.03, -9338.545, -7.4, -95, 0, 0.024, 0.68, 17180.910, 5.2, 76, 0, 0.024, 3.81, 25057.092, 2.7, 53, 0, 0.024, 6.02, 29933.679, -3.4, -13, 0, 0.024, 2.37, -15924.306, -5.2, -76, 0, 0.024, 3.46, 8681.372, 0, 7, 0, 0.023, 2.80, 7108.936, 0, 7, 0, 0.023, 2.17, 7109.640, 0, 7, 0, 0.023, 2.57, -10804.699, -3.0, -44, 0, 0.022, 1.21, 6323.246, 0, 7, 0, 0.022, 3.22, 8259.965, 0, 7, 0, 0.022, 1.97, 7106.987, 1.5, 32, 0, 0.022, 3.00, 7111.589, -1.5, -18, 0, 0.022, 1.22, 14532.900, -6.5, -63, 0, 0.021, 0.66, 5923.672, -1.8, -15, 0, 0.021, 0.69, 24047.208, -3.2, -16, 0, 0.020, 5.51, -26415.027, -1.8, -42, 0, 0.020, 3.70, 16745.237, -2.8, -19, 0, 0.020, 1.26, 7038.300, 1.9, 29, 0, 0.020, 5.78, 6716.267, 0, 7, 0, 0.020, 3.76, 7895.330, 0, 7, 0, 0.019, 0.44, -121.695, -1.5, -18, 0, 0.018, 2.16, 15576.541, -0.9, 0, 0, 0.018, 0.09, -17248.484, -4.6, -68, 0, 0.018, 6.14, -7176.862, 0.6, 0, 0, 0.018, 5.55, 50076.923, 7.0, 125, -1, 0.017, 2.47, 8257.674, 3, 47, 0, 0.017, 4.20, 31609.036, 1, 38, 0, 0.017, 0.50, 175.762, -4, -48, 0, 0.017, 3.20, -2057.255, 3, 33, 0}, - //MB1 - {0.07430, 4.0998, 6480.98618, 0.005, 7, -0.03, 0.03043, 0.872, 7737.59009, -0.05, 7, 0, 0.02229, 5.000, 15019.22707, -2.80, -19, 0.1, 0.01999, 1.072, 23347.91849, -1.28, 6, 0, 0.01869, 1.744, -1847.70525, -1.52, -18, 0.1, 0.01696, 5.597, 16133.8556, 0.91, 24, -0.1, 0.01623, 0.014, 9061.7681, -0.67, 0, 0, 0.01419, 3.942, 733.0767, -2.19, -26, 0.1, 0.01338, 2.370, 17390.4595, 0.86, 25, -0.1, 0.01304, 5.633, 8399.6847, -0.33, 3, 0, 0.01279, 0.886, -523.5272, -2.14, -26, 0.1, 0.01215, 3.242, 7805.1642, -0.61, -1, 0, 0.01088, 3.686, 8435.7674, -2.16, -26, 0.1, 0.01088, 5.853, 8431.1650, 0.88, 25, -0.1, 0.00546, 4.143, 5852.6842, 0, 7, 0, 0.00443, 0.17, 14809.6776, 1.5, 32, 0, 0.00342, 2.24, 8399.7091, -0.3, 3, 0, 0.00330, 1.77, 16275.8310, -2.9, -19, 0, 0.00318, 4.13, 24604.5224, -1.3, 6, 0, 0.00296, 0.90, 7109.2881, 0, 7, 0, 0.00285, 3.43, 31676.6099, 0.2, 31, 0, 0.00207, 3.23, 16066.2815, 1.5, 32, 0, 0.00202, 2.07, 16833.1453, -1.0, 3, 0, 0.00202, 5.10, -33.7871, 0.3, 4, 0, 0.00200, 1.67, 24462.5471, 2.4, 50, 0, 0.00198, 4.80, -591.1013, -1.6, -18, 0, 0.00193, 1.12, 22719.6165, -1.2, 6, 0, 0.00164, 5.67, -10176.397, -3.0, -43, 0, 0.00161, 4.73, 25719.151, 2.4, 50, 0, 0.00158, 5.04, 14390.925, -2.8, -20, 0, 0.00149, 5.86, 13695.049, -2.2, -12, 0, 0.00135, 1.79, -2476.007, -1.5, -18, 0, 0.00121, 1.93, 16759.856, 2.4, 50, 0, 0.00117, 6.04, 16764.459, -0.6, 0, 0, 0.00104, 1.93, 22023.740, -0.7, 13, 0, 0.00085, 2.83, 30561.981, -3.5, -13, 0, 0.00079, 4.81, -8852.219, -3.7, -51, 0, 0.00076, 1.59, -7595.615, -3.7, -51, 0, 0.00075, 2.91, 8433.795, 0.9, 25, 0, 0.00075, 0.35, 8433.138, -2.2, -26, 0, 0.00073, 0.13, 70.993, -1.9, -22, 0, 0.00069, 1.70, 16728.376, 1.2, 28, 0, 0.00068, 0.83, 8365.892, -0.1, 7, 0, 0.00060, 0.20, 32933.214, 0.2, 31, 0, 0.00060, 0.31, 8446.085, 0, 7, 0}, - //MB2 - {0.000220, 4.100, 6480.9862, 0, 7, 0, 0.000101, 5.24, 8435.7674, -2.2, -26, 0, 0.000101, 4.30, 8431.1650, 0.9, 25, 0, 0.000090, 0.87, 7737.5901, 0, 7, 0, 0.000060, 1.07, 23347.9185, -1.3, 6, 0, 0.000060, 5.00, 15019.2271, -2.8, -19, 0, 0.000050, 1.74, -1847.705, -1.5, -18, 0, 0.000050, 5.60, 16133.856, 0.9, 24, 0, 0.000050, 0.01, 9061.768, -0.7, 0, 0, 0.000040, 3.24, 7805.164, -0.6, 0, 0, 0.000040, 3.94, 733.077, -2.2, -26, 0, 0.000040, 0.89, -523.527, -2.1, -26, 0}}, - - { //精度1千米 - //MR0 - {385000.510, 0, 0, 0, 0, 0, 20905.354, 5.4971472, 8328.691424623, 1.522924, 25.0719, -0.12360, 3699.111, 4.8997864, 7214.06286536, -2.184756, -18.860, 0.0828, 2955.967, 0.972156, 15542.75428998, -0.66183, 6.212, -0.0408, 569.925, 1.569516, 16657.3828492, 3.04585, 50.14, -0.2472, 246.158, 5.68582, -1114.6285593, -3.7077, -43.93, 0.206, 204.586, 1.01528, 14914.4523348, -0.6352, 6.15, -0.035, 170.733, 3.32771, 23871.4457146, 0.8611, 31.28, -0.164, 152.138, 4.94291, 6585.7609101, -2.1581, -18.92, 0.088, 129.620, 0.74291, -7700.3894694, -1.5496, -25.01, 0.118, 108.743, 5.19847, 7771.3771450, -0.3309, 3.1, -0.020, 104.755, 2.31243, 8956.993380, 1.4963, 25.1, -0.129, 79.661, 5.38293, -8538.240890, 2.8030, 26.1, -0.118, 48.888, 6.24006, 628.301955, -0.0266, 0.1, -0.005, 34.783, 2.73035, 22756.817155, -2.847, -12.6, 0.04, 30.824, 4.0706, 16171.056245, -0.688, 6.3, -0.05, 24.208, 1.7151, 7842.364821, -2.211, -18.8, 0.08, 23.210, 3.9251, 24986.074274, 4.569, 75.2, -0.37, 21.636, 0.3748, 14428.125731, -4.370, -37.7, 0.17, 16.675, 2.0137, 8399.679100, -0.358, 3.2, -0.03, 14.403, 3.3303, -9443.319984, -5.231, -69.0, 0.33, 12.831, 3.3708, 23243.143759, 0.888, 31.2, -0.16, 11.650, 5.0859, 31085.508580, -1.324, 12, -0.08, 10.445, 5.6833, 32200.13714, 2.384, 56, -0.29, 10.321, 0.8579, -1324.17803, 0.618, 7, -0.03, 10.056, 5.7290, -1742.93051, -3.681, -44, 0.21, 9.884, 1.0584, 14286.15038, -0.609, 6, -0.03, 8.752, 4.7856, -9652.86945, -0.905, -18, 0.09, 8.379, 5.9845, -557.31428, -1.854, -22, 0.10, 7.003, 4.6705, -16029.08089, -3.072, -50, 0.24, 6.322, 1.2708, 16100.06857, 1.192, 28, -0.14, 5.751, 4.6680, 17285.68480, 3.019, 50, -0.25, 4.950, 4.9860, 5957.45895, -2.131, -19, 0.09, 4.421, 4.5969, -209.54947, 4.326, 51, -0.24, 4.131, 3.2135, 7004.51340, 2.141, 32, -0.16, 3.958, 2.7735, 22128.51520, -2.820, -13, 0.05, 3.258, 0.6735, 14985.44001, -2.52, -16, 0.1, 3.148, 0.114, 16866.93231, -1.28, -1, 0, 2.616, 0.143, 24499.74767, 0.83, 31, -0.2, 2.354, 1.672, 8470.66678, -2.24, -19, 0.1, 2.117, 0.700, -7072.08751, -1.58, -25, 0.1, 1.897, 0.418, 13799.82378, -4.34, -38, 0.2, 1.739, 3.629, -8886.00570, -3.38, -47, 0.2, 1.571, 5.129, 30457.20662, -1.30, 12, -0.1, 1.423, 1.158, 39414.20000, 0.20, 37, -0.2, 1.419, 6.171, 23314.13143, -0.99, 9, -0.1, 1.166, 2.269, 9585.29534, 1.47, 25, -0.1, 1.117, 6.281, 33314.76570, 6.09, 100, -0.5, 1.066, 6.197, 1256.60391, -0.05, 0, 0, 1.059, 4.068, 8364.73984, -2.18, -19, 0.1, 0.933, 4.369, 16728.3705, 1.17, 28, -0.1, 0.862, 4.601, 6656.7486, -4.04, -41, 0.2, 0.851, 2.800, 70.9877, -1.88, -22, 0.1, 0.849, 5.726, 31571.8352, 2.41, 56, -0.3, 0.796, 5.084, -9095.5552, 0.95, 4, 0, 0.779, 0.975, -17772.0114, -6.75, -94, 0.5, 0.774, 2.658, 15752.3038, -4.99, -45, 0.2, 0.728, 0.266, 8326.3902, 3.05, 50, -0.2, 0.683, 1.304, 8330.9926, 0, 0, 0, 0.670, 1.756, 40528.8286, 3.91, 81, -0.4, 0.658, 3.414, 22614.8418, 0.91, 31, -0.2, 0.657, 0.901, -1952.4800, 0.64, 7, 0, 0.598, 6.026, 8393.1258, -2.18, -19, 0.1, 0.596, 5.014, 24080.9952, -3.46, -20, 0.1, 0.579, 5.829, 23385.1191, -2.87, -13, 0, 0.514, 4.302, 6099.4343, -5.89, -63, 0.3, 0.508, 1.830, 14218.5763, -0.04, 13, -0.1, 0.498, 5.242, 7143.0752, -0.30, 3, 0, 0.495, 3.373, -10071.6219, -5.20, -69, 0.3, 0.473, 2.430, -17981.5609, -2.43, -43, 0.2, 0.456, 4.887, -8294.9344, -1.83, -29, 0.1, 0.453, 0.173, 8362.4485, 1.21, 21, -0.1, 0.423, 4.489, 29970.8800, -5.03, -32, 0.1, 0.422, 2.315, -24357.7723, -4.60, -75, 0.4, 0.411, 1.102, 13657.8484, -0.58, 6, 0, 0.410, 0.500, 8311.7707, -2.18, -19, 0.1, 0.379, 3.626, 24428.7600, 2.71, 53, 0, 0.355, 0.740, 25614.3762, 4.54, 75, 0, 0.343, 5.772, -2371.2325, -3.7, -44, 0, 0.335, 0.857, 9166.5428, -2.8, -26, 0, 0.332, 0.444, -8257.7037, -3.4, -47, 0, 0.323, 4.829, -10281.1714, -0.9, -18, 0, 0.322, 5.758, 5889.8848, -1.6, -12, 0, 0.287, 0.56, 38299.5714, -3.5, -6, 0, 0.284, 5.57, 15333.2048, 3.7, 57, 0, 0.279, 2.82, 21500.2132, -2.8, -13, 0, 0.256, 0.72, 14357.1381, -2.5, -16, 0, 0.248, 2.20, -7909.9389, 2.8, 26, 0, 0.245, 1.90, 31713.8105, -1.4, 12, 0, 0.237, 3.47, 15056.4277, -4.4, -38, 0, 0.213, 3.77, 15613.7420, -2.5, -16, 0, 0.213, 2.50, 32828.4391, 2.4, 56, 0, 0.209, 3.26, 6376.2114, 2.2, 32, 0, 0.205, 2.93, 14967.4158, -0.7, 6, 0, 0.205, 2.02, 15540.4531, 0.9, 31, 0, 0.204, 3.06, 15545.0555, -2.2, -19, 0, 0.203, 1.20, 38785.8980, 0.2, 37, 0, 0.201, 6.06, 6447.1991, 0.3, 10, 0, 0.186, 6.13, -16238.6304, 1.3, 1, 0, 0.183, 2.13, 21642.1886, -6.6, -57, 0, 0.169, 3.29, -8815.0180, -5.3, -69, 0, 0.167, 1.06, 8328.3391, 1.5, 25, 0, 0.167, 0.51, 8329.0437, 1.5, 25, 0, 0.167, 1.26, 14756.7124, -0.7, 6, 0, 0.158, 0.07, 17495.2343, -1.3, -1, 0, 0.157, 0.57, 6638.7244, -2.2, -19, 0, 0.157, 6.21, 22685.8295, -1.0, 9, 0, 0.148, 5.03, 5329.1570, -2.1, -19, 0, 0.148, 4.03, 16799.3582, -0.7, 6, 0, 0.145, 0.05, 7178.0144, 1.5, 25, 0, 0.144, 5.64, -486.3266, -3.7, -44, 0, 0.139, 3.51, 47742.8914, 1.7, 63, 0, 0.138, 4.07, 7935.6705, 1.5, 25, 0, 0.136, 4.63, -15400.7789, -3.1, -50, 0, 0.136, 3.96, -695.8761, 0.6, 7, 0, 0.135, 5.95, 7211.7617, -0.7, 6, 0, 0.128, 5.17, 29828.9047, -1.3, 12, 0, 0.127, 1.18, 7753.3529, 1.5, 25, 0, 0.127, 0.71, 7216.3641, -3.7, -44, 0, 0.124, 5.83, 15149.7333, -0.7, 6, 0, 0.121, 1.46, 8000.1048, -2.2, -19, 0, 0.120, 3.78, 8721.7124, 1.5, 25, 0, 0.116, 5.19, 6428.0209, -2.2, -19, 0, 0.114, 2.89, -1185.6162, -1.8, -22, 0, 0.112, 2.85, 15542.4020, -0.7, 6, 0, 0.112, 2.23, 15543.1066, -0.7, 6, 0, 0.110, 0.51, 7213.7105, -2.2, -19, 0, 0.110, 6.15, 7214.4152, -2.2, -19, 0, 0.110, 1.31, 15471.7666, 1.2, 28, 0, 0.109, 2.46, 141.9754, -3.8, -44, 0, 0.108, 0.46, 13171.5218, -4.3, -38, 0, 0.108, 6.13, 23942.4334, -1.0, 9, 0, 0.107, 3.15, 15508.9972, -0.4, 10, 0, 0.105, 0.39, 8904.030, 1.5, 25, 0, 0.105, 4.93, 14392.077, -0.7, 6, 0, 0.103, 2.47, 25195.624, 0.2, 24, 0, 0.101, 3.48, 6821.042, -2.2, -19, 0, 0.099, 4.37, 7149.629, 1.5, 25, 0, 0.099, 1.27, -17214.697, -4.9, -72, 0, 0.096, 1.93, 15576.511, -1.0, 0, 0, 0.086, 2.92, 46628.263, -2.0, 19, 0, 0.085, 6.22, 8504.484, -2.5, -22, 0, 0.080, 3.40, -2438.807, -3.1, -37, 0, 0.080, 1.17, 8786.147, -2.2, -19, 0, 0.077, 3.61, 7230.984, 1.5, 25, 0, 0.071, 0.28, 8315.574, -2.2, -19, 0, 0.067, 4.53, 29342.578, -5.0, -32, 0, 0.065, 2.24, 31642.823, 0.5, 34, 0, 0.063, 5.80, 8329.403, 1.5, 25, 0, 0.063, 2.05, 8327.980, 1.5, 25, 0, 0.062, 0.08, 8346.716, -0.3, 0, 0, 0.061, 4.85, 36.048, -3.7, -44, 0, 0.061, 2.58, 6063.386, -2.2, -19, 0, 0.061, 4.30, -766.864, 2.5, 29, 0, 0.060, 3.01, 8322.132, -0.3, 0, 0, 0.059, 0.44, 25057.062, 2.7, 53, 0, 0.059, 0.31, 8288.877, 1.5, 25, 0, 0.059, 2.35, 41643.457, 7.6, 125, -1, 0.059, 1.26, 8368.506, 1.5, 25, 0, 0.058, 1.80, 39900.527, 3.9, 81, 0, 0.058, 1.87, 13590.274, 0, 13, 0, 0.057, 0.47, 14954.262, -0.7, 6, 0, 0.057, 6.20, 8294.910, 1.8, 29, 0, 0.056, 4.63, -8362.473, -1.2, -21, 0, 0.055, 2.86, 8170.957, 1.5, 25, 0, 0.055, 0.03, 7632.815, 2.1, 32, 0, 0.053, 0.80, 7180.306, -1.9, -15, 0, 0.053, 4.64, 6028.447, -4.0, -41, 0, 0.053, 4.57, 15385.020, -0.7, 6, 0, 0.052, 0.60, 37671.269, -3.5, -6, 0, 0.052, 4.99, 8486.426, 1.5, 25, 0, 0.051, 4.62, 17913.987, 3.0, 50, 0, 0.050, 1.64, 837.851, -4.4, -51, 0, 0.049, 5.79, 7542.649, 1.5, 25, 0, 0.049, 2.06, 9114.733, 1.5, 25, 0, 0.049, 2.21, 7056.329, -2.2, -19, 0, 0.049, 4.90, 7214.063, -2.2, -19, 0, 0.048, 5.39, -1671.943, -5.6, -66, 0, 0.047, 4.90, -26100.703, -8.3, -119, 1, 0.047, 1.60, -9024.567, -0.9, -18, 0, 0.046, 1.16, 7161.094, -2.2, -19, 0, 0.046, 5.77, 30943.533, 2.4, 56, 0, 0.046, 2.43, 22199.503, -4.7, -35, 0, 0.046, 3.16, 14991.999, -0.7, 6, 0, 0.044, 4.11, 48857.520, 5.4, 106, -1, 0.044, 4.39, 6625.570, -2.2, -19, 0, 0.044, 6.06, 7789.401, -2.2, -19, 0, 0.043, 0.14, 16693.431, -0.7, 6, 0, 0.043, 4.50, 15020.385, -0.7, 6, 0, 0.043, 4.35, 5471.132, -5.9, -63, 0, 0.043, 4.32, 575.338, 0, 0, 0, 0.043, 5.43, 7267.032, -2.2, -19, 0, 0.043, 3.82, 16328.796, -0.7, 6, 0, 0.042, 2.73, -17424.247, -0.6, -21, 0, 0.041, 3.60, 15489.785, -0.7, 6, 0, 0.040, 2.62, 16655.082, 4.6, 75, 0, 0.040, 4.23, 8351.233, -2.2, -19, 0, 0.039, 0.66, -6443.786, -1.6, -25, 0, 0.039, 2.13, 16118.093, -0.7, 6, 0, 0.039, 5.86, 7247.820, -2.5, -23, 0, 0.038, 4.56, 7285.051, -4.1, -41, 0, 0.038, 2.59, 9179.168, -2.2, -19, 0, 0.038, 1.42, 393.021, 0, 0, 0, 0.038, 4.94, 8381.661, 1.5, 25, 0, 0.037, 5.06, 23452.693, -3.4, -20, 0, 0.037, 5.11, 9027.981, -0.4, 0, 0, 0.037, 4.98, 7740.199, 1.5, 25, 0, 0.037, 3.66, 16659.684, 1.5, 25, 0, 0.037, 2.89, 8275.722, 1.5, 25, 0, 0.037, 4.26, 40042.502, 0.2, 38, 0, 0.036, 1.95, 8326.062, 1.5, 25, 0, 0.036, 5.90, 8331.321, 1.5, 25, 0, 0.035, 1.33, 15595.723, -0.7, 6, 0, 0.035, 1.39, 7777.936, 2, 25, 0, 0.035, 0.80, 6663.308, -2, -19, 0, 0.035, 0.53, 64.434, -4, -44, 0, 0.034, 2.15, 6691.693, -2, -19, 0, 0.034, 1.90, -8467.253, 1, 0, 0, 0.033, 2.83, 7806.322, 2, 25, 0, 0.033, 4.67, 9479.368, 2, 25, 0, 0.033, 1.41, 418.752, 4, 51, 0}, - //MR1 - {0.5139, 4.1569, 14914.452335, -0.635, 6.2, -0.04, 0.3824, 1.8013, 6585.760910, -2.158, -19, 0.09, 0.3265, 2.3987, 7700.38947, 1.550, 25, -0.12, 0.2640, 5.4540, 8956.99338, 1.496, 25, -0.13, 0.1230, 3.0985, 628.30196, -0.027, 0, 0, 0.0775, 0.929, 16171.05625, -0.69, 6, 0, 0.0607, 4.857, 7842.36482, -2.21, -19, 0.1, 0.0497, 4.200, 14286.15038, -0.61, 6, 0, 0.0419, 5.155, 8399.67910, -0.36, 3, 0, 0.0322, 0.229, 23243.1438, 0.89, 31, -0.2, 0.0253, 2.587, -1742.9305, -3.68, -44, 0.2, 0.0249, 1.844, 5957.4590, -2.13, -19, 0.1, 0.0176, 4.754, 16029.0809, 3.07, 50, -0.2, 0.0145, 1.526, 17285.6848, 3.02, 50, -0.3, 0.0137, 1.004, 15542.7543, -0.66, 6, 0, 0.0126, 5.010, 8326.3902, 3.05, 50, 0, 0.0119, 4.814, 8470.6668, -2.24, -19, 0, 0.0118, 2.843, 8330.9926, 0, 0, 0, 0.0107, 2.442, 7072.0875, 1.6, 25, 0, 0.0099, 5.92, 22128.5152, -2.8, -13, 0, 0.0066, 3.28, 24499.7477, 0.8, 31, 0, 0.0065, 4.90, 7214.0629, -2.2, -19, 0, 0.0059, 5.41, 9585.2953, 1.5, 25, 0, 0.0054, 3.06, 1256.6039, -0.1, 0, 0, 0.0052, 2.50, 8328.3391, 1.5, 25, 0, 0.0052, 5.35, 8329.0437, 1.5, 25, 0, 0.0048, 3.56, 13799.8238, -4.3, -38, 0, 0.0039, 1.99, 30457.2066, -1.3, 12, 0, 0.0035, 0.49, 15540.4531, 0.9, 31, 0, 0.0035, 4.60, 15545.0555, -2.2, -19, 0, 0.0033, 0.27, 22614.842, 0.9, 31, 0, 0.0031, 4.24, 13657.848, -0.6, 6, 0, 0.0023, 1.23, 16728.371, 1.2, 28, 0, 0.0023, 5.50, 8328.691, 1.5, 25, 0, 0.0023, 0, 0, 0, 0, 0, 0.0023, 4.41, 7211.762, -0.7, 6, 0, 0.0022, 1.39, 8311.771, -2.2, -19, 0, 0.0022, 2.25, 7216.364, -3.7, -44, 0, 0.0021, 5.94, 70.988, -1.9, -22, 0, 0.0021, 2.58, 31571.835, 2.4, 56, 0, 0.0017, 2.63, -2371.232, -3.7, -44, 0, 0.0016, 4.04, -1952.480, 0.6, 7, 0, 0.0015, 4.23, 8329.403, 1.5, 25, 0, 0.0015, 3.63, 8327.980, 1.5, 25, 0, 0.0015, 2.69, 23385.119, -2.9, -13, 0, 0.0014, 5.96, 21500.213, -2.8, -13, 0, 0.0013, 4.06, 15542.402, -0.7, 6, 0, 0.0013, 1.02, 15543.107, -0.7, 6, 0, 0.0013, 2.10, 7143.075, -0.3, 0, 0, 0.0012, 0.23, -10071.622, -5.2, -69, 0, 0.0011, 3.33, 23871.446, 1, 31, 0, 0.0011, 1.89, 5329.157, -2, -19, 0}, - //MR2 - {0.001490, 4.157, 14914.45233, -0.64, 6, 0, 0.001110, 1.801, 6585.7609, -2.16, -19, 0.1, 0.000950, 2.399, 7700.3895, 1.55, 25, -0.1, 0.000770, 5.454, 8956.9934, 1.50, 25, -0.1, 0.000360, 3.098, 628.3020, 0, 0, 0, 0.000230, 0.93, 16171.0562, -0.7, 6, 0, 0.000180, 4.86, 7842.3648, -2.2, -19, 0, 0.000140, 4.20, 14286.1504, -0.6, 6, 0, 0.000120, 5.16, 8399.6791, -0.4, 0, 0, 0.000116, 3.46, 8326.390, 3.0, 50, 0, 0.000109, 4.39, 8330.993, 0, 0, 0, 0.000090, 0.23, 23243.144, 0.9, 31, 0}}} - return XL1 -} - -func MoonCalcNew(zn int, JD float64) float64 { - rad := 180.0 * 3600.0 / math.Pi - t := (JD - 2451545.0) / 36525.0 - XL1 := GetMoonCir() - ob := XL1[zn] - var v float64 - var tn float64 = 1 - t2 := t * t - t3 := t2 * t - t4 := t3 * t - t5 := t4 * t - tx := t - 10 - if zn == 0 { - v += (3.81034409 + 8399.684730072*t - 3.319e-05*t2 + 3.11e-08*t3 - 2.033e-10*t4) * rad //月球平黄经(弧度) - v += 5028.792262*t + 1.1124406*t2 + 0.00007699*t3 - 0.000023479*t4 - 0.0000000178*t5 //岁差(角秒) - if tx > 0 { - v += -0.866 + 1.43*tx + 0.054*tx*tx //对公元3000年至公元5000年的拟合,最大误差小于10角秒 - } - } - t2 /= 1e4 - t3 /= 1e8 - t4 /= 1e8 - n := len(ob[0]) - for i := 0; i < len(ob); i++ { - F := ob[i] - N := math.Floor(float64(n*len(F))/float64(len(ob[0])) + 0.5) - if i != 0 { - N += 6 - } - if N >= float64(len(F)) { - N = float64(len(F)) - } - var c float64 = 0 - for j := 0; float64(j) < N; j += 6 { - c += F[j] * math.Cos(F[j+1]+t*F[j+2]+t2*F[j+3]+t3*F[j+4]+t4*F[j+5]) - } - v += c * tn - tn *= t - } - if zn != 2 { - v /= rad - } - return v -} - -func HMoonTrueLo(JD float64) float64 { //计算月亮 - v := MoonCalcNew(0, JD) * 180 / math.Pi - return Limit360(v) -} - -func HMoonTrueBo(JD float64) float64 { - v := MoonCalcNew(1, JD) * 180 / math.Pi - return v -} - -func HMoonAway(JD float64) float64 { //'月地距离 - v := MoonCalcNew(2, JD) - return v -} - -/* - * @name 月球视黄经 - */ -func HMoonApparentLo(JD float64) float64 { - return HMoonTrueLo(JD) + HJZD(JD) -} - -func HMoonTrueRaDec(JD float64) (float64, float64) { - return LoBoToRaDec(JD, HMoonApparentLo(JD), HMoonTrueBo(JD)) -} - -/* - * 月球真赤纬 - */ -func HMoonTrueDec(JD float64) float64 { - MoonLo := HMoonApparentLo(JD) - MoonBo := HMoonTrueBo(JD) - tmp := Sin(MoonBo)*Cos(Sita(JD)) + Cos(MoonBo)*Sin(Sita(JD))*Sin(MoonLo) - res := ArcSin(tmp) - return res -} - -/* - * 月球真赤经 - */ -func HMoonTrueRa(JD float64) float64 { - return LoToRa(JD, HMoonApparentLo(JD), HMoonTrueBo(JD)) -} - -/* -* -* -传入世界时 -*/ -func HMoonApparentRaDec(JD, lon, lat, tz float64) (float64, float64) { - jde := TD2UT(JD, true) - ra := HMoonTrueRa(jde - tz/24) - dec := HMoonTrueDec(jde - tz/24) - away := HMoonAway(jde-tz/24) / 149597870.7 - nra, ndec := ZhanXinRaDec(ra, dec, lat, lon, JD-tz/24, away, 0) - return nra, ndec -} - -func HMoonApparentRa(JD, lon, lat, tz float64) float64 { - jde := TD2UT(JD, true) - ra := HMoonTrueRa(jde - tz/24) - dec := HMoonTrueDec(jde - tz/24) - away := HMoonAway(jde-tz/24) / 149597870.7 - nra := ZhanXinRa(ra, dec, lat, lon, JD-tz/24, away, 0) - return nra -} -func HMoonApparentDec(JD, lon, lat, tz float64) float64 { - jde := TD2UT(JD, true) - ra := HMoonTrueRa(jde - tz/24) - dec := HMoonTrueDec(jde - tz/24) - away := HMoonAway(jde-tz/24) / 149597870.7 - ndec := ZhanXinDec(ra, dec, lat, lon, JD-tz/24, away, 0) - return ndec -} diff --git a/vendor/github.com/starainrt/astro/basic/neptune.go b/vendor/github.com/starainrt/astro/basic/neptune.go deleted file mode 100644 index 4f901b6..0000000 --- a/vendor/github.com/starainrt/astro/basic/neptune.go +++ /dev/null @@ -1,437 +0,0 @@ -package basic - -import ( - "math" - - "github.com/starainrt/astro/planet" - . "github.com/starainrt/astro/tools" -) - -func NeptuneL(JD float64) float64 { - return planet.WherePlanet(7, 0, JD) -} - -func NeptuneB(JD float64) float64 { - return planet.WherePlanet(7, 1, JD) -} -func NeptuneR(JD float64) float64 { - return planet.WherePlanet(7, 2, JD) -} -func ANeptuneX(JD float64) float64 { - l := NeptuneL(JD) - b := NeptuneB(JD) - r := NeptuneR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - return x -} - -func ANeptuneY(JD float64) float64 { - - l := NeptuneL(JD) - b := NeptuneB(JD) - r := NeptuneR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - return y -} -func ANeptuneZ(JD float64) float64 { - //l := NeptuneL(JD) - b := NeptuneB(JD) - r := NeptuneR(JD) - // el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - z := r*Sin(b) - er*Sin(eb) - return z -} - -func ANeptuneXYZ(JD float64) (float64, float64, float64) { - l := NeptuneL(JD) - b := NeptuneB(JD) - r := NeptuneR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - z := r*Sin(b) - er*Sin(eb) - return x, y, z -} - -func NeptuneApparentRa(JD float64) float64 { - lo, bo := NeptuneApparentLoBo(JD) - sita := Sita(JD) - ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo)) - ra = ra * 180 / math.Pi - return Limit360(ra) -} -func NeptuneApparentDec(JD float64) float64 { - lo, bo := NeptuneApparentLoBo(JD) - sita := Sita(JD) - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return dec -} - -func NeptuneApparentRaDec(JD float64) (float64, float64) { - lo, bo := NeptuneApparentLoBo(JD) - sita := Sita(JD) - ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo)) - ra = ra * 180 / math.Pi - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return Limit360(ra), dec -} - -func EarthNeptuneAway(JD float64) float64 { - x, y, z := ANeptuneXYZ(JD) - to := math.Sqrt(x*x + y*y + z*z) - return to -} - -func NeptuneApparentLo(JD float64) float64 { - x, y, z := ANeptuneXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = ANeptuneXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - lo += HJZD(JD) - return lo -} - -func NeptuneApparentBo(JD float64) float64 { - x, y, z := ANeptuneXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = ANeptuneXYZ(JD - to) - //lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - //lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - //lo+=GXCLo(lo,bo,JD); - //bo+=GXCBo(lo,bo,JD)/3600; - //lo+=HJZD(JD); - return bo -} - -func NeptuneApparentLoBo(JD float64) (float64, float64) { - x, y, z := ANeptuneXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = ANeptuneXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - lo += HJZD(JD) - return lo, bo -} - -func NeptuneMag(JD float64) float64 { - AwaySun := NeptuneR(JD) - AwayEarth := EarthNeptuneAway(JD) - Away := planet.WherePlanet(-1, 2, JD) - i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth) - i = ArcCos(i) - Mag := -6.87 + 5*math.Log10(AwaySun*AwayEarth) - return FloatRound(Mag, 2) -} - -func NeptuneHeight(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := NeptuneApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 高度角、时角与天球座标三角转换公式 - // sin(h)=sin(lat)*sin(dec)+cos(dec)*cos(lat)*cos(H) - sinHeight := Sin(lat)*Sin(dec) + Cos(dec)*Cos(lat)*Cos(H) - return ArcSin(sinHeight) -} - -func NeptuneAzimuth(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := NeptuneApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 三角转换公式 - tanAzimuth := Sin(H) / (Cos(H)*Sin(lat) - Tan(dec)*Cos(lat)) - Azimuth := ArcTan(tanAzimuth) - if Azimuth < 0 { - if H/15 < 12 { - return Azimuth + 360 - } - return Azimuth + 180 - } - if H/15 < 12 { - return Azimuth + 180 - } - return Azimuth -} - -func NeptuneHourAngle(JD, Lon, TZ float64) float64 { - startime := Limit360(ApparentSiderealTime(JD-TZ/24)*15 + Lon) - timeangle := startime - NeptuneApparentRa(TD2UT(JD-TZ/24.0, true)) - if timeangle < 0 { - timeangle += 360 - } - return timeangle -} - -func NeptuneCulminationTime(jde, lon, timezone float64) float64 { - //jde 世界时,非力学时,当地时区 0时,无需转换力学时 - //ra,dec 瞬时天球座标,非J2000等时间天球坐标 - jde = math.Floor(jde) + 0.5 - JD1 := jde + Limit360(360-NeptuneHourAngle(jde, lon, timezone))/15.0/24.0*0.99726851851851851851 - limitHA := func(jde, lon, timezone float64) float64 { - ha := NeptuneHourAngle(jde, lon, timezone) - if ha < 180 { - ha += 360 - } - return ha - } - for { - JD0 := JD1 - stDegree := limitHA(JD0, lon, timezone) - 360 - stDegreep := (limitHA(JD0+0.000005, lon, timezone) - limitHA(JD0-0.000005, lon, timezone)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func NeptuneRiseTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return neptuneRiseDown(JD, Lon, Lat, TZ, ZS, HEI, true) -} - -func NeptuneDownTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return neptuneRiseDown(JD, Lon, Lat, TZ, ZS, HEI, false) -} - -func neptuneRiseDown(JD, Lon, Lat, TZ, ZS, HEI float64, isRise bool) float64 { - var An float64 - JD = math.Floor(JD) + 0.5 - ntz := math.Round(Lon / 15) - if ZS != 0 { - An = -0.8333 - } - An = An - HeightDegreeByLat(HEI, Lat) - tztime := NeptuneCulminationTime(JD, Lon, ntz) - if NeptuneHeight(tztime, Lon, Lat, ntz) < An { - return -2 //极夜 - } - if NeptuneHeight(tztime-0.5, Lon, Lat, ntz) > An { - return -1 //极昼 - } - dec := HSunApparentDec(TD2UT(tztime-ntz/24, true)) - //(sin(ho)-sin(φ)*sin(δ2))/(cos(φ)*cos(δ2)) - tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat)) - var rise float64 - if math.Abs(tmp) <= 1 { - rzsc := ArcCos(tmp) / 15 - if isRise { - rise = tztime - rzsc/24 - 25.0/24.0/60.0 - } else { - rise = tztime + rzsc/24 - 25.0/24.0/60.0 - } - } else { - rise = tztime - i := 0 - //TODO:使用二分法计算 - for NeptuneHeight(rise, Lon, Lat, ntz) > An { - i++ - if isRise { - rise -= 15.0 / 60.0 / 24.0 - } else { - rise += 15.0 / 60.0 / 24.0 - } - if i > 48 { - break - } - } - } - JD1 := rise - for { - JD0 := JD1 - stDegree := NeptuneHeight(JD0, Lon, Lat, ntz) - An - stDegreep := (NeptuneHeight(JD0+0.000005, Lon, Lat, ntz) - NeptuneHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 - ntz/24 + TZ/24 -} - -// Pos - -const NEPTUNE_S_PERIOD = 1 / ((1 / 365.256363004) - (1 / 4332.59)) - -func neptuneConjunction(jde, degree float64, next uint8) float64 { - //0=last 1=next - decSub := func(jde float64, degree float64, filter bool) float64 { - sub := Limit360(Limit360(NeptuneApparentLo(jde)-HSunApparentLo(jde)) - degree) - if filter { - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - } - return sub - } - dayCost := NEPTUNE_S_PERIOD / 360 - nowSub := decSub(jde, degree, false) - if next == 0 { - jde -= (360 - nowSub) * dayCost - } else { - jde += dayCost * nowSub - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, degree, true) - stDegreep := (decSub(JD0+0.000005, degree, true) - decSub(JD0-0.000005, degree, true)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return TD2UT(JD1, false) -} - -func LastNeptuneConjunction(jde float64) float64 { - return neptuneConjunction(jde, 0, 0) -} - -func NextNeptuneConjunction(jde float64) float64 { - return neptuneConjunction(jde, 0, 1) -} - -func LastNeptuneOpposition(jde float64) float64 { - return neptuneConjunction(jde, 180, 0) -} - -func NextNeptuneOpposition(jde float64) float64 { - return neptuneConjunction(jde, 180, 1) -} - -func NextNeptuneEasternQuadrature(jde float64) float64 { - return neptuneConjunction(jde, 90, 1) -} - -func LastNeptuneEasternQuadrature(jde float64) float64 { - return neptuneConjunction(jde, 90, 0) -} - -func NextNeptuneWesternQuadrature(jde float64) float64 { - return neptuneConjunction(jde, 270, 1) -} - -func LastNeptuneWesternQuadrature(jde float64) float64 { - return neptuneConjunction(jde, 270, 0) -} - -func neptuneRetrograde(jde float64, isLeft bool) float64 { - //0=last 1=next - decSub := func(jde float64, val float64) float64 { - sub := NeptuneApparentRa(jde+val) - NeptuneApparentRa(jde-val) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub / (2 * val) - } - jde = NextNeptuneOpposition(jde) - if isLeft { - jde -= 60 - } else { - jde += 60 - } - for { - nowSub := decSub(jde, 1.0/86400.0) - if math.Abs(nowSub) > 0.55 { - jde += 2 - continue - } - break - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, 2.0/86400.0) - stDegreep := (decSub(JD0+15.0/86400.0, 2.0/86400.0) - decSub(JD0-15.0/86400.0, 2.0/86400.0)) / (30.0 / 86400.0) - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 30.0/86400.0 { - break - } - } - JD1 = JD1 - 15.0/86400.0 - min := JD1 - minRa := 100.0 - for i := 0.0; i < 60.0; i++ { - tmp := decSub(JD1+i*0.5/86400.0, 0.5/86400.0) - if math.Abs(tmp) < math.Abs(minRa) { - minRa = tmp - min = JD1 + i*0.5/86400.0 - } - } - return TD2UT(min, false) -} - -func NextNeptuneRetrogradeToPrograde(jde float64) float64 { - date := neptuneRetrograde(jde, false) - if date < jde { - op := NextNeptuneOpposition(jde) - return neptuneRetrograde(op+10, false) - } - return date -} - -func LastNeptuneRetrogradeToPrograde(jde float64) float64 { - jde = LastNeptuneOpposition(jde) - 10 - date := neptuneRetrograde(jde, false) - if date > jde { - op := LastNeptuneOpposition(jde) - return neptuneRetrograde(op-10, false) - } - return date -} - -func NextNeptuneProgradeToRetrograde(jde float64) float64 { - date := neptuneRetrograde(jde, true) - if date < jde { - op := NextNeptuneOpposition(jde) - return neptuneRetrograde(op+10, true) - } - return date -} - -func LastNeptuneProgradeToRetrograde(jde float64) float64 { - jde = LastNeptuneOpposition(jde) - 10 - date := neptuneRetrograde(jde, true) - if date > jde { - op := LastNeptuneOpposition(jde) - return neptuneRetrograde(op-10, true) - } - return date -} diff --git a/vendor/github.com/starainrt/astro/basic/saturn.go b/vendor/github.com/starainrt/astro/basic/saturn.go deleted file mode 100644 index 0cf7f03..0000000 --- a/vendor/github.com/starainrt/astro/basic/saturn.go +++ /dev/null @@ -1,446 +0,0 @@ -package basic - -import ( - "math" - - "github.com/starainrt/astro/planet" - . "github.com/starainrt/astro/tools" -) - -func SaturnL(JD float64) float64 { - return planet.WherePlanet(5, 0, JD) -} - -func SaturnB(JD float64) float64 { - return planet.WherePlanet(5, 1, JD) -} -func SaturnR(JD float64) float64 { - return planet.WherePlanet(5, 2, JD) -} -func ASaturnX(JD float64) float64 { - l := SaturnL(JD) - b := SaturnB(JD) - r := SaturnR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - return x -} - -func ASaturnY(JD float64) float64 { - - l := SaturnL(JD) - b := SaturnB(JD) - r := SaturnR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - return y -} -func ASaturnZ(JD float64) float64 { - //l := SaturnL(JD) - b := SaturnB(JD) - r := SaturnR(JD) - // el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - z := r*Sin(b) - er*Sin(eb) - return z -} - -func ASaturnXYZ(JD float64) (float64, float64, float64) { - l := SaturnL(JD) - b := SaturnB(JD) - r := SaturnR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - z := r*Sin(b) - er*Sin(eb) - return x, y, z -} - -func SaturnApparentRa(JD float64) float64 { - lo, bo := SaturnApparentLoBo(JD) - sita := Sita(JD) - ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo)) - ra = ra * 180 / math.Pi - return Limit360(ra) -} -func SaturnApparentDec(JD float64) float64 { - lo, bo := SaturnApparentLoBo(JD) - sita := Sita(JD) - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return dec -} - -func SaturnApparentRaDec(JD float64) (float64, float64) { - lo, bo := SaturnApparentLoBo(JD) - sita := Sita(JD) - ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo)) - ra = ra * 180 / math.Pi - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return Limit360(ra), dec -} - -func EarthSaturnAway(JD float64) float64 { - x, y, z := ASaturnXYZ(JD) - to := math.Sqrt(x*x + y*y + z*z) - return to -} - -func SaturnApparentLo(JD float64) float64 { - x, y, z := ASaturnXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = ASaturnXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - lo += HJZD(JD) - return lo -} - -func SaturnApparentBo(JD float64) float64 { - x, y, z := ASaturnXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = ASaturnXYZ(JD - to) - //lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - //lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - //lo+=GXCLo(lo,bo,JD); - //bo+=GXCBo(lo,bo,JD)/3600; - //lo+=HJZD(JD); - return bo -} - -func SaturnApparentLoBo(JD float64) (float64, float64) { - x, y, z := ASaturnXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = ASaturnXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - lo += HJZD(JD) - return lo, bo -} - -func SaturnMag(JD float64) float64 { - AwaySun := SaturnR(JD) - AwayEarth := EarthSaturnAway(JD) - Away := planet.WherePlanet(-1, 2, JD) - i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth) - i = ArcCos(i) - Mag := -8.68 + 5*math.Log10(AwaySun*AwayEarth) + 0.044*i - 2.6*Sin(math.Abs(SaturnRingB(JD))) + 1.25*Sin(math.Abs(SaturnRingB(JD)))*Sin(math.Abs(SaturnRingB(JD))) - return FloatRound(Mag, 2) -} - -func SaturnRingB(JD float64) float64 { - T := (JD - 2451545) / 36525 - i := 28.075216 - 0.012998*T + 0.000004*T*T - omi := 169.508470 + 1.394681*T + 0.000412*T*T - lo, bo := SaturnApparentLoBo(JD) - B := Sin(i)*Cos(bo)*Sin(lo-omi) - Cos(i)*Cos(bo) - return ArcSin(B) -} - -func SaturnHeight(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := SaturnApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 高度角、时角与天球座标三角转换公式 - // sin(h)=sin(lat)*sin(dec)+cos(dec)*cos(lat)*cos(H) - sinHeight := Sin(lat)*Sin(dec) + Cos(dec)*Cos(lat)*Cos(H) - return ArcSin(sinHeight) -} - -func SaturnAzimuth(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := SaturnApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 三角转换公式 - tanAzimuth := Sin(H) / (Cos(H)*Sin(lat) - Tan(dec)*Cos(lat)) - Azimuth := ArcTan(tanAzimuth) - if Azimuth < 0 { - if H/15 < 12 { - return Azimuth + 360 - } - return Azimuth + 180 - } - if H/15 < 12 { - return Azimuth + 180 - } - return Azimuth -} - -func SaturnHourAngle(JD, Lon, TZ float64) float64 { - startime := Limit360(ApparentSiderealTime(JD-TZ/24)*15 + Lon) - timeangle := startime - SaturnApparentRa(TD2UT(JD-TZ/24.0, true)) - if timeangle < 0 { - timeangle += 360 - } - return timeangle -} - -func SaturnCulminationTime(jde, lon, timezone float64) float64 { - //jde 世界时,非力学时,当地时区 0时,无需转换力学时 - //ra,dec 瞬时天球座标,非J2000等时间天球坐标 - jde = math.Floor(jde) + 0.5 - JD1 := jde + Limit360(360-SaturnHourAngle(jde, lon, timezone))/15.0/24.0*0.99726851851851851851 - limitHA := func(jde, lon, timezone float64) float64 { - ha := SaturnHourAngle(jde, lon, timezone) - if ha < 180 { - ha += 360 - } - return ha - } - for { - JD0 := JD1 - stDegree := limitHA(JD0, lon, timezone) - 360 - stDegreep := (limitHA(JD0+0.000005, lon, timezone) - limitHA(JD0-0.000005, lon, timezone)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func SaturnRiseTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return saturnRiseDown(JD, Lon, Lat, TZ, ZS, HEI, true) -} - -func SaturnDownTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return saturnRiseDown(JD, Lon, Lat, TZ, ZS, HEI, false) -} - -func saturnRiseDown(JD, Lon, Lat, TZ, ZS, HEI float64, isRise bool) float64 { - var An float64 - JD = math.Floor(JD) + 0.5 - ntz := math.Round(Lon / 15) - if ZS != 0 { - An = -0.8333 - } - An = An - HeightDegreeByLat(HEI, Lat) - tztime := SaturnCulminationTime(JD, Lon, ntz) - if SaturnHeight(tztime, Lon, Lat, ntz) < An { - return -2 //极夜 - } - if SaturnHeight(tztime-0.5, Lon, Lat, ntz) > An { - return -1 //极昼 - } - dec := HSunApparentDec(TD2UT(tztime-ntz/24, true)) - //(sin(ho)-sin(φ)*sin(δ2))/(cos(φ)*cos(δ2)) - tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat)) - var rise float64 - if math.Abs(tmp) <= 1 { - rzsc := ArcCos(tmp) / 15 - if isRise { - rise = tztime - rzsc/24 - 25.0/24.0/60.0 - } else { - rise = tztime + rzsc/24 - 25.0/24.0/60.0 - } - } else { - rise = tztime - i := 0 - //TODO:使用二分法计算 - for SaturnHeight(rise, Lon, Lat, ntz) > An { - i++ - if isRise { - rise -= 15.0 / 60.0 / 24.0 - } else { - rise += 15.0 / 60.0 / 24.0 - } - if i > 48 { - break - } - } - } - JD1 := rise - for { - JD0 := JD1 - stDegree := SaturnHeight(JD0, Lon, Lat, ntz) - An - stDegreep := (SaturnHeight(JD0+0.000005, Lon, Lat, ntz) - SaturnHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 - ntz/24 + TZ/24 -} - -// Pos - -const SATURN_S_PERIOD = 1 / ((1 / 365.256363004) - (1 / 10759.0)) - -func saturnConjunction(jde, degree float64, next uint8) float64 { - //0=last 1=next - decSub := func(jde float64, degree float64, filter bool) float64 { - sub := Limit360(Limit360(SaturnApparentLo(jde)-HSunApparentLo(jde)) - degree) - if filter { - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - } - return sub - } - dayCost := SATURN_S_PERIOD / 360 - nowSub := decSub(jde, degree, false) - if next == 0 { - jde -= (360 - nowSub) * dayCost - } else { - jde += dayCost * nowSub - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, degree, true) - stDegreep := (decSub(JD0+0.000005, degree, true) - decSub(JD0-0.000005, degree, true)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return TD2UT(JD1, false) -} - -func LastSaturnConjunction(jde float64) float64 { - return saturnConjunction(jde, 0, 0) -} - -func NextSaturnConjunction(jde float64) float64 { - return saturnConjunction(jde, 0, 1) -} - -func LastSaturnOpposition(jde float64) float64 { - return saturnConjunction(jde, 180, 0) -} - -func NextSaturnOpposition(jde float64) float64 { - return saturnConjunction(jde, 180, 1) -} - -func NextSaturnEasternQuadrature(jde float64) float64 { - return saturnConjunction(jde, 90, 1) -} - -func LastSaturnEasternQuadrature(jde float64) float64 { - return saturnConjunction(jde, 90, 0) -} - -func NextSaturnWesternQuadrature(jde float64) float64 { - return saturnConjunction(jde, 270, 1) -} - -func LastSaturnWesternQuadrature(jde float64) float64 { - return saturnConjunction(jde, 270, 0) -} - -func saturnRetrograde(jde float64, isLeft bool) float64 { - //0=last 1=next - decSub := func(jde float64, val float64) float64 { - sub := SaturnApparentRa(jde+val) - SaturnApparentRa(jde-val) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub / (2 * val) - } - jde = NextSaturnOpposition(jde) - if isLeft { - jde -= 60 - } else { - jde += 60 - } - for { - nowSub := decSub(jde, 1.0/86400.0) - if math.Abs(nowSub) > 0.55 { - jde += 2 - continue - } - break - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, 2.0/86400.0) - stDegreep := (decSub(JD0+15.0/86400.0, 2.0/86400.0) - decSub(JD0-15.0/86400.0, 2.0/86400.0)) / (30.0 / 86400.0) - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 30.0/86400.0 { - break - } - } - JD1 = JD1 - 15.0/86400.0 - min := JD1 - minRa := 100.0 - for i := 0.0; i < 60.0; i++ { - tmp := decSub(JD1+i*0.5/86400.0, 0.5/86400.0) - if math.Abs(tmp) < math.Abs(minRa) { - minRa = tmp - min = JD1 + i*0.5/86400.0 - } - } - return TD2UT(min, false) -} - -func NextSaturnRetrogradeToPrograde(jde float64) float64 { - date := saturnRetrograde(jde, false) - if date < jde { - op := NextSaturnOpposition(jde) - return saturnRetrograde(op+10, false) - } - return date -} - -func LastSaturnRetrogradeToPrograde(jde float64) float64 { - jde = LastSaturnOpposition(jde) - 10 - date := saturnRetrograde(jde, false) - if date > jde { - op := LastSaturnOpposition(jde) - return saturnRetrograde(op-10, false) - } - return date -} - -func NextSaturnProgradeToRetrograde(jde float64) float64 { - date := saturnRetrograde(jde, true) - if date < jde { - op := NextSaturnOpposition(jde) - return saturnRetrograde(op+10, true) - } - return date -} - -func LastSaturnProgradeToRetrograde(jde float64) float64 { - jde = LastSaturnOpposition(jde) - 10 - date := saturnRetrograde(jde, true) - if date > jde { - op := LastSaturnOpposition(jde) - return saturnRetrograde(op-10, true) - } - return date -} diff --git a/vendor/github.com/starainrt/astro/basic/star.go b/vendor/github.com/starainrt/astro/basic/star.go deleted file mode 100644 index a7c44c7..0000000 --- a/vendor/github.com/starainrt/astro/basic/star.go +++ /dev/null @@ -1,172 +0,0 @@ -package basic - -import ( - . "github.com/starainrt/astro/tools" - "math" -) - -// StarHeight 星体的高度角 -// 传入 jde时间、瞬时赤经、瞬时赤纬、经度、纬度、时区,jde时间应为时区时间 -// 返回高度角,单位为度 -func StarHeight(jde, ra, dec, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 高度角、时角与天球座标三角转换公式 - // sin(h)=sin(lat)*sin(dec)+cos(dec)*cos(lat)*cos(H) - sinHeight := Sin(lat)*Sin(dec) + Cos(dec)*Cos(lat)*Cos(H) - return ArcSin(sinHeight) -} - -//StarAzimuth 星体的方位角 -// 传入 jde时间、瞬时赤经、瞬时赤纬、经度、纬度、时区,jde时间应为时区时间 -// 返回方位角,单位为度,正北为0,度数顺时针增加,取值范围[0-360) -func StarAzimuth(jde, ra, dec, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 三角转换公式 - tanAzimuth := Sin(H) / (Cos(H)*Sin(lat) - Tan(dec)*Cos(lat)) - Azimuth := ArcTan(tanAzimuth) - if Azimuth < 0 { - if H/15 < 12 { - return Azimuth + 360 - } - return Azimuth + 180 - } - if H/15 < 12 { - return Azimuth + 180 - } - return Azimuth -} - -//StarHourAngle 星体的时角 -// 传入 jde时间、瞬时赤经、瞬时赤纬、经度、时区,jde时间应为时区时间 -// 返回时角 -func StarHourAngle(jde, ra, lon, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - return Limit360(st - ra) -} - -// MeanSiderealTime 不含章动下的恒星时 -func MeanSiderealTime(JD float64) float64 { - T := (JD - 2451545) / 36525 - return (Limit360(280.46061837+360.98564736629*(JD-2451545.0)+0.000387933*T*T-T*T*T/38710000) / 15) -} - -// ApparentSiderealTime 视恒星时,计算章动 -func ApparentSiderealTime(JD float64) float64 { - tmp := MeanSiderealTime(JD) - return tmp + HJZD(JD)*Cos(Sita(JD))/15 -} -func StarAngle(RA, DEC, JD, Lon, Lat, TZ float64) float64 { - //JD=JD-8/24+TZ/24; - calcjd := JD - TZ/24 - st := Limit360(ApparentSiderealTime(calcjd)*15 + Lon) - H := Limit360(st - RA) - tmp2 := Sin(H) / (Cos(H)*Sin(Lat) - Tan(DEC)*Cos(Lat)) - Angle := ArcTan(tmp2) - if Angle < 0 { - if H/15 < 12 { - return Angle + 360 - } else { - return Angle + 180 - } - } else { - if H/15 < 12 { - return Angle + 180 - } else { - return Angle - } - } -} - -func StarRiseTime(jde, ra, dec, lon, lat, height, timezone float64, aero bool) float64 { - return StarRiseDownTime(jde, ra, dec, lon, lat, height, timezone, aero, true) -} - -func StarDownTime(jde, ra, dec, lon, lat, height, timezone float64, aero bool) float64 { - return StarRiseDownTime(jde, ra, dec, lon, lat, height, timezone, aero, false) -} - -func StarRiseDownTime(jde, ra, dec, lon, lat, height, timezone float64, aero, isRise bool) float64 { - //jde 世界时,非力学时,当地时区 0时,无需转换力学时 - //ra,dec 瞬时天球座标,非J2000等时间天球坐标 - jde = math.Floor(jde) + 0.5 - var An float64 = 0 - if aero { - An = -0.566667 - } - An = An - HeightDegreeByLat(height, lat) - sct := StarCulminationTime(jde, ra, lon, timezone) - tmp := (Sin(An) - Sin(dec)*Sin(lat)) / (Cos(dec) * Cos(lat)) - if math.Abs(tmp) > 1 { - if StarHeight(sct, ra, dec, lon, lat, timezone) < 0 { - return -2 //极夜 - } else { - return -1 //极昼 - } - } - var JD1 float64 - if isRise { - JD1 = sct - ArcCos(tmp)/15.0/24.0 - } else { - JD1 = sct + ArcCos(tmp)/15.0/24.0 - } - for { - JD0 := JD1 - stDegree := StarHeight(JD0, ra, dec, lon, lat, timezone) - An - stDegreep := (StarHeight(JD0+0.000005, ra, dec, lon, lat, timezone) - StarHeight(JD0-0.000005, ra, dec, lon, lat, timezone)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func StarCulminationTime(jde, ra, lon, timezone float64) float64 { - //jde 世界时,非力学时,当地时区 0时,无需转换力学时 - //ra,dec 瞬时天球座标,非J2000等时间天球坐标 - jde = math.Floor(jde) + 0.5 - JD1 := jde + Limit360(360-StarHourAngle(jde, ra, lon, timezone))/15.0/24.0*0.99726851851851851851 - limitStarHA := func(jde, ra, lon, timezone float64) float64 { - ha := StarHourAngle(jde, ra, lon, timezone) - if ha < 180 { - ha += 360 - } - return ha - } - for { - JD0 := JD1 - stDegree := limitStarHA(JD0, ra, lon, timezone) - 360 - stDegreep := (limitStarHA(JD0+0.000005, ra, lon, timezone) - limitStarHA(JD0-0.000005, ra, lon, timezone)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func StarAngularSeparation(ra1, dec1, ra2, dec2 float64) float64 { - //cos(d)=sinδ1 sinδ2 + cosδ1 cosδ2 cos(α1-α2) - d := Sin(dec1)*Sin(dec2) + Cos(dec1)*Cos(dec2)*Cos(ra1-ra2) - if math.Abs(d) >= 0.999999997 { - //d = √(Δα*cosδ)2+(Δδ)2 - tmp1 := ((ra1 - ra2) * Cos((dec1+dec2)/2)) - tmp2 := (dec1 - dec2) - return math.Sqrt(tmp1*tmp1 + tmp2*tmp2) - } - return ArcCos(d) -} diff --git a/vendor/github.com/starainrt/astro/basic/stardat.go b/vendor/github.com/starainrt/astro/basic/stardat.go deleted file mode 100644 index 9c201df..0000000 --- a/vendor/github.com/starainrt/astro/basic/stardat.go +++ /dev/null @@ -1,9353 +0,0 @@ -package basic - -import ( - "bytes" - "errors" - "fmt" - "strconv" - "strings" - "time" -) - -// this file contains bright 9100 stars -// 9100颗亮星列表 - -type InnerStarData struct { - HR uint16 //Bright Star Number;[1/9110]+ Harvard Revised Number;亮星编号 - Name string //Name, generally Bayer(如天狼星:Alpha CMA) and/or Flamsteed(如天狼星:9 CMA) name - HD uint32 //Henry Draper Catalog Number;HD星表编号 - Ra float64 //Ra J2000;J2000历元赤经 - Dec float64 //De J2000;J2000历元赤纬 - Mag float64 //视星等 - PmRA float64 //赤经年自行 - PmDec float64 //赤纬年自行 - RadVel float64 //径向速度 km/s - RotVel float64 //自行速度 km/s - Pc float64 //秒差距 - HIP uint32 //HIP星表编号 -} -type StarData struct { - InnerStarData - ChineseName string - ChineseAlias string - ChineseBayerName string - CommonName string - ComminAliasName string - Cst string - CstChinese string -} - -func parseStarData(star []byte) (InnerStarData, error) { - var err error - var stardata InnerStarData - if len(star) < 160 { - return stardata, errors.New("invalid stardat") - } - for i := 0; i < 4; i++ { - if star[i] == ' ' { - continue - } - stardata.HR = stardata.HR*10 + uint16(star[i]-48) - } - stardata.Name = string(bytes.TrimSpace(star[4:14])) - for i := 25; i < 31; i++ { - if star[i] == ' ' { - continue - } - stardata.HD = stardata.HD*10 + uint32(star[i]-48) - } - stardata.Ra, err = parseRa(star) - if err != nil { - return stardata, fmt.Errorf("parse ra failed:%v", err) - } - stardata.Dec, err = parseDec(star) - if err != nil { - return stardata, fmt.Errorf("parse dec failed:%v", err) - } - magOri := string(bytes.TrimSpace(star[102:107])) - if magOri != "" { - stardata.Mag, err = strconv.ParseFloat(magOri, 64) - if err != nil { - return stardata, fmt.Errorf("parse mag failed:%v", err) - } - } else { - stardata.Mag = 9999.9999 - } - stardata.PmRA, _ = strconv.ParseFloat(string(bytes.TrimSpace(star[148:154])), 64) - stardata.PmDec, _ = strconv.ParseFloat(string(bytes.TrimSpace(star[154:160])), 64) - if len(star) >= 170 { - stardata.RadVel, _ = strconv.ParseFloat(string(bytes.TrimSpace(star[166:170])), 64) - } - if len(star) >= 179 { - stardata.RotVel, _ = strconv.ParseFloat(string(bytes.TrimSpace(star[176:179])), 64) - } - if len(star) > 161 { - rc, _ := strconv.ParseFloat(string(bytes.TrimSpace(star[162:166])), 64) - if rc != 0 { - stardata.Pc = 1 / rc - } - } - return stardata, nil -} - -func parseRa(star []byte) (float64, error) { - var sec float64 - var err error - ra := float64(0) - for i := 75; i < 77; i++ { - if star[i] == ' ' { - continue - } - ra = ra*10 + float64(star[i]-48) - } - minute := uint8(0) - for i := 77; i < 79; i++ { - if star[i] == ' ' { - continue - } - minute = minute*10 + (star[i] - 48) - } - ori := string(bytes.TrimSpace(star[79:83])) - if ori != "" { - sec, err = strconv.ParseFloat(ori, 64) - if err != nil { - return ra, err - } - } - ra += float64(minute)/60 + sec/3600 - return ra * 15, nil -} - -func parseDec(star []byte) (float64, error) { - var sec float64 - var err error - underZero := false - if star[83] == '-' { - underZero = true - } - dec := float64(0) - for i := 84; i < 86; i++ { - if star[i] == ' ' { - continue - } - dec = dec*10 + float64(star[i]-48) - } - minute := uint8(0) - for i := 86; i < 88; i++ { - if star[i] == ' ' { - continue - } - minute = minute*10 + (star[i] - 48) - } - ori := string(bytes.TrimSpace(star[88:90])) - if ori != "" { - sec, err = strconv.ParseFloat(ori, 64) - if err != nil { - return dec, err - } - } - dec += float64(minute)/60 + sec/3600 - if underZero { - dec = -dec - } - return dec, nil -} - -var stardat [][]byte -var starhdindex map[string]int -var hr2detail map[uint16][]string -var hr2hip map[uint16]uint32 -var chnidx map[string]uint16 - -func LoadStarData() error { - hr2detail = map[uint16][]string{9089: []string{"垒壁阵十二", "", "双鱼座30", "", "双鱼座", "Pisces"}, 9098: []string{"八魁二", "", "鲸鱼座2", "", "鲸鱼座", "Cetus"}, 3: []string{"垒壁阵十一", "", "双鱼座33", "", "双鱼座", "Pisces"}, 15: []string{"壁宿二", "", "仙女座α", "Alpheratz", "仙女座", "Andromeda"}, 25: []string{"火鸟四", "", "凤凰座ε", "", "凤凰座", "Phoenix"}, 33: []string{"八魁一", "", "鲸鱼座6", "", "鲸鱼座", "Cetus"}, 48: []string{"八魁六", "", "鲸鱼座7", "", "鲸鱼座", "Cetus"}, 63: []string{"天厩一", "", "仙女座θ", "", "仙女座", "Andromeda"}, 68: []string{"天厩三", "", "仙女座σ", "", "仙女座", "Andromeda"}, 74: []string{"天仓一", "", "鲸鱼座ι", "", "鲸鱼座", "Cetus"}, 77: []string{"鸟喙六", "", "杜鹃座ζ", "", "杜鹃座", "Tucana"}, 98: []string{"蛇尾一", "", "水蛇座β", "", "水蛇座", "Hydrus"}, 100: []string{"火鸟五", "", "凤凰座κ", "", "凤凰座", "Phoenix"}, 21: []string{"王良一", "", "仙后座β", "Caph", "仙后座", "Cassiopeia"}, 125: []string{"火鸟八", "", "凤凰座λ1", "", "凤凰座", "Phoenix"}, 126: []string{"鸟喙四", "", "杜鹃座β1", "", "杜鹃座", "Tucana"}, 123: []string{"王良五", "", "仙后座λ", "", "仙后座", "Cassiopeia"}, 130: []string{"王良二", "", "仙后座κ", "", "仙后座", "Cassiopeia"}, 154: []string{"奎宿六", "", "仙女座π", "", "仙女座", "Andromeda"}, 153: []string{"附路", "", "仙后座ζ", "", "仙后座", "Cassiopeia"}, 163: []string{"奎宿四", "", "仙女座ε", "", "仙女座", "Andromeda"}, 165: []string{"奎宿五", "", "仙女座δ", "", "仙女座", "Andromeda"}, 180: []string{"火鸟七", "", "凤凰座μ", "", "凤凰座", "Phoenix"}, 191: []string{"水委三", "", "凤凰座η", "", "凤凰座", "Phoenix"}, 39: []string{"壁宿一", "", "飞马座γ", "Algenib", "飞马座", "Pegasus"}, 194: []string{"天溷四", "", "鲸鱼座φ1", "", "鲸鱼座", "Cetus"}, 193: []string{"阁道六", "", "仙后座ο", "", "仙后座", "Cassiopeia"}, 215: []string{"奎宿二", "", "仙女座ζ", "", "仙女座", "Andromeda"}, 224: []string{"外屏一", "", "双鱼座δ", "", "双鱼座", "Pisces"}, 223: []string{"阁道五", "", "仙后座ν", "", "仙后座", "Cassiopeia"}, 219: []string{"王良三", "", "仙后座η", "", "仙后座", "Cassiopeia"}, 226: []string{"奎宿七", "", "仙女座ν", "", "仙女座", "Andromeda"}, 264: []string{"策", "", "仙后座γ", "", "仙后座", "Cassiopeia"}, 269: []string{"奎宿八", "", "仙女座μ", "", "仙女座", "Andromeda"}, 271: []string{"奎宿一", "", "仙女座η", "", "仙女座", "Andromeda"}, 294: []string{"外屏二", "", "双鱼座ε", "", "双鱼座", "Pisces"}, 322: []string{"火鸟九", "", "凤凰座β", "", "凤凰座", "Phoenix"}, 338: []string{"水委二", "", "凤凰座ζ", "", "凤凰座", "Phoenix"}, 334: []string{"天仓二", "", "鲸鱼座η", "", "鲸鱼座", "Cetus"}, 335: []string{"军南门", "", "仙女座φ", "", "仙女座", "Andromeda"}, 343: []string{"阁道四", "", "仙后座θ", "", "仙后座", "Cassiopeia"}, 351: []string{"奎宿十五", "", "双鱼座χ", "", "双鱼座", "Pisces"}, 352: []string{"奎宿十一", "", "双鱼座τ", "", "双鱼座", "Pisces"}, 361: []string{"外屏三", "", "双鱼座ζA", "", "双鱼座", "Pisces"}, 360: []string{"奎宿十四", "", "双鱼座φ", "", "双鱼座", "Pisces"}, 383: []string{"奎宿十三", "", "双鱼座υ", "", "双鱼座", "Pisces"}, 402: []string{"天仓三", "", "鲸鱼座θ", "", "鲸鱼座", "Cetus"}, 99: []string{"火鸟六", "", "凤凰座α", "Ankaa", "凤凰座", "Phoenix"}, 399: []string{"华盖五", "", "仙后座ψ", "", "仙后座", "Cassiopeia"}, 429: []string{"火鸟十", "", "凤凰座γ", "", "凤凰座", "Phoenix"}, 434: []string{"外屏四", "", "双鱼座μ", "", "双鱼座", "Pisces"}, 440: []string{"天园一", "", "凤凰座δ", "", "凤凰座", "Phoenix"}, 437: []string{"右更二", "", "双鱼座η", "", "双鱼座", "Pisces"}, 458: []string{"天大将军六", "", "仙女座υ", "", "仙女座", "Andromeda"}, 464: []string{"天大将军三", "", "仙女座51", "", "仙女座", "Andromeda"}, 477: []string{"天大将军七", "", "仙女座τ", "", "仙女座", "Andromeda"}, 489: []string{"外屏五", "", "双鱼座ν", "", "双鱼座", "Pisces"}, 496: []string{"天大将军二", "", "英仙座φ", "", "英仙座", "Perseus"}, 509: []string{"天仓五", "", "鲸鱼座τ", "", "鲸鱼座", "Cetus"}, 510: []string{"右更四", "", "双鱼座ο", "", "双鱼座", "Pisces"}, 168: []string{"王良四", "", "仙后座α", "Shedir", "仙后座", "Cassiopeia"}, 188: []string{"土司空", "", "鲸鱼座β", "Diphda", "鲸鱼座", "Cetus"}, 549: []string{"外屏六", "", "双鱼座ξ", "", "双鱼座", "Pisces"}, 542: []string{"阁道二", "", "仙后座ε", "", "仙后座", "Cassiopeia"}, 570: []string{"蛇腹四", "", "水蛇座η2", "", "水蛇座", "Hydrus"}, 566: []string{"天园二", "", "波江座χ", "", "波江座", "Eridanus"}, 548: []string{"华盖七", "", "仙后座ω", "", "仙后座", "Cassiopeia"}, 565: []string{"鈇锧五", "", "鲸鱼座56", "", "鲸鱼座", "Cetus"}, 591: []string{"蛇首一", "", "水蛇座α", "", "水蛇座", "Hydrus"}, 585: []string{"鈇锧四", "", "鲸鱼座υ", "", "鲸鱼座", "Cetus"}, 575: []string{"杠七", "", "仙后座48", "", "仙后座", "Cassiopeia"}, 337: []string{"奎宿九", "", "仙女座β", "Mirach", "仙女座", "Andromeda"}, 580: []string{"杠五", "", "仙后座50", "", "仙后座", "Cassiopeia"}, 390: []string{"奎宿十三", "", "双鱼座υ", "Adhil", "双鱼座", "Pisces"}, 622: []string{"天大将军九", "", "三角座β", "", "三角座", "Triangulum"}, 649: []string{"天囷五", "", "鲸鱼座ξ1", "", "鲸鱼座", "Cetus"}, 674: []string{"天园三", "", "波江座φ", "", "波江座", "Eridanus"}, 660: []string{"天大将军十一", "", "三角座δ", "", "三角座", "Triangulum"}, 664: []string{"天大将军十", "", "三角座γ", "", "三角座", "Triangulum"}, 705: []string{"蛇腹三", "", "水蛇座δ", "", "水蛇座", "Hydrus"}, 708: []string{"刍藁一", "", "鲸鱼座ρ", "", "鲸鱼座", "Cetus"}, 721: []string{"天园四", "", "波江座κ", "", "波江座", "Eridanus"}, 718: []string{"天囷六", "", "鲸鱼座ξ2", "", "鲸鱼座", "Cetus"}, 707: []string{"阁道一", "", "仙后座ι", "", "仙后座", "Cassiopeia"}, 754: []string{"天囷七", "", "鲸鱼座ν", "", "鲸鱼座", "Cetus"}, 779: []string{"天囷九", "", "鲸鱼座δ", "", "鲸鱼座", "Cetus"}, 781: []string{"刍藁六", "", "鲸鱼座ε", "", "鲸鱼座", "Cetus"}, 806: []string{"蛇腹二", "", "水蛇座ε", "", "水蛇座", "Hydrus"}, 789: []string{"天园五", "", "波江座s", "", "波江座", "Eridanus"}, 788: []string{"大陵八", "", "英仙座12", "", "英仙座", "Perseus"}, 804: []string{"天囷八", "", "鲸鱼座γ", "", "鲸鱼座", "Cetus"}, 801: []string{"胃宿一", "", "白羊座35", "", "白羊座", "Aries"}, 811: []string{"天苑七", "", "鲸鱼座π", "", "鲸鱼座", "Cetus"}, 813: []string{"天囷四", "", "鲸鱼座μ", "", "鲸鱼座", "Cetus"}, 818: []string{"天苑八", "", "波江座τ1", "", "波江座", "Eridanus"}, 837: []string{"蛇腹一", "", "水蛇座ζ", "", "水蛇座", "Hydrus"}, 824: []string{"胃宿二", "", "白羊座39", "", "白羊座", "Aries"}, 838: []string{"胃宿三", "", "白羊座41", "", "白羊座", "Aries"}, 872: []string{"附白二", "", "水蛇座ν", "", "水蛇座", "Hydrus"}, 840: []string{"大陵七", "", "英仙座16", "", "英仙座", "Perseus"}, 834: []string{"天船一", "", "英仙座η", "", "英仙座", "Perseus"}, 850: []string{"天苑九", "", "波江座τ2", "", "波江座", "Eridanus"}, 854: []string{"大陵二", "", "英仙座τ", "", "英仙座", "Perseus"}, 403: []string{"阁道三", "", "仙后座δ", "Ruchbah", "仙后座", "Cassiopeia"}, 879: []string{"积尸", "", "英仙座π", "", "英仙座", "Perseus"}, 896: []string{"天囷三", "", "鲸鱼座λ", "", "鲸鱼座", "Cetus"}, 919: []string{"天苑十", "", "波江座τ3", "", "波江座", "Eridanus"}, 915: []string{"天船二", "", "英仙座γ", "", "英仙座", "Perseus"}, 921: []string{"大陵六", "", "英仙座ρ", "", "英仙座", "Perseus"}, 472: []string{"水委一", "", "波江座α", "Achernar", "波江座", "Eridanus"}, 937: []string{"大陵三", "", "英仙座ι", "", "英仙座", "Perseus"}, 941: []string{"大陵四", "", "英仙座κ", "", "英仙座", "Perseus"}, 947: []string{"大陵增十八", "", "英仙座ω", "", "英仙座", "Perseus"}, 963: []string{"天苑增三", "", "天炉座α", "", "天炉座", "Fornax"}, 972: []string{"天阴二", "", "白羊座ζ", "", "白羊座", "Aries"}, 539: []string{"天仓四", "", "鲸鱼座ζ", "BatenKaitos", "鲸鱼座", "Cetus"}, 1003: []string{"天苑十一", "", "波江座τ4", "", "波江座", "Eridanus"}, 1030: []string{"天廪四", "", "金牛座ο", "", "金牛座", "Taurus"}, 1038: []string{"天廪三", "", "金牛座ξ", "", "金牛座", "Taurus"}, 1066: []string{"天廪一", "", "金牛座f", "", "金牛座", "Taurus"}, 1084: []string{"天苑四", "", "波江座ε", "", "波江座", "Eridanus"}, 1088: []string{"天苑十二", "", "波江座τ5", "", "波江座", "Eridanus"}, 1087: []string{"天船四", "", "英仙座ψ", "", "英仙座", "Perseus"}, 1123: []string{"卷舌六", "", "英仙座o", "", "英仙座", "Perseus"}, 1143: []string{"天园七", "", "波江座h", "", "波江座", "Eridanus"}, 1122: []string{"天船五", "", "英仙座δ", "", "英仙座", "Perseus"}, 1136: []string{"天苑三", "", "波江座δ", "", "波江座", "Eridanus"}, 1175: []string{"蛇首二", "", "网罟座β", "", "网罟座", "Reticulum"}, 544: []string{"娄宿增六", "", "三角座α", "Mothallah", "三角座", "Triangulum"}, 1135: []string{"卷舌一", "", "英仙座ν", "", "英仙座", "Perseus"}, 546: []string{"娄宿二", "", "白羊座γ2", "Mesarthim", "白羊座", "Aries"}, 1162: []string{"天苑二", "", "波江座π", "", "波江座", "Eridanus"}, 553: []string{"娄宿一", "", "白羊座β", "Sheratan", "白羊座", "Aries"}, 1173: []string{"天苑十三", "", "波江座τ6", "", "波江座", "Eridanus"}, 1208: []string{"附白一", "", "水蛇座γ", "", "水蛇座", "Hydrus"}, 595: []string{"外屏七", "", "双鱼座α", "Alrescha", "双鱼座", "Pisces"}, 1195: []string{"天园九", "", "波江座g", "", "波江座", "Eridanus"}, 1148: []string{"杠一", "", "鹿豹座γ", "", "鹿豹座", "Camelopardalis"}, 1213: []string{"天苑十五", "", "波江座τ8", "", "波江座", "Eridanus"}, 1203: []string{"卷舌四", "", "英仙座ζ", "", "英仙座", "Perseus"}, 1220: []string{"卷舌二", "", "英仙座ε", "", "英仙座", "Perseus"}, 603: []string{"天大将军一", "", "仙女座γ2", "Almaak", "仙女座", "Andromeda"}, 1240: []string{"天苑十六", "", "波江座τ9", "", "波江座", "Eridanus"}, 1239: []string{"毕宿八", "", "金牛座λ", "", "金牛座", "Taurus"}, 1251: []string{"毕宿增三", "", "金牛座ν", "", "金牛座", "Taurus"}, 1256: []string{"月", "", "金牛座37", "", "金牛座", "Taurus"}, 1261: []string{"积水", "", "英仙座λ", "", "英仙座", "Perseus"}, 1273: []string{"天船六", "", "英仙座c", "", "英仙座", "Perseus"}, 1318: []string{"九州殊口一", "", "波江座39", "", "波江座", "Eridanus"}, 1336: []string{"夹白二", "", "网罟座α", "", "网罟座", "Reticulum"}, 1303: []string{"天船七", "", "英仙座μ", "", "英仙座", "Perseus"}, 617: []string{"娄宿三", "", "白羊座α", "Hamal", "白羊座", "Aries"}, 1320: []string{"毕宿增七", "", "金牛座μ", "", "金牛座", "Taurus"}, 1338: []string{"金鱼一", "", "剑鱼座γ", "", "剑鱼座", "Dorado"}, 1329: []string{"天街二", "", "金牛座ω2", "", "金牛座", "Taurus"}, 1347: []string{"天园十", "", "波江座υ4", "", "波江座", "Eridanus"}, 1324: []string{"天船八", "", "英仙座b", "", "英仙座", "Perseus"}, 1346: []string{"毕宿四", "", "金牛座γ", "", "金牛座", "Taurus"}, 1348: []string{"砺石四", "", "金牛座φ", "", "金牛座", "Taurus"}, 1373: []string{"毕宿三", "", "金牛座δ1", "", "金牛座", "Taurus"}, 1393: []string{"天园十一", "", "波江座υ3", "", "波江座", "Eridanus"}, 1387: []string{"天街一", "", "金牛座κ1", "", "金牛座", "Taurus"}, 1389: []string{"毕宿二", "", "金牛座δ3", "", "金牛座", "Taurus"}, 1394: []string{"毕宿七", "", "金牛座71", "", "金牛座", "Taurus"}, 1396: []string{"天节一", "", "金牛座π", "", "金牛座", "Taurus"}, 1412: []string{"毕宿六", "", "金牛座θ2", "", "金牛座", "Taurus"}, 1453: []string{"天园十三", "", "波江座υ1", "", "波江座", "Eridanus"}, 1444: []string{"天节二", "", "金牛座ρ", "", "金牛座", "Taurus"}, 1465: []string{"金鱼二", "", "剑鱼座α", "", "剑鱼座", "Dorado"}, 1464: []string{"天园十二", "", "波江座υ2", "", "波江座", "Eridanus"}, 1458: []string{"天节七", "", "金牛座d", "", "金牛座", "Taurus"}, 424: []string{"勾陈一", "北极星", "小熊座α", "Polaris", "小熊座", "UrsaMinor"}, 1463: []string{"九州殊口四", "", "波江座ν", "", "波江座", "Eridanus"}, 1473: []string{"天节五", "", "金牛座c", "", "金牛座", "Taurus"}, 1481: []string{"九斿增四", "", "波江座l", "", "波江座", "Eridanus"}, 1479: []string{"附耳", "", "金牛座σ2", "", "金牛座", "Taurus"}, 1496: []string{"九斿八", "", "波江座54", "", "波江座", "Eridanus"}, 1497: []string{"诸王六", "", "金牛座τ", "", "金牛座", "Taurus"}, 1520: []string{"九斿二", "", "波江座μ", "", "波江座", "Eridanus"}, 1543: []string{"参旗六", "", "猎户座π3", "", "猎户座", "Orion"}, 1544: []string{"参旗五", "", "猎户座π2", "", "猎户座", "Orion"}, 1552: []string{"参旗七", "", "猎户座π4", "", "猎户座", "Orion"}, 1556: []string{"参旗一", "", "猎户座ο1", "", "猎户座", "Orion"}, 1560: []string{"九斿三", "", "波江座ω", "", "波江座", "Eridanus"}, 874: []string{"天苑六", "", "波江座η", "Azha", "波江座", "Eridanus"}, 1567: []string{"参旗八", "", "猎户座π5", "", "猎户座", "Orion"}, 1570: []string{"参旗四", "", "猎户座π1", "", "猎户座", "Orion"}, 1580: []string{"参旗二", "", "猎户座ο2", "", "猎户座", "Orion"}, 1577: []string{"五车一", "", "御夫座ι", "", "御夫座", "Auriga"}, 1568: []string{"八谷五", "", "鹿豹座7", "", "鹿豹座", "Camelopardalis"}, 1601: []string{"参旗九", "", "猎户座π6", "", "猎户座", "Orion"}, 1611: []string{"九斿五", "", "波江座64", "", "波江座", "Eridanus"}, 1617: []string{"玉井二", "", "波江座ψ", "", "波江座", "Eridanus"}, 1605: []string{"柱一", "", "御夫座ε", "", "御夫座", "Auriga"}, 1612: []string{"柱二", "", "御夫座ζ", "", "御夫座", "Auriga"}, 1620: []string{"天高一", "", "金牛座ι", "", "金牛座", "Taurus"}, 1654: []string{"屏二", "", "天兔座ε", "", "天兔座", "Lepus"}, 1641: []string{"柱三", "", "御夫座η", "", "御夫座", "Auriga"}, 1637: []string{"八谷六", "", "御夫座9", "", "御夫座", "Auriga"}, 1656: []string{"天高三", "", "金牛座m", "", "金牛座", "Taurus"}, 1679: []string{"玉井一", "", "波江座λ", "", "波江座", "Eridanus"}, 1696: []string{"军井一", "", "天兔座ι", "", "天兔座", "Lepus"}, 1702: []string{"屏一", "", "天兔座μ", "", "天兔座", "Lepus"}, 1705: []string{"军井二", "", "天兔座κ", "", "天兔座", "Lepus"}, 1689: []string{"天潢五", "", "御夫座μ", "", "御夫座", "Auriga"}, 1744: []string{"夹白一", "", "剑鱼座θ", "", "剑鱼座", "Dorado"}, 897: []string{"天园六", "", "波江座θ2", "Acamar", "波江座", "Eridanus"}, 1735: []string{"玉井四", "", "猎户座τ", "", "猎户座", "Orion"}, 1729: []string{"咸池三", "", "御夫座λ", "", "御夫座", "Auriga"}, 1739: []string{"天高四", "", "金牛座n", "", "金牛座", "Taurus"}, 1756: []string{"军井三", "", "天兔座λ", "", "天兔座", "Lepus"}, 1788: []string{"参宿增三", "", "猎户座η", "", "猎户座", "Orion"}, 911: []string{"天囷一", "", "鲸鱼座α", "Menkar", "鲸鱼座", "Cetus"}, 936: []string{"大陵五", "", "英仙座β", "Algol", "英仙座", "Perseus"}, 1862: []string{"丈人二", "", "天鸽座ε", "", "天鸽座", "Columba"}, 1855: []string{"参宿增三十六", "", "猎户座υ", "", "猎户座", "Orion"}, 1843: []string{"柱七", "", "御夫座χ", "", "御夫座", "Auriga"}, 951: []string{"天阴四", "", "白羊座δ", "Botein", "白羊座", "Aries"}, 1922: []string{"金鱼三", "", "剑鱼座β", "", "剑鱼座", "Dorado"}, 1876: []string{"觜宿二", "", "猎户座φ1", "", "猎户座", "Orion"}, 1892: []string{"伐一", "", "猎户座c", "", "猎户座", "Orion"}, 1899: []string{"伐三", "", "猎户座ι", "", "猎户座", "Orion"}, 984: []string{"天苑五", "", "波江座ζ", "Zibal", "波江座", "Eridanus"}, 1907: []string{"觜宿三", "", "猎户座φ2", "", "猎户座", "Orion"}, 1910: []string{"天关", "", "金牛座ζ", "", "金牛座", "Taurus"}, 1017: []string{"天船三", "", "英仙座α", "Mirphak", "英仙座", "Perseus"}, 1983: []string{"厕三", "", "天兔座γ", "", "天兔座", "Lepus"}, 2015: []string{"金鱼四", "", "剑鱼座δ", "", "剑鱼座", "Dorado"}, 1995: []string{"柱六", "", "御夫座τ", "", "御夫座", "Auriga"}, 1131: []string{"卷舌五", "", "英仙座ο", "Atik", "英仙座", "Perseus"}, 2011: []string{"柱四", "", "御夫座υ", "", "御夫座", "Auriga"}, 2035: []string{"厕四", "", "天兔座δ", "", "天兔座", "Lepus"}, 2012: []string{"柱五", "", "御夫座ν", "", "御夫座", "Auriga"}, 2056: []string{"子一", "", "天鸽座λ", "", "天鸽座", "Columba"}, 2034: []string{"诸王一", "", "金牛座136", "", "金牛座", "Taurus"}, 2047: []string{"司怪四", "", "猎户座χ1", "", "猎户座", "Orion"}, 2029: []string{"八谷二", "", "御夫座ξ", "", "御夫座", "Auriga"}, 2084: []string{"司怪一", "", "金牛座139", "", "金牛座", "Taurus"}, 2077: []string{"八谷一", "", "御夫座δ", "", "御夫座", "Auriga"}, 1142: []string{"昴宿一", "", "金牛座17", "Electra", "金牛座", "Taurus"}, 2095: []string{"五车四", "", "御夫座θ", "", "御夫座", "Auriga"}, 2135: []string{"司怪三", "", "猎户座χ2", "", "猎户座", "Orion"}, 2134: []string{"司怪二", "", "双子座1", "", "双子座", "Gemini"}, 2159: []string{"水府一", "", "猎户座ν", "", "猎户座", "Orion"}, 2199: []string{"水府二", "", "猎户座ξ", "", "猎户座", "Orion"}, 2198: []string{"水府四", "", "猎户座f1", "", "猎户座", "Orion"}, 2256: []string{"孙一", "", "天鸽座κ", "", "天鸽座", "Columba"}, 1145: []string{"昴宿二", "", "金牛座q", "Taygeta", "金牛座", "Taurus"}, 1149: []string{"昴宿四", "", "金牛座20", "Maia", "金牛座", "Taurus"}, 2298: []string{"四渎四", "", "麒麟座εA", "", "麒麟座", "Monoceros"}, 2361: []string{"孙增二", "", "大犬座λ", "", "大犬座", "CanisMajor"}, 2343: []string{"井宿二", "", "双子座ν", "", "双子座", "Gemini"}, 2387: []string{"军市六", "", "大犬座ξ1", "", "大犬座", "CanisMajor"}, 2385: []string{"四渎三", "", "麒麟座13", "", "麒麟座", "Monoceros"}, 2429: []string{"野鸡", "", "大犬座ν2", "", "大犬座", "CanisMajor"}, 1156: []string{"昴宿五", "", "金牛座23", "Merope", "金牛座", "Taurus"}, 2451: []string{"老人增二", "", "船尾座ν", "", "船尾座", "Puppis"}, 2443: []string{"军市二", "", "大犬座ν3", "", "大犬座", "CanisMajor"}, 2427: []string{"座旗五", "", "御夫座ψ2", "", "御夫座", "Auriga"}, 1165: []string{"昴宿六", "", "金牛座η", "Alcyone", "金牛座", "Taurus"}, 2484: []string{"井宿四", "", "双子座ξ", "", "双子座", "Gemini"}, 2503: []string{"四渎二", "", "麒麟座17", "", "麒麟座", "Monoceros"}, 2506: []string{"阙丘一", "", "麒麟座18", "", "麒麟座", "Monoceros"}, 2538: []string{"弧矢八", "", "大犬座κ", "", "大犬座", "CanisMajor"}, 2553: []string{"老人增一", "", "船尾座τ", "", "船尾座", "Puppis"}, 2540: []string{"五诸侯一", "", "双子座θ", "", "双子座", "Gemini"}, 2580: []string{"军市五", "", "大犬座ο1", "", "大犬座", "CanisMajor"}, 2574: []string{"天狼增二", "", "大犬座θ", "", "大犬座", "CanisMajor"}, 2590: []string{"军市三", "", "大犬座π", "", "大犬座", "CanisMajor"}, 2585: []string{"座旗二", "", "御夫座ψ10", "", "御夫座", "Auriga"}, 2646: []string{"弧矢增二", "", "大犬座σ", "", "大犬座", "CanisMajor"}, 2653: []string{"军市增五", "", "大犬座ο2", "", "大犬座", "CanisMajor"}, 1178: []string{"昴宿七", "", "金牛座27", "Atlas", "金牛座", "Taurus"}, 1231: []string{"天苑一", "", "波江座γ", "Zaurak", "波江座", "Eridanus"}, 2736: []string{"飞鱼二", "", "飞鱼座γ2", "", "飞鱼座", "Volans"}, 2697: []string{"五诸侯二", "", "双子座τ", "", "双子座", "Gemini"}, 2714: []string{"阙丘二", "", "麒麟座δ", "", "麒麟座", "Monoceros"}, 2749: []string{"弧矢增三", "", "大犬座ω", "", "大犬座", "CanisMajor"}, 2803: []string{"飞鱼五", "", "飞鱼座δ", "", "飞鱼座", "Volans"}, 2773: []string{"弧矢九", "", "船尾座π", "", "船尾座", "Puppis"}, 2763: []string{"井宿八", "", "双子座λ", "", "双子座", "Gemini"}, 1228: []string{"卷舌三", "", "英仙座ξ", "Menkib", "英仙座", "Perseus"}, 2828: []string{"南河一", "", "小犬座ε", "", "小犬座", "CanisMinor"}, 2821: []string{"五诸侯三", "", "双子座ι", "", "双子座", "Gemini"}, 2852: []string{"北河一", "", "双子座ρ", "", "双子座", "Gemini"}, 2878: []string{"弧矢二十四", "", "船尾座σ", "", "船尾座", "Puppis"}, 2864: []string{"水位一", "", "小犬座6", "", "小犬座", "CanisMinor"}, 1298: []string{"九州殊口二", "", "波江座ο1", "Beid", "波江座", "Eridanus"}, 2905: []string{"五诸侯四", "", "双子座υ", "", "双子座", "Gemini"}, 3024: []string{"飞鱼六", "", "飞鱼座ζ", "", "飞鱼座", "Volans"}, 2985: []string{"积薪", "", "双子座κ", "", "双子座", "Gemini"}, 3017: []string{"弧矢三", "", "船尾座C", "", "船尾座", "Puppis"}, 1325: []string{"九州殊口增十一", "", "波江座ο2", "Keid", "波江座", "Eridanus"}, 3034: []string{"弧矢五", "", "船尾座ο", "", "船尾座", "Puppis"}, 3045: []string{"弧矢增十七", "", "船尾座ξ", "", "船尾座", "Puppis"}, 3067: []string{"五诸侯五", "", "双子座φ", "", "双子座", "Gemini"}, 3185: []string{"弧矢增三十二", "", "船尾座ρ", "", "船尾座", "Puppis"}, 1409: []string{"毕宿一", "", "金牛座ε", "Ain", "金牛座", "Taurus"}, 3249: []string{"柳宿增十", "", "巨蟹座β", "", "巨蟹座", "Cancer"}, 3340: []string{"小斗八", "", "蝘蜓座θ", "", "蝘蜓座", "Chamaeleon"}, 1457: []string{"毕宿五", "", "金牛座α", "Aldebaran", "金牛座", "Taurus"}, 3275: []string{"上台增四", "", "天猫座31", "", "天猫座", "Lynx"}, 3314: []string{"外厨一", "", "长蛇座C", "", "长蛇座", "Hydra"}, 3347: []string{"飞鱼三", "", "飞鱼座β", "", "飞鱼座", "Volans"}, 3426: []string{"天狗一", "", "船帆座e", "", "船帆座", "Vela"}, 3410: []string{"柳宿一", "", "长蛇座δ", "", "长蛇座", "Hydra"}, 3418: []string{"柳宿二", "", "长蛇座σ", "", "长蛇座", "Hydra"}, 3438: []string{"天狗四", "", "罗盘座β", "", "罗盘座", "Pyxis"}, 3403: []string{"内阶增七", "", "大熊座π2", "", "大熊座", "UrsaMajor"}, 3445: []string{"天社二", "", "船帆座B", "", "船帆座", "Vela"}, 3454: []string{"柳宿三", "", "长蛇座η", "", "长蛇座", "Hydra"}, 1542: []string{"紫微右垣六", "少卫", "鹿豹座α", "", "鹿豹座", "Camelopardalis"}, 3468: []string{"天狗五", "", "罗盘座α", "", "罗盘座", "Pyxis"}, 3459: []string{"外厨二", "", "长蛇座F", "", "长蛇座", "Hydra"}, 3477: []string{"天狗二", "", "船帆座D", "", "船帆座", "Vela"}, 3485: []string{"天社三", "", "船帆座δ", "", "船帆座", "Vela"}, 3482: []string{"柳宿五", "", "长蛇座ε", "", "长蛇座", "Hydra"}, 3492: []string{"柳宿四", "", "长蛇座ρ", "", "长蛇座", "Hydra"}, 3518: []string{"天狗六", "", "罗盘座γ", "", "罗盘座", "Pyxis"}, 3547: []string{"柳宿六", "", "长蛇座ζ", "", "长蛇座", "Hydra"}, 3556: []string{"天狗七", "", "罗盘座δ", "", "罗盘座", "Pyxis"}, 1666: []string{"玉井三", "", "波江座β", "Cursa", "波江座", "Eridanus"}, 3579: []string{"轩辕一", "", "大熊座10", "", "大熊座", "UrsaMajor"}, 3615: []string{"飞鱼一", "", "飞鱼座α", "", "飞鱼座", "Volans"}, 3576: []string{"三师一", "", "大熊座ρ", "", "大熊座", "UrsaMajor"}, 3594: []string{"三台二", "", "大熊座κ", "", "大熊座", "UrsaMajor"}, 3613: []string{"柳宿七", "", "长蛇座ω", "", "长蛇座", "Hydra"}, 1713: []string{"参宿七", "", "猎户座β", "Rigel", "猎户座", "Orion"}, 3619: []string{"文昌五", "", "大熊座f", "", "大熊座", "UrsaMajor"}, 3665: []string{"柳宿八", "", "长蛇座θ", "", "长蛇座", "Hydra"}, 3662: []string{"文昌六", "", "大熊座e", "", "大熊座", "UrsaMajor"}, 1708: []string{"五车二", "", "御夫座α", "Capella", "御夫座", "Auriga"}, 3690: []string{"轩辕三", "", "天猫座38", "", "天猫座", "Lynx"}, 3706: []string{"星宿六", "", "长蛇座26", "", "长蛇座", "Hydra"}, 3709: []string{"星宿五", "", "长蛇座27", "", "长蛇座", "Hydra"}, 3705: []string{"轩辕四", "", "天猫座α", "", "天猫座", "Lynx"}, 3734: []string{"天社五", "", "船帆座κ", "", "船帆座", "Vela"}, 3731: []string{"轩辕七", "", "狮子座κ", "", "狮子座", "Leo"}, 3759: []string{"星宿二", "", "长蛇座τ1", "", "长蛇座", "Hydra"}, 3803: []string{"天社六", "", "船帆座n", "", "船帆座", "Vela"}, 3757: []string{"内阶四", "", "大熊座h", "", "大熊座", "UrsaMajor"}, 1790: []string{"参宿五", "", "猎户座γ", "Bellatrix", "猎户座", "Orion"}, 3782: []string{"酒旗二", "", "狮子座ξ", "", "狮子座", "Leo"}, 3787: []string{"星宿三", "", "长蛇座τ2", "", "长蛇座", "Hydra"}, 3775: []string{"文昌四", "", "大熊座θ", "", "大熊座", "UrsaMajor"}, 3825: []string{"海石三", "", "船底座h", "", "船底座", "Carina"}, 3771: []string{"紫微右垣四", "", "大熊座d", "", "大熊座", "UrsaMajor"}, 3845: []string{"星宿四", "", "长蛇座ι", "", "长蛇座", "Hydra"}, 3884: []string{"海石四", "", "船底座l", "", "船底座", "Carina"}, 3873: []string{"轩辕九", "", "狮子座ε", "", "狮子座", "Leo"}, 3890: []string{"海石五", "", "船底座υ", "", "船底座", "Carina"}, 3888: []string{"文昌二", "", "大熊座υ", "", "大熊座", "UrsaMajor"}, 3903: []string{"张宿一", "", "长蛇座υ1", "", "长蛇座", "Hydra"}, 3894: []string{"文昌三", "", "大熊座φ", "", "大熊座", "UrsaMajor"}, 1791: []string{"五车五", "", "金牛座β", "Alnath", "金牛座", "Taurus"}, 3975: []string{"轩辕十三", "", "狮子座η", "", "狮子座", "Leo"}, 3974: []string{"内平二", "", "小狮座21", "", "小狮座", "LeoMinor"}, 3980: []string{"轩辕十七", "", "狮子座31", "", "狮子座", "Leo"}, 3994: []string{"张宿二", "", "长蛇座λ", "", "长蛇座", "Hydra"}, 4037: []string{"南船四", "", "船底座ω", "", "船底座", "Carina"}, 1829: []string{"厕二", "", "天兔座β", "Nihal", "天兔座", "Lepus"}, 4050: []string{"南船一", "", "船底座q", "", "船底座", "Carina"}, 1852: []string{"参宿三", "", "猎户座δ", "Mintaka", "猎户座", "Orion"}, 4094: []string{"张宿三", "", "长蛇座μ", "", "长蛇座", "Hydra"}, 4114: []string{"海山一", "", "船底座s", "", "船底座", "Carina"}, 4140: []string{"南船二", "", "船底座p", "", "船底座", "Carina"}, 4133: []string{"轩辕十六", "", "狮子座ρ", "", "狮子座", "Leo"}, 4174: []string{"小斗三", "", "蝘蜓座γ", "", "蝘蜓座", "Chamaeleon"}, 4171: []string{"张宿六", "", "长蛇座φ3", "", "长蛇座", "Hydra"}, 4199: []string{"南船三", "", "船底座θ", "", "船底座", "Carina"}, 4234: []string{"小斗四", "", "蝘蜓座δ2", "", "蝘蜓座", "Chamaeleon"}, 4216: []string{"海山增二", "", "船帆座μ", "", "船帆座", "Vela"}, 4232: []string{"翼宿五", "", "长蛇座ν", "", "长蛇座", "Hydra"}, 4247: []string{"势四", "", "小狮座46", "", "小狮座", "LeoMinor"}, 4248: []string{"天牢一", "", "大熊座ω", "", "大熊座", "UrsaMajor"}, 4259: []string{"少微二", "", "狮子座54", "", "狮子座", "Leo"}, 1865: []string{"厕一", "", "天兔座α", "Arneb", "天兔座", "Lepus"}, 4291: []string{"灵台三", "", "狮子座58", "", "狮子座", "Leo"}, 4294: []string{"灵台二", "", "狮子座c", "", "狮子座", "Leo"}, 1879: []string{"觜宿一", "", "猎户座λ", "Meissa", "猎户座", "Orion"}, 1903: []string{"参宿二", "", "猎户座ε", "Alnilam", "猎户座", "Orion"}, 4310: []string{"灵台一", "", "狮子座χ", "", "狮子座", "Leo"}, 4314: []string{"翼宿二十", "", "长蛇座χ1", "", "长蛇座", "Hydra"}, 4335: []string{"太尊", "", "大熊座ψ", "", "大熊座", "UrsaMajor"}, 4343: []string{"翼宿十六", "", "巨爵座β", "", "巨爵座", "Crater"}, 1956: []string{"丈人一", "", "天鸽座α", "Phact", "天鸽座", "Columba"}, 4362: []string{"虎贲", "", "狮子座72", "", "狮子座", "Leo"}, 4382: []string{"翼宿七", "", "巨爵座δ", "", "巨爵座", "Crater"}, 4386: []string{"太微右垣二", "西上将", "狮子座σ", "", "狮子座", "Leo"}, 4392: []string{"天牢六", "", "大熊座56", "", "大熊座", "UrsaMajor"}, 4399: []string{"太微右垣三", "西次将", "狮子座ι", "", "狮子座", "Leo"}, 4402: []string{"翼宿十", "", "巨爵座ε", "", "巨爵座", "Crater"}, 4405: []string{"翼宿二", "", "巨爵座γ", "", "巨爵座", "Crater"}, 4418: []string{"明堂一", "", "狮子座τ", "", "狮子座", "Leo"}, 4432: []string{"明堂三", "", "狮子座e", "", "狮子座", "Leo"}, 1948: []string{"参宿一", "", "猎户座ζ", "Alnitak", "猎户座", "Orion"}, 4450: []string{"青丘五", "", "长蛇座ξ", "", "长蛇座", "Hydra"}, 4467: []string{"海山五", "", "半人马座λ", "", "半人马座", "Centaurus"}, 4468: []string{"翼宿十三", "", "巨爵座θ", "", "巨爵座", "Crater"}, 4471: []string{"明堂二", "", "狮子座υ", "", "狮子座", "Leo"}, 4494: []string{"青丘七", "", "长蛇座ο", "", "长蛇座", "Hydra"}, 4514: []string{"翼宿三", "", "巨爵座ζ", "", "巨爵座", "Crater"}, 4515: []string{"内屏一", "", "室女座ξ", "", "室女座", "Virgo"}, 4520: []string{"海山六", "", "苍蝇座λ", "", "苍蝇座", "Musca"}, 4517: []string{"内屏二", "", "室女座ν", "", "室女座", "Virgo"}, 4518: []string{"太阳守", "", "大熊座χ", "", "大熊座", "UrsaMajor"}, 4527: []string{"太子", "", "狮子座93", "", "狮子座", "Leo"}, 2004: []string{"参宿六", "", "猎户座κ", "Saiph", "猎户座", "Orion"}, 4552: []string{"青丘一", "", "长蛇座β", "", "长蛇座", "Hydra"}, 4583: []string{"小斗二", "", "蝘蜓座ε", "", "蝘蜓座", "Chamaeleon"}, 4589: []string{"内屏三", "", "室女座π", "", "室女座", "Virgo"}, 4608: []string{"内屏四", "", "室女座ο", "", "室女座", "Virgo"}, 4621: []string{"马尾三", "", "半人马座δ", "", "半人马座", "Centaurus"}, 2040: []string{"子二", "", "天鸽座β", "Wazn", "天鸽座", "Columba"}, 4630: []string{"轸宿二", "", "乌鸦座ε", "", "乌鸦座", "Corvus"}, 4638: []string{"马尾二", "", "半人马座ρ", "", "半人马座", "Centaurus"}, 4656: []string{"十字架四", "", "南十字座δ", "", "南十字座", "Crux"}, 2061: []string{"参宿四", "", "猎户座α", "Betelgeuse", "猎户座", "Orion"}, 4667: []string{"郎位十", "", "后发座7", "", "后发座", "ComaBerenices"}, 4674: []string{"小斗一", "", "蝘蜓座β", "", "蝘蜓座", "Chamaeleon"}, 4695: []string{"谒者", "", "室女座c", "", "室女座", "Virgo"}, 4707: []string{"郎位七", "", "后发座12", "", "后发座", "ComaBerenices"}, 4716: []string{"相", "", "猎犬座5", "", "猎犬座", "CanesVenatici"}, 4733: []string{"郎位三", "", "后发座14", "", "后发座", "ComaBerenices"}, 4732: []string{"马尾一", "", "半人马座G", "", "半人马座", "Centaurus"}, 2088: []string{"五车三", "", "御夫座β", "Menkalinan", "御夫座", "Auriga"}, 4737: []string{"郎位一", "", "后发座γ", "", "后发座", "ComaBerenices"}, 4738: []string{"郎位四", "", "后发座16", "", "后发座", "ComaBerenices"}, 4743: []string{"库楼十", "", "半人马座σ", "", "半人马座", "Centaurus"}, 2216: []string{"钺", "", "双子座η", "Propus", "双子座", "Gemini"}, 4775: []string{"左辖", "", "乌鸦座η", "", "乌鸦座", "Corvus"}, 4787: []string{"紫微右垣二", "少尉", "天龙座κ", "", "天龙座", "Draco"}, 4786: []string{"轸宿四", "", "乌鸦座β", "", "乌鸦座", "Corvus"}, 4789: []string{"郎位十一", "", "后发座23", "", "后发座", "ComaBerenices"}, 4798: []string{"蜜蜂三", "", "苍蝇座α", "", "苍蝇座", "Musca"}, 4802: []string{"库楼八", "", "半人马座τ", "", "半人马座", "Centaurus"}, 4819: []string{"库楼七", "", "半人马座γ", "", "半人马座", "Centaurus"}, 2282: []string{"孙增一", "", "大犬座ζ", "Furud", "大犬座", "CanisMajor"}, 4828: []string{"九卿一", "", "室女座ρ", "", "室女座", "Virgo"}, 4844: []string{"蜜蜂一", "", "苍蝇座β", "", "苍蝇座", "Musca"}, 4883: []string{"郎将", "", "后发座31", "", "后发座", "ComaBerenices"}, 2294: []string{"军市一", "", "大犬座β", "Mirzam", "大犬座", "CanisMajor"}, 4910: []string{"太微左垣三", "", "室女座δ", "", "室女座", "Virgo"}, 4920: []string{"五诸侯二", "", "后发座36", "", "后发座", "ComaBerenices"}, 4924: []string{"周鼎二", "", "后发座37", "", "后发座", "ComaBerenices"}, 2286: []string{"井宿一", "", "双子座μ", "Tejat", "双子座", "Gemini"}, 4940: []string{"库楼六", "", "半人马座F", "", "半人马座", "Centaurus"}, 4954: []string{"周鼎三", "", "后发座41", "", "后发座", "ComaBerenices"}, 4963: []string{"平道一", "", "室女座θ", "", "室女座", "Virgo"}, 4968: []string{"太微左垣五", "东上将", "后发座α", "", "后发座", "ComaBerenices"}, 4983: []string{"周鼎一", "", "后发座β", "", "后发座", "ComaBerenices"}, 5020: []string{"平一", "", "长蛇座γ", "", "长蛇座", "Hydra"}, 5028: []string{"柱十一", "", "半人马座ι", "", "半人马座", "Centaurus"}, 2326: []string{"老人", "", "船底座α", "Canopus", "船底座", "Carina"}, 5068: []string{"天门二", "", "室女座69", "", "室女座", "Virgo"}, 5089: []string{"库楼五", "", "半人马座D", "", "半人马座", "Centaurus"}, 5105: []string{"天田一", "", "室女座o", "", "室女座", "Virgo"}, 5112: []string{"三公二", "", "猎犬座24", "", "猎犬座", "CanesVenatici"}, 5107: []string{"角宿二", "", "室女座ζ", "", "室女座", "Virgo"}, 5132: []string{"南门一", "", "半人马座ε", "", "半人马座", "Centaurus"}, 5168: []string{"柱九", "", "半人马座i", "", "半人马座", "Centaurus"}, 5185: []string{"右摄提二", "", "牧夫座τ", "", "牧夫座", "Bootes"}, 2421: []string{"井宿三", "", "双子座γ", "Alhena", "双子座", "Gemini"}, 5192: []string{"库楼四", "", "半人马座2", "", "半人马座", "Centaurus"}, 5200: []string{"右摄提三", "", "牧夫座υ", "", "牧夫座", "Bootes"}, 5190: []string{"衡一", "", "半人马座ν", "", "半人马座", "Centaurus"}, 5193: []string{"衡二", "", "半人马座μ", "", "半人马座", "Centaurus"}, 5226: []string{"天一", "", "天龙座i", "", "天龙座", "Draco"}, 5210: []string{"柱八", "", "半人马座3", "", "半人马座", "Centaurus"}, 5221: []string{"柱七", "", "半人马座H", "", "半人马座", "Centaurus"}, 5231: []string{"库楼一", "", "半人马座ζ", "", "半人马座", "Centaurus"}, 5248: []string{"衡三", "", "半人马座φ", "", "半人马座", "Centaurus"}, 5249: []string{"柱二", "", "半人马座υ1", "", "半人马座", "Centaurus"}, 5264: []string{"天田二", "", "室女座τ", "", "室女座", "Virgo"}, 5260: []string{"柱一", "", "半人马座υ2", "", "半人马座", "Centaurus"}, 2473: []string{"井宿五", "", "双子座ε", "Mebsuta", "双子座", "Gemini"}, 5285: []string{"衡四", "", "半人马座χ", "", "半人马座", "Centaurus"}, 5287: []string{"平二", "", "长蛇座π", "", "长蛇座", "Hydra"}, 2491: []string{"天狼", "", "大犬座α", "Sirius", "大犬座", "CanisMajor"}, 5321: []string{"北极四", "后宫", "小熊座4", "", "小熊座", "UrsaMinor"}, 5304: []string{"帝席一", "", "牧夫座d", "", "牧夫座", "Bootes"}, 5315: []string{"亢宿一", "", "室女座κ", "", "室女座", "Virgo"}, 2618: []string{"弧矢七", "", "大犬座ε", "Adhara", "大犬座", "CanisMajor"}, 5350: []string{"天枪二", "", "牧夫座ι", "", "牧夫座", "Bootes"}, 5351: []string{"玄戈", "", "牧夫座λ", "", "牧夫座", "Bootes"}, 5303: []string{"异雀七", "", "天燕座η", "", "天燕座", "Apus"}, 5359: []string{"亢宿四", "", "室女座λ", "", "室女座", "Virgo"}, 5354: []string{"柱三", "", "豺狼座ι", "", "豺狼座", "Lupus"}, 5370: []string{"亢池一", "", "牧夫座20", "", "牧夫座", "Bootes"}, 5367: []string{"柱六", "", "半人马座ψ", "", "半人马座", "Centaurus"}, 5378: []string{"柱五", "", "半人马座A", "", "半人马座", "Centaurus"}, 5404: []string{"天枪三", "", "牧夫座θ", "", "牧夫座", "Bootes"}, 5396: []string{"柱四", "", "豺狼座τ2", "", "豺狼座", "Lupus"}, 2657: []string{"天狼增四", "", "大犬座γ", "Muliphein", "大犬座", "CanisMajor"}, 5409: []string{"亢宿三", "", "室女座φ", "", "室女座", "Virgo"}, 5429: []string{"梗河三", "", "牧夫座ρ", "", "牧夫座", "Bootes"}, 5425: []string{"车骑三", "", "豺狼座σ", "", "豺狼座", "Lupus"}, 5447: []string{"梗河二", "", "牧夫座σ", "", "牧夫座", "Bootes"}, 5440: []string{"库楼二", "", "半人马座η", "", "半人马座", "Centaurus"}, 5453: []string{"车骑二", "", "豺狼座ρ", "", "豺狼座", "Lupus"}, 2650: []string{"井宿七", "", "双子座ζ", "Mekbuda", "双子座", "Gemini"}, 5475: []string{"左摄提二", "", "牧夫座π2", "", "牧夫座", "Bootes"}, 5477: []string{"左摄提三", "", "牧夫座ζ", "", "牧夫座", "Bootes"}, 5469: []string{"骑官十", "", "豺狼座α", "", "豺狼座", "Lupus"}, 5471: []string{"阳门一", "", "半人马座B", "", "半人马座", "Centaurus"}, 5487: []string{"亢宿增七", "", "室女座μ", "", "室女座", "Virgo"}, 5485: []string{"阳门二", "", "半人马座C1", "", "半人马座", "Centaurus"}, 5502: []string{"左摄提一", "", "牧夫座ο", "", "牧夫座", "Bootes"}, 5470: []string{"异雀八", "", "天燕座α", "", "天燕座", "Apus"}, 5526: []string{"阵车一", "", "长蛇座E", "", "长蛇座", "Hydra"}, 2693: []string{"弧矢一", "", "大犬座δ", "Wezen", "大犬座", "CanisMajor"}, 5528: []string{"骑官九", "", "豺狼座ο", "", "豺狼座", "Lupus"}, 5589: []string{"天床五", "", "小熊座Rr", "", "小熊座", "UrsaMinor"}, 5571: []string{"骑官四", "", "豺狼座β", "", "豺狼座", "Lupus"}, 5576: []string{"骑官三", "", "半人马座κ", "", "半人马座", "Centaurus"}, 2777: []string{"天樽二", "", "双子座δ", "Wasat", "双子座", "Gemini"}, 5603: []string{"折威七", "", "天秤座σ", "", "天秤座", "Libra"}, 5605: []string{"骑官八", "", "豺狼座π", "", "豺狼座", "Lupus"}, 5626: []string{"骑官五", "", "豺狼座λ", "", "豺狼座", "Lupus"}, 5646: []string{"骑阵将军", "", "豺狼座κ1", "", "豺狼座", "Lupus"}, 5652: []string{"氐宿二", "", "天秤座ι1", "", "天秤座", "Libra"}, 5649: []string{"车骑一", "", "豺狼座ζ", "", "豺狼座", "Lupus"}, 5660: []string{"顿顽二", "", "豺狼座i", "", "豺狼座", "Lupus"}, 5681: []string{"七公七", "", "牧夫座δ", "", "牧夫座", "Bootes"}, 5686: []string{"阵车三", "", "豺狼座f", "", "豺狼座", "Lupus"}, 5683: []string{"骑官七", "", "豺狼座μ", "", "豺狼座", "Lupus"}, 5671: []string{"三角形一", "", "南三角座γ", "", "南三角座", "TriangulumAustrale"}, 2827: []string{"弧矢二", "", "大犬座η", "Aludra", "大犬座", "CanisMajor"}, 5695: []string{"骑官二", "", "豺狼座δ", "", "豺狼座", "Lupus"}, 5705: []string{"顿顽一", "", "豺狼座φ1", "", "豺狼座", "Lupus"}, 5708: []string{"骑官六", "", "豺狼座ε", "", "豺狼座", "Lupus"}, 2845: []string{"南河二", "", "小犬座β", "Gomeisa", "小犬座", "CanisMinor"}, 5778: []string{"贯索二", "", "北冕座θ", "", "北冕座", "CoronaBorealis"}, 2891: []string{"北河二", "", "双子座α", "Castor", "双子座", "Gemini"}, 5788: []string{"天市右垣六", "", "巨蛇座δ", "", "巨蛇座", "Serpens"}, 5776: []string{"骑官一", "", "豺狼座γ", "", "豺狼座", "Lupus"}, 5787: []string{"氐宿三", "", "天秤座γ", "", "天秤座", "Libra"}, 5794: []string{"天辐一", "", "天秤座υ", "", "天秤座", "Libra"}, 5812: []string{"天辐二", "", "天秤座τ", "", "天秤座", "Libra"}, 5838: []string{"日", "", "天秤座κ", "", "天秤座", "Libra"}, 5839: []string{"从官一", "", "豺狼座ψ2", "", "豺狼座", "Lupus"}, 5849: []string{"贯索五", "", "北冕座γ", "", "北冕座", "CoronaBorealis"}, 5903: []string{"勾陈四", "", "小熊座ζ", "", "小熊座", "UrsaMinor"}, 5867: []string{"天市右垣五", "", "巨蛇座β", "", "巨蛇座", "Serpens"}, 5889: []string{"贯索六", "", "北冕座δ", "", "北冕座", "CoronaBorealis"}, 5881: []string{"天乳", "", "巨蛇座μ", "", "巨蛇座", "Serpens"}, 5892: []string{"天市右垣八", "", "巨蛇座ε", "", "巨蛇座", "Serpens"}, 5883: []string{"从官二", "", "豺狼座χ", "", "豺狼座", "Lupus"}, 5914: []string{"七公四", "", "武仙座χ", "", "武仙座", "Hercules"}, 5908: []string{"西咸三", "", "天秤座θ", "", "天秤座", "Libra"}, 5897: []string{"三角形二", "", "南三角座β", "", "南三角座", "TriangulumAustrale"}, 5933: []string{"天市右垣四", "", "巨蛇座γ", "", "巨蛇座", "Serpens"}, 5928: []string{"房宿二", "", "天蝎座ρ", "", "天蝎座", "Scorpius"}, 5947: []string{"贯索七", "", "北冕座ε", "", "北冕座", "CoronaBorealis"}, 5941: []string{"西咸二", "", "天秤座48", "", "天秤座", "Libra"}, 5944: []string{"房宿一", "", "天蝎座π", "", "天蝎座", "Scorpius"}, 5948: []string{"积卒二", "", "豺狼座η", "", "豺狼座", "Lupus"}, 2943: []string{"南河三", "", "小犬座α", "Procyon", "小犬座", "CanisMinor"}, 5971: []string{"贯索八", "", "北冕座ι", "", "北冕座", "CoronaBorealis"}, 5986: []string{"紫微左垣二", "上宰", "天龙座θ", "", "天龙座", "Draco"}, 5987: []string{"积卒一", "", "豺狼座θ", "", "豺狼座", "Lupus"}, 5993: []string{"钩钤一", "", "天蝎座ω1", "", "天蝎座", "Scorpius"}, 5997: []string{"钩钤二", "", "天蝎座ω2", "", "天蝎座", "Scorpius"}, 6023: []string{"七公三", "", "武仙座φ", "", "武仙座", "Hercules"}, 6027: []string{"键闭", "", "天蝎座ν", "", "天蝎座", "Scorpius"}, 2990: []string{"北河三", "", "双子座β", "Pollux", "双子座", "Gemini"}, 6116: []string{"勾陈增九", "", "小熊座η", "", "小熊座", "UrsaMinor"}, 6092: []string{"七公二", "", "武仙座τ", "", "武仙座", "Hercules"}, 6020: []string{"异雀六", "", "天燕座δ1", "", "天燕座", "Apus"}, 3165: []string{"弧矢增二十二", "", "船尾座ζ", "Naos", "船尾座", "Puppis"}, 6095: []string{"天市右垣二", "河间", "武仙座γ", "", "武仙座", "Hercules"}, 6093: []string{"列肆一", "", "巨蛇座σ", "", "巨蛇座", "Serpens"}, 6103: []string{"天纪一", "", "北冕座ξ", "", "北冕座", "CoronaBorealis"}, 6132: []string{"紫微左垣三", "少宰", "天龙座η", "", "天龙座", "Draco"}, 6104: []string{"东咸三", "", "蛇夫座ψ", "", "蛇夫座", "Ophiuchus"}, 6118: []string{"东咸二", "", "蛇夫座χ", "", "蛇夫座", "Ophiuchus"}, 6129: []string{"车肆一", "", "蛇夫座υ", "", "蛇夫座", "Ophiuchus"}, 6161: []string{"尚书二", "", "天龙座15", "", "天龙座", "Draco"}, 3207: []string{"天社一", "", "船帆座γ2", "Regor", "船帆座", "Vela"}, 3210: []string{"水位四", "", "巨蟹座ζ2", "Tegmine", "巨蟹座", "Cancer"}, 6147: []string{"东咸一", "", "蛇夫座φ", "", "蛇夫座", "Ophiuchus"}, 6153: []string{"东咸四", "", "蛇夫座ω", "", "蛇夫座", "Ophiuchus"}, 6159: []string{"斗四", "", "武仙座h", "", "武仙座", "Hercules"}, 6102: []string{"异雀四", "", "天燕座γ", "", "天燕座", "Apus"}, 6165: []string{"心宿三", "", "天蝎座τ", "", "天蝎座", "Scorpius"}, 6175: []string{"天市右垣十一", "", "蛇夫座ζ", "", "蛇夫座", "Ophiuchus"}, 6200: []string{"七公一", "", "武仙座42", "", "武仙座", "Hercules"}, 6223: []string{"尚书三", "", "天龙座g", "", "天龙座", "Draco"}, 6212: []string{"天纪二", "", "武仙座ζ", "", "武仙座", "Hercules"}, 6163: []string{"异雀三", "", "天燕座β", "", "天燕座", "Apus"}, 6322: []string{"勾陈三", "", "小熊座ε", "", "小熊座", "UrsaMinor"}, 6229: []string{"龟四", "", "天坛座η", "", "天坛座", "Ara"}, 6243: []string{"车肆二", "", "蛇夫座20", "", "蛇夫座", "Ophiuchus"}, 6241: []string{"尾宿二", "", "天蝎座ε", "", "天蝎座", "Scorpius"}, 6247: []string{"尾宿一", "", "天蝎座μ1", "", "天蝎座", "Scorpius"}, 6262: []string{"尾宿三", "", "天蝎座ζ1", "", "天蝎座", "Scorpius"}, 6281: []string{"斛一", "", "蛇夫座ι", "", "蛇夫座", "Ophiuchus"}, 6315: []string{"尚书五", "", "天龙座h", "", "天龙座", "Draco"}, 6299: []string{"斛二", "", "蛇夫座κ", "", "蛇夫座", "Ophiuchus"}, 6285: []string{"龟五", "", "天坛座ζ", "", "天坛座", "Ara"}, 6295: []string{"龟一", "", "天坛座ε1", "", "天坛座", "Ara"}, 6324: []string{"天纪三", "", "武仙座ε", "", "武仙座", "Hercules"}, 3307: []string{"海石一", "", "船底座ε", "Avior", "船底座", "Carina"}, 6355: []string{"宦者三", "", "武仙座60", "", "武仙座", "Hercules"}, 6396: []string{"紫微左垣四", "", "天龙座ζ", "", "天龙座", "Draco"}, 6380: []string{"尾宿四", "", "天蝎座η", "", "天蝎座", "Scorpius"}, 3323: []string{"内阶一", "", "大熊座ο", "Muscida", "大熊座", "UrsaMajor"}, 6410: []string{"天市左垣一", "", "武仙座δ", "", "武仙座", "Hercules"}, 6418: []string{"女床一", "", "武仙座π", "", "武仙座", "Hercules"}, 6401: []string{"天江二", "", "蛇夫座36", "", "蛇夫座", "Ophiuchus"}, 6431: []string{"天纪六", "", "武仙座u", "", "武仙座", "Hercules"}, 6436: []string{"女床二", "", "武仙座e", "", "武仙座", "Hercules"}, 6446: []string{"市楼四", "", "巨蛇座ν", "", "巨蛇座", "Serpens"}, 6417: []string{"异雀一", "", "天燕座ζ", "", "天燕座", "Apus"}, 6453: []string{"天江三", "", "蛇夫座θ", "", "蛇夫座", "Ophiuchus"}, 6484: []string{"女床三", "", "武仙座ρ", "", "武仙座", "Hercules"}, 6461: []string{"杵三", "", "天坛座β", "", "天坛座", "Ara"}, 6462: []string{"龟二", "", "天坛座γ", "", "天坛座", "Ara"}, 6486: []string{"天江四", "", "蛇夫座b", "", "蛇夫座", "Ophiuchus"}, 6492: []string{"糠", "", "蛇夫座d", "", "蛇夫座", "Ophiuchus"}, 3449: []string{"鬼宿三", "", "巨蟹座γ", "AsellusBorealis", "巨蟹座", "Cancer"}, 6500: []string{"龟三", "", "天坛座δ", "", "天坛座", "Ara"}, 6519: []string{"天龠六", "", "蛇夫座c", "", "蛇夫座", "Ophiuchus"}, 6510: []string{"杵二", "", "天坛座α", "", "天坛座", "Ara"}, 6554: []string{"天棓二", "", "天龙座ν1", "", "天龙座", "Draco"}, 3461: []string{"鬼宿四", "", "巨蟹座δ", "AsellusAustralis", "巨蟹座", "Cancer"}, 3572: []string{"柳宿增三", "", "巨蟹座α", "Acubens", "巨蟹座", "Cancer"}, 6537: []string{"杵一", "", "天坛座σ", "", "天坛座", "Ara"}, 6561: []string{"天市左垣十", "", "巨蛇座ξ", "", "巨蛇座", "Serpens"}, 6567: []string{"市楼一", "", "蛇夫座μ", "", "蛇夫座", "Ophiuchus"}, 6588: []string{"天棓五", "", "武仙座ι", "", "武仙座", "Hercules"}, 6581: []string{"市楼二", "", "巨蛇座ο", "", "巨蛇座", "Serpens"}, 6636: []string{"女史", "", "天龙座ψ1A", "", "天龙座", "Draco"}, 6580: []string{"尾宿七", "", "天蝎座κ", "", "天蝎座", "Scorpius"}, 6595: []string{"天龠三", "", "蛇夫座58", "", "蛇夫座", "Ophiuchus"}, 3569: []string{"三台一", "", "大熊座ι", "Talitha", "大熊座", "UrsaMajor"}, 6582: []string{"孔雀一", "", "孔雀座η", "", "孔雀座", "Pavo"}, 6623: []string{"天市左垣三", "", "武仙座μ", "", "武仙座", "Hercules"}, 6616: []string{"天龠八", "", "人马座3", "", "人马座", "Sagittarius"}, 6615: []string{"尾宿六", "", "天蝎座ι1", "", "天蝎座", "Scorpius"}, 6629: []string{"宗正二", "", "蛇夫座γ", "", "蛇夫座", "Ophiuchus"}, 6630: []string{"傅说", "", "天蝎座G", "", "天蝎座", "Scorpius"}, 6695: []string{"天纪九", "", "武仙座θ", "", "武仙座", "Hercules"}, 3634: []string{"天记", "", "船帆座λ", "Suhail", "船帆座", "Vela"}, 6698: []string{"天市左垣九", "", "蛇夫座ν", "", "蛇夫座", "Ophiuchus"}, 6712: []string{"宗人一", "", "蛇夫座66", "", "蛇夫座", "Ophiuchus"}, 6714: []string{"宗人二", "", "蛇夫座67", "", "蛇夫座", "Ophiuchus"}, 6729: []string{"帛度一", "", "武仙座95", "", "武仙座", "Hercules"}, 6723: []string{"宗人三", "", "蛇夫座68", "", "蛇夫座", "Ophiuchus"}, 6733: []string{"市楼三", "", "蛇夫座τ", "", "蛇夫座", "Ophiuchus"}, 6752: []string{"宗人四", "", "蛇夫座70", "", "蛇夫座", "Ophiuchus"}, 6779: []string{"天市左垣四", "中山", "武仙座ο", "", "武仙座", "Hercules"}, 6745: []string{"孔雀二", "", "孔雀座π", "", "孔雀座", "Pavo"}, 6787: []string{"帛度二", "", "武仙座102", "", "武仙座", "Hercules"}, 6812: []string{"斗宿三", "", "人马座μ", "", "人马座", "Sagittarius"}, 6832: []string{"箕宿四", "", "人马座η", "", "人马座", "Sagittarius"}, 6920: []string{"柱史", "", "天龙座φ", "", "天龙座", "Draco"}, 3685: []string{"南船五", "", "船底座β", "Miaplacidus", "船底座", "Carina"}, 6927: []string{"御女四", "", "天龙座χ", "", "天龙座", "Draco"}, 6869: []string{"天市左垣八", "东海", "巨蛇座η", "", "巨蛇座", "Serpens"}, 6895: []string{"屠肆一", "", "武仙座109", "", "武仙座", "Hercules"}, 6923: []string{"扶筐三", "", "天龙座b", "", "天龙座", "Draco"}, 6897: []string{"鳖一", "", "望远镜座α", "", "望远镜座", "Telescopium"}, 3699: []string{"海石二", "", "船底座ι", "Aspidiske", "船底座", "Carina"}, 6916: []string{"孔雀三", "", "孔雀座ν", "", "孔雀座", "Pavo"}, 6978: []string{"扶筐二", "", "天龙座d", "", "天龙座", "Draco"}, 6951: []string{"鳖十一", "", "南冕座θ", "", "南冕座", "CoronaAustrilis"}, 6973: []string{"天弁一", "", "盾牌座α", "", "盾牌座", "Scutum"}, 7020: []string{"天弁二", "", "盾牌座δ", "", "盾牌座", "Scutum"}, 6982: []string{"孔雀八", "", "孔雀座ζ", "", "孔雀座", "Pavo"}, 7032: []string{"天弁三", "", "盾牌座ε", "", "盾牌座", "Scutum"}, 7051: []string{"织女二", "", "天琴座ε1", "", "天琴座", "Lyra"}, 7056: []string{"织女三", "", "天琴座ζ1", "", "天琴座", "Lyra"}, 7039: []string{"斗宿一", "", "人马座φ", "", "人马座", "Sagittarius"}, 7061: []string{"宗一", "", "武仙座110", "", "武仙座", "Hercules"}, 7069: []string{"宗二", "", "武仙座111", "", "武仙座", "Hercules"}, 7063: []string{"天弁四", "", "盾牌座β", "", "盾牌座", "Scutum"}, 3748: []string{"星宿一", "", "长蛇座α", "Alphard", "长蛇座", "Hydra"}, 7125: []string{"扶筐四", "", "天龙座ο", "", "天龙座", "Draco"}, 7074: []string{"孔雀四", "", "孔雀座λ", "", "孔雀座", "Pavo"}, 7180: []string{"紫微左垣五", "少弼", "天龙座υ", "", "天龙座", "Draco"}, 7139: []string{"渐台一", "", "天琴座δ2", "", "天琴座", "Lyra"}, 7157: []string{"辇道一", "", "天琴座R", "", "天琴座", "Lyra"}, 3773: []string{"轩辕八", "", "狮子座λ", "Alterf", "狮子座", "Leo"}, 7107: []string{"孔雀五", "", "孔雀座κ", "", "孔雀座", "Pavo"}, 7149: []string{"天弁五", "", "盾牌座η", "", "盾牌座", "Scutum"}, 7150: []string{"建一", "", "人马座ξ2", "", "人马座", "Sagittarius"}, 7152: []string{"鳖八", "", "南冕座ε", "", "南冕座", "CoronaAustrilis"}, 7176: []string{"吴越增一", "", "天鹰座ε", "", "天鹰座", "Aquila"}, 7193: []string{"天弁六", "", "天鹰座i", "", "天鹰座", "Aquila"}, 3852: []string{"轩辕十五", "", "狮子座ο", "Subra", "狮子座", "Leo"}, 7188: []string{"鳖三", "", "南冕座ζ", "", "南冕座", "CoronaAustrilis"}, 7217: []string{"建二", "", "人马座ο", "", "人马座", "Sagittarius"}, 7235: []string{"天市左垣六", "", "天鹰座ζ", "", "天鹰座", "Aquila"}, 7236: []string{"天弁七", "", "天鹰座λ", "", "天鹰座", "Aquila"}, 7226: []string{"鳖七", "", "南冕座γ", "", "南冕座", "CoronaAustrilis"}, 7234: []string{"斗宿五", "", "人马座τ", "", "人马座", "Sagittarius"}, 7242: []string{"鳖四", "", "南冕座δ", "", "南冕座", "CoronaAustrilis"}, 7254: []string{"鳖六", "", "南冕座α", "", "南冕座", "CoronaAustrilis"}, 7264: []string{"建三", "", "人马座π", "", "人马座", "Sagittarius"}, 7259: []string{"鳖五", "", "南冕座β", "", "南冕座", "CoronaAustrilis"}, 7298: []string{"辇道二", "", "天琴座η", "", "天琴座", "Lyra"}, 7352: []string{"御女一", "", "天龙座τ", "", "天龙座", "Draco"}, 7314: []string{"辇道三", "", "天琴座θ", "", "天琴座", "Lyra"}, 7328: []string{"奚仲一", "", "天鹅座κ", "", "天鹅座", "Cygnus"}, 7304: []string{"建四", "", "人马座d", "", "人马座", "Sagittarius"}, 7371: []string{"天厨六", "", "天龙座π", "", "天龙座", "Draco"}, 7340: []string{"建五", "", "人马座ρ1", "", "人马座", "Sagittarius"}, 7342: []string{"建六", "", "人马座υ", "", "人马座", "Sagittarius"}, 3905: []string{"轩辕十", "", "狮子座μ", "Rasalas", "狮子座", "Leo"}, 7343: []string{"天渊一", "", "人马座β2", "", "人马座", "Sagittarius"}, 7377: []string{"右旗三", "", "天鹰座δ", "", "天鹰座", "Aquila"}, 7387: []string{"右旗四", "", "天鹰座ν", "", "天鹰座", "Aquila"}, 7405: []string{"齐增五", "", "狐狸座α", "", "狐狸座", "Vulpecula"}, 7420: []string{"奚仲二", "", "天鹅座ι2", "", "天鹅座", "Cygnus"}, 3982: []string{"轩辕十四", "", "狮子座α", "Regulus", "狮子座", "Leo"}, 7462: []string{"天厨二", "", "天龙座σ", "", "天龙座", "Draco"}, 7429: []string{"右旗一", "", "天鹰座μ", "", "天鹰座", "Aquila"}, 7469: []string{"奚仲三", "", "天鹅座θ", "", "天鹅座", "Cygnus"}, 7440: []string{"狗一", "", "人马座h2", "", "人马座", "Sagittarius"}, 7447: []string{"右旗五", "", "天鹰座ι", "", "天鹰座", "Aquila"}, 7446: []string{"右旗八", "", "天鹰座κ", "", "天鹰座", "Aquila"}, 7478: []string{"辇道增六", "", "天鹅座φ", "", "天鹅座", "Cygnus"}, 7488: []string{"左旗二", "", "天箭座β", "", "天箭座", "Sagitta"}, 7528: []string{"天津二", "", "天鹅座δ", "", "天鹅座", "Cygnus"}, 4031: []string{"轩辕十一", "", "狮子座ζ", "Adhafera", "狮子座", "Leo"}, 7515: []string{"天鸡二", "", "人马座f", "", "人马座", "Sagittarius"}, 7536: []string{"左旗三", "", "天箭座δ", "", "天箭座", "Sagitta"}, 7582: []string{"天厨三", "", "天龙座ε", "", "天龙座", "Draco"}, 7570: []string{"天桴四", "", "天鹰座η", "", "天鹰座", "Aquila"}, 4033: []string{"三台三", "", "大熊座λ", "TaniaBorealis", "大熊座", "UrsaMajor"}, 7597: []string{"狗国一", "", "人马座ω", "", "人马座", "Sagittarius"}, 7615: []string{"辇道增五", "", "天鹅座η", "", "天鹅座", "Cygnus"}, 7604: []string{"狗国四", "", "人马座b", "", "人马座", "Sagittarius"}, 7635: []string{"左旗五", "", "天箭座γ", "", "天箭座", "Sagitta"}, 7618: []string{"狗国二", "", "人马座60", "", "人马座", "Sagittarius"}, 7590: []string{"孔雀九", "", "孔雀座ε", "", "孔雀座", "Pavo"}, 7650: []string{"狗国三", "", "人马座c", "", "人马座", "Sagittarius"}, 7685: []string{"天厨四", "", "天龙座ρ", "", "天龙座", "Draco"}, 7665: []string{"孔雀六", "", "孔雀座δ", "", "孔雀座", "Pavo"}, 7710: []string{"天桴一", "", "天鹰座θ", "", "天鹰座", "Aquila"}, 7735: []string{"天津三", "", "天鹅座ο1", "", "天鹅座", "Cygnus"}, 7724: []string{"左旗九", "", "天鹰座ρ", "", "天鹰座", "Aquila"}, 7751: []string{"天津增三十七", "", "天鹅座ο2", "", "天鹅座", "Cygnus"}, 7754: []string{"牛宿二", "", "摩羯座α2", "", "摩羯座", "Capricornus"}, 7773: []string{"牛宿增七", "", "摩羯座ν", "", "摩羯座", "Capricornus"}, 4057: []string{"轩辕十二", "", "狮子座γ2", "Algieba", "狮子座", "Leo"}, 4069: []string{"三台四", "", "大熊座μ", "TaniaAustralis", "大熊座", "UrsaMajor"}, 7822: []string{"牛宿六", "", "摩羯座ρ", "", "摩羯座", "Capricornus"}, 7850: []string{"天钩三", "", "仙王座θ", "", "仙王座", "Cepheus"}, 7831: []string{"离珠四", "", "天鹰座69", "", "天鹰座", "Aquila"}, 7852: []string{"败瓜一", "", "海豚座ε", "", "海豚座", "Delphinus"}, 7871: []string{"瓠瓜五", "", "海豚座ζ", "", "海豚座", "Delphinus"}, 7873: []string{"离珠一", "", "天鹰座70", "", "天鹰座", "Aquila"}, 7869: []string{"波斯二", "", "印地安座α", "", "印地安座", "Indus"}, 7884: []string{"离珠二", "", "天鹰座l", "", "天鹰座", "Aquila"}, 4287: []string{"翼宿一", "", "巨爵座α", "Alkes", "巨爵座", "Crater"}, 7928: []string{"瓠瓜三", "", "海豚座δ", "", "海豚座", "Delphinus"}, 7913: []string{"孔雀七", "", "孔雀座β", "", "孔雀座", "Pavo"}, 7957: []string{"天钩四", "", "仙王座η", "", "仙王座", "Cepheus"}, 7936: []string{"天田四", "", "摩羯座ψ", "", "摩羯座", "Capricornus"}, 7948: []string{"瓠瓜二", "", "海豚座γ2", "", "海豚座", "Delphinus"}, 4295: []string{"北斗二", "天璇", "大熊座β", "Merak", "大熊座", "UrsaMajor"}, 7951: []string{"女宿四", "", "宝瓶座k", "", "宝瓶座", "Aquarius"}, 7980: []string{"天田二", "", "摩羯座ω", "", "摩羯座", "Capricornus"}, 7990: []string{"女宿二", "", "宝瓶座μ", "", "宝瓶座", "Aquarius"}, 8028: []string{"天津五", "", "天鹅座ν", "", "天鹅座", "Cygnus"}, 8047: []string{"车府五", "", "天鹅座V832", "", "天鹅座", "Cygnus"}, 8060: []string{"周一", "", "摩羯座η", "", "摩羯座", "Capricornus"}, 8079: []string{"车府六", "", "天鹅座ξ", "", "天鹅座", "Cygnus"}, 8075: []string{"秦一", "", "摩羯座θ", "", "摩羯座", "Capricornus"}, 8080: []string{"天田三", "", "摩羯座24", "", "摩羯座", "Capricornus"}, 8093: []string{"天垒城十", "", "宝瓶座ν", "", "宝瓶座", "Aquarius"}, 8097: []string{"司非一", "", "小马座γ", "", "小马座", "Equuleus"}, 8115: []string{"天津八", "", "天鹅座ζ", "", "天鹅座", "Cygnus"}, 8123: []string{"司非二", "", "小马座δ", "", "小马座", "Equuleus"}, 8130: []string{"天津六", "", "天鹅座τ", "", "天鹅座", "Cygnus"}, 8146: []string{"天津七", "", "天鹅座υ", "", "天鹅座", "Cygnus"}, 8135: []string{"离瑜二", "", "显微镜座ε", "", "显微镜座", "Microseopium"}, 8173: []string{"人二", "", "飞马座1", "", "飞马座", "Pegasus"}, 8167: []string{"代一", "", "摩羯座ι", "", "摩羯座", "Capricornus"}, 8181: []string{"孔雀十", "", "孔雀座γ", "", "孔雀座", "Pavo"}, 8204: []string{"燕", "", "摩羯座ζ", "", "摩羯座", "Capricornus"}, 4301: []string{"北斗一", "天枢", "大熊座α", "Dubhe", "大熊座", "UrsaMajor"}, 8213: []string{"晋", "", "摩羯座b", "", "摩羯座", "Capricornus"}, 8225: []string{"人一", "", "飞马座2", "", "飞马座", "Pegasus"}, 8252: []string{"车府四", "", "天鹅座ρ", "", "天鹅座", "Cygnus"}, 8260: []string{"垒壁阵二", "", "摩羯座ε", "", "摩羯座", "Capricornus"}, 8264: []string{"天垒城一", "", "宝瓶座ξ", "", "宝瓶座", "Aquarius"}, 4357: []string{"太微右垣五", "西上相", "狮子座δ", "Zosma", "狮子座", "Leo"}, 8254: []string{"蛇尾三", "", "南极座ν", "", "南极座", "Octans"}, 8288: []string{"垒壁阵一", "", "摩羯座κ", "", "摩羯座", "Capricornus"}, 4359: []string{"太微右垣四", "西次相", "狮子座θ", "Chertan", "狮子座", "Leo"}, 8309: []string{"臼一", "", "天鹅座μ2", "", "天鹅座", "Cygnus"}, 8313: []string{"人三", "", "飞马座9", "", "飞马座", "Pegasus"}, 8315: []string{"臼二", "", "飞马座κ", "", "飞马座", "Pegasus"}, 8305: []string{"天钱三", "", "南鱼座ι", "", "南鱼座", "PiscisAustrinus"}, 8334: []string{"造父五", "", "仙王座ν", "", "仙王座", "Cepheus"}, 8335: []string{"螣蛇三", "", "天鹅座π2", "", "天鹅座", "Cygnus"}, 4377: []string{"三台五", "下台一", "大熊座ν", "AlulaBorealis", "大熊座", "UrsaMajor"}, 8353: []string{"败臼一", "", "天鹤座γ", "", "天鹤座", "Grus"}, 8402: []string{"盖屋一", "", "宝瓶座ο", "", "宝瓶座", "Aquarius"}, 4434: []string{"紫微右垣三", "上辅", "天龙座λ", "Giausar", "天龙座", "Draco"}, 8411: []string{"败臼二", "", "天鹤座λ", "", "天鹤座", "Grus"}, 8418: []string{"垒壁阵五", "", "宝瓶座ι", "", "宝瓶座", "Aquarius"}, 8430: []string{"臼三", "", "飞马座ι", "", "飞马座", "Pegasus"}, 8431: []string{"天钱四", "", "南鱼座μ", "", "南鱼座", "PiscisAustrinus"}, 8454: []string{"杵二", "", "飞马座π2", "", "飞马座", "Pegasus"}, 8447: []string{"天钱五", "", "南鱼座τ", "", "南鱼座", "PiscisAustrinus"}, 4534: []string{"五帝座一", "", "狮子座β", "Denebola", "狮子座", "Leo"}, 8465: []string{"造父二", "", "仙王座ζ", "", "仙王座", "Cepheus"}, 8494: []string{"螣蛇九", "", "仙王座ε", "", "仙王座", "Cepheus"}, 8486: []string{"鹤十二", "", "天鹤座μ1", "", "天鹤座", "Grus"}, 8498: []string{"杵一", "", "蝎虎座1", "", "蝎虎座", "Lacerta"}, 8502: []string{"鸟喙一", "", "杜鹃座α", "", "杜鹃座", "Tucana"}, 8523: []string{"车府三", "", "蝎虎座2", "", "蝎虎座", "Lacerta"}, 8522: []string{"臼四", "", "飞马座32", "", "飞马座", "Pegasus"}, 8520: []string{"土公吏一", "", "飞马座31", "", "飞马座", "Pegasus"}, 4540: []string{"太微右垣一", "右执法", "室女座β", "Zavijava", "室女座", "Virgo"}, 8538: []string{"螣蛇十", "", "蝎虎座β", "", "蝎虎座", "Lacerta"}, 8541: []string{"螣蛇二", "", "蝎虎座4", "", "蝎虎座", "Lacerta"}, 8539: []string{"坟墓四", "", "宝瓶座π", "", "宝瓶座", "Aquarius"}, 8540: []string{"鸟喙二", "", "杜鹃座δ", "", "杜鹃座", "Tucana"}, 8558: []string{"坟墓一", "", "宝瓶座ζ2", "", "宝瓶座", "Aquarius"}, 8571: []string{"造父一", "", "仙王座δ", "", "仙王座", "Cepheus"}, 8556: []string{"鹤十一", "", "天鹤座δ1", "", "天鹤座", "Grus"}, 8573: []string{"垒壁阵六", "", "宝瓶座σ", "", "宝瓶座", "Aquarius"}, 8585: []string{"螣蛇一", "", "蝎虎座α", "", "蝎虎座", "Lacerta"}, 8597: []string{"坟墓三", "", "宝瓶座η", "", "宝瓶座", "Aquarius"}, 8613: []string{"螣蛇十五", "", "蝎虎座9", "", "蝎虎座", "Lacerta"}, 8632: []string{"车府二", "", "蝎虎座11", "", "蝎虎座", "Lacerta"}, 8628: []string{"羽林军八", "", "南鱼座ε", "", "南鱼座", "PiscisAustrinus"}, 8641: []string{"离宫三", "", "飞马座ο", "", "飞马座", "Pegasus"}, 8636: []string{"鹤二", "", "天鹤座β", "", "天鹤座", "Grus"}, 4554: []string{"北斗三", "天玑", "大熊座γ", "Phad", "大熊座", "UrsaMajor"}, 8649: []string{"羽林军十三", "", "宝瓶座g", "", "宝瓶座", "Aquarius"}, 8655: []string{"鹤四", "", "天鹤座η", "", "天鹤座", "Grus"}, 8667: []string{"离宫一", "", "飞马座λ", "", "飞马座", "Pegasus"}, 8665: []string{"雷电二", "", "飞马座ξ", "", "飞马座", "Pegasus"}, 8675: []string{"鹤三", "", "天鹤座ε", "", "天鹤座", "Grus"}, 8679: []string{"羽林军二十四", "", "宝瓶座τ2", "", "宝瓶座", "Aquarius"}, 8694: []string{"天钩八", "", "仙王座ι", "", "仙王座", "Cepheus"}, 8699: []string{"车府一", "", "蝎虎座15", "", "蝎虎座", "Lacerta"}, 8695: []string{"败臼三", "", "南鱼座γ", "", "南鱼座", "PiscisAustrinus"}, 8698: []string{"垒壁阵七", "", "宝瓶座λ", "", "宝瓶座", "Aquarius"}, 4623: []string{"右辖", "", "乌鸦座α", "Alchiba", "乌鸦座", "Corvus"}, 8720: []string{"天纲", "", "南鱼座δ", "", "南鱼座", "PiscisAustrinus"}, 8747: []string{"鹤六", "", "天鹤座ζ", "", "天鹤座", "Grus"}, 4660: []string{"北斗四", "天权", "大熊座δ", "Megrez", "大熊座", "UrsaMajor"}, 8773: []string{"霹雳一", "", "双鱼座β", "", "双鱼座", "Pisces"}, 8780: []string{"螣蛇十六", "", "仙女座3", "", "仙女座", "Andromeda"}, 8789: []string{"羽林军三十", "", "宝瓶座c1", "", "宝瓶座", "Aquarius"}, 8787: []string{"鹤八", "", "天鹤座θ", "", "天鹤座", "Grus"}, 8795: []string{"雷电四", "", "飞马座55", "", "飞马座", "Pegasus"}, 8819: []string{"紫微左垣七", "", "仙王座π", "", "仙王座", "Cepheus"}, 8812: []string{"羽林军二十八", "", "宝瓶座c2", "", "宝瓶座", "Aquarius"}, 8817: []string{"羽林军二十九", "", "宝瓶座89", "", "宝瓶座", "Aquarius"}, 8820: []string{"鹤七", "", "天鹤座ι", "", "天鹤座", "Grus"}, 8830: []string{"螣蛇十七", "", "仙女座7", "", "仙女座", "Andromeda"}, 8834: []string{"垒壁阵八", "", "宝瓶座φ", "", "宝瓶座", "Aquarius"}, 8841: []string{"羽林军三十九", "", "宝瓶座ψ1", "", "宝瓶座", "Aquarius"}, 8850: []string{"羽林军四十三", "", "宝瓶座χ", "", "宝瓶座", "Aquarius"}, 8852: []string{"霹雳二", "", "双鱼座γ", "", "双鱼座", "Pisces"}, 8848: []string{"鹤五", "", "杜鹃座γ", "", "杜鹃座", "Tucana"}, 8860: []string{"螣蛇十八", "", "仙女座8", "", "仙女座", "Andromeda"}, 8858: []string{"羽林军三十八", "", "宝瓶座ψ2", "", "宝瓶座", "Aquarius"}, 8872: []string{"天钩九", "", "仙王座ο", "", "仙王座", "Cepheus"}, 8865: []string{"羽林军三十七", "", "宝瓶座ψ3", "", "宝瓶座", "Aquarius"}, 8880: []string{"离宫五", "", "飞马座τ", "", "飞马座", "Pegasus"}, 8892: []string{"羽林军三十四", "", "宝瓶座b1", "", "宝瓶座", "Aquarius"}, 8905: []string{"离宫六", "", "飞马座υ", "", "飞马座", "Pegasus"}, 8906: []string{"羽林军三十三", "", "宝瓶座b2", "", "宝瓶座", "Aquarius"}, 8911: []string{"云雨一", "", "双鱼座κ", "", "双鱼座", "Pisces"}, 8916: []string{"霹雳三", "", "双鱼座θ", "", "双鱼座", "Pisces"}, 8923: []string{"雷电六", "", "飞马座70", "", "飞马座", "Pegasus"}, 8937: []string{"火鸟一", "", "玉夫座β", "", "玉夫座", "Sculptor"}, 8939: []string{"羽林军三十一", "", "宝瓶座b3", "", "宝瓶座", "Aquarius"}, 8949: []string{"火鸟二", "", "凤凰座ι", "", "凤凰座", "Phoenix"}, 8961: []string{"螣蛇十九", "", "仙女座λ", "", "仙女座", "Andromeda"}, 8965: []string{"螣蛇二十二", "", "仙女座ι", "", "仙女座", "Andromeda"}, 4662: []string{"轸宿一", "", "乌鸦座γ", "Gienah", "乌鸦座", "Corvus"}, 8968: []string{"羽林军四十四", "", "宝瓶座ω1", "", "宝瓶座", "Aquarius"}, 8969: []string{"霹雳四", "", "双鱼座ι", "", "双鱼座", "Pisces"}, 8976: []string{"螣蛇二十一", "", "仙女座κ", "", "仙女座", "Andromeda"}, 8982: []string{"鈇钺一", "", "宝瓶座104", "", "宝瓶座", "Aquarius"}, 8984: []string{"云雨四", "", "双鱼座λ", "", "双鱼座", "Pisces"}, 8988: []string{"羽林军四十五", "", "宝瓶座ω2", "", "宝瓶座", "Aquarius"}, 9003: []string{"螣蛇二十", "", "仙女座ψ", "", "仙女座", "Andromeda"}, 9008: []string{"螣蛇十三", "", "仙后座τ", "", "仙后座", "Cassiopeia"}, 9067: []string{"垒壁阵九", "", "双鱼座27", "", "双鱼座", "Pisces"}, 9071: []string{"螣蛇十一", "", "仙后座σ", "", "仙后座", "Cassiopeia"}, 9072: []string{"霹雳五", "", "双鱼座ω", "", "双鱼座", "Pisces"}, 9084: []string{"", "", "南极座θ", "", "南极座", "Octans"}, 45: []string{"", "", "飞马座χ", "", "飞马座", "Pegasus"}, 105: []string{"", "", "玉夫座η", "", "玉夫座", "Sculptor"}, 127: []string{"", "", "杜鹃座β2", "", "杜鹃座", "Tucana"}, 179: []string{"", "", "仙后座ξ", "", "仙后座", "Cassiopeia"}, 184: []string{"", "", "仙后座π", "", "仙后座", "Cassiopeia"}, 248: []string{"", "", "鲸鱼座20", "", "鲸鱼座", "Cetus"}, 253: []string{"", "", "仙后座υ1", "", "仙后座", "Cassiopeia"}, 265: []string{"", "", "仙后座υ2", "", "仙后座", "Cassiopeia"}, 280: []string{"", "", "玉夫座α", "", "玉夫座", "Sculptor"}, 370: []string{"", "", "凤凰座ν", "", "凤凰座", "Phoenix"}, 377: []string{"", "", "杜鹃座κ", "", "杜鹃座", "Tucana"}, 382: []string{"", "", "仙后座φ", "", "仙后座", "Cassiopeia"}, 412: []string{"", "", "鲸鱼座46", "", "鲸鱼座", "Cetus"}, 417: []string{"", "", "仙女座ω", "", "仙女座", "Andromeda"}, 442: []string{"", "", "仙后座χ", "", "仙后座", "Cassiopeia"}, 531: []string{"", "", "鲸鱼座χ", "", "鲸鱼座", "Cetus"}, 555: []string{"", "", "凤凰座ψ", "", "凤凰座", "Phoenix"}, 569: []string{"", "", "白羊座λ", "", "白羊座", "Aries"}, 612: []string{"", "", "天炉座ν", "", "天炉座", "Fornax"}, 620: []string{"", "", "仙女座58", "", "仙女座", "Andromeda"}, 623: []string{"", "", "白羊座14", "", "白羊座", "Aries"}, 642: []string{"", "", "三角座6", "", "三角座", "Triangulum"}, 643: []string{"", "", "仙女座b", "", "仙女座", "Andromeda"}, 699: []string{"", "", "仙女座65", "", "仙女座", "Andromeda"}, 740: []string{"", "", "鲸鱼座σ", "", "鲸鱼座", "Cetus"}, 749: []string{"", "", "天炉座ω", "", "天炉座", "Fornax"}, 794: []string{"", "", "波江座ι", "", "波江座", "Eridanus"}, 799: []string{"", "", "英仙座θ", "", "英仙座", "Perseus"}, 841: []string{"", "", "天炉座β", "", "天炉座", "Fornax"}, 843: []string{"", "", "英仙座17", "", "英仙座", "Perseus"}, 909: []string{"", "", "时钟座β", "", "时钟座", "Horologium"}, 882: []string{"", "", "英仙座24", "", "英仙座", "Perseus"}, 887: []string{"", "", "白羊座ε", "", "白羊座", "Aries"}, 918: []string{"", "", "英仙座k", "", "英仙座", "Perseus"}, 994: []string{"", "", "波江座15", "", "波江座", "Eridanus"}, 996: []string{"", "", "鲸鱼座κ1", "", "鲸鱼座", "Cetus"}, 1008: []string{"", "", "波江座e", "", "波江座", "Eridanus"}, 1002: []string{"", "", "英仙座l", "", "英仙座", "Perseus"}, 1044: []string{"", "", "英仙座34", "", "英仙座", "Perseus"}, 1083: []string{"", "", "网罟座κ", "", "网罟座", "Reticulum"}, 1052: []string{"", "", "英仙座σ", "", "英仙座", "Perseus"}, 1070: []string{"", "", "波江座v", "", "波江座", "Eridanus"}, 1101: []string{"", "", "金牛座10", "", "金牛座", "Taurus"}, 1106: []string{"", "", "波江座y", "", "波江座", "Eridanus"}, 1134: []string{"", "", "天炉座δ", "", "天炉座", "Fornax"}, 1211: []string{"", "", "波江座32", "", "波江座", "Eridanus"}, 1247: []string{"", "", "网罟座δ", "", "网罟座", "Reticulum"}, 1264: []string{"", "", "网罟座γ", "", "网罟座", "Reticulum"}, 1266: []string{"", "", "网罟座ι", "", "网罟座", "Reticulum"}, 1302: []string{"", "", "时钟座δ", "", "时钟座", "Horologium"}, 1311: []string{"", "", "金牛座47", "", "金牛座", "Taurus"}, 1326: []string{"", "", "时钟座α", "", "时钟座", "Horologium"}, 1306: []string{"", "", "英仙座f", "", "英仙座", "Perseus"}, 1355: []string{"", "", "网罟座ε", "", "网罟座", "Reticulum"}, 1343: []string{"", "", "英仙座54", "", "英仙座", "Perseus"}, 1350: []string{"", "", "英仙座d", "", "英仙座", "Perseus"}, 1380: []string{"", "", "金牛座δ2", "", "金牛座", "Taurus"}, 1392: []string{"", "", "金牛座υ", "", "金牛座", "Taurus"}, 1407: []string{"", "", "金牛座75", "", "金牛座", "Taurus"}, 1411: []string{"", "", "金牛座θ1", "", "金牛座", "Taurus"}, 1437: []string{"", "", "波江座45", "", "波江座", "Eridanus"}, 1454: []string{"", "", "英仙座58", "", "英仙座", "Perseus"}, 1502: []string{"", "", "雕具座α", "", "雕具座", "Caelum"}, 1533: []string{"", "", "御夫座1", "", "御夫座", "Auriga"}, 1551: []string{"", "", "御夫座2", "", "御夫座", "Auriga"}, 1592: []string{"", "", "御夫座4", "", "御夫座", "Auriga"}, 1603: []string{"", "", "鹿豹座β", "", "鹿豹座", "Camelopardalis"}, 1652: []string{"", "", "雕具座γ1", "", "雕具座", "Caelum"}, 1638: []string{"", "", "猎户座11", "", "猎户座", "Orion"}, 1674: []string{"", "", "剑鱼座ζ", "", "剑鱼座", "Dorado"}, 1676: []string{"", "", "猎户座15", "", "猎户座", "Orion"}, 1698: []string{"", "", "猎户座ρ", "", "猎户座", "Orion"}, 1743: []string{"", "", "天鸽座ο", "", "天鸽座", "Columba"}, 1726: []string{"", "", "御夫座16", "", "御夫座", "Auriga"}, 1765: []string{"", "", "猎户座o", "", "猎户座", "Orion"}, 1770: []string{"", "", "猎户座23", "", "猎户座", "Orion"}, 1784: []string{"", "", "猎户座e", "", "猎户座", "Orion"}, 1780: []string{"", "", "金牛座111", "", "金牛座", "Taurus"}, 1789: []string{"", "", "猎户座ψ1", "", "猎户座", "Orion"}, 1811: []string{"", "", "猎户座ψ2", "", "猎户座", "Orion"}, 1810: []string{"", "", "金牛座o", "", "金牛座", "Taurus"}, 1834: []string{"", "", "猎户座31", "", "猎户座", "Orion"}, 1839: []string{"", "", "猎户座32", "", "猎户座", "Orion"}, 1845: []string{"", "", "金牛座119", "", "金牛座", "Taurus"}, 1931: []string{"", "", "猎户座σ", "", "猎户座", "Orion"}, 1937: []string{"", "", "猎户座d", "", "猎户座", "Orion"}, 1934: []string{"", "", "猎户座ω", "", "猎户座", "Orion"}, 1946: []string{"", "", "金牛座126", "", "金牛座", "Taurus"}, 1963: []string{"", "", "猎户座b", "", "猎户座", "Orion"}, 1998: []string{"", "", "天兔座ζ", "", "天兔座", "Lepus"}, 2020: []string{"", "", "绘架座β", "", "绘架座", "Pictor"}, 2002: []string{"", "", "金牛座132", "", "金牛座", "Taurus"}, 2010: []string{"", "", "金牛座134", "", "金牛座", "Taurus"}, 2042: []string{"", "", "绘架座γ", "", "绘架座", "Pictor"}, 2037: []string{"", "", "猎户座56", "", "猎户座", "Orion"}, 2087: []string{"", "", "天鸽座ξ", "", "天鸽座", "Columba"}, 2085: []string{"", "", "天兔座η", "", "天兔座", "Lepus"}, 2106: []string{"", "", "天鸽座γ", "", "天鸽座", "Columba"}, 2120: []string{"", "", "天鸽座η", "", "天鸽座", "Columba"}, 2091: []string{"", "", "御夫座π", "", "御夫座", "Auriga"}, 2128: []string{"", "", "麒麟座3", "", "麒麟座", "Monoceros"}, 2124: []string{"", "", "猎户座μ", "", "猎户座", "Orion"}, 2148: []string{"", "", "天兔座17", "", "天兔座", "Lepus"}, 2155: []string{"", "", "天兔座θ", "", "天兔座", "Lepus"}, 2212: []string{"", "", "绘架座δ", "", "绘架座", "Pictor"}, 2227: []string{"", "", "麒麟座γ", "", "麒麟座", "Monoceros"}, 2219: []string{"", "", "御夫座κ", "", "御夫座", "Auriga"}, 2215: []string{"", "", "天猫座1", "", "天猫座", "Lynx"}, 2238: []string{"", "", "天猫座2", "", "天猫座", "Lynx"}, 2296: []string{"", "", "天鸽座δ", "", "天鸽座", "Columba"}, 2356: []string{"", "", "麒麟座β", "", "麒麟座", "Monoceros"}, 2414: []string{"", "", "大犬座ξ2", "", "大犬座", "CanisMajor"}, 2456: []string{"", "", "麒麟座15", "", "麒麟座", "Monoceros"}, 2478: []string{"", "", "双子座30", "", "双子座", "Gemini"}, 2470: []string{"", "", "天猫座12", "", "天猫座", "Lynx"}, 2550: []string{"", "", "绘架座α", "", "绘架座", "Pictor"}, 2571: []string{"", "", "大犬座15", "", "大犬座", "CanisMajor"}, 2564: []string{"", "", "双子座e", "", "双子座", "Gemini"}, 2593: []string{"", "", "大犬座μ", "", "大犬座", "CanisMajor"}, 2596: []string{"", "", "大犬座ι", "", "大犬座", "CanisMajor"}, 2560: []string{"", "", "天猫座15", "", "天猫座", "Lynx"}, 2648: []string{"", "", "麒麟座19", "", "麒麟座", "Monoceros"}, 2672: []string{"", "", "船尾座H", "", "船尾座", "Puppis"}, 2702: []string{"", "", "船尾座A", "", "船尾座", "Puppis"}, 2701: []string{"", "", "麒麟座20", "", "麒麟座", "Monoceros"}, 2696: []string{"", "", "御夫座63", "", "御夫座", "Auriga"}, 2740: []string{"", "", "船尾座I", "", "船尾座", "Puppis"}, 2746: []string{"", "", "船尾座L1", "", "船尾座", "Puppis"}, 2745: []string{"", "", "大犬座27", "", "大犬座", "CanisMajor"}, 2764: []string{"", "", "大犬座145", "", "大犬座", "CanisMajor"}, 2782: []string{"", "", "大犬座τ", "", "大犬座", "CanisMajor"}, 2818: []string{"", "", "天猫座21", "", "天猫座", "Lynx"}, 2854: []string{"", "", "小犬座γ", "", "小犬座", "CanisMinor"}, 2937: []string{"", "", "船尾座F", "", "船尾座", "Puppis"}, 2944: []string{"", "", "船尾座m", "", "船尾座", "Puppis"}, 2930: []string{"", "", "双子座ο", "", "双子座", "Gemini"}, 2961: []string{"", "", "船尾座n1", "", "船尾座", "Puppis"}, 2970: []string{"", "", "麒麟座α", "", "麒麟座", "Monoceros"}, 2973: []string{"", "", "双子座σ", "", "双子座", "Gemini"}, 2993: []string{"", "", "船尾座1", "", "船尾座", "Puppis"}, 2996: []string{"", "", "船尾座l", "", "船尾座", "Puppis"}, 3003: []string{"", "", "双子座g", "", "双子座", "Gemini"}, 3046: []string{"", "", "船尾座Q", "", "船尾座", "Puppis"}, 3055: []string{"", "", "船尾座P", "", "船尾座", "Puppis"}, 3080: []string{"", "", "船尾座A", "", "船尾座", "Puppis"}, 3084: []string{"", "", "船尾座b", "", "船尾座", "Puppis"}, 3090: []string{"", "", "船尾座J", "", "船尾座", "Puppis"}, 3117: []string{"", "", "船底座χ", "", "船底座", "Carina"}, 3102: []string{"", "", "船尾座J", "", "船尾座", "Puppis"}, 3122: []string{"", "", "麒麟座27", "", "麒麟座", "Monoceros"}, 3141: []string{"", "", "麒麟座28", "", "麒麟座", "Monoceros"}, 3149: []string{"", "", "双子座χ", "", "双子座", "Gemini"}, 3223: []string{"", "", "飞鱼座ε", "", "飞鱼座", "Volans"}, 3173: []string{"", "", "天猫座27", "", "天猫座", "Lynx"}, 3188: []string{"", "", "麒麟座ζ", "", "麒麟座", "Monoceros"}, 3192: []string{"", "", "船尾座16", "", "船尾座", "Puppis"}, 3211: []string{"", "", "船尾座19", "", "船尾座", "Puppis"}, 3225: []string{"", "", "船尾座h1", "", "船尾座", "Puppis"}, 3229: []string{"", "", "船尾座20", "", "船尾座", "Puppis"}, 3237: []string{"", "", "船尾座r", "", "船尾座", "Puppis"}, 3243: []string{"", "", "船尾座h2", "", "船尾座", "Puppis"}, 3318: []string{"", "", "蝘蜓座α", "", "蝘蜓座", "Chamaeleon"}, 3270: []string{"", "", "船尾座Q", "", "船尾座", "Puppis"}, 3282: []string{"", "", "船尾座w", "", "船尾座", "Puppis"}, 3294: []string{"", "", "船帆座B", "", "船帆座", "Vela"}, 3414: []string{"", "", "船底座e2", "", "船底座", "Carina"}, 3433: []string{"", "", "罗盘座ζ", "", "罗盘座", "Pyxis"}, 3431: []string{"", "", "长蛇座a", "", "长蛇座", "Hydra"}, 3447: []string{"", "", "船帆座ο", "", "船帆座", "Vela"}, 3457: []string{"", "", "船底座d", "", "船底座", "Carina"}, 3452: []string{"", "", "船帆座n", "", "船帆座", "Vela"}, 3441: []string{"", "", "长蛇座9", "", "长蛇座", "Hydra"}, 3487: []string{"", "", "船帆座a", "", "船帆座", "Vela"}, 3484: []string{"", "", "长蛇座D", "", "长蛇座", "Hydra"}, 3475: []string{"", "", "巨蟹座ιA", "", "巨蟹座", "Cancer"}, 3498: []string{"", "", "船底座f", "", "船底座", "Carina"}, 3520: []string{"", "", "船帆座g", "", "船帆座", "Vela"}, 3571: []string{"", "", "船底座c", "", "船底座", "Carina"}, 3574: []string{"", "", "船帆座H", "", "船帆座", "Vela"}, 3582: []string{"", "", "船底座b1", "", "船底座", "Carina"}, 3591: []string{"", "", "船帆座w", "", "船帆座", "Vela"}, 3614: []string{"", "", "船帆座C", "", "船帆座", "Vela"}, 3628: []string{"", "", "罗盘座κ", "", "罗盘座", "Pyxis"}, 3616: []string{"", "", "大熊座σ2", "", "大熊座", "UrsaMajor"}, 3624: []string{"", "", "大熊座τ", "", "大熊座", "UrsaMajor"}, 3659: []string{"", "", "船底座a", "", "船底座", "Carina"}, 3663: []string{"", "", "船底座i", "", "船底座", "Carina"}, 3682: []string{"", "", "船帆座l", "", "船帆座", "Vela"}, 3684: []string{"", "", "船帆座k", "", "船帆座", "Vela"}, 3696: []string{"", "", "船底座g", "", "船底座", "Carina"}, 3728: []string{"", "", "船底座k", "", "船底座", "Carina"}, 3718: []string{"", "", "罗盘座θ", "", "罗盘座", "Pyxis"}, 3733: []string{"", "", "罗盘座λ", "", "罗盘座", "Pyxis"}, 3749: []string{"", "", "长蛇座G", "", "长蛇座", "Hydra"}, 3765: []string{"", "", "唧筒座ε", "", "唧筒座", "Antlia"}, 3786: []string{"", "", "船帆座ψ", "", "船帆座", "Vela"}, 3800: []string{"", "", "小狮座10", "", "小狮座", "LeoMinor"}, 3799: []string{"", "", "大熊座26", "", "大熊座", "UrsaMajor"}, 3836: []string{"", "", "船帆座M", "", "船帆座", "Vela"}, 3834: []string{"", "", "六分仪座2", "", "六分仪座", "Sextans"}, 3856: []string{"", "", "船底座m", "", "船底座", "Carina"}, 3858: []string{"", "", "长蛇座I", "", "长蛇座", "Hydra"}, 3871: []string{"", "", "唧筒座θ", "", "唧筒座", "Antlia"}, 3912: []string{"", "", "船帆座M", "", "船帆座", "Vela"}, 3940: []string{"", "", "船帆座φ", "", "船帆座", "Vela"}, 3950: []string{"", "", "狮子座π", "", "狮子座", "Leo"}, 3970: []string{"", "", "长蛇座υ2", "", "长蛇座", "Hydra"}, 3981: []string{"", "", "六分仪座α", "", "六分仪座", "Sextans"}, 3990: []string{"", "", "船帆座Q", "", "船帆座", "Vela"}, 4023: []string{"", "", "船帆座Q", "", "船帆座", "Vela"}, 4054: []string{"", "", "狮子座40", "", "狮子座", "Leo"}, 4074: []string{"", "", "船帆座J", "", "船帆座", "Vela"}, 4080: []string{"", "", "船帆座r", "", "船帆座", "Vela"}, 4090: []string{"", "", "小狮座30", "", "小狮座", "LeoMinor"}, 4104: []string{"", "", "唧筒座α", "", "唧筒座", "Antlia"}, 4100: []string{"", "", "小狮座β", "", "小狮座", "LeoMinor"}, 4112: []string{"", "", "大熊座36", "", "大熊座", "UrsaMajor"}, 4159: []string{"", "", "船底座r", "", "船底座", "Carina"}, 4167: []string{"", "", "船帆座p", "", "船帆座", "Vela"}, 4166: []string{"", "", "小狮座37", "", "小狮座", "LeoMinor"}, 4180: []string{"", "", "船帆座x", "", "船帆座", "Vela"}, 4200: []string{"", "", "船底座w", "", "船底座", "Carina"}, 4257: []string{"", "", "船底座u", "", "船底座", "Carina"}, 4273: []string{"", "", "唧筒座ι", "", "唧筒座", "Antlia"}, 4293: []string{"", "", "船帆座I", "", "船帆座", "Vela"}, 4299: []string{"", "", "狮子座p2", "", "狮子座", "Leo"}, 4300: []string{"", "", "狮子座b", "", "狮子座", "Leo"}, 4325: []string{"", "", "船底座z", "", "船底座", "Carina"}, 4337: []string{"", "", "船底座x", "", "船底座", "Carina"}, 4368: []string{"", "", "狮子座φ", "", "狮子座", "Leo"}, 4380: []string{"", "", "大熊座55", "", "大熊座", "UrsaMajor"}, 4390: []string{"", "", "半人马座π", "", "半人马座", "Centaurus"}, 4460: []string{"", "", "半人马座A", "", "半人马座", "Centaurus"}, 4530: []string{"", "", "苍蝇座μ", "", "苍蝇座", "Musca"}, 4537: []string{"", "", "半人马座j", "", "半人马座", "Centaurus"}, 4546: []string{"", "", "半人马座B", "", "半人马座", "Centaurus"}, 4599: []string{"", "", "南十字座θ1", "", "南十字座", "Crux"}, 4603: []string{"", "", "南十字座θ2", "", "南十字座", "Crux"}, 4616: []string{"", "", "南十字座η", "", "南十字座", "Crux"}, 4671: []string{"", "", "苍蝇座ε", "", "苍蝇座", "Musca"}, 4679: []string{"", "", "南十字座ζ", "", "南十字座", "Crux"}, 4682: []string{"", "", "半人马座F", "", "半人马座", "Centaurus"}, 4697: []string{"", "", "后发座11", "", "后发座", "ComaBerenices"}, 4700: []string{"", "", "南十字座ε", "", "南十字座", "Crux"}, 4765: []string{"", "", "天龙座4", "", "天龙座", "Draco"}, 4773: []string{"", "", "苍蝇座γ", "", "苍蝇座", "Musca"}, 4795: []string{"", "", "天龙座6", "", "天龙座", "Draco"}, 4813: []string{"", "", "室女座χ", "", "室女座", "Virgo"}, 4817: []string{"", "", "半人马座l", "", "半人马座", "Centaurus"}, 4831: []string{"", "", "半人马座w", "", "半人马座", "Centaurus"}, 4842: []string{"", "", "南十字座ι", "", "南十字座", "Crux"}, 4874: []string{"", "", "半人马座p", "", "半人马座", "Centaurus"}, 4888: []string{"", "", "半人马座E", "", "半人马座", "Centaurus"}, 4894: []string{"", "", "后发座35", "", "后发座", "ComaBerenices"}, 4889: []string{"", "", "半人马座n", "", "半人马座", "Centaurus"}, 4902: []string{"", "", "室女座ψ", "", "室女座", "Virgo"}, 4898: []string{"", "", "南十字座μ1", "", "南十字座", "Crux"}, 4897: []string{"", "", "南十字座λ", "", "南十字座", "Crux"}, 4931: []string{"", "", "大熊座78", "", "大熊座", "UrsaMajor"}, 4923: []string{"", "", "苍蝇座δ", "", "苍蝇座", "Musca"}, 4933: []string{"", "", "半人马座ξ1", "", "半人马座", "Centaurus"}, 4942: []string{"", "", "半人马座ξ2", "", "半人马座", "Centaurus"}, 4958: []string{"", "", "长蛇座ψ", "", "长蛇座", "Hydra"}, 4993: []string{"", "", "苍蝇座η", "", "苍蝇座", "Musca"}, 5017: []string{"", "", "猎犬座20", "", "猎犬座", "CanesVenatici"}, 5015: []string{"", "", "室女座σ", "", "室女座", "Virgo"}, 5019: []string{"", "", "室女座61", "", "室女座", "Virgo"}, 5035: []string{"", "", "半人马座j", "", "半人马座", "Centaurus"}, 5041: []string{"", "", "半人马座m", "", "半人马座", "Centaurus"}, 5072: []string{"", "", "室女座70", "", "室女座", "Virgo"}, 5095: []string{"", "", "室女座l", "", "室女座", "Virgo"}, 5127: []string{"", "", "猎犬座25", "", "猎犬座", "CanesVenatici"}, 5154: []string{"", "", "大熊座83", "", "大熊座", "UrsaMajor"}, 5141: []string{"", "", "半人马座Q", "", "半人马座", "Centaurus"}, 5172: []string{"", "", "半人马座m", "", "半人马座", "Centaurus"}, 5201: []string{"", "", "牧夫座e", "", "牧夫座", "Bootes"}, 5196: []string{"", "", "室女座89", "", "室女座", "Virgo"}, 5329: []string{"", "", "牧夫座κ2", "", "牧夫座", "Bootes"}, 5361: []string{"", "", "牧夫座A", "", "牧夫座", "Bootes"}, 5358: []string{"", "", "半人马座v", "", "半人马座", "Centaurus"}, 5381: []string{"", "", "长蛇座k", "", "长蛇座", "Hydra"}, 5395: []string{"", "", "豺狼座τ1", "", "豺狼座", "Lupus"}, 5339: []string{"", "", "南极座δ", "", "南极座", "Octans"}, 5407: []string{"", "", "长蛇座l", "", "长蛇座", "Hydra"}, 5460: []string{"", "", "半人马座α2", "", "半人马座", "Centaurus"}, 5480: []string{"", "", "牧夫座31", "", "牧夫座", "Bootes"}, 5463: []string{"", "", "圆规座α", "", "圆规座", "Circinus"}, 5489: []string{"", "", "半人马座C2", "", "半人马座", "Centaurus"}, 5511: []string{"", "", "室女座19", "", "室女座", "Virgo"}, 4689: []string{"太微左垣一", "左执法", "室女座η", "Zaniah", "室女座", "Virgo"}, 5535: []string{"", "", "天秤座11", "", "天秤座", "Libra"}, 5544: []string{"", "", "牧夫座ξ", "", "牧夫座", "Bootes"}, 5570: []string{"", "", "天秤座16", "", "天秤座", "Libra"}, 5600: []string{"", "", "牧夫座ω", "", "牧夫座", "Bootes"}, 5601: []string{"", "", "室女座110", "", "室女座", "Virgo"}, 5618: []string{"", "", "牧夫座i", "", "牧夫座", "Bootes"}, 5616: []string{"", "", "牧夫座ψ", "", "牧夫座", "Bootes"}, 5634: []string{"", "", "牧夫座c", "", "牧夫座", "Bootes"}, 5651: []string{"", "", "豺狼座e", "", "豺狼座", "Lupus"}, 5670: []string{"", "", "圆规座β", "", "圆规座", "Circinus"}, 5666: []string{"", "", "圆规座ε", "", "圆规座", "Circinus"}, 5698: []string{"", "", "豺狼座ν1", "", "豺狼座", "Lupus"}, 5712: []string{"", "", "豺狼座φ2", "", "豺狼座", "Lupus"}, 5727: []string{"", "", "北冕座η", "", "北冕座", "CoronaBorealis"}, 5704: []string{"", "", "圆规座γ", "", "圆规座", "Circinus"}, 5723: []string{"", "", "天秤座ε", "", "天秤座", "Libra"}, 5724: []string{"", "", "豺狼座k", "", "豺狼座", "Lupus"}, 5826: []string{"", "", "小熊座θ", "", "小熊座", "UrsaMinor"}, 5777: []string{"", "", "天秤座37", "", "天秤座", "Libra"}, 5781: []string{"", "", "豺狼座d", "", "豺狼座", "Lupus"}, 5771: []string{"", "", "南三角座ε", "", "南三角座", "TriangulumAustrale"}, 5797: []string{"", "", "豺狼座ω", "", "豺狼座", "Lupus"}, 5833: []string{"", "", "北冕座ζ2", "", "北冕座", "CoronaBorealis"}, 5820: []string{"", "", "豺狼座ψ1", "", "豺狼座", "Lupus"}, 5824: []string{"", "", "天秤座42", "", "天秤座", "Libra"}, 5825: []string{"", "", "豺狼座g", "", "豺狼座", "Lupus"}, 5842: []string{"", "", "巨蛇座ι", "", "巨蛇座", "Serpens"}, 5868: []string{"", "", "巨蛇座λ", "", "巨蛇座", "Serpens"}, 5879: []string{"", "", "巨蛇座κ", "", "巨蛇座", "Serpens"}, 5885: []string{"", "", "天蝎座b", "", "天蝎座", "Scorpius"}, 5901: []string{"", "", "北冕座κ", "", "北冕座", "CoronaBorealis"}, 5899: []string{"", "", "巨蛇座ρ", "", "巨蛇座", "Serpens"}, 5904: []string{"", "", "天蝎座2", "", "天蝎座", "Scorpius"}, 5972: []string{"", "", "巨蛇座π", "", "巨蛇座", "Serpens"}, 5982: []string{"", "", "武仙座υ", "", "武仙座", "Hercules"}, 5962: []string{"", "", "矩尺座η", "", "矩尺座", "Norma"}, 5961: []string{"", "", "矩尺座ι1", "", "矩尺座", "Norma"}, 5985: []string{"", "", "天蝎座β2", "", "天蝎座", "Scorpius"}, 5980: []string{"", "", "矩尺座δ", "", "矩尺座", "Norma"}, 6018: []string{"", "", "北冕座τ", "", "北冕座", "CoronaBorealis"}, 6031: []string{"", "", "天蝎座ψ", "", "天蝎座", "Scorpius"}, 6028: []string{"", "", "天蝎座c2", "", "天蝎座", "Scorpius"}, 6024: []string{"", "", "矩尺座κ", "", "矩尺座", "Norma"}, 6030: []string{"", "", "南三角座δ", "", "南三角座", "TriangulumAustrale"}, 6058: []string{"", "", "矩尺座γ1", "", "矩尺座", "Norma"}, 6070: []string{"", "", "天蝎座d", "", "天蝎座", "Scorpius"}, 6072: []string{"", "", "矩尺座γ2", "", "矩尺座", "Norma"}, 6081: []string{"", "", "天蝎座ο", "", "天蝎座", "Scorpius"}, 6112: []string{"", "", "蛇夫座ρ", "", "蛇夫座", "Ophiuchus"}, 6115: []string{"", "", "矩尺座ε", "", "矩尺座", "Norma"}, 6098: []string{"", "", "南三角座ζ", "", "南三角座", "TriangulumAustrale"}, 6141: []string{"", "", "天蝎座i", "", "天蝎座", "Scorpius"}, 6155: []string{"", "", "矩尺座μ", "", "矩尺座", "Norma"}, 6168: []string{"", "", "武仙座σ", "", "武仙座", "Hercules"}, 6220: []string{"", "", "武仙座η", "", "武仙座", "Hercules"}, 6254: []string{"", "", "武仙座52", "", "武仙座", "Hercules"}, 6252: []string{"", "", "天蝎座μ2", "", "天蝎座", "Scorpius"}, 6271: []string{"", "", "天蝎座ζ2", "", "天蝎座", "Scorpius"}, 6318: []string{"", "", "蛇夫座30", "", "蛇夫座", "Ophiuchus"}, 6334: []string{"", "", "天蝎座k", "", "天蝎座", "Scorpius"}, 6415: []string{"", "", "蛇夫座41", "", "蛇夫座", "Ophiuchus"}, 6445: []string{"", "", "蛇夫座ξ", "", "蛇夫座", "Ophiuchus"}, 6498: []string{"", "", "蛇夫座σ", "", "蛇夫座", "Ophiuchus"}, 6555: []string{"", "", "天龙座ν2", "", "天龙座", "Draco"}, 6596: []string{"", "", "天龙座ω", "", "天龙座", "Draco"}, 6569: []string{"", "", "天坛座λ", "", "天坛座", "Ara"}, 6631: []string{"", "", "天蝎座ι2", "", "天蝎座", "Scorpius"}, 6703: []string{"", "", "武仙座ξ", "", "武仙座", "Hercules"}, 6707: []string{"", "", "武仙座ν", "", "武仙座", "Hercules"}, 6700: []string{"", "", "人马座4", "", "人马座", "Sagittarius"}, 6713: []string{"", "", "武仙座93", "", "武仙座", "Hercules"}, 6710: []string{"", "", "巨蛇座ζ", "", "巨蛇座", "Serpens"}, 6743: []string{"", "", "天坛座θ", "", "天坛座", "Ara"}, 6770: []string{"", "", "蛇夫座71", "", "蛇夫座", "Ophiuchus"}, 6771: []string{"", "", "蛇夫座72", "", "蛇夫座", "Ophiuchus"}, 6783: []string{"", "", "望远镜座ε", "", "望远镜座", "Telescopium"}, 6801: []string{"", "", "人马座11", "", "人马座", "Sagittarius"}, 6872: []string{"", "", "天琴座κ", "", "天琴座", "Lyra"}, 6868: []string{"", "", "武仙座106", "", "武仙座", "Hercules"}, 6866: []string{"", "", "蛇夫座74", "", "蛇夫座", "Ophiuchus"}, 6855: []string{"", "", "孔雀座ξ", "", "孔雀座", "Pavo"}, 6884: []string{"", "", "盾牌座ζ", "", "盾牌座", "Scutum"}, 6896: []string{"", "", "人马座21", "", "人马座", "Sagittarius"}, 6945: []string{"", "", "天龙座42", "", "天龙座", "Draco"}, 6905: []string{"", "", "望远镜座ζ", "", "望远镜座", "Telescopium"}, 6930: []string{"", "", "盾牌座γ", "", "盾牌座", "Scutum"}, 6934: []string{"", "", "望远镜座δ1", "", "望远镜座", "Telescopium"}, 7053: []string{"", "", "天琴座ε2", "", "天琴座", "Lyra"}, 7116: []string{"", "", "人马座ν1", "", "人马座", "Sagittarius"}, 7133: []string{"", "", "武仙座113", "", "武仙座", "Hercules"}, 7120: []string{"", "", "人马座ν2", "", "人马座", "Sagittarius"}, 7142: []string{"", "", "巨蛇座θ2", "", "巨蛇座", "Serpens"}, 7134: []string{"", "", "望远镜座λ", "", "望远镜座", "Telescopium"}, 7192: []string{"", "", "天琴座λ", "", "天琴座", "Lyra"}, 7309: []string{"", "", "天龙座54", "", "天龙座", "Draco"}, 7292: []string{"", "", "人马座ψ", "", "人马座", "Sagittarius"}, 7306: []string{"", "", "狐狸座1", "", "狐狸座", "Vulpecula"}, 7372: []string{"", "", "天鹅座2", "", "天鹅座", "Cygnus"}, 7426: []string{"", "", "天鹅座8", "", "天鹅座", "Cygnus"}, 7437: []string{"", "", "狐狸座9", "", "狐狸座", "Vulpecula"}, 7424: []string{"", "", "望远镜座ι", "", "望远镜座", "Telescopium"}, 7517: []string{"", "", "天鹅座15", "", "天鹅座", "Cygnus"}, 7565: []string{"", "", "狐狸座12", "", "狐狸座", "Vulpecula"}, 7592: []string{"", "", "狐狸座13", "", "狐狸座", "Vulpecula"}, 7595: []string{"", "", "天鹰座ξ", "", "天鹰座", "Aquila"}, 7581: []string{"", "", "人马座ι", "", "人马座", "Sagittarius"}, 7619: []string{"", "", "天鹅座ψ", "", "天鹅座", "Cygnus"}, 7613: []string{"", "", "天鹅座22", "", "天鹅座", "Cygnus"}, 7623: []string{"", "", "人马座θ1", "", "人马座", "Sagittarius"}, 7653: []string{"", "", "狐狸座15", "", "狐狸座", "Vulpecula"}, 7673: []string{"", "", "望远镜座ξ", "", "望远镜座", "Telescopium"}, 7750: []string{"", "", "仙王座κ", "", "仙王座", "Cepheus"}, 7708: []string{"", "", "天鹅座b2", "", "天鹅座", "Cygnus"}, 7730: []string{"", "", "天鹅座30", "", "天鹅座", "Cygnus"}, 7740: []string{"", "", "天鹅座33", "", "天鹅座", "Cygnus"}, 7736: []string{"", "", "天鹅座b3", "", "天鹅座", "Cygnus"}, 7744: []string{"", "", "狐狸座23", "", "狐狸座", "Vulpecula"}, 7806: []string{"", "", "天鹅座39", "", "天鹅座", "Cygnus"}, 7834: []string{"", "", "天鹅座41", "", "天鹅座", "Cygnus"}, 7844: []string{"", "", "天鹅座ω1", "", "天鹅座", "Cygnus"}, 7866: []string{"", "", "天鹅座47", "", "天鹅座", "Cygnus"}, 7848: []string{"", "", "孔雀座φ1", "", "孔雀座", "Pavo"}, 7859: []string{"", "", "孔雀座ρ", "", "孔雀座", "Pavo"}, 7891: []string{"", "", "狐狸座29", "", "狐狸座", "Vulpecula"}, 7920: []string{"", "", "印地安座η", "", "印地安座", "Indus"}, 7939: []string{"", "", "狐狸座30", "", "狐狸座", "Vulpecula"}, 7942: []string{"", "", "天鹅座52", "", "天鹅座", "Cygnus"}, 7963: []string{"", "", "天鹅座λ", "", "天鹅座", "Cygnus"}, 7977: []string{"", "", "天鹅座55", "", "天鹅座", "Cygnus"}, 7952: []string{"", "", "印地安座ζ", "", "印地安座", "Indus"}, 7965: []string{"", "", "显微镜座α", "", "显微镜座", "Microseopium"}, 7995: []string{"", "", "狐狸座31", "", "狐狸座", "Vulpecula"}, 8001: []string{"", "", "天鹅座57", "", "天鹅座", "Cygnus"}, 7986: []string{"", "", "印地安座β", "", "印地安座", "Indus"}, 8039: []string{"", "", "显微镜座γ", "", "显微镜座", "Microseopium"}, 8089: []string{"", "", "天鹅座f2", "", "天鹅座", "Cygnus"}, 8143: []string{"", "", "天鹅座σ", "", "天鹅座", "Cygnus"}, 8140: []string{"", "", "印地安座θ", "", "印地安座", "Indus"}, 8151: []string{"", "", "显微镜座θ1", "", "显微镜座", "Microseopium"}, 8255: []string{"", "", "天鹅座72", "", "天鹅座", "Cygnus"}, 8279: []string{"", "", "仙王座9", "", "仙王座", "Cepheus"}, 8317: []string{"", "", "仙王座11", "", "仙王座", "Cepheus"}, 8383: []string{"", "", "仙王座VV", "", "仙王座", "Cepheus"}, 8368: []string{"", "", "印地安座δ", "", "印地安座", "Indus"}, 8387: []string{"", "", "印地安座ε", "", "印地安座", "Indus"}, 8413: []string{"", "", "飞马座ν", "", "飞马座", "Pegasus"}, 8433: []string{"", "", "南鱼座υ", "", "南鱼座", "PiscisAustrinus"}, 8468: []string{"", "", "仙王座24", "", "仙王座", "Cepheus"}, 8551: []string{"", "", "飞马座35", "", "飞马座", "Pegasus"}, 8572: []string{"", "", "蝎虎座5", "", "蝎虎座", "Lacerta"}, 8560: []string{"", "", "天鹤座δ2", "", "天鹤座", "Grus"}, 8579: []string{"", "", "蝎虎座6", "", "蝎虎座", "Lacerta"}, 8576: []string{"", "", "南鱼座β", "", "南鱼座", "PiscisAustrinus"}, 8582: []string{"", "", "杜鹃座ν", "", "杜鹃座", "Tucana"}, 8622: []string{"", "", "蝎虎座10", "", "蝎虎座", "Lacerta"}, 8644: []string{"", "", "天鹤座ρ", "", "天鹤座", "Grus"}, 8630: []string{"", "", "南极座β", "", "南极座", "Octans"}, 8717: []string{"", "", "飞马座ρ", "", "飞马座", "Pegasus"}, 8762: []string{"", "", "仙女座ο", "", "仙女座", "Andromeda"}, 8797: []string{"", "", "仙后座1", "", "仙后座", "Cassiopeia"}, 8796: []string{"", "", "飞马座56", "", "飞马座", "Pegasus"}, 8863: []string{"", "", "玉夫座γ", "", "玉夫座", "Sculptor"}, 8904: []string{"", "", "仙后座4", "", "仙后座", "Cassiopeia"}, 8943: []string{"", "", "飞马座72", "", "飞马座", "Pegasus"}, 8997: []string{"", "", "飞马座78", "", "飞马座", "Pegasus"}, 9004: []string{"", "", "双鱼座19", "", "双鱼座", "Pisces"}, 9016: []string{"", "", "玉夫座δ", "", "玉夫座", "Sculptor"}, 9062: []string{"", "", "杜鹃座η", "", "杜鹃座", "Tucana"}, 9064: []string{"", "", "飞马座ψ", "", "飞马座", "Pegasus"}, 4730: []string{"十字架二", "", "南十字座α2", "Acrux", "南十字座", "Crux"}, 4757: []string{"轸宿三", "", "乌鸦座δ", "Algorab", "乌鸦座", "Corvus"}, 4763: []string{"十字架一", "", "南十字座γ", "Gacrux", "南十字座", "Crux"}, 4785: []string{"常陈四", "", "猎犬座β", "Chara", "猎犬座", "CanesVenatici"}, 4825: []string{"太微左垣二", "东上相", "室女座γ", "Porrima", "室女座", "Virgo"}, 4853: []string{"十字架三", "", "南十字座β", "Mimosa", "南十字座", "Crux"}, 4905: []string{"北斗五", "玉衡", "大熊座ε", "Alioth", "大熊座", "UrsaMajor"}, 4915: []string{"常陈一", "", "猎犬座α2", "CorCaroli", "猎犬座", "CanesVenatici"}, 4932: []string{"太微左垣四", "东次将", "室女座ε", "Vindemiatrix", "室女座", "Virgo"}, 5054: []string{"北斗六", "开阳", "大熊座ζ", "Mizar", "大熊座", "UrsaMajor"}, 5056: []string{"角宿一", "", "室女座α", "Spica", "室女座", "Virgo"}, 5062: []string{"开阳增一", "辅星", "大熊座80", "Alcor", "大熊座", "UrsaMajor"}, 5191: []string{"北斗七", "摇光", "大熊座η", "Alkaid", "大熊座", "UrsaMajor"}, 1140: []string{"卷舌五", "", "英仙座ο", "Celaeno", "英仙座", "Perseus"}, 5235: []string{"右摄提一", "", "牧夫座η", "Muphrid", "牧夫座", "Bootes"}, 5267: []string{"马腹一", "", "半人马座β", "Hadar", "半人马座", "Centaurus"}, 1151: []string{"昴宿四", "", "金牛座20", "Asterope", "金牛座", "Taurus"}, 5291: []string{"紫微右垣一", "右枢", "天龙座α", "Thuban", "天龙座", "Draco"}, 1180: []string{"昴宿七", "", "金牛座27", "Pleione", "金牛座", "Taurus"}, 5288: []string{"库楼三", "", "半人马座θ", "Menkent", "半人马座", "Centaurus"}, 5340: []string{"大角", "", "牧夫座α", "Arcturus", "牧夫座", "Bootes"}, 5338: []string{"亢宿二", "", "室女座ι", "Syrma", "室女座", "Virgo"}, 5430: []string{"北极三", "庶子", "小熊座5", "", "小熊座", "UrsaMinor"}, 5435: []string{"招摇", "", "牧夫座γ", "Seginus", "牧夫座", "Bootes"}, 5459: []string{"南门二", "", "半人马座α1", "RigilKent", "半人马座", "Centaurus"}, 5506: []string{"梗河一", "", "牧夫座ε", "Izar", "牧夫座", "Bootes"}, 5563: []string{"北极二", "帝", "小熊座β", "Kocab", "小熊座", "UrsaMinor"}, 5531: []string{"氐宿一", "", "天秤座α", "Zubenelgenubi", "天秤座", "Libra"}, 5602: []string{"七公增五", "", "牧夫座β", "Nekkar", "牧夫座", "Bootes"}, 5685: []string{"氐宿四", "", "天秤座β", "Zubeneschamali", "天秤座", "Libra"}, 5735: []string{"北极一", "太子", "小熊座γ", "Pherkad", "小熊座", "UrsaMinor"}, 5733: []string{"七公六", "", "牧夫座μ1", "Alkalurops", "牧夫座", "Bootes"}, 5744: []string{"紫微左垣一", "左枢", "天龙座ι", "Edasich", "天龙座", "Draco"}, 5747: []string{"贯索三", "", "北冕座β", "Nusakan", "北冕座", "CoronaBorealis"}, 5793: []string{"贯索四", "", "北冕座α", "Alphekka", "北冕座", "CoronaBorealis"}, 5854: []string{"天市右垣七", "蜀", "巨蛇座α", "Unukalhai", "巨蛇座", "Serpens"}, 5953: []string{"房宿三", "", "天蝎座δ", "Dschubba", "天蝎座", "Scorpius"}, 5984: []string{"房宿四", "", "天蝎座β1", "Acrab", "天蝎座", "Scorpius"}, 6056: []string{"天市右垣九", "梁", "蛇夫座δ", "YedPrior", "蛇夫座", "Ophiuchus"}, 6075: []string{"天市右垣十", "楚", "蛇夫座ε", "YedPosterior", "蛇夫座", "Ophiuchus"}, 6084: []string{"心宿一", "", "天蝎座σ", "AlNiyat", "天蝎座", "Scorpius"}, 6117: []string{"斗一", "", "武仙座ω", "Cujam", "武仙座", "Hercules"}, 6134: []string{"心宿二", "大火", "天蝎座α", "Antares", "天蝎座", "Scorpius"}, 6148: []string{"天市右垣一", "河中", "武仙座β", "Kornephoros", "武仙座", "Hercules"}, 6149: []string{"列肆二", "", "蛇夫座λ", "Marfik", "蛇夫座", "Ophiuchus"}, 6217: []string{"三角形三", "", "南三角座α", "Atria", "南三角座", "TriangulumAustrale"}, 6369: []string{"天棓增九", "", "天龙座μ", "Alrakis", "天龙座", "Draco"}, 6378: []string{"天市左垣十一", "", "蛇夫座η", "Sabik", "蛇夫座", "Ophiuchus"}, 6406: []string{"帝座", "", "武仙座α1", "Rasalgethi", "武仙座", "Hercules"}, 6536: []string{"天棓三", "", "天龙座β", "Rastaban", "天龙座", "Draco"}, 6526: []string{"天市左垣二", "", "武仙座λ", "Maasym", "武仙座", "Hercules"}, 6508: []string{"尾宿九", "", "天蝎座υ", "Lesath", "天蝎座", "Scorpius"}, 6789: []string{"勾陈二", "", "小熊座δ", "Yildun", "小熊座", "UrsaMinor"}, 6527: []string{"尾宿八", "", "天蝎座λ", "Shaula", "天蝎座", "Scorpius"}, 6556: []string{"候", "", "蛇夫座α", "Rasalhague", "蛇夫座", "Ophiuchus"}, 6553: []string{"尾宿五", "", "天蝎座θ", "Girtab", "天蝎座", "Scorpius"}, 6603: []string{"宗正一", "", "蛇夫座β", "Cebalrai", "蛇夫座", "Ophiuchus"}, 6688: []string{"天棓一", "", "天龙座ξ", "Grumium", "天龙座", "Draco"}, 6705: []string{"天棓四", "", "天龙座γ", "Etamin", "天龙座", "Draco"}, 6746: []string{"箕宿一", "", "人马座γ2", "Alnasl", "人马座", "Sagittarius"}, 6859: []string{"箕宿二", "", "人马座δ", "KausMedia", "人马座", "Sagittarius"}, 6879: []string{"箕宿三", "", "人马座ε", "KausAustralis", "人马座", "Sagittarius"}, 6913: []string{"斗宿二", "", "人马座λ", "KausBorealis", "人马座", "Sagittarius"}, 7001: []string{"织女一", "织女", "天琴座α", "Vega", "天琴座", "Lyra"}, 7106: []string{"渐台二", "", "天琴座β", "Sheliak", "天琴座", "Lyra"}, 7121: []string{"斗宿四", "", "人马座σ", "Nunki", "人马座", "Sagittarius"}, 7141: []string{"天市左垣七", "", "巨蛇座θ1", "Alya", "巨蛇座", "Serpens"}, 5533: []string{"异雀八", "", "天燕座α", "Merga", "天燕座", "Apus"}, 7178: []string{"渐台三", "", "天琴座γ", "Sulafat", "天琴座", "Lyra"}, 7194: []string{"斗宿六", "", "人马座ζ", "Ascella", "人马座", "Sagittarius"}, 7310: []string{"天厨一", "", "天龙座δ", "Altais", "天龙座", "Draco"}, 7337: []string{"天渊二", "", "人马座β1", "Arkab", "人马座", "Sagittarius"}, 7348: []string{"天渊三", "", "人马座α", "Rukbat", "人马座", "Sagittarius"}, 7417: []string{"辇道增七", "", "天鹅座β1", "Albireo", "天鹅座", "Cygnus"}, 6008: []string{"钩钤二", "", "天蝎座ω2", "Marsic", "天蝎座", "Scorpius"}, 7479: []string{"左旗一", "", "天箭座α", "Sham", "天箭座", "Sagitta"}, 7525: []string{"河鼓三", "", "天鹰座γ", "Tarazed", "天鹰座", "Aquila"}, 7557: []string{"河鼓二", "牛郎", "天鹰座α", "Altair", "天鹰座", "Aquila"}, 7602: []string{"河鼓一", "", "天鹰座β", "Alshain", "天鹰座", "Aquila"}, 7747: []string{"牛宿增六", "", "摩羯座α1", "Algedi", "摩羯座", "Capricornus"}, 7776: []string{"牛宿一", "", "摩羯座β1", "Dabih", "摩羯座", "Capricornus"}, 7796: []string{"天津一", "", "天鹅座γ", "Sadr", "天鹅座", "Cygnus"}, 7790: []string{"孔雀十一", "", "孔雀座α", "Peacock", "孔雀座", "Pavo"}, 7882: []string{"瓠瓜四", "", "海豚座β", "Rotanev", "海豚座", "Delphinus"}, 7906: []string{"瓠瓜一", "", "海豚座α", "Sualocin", "海豚座", "Delphinus"}, 7924: []string{"天津四", "", "天鹅座α", "Deneb", "天鹅座", "Cygnus"}, 7949: []string{"天津九", "", "天鹅座ε", "Gienah", "天鹅座", "Cygnus"}, 7950: []string{"女宿一", "", "宝瓶座ε", "Albali", "宝瓶座", "Aquarius"}, 8131: []string{"虚宿二", "", "小马座α", "Kitalpha", "小马座", "Equuleus"}, 8162: []string{"天钩五", "", "仙王座α", "Alderamin", "仙王座", "Cepheus"}, 8238: []string{"上卫增一", "", "仙王座β", "Alfirk", "仙王座", "Cepheus"}, 8232: []string{"虚宿一", "", "宝瓶座β", "Sadalsuud", "宝瓶座", "Aquarius"}, 8278: []string{"垒壁阵三", "", "摩羯座γ", "Nashira", "摩羯座", "Capricornus"}, 8301: []string{"螣蛇四", "", "天鹅座π1", "Azelfafage", "天鹅座", "Cygnus"}, 8316: []string{"造父四", "", "仙王座μ", "TheGarnetStar", "仙王座", "Cepheus"}, 8308: []string{"危宿三", "", "飞马座ε", "Enif", "飞马座", "Pegasus"}, 8322: []string{"垒壁阵四", "", "摩羯座δ", "DenebAlgedi", "摩羯座", "Capricornus"}, 8417: []string{"天钩六", "", "仙王座ξ", "Kurhah", "仙王座", "Cepheus"}, 8414: []string{"危宿一", "", "宝瓶座α", "Sadalmelik", "宝瓶座", "Aquarius"}, 8425: []string{"鹤一", "", "天鹤座α", "Alnair", "天鹤座", "Grus"}, 8450: []string{"危宿二", "", "飞马座θ", "Biham", "飞马座", "Pegasus"}, 8499: []string{"泣二", "", "宝瓶座θ", "Ancha", "宝瓶座", "Aquarius"}, 8518: []string{"坟墓二", "", "宝瓶座γ", "Sadachbia", "宝瓶座", "Aquarius"}, 8634: []string{"雷电一", "", "飞马座ζ", "Homan", "飞马座", "Pegasus"}, 8650: []string{"离宫四", "", "飞马座η", "Matar", "飞马座", "Pegasus"}, 8684: []string{"离宫二", "", "飞马座μ", "Sadalbari", "飞马座", "Pegasus"}, 8709: []string{"羽林军二十六", "", "宝瓶座δ", "Skat", "宝瓶座", "Aquarius"}, 8610: []string{"螣蛇十五", "", "蝎虎座9", "Situla", "蝎虎座", "Lacerta"}, 8728: []string{"北落师门", "", "南鱼座α", "Fomalhaut", "南鱼座", "PiscisAustrinus"}, 8775: []string{"室宿二", "", "飞马座β", "Sheat", "飞马座", "Pegasus"}, 8781: []string{"室宿一", "", "飞马座α", "Markab", "飞马座", "Pegasus"}, 8974: []string{"少卫增八", "", "仙王座γ", "Errai", "仙王座", "Cepheus"}} - hr2hip = map[uint16]uint32{1: 424, 2: 417, 3: 443, 4: 476, 5: 518, 6: 522, 7: 531, 8: 544, 9: 560, 10: 602, 11: 635, 12: 636, 13: 655, 14: 664, 15: 677, 16: 671, 17: 699, 18: 696, 19: 716, 20: 760, 21: 746, 22: 729, 23: 730, 24: 761, 25: 765, 26: 813, 27: 841, 28: 857, 29: 840, 30: 814, 31: 873, 32: 865, 33: 910, 34: 930, 35: 950, 36: 967, 37: 983, 38: 1030, 39: 1067, 40: 1076, 41: 1086, 42: 1096, 43: 1099, 44: 1123, 45: 1168, 46: 1158, 47: 1074, 48: 1170, 49: 1193, 50: 1196, 51: 1191, 52: 1208, 53: 1215, 54: 1195, 55: 1296, 56: 1302, 57: 1288, 58: 1268, 59: 1319, 60: 1354, 61: 1331, 62: 1372, 63: 1366, 64: 1342, 65: 1415, 66: 1402, 67: 1421, 68: 1473, 69: 1465, 70: 1501, 71: 1493, 72: 1499, 73: 1502, 74: 1562, 75: 1575, 76: 1603, 77: 1599, 78: 1630, 79: 1657, 80: 1645, 81: 1670, 82: 1686, 83: 1647, 84: 1708, 85: 1728, 86: 1772, 87: 1706, 88: 1803, 89: 1830, 90: 1901, 91: 1921, 93: 1960, 94: 1939, 96: 1982, 97: 2006, 98: 2021, 99: 2081, 100: 2072, 101: 2100, 102: 2159, 103: 2219, 104: 2225, 105: 2210, 106: 2224, 107: 2235, 108: 2237, 109: 2240, 110: 2270, 111: 2256, 112: 2422, 113: 2377, 114: 2355, 115: 2337, 116: 2330, 117: 2353, 118: 2381, 119: 2388, 120: 2383, 121: 2474, 122: 2475, 123: 2505, 124: 2497, 125: 2472, 126: 2484, 127: 2487, 128: 2553, 129: 2628, 130: 2599, 131: 2568, 132: 2548, 133: 2565, 134: 2583, 135: 2611, 136: 2578, 137: 2707, 138: 2661, 139: 2629, 140: 2711, 141: 2734, 142: 2762, 143: 2787, 144: 2854, 145: 2832, 146: 2876, 147: 2802, 148: 2789, 149: 2865, 150: 2846, 151: 2852, 152: 2900, 153: 2920, 154: 2912, 155: 2903, 156: 2926, 157: 2942, 158: 3132, 159: 2941, 160: 2889, 161: 2954, 162: 2937, 163: 3031, 164: 3083, 165: 3092, 166: 3093, 167: 3138, 168: 3179, 169: 3042, 170: 3142, 171: 3137, 172: 3175, 173: 3185, 174: 3193, 175: 3231, 176: 3170, 177: 3299, 178: 3269, 179: 3300, 180: 3245, 181: 3334, 183: 3277, 184: 3414, 185: 3356, 186: 3352, 187: 3330, 188: 3419, 189: 3478, 190: 3436, 191: 3405, 192: 3572, 193: 3504, 194: 3455, 195: 3456, 196: 3544, 197: 3505, 198: 3521, 199: 3489, 200: 3641, 201: 3552, 202: 3527, 203: 3559, 204: 3611, 205: 3604, 206: 3576, 207: 3649, 208: 3721, 209: 3583, 210: 3607, 211: 3632, 212: 3750, 213: 3675, 214: 3685, 215: 3693, 216: 3697, 217: 3730, 218: 3717, 219: 3821, 220: 3741, 221: 3760, 222: 3765, 223: 3801, 224: 3786, 225: 3810, 226: 3881, 227: 3849, 228: 3834, 229: 3807, 230: 3885, 232: 3858, 233: 3951, 234: 3919, 235: 3909, 236: 3781, 237: 3988, 238: 3965, 239: 3903, 240: 4283, 241: 4023, 242: 3949, 243: 3992, 244: 4151, 245: 4049, 246: 4129, 247: 4104, 248: 4147, 249: 4185, 250: 4212, 251: 4164, 252: 4084, 253: 4292, 254: 4267, 255: 4257, 256: 4298, 257: 4200, 258: 4288, 259: 4317, 260: 4383, 261: 4446, 262: 4366, 263: 4346, 264: 4427, 265: 4422, 266: 4440, 267: 4371, 268: 4363, 269: 4436, 270: 4293, 271: 4463, 272: 4501, 273: 4572, 274: 4510, 275: 4552, 276: 4520, 277: 4558, 278: 4709, 279: 4587, 280: 4577, 281: 4563, 282: 4675, 284: 4655, 285: 5372, 286: 7283, 287: 4844, 288: 4770, 289: 4911, 290: 4903, 291: 4889, 292: 4962, 293: 4852, 294: 4906, 295: 4829, 296: 4914, 297: 5021, 298: 4998, 299: 4890, 300: 4932, 301: 4979, 302: 5062, 303: 5034, 304: 4879, 305: 5045, 306: 5928, 307: 5074, 308: 5081, 309: 5186, 310: 5131, 311: 5132, 312: 5412, 313: 5141, 314: 5144, 315: 5121, 316: 5240, 317: 5164, 318: 5251, 319: 5204, 320: 5170, 321: 5336, 322: 5165, 323: 5193, 324: 5317, 325: 5259, 326: 5361, 327: 5319, 328: 5310, 329: 5296, 330: 5346, 331: 5300, 332: 5268, 333: 5626, 334: 5364, 335: 5434, 336: 5518, 337: 5447, 338: 5348, 339: 5454, 340: 5493, 341: 5494, 342: 5566, 343: 5542, 344: 5483, 345: 5589, 346: 5485, 347: 5510, 348: 5550, 349: 5544, 350: 5477, 351: 5571, 352: 5586, 353: 5594, 354: 5688, 355: 5650, 356: 5679, 357: 5947, 358: 5636, 359: 5661, 360: 5742, 361: 5737, 362: 5743, 363: 5772, 364: 5778, 365: 5926, 366: 5799, 367: 5824, 368: 5833, 369: 5939, 370: 5862, 371: 5936, 372: 5993, 373: 5951, 374: 6025, 375: 6261, 376: 6087, 377: 5896, 378: 6061, 379: 6140, 380: 5992, 381: 6378, 382: 6242, 383: 6193, 384: 6312, 385: 6226, 386: 6522, 387: 6283, 388: 6272, 389: 6315, 390: 6411, 391: 6486, 392: 6432, 393: 6429, 394: 6427, 395: 6514, 396: 6512, 397: 6492, 398: 6685, 399: 6692, 400: 6502, 401: 6539, 402: 6537, 403: 6686, 404: 6564, 405: 6589, 406: 6605, 407: 6669, 408: 6592, 409: 6711, 410: 6702, 411: 6595, 412: 6670, 413: 6706, 414: 6732, 415: 6776, 416: 6717, 417: 6813, 418: 6794, 419: 6751, 420: 6631, 421: 6748, 422: 6823, 423: 6759, 424: 11767, 425: 6822, 426: 6868, 427: 7078, 428: 7050, 429: 6867, 430: 6999, 431: 6888, 432: 6981, 433: 6960, 434: 7007, 435: 6952, 436: 7016, 437: 7097, 438: 7147, 439: 7251, 440: 7083, 441: 7118, 442: 7294, 443: 7115, 444: 7222, 445: 7213, 446: 7321, 447: 7189, 448: 7276, 449: 7557, 450: 7359, 451: 7345, 452: 7444, 453: 7361, 454: 7493, 455: 7436, 456: 7650, 457: 7447, 458: 7513, 459: 7450, 460: 7387, 461: 7617, 462: 7463, 463: 7535, 464: 7607, 465: 7651, 466: 7580, 467: 7271, 468: 7506, 469: 7719, 470: 7786, 471: 7643, 472: 7588, 473: 7679, 474: 7676, 475: 7740, 476: 7825, 477: 7818, 478: 7965, 479: 7673, 480: 8016, 481: 7939, 482: 7963, 483: 7918, 484: 7874, 485: 7906, 486: 7751, 487: 0, 488: 8020, 489: 7884, 490: 7943, 491: 8046, 492: 7916, 493: 7981, 494: 7886, 495: 8044, 496: 8068, 497: 7955, 498: 7941, 499: 8115, 500: 7999, 501: 7911, 502: 8148, 503: 8086, 504: 8127, 505: 7921, 506: 7978, 507: 8094, 508: 8159, 509: 8102, 510: 8198, 511: 8362, 512: 7601, 513: 8230, 514: 8209, 515: 8271, 516: 7879, 517: 8233, 518: 8370, 519: 8240, 520: 8241, 521: 8423, 522: 8387, 523: 8433, 524: 8320, 525: 7568, 526: 8475, 527: 8404, 528: 8369, 529: 8598, 530: 8544, 531: 8497, 532: 8480, 533: 8704, 534: 8588, 535: 8514, 536: 8714, 537: 8552, 538: 8771, 539: 8645, 540: 8847, 541: 8593, 542: 8886, 543: 8814, 544: 8796, 546: 8832, 547: 8778, 548: 9009, 549: 8833, 550: 8366, 551: 8922, 552: 8930, 553: 8903, 554: 8820, 555: 8837, 556: 9001, 557: 9021, 558: 8882, 559: 8993, 560: 8998, 561: 9220, 562: 9158, 563: 9110, 564: 9132, 565: 9061, 566: 9007, 567: 9312, 568: 9222, 569: 9153, 570: 8928, 571: 8983, 572: 9568, 573: 9085, 574: 9095, 575: 9480, 576: 9207, 577: 9307, 578: 9295, 579: 9586, 580: 9598, 581: 9727, 582: 9353, 583: 9326, 584: 9149, 585: 9347, 586: 9564, 587: 9372, 588: 9313, 589: 9573, 590: 9505, 591: 9236, 592: 9763, 593: 8991, 594: 9440, 595: 9487, 597: 10054, 598: 9690, 599: 9570, 600: 9318, 601: 9533, 602: 9459, 603: 9640, 605: 9621, 606: 9521, 607: 9589, 608: 9572, 609: 9627, 610: 9631, 611: 9622, 612: 9677, 613: 9836, 614: 9809, 615: 9859, 616: 9827, 617: 9884, 618: 9990, 619: 9983, 620: 9977, 621: 10115, 622: 10064, 623: 10053, 624: 10050, 625: 9999, 626: 10350, 627: 10227, 628: 10176, 629: 10180, 630: 10069, 631: 10155, 632: 10035, 633: 10203, 634: 10220, 635: 10212, 636: 10111, 637: 10138, 638: 10215, 639: 10234, 640: 10438, 641: 10379, 642: 10280, 643: 10340, 644: 10296, 645: 10366, 646: 10306, 647: 10403, 648: 10328, 649: 10324, 650: 10305, 651: 10326, 652: 10320, 653: 10562, 654: 10633, 655: 10559, 656: 10540, 657: 10535, 658: 10512, 659: 10440, 660: 10644, 661: 10718, 662: 10729, 663: 10687, 664: 10670, 665: 10657, 666: 10642, 667: 10418, 668: 10893, 669: 10732, 670: 10819, 671: 10814, 672: 10723, 673: 10830, 674: 10602, 675: 10793, 676: 10795, 677: 10848, 678: 10513, 679: 10924, 680: 10884, 681: 10826, 682: 10944, 683: 10798, 684: 10854, 685: 11060, 686: 10832, 687: 11090, 688: 10871, 689: 11021, 690: 11174, 691: 11046, 692: 11029, 693: 11033, 694: 11220, 695: 11072, 696: 11279, 697: 11108, 698: 11043, 699: 11313, 700: 11121, 701: 11102, 702: 11249, 703: 11212, 704: 11261, 705: 11001, 706: 11231, 707: 11569, 708: 11345, 709: 11465, 710: 11348, 711: 11415, 712: 11432, 713: 11381, 714: 11258, 715: 11095, 716: 11593, 717: 11486, 718: 11484, 719: 11474, 720: 11548, 721: 11407, 722: 11293, 723: 11578, 724: 11477, 725: 11603, 726: 11651, 727: 11524, 728: 11670, 729: 11678, 730: 11622, 731: 11698, 732: 11687, 733: 11644, 734: 11479, 735: 11671, 736: 11784, 737: 11738, 738: 11840, 739: 11791, 740: 11783, 741: 11843, 742: 11802, 743: 12273, 744: 11867, 745: 11907, 746: 12057, 747: 12239, 748: 12072, 749: 11918, 750: 12086, 751: 12022, 752: 12002, 753: 12114, 754: 12093, 755: 11925, 756: 12181, 757: 12160, 758: 12193, 759: 12107, 760: 12218, 761: 12200, 762: 11900, 763: 12153, 764: 12184, 765: 12189, 766: 12148, 767: 12122, 768: 12287, 769: 12305, 770: 12272, 771: 12247, 772: 12186, 773: 12332, 774: 13055, 775: 12318, 776: 11757, 777: 12288, 778: 12225, 779: 12387, 780: 12300, 781: 12390, 782: 12489, 783: 12447, 784: 12444, 785: 12692, 786: 12435, 787: 12686, 788: 12623, 789: 12413, 790: 12530, 791: 12821, 792: 12690, 793: 12640, 794: 12486, 795: 12584, 796: 12562, 797: 12647, 798: 12389, 799: 12777, 800: 12768, 801: 12719, 802: 12484, 803: 12744, 804: 12706, 805: 12608, 806: 12394, 807: 12611, 808: 12784, 809: 12803, 810: 12653, 811: 12770, 812: 12832, 813: 12828, 814: 12708, 815: 13133, 816: 12862, 817: 12786, 818: 12843, 819: 12982, 820: 12990, 821: 12775, 822: 12855, 823: 12717, 824: 13061, 825: 13178, 826: 12964, 827: 13008, 828: 13108, 829: 13367, 830: 13121, 831: 13176, 832: 13064, 833: 12871, 834: 13268, 835: 13040, 836: 13165, 837: 12876, 838: 13209, 839: 13347, 840: 13254, 841: 13147, 842: 13339, 843: 13328, 844: 13197, 845: 13202, 846: 13424, 847: 13327, 848: 13225, 849: 13462, 850: 13288, 851: 13265, 852: 13141, 853: 13271, 854: 13531, 855: 13490, 856: 13448, 857: 13402, 858: 13363, 859: 13421, 860: 13665, 861: 13700, 862: 13479, 863: 13473, 864: 13732, 865: 13713, 866: 13387, 867: 13654, 868: 13502, 869: 13702, 870: 13679, 871: 13518, 872: 13244, 873: 13775, 874: 13701, 875: 13717, 876: 13832, 877: 13756, 878: 13834, 879: 13879, 880: 13537, 881: 14417, 882: 13905, 883: 13782, 884: 13768, 885: 13965, 886: 13949, 887: 13914, 889: 13835, 890: 14043, 891: 14047, 892: 13874, 893: 13789, 894: 13997, 895: 13883, 896: 13954, 897: 13847, 899: 13951, 900: 13907, 901: 13942, 902: 14036, 903: 13947, 904: 14040, 905: 14109, 906: 14844, 907: 14060, 908: 14104, 909: 13884, 910: 14143, 911: 14135, 912: 14110, 913: 14124, 914: 14086, 915: 14328, 916: 14232, 917: 14168, 918: 14382, 919: 14146, 920: 14392, 921: 14354, 922: 14502, 923: 14365, 924: 14318, 925: 14293, 926: 14315, 927: 14376, 929: 14187, 930: 14566, 931: 14439, 932: 14862, 933: 14544, 934: 14240, 935: 14456, 936: 14576, 937: 14632, 938: 14514, 939: 14131, 940: 14586, 941: 14668, 942: 14607, 943: 14551, 944: 14677, 945: 14719, 946: 14748, 947: 14817, 948: 14764, 949: 14914, 950: 14887, 951: 14838, 952: 14821, 953: 14757, 954: 14893, 955: 14819, 956: 15004, 957: 14814, 958: 14915, 959: 14547, 960: 14749, 961: 15547, 962: 14954, 963: 14879, 964: 15192, 965: 16489, 966: 15118, 967: 15309, 968: 14913, 969: 15219, 970: 14972, 971: 15154, 972: 15110, 973: 15209, 974: 15024, 975: 15191, 976: 15204, 977: 14930, 978: 15241, 979: 15282, 980: 15125, 981: 14521, 982: 15338, 983: 15203, 984: 15197, 985: 15520, 986: 15334, 987: 15404, 988: 15244, 989: 15444, 990: 15218, 991: 15416, 992: 15383, 993: 15357, 994: 15382, 995: 15514, 996: 15457, 997: 15411, 998: 15305, 999: 15549, 1000: 15557, 1001: 15669, 1002: 15648, 1003: 15474, 1004: 15479, 1005: 15627, 1006: 15330, 1007: 15619, 1008: 15510, 1009: 15890, 1010: 15371, 1011: 15770, 1012: 15696, 1013: 15585, 1014: 15353, 1015: 15737, 1016: 15643, 1017: 15863, 1018: 15700, 1019: 15876, 1020: 15979, 1021: 15655, 1022: 15861, 1023: 15807, 1024: 15776, 1025: 15201, 1026: 15925, 1027: 15870, 1028: 15850, 1029: 15988, 1030: 15900, 1031: 15816, 1032: 16319, 1033: 16177, 1034: 16147, 1035: 16228, 1036: 16077, 1037: 16210, 1038: 16083, 1039: 16095, 1040: 16281, 1041: 16168, 1042: 15987, 1043: 16303, 1044: 16244, 1045: 16029, 1046: 16292, 1047: 16252, 1048: 16181, 1049: 16015, 1050: 16142, 1051: 16340, 1052: 16335, 1053: 15840, 1054: 16112, 1055: 16725, 1056: 16424, 1058: 16156, 1059: 16447, 1060: 16266, 1061: 16322, 1062: 16263, 1063: 16470, 1064: 15968, 1065: 16411, 1066: 16369, 1067: 16358, 1068: 16587, 1069: 16499, 1070: 16341, 1071: 16602, 1072: 16516, 1073: 16599, 1074: 16518, 1075: 16285, 1076: 16310, 1077: 16712, 1078: 16591, 1079: 16511, 1080: 17056, 1081: 16339, 1082: 16449, 1083: 16245, 1084: 16537, 1085: 16641, 1086: 16664, 1087: 16826, 1088: 16611, 1089: 16695, 1090: 16509, 1091: 16677, 1092: 16368, 1093: 16628, 1094: 16974, 1095: 16672, 1096: 16531, 1097: 16938, 1098: 16780, 1099: 16846, 1100: 16803, 1101: 16852, 1102: 16924, 1103: 17026, 1104: 16661, 1105: 17296, 1106: 16870, 1107: 19454, 1108: 16989, 1109: 16290, 1110: 17058, 1111: 17027, 1112: 17342, 1113: 17203, 1114: 17007, 1115: 17103, 1116: 17086, 1117: 17057, 1118: 17181, 1119: 17120, 1120: 17136, 1121: 17167, 1122: 17358, 1123: 17313, 1124: 17585, 1125: 17214, 1126: 17309, 1127: 17437, 1128: 17223, 1129: 17587, 1130: 17475, 1131: 17448, 1132: 17408, 1133: 17460, 1134: 17304, 1135: 17529, 1136: 17378, 1137: 17453, 1138: 17854, 1139: 17395, 1140: 17489, 1141: 17584, 1142: 17499, 1143: 17351, 1144: 17527, 1145: 17531, 1146: 17457, 1147: 17707, 1148: 17959, 1149: 17573, 1150: 17506, 1151: 17579, 1152: 17588, 1153: 17563, 1154: 16827, 1155: 17884, 1156: 17608, 1157: 17436, 1158: 17891, 1159: 17595, 1160: 17772, 1161: 17858, 1162: 17593, 1163: 17735, 1164: 17732, 1165: 17702, 1166: 18067, 1167: 17493, 1168: 17464, 1169: 17534, 1170: 17846, 1171: 17618, 1172: 17776, 1173: 17651, 1174: 17771, 1175: 17440, 1176: 17932, 1177: 17886, 1178: 17847, 1179: 17689, 1180: 17851, 1181: 17717, 1182: 17805, 1183: 17900, 1184: 17738, 1185: 17921, 1186: 17734, 1187: 17798, 1188: 17954, 1189: 17797, 1191: 18081, 1192: 18217, 1193: 18059, 1194: 18033, 1195: 17874, 1196: 18438, 1197: 18094, 1198: 18212, 1199: 18089, 1200: 17982, 1201: 18170, 1202: 18141, 1203: 18246, 1204: 18505, 1205: 18488, 1206: 18173, 1207: 18396, 1208: 17678, 1209: 18350, 1210: 18453, 1211: 18255, 1213: 18216, 1214: 18213, 1215: 18434, 1216: 18199, 1217: 18339, 1218: 18471, 1219: 18262, 1220: 18532, 1221: 18485, 1222: 18508, 1223: 18547, 1224: 18481, 1225: 18455, 1226: 18565, 1227: 18275, 1228: 18614, 1229: 18657, 1230: 19461, 1231: 18543, 1232: 18606, 1233: 18658, 1234: 18769, 1235: 18647, 1236: 18401, 1237: 18717, 1238: 18735, 1239: 18724, 1240: 18673, 1241: 19129, 1242: 19018, 1243: 18805, 1244: 18788, 1245: 18592, 1246: 18723, 1247: 18597, 1248: 19177, 1249: 18859, 1250: 18691, 1251: 18907, 1252: 19009, 1253: 18957, 1254: 18975, 1255: 19172, 1256: 19038, 1257: 18993, 1258: 18926, 1259: 18942, 1260: 19272, 1261: 19167, 1262: 19076, 1263: 18990, 1264: 18744, 1265: 19011, 1266: 18772, 1267: 19037, 1268: 19171, 1269: 19205, 1270: 19412, 1271: 17328, 1272: 19121, 1273: 19343, 1274: 19111, 1275: 19095, 1276: 19400, 1277: 19302, 1278: 19335, 1279: 19261, 1280: 19284, 1281: 19730, 1282: 19673, 1283: 19388, 1284: 19376, 1285: 19242, 1286: 19525, 1287: 19513, 1288: 19398, 1289: 20860, 1290: 19483, 1291: 19331, 1292: 19554, 1293: 19511, 1294: 19233, 1295: 19641, 1296: 19823, 1297: 19672, 1298: 19587, 1299: 19509, 1300: 19571, 1301: 19746, 1302: 19515, 1303: 19812, 1304: 20982, 1305: 19968, 1306: 19811, 1307: 19720, 1308: 19718, 1309: 19719, 1310: 19736, 1311: 19740, 1312: 19725, 1313: 19983, 1314: 19949, 1315: 19799, 1316: 19642, 1317: 20776, 1318: 19777, 1319: 19877, 1320: 19860, 1321: 19855, 1322: 19859, 1323: 19721, 1324: 20070, 1325: 19849, 1326: 19747, 1327: 20266, 1328: 20063, 1329: 19990, 1330: 20156, 1331: 20087, 1332: 19996, 1333: 20234, 1334: 20089, 1335: 20376, 1336: 19780, 1337: 20241, 1338: 19893, 1339: 20171, 1340: 19805, 1341: 20186, 1342: 20380, 1343: 20252, 1344: 20231, 1345: 20075, 1346: 20205, 1347: 20042, 1348: 20250, 1349: 20188, 1350: 20354, 1351: 20219, 1352: 20456, 1353: 20106, 1354: 20255, 1355: 19921, 1356: 20261, 1357: 19917, 1358: 20284, 1359: 20138, 1360: 20268, 1361: 20281, 1362: 20263, 1363: 20271, 1364: 20161, 1365: 20109, 1366: 20341, 1367: 20264, 1368: 20400, 1369: 20430, 1370: 20417, 1371: 20498, 1372: 20020, 1373: 20455, 1374: 20347, 1375: 20493, 1376: 20484, 1377: 20579, 1378: 20533, 1379: 20591, 1380: 20542, 1381: 20522, 1382: 20772, 1383: 20507, 1384: 20465, 1385: 20614, 1386: 20467, 1387: 20635, 1388: 20641, 1389: 20648, 1390: 20704, 1391: 20661, 1392: 20711, 1393: 20535, 1394: 20713, 1395: 20384, 1396: 20732, 1397: 20715, 1398: 20613, 1399: 20789, 1400: 20771, 1401: 21247, 1402: 20804, 1403: 20842, 1404: 20630, 1405: 20552, 1406: 20904, 1407: 20877, 1408: 20873, 1409: 20889, 1410: 20765, 1411: 20885, 1412: 20894, 1413: 20848, 1414: 20901, 1415: 20884, 1416: 20619, 1417: 21148, 1418: 20781, 1419: 21038, 1420: 20963, 1421: 20892, 1422: 20995, 1423: 20922, 1424: 21108, 1425: 20985, 1426: 20049, 1427: 21029, 1428: 21039, 1429: 20856, 1430: 21036, 1431: 20997, 1432: 21137, 1433: 20934, 1434: 21242, 1435: 20825, 1436: 21152, 1437: 21139, 1438: 21110, 1439: 21042, 1440: 21452, 1441: 21192, 1442: 21251, 1443: 21060, 1444: 21273, 1445: 21323, 1446: 21269, 1447: 21239, 1448: 21295, 1449: 21278, 1450: 21298, 1451: 21296, 1452: 21297, 1453: 21248, 1454: 21476, 1455: 21408, 1456: 20297, 1457: 21421, 1458: 21402, 1459: 21459, 1460: 21377, 1461: 21363, 1462: 21428, 1463: 21444, 1464: 21393, 1465: 21281, 1466: 21730, 1467: 21727, 1468: 22152, 1469: 21515, 1470: 21619, 1471: 21604, 1472: 21588, 1473: 21589, 1474: 21547, 1475: 21253, 1476: 21486, 1477: 21689, 1478: 21673, 1479: 21683, 1480: 21670, 1481: 21594, 1482: 21823, 1483: 21644, 1484: 21735, 1485: 20446, 1486: 21966, 1487: 21685, 1488: 21718, 1489: 21847, 1490: 21819, 1491: 22361, 1492: 21479, 1493: 21972, 1494: 21928, 1495: 21743, 1496: 21763, 1497: 21881, 1498: 21666, 1499: 21961, 1500: 22034, 1501: 22003, 1502: 21770, 1503: 21861, 1504: 21756, 1505: 21986, 1507: 22044, 1508: 22024, 1509: 21958, 1510: 22508, 1511: 22287, 1512: 22128, 1513: 22028, 1514: 22220, 1515: 22300, 1516: 21914, 1517: 22176, 1518: 21998, 1519: 22157, 1520: 22109, 1521: 22086, 1522: 22189, 1523: 23265, 1524: 22136, 1525: 22192, 1526: 22144, 1527: 22626, 1528: 22407, 1529: 22393, 1530: 22040, 1531: 21611, 1532: 22263, 1533: 22453, 1534: 22354, 1535: 22545, 1536: 22336, 1537: 22441, 1538: 22325, 1539: 22280, 1540: 22081, 1541: 21949, 1542: 22783, 1543: 22449, 1544: 22509, 1545: 22439, 1546: 22720, 1547: 22565, 1548: 22329, 1549: 22479, 1550: 22699, 1551: 22678, 1552: 22549, 1553: 22597, 1554: 22697, 1555: 22854, 1556: 22667, 1557: 22488, 1558: 22842, 1559: 22573, 1560: 22701, 1561: 22936, 1562: 22730, 1563: 22531, 1564: 22534, 1565: 22774, 1566: 22850, 1567: 22797, 1568: 23040, 1569: 22833, 1570: 22845, 1571: 22834, 1572: 23442, 1573: 22955, 1574: 22840, 1575: 22949, 1576: 22913, 1577: 23015, 1578: 22923, 1579: 22860, 1580: 22957, 1581: 22881, 1582: 22958, 1583: 22897, 1584: 22847, 1585: 23043, 1586: 23068, 1587: 23582, 1588: 23216, 1589: 23617, 1590: 23088, 1591: 23041, 1592: 23179, 1593: 23380, 1594: 23484, 1595: 23060, 1596: 23092, 1597: 22844, 1598: 22737, 1599: 23261, 1600: 23161, 1601: 23123, 1602: 23268, 1603: 23522, 1604: 23166, 1605: 23416, 1606: 22717, 1607: 23203, 1608: 23221, 1609: 23279, 1610: 23287, 1611: 23231, 1612: 23453, 1613: 23296, 1614: 23311, 1615: 23511, 1616: 25911, 1617: 23364, 1618: 23408, 1619: 23419, 1620: 23497, 1621: 23362, 1622: 23734, 1623: 23743, 1624: 23766, 1625: 23475, 1626: 23583, 1627: 23611, 1628: 23430, 1629: 22871, 1630: 23753, 1631: 23377, 1632: 23614, 1633: 23589, 1634: 23474, 1635: 23446, 1636: 24003, 1637: 23783, 1638: 23607, 1639: 23724, 1640: 23551, 1641: 23767, 1642: 23695, 1643: 24254, 1644: 23799, 1645: 23554, 1646: 23643, 1647: 24017, 1648: 23680, 1649: 23482, 1650: 24440, 1651: 23555, 1652: 23595, 1653: 23596, 1654: 23685, 1655: 23668, 1656: 23835, 1657: 23794, 1658: 23871, 1659: 23900, 1660: 23883, 1661: 23777, 1662: 23852, 1663: 23649, 1664: 23879, 1665: 23831, 1666: 23875, 1667: 23653, 1668: 24109, 1669: 24072, 1670: 24019, 1671: 23916, 1672: 23983, 1673: 23941, 1674: 23693, 1675: 24313, 1676: 24010, 1677: 23467, 1678: 24348, 1679: 23972, 1680: 23910, 1681: 24041, 1682: 23251, 1683: 24732, 1684: 24197, 1685: 24130, 1686: 25110, 1687: 24162, 1688: 24479, 1689: 24340, 1690: 24196, 1691: 24203, 1692: 24451, 1693: 24169, 1694: 24114, 1695: 23840, 1696: 24244, 1697: 24294, 1698: 24331, 1699: 24189, 1700: 23737, 1701: 24349, 1702: 24305, 1703: 24377, 1705: 24327, 1706: 24504, 1707: 24645, 1708: 24608, 1709: 24450, 1710: 24394, 1711: 24512, 1712: 24575, 1713: 24436, 1714: 27015, 1715: 24373, 1716: 23148, 1717: 24493, 1718: 24555, 1719: 24836, 1720: 24914, 1721: 24426, 1722: 24738, 1723: 24505, 1724: 24607, 1725: 24771, 1726: 24727, 1727: 24384, 1728: 24740, 1729: 24813, 1730: 24532, 1731: 24618, 1732: 24799, 1733: 24881, 1734: 24832, 1735: 24674, 1736: 24951, 1737: 24679, 1738: 24902, 1739: 24822, 1740: 24879, 1741: 24820, 1742: 24520, 1743: 24659, 1744: 24372, 1745: 25714, 1746: 24817, 1747: 24786, 1748: 24847, 1749: 25048, 1750: 24984, 1751: 25197, 1752: 25001, 1753: 24825, 1754: 24827, 1755: 24977, 1756: 24845, 1757: 24873, 1758: 24831, 1759: 24925, 1760: 25143, 1761: 25011, 1762: 24927, 1763: 25041, 1764: 25028, 1765: 25044, 1766: 24909, 1767: 24829, 1768: 25192, 1769: 25053, 1770: 25142, 1771: 25045, 1772: 25007, 1773: 25292, 1774: 25216, 1775: 25290, 1776: 25291, 1777: 25205, 1778: 25187, 1779: 25343, 1780: 25278, 1781: 25223, 1782: 25240, 1783: 25202, 1784: 25247, 1785: 25180, 1786: 25288, 1787: 25282, 1788: 25281, 1789: 25302, 1790: 25336, 1791: 25428, 1792: 25280, 1793: 25194, 1794: 25476, 1795: 25471, 1796: 25475, 1797: 25221, 1798: 25410, 1799: 25329, 1800: 25365, 1801: 25098, 1802: 25769, 1803: 25378, 1804: 25492, 1805: 25541, 1806: 25401, 1807: 25453, 1808: 25499, 1809: 25502, 1810: 25539, 1811: 25473, 1812: 25397, 1813: 25317, 1814: 25555, 1815: 24256, 1816: 25583, 1817: 25486, 1818: 25303, 1819: 25638, 1820: 25582, 1821: 25695, 1822: 25730, 1823: 25532, 1824: 25816, 1825: 25810, 1826: 25667, 1827: 25488, 1828: 25973, 1829: 25606, 1830: 25708, 1831: 25806, 1832: 25790, 1833: 25751, 1834: 25737, 1835: 25608, 1836: 25429, 1837: 25785, 1838: 25685, 1839: 25813, 1840: 25786, 1842: 25861, 1843: 25984, 1844: 26638, 1845: 25945, 1846: 26057, 1847: 25950, 1848: 25869, 1849: 25853, 1850: 26054, 1852: 25930, 1853: 26410, 1854: 26071, 1855: 25923, 1856: 25768, 1857: 26408, 1858: 26064, 1859: 25482, 1860: 26072, 1861: 25980, 1862: 25859, 1863: 26020, 1864: 26093, 1865: 25985, 1866: 26344, 1867: 25700, 1868: 26063, 1869: 26315, 1870: 25887, 1871: 26098, 1872: 26126, 1873: 26106, 1874: 26108, 1875: 26248, 1876: 26176, 1877: 25993, 1878: 26291, 1879: 26207, 1881: 26019, 1882: 25781, 1883: 26215, 1884: 26363, 1885: 28532, 1886: 26197, 1887: 26199, 1888: 26091, 1889: 26332, 1890: 26233, 1891: 26234, 1892: 26237, 1893: 26220, 1895: 26221, 1896: 26224, 1897: 26235, 1898: 26257, 1899: 26241, 1900: 26263, 1901: 26268, 1902: 26396, 1903: 26311, 1904: 26463, 1905: 26382, 1906: 26314, 1907: 26366, 1908: 26386, 1909: 26219, 1910: 26451, 1911: 26345, 1912: 26079, 1913: 26414, 1914: 26536, 1915: 26309, 1916: 26882, 1917: 26001, 1918: 26427, 1919: 26395, 1920: 26487, 1921: 26571, 1922: 26069, 1923: 26477, 1924: 26606, 1925: 26779, 1926: 26412, 1927: 26300, 1928: 26640, 1929: 26616, 1930: 26200, 1931: 26549, 1933: 26535, 1934: 26594, 1935: 26460, 1936: 26190, 1937: 26563, 1938: 26712, 1939: 26718, 1940: 26624, 1941: 26942, 1942: 26623, 1943: 27046, 1944: 26602, 1945: 26781, 1946: 26777, 1947: 26545, 1948: 26727, 1950: 26713, 1951: 26836, 1952: 26736, 1953: 25918, 1954: 26853, 1955: 26762, 1956: 26634, 1957: 26728, 1958: 26649, 1959: 26820, 1960: 26368, 1961: 26964, 1962: 26821, 1963: 26885, 1964: 26169, 1965: 26866, 1966: 26796, 1967: 26926, 1968: 26865, 1969: 27249, 1970: 26953, 1971: 27196, 1972: 26862, 1973: 26868, 1974: 27192, 1975: 26966, 1976: 27472, 1977: 27181, 1978: 27118, 1979: 27319, 1980: 27075, 1981: 26981, 1983: 27072, 1984: 27001, 1985: 27265, 1986: 27212, 1987: 27280, 1988: 27253, 1989: 27316, 1990: 27338, 1991: 26264, 1992: 27592, 1993: 27364, 1994: 27795, 1995: 27483, 1996: 27204, 1997: 27421, 1998: 27288, 1999: 27386, 2000: 27308, 2001: 27341, 2002: 27468, 2003: 27625, 2004: 27366, 2005: 27303, 2006: 27731, 2007: 27435, 2008: 27243, 2009: 27325, 2010: 27511, 2011: 27639, 2012: 27673, 2013: 27629, 2014: 27549, 2015: 27100, 2016: 27581, 2017: 27383, 2018: 27661, 2019: 27560, 2020: 27321, 2021: 27517, 2022: 26394, 2023: 27317, 2024: 27588, 2025: 27777, 2026: 27533, 2027: 27971, 2028: 27778, 2029: 27949, 2030: 27747, 2031: 27658, 2032: 27512, 2033: 27743, 2034: 27830, 2035: 27654, 2036: 27670, 2037: 27750, 2038: 27829, 2039: 27713, 2040: 27628, 2041: 28205, 2042: 27530, 2043: 27705, 2044: 27583, 2045: 28086, 2046: 27973, 2047: 27913, 2048: 27900, 2049: 27621, 2050: 27924, 2051: 27902, 2052: 27965, 2053: 27766, 2054: 28162, 2055: 27787, 2056: 27810, 2057: 27939, 2058: 27929, 2059: 25776, 2060: 27876, 2061: 27989, 2062: 27369, 2063: 28041, 2064: 27534, 2065: 27938, 2066: 28117, 2067: 28066, 2068: 27901, 2069: 27835, 2070: 28011, 2071: 28019, 2072: 27737, 2073: 27660, 2074: 28154, 2075: 28110, 2076: 28139, 2077: 28358, 2078: 28831, 2079: 28385, 2080: 28390, 2081: 28343, 2082: 27955, 2083: 27896, 2084: 28237, 2085: 28103, 2086: 28085, 2087: 28010, 2088: 28360, 2089: 27937, 2090: 28118, 2091: 28404, 2092: 28098, 2093: 28232, 2094: 27947, 2095: 28380, 2096: 28438, 2097: 28252, 2098: 28138, 2099: 28302, 2100: 28271, 2101: 28499, 2102: 27890, 2103: 28296, 2104: 27897, 2105: 28562, 2106: 28199, 2107: 28321, 2108: 28325, 2109: 28370, 2110: 28517, 2111: 28500, 2112: 28637, 2113: 28413, 2114: 28180, 2115: 28642, 2116: 28561, 2117: 28287, 2118: 28434, 2119: 28677, 2120: 28328, 2121: 28829, 2122: 28644, 2123: 28765, 2124: 28614, 2125: 27566, 2126: 28951, 2127: 28609, 2128: 28574, 2129: 28520, 2130: 28691, 2131: 28524, 2132: 28823, 2133: 28686, 2134: 28734, 2135: 28716, 2136: 28622, 2137: 28820, 2138: 28484, 2139: 28861, 2140: 28675, 2141: 28908, 2142: 28744, 2143: 28946, 2144: 28812, 2145: 28814, 2146: 28930, 2147: 29025, 2148: 28816, 2149: 28756, 2150: 28854, 2151: 28596, 2152: 29246, 2153: 29114, 2154: 28949, 2155: 28910, 2156: 28874, 2157: 28764, 2158: 28790, 2159: 29038, 2160: 28855, 2161: 28973, 2162: 28796, 2163: 28943, 2164: 28899, 2165: 29490, 2166: 28984, 2167: 29138, 2168: 29048, 2169: 29196, 2170: 28992, 2171: 28957, 2172: 29404, 2173: 29225, 2174: 29151, 2175: 29388, 2177: 29034, 2178: 28988, 2179: 29210, 2180: 29150, 2181: 29064, 2182: 29178, 2183: 29205, 2184: 29326, 2185: 29379, 2186: 29234, 2187: 29129, 2188: 29569, 2189: 29451, 2190: 29416, 2191: 29371, 2192: 29233, 2193: 29433, 2194: 28909, 2195: 29323, 2196: 28991, 2197: 29450, 2198: 29434, 2199: 29426, 2200: 29294, 2201: 29730, 2202: 29401, 2203: 29263, 2204: 29185, 2205: 29417, 2206: 29347, 2207: 29545, 2208: 29525, 2209: 29997, 2210: 29487, 2211: 29304, 2212: 29276, 2213: 29488, 2214: 29616, 2215: 29919, 2216: 29655, 2217: 29725, 2218: 29575, 2219: 29696, 2220: 29650, 2221: 29134, 2222: 29678, 2223: 29704, 2224: 29629, 2225: 29568, 2226: 29546, 2227: 29651, 2228: 29884, 2229: 29736, 2230: 29789, 2231: 29728, 2232: 29739, 2233: 29716, 2234: 29711, 2235: 29798, 2236: 29746, 2237: 29705, 2238: 30060, 2239: 29949, 2240: 29840, 2241: 29800, 2242: 29679, 2243: 29692, 2244: 29735, 2245: 29353, 2246: 29791, 2247: 29850, 2248: 29839, 2249: 29771, 2250: 29881, 2251: 29860, 2252: 29756, 2253: 29931, 2254: 29843, 2255: 29885, 2256: 29807, 2257: 30272, 2258: 30019, 2259: 29982, 2260: 29895, 2261: 29271, 2262: 29808, 2263: 29842, 2264: 30247, 2265: 29852, 2266: 29941, 2267: 29996, 2268: 29993, 2269: 30099, 2270: 30028, 2271: 30011, 2272: 30200, 2273: 30073, 2274: 29788, 2275: 30093, 2276: 30169, 2277: 30218, 2278: 29913, 2279: 30069, 2280: 30217, 2281: 29990, 2282: 30122, 2283: 29673, 2284: 30214, 2285: 30794, 2286: 30343, 2287: 30318, 2288: 30143, 2289: 30520, 2290: 30104, 2291: 30651, 2292: 30382, 2293: 30679, 2294: 30324, 2295: 30387, 2296: 30277, 2297: 30518, 2298: 30419, 2299: 30422, 2300: 30448, 2301: 30407, 2302: 30517, 2303: 30420, 2304: 30570, 2305: 30457, 2306: 30426, 2307: 30376, 2308: 30564, 2309: 30468, 2310: 30541, 2311: 30436, 2312: 30547, 2313: 30545, 2314: 30762, 2315: 30594, 2316: 30444, 2317: 30595, 2318: 30503, 2319: 30741, 2320: 30342, 2321: 30608, 2323: 30505, 2324: 30666, 2325: 30660, 2326: 30438, 2327: 30692, 2328: 30675, 2329: 30566, 2330: 30769, 2331: 31039, 2332: 30827, 2333: 30728, 2334: 30717, 2335: 30720, 2336: 30423, 2337: 30352, 2338: 30972, 2339: 30880, 2340: 30815, 2342: 30804, 2343: 30883, 2344: 30772, 2345: 30463, 2346: 31922, 2347: 30798, 2348: 30591, 2349: 30711, 2350: 32296, 2351: 30886, 2352: 30321, 2353: 30706, 2354: 30480, 2355: 30906, 2356: 30867, 2359: 30836, 2360: 30524, 2361: 30788, 2362: 30977, 2363: 31940, 2364: 30840, 2365: 31703, 2367: 30986, 2368: 30849, 2369: 30703, 2370: 31066, 2371: 31105, 2372: 31173, 2373: 31024, 2374: 31107, 2375: 31119, 2376: 31359, 2377: 30565, 2378: 31168, 2379: 31084, 2380: 31037, 2381: 31121, 2382: 31159, 2383: 31290, 2384: 30953, 2385: 31216, 2386: 31167, 2387: 31125, 2388: 31072, 2389: 30932, 2390: 31056, 2391: 31277, 2392: 31205, 2393: 31099, 2394: 31676, 2395: 31278, 2396: 31946, 2397: 31190, 2398: 31434, 2399: 31165, 2400: 31079, 2401: 32439, 2402: 31665, 2403: 31266, 2404: 31385, 2405: 31579, 2406: 31448, 2407: 31241, 2408: 30973, 2409: 31446, 2410: 31068, 2411: 31299, 2412: 31137, 2413: 31523, 2414: 31416, 2415: 31362, 2416: 31265, 2417: 31650, 2418: 31583, 2419: 31771, 2420: 31789, 2421: 31681, 2422: 31646, 2423: 31564, 2424: 31457, 2425: 31737, 2426: 31662, 2427: 31832, 2428: 31599, 2429: 31592, 2430: 31672, 2431: 31509, 2432: 31697, 2433: 31593, 2434: 31889, 2435: 31407, 2436: 31813, 2437: 31674, 2438: 31852, 2439: 31850, 2440: 31733, 2441: 31790, 2442: 31766, 2443: 31700, 2444: 31617, 2445: 31603, 2446: 31637, 2447: 31688, 2448: 31758, 2449: 31876, 2450: 31827, 2451: 31685, 2452: 32040, 2453: 32019, 2454: 31945, 2455: 31859, 2456: 31978, 2457: 32020, 2458: 32012, 2459: 32173, 2460: 31870, 2461: 31992, 2462: 31765, 2463: 32261, 2464: 32190, 2465: 31886, 2466: 32104, 2467: 32067, 2468: 31711, 2469: 32064, 2470: 32438, 2471: 32268, 2473: 32246, 2474: 32177, 2475: 32007, 2476: 31966, 2477: 32489, 2478: 32249, 2479: 32226, 2480: 32311, 2481: 32144, 2482: 32091, 2483: 32480, 2484: 32362, 2486: 32609, 2487: 32562, 2488: 32208, 2489: 32404, 2490: 32864, 2491: 32349, 2492: 32292, 2493: 32322, 2494: 32463, 2495: 32368, 2497: 32339, 2498: 32411, 2499: 32539, 2500: 32366, 2501: 32385, 2502: 32474, 2503: 32533, 2504: 32492, 2505: 31977, 2506: 32578, 2507: 32418, 2508: 32558, 2509: 32504, 2510: 32434, 2511: 33104, 2512: 32740, 2513: 32375, 2514: 32617, 2515: 32402, 2516: 32844, 2517: 32682, 2518: 32537, 2519: 32753, 2520: 33048, 2521: 32698, 2522: 32677, 2523: 32494, 2524: 32477, 2525: 32814, 2526: 32531, 2527: 33694, 2528: 32744, 2529: 32921, 2530: 32851, 2531: 32222, 2532: 33056, 2533: 32968, 2534: 32838, 2535: 32809, 2536: 32332, 2537: 32782, 2538: 32759, 2539: 33041, 2540: 33018, 2541: 33064, 2542: 33044, 2543: 32931, 2544: 32827, 2545: 32810, 2546: 32771, 2547: 33133, 2548: 32765, 2549: 32855, 2550: 32607, 2551: 33024, 2552: 32990, 2553: 32768, 2554: 32761, 2555: 33082, 2556: 33271, 2557: 33269, 2558: 32938, 2559: 31897, 2560: 33449, 2561: 33444, 2562: 32775, 2563: 32918, 2564: 33202, 2565: 33077, 2566: 33079, 2567: 33040, 2568: 33377, 2569: 33277, 2570: 33154, 2571: 33092, 2572: 33184, 2573: 33415, 2574: 33160, 2575: 33006, 2576: 33094, 2577: 33210, 2578: 33126, 2579: 33015, 2580: 33152, 2581: 33827, 2582: 33243, 2583: 33165, 2584: 33297, 2585: 33485, 2586: 33421, 2587: 33016, 2588: 33248, 2589: 33372, 2590: 33302, 2591: 33189, 2592: 33012, 2593: 33345, 2594: 33139, 2595: 33316, 2596: 33347, 2597: 33465, 2598: 33330, 2599: 33420, 2600: 33614, 2601: 33595, 2602: 32912, 2603: 33447, 2604: 33394, 2605: 33650, 2606: 33584, 2607: 33478, 2608: 33357, 2609: 37391, 2610: 33603, 2611: 33492, 2612: 33451, 2613: 33644, 2614: 33532, 2615: 33715, 2616: 33575, 2617: 34238, 2618: 33579, 2619: 33558, 2620: 33823, 2621: 33591, 2622: 33719, 2623: 33666, 2624: 33729, 2625: 33703, 2626: 33590, 2627: 33754, 2628: 33721, 2629: 33854, 2630: 33927, 2631: 33929, 2632: 33914, 2633: 33875, 2634: 33588, 2635: 33937, 2636: 33873, 2637: 33760, 2638: 33577, 2639: 33878, 2640: 33804, 2641: 33774, 2642: 34250, 2643: 34017, 2644: 34217, 2645: 34168, 2646: 33856, 2647: 34002, 2648: 33971, 2649: 34033, 2650: 34088, 2651: 34055, 2652: 33779, 2653: 33977, 2654: 34107, 2655: 34086, 2656: 34066, 2657: 34045, 2658: 33909, 2659: 34182, 2660: 34267, 2661: 33800, 2662: 33682, 2663: 34215, 2664: 34142, 2665: 34358, 2666: 34081, 2667: 34065, 2668: 34069, 2669: 34367, 2670: 34234, 2671: 34356, 2672: 34059, 2673: 34428, 2674: 34000, 2675: 34462, 2676: 34338, 2677: 34200, 2678: 34301, 2679: 34297, 2680: 34248, 2681: 34956, 2682: 34387, 2683: 34105, 2684: 34440, 2685: 34253, 2686: 34318, 2687: 34177, 2688: 34331, 2689: 33384, 2690: 34360, 2691: 34339, 2692: 34608, 2693: 34444, 2694: 34536, 2695: 34489, 2696: 34752, 2697: 34693, 2698: 34349, 2699: 34561, 2700: 34722, 2701: 34622, 2702: 34495, 2703: 34912, 2704: 34579, 2705: 34617, 2706: 34819, 2707: 34724, 2708: 34624, 2709: 36019, 2710: 34768, 2711: 34860, 2712: 34270, 2713: 34789, 2714: 34769, 2715: 35146, 2716: 34758, 2717: 34909, 2718: 34798, 2719: 34670, 2720: 34782, 2721: 35136, 2722: 34995, 2723: 34888, 2724: 34814, 2725: 35025, 2726: 34817, 2727: 34802, 2728: 35005, 2729: 34987, 2730: 34914, 2731: 34975, 2732: 34982, 2733: 34940, 2734: 34924, 2735: 34473, 2736: 34481, 2737: 35304, 2738: 35152, 2739: 34999, 2740: 34834, 2741: 34937, 2742: 36547, 2743: 34954, 2744: 35080, 2745: 34981, 2746: 34899, 2747: 35120, 2748: 34922, 2749: 35037, 2750: 35044, 2751: 35384, 2752: 35127, 2753: 35341, 2754: 34780, 2755: 35132, 2756: 35083, 2757: 35345, 2758: 35180, 2759: 35054, 2760: 35278, 2761: 35029, 2762: 35020, 2763: 35350, 2764: 35210, 2765: 35301, 2766: 35205, 2767: 35084, 2768: 35241, 2769: 35202, 2770: 35226, 2771: 35181, 2772: 35735, 2773: 35264, 2774: 35326, 2775: 35623, 2776: 35643, 2777: 35550, 2778: 35476, 2779: 35509, 2780: 35548, 2781: 35412, 2782: 35415, 2783: 35783, 2784: 35785, 2785: 35442, 2786: 35427, 2787: 35363, 2788: 35487, 2789: 35347, 2790: 35406, 2791: 35393, 2792: 35725, 2793: 35710, 2794: 35463, 2795: 35699, 2796: 35615, 2797: 36858, 2798: 35642, 2799: 35609, 2800: 35611, 2801: 35712, 2802: 35626, 2803: 35228, 2804: 35984, 2805: 35907, 2806: 35707, 2807: 35737, 2808: 35846, 2809: 36211, 2810: 35842, 2811: 35749, 2812: 35727, 2813: 35564, 2815: 35589, 2816: 35941, 2817: 35933, 2818: 36145, 2819: 35795, 2820: 35987, 2821: 36046, 2822: 35848, 2823: 35855, 2824: 35887, 2825: 35951, 2826: 35920, 2827: 35904, 2828: 36041, 2829: 35893, 2830: 36528, 2831: 35975, 2832: 35998, 2833: 36055, 2834: 35957, 2835: 36152, 2836: 36123, 2837: 36156, 2838: 36080, 2839: 36017, 2840: 36141, 2841: 36024, 2842: 35960, 2844: 36348, 2845: 36188, 2846: 36238, 2847: 36045, 2848: 32500, 2849: 36439, 2850: 36140, 2851: 36265, 2852: 36366, 2853: 36186, 2854: 36284, 2855: 36168, 2856: 36143, 2857: 36393, 2858: 36340, 2859: 36251, 2860: 36236, 2861: 36429, 2862: 36114, 2863: 36258, 2864: 36425, 2865: 36388, 2866: 36399, 2867: 36396, 2868: 36395, 2869: 36304, 2870: 36345, 2872: 36624, 2873: 36362, 2874: 36431, 2875: 36363, 2876: 36526, 2877: 36616, 2878: 36377, 2879: 36691, 2880: 36641, 2881: 36514, 2882: 36515, 2883: 36640, 2884: 36444, 2885: 36582, 2886: 36760, 2887: 36723, 2888: 36346, 2889: 36608, 2891: 36850, 2892: 36496, 2893: 36796, 2894: 37046, 2895: 36657, 2896: 36896, 2897: 36736, 2898: 36965, 2899: 36732, 2900: 36721, 2901: 36812, 2902: 36773, 2903: 37023, 2904: 36869, 2905: 36962, 2906: 36795, 2907: 36728, 2908: 36729, 2909: 36817, 2911: 36778, 2912: 36837, 2913: 36807, 2914: 37140, 2915: 37091, 2916: 36848, 2917: 36787, 2918: 37031, 2919: 36039, 2920: 37000, 2921: 36981, 2922: 36917, 2923: 36986, 2924: 37204, 2925: 36856, 2926: 37165, 2927: 37088, 2928: 37036, 2929: 37406, 2930: 37265, 2931: 37269, 2932: 37119, 2933: 37089, 2934: 36942, 2935: 37369, 2936: 37339, 2937: 37096, 2938: 37300, 2939: 37441, 2940: 37043, 2941: 36977, 2942: 37127, 2943: 37279, 2944: 37173, 2945: 37128, 2946: 37609, 2947: 37261, 2948: 37229, 2951: 37428, 2952: 37184, 2953: 37404, 2954: 37223, 2955: 37202, 2956: 37293, 2957: 37174, 2958: 37394, 2959: 37379, 2960: 37364, 2961: 37297, 2962: 37580, 2963: 37322, 2964: 37329, 2965: 37508, 2966: 37478, 2967: 37521, 2968: 37345, 2969: 37701, 2970: 37447, 2971: 37248, 2972: 37399, 2973: 37629, 2974: 37415, 2975: 37949, 2976: 37465, 2977: 37934, 2978: 37636, 2979: 36914, 2981: 37450, 2982: 37614, 2983: 37704, 2984: 37461, 2985: 37740, 2986: 37514, 2987: 37723, 2988: 37590, 2989: 37705, 2990: 37826, 2991: 37811, 2992: 37660, 2993: 37648, 2994: 37623, 2995: 37616, 2996: 37677, 2997: 38784, 2998: 37606, 2999: 37946, 3000: 36982, 3001: 37666, 3002: 37664, 3003: 37908, 3004: 37751, 3005: 37617, 3006: 37530, 3007: 37710, 3008: 37921, 3009: 37842, 3010: 37843, 3011: 37752, 3012: 37599, 3013: 38016, 3014: 37901, 3015: 37891, 3016: 37803, 3017: 37819, 3018: 37853, 3019: 37951, 3020: 37823, 3021: 38106, 3022: 37915, 3023: 37995, 3024: 37504, 3025: 37938, 3026: 38031, 3027: 38037, 3028: 38325, 3029: 38048, 3030: 38147, 3031: 37854, 3032: 37982, 3033: 38140, 3034: 38070, 3035: 38010, 3036: 37773, 3037: 38020, 3038: 37720, 3039: 38449, 3040: 38319, 3041: 38074, 3042: 38184, 3043: 38146, 3044: 38211, 3045: 38170, 3046: 38089, 3047: 38253, 3048: 38216, 3049: 38167, 3050: 38300, 3051: 38246, 3052: 38200, 3053: 38394, 3054: 38307, 3055: 38164, 3056: 38087, 3057: 38183, 3058: 38159, 3059: 38373, 3060: 38316, 3061: 38406, 3062: 38152, 3063: 38372, 3064: 38382, 3065: 38623, 3066: 38639, 3067: 38538, 3068: 38375, 3069: 38292, 3070: 38160, 3071: 38267, 3072: 38474, 3073: 38427, 3074: 38355, 3075: 39117, 3076: 38226, 3077: 38800, 3078: 38370, 3079: 38423, 3080: 38414, 3081: 38210, 3082: 39538, 3083: 38723, 3084: 38455, 3085: 38497, 3086: 38722, 3087: 38712, 3088: 38438, 3089: 38500, 3090: 38518, 3091: 38593, 3092: 38635, 3093: 38794, 3094: 38959, 3095: 38848, 3096: 38686, 3097: 38868, 3098: 38870, 3099: 38792, 3100: 38667, 3101: 38732, 3102: 38835, 3103: 38945, 3104: 38975, 3105: 38656, 3106: 39221, 3107: 38795, 3108: 40559, 3109: 39261, 3110: 38962, 3111: 38845, 3112: 39340, 3113: 38901, 3114: 38846, 3115: 39067, 3116: 38872, 3117: 38827, 3118: 38879, 3119: 39348, 3120: 38783, 3121: 38917, 3122: 39079, 3123: 39023, 3124: 39191, 3125: 39180, 3126: 38834, 3127: 39194, 3128: 39177, 3129: 38957, 3130: 39279, 3131: 39095, 3132: 39263, 3133: 38963, 3134: 39236, 3135: 39172, 3136: 39213, 3137: 39014, 3138: 38908, 3139: 38863, 3140: 39061, 3141: 39211, 3142: 39035, 3143: 39038, 3144: 39271, 3145: 39311, 3146: 39137, 3147: 38994, 3148: 39122, 3149: 39424, 3150: 39326, 3151: 39153, 3152: 39073, 3153: 39070, 3154: 39251, 3155: 39299, 3156: 39184, 3157: 39225, 3158: 39535, 3159: 39138, 3160: 39380, 3161: 39238, 3162: 39360, 3163: 39567, 3164: 39607, 3165: 39429, 3166: 39420, 3167: 39722, 3168: 39524, 3169: 39659, 3170: 39487, 3171: 39041, 3172: 39625, 3173: 39847, 3174: 39675, 3175: 39995, 3176: 39780, 3177: 39617, 3178: 39527, 3179: 39584, 3180: 39566, 3181: 39938, 3182: 40215, 3183: 39734, 3184: 39874, 3185: 39757, 3186: 39530, 3187: 39690, 3188: 39863, 3189: 39898, 3190: 39876, 3191: 40023, 3192: 39906, 3193: 40093, 3194: 39943, 3195: 39866, 3196: 39914, 3197: 41208, 3198: 40058, 3199: 39920, 3200: 40305, 3201: 40085, 3202: 40035, 3203: 39919, 3204: 39961, 3205: 39974, 3207: 39953, 3210: 40167, 3211: 40084, 3212: 40107, 3213: 39970, 3214: 40177, 3215: 40240, 3216: 40793, 3217: 39843, 3218: 39957, 3219: 40063, 3220: 39903, 3221: 40474, 3222: 40231, 3223: 39794, 3224: 40293, 3225: 40091, 3226: 40096, 3227: 40077, 3228: 40342, 3229: 40259, 3230: 40211, 3231: 40354, 3232: 40155, 3233: 40220, 3234: 40183, 3235: 40646, 3236: 40889, 3237: 40274, 3238: 40291, 3239: 40341, 3240: 40321, 3241: 40324, 3242: 40344, 3243: 40326, 3244: 40285, 3245: 40772, 3246: 40677, 3247: 40282, 3248: 40534, 3249: 40526, 3250: 40357, 3251: 40476, 3252: 40617, 3253: 40485, 3254: 40875, 3255: 40561, 3256: 40433, 3257: 40604, 3258: 40878, 3259: 40693, 3260: 40429, 3261: 40656, 3262: 40843, 3263: 41060, 3264: 40866, 3265: 40766, 3266: 40678, 3267: 40673, 3268: 40881, 3269: 40818, 3270: 40706, 3271: 40858, 3272: 40859, 3273: 40787, 3274: 40655, 3275: 41075, 3276: 40876, 3277: 41152, 3278: 40941, 3279: 40944, 3280: 40680, 3281: 40990, 3282: 40945, 3283: 40943, 3284: 41117, 3285: 41036, 3286: 40947, 3287: 41224, 3288: 41080, 3289: 41067, 3290: 41163, 3291: 41074, 3292: 41262, 3293: 40932, 3294: 41039, 3295: 41214, 3296: 41107, 3297: 41211, 3298: 40926, 3299: 41319, 3300: 41081, 3301: 40817, 3302: 40834, 3303: 41676, 3304: 41377, 3305: 41299, 3306: 41325, 3307: 41037, 3308: 41242, 3309: 41484, 3310: 41404, 3312: 41389, 3314: 41307, 3315: 41260, 3316: 41282, 3317: 41306, 3318: 40702, 3319: 41400, 3320: 41328, 3321: 41375, 3322: 41250, 3323: 41704, 3324: 41395, 3325: 41452, 3326: 41323, 3327: 41361, 3329: 41574, 3330: 41296, 3331: 41413, 3332: 41927, 3333: 41578, 3334: 41003, 3335: 41475, 3336: 41449, 3337: 41564, 3338: 41547, 3339: 41504, 3340: 40888, 3341: 41373, 3342: 41597, 3343: 41515, 3344: 41572, 3345: 41603, 3346: 41321, 3347: 41312, 3348: 41798, 3349: 41464, 3350: 41483, 3351: 41894, 3352: 42249, 3353: 41640, 3354: 42080, 3355: 41816, 3356: 41621, 3357: 41822, 3358: 41616, 3359: 41639, 3360: 41935, 3361: 41843, 3362: 41723, 3363: 41674, 3364: 41726, 3365: 41975, 3366: 41909, 3367: 41817, 3368: 41653, 3369: 41940, 3370: 41451, 3371: 41737, 3372: 41904, 3373: 41806, 3374: 41893, 3375: 41781, 3376: 42010, 3377: 42090, 3378: 42008, 3379: 42484, 3380: 42049, 3381: 41949, 3382: 41813, 3383: 42028, 3384: 41926, 3385: 41939, 3386: 41861, 3387: 42133, 3388: 41970, 3389: 42001, 3390: 41986, 3391: 42438, 3392: 42142, 3393: 41191, 3394: 42187, 3395: 42172, 3396: 42173, 3397: 42075, 3398: 42146, 3399: 42070, 3400: 42372, 3401: 42434, 3402: 42147, 3403: 42527, 3404: 42123, 3405: 42415, 3406: 42265, 3407: 42088, 3408: 42452, 3409: 42365, 3410: 42313, 3411: 42299, 3412: 42353, 3413: 42177, 3414: 42134, 3415: 42129, 3416: 42368, 3417: 41907, 3418: 42402, 3419: 42302, 3420: 42334, 3421: 42291, 3422: 42604, 3423: 42538, 3424: 42462, 3425: 42394, 3426: 42312, 3427: 42516, 3428: 42549, 3429: 42556, 3430: 42430, 3431: 42509, 3432: 42286, 3433: 42483, 3434: 42455, 3435: 42400, 3436: 42777, 3437: 42606, 3438: 42515, 3439: 42540, 3440: 42459, 3441: 42662, 3442: 42504, 3443: 42440, 3444: 42564, 3445: 42570, 3446: 42701, 3447: 42536, 3448: 42535, 3449: 42806, 3450: 42795, 3451: 42871, 3452: 42624, 3453: 42614, 3454: 42799, 3455: 42579, 3456: 42679, 3457: 42568, 3458: 42854, 3459: 42835, 3460: 42425, 3461: 42911, 3462: 42712, 3463: 42775, 3464: 42954, 3465: 42917, 3466: 42715, 3467: 42726, 3468: 42828, 3469: 42931, 3470: 43266, 3471: 42717, 3472: 42951, 3473: 42928, 3474: 43100, 3475: 43103, 3476: 42834, 3477: 42884, 3478: 43026, 3479: 42923, 3480: 43035, 3481: 43121, 3482: 43109, 3483: 43002, 3484: 43067, 3485: 42913, 3486: 43142, 3487: 43023, 3488: 43073, 3489: 42936, 3490: 43114, 3491: 42850, 3492: 43234, 3493: 43204, 3494: 43082, 3495: 42895, 3496: 43148, 3497: 43177, 3498: 43105, 3499: 43410, 3500: 43305, 3501: 43209, 3502: 42637, 3503: 43195, 3504: 43427, 3505: 43644, 3506: 43624, 3507: 43338, 3508: 43531, 3509: 43553, 3510: 43454, 3511: 43550, 3512: 43352, 3513: 43370, 3514: 43325, 3516: 43394, 3517: 43354, 3518: 43409, 3519: 43584, 3520: 43347, 3521: 43575, 3522: 43587, 3523: 43496, 3524: 42794, 3525: 43392, 3526: 43570, 3527: 43413, 3528: 43685, 3529: 43580, 3530: 43486, 3531: 43903, 3532: 43721, 3533: 43573, 3534: 43590, 3535: 43603, 3536: 43499, 3537: 43414, 3538: 43726, 3539: 43589, 3540: 43834, 3541: 43811, 3542: 43593, 3543: 43012, 3544: 43351, 3545: 43923, 3546: 43894, 3547: 43813, 3548: 43673, 3549: 43620, 3550: 43851, 3551: 43671, 3552: 43822, 3554: 43798, 3555: 43932, 3556: 43825, 3557: 43902, 3558: 43957, 3559: 43853, 3560: 43669, 3561: 43970, 3562: 43807, 3563: 44031, 3564: 43899, 3565: 44001, 3566: 44064, 3567: 44010, 3568: 43763, 3569: 44127, 3570: 43797, 3571: 43783, 3572: 44066, 3573: 44042, 3574: 43878, 3575: 44154, 3576: 44390, 3577: 44126, 3578: 44075, 3579: 44248, 3580: 44231, 3581: 45421, 3582: 43937, 3583: 44024, 3584: 44162, 3585: 44130, 3586: 44331, 3587: 44307, 3588: 44093, 3589: 44342, 3590: 44315, 3591: 44191, 3592: 44504, 3593: 44213, 3594: 44471, 3595: 44405, 3596: 44356, 3597: 44290, 3598: 44143, 3599: 44406, 3600: 44299, 3601: 44512, 3602: 44367, 3603: 44613, 3604: 44256, 3605: 44337, 3606: 44574, 3607: 44431, 3608: 44717, 3609: 44857, 3610: 44283, 3611: 44423, 3612: 44700, 3613: 44659, 3614: 44511, 3615: 44382, 3616: 45038, 3617: 44768, 3618: 44738, 3619: 44901, 3620: 44825, 3621: 44818, 3622: 44565, 3623: 44798, 3624: 45075, 3625: 44897, 3626: 44892, 3627: 44946, 3628: 44824, 3629: 44708, 3630: 44883, 3631: 44753, 3632: 44665, 3633: 45306, 3634: 44816, 3635: 44984, 3636: 44936, 3637: 44887, 3638: 44923, 3639: 45058, 3640: 45033, 3641: 44961, 3642: 44626, 3643: 44599, 3644: 45001, 3645: 45461, 3646: 45037, 3647: 44979, 3648: 45333, 3649: 45150, 3650: 45170, 3651: 45167, 3652: 45290, 3653: 45158, 3654: 45085, 3655: 45184, 3656: 45127, 3657: 45272, 3658: 45122, 3659: 45080, 3660: 45455, 3661: 45189, 3662: 45493, 3663: 45101, 3664: 45412, 3665: 45336, 3666: 45764, 3667: 45259, 3668: 45242, 3669: 45410, 3670: 45270, 3672: 45314, 3673: 45219, 3674: 45344, 3675: 45424, 3676: 45590, 3677: 45386, 3678: 43908, 3679: 45328, 3680: 45413, 3681: 45527, 3682: 45439, 3683: 45526, 3684: 45448, 3685: 45238, 3686: 45661, 3687: 45559, 3688: 45481, 3689: 45614, 3690: 45688, 3691: 45418, 3692: 45505, 3693: 45437, 3694: 45544, 3695: 45166, 3696: 45496, 3697: 45836, 3698: 45915, 3699: 45556, 3700: 45603, 3701: 45858, 3702: 45744, 3703: 45631, 3704: 45743, 3705: 45860, 3706: 45751, 3707: 45896, 3708: 45675, 3709: 45811, 3710: 45754, 3711: 45874, 3712: 45571, 3713: 45615, 3714: 45854, 3715: 45837, 3716: 45814, 3717: 45742, 3718: 45902, 3719: 46410, 3720: 45581, 3721: 45585, 3722: 46247, 3723: 46058, 3724: 45999, 3725: 46168, 3726: 45924, 3727: 46125, 3728: 45856, 3729: 45980, 3730: 45962, 3731: 46146, 3732: 45920, 3733: 46026, 3734: 45941, 3735: 46075, 3736: 46232, 3737: 46114, 3738: 46221, 3739: 46093, 3740: 46049, 3741: 46288, 3742: 46101, 3743: 46471, 3744: 46365, 3745: 46329, 3746: 46297, 3747: 46566, 3748: 46390, 3749: 46371, 3750: 46404, 3751: 47193, 3752: 46225, 3753: 46283, 3754: 46454, 3755: 46457, 3756: 46396, 3757: 46733, 3758: 46504, 3759: 46509, 3760: 46529, 3761: 46328, 3762: 46543, 3763: 46511, 3764: 46652, 3765: 46515, 3766: 46517, 3767: 46569, 3768: 47013, 3769: 46735, 3770: 46578, 3771: 46977, 3772: 46618, 3773: 46750, 3774: 47119, 3775: 46853, 3776: 46482, 3777: 46358, 3778: 46873, 3779: 46774, 3780: 46657, 3782: 46771, 3783: 46460, 3784: 46594, 3785: 46744, 3786: 46651, 3787: 46776, 3788: 46768, 3789: 46734, 3790: 46736, 3791: 46904, 3792: 46891, 3793: 46620, 3794: 46840, 3795: 46107, 3796: 46813, 3797: 46963, 3798: 46810, 3799: 47006, 3800: 46952, 3801: 46869, 3802: 46859, 3803: 46701, 3804: 46938, 3805: 46893, 3806: 47260, 3807: 46811, 3808: 46880, 3809: 47029, 3810: 46897, 3811: 47053, 3812: 46874, 3813: 46737, 3814: 46982, 3815: 47080, 3816: 46806, 3817: 46914, 3818: 47096, 3819: 46950, 3820: 47168, 3821: 46741, 3822: 47070, 3823: 47039, 3824: 47401, 3825: 46974, 3826: 47189, 3827: 47205, 3828: 47159, 3829: 47300, 3830: 47187, 3831: 47145, 3832: 47249, 3833: 47199, 3834: 47310, 3835: 47224, 3836: 47175, 3837: 47172, 3838: 47594, 3839: 47654, 3840: 47204, 3841: 47115, 3842: 47267, 3843: 47884, 3844: 47328, 3845: 47431, 3846: 47427, 3847: 48017, 3848: 47454, 3849: 47452, 3850: 47544, 3851: 47570, 3852: 47508, 3853: 47550, 3854: 47633, 3855: 47664, 3856: 47391, 3857: 47631, 3858: 47522, 3859: 47791, 3860: 46928, 3861: 47701, 3862: 47592, 3863: 47479, 3864: 47498, 3865: 47911, 3866: 47723, 3867: 47627, 3868: 47559, 3869: 47779, 3870: 47965, 3871: 47758, 3872: 47694, 3873: 47908, 3874: 47762, 3875: 47717, 3876: 47943, 3877: 47959, 3878: 47868, 3879: 47960, 3880: 48029, 3881: 48113, 3882: 48036, 3883: 47893, 3884: 47854, 3885: 48266, 3886: 47963, 3887: 47913, 3888: 48319, 3889: 48218, 3890: 48002, 3892: 48191, 3893: 48273, 3894: 48402, 3895: 48119, 3896: 48324, 3897: 48219, 3898: 48224, 3899: 48341, 3900: 48390, 3901: 48351, 3902: 47956, 3903: 48356, 3904: 48287, 3905: 48455, 3906: 48414, 3907: 48413, 3908: 48396, 3909: 48437, 3910: 48348, 3911: 48638, 3912: 48374, 3913: 48339, 3914: 48310, 3915: 48519, 3916: 48468, 3917: 48682, 3918: 48893, 3919: 48559, 3920: 48469, 3921: 48584, 3922: 48802, 3923: 48615, 3924: 48527, 3925: 48561, 3926: 48734, 3927: 48613, 3928: 48833, 3929: 48861, 3930: 48706, 3931: 48763, 3932: 48748, 3933: 48776, 3934: 49688, 3935: 48730, 3936: 48895, 3937: 48883, 3938: 48876, 3939: 49005, 3940: 48774, 3941: 48799, 3942: 48982, 3943: 48835, 3944: 48715, 3945: 48990, 3946: 48943, 3947: 48926, 3948: 48806, 3949: 48782, 3950: 49029, 3951: 49081, 3952: 49220, 3953: 49052, 3954: 49363, 3955: 49137, 3956: 49222, 3957: 49160, 3958: 49408, 3959: 49293, 3960: 49164, 3961: 49329, 3962: 49294, 3963: 49321, 3964: 49259, 3965: 49339, 3966: 49233, 3967: 49223, 3968: 49343, 3969: 49445, 3970: 49402, 3971: 49281, 3972: 49418, 3973: 49530, 3974: 49593, 3975: 49583, 3976: 49485, 3977: 49569, 3978: 49477, 3979: 49658, 3980: 49637, 3981: 49641, 3982: 49669, 3983: 49065, 3984: 49645, 3985: 49701, 3986: 49689, 3987: 49870, 3988: 49802, 3989: 49812, 3990: 49712, 3991: 49809, 3992: 49769, 3993: 49893, 3994: 49841, 3995: 49698, 3996: 49865, 3997: 49326, 3998: 49929, 3999: 49751, 4000: 49900, 4001: 49844, 4002: 49764, 4003: 49967, 4004: 50027, 4005: 50013, 4006: 50109, 4007: 49926, 4008: 50222, 4009: 49934, 4010: 49994, 4011: 50066, 4012: 50174, 4013: 50075, 4014: 50218, 4015: 50103, 4016: 50447, 4017: 50070, 4018: 50044, 4019: 50122, 4020: 50078, 4021: 50433, 4022: 50067, 4023: 50191, 4024: 50303, 4025: 50083, 4026: 50448, 4027: 50316, 4028: 50305, 4029: 50234, 4030: 50319, 4031: 50335, 4032: 50336, 4033: 50372, 4034: 50292, 4035: 50333, 4036: 50241, 4037: 50099, 4038: 50232, 4039: 50384, 4040: 50340, 4041: 50459, 4042: 50414, 4043: 50287, 4044: 50509, 4045: 50332, 4046: 50546, 4047: 50685, 4048: 50516, 4049: 50456, 4050: 50371, 4051: 50606, 4052: 50635, 4053: 50492, 4054: 50564, 4055: 50536, 4056: 50480, 4057: 50583, 4059: 50552, 4060: 50584, 4061: 50493, 4062: 51384, 4063: 50555, 4064: 50684, 4065: 50520, 4066: 50609, 4067: 50786, 4068: 50693, 4069: 50801, 4070: 50755, 4071: 50728, 4072: 50933, 4073: 50739, 4074: 50676, 4075: 50860, 4076: 50790, 4077: 50851, 4078: 50904, 4079: 50870, 4080: 50799, 4081: 50935, 4082: 50885, 4083: 50868, 4084: 51502, 4085: 50939, 4086: 50888, 4087: 50903, 4088: 51008, 4089: 50847, 4090: 51056, 4091: 50916, 4092: 51046, 4093: 51014, 4094: 51069, 4095: 50993, 4096: 51200, 4097: 51161, 4098: 51248, 4099: 51077, 4100: 51233, 4101: 51213, 4102: 50954, 4103: 51290, 4104: 51172, 4105: 50976, 4106: 51401, 4107: 51140, 4108: 51448, 4109: 51302, 4110: 51192, 4111: 51245, 4112: 51459, 4113: 51420, 4114: 51232, 4115: 51194, 4116: 51362, 4117: 51364, 4118: 51376, 4119: 51437, 4120: 51313, 4121: 51883, 4122: 51490, 4123: 51491, 4124: 51556, 4125: 51475, 4126: 51808, 4127: 51585, 4128: 51461, 4129: 51425, 4130: 51551, 4131: 51697, 4132: 51658, 4133: 51624, 4134: 51523, 4135: 51561, 4136: 51560, 4137: 51685, 4138: 51438, 4139: 51610, 4140: 51576, 4141: 51814, 4142: 51495, 4143: 51635, 4144: 51623, 4145: 51718, 4146: 51775, 4147: 51676, 4148: 51802, 4149: 51795, 4150: 51914, 4151: 51732, 4152: 51852, 4153: 51821, 4154: 51816, 4155: 51907, 4156: 51905, 4157: 51885, 4158: 51933, 4159: 51849, 4160: 51974, 4161: 51557, 4162: 51979, 4163: 52009, 4164: 51912, 4165: 52136, 4166: 52098, 4167: 51986, 4168: 52139, 4169: 52004, 4170: 51835, 4171: 52085, 4172: 52113, 4173: 52043, 4174: 51839, 4175: 52112, 4176: 52338, 4177: 52102, 4178: 52353, 4179: 52127, 4180: 52154, 4181: 52425, 4182: 52316, 4183: 52273, 4184: 52366, 4185: 52221, 4186: 52150, 4187: 52478, 4188: 52308, 4189: 52422, 4190: 52391, 4191: 52469, 4192: 52457, 4193: 52452, 4194: 52407, 4195: 52577, 4196: 52370, 4197: 52513, 4198: 52405, 4199: 52419, 4200: 52468, 4201: 52584, 4202: 52685, 4203: 52638, 4204: 52487, 4205: 52502, 4206: 52340, 4207: 52660, 4208: 52686, 4209: 52689, 4211: 52520, 4212: 52537, 4213: 52535, 4214: 52737, 4215: 52877, 4216: 52727, 4217: 52679, 4218: 52795, 4219: 52678, 4220: 52701, 4221: 52742, 4222: 52736, 4223: 52882, 4224: 52863, 4225: 52841, 4226: 52797, 4227: 52911, 4228: 52827, 4229: 52913, 4230: 52959, 4231: 52595, 4232: 52943, 4233: 52948, 4234: 52633, 4235: 53043, 4236: 53064, 4237: 52980, 4238: 52965, 4239: 52922, 4240: 53035, 4241: 53155, 4242: 53157, 4243: 53257, 4244: 53141, 4245: 53167, 4246: 53261, 4247: 53229, 4248: 53295, 4249: 53240, 4250: 53154, 4251: 53252, 4252: 53259, 4253: 53273, 4254: 53355, 4255: 53316, 4256: 53377, 4257: 53253, 4258: 53426, 4259: 53417, 4261: 53387, 4262: 53272, 4263: 53379, 4264: 53465, 4265: 53423, 4266: 53334, 4267: 53449, 4268: 53151, 4269: 53472, 4270: 53492, 4271: 53394, 4272: 53761, 4273: 53502, 4274: 53530, 4275: 53706, 4276: 53589, 4277: 53721, 4278: 53726, 4279: 53546, 4280: 53781, 4281: 53737, 4282: 53699, 4283: 53798, 4284: 53723, 4285: 53791, 4286: 53860, 4287: 53740, 4288: 53838, 4289: 53778, 4290: 53701, 4291: 53807, 4292: 53762, 4293: 53773, 4294: 53824, 4295: 53910, 4296: 53771, 4297: 53849, 4298: 53818, 4299: 53907, 4300: 53954, 4301: 54061, 4302: 53963, 4303: 54027, 4304: 53700, 4305: 54029, 4306: 54049, 4307: 54030, 4308: 54048, 4309: 54136, 4310: 54182, 4311: 54137, 4312: 53702, 4313: 54173, 4314: 54204, 4315: 54214, 4316: 54185, 4317: 54255, 4318: 54264, 4319: 54336, 4320: 54311, 4321: 54291, 4322: 54388, 4323: 54294, 4324: 54349, 4325: 54301, 4326: 54289, 4327: 54360, 4328: 54400, 4329: 54327, 4330: 54540, 4331: 54430, 4332: 54487, 4333: 54522, 4334: 54477, 4335: 54539, 4336: 54537, 4337: 54463, 4338: 54461, 4339: 54561, 4340: 54721, 4341: 54688, 4342: 54630, 4343: 54682, 4344: 54765, 4345: 54745, 4346: 54725, 4347: 54742, 4348: 54749, 4349: 54673, 4350: 54746, 4351: 54842, 4352: 54751, 4353: 54783, 4354: 54811, 4355: 54767, 4356: 54849, 4357: 54872, 4358: 54863, 4359: 54879, 4360: 54840, 4361: 54829, 4362: 54951, 4363: 55044, 4364: 54929, 4365: 55016, 4366: 55033, 4367: 55086, 4368: 55084, 4369: 55106, 4370: 55068, 4371: 55137, 4372: 55130, 4373: 55164, 4374: 0, 4375: 0, 4376: 55168, 4377: 55219, 4378: 55209, 4379: 55140, 4380: 55266, 4381: 55249, 4382: 55282, 4383: 55412, 4384: 55280, 4385: 55225, 4386: 55434, 4387: 55308, 4388: 55485, 4389: 55350, 4390: 55425, 4391: 55564, 4392: 55560, 4393: 55528, 4394: 55595, 4395: 55598, 4396: 55588, 4397: 55497, 4398: 55581, 4399: 55642, 4400: 55650, 4401: 55597, 4402: 55687, 4403: 55667, 4404: 55716, 4405: 55705, 4406: 55657, 4407: 55797, 4408: 55765, 4409: 55756, 4410: 55791, 4411: 55763, 4412: 55821, 4413: 55779, 4414: 55846, 4415: 55831, 4416: 55874, 4417: 55849, 4418: 55945, 4419: 55941, 4420: 55953, 4421: 56035, 4422: 56034, 4423: 56000, 4424: 56083, 4425: 55979, 4426: 56080, 4427: 56120, 4428: 56078, 4429: 56253, 4430: 56135, 4431: 56148, 4432: 56127, 4433: 56146, 4434: 56211, 4435: 56170, 4436: 56194, 4437: 56242, 4438: 56201, 4439: 56290, 4440: 56245, 4441: 56243, 4442: 56250, 4443: 56280, 4445: 56293, 4446: 56318, 4447: 56319, 4448: 56287, 4449: 56332, 4450: 56343, 4451: 56364, 4452: 56410, 4453: 56391, 4454: 56429, 4455: 56445, 4456: 56473, 4457: 56510, 4458: 56452, 4459: 56508, 4460: 56480, 4461: 56583, 4462: 56497, 4463: 56518, 4464: 56553, 4465: 56601, 4466: 56573, 4467: 56561, 4468: 56633, 4469: 56620, 4470: 56632, 4471: 56647, 4472: 56606, 4473: 56657, 4474: 56731, 4475: 56656, 4476: 56700, 4477: 56770, 4478: 56756, 4479: 56675, 4480: 56789, 4481: 56816, 4482: 56784, 4483: 56779, 4484: 56775, 4485: 56727, 4486: 56809, 4487: 56754, 4488: 56802, 4489: 56830, 4490: 56901, 4491: 56899, 4492: 56862, 4493: 56944, 4494: 56922, 4495: 56975, 4496: 56997, 4497: 56970, 4498: 57001, 4499: 56986, 4500: 57045, 4501: 57029, 4502: 57013, 4503: 57047, 4504: 57111, 4505: 57082, 4506: 57079, 4507: 56996, 4508: 57165, 4509: 57137, 4510: 57214, 4511: 57175, 4512: 57240, 4513: 57211, 4514: 57283, 4515: 57328, 4516: 57322, 4517: 57380, 4518: 57399, 4519: 57371, 4520: 57363, 4521: 57477, 4522: 57439, 4523: 57443, 4524: 57497, 4525: 57507, 4526: 57512, 4527: 57565, 4528: 57562, 4529: 57587, 4530: 57581, 4531: 57606, 4532: 57613, 4533: 57629, 4534: 57632, 4535: 57646, 4536: 57670, 4537: 57669, 4538: 57696, 4539: 57732, 4540: 57757, 4541: 57741, 4542: 57749, 4543: 57779, 4544: 57791, 4545: 57805, 4546: 57803, 4547: 57819, 4548: 57841, 4549: 57851, 4550: 57939, 4551: 57870, 4552: 57936, 4553: 57971, 4554: 58001, 4555: 58002, 4556: 58041, 4557: 58057, 4558: 58082, 4559: 58110, 4560: 58112, 4561: 58117, 4562: 58119, 4563: 58103, 4564: 58159, 4565: 58158, 4566: 58181, 4567: 58188, 4568: 58177, 4569: 58259, 4570: 58242, 4571: 58272, 4572: 58287, 4573: 58326, 4574: 58369, 4575: 58389, 4576: 58379, 4577: 58388, 4578: 58427, 4579: 58436, 4580: 58445, 4581: 58460, 4582: 58453, 4583: 58484, 4584: 58512, 4585: 58510, 4586: 58545, 4587: 58576, 4588: 58574, 4589: 58590, 4590: 58587, 4591: 58603, 4592: 58642, 4593: 58654, 4594: 58684, 4595: 58697, 4596: 58706, 4597: 58720, 4598: 58741, 4599: 58758, 4600: 58803, 4601: 58810, 4602: 58858, 4603: 58867, 4604: 58884, 4605: 58905, 4606: 58874, 4607: 58921, 4608: 58948, 4609: 58952, 4610: 58989, 4611: 59003, 4612: 59008, 4613: 59010, 4614: 59046, 4615: 59050, 4616: 59072, 4617: 59151, 4618: 59173, 4620: 59184, 4621: 59196, 4622: 59200, 4623: 59199, 4624: 59229, 4625: 59232, 4626: 59285, 4627: 59291, 4628: 59307, 4629: 59309, 4630: 59316, 4631: 59353, 4632: 59352, 4633: 59364, 4634: 59396, 4635: 59394, 4636: 59392, 4637: 59439, 4638: 59449, 4639: 59384, 4640: 59468, 4641: 59458, 4642: 59489, 4643: 59501, 4644: 59517, 4645: 59551, 4646: 59504, 4647: 59588, 4648: 59607, 4649: 59647, 4650: 59608, 4651: 59622, 4652: 59654, 4653: 59678, 4654: 59708, 4655: 59728, 4656: 59747, 4657: 59750, 4658: 59785, 4659: 59746, 4660: 59774, 4661: 59801, 4662: 59803, 4663: 59819, 4664: 59851, 4665: 59796, 4666: 59831, 4667: 59847, 4668: 59856, 4669: 59898, 4670: 59895, 4671: 59929, 4672: 59920, 4673: 59923, 4674: 60000, 4675: 59950, 4676: 59941, 4677: 59983, 4678: 59984, 4679: 60009, 4680: 60018, 4681: 60030, 4682: 60059, 4683: 59879, 4684: 60066, 4685: 60087, 4686: 59767, 4687: 60044, 4688: 60098, 4689: 60129, 4690: 60122, 4691: 60157, 4692: 60183, 4693: 60170, 4694: 60168, 4695: 60172, 4696: 60189, 4697: 60202, 4698: 60197, 4699: 60221, 4700: 60260, 4701: 60212, 4702: 60308, 4703: 60320, 4704: 60329, 4705: 60327, 4706: 60379, 4707: 60351, 4708: 60353, 4709: 60638, 4710: 60417, 4711: 60425, 4712: 60449, 4713: 60454, 4714: 60463, 4715: 60467, 4716: 60485, 4717: 60514, 4718: 60549, 4719: 60525, 4720: 60601, 4721: 60591, 4722: 60595, 4723: 60603, 4724: 60610, 4725: 60599, 4726: 60584, 4727: 60589, 4728: 60646, 4730: 60718, 4732: 60710, 4733: 60697, 4734: 60729, 4735: 60735, 4736: 60771, 4737: 60742, 4738: 60746, 4739: 60781, 4740: 60699, 4741: 60804, 4742: 60809, 4743: 60823, 4744: 60851, 4745: 60795, 4746: 60813, 4747: 60861, 4748: 60855, 4749: 60870, 4750: 60880, 4751: 60891, 4752: 60904, 4753: 60941, 4754: 60969, 4755: 60979, 4756: 60957, 4757: 60965, 4758: 60994, 4759: 61015, 4760: 60978, 4761: 60988, 4762: 60992, 4763: 61084, 4765: 60998, 4766: 61071, 4767: 61053, 4768: 61136, 4769: 61181, 4770: 61103, 4771: 61158, 4772: 61134, 4773: 61199, 4774: 61172, 4775: 61174, 4776: 61212, 4777: 61246, 4778: 61270, 4779: 61296, 4780: 61295, 4781: 61318, 4782: 61328, 4783: 61309, 4784: 61320, 4785: 61317, 4786: 61359, 4787: 61281, 4788: 61379, 4789: 61394, 4790: 61443, 4791: 61415, 4792: 61418, 4793: 61420, 4794: 61468, 4795: 61384, 4796: 61498, 4797: 61496, 4798: 61585, 4799: 61558, 4800: 61532, 4801: 61571, 4802: 61622, 4803: 61621, 4804: 61738, 4805: 61637, 4806: 61703, 4807: 61658, 4808: 61667, 4809: 61688, 4810: 61720, 4811: 61692, 4812: 61719, 4813: 61740, 4814: 61796, 4815: 61724, 4816: 61748, 4817: 61789, 4818: 61916, 4819: 61932, 4820: 61981, 4821: 61910, 4823: 61966, 4824: 61937, 4825: 61941, 4827: 61951, 4828: 61960, 4829: 61968, 4830: 62027, 4831: 62012, 4832: 62026, 4833: 61936, 4834: 62058, 4835: 62084, 4836: 62081, 4837: 62103, 4838: 62128, 4839: 62131, 4840: 62046, 4841: 62212, 4842: 62268, 4843: 62172, 4844: 62322, 4845: 62207, 4846: 62223, 4847: 62267, 4848: 62327, 4849: 62325, 4850: 62360, 4851: 62356, 4852: 62170, 4853: 62434, 4854: 62376, 4855: 62394, 4856: 62421, 4857: 62448, 4858: 62443, 4859: 62402, 4860: 62500, 4861: 62478, 4862: 62608, 4863: 62423, 4864: 62523, 4865: 62541, 4866: 62516, 4867: 62512, 4868: 62646, 4869: 62576, 4870: 63031, 4871: 62655, 4872: 62703, 4873: 62653, 4874: 62683, 4875: 62641, 4876: 62732, 4877: 62743, 4878: 62757, 4879: 62786, 4880: 62799, 4881: 62788, 4882: 62821, 4883: 62763, 4884: 62807, 4885: 62861, 4886: 62825, 4887: 62894, 4888: 62867, 4889: 62896, 4890: 62931, 4891: 62875, 4892: 62561, 4893: 62572, 4894: 62886, 4895: 62986, 4896: 62915, 4897: 63007, 4898: 63003, 4899: 63005, 4900: 62933, 4901: 62983, 4902: 62985, 4903: 63033, 4904: 62972, 4905: 62956, 4906: 63066, 4907: 63165, 4908: 63117, 4909: 63024, 4910: 63090, 4911: 63109, 4912: 63159, 4913: 63210, 4914: 63121, 4915: 63125, 4916: 63076, 4917: 63143, 4918: 63243, 4919: 63211, 4920: 63355, 4921: 63414, 4922: 63490, 4923: 63613, 4924: 63462, 4925: 63494, 4926: 63497, 4927: 63340, 4928: 63432, 4929: 63533, 4930: 63688, 4931: 63503, 4932: 63608, 4933: 63724, 4934: 63584, 4935: 63738, 4936: 63647, 4937: 63750, 4938: 63820, 4939: 63883, 4940: 63945, 4941: 63972, 4942: 64004, 4943: 63901, 4944: 64033, 4945: 63916, 4946: 63948, 4947: 64003, 4948: 63933, 4949: 63950, 4950: 63822, 4951: 64053, 4952: 64094, 4953: 63952, 4954: 64022, 4955: 64078, 4956: 64077, 4957: 64122, 4958: 64166, 4959: 64181, 4960: 64179, 4961: 64224, 4962: 64226, 4963: 64238, 4964: 64212, 4965: 64320, 4966: 64390, 4967: 64217, 4968: 64241, 4970: 64332, 4971: 64246, 4972: 64395, 4973: 64348, 4974: 64231, 4975: 64425, 4976: 64587, 4977: 64466, 4978: 64375, 4979: 64408, 4980: 64478, 4981: 64407, 4982: 64472, 4983: 64394, 4984: 64417, 4985: 64515, 4986: 64445, 4987: 64449, 4988: 64580, 4989: 64583, 4990: 64520, 4991: 64557, 4992: 64496, 4993: 64661, 4994: 64682, 4995: 64577, 4996: 64623, 4997: 64540, 4998: 64607, 4999: 64651, 5000: 64790, 5001: 64725, 5002: 64820, 5003: 64527, 5004: 64692, 5005: 64769, 5006: 64803, 5007: 64751, 5008: 64822, 5009: 64437, 5010: 64779, 5011: 64792, 5012: 64994, 5013: 64823, 5014: 64838, 5015: 64852, 5016: 64933, 5017: 64844, 5018: 64774, 5019: 64924, 5020: 64962, 5021: 64954, 5022: 64927, 5023: 64906, 5024: 65108, 5025: 64979, 5026: 65112, 5027: 65129, 5028: 65109, 5029: 65144, 5030: 65289, 5031: 65119, 5032: 65072, 5033: 65183, 5035: 65271, 5036: 65247, 5037: 65198, 5038: 65288, 5039: 65303, 5040: 65241, 5041: 65387, 5042: 65468, 5043: 65311, 5044: 65301, 5045: 65230, 5046: 65372, 5047: 65323, 5048: 65479, 5049: 65522, 5050: 65420, 5051: 65628, 5052: 65376, 5053: 65417, 5054: 65378, 5056: 65474, 5057: 65466, 5058: 65535, 5059: 65545, 5060: 65593, 5061: 65606, 5062: 65477, 5063: 65630, 5064: 65581, 5065: 65621, 5066: 65755, 5067: 65550, 5068: 65639, 5069: 65783, 5070: 65530, 5071: 65810, 5072: 65721, 5073: 65536, 5074: 65603, 5075: 65613, 5076: 65678, 5077: 65723, 5078: 65796, 5079: 65698, 5080: 65835, 5081: 65790, 5082: 66121, 5083: 65754, 5084: 66753, 5085: 65728, 5086: 65862, 5087: 65855, 5088: 65892, 5089: 65936, 5090: 65969, 5091: 65595, 5092: 66019, 5093: 66152, 5094: 66015, 5095: 66006, 5096: 65951, 5097: 66065, 5098: 66060, 5099: 66091, 5100: 66098, 5101: 66100, 5102: 66086, 5103: 66236, 5104: 66254, 5105: 66200, 5106: 66247, 5107: 66249, 5108: 66223, 5109: 66198, 5110: 66257, 5111: 66320, 5112: 66234, 5113: 66438, 5114: 66326, 5115: 66607, 5116: 66294, 5117: 66405, 5118: 66427, 5119: 66574, 5120: 66400, 5121: 66454, 5122: 66521, 5123: 66417, 5124: 66575, 5125: 66668, 5126: 66385, 5127: 66458, 5128: 66563, 5129: 66522, 5130: 66681, 5131: 66251, 5132: 66657, 5133: 66475, 5134: 66666, 5135: 66645, 5136: 66656, 5137: 66594, 5138: 66640, 5139: 66435, 5140: 66849, 5141: 66821, 5142: 66634, 5143: 66690, 5144: 66727, 5145: 66725, 5146: 66800, 5147: 66825, 5148: 66704, 5149: 66763, 5150: 66803, 5151: 66925, 5152: 66923, 5153: 66700, 5154: 66738, 5155: 66924, 5156: 66860, 5157: 66984, 5158: 67036, 5159: 66936, 5160: 66892, 5161: 66907, 5162: 66798, 5163: 67004, 5164: 66992, 5165: 67057, 5166: 67071, 5167: 67143, 5168: 67153, 5169: 67005, 5170: 67139, 5171: 67261, 5172: 67234, 5173: 67172, 5174: 67244, 5175: 67292, 5176: 67304, 5177: 67103, 5178: 67271, 5179: 67194, 5180: 67210, 5181: 67288, 5182: 67239, 5183: 67246, 5184: 66903, 5185: 67275, 5186: 67250, 5187: 67231, 5188: 68009, 5189: 67408, 5190: 67464, 5191: 67301, 5192: 67457, 5193: 67472, 5194: 67664, 5195: 67384, 5196: 67494, 5197: 67523, 5198: 67537, 5199: 67410, 5200: 67459, 5201: 67480, 5202: 67555, 5203: 66878, 5204: 67483, 5205: 67545, 5206: 67663, 5207: 67703, 5208: 67648, 5209: 67620, 5210: 67669, 5212: 67696, 5213: 67485, 5214: 67596, 5215: 67605, 5216: 67548, 5217: 67836, 5218: 67942, 5219: 67665, 5220: 67714, 5221: 67786, 5222: 67819, 5223: 67861, 5224: 67851, 5225: 67787, 5226: 67627, 5227: 67589, 5228: 67890, 5229: 67782, 5230: 67973, 5231: 68002, 5232: 67929, 5233: 67953, 5234: 68080, 5235: 67927, 5236: 68101, 5237: 68021, 5238: 67848, 5239: 68079, 5240: 68431, 5241: 68191, 5242: 68270, 5243: 68030, 5244: 68092, 5245: 68065, 5246: 68177, 5247: 68103, 5248: 68245, 5249: 68282, 5250: 68269, 5251: 68333, 5252: 68413, 5253: 68455, 5254: 68279, 5255: 68276, 5256: 68184, 5257: 68390, 5258: 68380, 5259: 68493, 5260: 68523, 5261: 68815, 5262: 68498, 5263: 68478, 5264: 68520, 5265: 68581, 5266: 68670, 5267: 68702, 5268: 68641, 5269: 68673, 5270: 68594, 5271: 68567, 5272: 68705, 5273: 68682, 5274: 68687, 5275: 68707, 5276: 68739, 5277: 68763, 5278: 68842, 5279: 69090, 5280: 68637, 5281: 68902, 5282: 68537, 5283: 68776, 5284: 68808, 5285: 68862, 5286: 68872, 5287: 68895, 5288: 68933, 5289: 69065, 5290: 68940, 5291: 68756, 5292: 69122, 5293: 69241, 5294: 69113, 5295: 69298, 5296: 69174, 5297: 69191, 5298: 69127, 5299: 69038, 5300: 69068, 5301: 69269, 5302: 69107, 5303: 69896, 5304: 69226, 5305: 68956, 5306: 69778, 5307: 69340, 5308: 69462, 5309: 69398, 5310: 69316, 5311: 69491, 5312: 69415, 5313: 69389, 5314: 69458, 5315: 69427, 5316: 69618, 5317: 69493, 5318: 69598, 5319: 69655, 5320: 69763, 5321: 69112, 5322: 69564, 5323: 69536, 5324: 69623, 5325: 69671, 5326: 69754, 5327: 70418, 5328: 69481, 5329: 69483, 5330: 69612, 5331: 69614, 5332: 69658, 5333: 69592, 5334: 69373, 5335: 69569, 5336: 70248, 5337: 69722, 5338: 69701, 5339: 70638, 5340: 69673, 5341: 69727, 5342: 69747, 5343: 0, 5344: 69792, 5345: 69650, 5346: 69751, 5347: 69735, 5348: 69904, 5349: 70035, 5350: 69713, 5351: 69732, 5352: 69829, 5353: 69881, 5354: 69996, 5355: 69929, 5356: 69965, 5357: 69995, 5358: 70069, 5359: 69974, 5360: 69818, 5361: 69879, 5362: 70054, 5363: 69862, 5364: 70104, 5365: 69989, 5366: 70012, 5367: 70090, 5368: 70022, 5369: 69955, 5370: 70027, 5371: 70264, 5372: 69958, 5373: 70029, 5374: 70051, 5375: 70270, 5376: 70243, 5377: 70325, 5378: 70300, 5379: 70492, 5380: 70363, 5381: 70306, 5382: 70528, 5383: 70336, 5384: 70319, 5385: 70327, 5387: 70310, 5388: 70384, 5389: 70874, 5390: 70469, 5391: 70657, 5392: 70400, 5393: 70452, 5394: 70414, 5395: 70574, 5396: 70576, 5397: 70518, 5398: 70580, 5399: 70538, 5400: 70626, 5401: 70663, 5402: 70517, 5403: 70798, 5404: 70497, 5405: 70602, 5406: 70680, 5407: 70753, 5408: 71002, 5409: 70755, 5410: 70794, 5411: 70685, 5412: 70915, 5413: 70931, 5414: 70781, 5415: 70786, 5416: 70762, 5417: 70966, 5418: 70894, 5419: 70987, 5420: 70791, 5421: 71116, 5422: 70892, 5423: 70873, 5424: 70949, 5425: 71121, 5426: 71184, 5427: 71182, 5428: 71154, 5429: 71053, 5430: 70692, 5431: 71239, 5432: 71333, 5433: 71094, 5434: 71115, 5435: 71075, 5436: 70952, 5437: 71040, 5438: 71295, 5439: 71353, 5440: 71352, 5441: 71168, 5442: 71111, 5443: 71530, 5444: 71419, 5445: 71243, 5446: 71429, 5447: 71284, 5448: 71277, 5449: 71453, 5450: 71500, 5451: 71251, 5452: 71280, 5453: 71536, 5454: 71406, 5455: 71469, 5456: 71581, 5457: 71639, 5458: 71658, 5459: 71683, 5460: 71681, 5461: 71746, 5462: 71571, 5463: 71908, 5464: 71568, 5465: 71861, 5466: 71783, 5467: 71573, 5468: 71618, 5469: 71860, 5470: 72370, 5471: 71865, 5472: 71729, 5473: 71759, 5474: 71853, 5475: 71762, 5477: 71795, 5479: 71196, 5480: 71832, 5481: 71837, 5482: 72131, 5483: 71857, 5484: 71974, 5485: 72010, 5486: 72097, 5487: 71957, 5488: 72121, 5489: 72104, 5490: 71995, 5491: 75736, 5492: 71876, 5493: 72012, 5494: 72250, 5495: 72290, 5496: 72122, 5497: 72197, 5498: 72308, 5499: 72210, 5500: 72438, 5501: 72154, 5502: 72125, 5503: 72194, 5504: 72217, 5505: 72105, 5507: 72139, 5508: 72296, 5509: 72338, 5510: 72124, 5511: 72220, 5512: 72208, 5513: 72310, 5514: 72323, 5515: 72471, 5516: 72357, 5517: 72378, 5518: 72373, 5519: 72432, 5520: 72833, 5521: 72488, 5522: 72449, 5523: 72489, 5524: 72412, 5525: 73540, 5526: 72571, 5527: 72773, 5528: 72683, 5529: 72469, 5530: 72603, 5531: 72622, 5532: 72552, 5533: 72487, 5534: 72567, 5535: 72631, 5536: 72629, 5537: 72508, 5538: 72524, 5539: 72965, 5540: 73223, 5541: 72582, 5542: 72772, 5543: 72800, 5544: 72659, 5545: 73771, 5546: 73036, 5547: 73415, 5548: 72929, 5549: 72959, 5550: 72846, 5551: 73129, 5552: 72664, 5553: 72848, 5554: 72934, 5555: 73394, 5556: 73095, 5557: 74296, 5558: 73049, 5559: 73111, 5560: 73154, 5561: 73116, 5562: 73107, 5563: 72607, 5564: 73133, 5565: 73171, 5566: 73241, 5567: 73087, 5568: 73184, 5569: 73068, 5570: 73165, 5571: 73273, 5572: 73279, 5573: 73193, 5574: 73156, 5575: 73166, 5576: 73334, 5577: 73284, 5578: 73249, 5579: 73341, 5580: 73354, 5581: 73100, 5582: 73310, 5583: 73309, 5584: 73350, 5585: 73493, 5586: 73473, 5587: 73559, 5588: 73369, 5589: 73199, 5590: 73497, 5591: 73566, 5592: 73464, 5593: 73776, 5594: 73536, 5595: 73624, 5596: 72573, 5597: 73454, 5598: 73980, 5599: 73608, 5600: 73568, 5601: 73620, 5602: 73555, 5603: 73714, 5604: 73764, 5605: 73807, 5607: 73826, 5608: 73507, 5609: 73634, 5610: 73716, 5611: 74047, 5612: 73637, 5613: 73675, 5614: 73865, 5615: 73901, 5616: 73745, 5617: 74006, 5618: 73695, 5619: 73937, 5620: 73927, 5621: 74184, 5622: 73945, 5623: 74181, 5624: 74066, 5625: 74100, 5626: 74117, 5627: 73841, 5628: 74421, 5629: 73706, 5630: 73941, 5631: 74026, 5632: 74273, 5633: 74000, 5634: 73996, 5635: 73909, 5636: 74224, 5637: 74305, 5638: 74087, 5639: 74121, 5640: 74096, 5641: 74239, 5642: 74336, 5643: 74329, 5644: 74582, 5645: 74470, 5646: 74376, 5647: 74380, 5648: 74083, 5649: 74395, 5650: 74418, 5651: 74449, 5652: 74392, 5653: 74479, 5654: 74386, 5655: 74490, 5656: 74493, 5657: 74500, 5658: 74539, 5659: 74432, 5660: 74604, 5661: 74750, 5662: 74600, 5663: 74696, 5664: 74778, 5665: 74505, 5666: 74837, 5667: 74707, 5668: 74716, 5669: 74623, 5670: 74824, 5671: 74946, 5672: 74272, 5673: 74514, 5674: 74561, 5675: 74649, 5676: 74596, 5677: 74571, 5678: 74732, 5679: 74689, 5680: 74941, 5681: 74666, 5682: 74875, 5683: 74911, 5684: 75091, 5685: 74785, 5686: 74857, 5687: 74950, 5688: 74929, 5689: 75003, 5690: 74901, 5691: 74605, 5692: 74896, 5693: 74625, 5694: 74975, 5695: 75141, 5696: 75164, 5697: 75151, 5698: 75206, 5699: 75181, 5700: 75308, 5701: 75110, 5702: 75000, 5703: 75118, 5704: 75323, 5705: 75177, 5706: 75101, 5707: 75127, 5708: 75264, 5709: 75049, 5710: 75119, 5711: 75125, 5712: 75304, 5713: 75565, 5714: 74793, 5715: 75043, 5716: 75093, 5717: 75230, 5718: 75178, 5719: 75439, 5720: 75352, 5721: 75342, 5722: 75476, 5723: 75379, 5724: 75501, 5725: 75665, 5726: 75257, 5727: 75312, 5729: 76996, 5730: 76013, 5731: 75256, 5732: 75369, 5733: 75411, 5734: 75415, 5735: 75097, 5736: 75647, 5737: 75260, 5738: 75742, 5739: 75530, 5740: 75535, 5741: 75572, 5742: 75828, 5743: 75730, 5744: 75458, 5745: 75674, 5746: 75761, 5747: 75695, 5748: 75587, 5749: 75939, 5750: 75944, 5751: 76063, 5752: 75770, 5753: 76048, 5754: 75678, 5755: 75696, 5756: 76028, 5757: 76664, 5758: 75971, 5759: 75788, 5760: 75919, 5761: 75928, 5762: 76106, 5763: 75973, 5764: 76126, 5765: 76143, 5766: 76407, 5767: 76207, 5768: 75822, 5769: 76006, 5770: 76069, 5771: 76440, 5772: 76133, 5773: 76234, 5774: 76041, 5775: 76259, 5776: 76297, 5777: 76219, 5778: 76127, 5779: 76233, 5780: 76243, 5781: 76371, 5782: 76750, 5783: 76198, 5784: 76397, 5785: 75974, 5786: 76877, 5787: 76333, 5788: 76276, 5790: 76395, 5791: 76291, 5792: 76736, 5793: 76267, 5794: 76470, 5795: 76337, 5796: 76372, 5797: 76552, 5798: 76618, 5799: 76427, 5800: 76307, 5801: 76503, 5802: 76425, 5803: 76716, 5804: 76424, 5805: 76591, 5806: 76532, 5807: 76608, 5808: 76366, 5809: 76567, 5810: 76569, 5811: 76311, 5812: 76600, 5813: 76456, 5814: 76628, 5815: 76602, 5816: 76603, 5817: 76384, 5818: 76376, 5819: 76666, 5820: 76705, 5821: 76809, 5822: 76739, 5823: 76534, 5824: 76742, 5825: 76829, 5826: 76008, 5827: 76617, 5828: 76509, 5829: 75809, 5830: 76568, 5831: 76733, 5832: 76935, 5833: 76669, 5835: 76594, 5836: 77042, 5837: 76939, 5838: 76880, 5839: 76945, 5840: 76810, 5841: 76651, 5842: 76852, 5843: 76866, 5844: 76519, 5845: 76878, 5846: 77086, 5847: 77007, 5848: 77060, 5849: 76952, 5850: 76985, 5851: 77390, 5853: 77052, 5854: 77070, 5855: 77048, 5856: 77235, 5857: 76957, 5858: 77111, 5859: 77163, 5860: 77286, 5861: 77186, 5862: 77350, 5863: 77227, 5864: 77358, 5865: 77454, 5866: 77287, 5867: 77233, 5868: 77257, 5869: 77562, 5870: 77336, 5871: 77541, 5872: 77574, 5873: 77645, 5874: 77412, 5875: 77464, 5876: 77785, 5877: 77397, 5878: 77272, 5879: 77450, 5880: 77442, 5881: 77516, 5882: 77678, 5883: 77634, 5884: 77817, 5885: 77635, 5886: 77277, 5887: 77370, 5888: 77578, 5889: 77512, 5890: 77771, 5891: 77982, 5892: 77622, 5893: 77729, 5894: 77615, 5895: 77660, 5896: 77689, 5897: 77952, 5898: 77927, 5899: 77661, 5900: 77990, 5901: 77655, 5902: 77811, 5903: 77055, 5904: 77840, 5905: 78045, 5906: 77858, 5907: 77859, 5908: 77853, 5909: 77782, 5910: 77900, 5911: 77801, 5912: 77909, 5913: 77835, 5914: 77760, 5915: 77939, 5916: 77985, 5917: 77984, 5918: 78046, 5919: 77910, 5920: 78279, 5921: 78117, 5922: 77738, 5923: 78058, 5924: 77902, 5925: 78105, 5926: 78106, 5927: 78059, 5928: 78104, 5929: 78142, 5930: 78078, 5931: 77995, 5932: 77907, 5933: 78072, 5934: 78168, 5935: 78236, 5936: 78012, 5937: 78355, 5938: 77986, 5939: 78476, 5940: 78132, 5941: 78207, 5942: 78246, 5943: 78323, 5944: 78265, 5945: 78367, 5946: 78469, 5947: 78159, 5948: 78384, 5949: 78017, 5950: 78153, 5951: 78603, 5952: 78445, 5953: 78401, 5954: 78400, 5955: 78868, 5956: 78486, 5957: 78276, 5958: 78322, 5959: 78436, 5960: 78180, 5961: 78662, 5962: 78639, 5963: 78442, 5964: 78286, 5965: 78575, 5966: 78481, 5967: 78655, 5968: 78459, 5969: 78650, 5970: 78665, 5971: 78493, 5972: 78554, 5973: 78699, 5974: 78726, 5975: 78747, 5976: 78685, 5977: 0, 5979: 78989, 5980: 78914, 5981: 78542, 5982: 78592, 5983: 78649, 5984: 78820, 5985: 78821, 5986: 78527, 5987: 78918, 5988: 78877, 5989: 78849, 5990: 78870, 5991: 78970, 5992: 78840, 5993: 78933, 5994: 79153, 5995: 78632, 5996: 78955, 5997: 78990, 5998: 79031, 5999: 79080, 6000: 79081, 6001: 79050, 6002: 79005, 6003: 79098, 6004: 79007, 6005: 78985, 6006: 79173, 6007: 79199, 6008: 79043, 6009: 79045, 6010: 79072, 6011: 79120, 6012: 79203, 6013: 79102, 6014: 79137, 6015: 79320, 6016: 79195, 6017: 79302, 6018: 79119, 6019: 79497, 6020: 80047, 6021: 80057, 6022: 79490, 6023: 79101, 6024: 79509, 6025: 78893, 6027: 79374, 6028: 79404, 6029: 79399, 6030: 79664, 6031: 79375, 6032: 79337, 6033: 79387, 6034: 78661, 6035: 79332, 6036: 79125, 6037: 79797, 6038: 79164, 6039: 79349, 6040: 79689, 6041: 79463, 6042: 79530, 6043: 79350, 6044: 79596, 6045: 79653, 6046: 79358, 6047: 79488, 6048: 79540, 6049: 79661, 6050: 79357, 6051: 79599, 6052: 79441, 6053: 79605, 6054: 79622, 6055: 79754, 6056: 79593, 6057: 79581, 6058: 79790, 6059: 79812, 6060: 79672, 6061: 79692, 6062: 79932, 6063: 79607, 6065: 79666, 6066: 79785, 6067: 79781, 6068: 79686, 6069: 79414, 6070: 79881, 6071: 79963, 6072: 80000, 6073: 80054, 6074: 79757, 6075: 79882, 6076: 79945, 6077: 79980, 6078: 79938, 6079: 79280, 6080: 80066, 6081: 80079, 6082: 79420, 6083: 80208, 6084: 80112, 6085: 80212, 6086: 79804, 6087: 80021, 6088: 79601, 6089: 80455, 6090: 79953, 6091: 80008, 6092: 79992, 6093: 80179, 6094: 80337, 6095: 80170, 6096: 80227, 6097: 80324, 6098: 80686, 6099: 80421, 6100: 80390, 6101: 79867, 6102: 81065, 6103: 80181, 6104: 80343, 6105: 80399, 6107: 80197, 6108: 80214, 6109: 80645, 6110: 80247, 6111: 80351, 6112: 80473, 6114: 80675, 6115: 80582, 6116: 79822, 6117: 80463, 6118: 80569, 6119: 80488, 6120: 80788, 6121: 80514, 6122: 80672, 6123: 80460, 6124: 80558, 6125: 80874, 6126: 80161, 6127: 80375, 6128: 80620, 6129: 80628, 6130: 80309, 6131: 80782, 6132: 80331, 6133: 84461, 6134: 80763, 6135: 81141, 6136: 80693, 6137: 80719, 6138: 82076, 6139: 83255, 6140: 80793, 6141: 80815, 6142: 80945, 6143: 80911, 6144: 80840, 6145: 80910, 6146: 80704, 6147: 80894, 6148: 80816, 6149: 80883, 6150: 80710, 6151: 81252, 6152: 80843, 6153: 80975, 6154: 80898, 6155: 81122, 6156: 80809, 6157: 80888, 6158: 81007, 6159: 81008, 6160: 81198, 6161: 80650, 6162: 80953, 6163: 81852, 6164: 81305, 6165: 81266, 6166: 81304, 6167: 81507, 6168: 81126, 6169: 81231, 6170: 80991, 6171: 81300, 6172: 81710, 6173: 80480, 6174: 81472, 6175: 81377, 6176: 81337, 6177: 81657, 6178: 81523, 6179: 81440, 6180: 80920, 6181: 81425, 6182: 81873, 6183: 81289, 6184: 81290, 6185: 81292, 6187: 81702, 6188: 81733, 6189: 81580, 6190: 81632, 6191: 80850, 6192: 81741, 6193: 81728, 6194: 81634, 6195: 81641, 6196: 81724, 6197: 81847, 6198: 81358, 6199: 81437, 6200: 81497, 6201: 81687, 6202: 81754, 6203: 81659, 6204: 82129, 6205: 81734, 6206: 81903, 6207: 81966, 6208: 81670, 6209: 81914, 6210: 81904, 6211: 81891, 6212: 81693, 6213: 81729, 6214: 81972, 6215: 82110, 6216: 81939, 6217: 82273, 6218: 81992, 6219: 82171, 6220: 81833, 6221: 82135, 6222: 81911, 6223: 81660, 6224: 82037, 6225: 82140, 6226: 81840, 6227: 82028, 6228: 82073, 6229: 82363, 6230: 82012, 6231: 82539, 6232: 82162, 6233: 82517, 6234: 82216, 6235: 82259, 6236: 82418, 6237: 82020, 6238: 81428, 6239: 82241, 6240: 82339, 6241: 82396, 6242: 82172, 6243: 82369, 6244: 82453, 6245: 82493, 6246: 82350, 6247: 82514, 6248: 82405, 6249: 82543, 6250: 82402, 6251: 82672, 6252: 82545, 6253: 82806, 6254: 82321, 6255: 82480, 6256: 82355, 6257: 82650, 6258: 82422, 6259: 82426, 6260: 82676, 6261: 82669, 6262: 82671, 6263: 0, 6264: 82419, 6265: 82706, 6266: 82716, 6267: 81854, 6268: 82526, 6269: 82621, 6270: 82504, 6271: 82729, 6272: 82775, 6273: 82731, 6274: 82868, 6275: 82902, 6276: 83150, 6277: 82693, 6278: 82737, 6279: 82587, 6280: 82730, 6281: 82673, 6282: 82855, 6283: 82911, 6284: 82861, 6285: 83081, 6286: 82611, 6287: 82764, 6288: 82960, 6289: 83057, 6290: 82798, 6291: 82925, 6292: 82780, 6293: 82802, 6294: 82951, 6295: 83153, 6296: 82979, 6297: 83187, 6298: 83100, 6299: 83000, 6300: 83216, 6301: 82989, 6302: 83090, 6303: 83230, 6304: 83323, 6305: 82987, 6306: 82867, 6307: 83007, 6308: 83176, 6310: 83196, 6311: 83235, 6312: 83321, 6313: 83013, 6314: 83431, 6315: 82860, 6316: 83336, 6317: 83223, 6318: 83262, 6319: 82898, 6320: 83535, 6321: 83331, 6322: 82080, 6323: 83481, 6324: 83207, 6325: 83254, 6326: 83308, 6327: 83491, 6328: 83274, 6329: 83342, 6330: 83138, 6331: 83594, 6332: 83313, 6333: 83367, 6334: 83574, 6335: 82880, 6336: 83365, 6337: 83430, 6338: 83650, 6339: 83435, 6340: 83567, 6341: 83478, 6342: 83504, 6343: 83493, 6344: 83693, 6345: 83114, 6346: 83462, 6347: 83706, 6348: 83289, 6349: 83601, 6350: 83684, 6351: 83494, 6352: 83565, 6353: 83635, 6354: 83740, 6355: 83613, 6356: 83984, 6357: 84158, 6358: 83677, 6359: 83688, 6360: 83359, 6361: 83738, 6362: 83593, 6363: 83575, 6364: 83692, 6365: 83854, 6366: 83896, 6367: 83853, 6368: 84248, 6369: 83608, 6371: 84033, 6372: 83906, 6373: 84510, 6374: 84105, 6375: 83962, 6376: 83816, 6377: 83838, 6378: 84012, 6379: 83317, 6380: 84143, 6381: 84150, 6382: 84151, 6383: 83857, 6384: 84311, 6385: 84036, 6386: 84147, 6387: 84175, 6388: 83947, 6389: 84226, 6390: 84113, 6391: 84054, 6392: 84332, 6393: 84177, 6394: 84217, 6395: 84021, 6396: 83895, 6397: 84401, 6398: 84425, 6399: 84108, 6400: 84827, 6401: 84405, 6403: 84445, 6404: 84402, 6405: 84489, 6406: 84345, 6408: 84731, 6409: 84551, 6410: 84379, 6411: 84979, 6412: 84479, 6413: 84524, 6414: 84500, 6415: 84514, 6416: 84720, 6417: 84969, 6418: 84380, 6419: 84431, 6420: 84690, 6421: 84183, 6422: 84650, 6423: 84759, 6424: 84626, 6425: 84625, 6426: 84709, 6427: 84748, 6428: 84649, 6429: 85760, 6430: 84599, 6431: 84573, 6432: 84631, 6433: 84671, 6434: 84704, 6435: 84792, 6436: 84606, 6437: 84530, 6438: 85049, 6439: 84801, 6440: 85147, 6441: 84856, 6442: 85068, 6443: 84691, 6444: 84656, 6445: 84893, 6446: 84880, 6447: 85169, 6448: 84496, 6449: 84883, 6450: 85020, 6451: 85079, 6452: 84833, 6453: 84970, 6454: 85019, 6455: 84821, 6456: 85048, 6457: 84887, 6458: 84862, 6459: 85084, 6460: 85162, 6461: 85258, 6462: 85267, 6463: 84938, 6464: 84835, 6465: 85042, 6466: 84934, 6467: 84855, 6468: 85312, 6469: 84949, 6470: 85237, 6471: 85480, 6472: 85207, 6473: 85195, 6474: 85242, 6475: 85393, 6476: 85139, 6477: 85389, 6478: 85409, 6479: 84950, 6480: 85157, 6481: 85185, 6482: 85187, 6483: 85470, 6484: 85112, 6486: 85340, 6487: 85520, 6488: 85149, 6489: 85307, 6490: 85391, 6491: 85181, 6492: 85423, 6493: 85365, 6494: 85442, 6495: 85302, 6496: 85397, 6497: 85333, 6498: 85355, 6499: 85313, 6500: 85727, 6501: 85543, 6502: 85385, 6503: 85589, 6504: 85474, 6505: 85751, 6506: 85382, 6507: 85537, 6508: 85696, 6509: 85379, 6510: 85792, 6511: 85290, 6512: 85622, 6513: 85788, 6514: 85317, 6516: 85667, 6517: 85786, 6518: 85235, 6519: 85755, 6520: 85783, 6521: 85666, 6522: 85839, 6523: 85889, 6524: 85749, 6525: 86088, 6526: 85693, 6527: 85927, 6528: 85715, 6529: 84769, 6530: 86064, 6531: 85688, 6532: 85826, 6533: 85790, 6534: 85922, 6535: 86011, 6536: 85670, 6537: 86092, 6538: 85810, 6539: 86098, 6540: 85692, 6541: 85912, 6542: 85930, 6543: 85934, 6544: 86019, 6545: 86060, 6546: 86170, 6547: 86248, 6548: 85998, 6549: 86305, 6550: 85888, 6551: 85987, 6552: 88274, 6553: 86228, 6554: 85819, 6555: 85829, 6556: 86032, 6557: 86246, 6558: 86311, 6559: 86118, 6560: 85923, 6561: 86263, 6562: 86266, 6563: 86096, 6564: 86130, 6565: 86815, 6566: 85805, 6567: 86284, 6568: 86313, 6569: 86486, 6570: 86178, 6571: 86254, 6572: 86552, 6573: 86036, 6574: 86182, 6575: 86391, 6576: 86628, 6577: 86373, 6578: 86476, 6579: 86362, 6580: 86670, 6581: 86565, 6582: 86929, 6583: 86698, 6584: 86462, 6585: 86796, 6586: 86871, 6587: 86716, 6588: 86414, 6589: 86546, 6590: 86575, 6591: 86506, 6592: 86537, 6593: 86725, 6594: 86623, 6595: 86736, 6596: 86201, 6597: 86847, 6598: 86184, 6599: 86501, 6600: 86769, 6601: 86768, 6602: 86667, 6603: 86742, 6604: 86732, 6605: 86499, 6606: 86219, 6607: 86561, 6608: 86731, 6609: 86831, 6610: 86835, 6611: 86809, 6612: 86713, 6613: 87042, 6614: 87174, 6615: 87073, 6616: 87072, 6617: 87099, 6618: 86782, 6619: 86925, 6620: 87074, 6621: 87163, 6622: 87314, 6623: 86974, 6624: 87393, 6625: 86939, 6626: 86946, 6627: 87044, 6628: 87220, 6629: 87108, 6630: 87261, 6631: 87294, 6632: 87379, 6633: 87150, 6634: 87564, 6635: 87926, 6636: 86614, 6637: 86620, 6638: 87158, 6639: 87224, 6640: 87404, 6641: 87045, 6642: 87192, 6643: 87390, 6644: 87194, 6645: 87380, 6646: 88599, 6647: 87460, 6648: 87472, 6649: 87523, 6650: 87335, 6651: 87516, 6652: 87529, 6653: 87532, 6654: 87308, 6655: 87341, 6656: 87212, 6657: 87567, 6658: 87569, 6659: 87428, 6660: 0, 6661: 87495, 6662: 87616, 6663: 87624, 6664: 87280, 6665: 87427, 6666: 87540, 6667: 87491, 6668: 87671, 6669: 87382, 6670: 87558, 6671: 87722, 6672: 87706, 6673: 87445, 6674: 87434, 6675: 87846, 6676: 87655, 6677: 87563, 6678: 87865, 6679: 87782, 6680: 87836, 6681: 87813, 6682: 87936, 6683: 87948, 6684: 87812, 6685: 87747, 6686: 87847, 6687: 87777, 6688: 87585, 6689: 87875, 6690: 87866, 6691: 88038, 6692: 88012, 6693: 88060, 6695: 87808, 6696: 87910, 6697: 87895, 6698: 88048, 6699: 87744, 6700: 88116, 6701: 87234, 6702: 87850, 6703: 87933, 6704: 88125, 6705: 87833, 6706: 88101, 6707: 87998, 6708: 88294, 6709: 88148, 6710: 88175, 6711: 88020, 6712: 88149, 6713: 88128, 6714: 88192, 6715: 88258, 6716: 88298, 6717: 87293, 6718: 88030, 6719: 88213, 6720: 88172, 6721: 92824, 6722: 88217, 6723: 88290, 6724: 88380, 6725: 87728, 6726: 88190, 6727: 88396, 6728: 88122, 6729: 88267, 6731: 89115, 6732: 88374, 6733: 88404, 6735: 87670, 6736: 88469, 6737: 88277, 6738: 88331, 6739: 88550, 6740: 88815, 6741: 88346, 6742: 88567, 6743: 88714, 6744: 88429, 6745: 88866, 6746: 88635, 6747: 88522, 6748: 88694, 6749: 88726, 6751: 89234, 6752: 88601, 6753: 88415, 6754: 88528, 6755: 88670, 6756: 88684, 6757: 88671, 6758: 88627, 6759: 88859, 6760: 89006, 6761: 89042, 6762: 88760, 6763: 88604, 6764: 88533, 6765: 88657, 6766: 88839, 6767: 88565, 6768: 88636, 6769: 88816, 6770: 88765, 6771: 88771, 6772: 88947, 6773: 88905, 6774: 89382, 6775: 88745, 6776: 88814, 6777: 89010, 6778: 89096, 6779: 88794, 6780: 89020, 6781: 88818, 6782: 88817, 6783: 89112, 6784: 88862, 6785: 88981, 6786: 89099, 6787: 88886, 6788: 89086, 6789: 85822, 6790: 88732, 6791: 88788, 6792: 88754, 6793: 88836, 6794: 88899, 6795: 88964, 6796: 89370, 6797: 89000, 6798: 89114, 6799: 88929, 6800: 89065, 6801: 89153, 6802: 89178, 6803: 89023, 6804: 89290, 6805: 89487, 6806: 88972, 6807: 89008, 6808: 89674, 6809: 88127, 6810: 88136, 6811: 85699, 6812: 89341, 6813: 89288, 6814: 89156, 6815: 89172, 6816: 89369, 6817: 89047, 6818: 89507, 6819: 89605, 6820: 89298, 6821: 89597, 6822: 89439, 6823: 89440, 6824: 89246, 6825: 89470, 6826: 89279, 6827: 89104, 6828: 89805, 6829: 90133, 6830: 89512, 6831: 89408, 6832: 89642, 6833: 89637, 6834: 89527, 6835: 89622, 6836: 89620, 6837: 90606, 6838: 89609, 6839: 89726, 6840: 89587, 6841: 89630, 6842: 89678, 6843: 89623, 6844: 89601, 6845: 89482, 6846: 89731, 6847: 89474, 6848: 0, 6849: 89401, 6850: 89348, 6851: 89677, 6852: 89684, 6853: 89604, 6854: 89683, 6855: 90098, 6856: 89920, 6857: 89772, 6858: 89851, 6859: 89931, 6860: 89773, 6861: 89980, 6862: 90037, 6863: 89968, 6864: 90012, 6865: 89448, 6866: 89918, 6867: 89827, 6868: 89861, 6869: 89962, 6870: 90074, 6871: 90304, 6872: 89826, 6873: 89977, 6874: 90124, 6875: 90200, 6876: 89925, 6877: 89935, 6878: 90083, 6879: 90185, 6880: 89835, 6881: 90096, 6882: 90023, 6883: 90052, 6884: 90135, 6885: 90067, 6886: 89943, 6887: 90086, 6888: 90260, 6889: 90290, 6890: 90174, 6891: 89981, 6892: 90238, 6893: 90336, 6894: 90414, 6895: 90139, 6896: 90289, 6897: 90422, 6898: 90253, 6899: 90930, 6900: 90271, 6901: 90163, 6902: 90313, 6903: 90191, 6904: 90256, 6905: 90568, 6906: 90337, 6907: 90485, 6908: 90664, 6909: 90478, 6910: 90541, 6911: 90146, 6912: 91723, 6913: 90496, 6914: 90510, 6915: 90597, 6916: 90797, 6917: 90342, 6918: 90441, 6919: 90494, 6920: 89908, 6921: 90604, 6922: 90662, 6923: 90156, 6924: 90398, 6925: 90487, 6926: 90576, 6927: 89937, 6928: 90497, 6929: 90610, 6930: 90595, 6931: 90759, 6932: 90651, 6933: 90687, 6934: 90830, 6935: 90642, 6936: 90763, 6937: 90842, 6938: 90853, 6939: 90981, 6940: 90692, 6941: 90676, 6942: 90887, 6943: 90637, 6944: 90806, 6945: 90344, 6946: 90804, 6947: 90836, 6948: 90936, 6949: 90476, 6950: 90729, 6951: 90982, 6952: 90968, 6953: 90969, 6954: 91062, 6955: 90762, 6956: 90884, 6957: 90844, 6958: 90858, 6959: 90913, 6960: 91014, 6961: 91004, 6962: 90991, 6963: 90967, 6964: 92586, 6965: 91066, 6966: 90915, 6967: 90971, 6968: 90923, 6969: 91132, 6970: 91105, 6971: 90970, 6972: 91172, 6973: 91117, 6974: 90865, 6975: 91041, 6976: 91090, 6977: 91118, 6978: 90905, 6979: 90780, 6980: 91139, 6981: 91159, 6982: 91792, 6983: 91013, 6984: 91119, 6985: 91217, 6986: 91461, 6987: 91237, 6988: 91347, 6989: 91369, 6990: 91405, 6991: 91494, 6992: 91286, 6993: 91322, 6994: 92233, 6995: 91279, 6996: 91733, 6997: 91235, 6998: 91438, 6999: 91394, 7000: 91384, 7001: 91262, 7002: 91389, 7003: 91250, 7004: 91854, 7005: 91662, 7006: 90647, 7007: 91532, 7008: 91499, 7009: 91373, 7010: 91523, 7011: 91689, 7012: 92024, 7013: 91196, 7014: 91677, 7015: 92008, 7016: 91533, 7017: 91491, 7018: 91315, 7019: 91552, 7020: 91726, 7021: 91875, 7022: 92021, 7023: 91781, 7024: 91751, 7025: 90182, 7026: 91901, 7027: 92394, 7028: 91525, 7029: 91918, 7030: 91675, 7031: 91989, 7032: 91845, 7033: 91707, 7034: 91880, 7035: 91974, 7036: 92294, 7037: 92157, 7038: 92016, 7039: 92041, 7040: 91975, 7041: 91820, 7042: 91606, 7043: 91852, 7044: 91883, 7045: 92079, 7046: 92111, 7047: 91958, 7048: 92027, 7049: 91755, 7050: 92226, 7051: 91919, 7053: 91926, 7055: 92136, 7056: 91971, 7057: 91973, 7058: 92036, 7059: 92117, 7060: 91843, 7061: 92043, 7062: 92308, 7063: 92175, 7064: 92088, 7065: 92367, 7066: 92202, 7067: 92131, 7068: 92382, 7069: 92161, 7070: 92350, 7071: 91985, 7072: 92301, 7073: 92098, 7074: 92609, 7075: 91915, 7076: 92254, 7077: 92384, 7078: 92390, 7079: 92270, 7080: 92156, 7081: 92243, 7082: 91811, 7083: 92391, 7084: 92133, 7085: 92386, 7086: 92312, 7087: 92646, 7088: 92480, 7089: 92442, 7090: 92219, 7091: 92346, 7092: 92630, 7093: 92687, 7094: 92488, 7095: 92676, 7096: 92269, 7097: 92669, 7098: 92396, 7099: 92475, 7100: 92398, 7101: 92524, 7102: 92405, 7103: 92635, 7104: 92643, 7105: 92649, 7106: 92420, 7107: 93015, 7108: 92799, 7109: 92593, 7110: 92674, 7111: 93012, 7112: 92550, 7113: 92614, 7114: 92747, 7115: 92551, 7116: 92761, 7117: 92056, 7118: 92599, 7119: 92814, 7120: 92845, 7121: 92855, 7122: 92953, 7123: 92549, 7124: 92112, 7125: 92512, 7126: 92882, 7127: 93163, 7128: 92931, 7129: 92989, 7130: 93287, 7131: 92728, 7132: 92768, 7133: 92818, 7134: 93148, 7135: 92872, 7136: 93074, 7137: 92689, 7138: 92771, 7139: 92791, 7140: 92833, 7141: 92946, 7142: 92951, 7143: 92963, 7144: 92968, 7145: 93057, 7146: 92831, 7147: 92934, 7148: 92937, 7149: 93026, 7150: 93085, 7151: 93134, 7152: 93174, 7153: 92731, 7154: 92822, 7155: 93132, 7156: 93209, 7157: 92862, 7158: 93051, 7159: 93140, 7160: 92040, 7161: 93574, 7162: 93017, 7163: 93138, 7164: 93234, 7165: 93124, 7166: 93225, 7167: 93179, 7168: 93315, 7169: 93368, 7170: 93371, 7171: 93175, 7172: 93203, 7173: 93218, 7174: 93104, 7175: 92997, 7176: 93244, 7177: 93470, 7178: 93194, 7179: 93177, 7180: 92782, 7181: 93256, 7182: 93423, 7183: 93270, 7184: 93068, 7185: 93210, 7186: 93418, 7187: 92969, 7188: 93542, 7190: 93624, 7191: 93053, 7192: 93279, 7193: 93429, 7194: 93506, 7195: 93498, 7196: 93197, 7197: 93552, 7198: 93374, 7199: 92717, 7200: 93404, 7201: 93309, 7202: 93393, 7203: 93537, 7204: 93354, 7205: 93543, 7206: 93419, 7207: 93443, 7208: 93488, 7209: 93526, 7210: 93299, 7211: 93667, 7212: 93437, 7213: 93815, 7214: 93580, 7215: 93408, 7216: 93523, 7217: 93683, 7218: 93340, 7219: 93647, 7220: 93666, 7221: 94150, 7222: 93603, 7223: 93862, 7224: 93187, 7225: 93717, 7226: 93825, 7228: 104382, 7229: 93466, 7230: 93763, 7231: 93743, 7232: 93858, 7233: 94054, 7234: 93864, 7235: 93747, 7236: 93805, 7237: 93718, 7238: 93720, 7239: 93855, 7240: 93925, 7241: 93887, 7242: 94005, 7243: 93820, 7244: 93770, 7245: 93892, 7246: 93993, 7247: 93097, 7248: 93867, 7249: 93996, 7250: 93845, 7251: 93713, 7252: 93733, 7253: 93843, 7254: 94114, 7255: 94130, 7256: 94124, 7257: 94157, 7258: 93808, 7259: 94160, 7260: 93966, 7261: 93917, 7262: 93903, 7263: 93975, 7264: 94141, 7265: 94144, 7266: 94068, 7267: 94034, 7268: 94243, 7269: 94149, 7270: 94272, 7271: 94398, 7272: 94076, 7273: 94344, 7274: 94724, 7275: 94013, 7276: 94372, 7277: 94434, 7278: 94789, 7279: 94385, 7280: 94290, 7281: 94556, 7282: 94437, 7283: 94311, 7284: 94280, 7285: 94377, 7286: 94382, 7287: 94477, 7288: 94478, 7289: 94712, 7290: 94140, 7291: 94645, 7292: 94643, 7293: 94336, 7295: 94302, 7296: 94730, 7297: 94858, 7298: 94481, 7299: 94598, 7300: 94624, 7301: 94620, 7302: 94630, 7303: 94727, 7304: 94820, 7305: 94679, 7306: 94703, 7307: 94720, 7308: 94685, 7309: 94490, 7310: 94376, 7311: 94623, 7312: 94083, 7313: 94833, 7314: 94713, 7315: 94834, 7316: 94986, 7317: 94929, 7318: 94827, 7319: 94885, 7320: 95369, 7321: 94913, 7322: 94755, 7323: 95054, 7324: 94852, 7325: 94916, 7326: 94910, 7327: 95077, 7328: 94779, 7329: 95261, 7330: 95149, 7331: 94982, 7332: 95002, 7333: 95066, 7334: 95211, 7335: 94934, 7336: 95073, 7337: 95241, 7338: 94932, 7339: 95159, 7340: 95168, 7341: 94890, 7342: 95176, 7343: 95294, 7344: 95188, 7345: 94981, 7346: 95067, 7347: 95219, 7348: 95347, 7349: 95222, 7350: 95396, 7351: 94974, 7352: 94648, 7353: 95281, 7354: 95253, 7355: 95408, 7356: 95038, 7357: 95287, 7358: 95260, 7359: 95235, 7360: 95456, 7361: 94993, 7362: 95477, 7363: 95503, 7364: 95340, 7365: 95143, 7366: 95453, 7367: 95485, 7368: 95319, 7369: 95398, 7370: 95690, 7371: 95081, 7372: 95372, 7373: 95447, 7374: 95400, 7375: 95564, 7376: 95370, 7377: 95501, 7378: 95557, 7379: 95574, 7380: 95619, 7381: 95306, 7382: 95352, 7383: 95999, 7384: 95487, 7385: 95498, 7386: 95492, 7387: 95585, 7388: 95866, 7389: 95572, 7390: 95560, 7391: 95582, 7392: 95823, 7393: 95932, 7394: 84535, 7395: 95556, 7396: 95664, 7397: 95732, 7398: 95865, 7399: 95905, 7400: 95793, 7401: 95520, 7402: 95820, 7403: 95673, 7404: 95812, 7405: 95771, 7406: 95785, 7407: 95822, 7408: 95656, 7409: 95818, 7410: 95965, 7411: 96141, 7412: 95898, 7413: 95576, 7414: 95937, 7415: 95929, 7416: 96178, 7417: 95947, 7418: 95951, 7419: 95953, 7420: 95853, 7421: 96016, 7422: 96234, 7423: 95167, 7424: 96341, 7425: 94604, 7426: 96052, 7427: 96014, 7428: 96003, 7429: 96229, 7430: 96327, 7431: 96406, 7432: 96356, 7433: 96365, 7434: 96607, 7435: 96734, 7436: 96195, 7437: 96275, 7438: 96351, 7439: 96440, 7440: 96465, 7441: 96302, 7442: 96198, 7443: 96496, 7444: 96288, 7445: 96416, 7446: 96483, 7447: 96468, 7448: 96164, 7449: 96428, 7450: 95978, 7451: 96258, 7452: 96417, 7453: 96286, 7454: 96536, 7455: 96882, 7456: 96481, 7457: 96387, 7458: 96458, 7459: 96781, 7460: 96556, 7461: 96721, 7462: 96100, 7463: 96516, 7464: 96739, 7465: 96396, 7466: 96503, 7467: 96491, 7468: 96459, 7469: 96441, 7470: 96729, 7471: 96630, 7472: 96601, 7473: 96760, 7474: 96665, 7475: 96688, 7476: 96808, 7477: 96572, 7478: 96683, 7479: 96757, 7480: 96807, 7481: 96724, 7482: 96789, 7483: 96693, 7484: 96620, 7485: 96801, 7486: 96840, 7487: 96706, 7488: 96837, 7489: 96950, 7490: 96856, 7491: 97067, 7492: 96805, 7493: 96931, 7494: 98086, 7495: 96825, 7496: 97063, 7497: 96957, 7498: 97534, 7499: 96907, 7500: 96773, 7501: 96988, 7502: 96977, 7503: 96895, 7504: 96901, 7505: 97028, 7506: 97077, 7507: 97260, 7508: 97091, 7509: 96919, 7510: 97421, 7511: 97139, 7512: 97087, 7513: 97569, 7514: 97081, 7515: 97290, 7516: 97244, 7517: 97118, 7518: 97150, 7519: 97229, 7520: 97142, 7521: 97491, 7522: 97033, 7523: 97151, 7524: 97674, 7525: 97278, 7526: 97070, 7527: 97611, 7528: 97165, 7529: 97228, 7530: 97242, 7531: 97646, 7532: 97423, 7533: 97319, 7534: 97295, 7535: 97307, 7536: 97365, 7537: 97598, 7538: 97515, 7540: 97402, 7541: 97499, 7542: 97454, 7543: 97376, 7544: 97473, 7545: 97122, 7546: 97496, 7547: 97372, 7548: 97816, 7549: 97819, 7550: 97477, 7551: 97485, 7552: 97749, 7553: 97650, 7554: 97607, 7555: 97538, 7556: 97572, 7557: 97649, 7558: 97971, 7559: 97687, 7560: 97675, 7561: 97783, 7562: 97697, 7563: 97326, 7564: 97629, 7565: 97679, 7566: 97630, 7567: 97634, 7568: 97651, 7569: 97767, 7570: 97804, 7571: 97849, 7572: 97787, 7573: 97765, 7574: 97796, 7575: 97871, 7576: 97635, 7577: 97700, 7578: 97944, 7579: 98332, 7580: 97877, 7581: 98032, 7582: 97433, 7583: 97789, 7584: 97928, 7585: 98012, 7586: 98163, 7587: 98174, 7588: 98346, 7589: 97757, 7590: 98495, 7591: 97774, 7592: 97886, 7593: 97966, 7594: 97967, 7595: 97938, 7596: 97980, 7597: 98066, 7598: 97970, 7599: 98038, 7600: 97845, 7601: 97961, 7602: 98036, 7603: 98478, 7604: 98162, 7605: 98226, 7606: 97985, 7607: 98017, 7608: 97870, 7609: 98085, 7610: 98103, 7611: 97892, 7612: 98624, 7613: 98068, 7614: 98258, 7615: 98110, 7616: 98169, 7617: 98351, 7618: 98353, 7619: 98055, 7620: 98143, 7621: 98482, 7622: 98234, 7623: 98412, 7624: 98421, 7625: 98608, 7626: 98044, 7627: 98485, 7628: 98194, 7629: 98461, 7630: 98512, 7631: 98470, 7632: 98146, 7633: 98073, 7634: 98111, 7635: 98337, 7636: 98385, 7637: 98416, 7638: 98253, 7639: 98579, 7640: 98325, 7641: 98375, 7642: 98320, 7643: 98575, 7644: 98959, 7645: 98438, 7646: 98383, 7647: 98425, 7648: 98526, 7649: 98633, 7650: 98688, 7651: 98379, 7652: 98761, 7653: 98543, 7654: 98308, 7655: 98563, 7656: 98609, 7657: 98636, 7658: 98785, 7659: 98842, 7660: 98571, 7661: 98809, 7662: 98738, 7663: 99200, 7664: 98754, 7665: 99240, 7666: 98333, 7667: 98844, 7668: 98960, 7669: 98823, 7670: 98767, 7671: 98910, 7672: 98819, 7673: 99120, 7674: 99137, 7675: 98953, 7676: 98583, 7677: 98897, 7678: 98863, 7679: 98920, 7680: 98954, 7681: 99024, 7682: 98658, 7683: 98921, 7684: 98858, 7685: 98702, 7686: 98401, 7687: 98915, 7688: 99080, 7689: 99031, 7690: 99171, 7691: 99453, 7692: 98946, 7693: 99158, 7694: 99221, 7695: 98872, 7696: 99176, 7697: 99026, 7698: 100697, 7699: 99145, 7700: 99234, 7701: 98962, 7702: 99102, 7703: 99461, 7704: 98890, 7705: 99352, 7706: 99570, 7707: 99762, 7708: 99303, 7709: 99457, 7710: 99473, 7711: 99404, 7712: 99529, 7713: 99445, 7714: 99747, 7715: 99572, 7716: 99479, 7717: 99585, 7718: 99518, 7719: 99531, 7720: 99631, 7721: 99539, 7722: 99825, 7723: 99679, 7724: 99742, 7725: 99878, 7726: 99579, 7727: 99500, 7728: 99920, 7729: 99926, 7730: 99639, 7731: 99738, 7732: 100165, 7733: 99685, 7734: 99719, 7735: 99675, 7736: 99770, 7737: 99749, 7738: 99918, 7739: 99824, 7740: 99655, 7741: 99853, 7742: 99663, 7743: 99841, 7744: 99874, 7745: 100151, 7746: 99913, 7747: 100027, 7748: 100062, 7749: 100184, 7750: 99255, 7751: 99848, 7752: 99893, 7753: 99951, 7754: 100064, 7755: 99870, 7756: 99889, 7757: 99929, 7758: 100300, 7759: 99968, 7760: 100018, 7761: 100195, 7762: 100016, 7763: 100044, 7764: 100288, 7765: 100332, 7766: 100412, 7767: 100069, 7768: 100232, 7769: 100108, 7770: 100122, 7771: 100208, 7772: 100283, 7773: 100310, 7774: 100256, 7775: 100325, 7776: 100345, 7777: 100142, 7778: 100274, 7779: 100469, 7780: 100276, 7781: 100097, 7782: 100239, 7783: 100017, 7784: 100268, 7785: 101427, 7786: 100250, 7787: 100591, 7788: 100524, 7789: 100435, 7790: 100751, 7791: 100295, 7792: 100221, 7793: 100511, 7794: 100541, 7795: 100434, 7796: 100453, 7797: 100486, 7798: 100437, 7799: 100764, 7800: 100501, 7801: 100738, 7802: 100515, 7803: 100664, 7804: 100261, 7805: 100357, 7806: 100587, 7807: 100574, 7808: 100852, 7809: 100758, 7810: 100762, 7811: 100754, 7812: 101843, 7813: 100779, 7814: 100881, 7815: 100651, 7816: 100807, 7817: 101017, 7818: 100714, 7819: 101011, 7820: 100953, 7821: 100977, 7822: 101027, 7823: 100866, 7824: 100969, 7825: 101090, 7826: 100907, 7827: 100808, 7828: 100859, 7829: 101120, 7830: 101123, 7831: 101101, 7832: 101211, 7833: 101070, 7834: 101076, 7835: 101067, 7836: 101160, 7837: 101221, 7838: 101626, 7839: 101213, 7840: 101235, 7841: 101133, 7842: 101384, 7843: 101084, 7844: 101138, 7845: 101345, 7846: 101477, 7847: 101214, 7848: 101612, 7849: 101300, 7850: 101093, 7851: 101243, 7852: 101421, 7853: 101558, 7854: 101245, 7855: 101507, 7856: 101552, 7857: 101473, 7858: 101483, 7859: 101773, 7860: 101285, 7861: 101383, 7862: 101505, 7863: 102162, 7864: 102125, 7865: 101608, 7866: 101474, 7867: 101467, 7868: 101134, 7869: 101772, 7870: 101475, 7871: 101589, 7872: 101965, 7873: 101692, 7874: 101641, 7875: 101983, 7876: 101556, 7877: 101808, 7878: 101746, 7879: 101260, 7880: 101716, 7881: 102157, 7882: 101769, 7883: 101800, 7884: 101847, 7885: 101765, 7886: 101810, 7887: 101768, 7888: 101756, 7889: 101923, 7890: 101921, 7891: 101867, 7892: 101882, 7893: 102014, 7894: 101868, 7895: 101870, 7896: 101916, 7897: 101936, 7898: 101997, 7899: 101909, 7900: 101984, 7901: 100965, 7902: 102032, 7903: 101919, 7904: 101899, 7905: 102026, 7906: 101958, 7907: 101966, 7908: 101082, 7909: 102092, 7910: 102094, 7911: 101949, 7912: 101934, 7913: 102395, 7914: 102040, 7915: 102230, 7916: 101900, 7917: 102033, 7918: 102080, 7919: 101986, 7920: 102333, 7921: 102066, 7922: 102062, 7923: 102158, 7924: 102098, 7925: 102011, 7926: 102155, 7927: 102195, 7928: 102281, 7929: 102177, 7930: 101044, 7931: 102414, 7932: 102276, 7933: 102497, 7934: 102773, 7935: 102496, 7936: 102485, 7937: 102487, 7938: 102216, 7939: 102388, 7940: 102258, 7941: 102440, 7942: 102453, 7943: 102693, 7944: 102358, 7945: 102253, 7946: 102561, 7947: 102531, 7948: 102532, 7949: 102488, 7950: 102618, 7951: 102624, 7952: 102790, 7953: 102633, 7954: 102631, 7955: 102431, 7956: 102571, 7957: 102422, 7958: 102530, 7959: 102962, 7961: 102772, 7962: 102499, 7963: 102589, 7964: 102780, 7965: 102831, 7966: 102585, 7967: 102370, 7968: 102950, 7969: 102635, 7970: 102901, 7971: 102916, 7972: 102642, 7973: 102805, 7974: 102819, 7975: 102833, 7976: 102891, 7977: 102724, 7978: 102712, 7979: 102989, 7980: 102978, 7981: 102878, 7982: 102945, 7983: 102827, 7984: 102843, 7985: 103005, 7986: 103227, 7987: 103127, 7988: 102949, 7989: 103071, 7990: 103045, 7991: 103103, 7992: 103206, 7993: 102771, 7994: 103077, 7995: 103004, 7996: 102993, 7997: 103168, 7998: 103154, 7999: 103079, 8000: 103226, 8001: 103089, 8002: 102208, 8003: 103094, 8004: 103108, 8005: 103145, 8006: 103261, 8007: 103191, 8008: 103200, 8009: 103189, 8010: 103301, 8011: 103294, 8012: 103298, 8013: 103389, 8014: 103347, 8015: 103401, 8016: 102599, 8017: 103414, 8018: 103460, 8019: 103752, 8020: 103312, 8021: 104043, 8022: 103343, 8023: 103371, 8024: 103545, 8025: 103359, 8026: 103360, 8027: 103673, 8028: 103413, 8029: 103346, 8030: 103527, 8031: 103646, 8032: 103511, 8033: 103616, 8034: 103569, 8035: 103519, 8036: 103532, 8037: 103635, 8038: 103652, 8039: 103738, 8040: 103530, 8041: 103682, 8042: 103814, 8043: 103219, 8044: 103675, 8045: 103777, 8046: 103836, 8047: 103632, 8048: 103882, 8049: 103598, 8050: 103902, 8051: 103734, 8052: 104385, 8053: 103732, 8054: 103889, 8055: 104085, 8056: 103892, 8057: 103891, 8058: 103981, 8060: 104019, 8061: 104440, 8062: 103828, 8063: 103894, 8064: 103871, 8065: 103810, 8066: 104031, 8067: 104041, 8068: 104048, 8069: 104177, 8070: 104148, 8071: 103963, 8072: 103929, 8073: 104364, 8074: 103949, 8075: 104139, 8076: 104174, 8077: 104101, 8078: 103956, 8079: 104060, 8080: 104234, 8081: 104597, 8082: 104172, 8083: 104297, 8084: 104185, 8085: 104214, 8086: 104217, 8087: 104365, 8088: 104281, 8089: 104194, 8090: 104357, 8091: 104452, 8092: 104755, 8093: 104459, 8094: 104371, 8095: 104481, 8096: 104557, 8097: 104521, 8098: 104538, 8099: 104171, 8100: 104680, 8101: 104539, 8102: 104634, 8103: 104483, 8104: 104738, 8105: 104579, 8106: 104516, 8107: 104537, 8108: 104752, 8109: 104449, 8110: 104750, 8111: 105169, 8112: 104105, 8113: 104451, 8114: 104978, 8115: 104732, 8116: 104771, 8117: 104925, 8118: 104839, 8119: 104642, 8120: 104765, 8121: 104872, 8122: 104914, 8123: 104858, 8124: 104980, 8125: 105148, 8126: 104822, 8127: 104963, 8128: 104974, 8129: 106320, 8130: 104887, 8131: 104987, 8132: 105046, 8133: 104788, 8134: 105079, 8135: 105140, 8136: 104962, 8137: 105143, 8138: 105034, 8139: 105168, 8140: 105319, 8141: 105164, 8142: 105228, 8143: 105102, 8144: 105101, 8145: 105334, 8146: 105138, 8147: 105064, 8148: 105312, 8149: 105224, 8150: 105080, 8151: 105382, 8152: 105425, 8153: 105091, 8154: 105186, 8155: 105229, 8156: 105678, 8157: 105269, 8158: 105344, 8159: 105768, 8160: 105412, 8161: 105282, 8162: 105199, 8163: 105413, 8164: 105259, 8165: 105411, 8166: 105390, 8167: 105515, 8168: 104968, 8169: 105432, 8170: 105406, 8171: 105268, 8172: 105576, 8173: 105502, 8174: 104756, 8175: 105574, 8176: 106474, 8177: 105685, 8178: 105570, 8179: 105370, 8180: 105696, 8181: 105858, 8182: 105558, 8183: 105665, 8184: 105662, 8185: 105497, 8186: 105561, 8187: 105668, 8188: 105841, 8189: 105607, 8190: 105652, 8191: 105695, 8192: 105729, 8193: 105637, 8194: 105660, 8195: 105761, 8196: 106044, 8197: 105689, 8198: 105703, 8199: 105767, 8200: 105854, 8201: 106424, 8202: 105913, 8203: 105819, 8204: 105881, 8205: 105864, 8206: 105733, 8207: 105928, 8208: 105769, 8209: 105811, 8210: 105860, 8211: 106065, 8212: 106007, 8213: 106039, 8214: 106067, 8215: 105942, 8216: 105898, 8217: 105966, 8218: 105891, 8219: 106021, 8220: 106003, 8221: 106064, 8222: 106143, 8223: 106062, 8224: 105949, 8225: 106140, 8226: 106052, 8227: 105972, 8228: 106093, 8229: 106327, 8230: 106340, 8231: 106243, 8232: 106278, 8233: 106419, 8234: 106881, 8235: 106363, 8236: 106429, 8237: 106171, 8238: 106032, 8239: 105727, 8240: 106355, 8241: 106500, 8242: 106267, 8243: 106227, 8244: 106564, 8245: 106559, 8246: 106393, 8247: 106590, 8248: 106420, 8249: 106818, 8250: 106527, 8251: 106592, 8252: 106481, 8253: 106654, 8254: 107089, 8255: 106551, 8256: 106703, 8257: 106595, 8258: 106605, 8259: 106518, 8260: 106723, 8261: 106661, 8262: 106642, 8263: 106758, 8264: 106786, 8265: 106781, 8266: 106711, 8267: 106787, 8268: 106907, 8269: 106978, 8270: 106856, 8271: 107030, 8272: 106752, 8273: 106938, 8274: 106872, 8275: 106771, 8276: 106897, 8277: 106944, 8278: 106985, 8279: 106801, 8280: 107843, 8281: 106886, 8282: 107112, 8283: 107095, 8284: 106999, 8285: 107128, 8286: 107423, 8287: 107144, 8288: 107188, 8289: 107151, 8290: 107041, 8291: 107097, 8292: 107173, 8293: 107238, 8294: 112355, 8295: 107232, 8297: 107129, 8298: 107140, 8299: 107344, 8300: 107162, 8301: 107136, 8302: 107302, 8303: 107409, 8304: 107186, 8305: 107380, 8306: 107235, 8307: 107253, 8308: 107315, 8309: 107310, 8311: 107382, 8312: 107197, 8313: 107348, 8314: 107350, 8315: 107354, 8316: 107259, 8317: 107119, 8318: 107487, 8319: 107517, 8320: 107445, 8321: 107472, 8322: 107556, 8323: 107649, 8324: 107230, 8325: 107502, 8326: 107608, 8327: 107374, 8328: 107575, 8329: 107488, 8330: 107558, 8331: 107773, 8332: 107596, 8333: 107835, 8334: 107418, 8335: 107533, 8336: 107637, 8337: 107750, 8338: 107664, 8339: 107586, 8340: 107797, 8341: 107734, 8342: 107555, 8343: 107763, 8344: 107788, 8345: 107749, 8346: 107901, 8347: 107723, 8348: 107887, 8349: 107856, 8350: 107956, 8351: 108036, 8352: 108195, 8353: 108085, 8354: 107975, 8355: 108058, 8356: 108022, 8357: 107930, 8358: 108060, 8359: 108090, 8360: 108102, 8361: 107893, 8362: 108281, 8363: 108144, 8364: 108121, 8365: 108259, 8366: 108294, 8367: 108347, 8368: 108431, 8369: 108478, 8370: 108759, 8371: 108165, 8372: 108296, 8373: 108339, 8374: 108209, 8375: 108226, 8376: 108453, 8377: 108348, 8378: 108494, 8379: 108543, 8380: 108849, 8381: 108626, 8382: 108506, 8383: 108317, 8384: 108364, 8385: 108612, 8386: 108661, 8387: 108870, 8388: 108505, 8389: 108553, 8390: 108691, 8391: 108632, 8392: 108693, 8393: 108699, 8394: 108784, 8395: 108420, 8396: 108797, 8397: 108766, 8398: 108871, 8399: 108650, 8400: 108535, 8401: 108868, 8402: 108874, 8403: 108758, 8404: 108875, 8405: 108952, 8406: 108772, 8407: 108845, 8408: 108975, 8409: 109081, 8410: 108991, 8411: 109111, 8412: 108969, 8413: 109068, 8414: 109074, 8415: 109023, 8416: 108924, 8417: 108917, 8418: 109139, 8419: 109056, 8420: 109477, 8421: 109033, 8422: 109079, 8423: 108456, 8424: 109102, 8425: 109268, 8426: 109005, 8427: 109082, 8428: 109017, 8429: 109121, 8430: 109176, 8431: 109285, 8432: 109584, 8433: 109289, 8434: 109124, 8435: 109209, 8436: 109212, 8437: 109306, 8438: 109240, 8439: 109332, 8440: 109408, 8441: 109276, 8442: 109190, 8443: 109205, 8444: 109404, 8445: 109272, 8446: 109412, 8447: 109422, 8448: 109303, 8449: 109352, 8450: 109427, 8451: 109442, 8452: 109472, 8453: 109466, 8454: 109410, 8455: 109439, 8456: 109445, 8457: 109509, 8458: 109471, 8459: 109458, 8460: 109493, 8461: 109577, 8462: 109624, 8463: 109521, 8464: 109667, 8465: 109492, 8466: 109602, 8467: 109647, 8468: 109400, 8469: 109556, 8470: 109737, 8471: 110078, 8472: 109572, 8473: 109434, 8474: 109474, 8475: 109654, 8476: 109585, 8477: 109821, 8478: 109789, 8479: 109592, 8480: 109786, 8481: 110256, 8482: 109730, 8483: 109620, 8484: 109902, 8485: 109754, 8486: 109908, 8487: 109745, 8488: 109973, 8489: 109831, 8490: 109746, 8491: 109939, 8492: 109990, 8493: 109657, 8494: 109857, 8495: 109984, 8496: 110000, 8497: 110018, 8498: 109937, 8499: 110003, 8500: 110009, 8501: 110109, 8502: 110130, 8503: 109977, 8504: 110023, 8505: 111196, 8506: 109972, 8507: 110091, 8508: 110179, 8509: 110311, 8510: 110171, 8511: 110103, 8512: 110273, 8513: 110298, 8514: 110341, 8515: 110618, 8516: 110391, 8517: 110346, 8518: 110395, 8519: 110316, 8520: 110386, 8521: 110478, 8522: 110371, 8523: 110351, 8524: 110506, 8525: 110116, 8526: 110712, 8527: 110668, 8528: 110408, 8529: 110529, 8530: 110532, 8531: 110649, 8532: 110548, 8533: 110578, 8534: 110602, 8535: 110497, 8536: 110566, 8537: 110498, 8538: 110538, 8539: 110672, 8540: 110838, 8541: 110609, 8542: 110746, 8543: 110696, 8544: 110778, 8546: 109693, 8547: 110935, 8548: 110785, 8549: 110790, 8550: 110550, 8551: 110882, 8552: 110936, 8553: 110849, 8554: 110807, 8555: 110873, 8556: 110997, 8557: 110725, 8558: 110960, 8560: 111043, 8561: 110817, 8562: 110986, 8563: 111045, 8564: 110992, 8565: 111066, 8566: 111062, 8567: 111086, 8568: 110919, 8569: 111041, 8570: 111138, 8571: 110991, 8572: 111022, 8573: 111123, 8574: 111068, 8575: 111072, 8576: 111188, 8577: 111504, 8578: 110787, 8579: 111104, 8580: 111171, 8581: 111170, 8582: 111310, 8583: 111200, 8584: 111191, 8585: 111169, 8586: 111278, 8587: 111296, 8588: 111259, 8589: 111247, 8590: 111394, 8591: 111056, 8592: 111449, 8593: 111548, 8594: 111362, 8595: 111314, 8596: 111515, 8597: 111497, 8598: 111325, 8599: 111242, 8600: 111594, 8601: 111600, 8602: 111643, 8603: 111544, 8604: 111567, 8605: 111601, 8606: 111550, 8607: 111543, 8608: 111649, 8609: 111627, 8610: 111710, 8611: 111833, 8612: 111761, 8613: 111674, 8614: 111801, 8615: 111532, 8616: 111809, 8617: 111753, 8618: 111810, 8619: 111879, 8620: 111967, 8621: 111795, 8622: 111841, 8623: 111934, 8624: 111884, 8625: 111660, 8626: 111869, 8627: 111797, 8628: 111954, 8629: 111965, 8630: 112405, 8631: 111974, 8632: 111944, 8633: 111925, 8634: 112029, 8635: 112117, 8636: 112122, 8637: 112102, 8638: 112032, 8639: 112127, 8640: 112031, 8641: 112051, 8642: 112067, 8643: 112041, 8644: 112203, 8645: 112168, 8646: 112259, 8647: 112179, 8648: 112098, 8649: 112211, 8650: 112158, 8651: 112144, 8652: 112170, 8653: 112222, 8654: 112241, 8655: 112374, 8656: 112242, 8657: 112381, 8658: 112414, 8659: 112432, 8660: 112358, 8661: 112300, 8662: 112449, 8663: 112781, 8664: 112725, 8665: 112447, 8666: 112417, 8667: 112440, 8668: 112501, 8669: 112603, 8670: 112529, 8671: 112554, 8672: 112694, 8673: 112542, 8674: 112567, 8675: 112623, 8676: 112615, 8677: 112508, 8678: 112590, 8679: 112716, 8680: 112746, 8681: 112714, 8682: 112641, 8683: 112635, 8684: 112748, 8685: 112832, 8686: 112895, 8687: 112670, 8688: 112731, 8689: 112924, 8690: 112778, 8691: 112803, 8692: 112761, 8693: 112862, 8694: 112724, 8695: 112948, 8696: 112864, 8697: 112935, 8698: 112961, 8699: 112917, 8700: 113044, 8701: 113137, 8702: 112519, 8703: 112997, 8704: 113031, 8705: 112986, 8706: 113009, 8707: 112998, 8708: 113048, 8709: 113136, 8710: 113127, 8711: 113148, 8712: 113084, 8713: 113189, 8714: 113131, 8715: 113167, 8716: 113184, 8717: 113186, 8718: 113174, 8719: 113234, 8720: 113246, 8721: 113283, 8722: 113307, 8723: 113222, 8724: 113311, 8725: 113281, 8726: 113288, 8727: 113345, 8728: 113368, 8729: 113357, 8730: 113360, 8731: 113327, 8732: 113447, 8733: 113371, 8734: 113421, 8735: 113433, 8736: 112833, 8737: 113445, 8738: 113465, 8739: 113503, 8740: 113532, 8741: 113531, 8742: 113521, 8743: 113562, 8744: 113501, 8745: 113498, 8746: 113593, 8747: 113638, 8748: 113116, 8749: 113657, 8750: 113610, 8751: 113622, 8752: 113561, 8753: 113621, 8754: 113669, 8755: 113603, 8756: 113673, 8757: 113674, 8758: 113640, 8759: 113686, 8760: 113784, 8761: 113684, 8762: 113726, 8763: 113781, 8764: 113801, 8765: 113783, 8766: 113788, 8767: 113860, 8768: 113802, 8769: 113969, 8770: 113797, 8771: 113902, 8772: 113896, 8773: 113889, 8774: 113957, 8775: 113881, 8776: 113904, 8777: 113853, 8778: 113852, 8779: 113864, 8780: 113919, 8781: 113963, 8782: 113996, 8783: 113998, 8784: 113994, 8785: 114005, 8786: 114258, 8787: 114131, 8788: 114081, 8789: 114119, 8790: 114132, 8791: 114159, 8792: 114096, 8793: 114167, 8794: 114268, 8795: 114144, 8796: 114155, 8797: 114104, 8798: 114187, 8799: 114189, 8800: 114174, 8801: 114162, 8802: 114254, 8803: 114163, 8804: 114200, 8805: 114210, 8806: 114237, 8807: 114273, 8808: 114212, 8809: 114408, 8810: 114550, 8811: 114227, 8812: 114341, 8813: 114366, 8814: 114382, 8815: 114347, 8816: 114371, 8817: 114375, 8818: 114407, 8819: 114222, 8820: 114421, 8821: 114389, 8822: 114365, 8823: 114453, 8824: 114449, 8825: 114430, 8826: 114520, 8827: 114526, 8828: 114626, 8829: 114699, 8830: 114570, 8831: 114607, 8832: 114622, 8833: 114641, 8834: 114724, 8835: 114775, 8836: 114750, 8837: 114714, 8838: 114725, 8839: 114742, 8840: 114822, 8841: 114855, 8842: 114844, 8843: 114948, 8844: 114745, 8845: 114863, 8846: 114921, 8847: 114937, 8848: 114996, 8849: 115129, 8850: 114939, 8851: 114831, 8852: 114971, 8853: 114924, 8854: 114904, 8855: 115062, 8856: 115015, 8857: 114981, 8858: 115033, 8859: 115054, 8860: 115022, 8861: 115036, 8862: 115836, 8863: 115102, 8864: 115065, 8865: 115115, 8866: 115126, 8867: 114984, 8868: 115142, 8869: 115144, 8870: 115120, 8871: 115178, 8872: 115088, 8873: 115148, 8874: 115152, 8875: 115171, 8876: 115191, 8877: 115272, 8878: 115227, 8879: 115257, 8880: 115250, 8881: 115218, 8882: 115271, 8883: 115312, 8884: 115261, 8885: 115280, 8886: 115245, 8887: 115355, 8888: 115360, 8889: 115433, 8890: 115404, 8891: 115407, 8892: 115438, 8893: 115444, 8894: 115395, 8895: 115510, 8896: 115496, 8897: 115476, 8898: 115537, 8899: 115500, 8900: 115528, 8901: 115620, 8902: 115567, 8903: 115591, 8904: 115590, 8905: 115623, 8906: 115669, 8907: 115713, 8908: 115756, 8909: 115769, 8910: 115759, 8911: 115738, 8912: 115768, 8913: 115755, 8914: 115833, 8915: 115806, 8916: 115830, 8917: 115839, 8918: 115770, 8919: 115908, 8920: 115907, 8921: 115906, 8922: 115915, 8923: 115919, 8924: 115953, 8925: 115996, 8926: 115990, 8927: 116030, 8928: 116060, 8929: 116097, 8930: 116076, 8931: 116106, 8932: 116118, 8933: 116119, 8934: 116146, 8935: 116250, 8936: 116181, 8937: 116231, 8938: 115746, 8939: 116247, 8940: 116264, 8941: 116292, 8942: 116307, 8943: 116310, 8944: 116323, 8945: 116399, 8946: 116368, 8947: 116354, 8948: 116355, 8949: 116389, 8950: 116365, 8951: 116428, 8952: 116380, 8953: 116465, 8954: 116495, 8955: 116505, 8956: 116539, 8957: 116653, 8958: 116591, 8959: 116602, 8960: 116592, 8961: 116584, 8962: 116582, 8963: 116611, 8964: 116613, 8965: 116631, 8966: 116737, 8967: 116709, 8968: 116758, 8969: 116771, 8970: 116768, 8971: 116714, 8972: 116728, 8973: 116781, 8974: 116727, 8975: 116820, 8976: 116805, 8977: 116824, 8978: 116851, 8979: 116853, 8980: 116889, 8981: 116876, 8982: 116901, 8983: 116918, 8984: 116928, 8985: 116912, 8986: 116941, 8987: 116957, 8988: 116971, 8989: 116948, 8990: 116962, 8991: 117020, 8992: 117054, 8993: 117075, 8994: 117105, 8995: 117125, 8996: 117088, 8997: 117073, 8998: 117089, 8999: 117107, 9000: 117133, 9001: 117219, 9002: 117218, 9003: 117221, 9004: 117245, 9005: 117265, 9006: 117315, 9007: 117324, 9008: 117301, 9009: 117314, 9010: 117299, 9011: 117340, 9012: 117375, 9013: 117371, 9014: 117420, 9015: 117445, 9016: 117452, 9017: 117430, 9018: 117447, 9019: 117450, 9020: 117472, 9021: 117494, 9022: 117491, 9023: 117507, 9024: 117503, 9025: 117500, 9026: 117510, 9027: 117541, 9028: 117551, 9029: 117567, 9030: 117628, 9031: 117629, 9032: 117689, 9033: 117683, 9034: 117681, 9035: 117710, 9036: 117718, 9037: 117722, 9038: 117712, 9039: 117730, 9040: 117756, 9041: 117761, 9042: 117774, 9043: 117797, 9044: 117860, 9045: 117863, 9046: 117880, 9047: 117887, 9048: 117927, 9049: 117931, 9050: 117932, 9051: 117939, 9052: 117957, 9053: 117956, 9054: 118029, 9055: 118048, 9056: 118027, 9057: 118071, 9058: 118076, 9059: 118077, 9060: 118092, 9061: 118114, 9062: 118121, 9063: 118116, 9064: 118131, 9065: 118178, 9066: 118188, 9067: 118209, 9068: 118224, 9069: 118234, 9070: 118214, 9071: 118243, 9072: 118268, 9073: 118277, 9074: 118281, 9076: 118322, 9077: 25, 9078: 34, 9079: 43, 9080: 63, 9081: 88, 9082: 107, 9083: 106, 9084: 122, 9085: 124, 9086: 137, 9087: 145, 9088: 171, 9089: 154, 9090: 0, 9091: 183, 9092: 186, 9093: 194, 9094: 207, 9095: 238, 9096: 253, 9097: 274, 9098: 301, 9099: 302, 9100: 330, 9101: 343, 9102: 345, 9103: 355, 9104: 379, 9105: 365, 9106: 357, 9107: 394, 9108: 377, 9109: 399, 9110: 418} - data := []byte(` 1 BD+44 4550 3 36042 46 000001.1+444022000509.9+451345114.44-16.88 6.70 +0.07 +0.08 A1Vn -0.012-0.018 -018 195 4.2 21.6AC 3 - 2 BD-01 4525 6128569 235956.2-010330000503.8-003011 98.33-61.14 6.29 +1.10 +1.02 gG9 +0.045-0.060 +014V - 3 33 PscBD-06 6357 281285721002I Var? 000013.0-061601000520.1-054227 93.75-65.93 4.61 +1.04 +0.89 +0.54 K0IIIbCN-0.5 -0.009+0.089 +.014-006SB1O < 17 2.5 0.0 3* - 4 86 PegBD+12 5063 87 917012004 000033.8+125023000542.0+132346106.19-47.98 5.51 +0.90 G5III +0.045-0.012 -002V? - 5 BD+57 2865 123 21085 61 V640 Cas 000101.8+575245000616.0+582612117.03-03.92 5.96 +0.67 +0.20 G5V +0.263+0.030 +.047-012V 0.8 1.4 * - 6 CD-4914337 142214963 W 000108.4-493751000619.0-490430321.61-66.38 5.70 +0.52 +0.05 G1IV +0.565-0.038 +.050+003SB 5.7 5.4 * - 7 10 CasBD+63 2107 144 109782005 000114.4+633822000626.5+641146118.06 1.75 5.59 -0.03 -0.19 B9III e+0.008 0.000 -000V 153 * - 8 BD+28 4704 166 73743 69 33 000125.2+282811000636.8+290117111.26-32.83 6.13 +0.75 +0.33 K0V +0.380-0.182 +.067-008V 2.6 158.6AB 4* - 9 CD-23 4 2031660531003 000143.0-233947000650.1-230627 52.21-79.14 6.18 +0.38 +0.05 A7V +0.100-0.045 +003V - 10 BD-18 6428 256147090 000211.8-175639000718.2-172311 74.36-75.90 6.19 +0.14 +0.10 A6Vn -0.018+0.036 -009V? 195 * - 11 BD-03 2 315128595 Var? 000236.7-030620000744.1-023256 98.02-63.29 6.43 -0.14 -0.47 B8IIIpSi +0.027-0.002 +013 * - 12 CD-23 13 319166066 89 46 000240.3-230352000746.8-223032 55.56-79.07 5.94 +0.14 +0.06 A2Vp: +0.052-0.044 -013V 5.1 1.9 * - 13 CD-34 17 344192367 000258.6-340510000803.5-333146355.91-78.67 5.68 +1.12 K1III -0.037 0.000 +007 - 14 BD-03 3 3521286022006I AP Psc 000304.8-030015000812.1-022652 98.34-63.24 6.07 +1.38 +1.14 K2III+F +0.009-0.003 +001SB1O 22 2.0 0.0 * - 15 21Alp AndBD+28 4 358 73765 1I 94 Alp And 000313.0+283218000823.3+290526111.73-32.84 2.06 -0.11 -0.46 -0.10 B8IVpMnHg v+0.136-0.163 +.032-012SBO 56 8.5 81.5 * - 16 BD-09 5 360128604 000310.9-092247000817.4-084926 91.79-69.04 5.99 +1.04 +0.83 gG8 -0.052-0.033 +020 - 17 BD+35 8 400 53677 000331.9+360426000841.0+363736113.45-25.45 6.19 +0.48 -0.09 F8IV -0.100-0.145 +.044-014 =< 6 - 18 BD-18 3 402147103 I 51 000327.1-180801000833.4-173439 74.69-76.25 6.06 +1.67 +1.97 M0III 0.000-0.025 -017V? * - 19 BD+24 3 417 73769 000342.2+245419000852.2+252746110.97-36.42 6.23 +0.97 +0.73 K0III +0.114+0.031 +015 - 20 BD+78 1 431 4048 102 000348.5+790933000920.2+794253120.98 17.00 6.01 +0.19 +0.10 A7IV +0.102-0.027 +.002+001 90 0.2 0.6 * - 21 11Bet CasBD+58 3 432 21133 2I 107 Bet Cas 000350.2+583554000910.7+590859117.52-03.27 2.27 +0.34 +0.11 +0.20 F2III-IV +0.525-0.181 +.072+012SB 70 11.3 31.3 * - 22 87 PegBD+17 7 448 91734 000352.8+173922000902.4+181243108.99-43.51 5.53 +1.04 G9III +0.137-0.024 -023V? - 23 CP-54 19 469231943 W 000359.7-543333000902.4-540007316.25-62.02 6.33 +0.74 +0.39 G4IV +0.051+0.016D+.009+001SB 1.3 0.2 * - 24 Kap1SclCD-28 16 493166083 111 000415.2-283240000921.0-275916 25.24-80.63 5.42 +0.42 +0.08 F2V +0.072-0.004 +.023+009 131 0.2 1.4AB 3* - 25 Eps PheCD-46 18 496214983 3 000420.2-461757000924.7-454451324.34-69.60 3.88 +1.03 +0.84 +0.52 K0III +0.124-0.181 +.066-009 - 26 34 PscBD+10 8 560 91750 122 000453.8+103521001002.3+110844106.87-50.43 5.51 -0.07 -0.24 B9Vn e+0.041-0.003D+.017+014V 275 4.4 7.7 * - 27 22 AndBD+45 17 571 36123 4 000507.2+453057001019.3+460420115.52-16.21 5.03 +0.40 +0.25 +0.29 F2II +0.008 0.000 -.002-005 47 * - 28 BD+56 11 584 21162 000515.0+563632001029.7+570956117.38-05.26 6.74 -0.08 -0.41 B7IV +0.023+0.006 +002 - 29 BD-06 11 587128621 D 000511.6-054815001018.8-051455 96.99-66.03 5.84 +0.98 +0.74 K1III +0.036-0.033 +024 * - 30 Gam3OctCP-82 4 6362582153971 000530.4-824648001002.1-821326304.63-34.77 5.28 +1.05 +0.92 G8III -0.029-0.020 +015 - 31 BD-13 13 6451471272008 000535.5-130807001042.8-123448 87.69-72.60 5.85 +1.01 +0.80 K0IV +0.150-0.038 +006V? - 32 CP-73 4 661255642 W 000544.4-734653001038.6-731328306.98-43.58 6.64 +0.37 +0.06 F2V+F6V +0.123+0.016 -014 1.1 0.5AB 3* - 33 6 CetBD-16 17 693147133 000610.5-160101001115.9-152805 82.24-75.06 4.89 +0.49 -0.03 F7V -0.077-0.268 +.067+014V? 0 - 34 Kap2SclCD-28 26 720166103 5I W 000629.8-282124001134.4-274759 26.30-81.13 5.41 +1.34 +1.46 K5III +0.010+0.016 -006 13.8 46.0 - 35 The SclCD-35 42 739192388 6 000639.0-354134001144.0-350759347.16-78.34 5.25 +0.44 F4V +0.173+0.119 +.034-002 0 - 36 BD+47 21 743 36148 I 000645.1+473545001159.1+480909116.16-14.20 6.16 +1.45 gK4 +0.058+0.017 +016 - 37 BD-18 14 787147144 I 000704.0-182938001210.0-175618 76.32-77.10 5.25 +1.48 +1.63 K5III +0.056-0.031 -.015-008V < 19: - 38 BD+36 12 829 53725 000738.2+370815001250.4+374136114.55-24.55 6.73 -0.13 -0.70 B2V +0.028-0.012 -010 * - 39 88Gam PegBD+14 14 886 91781 7I'W Gam Peg 000805.1+143740001314.2+151101109.43-46.68 2.83 -0.23 -0.87 -0.19 B2IV +0.003-0.012 -.002+004SBO 3 8.9 163.4AB 3* - 40 BD+26 13 895 73823 161 000813.4+262556001324.0+265914112.56-35.12 6.30 +0.65 +0.33 G0III -0.008-0.047D+.006-013 1.1 0.1AB 3* - 41 23 AndBD+40 29 905 361732010 000819.0+402900001330.8+410207115.27-21.27 5.72 +0.31 -0.02 F0IV -0.123-0.148 +.024-029 25 - 42 CD-26 56 942166130 I 96 000837.8-263435001342.1-260119 38.28-81.49 5.94 +1.55 K5III +0.026-0.069 -030V - 43 CD-26 57 943166131 I 000840.2-265029001344.2-261705 36.52-81.54 6.31 +1.48 +1.65 K5III -0.020+0.012 +018V - 44 BD+32 21 952 537442012 000850.6+323901001402.3+331222113.99-29.02 6.25 -0.01 -0.05 A1V -0.006-0.018 +001 56 - 45 89Chi PegBD+19 27 1013 917921004I 99 000925.6+193902001436.2+201224111.30-41.83 4.80 +1.57 +1.93 +1.13 M2+III e+0.093 0.000 +.015-046V * - 46 BD-08 26 1014128655 I 180 AD Cet 000920.8-082013001427.6-074650 96.87-68.76 5.12 +1.62 +1.81 +1.03E M3+III +0.059+0.004 +.003-002V? 6.0 3.0 * - 47 CP-85 2 10322582173972 000932.1-853302001319.4-845939303.91-32.06 5.77 +1.72 +2.10 M0-1III +0.004+0.008 +004 - 48 7 CetBD-19 21 1038147169 I AE Cet 000933.7-192913001438.4-185558 75.11-78.23 4.44 +1.66 +1.99 +1.14 M3III e-0.024-0.067 +.029-023 * - 49 BD+21 13 1048 73838 000945.3+214343001456.1+221703111.92-39.81 6.24 -0.01 +0.12 A1pSi +0.065-0.011 -015 * - 50 35 PscBD+08 19 1061109087 191 UU Psc 000949.7+081556001458.8+084915107.86-52.98 5.79 +0.31 +0.04 F0IV +0.097-0.028D+.017+001SB2O 86 0.0 0.0 A 3* - 51 BD-10 30 1064128660 000948.2-100731001454.5-093411 95.06-70.44 5.75 -0.08 B9V +0.028-0.011 +017V? - 52 BD+30 26 1075 53755 I 000954.9+305848001507.0+313209113.93-30.70 6.45R K5 +0.035-0.005 +002 - 53 BD+26 23 1083 73842 W 000959.3+264340001510.6+271659113.10-34.90 6.35 -0.02 +0.02 A1Vn +0.021-0.031 -004SB 230 6.8 29.2 * - 54 CD-35 65 1089192418 000955.3-352736001458.2-345416345.80-78.99 6.17 +1.34 K3III +0.073-0.023 -052 - 55 BD+76 5 1141 4071 207 001033.1+762342001614.0+765703120.89 14.22 6.35 -0.07 -0.26 B8Vnn +0.018-0.002D+.013-007V 0.3 0.8 * - 56 BD+42 41 1185 36221 215 001106.2+430224001621.6+433541116.23-18.82 6.15 +0.05 +0.03 A2VpSi +0.043-0.030 +002 100 3.9 9.2 * - 57 CD-32 72 11871924302014I W 001105.4-320006001608.9-312647 1.53-81.18 5.67 +1.35 +1.50 K5III +0.122-0.030 +026 9.9 64.0 * - 58 CP-76 19 1221255650 001120.4-762803001555.2-755441305.79-41.02 6.49 +1.00 +0.72 G8-K0III -0.013+0.006 +016 - 59 36 PscBD+07 27 12271091002015 001125.7+074105001634.1+081424108.28-53.64 6.11 +0.92 +0.66 G8II-III -0.020-0.019 +001 - 60 BD+60 21 1239 11084 222 001134.6+605839001657.1+613200118.83-01.06 5.74 +0.88 +0.59 G8III -0.001-0.001 -004 6.4 19.4 * - 61 BD-21 24 1256166167 113 001138.1-204557001642.5-201238 72.13-79.47 6.47 -0.09 -0.48 B8III +0.012-0.014 +019V * - 62 BD+47 50 1279 362362016 001152.3+472331001709.1+475651117.01-14.53 5.89 -0.09 -0.44 B7III +0.008 0.000 -009V? 0 - 63 24The AndBD+37 34 1280 53777 116 001151.9+380735001705.5+384054115.62-23.70 4.61 +0.06 +0.04 +0.01 A2V -0.050-0.019 +.022+001V 107 * - 64 CP-79 7 1324255652 001222.8-792007001649.0-784650305.07-38.20 6.77 +0.46 +0.08 F3III +0.077-0.043 -013 - 65 BD+50 46 1337 21273 I AO Cas 001224.8+505239001743.0+512559117.59-11.09 6.14 -0.13 -0.97 O9IIInn -0.005-0.004 -035SB2O 135 * - 66 BD-19 30 1343147205 001228.2-193624001732.6-190304 77.21-78.78 6.45 +0.37 F4IV-V +0.015+0.003 -005 - 67 BD+00 28 13671091192017 001239.5+010758001747.7+014120105.89-60.07 6.17 +0.94 +0.73 K0II +0.095+0.012 -009 - 68 25Sig AndBD+35 44 1404 537981005 118 001306.0+361351001819.7+364707115.59-25.61 4.52 +0.05 +0.07 0.00 A2V -0.063-0.041 +.023-008SB 103 * - 69 BD+10 25 1419 91832 001308.3+103905001817.2+111221110.00-50.83 6.05 +1.03 K0III -0.036-0.038 +009 - 70 26 AndBD+42 48 1438 36256 254 119 001325.7+431409001842.1+434728116.70-18.68 6.11 -0.08 -0.35 B8V +0.020-0.003 +007 4.1 6.2 * - 71 BD+30 35 1439 538031006 001324.7+305743001838.3+313102114.79-30.84 5.87 -0.01 0.00 A0IV +0.058-0.006 -005 53 - 72 BD-08 38 1461128690 001333.0-083616001841.8-080310 99.29-69.40 6.46 +0.68 +0.29 G0V +0.413-0.139 +.053-010V? * - 73 CD-43 64 1483215047 001343.7-434728001842.6-431407323.20-72.58 6.33 +1.21 K2III +0.056+0.012 +012 - 74 8Iot CetBD-09 48 1522128694 9I W 123 001419.9-092242001925.7-084926 98.98-70.19 3.56 +1.22 +1.25 +0.59 K1.5III -0.014-0.036 +.013+019 < 17 4.8 108.8AC 3* - 75 BD+39 56 1527 36269 001425.9+401029001941.6+404347116.46-21.74 6.33 +1.18 K1III -0.026-0.010 -038 - 76 BD+48 79 1561 36272 001446.3+481838002005.2+485155117.63-13.68 6.52 A0V s +0.005-0.017 -003V 57 - 77 Zet TucCP-65 13 1581248163 10I' 001451.7-652745002004.3-645229308.35-51.90 4.23 +0.58 +0.02 +0.33 F9V +1.705+1.164 +.134+009 0 - 78 BD+30 42 1606 53820 128 001510.7+302250002024.4+305609115.13-31.47 5.90 -0.10 -0.46 B7V +0.021+0.004 +004 125 - 79 BD+32 45 1632 53825 I 001531.6+322124002045.5+325441115.53-29.52 5.79 +1.59 +1.00 K5III -0.026-0.014 -036 - 80 41 PscBD+07 36 16351091521008I 132 001527.0+073806002035.9+081125109.91-53.90 5.37 +1.34 +1.55 gK3 -0.002+0.008 +016 - 81 BD+10 32 1663 91858 287 001545.4+102522002054.5+105837110.93-51.18 6.56 A0V -0.046-0.028D+.005-018V 56 0.2 0.6 * - 82 27Rho AndBD+37 45 1671 538281009 001551.1+372453002107.3+375807116.37-24.52 5.18 +0.42 +0.05 F5III +0.060-0.040 +.017+009 41 - 83 Pi TucCP-70 12 16852481672018 001600.9-701048002039.0-693730306.87-47.27 5.51 -0.05 -0.14 B9V -0.007 0.000 +.011+012 - 84 Iot SclCD-29 86 1737166207 001629.7-293204002131.2-285854 15.52-83.15 5.18 +1.00 +0.82 G5III +0.040-0.074 +.027+021 - 85 BD-20 50 1760166210 I T Cet 001642.6-203645002146.3-200328 77.51-80.20 5.12 +1.82 +1.78 M5IIe +0.071-0.005 +029V * - 86 42 PscBD+12 25 1796 918662020 303 001714.9+125538002225.5+132857112.19-48.78 6.23 +1.22 K3III +0.062+0.021 +003V 4.6 28.9 * - 87 CP-78 9 1801255663 001712.7-775854002128.6-772537305.04-39.58 5.97 +1.40 +1.40 K3III +0.002-0.010 +021V - 88 9 CetBD-13 60 1835147237 I'W BE Cet 001744.3-124557002251.8-121234 97.34-73.64 6.39 +0.66 +0.24 G2V +0.394+0.061 +.049-007V 6 5.4 202.1 * - 89 CD-31 138 1909192495 001812.3-313526002312.6-310210358.89-82.70 6.55 0.00 -0.31 B9IVMn +0.029-0.003 +001SB1 25 * - 90 BD+37 58 1967 53860 I:W R And 001844.8+380125002402.0+383438117.07-23.98 7.39 +1.97 +1.25 +2.21 S6.5IIIeZr6Ti2 -0.007-0.023 -011V 4.9 84.6 * - 91 BD+51 62 1976 21366 328 155 001852.2+512757002415.6+520112118.68-10.63 5.57 -0.12 -0.60 B5IV +0.013-0.004D+.004-007SBO 230 2.5 0.2 * - 92 NOVA 1572 B Cas * - 93 12 CasBD+61 69 2011 11172 001916.2+611637002447.5+614952119.79-00.88 5.40 0.00 -0.16 B9III +0.012-0.001 +.015-004V 154 - 94 BD-03 49 20231287432021 001923.0-024620002429.7-021309107.27-64.27 6.07 +1.22 +1.23 K1III -0.033-0.044 +015 - 95 47 Tuc * - 96 BD+52 61 2054 213812022 159 001941.6+522934002506.4+530249118.92-09.62 5.74 -0.06 -0.31 B9IV +0.023-0.002 +010V 210 * - 97 44 PscBD+01 57 21141091921010 W 002016.5+012310002524.2+015623109.73-60.26 5.77 +0.86 +0.57 G5III -0.013-0.015 -004 < 20 * - 98 Bet HyiCP-77 16 2151255670 11I' 161 002030.0-774903002545.1-771515304.81-39.77 2.80 +0.62 +0.11 +0.34 G2IV +2.215+0.324 +.153+023 * - 99 Alp PheCD-42 116 2261215093 12I A 002120.5-425056002617.0-421822320.02-73.98 2.39 +1.09 +0.88 +0.60 K0III +0.203-0.396 +.035+075SB1O 0.1 * - 100 Kap PheCD-44 101 2262215092 002117.1-441405002612.2-434048318.42-72.68 3.94 +0.17 +0.11 +0.08 A7V +0.109+0.029 +.072+011 219 - 101 10 CetBD-00 63 2273128760 Var? 002129.6-003612002637.4-000259109.50-62.27 6.19 +0.90 +0.55 G8III +0.073-0.001 -023V * - 102 CD-26 138 23631662822025 002214.0-260601002714.7-253250 47.84-84.35 5.98 +1.03 +0.88 G8III +0.036-0.019 -003 - 103 47 PscBD+17 55 2411 91910 I TV Psc 002250.0+172021002802.9+175335115.10-44.62 5.06 +1.65 +1.82 +1.54 M3III v+0.117+0.021 +.016+006V * - 104 BD+43 92 2421 363902027 002251.1+435029002813.7+442340118.57-18.28 5.17 +0.03 -0.01 A2V s +0.089-0.016 +.013+002SB1O 36 * - 105 Eta SclCD-33 152 24291925452026 Eta Scl 002258.2-333333002755.7-330026342.36-82.23 4.81 +1.64 +1.81 +1.38 M4III -0.019-0.052 -.014+011 * - 106 48 PscBD+15 63 2436 919121012I 002300.9+155332002812.7+162642114.89-46.06 6.06 +1.58 +2.00 K5III +0.019-0.015 -007SB - 107 BD+09 47 24541092242028 002309.8+093832002820.1+101123113.62-52.26 6.04 +0.43 -0.06 F6Va vw +0.046-0.207 +.033-010V 8 * - 108 BD-21 57 24751662962029 W 002320.2-205307002821.1-202006 83.87-81.40 6.43 +0.59 -0.03 G0V -0.116-0.114D+.034+006V 0.1 0.2 * - 109 CD-40 93 2490215103 I 002330.7-402802002826.4-395454321.94-76.35 5.43 +1.56 +1.90 M0III +0.130-0.036 +.015+032 * - 110 BD+36 66 2507 53928 002337.9+362048002856.6+365400117.94-25.75 6.26 +0.92 G5III -0.011+0.003 +010 - 111 CD-51 113 2529232055 002352.8-510509002843.1-503158311.91-66.20 6.26 +1.09 K0III +0.150-0.002 +006 - 112 BD+76 10 2589 41302031 002429.4+762804003055.0+770110121.74 14.20 6.21 +0.84 +0.54 K0IV +0.337-0.038 +.023+019 * - 113 BD+59 68 2626 21457 412 002444.9+592530003019.9+595838120.29-02.79 5.94 +0.01 -0.36 B9IIIn +0.017-0.012D+.002-017V 225: 2.2 0.5AB 3* - 114 28 AndBD+28 75 2628 74041 409 GN And 002450.6+291201003007.3+294506117.42-32.89 5.23 +0.24 +0.09 A7III +0.041-0.054 +.001-010 21 7.1 139.3AC 3* - 115 BD-15 84 26301473072030 002447.8-152458002951.9-145151 99.58-76.75 6.14 +0.37 F2III +0.144-0.032 +003 42 * - 116 CD-32 154 2632192567 002451.6-324005002948.9-320700344.92-83.15 6.57 +1.34 K4III -0.004-0.054 +001 - 117 12 CetBD-04 54 2637128791 13I 410 002456.1-043035003002.4-035726109.57-66.27 5.72 +1.56 +1.91 M0III +0.011-0.012 +005V? 5.6 10.6 * - 118 CD-24 179 2696166318 14 002522.7-242027003022.7-234716 66.87-84.19 5.19 +0.12 A5Vn -0.024+0.013 +.018-000SB * - 119 CD-41 116 2724215120 BB Phe 002534.7-412934003027.8-405622318.97-75.53 6.19 +0.33 +0.14 F2III -0.001+0.021 -005 * - 120 CD-48 102 2726215119 002535.8-484555003026.1-481254312.52-68.52 5.69 +0.35 +0.05 F2V +0.129-0.088 +002 - 121 13 CasBD+65 67 2729 11243 002539.8+655802003125.3+663110120.94 3.73 6.18 -0.10 -0.47 B6V +0.023-0.006 -010 * - 122 BD+32 80 2767 53956 W 002606.8+330147003125.6+333454118.16-29.10 5.87 +1.14 K1III +0.047-0.019 +009SB 2.4 56.4 - 123 14Lam CasBD+53 82 2772 21489 434 002615.1+535813003146.4+543120120.05-08.24 4.73 -0.10 -0.35 -0.12 B8Vn +0.045-0.010 +.030-012V 0.2 0.5 * - 124 BD+52 92 2774 21486 I 002612.4+521715003141.2+525022119.91-09.92 5.60 +1.15 +1.13 K2III -0.053-0.019 +.008-052SB - 125 Lam1PheCD-49 115 2834215131 15 W 002635.6-492123003125.0-484813311.75-67.98 4.77 +0.02 +0.04 A0V +0.143+0.017 +.027-002SB 109 8.8 30.3 * - 126 Bet1TucCP-63 50 2884248201 W A 002657.7-633033003132.7-625729306.78-54.02 4.37 -0.07 -0.17 -0.07 B9V +0.090-0.054 +.030+014SB 173 0.2 27.0AC 6* - 127 Bet2TucCP-63 50 2885248202 W C 002658.4-633100003133.6-625757306.78-54.01 4.54 +0.15 +0.03 +0.08 A2V+A7V +0.101-0.056 +.030+010 50 0.2 27.0AC 6* - 128 BD+42 99 2888 36453 002703.0+425635003226.8+432941119.29-19.24 6.70 -0.01 -0.20 A1Vn +0.018-0.010 -015SB 265 * - 129 BD+70 24 2904 41422034 002720.9+702548003319.3+705854121.44 8.16 6.42 -0.01 -0.06 A0Vn +0.028-0.004 -010 154 - 130 15Kap CasBD+62 102 2905 11256 16 Kap Cas 002718.6+622248003300.0+625554120.84 0.14 4.16 +0.14 -0.80 +0.06 B1Ia e+0.003-0.003 -002SB 62 * - 131 52 PscBD+19 79 2910 740842033 452 002720.8+194437003235.5+201740116.94-42.36 5.38 +1.08 +0.96 K0III +0.135-0.047 +.032-013V 6.8 49.6 - 132 51 PscBD+06 64 29131092622032 449 Var? 002714.1+062412003223.8+065720114.55-55.61 5.67 0.00 -0.17 B9.5V +0.035+0.002 +017 125 0.7 0.0 O 4* - 133 BD+26 76 2924 74083 002718.2+270144003234.5+273450117.82-35.10 6.67 A2IV -0.017-0.015 +002 - 134 BD+27 84 2942 74090 455 002732.4+274341003249.1+281649117.96-34.41 6.30 +1.00 +0.73 K0III -0.006+0.007 +.006-012SB 4.9 8.5AB 3* - 135 BD+54 101 2952 21512 002737.3+542039003310.4+545342120.28-07.88 5.93 +1.04 +0.84 K0III +0.071-0.042 -035 - 136 Bet3TucCP-63 52 3003248208 W 002810.4-633456003243.8-630152306.54-53.97 5.09 +0.04 +0.02 A0V +0.081-0.038 +.049+005V 84 0.2 0.1 * - 137 16 CasBD+65 70 3038 11265 002835.1+661156003424.9+664501121.25 3.93 6.48 -0.08 -0.32 B9III +0.021 0.000 -016SB - 138 CD-30 156 30591663671013I 002844.3-300633003341.1-293330 0.01-85.40 5.55 +1.27 +1.23 K2III -0.026-0.030 -009SB * - 139 The TucCP-71 20 31122556792035 The Tuc 002908.9-714904003323.3-711558305.01-45.79 6.13 +0.23 +0.20 A7IV +0.067-0.012 +002 52 * - 140 CP-53 117 31582320911014 002942.3-525532003427.8-522223308.97-64.55 5.57 +0.47 0.00 F3IV-V +0.230+0.032 +.038+035 - 141 BD+12 57 3166 91980 002944.1+124917003455.3+132216116.77-49.30 6.40 K0 -0.090-0.057 -019V - 142 13 CetBD-04 62 3196128839 490 212 003006.0-040836003514.9-033534112.89-66.15 5.20 +0.56 +0.08 F8V +0.413-0.026 +.060+009SBO 18 0.7 0.3AB 3* - 143 14 CetBD-01 68 32291288432036 003024.7-010318003532.8-003020114.12-63.10 5.93 +0.44 -0.02 F5IV +0.146-0.066 +006V =< 10 - 144 BD+53 102 3240 21551 003034.1+533703003608.3+541007120.67-08.64 5.08 -0.11 -0.36 B7III +0.022 0.000 +001V 58 - 145 BD+12 59 3268 91990 003043.9+123940003554.7+131224117.11-49.49 6.41 +0.52 -0.05 F7V -0.143-0.189 +.020-025 =< 15 - 146 BD+59 84 3283 11291 003046.0+594632003627.3+601934121.08-02.49 5.79 +0.29 +0.29 A4III -0.001-0.003 -009V? * - 147 Lam2PheCD-48 121 3302215157 003055.0-483257003541.1-480003310.27-68.90 5.51 +0.44 -0.01 F6V +0.045-0.104 +008 0 - 148 CP-55 117 3303232099 219 003053.4-552217003533.4-544919307.83-62.16 6.06 +1.01 K0IV +0.027-0.054 -010 - 149 BD+26 91 3322 74136 221 003102.6+264215003620.0+271517118.81-35.50 6.50 -0.09 -0.39 B8IIIpHgMn: +0.011-0.016 +001SB? 28 * - 150 BD-15 109 3325147360 003101.5-153120003603.0-145825105.75-77.33 6.45 +1.06 +0.91 G9III -0.083-0.079 +012V? - 151 CD-23 220 33261664002037 BG Cet 003108.3-232331003606.9-225033 83.10-84.48 6.06 +0.29 A6pSr -0.072-0.052 +013 * - 152 BD+43 113 3346 36509 I 003120.1+435613003646.6+442919120.18-18.31 5.13 +1.60 +1.97 K5-M0III -0.023+0.033 +.007-033V < 17 - 153 17Zet CasBD+53 105 3360 21566 17 225 003123.7+532048003658.3+535349120.78-08.91 3.66 -0.20 -0.87 -0.21 B2IV +0.019-0.009 +.004+002SB? 18 * - 154 29Pi AndBD+32 101 3369 54033 18 513 227 003132.2+331008003652.9+334310119.47-29.05 4.36 -0.14 -0.55 -0.12 B5V +0.015-0.004 -.003+009SB1O 34 4.2 35.2AB 3* - 155 53 PscBD+14 76 3379 919952039 AG Psc 003134.6+144053003647.3+151354117.70-47.49 5.89 -0.15 -0.66 B2.5IV v+0.002-0.015 -009SB * - 156 BD+23 84 3411 74148 003151.1+232754003707.2+240051118.74-38.74 6.47R K2III -0.014-0.044 -001 - 157 BD+34 86 3421 54038 003159.7+345057003721.1+352358119.70-27.38 5.48 +0.88 +0.48 G2.5IIa -0.016-0.005 -000 - 158 BD+81 13 3440 1063941 235 003212.4+815630003947.3+822938122.53 19.63 6.40 +0.55 -0.01 dF6 -0.111+0.078 +.028-033V - 159 CD-25 225 3443166418 520 003212.5-251903003720.7-244602 68.68-86.03 5.57 +0.72 +0.24 +0.27E G8V +1.390-0.012 +.076+017SB2 2: 0.2 0.5 * - 160 CP-65 58 3444248225 003213.2-654029003637.4-650729305.46-51.93 6.42 +1.26 +1.38 K2-3III +0.029-0.020 +020 - 161 BD+02 80 34571093152040 003221.5+023512003730.5+030807116.06-59.55 6.39 +1.33 +1.52 +0.54E K4III +0.095-0.061 +004V * - 162 CP-55 130 3488232114 003238.7-545639003718.1-542339307.41-62.61 6.41 +1.00 K0II-IIICNIV +0.056-0.021 -006 - 163 30Eps AndBD+28 103 3546 74164 19I 003316.1+284608003833.3+291842119.57-33.47 4.37 +0.87 +0.47 +0.51 G6IIIFe-3CH1 -0.227-0.254 +.031-084V 9 - 164 BD+48 192 3574 36550 I 546 003338.0+484818003909.9+492116120.88-13.47 5.43 +1.64 K7III +0.008-0.011 -008V 5.3 13.3 * - 165 31Del AndBD+30 91 3627 54058 20I: 548 003358.7+301850003919.7+305139119.87-31.94 3.27 +1.28 +1.48 +0.66 K3III +0.136-0.091 +.028-007SB1O < 17 8.2 28.7AB 3* - 166 54 PscBD+20 85 3651 74175 W 245 003409.5+204240003921.8+211502119.18-41.53 5.87 +0.85 +0.57 +0.39 K0+V -0.464-0.370 +.099-034V 4.9 122.0 * - 167 55 PscBD+20 87 3690 74182 I 558 003439.6+205323003955.6+212618119.36-41.35 5.36 +1.16 +1.05 K0III+F3V +0.028-0.035 +.009-017V 3.2 6.6 * - 168 18Alp CasBD+55 139 3712 21609 21I 561 Alp Cas 003449.7+555920004030.5+563214121.42-06.30 2.23 +1.17 +1.13 +0.60 K0IIIa +0.053-0.032 +.016-004V? 21 6.7 64.4AD 4* - 169 CP-73 42 3719255690 003445.3-734115003840.8-730814304.22-43.96 6.85 +0.11 +0.12 +0.06C A1m -0.017+0.020 +021V? - 170 CD-34 224 3735192663 Z Scl 003502.6-343028003957.9-335742322.13-82.73 6.69 +0.51 -0.03 F8V v+0.333-0.116 +.020-011 * - 171 CD-45 201 3750215185 003505.9-452046003952.0-444748309.65-72.18 6.01 +1.14 +1.09 K1IIICNII +0.045 0.000 +008 - 172 BD-17 109 3794147395 W 003527.6-170354004028.6-163101108.92-79.09 6.49 +0.92 +0.53 G5 +0.037-0.040 +048V 2.5 105.0AB 3 - 173 CD-24 263 3795166475 003530.7-242040004032.9-234816 85.79-85.86 6.14 +0.70 +0.21 G3V +0.644-0.333 +.043-053V - 174 BD-05 101 38071288912042 W 003536.9-045402004042.4-042107116.05-67.08 5.91 +1.10 +0.89 K0III -0.013-0.013 +035V 2.5 64.3 - 175 32 AndBD+38 90 3817 540792043 003541.7+385435004107.2+392731120.76-23.37 5.33 +0.89 +0.60 +0.46 G8III -0.010-0.007 +.010-005V < 17 * - 176 CP-60 46 3823232143 003545.2-600058004026.4-592716305.56-57.61 5.89 +0.55 +0.01 G1V +0.889+0.448 +.058+002 - 177 BD+65 83 3856 113362045 003605.6+653557004203.4+660851121.98 3.29 5.83 +1.04 +0.87 G9III-IV -0.013-0.009 -003 - 178 BD+23 94 3883 742002044 W 258 003617.6+240451004136.0+243745120.09-38.19 6.04 +0.26 +0.22 +0.11 A7m +0.107-0.016 -015 25 * - 179 19Xi CasBD+49 164 3901 216372046 260 003629.0+495751004203.9+503045121.41-12.33 4.80 -0.11 -0.63 -0.12 B2V +0.015-0.005 -010SB1 211 * - 180 Mu PheCD-46 180 39192151941015 003636.0-463802004119.6-460506308.31-70.94 4.59 +0.97 +0.72 +0.52 G8III -0.014-0.002 +.004+019V? * - 181 BD+57 132 3924 21642 003645.8+581219004231.1+584512121.77-04.10 6.17 -0.01 -0.11 B9.5III +0.036-0.007 -003 100 - 182 M 31 And S And * - 183 Xi PheCP-57 143 3980232152 W Xi Phe 003712.9-570305004146.4-563006305.65-60.57 5.70 +0.20 ApSrEuCr +0.085+0.044 +010 4.4 13.2 * - 184 20Pi CasBD+46 146 4058 36602 268 003755.8+462839004328.1+470129121.52-15.82 4.94 +0.18 +0.09 A5V -0.020-0.034 +.023+013SB2O 58 * - 185 Lam1SclCD-39 175 4065192690 W 003754.2-390041004242.9-382748311.54-78.52 6.06 -0.03 -0.13 A0V +0.003-0.005 +010V 0.3 0.6 * - 186 CP-60 48 4088248238 003812.5-604835004241.8-601545304.92-56.83 5.98 +1.32 +1.45 K5III +0.255-0.045 +026 * - 187 Rho TucCP-66 47 40892482372047 003812.0-660103004228.4-652805304.43-51.63 5.39 +0.50 +0.02 F6V +0.053+0.042 +.038+014SBO 0 * - 188 16Bet CetBD-18 115 4128147420 22I 272 003834.2-183208004335.4-175912111.31-80.68 2.04 +1.02 +0.87 +0.51 G9.5IIICH-1 +0.234+0.033 +.061+013V? 18 * - 189 BD+47 181 4142 36617 003852.8+471858004426.4+475151121.72-14.99 5.67 -0.12 -0.56 B5V -0.026+0.015 -060SB 177 * - 190 BD-12 126 4145147422 003847.9-123314004350.2-120042115.84-74.78 6.02 +1.10 +1.09 K2III-IV +0.007-0.204 -009V? - 191 Eta PheCP-58 42 4150232162 23 W 003851.7-580041004321.2-572747305.08-59.63 4.36 0.00 -0.02 0.00 A0IV -0.006+0.011 +.046+002V 96 7.0 19.8 - 192 21 CasBD+74 27 4161 4216 24 624 YZ Cas 003902.2+742629004539.0+745917122.55 12.12 5.66 +0.05 +0.07 A2IV -0.018-0.026 +009SBO 27 5.5 36.0 * - 193 22Omi CasBD+47 183 4180 36620 25 622 Omi Cas 003908.9+474414004443.5+481704121.78-14.57 4.54 -0.07 -0.51 -0.05 B5IIIe +0.019-0.008 -017SB1O 260 7.2 33.6 * - 194 17Phi1CetBD-11 128 41881474232048I 278 003908.7-110915004411.4-103634116.69-73.39 4.76 +1.01 +0.84 +0.51 K0III v-0.009-0.113 +.022+001 < 17 * - 195 Lam2SclCD-39 181 4211192703 26 003922.0-385821004412.1-382518310.14-78.60 5.90 +1.16 +1.18 K1III +0.244+0.113 +.010+027 - 196 BD+54 143 4222 21677 625 003935.0+544027004517.2+551318122.05-07.64 5.42 +0.04 +0.04 A2V s -0.025+0.002 +.012-009V 59 5.4 89.0AC 3* - 197 BD-22 127 4247166528 003947.5-223321004444.4-220022106.02-84.66 5.24 +0.33 F1III-IV -0.066+0.083 +.048+012 32 - 198 CD-43 207 42932152211017 004013.4-431316004457.1-424036307.36-74.40 5.94 +0.28 F0V -0.086-0.102 +010SB - 199 CP-63 72 4294248243 W 004010.5-630243004432.3-622952304.31-54.61 6.07 +0.44 +0.13 F5III-IV +0.143-0.005 -004V? 1.8 2.5 * - 200 BD+68 49 4295 11380 004022.1+684642004639.0+691930122.50 6.46 6.33R F3V +0.196+0.001 -014 15 - 201 BD-05 120 4301128935 I 004018.6-051038004524.1-043745119.00-67.46 6.15 +1.62 +2.01 M0III +0.028+0.033 +007V - 202 CP-54 166 43042321682049 004024.0-541544004500.0-534254305.07-63.39 6.15 +0.53 -0.08 F7III +0.230 0.000 +014 - 203 18 CetBD-13 128 4307147432 W 004027.3-132520004528.7-125251117.05-75.68 6.15 +0.61 +0.10 G0V -0.034-0.201 -013 6.3 69.5 * - 204 BD+54 148 4321 21689 004031.6+544531004615.1+551819122.19-07.56 6.52 A2III +0.015-0.012 -008 - 205 BD+44 160 4335 36640 004038.4+441853004610.9+445141121.95-18.00 6.05 -0.07 -0.27 B9.5IIIpHgMnCr +0.028-0.009 +000SB 25 * - 206 BD-17 132 4338147436 636 004041.7-165816004541.7-162527115.55-79.21 6.47 +0.31 F1IVn +0.014-0.005 -000 3.0 3.0 - 207 BD+58 101 4362 21693 004052.4+590140004642.4+593428122.33-03.29 6.39 +1.09 +0.77 G0Ib -0.008-0.001 -015V - 208 23 CasBD+74 29 4382 4226 004105.0+741805004746.1+745051122.69 11.98 5.41 -0.08 -0.39 B8III +0.015-0.009 -003SB2O 4 * - 209 CD-48 176 4391215232 W 004104.1-480604004545.6-473306305.68-69.54 5.80 +0.64 G1V +0.184+0.086 +.049-011 7.7 14.3 - 210 CD-23 293 4398166555 004113.6-230407004611.8-223119108.14-85.24 5.50 +0.98 G3V +0.201-0.006 +.021-015V * - 211 57 PscBD+14 111 4408 92072 I 293 004118.9+145549004633.0+152832121.19-47.38 5.38 +1.65 +1.76 M4IIIa -0.027-0.044 +.015-027V * - 212 BD+71 37 4440 4229 004136.8+720741004809.1+724030122.68 9.80 5.87 +1.01 +0.82 K0IV +0.130+0.024 +001V - 213 58 PscBD+11 96 4482 920802050 004148.4+112542004701.5+115826121.22-50.88 5.50 +0.97 G8II +0.058-0.036 -001 - 214 59 PscBD+18 101 4490 920822051 XX Psc 004156.4+190156004713.6+193444121.57-43.28 6.13 +0.27 +0.18 F0Vn +0.104+0.011 +000V? 163 * - 215 34Zet AndBD+23 106 4502 74267 27I W Zet And 004202.1+234324004720.3+241602121.74-38.59 4.06 +1.12 +0.90 +0.59 K1IIe -0.100-0.083 +.037-024SB1O 40 5.6 162.7AD 4* - 216 60 PscBD+05 104 4526109461 004213.2+061142004723.6+064427121.13-56.12 5.99 +0.94 +0.70 G8III +0.014-0.015 +014V - 217 61 PscBD+20 105 4568 74280 004236.4+202244004754.8+205531121.82-41.94 6.54 +0.50 +0.03 F8V +0.157+0.006 +.022+001V * - 218 BD-18 127 4585147451 I 004244.3-183630004743.3-180341117.34-80.89 5.70 +1.30 +1.46 K3III +0.043+0.031 +002V - 219 24Eta CasBD+57 150 4614 21732 I: 671 004303.0+571706004906.0+574857122.60-05.05 3.44 +0.57 +0.01 +0.36 F9V+dM0 +1.100-0.529 +.176+009SB1O=< 6 4.0 11.6AB 8* - 220 BD-22 134 46221665851018 004304.1-221605004801.1-214321114.55-84.54 5.57 -0.06 -0.12 B9V +0.028-0.011 +021V 53 - 221 62 PscBD+06 105 4627109470 004306.0+064514004817.4+071800121.55-55.56 5.93 +1.10 +1.00 G8III +0.111+0.004 -000V? - 222 BD+04 123 46281094711019 W 004308.2+044600004823.0+051650121.49-57.57 5.75 +0.88 +0.59 +0.47 K2V +0.758-1.146 +.145-013V 4.6 181.2 - 223 25Nu CasBD+50 147 4636 21729 302 004309.8+502522004850.1+505806122.51-11.90 4.89 -0.11 -0.42 B9III +0.035-0.006 +009V 210 - 224 63Del PscBD+06 107 4656109474 28I W 004329.6+070227004841.0+073506121.73-55.28 4.43 +1.50 +1.86 +0.87 K4IIIb +0.085-0.052 +.019+032V? < 19 8.6 113.3 * - 225 64 PscBD+16 76 4676 920991020 W 004343.3+162403004858.7+165626122.09-45.92 5.07 +0.51 0.00 F8V -0.003-0.204 +.047+002SB2O < 17 7.4 76.7AB 3* - 226 35Nu AndBD+40 171 4727 366991021 004417.7+403204004948.8+410444122.60-21.79 4.53 -0.15 -0.58 -0.15 B5V+F8V +0.023-0.019 -024SB2O 80 * - 227 BD-14 145 47301474642054I 680 004424.2-140613004925.6-133341120.84-76.42 5.59 +1.30 +1.54 K5III +0.105-0.104 +004V 6.2 1.3 * - 228 CD-24 345 4732166602 679 004418.2-244050004913.9-240811113.36-86.97 5.90 +0.95 +0.72 K2III +0.078-0.051 +023V 7.7 8.8 - 229 CD-47 229 47372152452053 004418.4-471437004856.7-464152304.21-70.42 6.27 +0.90 G8III -0.008+0.017 +012 - 230 65 PscBD+26 131 4757 74295 683B 004430.6+270958004952.8+274239122.51-35.16 7.0 +0.36 +0.06 F4III +0.084-0.010 +.011+005V 82 0.0 4.5 * - 231 65 PscBD+26 131 4758 74296 683A 004430.9+270955004953.2+274237122.51-35.16 7.1 F5III +0.091-0.009 +.011+007 82 0.0 4.5 * - 232 CD-24 347 4772166608 004438.0-235425004933.4-232142116.39-86.21 6.28 +0.13 +0.13 A3V -0.008 0.000 +012V - 233 BD+63 99 4775 11424 29 S 317 004439.2+634211005043.6+641451122.85 1.38 5.39 +0.49 +0.14 G0III-IV+B9.5V +0.030-0.012 +003SBO 0 * - 234 BD+44 176 4778 367022055 GO And 004443.0+442726005018.3+450008122.72-17.87 6.15 +0.01 -0.03 A0pCr v+0.065+0.006 +002 * - 235 19Phi2CetBD-11 153 4813147470 30 316 004507.1-111058005007.6-103840121.81-73.51 5.19 +0.50 -0.02 +0.28 F7IV-V -0.226-0.229 +.065+008V 0 * - 236 Lam HyiCP-75 64 4815255710 31 004507.2-752804004835.4-745524303.18-42.20 5.07 +1.37 +1.68 +0.52E K5III +0.130-0.033 +.025-009V - 237 BD+61 178 4817 11430 I 319 004517.5+611540005116.4+614821122.91-01.07 6.07 +1.88 +1.84 K2Ib-IICN-2 -0.002+0.006 -006V? * - 238 BD+50 161 4818 21767 V526 Cas 004513.9+505748005057.4+513029122.85-11.36 6.39 +0.28 +0.12 F2IV +0.135-0.003 +002V? * - 239 CD-44 216 4849215254 AZ Phe 004522.6-435624005003.7-432341303.82-73.73 6.48 +0.29 +0.12 A9-F0III +0.011+0.016 +015 * - 240 BD+82 20 4853 1433942 004529.8+830952005453.1+834226123.03 20.84 5.62 +0.09 +0.10 A4V +0.062-0.022 +012 65 - 241 BD+50 164 4881 21775 004551.3+510138005133.7+513416122.95-11.30 6.21 B9.5V -0.010-0.019 -014 68 - 242 Rho PheCD-51 209 49192322032056 Rho Phe 004608.0-513157005041.2-505913303.23-66.14 5.22 +0.36 +0.16 F2III +0.067+0.039 +.005+022 * - 243 BD+02 118 4928109507 004609.3+025033005118.3+032306122.87-59.49 6.37 +1.07 +0.89 K0III +0.016-0.067 +006V? * - 244 BD+60 124 5015 11444 721 004705.8+603433005304.1+610727123.13-01.75 4.82 +0.53 +0.12 +0.30 F8V -0.071+0.172 +.066+021SB1O 6 5.5 129.7AB 5* - 245 CD-44 226 5042215270 W 004712.1-441510005152.1-434233302.66-73.42 6.90 +0.35 F2V+F5V +0.025-0.013D+.007+013V? 0.4 0.9 * - 246 BD+37 159 5066 54225 004722.9+380020005253.4+383255123.24-24.32 6.69 +0.02 +0.10 A2V +0.029-0.021 +016SB - 247 CD-24 376 5098166647 I 726 004746.0-243301005240.6-240021128.10-86.87 5.46 +1.24 +1.21 K2III +0.035+0.035D+.007+034SB 4.4 11.0 * - 248 20 CetBD-01 114 51121290091022I 004753.8-014114005300.5-010839123.83-64.01 4.77 +1.57 +1.93 +0.91 M0III +0.008-0.017 -.003+016 - 249 BD+36 148 5118 54237 004758.5+365234005328.2+372505123.38-25.45 6.06 +1.14 gK3 +0.013-0.046 -006V? - 250 BD+51 179 5128 21814 I 735 004801.1+520849005347.6+524121123.29-10.18 6.27 +0.19 +0.15 +0.08 A5m +0.076-0.026D+.013-001 30 3.4 8.2AB 4* - 251 CD-25 338 5156166651 733A 004818.0-251917005312.4-244637132.59-87.62 6.46 +0.44 +0.03 F6IV-V +0.098+0.037D+.006-004V 2.5 5.4 * - 252 Lam1TucCP-70 37 5190248269 W 334 004836.3-700244005224.3-693016302.81-47.62 6.22 +0.56 +0.08 F7IV-V -0.007-0.086 +030 0.7 20.6 - 253 26Ups1CasBD+58 134 5234 21832 I 748 004903.7+582553005500.1+585822123.39-03.90 4.83 +1.21 +1.26 +0.61 K2III -0.032-0.043 +.006-023V? < 17 7.6 94.1AC 3* - 254 66 PscBD+18 122 5267 92145 746 004917.4+183846005435.2+191118123.96-43.68 5.74R -0.01 -0.14 A1VN +0.018-0.014 +.014+010SB 175 0.8 0.5AB 3* - 255 21 CetBD-09 181 5268129019 004914.8-091655005417.6-084427125.17-71.60 6.16 +0.92 +0.54 G5IV +0.018-0.052 +045V - 256 BD+47 242 5273 36763 I 004924.0+480811005505.2+484043123.55-14.19 6.27 +1.68 +2.00 M2.5IIIa -0.022-0.006 -052 - 257 CP-63 83 52762482762057 BQ Tuc 004928.3-632452005337.9-625217302.51-54.25 5.70 +1.56 +1.77 M4III +0.073+0.004 -010 * - 258 36 AndBD+22 146 5286 74359 755 343 004936.6+230513005458.0+233742123.97-39.24 5.47 +1.00 +0.90 +0.50 K1IV +0.131-0.031D+.022+002 0.4 0.6AB 3* - 259 BD+23 126 5316 74365 I 346 004953.4+240055005514.7+243325124.03-38.31 6.20 +1.62 +1.75 M4IIIab +0.020-0.015 -010 - 260 BD+57 172 5343 21846 I 005016.3+572719005612.9+575948123.57-04.87 6.21 +1.37 K3III +0.037-0.014 -030 - 261 BD+67 81 5357 11481 005027.0+681406005655.6+684634123.43 5.91 6.37 +0.38 -0.02 F4III +0.137-0.021 -008 34 - 262 67 PscBD+26 151 5382 743732059 005035.6+264002005558.5+271234124.17-35.65 6.09 +0.14 +0.09 A5IV -0.020+0.013 -008 130 - 263 BD-08 167 53841290322058I 005039.2-075317005542.4-072050126.06-70.19 5.85 +1.52 +1.93 +0.64E K5III -0.007-0.046 +002V * - 264 27Gam CasBD+59 144 5394 11482 32I 782 Gam Cas 005040.1+601031005642.5+604300123.58-02.15 2.47 -0.15 -1.08 -0.08 B0IVe v+0.026-0.005 +.016-007SB 300: 6.3 2.3AB 3* - 265 28Ups2CasBD+58 138 5395 21855 005042.2+583827005639.8+591052123.60-03.68 4.63 +0.96 +0.69 +0.50 G8IIIbFe-0.5 -0.092-0.046 +.051-047V < 17 * - 266 BD+59 146 5408 11484 784 005045.2+594917005647.1+602146123.59-02.50 5.55 -0.07 -0.32 B9IVn +0.032-0.008D+.007-005SB2O 178 0.5 0.2AB 3* - 267 22Phi3CetBD-12 162 5437147519 I 005100.6-114829005601.5-111600127.04-74.10 5.31 +1.52 +1.78 K4III -0.020-0.008 +.009-026V? - 268 CD-28 288 5445166686 I 005104.5-281903005555.5-274632246.23-88.81 6.10 +1.67 +1.97 M0III 0.000+0.002 +022V - 269 37Mu AndBD+37 175 5448 54281 33 788 005112.0+375725005645.2+382958124.07-24.36 3.87 +0.13 +0.15 +0.08 A5V +0.152+0.033 +.039+008 72 6.8 266.7AD 4* - 270 Lam2TucCP-70 40 5457248281 34 005116.2-700404005500.3-693137302.47-47.60 5.45 +1.09 +1.00 K2III +0.006-0.045 +.035+005 - 271 38Eta AndBD+22 153 5516 743882060I W 005151.8+225240005712.4+232503124.65-39.43 4.42 +0.94 +0.69 +0.48 G8IIIb -0.044-0.048 +.009-010SB2O < 17 6.9 131.7 * - 272 BD+45 237 5526 36795 005159.9+451755005739.7+455023124.07-17.02 6.12 +1.02 +0.89 K2III +0.013+0.005 +005 - 273 BD+65 115 5550 11502 005210.9+654842005831.1+662108123.64 3.49 5.97 -0.02 -0.13 A0III +0.043-0.006 -010 - 274 68 PscBD+28 157 5575 743951023I 005225.3+282706005750.2+285932124.62-33.86 5.42 +1.08 gG6 +0.008-0.008 -001 - 275 BD+33 140 5608 543062061 005245.2+332445005814.2+335703124.54-28.90 5.98 +1.00 K0 +0.035-0.072 -017 - 276 BD+12 119 5612 92183 005239.5+130919005754.5+134145125.34-49.15 6.32 +0.89 +0.57 +0.46 G8III -0.011-0.013 +015V * - 277 BD+20 131 5641 74402 805 005259.2+205151005818.9+212416125.07-41.44 6.37R +0.09 +0.11 A2V -0.006-0.003D+.009-006V? 1.4 0.4 * - 278 BD+70 65 5715 42882063 005347.8+702637010031.0+705859123.68 8.12 6.39 +0.13 +0.11 A4IV +0.082 0.000 +006V 101 * - 279 23Phi4CetBD-12 173 5722147546 005343.4-115511005843.9-112248129.49-74.16 5.61 +0.97 +0.66 G7III -0.034-0.019 -019V? - 280 Alp SclCD-30 297 5737166716 35 359 005347.3-295352005836.4-292127268.05-87.27 4.31 -0.16 -0.56 -0.13 B7IIIp +0.022+0.004 +010SBO 7 * - 281 CP-61 50 5771248293 005412.8-611413005822.4-604147301.40-56.41 6.23 +0.10 +0.13 Am +0.050+0.018 +007 - 282 BD+43 193 5788 36832 824B 005423.5+441020010003.4+444240124.54-18.13 6.84H A2Vn +0.011-0.024D+.005+017SB 250 0.8 7.8 * - 283 BD+43 193 5789 36833 824A 005423.7+441028010003.6+444248124.54-18.13 6.04H -0.01 -0.04 B9.5Vn +0.016-0.023D+.005+001SB 298 0.8 7.8 * - 284 BD+05 131 5820109581 I W WW Psc 005438.6+055638005949.7+062859126.69-56.33 6.11 +1.67 +1.92 +1.02E M2III +0.023-0.008 +.001-015V? 7.1 31.0 * - 285 BD+85 19 5848 181 906 005501.5+854314010844.7+861525123.24 23.40 4.25 +1.21 +1.33 +0.60 K2II-III +0.076-0.012 +009 * - 286 BD+88 4 5914 209 005536.8+882915013350.4+890056123.13 26.16 6.46 +0.11 +0.07 A3V +0.062-0.036 -010 - 287 BD+50 202 6028 21938 005629.2+502950010218.4+510206124.68-11.80 6.47 A3V -0.004-0.013 +006 - 288 Xi SclCD-39 260 60551928702064 005638.0-392723010118.3-385500293.64-78.03 5.59 +1.18 K0III +0.069+0.045 +.034-031 - 289 BD+46 243 6114 36875 862 005715.9+465020010301.5+472234124.97-15.45 6.45 +0.25 +0.09 A9IV +0.088-0.015 +.012+003SB 1.0 0.9 * - 290 39 AndBD+40 209 6116 36874 863 005716.9+404827010254.3+412042125.24-21.47 5.98 +0.16 +0.10 +0.05 A5m -0.020-0.010 +004V? 39 6.2 20.9 * - 291 69Sig PscBD+31 168 6118 54374 005720.3+311603010249.1+314816125.75-31.00 5.50 -0.05 -0.18 B9.5V +0.015-0.028 +010SB2O 46 * - 292 BD+60 157 6130 11551 868 005727.2+603215010337.0+610430124.40-01.76 5.92 +0.49 F0II -0.006+0.004 -001V 20 3.1 1.2 - 293 Sig SclCD-32 410 61781928841026 005739.9-320525010226.4-313307275.15-84.97 5.50 +0.08 +0.13 A2V +0.082+0.012 -008V - 294 71Eps PscBD+07 153 6186109627 36I D 005745.1+072106010256.6+075324127.89-54.87 4.28 +0.96 +0.70 +0.52 K0III -0.078+0.023 +.027+007V? < 17 0.0 0.2 * - 295 Ome PheCP-57 220 61922322681027 005748.1-573227010201.8-570009300.04-60.07 6.11 +0.94 G8III +0.006+0.015 +013 - 296 25 CetBD-05 177 6203129094 I W 005759.0-052217010302.6-045012130.52-67.54 5.43 +1.11 +1.04 K0III-IV -0.108-0.106 +015 6.4 99.9 - 297 BD+60 158 6210 11557 005808.7+610238010419.6+613449124.47-01.25 5.84 +0.54 +0.11 F6V -0.070-0.022 -016 30 - 298 BD+51 220 6211 219672066I 005809.5+515800010402.4+523008124.88-10.32 5.99 +1.47 K2 +0.001-0.059 -007 - 299 CD-47 313 62452153432065 005818.8-465607010249.2-462351297.02-70.60 5.36 +0.90 G8III 0.000+0.002 +.025-001 - 300 CD-30 325 6269166774 005831.2-300345010317.6-293133256.19-86.46 6.29 +0.93 +0.59 G5IV -0.114-0.030 +057 - 301 26 CetBD+00 174 6288109643 37 875 005840.1+004951010349.0+012200129.39-61.35 6.04 +0.27 +0.13 F1V +0.122-0.042D+.024+006 3.4 16.0AB 3* - 302 BD+50 212 6300 21988 005855.7+502824010446.8+510036125.08-11.81 6.54 -0.08 -0.57 B3V +0.019-0.002 -003 * - 303 BD+28 174 6301 74471 005859.5+290731010427.6+293931126.31-33.13 6.19 +0.43 -0.05 F7IV-V +0.084-0.116 +000 12 - 304 CP-66 80 6311248308 CC Tuc 005853.1-655936010242.9-652722301.05-51.63 6.21 +1.64 +1.91 +1.33 M2III +0.004 0.000 +035V * - 305 BD+39 249 6314 54398 005858.8+392718010436.4+395928125.67-22.81 6.72 +0.31 +0.04 F0Vn +0.077-0.022 +011 - 306 BD+86 17 6319 193 005906.3+863648011613.5+870843123.27 24.29 6.25 +1.12 +0.99 gK2 +0.051-0.027 +.011-005 - 307 73 PscBD+04 172 6386109656 I 005941.7+050713010452.6+053923129.09-57.05 6.00 +1.51 +1.86 gK5 +0.028-0.014 -015V - 308 72 PscBD+14 163 6397 922301028 889 005948.5+142430010505.4+145646127.84-47.80 5.68 +0.41 -0.06 F4II-III +0.006+0.054 +004SB2 =< 10 7.4 55.2 * - 309 BD+61 206 6416 11571 010004.0+621336010622.8+624542124.64-00.06 6.54 +0.19 +0.06 A5Vn +0.102-0.024 +011SB 125 * - 310 74Psi1PscBD+20 156 6456 74482 899A 397 010019.1+205616010540.9+212824127.34-41.28 5.34 -0.03 -0.06 A1Vn +0.050-0.016D+.016-003V 246 0.3 29.9AB 3* - 311 74Psi1PscBD+20 157 6457 74483 899B 010019.9+205548010541.7+212755127.35-41.28 5.56 -0.07 -0.16 A0Vn +0.047-0.018D+.016-004V 267 0.3 29.9AB 3* - 312 BD+79 29 6473 4331 010039.5+792841010912.3+800042123.74 17.17 6.29R sgG6 -0.030-0.038 -027V - 313 77 PscBD+04 175 6479109666 903A 010038.7+042233010549.2+045430129.66-57.77 6.35 +0.38 -0.05 F3V +0.022-0.121 -007 1.0 33.0AB 5* - 314 77 PscBD+04 176 6480109667 903B 010040.9+042237010551.4+045434129.68-57.77 7.25 +0.49 -0.04 F6V +0.029-0.119 -010V 1.0 33.0AB 5* - 315 27 CetBD-10 229 6482147601 010036.2-103051010536.8-095845134.63-72.53 6.12 +1.01 +0.86 +0.53 K0III -0.034-0.033 +012V? * - 316 BD+56 196 6497 220152069 010055.6+562410010700.2+565606125.06-05.87 6.43 +1.18 +1.26 +0.42E K2III +0.100-0.110 -096 * - 317 28 CetBD-10 230 6530147606 010104.1-102230010605.1-095022134.92-72.37 5.58 +0.01 A1V +0.030+0.004 +011SB2 65 * - 318 BD+52 262 6540 22021 I 915 010112.4+525748010709.5+532954125.30-09.30 6.38R K2III +0.023-0.001 +007 4.0 21.7AB 3* - 319 75 PscBD+12 135 6557 922502068 010117.8+122512010633.6+125722128.64-49.75 6.12 +0.96 G8III +0.019+0.023 +008V - 320 CD-24 484 65591667991029 010117.1-243137010607.7-235933170.31-85.44 6.14 +1.09 +1.00 G8-K0III -0.031-0.041 +033V - 321 30Mu CasBD+54 223 6582 220241030 W 405 010136.8+542547010816.4+545513125.32-07.85 5.17 +0.69 +0.09 +0.42 G5Vb +3.424-1.596 +.136-097SBO 1 5.8 190.5AB 6* - 322 Bet PheCD-47 324 6595215365 W 400 010137.3-471515010605.0-464307295.51-70.20 3.31 +0.89 +0.57 +0.50 G8III v-0.027-0.001 +.021-001 0.2 1.0AB 3* - 323 CD-36 417 6619192925 010145.3-361143010626.5-353939283.32-80.89 6.61 +0.14 +0.16 +0.07 A1V +0.069-0.023 +018SBO * - 324 41 AndBD+43 234 6658 369502071 010216.2+432434010800.9+435631126.08-18.83 5.03 +0.11 +0.14 +0.04 A3m +0.165-0.070 +.031+009 91 * - 325 CD-24 496 6668166814 010221.8-243149010713.1-235947172.43-85.26 6.37 +0.23 +0.09 A7V +0.098-0.036 +015V - 326 BD+57 200 6676 22032 010225.6+574347010833.3+581549125.19-04.53 5.79 -0.01 -0.27 B8V +0.007-0.005 -004 - 327 78 PscBD+31 185 6680 544452072 010229.1+312843010801.3+320044127.02-30.73 6.25 +0.40 -0.01 F5IV +0.204-0.030 +014V 101 * - 328 79Psi2PscBD+19 185 6695 74506 010235.2+201227010757.2+204421128.13-41.96 5.55 +0.13 +0.13 A3V +0.087-0.094 -002V 125 - 329 30 CetBD-10 238 6706147622 010244.5-101914010746.2-094708136.22-72.24 5.82 +0.43 +0.02 F7IV +0.152+0.017 +022V? - 330 80 PscBD+04 190 67631096972073 W 410 010313.0+050715010822.2+053859130.68-56.96 5.52 +0.34 0.00 +0.18 F0III-IV -0.264-0.185 +.036+007 3.8 159.3AC 3* - 331 Ups PheCD-42 391 67672153741031 W 010313.8-420118010747.9-412913290.82-75.25 5.21 +0.16 +0.09 +0.09 A3IV +0.038+0.010 +.014+014V 0.4 0.2 * - 332 Iot TucCP-62 89 6793248324 39 010321.0-621834010718.7-614631299.64-55.25 5.37 +0.88 G5III +0.073-0.012 +.033-008 - 333 BD+78 34 6798 4341 41 010337.2+790830011216.7+794026123.91 16.84 5.64 +0.01 +0.03 A3V +0.091-0.005 +018 175 - 334 31Eta CetBD-10 240 6805147632 40I W 010333.5-104244010835.4-101056137.15-72.58 3.45 +1.16 +1.19 +0.58 K1.5IIICN1Fe0.5 +0.218-0.138 +.041+012V < 17 6.7 233.5 * - 335 42Phi AndBD+46 275 6811 36972 940 Var? 010341.7+464231010930.2+471431126.11-15.52 4.25 -0.07 -0.34 -0.05 B7Ve +0.010-0.009 +.003-000V 71 1.2 0.4 * - 336 31 CasBD+68 77 6829 116122074 W 010353.1+681447011039.3+684643124.68 5.97 5.29 -0.02 -0.06 A0Vnn +0.036-0.031 +.017+001V 215 * - 337 43Bet AndBD+34 198 6860 54471 42I 949 414 010407.8+350526010943.9+353714127.10-27.10 2.06 +1.58 +1.96 +1.00 M0+IIIa e+0.178-0.114 +.049+003V 10.1 80.4AD 5* - 338 Zet PheCP-55 241 6882232306 W Zet Phe 010410.9-554649010823.1-551445297.83-61.71 3.92 -0.08 -0.41 -0.12 B6V+B9V +0.019+0.025D+.013+015SB2O 127 4.0 6.6ABxC 3* - 339 81Psi3PscBD+18 153 6903 92283 Var? 010428.3+190730010949.2+193931128.85-43.00 5.55 +0.69 G0III -0.006+0.009 -008V? 91 - 340 44 AndBD+41 219 6920 369842075 010437.8+413259011018.8+420453126.67-20.65 5.65 +0.60 F8V -0.133-0.043 -011V =< 10 - 341 BD+24 186 6953 74530 I 010453.8+245541011019.4+252728128.29-37.22 5.80 +1.47 +1.82 K7III 0.000-0.114 +005V? - 342 BD+63 149 6960 11615 424 010457.5+634015011125.6+641210125.10 1.42 5.55 -0.07 -0.13 B9.5V +0.040-0.013 -010V 47 * - 343 33The CasBD+54 236 6961 22070 W 423 010500.5+543705011106.2+550859125.76-07.61 4.33 +0.17 +0.12 +0.07 A7V +0.229-0.022 +.014+009SB 102 5.9 145.6 * - 344 BD+14 175 6966 92288 I 010453.2+150831011011.5+154027129.55-46.96 6.06 +1.49 M0III +0.031-0.021 -003V - 345 32 CasBD+64 127 6972 116172078 RU Cas 010510.3+642914011141.4+650108125.07 2.23 5.57 -0.09 -0.28 B9IV +0.023-0.016 -002V 70 * - 346 32 CetBD-09 227 6976129154 010511.0-092616011012.0-085422137.48-71.25 6.40 +1.04 +0.87 K0III -0.013-0.036 -020V? - 347 33 CetBD+01 221 7014109715 I 422 010524.7+015449011033.6+022644132.54-60.07 5.95 +1.51 +1.87 K4III 0.000-0.015 -003V? * - 348 45 AndBD+36 201 7019 54494 W 010532.9+371131011110.3+374327127.24-24.98 5.81 -0.10 -0.40 B7III-IV -0.012-0.007 +.003-001 70 0.0 0.4 * - 349 82 PscBD+30 181 7034 54493 010535.7+305334011106.8+312529127.84-31.26 5.16 +0.23 F0V -0.011-0.014 +002V 84 - 350 CP-58 81 70822323242077 010602.5-581325011007.4-574140298.05-59.26 6.41 +0.89 G6II-III -0.006-0.121 +088 - 351 84Chi PscBD+20 172 7087 745441032I 010604.6+203011011127.2+210205129.18-41.59 4.66 +1.03 +0.82 +0.54 G8.5III-IIIa +0.038-0.011 +.015+016 < 19: - 352 83Tau PscBD+29 190 7106 74546 43I 010609.0+293332011139.6+300523128.12-32.58 4.51 +1.09 +1.01 +0.58 K0.5IIIb +0.072-0.035 +.023+030SB < 17 - 353 34 CetBD-03 161 7147129169 I 010638.3-024656011143.5-021504134.84-64.65 5.94 +1.40 +1.68 K4III -0.062-0.026 -009 * - 354 BD+60 186 7157 11637 987 010648.3+611031011309.9+614221125.50-01.06 6.41 +0.01 -0.27 B9V +0.033-0.021 -002V? 160 2.8 1.2AB 3 - 355 BD+44 261 7158 37023 I 010646.3+444821011234.0+452016126.82-17.37 6.11 +1.64 +2.03 M1III +0.021+0.026 +022V - 356 BD+29 195 7229 74561 990 010728.8+293203011259.5+300351128.47-32.58 6.19 +1.00 +0.75 G9III+G1V +0.020-0.034 +036SB 4.1 10.8AB 4* - 357 BD+79 36 7238 4354 010739.1+792244011630.7+795436124.08 17.09 6.26 +0.42 -0.07 F5V s -0.055+0.059 -043V? 45 - 358 CD-31 484 7259192977 010739.8-311953011223.4-304808252.89-84.13 6.52 +0.48 +0.03 F7IV +0.061-0.077 +014 - 359 CD-38 420 7312192980 44 AI Scl 010809.0-382311011245.4-375123281.60-78.37 5.92 +0.28 +0.12 F0III +0.090-0.034 +010SB * - 360 85Phi PscBD+23 158 7318 745712082I 995 010819.0+240315011344.9+243501129.37-38.01 4.65 +1.04 +0.85 +0.53 K0III +0.017-0.023 +.007+006SB < 17 5.2 7.9AB 3* - 361 86Zet PscBD+06 174 73441097391033 996A 010830.3+070248011343.9+073431132.56-54.88 5.24 +0.32 +0.09 A7IV +0.144-0.056 +.026+009SB 262 0.1 0.1 O 5* - 362 86Zet PscBD+06 175 7345109740 996B 442 010831.7+070258011345.3+073442132.57-54.87 6.30 +0.49 +0.01 F7V +0.147-0.052 +.026+011SBO =< 25 0.1 0.1 O 5* - 363 BD+27 196 7351 74576 I 444 010835.0+280004011405.0+283147128.94-34.08 6.43 +1.70 +1.87 +0.98E S3+/2- +0.079-0.049 +002SB * - 364 87 PscBD+15 177 7374 923262083 445 010848.8+153615011407.6+160801130.84-46.39 5.98 -0.08 -0.41 B8III -0.027-0.026 -016V 28 * - 365 BD+70 90 7389 4358 010900.3+711253011612.1+714438124.89 8.97 7.83 +0.78 +0.35 K1V +0.006+0.004 -017 * - 366 37 CetBD-08 216 7439129193 1003A 446 010921.7-082737011424.0-075523139.80-70.04 5.13 +0.46 -0.05 F5V +0.127+0.273 +.056+022V 12 2.7 49.8 * - 367 88 PscBD+06 181 7446109753 010930.2+062759011442.4+065943133.14-55.41 6.03 +1.08 +1.02 gG6 -0.011-0.024 -009V - 368 38 CetBD-01 162 74761291962084 W 010942.8-013032011449.2-005826136.01-63.25 5.70 +0.42 -0.02 F5V -0.012+0.201 +.028+026V =< 10 6.3 114.1AB 3* - 369 BD+47 357 7546 370672085 011030.5+473314011624.5+480456127.24-14.58 6.61 -0.05 -0.34 B9IIIpSi +0.010+0.001 -014V? - 370 Nu PheCD-46 346 7570215428 011040.4-460356011511.1-453153290.10-71.00 4.96 +0.58 +0.11 +0.36 F8V +0.669+0.183 +.069+012 * - 371 BD+32 223 7578 54567 I: 011044.1+323514011618.8+330653128.91-29.47 6.02 +1.15 K1III +0.016-0.033 +006 * - 372 BD+44 271 7647 37077 I 011115.6+442231011705.1+445407127.70-17.73 6.34R K5 +0.014-0.045 -052 - 373 39 CetBD-03 172 7672129204 W AY Cet 011131.6-030136011636.3-023001137.75-64.64 5.41 +0.90 +0.44 G5IIIe+dA -0.104-0.063 +.015-020V 5.7 177.6 * - 374 BD+30 196 7724 54580 011150.9+311301011724.1+314441129.36-30.80 6.73R K0 -0.052+0.003 -034 - 375 BD+76 40 7732 4376 011159.1+770231012019.5+773414124.54 14.79 6.31 +0.92 G5III -0.018+0.086 -074 - 376 BD+46 319 7758 37096 011216.2+465334011810.2+472511127.61-15.21 6.25 +1.35 K0 +0.018-0.002 -001 - 377 Kap TucCP-69 45 7788248346 W A 454 011222.7-692426011546.1-685234299.66-48.10 4.86 +0.47 +0.03 +0.22 F6IV +0.399+0.107 +.061+009 111 2.2 5.2AB 4* - 378 89 PscBD+02 185 78041097931034 011238.4+030517011748.0+033652135.63-58.61 5.16 +0.07 +0.08 +0.03 A3V -0.046-0.025 +.013+005SB 121 * - 379 BD+36 220 7853 54592 1055 011306.8+365136011847.0+372310128.93-25.17 6.46 +0.23 +0.14 +0.11 A5m -0.011-0.014D+.008+005SB 35 3.1 6.2 - 380 CP-67 81 7916248350 W 011335.5-665531011703.6-662353298.90-50.53 6.24 +0.05 -0.02 A0V +0.044+0.002D+.010+013 2.4 2.4 - 381 BD+75 59 7925 43872087 011351.5+754253012159.1+761420124.79 13.48 6.38 +0.28 +0.07 F0IVn +0.063-0.032 -016 - 382 34Phi CasBD+57 260 7927 22191 I 1073 011347.2+574221012004.9+581354126.71-04.43 4.98 +0.68 +0.49 +0.56 F0Ia 0.000-0.002 -.003-024SB 27 1.9 133.8AC 5* - 383 90Ups PscBD+26 220 7964 74637 45 011358.0+264419011928.0+271551130.56-35.19 4.76 +0.03 +0.10 +0.05 A3V +0.025-0.013 +.019+008SB 93 - 384 35 CasBD+63 176 8003 11712 1088 474 011424.1+640802012105.2+643930126.10 1.97 6.34 +0.09 A2Vnn +0.057-0.019 -015V 240 2.1 55.5 - 385 42 CetBD-01 171 8036129235 1081 011441.5-010202011948.3-003032138.45-62.52 5.87 +0.64 +0.32 G8III+A7V +0.012-0.014D+.009+014SB 0.7 1.6AxBC 3* - 386 BD+77 49 8065 4391 011457.4+781208012346.8+784333124.57 15.96 6.07 +0.39 -0.08 A0Iab -0.009-0.003 -075 - 387 BD-04 185 8120129239 011529.9-034619012034.5-031449140.45-65.12 6.23 +1.02 +0.84 K1III -0.013+0.006 -003 - 388 BD-11 248 81211477462088 011529.8-114543012027.8-111420147.57-72.71 6.15 +1.11 +1.03 K1III -0.047-0.074 -011V? - 389 91 PscBD+27 215 8126 746472089I 011535.4+281257012107.4+284417130.75-33.68 5.23 +1.39 gK5 +0.027-0.078 -036V? - 390 46Xi AndBD+44 287 8207 371551035I 011626.9+450017012220.4+453144128.58-17.00 4.88 +1.08 +0.99 +0.53 K0-IIIb +0.032+0.009 +.026-013SB < 17 * - 391 BD+57 274 8272 22230 1105 011659.5+573721012321.6+580835127.14-04.47 6.45 F4V +0.139-0.094D+.005+007 0.2 0.5AB 4* - 392 BD+00 223 83341098342091I 011728.0+011216012237.0+014335138.75-60.18 6.20 +1.52 +1.86 +0.63E K5IIIab +0.066-0.048 -016V - 393 43 CetBD-01 179 8335129262 487 011727.8-005821012234.8-002659139.87-62.29 6.49 +1.08 +1.01 gK0 +0.023-0.014 +014 - 394 BD-19 229 8350147767 1106 011739.5-193609012230.5-190453166.13-79.24 6.35 +0.48 F6IV -0.056-0.071D+.008-005V? 19 2.2 5.0 * - 395 47 AndBD+36 237 8374 546552093 011757.2+371135012340.6+374254129.94-24.72 5.58 +0.26 +0.13 +0.12 A2Vm +0.083-0.022 +013SB2O 15 * - 396 BD+33 220 8375 54654 011757.1+334312012337.5+341445130.47-28.16 6.29 +0.83 +0.48 G8IV +0.229+0.116 +003V - 397 BD+19 226 8388 74682 I 011800.6+195648012324.9+202808132.99-41.78 5.97 +1.71 K5 -0.009-0.007 -011 - 398 BD+70 102 8424 4401 011824.9+702732012546.5+705848125.75 8.30 6.49R A0Vnn +0.016-0.013 +011 195 - 399 36Psi CasBD+67 123 8491 11751 46I 1129 011851.7+673629012556.0+680748126.15 5.47 4.74 +1.05 +0.94 +0.52 K0III +0.074+0.026 +.013-012V < 17 5.2 23.2AC 4* - 400 CD-31 562 84981930901036I 011851.7-312800012331.0-305644243.40-82.02 5.84 +1.61 +2.05 +0.80E K5III -0.012-0.046 -016 * - 401 44 CetBD-08 243 8511129275 W AV Cet 011900.7-083139012402.5-080027146.42-69.38 6.21 +0.23 +0.09 F0V +0.174-0.070 +006 157 4.7 84.6 * - 402 45The CetBD-08 244 8512129274 47I 1118 011901.5-084158012401.4-081100146.59-69.54 3.60 +1.06 +0.93 +0.56 K0III-IIIb -0.079-0.218 +.041+017V? < 17 11.0 65.4 * - 403 37Del CasBD+59 248 8538 22268 48I W Del Cas 011916.1+594256012549.0+601407127.19-02.35 2.68 +0.13 +0.12 +0.09 A5III-IV v+0.297-0.051 +.037+007SB 113 8.7 131.7 * - 404 BD-07 223 8556129277 1123 011918.8-072611012420.6-065453145.55-68.33 5.91 +0.41 -0.05 F3V +0.042+0.003D+.023+032SBO 0.2 0.2 * - 405 BD-16 237 8589147793 011945.7-161053012439.8-153937158.54-76.18 6.14 +0.91 +0.54 G5 +0.012-0.005 +013V * - 406 BD-03 195 85991292801037 011943.8-032209012448.7-025055142.56-64.44 6.15 +0.96 +0.71 G8III +0.013-0.030 -027 - 407 BD+22 226 8634 747072096 012007.7+225928012535.7+233042132.98-38.69 6.18 +0.43 0.00 F5III +0.032-0.021 -016SBO 34 * - 408 CD-42 493 86512154922095 012015.2-420046012440.8-412933279.66-74.10 5.42 +1.04 +0.86 +0.49 K0III +0.022-0.038 -.012+074 - 409 BD+42 302 8671 37204 012025.6+425620012618.6+432728129.61-18.96 5.96 +0.49 +0.01 F7V +0.103-0.060 +031 =< 6 - 410 BD+33 228 8673 54695 012027.1+340342012608.7+343447131.00-27.75 6.31 +0.47 +0.01 F7V +0.230-0.087 +017 32 * - 411 CD-45 463 8681215494 012021.3-450257012441.9-443142284.11-71.36 6.26 +1.14 +1.08 +0.52 K1II -0.009-0.018 -010V - 412 46 CetBD-15 266 8705147803 I 012042.1-150708012537.2-143556157.07-75.16 4.90 +1.23 +1.26 K2.5IIIb +0.039-0.018 +.007-023V < 17 - 413 93Rho PscBD+18 187 8723 92436 506 012051.7+183907012615.3+191020134.19-42.94 5.38 +0.39 -0.10 F2V: v-0.024+0.010 +.038-009V 61 - 414 94 PscBD+18 189 8763 924441039 012117.4+184320012641.7+191425134.31-42.85 5.50 +1.11 +1.05 K1III +0.050-0.061 +.013-042V * - 415 BD+33 234 8774 54705 012125.1+335129012706.2+342239131.25-27.92 6.27 +0.46 +0.02 F7IVb vs +0.154-0.011 +015 23 * - 416 BD-01 189 8779129300 012120.2-005507012627.3-002355141.83-61.98 6.41 +1.24 +1.27 K0IV +0.044-0.001 +.023-006V - 417 48Ome AndBD+44 307 8799 372281040 1152 012140.1+445326012739.4+452424129.56-17.00 4.83 +0.42 0.00 +0.23 F5IV +0.351-0.107 +.030+011 69 6.6 119.0AC 4* - 418 BD+40 289 8801 37227 1151 012137.5+403452012726.6+410602130.20-21.26 6.46 +0.27 +0.03 +0.16 A7m +0.003-0.001 +001 70 5.9 15.3 * - 419 BD+02 211 8803109895 1148 012143.4+030059012653.5+033207139.88-58.16 6.58 -0.04 -0.19 B9V+A8V +0.004-0.035 -.016+015V 210 2.5 6.0 * - 420 CP-65 130 88102483811038 012137.8-645322012505.3-642210296.98-52.37 5.93 +1.56 +1.92 K5III +0.023-0.019 +023 - 421 47 CetBD-13 262 88291478121041 512 012155.5-133435012651.6-130324155.16-73.67 5.66 +0.35 +0.02 F0IIIDel Del +0.016+0.009 +010 - 422 BD+39 334 8837 37234 012158.8+394901012747.0+402008130.39-22.01 6.60 -0.04 -0.17 A0III +0.015-0.019 -001V? 135 * - 423 CD-33 525 8879193122 I W R Scl 012221.9-330342012658.1-323235250.18-80.59 5.79 +3.86 +7.4 +1.38 C6II -0.011-0.031 -008 11.9 10.0 * - 424 1Alp UMiBD+88 8 8890 308 907 1477 Alp UMi 012233.7+884626023148.7+891551123.28 26.46 2.02 +0.60 +0.38 +0.31 F7:Ib-II v+0.038-0.015 +.007-017SBO 17 6.8 18.4AB 5* - 425 BD-11 272 8921147819 1162 012247.5-112515012746.6-105406152.44-71.66 6.13 +1.32 +1.36 K4III-IV +0.180+0.019 +004 3.7 1.5 - 426 BD+07 213 8949109907 W 519 012308.2+072636012822.9+075741138.54-53.79 6.20 +1.12 +1.08 K1III +0.112-0.003 +002 2.1 69.0 * - 427 38 CasBD+69 102 9021 44221042 012346.8+694500013113.8+701553126.30 7.65 5.81 +0.47 -0.11 F6V +0.137-0.077 +.039+005SBO * - 428 BD+65 175 9030 11788 012352.7+653454013052.3+660553126.92 3.53 6.14 +0.08 +0.05 A2V s +0.084-0.010 -.001+009SB 75 * - 429 Gam PheCD-43 449 9053215516 49I: Gam Phe 012401.4-434950012821.9-431906280.52-72.17 3.41 +1.57 +1.85 +0.98 M0-IIIa -0.014-0.209 +.000+026SB1O * - 430 49 AndBD+46 370 9057 37275 I 012406.0+462929013006.2+470026129.75-15.35 5.27 +1.00 +0.82 K0III +0.008-0.044 +.015-011 < 19: - 431 CD-34 576 9065193136 WZ Scl 012409.6-341651012843.3-334549254.77-79.59 6.58 +0.30 +0.07 F0IV -0.055-0.025 -005 * - 432 97 PscBD+17 210 9100 92463 VX Psc 012428.8+175019012952.9+182120135.56-43.57 6.02 +0.14 +0.14 A4IV +0.063-0.003 +004 108 * - 433 48 CetBD-22 254 91321670861043 1184 012448.3-220848012936.1-213746182.65-79.72 5.12 +0.02 +0.04 A1V +0.056+0.006 +.028+001V 7.5 22.0 - 434 98Mu PscBD+05 194 91381099262099I W 012456.6+053742013011.1+060838140.07-55.43 4.84 +1.37 +1.54 +0.74 K4III +0.294-0.048 +.018+034V < 17 5.6 182.5AB 3* - 435 CD-47 440 9184215525 AW Phe 012516.5-471625012930.4-464523284.52-68.99 6.31 +1.66 +1.87 +1.39 M2III -0.012+0.013 +018 * - 436 CD-26 502 9228167093 I 1193 012540.1-264327013022.9-261228209.10-81.25 5.93 +1.34 +1.41 K4III +0.045+0.002 -001 5.0 2.9 * - 437 99Eta PscBD+14 231 9270 92484 50I 1199 532 012607.8+144949013129.0+152045137.01-46.43 3.62 +0.97 +0.75 +0.50 G7IIIa +0.028-0.006 +.015+015V < 19: 3.6 0.8 * - 438 BD+34 265 9298 547622100 012625.3+341706013207.6+344800132.33-27.33 6.39 -0.12 -0.42 B7IIIpHgMn -0.008-0.002 -001 60 - 439 BD+57 320 9352 22389 I S 012656.0+574848013325.8+581939128.44-04.09 5.70 +1.52 +1.15 K0Ib+B9V +0.011+0.002 -001 =< 50 * - 440 Del PheCD-49 425 93622155361044 012705.3-493532013115.1-490422286.27-66.75 3.95 +0.99 +0.70 +0.51 K0III +0.142+0.151 +.031-007 - 441 CD-30 506 9377193163 012705.8-304747013143.3-301700234.96-80.63 5.82 +1.08 K0III +0.009-0.067 +003V? - 442 39Chi CasBD+58 260 9408 22397 I 012723.4+584308013355.9+591355128.35-03.19 4.71 +1.00 +0.76 +0.53 G9IIIb -0.037-0.021 +.021+006 < 19: - 443 CD-46 420 9414215539 I 012724.1-460526013139.1-453432282.11-69.89 6.17 +0.06 +0.09 +0.03 A2V 0.000+0.006 +008 4.2 1.4 * - 444 BD-09 298 9484129363 Var 012804.3-093144013303.5-090053153.38-69.39 6.59 -0.04 -0.10 A0III +0.029+0.003 +010V? * - 445 CD-37 589 95251931732101 012827.6-372243013256.0-365155263.48-76.89 5.51 +1.02 K0III +0.002-0.023 +.007+013V? - 446 BD+36 277 9531 54788 KK And 012830.0+364328013416.6+371414132.32-24.85 5.88 -0.07 -0.30 B9IV +0.009-0.015 +.018-004V 175 * - 447 CD-50 411 9544215547 012830.5-501422013236.3-494340286.40-66.06 6.28 +0.46 F4V -0.030-0.077 +002 - 448 BD-07 256 9562129371 012840.9-073211013342.9-070131151.37-67.53 5.76 +0.64 +0.21 G2IV +0.180-0.081 -015V? =< 10 - 449 BD+73 81 9612 4448 012909.4+734723013722.5+741803126.09 11.71 6.58 +0.03 -0.16 B9Ve +0.027-0.009 -008V? - 450 BD+17 224 9640 92520 I 012924.3+175700013449.1+182738137.11-43.21 5.89 +1.52 +1.80 M2IIIab +0.033-0.069 -026 - 451 49 CetBD-16 265 9672147886 012944.6-161119013437.8-154034166.32-74.78 5.63 +0.07 +0.05 A3V +0.096+0.003 +009V? - 452 BD+40 328 9712 37344 012958.4+403353013552.5+410435131.88-21.02 6.38 +1.11 +1.00 K1III +0.139-0.002 +065 - 453 CD-32 613 9742193188 013016.9-322412013450.7-315332242.30-79.43 6.12 +1.11 K0-1III -0.077-0.036 -011 - 454 BD+47 460 9746 37351 OP And 013020.2+481243013627.2+484322130.54-13.48 5.92 +1.21 gK1 -0.012-0.017 -043V * - 455101 PscBD+13 240 9766 92530 559 013025.5+140901013546.4+143941138.71-46.85 6.22 -0.04 -0.21 B9.5III +0.004-0.011 -016V 220 - 456 40 CasBD+72 86 9774 4453 51 1268 567 013030.9+723149013830.9+730224126.40 10.49 5.28 +0.96 +0.72 G8III -0.013-0.015 +.017-005V < 19: 6.4 53.3 - 457 BD+16 176 9780 92531 013030.0+165519013554.8+172601137.79-44.15 5.80R F0IV +0.152+0.010 +003SB 97 - 458 50Ups AndBD+40 332 9826 373621045I W 013055.5+405419013647.8+412420132.00-20.66 4.09 +0.54 +0.06 +0.29 F8V -0.171-0.382 +.062-028SBO 8 8.4 114.0AB 3* - 459 50 CetBD-16 270 98561479012104I 013106.3-155442013559.0-152401166.61-74.36 5.42 +1.21 +1.20 K2IIIaBa0.2CN1 +0.023+0.011 +024V < 19: - 460 CP-58 123 9896232470 561 013130.3-583900013515.2-580822292.01-58.05 6.01 +0.38 F2V +0.277-0.035 +.011+001? * - 461 BD+57 349 9900 224562108I 013135.0+572805013807.6+575839129.11-04.33 5.56 +1.38 +1.43 +0.71 G5II +0.007-0.006 -008V? * - 462 Tau SclCD-30 540 9906193201 W 013131.2-302510013608.4-295427231.37-79.80 5.69 +0.33 F2V +0.100+0.040D+.025+005 63 1.1 0.9 * - 463102Pi PscBD+11 205 9919 925361046 013147.7+113749013705.9+120830140.16-49.20 5.57 +0.35 -0.02 +0.21 F0V -0.066+0.043 -001V 96 - 464 51 AndBD+47 467 9927 37375 52I 013151.0+480718013759.6+483742130.81-13.53 3.57 +1.28 +1.45 +0.65 K3-III +0.065-0.113 +.021+016V < 17 * - 465 BD+44 341 9996 37393 GY And 013230.2+445326013831.7+452400131.53-16.68 6.36 +0.04 -0.10 B9pCrEu v-0.034+0.014 +003SB1O 19 * - 466 BD-10 343 100091294122109 W 013237.7-095458013737.7-092414156.70-69.19 6.24 +0.53 0.00 F7V +0.259+0.093 +.024+048V? 0.4 0.2 * - 467 CP-79 40 10042255794 53 W 013259.1-790045013339.2-783017300.26-38.41 6.11 +0.97 +0.70 K0III -0.034-0.136 -001 7.4 50.1 * - 468 CP-58 126 10052232477 013304.9-584651013644.8-581615291.74-57.86 6.18 +1.61 +1.89 M3III +0.022+0.003 -002 - 469 52Chi AndBD+43 343 10072 374062112I 013320.9+435239013921.0+442310131.89-17.65 4.98 +0.89 +0.55 G8III -0.022+0.012 +.009+007SB < 17 - 470 BD+53 363 10110 22493 I 013351.4+532139014013.1+535206130.16-08.32 6.39 +1.61 +1.98 K5III -0.011-0.002 -062 - 471 CD-37 620 10142193224 013400.9-370200013827.4-363142259.18-76.31 5.94 +1.05 +0.90 +0.37E K0IV -0.018-0.128 +030 * - 472 Alp EriCP-57 334 10144232481 54 Var 013359.4-574441013742.9-571412290.84-58.79 0.46 -0.16 -0.66 -0.11 B3Vpe v+0.095-0.035 +.026+016V 251 * - 473 BD-22 272 101481671982113 013405.0-214705013851.8-211631187.04-77.72 5.58 +0.34 A4n +0.131+0.036 +014V - 474 CD-25 670 10161167199 1298 013408.4-253150013850.0-250119204.39-79.16 6.70 -0.08 -0.17 B9Vn +0.001+0.011 +015V 6.2 20.3 - 475105 PscBD+15 245 10164 92558 013416.9+155355013940.8+162421139.37-44.92 5.97 +1.12 K2III +0.077-0.015 +017V - 476 BD+42 345 10204 37419 013439.7+424730014039.8+431752132.35-18.67 5.61 +0.21 +0.14 sgA9 +0.127-0.037 +017V 82 * - 477 53Tau AndBD+39 378 10205 37418 1311 584 013440.4+400414014034.8+403437132.92-21.34 4.94 -0.09 -0.41 -0.07 B8III +0.013-0.025 -014SB 91 5.9 52.3 * - 478 43 CasBD+67 149 10221 11919 55 V557 Cas 013455.6+673214014220.5+680235127.68 5.64 5.59 -0.07 -0.23 A0pSiSr +0.052-0.009 +005 28 * - 479 CP-54 358 10241232483 W 013455.7-535644013848.2-532620287.70-62.27 6.84 +0.44 +0.11 F5IV-V -0.027-0.046 -003 1.3 10.4 * - 480 42 CasBD+69 114 10250 4470 590 013510.0+700702014255.9+703721127.21 8.18 5.18 -0.04 B9V +0.077-0.013 +.004+006SB 117 * - 481 BD+60 308 10260 11920 013515.7+603157014203.0+610218129.02-01.23 6.71 -0.03 -0.41 B8IIIpSi +0.015-0.007 -013V * - 482 BD+57 370 10293 22520 1334 013539.3+580720014217.8+583740129.52-03.59 6.37 -0.02 -0.45 B8III +0.019-0.010 -004V? 35 2.4 20.1AB 3* - 483 BD+41 328 10307 37434 A 013541.6+420642014147.2+423649132.70-19.30 4.95 +0.62 +0.12 +0.33 G1.5V +0.809-0.154 +.081+004V? 2 0.1 * - 484 BD+25 276 10308 748702115 1326 013543.5+251427014118.4+254445136.80-35.78 6.17 +0.44 0.00 F2III +0.118-0.040 +.023+005SB2O 12 4.4 10.6AB 3* - 485 BD+29 286 10348 74872 013559.9+293230014139.2+300250135.69-31.58 5.99 +1.01 +0.84 +0.46 K0III -0.015-0.006 +005 * - 486 CP-56 329 10360232492 W B 013559.9-564215013947.4-561153289.60-59.66 5.87 +0.90 +0.59 K0V +0.310-0.020 +.152+023SB 0.1 10.8 * - 487 CP-56 329 10361232490 W A 013600.5-564208013947.8-561141289.60-59.66 5.76 +0.87 +0.53 +0.48 K5V +0.279+0.020 +.152+020 0.1 10.8 * - 488 BD+60 312 10362 11931 013608.7+605459014258.4+612518129.06-00.84 6.34 +0.01 -0.45 B7II +0.004+0.011 -005 * - 489106Nu PscBD+04 293 10380110065 56I 013613.5+045854014125.9+052915145.12-55.22 4.44 +1.36 +1.57 +0.71 K3IIIbBa0.1 -0.021+0.002 +.041+000 < 19: - 490 BD+34 297 10390 549121047 013616.5+344427014203.5+351444134.46-26.49 5.64 -0.07 -0.20 B9IV-V +0.049-0.028 -002V 70 - 491 44 CasBD+59 307 10425 11941 1344 013633.2+600249014319.7+603304129.27-01.68 5.78 -0.02 -0.32 B8IIIn +0.008-0.020 -033SB 130: 5.1 66.0AC 4* - 492 BD-12 315 10453147962 1339 013648.6-114907014144.7-111929162.14-70.26 5.75 +0.44 -0.01 F5V+F7V +0.043-0.412 +.035-010V 1.1 1.8 * - 493107 PscBD+19 279 10476 74883 W 600 013703.9+194657014229.8+201607138.88-41.01 5.24 +0.84 +0.49 +0.43 K1V -0.296-0.672 +.119-034V? < 19: 6.4 19.0AB 3 - 494 CD-38 584 10481193255 013703.9-383824014127.3-380759262.44-74.80 6.17 +0.42 +0.04 F2V +0.050+0.052 +011 - 495 BD+44 354 10486 37460 013711.0+444905014316.5+451920132.40-16.59 6.34 +1.01 +0.92 +0.48 K2IV +0.146-0.017 +012 * - 496 Phi PerBD+49 444 10516 22554 57I Phi Per 013723.3+501106014339.6+504119131.32-11.33 4.07 -0.04 -0.93 +0.02 B2Vep +0.026-0.014 +.025+001SB2O 450 * - 497 Pi SclCD-32 666 105371932631048I 013737.8-324952014208.6-321937241.27-77.84 5.25 +1.05 +0.79 +0.54 K0III -0.065-0.025 -.005+010V? * - 498 CD-37 650 10538193261 58 013738.5-372012014203.0-364957258.27-75.56 5.72 -0.01 -0.01 A1V -0.028-0.021 +017V - 499 BD+56 330 10543 22566 1359 013741.3+570202014417.9+573211130.00-04.61 6.21 +0.10 +0.03 A3V +0.039-0.040 -.003+005 70 1.4 1.2 * - 500 BD-04 260 105501294651049I 013740.1-041138014243.5-034125152.75-63.55 4.99 +1.38 +1.58 K3II-III -0.007-0.032 +.009-034 < 19: - 501 CD-50 461 10553232497 013741.8-503236014141.1-500220283.51-65.15 6.64 +0.12 +0.12 +0.07C A3V -0.023-0.020 -007V? - 502 BD+56 334 10587 22578 013810.9+563510014446.1+570521130.16-05.03 6.25 +0.04 +0.06 A2V +0.014-0.004 +005 170 - 503 BD+31 301 10588 54939 Var? 013807.2+314118014350.0+321130135.65-29.38 6.34R G8III-IV -0.022-0.007 -005SBO * - 504 BD+45 432 10597 37475 I 013820.2+453815014426.5+460823132.43-15.75 6.35R K5III -0.009-0.028 -019 - 505 CP-61 130 106152484212116 013822.5-611734014148.0-604722292.17-55.27 5.71 +1.27 K2-3III +0.015-0.041 +002 - 506 CP-54 365 10647232501 013838.1-541432014229.3-534426286.90-61.77 5.52 +0.53 0.00 F9V +0.171-0.093 +013 - 507 BD-05 309 10658129477 I 013852.6-051604014354.8-044556154.47-64.37 6.19 +1.54 +1.90 K0 -0.020-0.032 +020 - 508109 PscBD+19 282 10697 92611 I 013928.0+193501014455.8+200459139.67-41.04 6.27 +0.75 +0.23 G3Va -0.041-0.109 +.027-044V? - 509 52Tau CetBD-16 295 10700147986 59I W 013925.3-162751014404.1-155615173.19-73.43 3.50 +0.72 +0.21 +0.47 G8V -1.718+0.856 +.275-016V 2 9.5 89.8 - 510110Omi PscBD+08 273 10761110110 60I 615 014006.7+083916014523.6+090928144.61-51.43 4.26 +0.96 +0.71 +0.48 G8III +0.073+0.048 +.023+014 < 17 * - 511 BD+63 238 10780 11983 W 014030.5+632132014744.8+635108129.08 1.66 5.63 +0.81 +0.40 +0.39 K0V +0.582-0.255 +.107+003V? 3.1 91.1 * - 512 CP-83 27 10800258271 I' 014033.8-832902013755.6-825830301.23-34.00 5.87 +0.61 +0.10 G2V +0.119+0.120 -005V - 513 BD-06 336 108241294902117I 014058.0-061401014559.3-054400156.61-64.97 5.34 +1.52 +1.88 K4III -0.007-0.033 +011V? - 514 Eps SclCD-25 704 10830167275 61 1394 014057.7-253308014538.8-250309206.28-77.66 5.31 +0.39 +0.02 F1V +0.162-0.057 +.037+015V 86 3.2 4.9AB 4* - 515 BD+16 196 10845 92622 VY Psc 014109.5+165443014635.3+172447141.20-43.49 6.55 +0.25 +0.17 A9III +0.053+0.011 -001SB 67 * - 516 Tau1HyiCP-79 44 10859255806 W 014117.5-793908014121.3-790854299.99-37.69 6.33 +0.94 +0.69 G6-8III +0.052+0.009 +002 6.0 16.0 * - 517 CD-27 595 10863167279 014123.5-275054014601.0-272057217.10-77.87 6.39 +0.36 F2Vn +0.095-0.052 +006V - 518 BD+45 447 10874 375132119 014139.5+454354014748.0+461347133.00-15.54 6.32 +0.43 0.00 F6V +0.014-0.056 -003 27 - 519 CD-51 419 10934232519 I' 014210.7-511858014605.8-504859282.92-64.14 5.49 +1.60 +1.95 +1.27 M3III +0.034-0.024 -.023-002 - 520 CP-54 377 109392325202118 014217.5-540126014606.3-533119285.68-61.74 5.04 +0.04 +0.05 A1V +0.127+0.056 +.023+010 56 - 521 BD+37 372 10975 54991 014244.6+372718014838.9+375710135.20-23.55 5.94 +0.97 +0.71 K0III +0.112-0.029 +037V? - 522 4 AriBD+16 203 10982 926371050 014245.3+162727014810.9+165720141.89-43.82 5.84 -0.03 -0.12 B9.5V +0.053-0.036 +010SB 22 - 523 BD+31 316 11007 549942120 014257.7+321101014841.6+324125136.65-28.66 5.79 +0.55 -0.01 F8V -0.167+0.298 +.038-027V =< 6 - 524 CD-42 633 11022215650 014302.5-421538014716.8-414536268.52-71.43 6.18 +1.54 +1.91 K5-M0III +0.024+0.042 -013 - 525 CP-85 17 11025258273 916 014308.3-851629013728.0-844611301.70-32.25 5.69 +0.94 +0.66 G8III +0.034+0.021 +018 - 526 BD+47 508 11031 37536 1438 014302.9+472356014915.7+475349132.86-13.86 5.82 +0.29 +0.07 A3V -0.010-0.002D+.008-002SB2 0.7 1.9AB 4* - 527 BD+02 270 110371101382121 014315.1+031111014826.0+034108149.17-56.25 5.91 +0.97 +0.74 G9III -0.006+0.017 +003V? - 528 CD-37 687 11050193303 014325.8-373932014747.8-370935256.59-74.45 6.32 +1.02 K0III +0.008+0.011 +015 - 529 BD+51 416 11151 22678 014432.7+512625015057.1+515600132.18-09.87 5.90 +0.43 +0.02 F5IV +0.041-0.120 -017 40 - 530 1 AriBD+21 243 11154 74966 1457 014436.9+214644015008.5+221631140.39-38.60 5.86 +0.74 +0.50 +0.49 K1III+A6V -0.017-0.008 +.017+003SB 1.1 2.8 * - 531 53Chi CetBD-11 352 111711480361051 W 014440.3-111052014935.1-104111165.48-68.61 4.67 +0.33 +0.03 +0.16 F3III -0.146-0.093 +.046-001 61 2.1 184.0 * - 532 CD-31 753 11183193320 014448.0-313410014919.5-310422233.70-76.77 6.34 +1.22 K2-3III +0.101-0.026 +020 - 533 1 PerBD+54 396 11241 226902122 V436 Per 014525.0+543908015159.3+550851131.57-06.70 5.52 -0.18 -0.83 B1.5V +0.014-0.008 -003SBO 198 * - 534 BD+10 252 11257 92659 D 635 014533.5+103254015052.0+110236145.58-49.20 5.94 +0.30 -0.03 +0.17 F2V w -0.070-0.027 +011V 0.0 0.1 * - 535 CD-39 553 11262193326 W 014529.9-385425014948.8-382414259.30-73.37 6.37 +0.52 F8V -0.003+0.233 +.022+022V? 7.0 28.0 - 536 2 PerBD+50 379 11291 226961052 014547.5+501755015209.4+504734132.64-10.93 5.79 -0.07 -0.30 B9IIIpHgMn +0.017-0.026 +010SB1O 22 * - 537 CD-48 487 11332215673 014619.4-481849015020.2-474859277.77-66.33 6.14 +1.01 +0.88 +0.34E K1IV +0.124+0.051 +012 * - 538 BD+50 381 11335 22705 014626.9+505851015250.8+512829132.58-10.24 6.26 A3V -0.011-0.009 +006V 135 - 539 55Zet CetBD-11 359 11353148059 62I W 638 014631.4-104945015127.6-102006165.88-68.05 3.73 +1.14 +1.07 +0.55 K0IIIBa0.1 +0.041-0.039 +.031+009SB1O < 19: 6.2 187.0 * - 540 BD+54 408 11408 22716 014710.9+550617015348.5+553553131.72-06.21 6.45 +0.18 +0.11 +0.07 A5m +0.049+0.001 +008 57 - 541 CD-50 514 114132325422123 BD Phe 014701.6-504204015054.5-501222280.70-64.28 5.94 +0.14 A1Vp -0.042-0.003 +007 * - 542 45Eps CasBD+62 320 11415 12031 63 652 014711.7+631040015423.7+634012129.84 1.65 3.38 -0.15 -0.60 -0.12 B3III +0.032-0.021 +.010-008V 19 * - 543 55 AndBD+40 394 11428 375872124I W 014717.3+401411015317.3+404347135.40-20.64 5.40 +1.32 +1.41 gK1 -0.010-0.006 +.006-007V? 5.3 59.8 - 544 2Alp TriBD+28 312 11443 74996 64I W 014722.7+290530015304.9+293444138.64-31.40 3.41 +0.49 +0.06 +0.28 F6IV +0.011-0.235 +.057-013SB1O 93 8.6 222.3AC 3* - 545 5Gam1AriBD+18 243 11503 92680 1507B Var? 014802.4+184821015331.8+191745142.55-41.20 4.83H B9V v+0.078-0.112 +.026+004V 152 0.1 7.8AB 3* - 546 5Gam2AriBD+18 243 11502 92681 1507A Gam Ari 014802.4+184813015331.8+191737142.55-41.20 4.75H -0.04 -0.13 -0.05 A1pSi +0.079-0.104 +.026-001V 63 0.1 7.8AB 3* - 547 BD-17 336 115221480782125 BK Cet 014803.6-172517015252.1-165545180.42-72.52 5.80 +0.27 +0.09 F0IIIn +0.042-0.053 -004 * - 548 46Ome CasBD+67 169 11529 120382129 659 014813.5+681139015600.0+684107128.77 6.55 4.99 -0.10 -0.40 B8III +0.013-0.011 -024SBO 34 * - 549111Xi PscBD+02 290 11559110206 65I 654 014822.6+024138015333.3+031115151.64-56.18 4.62 +0.94 +0.72 +0.47 K0III +0.022+0.023 +.005+030SBO < 17 * - 550 Tau2HyiCP-80 35 11604258280 W 014842.4-804015014746.5-801036299.96-36.63 6.06 +0.34 +0.04 F0IV -0.074-0.071 +030 7.4 39.7 - 551 BD+39 434 11613 37607 014852.5+401244015453.8+404207135.72-20.59 6.24 +1.25 K2 +0.047-0.066 +032SBO * - 552 BD+36 346 11624 55082 I: 014902.9+363813015457.5+370742136.75-24.03 6.26 +1.17 K0 +0.021-0.010 -002 - 553 6Bet AriBD+20 306 11636 75012 66I 658 014906.8+201909015438.4+204829142.24-39.68 2.64 +0.13 +0.10 +0.08 A5V +0.096-0.111 +.074-002SBO 79 * - 554 CD-39 573 116431933682127 014904.9-390517015323.2-383541258.35-72.71 6.10 +1.12 K1II +0.131+0.027 +022 - 555 Psi PheCD-46 552 11695215696 67I Psi Phe 014938.2-464732015338.8-461809274.35-67.22 4.41 +1.59 +1.70 +1.52 M4III -0.086-0.087 +.011+002SB * - 556 BD+36 354 11727 55102 I 1534B 014959.3+364715015554.4+371640136.91-23.84 5.89 +1.63 gM0 +0.004-0.003 +007V =< 25 0.2 190.4AB 4* - 557 56 AndBD+36 355 11749 55107 1534A 015012.7+364540015609.3+371506136.96-23.85 5.67 +1.06 +0.91 K0III +0.182+0.006 +059 =< 25 0.2 190.4AB 4* - 558 Phi PheCD-43 583 117532156971053 015013.0-425915015422.0-422949267.17-69.99 5.11 -0.06 -0.15 -0.06 A3V -0.028-0.032 +012SB 13 * - 559 7 AriBD+22 284 11763 750302130I RR Ari 015016.3+230514015551.0+233438141.48-36.96 5.74 +1.19 +1.04 K1III +0.009-0.013 +014 * - 560 BD+01 347 11803110235 1538 667 015043.6+012116015553.8+015059153.67-57.13 6.01 +0.56 +0.04 F7V+G0V +0.158+0.184 +.025+030SB 0.1 1.5 * - 561 BD+60 398 11857 12065 678 015127.5+611236015833.3+614153130.80-00.14 6.02 -0.04 -0.40 B5III +0.014-0.008 +007V * - 562 BD+40 407 11905 37653 015152.2+411223015756.4+414140136.03-19.48 6.78 -0.06 -0.39 B8III +0.012-0.014 +003V 8 * - 563 8Iot AriBD+17 289 11909 927212132I 015153.1+171946015721.1+174903144.34-42.30 5.10 +0.92 +0.70 K1p +0.037-0.018 -005SBO < 17: 1.0 0.0 * - 564 BD+27 310 11928 75048 I 015202.7+271904015743.8+274816140.40-32.81 5.82 +1.60 +1.89 M2III +0.026-0.058 -003V - 565 56 CetCD-23 721 119301674162131I 015159.2-230054015640.2-223137199.22-74.52 4.85 +1.42 +1.67 +0.56E K4III +0.062-0.029 -.012+027 - 566 Chi EriCP-52 241 11937232573 68 W 671 015204.0-520623015557.5-513632280.88-62.67 3.70 +0.85 +0.46 +0.45 G8IIIbCNIV +0.681+0.292 +.058-006 6.5 4.8 * - 567 BD+63 265 11946 12076 1571 015215.1+640806015938.0+643717130.16 2.71 5.26 +0.01 -0.05 A0Vn +0.033-0.020 +005V 360 5.6 41.5 * - 568 3 PerBD+48 576 11949 37665 015212.0+484256015833.6+491215134.06-12.21 5.69 +1.01 K0IV +0.010+0.038 -000 - 569 9Lam AriBD+22 288 11973 75051 1563A 680 015221.2+230630015755.7+233546142.04-36.80 4.79 +0.28 +0.09 +0.16 F0V -0.090-0.013 +.028-001SB 99 2.5 37.4AB 4* - 570 Eta2HyiCP-68 101 11977248460 69 015224.0-680821015456.1-673850293.93-48.35 4.69 +0.95 +0.64 +0.49 G8.5III +0.074+0.074 -016 * - 571 CP-61 157 11995248464 015234.6-612107015546.4-605141289.48-54.55 6.06 +0.37 +0.01 F0IV-V +0.004+0.056 +015 - 572 BD+77 73 12005 4555 015249.0+772554020257.2+775459126.76 15.58 6.04 +1.14 K0 -0.004-0.002 -003 - 573 CP-52 242 12042232581 015311.2-521541015700.1-514558280.76-62.45 6.10 +0.48 -0.04 F6-7V +0.359+0.248 +.056+004 - 574 CD-47 597 12055215715 015312.2-475225015710.0-472306274.84-66.00 4.83 +0.88 +0.52 +0.45 G8III +0.103+0.016 +.021+012 - 575 48 CasBD+70 153 12111 4554 1598 694 015344.0+702520020157.4+705425128.69 8.83 4.54 +0.16 +0.06 +0.08 A3IV -0.067+0.004 +.035-005SBO 67 1.7 0.5AB 4* - 576 CD-33 682 121351934222135 W 015401.9-333311015826.7-330400239.29-74.36 6.35 +1.02 K0III +0.008-0.020 +001V 6.9 6.1 - 577 BD+20 322 12139 75077 1582D 015402.5+203422015935.7+210330143.55-39.07 5.87 +1.03 K0III-IV +0.139-0.022 -002 3.3 188.1AD 4* - 578 BD+11 261 12140 927392136 015404.5+114835015925.9+121741147.82-47.26 6.09 +0.19 +0.10 A6V +0.008-0.042 -012V? 129 - 579 BD+73 108 12173 4559 1606 015418.7+732201020310.5+735102127.95 11.68 6.23R A5III -0.029-0.005D+.004-005 3.1 5.5 - 580 50 CasBD+71 117 12216 4560 70 015453.1+715615020326.1+722517128.38 10.31 3.98 -0.01 +0.03 0.00 A2V -0.045+0.022 -014SB2 84 - 581 47 CasBD+76 63 12230 45622139 W 015505.6+764803020507.4+771653127.06 15.00 5.38 +0.31 +0.05 F0Vn +0.125-0.056 +.028-026V 95 6.0 95.6 - 582112 PscBD+02 311 12235110266 691 015457.0+023708020009.2+030550154.33-55.53 5.88 +0.62 +0.19 G2IV +0.231-0.251 +.034-017V? =< 10 - 583 57 CetBD-21 356 12255167466 I 015503.9-211837015946.1-204928194.60-73.19 5.41 +1.65 +1.98 M1III +0.008+0.019 -015V - 584 CP-66 123 12270248472 015510.2-655439015753.6-652529292.20-50.30 6.37 +0.90 +0.62 G8II-III -0.010-0.013 +012 - 585 59Ups CetBD-21 358 12274167471 71I 015517.6-213344020000.3-210440195.47-73.25 4.00 +1.57 +1.91 +1.04 M0III e+0.135-0.024 +.007+018 * - 586 52 CasBD+64 282 12279 12095 015525.1+642507020252.7+645405130.42 3.07 6.00 +0.03 +0.02 A1Vn -0.002-0.015 -025SB 305 - 587 BD-09 380 12292129624 I W AR Cet 015529.0-090029020026.9-083125167.40-65.25 5.51 +1.52 +1.34 M3III +0.096-0.010 +006V 4.1 62.2 * - 588 CD-42 684 12296215726 015531.5-423047015938.8-420150264.25-69.60 5.57 +1.06 K1III -0.054-0.103 +.018+027 - 589 53 CasBD+63 274 12301 12097 015535.7+635425020300.3+642324130.57 2.59 5.58 +0.38 -0.27 +0.31 B8Ib +0.005-0.005 -020 - 590 4 PerBD+53 439 12303 228591054 015538.2+540015020218.1+542915133.19-06.97 5.04 -0.08 -0.32 -0.05 B8III +0.035-0.002 -002SB 93 - 591 Alp HyiCP-62 162 12311248474 72 015537.1-620323015846.2-613411289.45-53.76 2.86 +0.28 +0.14 +0.14 F0V +0.264+0.027 +.048+001V 153 * - 592 49 CasBD+75 86 12339 4565 1625 015557.4+753804020531.2+760654127.44 13.90 5.22 +0.95 +0.75 G8III -0.022-0.021 +.022+000V < 17 7.0 5.4AB 3* - 593 Sig HyiCP-78 42 123632558352134 015600.7-785014015550.5-782054298.84-38.26 6.16 +0.44 +0.01 F5-6IV-V +0.096+0.060 +006 - 594 Pi ForCD-30 703 12438193455 015646.8-302856020114.7-300006227.66-74.42 5.35 +0.88 +0.46 G5III -0.104-0.109 +.017+024 - 595113Alp PscBD+02 317 12446 1615B 015652.3+021651020202.8+024549155.35-55.60 5.23H A3m +0.033-0.005 +.005+009SB? 24 1.0 2.0 * - 596113Alp PscBD+02 317 12447110291 1615A 705 015652.3+021651020202.8+024549155.35-55.60 4.33H +0.03 -0.05 0.00 A0pSiSr +0.033-0.005 +.005+009SB 42 1.0 4.0 * - 597 BD+80 64 12467 3443943 015704.5+804903020925.3+811745125.99 18.89 6.05 +0.11 +0.06 A1V -0.036+0.006 -013V 130 - 598 BD+64 285 12468 12105 015708.5+643724020440.1+650612130.54 3.32 6.52 0.00 -0.05 A0V +0.051-0.032 -004V 130 - 599 3Eps TriBD+32 369 12471 55218 1621 707 015707.2+324808020258.0+331702139.71-27.25 5.50 +0.03 +0.06 +0.03 A2V -0.016-0.013 +.010+003SB? 92 6.0 4.2 * - 600 CP-66 125 124772484762137 015703.6-663304015941.1-660359292.34-49.64 6.10 +1.17 +1.21 K1III +0.032+0.006 +005 - 601 BD+12 271 12479 92763 I 015712.0+125940020235.2+132836148.19-45.88 5.94 +1.59 +1.83 M2III +0.016-0.010 -007 * - 602 Chi PheCD-45 659 125242157392138 015741.8-451142020142.4-444249268.87-67.48 5.14 +1.49 +1.82 +0.89 K5III -0.028-0.053 -.019-031 - 603 57Gam1AndBD+41 395 12533 37734 73I 1630A 015745.4+415100020354.0+421947136.96-18.56 2.26 +1.37 +1.58 +0.68 K3-IIb +0.045-0.052 +.013-012SB < 17 2.8 9.6AxBC 4* - 604 57Gam2AndBD+41 395 12534 37735 1630BC 015746.3+415104020354.7+421951136.97-18.56 4.84 +0.03 -0.12 B8V+A0V +0.037-0.055 +.013-014SB2O 70 2.8 9.6AxBC 4* - 605 10 AriBD+25 341 12558 75114 1631 015758.6+252714020339.3+255608142.61-34.16 5.63 +0.54 +0.02 F8IV +0.134+0.022 +.025+016V 1.5 0.8AB 3* - 606 CD-30 714 12563167511 015759.5-300852020228.1-293954226.33-74.19 6.42 +0.14 +0.19 +0.04 A3III -0.033+0.027 +012 0 - 607 60 CetBD-00 307 125731296552142 015803.9-002113020311.7+000742158.18-57.75 5.43 +0.15 +0.13 +0.08 A5III +0.079+0.017 +013 - 608 BD-16 356 125831481702141 015809.7-154716020258.6-151821181.14-69.60 5.86 +0.98 +0.74 G3IV +0.028+0.011 +006V - 609 BD+17 307 12594 92774 I D 015813.4+174622020342.6+181512146.03-41.35 6.21 +1.42 gK4 -0.007-0.018 +010V * - 610 61 CetBD-01 285 12641129667 1634 711 015840.9-004911020348.2-002025158.88-58.07 5.93 +0.88 +0.50 G5II-III+G5V +0.079-0.046 +024 3.8 42.9AB 3* - 611 BD-04 324 126421296652143I 015838.2-043457020340.5-040613162.91-61.23 5.62 +1.59 +1.97 K5I: +0.006-0.068 +025V? - 612 Nu ForCD-29 706 127671675321055 Nu For 020000.5-294636020429.4-291749224.89-73.78 4.69 -0.17 -0.51 -0.14 B9.5pSi +0.012+0.008 +019 87 * - 613 12Kap AriBD+21 279 12869 75146 020058.0+221018020633.9+223854144.78-37.02 5.03 +0.11 +0.13 +0.03 A2m +0.018-0.035 +012SB2O 29 * - 614 BD+07 324 12872110337 I WZ Psc 020055.3+074614020612.3+081451152.67-50.26 6.31 +1.65 +1.82 +1.00E M2III: -0.005-0.036 -026 * - 615 11 AriBD+25 349 12885 75149 1658 020108.9+251340020649.2+254217143.52-34.14 6.15 -0.03 -0.26 B9IV-Vn +0.017-0.011 -009 300 5.5 1.6 - 616 BD-00 318 12923129695 020121.8-002632020629.3+000206159.58-57.40 6.28 +0.90 +0.63 K0 +0.064-0.010 +021V - 617 13Alp AriBD+22 306 12929 75151 74I 725 020132.0+225923020710.4+232745144.57-36.20 2.00 +1.15 +1.12 +0.62 K2-IIICa-1 +0.190-0.148 +.049-014SB < 17 * - 618 BD+57 494 12953 22959 V472 Per 020141.3+575652020840.5+582525132.92-02.94 5.67 +0.61 -0.02 +0.50 A1Ia t-0.011+0.003 -036V 18 * - 619 BD+43 431 13013 37794 020218.3+435907020833.6+442734137.14-16.27 6.42R G8III-IV +0.016-0.051 +024 - 620 58 AndBD+37 486 13041 552892145 020226.9+372305020829.3+375133139.31-22.55 4.82 +0.12 +0.14 +0.07 A5IV-V +0.157-0.044 +.006+008SB 133 - 621 BD+53 460 13137 229932146 020324.8+532214021007.8+535035134.48-07.25 6.31 +0.95 G8III +0.027-0.043 +010 - 622 4Bet TriBD+34 381 13161 55306 75I 020335.4+343052020932.6+345914140.55-25.20 3.00 +0.14 +0.10 +0.08 A5III +0.150-0.040 +.022+010SB2O 76 * - 623 14 AriBD+25 355 13174 75171 W 020343.6+252801020925.3+255623144.08-33.71 4.98 +0.33 +0.15 F2III +0.075-0.039 +001V 154 2.5 105.9AC 3 - 624 BD+16 247 13201 92810 020353.3+164519020923.1+171328148.23-41.79 6.43 F5V +0.142-0.181 +011 =< 10 - 625 BD-18 374 13215148237 I 732 020401.1-181511020845.7-174646189.29-69.87 6.10 +1.61 +2.02 +0.95E M2III -0.002-0.032 +014 * - 626 BD+73 121 13222 45992149 020407.8+733327021321.2+740140128.58 12.06 6.29 +0.91 G8III +0.048-0.037 -037V - 627 5 PerBD+56 438 13267 23011 1685 Var? 020431.0+571024021129.0+573845133.51-03.57 6.36 +0.33 -0.43 +0.26 B5Ia -0.013+0.005 -034V 53 6.9 60.0AC 3* - 628 59 AndBD+38 425 13294 55330 1683A 020448.6+383403021052.8+390222139.38-21.28 5.63 -0.02 -0.09 B9V -0.015-0.018D+.010+001V 192 0.8 16.2 * - 629 59 AndBD+38 425 13295 55331 1683B 020449.5+383417021053.7+390235139.38-21.28 6.10 -0.07 -0.17 A1Vn -0.009-0.026D+.010+015V? 305 0.8 16.2 * - 630 CD-24 921 133051675992147 020459.9-244904020934.8-242045208.31-72.20 6.48 +0.29 F4III -0.027-0.044 +020 - 631 15 AriBD+18 277 13325 928221056I 738 020504.9+190143021037.6+193001147.40-39.58 5.70 +1.65 +1.91 M3IIIab +0.088-0.028 +060V - 632 CD-44 632 13336215785 020509.7-435919020909.3-433100264.22-67.31 5.85 +1.19 +1.08 K1III -0.048-0.053 -026 - 633 16 AriBD+25 362 13363 75188 I 020530.5+252755021112.0+255613144.53-33.57 6.02 +1.36 gK4 -0.007-0.010 -019 - 634 5 TriBD+30 347 13372 553382148 740 020534.2+310319021125.0+313135142.27-28.32 6.23 +0.11 +0.14 A1m +0.035-0.013 +011SB2 30 * - 635 64 CetBD+07 347 13421110390 020604.2+080606021121.1+083411154.20-49.39 5.63 +0.56 +0.14 G0IV -0.139-0.112 +.034-018V? =< 10 - 636 CD-44 638 13423215794 020605.5-441715021004.9-434856264.54-66.99 6.32 +0.90 G8III +0.059-0.009 +041V? - 637 CD-51 532 13445232658 020623.7-511852021025.6-504928275.99-61.97 6.12 +0.82 +0.45 +0.32E K1V +2.119+0.641 +.090+053 - 638 BD-10 447 134561482622150 020628.0-103106021122.2-100308174.54-64.57 6.01 +0.39 -0.03 F5V -0.022-0.166 +011 =< 10: - 639 63 CetBD-02 375 134681297392151 020631.1-021744021135.8-014931163.52-58.23 5.93 +0.97 +0.70 gG9 -0.008-0.031 +032 - 640 55 CasBD+65 239 13474 12180 76 S 753 020637.7+660321021429.1+663128131.08 4.98 6.07 +0.63 +0.33 G0II-III+B9V -0.006-0.006 -012V 70 * - 641 BD+57 519 13476 23044 020637.7+580529021341.5+583340133.50-02.61 6.44 +0.60 +0.23 +0.51 A3Iab -0.012+0.020 -041V? =< 45 * - 642 6 TriBD+29 371 13480 55347 I 1697 TZ Tri 020634.0+295004021222.3+301811142.98-29.40 4.94 +0.78 +0.31 G5III+F5V -0.064-0.063 +.004-018SBO 36 1.6 3.8 * - 643 60 AndBD+43 447 13520 378672153I S 746 020656.8+434545021313.3+441354138.04-16.23 4.83 +1.48 +1.74 +0.60E K3.5IIIBa0.5: -0.020-0.016 -046SB1O < 17 * - 644 BD+23 297 13522 75203 I 020658.0+234153021237.5+241004145.69-35.09 5.96 +1.37 K0 +0.041-0.006 -001 - 645 BD+50 481 13530 23047 77 W 747 020657.0+503605021336.3+510357135.85-09.73 5.31 +0.93 +0.62 +0.34E G8III: v+0.346-0.171 +.009+027SBO 4.4 27.3 * - 646 17Eta AriBD+20 348 13555 75204 020712.0+204428021248.1+211239147.14-37.81 5.27 +0.43 -0.05 F5V +0.161+0.003 +006V? 9 * - 647 BD+46 536 13594 37878 1709 020737.7+470102021402.6+472903137.10-13.10 6.06 +0.40 -0.07 +0.25 F4V -0.063-0.059 +.036-008V < 26 0.6 1.0 * - 648 19 AriBD+14 357 13596 928411057I 748 020735.9+144841021303.3+151647150.40-43.20 5.71 +1.55 +1.94 +0.97 M0III +0.097-0.023 +023SB * - 649 65Xi 1CetBD+08 345 136111104081058I D 749 020741.9+082240021300.0+085048154.55-48.95 4.37 +0.89 +0.60 +0.49 G6II-IIICN-2 -0.022-0.009 +.022-004SBO < 17 2.0 0.0 * - 650 66 CetBD-03 336 13612129752 1703 020740.9-025140021247.5-022337164.60-58.52 5.54 +0.57 +0.09 F8V +0.370-0.069 +.045-003V? 2.1 16.4AB 3* - 651 BD-21 396 13692167637 020821.2-212812021300.9-210001199.11-70.43 5.86 +1.01 +0.78 G9III +0.050+0.035 +038 - 652 Mu ForCD-31 882 13709193573 78 020830.2-311134021254.5-304326229.19-71.84 5.28 -0.02 -0.06 B9V +0.018+0.006 +.064+010V - 653 BD+47 590 13818 37905 020929.9+472051021557.9+474841137.30-12.69 6.33R G9III-IV +0.062-0.071 +016 * - 654 BD+56 471 13854 23115 W Var? 020952.0+563525021651.7+570319134.38-03.91 6.48 +0.28 -0.66 +0.19 B1Iab e+0.001-0.002 -042V 57 0.9 103.0 * - 655 7 TriBD+32 409 13869 55397 021001.2+325339021556.2+332132142.55-26.27 5.28 -0.01 -0.03 A0V -0.017-0.038 -001V 122 - 656 20 AriBD+25 373 13871 75239 021002.3+251908021546.0+254659145.74-33.33 5.79 +0.44 +0.04 +0.21 F6IV-V +0.176-0.063 +026V? 12 * - 657 21 AriBD+24 329 13872 752381059 W 021002.2+243447021542.8+250235146.07-34.01 5.58 +0.49 +0.01 F6V -0.088-0.087D+.015-044 0.3 0.2 * - 658 BD-10 460 13936129781 021033.5-095555021528.3-092756175.21-63.45 6.55 -0.02 -0.07 A0V -0.003+0.031 -001 118 - 659 CD-41 621 139402158311060 021029.1-413757021432.0-411000257.70-67.91 5.91 +0.97 G8III -0.013-0.028 +014SB - 660 8Del TriBD+33 395 13974 55420 1739 021056.8+334600021703.2+341327142.43-25.39 4.87 +0.61 +0.02 +0.24E G0.5V +1.154-0.245 +.093-006SB2O=< 10 8.5 65.4 * - 661 8 PerBD+57 535 13982 231432157 021054.8+572610021759.9+575359134.25-03.06 5.75 +1.17 K3III +0.063+0.005 +003 - 662 7 PerBD+56 486 13994 23149 1753 021102.1+570310021804.5+573100134.39-03.42 5.98 +1.05 +0.79 G7III -0.019+0.006 -011V 2.6 121.9AD 4* - 663 BD+43 461a 14028 W And 021112.9+435035021733.4+441825138.78-15.90 6.7 M7-8Se v+0.041+0.083 -045V * - 664 9Gam TriBD+33 397 14055 55427 79 021122.0+332305021718.9+335050142.65-25.71 4.01 +0.02 +0.02 0.00 A1Vnn +0.047-0.051 +.039+014V 208 - 665 BD+23 307 14067 752622156 021131.1+231818021710.4+234604147.05-35.06 6.55 +1.02 +0.85 G9III -0.033-0.039 -013 - 666 67 CetBD-07 393 14129129798 80 021159.7-065258021659.0-062520171.27-60.99 5.51 +0.96 +0.76 G8.5III +0.093-0.108 +007V? - 667 Pi 1HyiCP-68 126 14141248518 767 021209.0-681830021414.7-675030291.57-47.42 5.55 +1.55 +1.85 M1III +0.037+0.037 +.013+026 * - 668 BD+63 320 14171 12226 021231.5+635233022012.9+642014132.36 3.10 6.60 -0.03 -0.09 B9.5V -0.019+0.018 -026 =< 41 - 669 22The AriBD+19 340 14191 92877 81 021233.6+192619021807.5+195404149.27-38.50 5.62 +0.01 +0.03 A1Vn -0.013-0.002 +006SB 175 - 670 62 AndBD+46 552 14212 379481063 021249.4+465507021916.8+472248137.99-12.91 5.30 -0.01 0.00 A1V -0.059-0.008 +.015-030V 74 - 671 BD+45 589 14213 37947 021245.6+460040021910.9+462821138.29-13.77 6.21 A4V -0.014-0.009 -015 - 672 BD+01 410 142141104561061 021249.6+011706021801.4+014528162.20-54.38 5.58 +0.60 +0.10 G0.5IVb +0.368+0.369 +.038+027SBO * - 673 BD+48 648 14221 37949 021251.1+482931021922.7+485719137.46-11.42 6.37R F4V -0.093+0.068 -019 15 - 674 Phi EriCP-52 285 14228232696 82 W 021256.2-515830021630.6-513044275.35-60.82 3.56 -0.12 -0.39 -0.11 B8V-IV +0.096-0.027 +010 247 5.0 87.6 * - 675 10 TriBD+27 360 14252 75276 1770 021309.1+281052021857.0+283833145.22-30.41 5.03 +0.04 +0.05 A2V +0.011-0.006 +003V 29 7.5 57.1 - 676 BD+22 329 14262 75277 021319.0+224224021858.0+231004147.80-35.44 6.46 +0.34 +0.08 A1V+F3III 0.000-0.005 -013SBO 116 * - 677 BD+39 521 14272 55453 021327.6+392228021937.3+395006140.79-19.96 6.63 -0.09 -0.37 B8V +0.033-0.010 -008V? 15 - 678 Pi 2HyiCP-68 128 14287248521 021323.4-681235021528.5-674447291.35-47.45 5.69 +1.30 +1.48 K2III +0.035-0.016 +017 - 679 BD+46 557 14372 37955 021412.9+465105022041.4+471839138.24-12.89 6.11 -0.08 -0.47 B5V +0.007-0.007 +002V - 680 BD+29 392 14373 75287 021413.5+294344022004.4+301118144.79-28.89 6.47R K0 +0.016-0.023 -001 - 681 68Omi CetBD-03 353 14386129825 I 1778 Omi Cet 021417.6-032554021920.7-025839167.75-57.98 3.04 +1.42 +1.09 +1.90 M7IIIe+Bep v-0.008-0.237 +.024+064V 7.3 118.7AC 4* - 682 63 AndBD+49 640 14392 37960 790 021420.7+494134022058.2+500905137.29-10.21 5.59 -0.13 -0.38 B9pSi +0.034-0.027 -002V 105 * - 683 CD-26 828 14412167697 021429.6-262508021858.5-255644214.47-70.41 6.34 +0.73 +0.18 G5V -0.214+0.448 +.089+007V? - 684 BD-05 438 14417129830 021439.2-044820021940.8-042044169.55-58.98 6.50 +0.08 +0.09 A3V +0.041+0.005 +018 - 685 9 PerBD+55 598 14489 232562159 1802 V474 Per 021522.8+552317022221.4+555044135.51-04.79 5.17 +0.37 -0.11 +0.32 A2Ia v-0.002-0.002 -015V 25 7.8 11.6 * - 686 CD-42 785 14509215860 I 021525.4-421832021924.7-415054257.92-66.77 6.37 +1.16 K2III +0.009+0.023 +023 - 687 BD+40 500 14622 379862161 W 021636.7+405633022250.3+412347140.80-18.28 5.82 +0.27 +0.05 F0III-IV -0.077-0.096 -035V? 1.8 295.5AC 3 - 688 CP-56 413 146412327172158 W 021639.8-562414021954.3-555641280.10-57.09 5.81 +1.55 +1.95 K5III +0.026+0.020 +049 5.1 33.8 - 689 69 CetBD-00 355 14652110495 I 805 021649.1-000340022156.6+002345164.95-54.92 5.28 +1.65 +1.87 M2III -0.013-0.007 +023 - 690 BD+54 535 14662 23283 1820 V440 Per 021654.0+545434022351.8+552152135.87-05.17 6.28 +0.86 +0.64 F7Ib +0.006-0.024 -026V 12 8.1 10.0 * - 691 70 CetBD-01 322 146901298582160 021706.6-012025022212.4-005306166.40-55.90 5.42 +0.31 +0.10 F0Vn -0.019-0.048 +020SB - 692 BD-11 448 14691148354 021708.0-111355022201.4-104640179.78-63.15 5.46 +0.35 +0.02 F0V +0.140-0.085 +012V 101 - 693 BD-18 409 147281483561064 021722.2-180702022205.0-173944193.30-67.06 5.87 +1.23 +1.35 +0.44E K0III +0.011-0.060 -003 * - 694 64 AndBD+49 649 14770 38005 I 021746.0+493311022424.9+500024137.86-10.15 5.19 +0.98 +0.76 G8III +0.024-0.039 -.001-013V? < 17 - 695 Kap ForCD-24 1038 14802167736 83 021758.0-241614022232.6-234859208.85-69.21 5.20 +0.60 +0.12 +0.36 G0Va +0.200-0.062 +.077+018 4 - 696 10 PerBD+55 612 14818 23304 Var 021812.1+560922022516.0+563636135.62-03.93 6.25 +0.31 -0.62 +0.20 B2Ia e-0.002+0.008 -046V =< 45 * - 697 BD-19 444 14830148366 021815.2-184824022257.8-182116195.13-67.20 6.22 +0.94 G5 +0.149-0.109 +020V? - 698 CD-43 724 148322158782162 021816.5-433925022211.8-431200260.03-65.60 6.31 +1.00 K0III +0.064+0.035 -007 - 699 65 AndBD+49 656 14872 233192165I W 021857.0+494934022537.4+501643137.95-09.83 4.71 +1.53 +1.89 +0.87 K4+III +0.027-0.010 +.011-005V? < 17 5.7 191.7AC 3 - 700 CD-38 797 14890193679 021859.1-380148022306.5-373435247.15-68.09 6.53 +1.61 +1.94 K2III -0.014-0.037 +011 - 701 CD-51 571 14943232736 021923.5-513255022254.6-510532273.28-60.44 5.92 +0.22 A5V +0.022+0.061 +005 - 702 24Xi AriBD+09 316 14951 929322164 021927.3+100928022449.0+103638157.03-45.99 5.47 -0.10 -0.48 B7IV +0.020-0.017 +004SB 175 - 703 CD-26 857 149881677572163 021950.5-261804022420.1-255051214.69-69.20 6.44 +1.32 K3III +0.036+0.013 +034 - 704 71 CetBD-03 374 15004129888 021955.1-031357022458.4-024648169.53-56.93 6.33 0.00 -0.14 A0III -0.001-0.007 +012V * - 705 Del HyiCP-69 113 150082485451065 021958.1-690652022144.9-683934291.25-46.37 4.09 +0.03 +0.05 +0.01 A3V -0.050+0.002 +.050+006V? 163 - 706 CD-41 681 15064215892 022032.3-411746022433.8-405026254.50-66.45 6.18 +0.66 G2V +0.222+0.111 +001SB1O * - 707 Iot CasBD+66 213 15089 12298 1860 Iot Cas 022049.2+665711022904.0+672409132.12 6.29 4.52 +0.12 +0.06 +0.06 A5pSr v-0.017+0.011 +.023+001V? 46 2.2 2.3AB 4* - 708 72Rho CetBD-12 451 151301483851066 022107.1-124429022557.0-121726183.75-63.35 4.89 -0.03 -0.07 -0.03 B9.5Vn -0.010-0.009 +.029+010V 191 - 709 66 AndBD+49 666 15138 23353 022109.0+500722022751.8+503411138.18-09.42 6.12 +0.41 F4V +0.036-0.093 -004SBO * - 710 BD-15 426 15144148386 1849 AB Cet 022115.1-154727022600.3-152028189.53-65.08 5.83 +0.15 +0.10 +0.04 A6VpSrCr -0.058-0.047 +.015-008SBO 14 3. 12. AB 3* - 711 BD+26 409 15152 75370 I 022120.3+263354022707.0+270048147.91-31.18 6.18 +1.43 +1.82 K5III -0.055-0.065 -048 - 712 11 TriBD+31 427 15176 55570 022132.1+312108022727.7+314805145.72-26.79 5.54 +1.12 gK1 -0.027-0.028 -039V - 713 BD-20 455 152201677952167 022156.3-202944022635.2-200234200.01-67.12 5.88 +1.26 +1.33 K2III +0.088+0.099 +042V - 714 Lam HorCP-60 199 15233248555 84 022206.1-604535022453.9-601843283.79-53.20 5.35 +0.39 +0.06 F2III -0.068-0.133 +.023+006V 106 - 715 Kap HyiCP-74 194 152482558801067 022216.2-740555022252.3-733845294.47-41.95 5.01 +1.09 +1.04 K1III -0.083+0.010 +022 - 716 BD+54 557 15253 23369 1878 022222.4+550520022925.0+553211136.55-04.72 6.51 +0.09 0.00 A2pShell v+0.033-0.010 +002 1.3 2.8 * - 717 12 TriBD+29 417 15257 753821068 022218.0+291323022810.0+294010146.86-28.67 5.29 +0.10 F0III -0.015-0.087 -025V 78 - 718 73Xi 2CetBD+07 388 15318110543 85I' 022250.4+080043022809.5+082736159.69-47.39 4.28 -0.06 -0.12 -0.05 B9III +0.040-0.009 +.030+011SB? 63 - 719 BD+01 431 15328110542 W 022250.2+013046022800.0+015739165.42-52.76 6.45 +0.97 +0.79 K0III -0.002-0.012 +018 0.4 0.5 - 720 13 TriBD+29 423 15335 75391 022256.3+292855022848.5+295555146.89-28.37 5.89 +0.58 +0.01? G0V -0.069+0.074 +040V =< 6 - 721 Kap EriCD-48 637 15371215906 86I' 022319.2-480909022659.1-474214267.12-62.24 4.25 -0.14 -0.50 -0.13 B5IV +0.023-0.010 +028SB? 24 * - 722 CP-67 154 15379248556 TZ Hor 022322.4-665639022526.3-662941289.17-48.04 6.41 +1.54 +1.46 +1.74 M5III -0.029-0.019 +002 * - 723 BD+22 354 15385 75398 022331.4+230121022913.6+232808150.24-34.16 6.19 +0.15 +0.14 +0.02 A5m +0.081-0.028 +021V 21 - 724 Phi ForCD-34 905 154271937232168 022347.8-341532022801.7-334840236.68-68.20 5.14 +0.10 A2V +0.020+0.007 +.015+019V 127 - 725 BD+08 385 15453110565 1896 022414.8+090709022935.3+093357159.26-46.27 6.07 +1.02 +0.85 K2III -0.012+0.012 -011 4.5 1.6 * - 726 BD+33 445 15464 55611 022415.4+332323023016.6+335002145.40-24.69 6.25 +1.07 K1III +0.070-0.057 +007 - 727 CD-31 990 15471193727 022416.8-313256022835.4-310609229.36-68.46 6.11 +1.11 +1.07 K2IIICNII -0.034-0.019 -002 - 728 BD+24 358 15524 754072171 1904 022447.0+244731023032.4+251406149.62-32.45 5.92 +0.41 +0.06 F6IV +0.066-0.078D+.022-011V 50 4.5 113.1AC 3* - 729 26 AriBD+19 365 15550 929792172 D UU Ari 022501.8+192441023038.4+195119152.63-37.23 6.15 +0.25 +0.10 A9V +0.078-0.033 +019V 152 * - 730 CD-23 942 15588167832 1906 022521.3-230742022955.4-224058207.10-67.27 6.77 +0.19 +0.15 +0.05 A9V +0.077+0.006 +013 5.7 28.4 - 731 27 AriBD+17 380 15596 929831069 022521.4+171542023054.4+174214154.01-39.09 6.23 +0.90 +0.55 G5III-IV +0.031-0.084 -118V? - 732 BD-00 378 15633110583 846 022538.1-001114023045.2+001519168.08-53.68 6.00 +0.17 +0.17 A7III-IV s -0.053-0.071 -002V? 42 * - 733 CD-25 979 15634167837 TY For 022544.0-253756023013.8-251111213.52-67.78 6.51 +0.29 dA9n +0.090+0.031 +025V? * - 734 CP-64 174 156462485672170 022544.2-644447022804.4-641759287.00-49.73 6.37 -0.04 -0.05 A0V +0.037+0.001 +010 - 735 CD-23 947 15652167839 I 022559.2-225920023032.8-223244206.86-67.09 6.10 +1.61 +2.00 +0.84E M1III +0.008-0.033 -019 * - 736 14 TriBD+35 497 15656 556351070I 022559.8+354214023206.2+360850144.74-22.43 5.15 +1.47 +1.78 K5III +0.046+0.012 -036 < 19: * - 737 BD+01 438 156941105892173I 022619.7+014927023130.1+021602166.25-51.98 5.25 +1.27 +1.41 K3III +0.027-0.004 +.041+026V < 19: - 738 BD+33 454 15755 55650 022650.1+340603023252.5+343233145.62-23.82 5.83 +1.07 K0III -0.066-0.012 -002V - 739 75 CetBD-01 353 15779129959 022704.0-012835023209.4-010206169.94-54.44 5.35 +1.02 +0.84 gG3 -0.026-0.037 -005V? - 740 76Sig CetBD-15 449 157981484451071 022720.8-154101023205.2-151441191.12-63.78 4.75 +0.45 -0.02 +0.27 F4IV -0.070-0.120 +.035-029 12 - 741 29 AriBD+14 419 15814 929982176 022725.4+143531023254.1+150205156.28-41.18 6.04 +0.54 +0.04 F8V -0.028+0.037 +006SB =< 10 - 742 CD-36 957 15889193759 022807.5-365209023214.8-362539242.77-66.74 6.30 +1.02 +0.74 +0.37E G8III +0.065+0.009 +013 * - 743 BD+72 140 15920 4694 87 022830.9+722252023802.0+724906130.71 11.58 5.16 +0.88 +0.58 G8III -0.030+0.016 +.011-002V? < 19: - 744 Lam1ForCD-35 877 15975193763 88 022856.8-350523023307.0-343900238.27-67.00 5.90 +1.06 K0III -0.015-0.020 +013 - 745 BD-20 480 15996167878 022903.3-202622023340.2-200007201.48-65.57 6.21 +1.10 K0 -0.041-0.079 -006V - 746 BD+39 573 16004 55680 1961 022912.5+391337023527.9+393952143.84-18.95 6.36 -0.10 -0.34 B9pHgMn +0.026-0.026 -008V? 30 5.6 16.3AB 3* - 747 BD+65 280 16024 123612178I 022925.7+651833023736.1+654444133.55 5.09 5.78 +1.56 +1.85 K5III +0.042-0.005 +041 - 748 BD+36 519 16028 55684 I 1964 022928.9+365229023538.8+371844144.92-21.07 5.71 +1.39 K3III +0.004-0.009 -006 5.2 18.3AB 3 - 749 Ome ForCD-28 819 16046167882 1954A 022927.9-284018023350.7-281357221.70-67.34 4.90 -0.05 -0.13 -0.07 B9.5V -0.019-0.013 +010V 72 2.8 10.8 * - 750 15 TriBD+34 469 16058 55687 I W 866 022942.5+341505023546.8+344115146.14-23.44 5.35 +1.66 +1.93 +1.00E M3IIIa +0.030-0.049 +.016-010V 1.2 141.3 * - 751 BD+06 392 16060110625 022946.3+070210023504.1+072817162.60-47.26 6.18 +1.06 +0.89 gG6 -0.006-0.108 -025 * - 752 77 CetBD-08 484 16074129984 I W 022946.5-081746023442.7-075134179.49-58.87 5.75 +1.40 +1.65 gK4 +0.063-0.065 +025 6.7 94.7 * - 753 BD+06 398 161601106361073 W 023035.7+062435023604.9+065313163.39-47.62 5.82 +0.98 +0.81 +0.53 K3V +1.811+1.451 +.147+023SB 5.0 2.5AP 3* - 754 78Nu CetBD+04 418 161611106351072I 1971 023037.5+050925023552.5+053536164.48-48.67 4.86 +0.87 +0.53 +0.49 G8III -0.026-0.025 +.002+005SB < 17 4.8 8.1 * - 755 CD-51 611 161702328182177 023030.2-513153023354.6-510537270.92-59.19 6.24 +0.52 +0.07 F6V -0.004-0.030 -008 - 756 BD+38 515 16176 55705 023042.4+381808023657.2+384358144.53-19.67 5.90 +0.48 F5V +0.145-0.194 +001 27 - 757 BD+30 418 16187 55703 023045.2+311018023642.9+313627147.80-26.13 6.10 +1.05 +0.79 K0 -0.042-0.004 +003V - 758 BD+33 470 16210 R Tri 023057.7+334953023702.5+341550146.59-23.71 5.3 +1.55 +0.84 M4IIIe +0.058-0.029 +.008+067V * - 759 80 CetBD-08 489 162121300041074I W 023104.6-081559023600.0-074954179.86-58.61 5.53 +1.59 +1.93 +0.87E M0III -0.033-0.059 +014 3.6 146.7AC 3 - 760 BD+39 582 16219 55715 023104.3+392740023720.8+395345144.09-18.59 6.54 -0.12 -0.48 B5V +0.006-0.019 +016SBO 35 * - 761 BD+32 473 16220 55711 023105.2+322717023706.4+325331147.26-24.94 6.25 +0.48 +0.01 F8V +0.065+0.063 +000 - 762 CP-63 169 16226248595 023106.3-630132023333.6-623513284.65-50.76 6.77 -0.06 B9V +0.026+0.010 +001V - 763 31 AriBD+11 360 16234 930222179 D 023110.6+120051023637.9+122651159.13-42.91 5.68 +0.49 -0.08 F7V +0.286-0.089 +.035+007V =< 10 0.1 0.0 * - 764 30 AriBD+24 375 16232 75470 1982B 023111.5+241246023657.7+243854151.47-32.31 7.09 +0.50 +0.02 F4V +0.143 0.000 +.018+017 30 0.6 38.3 * - 765 30 AriBD+24 376 16246 75471 1982A 023114.3+241244023700.5+243851151.49-32.31 6.50 +0.41 -0.02 F6III +0.136-0.006 +.018+015SBO 60 0.6 38.3 * - 766 BD+07 402 16247110640 872 023117.1+071741023635.1+074347162.83-46.83 5.81 +1.04 +0.86 gK0 -0.049-0.031 -025 - 767 Iot1ForCD-30 958 16307193795 023150.5-302850023609.3-300241226.39-66.88 5.75 +1.02 G8-K0III -0.013+0.001 +002V? - 768 BD+37 588 16327 55729 1996 023206.5+371739023817.8+374336145.24-20.47 6.18 +0.47 +0.08 F6III -0.040-0.044 +009 43 5.0 20.8AC 4* - 769 BD+37 591 16350 55735 023215.3+373920023827.8+380522145.10-20.13 6.30 -0.03 -0.03 B9.5V -0.009+0.001 +002 =< 41 * - 770 BD+07 405 16399110653 023241.8+071545023800.8+074143163.28-46.66 6.39 +0.44 0.00 F6IV +0.086-0.044 +013 12 - 771 81 CetBD-04 436 164001300262180 023239.4-034944023741.8-032346174.49-55.25 5.65 +1.02 +0.85 gG5 +0.041-0.045 +008 - 772 Lam2ForCD-35 903 16417193811 023249.4-350019023658.6-343442237.68-66.24 5.79 +0.66 +0.22 G5IV -0.015-0.270 +.056+010V? - 773 32Nu AriBD+21 362 16432 75495 89 023308.1+213145023849.0+215741153.46-34.47 5.43 +0.16 +0.13 A7V -0.008-0.017 +.013+008SB? 110 - 774 BD+80 86 16458 4333945 023320.8+810129024747.6+812654127.33 19.59 5.78 +1.30 G8pBa3 +0.010-0.076 +.013+018V? * - 775 BD+02 406 16467110655 W 023324.5+030037023836.9+032635167.32-49.96 6.21 +1.00 +0.76 G9III +0.043+0.002 +002 3.2 0.8 - 776 Mu HyiCP-79 66 16522255898 90 023347.1-793245023140.5-790634297.19-36.88 5.28 +0.98 +0.73 G8III +0.121-0.056 +.001-015 - 777 Iot2ForCD-30 973 165381938292183 023359.9-303729023818.7-301139226.75-66.41 5.83 +0.48 -0.01 F4V +0.100-0.077 +029 - 778 Eta HorCP-53 457 165552328352182 023406.4-525833023724.4-523235272.31-57.82 5.31 +0.27 A6V +0.100-0.019 +.025-003 239 - 779 82Del CetBD-00 406 16582110665 91 Del Cet 023421.3-000610023929.0+001943170.76-52.21 4.07 -0.22 -0.87 -0.21 B2IV +0.014-0.004 +.001+013SB 13 * - 780 CD-38 875 165891938342184 023422.8-382516023824.8-375926245.54-65.10 6.49 +0.52 G0IV +0.111-0.063 +043SBO * - 781 83Eps CetBD-12 501 16620148528 W 023443.6-121748023933.8-115220187.19-60.41 4.84 +0.45 -0.01 F5V+F6V +0.146-0.236 +.072+015SBO 13 0.2 0.1 * - 782 33 AriBD+26 443 16628 75510 2033 023450.2+263754024041.1+270339151.02-29.79 5.30 +0.09 +0.13 A3V +0.067-0.031 +.002+017SB 104 4.2 28.6 * - 783 BD+05 374 16647110673 023459.2+054054024015.7+060643165.32-47.60 6.25 +0.40 -0.03 F3V: +0.052-0.003 +018V 18 - 784 BD-10 525 16673130047 023520.4-095251024012.3-092711183.54-58.84 5.78 +0.52 0.00 F6V -0.151-0.086 -004V =< 6 - 785 11 PerBD+54 598 16727 235552188 023553.2+544045024302.8+550621138.51-04.35 5.77 -0.13 -0.48 B7IIIpHg +0.034-0.027 -002 * - 786 CD-31 1081 16733193846 023545.9-310343024002.5-303802227.82-66.03 6.52 +1.04 K0III -0.004-0.068 -004V? - 787 BD+52 616 16735 23556 2059 023556.5+530559024259.7+533134139.16-05.79 5.84 +1.12 K0II-III +0.068-0.030 -012V 9.0 12.4 * - 788 12 PerBD+39 610 16739 557932187 S 896 023556.0+394616024214.9+401138144.84-17.91 4.91 +0.59 +0.14 +0.30 F9V -0.019-0.186 +.043-023SB2O < 25 0.3 0.1 * - 789 CD-43 814 167542159962185 W 023559.2-431915023948.0-425330255.67-62.98 4.75 +0.06 +0.06 +0.01 A2V +0.106-0.027 +.028+018V 190:10.0 23.8 - 790 84 CetBD-01 377 16765130055 2046 893 023606.5-010715024113.9-004145172.42-52.68 5.71 +0.52 -0.02 F7IV +0.214-0.136 +.036+008 3.6 4.0 * - 791 BD+67 224 16769 12421 92 023612.9+672359024449.7+674929133.34 7.27 5.95 +0.10 +0.17 A5III +0.015-0.033 +005SBO 35 * - 792 BD+47 683 16780 38274 2064 023619.0+475018024301.9+481556141.40-10.56 6.48R G5II +0.007+0.002 -005 5.0 72.8AC 3* - 793 34Mu AriBD+19 403 16811 93062 2062 023643.5+193508024222.0+200042155.53-35.74 5.69R -0.02 -0.03 A0Vnp: +0.029-0.043 -007V 195 0.8 0.1 O 4* - 794 Iot EriCD-40 689 168152159991075I 023643.2-401700024040.0-395120249.30-64.07 4.11 +1.02 +0.74 +0.56 K0III +0.138-0.032 +.038-009 - 795 BD-03 421 16824130061 023646.1-033828024148.3-031248175.53-54.40 6.05 +1.17 +1.13 gG9 -0.019+0.002 +004V? - 796 BD-15 478 16825148550 023649.4-145843024134.0-143258192.38-61.45 5.98 +0.43 -0.02 F5III: -0.032+0.042 +002V? - 797 BD+10 360 16861 93067 899 023705.8+101856024228.9+104430162.07-43.53 6.30 +0.06 +0.06 +0.02 A2V -0.025-0.022 +006V 33 * - 798 CP-64 192 16891248616 023722.6-644241023931.7-641655285.44-49.01 6.55 -0.08 -0.24 B8V +0.025+0.013 -001V? * - 799 13The PerBD+48 746 16895 38288 93I 2081 902 023721.9+484820024412.0+491342141.16-09.61 4.12 +0.49 0.00 +0.30 F8V +0.336-0.089 +.077+025V? 6 5.6 19.6AB 3* - 800 14 PerBD+43 566 16901 382891077 023734.2+435219024405.2+441749143.31-14.07 5.43 +0.90 +0.65 G0Ib-IICa1CH-1 +0.004-0.007 -003SB? - 801 35 AriBD+27 424 16908 75532 94 023734.8+271654024327.1+274226151.29-28.93 4.66 -0.13 -0.62 -0.13 B3V +0.008-0.012 +013SB1O 132 * - 802 Zet HorCP-55 446 169202328571076 023732.9-545841024039.6-543300274.43-56.11 5.21 +0.40 -0.01 F4IV +0.036-0.001 +.031-001SB2O * - 803 BD+25 441 16955 75539 2082 023802.9+251247024351.2+253817152.53-30.69 6.35 +0.08 +0.11 A2Vp: -0.011-0.005 -.000-011 4.1 2.9AB 3* - 804 86Gam CetBD+02 422 16970110707 2080 023807.1+024852024318.0+031409168.92-49.38 3.47 +0.09 +0.07 +0.04 A3V -0.142-0.152 +.052-005V 183 2.7 2.8AB 3* - 805 CD-38 894 16975193873 023807.6-384837024206.6-382302245.90-64.29 6.01 +0.92 G8III +0.018+0.001 +017 - 806 Eps HyiCP-68 161 16978248621 95 023802.9-684143023935.4-681601288.96-45.82 4.11 -0.06 -0.14 -0.07 B9V +0.086-0.002 +006 110 * - 807 CD-47 832 170062160132189 023832.4-465652024208.5-463128261.96-60.83 6.10 +0.88 K1III +0.015-0.100 +013 - 808 36 AriBD+17 426 17017 930812190 023844.1+172027024419.1+174550157.47-37.42 6.46 +1.07 +1.07 +0.39E K2III +0.039-0.038 -032V * - 809 37Omi AriBD+14 457 17036 93082 023902.2+145319024432.9+151842159.22-39.46 5.77 -0.01 -0.19 B9Vn -0.002-0.019 -007 350 - 810 Iot HorCD-51 641 17051232864 023909.2-511354024233.5-504801268.82-58.33 5.41 +0.56 +0.10 G0V +0.334+0.222 +.069+016 - 811 89Pi CetBD-14 519 17081148575 97 023921.7-141656024407.4-135131191.81-60.57 4.25 -0.14 -0.45 -0.14 B7V -0.008-0.015 +015SB 18 - 812 38 AriBD+11 377 17093 93083 UV Ari 023930.5+120130024457.6+122645161.43-41.79 5.18 +0.24 +0.10 A7III-IV +0.122-0.084 +.027-002V 83 * - 813 87Mu CetBD+09 359 17094110723 98 D 909 023932.1+094131024456.5+100651163.25-43.70 4.27 +0.31 +0.08 +0.19 F0IV +0.284-0.036 +.046+030SBO 54 1.4 0.1 * - 814 CD-41 769 17098216019 W 023927.3-405710024320.3-403139250.30-63.35 6.36 -0.02 B9V +0.019+0.024D+.009+016 0.3 1.9 * - 815 BD+69 179 17138 12445 RZ Cas 023954.1+691249024855.5+693803132.89 9.07 6.18 +0.18 +0.10 A3V 0.000+0.032 -039SBO 82 * - 816 BD+04 437 17163110730 024006.2+041726024520.9+044242168.09-47.92 6.03 +0.31 +0.08 gF0 +0.068-0.043 +020SB 75 - 817 CD-33 943 17168193888 024008.8-325650024420.5-323130232.25-65.00 6.22 +0.04 A1V +0.020-0.031 +021SB 48 - 818 1Tau1EriBD-19 518 17206148584 024026.1-185945024506.2-183421200.83-62.53 4.47 +0.48 0.00 +0.27 F6V +0.330+0.038 +.072+026SB1O 22 * - 819 BD+35 553 17228 55868 024047.4+353348024658.3+355901147.73-21.26 6.25 +0.93 +0.62 G8III +0.050-0.005 +021 * - 820 BD+34 513 17240 55872 2117 024054.3+350809024703.5+353318147.96-21.64 6.30R A9V -0.043-0.047D+.013-004 45 2.1 1.5AB 3* - 821 CP-53 475 17254232871 024058.1-525934024410.7-523414271.10-57.02 6.15 +0.09 A2V -0.012-0.015 +010 - 822 CD-46 797 17325216036 024141.3-464229024516.5-461714260.97-60.49 6.85 +1.36 K2III -0.003-0.014 +032V - 823 CP-67 181 17326248632 W 911 024141.7-670806024326.6-664252287.19-46.84 6.26 +0.53 +0.01 F5V +0.108-0.070 +.010-020 0.0 0.4 * - 824 39 AriBD+28 462 17361 75578 I 024157.1+284955024754.5+291450151.42-27.10 4.51 +1.11 +1.05 +0.58 K1.5III +0.149-0.123 +.027-015V < 17 - 825 BD+56 718 17378 23637 S V480 Per 024207.7+564001024930.8+570503138.47-02.18 6.25 +0.89 +0.50 +0.76 A5Ia +0.004-0.010 -038V 37 * - 826 BD-22 479 17390168045 024212.4-220334024645.2-213823207.44-63.24 6.49 +0.38 F3IV +0.091+0.009 +007 67 - 827 CD-23 1061 17438168051 024240.8-225412024711.2-222908209.30-63.39 6.47 +0.39 F2 -0.021-0.038 +003V? - 828 40 AriBD+17 442 17459 93118 I D 937 024255.5+175202024832.1+181701158.18-36.45 5.82 +1.20 +1.13 +0.44E K1III +0.044-0.036 +047V 0.0 0.2 * - 829 BD+68 200 17463 124722195 SU Cas 024302.8+682827025158.7+685319133.47 8.52 5.80 +0.64 +0.48 F5:Ib-II -0.006-0.004 +.010-007SB * - 830 BD+24 396 17471 75588 VZ Ari 024256.9+244615024845.9+251117153.91-30.53 5.86R -0.07 -0.08 A0V +0.059-0.004 +014 60 * - 831 BD+36 566 17484 55910 024312.5+365436024927.1+371934147.54-19.84 6.45 +0.43 +0.14 F6III-IV +0.009-0.016 +012SB 17 - 832 BD-13 530 17491148612 I Z Eri 024308.4-125238024756.0-122738190.42-59.04 6.90 +1.56 +1.37 +1.39E M4III v+0.007-0.038 -014 * - 833 Gam HorCP-64 196 17504248642 W 024319.2-640726024527.5-634216284.11-49.05 5.74 +0.93 +0.63 G8III-IV +0.022-0.009 -011SB 7.3 20.0 - 834 15Eta PerBD+55 714 17506 23655 99I 2157 024323.8+552850025041.8+555344139.14-03.18 3.76 +1.68 +1.89 +0.89 K3-Ib-IIa e+0.017-0.014 +.006-001SB =< 54 4.7 28.3AB 6* - 835 Eta1ForCD-36 1050 17528193916 024330.3-355803024733.7-353303238.99-63.93 6.51 +0.96 K0-1III -0.041-0.039 +003 - 836 42Pi AriBD+16 355 17543 93127 2151 944 024342.6+170254024917.5+172751158.93-37.04 5.22 -0.06 -0.47 B6V -0.001-0.015 +009SBO 79 3.0 0.0 A 4* - 837 Zet HyiCP-68 169 175662486442191 024400.0-680213024532.6-673700287.76-46.00 4.84 +0.06 +0.09 +0.07 A2IV-V +0.069+0.046 +.009+004V? 100 - 838 41 AriBD+26 471 17573 75596 100 2159 951 024405.7+265054024959.0+271538152.98-28.61 3.63 -0.10 -0.37 -0.11 B8Vn +0.067-0.118 +.034+004SB 180 4.8 124.9AD 4* - 839 BD+57 651 17581 23662 W 024415.2+575402025145.5+581853138.20-00.94 6.45 +0.10 +0.08 +0.03 A1m -0.066+0.015 -005SBO 33 2.8 192.7 * - 840 16 PerBD+37 646 17584 559282194 W 956 024416.0+375425025035.1+381907147.25-18.86 4.23 +0.34 +0.08 +0.23 F2III +0.197-0.105 +.024+014 149 4.7 249.3AC 3* - 841 Bet ForCD-32 1025 17652193931 101I W 024454.3-324933024905.4-322421231.79-64.02 4.46 +0.99 +0.69 +0.54 K0-IIIFe-0.5 +0.090+0.155 +.026+017 9.5 4.7 * - 842 BD+46 648 17656 383972197 024459.8+462546025141.7+465031143.38-11.20 5.88 +0.89 +0.58 G8III -0.025-0.028 -012V? - 843 17 PerBD+34 527 17709 559462198I A 963 024521.0+343854025130.8+350335149.07-21.64 4.53 +1.56 +1.92 +0.95 K5+III +0.009-0.061 +.004+014V < 17 * - 844 Gam1ForCD-25 1120 17713168081 2167 024525.1-245817024951.0-243337214.12-63.29 6.14 +1.07 K1III -0.043-0.127 -006 4.4 40.9AC 3* - 845 Gam2ForCD-28 903 17729168082 024534.2-282125024954.2-275630221.64-63.79 5.39 +0.02 A0V +0.047+0.028 +.025+024 261 - 846 BD+52 640 17743 23674 2185 971 024546.1+523511025252.0+525952140.73-05.63 6.36 +0.07 -0.27 B8III +0.002-0.011 -.004+001V? 0.2 1.6ABxC 3* - 847 43Sig AriBD+14 480 17769 931441079 024558.2+144013025129.6+150455161.17-38.72 5.49 -0.09 -0.43 B7V +0.031-0.026 +017V 195 - 848 Eta2ForCD-36 1067 17793193940 W 024612.1-361528025014.8-355037239.41-63.34 5.92 +0.90 +0.62 K0III +0.058+0.021 +022V 4.3 5.0 * - 849 BD+47 723 17818 38418 2192 024632.1+480935025321.2+483410142.83-09.54 6.26 +1.18 +0.94 G5I +0.015-0.027 -001 5.7 6.7 - 850 2Tau2EriBD-21 509 17824168094 102I 2179 024630.1-212458025102.3-210015206.80-62.09 4.75 +0.91 +0.63 +0.47 K0III -0.046-0.019 +.031-009 10.2 46.7 * - 851 Eta3ForCD-36 1070 17829193944 024637.9-360514025040.4-354034239.01-63.28 5.47 +1.25 +1.31 +0.49E K5III +0.006-0.061 +.017+012 * - 852 Nu HorCP-63 188 178482486562196 024648.3-631317024901.5-624824282.75-49.46 5.26 +0.10 +0.06 A2V +0.091+0.021 +.001+031 167 - 853 CD-40 736 17864216065 024655.8-402040025047.9-395554248.01-62.21 6.36 +0.05 A0V +0.055+0.007 +019V? - 854 18Tau PerBD+52 641 17878 23685 103I 2202 Tau Per 024709.8+522112025415.5+524545141.02-05.74 3.95 +0.74 +0.46 +0.44 G4III+A4V 0.000-0.005 +.019+002SB1O < 25 8.6 51.7AxBC 4* - 855 20 PerBD+37 655 17904 55975 2200 977 024723.7+375548025342.6+382015147.81-18.55 5.33 +0.41 +0.04 F4IV +0.047-0.077 +.011+006SBO 63 0.6 0.2AB 4* - 856 BD+15 400 17918 93164 024737.5+160431025311.7+162900160.59-37.33 6.31 F5III +0.055-0.062 +009 120 - 857 BD-13 544 17925148647 975 024742.9-131030025232.1-124610192.06-58.26 6.04 +0.87 +0.56 +0.45 K2V +0.394-0.175 +.121+019V - 858 CD-31 1148 17926193951 024743.1-311342025155.3-304852228.14-63.47 6.40 +0.48 F8IV-V -0.116+0.106 +008 - 859 BD-10 569 17943130160 024758.0-095108025250.5-092628187.02-56.35 6.32 +0.19 +0.12 A7IV +0.074+0.050 +035 120 * - 860 BD+60 591 17948 125172201 W 024801.0+610647025556.9+613116137.21 2.15 5.59 +0.45 -0.10 F4V +0.142+0.032 +029 5.5 89.6AC 3 - 861 BD+63 369 17958 12519 I W 985 024809.2+635533025624.8+641957135.96 4.67 6.24 +2.03 +2.41 K3Ib v+0.006-0.002 -022 3.4 115.6 * - 862 BD-22 503 18071168121 024905.1-224657025335.3-222235209.96-61.94 5.95 +1.04 K0III +0.090-0.080 +049 * - 863 Psi ForCD-38 948 181491939652200 024939.2-385045025334.4-382613244.62-62.12 5.92 +0.44 +0.07 F6IV +0.063+0.031 +021V - 864 BD+50 665 18153 23721 024949.8+505125025650.6+511539142.08-06.89 6.22 +1.57 +1.90 K5III -0.011-0.039 +005 - 865 BD+46 658 18155 38455 W 024947.8+464531025633.4+470950143.97-10.53 6.02 +1.34 gK3 +0.004 0.000 -013 5.5 24.9AC 3* - 866 CP-63 197 18185248673 982 025009.9-631906025219.2-625435282.43-49.13 6.03 +1.25 K1III +0.072+0.001 +017 - 867 45Rho2AriBD+17 457 18191 93189 RZ Ari 025011.2+175535025548.5+181954159.93-35.45 5.91 +1.47 +1.12 +2.17 M6-III: -0.008-0.017 +.014+046V? * - 868 CD-50 860 18242 R Hor 025033.2-501752025352.9-495325265.46-57.38 4.0 H +2.11 +0.43 +3.09 M7IIIe +0.135+0.014 +.013+060V * - 869 46Rho3AriBD+17 458 18256 931952204 025047.3+173728025626.1+180123160.29-35.62 5.63 +0.43 -0.02 F6V +0.276-0.213 +.038+015SB1O 15 * - 870 BD+07 450 18262110851 025052.7+075846025613.8+082254167.75-43.37 5.97 +0.48 +0.06 F7IV +0.068-0.087 +029V =< 10 - 871 CD-51 683 182652329332202 025052.2-511641025406.5-505217266.92-56.80 6.21 +1.58 +1.88 K4III +0.010+0.006 -013 - 872 Nu HyiCP-75 204 182932559292199 025106.7-752832025028.5-750401293.35-39.77 4.75 +1.33 +1.56 +0.66 K3III -0.037-0.027 +.011+005 * - 873 21 PerBD+31 509 18296 560312205 LT Per 025112.9+313154025717.3+315603151.88-23.77 5.11 -0.01 -0.23 B9pSi v+0.003-0.031 +.003+008SB 19 * - 874 3Eta EriBD-09 553 18322130197 104I 988 025132.5-091746025625.7-085353187.15-55.31 3.89 +1.11 +1.00 +0.58 K1-IIIbBa0.2: +0.079-0.220 +.033-020 < 17 * - 875 BD-04 502 183311301991080 025136.6-040653025637.4-034244180.36-52.04 5.17 +0.08 +0.05 +0.05 A1Vn -0.035-0.044 +.026-015SB 231 * - 876 BD+38 599 18339 56036 I 025141.8+381247025802.3+383654148.45-17.90 6.04 +1.41 gK3 -0.007-0.016 -041V? - 877 BD+03 410 183451108652206I 990 025150.2+040550025704.6+043004171.55-46.17 6.11 +1.69 +1.81 M4IIIab +0.017+0.023 +052 - 878 47 AriBD+20 480 18404 756621081 025221.6+201604025805.2+204007158.88-33.22 5.80 +0.41 +0.01 +0.20 F5IV +0.233-0.031 +.030+028 20 * - 879 22Pi PerBD+39 681 18411 560472207 025221.8+391545025845.7+393946148.04-16.92 4.70 +0.06 +0.12 +0.04 A2Vn +0.024-0.043 +.009+014SB 168 * - 880 CP-64 206 18423248681 025226.9-645026025420.9-642608283.75-47.86 6.56 +1.39 +1.59 K2-3III +0.009-0.004 +006 - 881 BD+78 103 18438 4810 105I 2294 025246.6+790125030607.8+792507129.08 18.19 5.49 +1.57 M1III+F7IV -0.039+0.009D+.008-038SB 4.4 4.7 * - 882 24 PerBD+34 550 18449 560521082I 025251.7+344657025903.7+351059150.45-20.78 4.93 +1.23 +1.29 +0.64 K2III -0.046+0.006 -036V? < 17 - 883 4 EriCD-24 1336 18454168183 025256.9-241547025723.7-235143213.46-61.47 5.45 +0.23 A5V +0.098-0.030 +.029+029V 81 - 884 CD-30 1122 18466194002 025259.1-301526025713.1-295119226.08-62.31 6.29 +0.47 A2-3V:+G: +0.012-0.005 +027SB2 * - 885 BD+46 669 18474 38493 025302.5+464913025949.9+471315144.44-10.22 5.47 +0.89 +0.61 G5:III* +0.021+0.024 -.007+007V? * - 886 BD+40 639 18482 38492 I 1004 025312.0+403804025939.9+410159147.50-15.64 5.89 +1.44 K2 +0.019-0.039 +032 - 887 48Eps AriBD+20 484 18519 75673 2257B 1001 025329.5+205626025912.7+212025158.69-32.51 4.63 +0.04 +0.08 +0.02 A2V s -0.017-0.005 +.005-006V 66 0.3 1.5AB 3* - 888 48Eps AriBD+20 484 18520 75673 2257A 1001 025329.5+205626025912.7+212025158.69-32.51 4.63 +0.04 +0.08 +0.02 A2V s -0.017-0.005 +.005-008SB? 0.3 1.5AB 3* - 889 6 EriCD-24 1343 18535168191 I 025338.8-240030025805.7-233622213.02-61.25 5.84 +1.33 K2III +0.060+0.050 +007V - 890 BD+51 665 18537 23763 2270A 025344.3+515715030052.2+522106142.11-05.63 5.28 -0.05 -0.45 B7V +0.028-0.026 -005SB 210 1.4 11.9 * - 891 BD+51 665 18538 23765 2270B 025345.7+515716030053.4+522108142.11-05.63 6.74 0.00 -0.15 B9V +0.014-0.021 -002SB 200 1.4 11.9 * - 892 BD-03 470 18543130215 W 025339.7-031053025842.0-024657179.79-51.03 5.23 0.00 +0.04 A2IV -0.030-0.056 +.016-007V? 63 7.3 2.7 - 893 CD-38 976 18546194007 025338.6-383533025732.7-381128243.71-61.42 6.41 -0.03 A0Vn +0.007+0.005 +020 - 894 BD+37 675 18552 56067 025351.7+374401030011.8+380754149.09-18.11 6.11 -0.06 -0.38 B8Vne +0.006-0.028 -016SB 305 * - 895 BD-10 585 18557130216 025356.3-101034025847.4-094635189.01-55.34 6.14 +0.22 +0.13 +0.14 A2m +0.010-0.011 -018V 28 - 896 91Lam CetBD+08 455 186041108891083 025421.2+083032025942.9+085427168.21-42.41 4.70 -0.12 -0.45 -0.11 B6III +0.004-0.014 +010 150 * - 897 The1EriCD-40 771 18622216113 106 W A 1002 025428.1-404219025815.7-401817247.86-60.74 3.24 +0.14 +0.14 +0.08 A4III -0.045+0.019 +.035+012SB2 74 1.1 8.3 * - 898 The2EriCD-40 771 18623216114 W B 1002 025428.9-404218025816.3-401816247.85-60.73 4.35 +0.08 +0.12 A1V -0.064+0.018 +.035+019 100 1.1 8.3 * - 899 5 EriBD-03 475 186331302282209 1008 025438.2-025147025941.2-022754179.67-50.64 5.56 -0.08 -0.18 B9.5V -0.002-0.022 +018SB 182: - 900 CD-29 1106 18650168202 025451.0-291817025906.6-285425224.10-61.85 6.14 +1.04 K1III +0.018-0.044 +014V - 901 Zet ForCD-25 1191 18692168209 025511.9-254029025936.1-251627216.57-61.27 5.71 +0.40 F2V +0.180+0.087 +.029+021 90 * - 902 BD+10 401 18700 932322213I 025518.6+102827030044.1+105213166.80-40.74 5.95 +1.59 +1.95 K6 +0.080-0.039 +018 - 903 CD-33 1042 187351940232211 025530.9-325420025938.3-323026231.73-61.79 6.31 0.00 A0V +0.010+0.011 +016V? - 904 7 EriBD-03 478 18760130242 I CV Eri 025548.5-031632030051.0-025243180.47-50.70 6.11 +1.77 +2.07 +0.91E M1III +0.020+0.006 +080V * - 905 49 AriBD+25 477 18769 756932214 1021 025600.4+260400030154.1+262744156.02-27.90 5.90 +0.14 +0.15 +0.05 A3m -0.012 0.000 -004V 43 - 906 BD+80 97 18778 5003946 2348 1042 025610.9+810502031142.8+812814128.14 20.05 5.95 +0.15 +0.09 +0.07 A7III-IV -0.040-0.009 +.018-003SB1O 41 5.0 24.2 * - 907 8Rho1EriBD-08 562 18784130243 025614.9-080325030110.0-073946186.62-53.64 5.75 +1.05 +0.87 K0II +0.098-0.070 +014V * - 908 BD+04 485 18832110915 025636.2+045626030152.3+052010172.01-44.75 6.25 +1.05 +0.82 K0 +0.036+0.015 -059 - 909 Bet HorCP-64 215 188662487012212 025654.3-642808025847.8-640417282.85-47.79 4.99 +0.13 +0.15 +0.05 A3-5IIIm: +0.022+0.001 +024V? 84 - 910 93 CetBD+03 420 18883110921 025708.2+035731030222.5+042110173.08-45.39 5.61 -0.10 -0.41 B7V +0.014+0.005 +012 80 - 911 92Alp CetBD+03 419 18884110920 107I Alp Cet 025703.0+034151030216.8+040523173.32-45.59 2.53 +1.64 +1.94 +1.16 M1.5IIIa v-0.009-0.078 +.009-026V * - 912 BD-10 594 188851487212216 025705.3-102121030156.1-095741190.03-54.80 5.83 +1.11 gG6 +0.046 0.000 +012V? - 913 BD-07 537 18894130251 025712.4-065306030209.3-062941185.31-52.74 6.19 +0.60 +0.15 G0IV-V +0.087-0.148 +016SB2O 27 * - 914 Eps ForCD-28 987 189071682382215 025718.9-282827030137.7-280530222.48-61.23 5.89 +0.79 G5IV +0.279-0.437 +.039+038V - 915 23Gam PerBD+52 654 18925 23789 108I 2324 025732.9+530654030447.8+533023142.07-04.34 2.93 +0.70 +0.45 +0.45 G8III+A2V 0.000-0.005 +.016+003SB2O=< 50 8.6 57.0AB 3* - 916 BD+27 468 18928 75709 025731.7+275239030330.3+281611155.26-26.19 6.36 F0V +0.083-0.020 +011 157 - 917 9Rho2EriBD-08 568 18953130254 I 2312 1024 025747.7-080443030242.3-074107187.04-53.34 5.32 +0.94 +0.73 K0II-III +0.047-0.001 +025 4.2 1.9 * - 918 BD+56 767 18970 237912217I 025801.3+561848030532.4+564221140.59-01.50 4.76 +1.02 +0.86 G9.5III -0.014+0.067 +.005-045V < 19: - 919 11Tau3EriCD-24 1387 189781682491085 025758.9-240059030223.5-233728213.54-60.29 4.09 +0.16 +0.08 +0.09 A4IV -0.145-0.054 +.059-010V? 144 * - 920 BD+55 738 18991 23793 025812.0+554045030539.9+560407140.92-02.04 6.11 +1.02 G9III -0.003-0.039 -011 - 921 25Rho PerBD+38 630 19058 56138 109I Rho Per 025845.9+382710030510.6+385025149.60-17.01 3.39 +1.65 +1.79 +1.62 M4II +0.130-0.106 +.011+028 * - 922 BD+63 390 19065 126082219 025856.6+634009030719.0+640328137.14 5.00 5.89 -0.03 -0.10 B9V -0.015+0.006 -002V 0 - 923 BD+40 664 19066 38559 025852.7+401132030520.8+403457148.70-15.49 6.05 +1.01 K0III -0.053+0.001 -034 - 924 BD+15 430 19080 93260 025906.6+152805030440.7+155122163.84-36.22 6.49R K3III -0.001-0.093 -032 - 925 10Rho3EriBD-08 572 19107130269 025921.7-075931030416.4-073603187.30-52.98 5.26 +0.20 +0.09 A8V +0.056+0.013 +.026+015V? 152 - 926 BD+01 534 191211109452218 025927.7+012824030438.1+015149176.17-46.77 6.05 +1.04 +0.86 K0III +0.028-0.003 +001V? - 927 52 AriBD+24 431 19134 75723 2336A 025934.6+245158030526.7+251519157.53-28.47 6.8 -0.02 -0.38 B7V +0.002-0.008D+.004+009 0.0 0.2AB 5* - 928 52 AriBD+24 431 19135 75723 2336B 025934.6+245158030526.7+251519157.53-28.47 7.0 B7V +0.003-0.008D+.004+009? 0.0 0.2AB 5* - 929 CD-47 932 191412161501086 025930.7-472201030255.9-465830259.36-57.50 5.82 +1.30 K2-3III +0.029+0.003 +016V - 930 BD+51 681 19268 23825 030052.8+514941030803.9+521248143.14-05.21 6.31 -0.01 -0.43 B5V +0.032-0.026 +006 - 931 BD+12 436 19270 932762220 030054.2+124806030623.7+131114166.31-38.06 5.62 +1.08 K3III 0.000-0.063 -015SB - 932 BD+73 168 19275 48402222 030105.2+740049031156.3+742337132.11 14.08 4.87 +0.02 +0.05 -0.01 A2Vnn +0.012-0.090 +.032+010V 247 - 933 BD+46 692 19279 38587 030056.3+465521030747.4+471830145.59-09.47 6.41 +0.12 +0.11 A3Vnn +0.005-0.008 -010 - 934 Mu HorCP-60 236 19319232981 110 030115.4-600732030336.8-594416277.43-50.34 5.11 +0.34 -0.03 F0IV -0.073-0.067 +.025+017 97 - 935 BD-06 606 193491302842221I W 030136.6-062830030633.5-060519185.87-51.62 5.27 +1.60 +1.78 M3III +0.006-0.008 +017 7.2 15.9 - 936 26Bet PerBD+40 673 19356 38592 111I 2362 Bet Per 030139.5+403414030810.1+405720148.98-14.90 2.12 -0.05 -0.37 -0.03 B8V +0.004-0.001 +.045+004SBO 65 8.3 81.9AD 6* - 937 Iot PerBD+49 857 19373 38597 112I W 030150.8+491353030904.0+493648144.58-07.39 4.05 +0.59 +0.12 +0.29 G0V +1.263-0.091 +.084+050V? =< 10 8.2 146.2 * - 938 53 AriBD+17 493 19374 93284 D UW Ari 030147.7+172939030725.7+175248162.98-34.21 6.11 -0.12 -0.79 B1.5V -0.025+0.008 +021SB 18 0.0 0.0 * - 939 The HyiCP-72 219 19400255945 113 W 030202.8-721735030215.4-715409289.93-41.76 5.53 -0.14 -0.51 B3V+A0IV +0.025+0.014D+.103+012 44 0.0 0.1 * - 940 54 AriBD+18 414 19460 93293 I 030240.9+182441030821.2+184742162.53-33.35 6.27 +1.58 +1.97 +0.70E M0III +0.047-0.016 +.032+043V? * - 941 27Kap PerBD+44 631 19476 38609 I 2368 1055 030244.8+442843030929.8+445126147.12-11.43 3.80 +0.98 +0.83 +0.50 K0III +0.177-0.157 +.033+029SB < 17 8.4 27.7 * - 942 BD+07 478 19525111002 030317.3+080508030838.7+082815170.83-41.30 6.28 +1.06 +0.88 G9III -0.015+0.069 +038 - 943 CD-28 1028 19545168321 030334.5-281252030750.9-274952222.28-59.84 6.19 +0.16 A5V +0.075-0.020 +012 - 944 55 AriBD+28 499 19548 757571088 030335.6+284143030936.7+290437156.01-24.78 5.72 +0.12 -0.15 B8III +0.019-0.014 -002V * - 945 BD+27 480 19600 75762 030410.3+272624031008.8+274912156.90-25.75 6.42 +0.01 -0.01 A0V v+0.005-0.048 -005 62 * - 946 BD+26 516 19637 75771 030430.6+263049031027.0+265347157.54-26.48 6.02 +1.28 +1.28 K3III +0.004+0.070 -016 - 947 28Ome PerBD+39 724 19656 56224 I W 030449.8+391355031117.4+393642150.23-15.73 4.63 +1.11 +1.03 +0.57 K1III -0.023+0.005 +.023+007V < 19: 6.1 177.4 * - 948 BD+11 445 19698 93320 D 030511.0+112936031038.9+115221168.40-38.41 5.98 -0.06 -0.27 B8V +0.041-0.026 +001 350 * - 949 BD+47 779 19735 386382225I W 030531.1+472101031226.4+474333146.06-08.71 6.33 +1.43 +1.64 K5III +0.074-0.083 -036 3.9 202.1AD 5* - 950 BD+41 631 19736 38635 030533.1+415954031209.6+422234148.87-13.30 6.15 -0.09 -0.56 B4V +0.028-0.013 +006V * - 951 57Del AriBD+19 477 19787 93328 114I 1066 030554.5+192055031137.8+194336162.60-32.14 4.35 +1.03 +0.87 +0.51 K2III v+0.152-0.011 +.027+025V? < 17 * - 952 BD+12 452 19789 93327 D 030552.3+124007031121.9+130252167.61-37.40 6.12 +1.02 +0.84 K0IIIp -0.013+0.015 +011 * - 953 CD-24 1480 19826168354 030611.0-240706031035.4-234418214.63-58.50 6.38 +0.93 K0IV +0.058+0.033 +009V - 954 56 AriBD+26 523 19832 75788 SX Ari 030616.6+265248031214.2+271525157.68-25.95 5.79 -0.12 -0.42 B9pSi v+0.010-0.017 +011V 200 * - 955 BD-04 540 198361303282224I 2389 030618.3-041122031118.8-034842184.19-49.29 6.05 +1.66 +1.94 M1III -0.006-0.014 +024 5.9 24.4 * - 956 BD+47 782 19845 38652 030627.0+474804031324.0+481037145.96-08.25 5.90 +0.97 +0.81 G9III +0.030-0.022 -010 * - 957 BD-16 587 19887148821 030638.0-162410031116.8-160131201.29-55.78 6.26 +1.20 +1.27 K0 -0.014-0.020 -015V? - 958 BD+06 496 199261110442226I 030707.9+061704031226.4+063939173.40-41.99 5.56 +1.08 +0.66 K1IIIep+A6V -0.009-0.004 +005SB =< 50 * - 959 CP-69 174 19940248742 030702.4-693846030749.2-691556287.07-43.42 6.15 +1.02 +0.83 K1III -0.025-0.016 +011V? - 960 CD-49 884 19948216197 030712.2-490642031027.4-484403261.22-55.59 6.12 +1.12 +1.03 K1III +0.034-0.027 +014 - 961 BD+77 115 19978 4875 115 2450 1094 030737.2+772203032019.7+774405130.66 17.16 5.45 +0.19 +0.11 A6V +0.059-0.061 +.014+004V 37 6.8 1.2AB 3* - 962 94 CetBD-01 457 19994130355 116 2406 030740.1-013412031246.4-011146181.50-47.34 5.06 +0.57 +0.12 F8V +0.196-0.067 +.057+018 7 6.4 3.2 * - 963 Alp ForCD-29 1177 20010168373 I 2402 1074 030749.3-292252031204.3-285913224.75-59.04 3.87 +0.52 +0.02 +0.31 F8V +0.339+0.640 +.075-021 0 2.7 3.6 * - 964 BD+56 798 20041 23903 2424 030808.0+564605031548.0+570827141.57-00.41 5.79 +0.73 +0.09 A0Ia -0.004+0.003 -012 8.2 10.8 * - 965 BD+84 59 20084 5501636 030834.9+843327033220.1+845440126.50 23.20 5.61 +0.92 +0.49 G3IIp:+F0:V +0.063-0.136 +.026+033SB 80 * - 966 BD+41 638 20063 38674 030818.4+420749031456.7+423014149.24-12.92 6.07R +1.07 ? K2III +0.070+0.012 +022 * - 967 BD+65 338 20104 12686 2436 030845.7+651716031731.6+653931137.24 6.93 6.36 +0.09 +0.07 A3V -0.010+0.010D+.005-006 0.4 0.5AB 3* - 968 CD-44 1025 201212162092228 W 030855.0-444740031225.8-442511253.82-56.96 5.93 +0.44 F7III+A0V +0.093-0.017D+.025+017SB 151 0.4 0.2AB 3* - 969 BD+50 729 20123 23914 I 030903.0+503400031612.2+505616144.89-05.66 5.03 +1.15 +0.83 G6Ib-IIa -0.007-0.016 +.010+002SB < 17 * - 970 CD-36 1208 20144194163 030906.4-361905031301.5-355638238.21-58.76 6.27 -0.08 B8V +0.003-0.001 +022V - 971 BD+30 512 20149 56285 030914.9+301104031520.5+303324156.23-22.85 5.52R +0.01 +0.09 A1V s -0.006+0.007 -003SB? 24 - 972 58Zet AriBD+20 527 20150 758101089 030909.1+204026031454.1+210240162.38-30.62 4.89 -0.01 -0.01 -0.03 A1V -0.028-0.073 +.020+007V 128 - 973 BD+44 648 20162 38685 I 030916.7+445833031604.7+452045147.87-10.41 6.16 +1.67 +2.00 +1.02E M2III +0.054-0.045 -003 - 974 CD-30 1238 20176168397 1082 030927.6-301039031338.0-294815226.36-58.76 6.16 +1.05 K1IICNIII +0.027-0.002 +023V? * - 975 BD+32 591 20193 56293 2431 030936.0+322906031547.0+325123154.91-20.90 6.31 +0.37 -0.02 F4V vw -0.035+0.009 +014 19 6.5 44.1AC 3 - 976 BD+34 610 20210 56296 2433 V423 Per 030945.6+341907031601.9+344119153.87-19.35 6.25 +0.28 +0.12 A1m +0.043-0.034 +025SBO 7.2 29.3 * - 977 CP-57 513 20234233037 118 TW Hor 031001.1-574145031233.2-571918273.30-50.90 5.74 +2.28 +2.83 +1.38 C5II +0.019+0.009 +014 * - 978 BD+31 576 20277 56308 031025.4+314900031635.1+321101155.47-21.36 6.06 +0.99 +0.68 G8IV -0.018-0.108 +019V - 979 BD+39 743 20283 38700 2443 031039.1+400653031711.4+402900150.73-14.39 6.45 B9VpSi +0.015-0.023D+.004-008 0.9 3.8 * - 980 CD-26 1210 20293168406 031042.2-262815031500.2-260601219.41-58.00 6.25 +0.04 A5V -0.019-0.015 -002 270 - 981 CP-79 91 20313255962 W BN Hyi 031056.1-792208030732.0-785922295.34-36.05 5.57 +0.30 +0.09 F2II-III +0.071+0.066 +011SB 47 2.4 15.2 * - 982 30 PerBD+43 674 20315 38704 031103.4+433927031747.4+440130148.85-11.36 5.47 -0.06 -0.35 B8V +0.032-0.029 -001SB 269 * - 983 BD-06 636 20319130388 2440 1090 031104.1-061718031600.9-055507187.86-49.63 6.17 -0.02 -0.24 B9V +0.007-0.004 +.039+007V 0.2 0.9 * - 984 13Zet EriBD-09 624 203201303871091 1088 031058.5-091128031550.0-084911191.58-51.31 4.80 +0.23 +0.09 +0.13 A5m -0.002+0.046 +.025-004SBO 66 * - 985 BD+65 340 20336 12704 W BK Cam 031111.1+651712031959.4+653908137.46 7.06 4.84 -0.15 -0.77 -0.13 B2.5Ven v+0.015-0.013 +.009-003SB 351 7.7 120.9 * - 986 BD+38 690 20346 563222230 031116.7+385457031745.8+391700151.51-15.34 5.96 +0.07 +0.11 A2IV +0.022-0.020 +027SB? 35 - 987 29 PerBD+49 899 20365 23944 031130.2+495121031837.8+501320145.60-06.06 5.15 -0.06 -0.56 B3V +0.029-0.026 -004SB 156 * - 988 14 EriBD-09 627 20395130395 031144.9-093128031635.7-090916192.19-51.33 6.14 +0.40 -0.04 F1V -0.005+0.048 -005 =< 10: - 989 31 PerBD+49 902 20418 38714 031200.4+494347031907.6+500542145.74-06.12 5.03 -0.06 -0.54 B5V +0.023-0.025 +003V 298 * - 990 CD-31 1303 20423194197 031203.9-311148031611.3-304939228.37-58.26 6.65 -0.07 A0V +0.030+0.004 +020V? - 991 BD+33 619 20468 563402232I 031228.4+335125031843.8+341322154.63-19.43 4.82 +1.49 +1.57 +0.76 K2IICN1 +0.003-0.006 +.012+002 < 17 * - 992 95 CetBD-01 469 20559130408 I 2459 1097 031315.3-011740031822.4-005549182.52-46.10 5.38 +1.04 +0.81 G9IV +0.252-0.052 +.017+020V 2.4 1.2 * - 993 CD-29 1216 20606168449 031349.9-290943031802.8-284749224.61-57.71 5.91 +0.33 F3V+A8-9 +0.185-0.015 +042 - 994 15 EriBD-22 1146 20610168452 I 2463 031356.8-225236031822.1-223041213.26-56.46 4.88 +0.90 G6III +0.018+0.012 +.028+024V 1.3 0.2 * - 995 59 AriBD+26 540 20618 75863 031357.3+264235031955.8+270416159.34-25.11 5.90 +0.86 +0.51 G6IV -0.026-0.075 -000V - 996 96Kap1CetBD+02 518 206301111201093 W 1100 031406.9+030013031921.7+032213178.22-43.08 4.83 +0.68 +0.19 +0.36 G5V v+0.271+0.092 +.108+020V? < 17 4.5 268.7AB 3* - 997 BD-19 651 20631148897 2465 031407.1-185522031841.2-183335206.62-55.15 5.71 +0.37 F0IV +0.136-0.053 +.029+018SB 2.3 7.2 * - 998 CD-48 900 206402162462233 031411.0-480705031726.6-474506258.81-54.94 5.85 +1.24 K2III -0.005+0.021 -009 - 999 BD+28 516 20644 758712234I 031417.1+284110032020.4+290254158.14-23.46 4.47 +1.55 +1.79 +0.88 K2II-III -0.008-0.016 -.008-002V? < 17 -1000 60 AriBD+25 536 20663 75875 031429.7+251809032025.6+253946160.37-26.17 6.12 +1.24 +1.27 gK3 +0.017-0.087 +026V? -1001 BD+48 893 20675 38753 W 031446.7+484242032152.6+490415146.67-06.74 5.93 +0.43 -0.02 F6V +0.191-0.070 +.015+024V? 3.5 205.8 * -1002 32 PerBD+42 750 20677 387502236 1107 031444.4+425806032126.5+431946149.81-11.58 4.95 +0.04 +0.07 0.00 A3V -0.063-0.006 +.026-007SB? 228 -1003 16Tau4EriBD-22 584 20720168460 I 2472 Tau4 Eri 031504.1-220718031931.0-214528212.09-56.00 3.69 +1.62 +1.81 +1.46 M3.5IIIaCa-1 e+0.052+0.033 -.013+042 6.2 5.5AB 6* -1004 CD-24 1578 20729168462 I 1104 031513.2-242906031934.8-240723216.21-56.59 5.61 +1.66 +2.00 +0.96E M2III +0.001-0.025 +015V * -1005 61Tau1AriBD+20 543 20756 758861094 W 031527.1+204712032113.6+210849163.66-29.64 5.28 -0.07 -0.52 B5IV +0.025-0.024 +014V 20 2.5 0.2 O 3* -1006 Zet1RetCP-63 217 20766248770 I'W 031535.8-625728031746.2-623431279.12-47.22 5.54 +0.64 +0.06 +0.34 G2.5VFe1Hdel 1 +1.339+0.648 +.097+012 0.3 309.6 * -1007 97Kap2CetBD+03 461 20791111142 031552.8+031856032106.8+034032178.32-42.54 5.69 +0.97 +0.76 G8.5III +0.051-0.026 +011V -1008 CD-43 1028 20794216263 119I' 031556.0-432708031955.7-430411250.78-56.11 4.27 +0.71 +0.22 +0.40 G8V +3.043+0.725 +.156+087 * -1009 BD+64 391 20797 127431096I 1121 031559.3+641343032440.5+643510138.46 6.44 5.23 +2.08 +2.06 +1.23 M0II -0.005+0.001 +.009-021 -1010 Zet2RetCP-62 265 20807248774 W 031602.3-625317031812.9-623023279.00-47.23 5.24 +0.60 0.00 +0.34 G1V +1.336+0.645 +.091+012 0.3 309.6 * -1011 BD+48 899 20809 38768 031607.8+485120032313.2+491248146.78-06.50 5.29 -0.07 -0.54 B5V +0.022-0.020 +004SB? 244 * -1012 62 AriBD+27 500 20825 75892 031611.5+271454032211.9+273627159.43-24.38 5.52 +1.10 +0.91 G5III +0.009-0.014 +006 -1013 CD-27 1183 20853168475 031628.9-265804032045.2-263623220.75-56.82 6.39 +0.54 F7V +0.043+0.024 +025V? -1014 CP-67 217 208882487762235 031650.9-671724031759.0-665537283.83-44.38 6.05 +0.13 +0.10 A3V +0.055+0.007 +024 -1015 63Tau2AriBD+20 551 20893 75899 I 031659.8+202304032245.2+204431164.27-29.73 5.09 +1.24 +1.27 K3III -0.044-0.022 +.008+002V? < 19: -1016 CD-24 1600 20894168482 031701.9-235938032124.0-233807215.54-56.07 5.52 +0.88 +0.59 +0.47 G6.5IIbCN-1Hdel -1 -0.021-0.029 +008V * -1017 33Alp PerBD+49 917 20902 38787 120I W 1125 031710.8+493019032419.4+495140146.57-05.86 1.79 +0.48 +0.37 +0.33 F5Ib +0.024-0.025 +.016-002V 18 10.0 167.0 * -1018 CD-26 1257 209801684932237 031758.3-255644032216.3-253516219.04-56.30 6.35 +0.01 A0V +0.009-0.002 +025V -1019 BD+33 636 20995 56419 2514 031814.3+331053032429.7+333209156.09-19.30 5.61R -0.03 -0.16 A0V +0.038-0.028 +002 145 3.5 4.3AB 3* -1020 BD+53 657 21004 24024 031819.4+533407032548.4+535518144.50-02.36 6.51 +0.29 +0.07 A9III-IV +0.088-0.030 -004 97 -1021 CD-48 930 21011216278 031819.5-480804032133.3-474637258.40-54.29 6.39 +1.00 K0III -0.002-0.023 -002 -1022 64 AriBD+24 481 21017 759122240I 031824.0+242212032418.5+244327161.78-26.39 5.50 +1.19 gK4 +0.015-0.050 +013V? -1023 BD+04 532 21018111161 2509 Var? 031823.2+043134032339.1+045255177.72-41.26 6.38 +0.86 +0.51 G5III +0.006-0.008 +003SB 3.2 0.9 * -1024 BD-08 643 21019130457 2507 031824.7-080840032317.8-074739191.80-49.20 6.20 +0.70 +0.16 G2V +0.010-0.222 +.034+043V? =< 10 6.4 3.9 * -1025 Iot HyiCP-77 134 210242559731095 031826.6-774512031557.6-772318293.66-37.01 5.52 +0.44 0.00 +0.24C F4III +0.109+0.061 +019V 0 -1026 BD+40 736 21038 38809 031832.2+405410032509.4+411526151.58-12.91 6.51 A0V -0.005+0.001 -019SB 91 -1027 65 AriBD+20 556 21050 75915 031840.0+202655032426.1+204813164.58-29.43 6.08 -0.04 -0.08 A1V -0.002-0.006 -009V 44 -1028 BD+12 473 21051 934162241 031839.9+121630032410.1+123746170.87-35.66 6.04 +1.23 +1.09 K0III-IV +0.028-0.021 +021 -1029 BD+48 913 21071 38817 031851.2+484605032557.4+490715147.20-06.33 6.09 -0.07 -0.49 B7V +0.026-0.022 -001V? 43 * -1030 1Omi TauBD+08 511 21120111172 121I 1134 031925.8+084037032448.8+090144174.12-38.16 3.60 +0.89 +0.61 +0.45 G6IIIFe-1 -0.066-0.078 +.016-021SB1O < 17 * -1031 CD-33 1202 21149194268 031943.7-330343032344.6-324226231.95-56.71 6.50 +1.37 K3III +0.023-0.005 +018 -1032 BD+71 201 21179 4917 I 031956.8+713056033019.5+715150134.70 12.72 6.32 +1.80 +1.88 M2III +0.010+0.005 -023 -1033 BD+59 657 21203 12770 2538 032015.3+595423032823.6+601520141.25 3.09 6.49 +0.02 -0.23 B9V+A1 +0.018-0.021D+.006+005 1.0 0.2AB 3* -1034 BD+48 920 21278 38849 032056.3+484251032803.1+490346147.52-06.19 4.98 -0.09 -0.56 -0.10 B5V +0.024-0.028 +002SB1O 53 * -1035 BD+59 660 21291 24054 122 2544 1152 032058.0+593531032904.1+595625141.50 2.88 4.21 +0.41 -0.24 +0.38 B9Ia -0.003-0.004 -007 29 4.3 2.4 * -1036 BD+18 484 21335 934362242 D 032120.6+182424032703.2+184523166.64-30.61 6.57 +0.15 +0.10 A3Vnp +0.043-0.006 +031 214 0.0 0.1 * -1037 BD+49 944 21362 38862 032141.8+493004032852.4+495054147.19-05.46 5.58 -0.04 -0.45 B6Vn +0.028-0.026 -002SB 355 * -1038 2Xi TauBD+09 439 21364111195 123 032144.9+092303032710.2+094358174.01-37.25 3.74 -0.09 -0.33 -0.09 B9Vn +0.060-0.039 -.017-002SB2 33 * -1039 BD+12 477 21379 93439 032148.1+122310032718.7+124406171.47-35.06 6.28 -0.02 -0.07 A0V s +0.007-0.019 +015SB 59 -1040 BD+58 607 21389 24061 I 032155.4+583155032954.9+585243142.19 2.06 4.54 +0.56 -0.11 +0.50 A0Ia e+0.006-0.002 -006SB 6 * -1041 BD+33 656 21402 56475 032203.7+332740032820.8+334827156.60-18.61 5.61R +0.02 +0.14 A2V +0.037-0.057 +006SB -1042 Chi1ForCD-36 1290 21423194289 1142 032203.9-361616032555.8-355515237.74-56.16 6.39 +0.08 A1IV +0.029-0.007 +025V -1043 BD+58 608 21427 24062 2563 1158 032207.9+590116033011.3+592158141.94 2.49 6.13 +0.08 A2V +0.036-0.047D+.004+011V 1.4 2.5 -1044 34 PerBD+49 945 21428 38872 2558 032212.8+490946032922.1+493032147.45-05.70 4.67 -0.09 -0.57 -0.11 B3V +0.026-0.027 +.018-002V 202 2.1 0.8 * -1045 CD-27 1228 21430168544 032209.2-274008032622.5-271903222.37-55.70 5.93 +0.94 G5III +0.008+0.049 +013V -1046 BD+54 684 21447 24064 2565 1159 032222.4+550621033000.2+552707144.14-00.75 5.09 +0.05 +0.04 -0.01 A1V -0.046-0.009 +.025+000V 179 4.8 14.8AB 3* -1047 BD+46 760 21455 38874 2560 032227.5+463531032926.2+465616148.93-07.80 6.24 +0.13 -0.25 B7V +0.018-0.035 +002 150 5.1 27.9AB 6* -1048 66 AriBD+22 495 21467 75945 2552 032235.7+222734032826.6+224815163.95-27.29 6.03 +0.95 K0IV -0.001-0.104 +049SB 1.4 0.0 A 4* -1049 CD-42 1115 21473216316 032237.3-415914032611.7-413813247.78-55.30 6.32 +0.06 +0.05 A0V +0.015+0.027 +012 -1050 BD-11 667 21530148972 032314.8-113758032801.0-111712197.35-50.01 5.73 +1.10 +1.04 K2III +0.002-0.049 -002V -1051 BD+47 844 21551 38893 032333.0+474535033037.0+480613148.42-06.73 5.82 -0.04 -0.32 B8V +0.032-0.029 +005SB 334 * -1052 35Sig PerBD+47 843 21552 38890 124I 1167 032331.2+473900033034.5+475943148.48-06.83 4.36 +1.35 +1.54 +0.74 K3III +0.004+0.020 +.004+016 < 17 * -1053 CP-70 230 21563248797 032336.7-695834032402.5-693729286.07-42.15 6.15 +0.48 +0.25 G0-5+A3-5V +0.029+0.015 +020 -1054 Chi2ForCD-36 1306 215741943122244 032340.9-360144032733.4-354053237.27-55.85 5.71 +1.29 K2III +0.081+0.002 +030 -1055 BD+72 178 21610 49362251 032414.4+730029033512.4+732049134.10 14.14 6.57 +0.03 +0.02 A0Vn +0.013-0.026 -009 145 -1056 BD+48 938 21620 38906 1173 032420.8+485201033129.4+491235147.90-05.74 6.29 +0.09 +0.12 A0Vn -0.005+0.001 -023 230 * -1057 NOVA 1901 GK Per +029SBO * -1058 Chi3ForCD-36 1310 21635194318 W 032420.0-361158032811.5-355112237.56-55.71 6.50 +0.13 +0.08 A1V +0.030-0.003 +015 4.0 6.3 -1059 BD+48 942 21661 38912 032439.4+490332033149.1+492403147.84-05.56 6.39 +0.09 -0.14 B9III +0.012-0.005 -006 25 * -1060 BD-07 606 21665130520 032445.2-070847032939.1-064818191.86-47.34 5.99 +1.02 +0.87 G5 -0.096-0.104 +026 -1061 4 TauBD+10 452 21686 93463 032456.4+105937033024.5+112011173.32-35.55 5.14 -0.03 -0.07 A0Vn -0.008-0.018 +.002+000V 236 -1062 BD-13 662 216881489852246 032452.5-130109032936.0-124029199.55-50.32 5.59 +0.17 +0.11 A5IV +0.005+0.004 +015 181 -1063 BD+47 847 21699 38917 V396 Per 032504.4+474057033208.6+480125148.68-06.65 5.47 -0.10 -0.57 B8IIIpMn +0.020-0.025 +001V 59 * -1064 CP-69 192 217222488042243 032508.2-694110032536.2-692011285.65-42.24 5.96 +0.42 +0.01 F3-5IV -0.002+0.063 +014V -1065 BD+27 515 21743 75970 2582A 032518.4+271350033120.8+273419161.21-23.17 5.96R A2V +0.041-0.029D+.009+006 100 0.4 11.4 * -1066 5 TauBD+12 486 21754 93469 125I 032521.0+123539033052.4+125612172.07-34.32 4.11 +1.12 +1.02 +0.54 K0II-IIIFe-0.5 +0.020-0.002 -.012+015SB1O < 19: 2.0 0.0 * -1067 BD+05 502 217551112302247 032526.6+055048033045.4+061119178.04-39.07 5.94 +0.96 +0.64 G8III +0.045-0.016 +011 -1068 BD+58 619 21769 24093 2592A 032531.3+582536033332.1+584554142.64 2.24 6.40 +0.14 +0.15 A4III +0.008-0.057 +.009+007 1.7 20.4AB 3* -1069 36 PerBD+45 778 21770 389242249 1182 032530.4+454305033226.3+460325149.87-08.22 5.31 +0.40 -0.02 +0.22 F4III -0.054-0.079 +.031-049 29 -1070 17 EriBD-05 674 217901305281097 032539.3-052505033037.1-050431189.96-46.18 4.73 -0.09 -0.27 -0.08 B9V s +0.014+0.007 +015V? 96 -1071 BD+57 730 21794 240982252 032546.3+573142033341.2+575208143.17 1.52 6.37 +0.51 +0.03 F7V +0.007+0.040 -072 =< 10 -1072 BD+44 734 21803 38927 KP Per 032547.0+443056033239.1+445120150.61-09.18 6.41 +0.03 -0.72 B2IV +0.011-0.013 +002V * -1073 BD+54 693 21819 24099 032601.9+543808033339.0+545829144.84-00.84 5.98 +0.11 A3V -0.048-0.005 +014SB2 185 -1074 BD+34 674 21856 565311098 Var? 032617.8+350718033240.0+352742156.32-16.75 5.90 -0.06 -0.85 B1V -0.010+0.001 +025V 150 * -1075 CD-43 1085 21882216347 032625.9-425837032955.0-423803249.21-54.41 5.78 +0.22 A5V -0.075-0.001 +012 198 -1076 CD-41 1029 218992163502248 1179 032639.7-414226033013.6-412212247.06-54.61 6.12 +0.48 F7V -0.009-0.175 +016 -1077 BD+59 675 21903 24111 2612 032650.6+594213033500.8+600228142.05 3.39 6.46 +0.39 -0.07 F3V -0.035+0.013D+.021+021 0.9 1.1AB 3* -1078 BD+39 811 21912 565382254 IW Per 032659.3+393344033335.1+395358153.72-13.09 5.81 +0.11 +0.12 A5m +0.019-0.046 +004SB1O 101 * -1079 6 TauBD+08 528 21933111246 032711.2+090208033236.0+092225175.51-36.55 5.77 -0.08 -0.30 B9IV +0.033-0.044 +007V 90 -1080 BD+75 143 21970 4953 032721.1+752426033924.8+754423132.81 16.20 6.27 +0.97 +0.65 G9III-IV -0.015+0.006 +028 -1081 CD-47 1071 219812163572250 TU Hor 032724.4-474300033037.0-472231256.87-53.00 5.99 +0.11 A1V +0.069+0.011 -012V * -1082 CD-26 1333 21997168612 032737.1-255712033153.9-253651219.83-54.18 6.38 +0.12 A3V +0.082-0.019 +018V? -1083 Kap RetCP-63 234 22001248819 126 W 032737.7-631724032922.7-625615278.36-45.94 4.72 +0.40 -0.04 +0.18 F5IV-V +0.383+0.372 +.060+012 0 6.0 60.0 * -1084 18Eps EriBD-09 697 22049130564 127I A 032813.1-094748033255.8-092730195.86-48.04 3.73 +0.88 +0.59 +0.47 K2V -0.974+0.021 +.303+015V? < 17 3.0 2.0 * -1085 BD+17 575 22072 93494 032826.4+173018033408.3+174958168.80-30.19 6.17 +0.89 +0.54 K1IVFe-1 +0.089-0.315 +.022+011V? -1086 7 TauBD+23 473 22091 75999 2616 1192 032831.1+240745033426.6+242752163.95-25.14 5.92 +0.13 +0.17 A3V+A3V +0.008-0.024 +.006+026 31 0.2 0.7AB 3* -1087 37Psi PerBD+47 857 22192 38980 I Psi Per 032922.8+475136033629.4+481134149.17-06.09 4.23 -0.06 -0.57 -0.01 B5Ve v+0.024-0.026 -001V 369 * -1088 19Tau5EriBD-22 628 222031686341099 032922.2-215805033347.3-213758213.52-52.78 4.27 -0.11 -0.35 -0.12 B8V+B8V +0.048-0.027 +014SB2O 48 * -1089 BD+05 511 22211111273 032930.2+060500033449.2+062504178.70-38.17 6.49 +0.63 +0.16 G0 -0.007-0.017 -011 =< 10 -1090 CD-50 1071 22231233152 128 032935.8-504304033234.8-502243261.29-51.65 5.68 +1.10 +1.16 K2III +0.097+0.079 +037V * -1091 BD-10 704 22243149047 032948.9-101211033437.4-095207196.69-47.90 6.25 +0.02 A2V +0.018-0.004 +011V? -1092 CP-66 195 22252248825 032950.0-664941033051.6-662923282.23-43.68 5.83 -0.06 -0.33 B8V +0.010-0.002 +029 -1093 CD-31 1450 22262194375 W 032954.4-312502033356.8-310449229.23-54.48 6.20 +0.48 F5V -0.021+0.062D+.024-033 0.4 0.1 * -1094 BD+56 826 22316 24133 033027.9+563612033819.7+565558144.23 1.13 6.30 -0.13 -0.35 B9p v+0.022-0.032 -000V? 0: * -1095 CD-32 1358 22322194379 W 033033.0-321232033433.5-315229230.61-54.40 6.40 +1.40 K3III +0.014+0.001 +014 3.8 1.4 -1096 CP-61 267 223822488342256 033057.1-612113033251.6-610101275.72-46.68 6.41 +1.04 +0.91 K0III +0.080+0.036 +031 -1097 BD+42 795 22402 38999 033114.3+421513033800.2+423459152.76-10.44 6.42 -0.06 -0.37 B8Vn +0.024-0.021 -001 -1098 BD-11 696 22409149057 033111.7-113141033557.7-111137198.66-48.26 5.57 +0.91 gG7 +0.030+0.084 +037V -1099 BD+00 616 22468111291 2644 V711 Tau 033139.3+001541033647.3+003516184.91-41.57 5.71 +0.92 +0.46 +0.39E G9V -0.026-0.164 +.032-023SB2O 2.7 6.6 * -1100 20 EriBD-17 699 224701490631100 EG Eri 033144.0-174753033617.4-172801207.47-50.85 5.23 -0.13 -0.49 B9.5p +0.029-0.010 +.014+014 98 * -1101 10 TauBD-00 572 224841112921101I 033146.1+000504033652.4+002406185.12-41.66 4.28 +0.58 +0.07 +0.32 F9IV-V -0.233-0.483 +.054+028V? 0 10.0 396.0 * -1102 BD+14 586 22522 93524 D 033210.9+150607033747.8+152551171.46-31.35 6.39 +0.17 -0.06: A5IV +0.015-0.020 +033 67 0.0 0.1 -1103 BD+20 602 22615 76045 1213 033311.7+203523033900.1+205457167.43-27.13 6.50 +0.15 +0.19 +0.07 Am,A5-F0 +0.005-0.026 -009 30 * -1104 CP-66 199 22634248842 033317.0-660546033424.7-654552281.13-43.84 6.75 +0.17 +0.15 A3V +0.044+0.006 +011V -1105 BD+62 597 22649 12874 129I BD Cam 033328.3+625333034209.3+631300140.84 6.44 5.10 +1.63 +1.82 +1.39 S3.5/2 -0.020+0.017 +.002-022SB * -1106 CD-40 1008 22663216405 130 033330.3-403609033705.7-401629244.85-53.51 4.58 +1.04 +0.77 +0.57 K1III -0.005-0.030 +.011+012 -1107 BD+86 51 22701 6233947 033355.0+861957041001.5+863734125.76 24.91 5.86 +0.37 0.00 F5IV +0.139-0.084 +.022-004V -1108 BD-07 647 22675130628 033336.2-074302033829.2-072330194.29-45.81 5.85 +0.98 +0.76 gG5 -0.009-0.055 -030 -1109 CP-78 101 22676255998 033337.2-784112032958.8-782107293.79-35.80 5.70 +0.93 +0.65 G8III -0.017-0.028 +010SB -1110 BD+16 484 22695 935362257 2661 033346.3+161241033925.7+163212170.90-30.28 6.16 +1.00 +0.69 K0III +0.041-0.034 +014 0.0 0.3 O 3* -1111 21 EriBD-06 713 22713130634 033404.8-055648033901.1-053734192.27-44.75 5.96 +0.92 +0.66 K1V -0.015-0.205 +.028+040V? -1112 BD+59 699 22764 24169 I 2691 033428.0+593850034242.7+595810142.87 3.90 5.76 +1.71 +1.82 +1.02 K3IIb -0.005+0.002 -010 2.4 54.7AD 5* -1113 BD+37 811 22780 56628 1225 033437.1+371526034107.9+373448156.37-14.04 5.57 -0.07 -0.41 B7Vne +0.023-0.030 -001 360 * -1114 Tau ForCD-28 1225 227891687011102 033438.0-281611033847.7-275635224.16-53.08 6.01 -0.02 A0V +0.025+0.023 +039 -1115 12 TauBD+02 581 227961113342258 033438.5+024354033951.1+030325183.01-39.42 5.57 +0.94 +0.67 gG6 -0.041+0.008 +021V -1116 BD-03 591 22798130639 033437.8-034258033938.3-032335189.82-43.37 6.23 +1.04 +0.89 G5 -0.022-0.073 -018 -1117 BD-10 717 22799149082 033438.5-104535033925.4-102614198.28-47.14 6.19 +1.03 G5 -0.021-0.104 +023 -1118 11 TauBD+24 529 22805 760731103 D 033447.8+250022034046.3+251946164.54-23.55 6.11 +0.06 +0.16 A2IV +0.008-0.015 -005SBO 70 2.0 0.0 * -1119 BD-01 519 22819130645 033454.4-012644033959.5-010714187.38-41.97 6.12 +1.00 +0.77 K1III-IV +0.024+0.016 +026 -1120 BD-15 634 229051490942259 033534.0-153300034011.4-151336204.83-49.12 6.33 +0.88 G5 -0.005-0.014 -019V -1121 22 EriBD-05 715 229201306522260 033541.2-053201034038.3-051238192.10-44.18 5.53 -0.15 -0.57 B9IIIpSi4200 -0.003-0.001 +016 121 * -1122 39Del PerBD+47 876 22928 39053 131 W Del Per 033548.1+472804034255.5+474715150.28-05.77 3.01 -0.13 -0.51 -0.11 B5IIIe t+0.028-0.034 +.016+004SB 259 7.3 99.1 * -1123 40 PerBD+33 698 22951 56646 2699 033602.1+333839034222.5+335754158.92-16.70 4.97 -0.01 -0.84 B0.5V -0.005-0.009 +020SB 51 5.0 20.0 * -1124 BD+66 284 23005 128902267 033632.7+665317034600.9+671206138.68 9.84 5.80 +0.35 +0.07 F0IV +0.081-0.113 +.004+006 -1125 BD-12 689 23010149107 W 033629.0-120730034113.8-114811200.36-47.40 6.49 +0.36 +0.02? F5II +0.073+0.013 +029 82 7.7 14.7 * -1126 13 TauBD+19 578 23016 935572263 033632.8+192248034218.9+194201169.00-27.51 5.69 -0.01 -0.27 B9Vne +0.001-0.014 -010SB 350 * -1127 BD+48 984 23049 39063 I 2712 033655.7+481220034406.4+483125149.99-05.06 6.06 +1.55 +1.83 K4III -0.005-0.010 -012 7.1 18.6AC 3* -1128 BD-20 687 23055149114 033654.2-195420034122.4-193505211.27-50.46 6.59 +0.09 A3V -0.002-0.007 -008V? -1129 BD+62 604 23089 12891 I S 033717.3+630146034602.3+632042141.10 6.81 4.80 +0.80 +0.25 +0.53 G0III+A3V -0.004-0.013 -.000-002SBO 50 1.0 0.1 * -1130 BD+45 804 23139 390712266 033740.0+454700034440.9+460559151.56-06.92 6.11 +0.28 +0.21 A7IV -0.004-0.024 +009V 81 -1131 38Omi PerBD+31 642 23180 56673 2726 Omi Per 033802.7+315818034419.1+321718160.36-17.74 3.83 +0.05 -0.75 0.00 B1III +0.007-0.011 +.023+019SB2O 85 2.8 1.0 * -1132 14 TauBD+19 582 23183 93568 033800.1+192056034347.2+193954169.31-27.30 6.14 +1.01 +0.74 G8III +0.116-0.054 +078SB * -1133 BD+36 742 23193 566752268 033802.9+360840034431.4+362736157.64-14.49 5.59 +0.06 +0.15 +0.01 A2m +0.048-0.040 +022 45 -1134 Del ForCD-32 1430 23227194467 133 033816.2-321528034214.9-315618230.88-52.77 5.00 -0.16 -0.60 -0.15 B5IV +0.009+0.014 +026SB 217 -1135 41Nu PerBD+42 815 23230 39078 134I 2738 1261 033823.8+421546034511.6+423443153.83-09.63 3.77 +0.42 +0.31 +0.26 F5II -0.014-0.002 +.020-013 44 8.1 31.4 -1136 23Del EriBD-10 728 23249130686 135I Del Eri 033827.4-100606034314.9-094548198.10-46.00 3.54 +0.92 +0.69 +0.50 K0+IV e-0.092+0.745 +.109-006 < 17 * -1137 BD+20 621 23258 76121 033838.9+203646034428.1+205543168.47-26.26 6.10 +0.01 +0.06 A0V +0.014-0.020 +015SB 87 -1138 BD+70 257 23277 5000 033849.3+703342034913.8+705216136.55 12.86 5.44 +0.09 +0.12 +0.03 A2m +0.024-0.065 +.017+017SB2O 25 * -1139 BD-10 729 23281149132 033847.2-104808034333.8-102908199.05-46.28 5.60 +0.22 +0.10 +0.12 A5m -0.014-0.017 +016 70 -1140 16 TauBD+23 505 23288 76126 D 1262 033851.4+235830034448.2+241722166.04-23.73 5.46 -0.04 -0.33 -0.05 B7IV +0.011-0.046 +.012+003V? 246 2.0 0.0 * -1141 BD+45 811 23300 39085 2746 033859.3+452205034559.3+454055152.00-07.11 5.66 -0.07 -0.45 B6V +0.023-0.018 +002 8.4 6.5 * -1142 17 TauBD+23 507 23302 76131 136 D 033856.1+234757034452.5+240648166.18-23.85 3.70 -0.11 -0.40 -0.10 B6III e+0.019-0.046 +.020+012SB1O 215 2.0 0.0 * -1143 CD-37 1415 233191944752265 W 033907.6-373744034250.1-371849239.76-52.69 4.59 +1.20 +1.31 +0.42E K2.5III -0.088-0.077 +.028+010 7.6 5.4 -1144 18 TauBD+24 546 23324 76137 D 033911.6+243132034509.7+245021165.70-23.26 5.64 -0.07 -0.36 -0.07 B8V +0.020-0.047 -002SB2 246 0.0 0.1 * -1145 19 TauBD+24 547 23338 76140 W 1264 033915.2+240913034512.5+242802165.98-23.53 4.30 -0.11 -0.46 -0.09 B6IV +0.018-0.045 +006SB1 133 1.5 0.0 A 3* -1146 24 EriBD-01 526 23363130698 137 033925.7-012842034430.5-010947188.32-41.08 5.25 -0.10 -0.39 B7V +0.002-0.007 +027SB 207 -1147 BD+55 824 23383 24215 033941.8+553639034732.2+555521145.85 1.10 6.10 -0.03 -0.15 B9Vnn +0.031-0.015 -016V 415 -1148 Gam CamBD+70 259 23401 5006 138 W 033947.7+710127035021.5+711956136.31 13.27 4.63 +0.03 +0.07 +0.04 A2IVn +0.017-0.042 +.012-001V 189 3.9 106.3AC 3 -1149 20 TauBD+23 516 23408 76155 D 1279 033952.4+240319034549.6+242204166.17-23.51 3.87 -0.07 -0.40 -0.06 B8III v+0.020-0.046 +008SB 39 0.0 0.0 * -1150 25 EriBD-00 593 23413130704 I 033949.6-003641034456.5-001748187.48-40.49 5.55 +1.42 +1.72 K4III +0.057-0.001 +071V * -1151 21 TauBD+24 553 23432 76159 1283 033956.8+241432034554.4+243317166.05-23.36 5.76 -0.04 -0.23 -0.04 B8V +0.011-0.042 +009SB 194 * -1152 22 TauBD+24 556 23441 76164 D 034005.3+241257034602.9+243141166.09-23.36 6.43 -0.02 -0.15 -0.02 A0Vn +0.014-0.044 +000V 236 0.0 0.1 * -1153 29 TauBD+05 539 234661114001104 2750 034021.5+054413034540.4+060300181.28-36.39 5.35 -0.12 -0.61 B3V +0.019-0.013 +017SB2O 142 7.3 66.2 * -1154 CP-78 105 234742560052261 034018.1-783845033630.0-781923293.48-35.59 6.29 +1.15 +1.03 K2III -0.021+0.001 +003 -1155 BD+65 369 23475 12916 I BE Cam 034021.6+651301034931.2+653134140.02 8.75 4.47 +1.88 +2.13 +1.42 M2+IIab e-0.007-0.013 +.014-003V * -1156 23 TauBD+23 522 23480 76172 W V971 Tau 034023.3+233813034619.6+235654166.57-23.75 4.18 -0.06 -0.42 -0.04 B6IVe v+0.021-0.045 +006V 282 * -1157 CD-41 1119 23508216459 W 034034.0-405822034406.2-403937245.19-52.14 6.45 +1.06 +1.01 +0.38E K1III +0.008-0.086 +019 3.0 5.1 * -1158 BD+62 612 23523 12917 034050.0+625923034936.7+631750141.45 7.03 5.85 +0.18 A5Vn -0.018-0.051 -014SB 222 -1159 BD+06 583 23526111407 W 034049.1+062933034609.5+064811180.67-35.81 5.91 +0.99 +0.76 G9III +0.019-0.071 -026V? -1160 BD+50 825 23552 24231 2769 034055.8+502536034818.3+504412149.16-02.90 6.14 +0.06 -0.32 B8Vne +0.014-0.006 -024V 250 6.2 7.0 * -1161 BD+56 846 23594 24244 W 034121.0+564837034919.6+570705145.30 2.19 6.46 +0.06 +0.02 A0Vn +0.018-0.027 -002 157 0.8 58.3 -1162 26Pi EriBD-12 707 23614149158 I Pi Eri 034124.8-122455034608.5-120606201.55-46.47 4.42 +1.63 +2.01 +1.05 M2III +0.048+0.058 -.000+046 * -1163 BD+33 717 23625 56709 2772 1305 034131.9+331724034752.6+333600160.08-16.25 6.57 +0.08 -0.61 B2.5V -0.006-0.002D+.005+020SB2O 170 4.0 3.2 * -1164 BD+31 650 23626 56707 034132.3+315311034748.9+321142161.02-17.33 6.25 +0.47 G0 -0.032-0.047 -004SB -1165 25Eta TauBD+23 541 23630 76199 139I W 034132.3+234746034729.1+240618166.67-23.45 2.87 -0.09 -0.34 -0.04 B7IIIe +0.019-0.046 +.008+010V? 215 1.6 0.0 O 5* -1166 BD+68 286 23662 12929 034152.7+681208035141.8+683027138.26 11.18 6.32 -0.08 -0.23 B9IVp +0.017-0.016 -004V? -1167 CD-48 1069 23670216469 034146.7-482219034450.6-480341256.76-50.51 6.49 +1.02 G8-K0III +0.028-0.081 +004 -1168 CP-54 589 23697233252 W 034200.8-543519034433.8-541626265.80-48.46 6.30 +1.04 +0.89 K1III +0.023+0.065 +033 3.0 5.0 -1169 CD-47 1147 23719216470 034209.4-474016034515.8-472135255.67-50.63 5.73 +0.96 K1III -0.011-0.020 -003 -1170 BD+43 818 23728 39128 V376 Per 034214.0+433916034908.2+435747153.52-08.10 6.02 +0.29 +0.09 A9IV +0.001+0.021 -015 94 * -1171 Sig ForCD-29 1413 23738168820 I 034222.7-293856034627.4-292017226.81-51.61 5.90 +0.12 A3V +0.004+0.012 -013 5.2 5.0 * -1172 BD+22 563 23753 76215 D 1321 034225.5+230650034820.9+232516167.33-23.83 5.45 -0.07 -0.32 -0.06 B8V +0.023-0.050 +004SB? 272 2.0 0.1 * -1173 27Tau6EriCD-23 1565 23754168827 140 034232.7-233242034650.9-231459217.34-50.32 4.23 +0.42 0.00 +0.22 F3III -0.158-0.529 +.059+007 6 -1174 30 TauBD+10 486 23793 93611 2778 1327 034247.1+105009034816.3+110836177.17-32.53 5.07 -0.13 -0.60 B3V+F5V +0.028-0.022D+.011+016V? 52 4.4 9.2 * -1175 Bet RetCP-65 263 23817248877 141 W 034256.6-650717034412.0-644825279.24-43.54 3.85 +1.13 +1.10 +0.56 K2+III +0.313+0.076 +.042+051SBO 4.21480. * -1176 BD+44 801 23838 39134 Var? 034306.5+443945035004.5+445804153.02-07.22 5.66 +0.76 +0.29E G2III+F2:V -0.028-0.028 +014SB =< 50 * -1177 42 PerBD+32 667 23848 56727 V467 Per 034313.2+324705034932.6+330529160.70-16.42 5.11 +0.07 +0.11 A3V -0.029-0.001 -.003-014SBO 82 * -1178 27 TauBD+23 557 23850 76228 142 2786 1345 034312.8+234452034909.7+240312167.01-23.23 3.63 -0.09 -0.36 -0.05 B8III +0.018-0.047 -.026+009SB1O 212 1.5 0.0 A 3* -1179 CD-30 1494 23856194531 034315.7-301232034720.1-295407227.75-51.50 6.55 +0.49 -0.03 F8V +0.182-0.069 +004V? -1180 28 TauBD+23 558 23862 76229 BU Tau 034314.1+234952034911.2+240812166.96-23.17 5.09 -0.08 -0.28 -0.07 B8Vpe v+0.013-0.050 -.012+004SB 329 * -1181 28Tau7EriCD-24 1877 23878168836 Var 034321.5-241104034739.6-235229218.37-50.30 5.24 +0.07 +0.15 A2 +0.043+0.048 +.014+029V? 0 * -1182 BD-00 602 238871114332273 034331.0-000445034838.9+001340187.65-39.43 5.91 +1.23 +1.31 K3III +0.063-0.006 +066 -1183 BD+23 563 23923 76244 034347.3+232426034943.5+234242167.37-23.40 6.17 -0.05 -0.19 -0.05 B8V +0.014-0.049 +009 273 * -1184 Rho ForCD-30 1497 239401945352272 1337 034353.6-302808034756.0-301004228.19-51.40 5.54 +0.98 +0.66 G6III +0.028-0.230 +.008+053 -1185 BD+21 535 23950 76250 034402.2+215624034955.0+221440168.50-24.44 6.07 -0.01 -0.32 -0.01 B8III +0.015-0.037 -003SB? 165 * -1186 CD-36 1453 23958194537 034403.8-362449034749.6-360621237.74-51.73 6.21 -0.10 B8V +0.021+0.008 +011V -1187 BD-21 703 23978168851 I 034411.5-211233034835.8-205411214.04-49.27 5.81 +1.64 K5III -0.015-0.025 +003V -1188 BD+25 624 23985 76256 2799 1366 034418.1+251640035018.9+253446166.10-21.93 5.26 +0.21 +0.08 A2V+A5V +0.038-0.109D+.018+004V 69 0.4 0.7 * -1189 CD-38 1297 24071194550 W B 034454.1-375540034835.4-373720240.17-51.53 5.40 +0.01 +0.01 A1V +0.059-0.013 +.024+016 0 0.6 8.0 * -1190 CD-38 1297 24072194551 W A 1359 034454.4-375533034835.9-373714240.17-51.53 4.73 -0.03 -0.07 -0.04 B9V +0.079-0.025 +.024+016 218 0.6 8.0 * -1191 BD+33 728 24131 56761 W 034530.0+340327035153.7+342133160.23-15.14 5.77 0.00 -0.80 B1V +0.002-0.007 +018V 140 7.5 15.1 * -1192 BD+57 752 24141 242761105 034535.9+574041035343.3+575830145.22 3.22 5.80 +0.18 +0.11 +0.04 A5m +0.081-0.096 -005 55 -1193 BD+21 539 24154 76275 D 034544.0+214349035136.6+220154168.97-24.32 6.83R K0III +0.013-0.019 +063 * -1194 BD+12 516 24155 93637 V766 Tau 034542.6+124440035115.8+130245176.12-30.70 6.30 -0.07 -0.48 B9pSi +0.022-0.030 +016 52 * -1195 CD-36 1467 24160194559 143I' 034542.7-363011034927.3-361201237.88-51.40 4.17 +0.95 +0.69 +0.50 G9II-III -0.046-0.051 +.025+002 * -1196 BD+71 222 24164 50402277 034542.6+713130035630.2+714918136.36 13.96 6.34 +0.30 0.00 A5m -0.057-0.008 -002 49 -1197 BD+30 582 24167 56762 034549.6+305206035204.3+311006162.44-17.52 6.25 +0.20 +0.14 A5V -0.026-0.045 -038 151 * -1198 BD+48 1015 24240 39175 034623.6+482108035338.7+483902151.15-03.98 5.76 +1.05 +0.95 K0III +0.036-0.029 +.020+008V -1199 31 TauBD+06 594 242631114692275 W 034640.2+061404035200.2+063205182.07-34.88 5.67 +0.06 -0.43 B5V +0.009-0.008 +016 0.1 0.6 -1200 CD-36 1476 24305194570 034653.5-364339035037.6-362531238.24-51.16 6.86 -0.04 B9.5V +0.004+0.020 +006 -1201 BD+16 523 24357 936501106 034726.8+170146035310.0+171937172.94-27.41 5.97 +0.34 0.00 +0.17 F4V +0.142-0.030 +.030+035V? 59 * -1202 30 EriBD-05 769 24388130789 2832 034745.2-053935035241.6-052141194.49-41.74 5.48 -0.10 -0.41 B8V -0.011-0.011D+.018+015V 191 6.7 8.3 * -1203 44Zet PerBD+31 666 24398 56799 144I 2843 1397 034750.6+313512035407.9+315301162.29-16.69 2.85 +0.12 -0.77 +0.09 B1Ib +0.006-0.010 +.010+020SB 59 6.5 12.9AB 5* -1204 BD+62 628 24479 129692281 034835.6+624645035725.5+630420142.28 7.42 5.03 -0.09 -0.16 -0.08 B9.5V e+0.010+0.005 +005V 113 -1205 BD+60 768 24480 12968 I 2867 034836.3+604858035708.3+610632143.53 5.90 5.00 +1.45 +1.26 K3I-II+A3V: -0.004-0.015 +.015-002V 3.2 1.7 * -1206 BD-18 691 244971492292276 034843.5-184354035313.0-182604211.06-47.44 6.22 +0.88 gK+F +0.011 0.000 +020SB2 15 * -1207 BD+47 912 24504 391952279 034845.8+473440035558.2+475217151.94-04.33 5.37 -0.08 -0.47 B6V +0.019-0.018 +005SB 286 * -1208 Gam HyiCP-74 276 24512256029 146 034847.0-743244034714.3-741420289.13-37.80 3.24 +1.62 +1.99 +1.09 M2III +0.047+0.114 +.005+016 * -1209 BD+30 591 24534 56815 I 2859 X Per 034907.9+304505035523.0+310245163.08-17.14 6.10 +0.29 -0.82 O9.5ep v-0.013-0.007 -.002+015SBO 150 5.8 22.5 * -1210 43 PerBD+50 860 24546 24314 I W 034910.1+502421035636.5+504143150.20-02.10 5.28 +0.41 0.00 F5IV +0.091-0.130 +.036+027SB2O < 17 4.8 75.3AB 4* -1211 32 EriBD-03 631 24554130805 2850B 034916.0-031454035417.4-025710192.09-40.10 6.14 +0.09 +0.07 A2V +0.029+0.008 +.004+018V 180 1.5 6.8AB 3* -1212 32 EriBD-03 631 24555130806 I 2850A 034916.1-031501035417.5-025717192.10-40.10 4.79 +0.94 +0.69 +0.40 G8III +0.029+0.002 +.004+027SB < 17 1.5 6.8AB 3* -1213 33Tau8EriCD-24 1945 24587168925 Tau8 Eri 034927.3-245429035342.6-243645220.00-49.14 4.65 -0.13 -0.48 -0.14 B6V +0.023-0.016 +023SB 48 -1214 CD-35 1455 246261946082278 034950.2-350140035338.9-344356235.57-50.53 5.11 -0.13 B6V +0.031-0.004 +021V? 35 -1215 BD+34 768 24640 56824 1418 035001.8+344719035628.7+350452160.47-13.97 5.49 -0.03 -0.75 B1.5V +0.005-0.001 +017SB 137 * -1216 CD-47 1187 247062165401108 035027.4-471116035333.3-465337254.43-49.37 5.93 +1.24 +1.35 +0.56C K2III +0.034-0.043 -001V * -1217 BD-12 752 24712149251 DO Eri 035033.9-122329035516.3-120557202.97-44.47 6.00 +0.32 +0.03? A5pSrCrEu v-0.055-0.040 +022 =< 6 * -1218 32 TauBD+22 605 24740 763392283 035057.4+221124035652.1+222841169.59-23.16 5.63 +0.30 -0.02 F2IV +0.069-0.116 +.030+032V -1219 CD-40 1128 247442165462280 W 1414 035052.9-403904035423.2-402126244.38-50.23 5.71 +0.60 K0III+A3V -0.012-0.003 +002SB 0.0 0.1AB 3* -1220 45Eps PerBD+39 895 24760 56840 147 2888 Eps Per 035108.4+394316035751.2+400037157.35-10.09 2.89 -0.18 -0.99 -0.18 B0.5V+A2V +0.018-0.026 +.009+001SB2 153 5.1 8.8AB 3* -1221 33 TauBD+22 607 24769 76343 D V817 Tau 035107.9+225307035703.8+231032169.10-22.63 6.06 +0.02 -0.01 B9.5IV +0.009-0.018 +025SBO 70 2.0 0.0 * -1222 BD+24 599 24802 76350 035127.5+241020035726.4+242743168.19-21.64 6.16 +1.37 K0 +0.001-0.012 -013 -1223 BD+34 773 24809 56847 V386 Per 035136.6+343132035803.1+344852160.90-13.96 6.53 +0.23? A8V +0.013-0.018 -002SB2 80 * -1224 BD+05 564 24817111516 035142.3+054506035701.7+060224183.49-34.22 6.09 +0.06 +0.05 A2Vn +0.036-0.067 +008V? 190 -1225 BD-10 793 248321308332284 DL Eri 035150.1-100229035637.9-094503200.29-43.10 6.19 +0.28 +0.14 F1V +0.042+0.006 +014 120 * -1226 BD+38 827 24843 56849 035149.9+383310035829.1+385025158.23-10.89 6.30 +1.08 +0.98 gK1 +0.038-0.041 +022 -1227 CP-53 628 248632333212282 W 1419 035156.3-525855035434.0-524126262.79-47.64 6.46 +0.16 +0.13 A4V +0.031-0.041 +021 6.1 22.8 * -1228 46Xi PerBD+35 775 24912 56856 148I Xi Per 035228.4+353013035857.9+354728160.37-13.11 4.04 +0.01 -0.92 -0.01 O7.5III(n)((f)) e+0.002 0.000 -.004+070SB 216 * -1229 BD+38 829 24982 56866 2910 035300.9+383204035940.0+384914158.42-10.75 6.38R +0.10 +0.13 A1Vp: -0.006 0.000D+.005-002 68 2.7 1.5 -1230 BD+80 125 25007 650 2963 035317.0+802525041002.8+804155130.51 20.91 5.10 +0.56 +0.30 G8III+A6V -0.017-0.002 +.005+004 12 0.8 0.8 * -1231 34Gam EriBD-13 781 25025149283 149I 2904 Gam Eri 035321.8-134734035801.8-133031205.16-44.47 2.95 +1.59 +1.96 +1.00 M0.5IIICa-1Cr-1 e+0.061-0.111 +.010+062 9.5 52.8 * -1232 BD-05 789 25069130860 035356.6-054504035852.3-052812195.68-40.48 5.83 +1.00 +0.85 G9V -0.055-0.180 +036V? -1233 BD+09 524 25102 93710 035411.5+100245035940.7+101951180.07-30.98 6.37 +0.42 0.00 +0.22 F5V +0.170+0.004 +040V 54 * -1234 BD+36 805 25152 56899 035441.2+364224040114.7+365924159.90-11.91 6.41 -0.01 -0.07 A0V -0.022+0.015 -020V 68 * -1235 BD-12 766 25165149299 I 035448.7-125128035930.1-123427204.20-43.75 5.60 +1.48 +1.76 K5III -0.011-0.032 -005 -1236 CP-63 275 25170248912 035446.0-634511035604.0-632749276.74-43.11 6.14 +1.10 +1.02 K1-2III +0.072+0.047 -000V -1237 BD+16 544 25175 93716 035454.0+170052040036.9+171748174.34-26.15 6.32 +0.06 +0.01 A0V 0.000-0.033 +029V 20 -1238 BD+17 666 25202 937212288 W 035502.9+175443040048.8+181138173.65-25.50 5.89 +0.32 +0.04 +0.17 F4V +0.132-0.028 +025SB2 146 3.3 164.2 * -1239 35Lam TauBD+12 539 25204 93719 150I' Lam Tau 035508.3+121228040040.8+122925178.37-29.38 3.47 -0.12 -0.62 -0.09 B3V+A4IV -0.006-0.012 +.002+018SB2O 87 * -1240 36Tau9EriCD-24 2022 252671690172287 Tau9 Eri 035539.6-241759035955.5-240059219.65-47.62 4.66 -0.13 -0.42 -0.13 B6V+B9.5V +0.015+0.015 +.015+024SBO 25 * -1241 BD+68 303 25274 130062291I 035600.5+682413040603.1+684048139.15 12.18 5.87 +1.54 K2III +0.002-0.001 -047V -1242 BD+58 690 25291 243842290 035606.9+585240040427.2+590920145.51 5.03 5.06 +0.50 +0.49 +0.39 F0II -0.002+0.001 -020 9 -1243 BD+09 528 25330111566 2938 035618.7+094303040146.1+095952180.76-30.80 5.67 +0.02 -0.41 B5V +0.005-0.005 +003 5.2 12.0AB 3* -1244 35 EriBD-01 572 253401308781111 035627.9-014947040132.0-013259191.88-37.81 5.28 -0.15 -0.55 B5V +0.025-0.016 +017V 179 * -1245 CP-57 606 253462333471109 035634.0-572310035842.9-570609268.50-45.53 6.05 +0.44 -0.01 F2IV +0.029+0.006 +012 -1246 CD-30 1597 253711946892289 035641.2-304620040040.7-302927229.23-48.71 5.93 +0.04 A2V +0.052+0.004 +021 110 -1247 Del RetCP-61 290 254222489181110 035709.7-614057035844.7-612401274.02-43.78 4.56 +1.62 +1.96 +1.03 M2IIIab +0.011-0.018 -.001-001 -1248 BD+65 391 25425 13015 035717.3+651450040639.0+653115141.38 9.91 6.17 +0.14 +0.17 +0.06 A3m +0.030-0.021 -003V? 23 -1249 BD-00 632 25457130893 035729.2-003225040236.7-001608190.74-36.87 5.38 +0.50 0.00 F5V +0.149-0.251 +.057+018V 23 -1250 CD-51 975 25470233354 XY Dor 035734.3-515046040015.7-513353260.82-47.14 6.51 +1.64 +1.95 +0.96E M1III +0.027+0.014 +007 * -1251 38Nu TauBD+05 581 25490111579 151 035750.1+054243040309.4+055921184.68-33.06 3.91 +0.03 +0.07 0.00 A1V +0.005-0.003 +.030-006 69 -1252 36 TauBD+23 609 25555 76425 I 2965 035822.7+234951040421.7+240621169.67-20.79 5.47 +0.86 G0III+A4V -0.004-0.014 +.014+018V 50 0.0 0.0 O 3* -1253 40 TauBD+05 584 25558111585 035826.4+050935040344.6+052608185.31-33.28 5.33 -0.08 -0.57 B3V +0.003-0.010 +011 51 * -1254 BD+07 592 25570111586 035831.7+075515040356.6+081150182.78-31.53 5.46 +0.37 0.00 +0.21 F2V +0.169+0.023 +.030+036V? 40 * -1255 BD+53 732 25602 24411 035849.0+534419040636.6+540031149.18 1.40 6.31 +0.99 +0.75 K0III-IV +0.055-0.099 -008 -1256 37 TauBD+21 585 25604 764301112I W 035846.8+214832040441.7+220455171.28-22.15 4.36 +1.07 +0.95 +0.53 K0+III-IIIaFe-0.2 +0.090-0.059 +.013+009 < 17 5.0 137.2 * -1257 BD+02 645 256211115902292 035856.0+023319040409.9+024937187.90-34.77 5.36 +0.50 +0.04 F6IV +0.147-0.125 +.020-018 15 * -1258 BD-20 769 25631169071 Var? 035900.3-202511040324.7-200839214.57-45.74 6.46 -0.18 -0.80 B2.5V +0.003-0.014 +020 * -1259 BD-20 770 25661169078 035912.3-202602040336.8-200930214.62-45.70 7.01 +1.22 K2II +0.020+0.006 +024 -1260 BD+61 676 25638 13031 2984A SZ Cam 035902.7+620333040751.1+621948143.68 7.66 6.99 +0.42 -0.50 B0III -0.023-0.010 -009SBO 258 0.3 17.9AB 12* -1261 47Lam PerBD+49 1101 25642 244121113 035907.8+500448040635.0+502105151.63-01.32 4.29 +0.02 -0.04 +0.02 A0IVn -0.015-0.036 +006V? 196 -1262 39 TauBD+21 587 25680 76438 W 1452 035924.9+214421040520.2+220032171.44-22.10 5.90 +0.62 +0.12 G5V +0.169-0.136 +.063+026V? 3 2.7 170.1AB 3* -1263 BD-16 770 257001493452293 035935.6-165141040408.7-163520209.94-44.34 6.39 +1.26 K2 +0.093-0.063 +032V? -1264 Gam RetCP-62 312 25705248925 I' Gam Ret 035926.9-622618040053.8-620934274.81-43.21 4.51 +1.65 +1.81 +1.45 M4III +0.002+0.026 -007SB * -1265 BD-13 806 25723149351 035941.9-130401040422.7-124733205.17-42.77 5.61 +1.08 +0.97 gK0 +0.010+0.013 +032V -1266 Iot RetCP-61 293 25728248927 035940.8-612132040118.2-610444273.44-43.64 4.97 +1.42 +1.70 +0.73 K4III +0.067+0.092 +.014+061 * -1267 BD-20 774 25803169095 040017.0-203917040441.0-202254215.03-45.53 6.13 +1.16 K0 +0.028-0.009 -004V? -1268 41 TauBD+27 633 25823 76455 GS Tau 040028.2+271950040636.4+273600167.43-17.96 5.20 -0.13 -0.47 B9pSi v+0.019-0.053 -002SB1O 20 * -1269 42Psi TauBD+28 619 25867 764612295 040049.3+284352040700.5+290005166.46-16.90 5.23 +0.34 -0.04 F1V -0.092+0.007 +009V 68 -1270 BD+59 759 25877 24436 040059.1+593827040927.6+595429145.48 6.01 6.28 +1.14 +0.92 G8IIa 0.000-0.005 -014 -1271 CP-85 44 25887258356 W 040055.2-853332034232.1-851544299.20-30.56 6.41 -0.01 -0.10 B9.5IV +0.013+0.010D+.008+021V 1.5 2.2 -1272 BD-09 811 259101309482294 040107.4-090736040556.5-085122200.70-40.65 6.26 +0.06 +0.09 A3V +0.024-0.008 +028 -1273 48 PerBD+47 939 25940 39336 152I MX Per 040123.9+472644040839.7+474245153.65-03.04 4.04 -0.03 -0.55 -0.02 B3Ve +0.021-0.030 +.020+001V? 217 * -1274 BD-20 780 25944169111 040123.5-204700040546.7-203044215.32-45.33 6.34 +0.92 G5 -0.020+0.012 +014 -1275 CD-27 1540 25945169110 153 040130.1-275531040537.4-273906225.31-47.18 5.59 +0.31 +0.05 F1IV +0.205+0.094 +.045+063V 98 -1276 BD+54 740 25948 24440 040128.4+543352040922.4+544944148.92 2.27 6.18R F5V +0.081-0.093 -005 15 -1277 49 PerBD+37 881 25975 57000 040138.6+372754040815.3+374340160.43-10.42 6.09 +0.95 +0.75 K1III -0.112-0.191 +.020-040 -1278 50 PerBD+37 882 25998 570062297 040156.5+374641040836.6+380223160.27-10.15 5.51 +0.46 -0.03 F7V +0.167-0.202 +.049+025 19 * -1279 BD+14 657 26015 93775 2999 1466 040202.3+145343040742.0+150946177.38-26.33 6.01 +0.40 +0.02 +0.21 F3V +0.132-0.024D+.007+036SB1? 25 3.2 3.8 * -1280 BD+16 560 26038 93777 I 3006 040215.7+170421040759.4+172023175.63-24.83 5.89 +1.50 K5IIIb +0.007-0.015D+.006-031 0.0 0.1 O 3* -1281 BD+71 239 26076 5125 040234.1+715158041344.9+720735137.15 15.10 6.03 +1.01 K1III +0.013-0.027 -004 -1282 BD+68 310 26101 13061 040247.6+681421041251.6+683006139.73 12.48 6.32 +1.18 K0 -0.045+0.026 -024 -1283 43Ome1TauBD+19 672 26162 937851115 040320.3+192042040910.0+193633174.00-23.09 5.50 +1.07 K2III +0.104-0.033 +.023+025V -1284 BD+13 648 26171 937842298 040326.4+130800040901.6+132354179.11-27.24 5.95 +0.05 -0.06 B9.5V +0.016-0.014 -025V 27 -1285 CD-43 1304 26262216655 040407.5-431100040725.1-425501247.93-47.57 6.59 +0.93 +0.61 +0.44C K0III -0.005+0.004 -007 -1286 BD+33 807 26311 570472300I 040433.7+331931041059.0+333512163.77-13.03 5.72 +1.44 +1.47 +0.79 K1II-III -0.004-0.009 +020V -1287 44 TauBD+26 686 26322 764851116 IM Tau 040444.3+261312041049.9+262851168.96-18.08 5.41 +0.34 +0.06 F2IV-V -0.033-0.036 +019 0 * -1288 BD-16 796 26326149412 040445.4-163858040917.8-162309210.32-43.12 5.37 -0.15 -0.53 B4V +0.002+0.005 +014V 31 -1289 BD+83 104 26356 685 040459.3+833352042813.0+834828128.40 23.40 5.57 -0.13 -0.51 B5V -0.014+0.010 +.003-007V 320: * -1290 37 EriBD-07 758 26409131001 040529.7-071106041022.5-065526199.19-38.76 5.44 +0.94 +0.67 G8III -0.003-0.013 -010V? -1291 CD-46 1314 264132166672299 W 040527.7-460744040833.9-455153252.21-47.02 6.59 +0.38 0.00 +0.22C F2V +0.075+0.021 +008 4.0 1.2AB 3 -1292 45 TauBD+05 601 264621116482301 W 040600.8+051546041120.3+053123186.58-31.73 5.72 +0.36 +0.01 +0.19 F4V +0.149+0.005 +.032+037V? 6 4.1 124.1 * -1293 BD-09 837 26464131005 040558.7-090450041047.7-084911201.40-39.58 5.70 +1.06 +0.93 gG9 +0.038+0.009 +030 -1294 CP-64 305 26491248945 040616.1-642944040721.6-641321276.89-41.65 6.38 +0.64 +0.11 G3V +0.213+0.324 +.038+028 -1295 BD+16 569 26546 93810 040647.1+170113041231.4+171639176.47-24.06 6.09 +1.08 +0.96 K0III +0.052-0.018 +027V -1296 BD+57 785 26553 244952304 Var? 040649.2+571219041501.8+572737147.69 4.73 6.08 +0.61 +0.50 A4III -0.002+0.003 -023 50 * -1297 BD+22 649 26571 76505 040655.3+220923041251.2+222449172.42-20.55 6.12 +0.19 -0.27 B9IIIp:Si: v-0.005-0.010 +013SB * -1298 38Omi1EriBD-07 764 26574131019 154 Omi1 Eri 040659.0-070554041151.9-065015199.32-38.39 4.04 +0.33 +0.13 +0.16 F2II-III +0.010+0.082 +.033+011V 96 * -1299 CD-35 1588 26575194810 040702.7-353157041045.8-351626236.63-47.05 6.44 +1.07 +0.96 +0.56 K1+IIIaCH-1.5 -0.019-0.035 +028 * -1300 BD-20 801 265911692062302 040712.7-203658041136.2-202122215.72-43.99 5.79 +0.18 +0.09 +0.05 A2m +0.050+0.052 -013SB2O 30 * -1301 BD+37 897 26605 57081 040720.5+374241041359.6+375801161.10-09.47 6.45R G9III -0.058 0.000 +029 -1302 Del HorCD-42 1400 26612216682 040728.5-421516041050.6-415937246.50-47.02 4.93 +0.33 +0.07 +0.21 A9V +0.196+0.063 +.012+037 193 * -1303 51Mu PerBD+48 1063 26630 394041117I 3071 1518 040733.1+480919041453.9+482434153.94-01.82 4.14 +0.95 +0.64 +0.54 G0Ib +0.005-0.018 +.017+008SB1O 14 6.0 83.8AC 5* -1304 BD+82 113 26659 693 040759.1+830600043000.1+832026128.84 23.15 5.46 +0.87 +0.46 G8III -0.055+0.105 +.015-038 -1305 BD+61 687 26670 13075 040804.5+613556041653.6+615101144.78 8.04 5.70 -0.14 -0.51 B5Vn +0.011-0.010 -002V? -1306 52 PerBD+40 912 26673 394092306I 040804.8+401350041453.3+402901159.45-07.54 4.71 +1.01 +0.65 +0.57 G5Ib+A2V +0.008-0.026 +.004-002SBO =< 50 * -1307 BD+09 549 26676 93821 040805.9+095728041334.8+101244182.69-28.42 6.23 +0.05 -0.33 B8Vn +0.045-0.026 +003V? 300 * -1308 BD+08 651 26677111671 3063 040805.6+083809041331.3+085326183.86-29.25 6.51 +0.16 +0.13 A2m +0.016-0.027 +008 6.3 54.3AC 3* -1309 46 TauBD+07 617 26690111672 3064 040809.9+072738041333.1+074258184.93-29.96 5.29 +0.36 +0.01 +0.19 F2V+F5V -0.002+0.006 +.030+004SB2? 58 0.2 0.1 * -1310 BD+12 564 26703 93823 040815.8+122957041349.9+124512180.51-26.76 6.25 +1.16 +1.12 +0.39E K0 +0.019-0.028 +048 * -1311 47 TauBD+08 652 26722111674 I 3072 040830.0+090037041356.4+091549183.60-28.94 4.84 +0.80 +0.50 +0.45 G5III+A7V? -0.010-0.038 +.029-007 2.2 1.2AB 3* -1312 BD-01 600 267391310412305 040833.4-012416041338.2-010859193.54-35.07 6.44 -0.13 -0.56 B5IV +0.007-0.004 +018 -1313 BD+57 787 26755 24514 040851.4+573639041708.2+575138147.62 5.21 5.71 +1.09 K1III +0.030-0.034 -038 -1314 BD+53 750 26764 245122310 040854.8+532139041643.1+533643150.54 2.13 5.19 +0.05 A2Vn -0.017+0.002 +.011-003SB 191 -1315 BD+09 550 26793111680 040908.2+094532041436.3+100040183.04-28.34 5.22 -0.10 -0.34 B9Vn +0.002-0.026 +007 350 -1316 CD-44 1450 26820216694 040920.6-443725041231.6-442206249.91-46.51 6.71 +1.48 +1.81 +0.71C K3-4III +0.045+0.003 +041 -1317 BD+80 133 26836 6912321I 040937.5+803508042702.8+804927130.89 21.50 5.43 +1.17 gG6 +0.003-0.019 +.014-009V -1318 39 EriBD-10 867 26846149478 I 3079 040938.2-103016041423.7-101523203.58-39.45 4.87 +1.17 +1.15 +0.57 K3III -0.009-0.162 +.015+007 < 19: 3.7 6.4AB 3* -1319 48 TauBD+15 603 26911 93836 W 1537 041005.5+150902041546.3+152402178.59-24.70 6.32 +0.40 +0.02 +0.21 F5V +0.116-0.029 +036V 53 4.7 151.4AC 3* -1320 49Mu TauBD+08 657 269121116961118 041006.1+083831041532.1+085332184.21-28.85 4.29 -0.06 -0.53 -0.06 B3IV +0.021-0.024 +017SB? 89 * -1321 BD+05 613 26913111695 3085B V891 Tau 041006.4+055706041525.8+061159186.66-30.50 6.93 +0.70 +0.22 G5IV -0.106-0.107 -008V =< 6 0.6 64.7AB 4* -1322 BD+05 614 26923111698 3085A V774 Tau 041009.5+055620041529.2+061112186.68-30.50 6.31 +0.59 +0.05 G0IV -0.060-0.116 -008 4 0.6 64.7AB 4* -1323 CD-40 1286 269272167052307 041009.9-403642041335.7-402128244.07-46.58 6.37 +1.46 K3III +0.016+0.028 +059 -1324 BD+49 1150 26961 24531 b Per 041043.2+500259041814.6+501744153.02-00.09 4.61 +0.04 +0.03 +0.05 A2V +0.047-0.054 +020SB2O 98 * -1325 40Omi2EriBD-07 780 26965131063 I 3093 DY Eri 041040.2-074830041516.3-073910200.72-38.00 4.43 +0.82 +0.45 +0.45 K1-V -2.242-3.414 +.209-042V 5.0 83.4AB 5* -1326 Alp HorCD-42 1425 26967216710 155I: 041041.2-423227041400.1-421740246.88-46.41 3.86 +1.10 +1.00 +0.59 K1III +0.046-0.209 +.026+022 * -1327 BD+64 433 27022 130982315 041115.6+645347042040.3+650826142.72 10.66 5.27 +0.81 +0.47 +0.43 G5IIb -0.036-0.003 -019 10 * -1328 BD+41 844 27026 39447 041112.6+415343041808.2+420828158.72-05.93 6.22 -0.08 -0.29 B9V +0.029-0.034 +007V -1329 50Ome2TauBD+20 724 27045 76532 D Var? 041123.9+201957041715.6+203443174.61-21.03 4.94 +0.26 +0.11 +0.12 A3m -0.044-0.058 +016SB 64 2.0 0.1 * -1330 BD+49 1155 27084 39457 041142.7+494818041913.3+500256153.30-00.16 5.45 +0.22 +0.12 A7V +0.061-0.052 -017 120 * -1331 51 TauBD+21 618 27176 765412313 W 041228.0+212006041823.2+213445173.99-20.17 5.65 +0.28 +0.08 +0.16 F0V +0.094-0.037 +035SBO 97 2.0 0.1 3* -1332 BD-06 862 27179131092 041225.8-064307041719.2-062819199.76-37.03 5.94 +1.08 +0.94 gG8 -0.019+0.002 -002 -1333 BD+50 973 27192 245442316 1550 041236.7+504041042011.5+505515152.80 0.57 5.55 -0.01 -0.75 B1.5IV 0.000-0.006 -016SB 0 * -1334 BD+09 558 27236111729 041257.5+091434041824.5+092912184.17-27.93 6.54 +0.16 +0.17 A4III -0.023-0.034 +028 -1335 BD+60 800 27245 131132317I 1558 041305.5+602952042147.6+604408146.00 7.67 5.39 +1.49 +1.81 M0III +0.054-0.117 +029V? -1336 Alp RetCP-62 332 27256248969 156 W 041308.1-624327041425.5-622826274.32-41.65 3.35 +0.91 +0.63 +0.44 G8II-III +0.045+0.045 +.013+036SB? 8.6 48.5 -1337 BD+41 852 27278 39468 041319.8+413359042014.4+414829159.24-05.89 5.92 +0.94 K0III +0.011-0.026 +024V -1338 Gam DorCD-51 1066 27290233457 157 Gam Dor 041324.3-514419041601.6-512912259.84-44.79 4.25 +0.30 +0.03 +0.16 F4III +0.106+0.182 +.061+025V? 69 * -1339 53 TauBD+20 733 27295 76548 041332.3+205402041926.1+210832174.52-20.28 5.35 -0.08 -0.25 B9IV +0.030-0.042 +012SBO 2 * -1340 CP-62 334 27304248973 W 041329.3-622634041448.7-621131273.94-41.72 5.45 +1.10 +1.03 +0.39E K0III +0.010+0.088 +.006+036 5.6 11.0 * -1341 56 TauBD+21 623 27309 76551 V724 Tau 041341.4+213155041936.7+214625174.04-19.83 5.38 -0.14 -0.39 A0pSi +0.030-0.040 +012 53 * -1342 BD+56 905 27322 24563 041343.2+561558042151.8+563024149.03 4.70 5.88R A3V -0.014+0.015 -018V 145 -1343 54 PerBD+34 860 27348 57171 158I W 041354.9+341931042024.6+343400164.47-10.95 4.93 +0.94 +0.69 G8III -0.025-0.005 -027 < 19: 7.9 110.0 -1344 BD+31 757 27349 57166 I 041347.9+314242042010.0+315712166.35-12.81 6.16 +1.71 K5 +0.002-0.008 -018 -1345 BD-21 831 27362169317 I 1548 041354.4-205736041815.9-204256216.87-42.62 6.00 +1.67 +1.82 G8III -0.013+0.012 +025V * -1346 54Gam TauBD+15 612 27371 93868 159I S 1553 041406.0+152311041947.6+153739179.08-23.82 3.65 +0.99 +0.82 +0.47 K0-IIIabCN1 +0.115-0.025 +.028+039SB1 =< 8 * -1347 41Ups4EriCD-34 1614 27376194902 W Var 041406.5-340232041753.7-334754234.67-45.47 3.56 -0.12 -0.37 -0.11 B9V +0.067-0.008 +018SB2O 31 1.0 0.2AB 3* -1348 52Phi TauBD+27 655 27382 76558 I 3137 041412.1+270642042021.3+272103169.83-15.94 4.95 +1.15 +1.08 K1III -0.025-0.080 +003 < 19: 3.7 50.0 * -1349 BD+09 562 27386 93866 I A 041408.9+095249041937.5+100717183.81-27.30 6.31 +1.43 +1.60 K0 +0.002-0.040 -027 * -1350 53 PerBD+46 872 27396 394832319 V469 Per 041419.0+461536042133.2+462956156.08-02.40 4.85 -0.03 -0.52 -0.05 B4IV +0.025-0.035 +001 19 * -1351 57 TauBD+13 663 27397 93872 W V483 Tau 041419.7+134739041957.7+140207180.46-24.80 5.59 +0.28 +0.08 +0.16 F0IV +0.116-0.021 +042SB1? 109 7.9 34.9 * -1352 BD+59 793 27402 24577 3146 1566 041425.1+592245042257.9+593659146.91 6.99 6.19 A4V +0.030-0.038 +012V 150 3.1 32.3ABxC 3* -1353 CD-23 1856 27411169325 041421.0-231251041837.4-225813219.84-43.21 6.07 +0.30 +0.20 +0.14 Am +0.047+0.029 +039V 56 * -1354 BD+18 624 27429 93874 041436.3+183010042025.1+184433176.61-21.69 6.12 +0.37 +0.02 +0.20 F3:V +0.108-0.043 +042SB 132 * -1355 Eps RetCP-59 324 27442233463 W 041445.4-593233041628.9-591807270.20-42.56 4.44 +1.08 +1.07 +0.53 K2IVa -0.051-0.164 +.067+029 8.1 13.8 -1356 58 TauBD+14 682 27459 93876 V696 Tau 041455.9+145121042036.3+150543179.67-24.01 5.26 +0.22 +0.10 +0.12 F0V +0.108-0.024 +036SB1 65 * -1357 CP-61 317 27463248977 W TT Ret 041450.3-611139041621.1-605655272.30-42.01 6.37 +0.07 +0.01 ApEuCrSr: +0.041+0.019D+.015+022 0.5 0.4 * -1358 BD+13 665 27483 93878 041515.1+133731042052.8+135151180.76-24.74 6.17 +0.46 +0.01 +0.25 F6V +0.113-0.025 +037SB2O 12 * -1359 CD-34 1626 27490194923 W A 041516.8-340847041903.0-335418234.86-45.24 6.37 +0.13 +0.11 A3V +0.017-0.006D+.007+016 165 2.1 6.0 * -1360 BD+05 631 274971117562320 041521.3+055333042041.2+060751187.61-29.49 5.77 +0.92 +0.68 G8III-IV -0.012-0.051 +007V -1361 BD+08 672 27505111759 041522.0+085906042049.0+091332184.81-27.62 6.53 +0.15 +0.11 A4V +0.054+0.039 +039 -1362 BD-06 875 27536131129 EK Eri 041544.1-062902042038.7-061444200.02-36.20 6.27 +0.91 +0.56 G8IV: +0.103-0.044 +008 * -1363 BD-07 798 275631311322322 EM Eri 041551.8-074953042042.8-073533201.50-36.83 5.85 -0.13 -0.49 B5III +0.002-0.001 +011V? * -1364 CD-44 1503 27588216749 W 041606.7-443026041916.6-441605249.61-45.32 5.34 +1.08 +0.95 +0.51C K2III +0.063-0.046 +.005+024 2.4 70.4 * -1365 CP-53 679 276042334762318 W 041611.9-530611041840.0-525136261.59-44.09 6.09 +0.49 F7IV-V +0.051+0.073 +021 3.0 0.6 -1366 BD-00 687 27611131140 I 3152 041620.3-001957042127.1-000553193.75-32.85 5.86 +1.32 +1.52 K3III -0.016-0.123 +.008-027 5.0 197.8AC 3* -1367 BD-20 831 27616169354 161 041617.2-205241042039.0-203823217.01-42.07 5.38 -0.02 A2V +0.025-0.011 +.007+032V 164 -1368 60 TauBD+13 668 27628 93892 W V775 Tau041625.3+135027042203.5+140438180.78-24.38 5.72 +0.32 +0.10 +0.17 A3m +0.113-0.026 +041SB1O 25 7.1 109.2AC 3* -1369 59Chi TauBD+25 707 27638 76573 3161 041629.7+252337042234.9+253745171.51-16.74 5.37 -0.05 -0.08 B9V +0.017-0.023 +017V 350 3.0 19.4 3* -1370 BD+20 744 27639 76571 I 3158 041629.6+203506042222.8+204917175.26-19.97 5.91 +1.66 M0IIIab+A,F +0.001+0.001 +.015-009 3.0 2.0 * -1371 BD+42 946 27650 39501 3172 041638.0+421138042335.9+422541159.24-05.01 6.23 0.00 -0.15 A1pSi +0.024-0.032D+.002-012V 40 0.5 0.4 -1372 The RetCP-63 316 27657248986 W 1556 041633.0-632953041740.2-631520275.09-41.01 5.87 -0.07 -0.26 B9III-IV +0.002+0.027 +003V 1.8 3.9 -1373 61Del1TauBD+17 712 27697 93897 162I W 1582 041709.9+171829042256.1+173233178.01-22.01 3.76 +0.98 +0.82 +0.47 K0-IIICN0.5 +0.107-0.030 +.021+039SBO =< 8 8.7 109.6AB 3* -1374 CD-26 1642 27710169368 3159AB 1574 041722.2-255749042131.3-254342223.73-43.30 6.01 +0.35 0.00 F0IV-V +0.048-0.050 +.057+018V 46 0.3 0.6AB 4* -1375 BD+20 751 27742 76585 D 041738.7+204456042332.4+205856175.32-19.66 5.99 +0.03 -0.26 B8IV-V +0.016-0.028 +018V 175 0.0 0.2 -1376 63 TauBD+16 586 27749 93900 Var? 041740.7+163238042325.0+164638178.73-22.41 5.64 +0.30 +0.13 +0.16 A1m +0.104-0.028 +035SB1O 10 2.0 0.0 * -1377 55 PerBD+33 853 27777 57212 041759.7+335357042429.2+340750165.38-10.65 5.73 -0.06 -0.34 B8V +0.019-0.044 +005 250 -1378 62 TauBD+23 684 27778 76591 3179A 041757.8+240405042359.8+241804172.76-17.39 6.36 +0.17 -0.35 B3V +0.006-0.010 +016V 1.9 29.1AB 4* -1379 56 PerBD+33 854 27786 57216 3188 1592 041808.3+334346042437.4+335735165.53-10.75 5.76 +0.40 -0.12 F4V +0.043-0.072 +.005-032 3.6 4.9 * -1380 64Del2TauBD+17 714 27819 93907 W 041819.7+171245042405.8+172638178.29-21.86 4.80 +0.15 +0.12 +0.07 A7V +0.110-0.038 +.017+039SB 59 8.5 143.0 * -1381 66 TauBD+09 570 27820111791 3182 041824.6+091342042351.9+092739185.11-26.88 5.12 +0.07 +0.11 +0.05 A3V -0.015-0.008 +.001-004V 83 0.1 0.3 * -1382 BD+57 800 27855 246152324 3203 041842.4+572124042700.9+573507148.74 5.96 6.32 +0.04 +0.02 A0III +0.009-0.012 -001 5.9 20.6 * -1383 42Xi EriBD-04 818 278611311761120 1590 041842.0-035836042340.8-034444197.82-34.30 5.17 +0.08 +0.08 +0.03 A2V -0.050-0.057 +.013-011SB? 173 * -1384 CD-25 1862 278811693912323I 1588 041854.8-250730042305.7-245332222.75-42.75 5.83 +1.51 K5 +0.018-0.015 +029V * -1385 BD+18 633 27901 93918 041907.3+184844042457.1+190230177.12-20.68 5.98 +0.37 +0.04 +0.22 F4V +0.105-0.044 +037SB? 125 * -1386 CD-35 1687 27941194971 W 041927.5-354639042307.7-353242237.28-44.56 6.39 +1.24 K1III -0.006 0.000 +017 7.0 18.7 -1387 65Kap1TauBD+21 642 27934 76601 3201 1593 041924.4+220354042522.1+221738174.56-18.48 4.22 +0.13 +0.13 +0.05 A7IV-V +0.096-0.048 +.025+040SB? 81 0.0 0.1 O 6* -1388 67Kap2TauBD+21 643 27946 76602 3201 1594 041927.4+215817042525.0+221159174.65-18.54 5.28 +0.25 +0.10 +0.14 A7V +0.109-0.054 +032V 153 0.0 0.1 O 6* -1389 68Del3TauBD+17 719 27962 93923 3206 V776 Tau 041942.1+174158042529.4+175541178.12-21.30 4.29 +0.05 +0.08 +0.01 A2IV +0.108-0.028D+.019+035SB 18 3.7 1.5AB 3* -1390 BD+31 776 27971 572292325 041944.2+311248042606.3+312620167.62-12.24 5.28 +0.97 +0.80 K1III +0.076-0.110 +028V < 19: -1391 70 TauBD+15 621 27991 93925 W 041954.7+154245042537.3+155627179.79-22.54 6.46 +0.49 +0.02 +0.25 F7V +0.107-0.028 +.038+038SB? 15 0.0 0.1AP 3* -1392 69Ups TauBD+22 696 28024 766082326 W Ups Tau 042019.3+223513042618.5+224849174.30-17.98 4.28 +0.26 +0.14 +0.14 A8Vn +0.107-0.046 +.036+035SB1 196 1.9 0.0 3* -1393 43 EriCD-34 1664 280281949841121 042016.8-341456042402.2-340101235.17-44.23 3.96 +1.49 +1.80 +0.83 K4III +0.069+0.051 -.008+024 * -1394 71 TauBD+15 625 28052 93932 W V777 Tau 042038.8+152329042620.8+153706180.18-22.60 4.49 +0.25 +0.14 +0.15 F0V +0.112-0.023 +.007+038SBO 192 2.0 0.1 3* -1395 Eta RetCP-63 324 28093249009 163 042048.3-633725042153.3-632311275.01-40.52 5.24 +0.96 +0.69 G8III +0.089+0.173 +.016+045 * -1396 73Pi TauBD+14 697 28100 93935 I 042057.3+142916042636.4+144249180.99-23.12 4.69 +0.98 +0.72 +0.51 G7IIIaFe-1 -0.002-0.033 +.014+032 < 17 -1397 BD+08 687 281141118172327 042055.5+082147042621.1+083525186.30-26.90 6.06 +0.02 -0.42 B6IV -0.001-0.006 +014 25 -1398 CD-35 1704 28143194996 W 042114.1-345859042456.4-344528236.23-44.12 6.55 +0.44 F2III -0.013-0.110 +007V 3.4 39.5AB 3* -1399 72 TauBD+22 699 28149 76613 D 042118.5+224615042717.5+225947174.31-17.69 5.53 -0.10 -0.48 B7V +0.006-0.017 +005V 230 * -1400 BD+01 753 28191111827 042148.6+015119042700.7+020446192.50-30.50 6.23 +1.09 +1.03 K1III +0.065-0.047 +021 -1401 BD+72 227 28204 52382333 3267 042154.6+721847043330.7+723143137.89 16.48 5.94 +0.30 +0.18 A8m +0.027-0.089 +010SB1O 31 6.6 26.0 * -1402 BD+10 577 28217 93943 3228 042157.4+105916042728.8+111245184.16-25.11 5.88 +0.05 -0.33 B8IV -0.003-0.003D+.003+004V 70 1.8 0.4 * -1403 BD+21 647 28226 76618 W 042204.5+212349042800.8+213712175.52-18.46 5.72 +0.27 +0.10 +0.14 Am +0.095-0.038 +036SB2 88 0.8 0.0 A 3* -1404 CD-44 1546 28246216790 042210.4-442323042519.1-440939249.35-44.24 6.39 +0.44 F6V +0.035+0.067 +013 -1405 CP-57 659 28255233506 W A 042215.1-571751042412.2-570417266.91-42.27 6.29 +0.66 +0.19 G4V -0.098-0.077 +.042-004 0.4 5.8 * -1406 BD+30 665 28271 57249 3243A 042233.0+300822042851.9+302141168.85-12.53 6.40 +0.52 +0.08 F7V +0.010-0.023D+.016-037SB 40 1.8 14.7AB 4* -1407 75 TauBD+16 605 28292 93950 I D 1609 042243.3+160810042826.4+162135179.90-21.75 4.97 +1.13 +1.10 K2III v+0.006+0.028 +018V < 19: 2.5 0.0 * -1408 76 TauBD+14 702 28294 93948 042243.3+143107042823.4+144427181.26-22.77 5.90 +0.32 +0.06 +0.19 F0IV +0.108-0.024 +044V 102 * -1409 74Eps TauBD+18 640 28305 93954 164I W 042246.5+185731042837.0+191049177.60-19.92 3.53 +1.01 +0.88 +0.50 G9.5IIICN0.5 +0.107-0.038 +.020+039V? =< 8 7.0 181.6 * -1410 CD-24 2343 28312169455 3230 042244.6-241820042657.0-240453222.00-41.69 6.11 +0.14 A2 -0.003-0.015D+.019-004 0.2 0.4 * -1411 77The1TauBD+15 631 28307 93955 I W 042251.6+154425042834.5+155744180.26-21.97 3.84 +0.95 +0.73 +0.47 K0IIIbFe-0.5 +0.103-0.027 +.038+040SB1 =< 8 0.4 337.4AB 4* -1412 78The2TauBD+15 632 28319 93957 W The2 Tau 042257.0+153857042839.7+155215180.35-22.01 3.40 +0.18 +0.13 +0.09 A7III +0.103-0.025 +.029+040SB1O 78 0.4 337.4AB 4* -1413 BD+01 755 28322111840 042252.3+013807042803.6+015131192.88-30.40 6.15 +1.02 +0.81 G9III +0.027+0.004 +030 -1414 79 TauBD+12 598 28355 939602330 042313.9+124934042850.2+130251182.78-23.73 5.03 +0.23 +0.12 +0.08 A7V +0.105-0.016 +033V? 104 * -1415 BD+01 757 283751118451123 042321.9+010933042832.1+012251193.42-30.57 5.55 -0.10 -0.55 B3V +0.019-0.021 +018SB 26 * -1416 CP-61 335 28413249016 042341.9-612752042505.3-611418272.18-40.92 5.94 +1.54 +1.85 K4-5III -0.024+0.014 -019 -1417 1 CamBD+53 779 28446 24672 165 3274A Var? 042406.4+534137043201.8+535439151.91 3.95 5.77 +0.18 -0.73 B0III 0.000-0.003D+.006-007SB 275 1.1 10.3AB 3* -1418 CD-47 1383 284542168092329 042409.6-470946042706.0-465651253.17-43.71 6.10 +0.46 F5-6V +0.068-0.275 +.032+016 * -1419 BD+32 806 28459 57269 W 042413.1+321422043038.3+322729167.52-10.85 6.21 -0.04 -0.13 B9.5Vn -0.004-0.011 +023V 350 * -1420 BD+10 583 28475 93968 042412.9+101807042942.9+103118185.13-25.09 6.79 +0.09 -0.37 B5V +0.004+0.001 +015V -1421 BD-19 931 28479149668 042415.0-194036042839.0-192730216.34-39.91 5.96 +1.22 K1III +0.028-0.090 +026SB -1422 80 TauBD+15 636 28485 93970 3264 042426.4+152511043008.6+153817180.78-21.88 5.58 +0.32 +0.10 +0.19 F0V +0.102-0.024 +.031+030SB1 134 2.2 1.7 * -1423 BD-13 893 284971496742332 DU Eri 042428.2-131607042906.9-130254208.78-37.40 5.60 -0.23 -0.89 -0.10 B1Vne v+0.002 0.000 +022 340 * -1424 BD+39 1013 28503 57278 3273A 042433.9+394735043124.0+400037162.01-05.62 6.26 +0.04 -0.36 B8V -0.006-0.014 -012V 0.5 9.3 * -1425 BD+09 590 28505 93971 042433.1+100243043002.4+101545185.41-25.18 6.48 +1.03 +0.82 G8III -0.007-0.067 -063 -1426 Del MenCP-80 116 28525258372 166 1591 042444.0-802654041759.1-801250293.80-32.90 5.69 +0.84 +0.53 K2-3III+A +0.018+0.061 -020SB -1427 BD+15 637 28527 93975 W 1627 042450.1+155835043033.7+161138180.38-21.45 4.78 +0.17 +0.13 +0.07 A6IV +0.107-0.027 +.053+038SB 71 0.0 0.0 O 3* -1428 81 TauBD+15 639 28546 93978 W 042456.5+152828043038.9+154131180.82-21.75 5.48 +0.26 +0.10 +0.12 A5m +0.103-0.023 +039V? 21 3.9 162.0 * -1429 CD-42 1510 28552216821 1615 042452.9-421051042809.4-415736246.27-43.80 6.44 +1.64 +1.95 M1III -0.011-0.006 +097 -1430 83 TauBD+13 690 28556 93979 W 042459.5+133025043037.3+134328182.49-22.97 5.40 +0.26 +0.10 +0.14 F0V +0.106-0.023 +039V 95 5.8 111.9 * -1431 BD-13 896 28625149682 042532.5-134837043009.7-133532209.54-37.39 6.24 +1.00 +0.73 G5 -0.025+0.009 +014V? -1432 85 TauBD+15 645 28677 93993 1640 042608.9+153813043151.8+155106180.88-21.42 6.02 +0.34 +0.04 +0.20 F4V +0.101-0.027 +036SB1 109 * -1433 CD-46 1427 28700216832 042622.4-464403042920.0-463055252.54-43.37 6.16 +1.06 K1III +0.046+0.030 +011 -1434 57 PerBD+42 990 28704 396041124 W 042622.6+425102043324.9+430350160.02-03.27 6.09 +0.38 +0.01 F0V +0.004+0.004 -023V 0.7 116.2AB 4 -1435 CP-62 357 28732249029 W 042636.1-624427042745.9-623115273.64-40.20 5.75 +1.01 +0.82 K0III -0.019+0.014 +001 6.7 10.2 -1436 BD+05 674 28736111879 042645.2+051144043204.8+052436190.14-27.59 6.39 +0.42 0.00 +0.25 F5V +0.114+0.009 +040V 35 * -1437 45 EriBD-00 713 28749131270 I 042645.6-001530043152.7-000238195.34-30.63 4.91 +1.32 +1.44 +0.67 K3II-III +0.003-0.009 -.009+017 < 17 -1438 BD-13 904 28763149702 3284 042648.8-135129043125.9-133842209.75-37.13 6.21 +0.12 +0.09 A3V -0.011-0.063 -015 3.2 29.1 -1439 CD-35 1768 287761950852334 W 042701.7-355213043040.3-353913237.62-43.04 5.96 +1.00 K0II 0.000+0.031 -008 8.3 36.6 -1440 BD+63 515 28780 131962336 042701.5+640309043624.2+641542144.54 11.30 5.94 -0.03 -0.02 A1V -0.026-0.009 -016V =< 41 -1441 BD-03 809 28843131279 W DZ Eri 042737.2-032519043237.4-031233198.62-32.10 5.81 -0.14 -0.54 B9III v-0.005-0.006 +018V? 3.4 124.5 * -1442 BD+17 750 28867 94002 3297 042745.5+174820043332.9+180100179.34-19.76 6.25 +0.07 -0.10 B9IVn +0.011-0.024D+.002+015V 0.1 3.1 * -1443 Del CaeCD-45 1567 28873216850 167 Var? 042746.3-451006043050.1-445714250.37-43.22 5.07 -0.19 -0.78 B2IV-V +0.007-0.008 +014 36 -1444 86Rho TauBD+14 720 28910 940071125 Rho Tau 042810.3+143803043350.9+145040182.05-21.67 4.65 +0.25 +0.08 +0.12 A8V +0.103-0.027 +.026+040SB2O 117 * -1445 BD+28 666 28929 76654 3304 042822.4+284507043438.0+285740170.77-12.53 5.88 -0.06 -0.36 B9pHg +0.002-0.025 +013V 76 4.9 25.3AB 3* -1446 BD+09 600 28930111890 042820.6+091213043348.1+092447186.77-24.93 6.01 +1.06 +0.82 G8III -0.016-0.043 -026 -1447 BD-11 900 28970149725 I 042838.5-105949043322.0-104709206.78-35.50 6.06 +1.38 +1.45 K0 -0.005+0.015 -003V? -1448 BD+05 679 289781118962335 042849.1+052132043408.3+053407190.32-27.08 5.68 +0.05 +0.11 +0.04 A2V s -0.010-0.005 -008 36 * -1449 46 EriBD-07 838 29009131309 3305 EH Eri 042902.2-065655043354.8-064420202.47-33.55 5.72 -0.13 -0.46 B9pSi 0.000-0.007 +002V 4.8 1.2 * -1450 BD-07 841 29063131317 I 042922.1-070245043414.2-065016202.62-33.52 6.09 +1.38 +1.64 K2III -0.018-0.037 -004 -1451 47 EriBD-08 887 290641313152337I DV Eri 042922.6-082626043411.6-081353204.10-34.18 5.11 +1.70 +2.02 +0.97E M3III -0.018-0.001 +.006-012V * -1452 BD-09 930 29065131316 I 042924.4-091034043411.7-085813204.90-34.51 5.26 +1.47 +1.73 K4III -0.037-0.111 +.010-027V < 19: -1453 50Ups1EriCD-30 1883 29085169570 I 1650 042935.1-295807043330.6-294600229.85-41.59 4.51 +0.98 +0.72 +0.54 K0IIICN-1 -0.102-0.275 +.028+021 -1454 58 PerBD+40 1000 29094 396392338I A 042945.5+410334043641.4+411553161.76-04.03 4.25 +1.22 +0.82 +0.69 K4III+A3V -0.005-0.016 +.016+005SBO =< 50 0.1 * -1455 BD+19 742 29104 94022 3316 042950.7+194031043542.7+195254178.14-18.19 6.36 G5II-III+A-F -0.001-0.017 -002SB 0.5 0.3 * -1456 Nu MenCP-81 115 29116258378 042949.1-814825042057.9-813448295.07-32.05 5.79 +0.35 +0.05 F0-2III +0.003+0.127 +014 * -1457 87Alp TauBD+16 629 29139 94027 168I 3321 Alp Tau 043010.9+161830043555.2+163033180.97-20.25 0.85 +1.54 +1.90 +0.94 K5+III v+0.063-0.190 +.048+054SB < 17 9.8 121.7AC 6* -1458 88 TauBD+09 607 29140 94026 3317 1658 043009.5+095720043539.3+100939186.40-24.13 4.25 +0.18 +0.11 +0.10 A5m +0.055-0.046 +.036+029SB2O 35 3.6 69.7 * -1459 BD+23 715 29169 76670 1663 043027.6+230813043629.2+232027175.47-15.85 6.02 +0.38 +0.02 +0.21 F5IV +0.112-0.055 +043V 80 * -1460 BD-10 959 29173131335 3318A 043028.1-095633043514.0-094412205.87-34.63 6.37 +0.11 +0.10 A1m +0.021-0.023 +026V 15 1.0 12.8 * -1461 BD-20 880 29184169584 043037.8-200747043500.5-195514217.55-38.65 6.13 +1.17 K3III +0.081+0.081 +074V? -1462 BD-03 830 29227131344 3328 043102.4-034900043601.6-033643199.53-31.57 6.33 -0.10 -0.43 B7III -0.007-0.013 +020 4.7 17.9AB 4* -1463 48Nu EriBD-03 834 29248131346 169 W Nu Eri 043119.3-033325043619.1-032109199.31-31.38 3.93 -0.21 -0.89 -0.19 B2III +0.002-0.005 +015SB 25 9.2 50.9 * -1464 52Ups2EriCD-30 1901 29291195148 170I 043139.7-304601043533.0-303344231.01-41.31 3.82 +0.98 +0.72 +0.49 G8IIIa -0.045-0.012 -.014-004 * -1465 Alp DorCP-55 663 29305233564 171 W Alp Dor 043150.0-551506043359.8-550242263.83-41.42 3.27 -0.10 -0.35 -0.09 A0IIISi +0.051-0.003 +.018+026 82 0.5 0.2 3* -1466 2 CamBD+53 794 29316 24744 3358 043202.4+531634043958.1+532823153.03 4.53 5.35 +0.32 +0.07 A8V +0.046-0.092 +.019+020V 112 1.6 0.3AB 4* -1467 3 CamBD+52 865 29317 24743 I 3359 1681 043201.9+525249043954.7+530447153.32 4.26 5.05 +1.07 +0.89 K0III -0.002-0.013 -.008-041SB1O < 17 7.0 3.8 * -1468 BD+76 174 29329 5289 043208.1+762520044600.3+763640135.05 19.65 6.49 +0.51 F7V +0.064-0.136 +.015-006 64 -1469 BD+00 798 293351119282339 1671 043204.4+004745043713.7+005954195.13-28.94 5.31 -0.12 -0.45 B7V -0.004-0.004 +024V 136 * -1470 BD+26 731 29364 76682 3353 1676 043218.8+264427043829.6+265624172.92-13.20 6.47R F2V: +0.047-0.058D+.021+004SB 0.1 4.0 * -1471 BD+20 785 29365 766802341 HU Tau 043221.7+202902043815.8+204105177.88-17.22 5.92 -0.05 -0.35 B8V -0.015-0.007 -002SBO 70 1.5 0.0 * -1472 89 TauBD+15 661 29375 94043 W 043225.8+154958043809.4+160200181.72-20.12 5.79 +0.31 +0.06 +0.16 F0V +0.093-0.023 +038V 115 5.9 140.5 * -1473 90 TauBD+12 618 29388 940442342 W 043234.0+121837043809.5+123039184.74-22.24 4.27 +0.12 +0.13 +0.05 A6V +0.103-0.013 +.024+045SB1 79 5.7 119.8AC 3* -1474 51 EriBD-02 963 29391131358 3350 043234.1-024024043736.1-022824198.61-30.66 5.23 +0.28 +0.04 F0V +0.042-0.061 +.034+021 95 5.9 80.0AC 3* -1475 CP-63 342 29399249054 W 1659 043231.2-630146043334.0-624925273.74-39.47 5.79 +1.04 +0.90 K1III -0.115-0.023 +031 3.6 31.9 -1476 CD-30 1911 29435195163 043257.9-305508043650.9-304300231.28-41.06 6.30 -0.10 B9IV-V -0.011+0.013 +015 -1477 BD+24 674 29459 766892343 043317.1+250111043923.1+251306174.41-14.15 6.22 +0.16 +0.11 A5Vn +0.017-0.015 +021V 160 -1478 91Sig1TauBD+15 665 29479 94051 W 043326.5+153611043909.2+154759182.07-20.07 5.07 +0.15 +0.20 A4m +0.039-0.072 +.021+019SBO 60 0.4 431.2AB 3* -1479 92Sig2TauBD+15 666 29488 940542345 W 043333.2+154312043916.5+155505181.99-19.97 4.69 +0.15 +0.13 +0.07 A5Vn +0.083-0.018 +.020+036SB2 117 0.4 431.2AB 3* -1480 BD+07 681 294991119542344 W 043341.1+074020043906.2+075215188.99-24.76 5.39 +0.26 +0.13 +0.12 A5m +0.094-0.003 +036V 55 3.5 297.8AC 3* -1481 53 EriBD-14 933 29503149781 172I W 043336.0-142958043810.8-141814211.32-35.89 3.87 +1.09 +1.01 +0.56 K2IIIb -0.075-0.156 +.044+042SB1 < 17 3.4 0.8 * -1482 BD+48 1128 29526 396882347 043356.4+480623044124.1+481803157.06 1.28 5.67 -0.02 -0.02 A0V +0.042-0.042 +023V 65 -1483 BD-12 955 29573149789 043413.7-121916043853.6-120723208.96-34.85 5.01 +0.07 +0.09 +0.05 A2IV -0.053-0.011 +.028+007V 43 -1484 93 TauBD+11 639 29589 94063 043429.2+120005044003.4+121152185.31-22.05 5.46 -0.12 -0.49 B8IV -0.001-0.008 +023V 73 * -1485 CP-83 91 295982583791658 W 043429.0-830656042250.9-825357296.31-31.26 6.76 +0.20 +0.10 A7IV-V -0.018+0.003 -005 5.7 47.7 * -1486 BD+59 826 29606 24777 3391 043438.1+591946044318.1+593115148.73 8.83 6.50R A7IV +0.033-0.049D+.005+010 0.0 0.1 * -1487 BD-14 936 29613149797 043443.7-143311043919.7-142133211.52-35.66 5.45 +1.06 K1IVa +0.122-0.127 +.007+056V -1488 BD-01 689 29610131392 043442.2-011456043947.2-010310197.52-29.46 6.10 +0.94 +0.70 K0 +0.025-0.018 +034 -1489 BD+37 954 29645 573772348 043502.3+380520044150.3+381649164.66-05.27 5.99 +0.57 +0.06 G0V +0.241-0.093 +.022+047V? =< 10 -1490 BD+28 680 29646 767071126 3379 043504.1+282517044119.8+283654172.02-11.64 5.78 -0.03 -0.01 A2V +0.034-0.030 +025V 5.2 43.5AB 3* -1491 BD+75 189 29678 5309 173 W 043522.2+754533044850.3+755628135.73 19.40 6.06 +0.28 -0.02 A9IV +0.035-0.135 +.021-006SB 97 6.0 96.9 -1492 CP-62 372 29712249066 I W R Dor 043535.6-621627043645.6-620439272.67-39.34 5.40 +1.58 +0.86 +3.16 M8eIII: -0.064-0.084 +026 6.5 36.5AC 3* -1493 BD+49 1230 29721 397021128 W 043545.4+494658044321.6+495826156.02 2.62 5.87 +0.02 -0.25 B9III -0.004-0.016 +003 7.3 20.8 -1494 59 PerBD+43 1043 29722 396992349 043548.5+431029044254.3+432154160.95-01.78 5.29 0.00 +0.02 A1Vn +0.039-0.052 +.018+009V 197 -1495 CD-24 2488 297371696501127 043557.2-244040044006.8-242857223.58-38.91 5.58 +0.92 G6III -0.067+0.018 -018SB -1496 54 EriBD-19 988 29755149818 I 3380 DM Eri 043604.0-195148044026.5-194018217.79-37.36 4.32 +1.61 +1.81 +1.38 M4III +0.021-0.096 +.008-033 0.3 0.1 * -1497 94Tau TauBD+22 739 29763 76721 174 W 043614.5+224555044214.7+225725176.64-15.07 4.28 -0.13 -0.57 -0.14 B3V -0.002-0.016 +.017+015SB2O 187 0.7 0.1 5* -1498 CD-51 1207 29805233605 043635.6-515207043904.3-514022259.24-41.23 6.44 +1.32 K2III +0.017+0.017 +037 -1499 95 TauBD+23 733 29859 76727 043710.4+235358044313.8+240520175.88-14.19 6.13 +0.54 +0.07 F7IV-V +0.017-0.022 +008V =< 10 -1500 BD+40 1032 29866 39715 043717.4+403554044412.9+404713163.06-03.28 6.08 +0.06 -0.28 B8IVne +0.003-0.007 +041 300 * -1501 BD+32 827 29867 57393 043720.3+324039044348.3+325155169.06-08.49 6.45R A8V -0.035-0.042 +000 73 -1502 Alp CaeCD-42 1587 298752169261129 W Var? 043720.3-420316044033.7-415150246.15-41.49 4.45 +0.34 +0.01 +0.21 F2V -0.141-0.077 +.045-001V 52 8.0 6.6 * -1503 Bet CaeCD-37 1867 299921952391130 043831.2-372022044203.5-370840239.92-40.91 5.05 +0.37 +0.04 F1V +0.049+0.193 +.058+027V? 140 -1504 CP-59 370 30003233622 W 043839.2-590825044018.3-585637268.60-39.73 6.53 +0.68 +0.24 G5V +0.070+0.186 +.064+010 0.2 2.7 * -1505 55 EriBD-09 969 30020131442 3409B DW Eri 043846.8-085852044334.6-084737205.96-32.37 6.82 +0.39 +0.14 F4IIIpSr +0.021-0.012D+.008+040SB 60 0.1 9.3 * -1506 55 EriBD-09 970 30021131443 3409A 043847.2-085859044335.1-084746205.96-32.37 6.70 +0.92 +0.59 G8III +0.032-0.024D+.008+048SB =< 25 0.1 9.3 * -1507 BD+10 621 30034 94095 W 1705 043853.2+105735044425.8+110846186.90-21.80 5.40 +0.25 +0.08 +0.13 F0V +0.100-0.015 +040 86 5.8 74.7AB 3* -1508 56 EriBD-08 929 300761314511131 DX Eri 043917.0-084125044405.3-083013205.72-32.12 5.90 -0.11 -0.81 -0.03 B2Ve +0.003-0.002 +015 240 * -1509 CD-30 1968 30080195250 I 043917.3-305705044309.3-304556231.68-39.74 5.68 +1.41 +1.60 K2III -0.030-0.067 -004V? -1510 BD+70 322 30085 53262358 043924.5+704547045036.4+705630140.05 16.55 6.37 -0.08 -0.24 A0IV +0.001-0.020 +007V? =< 41 -1511 4 CamBD+56 973 30121 24829 175 3432 043940.2+563447044800.3+564526151.27 7.54 5.30 +0.25 +0.15 +0.08 A3m +0.050-0.148 +.013+019 63 7.5 99.0AC 3* -1512 BD+23 739 30122 76737 043940.1+232639044542.5+233741176.62-14.03 6.35 +0.06 -0.44 B5III +0.007-0.015 +019V? * -1513 BD-18 906 301271498562352 043943.0-185108044408.0-184000216.98-36.20 5.53 +0.02 +0.04 A3V +0.051-0.018 +005 -1514 BD+40 1045 30138 39746 043950.3+400751044644.4+401846163.73-03.23 5.97 +0.93 G9III -0.001-0.029 +034 -1515 BD+55 928 30144 24834 043954.8+552527044807.0+553609152.18 6.81 6.26R F0 +0.075-0.102 +022 53 * -1516 Lam PicCD-50 1471 301852336382351 044012.5-504010044246.4-502853257.58-40.79 5.31 +0.98 +0.74 K0-1III -0.031+0.030 -.000+005 -1517 BD+18 719 30197 94112 044026.3+183314044616.8+184406180.71-16.93 6.01 +1.21 +1.32 +0.63 K4III +0.072-0.065 +038 * -1518 CD-41 1549 30202216961 044026.9-411503044344.2-410353245.12-40.87 6.25 +1.46 +1.78 K3-4III +0.003+0.010 -004 -1519 BD+11 646 30210 941112353 W 044027.9+113122044601.7+114220186.65-21.16 5.37 +0.19 +0.14 +0.08 A2m +0.068-0.006 +.005+041SB1? 47 7.5 93.8AC 3* -1520 57Mu EriBD-03 876 30211131468 176 044030.0-032616044530.1-031517200.53-29.34 4.02 -0.15 -0.60 -0.14 B5IV +0.016-0.013 +009SB1O 140 * -1521 BD-21 966 30238169727 I 044046.0-212800044504.2-211701220.15-36.87 5.72 +1.47 gK2 +0.018-0.025 +022V -1522 BD-03 884 30321131481 044123.4-030805044624.1-025716200.36-28.99 6.33 +0.04 +0.06 A2V +0.012-0.047 +019 -1523 BD+80 155 30338 7833948 044137.3+810141050020.7+811138131.38 22.78 5.07 +1.28 +1.47 K3III -0.001+0.024 +.020-008V? < 17 -1524 CD-34 1859 30397195275 044207.5-341113044549.6-340018235.96-39.75 6.86 0.00 A0V +0.040+0.018 +028 -1525 CD-28 1735 304221697521132 044226.1-281606044625.8-280515228.51-38.47 6.19 +0.19 A3IV +0.001+0.016 +019 157 -1526 CD-39 1624 304321952782355 044232.6-393213044555.4-392124242.91-40.35 6.05 +1.07 K1III -0.059-0.020 -006 -1527 BD+63 543 30442 132912362I W 044243.4+632005045205.2+633019146.25 12.16 5.44 +1.57 +1.76 M3IIIab +0.037-0.096 +.001-036V 4.5 115.4 * -1528 BD+32 840 30453 57444 S 044250.8+322446044919.0+323518170.03-07.78 5.86 +0.24 +0.14 +0.11 A8m +0.018-0.031 +021SB1O 15 * -1529 BD+31 816 30454 574412359I 044248.1+311549044912.8+312614170.91-08.52 5.58 +1.12 +1.03 K2III +0.017-0.108 +023V -1530 Kap DorCP-59 376 304782336642354 Var 044250.5-595458044421.1-594358269.44-39.05 5.27 +0.20 A8-9III-IV +0.033+0.039 +.024+000V 177 -1531 CP-77 181 304792561162350 044253.7-775041043821.7-773922290.58-33.35 6.05 +1.10 +0.95 +0.52C K2III -0.010-0.018 +009 -1532 58 EriBD-17 954 30495149888 044306.8-170703044736.3-165604215.37-34.81 5.51 +0.63 +0.12 +0.34 G2.5V +0.133+0.170 +.079+023V * -1533 BD+37 969 30504 574471133I 044310.6+371842044954.6+372918166.30-04.57 4.88 +1.44 +1.70 +0.58E K3.5IIIBa0.2: -0.038+0.040 +.025-023V? < 19: * -1534 BD+03 681 30545112098 044329.5+032445044844.6+033518194.39-25.12 6.03 +1.19 +1.15 K1III -0.001-0.017 -019 -1535 BD+48 1162 30557 397992361 044338.0+483405045109.3+484427157.78 2.79 5.66 +0.99 +0.80 G9III -0.040-0.031 +029 -1536 BD-05 1044 30562131504 044339.7-055037044836.3-054026203.39-29.83 5.78 +0.62 +0.20 F8V +0.305-0.243 +.038+079V * -1537 96 TauBD+15 687 30605 94151 I 3464 044400.7+154347044944.1+155415183.60-17.97 6.08 +1.60 +1.72 gK3 +0.005-0.010 +013V? 5.5 29.3AB 3 -1538 59 EriBD-16 956 30606149901 044402.5-163024044832.5-161946214.78-34.37 5.77 +0.55 +0.09 F6V +0.004+0.036 +035 -1539 Zet CaeCD-30 2011 30608195300 044355.4-301200044749.6-300113231.01-38.60 6.37 +1.07 K1IV +0.039+0.094 +006V -1540 CP-63 365 306102490952356 1718 044402.3-632435044457.9-631347273.75-38.12 6.46 +1.08 +1.00 K0-1III -0.013-0.005 +016 -1541 Mu MenCP-71 282 30612256122 177 044403.6-710652044303.9-705552282.97-35.83 5.54 -0.12 -0.46 B8II-IIISi: +0.008+0.033 -001V? -1542 9Alp CamBD+66 358 30614 13298 178 044406.3+661023045403.0+662034144.07 14.04 4.29 +0.03 -0.88 0.00 O9.5Ia e 0.000+0.006 -.002+006V? 95 * -1543 1Pi 3OriBD+06 762 306521121061134I W 1731 044424.6+064712044950.4+065741191.45-23.07 3.19 +0.45 -0.01 +0.26 F6V +0.466+0.012 +.125+024SB2 17 5.5 94.6 * -1544 2Pi 2OriBD+08 777 30739112124 I 044509.6+084343045036.7+085401189.82-21.83 4.36 +0.01 0.00 0.00 A1Vn +0.004-0.032 +.036+024SB 212 * -1545 BD-14 970 307431499162363 044507.0-135618044942.2-134611212.07-33.12 6.26 +0.44 -0.05 F5V -0.122-0.172 -003 =< 15 -1546 BD+52 891 30752 24894 044515.1+524020045309.8+525027154.80 5.63 6.41 A2V -0.008-0.021 -013 -1547 97 TauBD+18 743 30780 941641135 W V480 Tau 044531.3+184011045122.5+185023181.38-15.91 5.10 +0.21 +0.12 +0.12 A7IV-V +0.080-0.035 +.022+037V 141 5.3 177.0 * -1548 CD-44 1720 307882170042360 044529.1-440918044833.8-435848248.99-40.07 6.72 +0.95 +0.66 G8III +0.018+0.022 +019 -1549 60 EriBD-16 964 30814149924 I 1740 044541.1-162327045011.6-161302214.84-33.96 5.03 +0.98 +0.77 K0III v+0.041+0.054 +.023+037 -1550 BD+42 1081 30823 39826 044543.8+422503045247.8+423512162.71-00.90 5.71 +0.11 +0.14 A3III -0.006-0.001 -001V -1551 2 AurBD+36 952 30834 57475 I 044556.2+363203045238.0+364211167.26-04.65 4.78 +1.41 +1.58 +0.78 K2.5IIIbBa0.4 -0.027-0.007 -017 < 17 * -1552 3Pi 4OriBD+05 745 30836112142 179 1742 044552.7+052603045112.4+053618192.89-23.52 3.69 -0.17 -0.81 -0.16 B2III+B2IV -0.001+0.001 +.001+023SBO 40 * -1553 BD+09 668 30870112150 044613.8+094820045143.4+095830189.03-21.00 6.11 +0.08 -0.44 B5V +0.001-0.008 +011 * -1554 BD+27 701 30912 768022365 044632.2+274349045247.1+275351174.20-10.13 5.97 +0.37 +0.16 F2IV +0.041-0.032 +038 135 * -1555 5 CamBD+55 941 30958 249042367 3508 044652.4+550539045503.1+551533153.07 7.36 5.52 +0.04 0.00 B9.5V -0.012-0.010 +002V? 71 6.4 12.9 * -1556 4Omi1OriBD+14 777 30959 941761136I Omi1 Ori 044652.4+140503045232.0+141502185.43-18.39 4.74 +1.84 +2.03 +1.17E S3.5/1- 0.000-0.057 +.004-008V * -1557 CD-41 1593 30985217032 W 044701.0-412936045016.2-411915245.54-39.66 6.07 +0.37 F2-3V +0.006+0.065 +025 4.6 13.4 * -1558 BD+43 1116 31069 39851 044740.4+435352045451.3+440339161.81 0.32 6.08 -0.02 -0.09 A0V +0.027-0.053 +003V 121 -1559 CD-35 1962 310931953572364 W 044749.8-350426045128.2-345423237.34-38.74 5.86 +0.08 +0.09 A1Vn +0.026-0.022 +023SB 0.4 0.1 -1560 61Ome EriBD-05 1068 311091315682366 044758.8-053711045253.7-052710203.75-28.78 4.39 +0.25 +0.16 +0.17 F4III+A6III -0.023+0.021 +.013-006SBO 153 * -1561 BD+52 898 31134 24919 044811.4+524225045607.1+525210155.05 6.00 5.75 +0.11 +0.10 A2V s -0.003+0.008 -022SB 40 -1562 5 OriBD+02 800 31139112179 I 1755 044809.8+022035045322.8+023029196.08-24.71 5.33 +1.64 +1.95 +0.91E M1III +0.034-0.019 +.010+013 -1563 Iot PicCP-53 760 31203233709 W 044841.3-533754045055.2-532741261.28-39.22 5.61 +0.33 F0IV -0.091+0.083 +016V 57 0.8 12.3 * -1564 Iot PicCP-53 760 31204233710 W 044842.5-533747045056.3-532735261.27-39.22 6.42 F4V: -0.092+0.081 +010V 0.8 12.3 * -1565 BD+01 847 31209112191 044845.1+012419045355.8+013410197.04-25.08 6.61 +0.04 +0.01 A1Vn +0.009-0.003 +021 139 -1566 BD+19 811 31236 94199 044905.5+191925045458.3+192907181.36-14.84 6.37 +0.29 +0.06 +0.16 F3IV +0.060-0.038 +035V? 102 * -1567 8Pi 5OriBD+02 810 31237112197 180 Pi5 Ori 044902.5+021637045415.1+022626196.27-24.56 3.72 -0.18 -0.83 -0.20 B3III+B0V 0.000 0.000 +.003+023SBO 93 * -1568 7 CamBD+53 829 31278 24929 3536 044916.0+533532045717.2+534508154.47 6.68 4.47 -0.02 -0.01 -0.01 A1V -0.024+0.007 +.000-008SB1O 45 3.4 0.4AB 3* -1569 6 OriBD+11 675 31283 941972368 S 044914.0+111546045446.9+112534188.21-19.56 5.19 +0.12 +0.11 A3V -0.009+0.032 +009V 127 -1570 7Pi 1OriBD+09 683 31295 94201 W 044923.4+095931045453.8+100903189.34-20.25 4.65 +0.09 +0.09 +0.03 A0Vp +0.046-0.132 +013V 104 4.2 171.6AB 3* -1571 BD+07 755 312961122032369I 1763 044923.3+073702045447.8+074645191.44-21.59 5.33 +1.22 +1.18 gK1 -0.021-0.027 -005 -1572 BD+74 229 31312 5385 I 044938.5+740653050220.1+741609137.71 19.17 6.06 +1.57 +1.83 K5III +0.021+0.034 -052V? -1573 BD+35 930 31327 57511 044939.4+360029045619.9+361008168.14-04.40 6.07 +0.41 -0.43 B2Ib -0.017+0.013 -005V? =< 32 * -1574 BD+00 893 31331112206 044942.5+001819045450.7+002803198.22-25.45 5.99 -0.12 -0.56 B5V 0.000+0.003 +017SB 200 -1575 BD+24 709 31362 76848 045010.0+242557045615.6+243532177.35-11.54 6.37 +0.33 -0.08 F0 -0.026-0.017 -009V? 60 -1576 BD+14 787 31373 94212 045008.6+145249045550.3+150224185.24-17.28 5.81 -0.08 -0.45 B9V +0.018-0.021 +007V 90 -1577 3Iot AurBD+32 855 31398 57522 181I 1778 045028.7+330028045659.6+330958170.59-06.16 2.69 +1.53 +1.78 +0.82 K3II +0.003-0.018 +.021+018V < 17 * -1578 BD+05 769 31411112220 045039.2+051423045558.4+052357193.77-22.63 6.50 +0.02 -0.01 A0V -0.004-0.009 +022 118 -1579 BD-16 991 31414149985 045038.1-165405045506.8-164426215.95-33.06 5.70 +0.96 gG9 +0.008+0.001 +010 -1580 9Omi2OriBD+13 740 31421 94218 I 3540 045044.8+132124045622.3+133052186.63-18.05 4.07 +1.15 +1.11 +0.63 K2-IIIFe-1 -0.074-0.047 +.019+001 < 17 7.5 100.4AC 3* -1581 BD-16 992 314441499882370 R Eri 045049.1-163446045518.6-162504215.61-32.90 5.72 +0.88 gG4 +0.010+0.045 +032V * -1582 62 EriBD-05 1091 31512131614 W 045128.6-051946045624.2-051017203.93-27.88 5.51 -0.13 -0.56 B6V -0.008-0.007 +024 104 3.6 67.3 -1583 CD-25 2115 31517169889 045124.6-255316045530.2-254340226.30-35.91 6.72 +0.27 F0-2III +0.018+0.028 +025 -1584 CD-39 1691 315291954002371 045133.8-394721045454.8-393743243.46-38.65 6.10 +1.42 K3III -0.003+0.022 +029 -1585 BD+16 672 31539 94227 I D 045135.7+165949045722.3+170913183.67-15.75 5.48 +1.31 gK1 -0.013-0.007 +025V 0.0 0.1 * -1586 99 TauBD+23 777 31553 76858 3557 045144.5+234733045748.7+235655178.09-11.64 5.79 +1.11 gG8 +0.008-0.007 +004 6.4 103.5AC 3 -1587 BD+73 264 31563 5403 I 045145.0+733656050413.0+734550138.24 19.00 6.66R K0 +0.021-0.016 +022 -1588 8 CamBD+52 906 31579 24943 I 045148.2+530006045946.3+530920155.17 6.61 6.08 +1.46 K4III -0.014-0.009 -002 -1589 BD+73 265 31590 5407 W 045203.1+735510050439.8+740401137.98 19.19 5.96R A1V +0.013-0.016D+.010-009V 93 1.0 0.6 * -1590 98 TauBD+24 717 31592 768622374 3547 045202.1+245346045809.4+250301177.24-10.92 5.81 0.00 -0.02 A0V +0.022-0.048 +026SB 50 5.8 94.6AC 4* -1591 BD-01 762 316231316252373 045212.6-011323045717.2-010402200.03-25.70 6.23 +0.42 +0.06 F2 -0.037-0.028 +009 67 -1592 4Ome AurBD+37 1005 31647 57548 3572 045228.0+374421045915.4+375325167.15-02.88 4.94 +0.04 +0.02 +0.03 A1V +0.040-0.101 +.005+005V 83 2.8 5.1 * -1593 BD+60 853 31662 13341 3590 045236.3+605555050135.9+610441148.91 11.58 6.03 +0.41 F4V +0.008-0.175 +011 34 5.5 5.4 * -1594 BD+66 370 31675 13344 045242.2+664059050250.4+664922144.19 15.03 6.19 +0.48 -0.04 dF6 +0.066-0.345 +.034+017V? * -1595 BD-14 1003 31726150029 045310.1-142311045744.8-141353213.50-31.51 6.15 -0.21 B1V +0.010+0.011 +011 -1596 BD-02 1080 31739131640 3570 045308.6-022202045810.8-021245201.26-26.07 6.35 +0.10 +0.11 A2V -0.003+0.025 +037 5.5 21.0 -1597 CP-58 437 31746233733 045314.5-584227045453.0-583250267.62-37.96 6.12 +0.44 -0.06 F3V +0.101+0.077 +022 -1598 CP-66 338 317542491382372 1777 045321.2-665007045330.5-664032277.61-36.31 6.41 +1.63 +1.96 M0-1III 0.000+0.010 -024V * -1599 5 AurBD+39 1133 31761 57559 3589 045325.7+391436050018.3+392341166.09-01.79 5.95 +0.41 -0.03 F5V -0.017+0.004 +.021+006 3.4 3.7 * -1600 BD+14 796 31764 94240 3579A 1788 045318.8+142325045859.4+143234186.12-16.94 6.09 +0.04 -0.27 +0.01 B7V +0.006-0.017 +004 125 1.5 39.3AB 4* -1601 10Pi 6OriBD+01 872 31767112281 I 1786 045321.8+013338045832.9+014251197.56-24.02 4.47 +1.40 +1.55 +0.70 K2-II -0.002-0.003 +.018+014V? < 17 -1602 6 AurBD+39 1134 31780 57560 I 045329.5+393013050023.2+393918165.90-01.61 6.58R K4I +0.002+0.006 -024V -1603 10Bet CamBD+60 856 31910 13351 182I 3615A 045431.1+601746050325.1+602632149.57 11.38 4.03 +0.92 +0.63 +0.45 G1Ib-IIa -0.006-0.016 +.009-002 19 3.4 80.8AB 3* -1604 BD-16 1013 31925150052 3588 1793 045432.9-163153045901.3-162233215.97-32.06 5.66 +0.43 -0.08 F3V+F9V -0.141+0.148 +.028+030V? 1.5 0.2AB 3* -1605 7Eps AurBD+43 1166 31964 39955 183I 3605 Eps Aur 045447.4+434032050158.1+434924162.79 1.18 2.99 +0.54 +0.33 +0.45 F0Iae+B v-0.001-0.004 +.007-003SB1O 29 6.2 207.6AE 6* -1606 CP-72 332 31975256139 045445.5-723425045305.5-722427284.32-34.57 6.28 +0.52 +0.01 F6V -0.052+0.276 +025 -1607 BD-15 915 31996150058 I R Lep 045503.2-145724045936.5-144821214.32-31.33 7.71 +5.74 +1.47 C6IIe +0.021+0.020 +032V * -1608 63 EriBD-10 1066 320081500602375 045506.4-102435045950.4-101548209.55-29.41 5.38 +0.80 +0.35 G4V +0.020-0.135 -012V -1609 BD+03 736 32039112304 3597B 1800 045517.1+032759050032.6+033655196.07-22.61 7.03 B9Vn +0.025+0.001 +031 340 0.4 21.3 * -1610 BD+03 737 32040112305 3597A 1800 045518.5+032803050033.9+033658196.07-22.60 6.66 -0.07 -0.28 B9Vn +0.007-0.012 +042 352 0.4 21.3 * -1611 64 EriBD-12 1047 32045150064 S Eri 045516.9-124105045955.8-123215211.94-30.34 4.79 +0.26 +0.16 +0.14 F0IV +0.045-0.091 +.022-009V? 173 * -1612 8Zet AurBD+40 1142 32068 399661137I Zet Aur 045529.1+405548050228.7+410433165.02-00.43 3.75 +1.22 +0.38 +0.87 K4II+B8V +0.009-0.022 +.005+013SBO 19: * -1613 BD-02 1095 32115131684 045537.3-021252050039.8-020356201.45-25.45 6.32 +0.28 +0.04 A8IV -0.019+0.008 +021V -1614 BD-05 1123 32147131688 045551.1-055216050049.0-054512205.07-27.18 6.22 +1.06 +1.02 +0.49 K3V +0.551-1.094 +.110+027SB -1615 BD+41 1044 32188 39979 1810 045617.6+411750050318.6+412630164.82-00.08 6.14 +0.16 A2IIIShell? +0.002-0.004 -001V? * -1616 BD+85 74 32196 8431637 045617.8+854946053148.0+855619127.17 25.68 6.51 +0.32 +0.10 A5m +0.013-0.079 -006SB * -1617 65Psi EriBD-07 948 32249131700 045635.4-071914050126.3-071026206.59-27.69 4.81 -0.19 -0.74 -0.19 B3V +0.003+0.008 +025V? 74 -1618 BD+00 923 322631123342376 1806 045641.5+003437050150.3+004320198.95-23.81 5.92 +1.27 +1.39 K0 +0.001-0.012 +021 -1619 BD+01 886 32273112340 3623A 045649.2+012747050200.0+013632198.14-23.33 6.24 -0.04 -0.41 B8V -0.009+0.012D+.013+025V 53 1.3 14.2AxBC 4* -1620102Iot TauBD+21 751 32301 76920 184 D 045707.0+212650050305.7+213524180.77-12.06 4.64 +0.16 +0.15 +0.09 A7V +0.066-0.042 +.019+041 126 0.0 0.1 * -1621 BD-20 990 32309169981 045705.2-201151050125.6-200307220.27-32.85 4.91 -0.05 -0.14 -0.05 B9.5Vn +0.034-0.015 +024 237: * -1622 11 CamBD+58 804 32343 25001 W BV Cam 045726.7+584958050608.5+585821150.99 10.80 5.08 -0.08 -0.69 B2.5Ve -0.005-0.008 -011V? 131 1.0 180.5AB 4* -1623 12 CamBD+58 805 32357 25003 W BM Cam 045729.9+585256050612.2+590116150.95 10.83 6.08 +1.12 +0.85? K0III -0.001-0.031 -008SBO =< 25 1.0 180.5AB 4* -1624 BD+60 857 32356 13369 I 045727.4+610157050629.7+611012149.19 12.11 6.04 +1.37 K5II +0.036-0.075 -040 -1625 BD-04 1019 32393131715 045747.4-042113050245.5-041235203.82-26.03 5.85 +1.21 +1.36 K3 +0.055+0.016 +038V? * -1626 BD+30 772 32406 57610 045751.2+302112050414.5+302941173.66-06.57 6.14 +1.21 K0II-III +0.001-0.005 +018 -1627 BD+32 879 32428 57614 045808.0+321053050436.9+321913172.25-05.41 6.62 +0.27 +0.13 +0.13 A4m -0.011-0.070 -008 * -1628 CD-26 1975 324361699972377I 045805.7-262500050209.8-261630227.45-34.62 5.02 +1.07 +0.97 K1III +0.089-0.073 +.007+027 -1629 Eta MenCP-75 290 324402561451138 045803.5-750526045511.2-745613287.12-33.55 5.47 +1.52 +1.83 K4III +0.024+0.059 +.026+026 -1630 BD+54 859 32445 25007 3667 045814.4+541559050622.0+542421154.75 8.14 7.24R G5 -0.014+0.028 3.7 6.7AB 3* -1631 CD-39 1744 32453195501 045814.7-395148050134.5-394305243.74-37.38 6.03 +0.88 G5III -0.001+0.030 +006 -1632 BD+27 723 32480 76941 045822.7+273324050437.9+274146175.98-08.17 6.60 +0.24 +0.12 F0III +0.019-0.031 +022 105 -1633 BD+21 755 32482 76939 045823.9+210816050421.6+211641181.21-12.01 6.19 +1.32 +1.47 +0.48E K0 +0.020-0.015 +048 -1634 1 LepBD-22 1960 32503170010 I 045831.6-225617050244.9-224742223.49-33.46 5.75 +1.20 +1.14 K1IV +0.059+0.023 +033 * -1635 CD-31 2163 325151955091139 045835.7-315500050222.8-314617234.00-35.92 5.94 +1.17 G8III -0.002+0.082 +029 -1636 BD+69 302 32518 133822382 045840.0+693024050936.7+693822142.12 17.12 6.41 +1.11 +1.03 K1III +0.056-0.063 +.007-008 -1637 9 AurBD+51 1024 32537 25019 3675 045850.6+512754050640.6+513552157.06 6.51 5.00 +0.33 -0.01 +0.20 F0V -0.030-0.173 +.052-005SBO 14 4.4 90.1AC 5* -1638 11 OriBD+15 732 32549 942901140 V1032 Ori045851.2+151554050434.1+152415186.18-15.35 4.68 -0.06 -0.09 -0.02 A0pSi +0.016-0.034 +.018+017V 36 * -1639 BD+35 973 32608 576292379 045920.0+354756050600.9+355611169.53-03.00 6.52 +0.16 +0.09 A5V -0.011-0.010 +014 80 -1640 BD-14 1027 32612150109 045918.0-143038050352.0-142210214.33-30.21 6.41 -0.18 -0.77 B2.5IV -0.009+0.033 +016 -1641 10Eta AurBD+41 1058 32630 40026 185 1822 045930.0+410558050630.9+411404165.35 0.27 3.17 -0.18 -0.67 -0.17 B3V +0.029-0.068 +.022+007V? 132 * -1642 BD+19 847 32642 94306 3672 045938.3+194009050532.1+194823182.60-12.64 6.44 +0.21 +0.24 +0.14 A5m -0.009-0.022D+.008-017 53 0.6 1.1 -1643 BD+73 274 32650 54552387 BN Cam 045945.3+734904051222.4+735648138.39 19.58 5.43 -0.12?-0.36? B9pSi 0.000-0.025 +.024+009V 37 * -1644 BD+42 1170 32655 40029 045941.0+430218050649.6+431029163.84 1.49 6.20 +0.43 +0.30 F2IIp: +0.005 0.000 -014 =< 23 -1645 CD-24 2795 32667170029 045944.6-243137050353.3-242316225.40-33.70 5.61 +0.10 +0.07 0.00 A3m +0.024-0.028 +007SB 216 -1646 BD-03 998 326861317422378 045954.2-031041050454.5-030223202.96-25.00 6.05 -0.11 -0.53 B5IV +0.001-0.001 +027 * -1647 BD+64 500 32715 133882384 050000.8+644731050944.5+645510146.23 14.54 6.41 +0.40 -0.02 F6V -0.015-0.182 +.024+000V -1648 BD+00 939 32736112406 I W Ori 050013.8+010225050523.7+011039199.01-22.82 6.17 +3.45 +6.5 +1.48 C6II +0.012-0.007 +017V? * -1649 Eta1PicCD-49 1541 32743217140 W 050011.7-491734050248.6-490905255.64-37.63 5.38 +0.42 +0.01 F2V -0.044+0.024 +.055+021 0 7.6 10.4 -1650 BD+76 190 32781 5464 3738 1854 050030.1+762048051435.6+762822136.14 20.98 6.37 -0.02 -0.08 A0V -0.007-0.008 +007 34 4.5 1.5 * -1651 CD-41 1690 32820217153 050042.2-415317050354.0-414442246.33-37.15 6.31 +0.53 +0.04 F8V +0.027+0.152 +029 -1652 Gam1CaeCD-35 2089 32831195532 W Var? 050048.5-353711050424.4-352900238.60-36.23 4.55 +1.20 +1.20 +0.65 K3III +0.129-0.051 +.013-003V 4.1 3.0 * -1653 Gam2CaeCD-35 2090 32846195534 X Cae 050051.8-355039050426.1-354219238.87-36.26 6.34 +0.30 +0.08 F1III +0.028+0.038 +006 * -1654 2Eps LepBD-22 1000 32887170051 186I 1826 050113.6-223019050527.7-222216223.25-32.73 3.19 +1.46 +1.78 +0.81 K5III v+0.025-0.074 +.011+001 -1655 CD-26 2005 32890170050 050112.5-261714050516.2-260909227.54-33.91 5.73 +1.17 K2III +0.007-0.065 -003V? -1656104 TauBD+18 779 32923 94332 3701 050132.3+183039050727.0+183842183.83-12.94 5.00 +0.65 +0.14 G4V +0.537+0.016 +.061+020V? 2 0.1 0.1 * -1657 66 EriBD-04 1044 32964131777 3698 1831 050148.9-044721050645.7-043918204.78-25.35 5.12 -0.06 -0.17 -0.10 B9V+A1V +0.016+0.008 +.024+031SB2O=< 41 5.4 52.8 * -1658106 TauBD+20 885 32977 769712383 050153.2+201712050748.4+202506182.40-11.85 5.30 +0.09 +0.10 A5V -0.047-0.034 +.007-002V 95 * -1659103 TauBD+24 755 32990 76974 3709 050200.9+240759050806.6+241555179.25-09.56 5.50 +0.06 -0.57 B2V e 0.000-0.004 +016SBO 98 5.7 35.3AC 4* -1660105 TauBD+21 766 32991 76972 W 050156.6+213421050755.5+214217181.34-11.09 5.89 +0.19 -0.57 B2Ve +0.005-0.006 +017V 220 0.0 0.3 O 3* -1661 BD-13 1063 32996150149 050159.6-131525050636.7-130719213.32-29.10 6.05 -0.06 A0V +0.019+0.035 +040V? =< 41 -1662 13 OriBD+09 736 33021112436 W 050209.4+092059050738.3+092819191.77-18.00 6.17 +0.62 +0.10 G1IV -0.003-0.378 +.033-024V? =< 6 3.8 124.0AB 3* -1663 Eta2PicCD-49 1562 33042217164 187 1827 050222.5-494248050458.0-493440256.17-37.28 5.03 +1.49 +1.88 +0.91 K5III +0.071-0.003 +.009+036 * -1664 14 OriBD+08 866 33054112440 3711 050226.1+082205050752.9+082954192.67-18.48 5.34 +0.33 +0.10 +0.18 Am +0.024-0.065 +.004+006V 52 0.8 0.7 * -1665 BD-12 1076 33093150159 050245.6-123714050725.0-122926212.75-28.66 5.97 +0.60 F7V +0.140-0.080 +050V? =< 15 -1666 67Bet EriBD-05 1162 33111131794 188I W 1841 050255.9-051256050751.0-050511205.34-25.31 2.79 +0.13 +0.10 +0.08 A3III -0.095-0.081 +.050-009 179 8.0 116.7 * -1667 CP-54 768 331162338142381 050254.8-543233050500.6-542427262.23-37.07 6.27 +1.54 +1.90 M2III +0.002 0.000 +105 -1668 BD+46 970 33167 40077 050316.0+465019051042.9+465744161.20 4.29 5.68 +0.42 +0.02 F5V +0.055-0.147 +.027+033V * -1669 BD+37 1067 33203 57704 I 3734 050332.6+371028051018.9+371807168.95-01.49 6.02 +0.72 K3:+B2II: +0.004-0.006D+.002+009SB 0.1 1.5AB 3* -1670 BD+27 732 33204 769901141 3730A 050328.2+275413050945.1+280150176.38-07.06 6.01 +0.27 +0.04 +0.14 A5m +0.054-0.060D+.008+041 27 2.5 11.6AxBC 3* -1671 BD-08 1037 33224131806 3722A 050332.7-084742050820.2-083954208.95-26.83 5.78 -0.06 -0.37 B8V +0.005-0.012 +027V 3.2 21.6AB 3* -1672 16 OriBD+09 743 332541124671142 W 1849 050349.5+094204050919.6+094946191.69-17.46 5.43 +0.24 +0.16 +0.12 A2m +0.064-0.007 +.011+037SBO 15 4.5 168.0AC 3* -1673 68 EriBD-04 1056 33256131813 050346.2-043510050843.6-042722204.83-24.83 5.12 +0.44 -0.05 F2V +0.044+0.017 +.050+009 0 -1674 Zet DorCP-57 735 33262233822 189 050347.7-573633050530.6-572822266.04-36.72 4.72 +0.52 -0.04 +0.29 F7V -0.030+0.115 +.085-002 0 -1675 BD+61 766 33266 13409 050352.8+614333051303.2+615100149.07 13.14 6.17 +0.02 +0.08 A2III +0.011+0.006 -004 -1676 15 OriBD+15 752 33276 94359 W 050358.4+152811050942.0+153550186.74-14.21 4.82 +0.32 +0.19 +0.19 F2IV +0.002-0.013 +.004+030 53 * -1677 Bet MenCP-71 309 332852561542380 050400.4-712703050243.0-711852282.77-34.21 5.31 +1.00 +0.77 G8III -0.005+0.004 +.013-011 -1678 14 CamBD+62 734 33296 13413 050412.7+623405051331.3+624129148.38 13.65 6.50 +0.21 +0.12 A7Vn -0.036+0.006 -004SB -1679 69Lam EriBD-08 1040 33328131824 190 Lam Eri 050421.6-085256050908.8-084515209.14-26.69 4.27 -0.19 -0.90 -0.20 B2IVne v+0.002-0.004 -.003+003V 336 * -1680 CD-35 2126 33377195581 050441.1-355050050814.8-354306239.05-35.50 6.52 +1.08 +0.94 K1III +0.009+0.001 -005 -1681 BD-00 867 33419131834 050457.3-004125051003.2-003355201.28-22.67 6.10 +1.10 +1.07 K0III +0.001-0.053 +026 -1682 CP-78 165 33519256153 W 050535.9-782614050013.2-781801290.71-32.05 6.29 +1.51 +1.88 K5-M0III -0.023-0.012 +000 4.0 46.4 -1683 BD+73 280 33541 5483 050552.8+730912051813.3+731605139.23 19.59 5.74R A0V -0.005-0.033 +000SB2 65 -1684 BD+15 759 33554 943772391I 050556.8+155520051141.6+160244186.63-13.57 5.18 +1.49 +1.86 K5III +0.005+0.007 -006V? < 19: -1685 BD-02 1161 33555131847 050555.4-022227051058.0-021514203.00-23.29 6.25 +0.98 +0.81 K1-IVa +0.075-0.145 +064 -1686 BD+79 169 33564 5496 191 3864A 050604.1+790659052233.5+791352133.74 22.65 5.05 +0.47 -0.13 F6V -0.082+0.161 +.054-010 0 3.7 10.4AB 3* -1687 BD-02 1165 336081318522390 050617.1-023651051119.2-022927203.27-23.33 5.90 +0.46 +0.04 F5V +0.079+0.001 +031 =< 10 -1688 BD+59 857 33618 25088 050623.5+591715051511.3+592420151.30 11.99 6.15 +1.18 +1.23 K2III-IV +0.012-0.014 +003 -1689 11Mu AurBD+38 1063 33641 57755 192 050635.0+382158051325.7+382904168.35-00.30 4.86 +0.18 +0.09 +0.10 A4Vm -0.018-0.075 +.023+021V 86 -1690 BD+00 974 33647112505 3767 V1085 Ori050632.9+002331051141.4+003053200.48-21.79 6.67 -0.07 -0.32 -0.12 B9Vn +0.015+0.003 +020V 39 0.4 0.1 * -1691 BD+00 975 33646112509 3764 050635.8+005453051145.3+010213200.00-21.51 5.89 +0.66 +0.29 G5III -0.012-0.015D+.002-019 23 1.4 1.6 * -1692 BD+53 872 33654 250872393 050642.7+530543051444.3+531250156.46 8.45 6.20 +0.07 +0.05 A0V 0.000+0.001 +001V? 54 -1693 BD-12 1092 33664150206 I RX Lep 050642.8-115825051122.8-115057212.55-27.51 5.68 +1.46 +1.23 M6III +0.028+0.056 +046 * -1694 CD-26 2045 33667170151 050640.7-260205051044.5-255434227.69-32.67 6.41 +1.25 K1III -0.015+0.059 +042V -1695 CP-63 420 336842491982389 WZ Dor 050647.0-633132050734.0-632359273.25-35.61 5.2 +1.65 +1.85 +1.42 M3III +0.015-0.047 +.018+019 * -1696 3Iot LepBD-12 1095 33802150223 3778 050737.9-115921051217.9-115209212.67-27.32 4.45 -0.10 -0.40 -0.09 B8V +0.027-0.015 +025V 193 6.3 12.7 * -1697 BD-06 1109 33833131873 050754.6-061034051248.2-060326206.91-24.67 5.91 +0.96 +0.72 G7III +0.027-0.032 +023 -1698 17Rho OriBD+02 888 33856112528 I 3797 1872 050803.7+024432051317.5+025140198.52-20.27 4.46 +1.19 +1.16 +0.59 K0.5III +0.001-0.006 -.010+041SB1O < 17 3.9 6.9AB 3* -1699 CD-37 2071 33872195639 050808.5-373058051135.9-372343241.22-35.12 6.57 +1.62 +1.95 K5III +0.007+0.004 +001 -1700 CP-73 286 338752561602388 050809.9-731000050609.3-730216284.67-33.45 6.27 -0.01 +0.01 A1V +0.016+0.064 +008V -1701 BD+01 938 33883112535 3799 050819.8+015057051331.6+015805199.37-20.66 6.09 +0.42 +0.28 A5V +0.010+0.012D+.004+005 100 0.2 0.5AB 3* -1702 5Mu LepBD-16 1072 339041502371144 Mu Lep 050826.3-161925051255.9-161220217.25-28.91 3.31 -0.11 -0.39 -0.12 B9IIIpHgMn +0.043-0.026 +.023+028 12 * -1703 BD+00 988 33946112543 I W 1874 050838.7+002636051347.2+003337200.71-21.31 6.32 +1.46 +1.35 M0V +0.003-0.025 -011 -1704 BD-08 1059 33948131887 050844.8-081556051333.3-080852209.07-25.44 6.37 -0.13 -0.54 B5V +0.002 0.000 +025 -1705 4Kap LepBD-13 1092 33949150239 3800 050836.8-130335051313.9-125629213.88-27.55 4.36 -0.10 -0.37 -0.09 B9V -0.014-0.009 +.034+018V 124 2.7 2.6 * -1706 14 AurBD+32 922 33959 57799 3824A KW Aur 050853.5+323419051524.4+324116173.30-03.35 5.02 +0.23 +0.19 A9IVDel Del -0.024+0.014D+.007-010SBO 24 2.9 14.3AC 4* -1707 BD+53 882 34019 25112 I 3845 R Aur 050913.2+532826051717.8+533510156.37 8.97 6.5 +1.66 +0.27 M7IIIe +0.016-0.021 +008V 2.1 46.4 * -1708 13Alp AurBD+45 1077 34029 40186 193I 3841 1897 050918.0+455347051641.4+455953162.58 4.57 0.08 +0.80 +0.44 +0.44 G5IIIe+G0III v+0.076-0.425 +.073+030SB2O 0.5 0.0AP 10* -1709 BD+04 877 340431125562394I 1880 050925.0+050225051444.1+050922196.62-18.79 5.50 +1.37 +1.55 gK4 -0.001+0.004 -008 -1710 BD-14 1074 34045150255 050926.7-144324051359.9-143624215.69-28.05 6.21 +0.37 F2III -0.003+0.009 +031 67 -1711108 TauBD+22 864 34053 77057 W 050926.9+221013051527.7+221705181.88-09.32 6.27 +0.08 +0.14 A2V -0.008-0.011 -011SB 90 6.2 1.9 -1712 BD+34 980 34078 57816 3843 AE Aur 050941.7+341152051618.2+341843172.08-02.26 5.96 +0.22 -0.70 O9.5V e+0.008+0.030 -.004+059V 5 3.3 8.4AB 3* -1713 19Bet OriBD-08 1063 34085131907 194I 3823 1882 050943.9-081901051432.3-081206209.24-25.25 0.12 -0.03 -0.66 -0.02 B8Ia: e 0.000-0.001 +.013+021SB 33 6.5 9.5AB 4* -1714 BD+85 78 34109 873 050952.0+853516054348.7+854005127.54 25.79 6.60R A2V -0.016+0.002 -014 -1715 CD-35 2176 34167195669 1877 051013.4-355624051346.5-354932239.43-34.41 6.98 +1.47 K4III +0.036-0.051 -007 -1716 Xi MenCP-82 106 34172258395 917 051014.9-823615045850.9-822814295.23-30.47 5.85 +0.93 +0.64 G8-K0III -0.011+0.004 -005 -1717 BD-01 837 34180131917 051014.7-013127051518.4-012433202.76-21.93 6.15 +0.39 -0.03 F0IV -0.043+0.037 +014V 50: -1718 18 OriBD+11 756 34203 944262395 051030.7+111344051604.1+112029191.30-15.25 5.56 -0.04 -0.05 A0V -0.009-0.005 -008 67 -1719 15 CamBD+57 874 34233 25125 051050.1+580035051927.8+580702152.71 11.75 6.13 -0.03 -0.47 B5V +0.004-0.021 +007SB? * -1720 BD+62 742 34255 134602397I 051102.3+623249052022.6+623913148.85 14.29 5.61 +1.75 +2.00 K4I: -0.003-0.002 -006V -1721 CD-36 2127 34266195683 051056.5-360529051428.8-355838239.65-34.30 5.76 +1.01 G8III +0.016+0.004 +013V -1722 BD+42 1239 34269 40214 I PU Aur 051107.1+424101051815.9+424732165.38 2.95 5.48 +1.65 +1.62 M4III +0.038-0.023 +.007-038 * -1723 CD-27 2161 34310170238 051123.6-270319051524.3-265636229.22-31.97 5.07 -0.10 B9V +0.010-0.018 +029 111 -1724 BD+01 957 34317112588 051129.4+015012051641.1+015650199.81-19.99 6.42 -0.02 +0.01 -0.03 A0V e-0.011-0.009 -008V? 65 * -1725 BD+40 1240 34332 40224 051141.3+402126051840.4+402754167.33 1.68 6.18 +1.37 K0 +0.017-0.015 -017 -1726 16 AurBD+33 1000 34334 57853 I 3872 1909 051136.8+331602051810.7+332218173.07-02.48 4.54 +1.27 +1.27 +0.71 K2.5IIIbFe-1 +0.045-0.160 +.014-028SB1O < 17 5.8 4.2 * -1727 CP-52 677 34347233886 051133.9-520840051353.3-520152259.20-35.84 6.05 +1.39 +1.60 K3III -0.004-0.024 +034 -1728 17 AurBD+33 1002 34364 57858 AR Aur 051143.9+333934051818.9+334602172.77-02.23 6.14 -0.06 -0.18 B9.5V +0.012-0.030 +025SBO 58 * -1729 15Lam AurBD+39 1248 34411 402331145 3886 051206.3+400037051908.5+400557167.67 1.54 4.71 +0.63 +0.12 +0.32 G1.5IV-VFe-1 +0.519-0.664 +.066+066 2 4.9 146.6AD 6* -1730 CD-35 2199 34435195694 051211.5-350219051547.0-345536238.46-33.84 6.66 +0.15 +0.16 +0.08 A2III-IV -0.018+0.026 +020 -1731 BD-17 1069 34447150295 051221.4-171507051648.1-170830218.64-28.40 6.56 -0.16 B3IV -0.012+0.022 +012 -1732 BD+33 1008 34452 57884 IQ Aur 051225.1+333832051900.0+334454172.86-02.13 5.41 -0.19 -0.55 A0pSi v+0.011-0.025 +029SB? 53 * -1733 BD+44 1170 34498 40242 051246.5+441914052002.3+442532164.22 4.15 6.62R K0 +0.004-0.010 +013 -1734 18 AurBD+33 1010 34499 57893 3893 051247.8+335248051923.6+335908172.72-01.92 6.49 +0.24 +0.10 A7V +0.009-0.010 +007 120 5.3 3.8 -1735 20Tau OriBD-07 1028 34503131952 195 3877 051245.0-065709051736.4-065040208.28-23.96 3.60 -0.11 -0.47 -0.11 B5III -0.015-0.008 +.006+020SB 46 7.2 36.0AD 4 -1736 BD+46 998 34533 40251 3903 051311.5+465136052039.3+465750162.18 5.68 6.54 +0.60 +0.36 GIII+A2V +0.002-0.002 +017 2.9 23.2 * -1737 BD-13 1116 34538150304 1913 051304.6-133735051740.2-133111214.97-26.80 5.50 +0.93 +0.62 sgG9 -0.012-0.046 +075 -1738 BD+40 1253 34557 40248 051313.2+405900052014.8+410510166.99 2.28 5.52 +0.11 +0.05 A3V -0.002-0.058 +.011+022V? 200 -1739109 TauBD+21 816 34559 770972398I 051316.0+215935051916.6+220547182.54-08.70 4.94 +0.93 +0.69 G8III +0.012-0.083 +.010+019 < 17 -1740 19 AurBD+33 1013 34578 579062399 1925 051325.3+335113052000.9+335729172.81-01.83 5.03 +0.27 +0.42 A5II +0.001+0.002 -005 16 -1741 BD+19 893 34579 77098 3894 051319.6+200147051914.7+200805184.18-09.80 6.08 +1.01 +0.82 G8II-III+G1IV-V -0.039-0.027 +.015-047 3.5 9.0 * -1742 CP-52 683 34587233895 051320.4-521733051538.9-521055259.39-35.57 6.49 +1.21 K2III +0.022+0.027 +013 -1743 Omi ColCD-35 2214 34642195721 197 051352.6-345935051729.1-345343238.51-33.49 4.83 +1.00 +0.80 +0.55 K0IV +0.090-0.337 +.018+021V? -1744 The DorCP-67 401 34649249225 196 051349.9-671752051345.4-671107277.64-34.26 4.83 +1.28 +1.39 +0.63 K2.5IIIa +0.019+0.036 -.006+011V -1745 BD+77 195 34653 55352404 051401.7+775307052925.7+775839135.11 22.40 6.56 +0.14 +0.16 A7III +0.011-0.017 -016V 67 -1746 21 OriBD+02 916 34658112624 1922 051358.2+022932051911.2+023545199.54-19.12 5.34 +0.41 +0.09 F5II v-0.017-0.047 +.022+011V 72 * -1747 BD-18 1051 34721150326 3899 051423.5-181412051850.4-180748219.88-28.33 5.96 +0.58 +0.08 G0V +0.381+0.058 +.065+040SB 7.8 46.0AB 3* -1748 BD-01 859 34748131983 051431.3-013057051935.2-012444203.32-21.00 6.34 -0.11 -0.75 -0.14 B1.5Vn -0.007-0.006 +019SB 280 * -1749 20Rho AurBD+41 1162 34759 402692400 051443.6+414217052148.4+414816166.56 2.93 5.23 -0.15 -0.57 B3V +0.018-0.037 +013SBO 102 * -1750 BD+27 758 34762 77121 051442.5+275121052059.3+275726177.88-05.08 6.33 +0.04 -0.26 B9IV -0.013-0.016 +007SBO 125 2.0 0.0 * -1751 16 CamBD+57 879 34787 251612402 W 051454.2+572650052327.8+573240153.49 11.88 5.28 -0.03 -0.07 A0Vn +0.013-0.055 +.023+012SB 268 7.7 106.2 -1752 BD+29 869 34790 77124 051450.9+292806052112.7+293412176.57-04.12 5.76R +0.06 +0.13 A1V s +0.004+0.004 -019SB2O 53 0.4 0.0 * -1753 BD-18 1055 34798150335 3910A 051454.2-183726051917.5-183112220.34-28.36 6.36 -0.16 -0.59 B3V +0.012+0.010 +010 16 0.2 39.3 * -1754 BD-18 1056 34797150336 3910B TX Lep 051455.0-183648051918.3-183035220.33-28.36 6.54 -0.11 -0.44 B8/9III/IV +0.005-0.002 +015 72 0.2 39.3 * -1755 BD+19 902 34810 94478 051502.1+194247052056.6+194851184.68-09.64 6.18 +1.23 K0III -0.006-0.015 +000 -1756 6Lam LepBD-13 1127 348161503401146 051458.0-131648051934.5-131036214.83-26.24 4.29 -0.26 -1.03 -0.28 B0.5IV -0.001-0.003 +.000+020 67 * -1757 7Nu LepBD-12 1132 34863150345 051520.5-122505051959.1-121856214.00-25.79 5.30 -0.12 -0.40 B7IVnn -0.006+0.009 +016 370 -1758 CD-27 2204 34868170311 198 051524.5-272818051923.7-272208229.99-31.24 5.99 -0.04 A0V 0.000-0.010 +018 69 -1759 BD-05 1225 34880132004 3926 051531.5-052808052026.4-052200207.19-22.66 6.39 -0.03 -0.36 B8III -0.011+0.029 +020 50 4.7 4.4 * -1760 BD+40 1268 34904 40290 051548.8+405551052250.3+410146167.31 2.65 5.54 +0.12 +0.13 A3V -0.013+0.005 -009V 150 -1761 BD+03 857 34959112660 051602.9+035445052119.3+040043198.53-17.95 6.57 -0.09 -0.49 -0.04 B5Vp e-0.003-0.009 +005 300 * -1762 BD-21 1135 34968170327 3930 1940 051610.7-212025052026.9-211422223.35-29.07 4.71 -0.05 -0.11 -0.05 A0V v+0.005 0.000 +.002+030V 51 3.8 4.2 -1763 BD+08 933 349891126672401 051616.8+081946052143.6+082543194.62-15.61 5.80 -0.13 -0.88 -0.13 B1V +0.003-0.006 +026SB 57 * -1764 BD-00 929 35007132024 3941 051625.6-003057052131.8-002459202.64-20.09 5.68 -0.12 -0.65 -0.15 B3V -0.003+0.002 +007V 40 5.9 37.6AC 3* -1765 22 OriBD-00 930 350391320281147 051639.4-002852052145.7-002257202.63-20.03 4.73 -0.17 -0.79 -0.18 B2IV-V 0.000-0.001 +029SB1O 14 * -1766 CD-34 2198 35046195763 051644.5-344757052020.6-344156238.43-32.88 6.34 +0.33 +0.14 F2IV-V -0.007-0.004 -010 -1767 Zet PicCD-50 1723 35072233926 199 051654.8-504248051922.1-503622257.47-34.98 5.45 +0.51 +0.01 F7III-IV +0.028+0.224 +.023+045 -1768 22 AurBD+28 788 35076 77139 051702.8+285029052322.9+285612177.36-04.09 6.46 -0.04 -0.19 B9V s +0.019-0.030 +009V 70 -1769 BD-13 1135 35104150375 051716.0-135113052151.0-134522215.67-25.96 6.56 -0.09 -0.48 B8V +0.008-0.007 +014V -1770 23 OriBD+03 871 35149112697 3962A 051734.6+032654052250.0+033240199.16-17.86 5.00 -0.15 -0.86 -0.18 B1V -0.004-0.002 +018 295 2.2 31.9 * -1771 CD-24 3023 35162170351 I 3954A 051739.9-245212052146.2-244623227.30-29.95 5.06 +0.67 +0.16 G7II-III+A7IV-V -0.024-0.013 +.004+005 1.5 3.1AB 3* -1772 CD-34 2207 35165195770 W Var? 051739.5-342636052116.9-342043238.07-32.61 6.09 -0.19 -0.70 -0.14 B5IVnpe +0.009+0.001 +020V? 4.8 2.2 * -1773 21Sig AurBD+37 1175 35186 57981 I 3984 051751.3+371731052439.2+372308170.52 0.88 4.99 +1.42 +1.76 +0.53E K4III +0.001-0.008 +.003-019V < 19: 7.0 8.7AB 4* -1774110 TauBD+16 765 35189 94514 051751.1+163618052337.7+164158187.68-10.82 6.08 +0.14 +0.19 A2IV -0.029-0.017 +021SB -1775 BD+31 954 35238 57987 051811.6+310751052438.3+311326175.62-02.58 6.28 +1.24 K1III -0.043-0.009 +040SB -1776 BD+31 955 35239 57988 051811.8+310300052438.5+310835175.69-02.63 5.94 +0.04 -0.13 B9III -0.011-0.007 +005V 285 -1777 BD+05 905 35242112708 051811.7+051341052331.1+051921197.64-16.82 6.35 +0.12 +0.09 A2V -0.024-0.003 +009 * -1778 BD-08 1107 35281132053 3978 051830.7-083036052318.5-082457210.50-23.39 5.9 -0.03 -0.36 B8III +0.003-0.016D+.013+015V 119 1.7 6.0 * -1779 BD+34 1031 35295 57999 4000A 051834.0+344551052513.0+345119172.68-00.44 6.55 +1.11 +1.16 K1pIII-IV+F6V -0.007-0.039 -015 1.8 31.2 * -1780111 TauBD+17 920 35296 94526 W 051835.2+171726052425.4+172300187.20-10.29 4.99 +0.53 -0.07 F8V +0.246-0.009 +.067+037SB 16 2.9 85.7 * -1781 BD-00 936 35299132057 051835.4-001514052342.3-000935202.68-19.49 5.70 -0.21 -0.87 -0.19 B1.5V -0.009+0.003 +022V? 36 * -1782 BD-01 882 35317132060 3991 051846.1-005738052351.4-005202203.35-19.80 6.11 +0.50 +0.01 F7V -0.004-0.009D+.021+045SB2 0.0 2.7AxBC 3* -1783 8 LepBD-14 1119 35337150396 051855.6-140116052330.2-135538216.02-25.67 5.25 -0.21 -0.87? B2IV +0.002+0.004 +018V 23 -1784 29 OriBD-07 1064 35369132067 I 051907.7-075359052356.8-074829209.98-22.98 4.14 +0.96 +0.69 +0.50 G8IIIFe-0.5 -0.015-0.043 +.011-018V? < 17 -1785 CD-26 2185 35386170375 051910.8-264800052312.0-264221229.54-30.23 6.49 +0.50 F6V +0.029+0.009 +051V -1786 BD+02 947 35407112729 051923.4+021540052436.2+022110200.48-18.07 6.32 -0.15 -0.62 -0.16 B4IVn +0.011-0.007 -008SB 398 * -1787 27 OriBD-01 886 35410132070 I 051923.8-005914052428.9-005329203.46-19.68 5.08 +0.96 +0.69 G9III-IVFe-1 -0.005+0.132 +.021+020V? < 19: -1788 28Eta OriBD-02 1235 35411132071 4002 Eta Ori 051926.9-022921052428.6-022349204.87-20.39 3.36 -0.17 -0.92 -0.23 B1V+B2e +0.002 0.000 +.007+020SB2O 46 1.4 1.5AB 5* -1789 25Psi1OriBD+01 1005 354391127342406 V1086 Ori051933.3+014517052444.8+015047200.96-18.29 4.95 -0.20 -0.92 -0.22 B1Vpe +0.001+0.001 +019V 316 * -1790 24Gam OriBD+06 919 35468112740 201I W 1972 051946.0+061533052507.9+062059196.93-15.95 1.64 -0.22 -0.87 -0.22 B2III -0.009-0.014 +.029+018SB? 59 10.5 179.0 * -1791112Bet TauBD+28 795 35497 77168 202I W 051958.1+283123052617.5+283627177.99-03.74 1.65 -0.13 -0.49 -0.10 B7III +0.022-0.175 +.028+009V 71 33.4 * -1792 BD-17 1117 35505150416 052001.3-170400052428.4-165834219.25-26.64 5.65 0.00 A1V +0.015-0.027 +022 89 -1793 CD-39 1940 355151958072405 SW Col 052005.9-394616052324.0-394043244.40-33.22 5.71 +1.62 M1III +0.028+0.003 +061 * -1794 BD+35 1102 35519 580292408I 052013.2+352210052654.3+352726172.38 0.18 6.15 +1.45 +1.68 K2 -0.018-0.011 -021 * -1795 BD+34 1040 35520 58028 052011.3+341814052648.9+342330173.25-00.43 5.94 +0.14 +0.21 A0III +0.007-0.011 +008 95 * -1796 BD+33 1045 35521 58030 052017.4+331028052651.3+331546174.19-01.05 6.15 +1.15 K0 +0.013 0.000 -009 -1797 CD-37 2176 35528195809 052012.1-372544052339.0-372012241.66-32.75 6.82 +1.04 K1III +0.034+0.008 +030 -1798113 TauBD+16 775 35532 94543 052018.9+163641052605.7+164201188.00-10.32 6.25 -0.08 -0.63 B2Vn -0.009-0.003 +031 -1799 BD-10 1178 35536150420 I 052018.5-102508052501.6-101945212.58-23.84 5.61 +1.56 +1.79 K5III -0.017-0.022 +057 -1800 BD-00 945 35548132086 4020 052025.1-003800052531.2-003239203.26-19.28 6.57 -0.05 -0.18 B9pHgSi +0.012-0.007D+.002-009V? 5 0.6 0.2 * -1801 Kap PicCP-56 840 355802339522403 052031.5-561342052222.1-560804264.19-34.51 6.11 -0.10 B8-9V -0.005+0.020 -005V? -1802 17 CamBD+62 759 35583 13518 203I 2003 052043.3+625901053010.2+630402149.08 15.46 5.42 +1.71 +2.00 +0.94E M1IIIa -0.006-0.005 -019V? -1803 BD+00 1056 35588112752 1975 052038.5+002552052547.0+003115202.31-18.71 6.16 -0.18 -0.75 -0.20 B2.5V -0.005+0.019 -024SBO 150 * -1804 BD+30 898 35600 58040 052044.2+300718052708.3+301231176.76-02.70 5.74 +0.16 -0.18 B9Ib +0.008-0.010 +017 * -1805 24Phi AurBD+34 1048 35620 58051 I W 052101.0+342327052738.9+342833173.28-00.24 5.07 +1.40 +1.67 +0.47E K3IIICN+2 -0.003-0.047 +.009+031V < 17 3.2 206.8AD 4* -1806 BD-05 1247 35640132100 052107.8-053624052602.4-053106208.02-21.49 6.23 -0.06 -0.23 -0.05 B9.5Vn +0.013+0.008 +018V 280 * -1807 BD+06 923 35656112767 052115.6+064656052638.8+065209196.66-15.36 6.42 -0.02 -0.04 A0Vn +0.003-0.012 +013V? 118 -1808115 TauBD+17 928 35671 945541148 4038 052120.0+175235052710.1+175744187.07-09.42 5.42 -0.10 -0.53 B5V +0.005-0.022 +018V? 155 1.2 0.1 O 4* -1809 BD+15 822 35693 94556 052130.7+151018052713.8+151528189.39-10.86 6.16 +0.08 +0.14 A1IV -0.014-0.002 +025 68 -1810114 TauBD+21 847 35708 77184 4048 052137.6+215106052738.1+215613183.75-07.17 4.88 -0.15 -0.76 -0.15 B2.5IV +0.002-0.007 +013V? 24 0.0 0.1 O 5* -1811 30Psi2OriBD+02 962 35715112775 4039 Psi Ori 052135.8+030033052650.2+030544200.09-17.22 4.59 -0.21 -0.93 -0.22 B2IV +0.002-0.004 -.016+012SB2O 141 5.6 2.7AB 3* -1812 BD-19 1173 35736150442 4034A 052139.8-194657052559.8-194144222.23-27.31 5.89 +0.40 -0.05 F2V +0.004-0.022 +006V 2.8 27.0 * -1813 CD-44 2036 357652173252407 052156.8-441852052455.6-441333249.84-33.58 6.08 +1.20 K1III +0.003+0.005 +015 -1814116 TauBD+15 826 35770 94566 052200.8+154723052745.6+155227188.93-10.42 5.50 +0.01 -0.05 B9.5Vn +0.006-0.022 +016V 260 -1815 CP-81 134 357982584053976 052206.7-813847051225.7-813230294.02-30.39 6.51 +1.11 +1.01 K1III +0.011+0.050 +019SB2 -1816117 TauBD+17 931 35802 94573 I 052213.2+170921052801.6+171420187.79-09.64 5.77 +1.63 +2.01 M1III +0.020-0.049 -023V? -1817 BD-12 1169 358501504612409 052225.2-115906052704.8-115403214.37-24.04 6.35 +0.51 +0.01 dF7 +0.019-0.049 +019V? -1818 The PicCP-52 718 35860233965 W 052230.1-522413052446.2-521859259.56-34.18 6.27 +0.07 +0.07 A0V -0.012-0.031D+.004-003SB2 0.5 38.2AC 3* -1819 BD+13 903 35909 94580 052255.3+133547052834.8+134044190.93-11.42 6.35 +0.15 +0.14 A4V +0.014-0.018 +025V? 153 -1820 BD+01 1021 35912112794 052251.2+011252052801.6+011754201.88-17.84 6.41 -0.18 -0.74 -0.18 B2V +0.018+0.003 +034 32 * -1821118 TauBD+25 839 35943 77201 4068A 2009 052307.1+250410052916.5+250902181.25-05.10 5.47 -0.04 -0.14 B8.5V +0.010-0.032D+.014+015V? 133 0.8 4.8AB 3* -1822 BD+29 909 35984 77205 052319.3+290624052940.6+291111177.92-02.81 6.24 +0.45 +0.01 F6III +0.022-0.054 +013V 39 -1823 BD-21 1174 35991170445 052320.8-212737052736.5-212232224.15-27.56 6.07 +1.04 +0.86 +0.35E gG7 +0.013+0.036 +034 * -1824 BD+41 1206 36040 403872412 052344.6+412302053048.6+412743167.79 4.13 6.00 +1.11 +1.12 K0IIIp +0.002-0.035 +014 * -1825 BD+39 1322 36041 58129 W 052347.4+394452053045.1+394933169.15 3.23 6.37 +0.97 +0.76 G9III +0.021-0.041 +012 1.3 75.4 * -1826 BD-03 1115 36058132157 4078 052357.3-032318052856.7-031827206.28-19.83 6.39 -0.01 -0.06 A0Vn -0.035-0.015D+.003+005 142 0.3 0.8 * -1827 CD-41 1884 360602173401149 W 052352.7-410148052705.3-405637246.03-32.73 5.87 +0.23 +0.18 +0.12 A7m +0.011+0.096 +036 8.7 20.3 -1828 18 CamBD+57 889 36066 252411150 2058 052359.8+570902053233.8+571316154.43 12.76 6.48 +0.57 +0.12 F8V +0.113-0.222 +.012+037V? =< 10 -1829 9Bet LepBD-20 1096 36079170457 204I 4066 2008 052357.6-205021052814.7-204534223.56-27.20 2.84 +0.82 +0.46 +0.44 G5II -0.004-0.089 +.020-014V? 11 4.5 2.6AB 5* -1830 BD-03 1116 36134132170 2022 052424.5-033134052923.6-032647206.46-19.80 5.79 +1.15 +1.02 +0.57 K1-III -0.044-0.008 +023V -1831 BD+22 925 36160 77220 052441.1+222305053043.4+222745183.70-06.29 6.29 +1.18 +1.15 K0 +0.043-0.016 +002 -1832 BD+15 837 36162 94596 052442.7+151659053026.1+152137189.72-10.15 5.94 +0.14 +0.14 A3Vn -0.027-0.050 -016V? 230 -1833 BD+01 1032 36166112830 052443.3+014237052954.8+014721201.67-17.19 5.78 -0.20 -0.84 -0.20 B2V +0.008-0.004 +012V 175 * -1834 31 OriBD-01 913 36167132176 I 4097 CI Ori 052439.2-011015052944.0-010532204.31-18.62 4.71 +1.57 +1.85 +0.69E K5III +0.004-0.023 +.006+008SB < 19: 5.4 12.5 * -1835 CD-37 2220 36187195887 052448.5-371850052815.3-371350241.75-31.83 5.57 +0.02 +0.03 A1V +0.009+0.074 +050 -1836 Lam DorCP-59 472 361892339812410 052451.5-585948052619.3-585445267.52-33.87 5.14 +1.00 +0.48 G6III -0.008+0.028 +.012+010 -1837 BD+04 949 36217112837 CK Ori 052502.8+040738053019.8+041215199.53-15.91 6.21 +1.27 +1.38 +0.47E K2IIIe v+0.002-0.048 +015 * -1838 CD-30 2421 36255195898 052516.2-301147052906.7-300700233.75-29.96 6.75 +1.06 G8/K0III -0.003+0.014 +059V -1839 32 OriBD+05 939 36267112849 4115 052525.9+055219053047.1+055653198.02-14.94 4.20 -0.14 -0.55 -0.14 B5V +0.012-0.034 +.005+019V? 176 1.3 0.9 * -1840 BD-07 1099 36285132192 052530.7-073045053020.7-072605210.38-21.39 6.33 -0.19 -0.83 -0.17 B2IV-V -0.013+0.001 +011 10 * -1841 NOVA 1891 T Aur * -1842 33 OriBD+03 948 36351112861 4123 052559.6+031258053114.5+031732200.48-16.17 5.46 -0.18 -0.83 -0.20 B1IV+B1.5V +0.001+0.003D+.001+020V? 38 1.0 1.9AB 3* -1843 25Chi AurBD+32 1024 36371 581641151 052613.0+320705053243.7+321131175.77-00.61 4.76 +0.34 -0.46 +0.27 B5Iab -0.002-0.003 -000SBO 41 * -1844 BD+74 252 36384 5593 205I 2337 052620.9+745840053943.7+750238138.26 21.71 6.17 +1.57 +1.95 M0III -0.008+0.025 -003V? -1845119 TauBD+18 875 36389 94628 I CE Tau 052620.9+183112053212.8+183540187.18-08.07 4.38 +2.07 +2.21 +1.44 M2Iab-Ib e+0.002-0.001 +.002+023V? * -1846 BD+41 1218 36404 40426 052621.7+420210053328.7+420632167.51 4.90 6.55 -0.02 -0.27 B9IIIp:Hg: -0.001-0.001 +001 -1847 BD+16 794 36408 94630 4131A 052626.3+165903053214.2+170329188.50-08.88 5.46R -0.04 -0.23 B7IIIe -0.002-0.009D+.009+015SB 55 0.4 9.6 * -1848 BD-06 1207 36430132210 052629.2-064701053120.9-064230209.80-20.85 6.22 -0.17 -0.74 -0.17 B2V +0.010 0.000 +023 25 * -1849 10 LepBD-20 1105 36473170506 052650.8-205615053107.6-205149223.94-26.61 5.55 0.00 +0.03 A0V +0.005-0.044 +.016-011 60 -1850 BD+32 1028 36484 58179 052654.8+324350053327.5+324804175.34-00.15 6.48 +0.09 +0.17 0.00 A2m +0.008-0.063 +034SB -1851 34Del OriBD-00 982 36485132221 4134C 052653.8-002130053200.5-001704203.84-17.73 6.85 -0.16 -0.71 B2V +0.009-0.004 +.014+021V 77 4.6 51.7AC 3* -1852 34Del OriBD-00 983 36486132220 206I 4134A Del Ori 052653.8-002223053200.4-001757203.86-17.74 2.23 -0.22 -1.05 -0.22 O9.5II +0.001-0.002 +.014+016SBO 152 4.6 51.7AC 3* -1853 BD+66 401 36496 13548 W 052701.6+663746053716.2+664146146.14 17.87 6.26 A8Vn -0.010-0.031 -015V? 209 0.8 0.3 -1854 BD+34 1083 36499 58182 052659.2+343915053338.0+344333173.74 0.93 6.27 +0.15 +0.17 A3IV -0.038-0.008 -006SB 100 -1855 36Ups OriBD-07 1106 36512132222 052705.5-072231053155.8-071805210.44-20.98 4.62 -0.26 -1.07 -0.26 B0V -0.001-0.005 +017V 20 * -1856 CD-47 1884 365532173681152 W 052724.5-470858053009.5-470440253.35-32.98 5.46 +0.62 +0.21 G3IV +0.025-0.137 +016 1.0 197.1AD 4 -1857 19 CamBD+64 536 36570 13550 4177 052734.2+640523053715.1+640917148.49 16.68 6.15 +0.01 -0.07 A0V +0.003-0.070 +.007-012 55 4.0 1.6 * -1858120 TauBD+18 877 36576 94649 V960 Tau 052739.9+182808053331.6+183225187.39-07.84 5.69 +0.01 -0.76 B2IV-Ve -0.002 0.000 +041V 271 * -1859 CP-68 375 36584249281 W 052731.3-684206052700.0-683722279.07-32.78 6.03 +0.34 +0.03 +0.21C F0IV-V +0.001-0.019D+.012-002 0.2 1.1 -1860 BD+20 989 36589 77255 2132 052742.1+202412053338.8+202827185.76-06.78 6.18 -0.07 -0.39 B6V -0.004-0.012 +027V 90 -1861 BD-01 935 36591132234 4141 2107 052737.7-013951053241.3-013531205.14-18.20 5.35 -0.19 -0.94 -0.19 B1IV -0.001-0.009 +034 29 4.5 2.0 * -1862 Eps ColCD-35 2348 365971959242413I 052739.7-353237053112.7-352814239.89-30.88 3.87 +1.14 +1.08 +0.60 K1IIIa +0.022-0.035 +.008-005V -1863 BD-01 939 36646132247 4150 2131 052804.0-014719053307.2-014306205.31-18.17 6.46 -0.09 -0.60 -0.12 B4Vn -0.025-0.040D+.002+037 196 1.8 1.5AB 4* -1864 35 OriBD+14 947 36653 946522414 052813.2+141408053354.3+141820191.08-09.99 5.64 -0.14 -0.62 B3V -0.001-0.009 +019V 224 -1865 11Alp LepBD-17 1166 36673150547 207I 4146 2128 052819.1-175338053243.8-174920220.95-25.14 2.58 +0.21 +0.23 +0.21 F0Ib +0.001+0.002 +.007+024 13 8.5 35.8AB 3* -1866 BD+54 914 36678 252762416I 052822.6+542144053635.2+542544157.19 11.82 5.73 +1.63 +1.98 M0III -0.013-0.002 +001 -1867 CP-62 479 36689249288 052822.6-622321052917.4-621852271.57-33.29 6.59 +1.53 +1.85 K4-5III +0.010-0.023 +014V -1868 BD-01 943 36695132255 VV Ori 052826.8-011335053331.4-010922204.84-17.81 5.34 -0.18 -0.90 -0.20 B1V -0.004 0.000 +022SB1O 168 * -1869 BD+47 1178 36719 404662417 052842.7+473857053615.9+474255163.00 8.30 6.11 +0.26 +0.15 dF0 +0.012-0.018 +014V 67 -1870 CD-46 1892 36734217382 052845.5-455955053136.1-455531252.02-32.61 5.86 +1.35 +1.54 K3III +0.028+0.038 +007 -1871 BD+01 1058 36741112901 052847.0+012018053357.6+012428202.53-16.49 6.59 -0.17 -0.79 -0.21 B2V +0.009+0.004 +014 198 * -1872 38 OriBD+03 964 36777112904 W 052900.9+034155053416.7+034601200.43-15.27 5.36 +0.05 +0.07 +0.04 A2V -0.031-0.018 +.014-004V 145 0.4 * -1873 BD-01 949 36779132269 4159 052858.9-010617053403.9-010208204.79-17.64 6.22 -0.17 -0.81 -0.18 B2.5V +0.007+0.001 +004 227 4.8 27.5 * -1874 BD-01 950 36780132270 I 052900.2-013219053404.0-012814205.20-17.84 5.93 +1.55 +1.88 K5III -0.012-0.033 +091 -1875121 TauBD+23 954 36819 772852415 Var? 052920.6+235824053527.1+240222182.95-04.52 5.38 -0.09 -0.62 B2.5IV +0.010-0.024 +023SB 117 * -1876 37Phi1OriBD+09 877 36822112914 208 S 052919.8+092519053449.2+092922195.40-12.29 4.41 -0.16 -0.97 -0.17 B0III +0.002-0.004 +.000+033SBO 39 * -1877 CD-38 2085 36848195948 052929.3-383459053251.3-383047243.44-31.20 5.48 +1.22 +1.34 K2III +0.040-0.002 -.008-001 -1878 BD+27 806 36859 77295 I 052938.8+273550053555.5+273944179.95-02.48 6.27 +1.54 +1.65 K0 -0.025-0.039 -009SB -1879 39Lam OriBD+09 879 36861112921 I 4179A 2240 052937.7+095202053508.3+095603195.05-12.00 3.54 -0.18 -1.03 -0.17 O8III((f)) 0.000-0.006 +.007+034 66 2.0 4.4AB 4* -1880 39Lam OriBD+09 879 36862 4179B 2240 052937.9+095205053508.5+095606195.05-12.00 5.61 +0.04 -0.77 B0.5V +0.001-0.006 +.007+036V? 125 2.0 4.4AB 4* -1881 CD-35 2367 36874195952 2158 052932.7-351229053307.4-350823239.62-30.42 5.78 +1.07 +1.00 K0III +0.097-0.041 +015V? -1882 CP-64 452 36876249297 W 052939.7-640008053015.9-635540273.48-33.04 6.19 +0.22 +0.16 F0IV +0.009+0.054 +011 5.1 9.2 -1883 BD+10 818 36881 94671 4181 2251 052942.0+101025053513.4+101424194.79-11.82 5.60 +0.12 -0.07 B9IIIpHg:Mn: +0.022-0.008 +035V 15 4.2 2.9 * -1884 BD+40 1346 36891 40481 052953.1+400704053652.4+401056169.49 4.41 6.09 +1.03 +0.69 G3Ib+F -0.002-0.010 -018SB? -1885 BD+85 80 36905 9141638 052954.5+850850060120.2+851056128.17 25.99 6.11 +1.57 +1.90 M0III +0.011 0.000 -046V -1886 BD-06 1233 36959132298 4182B 2261 053007.7-060433053500.9-060033209.57-19.72 5.67 -0.23 -0.91 -0.21 B1V v-0.011 0.000 +.005+030V? 26 0.9 36.2 * -1887 BD-06 1234 36960132301 4182A 053009.3-060407053502.7-060007209.56-19.71 4.78 -0.25 -1.02 -0.25 B0.5V +0.004+0.002 +.005+028V? 38 0.9 36.2 * -1888 CD-29 2348 36965170561 053000.8-295502053352.1-295056233.78-28.90 6.53 -0.02 A0V +0.014+0.021 +015 -1889 BD+25 879 36994 77310 053018.2+255230053630.2+255622181.47-03.30 6.49 +0.43 F5III +0.014+0.003 +003 76 -1890 BD-04 1183 37017132317 V1046 Ori053025.0-043336053521.8-042936208.18-18.96 6.56 -0.13 -0.77 -0.13 B1.5V -0.011+0.030 +029SB1O 85 * -1891 BD-04 1184 37016132319 W 053025.3-042924053522.5-042531208.11-18.92 6.24 -0.15 -0.70 -0.17 B2.5V +0.022-0.027 +031 0.7 0.2 * -1892 42 OriBD-04 1185 37018132320 I 4187 2318 053027.1-045414053523.2-045018208.50-19.11 4.59 -0.19 -0.94 -0.18 B1V +0.004 0.000 +.006+030SB 71 3.2 1.5 * -1893 41The1OriBD-05 1315 37020 4186A V1016 Ori053021.0-052712053515.9-052314209.01-19.38 6.73 +0.02 -0.88 +0.21 B0.5V +0.005+0.002 +.001+032SBO 112 0.1 117.0 * 12* -1894 41The1OriBD-05 1315 37021 4186B BM Ori 053021.3-052704053516.1-052307209.01-19.38 7.96 +0.24 -0.49 B0V +0.005+0.002 +.001+024SBO 222 0.1 117.0 * 12* -1895 41The1OriBD-05 1315 37022132314 I 4186C 2294 053021.7-052720053516.5-052323209.01-19.38 5.13 +0.02 -0.95 +0.18 O6p v+0.004+0.002 +.001+033SB? 127 0.1 117.0 * 12* -1896 41The1OriBD-05 1315 37023 4186D 2295 053022.5-052714053517.3-052316209.01-19.38 6.70 +0.09 -0.71 +0.20 B0.5Vp +0.005+0.002 +.001+031SB 109 0.1 117.0 * 12* -1897 43The2OriBD-05 1319 37041132321 I: 4188A 2320 053028.2-052854053522.9-052458209.05-19.37 5.08 -0.09 -0.94 O9.5Vp e+0.001+0.005 -.001+036SBO 170 0.1 117.0 * 12* -1898 BD-04 1186 37040132325 4192 053033.9-042546053531.1-042153208.07-18.86 6.38 -0.14 -0.74 -0.16 B2.5IV +0.002-0.021 +030 140 2.0 4.2 * -1899 44Iot OriBD-06 1241 37043132323 209I 4193 2334 053032.4-055832053526.0-055436209.52-19.58 2.77 -0.24 -1.08 -0.20 O9III e 0.000+0.001 +.025+022SB2O 130 4.5 11.4AB 3* -1900 BD-03 1146 37055132332 W 2350 053036.1-031905053535.8-031510207.04-18.33 6.40 -0.12 -0.63 -0.13 B3IV -0.008 0.000 +024 6.2 1.1 * -1901 45 OriBD-04 1188 37077132336 4196 053043.5-045517053539.5-045121208.55-19.06 5.26 +0.24 +0.15 +0.14 F0III +0.009+0.011 +.026-009V 66 9.0 19.1AC 3* -1902 BD+26 870 37098 77322 4208 2426 053054.0+265143053708.8+265527180.72-02.65 5.83 -0.07 -0.39 B9IV-V +0.011-0.025D+.007+010V 0.1 1.1AB 4* -1903 46Eps OriBD-01 969 37128132346 210I W Eps Ori 053108.3-011557053612.8-011207205.21-17.24 1.70 -0.19 -1.04 -0.17 B0Ia e+0.001-0.002 -.002+026SB 87 8.7 179.9 * -1904 BD+33 1102 37138 58263 053110.3+332950053745.7+333333175.19 1.02 6.33 +1.31 K0 +0.003 0.000 +029 -1905122 TauBD+16 822 37147 94700 053115.4+165843053703.8+170225189.12-07.91 5.54 +0.22 +0.10 +0.12 F0V +0.045-0.031 +.029+041 114 * -1906 BD-05 1334 37150132351 2416 053120.9-054241053615.0-053853209.37-19.28 6.54 -0.18 -0.81 B3V v 0.000-0.004 +011 * -1907 40Phi2OriBD+09 898 37160112958 I 053124.7+091411053654.3+091726195.84-11.95 4.09 +0.95 +0.64 +0.55 K0IIIbFe-2 +0.091-0.305 +.030+099 * -1908 BD+10 828 37171 947022420I 053130.8+105823053704.4+110206194.33-11.02 5.94 +1.58 +1.91 +0.94 K4III +0.051-0.018 -111SB -1909 CD-33 2414 37192195986 053134.4-330851053515.4-330448237.44-29.49 5.78 +1.12 K2IIIa +0.020+0.109 +044 -1910123Zet TauBD+21 908 37202 77336 211I D Zet Tau 053140.0+210454053738.7+210833185.69-05.64 3.00 -0.19 -0.67 -0.10 B4IIIpe v 0.000-0.021 +.008+020SB1O 310 2.0 0.0 * -1911 BD-06 1255 37209132359 4212 2433 053142.5-060739053635.7-060354209.81-19.39 5.72 -0.22 -0.91 -0.25 B1V -0.005-0.012 +028SB 50 3.2 5.2 * -1912 CP-54 854 372262340262419 W 053145.3-545807053344.4-545408262.70-32.91 6.43 +0.55 F8V +0.072+0.011 +038 3.6 54.7AB 3* -1913 BD+08 1016 37232112966 053151.1+085325053719.3+085707196.20-12.03 6.12 -0.17 -0.83 B2IV-V +0.001-0.001 +042 120 * -1914 26 AurBD+30 963 37269 58280 4229 2485 053212.7+302559053838.1+302933177.88-00.47 5.40 +0.45 +0.25 F9III+B9.5V -0.019-0.009D+.005+002SB 0.3 0.2AB 4* -1915 CD-28 2298 37286170587 053215.6-284614053610.3-284228232.71-28.09 6.26 +0.13 +0.05 +0.05 A2/3III/V: +0.023 0.000 +022 -1916 BD+65 485 37289 135702426I 053225.0+653837054226.4+654152147.32 17.88 5.60 +1.24 gK5 -0.006-0.018 -019V -1917 CP-64 456 372972493092418 053226.8-641737053259.6-641339273.80-32.72 5.34 +1.04 +0.85 G8-K0III +0.041-0.010 +.010+010SBO * -1918 BD-06 1262 37303132375 2467 053233.8-055956053727.4-055618209.79-19.15 6.05 -0.22 -0.93 -0.25 B1V v+0.015+0.002 +029 260 * -1919 BD-11 1238 373061506172421 053229.0-115010053708.8-114632215.37-21.75 6.11 +0.05 A2V +0.020-0.020 +024V? -1920 BD+07 953 37320112979 053236.2+072855053801.1+073229197.53-12.59 5.88 -0.07 -0.37 B8III +0.007-0.017 +019V? 35 -1921 BD+26 884 37329 77350 D 053243.3+263335053857.4+263704181.19-02.47 6.37R G9III +0.024-0.018 +015 * -1922 Bet DorCP-62 487 37350249311 212 Bet Dor 053245.4-623319053337.5-622923271.73-32.77 3.76 +0.82 +0.55 +0.43 F6Ia v+0.002+0.009 +.012+007V 0 * -1923 BD-04 1196 37356132387 2483 053257.3-045225053753.4-044849208.78-18.54 6.19 -0.04 -0.72 -0.05 B2IV-V +0.004+0.021 +029 10 * -1924 BD+29 947 37367 77354 053256.7+290927053918.4+291255179.04-01.03 5.96 +0.16 -0.50 B2IV-V +0.012-0.004 +020SB 2.0 0.0 * -1925 BD+53 934 37394 25319 W 053313.4+532626054120.3+532852158.38 11.95 6.23 +0.84 +0.51 +0.43 K1V +0.002-0.518 +.081+002V 2.8 688.0AD 5* -1926 Nu 1ColCD-27 2389 37430170601 053319.4-275547053716.5-275217231.89-27.60 6.16 +0.34 F0IV +0.014-0.061 +027 -1927 CD-47 1940 37434217422 TX Pic 053319.7-472230053602.7-471850253.76-32.01 6.11 +1.16 K2III+F -0.014-0.017 +016SB2 -1928125 TauBD+25 902 37438 773602424 D 053332.3+255028053944.2+255349181.90-02.71 5.18 -0.15 -0.68 B3IV +0.012-0.024 +015SBO 65 2.0 0.0 3* -1929 BD+21 918 37439 77358 053326.7+214224053927.0+214546185.38-04.95 6.34R +0.06 +0.10 A1Vn -0.004-0.036 +015SB2 180 -1930 CP-58 526 37462234037 053335.6-585603053502.4-585216267.43-32.74 6.75 +1.45 +1.80 K4III -0.035+0.017 +032 -1931 48Sig OriBD-02 1326 37468132406 4241AB 053343.5-023928053844.8-023600206.82-17.34 3.81 -0.24 -1.01 -0.24 O9.5V +0.002+0.001 +.007+029SB 94 0.8 0.2AB 5* -1932 BD-02 1327 37479132408 4241E V1030 Ori053345.9-023907053847.1-023539206.82-17.32 6.65 -0.19 -0.86 B2Vp v-0.018+0.012 +.007+029 0.8 0.2AB 5* -1933 BD-06 1275 37481132405 053346.0-063754053837.8-063426210.53-19.17 5.96 -0.23 -0.92 B1.5IV -0.015+0.003 +015V 105 * -1934 47Ome OriBD+04 1002 374901130012423 Ome Ori 053354.3+040352053911.1+040717200.73-14.03 4.57 -0.11 -0.76 -0.10 B3IIIe v+0.001-0.003 +022 194 * -1935 Nu 2ColCD-28 2321 37495170613 053350.3-284458053744.6-284122232.81-27.75 5.31 +0.46 +0.10 F4V -0.034+0.052 +.047+036V 31 -1936 CP-61 488 37501249314 053351.8-611415053457.6-611033270.16-32.69 6.32 +0.85 G5IV +0.006-0.022 +008 -1937 49 OriBD-07 1142 37507132411 053402.7-071607053853.1-071247211.16-19.40 4.80 +0.13 +0.11 +0.06 A4V -0.012-0.053 +.042-001SBO 170 * -1938 BD+31 1048 37519 583192425 2537 053407.6+311813054035.9+312129177.37 0.35 6.04 +0.04 -0.21 +0.05 B9.5III-IVp: -0.007-0.020 -007 250 -1939 BD+31 1049 37536 58322 I NO Aur 053411.9+315157054042.1+315515176.90 0.67 6.11 +2.12 +2.22 +1.42 M2IIIS +0.010+0.006 +005 * -1940 BD-03 1166 37594132424 053432.2-033714053931.2-033353207.81-17.61 6.00 +0.27 +0.01 A8V s -0.002-0.003 +022 -1941 24 CamBD+56 1050 37601 25333 053432.7+563145054301.6+563454155.74 13.68 6.05 +0.95 +0.73 K0III +0.014+0.031 -029V? -1942 BD-09 1197 37635132425 053446.2-094543053930.8-094224213.62-20.35 6.50 -0.10 -0.48 B7V +0.008-0.014 +021 * -1943 23 CamBD+61 816 37638 13590 053456.6+612537054408.6+612836151.34 16.12 6.15 +0.90 gG5 -0.005+0.001 -004V? -1944 BD-17 1199 37643150652 4254 053451.8-175419053916.3-175058221.62-23.71 6.38 -0.12 -0.40 B7V +0.001+0.003 +021V 1.5 0.6AB 9* -1945 BD+29 953 37646 77393 4262A 053458.4+292607054121.0+292915179.04-00.50 6.43 -0.11 -0.39 B8IV +0.019-0.029 +018SB 200 0.4 26.1 * -1946126 TauBD+16 841 37711 94759 4265 2560 053530.9+162856054117.7+163202190.09-07.31 4.86 -0.13 -0.63 -0.12 B3IV +0.008-0.018 +.014+021SB? 97 0.4 0.4 * -1947 CD-40 1999 37717217450 053530.8-404548053843.6-404227246.21-30.52 5.82 -0.09 B8V -0.005+0.009 +004 -1948 50Zet OriBD-02 1338 37742132444 I 4263A 2553 053542.7-015943054045.5-015634206.45-16.59 2.05H -0.21 -1.07 -0.20 O9.7Ib e+0.003-0.002 +.024+018SB 140 2.2 2.4AB 3* -1949 50Zet OriBD-02 1338 37743 I 4263B 2553 053542.7-015943054045.6-015634206.45-16.59 4.21H B0III +0.004-0.002 +.024+013SB 2.2 2.4AB 3* -1950 BD-02 1337 37744132441 053536.5-025242054037.3-024930207.25-17.03 6.22 -0.20 -0.88 B1.5V +0.008+0.010 +029 35 * -1951 BD+23 1007 37752 77413 053550.0+231631054154.6+231935184.35-03.65 6.59 -0.06 -0.53 B8p -0.016-0.014 +026 * -1952 BD-01 1004 37756132445 2556 053546.0-011053054050.6-010744205.71-16.19 4.95 -0.21 -0.84 B2IV-V -0.012-0.006 +026SBO 77 * -1953 Gam MenCP-76 333 37763256201 214 W 053550.3-762445053152.9-762028287.93-30.97 5.19 +1.13 +1.19 +0.55 K2III +0.111+0.283 +.020+057V 6.0 38.2 * -1954 BD+22 996 37784 77420 053601.1+223636054203.9+223937184.93-03.96 6.36R K2 -0.011-0.021 -021 -1955 BD+00 1152 37788113033 053557.4+001705054105.6+002016204.40-15.44 5.93 +0.30 +0.04 F0IV +0.015+0.028 -013V 52 * -1956 Alp ColCD-34 2375 37795196059 215 W 2549 053601.6-340738053938.9-340427238.81-28.86 2.64 -0.12 -0.46 -0.09 B7IVe v+0.007-0.026 +.001+035V? 176 9.7 13.5 * -1957 BD-10 1258 37808150680 V1051 Ori053603.3-102740054046.0-102434214.44-20.37 6.52 -0.16 -0.48 B9.5IIIpSi4200 -0.030-0.030 +020 * -1958 CD-32 2479 37811196061 053607.8-324054053949.8-323745237.23-28.44 5.45 +0.92 +0.47 G6-8III -0.022-0.029 -008 -1959 BD-02 1346 37904132465 4279 053639.4-025651054140.3-025346207.44-16.83 6.42 +0.30 +0.07 A9IV-V +0.041+0.030 +030SB2 0.9 0.1 * -1960 CP-66 439 37935249322 053654.8-663700053654.7-663337276.51-32.10 6.31 -0.07 -0.15 B9.5V e-0.022+0.010 +020 * -1961 BD+23 1015 37967 77450 V731 Tau 053715.1+230925054319.5+231215184.62-03.43 6.21 -0.06 -0.64 B2.5Ve -0.001-0.022 +016 * -1962 BD-16 1208 37971150703 053714.2-164633054141.5-164332220.74-22.74 6.21 -0.13 B3IVp -0.005+0.009 +016 * -1963 51 OriBD+01 1105 379841130562427I 053718.3+012534054228.6+012829203.54-14.59 4.91 +1.17 +1.06 +0.61 K1III -0.058-0.015 +.015+088V? < 17 * -1964 CP-73 316 379932562082422 WX Men 053714.1-734802053444.7-734429284.90-31.30 5.78 +1.71 +1.83 +1.53 M3III -0.003+0.033 -011 * -1965 BD-17 1214 38054150716 053749.3-173444054214.3-173149221.60-22.94 6.15 +1.38 K0 -0.036+0.007 +062V -1966 CD-33 2483 38056196088 053747.3-332700054127.0-332402238.18-28.32 6.34 -0.04 A0V +0.014-0.002 +029 -1967 BD-06 1293 38089132477 4299 053802.4-065043054253.8-064746211.24-18.32 6.02 +0.40 -0.05 F3V -0.003+0.068D+.019-007SB 0.4 0.2AB 4* -1968 12 LepBD-22 1194 38090170715 053801.5-222520054213.9-222225226.52-24.73 5.87 +0.11 A2 -0.004+0.018 +028 * -1969 26 CamBD+56 1058 38091 25362 2615 053804.6+560427054630.4+560656156.39 13.88 5.94 +0.17 +0.12 A4Vn +0.019-0.056 +021SB 260 -1970 BD-01 1012 38099132480 I V1197 Ori053805.7-013934054309.3-013647206.44-15.90 6.31 +1.47 +1.77 K4III +0.003-0.026 +030SBO * -1971 27Omi AurBD+49 1398 38104 40583 216 053809.1+494658054554.0+494935161.98 10.75 5.47 +0.03 +0.07 +0.01 A2VpCr -0.010+0.001 +.019-006V 30 * -1972 CD-30 2571 381381960962428 053822.8-303501054211.6-303208235.12-27.37 6.19 +0.01 A0V +0.002+0.007 +027 -1973 CD-34 2401 38170196098 053840.0-344300054215.1-344004239.62-28.49 5.29 -0.05 B9.5V -0.008+0.051 +035 41 -1974 BD+40 1403 38189 40584 053848.6+402752054549.5+403026170.11 6.03 6.58 +0.25 +0.02 +0.15 A3Del Del -0.031-0.005 -004 67 -1975 BD-18 1172 38206150739 053858.9-183610054321.6-183327222.74-23.08 5.73 -0.01 -0.11 A0V s +0.016-0.015 +025 =< 41 -1976 BD+62 784 38284 13618 4376 053938.3+624614054904.9+624829150.37 17.24 6.13R A4V -0.007-0.010D+.010-004V 125 0.9 0.9 -1977 BD+20 1083 38307 77516 I Y Tau 053941.7+203911054539.4+204142187.05-04.28 6.95 +3.03 +5.81 +1.52 C5II -0.001 0.000 +017 * -1978 BD+03 1025 38309113099 4333 053945.1+035757054501.9+040029201.57-12.81 6.09 +0.31 +0.09 gF0n +0.020-0.019 +008 82 4.2 15.7AB 3* -1979 BD+42 1396 38358 406092431 054005.1+422922054714.7+423136168.49 7.29 6.29 +1.35 +1.59 K0 +0.009-0.088 -016 -1980 BD-20 1171 38382170756 054010.0-201014054428.4-200735224.43-23.43 6.34 +0.58 G0 -0.016+0.046 +038V? -1981 CD-39 2140 383851961162430 054011.9-392704054330.2-392425244.95-29.36 6.25 +0.37 F3V +0.051-0.002 +013 -1982 BD-22 1210 38392170757 4334B 054016.4-222717054426.5-222518226.76-24.26 6.15 +0.94 +0.74 +0.35 K2V -0.309-0.353 +.128-010 2.5 96.5AB 3* -1983 13Gam LepBD-22 1211 38393170759 217I 4334A 054017.6-222851054427.8-222654226.79-24.27 3.60 +0.47 0.00 +0.26 F6V -0.293-0.370 +.128-010 11 2.5 96.5AB 3* -1984 CD-45 2131 38458217497 2613 054050.8-455243054341.1-454959252.25-30.51 6.39 +0.29 +0.13 A9V +0.029+0.091 +011 * -1985129 TauBD+15 926 38478 94848 054100.4+154700054645.5+154921191.39-06.55 6.00 -0.06 -0.44 B8IIIpHgMn: +0.004-0.004 +019 80 -1986 BD-04 1235 38495132515 4361 054105.4-041823054602.8-041606209.24-16.48 6.34 +1.05 +0.99 K1III+G0IV 0.000-0.068 -046 2.7 6.9 * -1987 BD+09 954 385271131242432 4369 054122.7+092908054652.1+093120196.90-09.71 5.79 +0.88 +0.58 G8III -0.034-0.065 -026 5.9 17.2 * -1988 BD+01 1126 38529113119 054125.4+010800054635.0+011005204.32-13.83 5.95 +0.78 +0.42 G4V -0.073-0.148 +.027+029V * -1989131 TauBD+14 1025 38545 94855 054131.3+142706054713.2+142918192.60-07.14 5.72 +0.04 +0.16 A3Vn +0.010-0.039 +.021+021V -1990130 TauBD+17 1004 38558 94858 218 054136.3+174130054726.2+174345189.82-05.44 5.49 +0.30 +0.27 F0III -0.005-0.006 +009 51: -1991 Iot MenCP-78 195 38602256214 Iot Men 054143.6-785223053536.3-784915290.68-30.22 6.05 -0.02 -0.33 B8III +0.008+0.017 +013V? * -1992 29 CamBD+56 1065 38618 25403 4412 054202.1+565309055034.0+565508155.93 14.75 6.54 A4IV-V -0.009-0.008 +004V? 4.2 25.1AB 3* -1993133 TauBD+13 979 38622 948642433 4381 054202.6+135148054742.9+135359193.17-07.33 5.29 -0.17 -0.66 B2IV-V +0.002-0.012 -.002+029 70 6.1 24.9AC 3* -1994 BD+68 412 38645 136352438 054210.0+682633055255.5+682817145.13 19.98 6.20 +0.95 G9III +0.005-0.051 +.004-001 -1995 29Tau AurBD+39 1418 38656 58465 I 4398 054214.7+390850054910.5+391052171.58 5.91 4.52 +0.94 +0.70 +0.49 G8IIIFe-1 -0.025-0.022 +.007-020 < 17 6.1 49.6AC 3* -1996 Mu ColCD-32 2538 38666196149 2630 054216.9-322040054559.9-321823237.29-27.10 5.17 -0.28 -1.06 -0.27 O9.5V +0.009-0.025 +109 153 * -1997 BD+20 1105 38670 77578 4392 054224.1+205004054822.4+205210187.23-03.64 6.07 -0.08 -0.38 B9Vn +0.014-0.016D+.001+007SB 175 1.4 0.5AB 3* -1998 14Zet LepBD-14 1232 38678150801 219 054225.4-145133054657.3-144919219.40-20.83 3.55 +0.10 +0.07 +0.03 A3Vn -0.016-0.001 +.049+020SB? 202 -1999 52 OriBD+06 1027 38710113150 4390 054237.8+062508054800.2+062715199.75-10.98 5.27 +0.23 +0.17 A5V +0.007-0.019 +.023+043SB2 110 0.1 1.4 * -2000 BD-16 1244 38713150806 054239.4-161628054707.6-161416220.81-21.35 6.17 +0.89 G2Ib-II -0.034+0.003 +007V -2001 BD-10 1281 38735150814 S V1031 Ori054244.4-103407054726.7-103159215.30-18.94 6.03 +0.16 A4V -0.029-0.024 -001SB3 * -2002132 TauBD+24 970 38751 775922435I D 2650 054252.7+243202054901.0+243403184.13-01.61 4.86 +1.01 +0.81 +0.38E G8III v-0.004-0.023 +.005+016V? < 19 0.0 0.1 -2003 BD+51 1117 38765 254112437 054259.5+512902055056.4+513053160.87 12.26 6.29 +1.05 K1III +0.167-0.030 +026 -2004 53Kap OriBD-09 1235 38771132542 220I 2641 054300.8-094218054745.4-094011214.51-18.50 2.06 -0.17 -1.03 -0.18 B0.5Ia v+0.002-0.002 +.015+021V? 82 * -2005 CD-28 2449 38804170836 054310.1-284031054704.7-283821233.45-25.79 6.22 -0.15 B5V +0.006+0.006 +018 -2006 30 CamBD+58 863 38831 25419 054328.3+585607055217.4+585751154.15 15.88 6.14 -0.04 -0.13 A0V s +0.007-0.023 +012 400: -2007 BD-04 1244 388581325541155 054336.7-040720054834.9-040541209.37-15.84 5.97 +0.64 +0.10 G4V +0.062-0.225 +029V -2008 CD-46 1999 388712175212434 W 054341.0-463802054627.4-463550253.21-30.16 5.31 +1.04 K0-1II +0.012+0.004 +.018+011 7.4 37.0 -2009 CD-35 2509 38885196171 054347.1-354240054718.6-354029241.02-27.75 6.32 +1.18 K1III -0.008+0.041 +057 -2010134 TauBD+12 912 38899 94888 W 054355.8+123711054932.9+123904194.49-07.57 4.91 -0.07 -0.17 -0.08 B9IV -0.020-0.024 +018V 22 5.4 18.9 -2011 31Ups AurBD+37 1336 38944 584962440I 2661 054413.1+371636055102.4+371820173.39 5.28 4.74 +1.62 +1.93 +1.07 M0+III-IIIbFe-0.5 +0.035-0.047 -.002+038 * -2012 32Nu AurBD+39 1429 39003 58502 221I 4440 054433.5+390709055129.4+390855171.84 6.28 3.97 +1.13 +1.09 +0.56 G9.5III* -0.005+0.007 +.017+010V? < 17 7.3 54.6 * -2013 BD+27 888 39004 77625 4474 054439.9+275617055058.1+275804181.44 0.51 5.56 +0.97 gG7 -0.009+0.012 +008V 1.3 0.0 O 3* -2014 BD+09 978 39007113179 054432.0+095026055002.6+095216196.98-08.85 5.80 +0.87 +0.62 +0.30E G8III +0.005-0.010 +044V? * -2015 Del DorCP-65 496 390142493461154 054435.6-654623054446.4-654408275.47-31.37 4.35 +0.21 +0.12 +0.17 A7V -0.031+0.008 +.027-003 206 -2016135 TauBD+14 1041 39019 94904 054447.5+141636055028.9+141820193.16-06.55 5.52 +1.01 gG9 +0.006-0.035 +046V? -2017 CD-40 2085 39040217543 054445.3-404111054758.1-403909246.55-28.79 6.61 +1.12 K1III +0.007+0.032 +013SB2 -2018 BD+32 1109 39045 58504 I 4443 Var 054454.6+320546055125.7+320730177.91 2.72 6.25 +1.75 +2.00 +1.40 M3III v+0.001+0.007 +103 5.9 15.2 * -2019 BD+04 1052 390511131862439I 054455.4+042339055013.1+042524201.83-11.48 5.97 +1.36 +1.57 gK2 +0.005-0.039 +027V? -2020 Bet PicCD-51 1620 39060234134 054454.9-510609054717.1-510359258.37-30.61 3.85 +0.17 +0.10 +0.16 A5V +0.011+0.085 +.061+020V? 139 * -2021 BD-14 1251 39070150845 4432 054503.8-143047054936.5-142901219.35-20.10 5.49 +0.88 gG6 -0.025-0.044D+.009-002V 3.0 2.6 * -2022 Pi MenCP-80 161 39091258421 054506.8-803240053709.8-802809292.53-29.78 5.65 +0.60 +0.11 +0.19E G1V +0.305+1.054 +.044+009V? * -2023 CP-54 892 39110234137 054512.0-542339054713.0-542139262.18-30.93 6.18 +1.40 K3III -0.016-0.009 -003 -2024 BD+01 1148 39118113198 Var 054518.0+015944055030.0+020128204.02-12.57 5.98 +0.91 +0.30 G8III+A0IV +0.001-0.015 +007SBO =< 50 * -2025 BD+39 1435 39182 58524 054542.0+393255055239.5+393428171.58 6.69 6.45R +0.09 +0.17 A2V -0.026-0.016 -019 -2026 CD-23 3135 39190170892 054542.9-230007054953.5-225818227.82-23.29 5.87 +0.06 A2 -0.014+0.025 +044 -2027 31 CamBD+59 920 39220 254472446 TU Cam 054600.3+595157055457.8+595318153.44 16.59 5.20 +0.02 +0.03 A2V +0.001-0.019 +.009-003SB2O 76 * -2028 BD+33 1179 39225 585282443I 2681 054602.8+335329055240.1+335503176.50 3.85 5.98 +1.60 +1.97 M1.5II-III +0.020+0.008 +100 * -2029 30Xi AurBD+55 1027 39283 254501157 054627.9+554101055450.8+554225157.33 14.72 4.99 +0.05 +0.12 +0.02 A2V -0.013+0.020 +.012-012V? 72 * -2030 BD+19 1110 39286 94942 054627.9+195032055223.4+195205188.57-03.34 6.06 +0.54 -0.01 G2IIIe+B8III -0.002+0.003 -003V? 230 * -2031 55 OriBD-07 1187 392911325912442 2677 054632.3-073241055122.0-073105212.89-16.76 5.35 -0.20 -0.83 B2IV-V -0.001+0.003 +020V 164 * -2032 CD-44 2274 39312217559 054639.7-445416054934.1-445231251.36-29.34 6.38 +1.27 K1III -0.004+0.011 +029 -2033137 TauBD+14 1060 39317 94945 V809 Tau 054641.4+140847055222.3+141018193.51-06.22 5.59 -0.05 -0.06 B9pSiCrEu -0.020-0.005 -004V 35 * -2034136 TauBD+27 899 39357 776751158 D 2696 054702.4+273519055319.6+273644182.01 0.77 4.58 -0.02 +0.03 0.00 A0V +0.003-0.012 +.021-016SB2O 41 1.5 0.0 * -2035 15Del LepBD-20 1211 39364170926 222I 054701.2-205315055119.3-205245225.82-22.22 3.81 +0.99 +0.68 +0.56 K0IIIFe-1.5CH0.5 +0.227-0.649 +.022+099 0 * -2036 BD-22 1246 39385170931 054717.8-225705055128.6-225534227.91-22.93 6.17 +1.02 K0 -0.001-0.018 +026 -2037 56 OriBD+01 1151 394001132202444I 4467 2690 054714.8+014951055226.4+015118204.41-12.22 4.78 +1.38 +1.47 K1.5IIb -0.007-0.012 +.005+010 < 19: 8.4 43.4 -2038 BD+20 1156 39417 77680 054722.3+201633055319.1+201757188.31-02.94 6.71 -0.07 -0.33 B9V +0.005-0.010 -006 175 -2039 BD-09 1255 39421132603 054721.7-090404055207.6-090229214.41-17.25 5.97 +0.10 +0.08 A2Vnp -0.027+0.052 +039 * -2040 Bet ColCD-35 2546 39425196240 223I: 054726.0-354821055057.6-354606241.35-27.06 3.12 +1.16 +1.21 +0.58 K2III +0.059+0.401 +.023+089V * -2041 BD+66 413 39429 136622448 054725.7+660442055735.0+660546147.63 19.44 6.25 +1.36 +1.64 K0 +0.048-0.016 -022 -2042 Gam PicCP-56 946 395232341541156 054800.6-561130054949.7-561000264.31-30.69 4.51 +1.10 +0.98 +0.54 K1III +0.083-0.076 +.018+016 * -2043 CD-29 2556 39543170945 054807.6-292824055159.5-292655234.68-25.02 6.45 +1.48 +1.72 K3III -0.004+0.020 +002 -2044 CP-52 791 39547234162 W 054817.3-524738055028.6-524604260.39-30.30 6.35 +0.76 K0-1III+A4V+A -0.025+0.015 +001 0.8 0.2 -2045 BD+51 1128 39551 25467 054817.5+514707055614.4+514814161.00 13.13 6.49R A5V -0.009-0.008 -012 -2046 BD+31 1139 39586 58569 054829.5+314111055459.0+314206178.66 3.15 5.90 +0.14?+0.13? A5IV -0.043-0.176 +.023-021 105 -2047 54Chi1OriBD+20 1162 39587 77705 I D 054827.6+201528055422.9+201634188.46-02.73 4.41 +0.59 +0.07 +0.31 G0V -0.189-0.084 +.104-014SB? 6 0.6 3* -2048 BD+10 927 39632 94977 I 054841.0+103357055413.4+103513196.87-07.61 6.12 +1.47 +1.43 G9II +0.006+0.008 +013 -2049 CP-52 794 396402341691159 054837.4-520754055053.2-520632259.64-30.17 5.17 +0.99 +0.72 +0.42 G8III +0.006-0.078 +.023+001 -2050 BD+11 964 39662 94979 W 054857.0+114440055432.2+114545195.88-06.96 6.59 +0.03 +0.02 A2V +0.008-0.068 +028 5.5 22.7 * -2051 BD+03 1071 39685113253 054900.5+031224055415.7+031331203.40-11.17 6.31 +1.29 +1.47 K0 +0.053-0.061 -004 -2052 57 OriBD+19 1126 39698 949862447 2722 054901.4+194349055456.7+194459188.98-02.88 5.92 -0.17 -0.74 B2V -0.003-0.004 +007SBO 121 2.2 0.0 * -2053 CD-37 2457 39720196266 W 054908.5-373909055233.2-373752243.46-27.23 5.63 +1.04 +0.87 K1III +0.033-0.031 +032 6.1 16.5AB 3* -2054 BD+49 1423 39743 40720 054923.5+490049055704.9+490146163.58 11.96 6.47 +0.99 G8III +0.019-0.016 -002 -2055 CD-38 2270 39752196274 W 054926.7-383250055247.7-383133244.45-27.40 6.70 +1.08 K1III +0.004-0.004D+.003+004 3.5 1.2 -2056 Lam ColCD-33 2599 39764196276 Lam Col 054929.0-334924055306.9-334805239.36-26.09 4.87 -0.15 -0.57 -0.15 B5V -0.004+0.033 +.035+030V 88 * -2057 BD+00 1208 39775113265 I 054934.4+005658055444.1+005806205.49-12.14 6.00 +1.34 +1.45 K0III +0.003-0.003 +022 -2058 BD-04 1281 39777132635 054936.8-040502055434.7-040350210.05-14.50 6.57 -0.18 -0.81 B1.5V -0.001+0.020 +025 20 * -2059 CP-84 75 397802584181659 TZ Men 054933.7-845007053013.9-844706297.35-28.83 6.20 -0.02 -0.11 B9.5IV-V -0.008+0.046 -004SBO * -2060 BD-19 1293 39789150925 054937.9-193930055357.4-193818224.85-21.18 6.69 +0.10 A4V -0.025+0.004 +002 -2061 58Alp OriBD+07 1055 39801113271 224I 4506 Alp Ori 054945.4+072319055510.3+072425199.79-08.96 0.50 +1.85 +2.06 +1.28 M1-2Ia-Iab e+0.026+0.009 +.005+021SB 9.9 174.4AE 6* -2062 Lam MenCP-72 418 398102562392441 054950.0-724349054748.1-724208283.55-30.52 6.53 +1.08 +0.97 K0III -0.011+0.022 +015 -2063 BD+20 1171a 39816 77730 I U Ori 054952.8+200929055549.3+201030188.72-02.49 5.4 +0.99 +0.43 M6.5IIIe 0.000-0.014 -021V? * -2064 Eps DorCP-66 463 39844249368 2693 054959.8-665534054953.6-665404276.80-30.80 5.11 -0.14 -0.49 B6V -0.016+0.016 +.012+016 -2065 BD-11 1321 39853150932 I 055003.6-114737055443.6-114626217.29-17.85 5.66 +1.53 +1.84 K5III +0.066+0.039 +086V? * -2066 BD+28 952 39866 77744 055012.6+285535055633.8+285632181.22 2.06 6.32 +0.30 +0.26 A2II +0.003-0.001 +019 -2067 BD+13 1036 39881 95004 4519 055020.4+135518055603.5+135531194.16-05.57 6.60 +0.65 +0.13 G5IV +0.384-0.467 +.047-002V 1.9 47.5AB 4* -2068 CD-29 2595 39891170993 W 055021.4-290954055414.1-290852234.53-24.46 6.36 +0.37 F3V -0.020-0.051 +018 0.0 0.1 -2069 CD-42 2205 39901217599 055019.7-425629055322.9-425517249.32-28.29 6.55 +1.37 K3III +0.012+0.009 -010 -2070 BD-04 1289 39910132652 055033.4-043759055530.3-043659210.67-14.54 5.87 +1.18 +1.21 gK2 +0.040-0.017 +026V? -2071 BD-04 1291 39927132653 055039.3-044816055535.4-044718210.84-14.60 6.28 +0.06 +0.07 A2III -0.011-0.019 -014 -2072 CP-57 901 39937234181 2714 055039.6-571029055220.3-570922265.48-30.41 5.94 +0.66 F7IV +0.024-0.078 +008V -2073 CP-64 486 39963249376 055050.2-640320055123.0-640201273.46-30.72 6.36 +0.86 +0.57 G8III -0.011+0.016 +013 * -2074 BD+24 1033 39970 77750 055048.6+241406055656.1+241459185.32-00.22 6.02 +0.39 -0.19 A0Ia +0.002 0.000 +001V 60 * -2075 BD+09 1016 39985113284 055058.3+092940055628.0+093035198.09-07.65 5.99 -0.07 -0.15 A0IV 0.000-0.001 +013 83 -2076 BD+11 975 40020 950272453 055114.1+113029055649.5+113116196.37-06.59 5.87 +1.10 K2III +0.106-0.058 +021 -2077 33Del AurBD+54 970 40035 25502 225I W 055117.5+541637055931.6+541705158.95 14.69 3.72 +1.00 +0.87 +0.50 K0-III +0.081-0.125 +.022+008 < 17 5.8 115.4AB 4 -2078 BD+75 247 40055 57302459 055121.8+753455060509.3+753509138.34 23.40 6.40R K5 +0.009-0.010 +004 -2079 BD+55 1036 40062 25504 055125.4+551846055945.7+551915158.00 15.18 6.44 +0.31 +0.12 +0.13 A5m -0.015-0.088 +045 -2080 BD+54 971 40083 25505 055133.0+543216055948.1+543250158.73 14.84 6.14 +1.20 +1.33 K2III +0.011-0.035 -006 -2081 BD+49 1428 40084 40743 055135.7+495449055921.8+495528162.95 12.70 5.89 +1.23 G5III -0.002-0.009 -004SBO * -2082 CD-39 2260 400911963092449 055137.2-395829055452.5-395729246.12-27.36 5.57 +1.51 +1.85 M0III -0.014+0.016 +114V -2083 CD-50 1977 40105234191 055143.8-502342055410.7-502143257.72-29.44 6.52 +0.90 +0.63 +0.30E G8IV +0.086+0.569 +.034+002 -2084139 TauBD+25 1052 40111 77775 055147.3+255630055759.7+255714183.97 0.84 4.82 -0.06 -0.93 -0.11 B0.5II 0.000-0.002 +008SB 131 * -2085 16Eta LepBD-14 1286 40136150957 226I 055151.0-141109055624.3-141004219.76-18.47 3.71 +0.33 +0.01 +0.16 F1III -0.042+0.139 +.066-002 0 -2086 BD-22 1269 40151171034 055202.3-225118055614.3-225025228.25-21.88 5.96 +1.11 +0.99? K0V +0.119+0.021 +034V -2087 Xi ColCD-37 2487 40176196316 055203.4-370807055529.9-370715243.07-26.53 4.97 +1.11 K1III +0.032-0.026 -.011+060V -2088 34Bet AurBD+44 1328 40183 40750 227I 4556 Bet Aur 055211.5+445615055931.7+445651167.46 10.41 1.90 +0.03 +0.05 -0.01 A2IV -0.057 0.000 +.041-018SB2O 37 8.9 184.6AB 3* -2089 CD-49 1945 402002176122450 055211.0-493836055441.1-493737256.89-29.25 6.10 -0.13 B3V -0.009+0.016 +012 -2090 CD-23 3263 40235171045 055224.3-231346055634.5-231256228.66-21.94 6.36 +1.07 K0 +0.014+0.026 -005V -2091 35Pi AurBD+45 1217 40239 40756 I Pi Aur 055230.7+455540055956.1+455613166.60 10.94 4.26 +1.72 +1.83 +1.48 M3II e 0.000-0.005 +.003+001V * -2092 Sig ColCD-31 2848 402481963302454 055235.1-312346055620.9-312257237.03-24.73 5.50 F2III -0.002+0.006 +019 79 -2093 BD+01 1168 40282113306 I 055244.4+011246055754.2+011328205.64-11.31 6.22 +1.48 +1.84 M0III -0.069+0.008 +037 -2094 CP-52 805 40292234199 055237.9-523927055450.2-523807260.32-29.63 5.29 +0.31 0.00? F0VDel Del -0.005+0.248 +.034+027 0 * -2095 37The AurBD+37 1380 40312 58636 I 4566 The Aur 055254.1+371221055943.3+371245174.34 6.73 2.62 -0.08 -0.18 -0.06 A0pSi +0.048-0.081 +.022+030SB 49 4.5 3.5AB 4* -2096 BD+44 1332 40325 40769 4576 055300.1+443506060019.0+443531167.84 10.37 6.22 K2III+K0III -0.026-0.041 +002 4.0 34.2AC 3* -2097 BD-01 1078 40347132700 055306.6-010014055811.7-005939207.67-12.29 6.22 +1.14 +1.20 K0 +0.007-0.025 +061 -2098 CD-31 2854 40359196335 055305.0-315920055649.0-315834237.68-24.82 6.44 +1.07 G8III +0.002+0.019 +029 -2099 BD+12 968 40369 95075 4562 055315.6+124755055853.2+124831195.49-05.52 5.70 +0.89 +0.63? K2III+A5V -0.014+0.021D+.006+012V 1.0 0.4 * -2100 59 OriBD+01 1171 40372113315 4555 V1004 Ori055312.7+014938055824.4+015013205.14-10.92 5.90 +0.21 +0.17 A5mDel Del +0.005-0.008 +045SBO 60 4.7 36.7 * -2101 36 AurBD+47 1227 40394 40778 055323.3+475344060058.6+475407164.91 12.01 5.73 -0.01 -0.12 B9.5pSiFe +0.006-0.018 +016 -2102 CP-63 498 404092493902452 055320.0-630712055406.1-630524272.38-30.42 4.65 +1.05 +0.96 +0.50 K1III-IV +0.138+0.537 +.048+025 * -2103 60 OriBD+00 1239 404461133211161 W 055341.0+003238055849.6+003311206.35-11.43 5.22 +0.01 +0.01 A1V s -0.013+0.002 +.004+035SB 47 6.6 19.1 -2104 CP-64 495 40455249391 055344.6-642955055411.9-642856273.98-30.42 6.63 +0.38 +0.10 F0III -0.003+0.064 +013 -2105 BD+48 1333 40486 407892458I 055402.2+485716060143.1+485734164.01 12.60 5.96 +1.45 K0 +0.005-0.015 +011 -2106 Gam ColCD-35 2612 404941963521160 W 055359.4-351738055732.2-351700241.23-25.64 4.36 -0.18 -0.66 -0.17 B2.5IV 0.000+0.009 +024 96 8.3 33.8 -2107 1 MonBD-09 1284 40535132714 V474 Mon 055415.7-092327055901.0-092256215.50-15.87 6.12 +0.29 +0.10 F2IV +0.014+0.012 +012SB 25 * -2108 2 MonBD-09 1285 405361327152455 055419.4-093354055904.3-093330215.67-15.93 5.03 +0.19 +0.16 +0.09 A6IIIm vs +0.009-0.050 +.010+022SBO 23 * -2109 BD-01 1083 40574132723 055433.7-012704055937.7-012640208.25-12.18 6.63 -0.07 -0.39 B8IIIn -0.009-0.020 -004 -2110 BD+31 1164 40588 58657 055442.4+310146060110.2+310205179.90 3.97 5.98R +0.08 +0.14 A2V -0.001+0.009 -009 100 -2111 BD+27 945 40589 77837 4589 055443.3+273402060100.4+273420182.90 2.23 6.05 +0.25 -0.26 B9Iab -0.001-0.004 +017 57 6.0 9.5 * -2112 BD+49 1441 40626 40801 055502.4+495415060248.7+495420163.22 13.19 6.05 -0.06 -0.10 B9.5IV +0.024-0.046 +025 20 -2113 BD-03 1256 406571327322457I 2770 055503.1-030441060003.4-030427209.79-12.83 4.53 +1.22 +1.21 +0.67 K1.5IIIFe-1.5 +0.012-0.076 +.022+026 < 17 -2114 CP-53 978 40665234224 W 2753 055507.0-532606055714.4-532534261.27-29.37 6.45 +1.48 K5-M0III +0.016-0.014 +073 1.0 55.9AB 3* -2115 BD+43 1421 40722 40808 055539.8+432239060253.6+432243169.15 10.21 6.42R K0 +0.020-0.024 -019 -2116 BD+22 1140 40724 77858 D 055539.2+222353060141.6+222403187.47-00.20 6.37 -0.07 -0.28 B8V -0.011-0.020 +024 40 * -2117 CD-44 2363 40733217648 055539.5-440230055837.6-440204250.77-27.59 5.81 +1.07 +0.87 G8II -0.001+0.014 +012V -2118 BD-12 1337 40745151011 055540.9-125413060017.7-125359218.96-17.08 6.22 +0.36 F0 -0.007-0.039 +033 45 -2119 38 AurBD+42 1473 40801 408182461 055605.3+425453060318.0+425442169.60 10.05 6.10 +0.97 +0.78 K0II +0.112-0.141 +.014+038V? * -2120 Eta ColCD-42 2266 40808217650 229 055605.1-424914055908.8-424855249.46-27.23 3.96 +1.14 +1.08 +0.58 K0III +0.022-0.014 +.019+017 -2121 BD+59 937 40827 25551 055614.9+592347060508.3+592335154.47 17.55 6.34 +1.10 +1.10 K1III-IV +0.005-0.051 +031 * -2122 BD+32 1166 40832 58688 055621.5+323827060255.1+323809178.68 5.07 6.24 +0.42 -0.01 F4V +0.076-0.209 +.028+034 12 -2123 BD+51 1146 40873 255482463 4633 2804 055633.3+513433060429.1+513424161.80 14.17 6.45 +0.18 +0.16 A7III +0.005-0.042 +020V 99 2.8 39.0AB 3* -2124 61Mu OriBD+09 1064 40932113389 4617 2792 055652.8+093850060223.0+093851198.68-06.31 4.12 +0.16 +0.11 +0.10 A2V +0.015-0.028 +.028+045SB1O 24 1.8 0.3AB 3* -2125 Kap MenCP-79 202 409532562482451 055701.7-792243055016.7-792141291.13-29.44 5.47 -0.08 -0.24 B9V -0.009+0.066 +010 -2126 BD+63 630 40956 13715 055704.8+632729060639.2+632713150.61 19.31 6.39R K0 -0.030+0.006 -015 -2127 BD+01 1195 40964113392 055705.8+014136060217.1+014140205.74-10.13 6.59 -0.05 -0.27 B8V +0.004+0.007 +003 -2128 3 MonBD-10 1349 40967151037 4615 055708.1-103557060150.4-103553216.95-15.77 4.95 -0.12 -0.60 -0.09 B5III -0.007 0.000D+.003+039SB 65 3.5 1.9 * -2129 CD-25 2865 409721711382460 055709.3-252509060113.1-252504231.28-21.74 6.05 +0.02 A1V -0.008-0.018 +012 -2130 64 OriBD+19 1186 41040 95166 D 2803 055732.1+194132060327.3+194126190.03-01.18 5.14 -0.11 -0.43 B8III -0.001-0.017 +012SB2 17 0.0 0.0 3* -2131 CD-33 2681 41047196413 I: 055738.7-335445060116.4-335442240.02-24.51 5.55 +1.58 +1.94 K5III +0.015-0.020 +019 -2132 39 AurBD+42 1477 41074 40840 2812 055751.8+425921060503.4+425854169.69 10.37 5.87 +0.30 +0.06 F3V -0.039-0.143 +034V? 82 * -2133 BD+11 1009 41076 95170 055749.8+114058060324.7+114051197.02-05.10 6.08 -0.04 -0.03 A0V s -0.016-0.015 -013V 19 -2134 1 GemBD+23 1170 41116 779151163I W Var? 055802.4+231608060407.2+231548186.99 0.72 4.16 +0.82 +0.52 +0.45 G7III -0.008-0.100 +.031+020SBO 0.4 0.2AB 4* -2135 62Chi2OriBD+20 1233 41117 77911 D 2809 055758.8+200827060355.2+200818189.69-00.86 4.63 +0.28 -0.68 +0.22 B2Ia t+0.002-0.006 +.025+017V 36 0.0 0.0 * -2136 BD-14 1315 41125151052 055801.0-142948060233.8-142950220.72-17.25 6.20 +0.96 G5 +0.011+0.012 +045 -2137 BD+37 1405 41162 58716 4649 055810.9+375806060502.6+375751174.18 8.02 6.34 K0III+A2 +0.003-0.007 +005 =< 23 5.6 17.9AB 3* -2138 CD-51 1713 41214234251 055828.4-511311060049.2-511259258.86-28.53 5.67 +0.20 Am -0.021+0.094 +005 0 -2139 BD+33 1236 41269 58727 055857.8+333618060534.0+333557178.10 6.02 6.23 -0.08 -0.26 B9pSi +0.008-0.013 +025 75 -2140 CD-26 2675 41312171180 I 4645 055913.7-261702060315.5-261704232.33-21.62 5.04 +1.34 +1.44 +0.55E K3III +0.056+0.092 +182V? 7.3 2.2AB 3* -2141 BD+35 1334 41330 58739 W 055927.2+352410060608.5+352315176.57 6.99 6.12 +0.60 +0.06 G0V -0.131-0.302 +.046-012V =< 10 3.4 122.0 -2142 BD-06 1391 41335132793 2817 055921.9-064217060413.5-064233213.60-13.54 5.21 -0.06 -0.85 +0.04 B2Ven v-0.005-0.003 +025SB 419 * -2143 40 AurBD+38 1377 41357 587492465 Var? 055941.4+382930060635.1+382858173.87 8.53 5.36 +0.25 +0.15 +0.09 A4m +0.007-0.049 +.004+018SB2O 26 * -2144 63 OriBD+05 1085 41361113429 055938.2+052532060458.2+052512202.73-07.78 5.67 +1.04 +0.83 gG7 0.000+0.003 +020V? -2145 66 OriBD+04 1116 41380113430 230 055941.3+040952060458.4+040931203.85-08.38 5.63 +1.04 +0.75 G4III -0.001-0.005 +033V? -2146 BD+29 1112 41429 77958 I 4673 055959.3+293113060622.5+293045181.78 4.20 6.08 +1.73 +1.94 M3II+F7V +0.015-0.006 -036 5.0 10.0 * -2147 BD+41 1357 41467 40868 060019.7+415151060726.9+415115170.92 10.24 6.12 +1.22 K0III +0.007-0.021 +006 -2148 17 LepBD-16 1349 41511151093 I SS Lep 060031.3-162839060459.1-162904222.87-17.53 4.93 +0.24 +0.12 +0.52 A2eShell v-0.006-0.001 +.032+020SB2O 98 * -2149 CD-32 2743 415341964592464 W 060037.1-321011060420.3-321021238.43-23.36 5.65 -0.19 -0.82 B2.5V -0.015+0.119 +093V 128 0.0 0.1 * -2150 BD-10 1368 41547151098 060043.7-101409060527.0-101434217.01-14.81 5.87 +0.37 +0.04 dF4 +0.014+0.024 +033SB2 -2151 CP-60 537 41586249424 SW Pic 060054.1-600536060209.2-600549268.97-29.34 6.45 +1.58 +1.81 M4III +0.010+0.004 -051V? * -2152 37 CamBD+58 897 41597 25597 I 060109.6+585655060959.1+585609155.18 17.94 5.36 +1.09 +0.92 G8III +0.024+0.023 +.011+031 < 19: -2153 BD+41 1365 41636 40881 060119.4+410408060823.0+410320171.72 10.03 6.36 +1.05 +0.83 G9III -0.016-0.053 -087 -2154 BD-04 1362 416921328412467 4698 060141.2-041101060638.7-041138211.57-11.87 5.38 -0.13 -0.54 B5IV -0.007-0.004 +020 20 6.2 28.5 -2155 18The LepBD-14 1331 416951511102466 060137.7-145534060609.3-145607221.51-16.64 4.67 +0.05 +0.02 0.00 A1Vn -0.018+0.014 +.012+032SB 211 * -2156 CD-24 3679 41698171222 I S Lep 060138.2-241110060545.7-241144230.46-20.34 6.95 +1.63 +1.30 +2.37 M6III +0.024-0.018 +012 * -2157 CD-45 2300 41700217702 231 W C 060135.7-450210060428.4-450212252.13-26.78 6.35 +0.52 0.00 G0IV-V -0.080+0.244 +.042+026 0.3 196.7AC 3* -2158 CD-45 2302 41742217706 W AB 060147.5-450442060440.2-450444252.18-26.76 5.93 +0.49 -0.01 F4V -0.070+0.255 +.033+027 0.3 196.7AC 3* -2159 67Nu OriBD+14 1152 41753 95259 232 060151.7+144650060734.3+144606194.81-02.72 4.42 -0.17 -0.66 -0.16 B3V +0.006-0.021 -.032+024SB1O 41 * -2160 CD-35 2684 41759196483 060155.0-353018060527.1-353049241.98-24.16 5.80 +0.02 A1V +0.007+0.018 +024 -2161 BD-11 1386 41814151126 060210.9-110945060651.9-111025218.04-14.90 6.66 -0.15 B3V -0.002+0.001 +013 -2162 CD-48 2124 41824217708 W 2827 060211.3-482657060446.9-482731255.90-27.43 6.58 +0.72 +0.27 G6V -0.092-0.038 +.019+023V 8 0.3 2.5 * -2163 CD-23 3431 41841171236 4704 060221.8-230557060632.0-230638229.46-19.78 5.47 +0.08 +0.09 +0.03 Am -0.023-0.023 +.014-015 64 5.1 44.3 -2164 CD-29 2769 418431712311164 060214.5-294451060605.5-294531236.08-22.22 5.81 +0.05 A1V +0.013-0.041 +007V -2165 36 CamBD+65 517 41927 13756 233I 060247.4+654418061251.1+654306148.62 20.75 5.32 +1.34 +1.44 K1.5IIIbCN-0.5 +0.006-0.033 +.004+007SB < 17 -2166 BD-21 1353 41933171251 I 2833 060243.6-214802060657.6-214846228.22-19.19 5.78 +1.64 +1.79 M4III +0.004-0.016 +008V * -2167 BD+08 1202 42035113503 060319.2+084104060847.2+084012200.31-05.40 6.55 -0.07 -0.17 B9V +0.032+0.005 +035V -2168 19 LepBD-19 1361 42042151142 I 060320.6-190914060741.6-190957225.72-18.01 5.31 +1.68 +1.96 M2III +0.013+0.054 +029V -2169 BD+22 1198 42049 78045 I 060330.6+221223060932.4+221124188.54 1.28 5.93 +1.63 K4I -0.018-0.013 +008V -2170 CD-34 2655 42054196503 2836 060327.4-341757060703.7-341843240.83-23.48 5.83 -0.13 -0.55 -0.09 B4IVe +0.003+0.003 +018 -2171 Pi 1ColCD-42 2343 42078217720 060335.5-421710060641.0-421755249.26-25.76 6.12 +0.25 +0.12 +0.14 Am -0.033+0.003 +002V 69 -2172 BD+52 1041 42083 25613 060343.5+524004061146.0+523850161.29 15.63 6.30 +0.14 +0.08 +0.02 A5IIIm +0.011-0.070 +011SB2O 30 * -2173 3 GemBD+23 1226 42087 78050 4751 2846 060339.6+230747060944.0+230648187.75 1.77 5.75 +0.21 -0.63 B2.5Ib e+0.007-0.001 +016V 37 2.5 0.7AB 3* -2174 BD+02 1139 42111113507 4749 060344.7+023056060857.9+022958205.81-08.28 5.73 +0.07 +0.06 A3Vn v+0.004-0.020 +034 250 1.2 29.3AB 3* -2175 41 AurBD+48 1352 42126 40924 4773B 060356.8+484401061136.5+484247164.97 13.95 6.82H A8V +0.012-0.066D+.010+029 120 0.8 7.7 * -2176 41 AurBD+48 1352 42127 40925 4773A 060356.9+484353061136.6+484240164.97 13.95 6.09H +0.10 +0.08 A3V +0.019-0.050D+.010+031 115 0.8 7.7 * -2177 The ColCD-37 2609 421671965142468 060405.8-371420060731.6-371511243.94-24.26 5.02 -0.11 B9IV +0.002-0.005 +045 * -2178 CD-45 2317 42168217724 060407.8-450445060701.9-450529252.30-26.36 6.51 +1.16 +1.13 K1III +0.085+0.044 +082 -2179 BD-05 1523 42278132900 060441.8-054139060936.2-054240213.29-11.90 6.17 +0.34 +0.01 F3IV w +0.058+0.014 -001 27 -2180 BD-22 1327 423011712931165 060445.6-222434060857.9-222539229.01-19.00 5.50 -0.01 A0IV +0.002-0.039 +.012+044 -2181 Pi 2ColCD-42 2351 42303217730 W 060446.5-420817060752.9-420914249.16-25.51 5.50 0.00 A0V +0.001-0.014 +.016+031 248 0.1 0.1 * -2182 BD-18 1316 42327151173 W 060456.5-180630060920.3-180734224.88-17.24 6.35 -0.03 B9Vn +0.013-0.015 +033 5.0 23.0 -2183 BD-14 1348 42341151178 I 060502.0-143404060934.3-143503221.53-15.74 5.56 +1.16 +1.20 K2III -0.047+0.045 +031 -2184 BD+18 1112 42351 95337 060510.6+180901061101.8+180746192.26-00.37 6.33 +1.35 +1.44? K1II -0.002-0.047 -003V -2185 5 GemBD+24 1151 42398 78079 060524.3+242632061132.3+242513186.80 2.76 5.80 +1.11 K0III -0.004-0.054 +022SB * -2186 BD-22 1330 42443171317 W 060536.0-224526060947.9-224627229.43-18.95 5.71 +0.44 -0.05 F6V +0.080+0.067D+.019+022V 0.1 0.2 * -2187 CD-44 2452 42448217735 W 060537.9-442021060834.6-442122251.57-25.92 6.27 -0.15 B8II -0.013+0.010 +017V? 6.8 33.1 -2188 BD+51 1163 42466 25630 060552.0+511153061345.3+511021162.82 15.30 6.04 +1.06 K1III -0.007-0.065 +011 -2189 BD+32 1217 42471 588522470I 060547.1+324256061220.1+324136179.58 6.84 5.78 +1.66 M2IIIa -0.008-0.001 -051V? -2190 BD+21 1146 42475 78092 I TV Gem 060550.4+215323061151.4+215207189.08 1.60 6.56 +2.25 +1.77 +1.48 M0-1Iab +0.002+0.015 +017 * -2191 BD+13 1151 42477 95352 060548.1+133936061127.9+133819196.25-02.44 6.04 0.00 +0.04 A0Vnn -0.005-0.017 +013 160 -2192 CD-26 2761 42486171318 060547.0-264057060947.2-264203233.30-20.40 6.27 +1.01 +0.78 G8-K0III -0.007+0.021 -014V -2193 68 OriBD+19 1253 42509 953592471 W 060605.9+194846061201.3+194726190.92 0.63 5.75 -0.07 -0.11 B9.5V -0.001-0.012 +031 83 3.5 86.3 -2194 Eta1DorCP-66 493 42525249448 060602.3-660132060609.4-660223275.80-29.19 5.71 -0.03 -0.07 A0V +0.017+0.027 +018 -2195 BD-06 1439 42536132924 V653 Mon 060609.7-064359061101.3-064515214.41-12.05 6.15 +0.01 +0.03 A0pSrCr +0.004-0.003 +005V * -2196 CP-62 582 425402494512469 2845 060608.6-620812060703.4-620917271.36-28.89 5.05 +1.25 +1.35 +0.64 K2-3III +0.018-0.072 +.013+022 -2197 6 GemBD+22 1220 42543 78098 I BU Gem 060615.3+225552061219.1+225430188.22 2.19 6.39 +2.24 +2.48 +1.48 M1-2Ia-Iab +0.002-0.004 +.003+022SB * -2198 69 OriBD+16 1035 42545 95365 060617.2+160911061203.3+160750194.13-01.12 4.95 -0.14 -0.58 -0.14 B5Vn +0.009-0.014 +022SB 303 * -2199 70Xi OriBD+14 1187 42560 95362 W 060615.2+141353061156.4+141232195.81-02.06 4.48 -0.18 -0.65 -0.16 B3IV +0.003-0.020 -.001+024SB1O 223 7.9 40.0AB 3* -2200 CD-27 2780 42621171339 2866 060635.8-270755061034.6-270915233.82-20.40 5.72 +1.07 +0.98 K1III -0.016-0.046 +001 -2201 40 CamBD+60 938 42633 13772 I W 060641.5+600137061540.6+595957154.43 19.01 5.35 +1.34 K3III +0.033-0.021 +012V? 5.1 102.7 -2202 BD-04 1393 42657132941 4799 V638 Mon 060647.3-043834061143.7-043956212.58-10.95 6.18 -0.08 -0.37 B9pHgMn -0.011-0.009 +023 74 1.7 0.8 * -2203 CD-40 2291 42682217753 2864 060656.6-402006061010.3-402113247.37-24.63 5.58 +1.68 +2.00 M2II-III -0.026+0.076 -019 -2204 CD-49 2084 42683217747 060652.8-493243060923.3-493346257.28-26.90 6.49 +0.52 F7V -0.024+0.080 +060 -2205 BD-06 1446 42690132944 060659.8-063139061151.8-063301214.32-11.77 5.05 -0.20 -0.78 B2V -0.005-0.005 +029 25 -2206 CD-26 2784 42729171356 060712.8-262736061113.5-262856233.21-20.02 6.09 -0.04 A0V -0.017+0.003 +024V -2207 BD+18 1129 42784 95397 060740.7+184224061333.4+184049192.07 0.42 6.58 -0.08 -0.43 B8Vnn +0.023-0.017 +020V? 350 * -2208 BD+10 1050 42807 95394 060739.5+103938061312.6+103739199.10-03.50 6.45 +0.67 +0.15 G2V +0.092-0.285 +.055+003 -2209 BD+69 371 42818 13788 234 060749.6+692119061850.8+691911145.16 22.46 4.80 +0.03 0.00 -0.01 A0Vn +0.002-0.107 +.008-007SB 320 -2210 BD-02 1512 42824132965 060743.2-022848061244.4-023016210.74-09.75 6.62 +0.05 +0.08 A2V -0.045+0.012 -004 -2211 CD-45 2349 428342177582472 060747.4-451535061039.9-451655252.67-25.77 6.31 -0.03 -0.04 A0V +0.005+0.005 +020 -2212 Del PicCP-54 980 42933234359 235 Del Pic 060821.0-545646061017.9-545807263.30-27.68 4.81 -0.23 -1.03 -0.26 B3III+O9V -0.003+0.005 +031SB2O 221 * -2213 BD-17 1398 42927151227 060821.7-174416061246.3-174547224.88-16.35 6.52 -0.17 B3III -0.008+0.017 +008 -2214 BD+17 1182 42954 95419 W 060838.1+175605061428.6+175423192.85 0.24 5.88 +0.22 +0.15 +0.11 A5Vm -0.009-0.012 +029SB 47 0.0 0.5 * -2215 1 LynBD+61 869 42973 137872479I UW Lyn 060841.6+613252061754.8+613055153.03 19.81 4.98 +1.83 +2.06 M3IIIab -0.014-0.006 +.006+011 * -2216 7Eta GemBD+22 1241 42995 78135 I 4841 Eta Gem 060850.4+223209061452.6+223024188.85 2.52 3.28 +1.60 +1.66 +1.31 M3III -0.068-0.012 +.014+019SBO 2.0 0.0 O 3* -2217 BD+36 1388 43017 589051167 4849A 060854.6+361042061539.0+360855176.81 9.05 6.92 +0.45 -0.02 F4IV -0.065+0.003 +007 0.6 11.3AB 4* -2218 BD-03 1345 43023132994 060855.7-034251061354.3-034429211.99-10.05 5.83 +0.94 +0.64 +0.32E G8III -0.011+0.025 +050V * -2219 44Kap AurBD+29 1154 43039 781431168I 2877 060900.3+293206061522.7+292953182.72 5.92 4.35 +1.02 +0.80 +0.54 G8.5IIIb -0.073-0.262 +.018+020V? < 19: -2220 71 OriBD+19 1270 43042 95432 4842 060857.8+191126061450.9+190923191.80 0.92 5.20 +0.44 0.00 F6V -0.098-0.188 +.041+036 13 5.6 25.4AB 4* -2221 Nu DorCP-68 474 431072494611166 060922.7-684919060844.2-685036279.01-29.00 5.06 -0.08 -0.21 B8V -0.052+0.018 +018V? 121 -2222 BD+13 1173 43112 954442474I:W 2878 060928.0+135251061508.5+135104196.49-01.55 5.91 -0.23 -0.95 B1V +0.023+0.006 +036V? 6.6 21.3 * -2223 72 OriBD+16 1060 43153 95447 060939.1+161026061525.1+160835194.51-00.40 5.30 -0.14 -0.46 B7V +0.003-0.012 +022V 91 -2224 BD-04 1421 43157133003 4846 060940.0-043220061436.7-043406212.83-10.27 5.83 -0.17 -0.65 B5V -0.008+0.006 +020 6.0 1.7 -2225 CD-23 3577 43162171428 060937.3-235012061345.1-235143230.86-18.52 6.39 +0.72 G5 -0.069+0.118 +022V? -2226 CD-29 2883 43179171425 060941.3-292203061333.3-292346236.31-20.57 6.54 -0.10 B7V -0.025-0.013 +018V -2227 5Gam MonBD-06 1469 432321330122475I 4853 060958.6-061439061451.3-061629214.40-10.98 3.98 +1.32 +1.41 +0.64 K1.5IIIBa0.3 -0.008-0.019 +.013-005V? 9.0 51.4 * -2228 42 AurBD+46 1122 43244 40999 061007.4+462726061734.7+462527167.55 13.89 6.52 +0.27 +0.09 +0.14 F0V -0.043+0.019 -008V 195 * -2229 73 OriBD+12 1081 43247 95457 061007.9+123457061545.0+123304197.71-02.04 5.33 -0.02 -0.13 B9II-III -0.001+0.001 +013V 59 -2230 8 GemBD+24 1182 43261 78168 D 061012.4+240009061619.0+235812187.72 3.50 6.08 +0.90 +0.62 +0.49 G8III -0.015-0.009 -021 0.0 0.1 * -2231 BD+06 1172 43285113650 061018.6+060553061540.1+060358203.42-05.13 6.07 -0.13 -0.52 B6Ve -0.008-0.024 +026 290 -2232 BD+04 1181 433171136532478 061029.6+041856061547.0+041701205.02-05.94 6.64 -0.17 -0.65 B3IV -0.001-0.004 +013SB -2233 BD-00 1234 433181330282477 061029.1-002828061534.3-003044209.27-08.21 5.65 +0.50 0.00 F6V -0.158-0.219 +.036-037V =< 6 -2234 BD-04 1431 43319133027 4865 061033.6-045256061529.7-045455213.24-10.23 5.99 +0.09 +0.10 A5IV s +0.025-0.045 +031V? 95 4.2 4.1 -2235 BD+17 1191 43335 95473 I 061035.1+171253061623.8+171053193.71 0.30 6.39 +1.58 +1.79 K5II -0.002-0.014 +039V? -2236 BD+01 1275 43358113656 W 061043.9+011202061554.0+011009207.81-07.36 6.37 +0.46 -0.01 F5IV: -0.005+0.034 +003SB2 22 0.0 0.2 * -2237 BD-08 1368 43362133029 4866 061040.1-090015061526.0-090207217.00-12.07 6.10 -0.08 -0.31 B9III -0.035+0.015 -.003+019V 0.0 0.2 * -2238 2 LynBD+59 959 43378 25665 237 UZ Lyn 061048.0+590250061937.4+590039155.59 19.12 4.48 +0.01 +0.03 -0.01 A2V s v-0.008+0.026 +.035-004V? 20 * -2239 43 AurBD+46 1124 43380 41010 061049.4+462358061816.9+462138167.66 13.97 6.38 +1.11 +1.12 K2III +0.012-0.126 +000 * -2240 9 GemBD+23 1275 43384 78176 061052.6+234629061658.7+234427187.99 3.53 6.25 +0.45 -0.38 +0.40 B3Ib 0.000-0.001 +013V 51 * -2241 74 OriBD+12 1084 43386 954761169 W 061049.6+121800061626.6+121620198.04-02.03 5.04 +0.42 -0.02 F5IV-V +0.082+0.186 +.041+009V? 17 4.2 204.0AC 3 -2242 BD-20 1336 43396171458 I 061050.3-201429061508.4-201620227.51-16.84 5.91 +1.32 +2.43 K0 +0.005+0.030 +052V -2243 BD-18 1352 43429151274 061054.6-182637061517.5-182836225.81-16.09 5.99 +1.06 +0.96 K0 +0.016-0.048 +065V -2244 BD-13 1411 43445151283 061109.9-134108061544.9-134306221.37-14.02 5.01 -0.08 -0.23 -0.05 B9Vn +0.011-0.009 +038V 235 -2245 Eta2DorCP-65 561 434552494692473 2873 061102.0-653356061115.0-653522275.31-28.65 5.01 +1.62 +1.86 +1.24 M2.5III -0.026+0.112 +.009+035 -2246 BD+01 1278 43461113668 061111.1+010650061621.2+010449207.94-07.30 6.63 -0.05 -0.44 B6V +0.016-0.008 +022 -2247 75 OriBD+09 1173 435251136752480 4890 061135.8+095844061706.6+095633200.16-02.99 5.39 +0.10 +0.09 A2V +0.007-0.061 +.013+012 192 0.2 0.1AP 5* -2248 BD+07 1216 43526113673 061134.6+070515061658.4+070311202.70-04.38 6.57 -0.12 -0.51 B7III -0.011+0.009 +041 -2249 BD-16 1415 43544151294 2891 061140.1-163504061607.7-163704224.13-15.15 5.92 -0.17 -0.75 -0.14 B2.5Vn e-0.002+0.008 +014 * -2250 BD+14 1233 43583 95494 061152.5+140540061733.3+140330196.59-00.94 6.59 -0.03 -0.10 A0V 0.000-0.012 +003 74 -2251 BD+05 1168 43587113683 W 2896 061158.2+050753061716.1+050601204.47-05.23 5.71 +0.61 +0.10 F9V -0.216+0.159 +.050+013V? =< 6 3.9 189.7AB 4 -2252 CD-29 2936 43636171482 061206.1-294516061557.2-294718236.90-20.22 6.67 +1.55 K4III +0.004+0.008 +036V? -2253 BD+14 1235 43683 955022481 4901 061224.0+142511061805.6+142258196.37-00.67 6.16 +0.01 +0.03 A3V -0.007+0.004 +008V? 120 6.9 25.4AC 3* -2254 BD-22 1364 43745171502 W 061251.1-224018061703.5-224254230.04-17.38 6.07 +0.56 +0.07 G0V +0.119-0.251 +.018-004V 4.4 47.6 * -2255 6 MonBD-10 1455 43760151318 061253.0-104117061735.2-104331218.79-12.33 6.75 +0.35 +0.20 +0.18 F0Del Del -0.002-0.007 +027V? =< 15 -2256 Kap ColCD-35 2800 43785196643 238 2897 061259.6-350626061633.1-350826242.35-21.89 4.37 +1.00 +0.83 +0.51 K0.5IIIa 0.000+0.086 +.025+024 * -2257 4 LynBD+59 964 43812 25678 4950 061311.1+592454062203.6+592220155.35 19.54 5.94R A3V -0.001+0.004D+.005-024V? 155 1.1 0.7AB 5* -2258 BD+17 1203 43819 95519 V1155 Ori061312.9+172152061901.8+171930193.88 0.92 6.32 -0.07 -0.30 B9IIIpSiCr: -0.009-0.009 +000V 35 * -2259 BD+09 1184 43821113710 061311.7+090513061840.5+090250201.14-03.07 6.24 +0.87 +0.52 K0 +0.030-0.044 -014SB1O * -2260 BD-16 1426 43827151322 I 2903 061314.7-164642061741.7-164857224.48-14.89 5.14 +1.30 +1.23 K3III -0.011+0.008 +.017-008 * -2261 Alp MenCP-74 374 43834256274 239 061313.2-744307061014.4-744511285.75-28.80 5.09 +0.72 +0.33 +0.32 G6V +0.118-0.213 +.115+035 -2262 CD-39 2491 43847196646 061317.3-391339061635.6-391552246.60-23.14 6.00 +0.16 A2Vm: -0.013-0.022 -004 -2263 CD-37 2707 43899196653 061337.0-374209061701.2-374415245.05-22.61 5.53 +1.14 +1.11 K1III +0.002+0.081 +067 * -2264 45 AurBD+53 1008 43905 256812484 061338.6+532952062146.1+532708161.14 17.33 5.36 +0.43 +0.12 F5III +0.020-0.084 +.022-001SB1O 14 * -2265 CD-37 2708 43940196659 061343.6-371255061709.5-371511244.56-22.43 5.87 +0.14 A3V -0.011-0.010 +021V? -2266 BD-19 1407 439551513342483 061354.8-195541061813.7-195801227.52-16.05 5.52 -0.18 B2V -0.005+0.007 +023SB 88 -2267 BD-09 1411 43993133091 I 061405.2-092058061850.6-092325217.70-11.47 5.36 +1.24 +1.32 K1.5III +0.003-0.033 +007 -2268 BD-14 1400 44021151346 I 2912 061417.1-145907061848.8-150129222.91-13.90 6.06 +1.66 +1.87 +0.86E M0III -0.003+0.022 +051 * -2269 BD+14 1247 44033 95543 I 2917 061422.0+144136062004.2+143904196.36-00.12 5.69 +1.61 +1.87 K3Ib -0.003-0.014 +036 * -2270 BD-08 1386 44037133098 061420.8-083244061907.9-083511216.99-11.05 6.22 -0.04 -0.14 B9V -0.022-0.010 +004 -2271 BD-20 1355 44081171549 2915 061442.6-205305061859.0-205534228.51-16.27 5.81 -0.15 B4IV -0.009-0.009 +031 * -2272 BD+29 1190 44092 78259 061448.9+293509062112.1+293228183.28 7.06 6.43 +0.06 +0.01 A1V s +0.035-0.039 +021V 54 -2273 7 MonBD-07 1373 441121331141170 S 061453.7-074651061942.8-074923216.36-10.59 5.27 -0.19 -0.75 B2.5V -0.004 0.000 +029SB 152 -2274 CP-59 619 44120234418 W 061455.5-591000061618.5-591249268.17-27.47 6.43 +0.59 +0.14 G0V -0.057-0.325 +.043-003 1.0 38.3AB 3* -2275 BD-02 1564 44131133118 I 2918 061459.1-025407061959.6-025640211.97-08.34 4.90 +1.60 +1.96 M1III -0.013+0.004 -.001+047V? -2276 BD+11 1128 44173 95563 061517.0+114801062052.3+114523199.00-01.32 6.54 -0.10 -0.56 B5III +0.023+0.003 +019 -2277 BD+17 1214 44234 95572 061535.7+174835062125.9+174549193.76 1.63 6.35R g:G9 +0.019-0.039 +010 -2278 CP-52 902 44267234430 061539.3-524133061751.7-524359261.05-26.20 6.41 +1.46 K2-3III +0.003-0.006 -005 -2279 CD-34 2795 44323196686 061604.7-342112061941.0-342348241.81-21.04 5.78 -0.08 -0.26 B9V +0.014+0.001 +026 -2280 BD+02 1197 44333113758 4971 2932 061613.2+021854062125.8+021607207.47-05.63 6.31 +0.24 +0.09 A4.5V -0.016-0.026D+.012-028V 160 0.6 0.3 * -2281 CD-50 2169 44362234442 061620.1-501900061846.8-502133258.49-25.58 7.04 +0.83 G2Ib +0.006+0.003 +017 -2282 1Zet CMaCD-30 3038 44402196698 240 W 2927 061628.4-300108062018.8-300348237.52-19.43 3.02 -0.19 -0.72 -0.18 B2.5V +0.009+0.003 +.004+032SBO 63 4.6 175.5 * -2283 CP-71 426 44447256285 061641.8-713957061505.9-714210282.28-28.49 6.64 +0.56 +0.01 F8V -0.025+0.061 +014 -2284 BD-11 1460 44458151401 4978 FR CMa 061645.1-114337062124.7-114624220.17-11.94 5.64 -0.02 -0.85 +0.06 B1Vpe v-0.009-0.005 +016SB 265 4.2 4.2AB 3* -2285 BD+70 401 44472 5861 5039 061650.3+703523062814.6+703208144.14 23.58 5.97R A4V +0.002+0.023 -030V 80 5.9 5.7 * -2286 13Mu GemBD+22 1304 44478 78297 241I 4990 Mu Gem 061654.6+223354062257.6+223049189.72 4.17 2.88 +1.64 +1.85 +1.38 M3IIIab e+0.054-0.111 +.020+055V? 8.1 121.7AxBC 3* -2287 BD+12 1123 44497 95599 061659.6+123709062236.5+123412198.48-00.56 6.00 F0III -0.033-0.037 +021V 75 -2288 CD-34 2806 44506196707 2931 061659.1-340557062036.3-340838241.63-20.78 5.53 -0.19 -0.88 B1.5Ve +0.005+0.028 +054V 211 * -2289 46Psi1AurBD+49 1488 44537 41076 242I Psi1 Aur 061711.8+492020062453.9+491717165.35 16.17 4.91 +1.97 +2.29 +1.07 K5-M0Iab-Ib -0.002-0.001 +.007+005SB * -2290 CD-48 2259 445942178612486I' 061728.1-484117062006.1-484428256.80-25.01 6.60 +0.66 +0.20 G3V +0.231-0.271 +.041+060 -2291 BD+56 1125 44691 257312491 RR Lyn 061759.3+562018062625.8+561706158.63 19.00 5.64 +0.24 +0.12 +0.10 A3Vm -0.026+0.022 +.023-010SB1O 37 * -2292 BD+03 1221 44700113801 061802.3+034854062318.5+034552206.36-04.52 6.40 -0.15 -0.63 B3V +0.006-0.013 +030SB * -2293 5 LynBD+58 927 44708 25733 I 5036 061805.0+582819062648.9+582502156.53 19.78 5.21 +1.53 +1.88 K4III -0.005-0.009 +.005-003SB < 19: 2.6 95.4AC 3* -2294 2Bet CMaBD-17 1467 44743151428 243I W Bet CMa 061817.7-175422062242.0-175721226.06-14.27 1.98 -0.23 -0.98 -0.24 B1II-III -0.006 0.000 +.019+034SB 36 7.8 185.9 * -2295 BD-04 1484 44756133199 061826.3-043811062322.7-044114213.93-08.37 6.67 +0.06 +0.01 A2V -0.013-0.007 +017 -2296 Del ColCD-33 2927 44762196735 061827.5-332309062206.8-332611241.03-20.24 3.85 +0.88 +0.52 +0.47 G7II -0.024-0.055 +.019-003SBO * -2297 BD+29 1213 44766 78333 061829.4+294536062452.6+294226183.50 7.85 6.71 -0.06 -0.39 B8IIIn -0.032-0.009 +029 250 -2298 8Eps MonBD+04 1236 44769113810 244 5012A 061828.1+043838062346.1+043534205.68-04.03 4.44 +0.18 +0.13 +0.10 A5IV -0.018+0.011 +.025+015SB 124 2.2 12.9AB 3* -2299 BD+04 1237 44770113811 5012B 061828.5+043850062346.5+043544205.67-04.03 6.72 +0.45 -0.05 F5V -0.021-0.010 +.025+016 =< 25 2.2 12.9AB 3* -2300 BD+08 1316 44783113817 061834.1+085613062402.3+085305201.90-01.97 6.26 -0.08 -0.31 B8Vn -0.005-0.018 +003V 65 * -2301 BD-09 1444 44816133203 I 061851.7-094924062336.0-095228218.67-10.63 6.19 +1.84 +2.05 K5 +0.008+0.018 +029V -2302 BD+16 1135 44867 95641 061906.9+160642062452.9+160325195.66 1.56 6.33 +1.08 +0.91 G9III +0.040-0.046 +077SB -2303 BD-14 1428 44891151450 I 061914.5-150109062346.0-150418223.47-12.83 6.24 +1.53 K2 -0.015-0.007 +037V? -2304 BD+23 1347 44927 78349 D 061928.2+232256062532.9+231937189.28 5.07 6.06R -0.03 +0.07 A2Vn -0.010-0.023 -027V? 220 0.4 0.1 * -2305 BD-11 1478 449511514581171I 061930.4-112834062410.3-113149220.25-11.22 5.22 +1.24 +1.20 K3III -0.054-0.035 +.016-026 < 19: -2306 BD-19 1435 44953151453 5023 2944 061928.1-194400062347.6-194707227.89-14.78 6.60 -0.15 -0.64 B8IIIHe wk -0.017+0.014D+.003+024 0.3 0.8 * -2307 CD-31 3245 44956196759 061929.8-314419062314.4-314724239.47-19.45 6.34 +0.89 G8III -0.056+0.013 +015 -2308 BD+14 1283 44984 95659 I BL Ori 061945.8+144637062528.1+144319196.91 1.06 6.24 +2.34 +3.40 +1.28 C5II -0.014-0.002 +013 * -2309 BD-12 1470 44996151461 5030 061943.8-125431062420.5-125745221.58-11.80 6.12 -0.08 -0.63 B5Ve -0.012-0.012 +008V 120 4.4 23.2 * -2310 BD+07 1273 44990113845 T Mon 061949.0+070825062513.1+070509203.63-02.55 5.98 +1.22 +1.04 +0.65 F7Iab-K1Iab +0.017+0.004 +.005+032SB 21 * -2311 CD-25 3189 450181716882490I 061952.1-253124062355.9-253440233.44-17.04 5.63 +1.56 +1.90 K5III +0.008-0.042 +034V? -2312 BD+01 1332 45050113855 W 062007.6+013324062518.4+013004208.60-05.12 6.66 -0.04 -0.22 B9V -0.017-0.011 +007 150 0.0 0.1 -2313 BD-00 1287 45067133229 062009.7-005305062516.4-005646210.78-06.25 5.87 +0.56 +0.08 +0.20E F8V +0.224-0.225 +.027+044 =< 10 -2314 BD+47 1299 45105 41109 062019.1+472747062751.1+472419167.36 15.89 6.56 -0.04 -0.12 A0V -0.004+0.020 -012 31 -2315 BD+02 1227 45137113868 062033.8+021942062546.6+021620207.97-04.66 6.51 -0.03 -0.07 A0V +0.005-0.002 +024 120 -2316 CD-36 2873 45145196774 W 062032.8-363919062401.0-364228244.46-20.96 5.62 +1.04 +0.87 G6III -0.015+0.055 +053 1.2 64.8AC 3 -2317 BD-03 1425 45168133238 062048.8-034957062547.1-035321213.48-07.48 6.35 +1.02 +0.77 G9III -0.020-0.005 +012SBO * -2318 CD-28 2981 45184171711 I' 062050.7-284317062443.9-284648236.62-18.07 6.39 +0.62 G2IV -0.159-0.115 -005V? * -2319 BD+32 1300 45192 59096 062103.1+323726062735.5+323347181.17 9.64 6.43 +1.26 K0 -0.002-0.058 +057 -2320 Nu PicCP-56 1072 45229234473 062108.7-561857062255.8-562212265.18-26.16 5.61 +0.24 +0.13 +0.14 Am -0.034-0.024 +007V? 0 -2321 BD-07 1422 45239133246 062109.8-075016062558.8-075339217.13-09.23 6.40 +0.14 +0.12 A4V -0.004+0.019 +031 -2322 CP-52 913 45291234475 062121.8-520734062337.7-521052260.64-25.23 5.98 +1.04 G8III -0.025-0.023 +011 -2323 CD-40 2440 453062179102492 062129.7-401340062444.5-401703248.16-21.95 6.31 -0.05 B9V -0.003-0.009 +023V -2324 BD-01 1242 453201332602493 062135.7-012653062639.6-013026211.45-06.20 5.87 +0.08 +0.09 A3Vn -0.007-0.026 +010V 270 -2325 BD-04 1510 45321133257 062137.7-043220062634.5-043550214.21-07.62 6.15 -0.14 -0.62 B2.5V +0.007-0.002 +010 185 * -2326 Alp CarCP-52 914 45348234480 245I 062143.9-523827062357.1-524145261.21-25.29-0.72 +0.15 +0.10 +0.18 F0II +0.022+0.021 +.028+021 0 * -2327 BD+00 1421 45357113896 062149.5+005401062658.7+005027209.38-05.05 6.71 +0.04 0.00 A1Vn -0.020-0.004 +010 143 -2328 BD-07 1429 45380133263 5070 062154.9-072708062644.9-073041216.86-08.89 6.27 -0.04 -0.10 A0Vn +0.006-0.001 +020 146 2.3 21.1 * -2329 CD-34 2864 45383196805 W 062155.8-350020062529.9-350350242.91-20.13 6.25 +1.36 +1.59 K3III -0.005-0.035 +019 1.1 132.2AB 3 -2330 16 GemBD+20 1428 45394 78402 062159.8+203323062756.6+202946192.06 4.26 6.22 +0.01 +0.18 A2V s -0.035+0.007 +039 -2331 6 LynBD+58 932 45410 25771 W 062206.0+581410063047.2+580946156.97 20.19 5.88 +0.94 +0.66 K0III-IV -0.026-0.335 +.025+036 3.0 179.6 -2332 48 AurBD+30 1238 45412 59128 RT Aur 062208.4+303318062834.1+302935183.15 8.92 5.55 +0.68 +0.50 F8Ib v+0.002-0.013 +.005+022V 0 * -2333 BD+02 1237 45415113906 062206.6+025804062720.4+025429207.59-04.02 5.55 +1.04 +0.86 +0.36E G9III -0.046+0.008 +053 -2334 BD+00 1426 45416113905 I 062205.6+002133062713.8+001757209.90-05.25 5.20 +1.18 +1.13 K1II +0.007-0.008 +.005+033 * -2335 BD-00 1299 45433133269 I 062208.8-001257062715.6-001634210.41-05.50 5.55 +1.38 +1.61 K5III 0.000-0.008 +039V? * -2336 CP-58 692 45450234482 062216.5-582919062346.9-583238267.59-26.42 6.48 +0.12 A3V +0.010+0.021 +023SB2 * -2337 CP-63 561 45461249531 062222.9-633743062301.3-634059273.28-27.23 6.27 +1.60 +2.01 +0.90E M1III -0.024+0.013 -014 -2338 47 AurBD+46 1149 45466 411302496I 062234.7+464457063003.0+464108168.20 15.95 5.90 +1.44 gK4 -0.006+0.003 +.017-047 -2339 BD+27 1122 45504 78417 D 062240.7+270156062856.6+265804186.37 7.41 6.47R F5 +0.116-0.067 -070 =< 10 0.9 0.0 * -2340 BD+16 1159 45506 957192494 062242.6+161806062828.0+161418195.90 2.41 6.23 +0.90 +0.60 G5 -0.095-0.047 +041 -2341 CP-52 919 45509234488 062235.9-524457062448.2-524823261.36-25.19 6.51 +1.70 K5-M0III -0.007+0.002 +036 -2342 BD+10 1149 45512 95718 062247.0+102201062818.8+101814201.14-00.38 6.15 +1.15 +1.18 K2III-IV +0.026-0.039 -020 -2343 18Nu GemBD+20 1441 45542 784231173 5103 062301.5+201632062857.8+201244192.42 4.35 4.15 -0.13 -0.48 -0.11 B6IIIe -0.007-0.014 +.009+039SB 219 1.7 0.2AA' 8* -2344 10 MonBD-04 1526 45546133290 246 W 062301.2-044201062757.6-044544214.52-07.39 5.06 -0.17 -0.76 -0.17 B2V -0.005-0.001 +025V? 79 4.2 77.2AB 3* -2345 CP-60 608 45557249535 062259.5-601330062413.7-601652269.52-26.63 5.80 0.00 -0.01 A0V -0.041+0.036 +010 -2346 BD+79 208 45560 5911 062305.5+794033064016.8+793558134.52 26.15 6.54R A1V +0.001+0.017 -007 92 -2347 BD+02 1244 45563113929 062304.9+015831062816.8+015444208.58-04.27 6.48 -0.07 -0.16 B9V -0.002-0.027 +042 80 -2348 CD-48 2308 45572217922 W 062304.7-480702062543.6-481038256.45-23.97 5.76 -0.06 -0.16 -0.03C B9V -0.005-0.032D+.003+006 2.5 1.2 -2349 CD-25 3237 45588171774 W 062309.5-254722062711.2-255124234.00-16.46 6.07 +0.53 +0.05 F9V -0.186-0.218 +.045+036V? 6.5 43. -2350 BD+82 177 45618 10433950 062322.6+821157064430.2+820655131.75 26.61 6.65 +0.17 +0.06 A5V +0.010-0.052 +006 55 -2351 BD+11 1193 45638 95732 062326.9+110500062900.0+110110200.58 0.10 6.59 A9IV -0.027-0.010 +041 42 -2352 Pi 1DorCP-69 607 45669249532 062334.9-695544062238.2-695903280.35-27.82 5.56 +1.51 +1.83 K5III +0.020+0.029 +016V? -2353 CD-37 2837 45680196842 W 062343.5-375006062707.5-375344245.88-20.76 6.48 +0.39 F3V -0.011+0.042 +030 7.0 32.8 -2354 CP-63 568 45701249539 I' 062344.5-632203062426.3-632544273.01-27.04 6.46 +0.66 G3III-IV -0.007-0.103 +023 -2355 BD+02 1253 45724113940 I W 062401.2+024242062914.9+023846208.04-03.72 6.16 +1.54 +1.86 gM1 +0.009-0.040 +009 4.0 19.3 -2356 11Bet MonBD-06 1574 45725133316 5107A 2977 062358.0-065808062849.0-070158216.66-08.21 4.60 -0.10 -0.63 -0.16 B3Ve v-0.017 0.000 +.021+020SBO 346 0.5 7.1AB 4* -2357 11Bet MonBD-06 1575 45726133317 5107B 2977 062358.5-065814062849.5-070204216.66-08.21 5.40 -0.07 -0.52 B3ne -0.017+0.005 +.021+018 123 0.5 7.1AB 4* -2358 11Bet MonBD-06 1575 45727 5107C 2977 062358.5-065814062849.5-070204216.66-08.21 5.60H B3e -0.016+0.005 +.021+023 331 0.5 7.1AB 4* -2359 BD-17 1506 45765151546 062411.7-172408062837.3-172758226.20-12.78 5.77 +1.12 G5 -0.007+0.004 +018V -2360 CP-63 572 45796249542 062418.5-634608062455.6-634940273.47-27.04 6.27 -0.13 -0.45 B6V -0.014+0.026 -001 -2361 Lam CMaCD-32 3066 45813196857 062427.7-323101062810.1-323448240.64-18.76 4.48 -0.17 -0.61 -0.16 B4V -0.018+0.024 +.013+041 135 -2362 BD+09 1259 45827113957 062437.1+090546063005.5+090145202.47-00.58 6.57 +0.14 -0.06 A0III -0.017-0.026 +014SB? * -2363 BD+78 227 45866 59192507I 062456.8+780431064028.8+775945136.29 25.92 5.73 +1.47 gK5 +0.009-0.012 +.018-014 -2364 CD-32 3072 45871196861 W Var 062455.9-321824062839.2-322216240.47-18.59 5.74 -0.17 -0.65 B4Vnpe -0.003+0.017D+.006+023 2.0 1.2 * -2365 BD+73 340 45947 59092503 062517.4+734622063754.9+734144140.95 25.02 6.24 +0.38 +0.01 F2 -0.155-0.018 +.039+006 30 -2366 BD+17 1275 45951 95765 5146 062522.2+170030063110.1+165619195.57 3.31 6.20 +1.16 +1.06 K2III +0.001-0.049 +027SB 4.0 8.0AB 3* -2367 BD-09 1493 459761515732497I 062527.5-100050063011.3-100453219.58-09.26 5.93 +1.38 K0 -0.011+0.002 +020V? -2368 CD-40 2482 45983217951 062530.2-410034062842.3-410428249.22-21.47 6.32 +0.40 F2-3V +0.030+0.028 +017 -2369 CP-57 1001 45984234519 062529.1-575618062704.0-580008267.08-25.90 5.82 +1.28 K3III -0.015-0.014 +013 -2370 BD+11 1204 45995 95766 5153A 062535.7+111913063109.5+111503200.62 0.68 6.14 -0.08 -0.86 B2V:nne -0.005-0.016D+.009+020 293 2.8 16.1 * -2371 19 GemBD+16 1178 46031 95778 062552.2+155825063137.4+155412196.55 2.93 6.40R A8V -0.016-0.015 +021 97 -2372 BD+32 1324 46052 591942500 WW Aur 062555.6+323134063227.2+322717181.72 10.52 5.87 +0.14 +0.15 +0.02 A3m+A3m: -0.031-0.022 -009SB2O 35 * -2373 BD-13 1519 46064151585 5148 062558.4-130447063034.7-130853222.42-10.51 6.16 -0.15 B1.5V -0.024+0.002 +002 5.0 33.2 * -2374 BD+11 1207 46075 95783 062604.3+115145063139.2+114732200.20 1.04 6.65 -0.12 -0.42 B6III -0.030-0.012 +010 70 * -2375 BD+11 1209 46089 95788 062613.6+113650063148.3+113240200.44 0.95 5.23 +0.15 +0.13 A3V +0.013+0.032 +.010-003V 124 * -2376 7 LynBD+55 1093 46101 25814 I 062613.5+552535063432.8+552111159.97 19.75 6.45R K0III: +0.002+0.004 -020 -2377 Pi 2DorCP-69 614 461162495502495 062619.8-693759062528.6-694125280.04-27.55 5.38 +0.97 +0.67 +0.36E G8III -0.016+0.195 +.007+009 * -2378 BD+11 1213 46178 95803 5170 062648.4+114446063223.3+114025200.39 1.14 6.03 +1.07 K0III +0.010-0.031 -021 4.2 31.1 * -2379 BD-12 1518 46184151602 I W 062644.4-121915063123.0-122330221.81-10.01 5.15 +1.27 +1.38 K3III +0.040-0.016 +.022+017V? < 19: 8.3 14.8 -2380 CD-27 3051 461891718662499 062648.7-274200063046.3-274610236.17-16.46 5.93 -0.15 -0.67 B2.5V -0.007+0.011 +020V -2381 BD-08 1462 46229133369 I 062701.7-080511063150.1-080929218.02-08.05 5.43 +1.38 +1.52 gK2 -0.012-0.008 +003V -2382 12 MonBD+04 1304 46241114023 3017 062700.7+045540063219.2+045121206.43-02.02 5.84 +0.99 +0.79 +0.53 K0V -0.037-0.006 +021V * -2383 BD+33 1356 46251 59222 062709.0+330552063342.7+330127181.32 11.00 6.42R +0.03 +0.13 A3V +0.011+0.010 -009 -2384 CD-50 2241 46273234539 W 062721.5-501006062949.1-501421258.81-23.84 5.27 +0.41 F2V -0.054-0.058 +.027+002SB 133 0.1 0.5AB 4* -2385 13 MonBD+07 1337 463001140341174 062729.7+072423063254.2+071959204.30-00.75 4.50 0.00 -0.18 +0.04 A0Ib -0.001-0.006 +.007+012 17 * -2386 BD-05 1678 46304133382 W 062729.3-054743063223.1-055208216.01-06.90 5.60 +0.25 +0.07 F0Vnn -0.001-0.042 -021 7.7 4.2 -2387 4Xi 1CMaCD-23 3991 46328171895 5176 Xi1 CMa 062741.3-232047063151.3-232506232.11-14.53 4.33 -0.24 -0.99 -0.27 B0.5IV -0.006+0.012 +027SB 27 9.6 24.6AB 3* -2388 CD-35 2947 46349196897 062739.3-351116063113.0-351533243.53-19.10 5.84 +0.81 +0.53 G8III -0.011 0.000 +014V * -2389 CP-56 1095 463552345412498 3000 062744.4-564703062928.5-565110265.89-25.36 5.22 +1.09 K0III -0.040+0.031 +.010+013 -2390 CD-40 2512 46365217986 062747.3-405043063059.8-405459249.20-21.01 6.20 +1.40 K3III -0.017 0.000 +051V? -2391 BD+14 1339 46374 95830 062755.4+141356063336.1+140919198.32 2.55 5.53 +1.11 gK2 -0.019-0.085 -012V? -2392 BD-11 1520 46407151625 3024 062805.7-110534063246.9-110959220.85-09.17 6.24 +1.11 +0.78 +0.48 G9.5III:Ba3 -0.007+0.001 -011V * -2393 CD-36 2962 464311969062501I: SX Col 062807.1-365211063135.0-365624245.23-19.61 6.34 +1.63 +1.91 M1III +0.005+0.072 +054 * -2394 8 LynBD+61 893 46480 13897 247 W 062833.1+613409063741.4+612852153.87 22.04 5.94 +0.89 +0.52 G8IV-V -0.209-0.274 +.027-046 3.0 157.0AB 4 -2395 BD-01 1274 464871334041175 062833.3-010840063337.9-011313211.99-04.52 5.10 -0.14 -0.56 B5Vn -0.003-0.021 +025V 300 -2396 BD+71 359 46509 59252511 062843.2+714956064032.2+714456143.09 24.82 5.92 +1.19 K0III -0.002+0.015 -023 -2397 CD-31 3407 46547196919 W Var 062854.4-315722063239.0-320150240.46-17.68 5.69 -0.17 -0.79 B2IVe -0.001-0.002 +020V 120 3.0 24.7 * -2398 49 AurBD+28 1168 46553 785242504 3032 062854.1+280601063512.1+280120186.04 9.13 5.27 -0.03 -0.08 A0Vnn -0.002-0.015 +.000+017 149 -2399 CD-37 2889 46568196917 062855.7-373713063221.3-374148246.04-19.72 5.24 +1.00 G8III +0.065-0.077 +.016+039 -2400 CD-51 1946 46569234551 062858.1-514521063118.3-514934260.56-24.00 5.60 +0.54 +0.04 F8V +0.105+0.094 +016 -2401 BD+79 212 46588 5946 248 062910.2+794022064614.1+793353134.59 26.41 5.45 +0.50 -0.02 F8V -0.102-0.604 +.049+013SB1O * -2402 11 LynBD+56 1136 46590 25842 062908.3+565617063738.5+565127158.61 20.64 5.85 A2V 0.000+0.012 +000V? -2403 BD-20 1437 46602171940 062910.0-205050063326.6-205526229.92-13.18 6.40 +0.83 G5 -0.030-0.026 -002V -2404 14 MonBD+07 1357 46642114085 5211 3031 062921.4+073901063446.4+073421204.30-00.23 6.45 -0.02 -0.03 A0V s -0.010-0.004 +038 56 4.0 10.5 * -2405 BD+38 1539 46687 59280 I W UU Aur 062940.3+383134063632.9+382643176.52 13.78 5.29 +2.61 +1.43 C5II +0.005-0.026 +.005+012 5.6 17.9 * -2406 BD+10 1186 46709 958702505I 062946.8+100402063517.6+095918202.21 1.00 5.88 +1.51 +1.85 K4III -0.001-0.010 +039V -2407 CD-38 2730 46727196930 062948.5-383254063310.3-383731247.03-19.88 6.44 +1.00 G8III +0.006-0.022 +029 -2408 CP-65 610 467302495682502 062946.8-652951063003.0-653406275.48-26.71 6.29 +0.33 +0.06 F0III +0.002+0.058 +006SB2 * -2409 BD+00 1491 46769114097 063006.3+005810063515.8+005324210.29-03.19 5.80 0.00 -0.45 B8Ib -0.001-0.006 +010 -2410 CP-61 669 46792249572 063010.9-614820063110.6-615247271.43-26.05 6.15 -0.15 B3V -0.013+0.008 +034SBO * -2411 CD-36 2990 46815196945 I 063019.1-360926063349.5-361356244.69-18.94 5.42 +1.44 +1.72 K3III -0.014+0.094 +.030+032 -2412 Mu PicCP-58 722 46860234564 W 063028.9-584042063158.4-584515268.03-25.40 5.70 -0.06 -0.18 B9Ve t+0.004-0.011 +002 3.2 2.4 * -2413 BD+04 1335 46885114115 063042.2+043442063600.0+042951207.17-01.37 6.55 -0.06 -0.28 B9III -0.021-0.005 +013V 35 * -2414 5Xi 2CMaBD-22 1458 46933171982 249 063051.9-225308063503.4-225753231.99-13.68 4.54 -0.05 -0.03 -0.02 A0V +0.011+0.016 +.025+026V 138 -2415 CD-32 3168 469361969552506 063052.8-323814063435.3-324259241.29-17.54 5.62 -0.08 -0.23 B8V +0.005-0.001 +028V -2416 CP-52 947 47001234574 063110.4-521507063326.1-521944261.18-23.80 6.19 +1.09 G8III -0.044+0.040 +006 -2417 BD+24 1328 47020 78557 063119.4+244026063727.2+243527189.38 8.07 6.44R +0.10 +0.05 A3V -0.016+0.008 -002 -2418 BD-05 1710 470541334692509 063139.9-050741063635.3-051240215.89-05.67 5.52 -0.08 -0.39 B8V e 0.000-0.017 +027 245 * -2419 51 AurBD+39 1690 47070 59316 250I 063143.7+392845063839.5+392327175.79 14.54 5.69 +1.35 +1.56 K5III -0.023-0.109 +033 * -2420 52Psi3AurBD+40 1665 47100 59319 063151.3+395918063849.2+395409175.32 14.77 5.20 -0.07 -0.40 B8III -0.009-0.012 +009V? 169 -2421 24Gam GemBD+16 1223 47105 95912 251I W 063156.1+162905063742.7+162357196.77 4.45 1.93 0.00 +0.04 -0.01 A0IV +0.042-0.042 +.033-013SB 32 9.0 143.5AC 3* -2422 BD+06 1309 47129114146 V640 Mon 063202.4+061310063724.1+060807205.87-00.31 6.06 +0.05 -0.88 O8p +0.006-0.001 +025SB2O 80 * -2423 6Nu 1CMaBD-18 1480 47138151694 5253A 063200.1-183439063622.8-183936228.11-11.61 5.70 +0.85 +0.49 G8III+F3IV-V -0.011+0.017 +025SB 1.9 17.4 * -2424 CD-36 3009 47144196978 W 063155.6-364157063524.1-364648245.35-18.84 5.59 -0.14 -0.48 A0V -0.011+0.018D+.011+023V 0.8 1.5AB 3* -2425 53 AurBD+29 1293 47152 78571 D 063202.5+290412063823.0+285903185.47 10.17 5.79 0.00 -0.07 B9npEu -0.021-0.021 +018V? 29 0.0 0.1 * -2426 BD+10 1201 47156 95914 063204.4+105619063736.9+105111201.71 1.90 6.38 K0 -0.039-0.039 +002 -2427 50Psi2AurBD+42 1585 47174 41239 I W 063211.4+423437063919.9+422920172.89 15.86 4.79 +1.23 +1.29 +0.60 K3III +0.006-0.058 +.004+017V < 17 5.5 52.1AB 3 -2428 BD-13 1570 47182151700 I 063210.4-131412063646.7-131915223.24-09.23 5.97 +1.56 K5 +0.011-0.023 -012 -2429 7Nu 2CMaBD-19 1502 472051517022510I 3047 063219.3-191014063641.0-191521228.69-11.80 3.95 +1.06 +1.01 +0.51 K1III +0.059-0.062 +.058+003 < 17 -2430 BD+02 1315 472201141542512 063226.9+024725063740.3+024215208.95-01.82 6.17 +1.08 +0.96 K1III -0.038-0.049 -008 -2431 CD-35 3005 47230196987 W 063223.3-360012063554.0-360520244.70-18.50 6.35 +0.48 G0V -0.058-0.095D+.028+028SB 0.4 0.2 * -2432 BD+05 1334 47240114162 063233.8+050231063752.7+045726206.98-00.75 6.15 +0.14 -0.74 B1Ib -0.004+0.020 +033V 126: * -2433 BD-22 1472 47247172021 5260 063228.7-223152063640.9-223654231.82-13.19 6.35 -0.11 -0.54 B5V -0.031-0.006D+.012+034V 3.6 9.1 * -2434 BD+44 1506 47270 41245 063242.6+440607063958.0+440050171.46 16.55 6.41R K1III +0.033-0.003 -030SB -2435 CP-52 953 473062345892508 063246.3-525338063458.6-525832261.93-23.73 4.39 -0.02 -0.15 +0.14 A0II -0.003+0.007 +023 45 -2436 BD+22 1416 47358 785862513 063304.3+220708063905.3+220151191.86 7.27 6.04 +1.03 G9III +0.011-0.025 -009 -2437 BD-12 1566 47366151725 063303.7-125345063740.9-125906223.03-08.89 6.12 +1.00 K0 +0.030-0.124 +009V? -2438 54 AurBD+28 1196 47395 78593 5289 3065 063314.7+282105063933.1+281547186.24 10.10 6.03 -0.08 -0.48 B7III -0.006-0.014D+.002+019SB 70 1.6 0.8 -2439 BD+24 1343 47415 78596 063323.4+244109063931.4+243600189.58 8.50 6.38 +0.53 F8IV +0.006+0.084 +018SB -2440 BD-02 1691 47420133511 I 063319.0-022726063820.5-023237213.71-04.07 6.14 +1.48 +1.77 K2 -0.018+0.015 +027 -2441 BD+04 1365 47431114194 063331.1+044718063849.5+044202207.31-00.65 6.57 -0.07 -0.33 B8IIIn +0.012-0.008 +033 * -2442 BD+01 1443 47432114191 3060 063327.0+014203063838.1+013649210.03-02.11 6.21 +0.15 -0.82 O9.5II -0.007-0.005 +058V? 100 * -2443 8Nu 3CMaBD-18 1492 47442151730 I 063329.5-180903063753.4-181415227.87-11.11 4.43 +1.15 +1.04 +0.60 K1-II-III -0.010-0.007 +.013-002 < 17 * -2444 CD-38 2782 47463197011 W 063338.1-380344063701.9-380848246.82-19.00 6.04 +1.03 +0.84 K0III +0.006+0.040 +029 4.0 25.0AC 4 -2445 CD-41 2488 47475218060 063340.8-412819063651.3-413325250.22-20.17 6.34 +1.15 K0II +0.008+0.008 +014 -2446 CD-36 3031 47500197014 W 063345.8-365418063713.8-365926245.69-18.57 5.71 -0.12 -0.51 B7IV -0.014+0.017 +021V 0.8 0.6 -2447 CD-32 3216 47536197019 I 063402.8-321517063747.6-322023241.18-16.78 5.27 +1.18 +1.12 K2III +0.105+0.068 +.017+079 * -2448 BD-16 1554 47561151737 063408.0-164706063835.4-165225226.69-10.37 6.03 +0.03 +0.10 A1V s -0.008-0.023 +010 44 -2449 BD+13 1356 47575 95963 5302 063409.9+130422063947.6+125859200.05 3.35 5.97 +0.06 +0.11 A2V -0.034-0.001 -020 60 6.0 2.9 -2450 BD-14 1525 476671517512515I 063442.4-140322063916.7-140845224.26-09.04 4.82 +1.50 +1.68 +0.73 K2II +0.004-0.004 -.003+029 < 17 * -2451 Nu PupCD-43 2576 47670218071 252 3062 063442.0-430629063745.7-431146251.94-20.54 3.17 -0.11 -0.41 -0.07 B8III +0.002-0.006 +028SB 228 * -2452 BD+36 1482 47703 593652516 063454.8+360131064137.7+355555179.30 13.69 6.46 +0.49 F8III -0.017-0.022 +086 =< 10 -2453 25 GemBD+28 1207 47731 78636 W 063502.7+281721064121.0+281147186.47 10.42 6.42 +1.09 +0.85 G5Ib +0.008-0.009 -006 3.9 55.9AC 3 -2454 BD+06 1338 47756114244 063509.8+062746064031.8+062218206.02 0.49 6.51 -0.14 -0.47 B8IIISi -0.029+0.012 +035 35 -2455 CD-23 4172 47827172102 W 063526.6-233617063936.3-234144233.11-13.02 6.05 -0.03 -0.06 A0 +0.013-0.002 +026 0.4 0.1 -2456 15 MonBD+10 1220 47839114258 I 5322 S Mon 063528.2+095918064058.7+095344202.94 2.20 4.66 -0.25 -1.07 -0.22 O7V((f)) +0.003-0.006 -.004+033SB 63 3.5 2.9AB 13* -2457 BD+16 1242 47863 95996 063535.7+162927064121.8+162351197.17 5.23 6.28 -0.01 -0.07 A1V -0.022-0.008 +022 38 -2458 BD+11 1273 47886 95997 I 063544.1+110546064117.2+110012201.98 2.77 6.11 +1.68 M1III -0.002+0.009 +016 -2459 55Psi4AurBD+44 1518 47914 412882517I 063548.3+443714064305.0+443128171.18 17.26 5.02 +1.48 +1.83 K5III -0.042-0.028 +.019-073V < 17 -2460 CD-30 3386 47946197057 063552.8-302226063942.7-302813239.54-15.69 5.71 +1.14 +1.10 K0III -0.006-0.182 +.019-024 -2461 BD+00 1546 47964114269 063556.9+003519064105.4+002943211.31-02.08 5.79 -0.10 -0.37 B8III -0.016-0.003 +023 95 -2462 CD-48 2417 47973218093 W 3072 063557.6-480750063837.6-481313257.12-21.91 4.93 +0.87 +0.60 +0.43C G8III +0.008+0.012 +.012+028 2.3 13.0 * -2463 BD+53 1056 47979 25916 063606.9+532354064411.6+531747162.53 20.41 6.27 +1.08 K0 +0.050-0.177 +019 -2464 BD+37 1567 48073 59406 063626.3+371439064313.8+370849178.29 14.47 6.19 +1.03 K0 +0.036-0.041 -041 -2465 CD-38 2817 48087197064 063632.4-380356063956.9-380932247.04-18.47 6.58 +1.18 K1IIICNIb +0.056-0.027 +018 -2466 26 GemBD+17 1357 48097 96015 063634.9+174435064224.3+173843196.16 6.02 5.21 +0.06 +0.01 A2V +0.005-0.087 +015SB 99 -2467 BD+06 1351 48099114293 I 063637.1+062625064159.3+062042206.21 0.80 6.37 -0.05 -0.94 -0.05 O6.5V e+0.010-0.006 +031V 70: * -2468 CP-61 688 48189249604 W 063656.2-612641063800.6-613159271.21-25.19 6.18 +0.62 +0.12 G1-2V -0.011+0.084 +032 2.0 2.1 * -2469 BD-09 1601 48217133585 I 063709.9-090414064156.4-091002220.05-06.26 5.19 +1.53 +1.89 +0.68E M0III +0.043-0.040 +.031+001V? * -2470 12 LynBD+59 1015 48250 25939 5400AB 063724.0+593234064614.1+592630156.31 22.48 4.87 +0.08 +0.08 +0.03 A3V -0.023-0.002D+.011-003V 90 0.6 1.7AB 4* -2471 BD+36 1494 48272 59425 063729.0+361229064412.6+360635179.35 14.24 6.31R +0.06 +0.11 A2V +0.014+0.014 -015V? 90 -2472 NOVA 1903 DM Gem * -2473 27Eps GemBD+25 1406 48329 78682 254I 5381 3183 063746.7+251349064355.9+250752189.54 9.63 2.98 +1.40 +1.46 +0.61 G8Ib e-0.006-0.013 +.017+010SB < 17 6.0 110.3 * -2474 BD+03 1371 48348114312 I 063752.1+030755064306.5+030200209.28-00.47 6.19 +1.37 +1.60 K0 -0.001-0.021 +031 -2475 CD-40 2625 48383218126 W 063758.5-401516064114.1-402059249.30-18.99 6.12 -0.14 -0.59 B4V -0.014+0.015 +017 217 3.4 15.4 * -2476 CD-47 2521 48403218124 063806.4-473444064049.3-474029256.68-21.40 6.65 +1.58 +1.92 +0.98E M2III -0.008-0.009 +021 -2477 13 LynBD+57 1004 48432 259472520 063818.0+571623064649.5+571009158.69 21.93 5.35 +0.96 +0.73 K0III +0.012-0.038 +019 < 19: -2478 30 GemBD+13 1390 48433 96051 I 5387 063820.9+131944064359.3+131340200.30 4.37 4.49 +1.16 +1.16 +0.60 K0IIICN1Ca1 -0.003-0.058 +.007+014 < 19: 8.4 27.2 * -2479 BD+04 1414 48434114324 063822.1+040154064338.7+035556208.54 0.06 5.90 -0.02 -0.89 B0III +0.006-0.006 +035 70 * -2480 28 GemBD+29 1327 48450 786922518I 3188 063825.2+290420064445.5+285815186.08 11.43 5.44 +1.45 +1.64 K4III -0.004-0.026 +016V? -2481 BD-22 1505 48501172204 5377A 3181 063833.3-222111064245.8-222657232.26-11.84 6.13 +0.34 -0.02 F0 -0.085+0.078 +044 2.1 18.2 * -2482 CD-38 2844 48543197108 W 063853.2-381803064216.4-382355247.45-18.13 6.29 +0.34 +0.13 A3V+F/G -0.015+0.005D+.003+063V 1.5 7.9 * -2483 56Psi5AurBD+43 1595 48682 41330 255 5425 063931.9+434037064644.3+433439172.36 17.52 5.25 +0.56 +0.05 G0V -0.002+0.165 +.068-024 =< 6 3.4 36.2 * -2484 31Xi GemBD+13 1396 48737 96074 256I: 3193 063940.6+130013064517.4+125344200.74 4.50 3.36 +0.43 +0.06 +0.23 F5III -0.116-0.191 +.055+025V? 70 * -2485 BD+55 1122 48767 25963 5436B 3202 063952.1+554849064812.9+554216160.26 21.69 6.33H dF6 +0.057-0.101 +.032+012SB 0.1 4.7AB 3* -2486 BD+55 1122 48766 25962 5436A 3202 063951.5+554848064812.3+554216160.26 21.69 6.28H +0.47 dF5 +0.058-0.101 +.032+009V 0.1 4.7AB 3* -2487 57Psi6AurBD+48 1436 48781 413461176I 064002.1+485343064739.6+484722167.26 19.47 5.22 +1.12 +1.04 K0III -0.001+0.006 -008V < 19: -2488 CD-39 2798 487971971342519 064003.0-390531064323.3-391136248.31-18.20 6.30 +0.26 A8:mDel Del -0.001-0.019 +010V * -2489 32 GemBD+12 1275 48843 96084 3197 064017.1+124752064554.2+124137200.99 4.54 6.46 A9III +0.001+0.002 +009 =< 15 -2490 42 CamBD+67 454 48879 139732523 064031.5+674056065057.1+673419147.80 24.88 5.14 -0.17 -0.63 B4IV +0.002+0.002 +.010+005SB 126 -2491 9Alp CMaBD-16 1591 48915151881 257I 5423 064044.6-163444064508.9-164258227.22-08.88-1.46 0.00 -0.05 -0.03 A1Vm -0.553-1.205 +.375-008SBO 13 10.3 11.2AB 4* -2492 10 CMaCD-30 3484 48917197149 W FT CMa 064040.1-305804064428.4-310414240.53-14.98 5.20 -0.12 -0.93 -0.15 B2IIIe v-0.015+0.008 +034 200 5.4 36.3 * -2493 CD-27 3248 48938172264 064052.4-271447064451.9-272029237.03-13.42 6.45 +0.54 -0.02 G2V -0.011+0.308 +.062-012V? -2494 16 MonBD+08 1486 489771143881177 064105.1+084135064632.4+083514204.73 2.82 5.93 -0.17 -0.69 B2.5V -0.006-0.007 +010V * -2495 CD-23 4325 49001172273 064113.0-232131064523.3-232743233.46-11.72 6.05 +1.20 +1.29 K0 -0.038+0.042 +034V? -2496 NGC 2281 * -2497 CD-30 3495 49028197163 W 064112.7-302856064502.4-303510240.11-14.68 6.54 -0.11 -0.49 B8IV -0.026+0.017 +018 60 3.9 4.4 * -2498 BD-14 1573 49048151895 064126.6-144124064559.3-144746225.57-07.87 5.32 +0.07 +0.12 A2V -0.025-0.017 +.024-019 205 -2499 BD+18 1349 49059 96111 5447 064132.8+181807064723.5+181136196.20 7.32 6.20R +0.07 +0.01 A2V +0.003-0.043 +.016+021V 77 0.2 0.5 * -2500 CD-31 3640 49095197171 064138.4-314047064522.8-314737241.29-15.08 5.92 +0.48 -0.03 F6V -0.220-0.320 +.051+032V -2501 CD-30 3505 49131197177 W HP CMa 064142.4-305038064531.3-305656240.50-14.73 5.80 -0.19 -0.88 B2III e+0.010+0.002D+.005+007SB 2.3 4.9 * -2502 BD-09 1644 491471519112521 064155.0-100002064639.0-100626221.42-05.64 5.66 -0.05 -0.11 B9.5V -0.017+0.003 +017V 149 -2503 17 MonBD+08 1496 49161114410 I 064154.0+080843064719.8+080214205.31 2.75 4.77 +1.40 +1.65 +0.70 K4III -0.026-0.013 +.013+047 < 19: -2504 11 CMaBD-14 1584 49229151919 064217.3-141907064651.1-142533225.33-07.52 5.29 -0.04 -0.25 B9III -0.002+0.012 +015V 245 -2505 CP-71 476 49268256326 W 064227.8-714024064057.8-714632282.50-26.48 6.51 +1.11 +1.07 K1IIICNII +0.031-0.051 +021 3.5 10.7 -2506 18 MonBD+02 1397 49293114428 258I 064238.7+023118064751.6+022444210.38 0.30 4.47 +1.11 +1.04 +0.55 K0+IIIaBa0.2 -0.018-0.012 +.017+011SB < 17 * -2507 CD-39 2831 49319197192 064244.0-392600064603.3-393224248.84-17.84 6.62 -0.13 -0.50 B6Vnne +0.003+0.014 +016 * -2508 BD-08 1558 49331133679 I 3213 064250.5-085322064737.1-085954220.53-04.93 5.07 +1.80 +1.88 M1+Ib-IIa -0.016+0.005 +.002+024V * -2509 12 CMaBD-20 1576 49333172318 HK CMa 064244.4-205426064701.5-210056231.36-10.34 6.08 -0.19 -0.62 B7IIIn -0.014+0.005 +015 * -2510 CD-37 3065 49336197195 V339 Pup 064246.3-374005064612.1-374632247.13-17.18 6.21 -0.13 -0.64 B4Vne -0.008+0.002 +015 * -2511 43 CamBD+69 394 49340 13986 259 064255.3+690017065342.2+685318146.42 25.38 5.12 -0.13 -0.43 B7III +0.003+0.008 +.002-021V? 188 -2512 BD+32 1414 49380 595212525I IS Gem 064310.3+324313064941.3+323624183.13 13.89 5.71 +1.29 K3II -0.036-0.047 -016 * -2513 CP-52 996 49396234693 064307.4-520539064526.1-521204261.57-22.00 6.57 +1.08 G6Iab +0.007-0.007 +017 -2514 BD-01 1386 49434133687 064314.8-011227064819.0-011909213.75-01.29 5.75 +0.28 +0.05 F1V -0.041-0.042 -014 82 -2515 CP-52 998 49517234699 064336.4-521807064553.7-522436261.81-21.99 5.80 +1.53 +1.82 K3III -0.004-0.003 +023 -2516 58Psi7AurBD+41 1536 49520 413802527I W 064341.7+415356065045.9+414653174.39 17.57 5.02 +1.27 +1.35 +0.46E K3III -0.024-0.136 -.003+061V? < 19: 5.0 40.9AB 3* -2517 BD+01 1531 49567114465 064353.9+010651064903.7+010007211.77-00.07 6.15 -0.13 -0.68 B3II-III +0.007-0.004 +023 87 -2518 CD-37 3080 495911972151178 W 064356.0-374909064721.4-375547247.37-17.02 5.26 -0.08 -0.25 B9IV -0.007-0.015 +047 173 5.8 65.4 -2519 33 GemBD+16 1298 49606 961612526 W OV Gem 064404.4+161859064949.8+161210198.26 6.96 5.85 -0.13 -0.52 B7III -0.017-0.012 +013 35 7.3 27.5 * -2520 14 LynBD+59 1028 49618 26012 5514 064415.9+593402065305.1+592655156.54 23.32 5.33 +0.65 G4III+A2V -0.006-0.039 +.005+013V? 26: 1.0 0.9AB 4* -2521 BD-02 1776 496431337181179 W 064414.2-020933064916.4-021619214.71-01.52 5.74 -0.10 +0.46 B8IIIn -0.009-0.004 +010V 0.0 0.1 -2522 BD-14 1599 49662151962 5487 064425.7-150155064857.8-150841226.21-07.38 5.39 -0.10 -0.51 B6V +0.002-0.004D+.004+023SB 157 2.7 0.7 -2523 CD-51 2078 49689234705 064428.5-510910064652.8-511557260.67-21.52 5.40 +1.34 +1.24 K1II-III+G:p -0.003-0.097 +.018-005 -2524 CP-54 1115 49705234704 W 064439.4-543507064641.5-544141264.22-22.50 6.46 +0.86 G6III -0.050+0.024D+.004+003 3.4 1.8 -2525 35 GemBD+13 1434 49738 96179 I 064446.8+133141065025.5+132448200.84 5.85 5.65 +1.34 gK3 -0.002-0.002 +026V? -2526 CP-55 1063 498772347102524 3220 064521.7-552544064718.7-553224265.13-22.65 5.61 +1.52 K5III +0.003+0.023 +035V * -2527 BD+77 266 49878 6022 260I 064529.1+770618070004.0+765839137.55 26.86 4.55 +1.36 +1.66 +0.71 K4III +0.071-0.013 +.023-026SB < 17 * -2528 CD-23 4438 49891172389 5498 064534.9-235739064944.0-240433234.45-11.07 6.33 +0.04 +0.08 A1 +0.002-0.003D+.002-002 1.3 1.6AB 4* -2529 36 GemBD+21 1405 49908 788052530 5511 064533.4+215245065133.0+214540193.38 9.76 5.27 -0.02 +0.01 A2V -0.008-0.038 +.010+034V 135 8.8 11.3 * -2530 BD-00 1462 49933133760 5505 064543.4-002510065049.9-003227213.34-00.38 5.77 +0.39 -0.07 F2V +0.030-0.185 +.036-015V =< 10: 5.5 5.9 * -2531 CP-72 522 499472563302522 064539.7-730028064336.8-730705284.02-26.43 6.37 +0.96 +0.66 G8III +0.012-0.093 +016 -2532 BD+45 1359 49949 41406 064550.1+445739065307.6+445022171.53 19.04 6.26 +0.21 +0.12 A8Vn +0.008-0.081 +006SB? 260 -2533 BD+23 1518 49968 78816 I 064555.7+234312065200.0+233606191.74 10.64 5.65 +1.45 +1.96 K5III -0.040-0.009 +040V? * -2534 BD-07 1592 49976133761 V592 Mon 064553.3-075529065042.3-080228220.02-03.82 6.29 0.00 +0.02 A2pSrCrEu v-0.006 0.000 +022 * -2535 BD-16 1624 49980151992 I 064554.5-165806065021.9-170502228.12-07.93 5.79 +1.44 K0 +0.013+0.015 +023V -2536 CP-70 560 50002256331 064556.1-701927064456.1-702602281.07-25.98 6.11 +1.33 +1.50 K3III +0.007+0.007 +005 -2537 CD-27 3310 500121724032528 3234 064606.0-271305065006.0-272002237.51-12.36 7.04 -0.18 -0.82 B2IV -0.004+0.002 +033V? * -2538 13Kap CMaCD-32 3404 500131972581180 Kap CMa 064606.3-322335064950.5-323031242.36-14.49 3.96 -0.23 -0.92 -0.16 B1.5IVne v-0.007+0.004 +014 199 * -2539 59 AurBD+39 1771 50018 59571 5534 OX Aur 064608.6+385919065301.5+385209177.40 16.91 6.12 +0.37 +0.12 F2VDel Del v+0.005+0.008 +001V 105 3.9 22.3AB 3* -2540 34The GemBD+34 1481 50019 59570 261 5532 064611.9+340455065247.3+335740182.10 15.02 3.60 +0.10 +0.14 +0.08 A3III -0.002-0.048 +.021+021SB 128 7.9 78.7AB 3 -2541 60 AurBD+38 1636 50037 59576 S 064621.9+383346065313.4+382617177.83 16.79 6.30 +0.49 dF5 +0.034-0.176 +.005+032 * -2542 BD+35 1511 50056 59574 I 3250 064621.9+355429065303.4+354719180.38 15.77 6.01 +1.45 K3III: -0.020+0.015 +006 -2543 BD+03 1437 50062114525 064624.9+030940065139.3+030230210.25 1.44 6.38 +0.04 +0.09 A2V s -0.010-0.042 +024V 70 -2544 CD-25 3691 50093172420 064632.5-253941065036.9-254641236.11-11.61 6.33 -0.18 -0.77 B2V -0.006+0.014 +021 -2545 CD-31 3717 50123197263 W 064636.5-313522065023.3-314222241.64-14.07 5.70 +0.14 -0.52 B6Vnpe v-0.002+0.012 +020V 270 2.1 42.9AB 3* -2546 CD-45 2773 50196218236 W 3236 064702.7-451954064957.8-452700254.96-19.21 6.55 +1.51 +1.83 +0.82C K5-M0III +0.019-0.044 +015 4.6 6.6 * -2547 61Psi8AurBD+38 1638 50204 59589 064705.7+383739065357.0+383018177.82 16.95 6.48 -0.05 -0.19 B9.5pSi -0.010-0.026 +027 * -2548 CD-46 2703 502232182352529 064705.2-463029064954.6-463653256.12-19.60 5.14 +0.45 -0.02 +0.26C F5V +0.004+0.370 +.049+020 0 * -2549 CD-34 3140 50235197277 064714.1-341457065052.4-342202244.21-15.02 4.99 +1.38 +1.56 K5III +0.007+0.006 -.013+030 -2550 Alp PicCP-61 720 50241249647 262 064709.8-615002064811.4-615629271.92-24.10 3.27 +0.21 +0.13 +0.13 A7IV -0.069+0.269 +.052+021 205 -2551 BD+08 1543 50277114556 I: 064723.0+083007065249.4+082249205.62 4.12 5.77 +0.26 +0.10 F0Vn -0.050-0.032 +027 195 -2552 BD-05 1845 50282133807 064727.6-051144065222.9-051858217.77-02.21 6.30 +0.99 +0.76 K0 -0.020-0.008 +031 -2553 Tau PupCD-50 2415 50310234735 263 064727.2-502943064956.2-503653260.16-20.86 2.93 +1.20 +1.21 +0.60 K1III +0.036-0.070 +036SB1O * -2554 CP-53 1168 50337234737 V415 Car 064740.9-533019064951.3-533720263.24-21.76 4.40 +0.92 +0.61 +0.45 G6II 0.000+0.030 +.025+026SBO * -2555 BD+11 1344 50371 96241 064749.5+110720065322.5+105947203.33 5.42 6.24 +0.97 K0III +0.011-0.136 -034 -2556 BD+46 1202 50384 41426 064753.8+455709065515.2+454935170.67 19.72 6.34 +0.94 +0.65 K0III-IV -0.037-0.067 +031 * -2557 BD+44 1551 50420 41429 V352 Aur 064801.6+440205065514.7+435436172.59 19.08 6.13 +0.32 +0.19 +0.19 A9III +0.010-0.009 -007V 30 * -2558 CD-36 3189 50445197291 064810.8-360629065142.3-361349246.06-15.58 5.96 +0.18 A3V -0.048-0.064 +004 -2559 Zet MenCP-80 196 50506258451 264 064822.5-804230064002.7-804849292.60-27.21 5.64 +0.20 +0.15 A5III -0.016+0.055 +007V 157 -2560 15 LynBD+58 982 50522 26051 I 5586 064837.0+583314065716.5+582521157.77 23.60 4.35 +0.85 +0.52 +0.44 G5III-IV -0.005-0.135 +.014+009V < 25 1.2 0.9AB 4* -2561 BD+57 1017 50551 26050 3280 064840.4+574125065713.2+573348158.68 23.38 6.05 +1.49 +1.75 K3III +0.018+0.022 -054V -2562 CP-60 712 50571249654 064841.5-600759065001.1-601457270.18-23.49 6.11 +0.46 F7III-IV +0.009+0.109 +023 -2563 CD-48 2556 50621218261 064851.1-481017065132.8-481733257.90-19.89 6.42 +1.21 +1.23 K2-3III +0.039-0.009 -009 -2564 38 GemBD+13 1462 50635 96265 5559 3266 064900.1+131818065438.7+131040201.51 6.67 4.65 +0.30 +0.07 +0.20 F0Vp +0.078-0.083 +.043+024SB 126 2.9 7.0AB 3* -2565 BD-18 1591 50644152055 064856.6-185435065318.8-190158230.20-08.15 5.64 +0.28 +0.14 F1V -0.049+0.003 +030 -2566 BD-18 1594 50643152056 064859.1-184838065321.7-185600230.11-08.10 6.14 +0.15 +0.13 +0.05 A5m -0.028+0.023 +041 -2567 CD-26 3529 50648172504 I 5548 3259 064859.1-264959065300.1-265727237.43-11.61 6.40 +1.53 +2.29 M4III -0.031-0.061 -013V? 7.5 11.9AB 3* -2568 Psi9AurBD+46 1203 50658 41446 Var? 064908.4+462404065632.3+461627170.30 20.07 5.87 -0.06 -0.45 B8IIIe +0.018+0.013 -041 270 * -2569 37 GemBD+25 1496 50692 78866 064909.7+253003065518.6+252232190.42 12.06 5.73 +0.57 0.00 G0V -0.042+0.022 +.055-011V =< 3 -2570 BD-05 1863 50700133855 5557 064914.5-054340065408.5-055109218.45-02.07 6.41 +0.17 +0.16 A6Vn -0.020-0.001D+.003+017 0.1 1.2 -2571 15 CMaBD-20 1616 507071725202532 EY CMa 064913.4-200602065332.9-201327231.30-08.62 4.83 -0.21 -0.96 -0.22 B1IV -0.009+0.004 +028V 49 * -2572 BD-00 1487 507471338702533 064919.7-010006065424.6-010737214.27 0.15 5.45 +0.18 +0.16 A4IV +0.003-0.012 +.009-009 70 * -2573 BD+46 1205 50763 41450 064931.3+465009065656.0+464218169.89 20.28 5.86 +1.08 gK0 -0.102-0.090 +039 -2574 14The CMaBD-11 1681 50778152071 266I 064932.6-115448065411.4-120219223.98-04.85 4.07 +1.43 +1.70 +0.78 K4III -0.137-0.013 +.022+097V? < 19: * -2575 CD-42 2793 50785218272 064931.6-422252065239.7-423016252.22-17.73 6.52 +0.42 +0.12 +0.22C F5II-III -0.002-0.008 +041 -2576 CD-28 3554 50806172524 064935.1-282412065333.9-283223238.95-12.16 6.04 +0.71 +0.27 +0.24E G5IV +0.274-0.438 +.042+072V * -2577 BD-01 1446 50820133881 3271 064938.5-013751065442.1-014523214.87-00.08 6.21 +0.56 -0.35 +0.66 B3IVe+K2II +0.006+0.006 +009SB 130 * -2578 CD-24 4565 50853172531 064947.4-242450065355.3-243221235.29-10.40 6.21 +0.01 +0.10 A1 -0.027-0.012 +027V? * -2579 CD-43 2756 50860218278 W 064945.2-435108065247.1-435833253.67-18.23 6.46 -0.10 -0.38 -0.05C B8V -0.005+0.001 +026 6.0 10.0 -2580 16Omi1CMaCD-24 4567 50877172542 I Omi1 CMa 064958.9-240332065407.9-241102234.98-10.21 3.87 +1.73 +1.99 +0.82 K2+Iab -0.008+0.013 +.002+036 < 19: * -2581 BD+70 430 50885 6041 I W 064959.8+705634070121.5+704829144.42 26.31 5.68 +1.33 gK4 +0.017-0.019 -017 5.3 117.0 -2582 BD-02 1827 50890133890 064957.8-024038065458.8-024813215.83-00.49 6.04 +1.10 +0.85 gG6 -0.016+0.002 +020 -2583 CD-23 4553 50896172546 EZ CMa 065003.3-234810065413.0-235542234.76-10.08 6.91 -0.28 -0.89 +0.06 WN5-B v-0.009+0.003 +130SBO * -2584 BD+08 1562 50931114626 065008.2+082706065534.6+081929205.98 4.70 6.29 +0.04 +0.06 A0V -0.019+0.017 +020V? 70 -2585 16 LynBD+45 1367 50973 414632537 3293 065019.3+451327065737.1+450539171.55 19.87 4.90 +0.03 +0.05 +0.01 A2Vn -0.021-0.004 +.006-008V 201 * -2586 BD+33 1433 51000 59631 3289 065026.5+334837065700.5+334052182.72 15.72 5.89 +0.88 G5III -0.019 0.000 -010V -2587 CP-53 1177 51043234762 065039.2-535757065246.9-540524263.86-21.48 6.57 +1.08 G5Ib-II -0.019+0.016 +014 -2588 17 CMaBD-20 1624 51055172569 5585 065043.6-201638065502.7-202417231.62-08.39 5.74 +0.08 A3IV -0.003-0.004 -015 3.2 50.5AC 4* -2589 BD+10 1335 51104 962942535 065055.6+100510065625.8+095723204.61 5.62 5.92 -0.08 -0.35 B8Vn -0.015-0.014 +033V? 175 -2590 19Pi CMaBD-19 1610 51199172579 5602 3285 065117.2-200032065537.4-200811231.44-08.15 4.68 +0.37 +0.05 +0.19 gF2 +0.047+0.043 +.034+008 120 5.0 11.6 * -2591 CD-42 2818 512082182962534 NP Pup 065117.7-421419065426.7-422156252.21-17.38 6.32 +2.24 +2.79 +1.30 C3II +0.002+0.014 +032 * -2592 CP-59 716 51210234764 065117.3-591301065245.4-592028269.31-22.93 6.41 +0.18 A3m -0.012+0.039 -002SB2 * -2593 18Mu CMaBD-13 1741 51250152123 I 5605 065131.6-135451065606.6-140237225.99-05.34 5.00 +1.18 G5III+A2 -0.001+0.005 -.002+019V 2.5 2.8AB 4* -2594 CD-50 2458 51266234774 065133.6-502926065402.3-503642260.38-20.24 6.26 +0.99 K0-1III -0.049+0.218 -.003+044 -2595 BD-22 1602 51283172588 065134.4-224844065546.8-225629234.01-09.33 5.30 -0.18 -0.80 B3II-III -0.017+0.003 +038 248 * -2596 20Iot CMaBD-16 1661 513091521262536 Iot CMa 065140.6-165528065608.2-170315228.70-06.68 4.37 -0.07 -0.70 -0.07 B3II -0.003+0.002 +.005+041 29 * -2597 BD+12 1361 51330 96314 065150.7+120221065725.7+115427202.96 6.71 6.27 +0.34?+0.27? F2Ib-II +0.019 0.000 +009 -2598 CD-31 3808 51411197371 W 065207.8-313937065554.8-314724242.21-13.03 6.36 B3V -0.006+0.013 +021SB2 7.6 18.8 * -2599 BD-07 1642 51424133937 065211.3-080251065700.1-081044220.85-02.49 6.34 +0.64 +0.26 K0II-III+A2V -0.007+0.002 -005 -2600 62 AurBD+38 1656 51440 596582538I 065214.0+381122065902.8+380308178.64 17.72 6.00 +1.23 +1.17 K2III -0.043-0.122 +025V -2601 39 GemBD+26 1405 51530 78929 W 065237.6+261245065847.4+260452190.09 13.07 6.10 +0.46 +0.02 F7V -0.168+0.093 +.025+006 =< 10 6.0 28.8 -2602 Iot VolCP-70 572 51557256344 267 065235.7-705020065127.0-705748281.74-25.53 5.40 -0.11 -0.38 B7IV +0.001+0.023 +019 145 * -2603 BD-22 1616 51630172631 HH CMa 065300.2-220413065714.8-221212233.48-08.71 6.61 -0.19 -0.80 B1-2III: -0.006-0.015 +032V * -2604 CD-35 3225 51682197388 065310.2-351233065645.7-352030245.63-14.29 6.29 +1.29 K2III -0.001-0.003 +018 -2605 40 GemBD+26 1411 51688 78947 D 065317.4+260300065927.9+255451190.31 13.14 6.40 -0.11 -0.47 B8III -0.011-0.008 +012V 67 0.0 0.0 * -2606 BD+07 1539 51693114713 065314.2+074527065839.0+073719206.95 5.06 6.27 +0.11 +0.10 A3V -0.016-0.030 -012V? 115 -2607 CD-24 4648 51733172644 5629 065326.3-243000065733.9-243750235.73-09.70 5.46 +0.36 +0.03 dF0 -0.058+0.106 +.016+020V? 92 1.3 1.1 -2608 CD-48 2601 51799218324 065336.2-483521065616.0-484316258.60-19.29 4.95 +1.69 +1.92 +1.18 M1III +0.006+0.010 -.003+022 -2609 BD+87 51 51802 1168 909 OV Cep 065344.3+871220074030.5+870112126.22 27.72 5.07 +1.63 +1.97 +0.88E M2IIIab -0.045-0.028 +.003-025V * -2610 BD+03 1488 518141147222540 5648 065341.4+034417065857.0+033608210.58 3.31 5.97 +1.06 +0.88 G8III -0.002-0.004 +017 6.7 3.6 -2611 CD-27 3460 51823172650 065342.7-272413065742.4-273215238.42-10.91 6.23 -0.14 -0.66 B2.5V -0.034+0.005 +024SB 80 * -2612 CD-35 3233 51825197402 W 065342.9-352227065717.6-353027245.83-14.26 6.23 +0.46 -0.04 F8IV-V -0.037+0.008 +.069+010V? 0.2 0.2 * -2613 BD+07 1544 51892114731 065356.1+072712065920.1+071901207.30 5.08 6.35 -0.11 -0.47 B7III -0.019-0.011 +005V 70 -2614 CD-26 3646 51925172656 W 3316 065406.6-270146065807.6-270953238.12-10.67 6.37 -0.19 -0.82 B2.5III +0.006-0.008 +018V 205 0.4 0.2 * -2615 41 GemBD+16 1354 52005 96363 I 065431.0+161302070015.8+160444199.48 9.16 5.68 +1.66 +1.82 +0.85 K3Ib -0.007-0.005 +022 -2616 CD-25 3864 52018172669 5651 065430.0-251642065835.9-252450236.55-09.82 5.59 -0.16 -0.70 B3V -0.010+0.015 +028SB 125 7.0 10.2 * -2617 BD+70 432 52030 6074 I 065433.0+705236070551.8+704355144.56 26.67 6.50R K0III +0.037-0.008 +020 -2618 21Eps CMaCD-28 3666 52089172676 268I 5654 065441.7-285009065837.5-285820239.83-11.33 1.50 -0.21 -0.93 -0.21 B2II +0.004+0.003D+.001+027 44 6.4 7.5 * -2619 CD-33 3389 520921974272541 065445.4-335833065825.1-340642244.61-13.49 5.06 -0.16 -0.65 B3V -0.006+0.005 +019V 36 -2620 BD+32 1460 52100 59697 5680 065447.4+323316070117.2+322452184.30 16.06 6.59 +0.27 +0.14 A9IV +0.011-0.020 -028 90 5.8 16.1AB 5* -2621 CD-30 3757 52140197432 W 065454.0-305142065843.8-305952241.72-12.16 6.42 -0.14 -0.61 B3V +0.004+0.021 +014 2.6 35.0AB 3* -2622 BD-05 1910 52265134031 065523.4-051349070018.0-052201218.72-00.48 6.30 +0.57 +0.09 G0III-IV -0.118+0.088 +054V? -2623 BD-21 1689 52273172700 065523.0-212753065939.3-213612233.19-07.94 6.26 -0.15 -0.78 B2-3IV-V: -0.002-0.010 +033 -2624 BD-08 1662 523121340361181 W 065535.4-081603070023.7-082425221.43-01.85 5.96 -0.08 -0.34 B9III -0.009+0.001 +010V 6.7 1.5 -2625 BD-19 1644 52348172718 065548.3-200109070008.1-200932231.93-07.21 6.31 -0.15 -0.62 B4III -0.028-0.008 +032V -2626 CD-45 2850 52362218360 065547.2-453747065841.8-454605255.83-17.88 6.22 0.00 -0.06 -0.01C A0V -0.005-0.021 +034SB2 * -2627 BD-08 1667 52382134041 065552.8-090347070039.3-091211222.17-02.15 6.49 +0.21 -0.75 B1Ib -0.007-0.006 +051 87 * -2628 BD-21 1695 52437172725 5687 FU CMa 065604.4-215845070019.3-220710233.72-08.03 6.53 -0.17 -0.82 -0.18 B2IV-Vne -0.006-0.018 +009 0.0 0.1AP 5* -2629 BD+05 1513 52479114798 065623.0+045736070141.4+044905209.80 4.47 6.63 +0.06 +0.10 A3V s -0.006-0.001 -011 -2630 42Ome GemBD+24 1502 52497 789991182 Ome Gem 065619.2+242129070224.8+241255192.18 13.06 5.18 +0.94 +0.68 G5IIa-Ib -0.009-0.001 +.012-009 < 19: * -2631 BD+17 1479 52554 964072543I D NP Gem 065636.5+175352070225.5+174520198.17 10.35 5.94 +1.63 M1 +0.016+0.031 +023V 0.0 0.0 * -2632 BD+15 1431 52556 96403 065634.5+152846070217.4+152010200.37 9.28 5.74R gK1 0.000-0.016 -014 -2633 BD+05 1514 52559114801 065635.2+054159070155.0+053327209.17 4.86 6.59 -0.02 -0.64 B2IV-V -0.041+0.010 +034 * -2634 CP-55 1116 52603234826 065642.6-553517065839.6-554346265.81-21.16 6.27 +1.16 +1.16 K2III -0.073-0.090 -001 -2635 BD+16 1363 52609 96409 I 065647.1+164905070233.5+164027199.18 9.91 5.82 +1.68 +1.92 M2III +0.017-0.015 +035V? -2636 BD-01 1509 52611134073 W 065648.3-011208070152.9-012044215.32 1.71 6.17 +1.28 +1.36 G5II +0.010-0.027 -045 4.7 24.5 -2637 CD-28 3711 52619172749 065645.3-282050070042.6-282922239.58-10.71 6.27 +0.45 F5V -0.006-0.034 +010 -2638 CP-56 1211 52622234825 065643.5-561519065836.2-562341266.49-21.37 6.45 +0.39 F2II -0.030-0.028 -003 -2639 BD-05 1926 52666134076 I 3341 065701.9-053446070156.4-054320219.22-00.28 5.20 +1.68 +2.05 M2III -0.016+0.001 -.003+003V -2640 CD-25 3911 52670172763 065659.3-250426070105.9-251255236.62-09.23 5.63 -0.17 B2V -0.008+0.021 +006SB 67 -2641 CD-33 3415 52703197475 065707.5-331934070049.8-332755244.21-12.77 6.40 +1.05 G8II-III +0.019+0.091 +028V -2642 BD+60 1026 52708 26141 065711.5+595659070601.3+594807156.56 25.00 6.44R G8III: +0.026+0.001 +022 -2643 BD+29 1441 52711 79009 065709.1+293018070330.4+292014187.43 15.32 5.93 +0.60 +0.04 G4V +0.153-0.826 +.059+022V =< 6 * -2644 BD+52 1165 52859 26144 5746 065742.8+525430070539.8+524529164.07 23.36 6.12 +0.11 +0.88 A3V s -0.024-0.072D+.011+027 0.2 4.2AB 3* -2645 BD+47 1391 52860 41538 065739.2+475521070509.0+474630169.25 21.93 6.38 -0.04 -0.23 B9IIIn -0.001-0.004 -017V? -2646 22Sig CMaCD-27 3544 528771727971183I 5719 Sig CMa 065744.1-274729070143.1-275605239.17-10.27 3.47 +1.73 +1.88 +1.00 K7Ib e-0.005+0.005 +.024+022 10.5 10.0 * -2647 BD+09 1496 52913114835 065749.8+091701070317.9+090818206.10 6.77 5.97 +0.12 +0.11 A3V s -0.023+0.006 -012SB 85 -2648 19 MonBD-04 1788 529181341062547 V637 Mon 065756.8-040539070254.8-041421218.01 0.61 4.99 -0.20 -0.93 -0.19 B1V e-0.003+0.003 +025V? 336 * -2649 BD+11 1428 52960 96429 I 065805.6+110554070338.0+105706204.50 7.65 5.13 +1.39 +1.62 K3III -0.008-0.019 +.011+021V < 19: -2650 43Zet GemBD+20 1687 52973 79031 269I 5742 Zet Gem 065810.6+204302070406.5+203413195.75 11.90 3.79 +0.79 +0.62 +0.41 F7-G3Ib v-0.009 0.000 -.006+007SB =< 54 0.0 0.1 O 6* -2651 BD+12 1406 52976 96432 I 065815.3+124428070351.6+123540203.04 8.42 5.98 +1.58 K5 +0.002+0.001 -016 -2652 CD-51 2224 530472348542544 Var? 065825.7-511535070051.5-512409261.54-19.48 5.14 +1.61 +1.92 +1.15 M1III -0.015+0.016 -.014+005V? * -2653 24Omi2CMaCD-23 4797 53138172839 270 065850.9-234113070301.5-235000235.55-08.23 3.02 -0.08 -0.80 -0.09 B3Iab v-0.004+0.003 +048SB 44 * -2654 BD+01 1665 53205114867 W 065909.3+013813070420.2+012918213.08 3.55 6.57 +0.01 -0.07 A0V +0.002-0.012 +007 62 0.9 90.4 -2655 BD-05 1943 53208134133 I 065909.7-051034070405.2-051925219.11 0.38 5.62 +1.29 +1.24 K3III -0.007+0.009 +040V -2656 BD-09 1818 53240152308 065912.9-095834070357.3-100727223.36-01.85 6.45 -0.08 -0.31 B9IIIn e-0.025-0.011 +024 * -2657 23Gam CMaBD-15 1625 53244152303 271 065914.0-152908070345.5-153800228.25-04.41 4.12 -0.12 -0.48 -0.10 B8II -0.002-0.008 +032V 27 * -2658 CD-43 2882 53253218396 065909.8-431529070215.6-432415253.77-16.43 6.43 -0.04 -0.09 A0V +0.015-0.012 +031 -2659 44 GemBD+22 1566 53257 79042 065917.1+224714070518.4+223814193.94 13.01 6.02 -0.03 -0.08 B8Vn -0.006-0.013 -011 345 -2660 BD+34 1524 53329 59773 3373 065936.1+343734070611.6+342826182.69 17.78 5.55 +0.91 +0.55 G8IV -0.055-0.048 +.036+005 -2661 CP-58 820 533492348632546 3349 065932.1-584757070105.1-585624269.21-21.79 6.02 +0.30 A8III -0.058+0.144 +010 * -2662 CP-67 686 53501249704 070000.8-674644065950.5-675458278.61-24.22 5.17 +1.40 +1.65 +0.70 K3III -0.033+0.241 +.037+039 * -2663 BD+09 1510 53510114899 I 070010.4+092014070539.1+091109206.32 7.31 5.78 +1.52 +1.87 M0III +0.048-0.020 +046V? -2664 BD-21 1732 53629172906 070031.5-215249070447.1-220156234.11-07.07 6.09 +1.22 +1.35 K0 +0.020-0.058 +077 -2665 BD+34 1530 53686 59794 I 070048.2+340950070722.3+340034183.24 17.84 5.91 +1.51 gK4 -0.028-0.025 +014SB -2666 CD-42 2929 537042184241184 Var? 070052.5-421122070402.8-422014252.87-15.72 5.20 +0.20 +0.15 +0.12 Am -0.008+0.072 +.025+028SB2 62 * -2667 CD-43 2906 53705218421 I'W A 070053.2-432809070357.3-433629254.09-16.22 5.54 +0.64 +0.04 +0.34 G3V -0.105+0.386 +.052+086SB 1.2 21.0AB 3* -2668 CD-43 2907 53706218423 I'W B 070054.8-432820070358.8-433642254.09-16.22 6.79 +0.80 +0.36 +0.28E K0V -0.109+0.371 +.052+090 1.2 21.0AB 3* -2669 BD+28 1314 53744 79066 070108.5+281951070725.0+281038188.89 15.66 6.48 -0.09 -0.25 B9V +0.006+0.020 -016V? 160 * -2670 BD-10 1862 53755152363 5782 V569 Mon 070106.3-103029070549.7-103940224.05-01.69 6.49 -0.05 -0.89 B0.5V+F5III 0.000-0.029 +016SB 412 3.6 38.3AC 4* -2671 BD+22 1577 53791 79070 I W R Gem 070120.1+225128070721.4+224213194.08 13.47 7.68 +2.21 +1.85 +3.36 S3.9e v+0.003-0.002 -041V 4.9 172.5 * -2672 CD-49 2587 53811218427 070117.6-492616070353.7-493502259.91-18.41 4.93 +0.13 +0.12 A4IV -0.045+0.146 +.020+027 59 * -2673 BD+34 1533 53899 598062549 070139.7+335920070813.3+334956183.48 17.94 6.28 +1.34 +1.54 K1 -0.010-0.030 -003 -2674 CP-58 826 53921234890 W 070143.0-590142070315.6-591041269.54-21.60 5.50 -0.11 -0.47 B9IV +0.022+0.009D+.014+007V 0.8 1.6 -2675 BD+37 1660 53925 59812 070150.4+373606070836.3+372642179.94 19.28 6.16 +1.21 K1III -0.008-0.013 +010 -2676 BD+05 1543 53929114935 070148.0+050355070706.4+045437210.33 5.72 6.11 -0.13 -0.47 B9.5III -0.033-0.020 +006V? 25 -2677 CD-34 3327 53952197557 W 070154.0-343734070532.0-344640245.85-12.42 6.14 +0.37 +0.03 F2V -0.043+0.041D+.034+019 1.3 3.1AB 5* -2678 BD-11 1790 53974152394 5795 FN CMa 070158.9-110823070640.7-111739224.71-01.79 5.39 +0.05 -0.85 B0.5IV -0.011-0.005 +031V? 153 1.3 0.5AB 3* -2679 BD-12 1788 53975152393 070156.7-121424070635.9-122338225.68-02.32 6.48 -0.10 -0.99 O7.5V -0.018+0.007 +033 162 * -2680 CD-30 3907 54031197566 070209.1-303008070600.6-303920242.08-10.59 6.34 -0.16 -0.63 B3V 0.000+0.009 +005SB -2681 BD+72 352 54070 61152552 070219.3+715845071358.1+714900143.41 27.42 6.35 +1.12 K0 +0.025+0.020 -068 -2682 BD+07 1607 540791149471185 070225.1+073742070749.5+072816208.11 7.03 5.75 +1.18 +1.08 gK0 +0.007-0.036 +024V? -2683 CP-56 1232 54118234902 272 V386 Car 070226.4-563552070418.3-564459267.11-20.73 5.17 -0.04 A0pSi +0.005-0.001 -.015+030 0 * -2684 45 GemBD+16 1397 54131 96535 5812 070237.9+160526070822.0+155551200.47 10.86 5.44 +1.03 +0.80 +0.36E G8III -0.008-0.099 +.007-017V? 5.4 10.4AB 3* -2685 CD-38 3163 54153197572 070236.2-381344070602.3-382258249.27-13.81 6.11 +0.70 G0IIaCH1 +0.014+0.017 +022V -2686 CD-24 4868 54173172986 070244.7-244819070652.3-245738236.97-07.94 6.08 +1.34 +1.51 K2 -0.031+0.007 +019V -2687 CD-50 2561 54179234907 070243.9-501228070516.5-502137260.76-18.47 6.46 K3III -0.011+0.032 +013 -2688 CD-26 3880 54224172989 070256.8-263004070700.1-263928238.52-08.66 6.62 -0.17 -0.77 B2IV-V +0.016-0.032 +004V * -2689 The MenCP-79 238 542392563552545 070254.0-791636065634.4-792513291.11-26.40 5.45 +0.05 -0.07 B9.5V -0.007 0.000 +006 -2690 CD-23 4908 54309173002 FV CMa 070311.7-234104070722.6-235025236.01-07.34 5.71 -0.10 -0.89 -0.12 B2IVe v-0.005+0.023 +029V? 290 * -2691 CD-40 2930 54475218465 Var 070350.5-404411070707.1-405336251.72-14.63 5.79 -0.17 -0.67 B3V t-0.007+0.004 +006 * -2692 BD+21 1528 54563 79131 070410.6+212516071006.7+211449195.71 13.46 6.43 +0.89 +0.50 G9V -0.167-0.478 +.029-015V * -2693 25Del CMaCD-26 3916 54605173047 273I 3424 070419.5-261404070823.5-262336238.42-08.27 1.84 +0.68 +0.54 +0.33 F8Ia -0.003+0.004 -.011+034SB 28 * -2694 BD-10 1892 54662152470 070436.1-101111070920.3-102050224.17-00.78 6.21 +0.03 -0.89 O6.5V +0.005-0.020 +058 91 * -2695 CD-23 4949 54669173064 Var? 070439.0-235302070849.3-240239236.34-07.13 6.65 -0.19 -0.81 B2V -0.013-0.009 +057V * -2696 63 AurBD+39 1882 54716 59866 274I 070446.6+392901071139.3+391914178.27 20.46 4.90 +1.45 +1.74 +0.56E K4III-IIIa +0.044+0.003 +.023-027SB? < 17 -2697 46Tau GemBD+30 1439 54719 59858 I 5846 3437 070446.5+302433071108.4+301443187.22 17.20 4.41 +1.26 +1.41 +0.63 K2-III -0.030-0.045 +.007+022 < 17 6.5 1.9AB 3* -2698 CD-51 2306 54732234940 070449.4-514841070713.3-515804262.46-18.75 5.96 +1.00 +0.82 K0III -0.008+0.057 +029V -2699 BD-16 1802 54764152477 5837 070503.1-160424070933.2-161405229.42-03.44 6.03 +0.06 -0.79 B1II -0.022-0.009 +006 5.3 32.5 * -2700 47 GemBD+27 1327 54801 791412553 070510.9+270116071123.1+265124190.51 15.96 5.78 +0.10 +0.13 A4IV -0.023-0.036 +039 80 * -2701 20 MonBD-04 1840 548101342821186I W 070515.6-040451071013.7-041414218.85 2.23 4.92 +1.03 +0.78 +0.52 K0III 0.000+0.215 +.030+079 < 19: 4.9 186.2AC 4 -2702 CD-39 3105 548931976322551 3431 070529.5-392942070851.1-393921250.69-13.83 4.83 -0.18 -0.69 -0.15 B2IV-V -0.009+0.002 +020V 0 * -2703 BD+51 1295 54895 262232555I UY Lyn 070535.6+513541071323.4+512544165.80 24.18 5.47 +1.67 +1.90 M3-III +0.006+0.014 +.003-051V * -2704 CD-25 4120 54912173101 W Var? 070535.7-250409070942.9-251352237.50-07.48 5.69 -0.16 -0.77 B2.5IV -0.012+0.006 +027SB 6.9 9.2 * -2705 BD-18 1711 54958152497 W 070545.0-183123071009.3-184107231.68-04.43 6.23 +0.40 F0 -0.010+0.016 +033V =< 15 5.0 0.8AB 3 -2706 48 GemBD+24 1558 55052 79162 070621.8+241745071226.4+240742193.21 15.11 5.85 +0.36 +0.09 F5III-IV -0.022-0.048 +013V 74 -2707 21 MonBD-00 1634 55057134316 V571 Mon 070616.9-000813071123.6-001807215.48 4.30 5.45 +0.29 +0.14 A8Vn-F3Vn v-0.031-0.011 +.021+030V 121 * -2708 CD-27 3710 55070173122 070618.3-271941071019.4-272929239.61-08.37 5.46 +1.00 G8III -0.003+0.009 +015 -2709 BD+81 242 55075 1164 070624.1+812622072521.9+811527132.74 28.08 6.31 -0.04 -0.09 A0III -0.005-0.026 -008 -2710 BD+05 1577 55111115062 070631.3+054914071151.3+053917210.20 7.11 6.09 -0.02 -0.05 A1V -0.017-0.008 +042SB 69 -2711 BD+27 1337 55130 79170 5871 3453 070635.7+272340071249.0+271329190.28 16.40 6.43 +0.49 -0.02 F8V +0.010-0.104 +.027-013V? =< 10 0.1 1.1AB 3* -2712 CP-68 591 55151249740 070636.3-684042070614.1-685014279.73-23.86 6.47 +1.04 +0.87 K0III -0.004+0.008 -014 -2713 BD+05 1580 55184115065 070647.9+053827071207.4+052829210.39 7.09 6.16 +1.14 +0.97 K0III -0.036+0.005 +020 -2714 22Del MonBD-00 1636 551851343301187 5864 070645.4-001937071151.9-002934215.70 4.32 4.15 -0.01 +0.02 +0.01 A2V -0.001+0.005 +.016+015V 142 9.2 32.0 -2715 18 LynBD+59 1065 55280 262482558I 070710.9+594857071554.9+593815156.99 26.20 5.20 +1.07 +1.01 K2III -0.101-0.259 +.042+024V? < 19: -2716 BD-20 1767 553441731682556 070722.8-204302071141.6-205259233.80-05.11 5.84 -0.04 -0.05 A0V -0.003+0.022 +018V 71 -2717 51 GemBD+16 1417 55383 966381188I W BQ Gem 070737.7+161943071322.3+160932200.78 12.04 5.00 +1.66 +1.82 +1.25E M4IIIab +0.013-0.042 +.011-009V 5.2 149.2AB 3* -2718 26 CMaCD-25 4191 55522173193 3458 070806.6-254630071212.2-255633238.40-07.30 5.92 -0.17 -0.71 B2V -0.009+0.011 +022 * -2719 CD-48 2765 555262185142554 070806.3-484617071047.5-485556259.70-17.13 5.14 +1.24 +1.29 +0.47E K2III -0.012+0.192 +.031+064 * -2720 CD-30 4081 55568197686 070812.8-303916071204.1-304918242.80-09.49 6.10 +0.27 +0.06 +0.14 A8V -0.039+0.015 +006 * -2721 BD+47 1419 55575 416441190 070824.6+472503071550.1+471424170.34 23.52 5.58 +0.58 +0.03 G0V +0.030-0.183 +.037+085V =< 6 -2722 BD+24 1576 55579 79191 W 070820.4+245256071426.6+244239192.84 15.76 6.89 -0.03 -0.07 A1pSrCr +0.003-0.016 +003 3.5 27.5AB 4 -2723 BD-11 1849 555891525702557I 070825.0-110456071307.2-111505225.40-00.37 5.78 +1.51 +1.76 K0 -0.003+0.008 +009 -2724 CD-27 3761 55595173200 HN CMa 070822.9-271822071224.1-272827239.80-07.95 6.59 +0.19 A5IV-V -0.025+0.008 -008 * -2725 52 GemBD+25 1618 55621 79199 I 5909 3469 070835.0+250331071441.9+245306192.70 15.88 5.82 +1.56 +1.83 M1III v+0.047-0.092 +047V? 6.3 23.9 * -2726 CD-36 3421 55718197694 W 3464 070852.6-362232071225.7-363240248.09-11.89 5.96 -0.14 -0.62 B3V -0.022+0.004D+.004+017 2.5 2.5 * -2727 CD-40 2987 55719218525 Var? 070857.0-401947071215.8-402956251.76-13.57 5.31 +0.06 +0.09 A3pSrEuCr -0.018-0.015 +.009+017SBO 66 * -2728 BD+12 1469 55730 966722559 070858.1+121716071432.6+120657204.63 10.56 5.62 +1.01 +0.77 G6III -0.050-0.020 +030 -2729 BD+03 1609 55751115119 I 070905.6+031658071420.0+030641212.76 6.51 5.35 +1.19 +1.18 K2II -0.006-0.002 +037 -2730 BD-22 1756 55762173230 I 3467 070909.4-223009071323.9-224024235.58-05.58 6.01 +1.48 +1.69 K2III +0.006-0.008 -005 -2731 BD-03 1804 55775134391 I 5911 070912.2-034349071411.0-035405219.01 3.27 5.75 +1.58 +1.89 K5III -0.015+0.007 +022V 5.0 2.7 -2732 BD-09 1921 55832134395 I 070930.3-094633071415.5-095651224.38 0.48 5.90 +1.52 +1.72 K3III -0.004+0.004 +043V? -2733 BD-22 1761 55856173247 5912 070934.6-224404071348.3-225423235.84-05.60 6.36 -0.21 -0.83 B2IV+G5IV -0.012-0.017 +017 1.8 19.7 * -2734 CD-27 3789 55857173244 GY CMa 070934.7-271107071336.3-272123239.81-07.65 6.12 -0.23 -1.01 B0.5V -0.025+0.006 +043V * -2735 Gam1VolCP-70 600 55864256373 W B 070933.4-702004070842.2-702950281.55-24.05 5.69 +0.40 +0.04 F2V +0.007+0.101 +.016-003SB 1.9 13.6 * -2736 Gam2VolCP-70 600 558652563741189 W A 3448 070935.8-702011070844.9-702956281.56-24.04 3.78 +1.04 +0.88 K0III +0.023+0.106 +.016+003V? 1.9 13.6 * -2737 BD+52 1188 55866 26260 070942.8+521827071733.7+520751165.21 24.97 5.92 +1.26 gK1 -0.001-0.025 -007 -2738 53 GemBD+28 1350 55870 79221 I 3485 070942.4+280417071557.1+275351189.91 17.30 5.71 +1.63 +2.00 M1IIIa -0.016+0.001 +.008+024V? -2739 BD-10 1933 55879152598 070943.8-100838071428.2-101900224.73 0.35 6.03 -0.18 -0.97 B0III -0.004-0.011 +033 50 * -2740 CD-46 2977 55892218537 275 QW Pup 070942.5-463532071233.6-464534257.72-16.02 4.49 +0.32 -0.01 +0.22 F0IV -0.132+0.103 +.048-001 54 * -2741 CD-30 4143 55958197719 GG CMa 070956.3-305443071347.1-310502243.20-09.28 6.60 -0.17 -0.76 B2IV -0.014-0.002 +028SB? * -2742 BD+82 201 55966 11793951I VZ Cam 071003.1+823616073104.4+822441131.42 28.18 4.96 +1.66 +1.80 +1.25E M4IIIa -0.006-0.042 +.001+014V * -2743 CD-30 4146 55985197722 071004.1-301004071357.2-302024242.54-08.92 6.33 -0.20 -0.83 B2IV-V -0.015-0.006 +024SB * -2744 24 MonBD+00 1871 56003134414 5933 071012.3+000044071519.3-000941215.81 5.24 6.41 +0.90 +0.57 G5III -0.020-0.002D+.011-010V? 5.8 3.8 -2745 27 CMaCD-26 4057 56014173264 W EW CMa 071010.6-261048071415.2-262109238.97-07.07 4.66 -0.19 -0.71 -0.12 B3IIIe -0.009+0.007 +000SB2 139 0.0 0.1 * -2746 CD-44 3223 56022218546 OU Pup 071013.8-450032071313.4-451059256.26-15.30 4.89 -0.02 -0.07 A0pSi -0.019-0.099 +.010+004V? 28 * -2747 BD+08 1712 56031115159 I 3486 071013.9+080907071539.4+075840208.53 8.99 5.82 +1.60 +1.71 M4-IIIab +0.029+0.007 -009 * -2748 CD-44 3227 56096218549 W L2 Pup 071029.1-442836071332.4-443823255.77-15.04 5.10 +1.56 +2.42 M5IIIe +0.114+0.330 +.022+053V? 6.4 62.0 * -2749 28Ome CMaCD-26 4073 56139173282 Ome CMa 071045.2-263556071448.7-264622239.41-07.15 3.85 -0.17 -0.73 -0.12 B2IV-Ve v-0.008+0.006 +026SB? 120 * -2750 CD-26 4074 56160173283 I 071048.6-265148071451.1-270217239.65-07.26 5.58 +1.22 +1.29 K4III -0.049-0.030 +015V -2751 BD+49 1612 56169 41681 071056.1+493835071831.9+492754168.11 24.51 5.05 +0.08 +0.09 +0.06 A4IIIn -0.004+0.014 +.008-012V 222 -2752 BD-10 1945 56207152621 071059.2-102430071543.1-103502225.11 0.50 5.95 +1.18 +1.18 K0 +0.011-0.007 -013 -2753 64 AurBD+41 1630 56221 41679 276 071105.0+410340071802.2+405300177.08 22.11 5.78 +0.17 +0.12 A5Vn -0.015+0.013 -010V 185 * -2754 CP-62 789 56239249774 W 071105.4-630108071202.0-631124274.00-21.77 6.02 -0.02 A0IV-V -0.003 0.000D+.005-000 0.4 0.4 -2755 CD-23 5173 56341173319 071135.6-233353071547.5-234426236.79-05.58 6.32R A0 +0.017+0.007 +034 -2756 CD-30 4184 56342197756 071128.8-303041071521.0-304111242.99-08.80 5.36 -0.17 -0.65 B3V -0.018+0.013 +033 0 * -2757 BD+31 1529 56386 599642563 071140.6+310807071804.1+305721187.09 18.85 6.24 -0.03 -0.10 A0Vn -0.004-0.028 +027V 325 -2758 BD-15 1734 564051526412561 071142.7-152431071614.5-153509229.59-01.71 5.46 +0.08 +0.06 A2Vnp -0.050-0.015 +.041+010V? 152 * -2759 CD-41 2906 56410218568 071141.3-411505071457.1-412533252.84-13.49 5.94 -0.16 B4III-IV +0.009+0.022 +021V? -2760 BD+06 1594 56446115204 071155.4+065133071717.8+064050209.88 8.78 6.65 -0.11 -0.41 B8III +0.001-0.015 +009V? 200 -2761 CD-46 3000 56455218570 PR Pup 071153.6-464028071445.9-465059257.96-15.71 5.72 -0.11 -0.46 A0pSi -0.018-0.008 +040 * -2762 CD-48 2807 56456218567 W 071152.6-480549071438.2-481618259.31-16.29 4.76 -0.10 -0.29 -0.08 B8-9V +0.004+0.004 +039V 8.6 18.5 * -2763 54Lam GemBD+16 1443 56537 96746 277 5961 3512 071220.7+164315071805.6+163225200.92 13.23 3.58 +0.11 +0.10 +0.05 A3V -0.048-0.037 +.047-009SB 154 1.0 0.0 O 3* -2764 CD-23 5189 56577173349 I 5951 3503 071223.8-230816071636.8-231856236.50-05.21 4.79 +1.71 +1.87 +0.96 K3Ib-II -0.010+0.002 +.019+028V? 1.2 26.8 * -2765 BD-06 2032 56614134474 I 071239.1-063004071731.7-064048221.86 2.72 6.29 +1.62 +1.96 K2 -0.014+0.011 +009 -2766 CD-27 3852 566181733602562I 071234.4-274216071635.0-275252240.58-07.30 4.64 +1.60 +1.88 +1.25 M3III -0.010+0.043 +.012+042 * -2767 CP-52 1123 56705235040 071258.9-521932071521.0-522959263.45-17.78 5.97 +1.10 K1III -0.058+0.103 +039 -2768 CD-30 4234 56731197789 W 071305.3-304302071657.2-305348243.34-08.59 6.32 +0.20 +0.19 +0.15 A9II +0.005-0.021 -005V 1.7 37.9 * -2769 CD-38 3288 56733197785 071304.3-380826071631.8-381908250.08-11.91 5.80 -0.13 -0.59 B4V -0.015+0.005 +045V * -2770 CD-36 3485 56779197790 Var? 071315.8-362449071649.5-363534248.52-11.12 5.03 -0.17 -0.69 B2IV-V +0.001-0.002 +009SB 132 * -2771 CD-46 3023 56813218589 071322.3-463549071615.5-464628257.99-15.45 5.66 +1.44 +1.67 K4III +0.009+0.035 +020 -2772 47 CamBD+60 1048 56820 26298 5995 071331.7+600514072217.2+595407156.84 27.03 6.35 A8m +0.003+0.014D+.015+007V 4.5 2.2 -2773 Pi PupCD-36 3489 56855197795 278 W 3515 071336.6-365504071708.6-370551249.01-11.28 2.70 +1.62 +1.24 +0.91 K3Ib -0.009+0.004 +.032+016 5.3 69.2 * -2774 CD-26 4140 56876173411 071344.2-263700071747.9-264751239.73-06.57 6.46 -0.15 -0.61 B2IV-V -0.010+0.001 +015V * -2775 BD+42 1699 56941 41705 071359.4+425030072103.1+423920175.42 23.16 6.35 +1.46 +1.58 K0 -0.019-0.046 +046 -2776 BD+45 1422 56963 417082567 071403.1+452447072117.5+451341172.73 23.90 5.77 +0.32 0.00 A7 s -0.048+0.004 +025 -2777 55Del GemBD+22 1645 56986 79294 279I 5983 071409.0+221000072007.4+215856195.98 15.89 3.53 +0.34 +0.04 +0.19 F2IV -0.026-0.012 +.061+004SBO 111 2.0 0.2 O 3* -2778 BD+02 1640 569891152632564 071408.8+025527071922.4+024426213.67 7.46 5.89 +1.07 +0.82 G9III 0.000-0.013 +024 -2779 BD+07 1684 570061152692565 071423.9+071942071947.6+070834209.74 9.54 5.91 +0.53 +0.07 F8V +0.060-0.063 +022 =< 10 -2780 BD+15 1541 57049 96783 071425.1+151939072006.9+150834202.43 13.08 6.45 -0.02 +0.07 A2Vn +0.011-0.017 +013SB -2781 29 CMaCD-24 5173 57060173444 I UW CMa 071430.5-242234071840.3-243332237.82-05.37 4.98 -0.15 -1.01 -0.13 O7Ia:fp v-0.006 0.000 -011SB2O 136 * -2782 30Tau CMaCD-24 5176 57061173446 I 5977 3528 071433.6-244618071842.4-245715238.18-05.54 4.40 -0.15 -0.99 -0.18 O9Ib -0.009+0.010 +040SBO 112 0.0 0.2AP 5* -2783 19 LynBD+55 1192 57102 26311 6012B 071441.2+552822072250.9+551704161.96 26.36 6.53H B9V +0.004-0.024 +.011+010SB 250 1.0 15.1AB 4* -2784 19 LynBD+55 1192 57103 26312 280 6012A 071442.5+552812072252.1+551653161.96 26.37 5.45 B8V -0.003-0.029 +.011+005SB2O 80 1.0 15.1AB 4* -2785 BD-19 1813 57118152710 071438.5-190550071902.0-191649233.17-02.85 6.09 +0.62 +0.35 F0Iab-Ib +0.008+0.002 +062SB? 23 -2786 CD-26 4164 57146173453 I 071446.9-262411071851.2-263509239.65-06.26 5.28 +0.96 +0.65 G2Ib -0.017+0.008 +.017+032V * -2787 CD-36 3512 57150197824 W NV Pup 071445.0-363306071818.4-364403248.78-10.91 4.66 -0.10 -0.80 -0.05 B2V+B3IVne -0.003+0.001 +019 277 0.4 239.9AB 4* -2788 BD-16 1898 57167152724 R CMa 071456.6-161227071928.1-162342230.67-01.41 5.70 +0.35 +0.04 F1V +0.157-0.132 +.040-039SBO 98 * -2789 CD-43 3093 57197218618 071458.4-434815071804.2-435912255.49-14.03 5.85 -0.12 -0.48 B8II-III -0.015+0.001 +013V -2790 CD-36 3519 57219197837 NW Pup 071504.8-363335071838.2-364434248.82-10.86 5.11 -0.16 -0.66 -0.21 B2IVne -0.002+0.003 +018V 124 * -2791 CD-38 3309 57240197836 071508.8-390138071833.6-391237251.08-11.94 5.25 +0.01 +0.07 A1V +0.010+0.007 +.014+032 29 -2792 BD+39 1927 57263 60012 071523.8+391105072213.4+385946179.29 22.31 6.40 +1.22 +1.23 K0 -0.003-0.038 +003 -2793 65 AurBD+37 1707 57264 600102568I 6009 071521.7+365655072202.6+364538181.57 21.58 5.13 +1.08 +0.94 K0III -0.098-0.023 +.022+023 < 17 5.5 11.4AB 3* -2794 CD-33 3696 572991978422566 071530.3-333233071913.7-334338246.12-09.42 6.30 +1.31 K2-3III -0.013-0.013 -002 -2795 56 GemBD+20 1775 57423 79328 I 6016 3550 071602.8+203757072156.8+202637197.63 15.66 5.10 +1.52 +1.87 M0IIIab -0.066-0.027 +.002+004 7.4 16.5AB 3* -2796 BD-14 1846 57478152749 071623.0-141023072058.2-142136229.04-00.13 5.45 +0.98 +0.63 gG5 -0.018+0.016 +013 -2797 BD+81 252 57508 1194 071627.2+810559073439.7+805348133.11 28.47 6.41R gG7 -0.010+0.003 -002 -2798 BD-08 1862 57517134563 071628.7-084110072116.9-085242224.24 2.51 6.55 +0.54 +0.04 F5 +0.036-0.156 -007V? =< 10 -2799 BD-22 1823 57573173517 Var 071638.6-223946072053.2-225106236.54-04.13 6.61 -0.15 B2.5V +0.006-0.042 +010 * -2800 CD-26 4223 57593173522 6015 HQ CMa 071651.3-264634072055.0-265749240.20-06.03 6.01 -0.17 -0.70 B2.5V +0.010+0.019 +018V 7.2 8.2 * -2801 BD+00 1915 57608115335 071655.5+002159072203.5+001038216.28 6.89 5.99 -0.07 -0.29 B8III +0.001+0.004 -010V 5 -2802 CD-25 4400 57615173529 I 071657.8-254214072104.3-255329239.26-05.50 5.87 +1.64 +1.90 M4III -0.012+0.025 +023 -2803 Del VolCP-67 730 57623249809 281 071652.8-674627071649.8-675726279.09-22.69 3.98 +0.79 +0.45 +0.38 F6II -0.007+0.005 +.004+023 0 -2804 BD+52 1205 57646 26333 I 071709.3+520452072457.2+515314165.74 26.03 5.80 +1.61 +1.96 +0.92 K5III +0.014-0.035 +018V -2805 66 AurBD+40 1852 57669 417381191I 071713.0+405154072408.5+404020177.67 23.15 5.19 +1.23 +1.24 K1+IIIaCN1 -0.006-0.023 +.007+021SB? < 19: -2806 BD-08 1872 57682134580 071714.3-084725072202.0-085845224.41 2.63 6.43 -0.19 -1.04 O9V +0.006+0.021 +023 35 * -2807 BD-02 2079 57708134585 071717.6-024721072218.5-025844219.13 5.49 6.23 +0.68 +0.35 F5 -0.016+0.003 -015V =< 10 -2808 57 GemBD+25 1660 57727 79352 D 071722.7+251434072328.5+250302193.34 17.78 5.03 +0.90 +0.57 G8III -0.069-0.023 +.022+006 < 19: * -2809 BD+66 502 57742 141952571 071731.9+663143072725.8+661954149.69 28.26 6.47 -0.09 -0.19 B9III -0.012-0.032 +007V? 0 -2810 58 GemBD+23 1698 57744 79354 071727.6+230816072328.2+225643195.38 16.97 6.02R -0.01 -0.01 A1V -0.022-0.036 +015 125 -2811 BD-05 2089 57749134588 3560 071731.1-054732072225.4-055858221.81 4.12 5.82 +0.35 +0.19 F3IV -0.011-0.004 +011V 42 * -2812 BD-18 1806 578211527762570 071749.2-184933072213.5-190100233.29-02.06 4.96 -0.04 -0.39 -0.04 B7IV -0.006-0.008 +027 117 -2813 CP-52 1153 57852235110 W A 071756.7-520737072021.4-521842263.57-17.00 6.05 +0.42 -0.02 F0-2IV-V -0.036+0.134 +.038+022 0.6 9.3 * -2814 CP-52 1153 57853235111 W B 071757.0-520728072021.7-521835263.57-17.00 6.60 +0.59 +0.05 G0V:e -0.040+0.124 +.038+035V 0.6 9.3 * -2815 CD-51 2445 57917235116 071812.4-515348072038.7-520510263.37-16.87 5.39 -0.07 B9II-III -0.019-0.007 +018SB 29: -2816 59 GemBD+27 1374 57927 79366 071820.1+274952072433.4+273817190.91 18.97 5.76 +0.34 +0.08 g:F0 +0.012+0.017 -005V 67 -2817 BD+15 1564 58050 96866 OT Gem 071845.3+154241072427.7+153102202.53 14.19 6.41 -0.18 -0.84 B2Ve v+0.011+0.004 +037 140 * -2818 21 LynBD+49 1623 58142 417642572 3585 071910.2+492436072642.8+491241168.71 25.75 4.64 -0.02 -0.01 -0.05 A1V -0.013-0.050 +.012+027V 16 * -2819 CD-31 4437 58155197925 071911.2-314351072300.6-315526244.86-07.90 5.43 -0.15 -0.68 -0.13 B5IIIn e-0.014+0.004 +024SB * -2820 1 CMiBD+11 1578 58187 96871 071924.8+115156072458.2+114011206.17 12.67 5.30 +0.10 +0.13 A5IV -0.017-0.014 +.015-001V? 165 -2821 60Iot GemBD+28 1385 58207 79374 282I 071930.9+275949072543.6+274753190.85 19.27 3.79 +1.03 +0.85 +0.50 G9IIIbHdel -1 -0.123-0.086 +.032+008V 9 * -2822 CD-27 4020 58215173622 I 071927.3-273825072329.1-275003241.24-05.92 5.38 +1.53 +1.83 K2III +0.045+0.005 +.013+048SB -2823 CD-31 4454 58286197938 071943.2-320029072331.9-321208245.16-07.93 5.39 -0.18 -0.69 B3III-IV -0.009+0.004 +021SB 29 * -2824 CD-29 4322 58325197944 071959.7-300120072354.3-301301243.41-06.94 6.60 -0.20 -0.79 B2IV-V -0.019+0.009 +007 * -2825 BD-15 1810 58343152834 FW CMa 072008.9-160018072440.1-161204231.09-00.21 5.33 -0.05 -0.60 -0.02 B2.5IVe v-0.014-0.010 +002V 33 * -2826 BD-22 1855 58346173656 072002.5-224303072417.2-225446236.96-03.46 6.19 -0.09 -0.36 B8 -0.016 0.000 +032V? * -2827 31Eta CMaCD-29 4328 58350173651 283I W 072008.3-290629072405.7-291811242.62-06.49 2.45 -0.08 -0.72 -0.06 B5Ia -0.004+0.005 +041V 45 4.5 178.7 * -2828 2Eps CMiBD+09 1643 58367115425 I 072010.9+092824072538.9+091634208.45 11.78 4.99 +1.01 +0.78 +0.50 G6.5IIb -0.006-0.011 +.008-008V? < 17 * -2829 CD-35 3569 58420197951 W 072021.1-353834072358.3-355016248.48-09.49 6.31 -0.15 -0.55 B7III -0.018+0.018 +028 6.2 25.0 * -2830 BD+68 480 58425 14211 284I 072028.6+684012073052.7+682756147.28 28.69 5.64 +1.11 +0.89 gK2 -0.010-0.038 +.011+056 -2831 BD-18 1825 58439152837 W 072026.4-184857072450.7-190044233.58-01.51 6.24 +0.29 0.00? A2Ib -0.021+0.005 +070 4.9 2.7 -2832 BD-13 2001 584611528401192 W 072032.7-133318072508.3-134507228.99 1.05 5.78 +0.42 F0V -0.204-0.004 +.037+007V? -2833 BD-05 2112 58526134654 072056.3-053436072551.0-054630222.02 4.97 5.97 +0.92 +0.62 G3Ib -0.029-0.004 +014V -2834 CD-31 4482 58535197964 I W 3584 072053.9-313644072443.8-314832244.92-07.52 5.35 +1.07 +0.91 G8II -0.020+0.010 -.021+020 2.1 99.2AC 4* -2835 BD+21 1596 58551 79386 072055.6+214408072650.2+213209197.05 17.15 6.54 +0.46 F6V -0.315-0.020 +.038+047SB =< 10: -2836 BD+10 1532 58552 96899 072057.1+104825072627.9+103630207.31 12.54 6.37 +0.09 +0.06 +0.02 A2IV -0.021+0.005 -010V 20 -2837 61 GemBD+20 1805 58579 79391 D 3592 072102.6+202727072656.3+201526198.29 16.66 5.93 +0.30 +0.10 F2Vn -0.005-0.019 +009SB * -2838 BD-04 1943 58580134658 072105.7-042018072603.5-043215220.95 5.59 6.76 -0.01 -0.11 A0IV +0.009-0.018 -002SB2 71 * -2839 BD-21 1925 58585173691 W 072102.8-214706072519.9-215858236.26-02.81 6.05 +0.23 A8I-II: -0.010+0.003 +041V 7.4 2.4 -2840 BD+11 1588 58599 96901 W 072109.4+111231072641.3+110033206.97 12.76 6.41 -0.13 -0.46 B6IV +0.009-0.002 +029 50 * -2841 CD-24 5366 586121736972574 072116.5-250111072525.3-251304239.12-04.32 5.78 -0.10 -0.39 B7III -0.005-0.002 +024V * -2842 CD-37 3549 58634197974 W B 072114.5-370535072447.2-371724249.87-10.00 6.97 +0.22 +0.15 F0V: +0.016+0.009D+.003+026 0.1 7.0 * -2843 CD-37 3549 58635197975 W A 072114.9-370541072447.3-371727249.87-10.00 6.84 +0.27 +0.15 F0V: -0.020+0.044D+.003+018 0.1 7.0 * -2844 BD+48 1538 58661 41797 6095 072124.5+482314072851.6+481102169.91 25.87 5.72 -0.10 -0.41 B9pHgMn +0.007-0.049 +021V 32 4.6 16.5ABxC 3* -2845 3Bet CMiBD+08 1774 58715115456 285 W Bet CMi 072143.6+082927072709.0+081722209.52 11.68 2.90 -0.09 -0.28 -0.06 B8Ve -0.052-0.038 +.019+022SB 276 7.8 138.7AE 5* -2846 63 GemBD+21 1602 58728 79403 6089 072148.2+213859072744.4+212642197.23 17.30 5.22 +0.39 -0.04 F5V+F5V -0.058-0.121 +.041+025SB2O 38 0.5 0.0 O 5* -2847 CD-31 4506 58766197986 Var? 072152.6-313223072543.0-314419244.96-07.30 6.31 -0.17 -0.70 B2V 0.000+0.007 +010 * -2848 CP-86 105 588052584601661 072201.5-865211064658.7-870130299.59-27.15 6.47 +0.42 -0.07 F3V +0.006+0.004 +004 -2849 22 LynBD+49 1630 58855 41808 W 072220.5+495245072956.0+494021168.33 26.35 5.36 +0.45 -0.06 F6V +0.114-0.080 +.042-027V 12 4.8 169.3AB 3* -2850 CD-23 5477 58907173743 072227.9-233043072640.7-234244237.93-03.36 6.56 +0.01 A1 -0.006+0.023 +027 -2851 5Eta CMiBD+07 1729 58923115477 6101 072239.3+070845072802.1+065631210.85 11.28 5.25 +0.22 +0.17 F0III -0.004-0.044 +.010+018 67 5.2 4.0 * -2852 62Rho GemBD+32 1562 58946 60118 286 6109 072240.8+315900072906.7+314704187.14 21.34 4.18 +0.32 -0.03 +0.19 F0V +0.155+0.175 +.062-004SB 68 3.4 220.4AC 4* -2853 BD-17 1980 58954152894 6093 072240.6-173948072708.0-175152232.83-00.49 5.63 +0.32 A5n +0.002+0.015 -029 157 5.3 1.6 -2854 4Gam CMiBD+09 1660 58972115478 I 6100 072243.1+090741072809.8+085532209.05 12.18 4.32 +1.43 +1.54 +0.79 K3-IIIFe-0.5 -0.062+0.017 +.019+047SB1O < 17 5.9 130. AD 4* -2855 BD-22 1874 58978173752 FY CMa 072245.0-225305072659.4-230510237.41-03.00 5.61 -0.13 -0.98 -0.03 B0IV:pe -0.012+0.004 +025V? 244 * -2856 CD-33 3813 59026198000 072259.3-335622072642.3-340827247.20-08.22 5.90 -0.17 -0.68 B2IV-V -0.027 0.000 +007 -2857 64 GemBD+28 1396 59037 79427 072306.6+281928072920.4+280705190.83 20.13 5.05 +0.11 +0.12 A4V -0.041-0.056 +.008+035V 202 * -2858 BD+15 1579 59059 96930 072306.1+151851072847.3+150634203.36 14.97 6.22 -0.05 -0.11 B9IV +0.004-0.025 +034 -2859 BD-11 1951 59067152909 6104AB 3600 072309.6-112114072751.7-113325227.36 2.67 5.79 +0.58 -0.21 G8Ib-II+B2+B8V -0.004-0.001 +015V? 2.0 0.9AB 5* -2860 BD-22 1878 59136173778 072327.8-223922072742.9-225135237.29-02.74 5.95 -0.09 -0.41 B5V: -0.005-0.017 +026V? -2861 65 GemBD+28 1400 59148 79434 I 6119 072335.5+280721072948.7+275458191.07 20.15 5.01 +1.11 +1.03 +0.37E K2III -0.034-0.024 +.018+036SB2 < 17 8.5 12.8 * -2862 CD-50 2761 592192351922575 072347.8-504900072621.9-510106262.72-15.63 5.10 +1.06 K0III +0.001+0.008 +.007+008 -2863 CD-28 4383 59256173799 Var? 072400.9-285707072759.2-290921242.88-05.67 5.54 -0.08 -0.15 B9VpSi: -0.006+0.008 +004 -2864 6 CMiBD+12 1567 59294 969521193I 3609 072413.8+121248072947.8+120024206.38 13.88 4.54 +1.28 +1.37 +0.64 K1+IIIBa0.4 0.000-0.019 +.029-015 < 19: -2865 BD-01 1738 593111347402578I 072415.3-014157072918.7-015419218.99 7.54 5.59 +1.50 +1.76 K5III -0.015-0.005 -005V -2866 BD-07 1996 59380134742 072434.1-072054072925.7-073304224.02 4.91 5.86 +0.48 -0.02 F8V +0.064+0.131 +009V? =< 10 -2867 BD-10 2067 593811529412579I 072437.1-100713072922.1-101936226.46 3.58 5.75 +1.62 +1.99 K5III -0.001+0.001 -007 -2868 BD-14 1925 59438152943 6126 072448.8-144708072921.9-145957230.57 1.36 6.05 +0.47 -0.07 F7V -0.185-0.254 +.027-006V 1.4 2.2AB 5* -2869 CD-37 3601 59466198031 072451.7-373612072822.8-374837250.66-09.59 6.58 +0.06 +0.04 A1IV -0.020-0.050 -001V? -2870 CD-31 4590 59499198038 W A 072500.6-313833072851.3-315054245.36-06.76 6.38 -0.17 -0.70 B3V +0.008+0.003 +002 0.7 8.9 * -2871 CD-31 4590 59500198039 W B 072501.2-313827072851.5-315049245.36-06.76 7.13 -0.15 -0.60 B4V -0.036+0.003 +004 0.7 8.9 -2872 BD+39 1958 59507 60148 072508.4+390623073155.7+385347179.99 24.08 6.54 +0.07 +0.04 A2V -0.035-0.014 +007 -2873 CD-31 4593 59550198042 072513.2-311459072904.9-312723245.04-06.54 5.77 -0.19 -0.75 B2V -0.014+0.002 +008SB -2874 BD-22 1897 59612173864 W 072536.5-224859072951.4-230128237.67-02.39 4.85 +0.23 +0.14 +0.27 A5Ib -0.004-0.006 -.003+037 26 5.9 3.0 -2875 CD-38 3400 596351980452580 072537.9-383619072905.7-384844251.64-09.93 5.43 -0.16 B5Vp -0.016+0.011 +024V 38 -2876 BD-04 1979 596691347742582 072554.9-050101073051.1-051335222.12 6.32 6.24 +1.18 +1.06 K0 -0.006-0.002 +017 -2877 BD+17 1596 59686 969852585I 072602.4+171756073148.4+170510201.80 16.44 5.42 +1.13 gK2 +0.043-0.078 +.001-040V? -2878 Sig PupCD-43 3260 597172187551194 W 072603.4-430556072913.8-431805255.74-11.91 3.25 +1.51 +1.78 +0.92 K5III -0.055+0.187 +.020+088SB1O 5.3 22.3 * -2879 BD+23 1744 59878 79489 6160 072651.0+230603073250.6+225316196.30 18.95 6.54 +1.01 +0.77 K0II-III+F8V -0.025-0.012 +030SB 2.2 11.5 * -2880 7Del1CMiBD+02 1691 598811155812587 072654.2+020735073205.9+015452215.88 9.92 5.25 +0.22 +0.20 F0III -0.003-0.003 +.016+029V? 75 -2881 CD-30 4620 59890198064 I 072649.3-304507073042.5-305744244.76-06.00 4.65 +0.93 +0.64 +0.47 G3Ib -0.021 0.000 +.023+014 -2882 CD-37 3637 59967198069 I' 072709.9-370748073042.4-372023250.46-08.97 6.65 +0.63 G4V -0.098+0.042 +009 -2883 BD-08 1964 59984134806 6158 072718.1-083951073205.8-085251225.50 4.87 5.90 +0.54 -0.08 F5V -0.090-0.157 +055V =< 10 2.7 23.4 * -2884 CP-52 1198 60060235239 072734.1-522632072959.6-523904264.50-15.79 5.87 +1.01 +0.83 K0III -0.031+0.058 +026 -2885 CD-35 3650 60098198086 3629 072748.4-355628073125.8-360910249.46-08.29 6.68 -0.12 -0.57 B4V -0.004+0.022 +021 83 -2886 68 GemBD+16 1510 60107 97016 D 3642 072754.0+160230073336.5+154936203.19 16.32 5.25 +0.05 +0.06 A1Vn -0.019-0.012 +.011+012V? 163 1.6 0.2 * -2887 8Del2CMiBD+03 1715 60111115610 072757.1+033013073311.6+031725214.76 10.79 5.59 +0.31 +0.10 F2V -0.018+0.038 +001 101 -2888 CP-64 721 601502498642584 072802.5-641800072851.3-643036275.98-20.45 6.39 +1.56 +1.85 K5III -0.011-0.016 +014 -2889 CD-35 3652 60168198093 W PS Pup 072804.4-354030073142.8-355316249.25-08.12 6.61 -0.08 -0.36 A0V +0.011+0.007 -002SB2 4.4 91.5AB 3* -2890 66Alp GemBD+32 1581 60178 60198 287I 6175B 072813.0+320627073436.0+315319187.44 22.48 2.88 +0.04 +0.02 A2Vm -0.172-0.099 +.067-001SB1O 30 0.9 2.0AB 6* -2891 66Alp GemBD+32 1581 60179 I 6175A YY Gem 072813.0+320627073436.0+315318187.44 22.48 1.98 +0.03 +0.01 -0.01 A1V -0.171-0.098 +.067+006SB1O 14 0.9 2.0AB 6* -2892 CP-54 1294 602282352522586 072815.4-541118073030.9-542358266.20-16.43 5.96 +1.56 +1.96 M1III +0.018+0.021 +049 -2893 BD+10 1563 60275 97021 072834.6+104704073405.1+103406208.18 14.21 6.28 -0.01 -0.06 A1V -0.005-0.009 -003 135 -2894 BD+56 1227 60294 26423 072838.6+555831073647.0+554519161.77 28.38 5.92 +1.12 K2III -0.015-0.035 +001V -2895 CD-35 3659 60312198104 W 072844.1-354449073222.3-355741249.38-08.04 6.3 -0.10 -0.36 B9V -0.012+0.005 +023V 1.2 0.3 -2896 BD+31 1620 60318 60204 6185 072847.5+311042073508.7+305740188.43 22.29 5.33 +1.01 +0.85 K0III -0.033+0.013D+.003-006 < 19: 0.4 0.4AB 3* -2897 BD-14 1966 60325153061 072846.1-140722073322.1-142018230.45 2.52 6.21 -0.04 -0.71 B1V -0.010-0.004 +022 * -2898 BD+43 1711 60335 41877 6191 072853.7+431503073556.0+430152175.80 25.89 6.30R F0 -0.024-0.050D+.005+021 =< 15 1.1 2.2 -2899 BD-19 1944 60341153062 072855.2-191142073319.5-192445234.89 0.06 5.66 +1.12 +1.08 +0.38E K3III +0.022-0.067 +016V * -2900 CD-24 5566 60345173987 072858.9-242945073309.7-244239239.51-02.54 5.85 +0.17 +0.11 A7V: -0.010+0.013 +015 -2901 9Del3CMiBD+03 1719 60357115644 W 072901.0+033519073415.8+032217214.81 11.06 5.81 -0.02 -0.09 A0Vnn -0.012-0.014 +034V 195 5.2 90.0AB 3 -2902 BD-14 1971 60414153072 I KQ Pup 072912.3-141827073347.9-143126230.67 2.52 4.97 +1.41 +0.29 +1.33 M2Iabpe+B2V v-0.012+0.004 -.003+022SBO * -2903 BD+46 1286 60437 418791195I 072916.1+462403073631.6+461049172.41 26.71 5.65 +1.56 +1.90 +0.78E M0III -0.028-0.032 +029 -2904 BD+03 1723 60489115653 3648 072932.9+025637073446.0+024330215.46 10.88 6.55 +0.22 +0.15 A7III -0.043-0.027 +046 * -2905 69Ups GemBD+27 1424 60522 795331196I W 3652 072945.6+270705073555.3+265345192.60 21.06 4.06 +1.54 +1.94 +0.91 M0III-IIIb e-0.034-0.106 +.014-021 =< 19: 9.0 46.1 * -2906 BD-21 2007 60532174009 288 072946.3-220448073403.2-221746237.50-01.19 4.45 +0.51 +0.06 +0.27 F6IV -0.040+0.046 +.054+061 0 * -2907 CD-39 3398 60559198120 072949.1-395032073313.5-400332253.13-09.78 6.26 -0.12 -0.48 B8IVpSi +0.020-0.010 +014V -2908 CD-42 3325 60574218792 073000.7-425208073313.3-430511255.87-11.16 6.52 +0.92 G8III +0.005-0.035 -048 -2909 CD-23 5709 60584174019 6190A 073005.0-231520073418.6-232825238.56-01.71 5.83 +0.44 +0.03 dF4 -0.095+0.002 +.023-005SB 0.0 9.6 * -2910 CD-23 5709 60585174020 6190B 073005.7-231523073419.1-232829238.56-01.71 5.87 dF6 -0.111-0.010 +.023-006V 0.0 9.6 * -2911 CD-36 3715 60606198130 OW Pup 073013.9-360715073351.0-362018249.85-07.95 5.54 -0.06 -0.72 -0.01 B3Vne -0.012+0.001 -009SB 297 * -2912 CD-25 4719 60629174028 073021.6-255351073428.8-260700240.89-02.95 6.65 -0.01 -0.05 A0V -0.019-0.025 +028 -2913 CD-33 3926 60646198138 073026.8-331449073412.8-332748247.33-06.53 6.11 +0.29 A9IV -0.056+0.070 +025 -2914 BD+49 1653 60652 41893 073026.4+485949073753.9+484625169.61 27.45 5.92 +0.22 +0.16 +0.05 A5m -0.026-0.032 +010 60 -2915 BD+40 1903 60654 418872589I 073027.2+401455073717.8+400131179.10 25.39 6.38R M1 -0.011-0.050 +010 -2916 CD-26 4574 60666174033 073030.1-264744073434.9-270043241.69-03.37 5.77 +1.06 K1III -0.039+0.079 -006V? -2917 CD-39 3407 60686198137 073033.7-394120073358.5-395421253.06-09.59 6.76 +1.13 K2III -0.017+0.045 +030V -2918 BD+06 1729 60803115693 073115.2+060500073634.7+055142212.81 12.70 5.91 +0.60 +0.10 G0V -0.111+0.011 +004SB2?=< 10 -2919 Eps MenCP-78 265 608162564152583 073108.4-785305072538.0-790539291.02-25.01 5.53 +1.28 +1.42 K2-3III -0.033+0.003 -.002+011 -2920 BD-07 2065 60853134883 I 073126.7-080523073616.6-081841225.50 6.04 6.27 +1.54 +1.89 K2 +0.035+0.002 +005 -2921 BD-14 1999 60855153118 6208 Var 073128.0-141616073603.9-142934230.91 3.02 5.70 -0.12 -0.71 -0.10 B2Ve -0.010+0.003 +021 284 3.8 19.6ABxC 3* -2922 CD-28 4566 60863174058 6205 073122.0-280854073522.8-282210242.96-03.87 4.64 -0.11 -0.40 -0.11 B8V -0.074-0.019 +003V? 222 4.5 38.4AB 3* -2923 BD-21 2030 60951174092 073149.8-215617073607.8-220938237.61-00.70 6.34 +0.99 +0.76 G5 +0.044-0.018 +028SB2 -2924 70 GemBD+35 1662 60986 60243 6229 073159.1+351621073832.8+350255184.45 24.24 5.56 +0.93 K0III +0.037+0.030 -036V 4.6 159.9AC 5 -2925 CD-51 2571 61031235310 073205.8-511515073439.5-512829263.71-14.64 6.28 +0.08 A1III-IV -0.006-0.001 +028 -2926 BD+24 1727 61035 79562 073211.3+243505073814.5+242137195.34 20.64 6.27R F0 +0.025+0.013 +007 112 -2927 25 MonBD-03 1979 61064134899 289 W 3665 073218.3-035316073716.7-040640221.89 8.26 5.13 +0.44 +0.12 F6III -0.068+0.017 +.028+046 20 5.3 121.7AC 3* -2928 BD-19 1967 610681531491197 PT Pup 073217.3-192846073641.0-194208235.53 0.61 5.74 -0.19 -0.89 B2III -0.007+0.005 +022V? 38 * -2929 23 LynBD+57 1093 61106 264592593 073233.2+571840074049.5+570458160.34 29.09 6.06 +1.46 +1.65 K5III -0.018-0.005 -013V -2930 71Omi GemBD+34 1649 61110 602472592 073238.3+344850073909.9+343503184.97 24.23 4.90 +0.40 +0.11 +0.22 F3III -0.037-0.117 +.021+007V 89 -2931 BD+24 1730 61219 79580 073309.5+242658073911.9+241321195.56 20.79 6.17 +0.01 +0.04 A2V -0.012+0.002 -011V 110 -2932 BD-14 2053 61224153172 W 073302.7-141257073738.9-142628231.05 3.38 6.53 -0.01 -0.30 B9IIIe +0.014-0.004 +016 275 2.8 65.0 * -2933 CD-23 5791 61227174141 073303.2-233303073716.8-234630239.15-01.26 6.37 +0.54 +0.44 F0II -0.015+0.022 +018V -2934 CP-52 1231 612482353361198 3661 073311.3-521838073539.7-523202264.77-14.96 4.94 +1.40 +1.63 +0.73 K3III +0.024-0.016 +.012+062SB * -2935 BD+38 1803 61294 60257 I 073330.9+383424074014.6+382040181.06 25.49 5.73 +1.63 +1.95 M0III -0.050-0.009 +046V? -2936 BD+32 1599 61295 60254 073330.3+321420073954.1+320035187.71 23.58 6.17 +0.35 +0.13 F6II -0.019-0.045 +025SB =< 23 -2937 CD-34 3755 61330198195 290 W 073340.0-344437073722.1-345807248.98-06.67 4.53 -0.09 -0.31 -0.07 B8IV -0.022+0.014 +024 80 0.5 0.1AB 3* -2938 74 GemBD+18 1701 61338 97120 I D 3671 073342.1+175408073928.6+174029202.01 18.35 5.05 +1.56 +1.92 K5IIIFe-0.5 +0.005+0.004 +.009+028V? 0.0 0.0 * -2939 BD+48 1561 61363 419342594 073349.2+482154074112.4+480754170.43 27.88 5.56 +1.01 +0.52: K0III -0.054-0.128 +.009+040 -2940 CD-48 3069 613912188412591 073355.8-483619073643.9-484949261.40-13.19 5.72 -0.06 B9.5V -0.001-0.003 -001 -2941 CP-55 1282 61394235343 073354.2-553949073601.7-555315267.95-16.32 6.39 +1.18 K1-2IIICNII -0.002+0.010 +022 -2942 CD-34 3760 61409198205 073403.7-350305073744.8-351638249.29-06.75 6.60 +1.14 K1III -0.027+0.012 +031 -2943 10Alp CMiBD+05 1739 61421115756 291I 6251 3672 073404.0+052853073918.1+051330213.69 13.03 0.38 +0.42 +0.02 +0.23 F5IV-V -0.710-1.023 +.288-003SBO 6 10.4 4.6AC 5* -2944 CD-25 4828 61429174175 6246 PU Pup 073408.2-250816073818.0-252153240.65-01.84 4.70 -0.11 -0.35 -0.09 B8IV -0.007-0.007 +041V 293: 0.4 0.2 * -2945 CD-37 3736 61453198210 073412.8-374708073745.2-380038251.71-08.05 6.38 +1.48 K4III +0.007+0.058 +052 * -2946 24 LynBD+59 1103 61497 26474 292 6285 073432.8+585640074300.4+584237158.51 29.53 4.99 +0.08 +0.08 +0.04 A3IVn -0.037-0.051 +.018+009V 183 5.8 54.7 -2947 BD-18 1946 61554153195 073440.8-182700073907.1-184045234.92 1.61 6.72 -0.10 -0.50 B6Vn -0.021-0.026 +036 -2948 CD-26 4707 61555174198 6255A 3673 073443.4-263427073849.3-264806241.96-02.44 4.50H -0.17 -0.57 -0.16 B6V -0.017+0.019D+.010+024 65 0.2 9.9AB 3* -2949 CD-26 4707 61556174199 6255B 3673 073443.9-263434073849.8-264813241.97-02.44 4.62H B5IVn -0.029+0.028D+.010+033 193 0.2 9.9AB 3* -2950 BD+05 1742 61563115773 6263 073448.3+052741074007.0+051351213.79 13.20 6.02 -0.04 -0.18 A0III -0.008-0.023 +.014+017SB 100 0.3 1.1AB 3* -2951 BD+23 1780 61603 796072595I 073459.2+231459074058.5+230107196.92 20.73 5.89 +1.58 +1.86 +0.62E K5 -0.010-0.011 +039 * -2952 CD-39 3463 61623198226 073458.6-394550073824.2-395929253.54-08.88 6.59 -0.05 -0.17 A0 +0.013+0.018 +015V -2953 BD+14 1721 61630 97136 073509.7+140008074047.3+134615205.89 17.05 6.24 K0 +0.010-0.016 +005 -2954 CD-36 3773 61641198237 073506.4-361606073843.9-362949250.46-07.16 5.80 -0.16 -0.70 B2IV-V -0.007+0.001 +019V? * -2955 CD-38 3521 61642198229 073502.5-383308073832.6-384652252.47-08.28 6.19 +1.02 +0.77 G8III +0.030-0.028 +026 * -2956 CD-26 4722 61672174219 073521.0-263800073926.9-265147242.09-02.35 6.50 -0.10 -0.48 B7V -0.013+0.001 +033 -2957 CD-48 3091 61715218852 MY Pup 073528.5-482223073818.2-483604261.31-12.86 5.68 +0.65 +0.45 F4Iab +0.002+0.008 +011 19 * -2958 BD-07 2118 61749134969 073545.3-075713074035.5-081109225.90 7.04 6.01 +0.15 +0.11 A3IV +0.016-0.037 -007V -2959 BD-14 2082 61772153227 I 073548.8-150155074023.2-151549232.09 3.55 4.94 +1.56 +1.80 K3II -0.010-0.022 +.005+000V -2960 BD-19 2003 61774153225 6273 073549.4-192549074013.6-193939235.90 1.36 5.93 +1.16 +1.07 K0 +0.007+0.011 -003 5.2 8.3 * -2961 CD-38 3531 61831198253 073555.9-380441073927.4-381830252.14-07.90 4.84 -0.19 -0.66 -0.16 B2.5V -0.014+0.004 +026 138 * -2962 BD+34 1657 61859 60291 073614.7+341404074243.5+340001185.83 24.76 6.02R F7V -0.080-0.003 -011SB2O * -2963 CD-37 3767 61878198265 W 073611.7-375432073943.8-380822252.01-07.77 5.73 -0.12 -0.49 B5Vn -0.019+0.011D+.006+030 2.7 1.1 * -2964 CD-37 3768 61899198268 073616.1-380148073947.8-381539252.13-07.82 5.76 -0.07 -0.54 B2.5V -0.011+0.004 +023 * -2965 BD+13 1737 61885 97154 I 073615.4+134252074151.8+132850206.28 17.17 5.77 +1.67 +1.99 M2IIIab -0.039-0.020 +007 -2966 BD+03 1758 61887115813 3689 073619.8+035130074135.2+033729215.43 12.81 5.94 -0.04 -0.08 A0V +0.015-0.025 -024V 165 -2967 BD+14 1729 61913 971572597I NZ Gem 073624.9+142633074203.2+141230205.61 17.51 5.56 +1.64 +1.91 +1.42 M3II-III -0.004-0.012 +.006-016V? * -2968 CD-37 3770 61925198273 073623.8-372053073958.0-373446251.54-07.46 6.00 -0.04 -0.46 +0.01 B6IVe +0.001-0.010 +007SB * -2969 BD+50 1460 61931 264882599 073629.8+504014074404.2+502602167.94 28.72 5.27 0.00 0.00 A0IIIn -0.005-0.026 +.015+000SB 183 -2970 26Alp MonBD-09 2172 61935134986 293I 073628.1-091904074114.8-093304227.19 6.52 3.93 +1.02 +0.88 +0.52 K0III -0.073-0.019 +.024+011 < 17 * -2971 CP-52 1242 61966235391 W V390 Car 073635.5-530235073900.4-531624265.68-14.82 6.06 -0.11 -0.41 B9IV-Vp:Si: -0.009+0.008 +012 7.8 15. * -2972 CD-27 4393 61987174273 073640.1-274246074043.4-275645243.17-02.63 6.76 -0.16 -0.64 B3-5IV-V: +0.007-0.017 +036 -2973 75Sig GemBD+29 1590 62044 79638 I W Sig Gem 073703.7+290732074318.7+285301191.19 23.27 4.28 +1.12 +0.97 +0.58 K1III e+0.065-0.232 +.018+046SB1O 22 6.5 182.2 * -2974 CD-31 4910 62058198286 R Pup 073659.8-312541074052.7-313939246.43-04.43 6.56 +1.18 +0.85 +0.67 G20-Ia +0.014+0.012 +068 * -2975 51 CamBD+65 593 62066 143212602 073706.6+654141074640.1+652721150.76 30.20 5.92 +1.18 gK2 +0.027+0.018 -029 -2976 BD-21 2077 62082174298 I 073705.7-220612074123.6-222014238.36 0.27 6.18 +1.62 +1.95 +0.94E M1III +0.022-0.004 +032V -2977 49 CamBD+63 733 62140 14322 BC Cam 073724.3+630418074627.4+624950153.79 30.15 6.49 +0.26 +0.13 F0pSrEu -0.036-0.057 +002 * -2978 BD+22 1756 62141 79641 W A 073724.8+223807074322.2+222358197.75 21.02 6.21 +0.93 K0III -0.026+0.013 -003 -2979 CP-73 457 62153256428 W A 073724.6-740254073521.7-741632286.11-23.14 7.16H -0.02 -0.24 B9IV -0.007+0.009D+.010+013SB2 0.1 1.8 * -2980 CP-73 457 62154 W B 073724.6-740254073521.8-741632286.11-23.14 7.26H B9IV -0.007+0.009D+.010+010 0.1 1.8 * -2981 CD-38 3556 62226198298 073744.7-381759074115.8-383201252.51-07.69 5.42 -0.15 -0.56 B5V -0.017+0.013 +040SB2 100 * -2982 BD+00 2054 62264115839 6313 073757.4+002534074305.4+001122218.73 11.56 6.19 +1.02 +0.74 K0III +0.008-0.012 +008 0.2 0.1AB 3 -2983 76 GemBD+26 1633 62285 79650 I 3703 073800.9+260121074406.9+254703194.42 22.39 5.31 +1.54 +1.89 K4-5III -0.020-0.016 +.007+003V < 19: -2984 CD-44 3655 62318218905 073813.5-442350074121.8-443756257.96-10.57 6.41 0.00 -0.18 B7IV-V +0.010 0.000 +027V? -2985 77Kap GemBD+24 1759 62345 79653 294I 6321 073824.6+243816074426.8+242353195.85 21.97 3.57 +0.93 +0.69 +0.45 G8IIIa -0.033-0.052 +.026+021 8 5.8 7.1 * -2986 CD-38 3564 62376198315 073826.8-381735074158.0-383144252.57-07.57 6.54 -0.09 -0.40? B7V -0.017+0.002 +008 -2987 BD+13 1750 62407 97199 073838.9+130557074414.0+125134207.12 17.43 6.43 K0 -0.024-0.042 +027 -2988 CD-26 4824 62412174356 073840.4-260649074248.1-262104242.01-01.44 5.64 +0.99 +0.80 K1III -0.005-0.027 -018 -2989 BD+02 1761 62437115864 AZ CMi 073855.0+023839074407.4+022418216.84 12.81 6.47 +0.20 +0.14 F0III: -0.048-0.022 +015 * -2990 78Bet GemBD+28 1463 62509 79666 295I 6335 3712 073911.8+281604074518.9+280134192.23 23.41 1.14 +1.00 +0.85 +0.50 K0IIIb e-0.628-0.046 +.094+003V < 17 10.2 201.1AC 7* -2991 79 GemBD+20 1893 62510 79665 073917.1+203322074509.3+201859199.99 20.62 6.33R 0.00 0.00 A1V -0.014+0.008 -011 79 -2992 CD-25 4966 62555174395 W 073929.0-251554074339.1-253014241.37-00.85 6.55 +0.06 A3 +0.001-0.005 +023V? 7.5 5.3 -2993 1 PupCD-28 4767 62576174391 I 6324 3708 073930.1-281023074332.4-282440243.88-02.32 4.59 +1.63 +1.96 +0.97 K3Ib -0.014+0.025 +.018+033 8.9 26.2 -2994 CD-35 3809 62578198343 073932.3-354844074312.0-360301250.51-06.15 5.60 -0.13 -0.54 B5V -0.019+0.008 -001 -2995 CD-38 3583 62595198342 073936.4-383731074307.0-385151252.98-07.54 6.89 +1.02 +0.77 G6/8III +0.009-0.018 +000 -2996 3 PupCD-28 4774 626231744002601I 073947.6-284256074348.5-285717244.38-02.54 3.96 +0.18 -0.09 +0.22 A2Iabe +0.002+0.005 +025SBO 73 * -2997 BD+80 238 62613 1254 073945.7+803059075617.3+801556133.68 29.44 6.56 +0.73 +0.28 G8V -0.476+0.090 -008V -2998 CD-44 3675 62644218923 073951.4-445509074257.2-451024258.57-10.57 5.06 +0.78 +0.32 G6IV -0.066-0.558 +028SB -2999 BD+37 1769 62647 603281199I 3721 073958.9+374535074639.3+373103182.32 26.50 5.18 +1.58 +1.94 +0.90E M2IIIb +0.027+0.014 -035V -3000 CP-77 321 626892564312596 074006.1-772412073604.2-773803289.62-24.11 6.18 +1.73 +2.03 M0III +0.006+0.009 +007V? -3001 CD-37 3820 62712198352 074010.2-375745074342.9-381207252.45-07.11 6.40 -0.16 -0.48 B9VpSi -0.025+0.006 -006 * -3002 CD-40 3377 627132189322603 074017.6-404121074341.9-405602254.86-08.44 5.17 +1.10 +1.06 K1III +0.133-0.175 +.026+053 * -3003 81 GemBD+18 1733 62721 972211200I D 074020.0+184515074607.4+183036201.86 20.14 4.88 +1.45 +1.75 +0.83 K4III-IIIb -0.076-0.058 +.014+081SB < 17 0.0 0.1 * -3004 CD-24 5885 62747174433 Var? 074021.9-242601074434.0-244026240.75-00.26 5.62 -0.19 B1.5III -0.030+0.016 +015 * -3005 CD-49 3014 62756218928 074022.8-494512074306.9-495934262.95-12.79 6.57 +0.07 A2V -0.005-0.006 +003 -3006 CP-58 967 627582354302600 074020.2-582335074210.2-583751270.91-16.72 6.43 -0.10 B2.5V -0.001+0.003 +011SB -3007 CD-35 3825 62781198366 074030.3-354927074409.6-360346250.62-05.99 5.80 +0.31 +0.01 F2V -0.083+0.076 +029 -3008 11 CMiBD+11 1670 62832 972241201 3724 074045.9+110043074616.2+104606209.33 17.00 5.30 +0.01 -0.02 A1Vnn -0.029-0.024 +.022+028SB 249 -3009 2 PupBD-14 2193 62863153362 6348B PV Pup 074052.7-142636074528.7-144110232.19 4.91 6.89 A8V -0.016-0.018 +030SB2 0.8 16.8AB 3* -3010 2 PupBD-14 2194 62864153363 6348A 074053.1-142651074529.1-144127232.20 4.91 6.07 +0.11 A2V -0.014-0.026 +024 0.8 16.8AB 3* -3011 CD-37 3841 62893198379 074100.5-374207074434.2-375635252.31-06.84 5.88 -0.11 -0.36 B7V -0.018+0.004 +037 * -3012 CP-57 1305 62897235440 074100.2-575929074253.3-581348270.57-16.46 6.21 +1.05 +0.84 K0III -0.030+0.033 -022V -3013 80Pi GemBD+33 1585 62898 60340 296I 6364 3729 074103.5+333940074730.3+332456186.76 25.53 5.14 +1.60 +1.95 M1IIIa -0.018-0.029 +.012-012V? 5.2 21.0AB 3* -3014 BD-06 2281 62902135079 I 074108.5-063136074602.2-064621225.31 8.90 5.49 +1.38 +1.68 K5III +0.056-0.094 -033V -3015 4 PupBD-14 2199 629521533721202 074120.5-141914074556.9-143350232.14 5.07 5.04 +0.33 +0.09 F0V -0.012+0.006 +.031-002V 101 -3016 CD-37 3861 62991198390 074130.7-373843074504.6-375316252.31-06.73 6.54 -0.10 -0.63 B3IV -0.023+0.007 +024 * -3017 CD-37 3863 630321983982605 3723 074141.4-374333074515.3-375807252.39-06.74 3.61 +1.73 +1.72 +1.00 K2.5Ib-II -0.010+0.002 +.006+017 * -3018 CD-33 4113 63077198404 074151.1-335832074535.0-341023249.13-04.81 5.37 +0.60 -0.06 +0.23E G0V -0.279+1.665 +.064+103V * -3019 BD-12 2135 63112153389 074204.2-122549074644.9-124031230.59 6.17 6.39 -0.02 -0.08 A0V +0.018 0.000 +008V? =< 41 -3020 CD-43 3534 63118218955 074205.3-433032074518.1-434508257.51-09.53 6.03 -0.07 -0.41 B6IV -0.004+0.002 +035 118 -3021 82 GemBD+23 1812 63208 79704 6378 074234.9+232319074833.6+230828197.48 22.40 6.18R G2III+A4V -0.011+0.008 -005V? 0.1 0.3AB 4 -3022 CD-37 3886 63215198416 074236.4-374121074610.4-375602252.45-06.56 5.88 -0.11 -0.47 B7V t-0.035+0.004 +028 * -3023 BD-22 2027 63271174533 Var? 074254.6-221624074712.5-223111239.19 1.34 5.90 -0.19 -0.81 B2IV-V -0.013+0.007 +007 73 * -3024 Zet VolCP-72 627 63295256438 297 W 074303.1-722157074149.2-723622284.57-22.16 3.95 +1.04 +0.83 +0.53 K0III +0.030+0.018 +.017+048 5.8 16.7 -3025 CD-39 3587 63308198424 074306.5-394850074633.4-400335254.36-07.54 6.57 -0.13 -0.67 B2V -0.006-0.001 +034 * -3026 BD-15 2049 63302153404 QY Pup 074305.2-154437074738.5-155927233.59 4.71 6.34 +1.78 +1.92 K1Ia-Iab -0.004+0.001 +031V? * -3027 BD-15 2052 63323153409 I W 3741 074312.0-154602074745.2-160052233.62 4.72 6.43 +1.70 +1.97 M2II-III 0.000-0.001 +014V? 0.1 130.5AB 3* -3028 BD+54 1177 63332 26535 074313.1+542243075105.7+540745163.89 30.25 6.02 +0.46 +0.02 F6V -0.041+0.051 -002V =< 6 -3029 5 PupBD-11 2106 63336153414 6381 074315.7-115650074756.7-121135230.32 6.66 5.48 +0.48 -0.02 dF5 -0.111+0.059D+.013+027V 55 1.8 2.0 * -3030 BD+13 1772 63352 97273 I 074325.5+133715074902.0+132215207.14 18.71 6.04 +1.38 K0 +0.051-0.043 -057 * -3031 CP-56 1420 63382235490 W 074330.1-562839074535.6-564321269.32-15.48 6.12 +0.39 F0II +0.005+0.016 +019V? 5.0 36.2 -3032 CD-39 3595 63401198435 OX Pup 074336.3-390503074705.8-391953253.77-07.09 6.31 -0.17 -0.55 B8III -0.010-0.005 +022 * -3033 BD+04 1826 63435115966 074342.4+043459074858.9+041958215.64 14.77 6.53 +0.78 +0.38 G2III -0.036-0.031 -006 -3034 Omi PupCD-25 5081 63462174558 6384 3745 074355.7-254120074805.2-255614242.25-00.21 4.50 -0.05 -1.02 -0.01 B0V:pe: v-0.009+0.006 +015V 368 8.0 27.0 * -3035 CD-38 3650 63465198442 W 074352.5-381549074725.0-383040253.08-06.63 5.08 -0.10 -0.65 B2.5III -0.006 0.000 -.004+012 53 5.8 10.9 * -3036 CP-65 806 63513249944 074405.7-654941074443.9-660419278.18-19.49 6.38 +0.95 +0.66 G6-8III -0.015+0.043 +002 -3037 CD-46 3435 635782190001203 074430.1-462137074731.5-463631260.25-10.56 5.23 -0.14 -0.85 B1.5IV -0.002+0.004 +034SB 154 -3038 CP-69 770 63584249943 074431.1-693437074413.0-694917281.85-20.97 6.18 -0.06 -0.09 A0IV-V -0.050+0.011 +010 -3039 BD+55 1228 63586 26543 074437.3+552753075236.6+551234162.66 30.56 6.38 A0Vn -0.004-0.039 +008V 325 -3040 BD+33 1601 63589 60379 W 3758 074436.7+332909075102.3+331401187.19 26.19 6.03 +0.15 +0.15 +0.02 A2Vm -0.017+0.001 -010V 40 4.2 77.8 -3041 CD-40 3490 63640219006 T Pup 074443.4-402408074808.5-403908255.03-07.57 6.14 +1.58 +1.90 +1.01E M2III -0.003-0.029 +023 * -3042 BD-12 2164 63655153449 074449.5-130606074928.6-132112231.52 6.41 6.23 -0.09 -0.47 B8III -0.035-0.018 -007V -3043 CD-24 6022 63660174592 074449.6-243944074901.7-245444241.47 0.49 5.33 +0.76 G0III -0.030+0.019 +.036+002SB -3044 6 PupBD-16 2146 636971534542607I 074510.1-165825074941.2-171342234.91 4.51 5.18 +1.28 +1.49 K3III +0.052-0.117 +044V -3045 7Xi PupCD-24 6030 637001746011204I 6393 074505.3-243631074917.7-245135241.46 0.57 3.34 +1.24 +1.16 +0.55 G6Iab-Ib -0.003-0.002 +.003+003SB 9.5 5.1 * -3046 CD-46 3451 63744219018 074521.6-464931074820.3-470440260.73-10.66 4.71 +1.06 +0.92 +0.57 K0III -0.088-0.078 +.006-001SB -3047 BD-08 2096 63752135158 I 074522.2-085552075010.6-091100227.95 8.62 5.61 +1.44 +1.56 K3III -0.001+0.004 -007V -3048 BD-19 2085 63754174617 6398 074521.7-195708074945.2-201225237.49 3.02 6.56 +0.58 +0.12 G3V -0.053-0.106 +045V 7.0 6.0 -3049 CD-34 3970 63786198480 3756 074531.1-345931074914.7-351436250.42-04.69 5.93 -0.05 -0.19 B9V +0.001+0.009 +034SB2 * -3050 BD+03 1818 63799116014 6405 074532.5+033153075047.4+031638216.83 14.69 6.18 +1.12 +1.01 K1III +0.054-0.031D+.003-048 0.2 0.2 * -3051 BD-19 2089 63822153468 074540.3-191616075005.7-193125236.95 3.44 6.12 +1.26 K0 -0.007-0.002 +032V -3052 CD-32 4451 638521984872608 074546.2-330213074935.4-331720248.76-03.64 5.60 +1.61 +1.95 K5III -0.034 0.000 +033 -3053 BD+19 1854 63889 97318 074607.8+193452075156.7+191931201.62 21.72 5.99 +1.13 gK1 -0.055-0.032 +039 -3054 BD-10 2253 638941534792609 074611.0-105225075055.2-110743229.75 7.82 6.16 +1.13 K0 -0.001-0.031 +044V -3055 CD-46 3458 63922219035 W 074611.4-460716074914.3-462224260.18-10.19 4.11 -0.18 -1.01 -0.17 B0III 0.000+0.006 +024 49 4.9 59.2 * -3056 CP-56 1437 63926235532 W 074611.3-561312074819.2-562816269.26-15.03 6.33 +1.01 +0.38 K0III+A1V -0.026+0.003 +009 2.2 1.1 -3057 CD-44 3762 63948219040 074618.9-442958074928.2-444507258.76-09.36 6.32 +0.96 +0.72 K0III -0.048+0.003 +032 -3058 CD-46 3460 63949219034 QS Pup 074612.1-463621074912.9-465128260.61-10.42 5.84 -0.14 -0.85 B1.5IV 0.000+0.011 +025 * -3059 13Zet CMiBD+02 1808 639751160431205 074630.8+020120075142.0+014601218.32 14.20 5.14 -0.12 -0.49 B8II -0.016-0.003 +.012+032V? 35 * -3060 CD-24 6060 64042174658 6414 074646.6-241623075100.0-243142241.37 1.08 6.45 -0.01 -0.06 A0 -0.012-0.023 -007 3.5 0.9 -3061 BD+03 1824 64052116054 I BC CMi 074652.4+033208075207.2+031638216.98 14.99 6.31 +1.59 +1.62 +1.26E M4III +0.047-0.084 -062 * -3062 CP-56 1442 64067235539 W 074657.8-560928074906.7-562438269.26-14.91 5.59 +1.13 +0.84 G5II -0.003+0.007 +022SB 8.0 6.9 -3063 8 PupBD-12 2179 64077153499 074700.2-123349075140.9-124910231.32 7.14 6.36 +0.39 F2 -0.001-0.011 +021V 101 -3064 9 PupBD-13 2267 64096153500 6420 074708.4-133757075146.3-135353232.27 6.62 5.17 +0.60 +0.06 +0.36 G0V: -0.062-0.340 +.062-018SBO < 17 0.7 0.4 * -3065 25 LynBD+47 1498 64106 42055 074712.9+473841075429.3+472310171.70 29.95 6.25 +1.15 +1.07 gK2 -0.017+0.006 -063V -3066 26 LynBD+47 1499 64144 42058 299I 074725.9+474926075442.7+473353171.50 30.02 5.45 +1.46 gK4 -0.047+0.002 +017 -3067 83Phi GemBD+27 1499 64145 797741207 074722.6+270129075329.8+264557194.19 24.70 4.97 +0.09 +0.10 +0.05 A3V -0.035-0.031 +008SB 152 -3068 BD-20 2235 64152174679 074721.7-205506075142.9-211026238.56 2.93 5.63 +0.96 +0.70 +0.33E G8III -0.062+0.025 +032V? * -3069 CD-44 3780 64181219059 074731.8-441930075042.4-443447258.72-09.09 6.45 +0.90 G6III -0.022+0.021 +033V -3070 CP-59 908 641852499751206 W 074733.7-600203074912.9-601701272.87-16.62 5.78 +0.42 -0.01 F1V -0.055+0.151 +020 6.9 23.3 * -3071 CD-50 3004 64225235552 074740.6-501512075023.9-503035263.97-12.00 5.91 +1.09 +1.02 K2III -0.060-0.049 -023 -3072 BD-05 2280 642351352052611 W 3777 074751.6-051011075247.9-052541224.94 11.03 5.76 +0.41 0.00 F5IV -0.017-0.023 -002 20: 0.3 0.2 * -3073 10 PupBD-14 2250 64238153520 074742.7-143521075218.9-145047233.16 6.26 5.69 +0.37 +0.21? F1Ia -0.011-0.002 +017V -3074 CD-42 3601 64287219069 074803.5-425020075120.5-430544257.47-08.26 6.32 -0.17 -0.76 B2IV-V +0.011-0.010 +014 -3075 BD+74 338 64307 6378 300I 074813.8+741106080011.7+735505140.86 30.73 5.41 +1.42 +1.64 K3III -0.009-0.037 +.022+035V? -3076 CP-59 910 64320235553 074812.6-594747074954.8-600304272.69-16.44 6.72 +1.24 K0II 0.000+0.020 +022 -3077 BD+56 1253 64347 26579 074820.4+564603075626.8+563016161.19 31.18 6.72 A2IV 0.000-0.024 +028SB -3078 CD-42 3610 64365219076 QU Pup 074822.7-423752075140.3-425318257.32-08.10 6.04 -0.18 -0.84 B2IV -0.016+0.004 +032V * -3079 CD-34 4036 64379198540 W 074831.5-342714075215.7-344219250.27-03.88 5.01 +0.44 -0.06 F5V -0.194+0.243 +.074+027V 0 3.6 3.0 * -3080 CD-40 3579 64440219082 301 074846.7-401904075213.0-403433255.35-06.86 3.73 +1.04 +0.78 +0.56 K1-2II+A0 -0.010+0.003 +.031+024SB1O * -3081 CP-65 827 644842499782610 074901.1-655625074941.0-661145278.52-19.08 5.79 -0.04 -0.16 B9V +0.003-0.001 +011 -3082 BD+79 265 64486 63922617 W 074904.4+794511080447.1+792847134.47 29.96 5.42 -0.06 -0.14 A0pSi -0.027-0.049 +.021+003 35 8.3 6.7 * -3083 BD+35 1705 64491 604532613 074909.7+354032075540.8+352446185.13 27.70 6.23 +0.28 -0.02 A3IVp: -0.062-0.023 +022V 70 -3084 CD-38 3769 64503198545 QZ Pup 074906.2-383614075238.7-385147253.90-05.93 4.49 -0.19 -0.69 -0.16 B2.5V -0.002-0.006 +.012-031SB 187 * -3085 CD-36 3989 64572198553 074922.8-360614075303.5-362150251.78-04.59 5.43 +1.16 K0III -0.005-0.005 +.035+012 -3086 85 GemBD+20 1946 64648 797992614 074949.7+200853075539.9+195302201.42 22.74 5.35 -0.04 -0.06 A0V s -0.018-0.043 +.009+011SB 65 -3087 BD+09 1815 64685116120 075005.5+090743075531.4+085146212.16 18.24 5.86 +0.35 +0.02 F2IV -0.013-0.087 +022 -3088 CP-54 1420 64722235579 V372 Car 075006.5-540627075229.7-542202267.62-13.54 5.70 -0.15 -0.89 B1.5IV -0.003+0.004 +018V 147 * -3089 CD-49 3137 64740219106 075014.5-492110075303.7-493647263.38-11.19 4.63 -0.23 -0.93 -0.21 B1.5Vp v+0.002+0.016 +008 160 * -3090 CD-47 3396 64760219111 075021.8-475031075318.2-480611262.06-10.42 4.24 -0.14 -1.00 -0.12 B0.5Ib +0.004+0.001 +041 238 * -3091 CD-35 4002 64802198575 075028.5-353655075411.0-355239251.48-04.14 5.49 -0.19 -0.73 B2V -0.001-0.010 +028 81: * -3092 CD-34 4091 64876198579 I: 075054.2-343500075439.9-345049250.64-03.53 6.15 +1.53 +1.86 K4III -0.012-0.020 +047 -3093 BD+04 1860 64938116145 075107.1+044503075623.9+042909216.37 16.49 6.17 +0.98 +0.74 G8III -0.005 0.000 +017V? -3094 BD+44 1693 64958 420971209 075115.2+441440075816.6+435839175.71 30.05 6.34 1.06 +0.91 K0 +0.038+0.006 -049 * -3095 1 CncBD+16 1590 64960 973991208I 075118.8+160327075659.4+154725205.62 21.45 5.78 +1.28 K3+III -0.028-0.042 +010V? -3096 CD-30 5275 64974198591 075116.8-303916075513.7-305503247.33-01.40 6.44 K4III -0.047+0.043 +054V -3097 BD+09 1824 65066116162 075150.4+085431075715.9+083829212.57 18.53 6.05 +1.00 +0.86 K0III +0.006-0.017 -036V? -3098 BD+01 1959 65123116165 6483 075207.4+012339075716.2+010737219.58 15.14 6.35 +0.50 0.00 F7V -0.172-0.002 +.005-000 0.2 0.3 * -3099 CD-29 5189 65183198609 I PX Pup 075223.5-300104075622.8-301707246.92-00.86 6.33 +1.66 +1.50 M6III +0.004-0.032 +021V * -3100 CP-52 1333 65189235612 075226.1-521906075500.5-523459266.19-12.36 6.38 -0.01 -0.20 B8III -0.008+0.017 +007V -3101 CD-43 3737 65211219157 W 075231.5-433445075546.5-435042258.53-07.93 6.02 -0.11 -0.49 B6V -0.012+0.002 +014 0.2 0.7 -3102 11 PupBD-22 2087 652281748522615I: 075233.5-223647075651.5-225248240.64 3.07 4.20 +0.72 +0.42 +0.37 F7II -0.026+0.009 +.023+014 21 * -3103 BD+07 1879 65241116179 3829 075243.5+072857075805.8+071249214.02 18.09 6.41 -0.04 -0.07 A0V -0.020-0.007 +035SB2 59 * -3104 BD+16 1598 65257 97429 I D 075249.2+164717075831.5+163107205.06 22.08 5.99 +1.47 K0 -0.006-0.001 -001 0.0 0.2 * -3105 CP-56 1468 65273235615 075248.9-570218075453.2-571811270.45-14.61 5.63 +1.30 +1.44 +0.48E K3-4III -0.077+0.023 +.009+026 * -3106 BD+59 1130 65301 26618 075257.8+591908080120.7+590251158.24 31.91 5.77 +0.39 -0.04 d:F2 +0.017+0.032 -040V? -3107 CD-40 3655 65315219169 075257.3-402809075624.3-404411255.89-06.26 6.78 -0.18 -0.74 B2V +0.020-0.002 +014 -3108 BD+84 169 65299 13001639 075301.7+842050081653.8+840328129.27 29.15 6.49 +0.03 +0.03 A3IV -0.013-0.018 -003SB -3109 53 CamBD+60 1105 65339 14402 302 S AX Cam 075310.0+603552080142.4+601928156.73 31.95 6.01 +0.14 +0.06 A2pSrCrEu v-0.037-0.020 -005SBO 14: * -3110 14 CMiBD+02 1833 65345116182 W 075309.5+022929075820.6+021329218.70 15.88 5.29 +0.92 +0.71 K0III -0.158+0.099 +.027+046 < 19: 3.0 88.6AB 4 -3111 CD-42 3717 65442219186 075336.7-420818075657.9-422422257.39-07.02 6.09 +1.36 +1.61 K3III +0.029+0.023 +058 -3112 BD+63 749 65448 144072619 W 075333.1+632154080230.8+630525153.47 31.97 6.40 +0.59 +0.35 G1III -0.012-0.017 +020V 2.4 48.6 -3113 CD-29 5236 654561986361210 3830 075340.9-300356075740.1-302005247.10-00.65 4.79 +0.15 +0.18 +0.15 A2V v-0.006+0.007 +.025+028 0 * -3114 CD-43 3758 65460219189 075341.1-431356075657.9-433001258.34-07.57 5.35 -0.18 -0.74 B2.5V +0.001+0.013 +020SB 146: -3115 BD+13 1811 65522 97445 I 075400.1+133051075935.1+131432208.40 20.99 6.02 +1.32 K2 -0.019-0.011 +027 -3116 CD-43 3766 655512191972616 W Var 075404.0-435027075718.4-440635258.90-07.83 5.09 -0.17 B2.5IV -0.008+0.009 +016 0 8.9 10.0AB 3* -3117 Chi CarCP-52 1343 65575235635 303 Chi Car 075414.1-524250075646.7-525856266.68-12.32 3.47 -0.18 -0.67 -0.18 B3IVp -0.029+0.021 +.004+019V 95 * -3118 CD-47 3457 65598219200 W 075421.6-473716075720.0-475325262.21-09.73 6.22 -0.10 -0.50 B5V -0.020+0.014D+.007+012 0.6 0.5 -3119 BD+57 1118 65626 26634 AE Lyn 075427.1+573302080235.8+571625160.33 32.05 6.49 +0.62 +0.16 F8V -0.027-0.063 +.038+026SB2O 12 * -3120 CP-60 935 65662250019 075437.3-601528075618.6-603135273.50-15.94 5.74 +1.55 +1.80 +0.82 K3III -0.011+0.014 +023 * -3121 CD-45 3611 65685219218 075443.1-451828075751.8-453440260.23-08.49 5.17 +1.27 +1.36 K2III -0.006+0.020 +.009+051SB -3122 27 MonBD-03 2157 65695135345 304I 075444.4-032425075944.1-034047224.24 13.39 4.93 +1.21 +1.21 +0.46E K2III -0.054-0.003 +.008-029 < 19: -3123 12 PupBD-22 2104 65699174932 I 075448.3-230219075905.7-231838241.28 3.29 5.11 +1.12 +0.92 cK2 -0.012+0.001 -.003+011 * -3124 2Ome1CncBD+25 1812 65714 798611211 075452.8+254000080055.9+252334196.23 25.82 5.83 +1.02 +0.88 gG8 +0.014+0.006 +002V -3125 BD+20 1976 65735 97471 075458.4+200525080048.0+194858201.98 23.84 6.25 +1.11 K1III -0.001-0.013 +028 -3126 CP-58 1028 65750235638 V341 Car 075458.2-585122075650.7-590735272.25-15.24 6.25 +2.08 +2.29 +1.04E M0III e-0.024-0.019 +024 * -3127 BD+23 1866 65757 79864 6513 075502.4+235129080100.7+233459198.13 25.23 6.34R K1III-IV -0.026-0.024D+.010+025 4.5 2.3 -3128 3 CncBD+17 1731 65759 974722618I 075503.4+173458080047.3+171831204.50 22.88 5.55 +1.32 gK3 -0.012-0.002 +041 * -3129 CD-48 3349 65818219226 W V Pup 075521.9-485825075814.4-491442263.48-10.28 4.41 -0.17 -0.96 B1Vp+B3IV: -0.011+0.008 +019SB2O 5.9 39.2AD 5* -3130 BD+35 1731 65801 60523 I 075525.1+354120080155.1+352447185.50 28.93 6.34 +1.56 K0 -0.043-0.007 -016 -3131 BD-18 2118 658101536871212 075523.1-180729075952.0-182357237.16 6.00 4.61 +0.08 +0.08 +0.06 A2Vn -0.002-0.039 +.021-012 198 * -3132 4Ome2CncBD+25 1816 65856 79869 W 075541.9+252153080143.8+250523196.62 25.89 6.31 +0.01 +0.03 A1V -0.021+0.020 -009V 115 3.8 109.3AC 3 -3133 CD-51 2784 65867235646 3841 075540.1-511039075821.4-512655265.43-11.36 6.44 +0.25 A8-9IV -0.046+0.034 +010 * -3134 5 CncBD+16 1612 65873 97485 075548.3+164352080130.3+162719205.43 22.71 5.99 -0.02 -0.02 B9.5Vn +0.004-0.005 -012SB 185 -3135 BD-02 2379 65875135368 3857 075542.4-023626080044.1-025254223.64 13.99 6.51 -0.07 -0.81 -0.05 B2.5Ve v-0.014+0.013 +046V 148 * -3136 BD+05 1857 65900116244 W 075556.5+050918080113.8+045247216.58 17.74 5.65 0.00 +0.01 A1V -0.038+0.009 +046 =< 41 6.7 30.1 -3137 CD-44 3920 65904219240 075551.3-445635075901.8-451258260.02-08.13 5.99 -0.14 B4V -0.011-0.004 -003 -3138 CP-59 944 65907250035 I'W 075556.0-600205075746.9-601812273.38-15.69 5.60 +0.57 0.00 G0V +0.517+0.114 +.062+014SB 4.3 60. AB 3* -3139 CP-62 925 65908250030 075556.1-630134075712.5-631749276.13-17.11 6.14 -0.10 B8V -0.018+0.015 +023 * -3140 CD-38 3908 65925198668 075556.5-390120075928.4-391750254.96-05.01 5.24 +0.39 +0.02 F5III -0.082-0.043 +.038-008 125 -3141 28 MonBD-00 1882 659531353802620I V645 Mon 075608.0-010654080113.3-012333222.35 14.81 4.68 +1.49 +1.78 +0.83 K4III +0.068-0.073 +.009+027 < 19: * -3142 CD-49 3243 66005219249 W A 075622.9-494212075912.3-495836264.20-10.51 6.32 B2IV-V 0.000+0.015 +013V? 0.0 16.4 * -3143 CD-49 3244 66006219250 W B 075624.0-494201075913.4-495825264.20-10.51 6.34 B2IV-V -0.008+0.013 +023V? 0.0 16.4 * -3144 BD+09 1843 660111162512621 Var 075624.9+091124080150.7+085450212.83 19.67 6.22 +0.57 +0.13 G0IV -0.002+0.022 +004 12 * -3145 BD+02 1854 661411162602623I W 075703.7+023634080215.9+022004219.07 16.80 4.39 +1.25 +1.28 +0.67 K2III -0.031+0.105 +.024+071V < 19: 4.7 241.4 -3146 CD-45 3662 66190219280 075709.6-451053080019.6-452725260.35-08.06 6.61 +1.27 K1Ib-II +0.008+0.001 +027 -3147 CP-60 1006 66194250055 V374 Car 075710.4-603302075850.5-604928273.93-15.80 5.81 -0.09 -0.80 -0.06 B2IVpne v-0.008+0.015 +011V 250 * -3148 CD-48 3384 66210219283 075720.5-484224080014.9-485853263.41-09.86 6.02 +0.04 +0.08 A2V -0.015+0.047 +012 -3149 Chi GemBD+28 1532 66216 79896 305I W 075722.6+280429080331.1+274739193.90 27.14 4.94 +1.12 +1.09 K1.5III -0.026-0.042 +.016-011SB < 19: 6.0 78.6AC 3* -3150 BD-05 2339 662421354061213 075731.1-060330080226.0-062014226.95 12.67 6.33 +0.62 +0.13 G0III +0.006-0.014 +.007-017V -3151 CD-48 3388 66255219292 PY Pup 075733.9-483544080028.9-485217263.34-09.77 6.12 -0.11 A0pSi -0.014+0.012 +028 * -3152 CP-59 954 66341250064 075754.4-595554075940.2-601227273.41-15.43 6.33 -0.06 -0.40 B5III +0.004+0.003 +023 * -3153 CP-60 1018 66342250063 075755.0-601841075937.6-603513273.76-15.61 5.17 +1.74 +1.91 +1.13 M1.5IIa +0.003+0.011 -.001+023 * -3154 CD-36 4116 66358198714 075757.9-370021080137.4-371701253.46-03.60 5.95 +0.14 +0.14 A3IV -0.017+0.008 -000 -3155 CD-36 4120 66435198725 3872 075825.6-364617080206.2-370302253.31-03.39 6.34 +1.62 +1.88 M1III +0.016-0.003 +059V? * -3156 CP-53 1505 664412356802622 075822.4-535226080049.9-540905268.02-12.37 5.87 -0.14 -0.52 B5Vn -0.023+0.008 +000V? -3157 CP-54 1470 66546235686 W 3871 075857.2-541412080122.9-543054268.39-12.48 6.10 -0.04 -0.65 B2IV-V -0.018+0.021 +034SB 164 2.0 40.2 * -3158 BD+19 1911 66552 97537 075858.5+190730080445.2+185032203.35 24.34 6.15R -0.05 -0.12 B9V -0.035-0.016 +028 70 -3159 CP-63 866 665912500692624 075904.2-631725080020.0-633403276.55-16.92 4.82 -0.17 -0.62 -0.20 B3V +0.001+0.017 +022 0 * -3160 CD-32 4766 66598198743 I W 075909.9-321059080304.1-322750249.52-00.79 5.82 +1.22 +1.28 K2-3III -0.017 0.000 +049 3.1 35.1 -3161 CP-55 1419 66607235690 075911.4-551032080131.5-552718269.24-12.92 6.28 -0.15 -0.62 B4V -0.017-0.008 +006 -3162 CD-40 3776 66624219339 W V336 Pup 075918.4-410147080244.8-411836257.01-05.53 5.52 -0.15 -0.47 B9pSi -0.002+0.010 +026V? 104 3.2 26.1 * -3163 8 CncBD+13 1831 66664 975422625 075930.2+132412080504.5+130705209.11 22.16 5.12 +0.01 -0.01 A1V -0.036-0.067 +.023+021SB 150 -3164 BD+27 1536 66684 79928 6569 3892 075929.3+274849080537.0+273147194.34 27.50 6.21 +0.01 -0.09 A0V 0.000-0.009D+.007-017V? 103 0.7 3.7 * -3165 Zet PupCD-39 3939 66811198752 306 080004.1-394317080335.1-400012255.98-04.71 2.25 -0.26 -1.11 -0.22 O5f e-0.027+0.012 -024V? 211 * -3166 CD-42 3832 66812219355 080009.1-423958080329.5-425655258.48-06.27 6.29 +1.01 +0.76 G8II -0.026-0.013 +014 * -3167 28 LynBD+43 1770 66824 421742627 080014.3+433251080709.9+431537176.84 31.52 6.26R -0.02 -0.13 A1V -0.010-0.034 +009SB2O 50 * -3168 14 PupBD-19 2228 66834153796 080015.0-192640080441.5-194341238.90 6.28 6.13 -0.16 -0.72 B3III +0.002+0.003 +014 -3169 9Mu 1CncBD+23 1887 66875 79940 I BL Cnc 080022.9+225516080618.4+223808199.58 26.05 5.99 +1.66 +1.91 +1.01E M3III -0.008-0.005 +026V * -3170 CD-32 4796 66888198764 I MZ Pup 080022.3-322330080416.2-324030249.83-00.69 5.31 +1.91 +1.95 M1Ib -0.003+0.004 +.024+036 * -3171 CP-72 654 66920256463 080029.9-725756075916.1-731441285.73-21.21 6.34 +0.14 +0.13 A3III +0.002-0.036 +024 -3172 BD-00 1903 66950135488 080043.2-001717080549.6-003425222.18 16.22 6.41 +1.05 +1.01 K0 -0.022-0.013 +034 -3173 27 LynBD+51 1391 67006 26687 307 6600 080056.2+514742080827.4+513024167.19 32.65 4.84 +0.05 0.00 0.00 A2V -0.059-0.004 -.009+011V 168 7.1 45.6AB 3 -3174 BD-08 2222 67159135505 6588 080138.4-085728080627.5-091442230.04 12.07 6.23 -0.07 -0.12 B9V +0.001-0.012 +028V? 1.7 30.8AB 4* -3175 BD+58 1102 67224 26701 I 080151.5+583228081003.8+581453159.17 33.04 5.93 +1.39 +1.50 gK4 -0.023-0.075 +034 -3176 10Mu 2CncBD+22 1862 67228 799592630I' 080152.8+215220080745.8+213454200.81 25.99 5.30 +0.63 +0.21 G1IVb +0.022-0.069 +.034-036 =< 10 -3177 CD-33 4525 67243198791 W 080153.2-331659080544.9-333409250.76-00.91 6.14 +1.11 +0.88 G1Ib -0.006+0.010 +033 2.4 22.1AB 3* -3178 CD-50 3138 672492357302626 080154.1-501818080442.4-503526265.19-10.06 5.95 +1.21 +1.03 G5II -0.001+0.001 +027 -3179 CD-46 3764 67341219400 080215.2-464132080520.4-465844262.12-08.10 6.19 -0.15 -0.67 B3Vnp +0.005-0.009 +024SB -3180 CP-52 1376 67364235735 080228.2-524917080504.0-530629267.42-11.30 5.53 +1.34 +1.60 K3-4III +0.034-0.006 +.020+018 -3181 BD+42 1819 67370 42199 080231.1+424325080923.1+422550177.88 31.79 6.27 +1.27 gK3 -0.008-0.072 +038V? -3182 BD+68 524 67447 144561215 080251.8+684607081248.8+682827147.01 32.53 5.32 +1.04 +0.81 +0.48 G7+II 0.000+0.008 +.021-009V < 19: * -3183 BD-20 2395 67456175206 W 080253.2-201555080718.0-203317239.93 6.36 5.38 +0.10 +0.16 +0.09 A5II -0.016-0.006 +.001+012 0 9.2 13.8 * -3184 12 CncBD+14 1831 67483 97594 080307.1+135555080842.4+133827208.98 23.18 6.27 +0.43 +0.01 F3V -0.001-0.017 -010V 40 -3185 15Rho PupCD-23 6828 67523175217 308I W Rho Pup 080317.1-240057080732.6-241815243.15 4.40 2.81 +0.43 +0.19 +0.21 F6IIpDel Del e-0.083+0.049 +.035+046SB 14 10.9 29.6 * -3186 CP-62 953 67536250101 W V375 Car 080317.5-623259080442.9-625010276.11-16.14 6.30 -0.10 B2.5Vn e-0.009+0.017 +000V? 292 1.3 87.1 * -3187 CD-44 4051 67582219422 3905 080327.7-445838080640.4-451559260.77-07.01 5.05 +1.50 +1.73 K3III 0.000 0.000 -.011+025 * -3188 29Zet MonBD-02 2450 67594135551 I 6617 080334.0-024133080835.6-025902224.72 15.66 4.34 +0.97 +0.69 +0.46 G2Ib -0.017-0.005 +.003+030 < 17: 4.9 66.0AC 4* -3189 BD-10 2400 67725153887 080412.1-110250080856.9-112023232.20 11.53 6.32 +0.01 -0.09 A0Vn -0.004-0.012 +020V? 160 -3190 BD-19 2262 67751175250 W 080418.2-200416080843.5-202147239.95 6.74 6.36 +0.16 A7IV -0.012 0.000 +028 6.6 20.2 -3191 14Psi CncBD+25 1865 67767 799952633 W 080425.8+254839081027.2+253026196.89 27.90 5.73 +0.81 +0.43 +0.28E G7V -0.075-0.348 +.029-043V 4.9 112.1AC 3* -3192 16 PupBD-18 2190 677971538902632 080433.7-185708080901.6-191442239.04 7.40 4.40 -0.15 -0.60 -0.14 B5IV -0.014-0.002 +019SB? 188 -3193 BD+39 2065 67827 606252635 080443.8+390143081121.6+384353182.23 31.50 6.58 +0.59 +0.09 G0 -0.111-0.075 +026 =< 10 -3194 BD-15 2280 67880153898 6632 080454.0-155719080928.5-161456236.53 9.08 5.68 -0.17 -0.74 B2.5V -0.017-0.007 +033V? 6.7 5.3 * -3195 CD-37 4288 678881988482631 PQ Pup 080457.7-372320080837.6-374053254.54-02.63 6.37 -0.04 -0.56 +0.01 B4V e-0.002+0.003 +030V? * -3196 CD-29 5620 67921198854 W 080505.2-300145080906.7-301921248.41 1.44 6.65 +1.40 +1.60 K5III +0.024-0.001 -025 4.2 1.1 -3197 BD+82 235 67934 13193952 080512.4+824427082432.9+822551130.95 29.89 6.32 +0.01 +0.01 A2Vn -0.022-0.025 -021V? 200 -3198 BD+15 1775 67959 97628 080521.8+145531081058.8+143746208.24 24.08 6.23 +0.02 +0.04 A1V -0.028-0.014 +024 =< 41 -3199 CD-35 4256 67977198859 080523.2-350942080910.2-352718252.72-01.34 6.20 +0.89 G8III +0.003+0.014 -014 -3200 BD+56 1278 68077 267322640 080552.0+564507081350.2+562708161.31 33.58 5.85 +1.01 +0.79 G9III -0.022-0.033 +007V? -3201 BD+10 1746 68099116444 080549.4+100704081116.6+094916213.03 22.16 6.07 -0.10 -0.42 B6III -0.009-0.021 +030V 70 * -3202 18 PupBD-13 2420 681461539242637 W 080601.7-133018081039.8-134757234.57 10.61 5.54 +0.49 0.00 F6V -0.251+0.061 +.047+038 6.7 93. * -3203 CD-48 3516 68161219493 080610.6-482324080909.6-484104263.92-08.45 5.70 -0.12 -0.42 B8Ib-II 0.000-0.004 +027V? -3204 CD-43 3998 682172195022634 Var? 080618.0-434940080935.9-440722260.07-05.96 5.21 -0.19 B2IV-V -0.007 0.000 +008 194 -3205 CD-42 3944 68242219507 W 080624.2-422044080947.7-423826258.84-05.13 6.26 -0.04 -0.32 B7V -0.004+0.010D+.017+012V? 1.1 5.6 * -3206 Gam1VelCD-46 3846 68243219501 W B 3930 080624.4-470302080929.3-472045262.81-07.70 4.27 -0.23 -0.92 -0.18 B1IV -0.004-0.005 +020SBO 119 2.3 41.2AB 5* -3207 Gam2VelCD-46 3847 68273219504 309 W A Gam2 Vel 080627.0-470230080932.0-472012262.80-07.69 1.78 -0.22 -0.99 -0.13 WC8+O9I v-0.004+0.006 +.017+035SB2O 2.3 41.2AB 5* -3208 16Zet1CncBD+18 1867 68257 97645 6650A 080628.6+175658081212.7+173852205.30 25.53 5.63 +0.54 +0.06 F8V +0.066-0.135 +.039-006 0 0.4 0.9AB 5* -3209 16Zet1CncBD+18 1867 68256 97645 6650B 080628.6+175658081212.7+173852205.30 25.53 6.02 +0.54 +0.06 F9V +0.066-0.135 +.039-006 0.4 0.9AB 5* -3210 16Zet2CncBD+18 1867 68255 97646 6650C 080629.0+175655081213.3+173852205.30 25.53 6.20 +0.60 +0.13 G5V +0.097-0.109 +.039-011V 1.2 5.9ABxC 5* -3211 19 PupBD-12 2385 68290153942 I 6647 080634.7-123749081116.3-125537233.89 11.19 4.72 +0.95 +0.74 +0.48 G9III-IIIb -0.025+0.012 +.031+036V < 17 3.0 71.0AE 5 -3212 BD-07 2378 68312135611 080641.0-072828081133.0-074621229.40 13.91 5.36 +0.89 +0.60 +0.45 G6III -0.041-0.021 +.012-011V < 19: -3213 CD-47 3653 68324219515 IS Vel 080640.7-473831080943.2-475615263.33-07.98 5.23 -0.21 -0.89 B1IVe +0.003+0.001 +005SB 188 * -3214 BD+14 1850 68332 97647 080646.5+141809081222.1+140014209.01 24.14 6.54 A7III -0.026-0.008 -009 71 -3215 15 CncBD+30 1664 68351 800162641 BM Cnc 080657.0+295723081308.9+293924192.58 29.71 5.64 -0.07 -0.12 B9pSiCr -0.009-0.018 +020SBO 27 * -3216 BD+76 310 68375 6487 310 080659.2+760344081932.2+754525138.47 31.61 5.54 +0.90 G8III +0.030+0.016 +007V -3217 CP-63 896 68423250127 080706.4-633023080824.5-634804277.20-16.24 6.28 -0.06 B6Ve -0.017+0.002 +030V? * -3218 CP-55 1467 684342357842638 080713.8-554726080933.6-560508270.38-12.26 5.66 +0.21 A3m -0.007+0.034 +025 -3219 CD-36 4291 68450198898 W 080719.9-365942081101.6-371732254.47-02.02 6.44 -0.01 -0.87 O9.5II -0.012+0.003 +039 97 7.0 18.0AC 3* -3220 CP-60 1074 684562501312636 080721.1-605955080900.7-611809274.97-14.95 4.76 +0.43 -0.03 +0.25 F5V -0.158-0.297 +.055+025 0 -3221 BD+60 1119 68457 14479 6680 080724.8+604058081550.5+602250156.59 33.69 6.45 +0.20 +0.11 A7Vm -0.013+0.007 -016 4.1 48.6AC 4* -3222 BD+16 1662 68461 97653 D 080718.7+164851081259.8+163051206.54 25.27 6.01 +0.89 G8III -0.009-0.019 -020SB * -3223 Eps VolCP-68 736 68520250128 W 080736.4-681924080755.8-683702281.62-18.56 4.35 -0.11 -0.46 -0.09 B6IV -0.026+0.025 +010SBO 38 3.6 6.0 * -3224 BD+23 1913 68543 80024 080746.2+232619081341.7+230816199.70 27.82 6.56 +0.11 +0.12 A4IVn -0.036-0.010 -002 -3225 CD-39 4084 68553198908 NS Pup 080747.1-391913081121.5-393707256.45-03.24 4.45 +1.62 +1.86 +0.90 K3Ib 0.000-0.004 -.006+016SB * -3226 CD-42 3979 68601219569 W 080803.1-424119081125.9-425914259.29-05.06 4.75 +0.18 +0.08 +0.22 A5Ib +0.004+0.004 +.004+019 0 4.8 25.7 -3227 CD-48 3576 68657219565 080810.3-480948081111.1-482743263.91-08.05 5.82 -0.15 -0.63 B3V +0.015-0.004 +015 -3228 BD+18 1882 68703 97669 6673 080827.7+175839081411.1+174033205.47 25.98 6.47 +0.30 +0.14 +0.13 A0VnDel Del -0.005+0.011 -003 67 3.0 63.0AC 3 -3229 20 PupBD-15 2324 68752153993 311I 080844.1-152912081320.0-154718236.63 10.11 4.99 +1.07 +0.78 +0.38E G5II -0.013-0.004 +.030+017V? -3230 CD-29 5738 68758175390 080843.1-293639081246.0-295439248.50 2.33 6.52 +0.06 +0.07 A1V -0.024+0.031 +028V? -3231 BD+13 1868 68776 97671 W 080847.4+132104081421.0+130254210.19 24.19 6.38 G8III -0.021-0.018 +025SB 5.6 22.8 -3232 CD-46 3902 68808219587 AH Vel 080851.2-462040081200.0-463839262.44-06.96 5.76 +0.59 +0.39 F7Ib-II -0.001+0.008 +026SB? * -3233 CD-37 4394 68862198942 080911.3-373723081251.5-375528255.20-02.07 6.43 +0.10 +0.08 A3V -0.011-0.002 +027 * -3234 CD-45 3892 68895219602 W 080920.4-455748081230.9-461551262.17-06.68 6.03 -0.11 -0.57 B5V +0.008+0.012 +013 0.8 0.4 -3235 29 LynBD+60 1124 68930 267562645 080932.0+595240081750.4+593416157.54 33.99 5.64 +0.16 +0.13 A7IV -0.006+0.003 -015V 96 -3236 BD+72 409 68951 6504 I 6724 080939.3+724303082040.3+722426142.29 32.46 5.98 +1.54 +1.46 M0III +0.004-0.025 +012 3.7 42.9AB 3* -3237 CD-35 4349 68980198957 MX Pup 080942.9-353550081329.6-355359253.58-00.84 4.78 -0.11 -0.98 -0.08 B1.5IIIe v+0.002-0.002 +035SB2 156 * -3238 CD-33 4705 69002198960 W 080947.4-331601081341.1-333409251.66 0.48 6.37 +1.14 K2III +0.033+0.019 +026 6.7 6.3 -3239 CD-31 5742 690801989722644 W 081013.7-315014081411.0-320827250.52 1.35 6.06 -0.16 -0.74 B1.5V -0.002+0.006 -049SB2 208 7.0 29.6 -3240 CD-35 4358 69081198969 W OS Pup 081012.9-360109081358.4-361921253.98-01.00 5.08 -0.19 -0.86 B1.5IV +0.010-0.002 +018 213 0.9 66.9 * -3241 CD-35 4360 69082198970 081013.3-360215081358.8-362028254.00-01.01 6.11 -0.18 -0.71 B2IV-V +0.010-0.008 +014SB2 * -3242 CD-35 4365 69123198979 081025.7-351112081413.2-352926253.32-00.49 5.78 +1.02 +0.87 K1III -0.055+0.008 +027 -3243 CD-39 4128 69142219635 W 081029.8-400232081402.9-402053257.35-03.21 4.44 +1.17 +1.09 +0.64 K1II-III +0.047-0.068 +.010+014SB1O 5.1 51.1 * -3244 CD-46 3929 69144219629 W Var 081028.4-464118081336.2-465931262.88-06.92 5.13 -0.14 -0.63 B2.5IV +0.003-0.004 +025SB 57 3.9 35. * -3245 BD+62 991 69148 14500 Var 081035.1+624858081917.3+623026154.00 33.93 5.71 +0.89 G8III -0.013+0.007 -002SB * -3246 BD+54 1215 69149 26760 I 081033.8+542710081815.8+540837164.09 34.22 6.27 +1.54 +1.90 K5 -0.024-0.038 +025 -3247 CD-49 3430 69194235819 3957 081040.4-495333081334.1-501146265.60-08.65 5.51 +1.61 +2.00 +0.47 M1III +0.009-0.004 +.007-007 * -3248 BD+12 1803 69243 97694 I R Cnc 081103.0+120201081633.9+114335211.75 24.14 7.13 +1.56 +0.40 +2.98 M7IIIe +0.012-0.010 +.021+032V? * -3249 17Bet CncBD+09 1917 69267116569 312I 6704 3973 081105.5+092938081630.9+091108214.25 23.05 3.52 +1.48 +1.77 +0.78 K4IIIBa0.5 -0.044-0.049 +.012+022V? < 17 9.4 29.2 * -3250 CD-45 3914 69302219657 W 081111.1-453147081423.9-455004261.98-06.17 5.83 -0.20 -0.79 B2IV-V -0.004+0.008 +020 1.5 0.4AB 3 -3251 CD-30 5946 69445199010 W 081151.9-303706081552.5-305533249.71 2.33 6.21 +0.78 +0.35 G5-8III+G: -0.047-0.005D+.009+006V 1.9 2.2AB 3 -3252 BD+09 1921 69478116585 081206.7+091032081731.7+085158214.68 23.13 6.29 +0.98 +0.75 G8III -0.012-0.013 +029 -3253 CD-35 4401 69511199015 081211.7-353545081558.9-355410253.86-00.43 6.16 +1.55 +1.70 K2III +0.005+0.015 +030 -3254 30 LynBD+58 1112 69548 26784 081221.6+580318082026.1+574436159.73 34.43 5.89 +0.39 -0.10 F4V +0.061+0.014 -015V -3255 BD-20 2467 69589175497 081230.0-210044081654.2-211913241.80 7.83 6.60 +0.02 A0 -0.016+0.026 +010 -3256 CD-50 3227 69596235838 081230.3-500830081523.3-502658265.98-08.55 6.44 +1.49 +1.87 K3-4III -0.012-0.020 +010 -3257 21 PupBD-15 2362 69665154076 3986 081248.0-155831081723.1-161706237.58 10.66 6.16 +0.01 +0.08 A2V -0.020-0.008 +000 -3258 BD+54 1217 69682 26788 081251.8+535323082029.1+533428164.78 34.55 6.49 +0.28? F0IV -0.065-0.092 +011 34 -3259 BD-12 2449 69830154093 081339.1-121736081823.9-123755234.55 12.83 5.98 +0.76 +0.33 +0.38 G7.5V +0.267-0.979 +.082+030V -3260 CP-62 985 69863250164 W 081345.0-623625081515.9-625457276.80-15.13 5.16 +0.09 +0.10 A2V -0.023-0.022 +.031+004 199: 2.6 3.9 * -3261 CD-29 5897 69879175543 081354.2-294133081758.3-300012249.20 3.22 6.45 +1.04 K0III +0.041+0.014 -012 -3262 18Chi CncBD+27 1589 69897 801041217 081359.4+273230082003.9+271304195.78 30.47 5.14 +0.47 -0.06 F6V -0.018-0.378 +.061+033 0 -3263 BD+61 1043 69976 14522 081419.9+605652082244.1+603752156.20 34.52 6.41R +0.97? K0III +0.008-0.002 +.015-006 -3264 BD+21 1817 69994 801122646 081431.0+210348082021.0+204452202.85 28.45 5.83 +1.13 +1.06 K1III +0.060-0.047 -017V -3265 BD-09 2471 699971541051218 HQ Hya 081427.5-095113081915.1-100957232.52 14.30 6.32 +0.33 +0.17 F3IIIpDel Del -0.041+0.038 +032 * -3266 CD-35 4452 70002199061 081428.3-350822081817.4-352706253.75 0.21 5.58 +1.24 K2III +0.018+0.002 -009 -3267 CD-36 4443 70003199059 W 081429.5-370346081812.6-372227255.33-00.88 6.70 +0.23 -0.03 A0IV+G: -0.022+0.019D+.009+017SB2 0.8 1.9 * -3268 19Lam CncBD+24 1909 70011 80113 081435.4+242014082032.1+240120199.33 29.59 5.98R -0.03 -0.12 B9.5V -0.023-0.021 +023SB 82 -3269 BD+04 1954 70013116630 W 081434.4+041545081949.9+035652219.71 21.43 6.05 +0.97 +0.64 G8III +0.034-0.030 -047 0.0 0.2 -3270 CD-36 4449 70060199070 313 081448.7-362057081833.3-363934254.78-00.42 4.45 +0.22 +0.11 +0.13 A7III -0.106+0.097 +.057+005 129 -3271 BD-00 1966 70110135783 081506.8-003532082013.1-005434224.31 19.20 6.18 +0.60 +0.15 F9V +0.056-0.094 +010V? =< 10 -3272 BD-04 2303 70148135787 081519.5-050048082017.1-051945228.35 17.02 6.13 +1.33 +1.52 K2III +0.024-0.027 -037 -3273 CD-34 4627 70235199084 081537.8-341633081929.4-343525253.18 0.90 6.43 -0.08 -0.37 B9pHgMn -0.018 0.000 +012 * -3274 CP-58 1095 70267235872 W 081552.9-585110081755.8-591001273.67-12.91 6.42 +0.39 0.00 F5V -0.044-0.032 -002 3.3 43.8AB 3 -3275 31 LynBD+43 1815 70272 42319 314I 4030 081559.4+433032082250.1+431117177.39 34.34 4.25 +1.55 +1.90 +0.88 K4.5III-IIIb e-0.021-0.096 +.023+024 < 19: * -3276 BD-22 2233 70302175634 W 081606.3-223632082027.4-225529243.61 7.63 6.13 +1.04 K0 -0.011+0.001 +026V 7.0 6.7 -3277 BD+53 1246 70313 268192649 081614.2+533231082348.5+531311165.21 35.05 5.51 +0.11 +0.08 A3V -0.026-0.095 +.030+021 -3278 BD-01 2017 70340135804 6762 081615.7-011703082120.2-013608225.10 19.11 6.50 +0.02 -0.02 A2Vpn:EuSrCr:Si -0.017-0.041D+.009+029 0.7 0.5 * -3279 BD-19 2369 704421541502647 081653.6-194539082121.2-200445241.33 9.38 5.58 +0.77 +0.50 +0.45 G2III+A3 -0.001-0.013 -008SB =< 50 * -3280 CP-65 907 70514250186 081712.5-651756081818.9-653648279.39-16.22 5.07 +1.15 +1.19 +0.58 K1III +0.027+0.020 +.013+000 -3281 BD-17 2464 70523154159 081722.3-171602082154.6-173511239.29 10.87 5.75 +1.05 +0.98 K1III -0.096-0.014 +069 * -3282 CD-32 5185 705551991181219I 081726.7-324410082123.0-330316252.13 2.10 4.83 +1.45 +1.60 +0.75 K2.5II-III -0.008+0.004 +.030+033 -3283 CD-36 4513 70556199119 W 081734.3-360958082121.0-362904254.95 0.14 5.20 -0.19 -0.82 B2IV-V -0.005-0.003 +016SB 71 6.8 6.8 * -3284 20 CncBD+18 1930 70569 977811220 081738.3+183912082321.8+181956205.70 28.25 5.95 +0.17 +0.13 A9V -0.054-0.028 +.011+036 -3285 BD-05 2512 705741358322650 081734.7-055135082230.2-061045229.41 17.06 6.15 +0.22 +0.13 A8IV -0.062+0.003 +018 125 -3286 CD-39 4245 706121991232648 081747.0-391808082124.2-393715257.54-01.64 6.16 +0.17 A3V +0.011+0.002 -012V? -3287 BD+42 1859 70647 42342 I W 081756.6+421937082442.8+420018178.86 34.54 6.02 +1.59 +1.94 K5III +0.015+0.007 +027 2.5 79.2 -3288 BD-07 2452 70652135840 I 081800.9-071323082254.0-073236230.69 16.44 5.96 +1.67 +1.85 M1III -0.023+0.002 +050 -3289 22 PupBD-12 2490 70673154177 4046 081804.8-124400082246.8-130317235.52 13.50 6.11 +1.00 +0.89 gG7 -0.051-0.043 -017 -3290 21 CncBD+11 1830 70734 97788 I 6787 081827.0+105716082355.2+103755213.68 25.32 6.08 +1.49 +1.54 M2III +0.004-0.023 +003 3.3 1.0 -3291 CD-25 5988 70761175709 6782 081836.3-260139082249.9-262053246.77 6.16 5.90 +0.37 +0.27? F3Ib -0.007+0.008 -.009+065 0.1 0.1AB 3* -3292 BD+35 1819 70771 607942652 081840.9+352005082504.9+350041187.20 33.45 6.06 +1.27 K0 -0.012-0.012 +033 -3293 CP-57 1490 70839235917 Var? 081858.6-573914082112.0-575823272.87-11.91 5.97 -0.09 -0.80 B1.5III -0.007+0.009 +020V 178 * -3294 CD-48 3734 70930219848 W Var? 081927.0-481009082231.6-482925264.98-06.50 4.82 -0.15 -0.84 -0.13 B1V -0.013+0.008 +027V 169 1.0 0.8 -3295 BD-04 2328 70937135882 081937.6-042331082436.4-044301228.37 18.25 6.01 +0.46 +0.04 F2V +0.022-0.051 -035SB -3296 CD-37 4638 70946199166 4056 081935.1-375749082317.2-381709256.65-00.57 6.32 +1.63 +1.86 M1III +0.028-0.003 -009 * -3297 1 HyaBD-03 2333 70958135877 081935.9-032537082435.0-034504227.50 18.74 5.61 +0.46 -0.06 F3V -0.210-0.024 +.057+072SBO 35 * -3298 CP-63 940 70982250202 081944.0-634706082107.7-640622278.20-15.19 6.12 +0.93 G6-8III -0.004-0.025 -003 -3299 25 CncBD+17 1842 71030 97806 082010.2+172233082549.9+170246207.30 28.32 6.14 +0.41 -0.03 F6V -0.192-0.151 +.035+038 -3300 CD-51 2980 71043235933 082007.3-514807082255.2-520726268.05-08.49 5.85 +0.01 A0V -0.010+0.008 +003 -3301 Kap1VolCP-71 677 71046256497 W A 082006.5-711147081949.0-713054284.83-19.05 5.37 -0.06 -0.31 B9III-IV -0.013+0.030 +036SB2 50 0.3 65.0AB 3* -3302 Kap2VolCP-71 678 71066256499 W B Var? 082017.7-711112082000.7-713019284.82-19.03 5.65 -0.10 -0.31 A0IVMn -0.008+0.044 -006 0.3 65.0AB 3* -3303 BD+67 545 71088 145682662 082020.3+673735082946.2+671751148.07 34.30 5.88 +0.97 G8III -0.066+0.010 -003 -3304 22Phi1CncBD+28 1602 71093 801812656I W 082022.8+281323082627.7+275337195.50 32.02 5.57 +1.40 +1.68 K5III -0.033-0.114 +024V 4.3 130.6 -3305 BD+02 1965 710951167472654I 082024.0+022540082535.5+020608222.19 21.83 5.73 +1.53 +1.86 K5III -0.020-0.006 +012V? -3306 BD+08 2053 711151167522655 6805 082032.9+075326082554.8+073352216.96 24.43 5.13 +0.94 +0.64 -0.06 G7II-IIIFe-1 -0.034-0.012 +.016+015V < 19: 5.2 30.4 -3307 Eps CarCP-59 1032 71129235932 315 4058 082027.7-591115082230.8-593035274.29-12.60 1.86 +1.28 +0.19 +0.89 K3III+B2:V -0.026+0.014 +002 * -3308 BD-22 2262 71141175777 082034.1-224947082455.1-230913244.38 8.36 5.68 +0.06 A2 -0.041+0.042 +026V? -3309 BD+46 1398 71148 423692660 082038.4+455925082736.8+453911174.49 35.42 6.32 +0.62 +0.12 G5V -0.017-0.350 +.046-034V =< 10 * -3310 23Phi2CncBD+27 1612 71150 80187 6815B 4078 082044.1+271540082646.8+265604196.61 31.82 6.32H +0.18 +0.09 A6V -0.014+0.002D+.010-025V? 126 0.1 5.2 * -3311 23Phi2CncBD+27 1612 71151 80188 6815A 4078 082044.4+271544082647.0+265607196.61 31.82 6.30H +0.18 +0.09 A3V -0.016-0.003D+.010-029V? 135 0.1 5.2 * -3312 24 CncBD+25 1920 71152 80184 6811A 4076 082042.9+245147082639.8+243203199.28 31.08 7.02 +0.32 +0.07 F0III -0.041-0.080D+.021+015 0.6 5.7AB 3* -3313 24 CncBD+25 1920 71153 80185 6811B 4076 082043.2+245151082640.1+243207199.28 31.08 7.81 +0.52 -0.04 F7V -0.045-0.085D+.021+019 0.6 5.7AB 3* -3314 BD-03 2339 71155135896 316 082039.8-033448082539.6-035423227.78 18.89 3.90 -0.02 -0.02 -0.05 A0V -0.066-0.023 +.026+010V 125 -3315 CD-23 7277 711761757831221I 6800A 082044.6-234318082503.7-240246245.15 7.88 5.28 +1.48 +1.83 K5III+K1III -0.028+0.026 +.031+026SB 3.5 41.0 * -3316 BD-20 2522 71196175792 082053.3-204319082519.1-210245242.67 9.62 6.01 +0.40 F3V -0.019+0.061 -002 -3317 BD-16 2442 71231154240 082105.7-170648082539.4-172622239.67 11.69 6.44 K0 -0.007-0.005 -013V -3318 Alp ChaCP-76 507 71243256496 082106.7-763613081831.6-765511289.86-21.68 4.07 +0.39 -0.02 +0.23 F5III +0.110+0.108 +.053-014 36 -3319 27 CncBD+13 1912 71250 978192658I BP Cnc 082112.1+125905082643.9+123916211.95 26.79 5.50 +1.60 +1.92 +1.41 M3III -0.020-0.104 +.030-007V * -3320 BD-14 2517 712671542442657 082116.8-143615082555.6-145547237.56 13.13 5.98 +0.17 +0.13 +0.06 A5m -0.010+0.040 +009 30 -3321 2 HyaBD-03 2345 71297135916 W LM Hya 082127.4-033931082627.2-035915227.96 19.02 5.59 +0.22 +0.09 A5III-IV -0.053-0.061 +.028+027 22 3.8 72.8 * -3322 CD-42 4219 71302219890 W 082129.6-422639082457.2-424610260.50-02.89 5.98 -0.17 -0.69 B3V -0.011+0.019 +023 0.4 0.4 -3323 1Omi UMaBD+61 1054 71369 14573 317I 6830 4093 082157.5+610309083015.9+604305155.97 35.43 3.36 +0.84 +0.52 +0.42 G5III -0.133-0.107 +.009+020 17 7.1 143.0AC 4* -3324 BD-12 2524 71377154257 I 4085 082158.9-121221082641.9-123204235.59 14.59 5.54 +1.19 +1.14 K2III v-0.091-0.018 +061V * -3325 BD-05 2530 71433135931 082221.9-060447082717.2-062435230.26 17.96 6.59 +0.51 +0.06 F4III -0.040-0.030 +007V 12 * -3326 CD-41 4119 71459219910 082221.9-414933082551.9-420912260.10-02.40 5.47 -0.15 -0.63 B3V -0.009+0.003 +028 24 * -3327 CD-38 4462 71487199222 W A NO Pup 082237.5-384351082617.6-390334257.62-00.54 6.53 -0.09 -0.36 B9V -0.017-0.008D+.005+028 0.6 8.0AxBC 3* -3328 CD-38 4462 71488199224 W B 082238.0-384356082618.2-390337257.62-00.54 7.25 +0.08 +0.06 A2V: -0.011+0.006D+.005+019V? 0.6 8.0AxBC 3* -3329 28 CncBD+24 1931 71496 80204 CX Cnc 082241.0+242837082836.8+240841199.88 31.38 6.10 +0.24 +0.15 F0Vn -0.031-0.058 +009SB 130 * -3330 CD-51 3004 71510235962 W 082238.4-512401082531.0-514341267.94-07.93 5.17 -0.16 B2Ve -0.041-0.012 +018 158 4.2 25.7 * -3331 CD-28 6048 71523175851 082243.4-285313082650.8-291255249.65 5.25 6.73 -0.05 B9.5V -0.005+0.017 +037V -3332 BD+69 472 71553 14582 082300.2+693920083253.4+691912145.61 34.14 6.31 +1.35 K0 +0.030-0.027 -030 -3333 29 CncBD+14 1899 71555 978431222 D 082302.5+143231082837.3+141239210.56 27.83 5.95 +0.19 +0.14 A5V -0.014-0.011 +002SB 120 0.5 0.2 O 3* -3334 Eta VolCP-72 694 715762565052653 W 082258.5-730435082204.4-732400286.66-19.82 5.29 +0.01 -0.01 A0-1IV-V -0.034+0.031 +.010+020 6.3 42.4AC 3 -3335 BD-20 2538 71581175870 W VV Pyx 082306.5-203049082733.3-205038242.80 10.16 6.56 +0.04 A2V +0.010-0.008 +001SB2 1.1 0.3 * -3336 CD-31 6079 71622199246 082315.2-312034082716.4-314023251.71 3.91 6.33 +0.90 G8III -0.016-0.011 -001SB2 * -3337 BD-02 2581 71663135958 6828 LO Hya 082326.3-021108082829.2-023102226.88 20.20 6.39 +0.33 +0.08 A5m -0.005-0.016D+.015-014SBO 0.1 0.4AB 5* -3338 BD-08 2374 71665135956 082328.7-082903082819.7-084858232.55 16.91 6.43 +1.20 +1.23 K0 -0.001-0.040 +011V -3339 CD-25 6109 71688175883 082338.9-254806082753.5-260757247.24 7.22 6.62 +0.11 A2IV-V -0.055-0.002 +026V? -3340 The ChaCP-77 383 71701256503 318 W 082338.7-770943082038.5-772904290.46-21.84 4.35 +1.16 +1.20 +0.57 K2IIICN0.5 -0.134+0.042 +.036+022 7.7 31. -3341 CP-52 1474 717222359762661 082339.4-522841082625.2-524827268.92-08.43 6.05 +0.06 A0V -0.037-0.003 +030 -3342 BD-09 2532 71766135965 082401.8-092459082850.9-094454233.45 16.53 6.00 +0.42 +0.20 F2III -0.012+0.008 +003 -3343 CD-34 4842 71801199260 W 4092 082407.2-344657082759.3-350650254.60 2.03 5.75 -0.15 -0.70 B3V -0.023+0.002 +025SB 158 0.0 0.1AP 3* -3344 BD-22 2286 71815175902 082414.2-224420082835.9-230418244.80 9.10 6.51 +0.05 +0.08 A2 -0.043-0.022 +054 -3345 BD-20 2549 71833175912 W 082426.8-203703082853.3-205701243.07 10.36 6.67 -0.06 -0.41 B8III -0.012-0.008 +007 5.8 18.9 * -3346 CP-64 878 71863250226 082429.6-641617082551.6-643603278.92-15.01 5.97 +0.96 +0.73 G8-K0III -0.012+0.007 +019V -3347 Bet VolCP-65 933 71878250228 319 4088 082439.0-654810082544.2-660813280.26-15.84 3.77 +1.13 +1.14 +0.56 K1III -0.036-0.155 +.042+027 -3348 BD+37 1870 71906 60866 082451.0+373604083119.9+371557184.80 35.11 6.18 -0.03 -0.15 A0V -0.016+0.001 +016V 56 -3349 CP-54 1647 71919236001 W 082452.7-544048082727.4-550042270.85-09.55 6.53 -0.02 A0V -0.018-0.010 +020 0.0 0.2 -3350 CP-52 1484 71935236002 GU Vel 082452.0-524527082736.5-530519269.26-08.44 5.09 +0.25 +0.14 A9-F0III-IV -0.068+0.013 +.021+025 122 * -3351 BD+53 1259 71952 26896 082503.3+532713083233.5+530653165.30 36.36 6.24 +1.01 +0.83 +0.51 K0IV +0.013-0.077 +044V * -3352 BD+75 342 71973 6592 6872 4133 082510.4+750354083648.7+744325139.27 32.95 6.31 A2m -0.017-0.023 -006SBO 20 3.5 1.8 * -3353 CD-26 6103 71997175939 4104 082515.1-265954082927.6-271957248.44 6.81 6.70 -0.13 -0.55 B4V 0.000-0.008 +006V -3354 2 UMaBD+65 638 72037 14590 082539.1+652910083436.2+650842150.52 35.21 5.47 +0.18 +0.10 +0.04 A2m -0.049-0.063 +.017-016 17 -3355 30Ups1CncBD+24 1940 72041 802292666 082535.7+242507083130.5+240452200.19 31.98 5.75 +0.28 +0.05 F0IIIn -0.082-0.044 +019V 97 -3356 CD-43 4337 720672199822665 W 4106 082543.5-434936082907.6-440938262.08-03.08 5.79 -0.16 -0.75 -0.15 B2Vn t-0.003+0.004 +003V? 0.1 0.2 * -3357 31The CncBD+18 1963 72094 978812667I W 4117 082553.6+182557083135.7+180540206.77 29.98 5.35 +1.56 +1.93 K5III -0.061-0.058 +045V? 0.0 0.3 O 3* -3358 CD-47 4004 72108219985 W 082555.2-473542082904.7-475545265.14-05.28 5.33 -0.14 -0.79 B2IV -0.011-0.001 +029SB 66 0.0 0.2AP 4* -3359 CD-44 4462 72127219996 W 082605.3-442325082927.6-444330262.57-03.36 4.99 -0.16 -0.79 -0.17 B2IV +0.004-0.003D+.000+022SB 163 1.7 4.6 * -3360 BD+38 1920 72184 60890 320 082625.0+382134083255.0+380059183.95 35.54 5.90 +1.11 +1.17 K2III -0.103-0.169 +.011+015V * -3361 BD+10 1816 72208116863 082628.5+100907083154.6+094852215.44 26.74 6.83 -0.07 -0.17 B9p:Hg: +0.003-0.007 +008SB -3362 CD-31 6165 72227199308 I R 4113 082627.9-314924083028.6-320934252.51 4.18 5.65 +1.49 +1.78 K2III -0.016-0.005 +019 0.0 0.1 * -3363 CD-45 4183 72232220007 082629.6-455948082945.6-461955263.91-04.26 5.99 -0.15 B5III -0.029+0.002 +012 -3364 CD-36 4715 72268199310 4115 082641.4-362306083029.6-364316256.21 1.50 6.69 +1.95 +2.09 M2Iab -0.019+0.012 +025V * -3365 32 LynBD+36 1836 72291 60896 082656.9+364632083321.8+362611185.89 35.37 6.24 +0.36 -0.08 F5Vb vw -0.143+0.001 +.032+000V 20: -3366 33Eta CncBD+20 2109 72292 80243 321I 082655.5+204652083242.5+202628204.33 31.06 5.33 +1.25 +1.39 +0.61 K3III -0.047-0.043 +.013+024 -3367 BD-19 2438 72310154359 6862 082701.3-191422083130.9-193439242.27 11.65 5.42 -0.06 A0V -0.033-0.007 +.003+012V? 61 0.6 0.2 * -3368 CP-54 1667 72322236032 W 082701.5-545117082936.3-551128271.17-09.40 6.36 +0.80 G0V -0.015-0.015 -012V 5.9 2.4 -3369 32Ups2CncBD+24 1946 72324 80245 082705.4+242530083300.1+240505200.31 32.31 6.36 +1.02 +0.88 +0.50 G9III -0.068-0.047 +.027+075 * -3370 CP-69 919 72337250235 082702.6-694540082716.9-700536283.86-17.80 5.53 -0.03 -0.04 A0V -0.008+0.048 +013V? -3371 CD-44 4477 72350220025 W 082716.7-442401083039.2-444414262.71-03.19 6.30 -0.02 -0.49 -0.06 B4IV -0.013+0.011 +024V? 4.5 3.2 * -3372 34 CncBD+10 1818 72359 97902 082713.3+102418083239.9+100358215.27 27.02 6.46 -0.02 -0.04 A1V +0.003-0.005 -011SB 20 -3373 CD-38 4566 72436199329 W 082743.0-384334083124.6-390351258.20 0.26 6.31 -0.15 -0.56 B4V -0.017+0.004 +011SB 1.8 3.8AB 3 -3374 BD-14 2564 72462154373 W 082754.4-144129083233.3-150146238.56 14.41 6.38 +0.27 +0.09 F0Vn -0.050+0.052 +023V 2.1 0.3 -3375 CD-47 4048 72485220039 082800.1-473143083110.8-475200265.30-04.96 6.39 -0.15 -0.65 B2.5V +0.001+0.002 +011 -3376 BD+13 1940 72505 97913 D 082812.6+133558083345.1+131526212.12 28.59 6.28 +1.17 +1.23 K0III -0.029-0.045 +028 0.0 0.1 -3377 33 LynBD+36 1840 72524 60907 082818.4+364546083443.8+362510185.96 35.64 5.78 +0.04 +0.02 A2Vnn -0.031-0.044 +025 -3378 BD+05 1997 72561116890 082827.1+050554083343.5+044524220.68 24.88 5.87 +1.07 +0.87 G5III -0.005-0.013 +001V? -3379 BD+74 370 72582 6605 322 082835.7+735846083942.6+733747140.44 33.48 6.15 +1.02 G7III -0.015-0.099 +.015+016V -3380 BD+08 2077 72617116894 W 082850.0+084741083413.3+082707217.09 26.66 6.03 +0.33 +0.04 F3IV -0.003-0.031 +011 67 7.6 31.2 -3381 CD-24 7089 72626176061 6871 082845.5-241555083304.8-243623246.67 9.05 6.19 +0.27 A8IV -0.007-0.016 +.016-008V? 0.2 0.5AB 3* -3382 CP-53 1729 72650236055 082849.0-540312083129.6-542339270.67-08.72 6.34 +1.31 +1.40 K3III +0.020-0.047 -007 -3383 BD-01 2074 726601360442669 082858.1-014837083401.6-020906227.29 21.58 5.81 0.00 0.00 A1V -0.032+0.020 +004 =< 41 -3384 CD-31 6229 72673199352 082857.2-311052083251.5-313003252.29 4.98 6.38 +0.79 +0.34 +0.28E K0V -1.110+0.765 +.086+016V -3385 CD-34 4959 72688199353 VX Pyx 082903.8-341735083258.6-343802254.82 3.14 6.36 +0.95 K0V -0.010+0.004 +006V * -3386 CP-52 1517 72737236062 W 082918.3-525219083204.8-531244269.75-07.97 5.69 +0.58 K0III+A3 -0.021+0.007 +019 1.0 0.8 * -3387 35 CncBD+20 2118 72779 97928 082934.5+195603083519.4+193524205.51 31.34 6.58 +0.68 +0.25 +0.37 G0III -0.036-0.010 +036V 91 * -3388 CD-37 4850 72787199363 Var? 082935.6-380145083319.9-382216257.87 0.98 6.49 -0.18 -0.65 B2.5V 0.000-0.007 +010 * -3389 CD-38 4610 72832199370 4137 082955.6-383024083338.3-385056258.29 0.74 5.96 -0.14 B5III -0.034+0.006 +028 * -3390 CD-46 4300 72900220103 083015.1-463741083330.4-465816264.81-04.11 6.24 +1.56 K3III +0.011-0.009 +023 -3391 3Pi 1UMaBD+65 643 72905 14609 083019.1+652200083911.7+650115150.55 35.70 5.64 +0.62 +0.07 +0.33 G1.5Vb -0.024+0.088 +.073-012V? 4 * -3392 BD+03 2014 72908116920 083012.3+030516083524.9+024437222.85 24.30 6.33 +1.02 +0.87 G9III -0.006+0.007 -004 -3393 CP-80 258 729222584962664 083015.6-803511082419.8-805451293.85-23.26 5.69 +1.02 +0.74 G8III -0.149+0.216 +027V? -3394 BD+15 1851 72943 97950 083031.2+153935083607.7+151849210.22 29.94 6.32 F0IV +0.008-0.024 +004 65 -3395 BD+07 1997 72945116929 6886A 083032.0+065808083551.0+063712219.12 26.20 5.99 +0.52 +0.04 F8V -0.128-0.143 +.052+025SBO 1.2 10.3AB 5* -3396 BD+07 1997 72946116931 6886B 083032.3+065818083551.3+063721219.12 26.21 7.25 +0.71 +0.27 G5V -0.128-0.143 +.052+027V 1.2 10.3AB 5* -3397 CD-32 5465 72954199388 W 083031.5-321504083431.7-323555253.37 4.61 6.43 +0.75 +0.23? G5IV-V -0.044-0.133 +008 0.0 0.2 * -3398 3 HyaBD-07 2540 729681360762672 HV Hya 083035.4-073817083528.2-075856232.80 18.85 5.72 -0.03 -0.01 A1pSrCrEu v-0.020+0.013 +024SB? 16 * -3399 CD-37 4873 72993199389 W 4143 083042.4-371603083429.3-373641257.39 1.61 6.30 +1.56 +1.74 K5III -0.007+0.001 +023 2.3 1.9 * -3400 BD+53 1268 73017 26935 083054.3+534459083822.2+532405164.89 37.21 5.66 +0.96 G8IV -0.078-0.017 -043V -3401 BD+60 1148 73029 14612 083101.8+601721083910.2+595622156.74 36.63 6.48 A2Vn -0.019-0.033 -014 -3402 CD-26 6225 73072176131 083114.2-262955083528.8-265037248.82 8.18 5.96 +0.37 A1V+G-KIII -0.022+0.014 +009SB2 -3403 4Pi 2UMaBD+64 698 73108 146162677I 083128.5+644038084012.8+641940151.36 35.96 4.60 +1.17 +1.16 +0.63 K1+IIIb -0.060+0.023 +.016+015 < 17 * -3404 CD-39 4519 73121199402 083131.9-393734083512.6-395812259.37 0.31 6.47 +0.58 G1V +0.087+0.053 +034 -3405 BD+53 1269 73131 26940 083134.2+531630083900.0+525530165.48 37.34 6.42R K0 -0.022-0.032 +039 -3406 36 CncBD+10 1837 731431169532675 083140.5+100011083705.8+093920216.22 27.83 5.88 +0.09 +0.10 A3V -0.029-0.003 +017 -3407 CD-49 3646 731552201382674 083140.3-493559083443.6-495639267.33-05.71 5.01 +1.33 +1.38 +0.68 K1-2II -0.012+0.016 +.009+004 -3408 BD+53 1272 73171 26946 323 083153.1+530343083917.6+524242165.75 37.39 5.91 +1.17 +1.05 gK1 -0.029-0.028 +027V? * -3409 BD+33 1728 73192 60939 083204.2+330904083819.0+324807190.51 35.69 5.94 +1.12 gK2 -0.024-0.010 +004 -3410 4Del HyaBD+06 2001 732621169651223 W 083221.7+060309083739.4+054213220.26 26.18 4.16 0.00 +0.01 +0.01 A1Vnn -0.066-0.007 +.033+011SB 249 6.2 243.7 -3411 BD-04 2401 73281136103 083228.5-043508083727.1-045601230.32 20.88 6.19 +1.05 +0.89 K0 -0.006+0.021 +018 -3412 37 CncBD+10 1840 73316116975 083240.2+095527083805.2+093429216.42 28.01 6.53 -0.02 -0.04 A1V -0.039-0.007 +028 50 -3413 CD-50 3417 73340236110 HV Vel 083252.8-503721083552.1-505812268.27-06.18 5.80 -0.13 -0.54 B8Si v-0.004-0.004 +023V? * -3414 CP-57 1591 73389236106 083257.9-573947083519.6-580033273.97-10.38 4.86 +1.00 +0.81 +0.49 K0III +0.042+0.022 +.017+024 -3415 CP-57 1590 73390236105 083256.1-575241083515.4-581330274.14-10.52 5.26 -0.14 -0.61 -0.16 B3V+B3Vn -0.032+0.006 +021V 140 * -3416 BD-06 2669 73451136117 083324.8-061844083820.3-063945232.02 20.16 6.51 +0.44 +0.17 A1V+G 0.000-0.005 +030V -3417 CP-72 713 73468256524 083323.0-730050083242.2-732124287.03-19.14 6.12 +0.95 +0.66 G8III -0.038+0.082 -027 -3418 5Sig HyaBD+03 2026 734711169881224I 083331.8+034133083845.4+032029222.71 25.31 4.44 +1.21 +1.28 +0.56 K1+III -0.018-0.018 +.035+025V < 17 * -3419 CD-33 5257 73476199436 W 083331.5-332342083729.7-334445254.66 4.42 6.48 +0.33 F0IV-V -0.021-0.046 +012V? 5.3 22.4AB 4 -3420 Eta PyxCD-25 6356 734951761892676 W 083335.8-255417083752.2-261518248.66 8.96 5.27 -0.04 A0V -0.020-0.006 +.038+031 203 7.8 16.0 -3421 CD-39 4574 73524199438 083342.5-394756083719.9-400851259.76 0.53 6.55 +0.60 +0.14 G4IV-V -0.308+0.033 +.059-002 -3422 34 LynBD+46 1422 73593 424901225I 083406.5+461105084101.1+455002174.42 37.76 5.37 +0.99 +0.75 G8IV +0.025+0.092 +.015-037 -3423 BD+32 1776 73596 60970 083406.3+321744084018.3+315631191.65 35.92 6.10R F5III -0.035-0.028 +013SB -3424 BD+08 2099 73599116997 083402.5+082213083924.6+080102218.16 27.62 6.45 +1.08 +0.99 K1III -0.025-0.037 +017 -3425 BD-19 2489 736031544922678I 6903 083409.7-192308083840.3-194413243.40 12.93 6.33 +1.59 +1.83 K5III +0.014+0.006D+.005+000 3.0 4.3 -3426 CD-42 4451 73634220204 324 083407.6-423821083738.7-425921262.05-01.14 4.14 +0.11 +0.16 +0.16 A6II -0.006+0.008 +.018+019 0 -3427 39 CncBD+20 2158 73665 80333 W 4179 083421.3+202139084006.4+200028205.51 32.54 6.39 +0.98 +0.83 +0.47 G8III -0.036-0.015 +035V 0 0.0 149.8AB 5* -3428 BD+20 2166 73710 98021 6921 083437.7+200125084022.1+194012205.89 32.48 6.44 +1.02 +0.90 +0.49 G9III -0.035-0.017 +036SB < 45 1.3 63.2AC 4* -3429 41Eps CncBD+20 2171 73731 98024 W 083442.9+195355084027.0+193242206.06 32.45 6.30 +0.17 +0.16 +0.06 A8Vn -0.039-0.006 +030SB2 82 1.1 134.9 * -3430 BD-22 2345 73752176226 6914 083445.2-221918083908.0-223943245.90 11.31 5.05 +0.73 +0.36 G6IV -0.235+0.436 +.063+043SB 1.3 0.8AB 3* -3431 6 HyaBD-11 2420 73840154515 325I 083517.2-120718084001.5-122831237.40 17.34 4.98 +1.42 +1.62 +0.75 K4III -0.081-0.002 +.023-011V? < 19: * -3432 CP-62 1058 738872502882679 W 083532.3-623006083718.8-625113278.15-12.99 5.47 +1.02 +0.83 K0III -0.008-0.025 +.020+021V? 5.6 7.6 -3433 Zet PyxCD-29 6544 738981762532680I 6923 4186 083533.4-291218083942.5-293340251.59 7.31 4.89 +0.90 G4III -0.020-0.089 +.021-032 4.2 52.4 -3434 CD-36 4872 73900199473 W 083532.4-361518083922.1-363625257.18 3.00 6.13 +0.42 F1IV -0.171+0.040D+.024+009SB 1.5 0.9 * -3435 CP-52 1565 73952236142 W 083554.4-524417083844.9-530526270.25-07.09 6.47 -0.10 -0.35 B8Vn -0.009+0.013 +011V 184 7.5 22.2 * -3436 BD+47 1606 73971 42508 083602.9+471534084300.2+465404173.08 38.13 6.22 +0.96 G8III -0.039-0.045 -007 -3437 BD-08 2452 739971361762682 083610.5-084148084101.6-090307234.54 19.43 6.63 -0.02 +0.02 A1Vn -0.033+0.002 +010 112 -3438 Bet PyxCD-34 5128 740061994902681 W 083611.2-345712084006.2-351830256.24 3.90 3.97 +0.94 +0.65 +0.48 G7Ib-II +0.012-0.022 +.018-013SB 8.5 12.6 -3439 CD-39 4653 74067220252 W 4193 083638.9-395432084019.3-401551260.19 0.91 5.20 -0.01 -0.14 B9V -0.044-0.004 +021 0 3.7 4.4 * -3440 CP-53 1796 74071236151 HW Vel 083634.9-530510083923.8-532623270.59-07.22 5.48 -0.16 -0.55 B5V -0.029+0.019 +015V? 128 * -3441 9 HyaBD-15 2554 741371545522684I 6937 083704.9-153502084143.3-155636240.63 15.71 4.88 +1.06 +0.92 +0.53 G9.5III +0.001-0.098 +.032-002V < 19: 6.8 31.0 * -3442 CP-52 1579 74146236157 W 4194 083705.5-524200083957.6-530318270.33-06.92 5.19 -0.14 -0.57 B4IV -0.022+0.012 +014SB 56 4.4 16.6 * -3443 CP-59 1075 74148250291 W 083705.8-595748083913.2-601902276.18-11.33 6.36 0.00 A0V -0.032+0.026D+.013+009 0.6 1.2 -3444 CD-44 4679 74167220261 4198 083710.7-445007084035.3-451129264.12-02.06 5.71 +1.65 +2.00 M0III +0.013-0.003 +013 -3445 CD-46 4438 741802202651226 W 4199 083718.4-461734084037.6-463856265.28-02.95 3.84 +0.71 +0.30 +0.60 F3Ia 0.000+0.003 +.031+025V 38 6.9 37.5 * -3446 BD-11 2432 74190154558 083724.0-113629084209.8-115758237.26 18.06 6.45 +0.16 +0.13 A5m -0.031-0.022 +002 -3447 CP-52 1583 741952361641227 o Vel 083725.6-523400084017.6-525519270.25-06.80 3.62 -0.18 -0.64 -0.18 B3IV -0.022+0.019 +016SB 40 * -3448 CP-52 1584 74196236165 4197 083726.0-523937084017.4-530055270.33-06.86 5.61 -0.14 -0.50 B7Vn -0.029+0.030 +015SB 130 * -3449 43Gam CncBD+21 1895 74198 803781228 W 083729.9+214942084317.1+212807204.17 33.73 4.66 +0.02 +0.01 0.00 A1IV -0.106-0.039 +.016+029SB 79 4.0 106.3AB 5* -3450 45 CncBD+13 1972 74228 980692686 083741.7+130223084312.3+124051213.80 30.46 5.64 +0.39 +0.25 A3V+G0III -0.012+0.002 -013SBO 30 0.0 0.1 * -3451 BD+37 1899 74243 61018 083745.8+371649084410.1+365505185.71 37.59 6.33R F7V -0.034-0.094 +004 20 -3452 CD-46 4448 74272220284 083756.3-465736084113.1-471901265.87-03.27 4.77 +0.12 +0.12 +0.19 A5II -0.012+0.007 -.000+017SB 0 -3453 CD-48 4020 74273220282 083754.9-483357084105.3-485521267.13-04.27 5.90 -0.21 -0.90 B1.5V -0.005+0.007 +018 181 * -3454 7Eta HyaBD+03 2039 742801170502687 Eta Hya 083759.8+034528084313.5+032355223.25 26.32 4.30 -0.20 -0.74 -0.19 B3V -0.019-0.001 +017SB? 128 * -3455 CP-57 1644 74341236179 W 083816.6-571120084043.6-573243274.02-09.53 6.34 +0.20 +0.14 A3V -0.015+0.025D+.022+014 1.9 3.8 -3456 CD-44 4704 74371220300 083832.7-450308084156.9-452439264.44-02.01 5.23 +0.21 -0.53 B6Iae -0.003-0.002 +024 53 * -3457 CP-59 1080 743752361812685 W V343 Car 083824.4-592415084037.0-594540275.82-10.86 4.33 -0.11 -0.80 -0.13 B1.5III -0.001 0.000 +013SB 48 8.9 15.7 * -3458 BD+04 2029 74393117069 083844.5+044143084359.7+042005222.43 26.94 6.37 -0.06 -0.13 B9.5III-IV -0.032-0.005 +034V -3459 BD-06 2708 74395136221 I W 083845.7-065225084340.4-071401233.29 20.97 4.62 +0.84 +0.49 +0.44 G1Ib -0.002+0.003 +.007+031 < 17 4.1 78.9AB 3* -3460 The VolCP-69 946 744052565352683 W 083843.1-700147083905.2-702313284.68-17.12 5.20 +0.01 -0.03 A0V +0.018-0.040 +.006+013 82 5.0 45.0AC 3 -3461 47Del CncBD+18 2027 74442 98087 326I 6967 083900.1+183119084441.1+180915208.02 32.90 3.94 +1.08 +0.99 +0.54 K0III-IIIb -0.018-0.228 +.025+017 < 17 7.5 38.4 * -3462 CD-47 4251 74455220313 W HX Vel 083902.0-474424084216.0-480557266.60-03.61 5.51 -0.18 -0.88 B1.5Vn -0.024-0.008 +042V 285 1.3 0.3 * -3463 CD-35 4976 74475199535 083903.1-353502084257.0-355636257.10 3.97 6.42 +0.02 +0.01 A0V 0.000+0.018 +008 -3464 46 CncBD+31 1876 74485 610292690 083913.4+310336084521.4+304152193.45 36.71 6.13 +0.94 +0.63 +0.49 G5III -0.002-0.006 +.008-012V? * -3465 49 CncBD+10 1864 74521 980892688 BI Cnc 083919.4+102638084445.0+100454216.71 29.71 5.66 -0.11 -0.25 A1pEuCr -0.016-0.019 +024SB 20 * -3466 CP-52 1605 74535236202 W BCKT Vel 083926.9-524428084218.9-530600270.58-06.67 5.52 -0.15 -0.54 B8Si -0.029+0.023 +017 0.8 76.6AB 4* -3467 CP-52 1607 74560236205 W A HY Vel 083933.3-524517084225.5-530650270.60-06.66 4.86 -0.17 -0.66 -0.19 B3IV -0.015+0.022 +022SB 22 0.8 76.6AB 4* -3468 Alp PyxCD-32 5651 74575199546 327 4220 083934.4-324933084335.5-331111254.99 5.77 3.68 -0.18 -0.88 -0.16 B1.5III -0.011+0.011 +015V? 19 * -3469 10 HyaBD+06 2030 74591117088 083943.5+060235084501.3+054050221.23 27.79 6.13 +0.20 +0.10 A6V -0.001-0.005 -009SB 132 -3470 BD+67 560 74604 14667 083946.1+670430084849.4+664229148.23 36.25 6.20 -0.11 -0.40 B8V -0.011-0.039 +005V? -3471 CP-55 1688 74622236206 083943.3-552457084220.9-554627272.73-08.29 6.29 +1.18 +1.20 K2III -0.072+0.053 +075 -3472 BD-02 2676 74688136243 6977A 084017.7-021415084520.8-023603229.28 23.78 6.41 +0.52 +0.06 F2IV +0.005-0.006D+.005-018V 0.7 4.7 * -3473 BD-20 2667 747061764041229 084026.8-204818084455.2-211004245.47 13.28 6.11 +0.22 A5V -0.020+0.001 -015 170 -3474 48Iot CncBD+29 1823 74738 80415 I: 6988B 4238 084036.9+290751084640.0+284555195.87 36.54 6.57 +0.04 +0.04 A3V -0.018-0.041 +.017+015 200 2.5 30.4 * -3475 48Iot CncBD+29 1824 74739 80416 328I 6988A 4238 084038.8+290733084641.8+284536195.88 36.54 4.02 +1.01 +0.78 +0.49 G7.5IIIaBa0.1 -0.025-0.042 +.017+016 < 19: 2.5 30.4 * -3476 CD-49 3761 747532203612689 084032.4-492740084340.3-494922268.11-04.49 5.16 -0.20 -1.03 B0IIIn +0.002+0.004 +028 288 -3477 CD-42 4569 74772220371 W 084049.6-421713084424.0-423857262.54 0.05 4.07 +0.87 +0.52 +0.50 G5III -0.012+0.018 +.051-002 7.1 45.3 * -3478 BD-01 2125 74794136254 084058.1-014108084602.5-020256228.86 24.21 5.70 +1.10 +1.04 gK0 +0.043+0.042 +010V? -3479 CD-36 4980 74824199573 4232 084100.8-364702084451.9-370850258.28 3.53 5.76 -0.15 B2III -0.008+0.001 +012V 148 * -3480 BD-10 2634 74860154615 I W 084119.0-103833084606.9-110023237.00 19.39 6.25 +1.61 +1.90 K5III -0.018+0.027 +034V 3.5 2.3 -3481 50 CncBD+12 1904 74873 98117 084127.1+122837084656.0+120636214.84 31.06 5.87 +0.11 +0.05 A1V -0.068-0.052 +023V 74 -3482 11Eps HyaBD+06 2036 74874117112 I 6993 Eps Hya 084128.8+064709084646.6+062508220.72 28.53 3.38 +0.68 +0.36 +0.39 G5III -0.189-0.051 +.027+036SBO 19 0.9 0.2AB 6* -3483 CD-24 7377 74879176439 084129.7-250125084549.3-252315249.05 10.91 6.10 +0.08 A2V: -0.029+0.032 +009V? -3484 12 HyaBD-13 2673 74918154622 I W 084139.0-131055084622.5-133252239.25 18.01 4.32 +0.90 +0.62 +0.46 G8-IIIFe-1 +0.016-0.011 +.013-008SB1 < 17 9.3 19.9 * -3485 Del VelCP-54 1788 74956236232 W 084156.5-542031084442.2-544230272.08-07.37 1.96 +0.04 +0.07 +0.02 A1V +0.023-0.078 +.051+002V? 40 3.0 2.2AB 4* -3486 BD-01 2130 749881362762693 084210.8-013150084715.0-015350228.89 24.55 5.29 +0.04 +0.08 A3V -0.033+0.004 +.020+002SB 170 -3487 CD-45 4517 75063220422 084238.2-454032084601.7-460230265.38-01.84 3.91 0.00 -0.05 +0.13 A1III -0.001 0.000 +.003+024 25 -3488 CD-40 4602 75081220432 084243.9-404533084623.8-410732261.58 1.29 6.21 -0.05 -0.19 B9Ve t-0.018-0.001 +023 * -3489 CP-58 1202 75086236241 W A 084243.3-582133084505.3-584330275.33-09.78 6.21 -0.09 -0.47 B7III -0.031-0.020D+.006+028 0.1 4.1AB 4* -3490 CD-34 5243 75112199607 4251 084250.9-341522084649.2-343722256.54 5.41 6.37 -0.13 -0.58 B4V -0.021+0.007 +015V * -3491 CP-67 990 75116250315 084257.5-675053084354.3-681242283.07-15.53 6.32 +1.50 +1.78 K3III: +0.001+0.027 -017 -3492 13Rho HyaBD+06 2040 75137117146 7006 084308.1+061226084826.0+055016221.52 28.62 4.36 -0.04 -0.04 -0.07 A0Vn -0.017-0.034 +.014+033SB 126 8.7 12.4 * -3493 BD-06 2727 75140136287 084308.6-061123084804.9-063331233.32 22.26 6.09 +1.28 +1.42 K0 +0.012-0.021 -005 -3494 CD-45 4526 75149220442 084306.3-453244084630.6-455446265.33-01.69 5.46 +0.27 -0.53 B3Ia +0.006-0.012 +026 73 * -3495 CP-65 1013 751712503172691 084306.6-652748084430.0-654932281.10-14.09 6.05 +0.20 +0.08 A4V -0.062+0.101 +009 -3496 CD-45 4541 75276220464 084355.2-454714084718.9-460920265.61-01.73 5.75 +0.56 +0.38 F2Iab +0.003-0.008 +032 * -3497 CD-41 4507 75289220481 084401.9-412142084740.5-414414262.21 1.09 6.36 +0.58 +0.10 G0Ia-0: 0.000-0.242 +.029+014V -3498 CP-56 1865 753112362682695 V344 Car 084407.3-562407084642.5-564611273.90-08.41 4.49 -0.17 -0.73 -0.18 B3Vne v-0.010+0.008 +027 332 * -3499 BD+33 1765 75332 61074 084419.5+333932085032.2+331707190.53 38.30 6.25 +0.49 +0.01 F7Vn -0.067-0.081 +005 11 -3500 14 HyaBD-02 2699 753331363081230 KX Hya 084420.2-030419084921.7-032635230.64 24.19 5.31 -0.09 -0.35 B9pHgMn -0.020-0.023 +033V? 35 * -3501 CD-41 4516 75387220495 084432.4-420538084808.8-422750262.83 0.70 6.43 -0.20 -0.77 B2IV-V -0.003-0.009 +030 * -3502 Eta ChaCP-78 372 75416256543 331 084443.7-783601084119.5-785748292.40-21.65 5.47 -0.10 -0.35 B8V -0.031+0.026 +014V 301 -3503 CP-52 1675 75466236284 084504.1-522851084800.2-525102270.91-05.84 6.30 -0.10 -0.32 B8V -0.026+0.007 +012 204 * -3504 BD+19 2110 75469 98162 084503.6+191219085045.1+184956207.88 34.48 6.16R -0.01 0.00 A2V s -0.015-0.020 +019 -3505 5 UMaBD+62 1027 75486 146912701 084508.3+622011085322.6+615744153.83 37.93 5.73 +0.28 +0.11 F2III -0.010+0.020 -031V? 101 -3506 BD+59 1198 75487 27026 084512.2+592551085305.9+590322157.46 38.52 6.25R F5IV-V +0.014+0.003 +009 30 -3507 BD-20 2693 75495176535 084515.4-204030084944.9-210255246.06 14.25 6.47 +0.23 A7Vn +0.006-0.064 -017 -3508 35 LynBD+44 1794 75506 425762700I 084514.2+440556085156.8+434336177.19 39.64 5.15 +0.98 +0.68 +0.50 K0III -0.015+0.048 +.018+015 < 17 -3509 BD+45 1649 75523 42580 084523.8+454115085211.6+451845175.13 39.71 5.99 +1.26 +1.33 K0III -0.026-0.037 +012 -3510 54 CncBD+15 1917 75528 981682699 D 084527.3+154318085101.5+152102211.81 33.26 6.38 +0.64 G1V -0.112+0.075 +045 =< 10 1.4 0.1 * -3511 BD+42 1935 75556 42581 084533.2+422243085210.0+420009179.43 39.62 5.99 +1.25 K0III -0.039-0.071 +057 -3512 CD-32 5770 756051996782696 4268 084547.7-322425084951.5-324650255.49 7.05 5.21 +0.87 G5III +0.002-0.049 +.028-008V * -3513 CD-28 6600 75629176546 084550.7-290526085002.2-292747252.90 9.15 5.87 +0.95 G8III -0.014+0.007 -010 -3514 CD-39 4838 75630220531 084555.7-395652084939.2-401914261.34 2.27 5.48 +0.06 +0.13 A2/3IV -0.008-0.014 +.036+017 -3515 M 67 * -3516 CD-28 6610 75649176554 084608.1-281440085021.6-283705252.27 9.73 6.17 -0.08 -0.19 B9V -0.021-0.022 +025 -3517 CD-38 4925 756541996822697 HZ Vel 084605.8-384612084952.4-390830260.46 3.05 6.39 +0.23 A5III -0.058+0.038 +009 * -3518 Gam PyxCD-27 5986 75691176559 332I 084617.2-272020085031.9-274236251.57 10.33 4.01 +1.27 +1.40 +0.67 K3-III -0.130+0.087 +.033+025 -3519 51Sig1CncBD+33 1770 75698 61102 7057 084624.0+325056085234.6+322827191.64 38.57 5.66 +0.22 +0.07 +0.08 A8Vma s -0.003+0.016 -014SB 65 4.4 79.0AC 4* -3520 CD-44 4861 757102205402698 084620.1-445608084947.7-451829265.22-00.86 4.93 +0.05 +0.15 A2III -0.010+0.010 +.012+005SB 77 -3521 53 CncBD+28 1659 75716 80476 I W BO Cnc 084627.8+283805085228.6+281533196.87 37.66 6.23 +1.62 M3III -0.017-0.004 +.001+011V 3.5 43.1 * -3522 55Rho1CncBD+28 1660 75732 80478 084638.5+284246085235.8+281951196.79 37.71 5.95 +0.87 +0.63 +0.40 G8V -0.484-0.234 +.074+027V 7.0 85.0 * -3523 15 HyaBD-06 2743 75737136345 7050 4282 084639.5-064809085134.5-071038234.39 22.64 5.54 +0.15 +0.14 A4m -0.044+0.001D+.011+037SB2 25 1.8 0.9AB 4* -3524 CP-78 378 75747256549 RS Cha 084637.7-784214084312.4-790411292.55-21.63 6.05 +0.23 +0.08 A5V+A7V -0.029+0.040 +026SBO * -3525 CD-41 4560 75759220552 084642.6-414259085021.0-420524262.80 1.25 6.00 -0.10 -0.95 B1-2III -0.011-0.007 +023SB2O 39 * -3526 BD+05 2074 75811117214 7061 084707.3+054259085224.2+052024222.55 29.26 6.33 +0.12 +0.14 A5V -0.004-0.015 -010V 43 3.2 0.8 -3527 CD-46 4661 75821220561 W 084709.8-460918085033.5-463145266.25-01.54 5.10 -0.21 -0.99 -0.16 B0III -0.001-0.002 +007SB 74 4.1 3.2 * -3528 BD+36 1883 75896 611172704 084737.9+355459085355.7+353218187.81 39.34 6.14 +0.04 +0.11 A4III -0.024-0.017 +025SB? 50 -3529 BD-12 2716 75916154704 7062 084746.0-125124085230.7-131401239.88 19.41 6.13 +1.14 +1.14 K0 +0.025-0.019 +014V? 5.3 33.6 -3530 CD-42 4723 75926220581 084750.5-420746085127.9-423016263.25 1.15 6.55 +0.04 +0.08 A1Vn -0.022+0.027 +024V -3531 6 UMaBD+65 673 75958 14703 084803.2+645912085637.5+643614150.48 37.60 5.58 +0.86 +0.57 G7IIIFe-0.5 -0.026-0.081 +003SB -3532 57 CncBD+31 1907 75959 61125 I 7071 084808.6+305730085414.7+303446194.11 38.55 5.39 +1.05 G7III +0.038-0.019D+.005-060 0.2 1.5AB 3* -3533 CD-32 5814 76001199728 084821.1-320756085226.1-323033255.62 7.64 6.50 +1.46 K2/3III -0.008-0.006 +001 -3534 CD-36 5125 76072199731 W 4288 084843.7-361004085238.6-363244258.79 5.12 6.42 +0.56 G8III+A3-5V -0.015-0.017 +018 0.0 0.1 -3535 CD-38 4980 76110199737 084858.8-382048085248.0-384327260.50 3.75 5.82 +1.50 +1.89 M0III -0.001+0.013 +021 -3536 CP-57 1759 76113236339 084903.5-571526085136.6-573801275.00-08.43 5.59 -0.11 -0.41 B8III -0.011+0.014 +008 19 -3537 CP-66 927 76143250347 W 084913.8-662511085034.8-664735282.28-14.18 5.35 +0.42 +0.07 F5IV +0.089+0.097 +.031+042 106 6.6 20. -3538 BD-04 2490 76151136389 084922.3-050321085417.9-052604233.21 24.17 6.00 +0.67 +0.22 +0.21E G2V -0.416+0.031 +.085+028V =< 6 -3539 CD-47 4460 76161220609 084921.0-475852085238.6-482133267.89-02.43 5.91 -0.15 -0.59 -0.16 B3Vn -0.009-0.006 +003V? * -3540 58Rho2CncBD+28 1666 76219 805112705I 084940.3+281833085539.7+275539197.50 38.26 5.22 +1.00 +0.75 +0.49 G8II-III -0.010-0.030 -.005+017V? < 19: * -3541 BD+17 1973 76221 98230 I X Cnc 084944.9+173643085522.9+171353210.18 34.94 6.64 +3.36 +1.37 C6II +0.001+0.009 +.007-001 * -3542 CD-51 3303 76230236362 W 084938.9-514503085240.8-520745270.80-04.83 6.39 0.00 -0.13 A0V -0.019+0.005 +018 1.6 2.8 * -3543 CP-79 352 76236256552 084936.0-790804084555.2-793016293.02-21.76 5.79 +1.60 +1.97 K5III -0.029+0.085 +007 -3544 CP-72 747 76270256556 084953.0-721032084950.3-723303287.05-17.65 6.11 +0.20 +0.17 Am -0.001+0.025 -003 -3545 BD+46 1459 76291 42612 085003.8+460055085650.0+453755174.71 40.52 5.74 +1.09 +1.06 +0.56 K1IV -0.126-0.034 +059V? -3546 BD+40 2125 76292 426112706 085001.1+403504085630.5+401206181.84 40.33 5.89 +0.35 +0.06 F3III -0.083-0.033 +025 53 * -3547 16Zet HyaBD+06 2060 76294117264 334I 085006.4+061934085523.6+055644222.34 30.20 3.11 +1.00 +0.80 +0.49 G9II-III -0.099+0.014 +.035+023 < 17 -3548 CD-39 4924 76304220628 085006.2-400404085350.7-402651261.95 2.81 6.47 +0.96 K0II-III+A5 -0.006+0.007 -001V -3549 CP-56 1918 76346236368 085024.3-561616085303.8-563858274.35-07.66 6.03 -0.02 -0.08 A0V -0.017+0.033 +024 -3550 60 CncBD+12 1941 76351 98235 I D 4308 085027.9+120030085555.6+113734216.45 32.85 5.41 +1.46 gK5 -0.010-0.010 +024V? * -3551 CD-47 4480 76360220636 W 085029.2-470824085350.7-473115267.37-01.74 5.33 +0.26 A9IV-V +0.006-0.028 +.019-001SB2 99 0.0 0.1 * -3552 17 HyaBD-07 2661 76369136408 7093B 085035.5-073515085529.5-075813235.69 23.01 6.91H A7m -0.001-0.038D+.004-020 50 0.3 4.1 * -3553 17 HyaBD-07 2661 76370136409 7093A 085035.5-073520085529.6-075816235.69 23.01 6.67H +0.22 +0.13 A2m +0.002-0.024D+.004-010 =< 25 0.3 4.1 * -3554 BD-17 2691 763761547451231I W 085036.7-175136085512.4-181429244.54 16.97 5.75 +1.32 K2-3III +0.020+0.004 +037V? 1.2 66.7 -3555 59Sig2CncBD+33 1785 76398 61146 085046.4+331743085656.6+325437191.30 39.55 5.45 +0.12 +0.12 A7IV -0.048-0.068 +.011+005 145 * -3556 Del PyxCD-27 6072 76483176697 7095 085114.1-271749085531.5-274055252.25 11.21 4.89 +0.11 +0.14 +0.05 A3IV +0.079-0.102 +.037+005 73 9.1 23.8 * -3557 BD+04 2081 76494117287 085122.2+043712085636.9+041412224.24 29.65 6.14 +1.00 +0.75 G8II-III -0.020+0.005 -012 -3558 BD+17 1979 76508 98245 085130.9+173143085708.2+170838210.46 35.30 6.17 +1.00 K1III -0.044-0.025 +019 -3559 CD-23 7902 765121767112707 085131.3-232612085555.9-234906249.22 13.69 6.39 +0.16 +0.12 A7V:n -0.040+0.038 +021 -3560 CP-59 1174 76538250369 085131.4-595824085348.7-602115277.32-09.92 5.78 -0.08 -0.55 B5III -0.007+0.002 +002 -3561 62Omi1CncBD+15 1945 76543 98247 085140.3+154223085714.9+151922212.53 34.64 5.20 +0.15 A5III +0.056+0.017 -005SB 89 -3562 CD-44 4951 76566220664 W IY Vel 085148.5-443933085519.3-450230265.64 0.05 6.26 -0.16 -0.63 B3IV +0.002+0.008 +022 5 6.5 35.0 * -3563 61 CncBD+30 1795 76572 61157 7107 085154.2+303705085758.7+301401194.76 39.26 6.29 +0.43 -0.02 F6V +0.055+0.024 +008 =< 10 0.0 0.1 * -3564 BD-16 2639 76579154773 I 4321 085155.5-161928085634.1-164234243.46 18.15 5.96 +1.54 K0 -0.010-0.047 +038 * -3565 63Omi2CncBD+16 1864 76582 98250 085200.1+155755085735.2+153453212.28 34.81 5.67 +0.20 F0IV +0.058+0.029 -004V? 113 -3566 BD+36 1889 76595 61161 085210.0+361118085827.5+354809187.63 40.29 6.51R -0.01 +0.01 A2V +0.008-0.011 -015 -3567 BD+09 2093 766291173012710 085218.4+094623085742.0+092316219.06 32.28 6.19 +0.98 +0.76 G8III -0.002-0.007 -014 -3568 CP-57 1790 76640236402 085222.5-575126085454.0-581424275.75-08.47 6.38 -0.11 -0.49 B5V -0.022+0.002 +013 119 -3569 9Iot UMaBD+48 1707 76644 42630 335I 7114 4329 085221.8+482604085912.4+480230171.51 40.84 3.14 +0.19 +0.07 +0.07 A7IV -0.444-0.226 +.075+009SB1O 151 7.2 3.9AB 4* -3570 CP-54 1925 76653236405 085221.5-543449085511.9-545756273.23-06.35 5.71 +0.48 0.00 F6V +0.037-0.082 -002 -3571 CP-60 1243 76728250374 336 W 085246.8-601545085502.8-603841277.65-09.98 3.84 -0.10 -0.45 -0.11 B8-9II -0.021+0.038 +025V 36 8.8 21.1 * -3572 65Alp CncBD+12 1948 76756 98267 337 7115 4327 085301.1+121442085829.2+115128216.51 33.52 4.25 +0.14 +0.15 +0.04 A5m +0.034-0.031 +.024-014SB 68 0.0 0.1 3* -3573 BD+02 2112 767571173112712 W 085258.1+015540085808.2+013230227.14 28.65 6.59 +0.06 +0.09 A2V -0.040-0.005 +026 5.5 2.5 -3574 CP-52 1788 76805236417 W 085318.1-522020085619.4-524325271.62-04.79 4.69 -0.12 -0.47 -0.14 B5V 0.000+0.007D+.020+022SB1O 48 3.0 2.8 * -3575 64Sig3CncBD+32 1821 76813 611771232I W 085324.2+324826085932.6+322507192.05 40.01 5.20 +0.93 G8III -0.045-0.035 +023 3.8 89.3 * -3576 8Rho UMaBD+68 551 76827 14742 338I 4344 085331.9+680110090232.7+673747146.63 37.23 4.76 +1.53 +1.88 +1.26 M3III-IIIbCa1 -0.021+0.019 +.014+005V -3577 BD+18 2093 76830 98276 I 4332 085331.9+183127085910.8+180805209.54 36.11 6.38 +1.55 +1.69 M4III v-0.044-0.068 -.002+021V? -3578 BD-15 2656 769321548042713 085402.3-154504085843.9-160758243.30 18.91 5.86 +0.53 +0.08 +0.23E F6V +0.246+0.212 +.028+121V 0 -3579 BD+42 1956 76943 42642 339I W 085409.0+421044090038.4+414658179.80 41.19 3.97 +0.44 +0.05 +0.22 F5V -0.440-0.246 +.070+026SBO 26 2.0 0.3AB 5* -3580 BD+38 1986 76944 61191 I 085409.4+375936090030.8+373616185.33 40.90 6.44R K5 -0.007 0.000 -017 -3581 BD+84 196 76990 14611640 085432.3+843459091521.2+841052128.39 30.44 6.33 +0.30 +0.10 F2III +0.027+0.015 -006SB2 -3582 CP-58 1301 770022364361233 W A V376 Car 085431.6-585035085658.4-591346276.70-08.90 4.92 -0.19 -0.77 -0.24 B2IV-V -0.009+0.007 +027 0 1.9 40.2 * -3583 CD-48 4282 77020220703 085436.5-481109085755.8-483424268.62-01.90 5.87 +1.07 +0.88 G8-K0II +0.004-0.004 +018 -3584 BD-18 2536 77084154815 085505.8-184858085939.9-191229246.01 17.22 6.18 +0.46 F6V -0.051-0.098 +020V -3585 CD-28 6793 77087176789 085501.0-282504085915.7-284822253.67 11.13 6.25 +1.00 G8III -0.061+0.015 +025 -3586 BD+40 2138 77093 61203 085514.1+400624090140.6+394248182.56 41.29 6.36 +0.30 +0.04 A9Vn -0.053-0.079 -008 150 -3587 66 CncBD+32 1829 77104 61202 7137 085516.2+323835090124.1+321509192.36 40.36 5.82R 0.00 +0.09 A2V -0.004+0.003 -013V 2.3 4.6AB 3* -3588 CD-46 4810 77140220717 W FZ Vel 085528.5-465050085852.3-471405267.71-00.90 5.18 +0.25 +0.19 Am -0.086+0.054 +.013+018 57 6.0 24.2 * -3589 67 CncBD+28 1674 77190 80585 W 085551.2+281748090148.9+275410197.94 39.58 6.07 A8Vn -0.056-0.076 +012SB 166 2.8 103.5 * -3590 BD+06 2087 77250117351 085614.5+060158090131.4+053827223.50 31.40 6.07 +1.11 +1.02 K1II-III+F3IV -0.028-0.007 +033 1.6 269.0 * -3591 CD-40 4810 772582207301234 4346 085621.4-405151090005.4-411514263.33 3.18 4.45 +0.65 +0.38 +0.41 G8-K1III+A -0.039+0.045 +.030-007SB1O 0 * -3592 BD+54 1272 77309 27105 340 085640.9+544041090400.4+541702163.20 40.86 5.75 +0.02 +0.05 A2V -0.003+0.004 -004V 110 -3593 CD-42 4875 77320220738 IU Vel 085643.6-424658090022.2-431024264.82 1.96 6.07 -0.16 -0.82 -0.12 B2.5Vn t-0.015+0.019 +027V 230 * -3594 12Kap UMaBD+47 1633 77327 42661 341 7158 4357 085648.0+473308090337.5+470924172.63 41.63 3.60 0.00 +0.01 +0.01 A1Vn -0.033-0.054 +.016+004V? 219 0.2 0.3 * -3595 69Nu CncBD+25 2029 77350 805952714 4356 085653.5+245047090244.3+242710202.31 38.90 5.45 -0.04 -0.10 -0.04 A0pSi v-0.005-0.006 +.003-015SBO 23 * -3596 BD+00 2449 773531365111235 085651.4-000531090158.0-002858229.68 28.43 5.67 +1.15 +1.04 K0III -0.048+0.069 +073V -3597 CD-26 6647 77361176833 085651.1-261613090111.4-263950252.26 12.83 6.20 +1.13 K1IIICNII +0.026-0.056 -024V? -3598 CP-58 1327 77370236475 W 085656.8-584203085924.1-590501276.79-08.57 5.16 +0.42 F3V -0.174+0.280 +.054+011 66 6.8 26.2 * -3599 BD+07 2066 77445117369 085725.1+074132090244.8+071753221.94 32.44 5.85 +1.11 +0.98 gK3 -0.016-0.005 +027 -3600 CD-41 4720 77475220760 IZ Vel 085737.9-412818090120.8-415152263.95 2.96 5.55 -0.14 -0.58 B5V -0.023+0.005 +021SB 0 * -3601 70 CncBD+28 1683 77557 80609 085812.3+281739090409.9+275354198.10 40.08 6.38R 0.00 +0.05 A1V +0.001-0.002 -021V 180 -3602 CD-38 5154 77580199902 085816.4-390032090206.4-392409262.19 4.69 6.27 +1.00 K1III-IV -0.037+0.023 +018 -3603 BD+49 1801 77601 42682 085830.1+485540090524.1+483149170.76 41.83 5.95 +0.45 +0.17 F6II-III -0.012-0.016 -006SB 139 * -3604 CP-60 1283 77615250417 085827.6-603415090045.7-605750278.35-09.65 5.79 +1.21 G8II -0.006 0.000 +018 -3605 CD-51 3430 77653236518 W 085838.2-514742090144.6-521118271.75-03.81 5.23 -0.12 -0.45 B9Si -0.007+0.018D+.008+032 0 1.2 0.9 -3606 BD+32 1837 77660 61242 085848.3+324632090455.2+322237192.36 41.12 6.46 +0.24 +0.10 A8V -0.043-0.058 +016 131 -3607 CD-25 6829 77665176881 085846.0-250631090308.8-253016251.63 13.90 6.74 -0.03 B8 -0.014-0.006 +027 -3608 BD+59 1217 77692 271212716 085857.2+594436090643.1+592040156.59 40.15 6.45 +0.04 +0.13 A2V -0.014-0.010 +002SB 55 -3609 11Sig1UMaBD+67 573 77800 14769 I 085937.0+671630090823.6+665224147.27 38.03 5.14 +1.51 +1.83 +0.83 K5III -0.018-0.038 +.011+015SB < 19: -3610 CP-68 879 77887250421 090000.0-681721090108.5-684102284.45-14.56 5.88 +1.63 +1.97 M1III +0.012+0.005 +013 -3611 CP-53 2072 77907236542 090004.3-530914090305.2-533259272.91-04.56 6.40 -0.09 -0.35 B6V -0.024+0.030 -007 -3612 BD+39 2200 77912 612541237I 090010.2+385107090631.8+382708184.33 42.15 4.56 +1.04 +0.82 +0.49 G7Ib-II -0.028-0.014 +.021+017V? < 19: * -3613 18Ome HyaBD+05 2116 779961174202717I 090042.5+052931090558.4+050532224.69 32.11 4.97 +1.22 +1.21 +0.57 K2II-III -0.018-0.010 +.011+025V < 19: -3614 CD-46 4883 78004220803 342 090042.3-464158090409.3-470552268.20-00.14 3.75 +1.20 +1.22 +0.60 K2III -0.044-0.013 +.020+024 -3615 Alp VolCP-65 1065 78045250422 343 090052.1-655948090226.8-662346282.71-13.00 4.00 +0.14 +0.13 +0.06 A2-3IVm -0.002-0.096 +.051+005SB2 45 * -3616 13Sig2UMaBD+67 577 78154 14788 7203 4392 090135.8+673226091023.2+670805146.87 38.11 4.80 +0.49 +0.02 +0.28 F6IV -0.020-0.074 +.056-002 0 3.5 2.8AB 3* -3617 BD+23 2048 78175 80643 7187A 090141.1+232256090726.9+225852204.53 39.51 6.40 F4V -0.168+0.009 +.004+029 0.4 7.6AB 3* -3618 BD+02 2145 781961174322718I 090149.9+015152090659.9+012746228.52 30.51 6.17 +1.65 +1.96 +0.97E M1III -0.011-0.015 +003 -3619 15 UMaBD+52 1365 78209 271362721 090149.1+520030090852.3+513617166.57 42.02 4.48 +0.27 +0.12 +0.11 F0IVm vs -0.137-0.030 -000 37 * -3620 BD+33 1810 78234 61276 090158.0+325636090804.1+323226192.28 41.80 6.50 +0.36 0.00 F2V -0.084-0.017 +041 -3621 72Tau CncBD+30 1817 78235 806502719 090159.9+300323090800.1+293915196.07 41.28 5.43 +0.89 +0.57 +0.45 G8III -0.032+0.002 -013V? < 19: -3622 CP-57 1859 78293236578 W 090207.9-572712090448.0-575109276.31-07.23 6.44 +0.25 +0.19 A8III -0.026+0.025 +015 3.6 3.3 * -3623 76Kap CncBD+11 1984 78316 983781238 D Kap Cnc 090219.8+110415090744.8+104005218.99 35.06 5.24 -0.11 -0.43 B8IIIpMn -0.020-0.010 +024SB1O 9 0.2 0.3 3* -3624 14Tau UMaBD+64 723 78362 147962727 7211 090240.6+635514091055.1+633049151.21 39.42 4.67 +0.35 +0.15 +0.13 F3-4IIIm vs +0.098-0.056 -009SBO 18 6.2 57.2AB 3* -3625 BD+34 1949 78366 612882723 090242.9+341720090851.1+335256190.53 42.16 5.93 +0.60 +0.04 F9V -0.187-0.114 +027V 5 * -3626 75 CncBD+27 1715 78418 806592724 W 090254.4+270235090847.3+263745200.03 40.78 5.98 +0.66 +0.20 G5IV-V -0.136-0.368 +.040+013SB2O 3.1 112.0AB 3* -3627 77Xi CncBD+22 2061 78515 806661239 W 090336.6+222700090921.5+220244205.86 39.65 5.14 +0.97 +0.80 +0.48 G9IIIFe-1CH-0.5 +0.001+0.005 -007SB1O < 17 0.5 0.1 * -3628 Kap PyxCD-25 6895 78541177002 I 7202 4389 090339.4-252718090802.9-255130252.64 14.52 4.58 +1.59 +1.89 +0.90 K4III +0.041+0.008 +.013-045 5.2 2.1 -3629 CP-55 1957 78548236611 090341.7-552401090634.0-554812274.93-05.68 6.11 -0.15 -0.67 B2IV-V -0.012-0.023 +029 202 -3630 19 HyaBD-08 2588 785561366042725 W 090348.5-081106090842.2-083522238.29 25.34 5.60 -0.06 -0.19 B9.5III -0.019-0.002 +023SB 172 5.0 1.0 -3631 CD-50 3849 785992366182722 090401.2-504831090714.7-511243271.59-02.52 6.73 +1.62 +1.87 K4III -0.004 0.000 +007V -3632 CP-63 1093 78632250441 090411.8-640553090607.6-642959281.49-11.49 6.37 +1.35 +1.58 K3III +0.020+0.029 +001 -3633 BD+72 444 78633 67842729 090419.8+720358091403.2+713921141.50 36.59 6.55 +0.96 +0.75 G8III-IV -0.028-0.038 +006 -3634 Lam VelCD-42 4990 78647220878 345I'W Lam Vel 090419.0-430144090759.8-432557265.94 2.82 2.21 +1.66 +1.81 +0.94 K4.5Ib-II e-0.019+0.013 +.022+018 12.6 18.2 * -3635 BD+12 1979 78661 98400 090420.3+115818090946.4+113352218.25 35.90 6.48 +0.34 -0.10 F2Vp -0.045-0.062 -016 53 -3636 BD-11 2565 786681549531240 090423.8-115709090911.5-122128241.70 23.21 5.77 +0.94 G6III +0.019+0.003 -009SB -3637 CD-26 6766 786761770222726 090422.4-262147090843.5-264604253.46 14.05 6.15 +0.17 A4IV -0.045+0.009 +008V? -3638 BD-17 2765 78702154950 090427.3-175526090904.3-181943246.74 19.51 5.73 0.00 +0.01 A2Vn -0.052+0.009 +017V? -3639 BD+31 1946 78712 61306 I RS Cnc 090436.2+312214091038.7+305747194.50 42.08 5.95 +1.67 +1.03 +2.33 M6IIIase -0.021-0.034 +014V * -3640 79 CncBD+22 2063 78715 80674 W 090436.2+222409091020.9+215947206.01 39.86 6.01 +0.90 G5III +0.005+0.006 -007V 0.0 0.1 * -3641 20 HyaBD-08 2593 78732136622 090442.1-082254090935.5-084716238.61 25.40 5.46 +1.01 +0.78 G8II -0.019-0.010 +026V? -3642 CP-70 861 78764256583 V345 Car 090449.5-700810090538.3-703220286.19-15.43 4.71 -0.15 -0.81 -0.14 B2IVe -0.008-0.005 +019V 140 * -3643 CP-72 779 787912565822720 090453.0-721201090508.8-723610287.83-16.77 4.48 +0.61 +0.22 +0.31 F9II -0.013-0.005 +.024+022 53 -3644 Eps PyxCD-29 7194 789222000471241 W 090542.1-295726090956.4-302155256.42 11.88 5.59 +0.19 +0.16 +0.07 A4IV-V +0.002-0.048 -008SB 129 4.3 17.6AxBC 4* -3645 BD+73 452 78935 6792 090550.3+732136091552.6+725646139.99 36.14 5.96 +0.18 +0.13 F0III -0.085-0.063 +.023+000V? 90 -3646 BD-22 2512 789551770662728 090554.5-224610091023.0-231036250.88 16.66 6.53 0.00 A1-2V: -0.029+0.010 +014V -3647 CD-48 4471 79025220910 090623.2-490058090945.1-492529270.54-01.02 6.48 +0.17 A9Vn +0.014-0.041 -001 * -3648 16 UMaBD+62 1058 79028 148192730 W 090626.4+615007091420.6+612524153.62 40.47 5.13 +0.58 +0.10 F9V -0.006-0.030 +.047-014SBO 0 * -3649 BD+06 2120 79066117487 090639.9+055242091155.6+052806225.15 33.59 6.35 +0.32 +0.01 A9IVDel Del -0.101-0.025 +003 -3650 81Pi 1CncBD+15 2003 79096 98427 W 090649.2+152357091217.6+145946214.66 37.86 6.51 +0.73 +0.25 +0.38 G9V -0.522+0.248 +.064+045V 0.0 0.1AP 4* -3651 BD+04 2139 79108117492 090659.4+041637091212.9+035202226.86 32.86 6.14 -0.01 +0.01 A0Vp -0.044-0.001 +020V 150 * -3652 36 LynBD+43 1893 79158 42759 346 090715.9+433748091348.2+431304177.86 43.61 5.32 -0.14 -0.48 B8IIIpMn -0.028-0.032 +021V 29 * -3653 BD-19 2644 791811549891242 090723.9-192020091158.7-194452248.37 19.15 5.73 +0.98 G9III -0.057+0.046 -001V? -3654 CD-44 5206 79186220928 GX Vel 090726.6-442731091104.4-445205267.36 2.25 5.00 +0.23 -0.57 +0.22 B5Ia -0.001+0.002 +034V? 61 * -3655 21 HyaBD-06 2845 79193136662 KW Hya 090729.7-064159091226.0-070635237.55 26.95 6.11 +0.22 +0.12 +0.12 A3III:m+A0V: -0.016+0.019 -004SBO < 12 * -3656 CD-38 5358 79241200084 090747.1-385057091141.0-391532263.33 6.16 6.00 -0.11 B6V -0.010+0.006 +019V -3657 BD+21 1991 79248 80702 090754.6+214143091337.3+211700207.20 40.36 6.48 +0.02 +0.06 A2V -0.016-0.008 +009 -3658 CD-46 4987 79275220937 090800.9-461026091133.2-463502268.68 1.14 5.79 -0.21 -0.84 -0.12C B2III/IV -0.018+0.010 +007 -3659 CP-58 1419 79351236693 V357 Car 090820.0-583326091058.0-585801277.69-07.37 3.44 -0.19 -0.70 -0.19 B2IV-V e-0.026+0.008 +023SB2O 30 * -3660 17 UMaBD+57 1211 79354 27185 I 4427 090825.4+570922091549.9+564429159.52 41.98 5.27 +1.56 +1.87 +0.88 K5III -0.016-0.031 -030V? < 19: -3661 CD-43 5041 79416220952 W KL Vel 090848.5-431207091230.6-433649266.63 3.30 5.57 -0.11 -0.47 -0.06C B8Vp:Si: -0.012+0.002D+.005+015V? 384 0.7 2.8ABxC 3* -3662 18 UMaBD+54 1285 79439 271912734 DD UMa 090859.6+542606091611.3+540119163.08 42.66 4.83 +0.19 +0.08 +0.09 A5V +0.049+0.061 +.042-019SB 157 * -3663 CP-61 1201 79447250471 090900.4-615424091116.6-621902280.22-09.61 3.97 -0.18 -0.67 -0.18 B3III v-0.043+0.009 +018 21 * -3664 BD+35 1966 79452 61361 W 090906.0+350246091514.3+343801189.73 43.56 5.97 +0.86 +0.37 +0.47 G6III -0.148+0.053 +056 3.5 150.6 -3665 22The HyaBD+02 2167 79469117527 347 7253 4425 090909.7+024411091421.9+021851228.77 32.53 3.88 -0.06 -0.12 -0.05 B9.5V +0.129-0.310 +.027-010SB 81 7.7 27.1AB 4* -3666 BD+74 393 79517 6816 090937.0+742612091955.8+740059138.66 35.89 6.50R G8III -0.037-0.067 +056 -3667 CD-38 5376 79523200119 4423 090929.5-381211091325.9-383659263.09 6.85 6.31 0.00 +0.01 A0V +0.008-0.012 +004 -3668 CD-41 4904 79524220962 090932.3-415144091318.6-421625265.75 4.32 6.29 +1.25 K2III -0.017+0.054 +029 -3669 82Pi 2CncBD+15 2009 79554 984562733I 090942.6+152123091513.8+145629215.07 38.49 5.34 +1.32 +1.33 K1III -0.044-0.012 +026 * -3670 CD-46 5010 79621220965 091003.7-465531091334.5-472019269.46 0.87 5.92 -0.05 -0.10 -0.01C B9Ve v-0.016+0.003 +019 * -3671 NGC 2808 * -3672 CD-43 5068 796942209722731 4428 091027.1-434355091408.2-440845267.21 3.14 5.85 -0.12 -0.50 -0.06C B5/6IV/V -0.019+0.014 +022V 260 * -3673 CP-58 1432 79698236723 091018.5-590004091255.6-592452278.19-07.49 5.54 +0.85 G6II 0.000 0.000 +016 -3674 CD-42 5086 79735220978 W 091040.5-424847091424.5-431339266.58 3.81 5.25 -0.14 -0.56 -0.07C B4V -0.021+0.010 +.011+015V? 201 4.1 5.8 * -3675 BD-14 2793 79752155032 4431 091041.2-143632091524.9-150129245.00 22.77 6.35 +0.02 0.00 A0V -0.026-0.014 +032V? 148 -3676 BD+47 1658 79763 427902738 091048.7+471403091731.2+464902172.82 44.02 5.97 +0.04 +0.05 A1V +0.017+0.014 -012SBO 53 * -3677 CD-37 5578 79807200152 091057.8-371112091457.2-373609262.55 7.76 5.86 +0.83 G0V +0.011-0.013 -002 -3678 Zet OctCP-85 183 79837258515 918 091114.3-851547085641.1-853947298.85-24.81 5.42 +0.31 +0.07 A8-9IV -0.117+0.037 -004 81 -3679 CP-55 2035 798462367492736 4429 091120.0-550919091418.0-553411275.50-04.72 5.27 +0.99 G8II-III -0.035+0.027 +.015+009 * -3680 CD-45 4982 79900220998 W 091137.2-450821091514.6-453320268.37 2.31 6.25 -0.08 -0.26 -0.02C B8V -0.003-0.010D+.006+033 0.9 0.8 * -3681 23 HyaBD-05 2762 799101367252739I W 091143.7-055609091641.7-062111237.54 28.25 5.24 +1.17 +1.22 K2III +0.024+0.006 +.008-008SB1O < 19: 5.6 1.6 * -3682 CD-38 5408 799172001592737 091140.2-380911091536.7-383412263.35 7.19 4.94 +1.11 +1.06 +0.57 K0III -0.068-0.013 +.027+002 -3683 24 HyaBD-08 2623 79931136728 091147.4-081938091641.3-084441239.73 26.85 5.47 -0.09 -0.30 B9III -0.020+0.004 +010V? 121 -3684 CD-36 5505 79940200163 W 091144.9-365946091545.1-372448262.52 8.00 4.62 +0.45 +0.10 +0.28 F5III +0.026-0.010 +.064+006SB 100 9.8 11.3 -3685 Bet CarCP-69 1023 80007250495 348 091206.2-691819091312.0-694302285.98-14.41 1.68 0.00 +0.03 +0.02 A2IV v-0.162+0.108 +.021-005V? 133 * -3686 BD+35 1971 80024 61387 7286 091216.0+354702091826.0+352151188.81 44.28 5.75R A8V -0.041-0.024D+.005+022V 126 0.2 1.8 -3687 BD-13 2808 80050155060 091223.0-140920091707.5-143425244.90 23.37 5.84 +1.06 +0.90 gK0 -0.048+0.012 -037 -3688 CD-44 5305 80057221010 W 4436 091224.2-442853091604.2-445355268.00 2.87 6.04 +0.28 -0.13 +0.22C A1Ib +0.017+0.009 +026 8.0 6.8 * -3689 BD+12 2009 80064 98476 7285 091225.8+115512091751.4+113004219.39 37.66 6.41 +0.07 +0.11 A2IV -0.012-0.003 -007SB 60 5.9 21.8 * -3690 38 LynBD+37 1965 80081 61391 7292 091237.3+371333091850.7+364809186.81 44.47 3.82 +0.06 +0.06 +0.03 A3V -0.030-0.122 +.042+004SB 165 2.1 2.7AB 4* -3691 CP-57 1949 80094236772 Var? 091233.2-575817091517.5-582319277.65-06.57 6.02 -0.10 -0.43 -0.11 B7IV -0.022-0.006 +016V * -3692 CD-43 5103 80108221014 4437 091241.2-435052091623.1-441557267.58 3.35 5.12 +1.67 +1.94 +0.79C K3Ib +0.002-0.001 +.017-003 * -3693 CP-57 1951 80126236777 091245.7-570938091535.0-573441277.09-05.98 6.32 +1.04 G8II +0.003-0.003 +015 -3694 CD-38 5430 80170200185 091301.8-385855091657.2-392405264.14 6.80 5.33 +1.17 K5III-IV -0.009-0.031 +.027-000V * -3695 CP-76 574 801942565942735 091313.9-761448091212.3-763947291.43-18.99 6.14 +1.09 +0.99 K1III +0.031-0.044 +001 -3696 CP-57 1961 80230236787 4440 091322.6-570722091612.2-573229277.12-05.89 4.34 +1.63 +1.98 +1.03 M1III -0.014-0.007 +.025-005 -3697 BD+51 1495 80290 27215 7303 091347.4+514103092043.8+511558166.60 43.90 6.13 +0.42 -0.11 F3V -0.035+0.150 +.036-008 4.0 142.1AC 3* -3698 BD+57 1214 80390 272192743I CG UMa 091422.9+570723092143.3+564157159.29 42.77 5.47 +1.61 M4IIIa -0.010-0.008 +021V * -3699 Iot CarCP-58 1465 80404236808 351 4444 091424.8-585120091705.4-591631278.46-07.01 2.25 +0.18 +0.16 +0.20 A8Ib -0.020+0.008 +.017+013 0 * -3700 CP-53 2281 80435236819 091437.0-540428091742.3-542943275.07-03.63 6.33 +1.41 K3III -0.018-0.004 -009 -3701 BD+38 2025 80441 61411 7307 091443.5+383643092059.3+381118184.89 44.96 6.12 +0.38 -0.06 F2V+F4V -0.044-0.013D+.018+001V? =< 10: 0.3 1.2AB 3* -3702 BD-10 2804 80447155090 091444.0-105335091933.7-111851242.49 25.86 6.62 +0.08 A2V s -0.084+0.036 +029 -3703 CD-50 4001 80456236824 091446.1-503749091805.8-510304272.64-01.18 5.26 -0.07 -0.38 B7-8III -0.023+0.008 +057SB -3704 BD-15 2763 80479155091 I 7302 091449.9-152440091933.2-155004246.36 23.03 5.78 +1.29 +1.39 K4III +0.052-0.046 -030V? 5.0 4.1 * -3705 40Alp LynBD+35 1979 80493 61414 352I 4456 091457.8+344856092103.3+342333190.24 44.73 3.13 +1.55 +1.94 +0.90 K7IIIab e-0.221+0.019 +.025+038 * -3706 26 HyaBD-11 2609 804991550962741I W 091457.3-113310091946.4-115830243.10 25.49 4.79 +0.93 +0.64 +0.47 G8III -0.030+0.015 +.023-002V < 19: 7.5 3.4 -3707 BD+33 1848 80546 61424 091523.3+331937092127.2+325407192.33 44.64 6.16 +1.09 +1.04 K3III +0.011-0.035 +028 -3708 CD-51 3693 80558236837 4454 091524.1-510819091842.2-513338273.07-01.47 5.87 +0.54 -0.38 B6Iae -0.014 0.000 +022 73 * -3709 27 HyaBD-08 2643 80586136768 I 7311A 091536.0-090753092029.0-093321241.08 27.11 4.80 +0.93 +0.67 +0.44 G8III-IV+F5V -0.014-0.029 +.022+025SB < 19: 1.9 231.8AB 3* -3710 CD-33 5973 805902002412742 091539.0-334048091947.9-340612260.66 10.88 6.39 -0.10 B8V -0.010-0.007 +026 -3711 BD+15 2027 80613 98517 091544.1+154745092115.4+152216215.29 40.00 6.53 -0.01 +0.03 A1V -0.036-0.015 +018 130 -3712 CP-68 918 80671250526 W 091553.5-681603091717.2-684122285.44-13.45 5.39 +0.42 -0.03 F4V -0.109-0.020 +.058+032 0 0.0 0.1AB 3* -3713 CP-66 1002 80710250529 091608.3-663746091751.7-670303284.25-12.30 6.11 +1.26 +1.10 K2III -0.003+0.014 +001V -3714 BD-14 2828 807191551142744 091611.5-151126092055.5-153704246.41 23.42 6.33 +0.46 +0.02 dF6 +0.065-0.107 -001SB -3715 CD-31 7162 80773200258 W 091630.2-312009092044.2-314538259.07 12.64 6.82 0.00 -0.04 B9.5V -0.034-0.011 +018V? 0.8 2.9 * -3716 CD-37 5668 80774200257 091628.5-370924092029.6-373453263.30 8.57 6.05 +1.39 K3/4III -0.017-0.018 +007 -3717 CP-54 2186 80781236851 091629.1-544547091932.6-551112275.75-03.92 6.28 -0.10 -0.57 -0.06 B5V -0.004 0.000 +013 53 * -3718 The PyxCD-25 7114 808741773221243I 091703.9-253223092129.6-255756254.81 16.72 4.72 +1.63 +2.02 +1.08 M1III -0.011-0.008 +.010+020 -3719 BD+75 377 80930 68582749 091721.3+753143092751.6+750554137.18 35.80 6.29 +0.07 +0.11 A5V s -0.014+0.015 +001 55 -3720 CP-74 579 80951256599 W 091736.1-742821091725.4-745340290.24-17.59 5.29 +0.02 +0.04 A1V -0.015+0.030 +011 0 0.5 0.2AB 4* -3721 CP-74 580 80950256600 091735.3-741846091727.4-744405290.11-17.49 5.86 -0.02 -0.04 A0V -0.041+0.033 -3722 BD+64 733 80953 14875 I 091741.2+642216092544.2+635627149.91 40.80 6.28 +1.46 +1.74 K2III -0.008-0.041 +007 -3723 BD+25 2088 80956 80797 091744.6+253637092331.8+251059203.02 43.64 6.41 +0.82 +0.52: G5IV -0.121+0.005 -001V -3724 BD-09 2816 81009136799 7334 KU Hya 091758.2-092440092250.9-095020241.74 27.40 6.53 +0.22 +0.11 A5pSrCrEu -0.027-0.021 +023 < 10 0.1 0.1AB 3* -3725 BD+52 1389 81025 27246 7348 091759.6+520010092455.7+513426166.00 44.47 6.31 +0.75 G2III +0.041-0.005 -016SB 2.2 1.4 * -3726 CD-41 5023 81034221103 091800.4-414601092150.9-421142266.80 5.51 5.58 +1.63 +1.94 M1III +0.053-0.060 +049 -3727 BD+37 1978 81039 614562748 091811.8+370059092422.5+363513187.21 45.57 6.67 +0.21 +0.10 F0V -0.068-0.024 +015 -3728 CP-61 1242 811012505442745 091832.7-615842092056.8-622417281.06-08.85 4.81 +0.94 +0.62 +0.54 G6III -0.013+0.002 +.017+051 -3729 CD-39 5446 81134200299 091840.6-392058092236.7-394629265.17 7.32 6.54 +1.13 K1III -0.063+0.074 +023 -3730 CD-45 5099 811362211092746 4473 091844.8-453714092224.0-460251269.60 2.86 5.75 +0.92 +0.65 +0.43C G6-8III +0.004+0.027 -007 * -3731 1Kap LeoBD+26 1939 81146 808071244I 7351 4478 091849.9+263646092439.3+261056201.76 44.13 4.46 +1.23 +1.31 +0.63 K2III -0.033-0.048 -.003+028 < 19: 5.1 2.5AB 3* -3732 CP-54 2213 81157236887 091847.3-550523092150.0-553054276.21-03.92 5.63 +0.19 +0.11 A3IV s: -0.065+0.060 +059 34 -3733 Lam PyxCD-28 7196 811691773742747I 091852.4-282422092312.3-285002257.26 15.04 4.69 +0.92 +0.63 +0.47 G8.5IIICN-1.5* -0.123+0.019 +.038+010 * -3734 Kap VelCP-54 2219 81188236891 353 091901.0-543501092206.8-550039275.88-03.54 2.50 -0.18 -0.75 -0.19 B2IV-V -0.008+0.009 +.013+022SBO 49 * -3735 CD-37 5721 81309200320 091943.6-371942092344.8-374526263.89 8.90 6.48 +0.18 A1mA5-F0 -0.083+0.017 +020 -3736 BD+17 2078 81361 985612750 092000.1+170102092532.5+163508214.32 41.41 6.29 +0.97 gG9 -0.084-0.025 +.016+012V -3737 CD-38 5541 81411200330 W 092018.0-385941092416.3-392533265.15 7.80 6.06 +0.20 +0.10 +0.12 A7V: +0.012-0.036 +008V 0.0 0.1 * -3738 28 HyaBD-04 2616 814201368321245I 092024.0-044110092524.0-050703237.84 30.73 5.59 +1.52 +1.82 K5III -0.012-0.008 +005V * -3739 CD-51 3767 81471236930 092038.8-511825092359.5-514414273.78-01.01 6.08 +0.57 +0.37 A7Iab +0.013-0.002 +018 62 * -3740 CP-59 1374 81502250561 092047.7-595221092327.4-601809279.76-07.16 6.30 +1.48 +1.68 K1-2II-III -0.005-0.004 +022V? -3741 BD-00 2195 81567136844 092116.8-010153092622.3-012750234.48 33.03 6.01 +1.32 +1.44 K2IIIb -0.001-0.003 -015 -3742 CP-61 1265 81613250563 092133.5-611300092405.7-613856280.78-08.06 5.99 +1.06 K0III +0.016-0.051 -008 -3743 BD+46 1509 81688 428762751 W 092206.8+460223092840.0+453605174.22 46.07 5.41 +0.98 +0.74 K0III-IV -0.007-0.128 +039 2.5 77.3AB 3* -3744 29 HyaBD-08 2678 81728136861 7382 092220.7-084723092714.6-091325241.94 28.63 6.54 +0.05 +0.02 A2V -0.029+0.001 +030 0.0 0.3AB 3* -3745 CD-28 7271 81753177461 7379 4492 092223.3-282114092644.8-284715257.78 15.63 6.10 -0.10 -0.55 B6Ve v-0.027-0.001D+.005+004V 0.7 0.5 * -3746 CD-39 5507 81780221167 092232.0-400406092628.5-403007266.22 7.33 6.20 +0.25 A7III +0.025+0.002 -003V -3747 BD+56 1388 81790 27271 092238.8+561057092947.6+554444160.10 44.12 6.45R F3V s -0.132-0.033 +010 -3748 30Alp HyaBD-08 2680 81797136871 354I W 4496 092240.4-081330092735.2-083931241.49 29.05 1.98 +1.44 +1.72 +0.77 K3II-III -0.014+0.033 +.022-004V? < 17 7.5 283.1AB 3* -3749 BD-21 2802 81799177469 I 092243.7-215418092718.4-222038252.94 20.14 4.69 +1.14 +1.15 +0.56 K2.5III +0.180-0.161 +.030+029 -3750 BD-05 2802 81809136872 W 092249.5-053803092746.8-060416239.15 30.65 5.38 +0.64 +0.13 G2V -0.224-0.074 +.038+054SB2O=< 10 0.8 0.2 * -3751 BD+81 302 81817 1551 910 092251.2+814607093705.2+811935130.65 32.65 4.29 +1.48 +1.72 +0.74 K3IIIa -0.019-0.014 +.017-005V < 19: -3752 CP-61 1271 81830250575 W 092257.8-613108092527.1-615701281.11-08.16 5.77 +0.15 +0.13 A4V -0.129+0.061 +012 4.5 8.7 * -3753 CP-52 2360 81848236972 092302.7-525643092618.1-532245275.18-01.94 5.11 -0.11 -0.50 B6V -0.008 0.000 +024SB 201 * -3754 2Ome LeoBD+09 2188 81858117717 7390 092306.1+092932092827.5+090324223.66 38.90 5.41 +0.60 +0.14 F9V +0.055-0.004 +.034-006SBO 0.7 0.5 * -3755 3 LeoBD+08 2226 818731177182752 7391 092309.7+083729092829.2+081118224.64 38.50 5.71 +1.04 +0.90 K0III -0.027-0.030 +022V 5.3 25.2 * -3756 CD-34 5895 81919200392 W 092329.2-343418092738.4-350028262.47 11.40 6.65 +0.20 A3 -0.028-0.031 -028V 0.1 0.1 -3757 23 UMaBD+63 845 81937 14908 355I 7402 4506 092338.9+632957093131.7+630343150.64 41.74 3.67 +0.33 +0.10 +0.18 F0IV +0.109+0.028 +.041-010V 140 5.6 22.8AB 3* -3758 BD-00 2201 81980136894 7396 092356.9-004913092902.2-011525234.73 33.70 6.27 +0.27 +0.11 F0Vn -0.073+0.001D+.012+000 176 5.0 1.3 -3759 31Tau1HyaBD-02 2901 81997136895 W 092404.3-021955092908.9-024608236.23 32.86 4.60 +0.46 0.00 +0.22 F6V +0.130-0.015 +.072+010V? 28 3.0 65.7 * -3760 BD-01 2268 82043136899 092420.3-014605092924.5-021219235.72 33.23 6.14 +0.22 +0.16 F0III -0.046-0.003 +016V -3761 CP-64 1037 82068250583 092434.1-642946092644.2-645547283.34-10.17 6.05 +0.15 +0.10 A3Vn -0.056+0.063 +008 -3762 BD-03 2693 82074136900 092431.1-034828092932.4-041450237.72 32.08 6.26 +0.84 +0.40 G6IV -0.029-0.080 -012 -3763 BD-20 2915 82077177521 I 092436.4-201844092912.6-204455252.00 21.54 5.66 +1.60 +1.85 M1III -0.017+0.022 -008SB -3764 7 LMiBD+34 1999 82087 615292755 W 092440.7+340543093043.2+333920191.56 46.65 5.85 +1.05 gG8 -0.020-0.049 +002V 3.3 62.8AB 3 -3765 Eps AntCD-35 5724 82150200416 356 092507.0-353050092914.7-355705263.39 10.96 4.51 +1.44 +1.68 +0.76 K3IIIa -0.022+0.001 +.005+022SB -3766 CD-37 5817 82165200419 092514.6-375757092916.3-382414265.13 9.21 6.19 +0.22 A7Vn -0.085-0.013 +001 -3767 BD-22 2623 82180177541 I 092517.8-225426092949.9-232043254.14 19.89 6.24 +1.57 +1.83 K0 -0.002-0.003 -000V -3768 22 UMaBD+72 462 82189 6898 Var 092527.9+723859093453.6+721220139.93 37.74 5.72 +0.48 -0.01 F7V +0.075-0.077 -038 * -3769 8 LMiBD+35 2015 82198 61540 I 4510 092527.3+353244093132.4+350611189.47 46.93 5.37 +1.53 +1.81 M1IIIab -0.056-0.102 +038 -3770 CD-26 7117 82205177546 I 7405 092528.1-260905092954.5-263523256.64 17.66 5.48 +1.36 +1.52 K3III -0.022+0.002 +012V 8.6 11.6 * -3771 24 UMaBD+70 565 82210 6897 357I DK UMa 092538.7+701612093428.9+694949142.55 38.93 4.56 +0.77 +0.34 +0.41 G4III-IV -0.063+0.077 +.042-027 < 19: * -3772 BD-14 2867 82232155246 092538.3-150812093022.6-153438247.99 25.19 5.85 +1.20 +1.22 gK3 -0.066-0.063 +024V? -3773 4Lam LeoBD+23 2107 82308 808852756I 4514 092600.9+232433093143.2+225805206.69 44.86 4.31 +1.54 +1.89 +0.89 K5III v-0.021-0.033 +.020+027V < 17 * -3774 BD+74 402 82327 6900 092607.6+744547093606.8+741904137.63 36.68 6.46 -0.10 -0.33 B9V -0.016-0.070 -011V? -3775 25The UMaBD+52 1401 82328 27289 358I 7420 4519 092610.3+520800093251.4+514038165.45 45.66 3.17 +0.46 +0.02 +0.27 F6IV -0.954-0.531 +.052+015SB1O 12 10.7 4.1 * -3776 CP-61 1277 82347250590 092616.2-615009092847.0-621623281.62-08.11 5.92 +1.10 +0.97 K1III -0.076+0.031 +000 -3777 CP-71 833 82350256623 092607.3-711003092706.4-713608288.22-14.85 5.47 +1.08 +0.98 +0.38E K2III -0.102+0.075 +.036+003SB * -3778 BD+50 1657 82380 42914 092624.2+495247093307.2+492619168.59 46.19 6.76 A4V -0.024+0.009 -010V? -3779 6 LeoBD+10 2014 82381117751 I 7416 092635.9+100924093157.6+094257223.42 39.97 5.07 +1.37 +1.53 K2.5IIIbFe-0.5 -0.003-0.013 +019SB < 17 4.4 37.3 * -3780 Zet1AntCD-31 7355 82383200444 W B 092628.7-312703093045.4-315329260.70 14.07 7.00 +0.09 +0.09 A2V -0.013-0.026D+.001-003 0.7 8.0 * -3781 Zet1AntCD-31 7355 82384200445 W A 092629.1-312656093046.1-315322260.70 14.07 6.18 +0.03 +0.03 A0V +0.028-0.028D+.001-003V? 0.7 8.0 * -3782 5Xi LeoBD+11 2053 82395 986271246I D 4518 092633.3+114434093156.7+111759221.56 40.68 4.97 +1.05 +0.86 +0.52 K0-III-IIIb -0.094-0.082 +.028+029V < 19: 1.9 0.0 * -3783 CP-66 1018 824062505912754 092633.3-661554092830.6-664207284.74-11.30 5.91 +0.01 -0.02 A0V -0.033+0.047 +029V -3784 CD-50 4204 82419237042 092640.4-510441093005.2-513102274.31-00.20 5.45 -0.10 -0.42 B8V -0.004+0.009 +010 -3785 BD-09 2856 82428155257 092646.4-100640093138.9-103308243.89 28.65 6.14 +0.24 +0.10 F0Vn +0.014-0.020 -018SB 184 -3786 Psi VelCD-39 5580 82434221234 W 4513 092645.6-400144093042.0-402800266.78 7.91 3.60 +0.36 -0.03 +0.22 F3IV+F0IV -0.182+0.073 +.065+009V 201: 0.5 0.7 * -3787 32Tau2HyaBD-00 2211 82446136932 092653.0-004437093158.9-011106235.15 34.34 4.57 +0.10 +0.09 +0.06 A3V -0.012-0.011 +.027+006SB 70 -3788 BD-09 2858 82477155262 092703.6-095547093155.8-102214243.78 28.82 6.13 +1.19 +1.17 K0 -0.086+0.010 +064V? -3789 Zet2AntCD-31 7369 82513200459 092715.5-312551093132.2-315219260.80 14.20 5.93 +0.26 +0.16 +0.14 A9IV -0.039+0.001 +022 -3790 CD-35 5751 82514200462 W 092722.5-351608093132.9-354254263.56 11.45 5.87 +1.29 +1.47 K4III +0.143-0.177 -.004+014 8.2 23.6AB 3 -3791 9 LMiBD+37 1998 82522 61561 092722.1+365549093330.3+362913187.47 47.39 6.18 +1.27 gK4 +0.031-0.035 -017V -3792 BD+29 1913 82523 809002760 7426 092727.0+284840093318.3+282205199.29 46.46 6.53 +0.12 +0.10 A3Vnn -0.044-0.034 +026V 5.2 30.5 * -3793 CP-57 2090 82536237056 W 4516 092728.2-575520093023.4-582142279.04-05.15 5.88 +1.70 +1.68 M2III -0.031+0.028 +003V 7.7 2.3 * -3794 BD+02 2217 825431177572758 W 092731.2+021825093241.4+015151232.17 36.18 6.11 +0.62 +0.27 F7IV-V -0.020-0.038 +028 =< 10 0.0 0.1 -3795 Iot ChaCP-80 350 825542585302753 092729.2-802118092409.1-804713295.18-21.22 5.36 +0.45 +0.06 F3-5IV v-0.146+0.140 +007 123 * -3796 BD-18 2708 825731552732757 092741.5-185731093220.4-192401251.46 23.00 5.74 +0.14 +0.12 +0.04 A5V -0.036+0.010 +027 74 -3797 BD+47 1683 82582 42924 092745.7+472045093419.6+465408172.15 46.86 6.52 +0.22 +0.09 F0V -0.062-0.008 +011 142 -3798 CD-28 7373 82610177619 S Ant 092755.7-281114093218.5-283741258.55 16.62 6.46 +0.33 A9V -0.072+0.039 +015SBO 113 * -3799 26 UMaBD+52 1402 82621 27298 092758.5+522946093449.5+520305164.83 45.85 4.50 +0.01 +0.04 +0.01 A2V -0.065-0.035 +.025+023V 180 -3800 10 LMiBD+37 2004 82635 61570 360I SU LMi 092805.9+365030093413.4+362351187.61 47.53 4.55 +0.92 +0.62 +0.46 G8.5III +0.006-0.022 -012V < 19: * -3801 BD-07 2836 82638136945 092806.7-080342093302.1-083019242.30 30.20 6.12 +0.98 +0.71 K0 -0.020-0.034 +036 -3802 BD-12 2926 826601552812761I 092807.6-130427093255.8-133101246.70 27.00 5.94 +1.50 +1.74 K5III -0.008+0.003 +028 -3803 CP-56 2270 82668237067 361 N Vel 092810.9-563535093113.3-570204278.21-04.11 3.13 +1.55 +1.89 +0.89 K5III -0.032+0.004 +.022-014 * -3804 BD+24 2104 82670 80909 I 092816.6+235359093359.1+232714206.23 45.50 6.25 +1.46 gK7 -0.052-0.087 -006V? -3805 BD-06 2939 82674136951 092822.8-064447093320.1-071124241.15 31.07 6.24 +1.17 +1.25 K0 -0.033-0.012 +029SBO * -3806 BD+73 470 82685 6915 7446 092823.5+733139093756.2+730450138.84 37.47 6.42R F2V+F1V -0.041-0.026D+.017+000 0.1 4.7 * -3807 CD-40 5284 826942212622759 W 092821.0-401225093219.3-403858267.13 7.99 5.35 +0.90 G8III +0.011-0.012 +.024-001 3.6 1.1 -3808 BD-20 2936 827341776421247I 092836.1-204023093312.5-210657252.97 21.98 5.01 +1.02 +0.87 K0IV -0.020+0.015 +.052+013 -3809 BD+40 2224 82741 615782762I 092849.6+400356093503.8+393717182.83 47.71 4.81 +0.99 +0.76 +0.53 G9.5IIIFe-1 -0.030+0.022 -012 < 19: -3810 BD-22 2645 82747177649 092852.9-222519093326.2-225150254.38 20.82 5.91 +0.02 A0Vn -0.049+0.060 +015 -3811 BD+40 2226 82780 42931 7438A 092907.3+402428093522.4+395748182.32 47.76 6.76 +0.35 0.00 F2V -0.016+0.012 -035SBO 45 1.4 24.9AB 3* -3812 CD-38 5676 82785200492 W 092905.9-384112093307.8-390744266.19 9.20 6.43 +0.33 F0IV -0.029+0.049 +025 3.5 55.2 -3813 CP-66 1025 82858250611 092932.5-661636093132.9-664310284.97-11.11 6.27 +1.35 +1.38 K1III -0.027-0.006 +004 -3814 33 HyaBD-05 2840 828701369642763I 092933.2-052807093432.7-055454240.18 32.09 5.56 +1.16 +1.13 +0.41E K1III +0.011-0.059 +013V * -3815 11 LMiBD+36 1979 82885 61586 7441 SV LMi 092939.7+361545093539.6+354837188.49 47.81 5.41 +0.77 +0.44 +0.37 G8V -0.706-0.241 +.109+013V? < 17 8.5 3.3 * -3816 CP-62 1253 82901250614 I:W R Car 092943.6-622046093214.6-624720282.27-08.21 6.10 +1.43 +0.23 +2.51 M6-7IIIep v-0.036+0.020 +028V 7.3 2.1 * -3817 CD-48 4802 82984221288 W 093009.1-483338093344.5-490018273.03 2.04 5.12 -0.12 -0.58 B4IV -0.016+0.010D+.015+017V 117 0.8 2.1 * -3818 7 LeoBD+15 2077 83023 98662 7448A 093025.0+144934093552.9+142247218.36 42.85 6.36 +0.01 +0.03 A1V -0.038 0.000 +.006+020 92 3.2 41.2 3* -3819 CD-50 4270 830582371072764 093040.7-504836093408.8-511519274.60 0.42 5.01 -0.18 -0.94 B1.5IV -0.003+0.004 +035SB 207 -3820 BD+31 2011 83069 615942765I 4545 093046.9+313636093642.9+310942195.41 47.63 5.56 +1.59 +1.86 M2IIIa +0.003-0.039 -020V? -3821 CP-72 835 83095256634 362 093051.4-723814093136.3-730451289.55-15.64 5.47 +1.56 +1.75 K4III -0.027+0.001 +014 -3822 BD-18 2728 83104155323 W 093054.7-190809093533.7-193501252.17 23.43 6.31 +0.06 +0.03 A2V -0.038-0.046 +016V? 3.2 51.5 -3823 CD-35 5803 83108200531 093102.2-352238093511.8-354926264.18 11.89 6.49 +0.42 F7III-IV -0.072-0.002 +013 -3824 BD+67 602 83126 149492769I 093110.6+674322093927.9+671620145.15 40.59 5.94 +1.52 K5 -0.026-0.040 +019 -3825 CP-58 1576 83183237117 093132.6-584701093426.7-591346280.02-05.43 4.08 +0.01 -0.56 +0.01 B5II -0.012+0.014 +022V? 0 * -3826 8 LeoBD+17 2109 83189 986732766I D 093131.5+165310093702.6+162616215.91 43.91 5.69 +1.25 gK1 -0.014-0.006 +006 * -3827 10 LeoBD+07 2160 832401178072767I 4551 093155.9+071703093712.7+065009227.52 39.73 5.00 +1.05 +0.87 K1III v-0.060+0.001 +.019+020SB < 17 -3828 CD-24 8263 83261177738 W 093203.3-241523093633.7-244210256.32 20.05 6.53 +0.38 F2 -0.119+0.060 +024 0.0 0.1 -3829 42 LynBD+40 2232 83287 42958 093207.2+404120093821.7+401423181.86 48.31 5.25 +0.22 +0.12 F0V -0.017+0.006 -003V 96 -3830 CD-24 8272 83332177748 093230.3-245057093700.2-251748256.84 19.71 5.70 +1.12 gK1 -0.062+0.043 +030 -3831 CD-48 4831 83368221339 W IM Vel 093247.7-481808093625.3-484505273.18 2.52 6.17 +0.27 +0.15 ApSrEuCr -0.011-0.024D+.021-004 33 2.4 3.1 * -3832 34 HyaBD-08 2725 83373137011 093257.3-085830093751.5-092528244.00 30.55 6.40 -0.04 -0.09 A1V -0.062+0.002 +025 =< 41 -3833 CD-31 7458 833802005611248 093251.6-314345093709.9-321043261.91 14.81 5.63 +1.02 K0III +0.034-0.020 -003 -3834 BD+05 2207 834251178211249I 093314.3+050604093827.3+043857230.16 38.88 4.68 +1.32 +1.46 +0.71 K3III -0.163-0.051 +.011+045V < 19: * -3835 CD-35 5833 83441200573 093318.2-353847093728.3-360545264.72 12.00 5.98 +1.12 K2III -0.035-0.001 +020 -3836 CD-48 4836 834462213442768 W 093314.8-485424093649.6-492119273.64 2.12 4.35 +0.17 +0.13 +0.10 A5IV-V -0.125+0.025 +.019+021 144 8.7 25.7 -3837 CP-52 2612 83465237144 093324.1-522950093646.3-525639276.03-00.56 6.19 +1.05 +0.89 K0III -0.120+0.081 +034 -3838 BD+69 531 83489 14966 363 093341.5+694134094214.8+691415142.76 39.82 5.69 +1.14 gG9 -0.067-0.070 -009V? -3839 27 UMaBD+72 466 83506 69362772I 093345.1+724226094257.2+721509139.45 38.23 5.17 +1.04 +0.90 K0III -0.026-0.030 -017V? < 19: -3840 CP-53 2646 83520237149 W 093351.8-531306093712.3-534007276.56-01.05 5.45 +0.15 +0.08 A2-3V -0.054-0.017 -013 0.0 0.5 * -3841 CP-64 1049 83523250636 093345.8-643009093605.1-645702284.08-09.50 6.56 +0.10 +0.11 A2V -0.040+0.036 +016 -3842 CD-42 5462 835482213552771 093407.0-424422093801.5-431128269.65 6.84 5.50 +1.00 +0.68 +0.43C G8II +0.032-0.037 +.020+002 * -3843 BD+78 317 83550 6948 093410.8+783526094530.8+780805133.41 34.91 6.23 +1.35 K2III +0.004+0.003 -027 -3844 CD-39 5697 83610200590 W 093438.0-390939093840.7-393651267.32 9.58 6.70 +0.49 F5 -0.044-0.062 +002V? 2.0 0.5 * -3845 35Iot HyaBD-00 2231 836181370351250I 4568 093444.9-004120093951.4-010834236.49 35.98 3.91 +1.32 +1.46 +0.67 K2.5III-IIIbBa0.3 +0.049-0.064 +.026+023V? < 17 * -3846 37 HyaBD-09 2898 83650155377 093454.4-100705093947.4-103413245.37 30.18 6.31 -0.03 -0.14 A0Vn -0.024+0.005 +014V 127 -3847 BD+79 319 83727 69562780 093527.0+793543094718.0+790812132.39 34.35 6.17 +0.25 +0.12 F0V: -0.031-0.021 -007 -3848 BD-10 2888 83731155387 093527.2-101857094020.1-104609245.65 30.16 6.37 +0.08 A2V -0.004-0.001 -011V -3849 38Kap HyaBD-13 2917 83754155388 364 4576 093530.7-135243094018.4-141956248.71 27.81 5.06 -0.15 -0.57 -0.15 B5V -0.027-0.020 +018V? 185 * -3850 BD+31 2026 83787 61633 I W DR Leo 093540.2+314356094135.2+311641195.43 48.68 5.89 +1.60 +1.77 +0.97 K6III +0.030-0.001 -013 7.5 28.4 * -3851 43 LynBD+40 2241 83805 616362773 093548.7+401249094200.3+394528182.53 49.03 5.62 +0.95 +0.68 +0.46 G8III -0.050-0.045 +.018+030V? < 19: -3852 14Omi LeoBD+10 2044 83808 98709 365I 7480 093548.8+102050094109.0+095332224.60 42.06 3.52 +0.49 +0.21 +0.23 F6II+A1-5V -0.142-0.037 +.034+027SBO =< 50 0.2 0.0 3* -3853 13 LeoBD+26 1991 83821 80970 093553.3+262205094138.5+255446203.37 47.78 6.24 +1.25 +0.66 gK2 -0.014-0.033 +.013-026V? -3854 BD+49 1868 83869 429902774 093608.6+485312094243.1+482552169.53 47.95 6.39 -0.01 0.00 A1V -0.030-0.017 -008SB2 86 -3855 BD+55 1345 83886 273592775 093612.0+544913094307.0+542149161.12 46.36 6.47 +0.13 +0.09 +0.02 A5m -0.035-0.034 +021 100 -3856 CP-60 1477 83944250653 4577 093634.8-605231093921.0-611941281.89-06.57 4.52 -0.07 -0.21 -0.08 B9IV-V -0.041+0.021 +020V 68 * -3857 13 LMiBD+35 2042 83951 616482776 093641.1+353302094242.7+350536189.66 49.21 6.14 +0.36 0.00 F3V -0.021-0.052 -008V 12 -3858 BD-22 2684 83953177840 W 093643.2-230812094117.0-233530256.29 21.60 4.77 -0.12 -0.58 -0.09 B6Ve v-0.028-0.004 +026 332 5.2 54.7 * -3859 BD+65 731 83962 14976 093644.8+652626094436.7+645902147.47 42.17 6.17R F3Vn -0.049+0.012 -028 116 -3860 Zet ChaCP-80 365 83979258538 Zet Cha 093650.1-802931093353.2-805629295.57-21.04 5.11 -0.14 -0.57 -0.18 B5V -0.043+0.007 -042SB 88 * -3861 15 LeoBD+30 1901 84107 616561251 093741.6+302603094333.3+295828197.47 48.93 5.64 +0.12 +0.08 +0.03 A2IV -0.018-0.100 +016 -3862 CD-23 8646 84117177866 093743.6-232800094214.4-235456256.70 21.53 4.94 +0.53 0.00 +0.28 F9IV -0.395+0.260 +.080+034V? -3863 CP-57 2228 84121237221 W 093737.7-573143094042.5-575901279.79-03.95 5.32 +0.20 +0.10 A3IV -0.034+0.006 +.031+007SB 39 0.2 0.2 * -3864 CP-56 2435 84152237224 093752.4-564811094102.2-571535279.35-03.38 5.80 +1.09 +0.98 K0-1III +0.081-0.043 +039 -3865 28 UMaBD+64 752 84179 14980 W 093813.9+640648094555.4+633912148.96 42.93 6.34 +0.31 -0.02 F2V -0.012-0.043 -027SB 101 5.2 6.4 * -3866 16Psi LeoBD+14 2136 84194 987331252I W 4594 093817.2+142846094343.9+140118219.89 44.44 5.35 +1.63 +1.95 M2IIIab +0.004-0.003 +008 5.3 281.8 -3867 CD-34 6097 842242006522777 093828.1-350242094241.4-353006265.10 13.16 6.41 -0.06 -0.37 ApSi -0.014+0.007 +017 -3868 CP-54 2594 84228237237 093830.0-544527094147.8-551251278.08-01.77 6.00 -0.13 -0.58 B4V -0.018-0.004 +014 -3869 BD+19 2251 84252 98742 W 093856.4+191925094430.0+185149213.60 46.44 6.50R K0 -0.007-0.054 -001 6.0 31.2 -3870 BD+57 1231 84335 27377 I CS UMa 093926.9+573514094631.7+570741157.15 45.82 5.2 +1.62 +1.80 M3IIIab +0.004+0.034 +008V * -3871 The AntCD-27 6881 84367177908 366 W 093944.6-271842094412.1-274610259.89 19.06 4.79 +0.51 +0.35 +0.32 A8V+F7II-III -0.047+0.035 +.053+024V? 0.2 0.1 * -3872 CD-50 4420 84400237260 W IP Vel 093954.0-504611094327.5-511342275.67 1.41 6.15 -0.10 -0.46 B6V -0.024-0.004 -023V 4.7 2.1 * -3873 17Eps LeoBD+24 2129 84441 81004 367I 4613 094010.5+241405094551.1+234627206.82 48.21 2.98 +0.80 +0.47 +0.44 G1II -0.046-0.011 +.010+004V? < 17 * -3874 CD-38 5850 84447200681 094010.6-390643094415.8-393416268.11 10.32 6.82 +0.30 F2-3V -0.029+0.008 +005 -3875 CP-53 2788 84461237268 094018.5-532600094342.2-535330277.43-00.59 5.56 -0.04 -0.08 -0.07 A0IV -0.068+0.022 +010V 16 * -3876 BD+07 2181 845421178982781I 094053.5+071013094610.0+064231229.14 41.59 5.79 +1.64 +1.96 +0.81E M1.5IIIab +0.004-0.022 +003V * -3877 18 LeoBD+12 2090 84561 98755 I 094100.1+121615094623.3+114836223.07 44.08 5.63 +1.49 gK4 -0.017+0.015 +030V -3878 CD-29 7758 84567177939 094058.0-294433094521.8-301210261.83 17.45 6.45 -0.13 -0.94 B0.5IIIn -0.032+0.001 +033 * -3879 BD+02 2246 846071179012782 094114.0+021453094623.6+014708234.63 38.99 5.65 +0.34 +0.12 F4IV -0.056-0.041 +015SB -3880 19 LeoBD+12 2095 84722 98767 S 094203.4+120151094725.9+113406223.53 44.20 6.45 +0.43 +0.09 A7Vn -0.053+0.005 -004 0.2 0.0 * -3881 BD+46 1551 84737 430461255 094208.5+462913094835.4+460116172.78 49.43 5.09 +0.62 +0.10 +0.34 G0.5Va +0.224-0.092 +.073+005V 3 -3882 BD+12 2096 84748 98769 I R Leo 094210.8+115334094733.5+112544223.72 44.16 6.02 +1.30 -0.20 +3.24 M8IIIe v+0.002-0.042 +.020+013V? * -3883 CP-56 2499 84809237314 4623 094228.3-564328094540.5-571108279.78-02.92 6.46 -0.11 -0.58 B8III-IV -0.031+0.017 +011V? * -3884 CP-61 1333 848102506831254 l Car 094230.0-620248094514.8-623028283.20-07.00 3.69 +1.22 +0.85 +0.68 G5Iab-Ib v-0.014+0.007 +.027+003V * -3885 BD+66 637 84812 15000 094233.3+660332095023.7+653536146.34 42.38 6.31 +0.28 +0.12 A9Vn -0.052-0.029 -007 176 -3886 CD-44 5846 84816221484 Var? 094236.3-441733094630.4-444518271.85 6.67 5.55 -0.18 -0.72 -0.15 B2.5IV -0.008+0.002 -004SB 114 * -3887 CP-58 1640 84850237321 094251.5-582001094555.4-584739280.84-04.12 6.22 +0.46 F5IV -0.123+0.059 +006 -3888 29Ups UMaBD+59 1268 84999 27401 368I 7534 Ups UMa 094352.9+593033095059.4+590219154.31 45.58 3.80 +0.29 +0.10 +0.16 F2IV -0.293-0.151 +.041+027V? 110 8.6 11.3 * -3889 20 LeoBD+21 2113 85040 810352785 W DG Leo 094414.3+213844094950.1+211046210.95 48.37 6.09 +0.25 +0.18 A7IVn -0.043-0.012 +026SB2O 139 0.3 0.3 * -3890 Ups CarCP-64 1084 85123250695 W A 094436.1-643629094706.1-650419285.04-08.82 3.01 +0.28 +0.18 A6Ib -0.012+0.011 +.027+014 0 3.0 5.0 * -3891 Ups CarCP-64 1084 85124250696 W B 094436.7-643632094706.7-650421285.04-08.82 6.26 +0.08 -0.54 B7III -0.011+0.023 +.027+014 3.0 5.0 * -3892 CD-36 5955 85206200777 094516.4-364315094928.1-371111267.30 12.79 5.97 +1.24 K1III -0.084+0.023 +012 -3893 4 SexBD+05 2240 85217117937 094517.8+044843095030.1+042037232.58 41.26 6.24 +0.48 -0.02 F7Vn -0.147-0.055 +017SBO * -3894 30Phi UMaBD+54 1331 85235 27408 7545 094518.2+543154095206.4+540352160.87 47.70 4.59 +0.03 +0.08 0.00 A3IV -0.004+0.021 +.032-012 30 0.2 0.3 * -3895 CP-55 2548 85250237370 094522.7-555647094840.0-562443279.60-02.06 6.06 +0.94 +0.67 K0III -0.056+0.014 +007 * -3896 23 LeoBD+13 2164 85268 98809 I 094537.3+133202095102.0+130358222.18 45.65 6.46 +1.58 +1.92 M0III +0.028-0.008 -009V? -3897 CD-35 5961 85296200784 094537.2-354807094951.3-361607266.74 13.54 6.37 +1.01 K0III -0.022+0.002 +021V -3898 CD-45 5470 85355221523 W 094604.1-451557094957.1-454358272.95 6.31 5.08 -0.10 B7III -0.026+0.004 +012 130: 4.5 66.6 * -3899 6 SexBD-03 2794 85364137183 370 094611.6-034629095114.0-041436241.68 36.39 6.01 +0.17 +0.11 A8III +0.013-0.028 -010V 101 -3900 22 LeoBD+25 2169 85376 81054 094612.5+245207095153.0+242343206.42 49.69 5.32 +0.23 +0.08 A5IV +0.006-0.179 +.040-002V? 126 * -3901 BD-05 2923 85380137185 094622.6-054255095121.6-061054243.56 35.19 6.42 +0.58 +0.11 F8V -0.125+0.060 +036V =< 10 -3902 Nu ChaCP-76 598 853962566582784 094618.5-761835094620.6-764634292.94-17.65 5.45 +0.89 +0.57 G8III +0.079-0.056 +.019+011 -3903 39Ups1HyaBD-14 2963 854441555422786I 094640.0-142239095128.7-145048251.23 29.44 4.12 +0.92 +0.65 +0.47 G7-III +0.017-0.026 +.021-015 < 19: * -3904 CD-46 5558 85483221538 094651.8-462800095042.0-465604273.82 5.46 5.73 +1.08 +1.02 K0IIICNIb -0.034+0.016 +017V -3905 24Mu LeoBD+26 2019 85503 81064 371I 094704.6+262841095245.8+260025204.05 50.25 3.88 +1.22 +1.39 +0.58 K2IIICN1Ca1 -0.216-0.056 +.025+014V? < 17 * -3906 7 SexBD+03 2280 85504117959 4656 094702.6+025514095212.2+022715234.98 40.57 6.02 -0.04 -0.08 A0V s -0.181+0.092 +.011+097V =< 41 -3907 BD+00 2573 855051179602788 094704.4+003244095212.0+000432237.51 39.20 6.35 +0.94 +0.69 G9III -0.022-0.032 +019 -3908 BD-15 2920 85519155553 094713.1-160350095159.6-163205252.72 28.36 6.08 +1.04 +2.12 K0 +0.026-0.067 +005V -3909 8Gam SexBD-07 2909 85558137199 7555 094733.4-073803095230.4-080618245.57 34.17 5.05 +0.04 +0.06 A1V -0.055-0.040 +.013+012V 114 0.5 0.4AB 3* -3910 CD-45 5499 855632215471256 094727.4-454333095119.8-461138273.43 6.10 5.62 +1.17 +1.16 K2III -0.043+0.033 +018 -3911 BD+61 1151 85583 150232790 W 094745.7+613515095503.4+610658151.35 45.07 6.27 +1.05 K0 +0.009-0.002 -011 6.8 12.2 -3912 CD-45 5508 85622221553 4658 094748.8-460443095140.8-463252273.70 5.87 4.58 +1.20 +0.99 +0.63 G5Ib -0.008-0.001 +.007+011SB1O * -3913 CP-58 1673 856552374182789 094805.0-585719095112.1-592533281.77-04.18 5.79 +1.36 +1.28 K2IVCNIV-Vp +0.035-0.045 +024V -3914 CP-62 1335 85656250721 094806.8-621635095055.7-624443283.86-06.77 5.57 +1.32 +1.31 K1IIICNII -0.007+0.007 +012 -3915 BD+06 2224 85709117975 I 094827.8+062546095342.9+055730231.32 42.80 5.95 +1.66 +1.94 +0.93E M2III -0.008-0.006 -001V? -3916 CD-26 7505 85725178130 W 094829.3-265151095258.0-271956261.10 20.70 6.30 +0.62 G1V -0.284+0.093 +.015+023 4.0 1.3 * -3917 31 UMaBD+50 1698 85795 274302793 SY UMa 094911.4+501731095543.0+494912166.65 49.63 5.27 +0.07 +0.12 A3III -0.003+0.022 +.025-006 147 * -3918 BD+73 478 85841 7009 372 094927.0+732118095822.8+725246137.93 38.80 5.83 +1.14 gK3 -0.076-0.035 +004V? -3919 CD-25 7585 858591781582792I 094940.4-252743095412.3-255557260.31 21.92 4.88 +1.23 +1.30 +0.45E K2+III-IIIb -0.180+0.054 +.031+051V? * -3920 CP-54 2816 85871237448 4668 094935.0-545407095300.0-552224279.41-00.87 6.48 -0.14 -0.86 B1IV -0.018+0.001 -018SB 274 * -3921 BD-21 2935 85905178164 094953.5-220054095431.7-222918257.84 24.51 6.24 +0.04 A2 -0.038-0.031 +009 * -3922 BD+58 1224 85945 27438 095015.4+575339095713.6+572506155.90 47.02 5.93 +0.89 G5III +0.032-0.059 +.007-044V * -3923 BD-18 2810 85951155588 373I 095009.2-183208095452.2-190034255.24 27.09 4.94 +1.57 +1.93 +0.74E M1III -0.047-0.037 +.011+050SB -3924 CD-50 4622 85953237464 Var? 095010.0-504028095350.2-510849276.87 2.51 5.93 -0.15 -0.73 B2III -0.005-0.010 +010 * -3925 CD-44 5987 85980221592 W 095021.2-444840095417.6-451702273.25 7.14 5.71 -0.11 -0.56 -0.11 B3V -0.020-0.008 +013V 156 2.4 5.3 * -3926 BD+09 2262 860801180012794 095107.9+092425095626.0+085559228.26 44.90 5.85 +1.13 +1.00 gK2 -0.085+0.018 +.011+009 -3927 CD-49 4801 86087237483 095108.1-494614095451.3-501438276.43 3.32 5.72 -0.01 -0.01 A0V -0.029+0.012 +014SB2 * -3928 19 LMiBD+41 2033 86146 43115 374 095133.7+413155095741.1+410320180.07 51.89 5.14 +0.46 0.00 F6V s -0.117-0.025 +.040-010SB1O 0 * -3929 BD+46 1566 86166 431172798 095138.4+455327095756.9+452452173.16 51.16 6.30 +1.11 +0.95 K0III +0.011-0.030 +005 -3930 CD-40 5626 862112216172795 095158.0-402057095605.4-404929270.68 10.82 6.41 +1.61 +1.99 M1III -0.018-0.022 +058 -3931 CD-25 7622 86266178214 7591 095214.4-260430095646.5-263301261.22 21.85 6.28 +0.22 +0.11 A4V -0.114+0.006 +011 4.4 3.4 -3932 CD-32 6895 862672008892796 095213.4-325637095635.5-332507265.93 16.61 5.84 +1.20 K1III +0.038+0.016 +004 -3933 CD-26 7551 86301178216 095223.0-270001095654.0-272830261.90 21.17 6.32 +0.17 A4V -0.081+0.029 +014 -3934 BD+84 225 86321 16373955 Var 095236.9+842404100834.3+835506127.59 31.66 6.37 +1.52 +1.64 K0 -0.004+0.007 -012 * -3935 CD-50 4662 863522375142797 095240.8-505138095621.9-512010277.30 2.61 6.37 -0.17 -0.75 B2IV-V -0.004-0.007 +009 -3936 BD+28 1824 86358 81120 095242.8+281412095826.1+274532201.68 51.82 6.30R F3V -0.117-0.034 +036SB2 75 * -3937 27Nu LeoBD+13 2183 86360 988762800 095250.6+125519095813.4+122641224.10 46.95 5.26 -0.04 -0.13 B9IV -0.025-0.015 +.018+014SB 96 -3938 BD+09 2269 86369118023 I 095249.7+084729095807.6+081851229.31 44.95 6.04 +1.36 +1.55 gK3 +0.011-0.024 -019V -3939 BD+57 1242 86378 274642802I 095258.8+571725095951.7+564843156.48 47.60 5.48 +1.46 +1.82 K5III -0.029-0.026 -013V -3940 Phi VelCP-53 3075 86440237522 375 W 095321.0-540530095651.8-543404279.35 0.11 3.54 -0.08 -0.62 -0.08 B5Ib -0.010+0.003 +014 45 8.3 37.2 * -3941 CP-52 2980 86466237526 IV Vel 095333.4-520945095710.9-523820278.20 1.66 6.12 -0.13 -0.61 B3IV -0.010-0.002 +019V? 30 * -3942 BD+30 1946 86513 811292803 095350.2+300728095936.2+293843198.70 52.34 5.73 +1.06 gG9 -0.095-0.039 -001V? -3943 CD-47 5399 86523221644 W 095352.3-475613095742.5-482452275.67 5.04 6.05 -0.14 B3V -0.016-0.015 +009SB 4.6 14.1 * -3944 CP-70 953 866062566722799 095425.4-705446095609.7-712322289.82-13.13 6.35 -0.08 -0.93 B9Ib -0.020-0.002 -030 -3945 12 SexBD+04 2276 86611118041 376 4694 095431.8+035146095943.1+032305235.37 42.64 6.70 +0.27 +0.09 F0V -0.066+0.022 -004SB 187 -3946 CD-23 8898 86612178271 Var? 095429.1-232821095906.1-235701259.77 24.14 6.21 -0.10 -0.68 -0.06 B4Ve v-0.049+0.023 +015 220 * -3947 Eta AntCD-35 6050 86629200926 377 W 095434.8-352444095852.3-355328267.94 15.00 5.23 +0.31 +0.08 F1III-IV -0.087-0.020 +.029+030 6.0 31.1 * -3948 CP-63 1233 866342507602801 095432.7-640052095715.2-642922285.51-07.68 6.58 +1.13 +1.08 K0-1III -0.130+0.084 +045 -3949 CP-68 1011 86659250761 095450.9-683729095659.7-690607288.40-11.31 6.20 -0.10 -0.62 B3V -0.027 0.000 +016V? 135 * -3950 29Pi LeoBD+08 2301 86663118044 378I 4699 095455.7+083127100012.8+080239230.01 45.26 4.70 +1.60 +1.93 +1.08 M2-IIIab e-0.030-0.023 +.017+023V * -3951 20 LMiBD+32 1964 86728 618081258 W 095514.8+322456100100.7+315525195.01 52.86 5.36 +0.66 +0.27 G3VaHdel 1 -0.528-0.428 +.053+056 3 3.2 407. * -3952 BD+22 2164 87015 811542807 095714.4+222554100248.9+215657211.17 51.48 5.66 -0.19 -0.73 B2.5IV -0.017-0.006 +003 -3953 CP-56 2746 87030237586 W 095710.4-562757100034.4-565648281.21-01.46 6.52 +0.98 K0III -0.064+0.008 +010 6.5 7.6 -3954 BD+54 1348 87141 275031259 095757.7+542232100436.3+535330160.03 49.46 5.74 +0.48 +0.04 F5V -0.022-0.002 -016 10 -3955 CP-52 3087 87152237612 Var? 095802.7-525255100140.5-532152279.18 1.49 6.20 -0.13 -0.69 B2.5V -0.036-0.017 +006V 218 * -3956 CD-29 8034 871992009942808 095821.0-300543100249.3-303439265.09 19.64 6.54 +1.19 K1III -0.014+0.030 +014V? -3957 CP-56 2770 87238237621 095834.2-565204100158.0-572059281.60-01.67 6.20 +1.12 K1II -0.041+0.027 +007 -3958 BD+53 1384 87243 27512 095837.0+525121100510.5+522215162.14 50.15 6.14R A5IV -0.004-0.020 -026SB 167 -3959 BD-08 2836 87262137326 I 095844.5-090523100341.0-093426249.14 35.24 6.12 +1.66 +2.01 K0 +0.005-0.011 +009V? -3960 CP-59 1695 87283250782 095849.1-595618100200.0-602515283.45-04.12 5.94 +0.26 +0.10 A9IV -0.019+0.006 -002 * -3961 13 SexBD+03 2311 87301118086 095857.6+034116100408.4+031204236.44 43.45 6.45 +0.40 -0.02 F4V -0.075-0.097 +000SB -3962 CD-24 8711 87318178357 7625 095905.3-244958100341.4-251900261.61 23.80 6.70 0.00 0.00 A0III-IV -0.039+0.009 +012 5.5 16.1 * -3963 BD-17 3047 87344155704 7627AB 095916.9-173702100402.9-180606256.32 29.24 5.86 -0.06 A0V -0.010-0.002 +019V 17 1.0 21.2AC 3* -3964 CD-46 5759 87363221728 095922.9-460907100320.5-463810275.34 7.03 6.12 +0.02 A0V -0.029-0.010 +003 -3965 CD-23 8973 874271783671260 095943.8-234805100421.0-241708261.00 24.68 5.70 +0.30 A8V -0.114+0.023 +004V -3966 CP-59 1752 87436237640 095946.9-594141100259.9-601043283.41-03.86 6.19 +0.17 A6II-III -0.013+0.005 -004 * -3967 CP-61 1431 87438250789 4720 095946.2-614023100249.4-620923284.58-05.45 6.42 +1.72 +1.90 K3Ib -0.010+0.010 -008 -3968 CD-39 6100 874772010202809 100010.9-392927100423.4-395833271.42 12.46 6.43 +1.30 K1III -0.034-0.003 +047 -3969 BD+16 2077 87500 98944 100015.4+161438100540.9+154527220.74 49.99 6.37 +0.37 +0.15 F2Vn -0.078-0.017 +012 139 -3970 40Ups2HyaBD-12 3073 875041557131261 4725 100015.2-123447100507.5-130353252.46 33.06 4.60 -0.09 -0.27 -0.09 B9III-IV -0.037+0.018 +028SB2 76 -3971 CP-61 1441 87543250795 W 100028.9-612358100334.3-615302284.49-05.18 6.14 -0.04 -0.43 B7IVne -0.005+0.005D+.008+005 1.5 1.2 * -3972 CD-35 6130 87606201037 100055.6-355353100515.2-362302269.30 15.41 6.27 +1.11 +1.07 K1III -0.010+0.003 +028 -3973 14 SexBD+06 2259 876821181112811 D 100133.6+060557100647.4+053641234.17 45.35 6.21 +0.94 +0.72 K1III -0.034-0.013 +017V * -3974 21 LMiBD+35 2110 87696 618742812 4736 100131.9+354356100725.8+351441189.47 54.26 4.48 +0.18 +0.08 +0.07 A7V +0.053+0.004 +.050-018V 148 * -3975 30Eta LeoBD+17 2171 87737 98955 379 W 4738 100152.9+171501100720.0+164546219.53 50.75 3.52 -0.03 -0.21 +0.02 A0Ib -0.002 0.000 +.003+003V 20 0.5 0.1 * -3976 CD-46 5806 87783221773 W 100213.6-465252100611.3-472212276.17 6.73 5.08 +0.88 +0.55 K1IV+G5V +0.011-0.057 +.017+021 1.7 0.7 * -3977 BD-16 2974 878081557392813I 100221.6-163908100709.5-170830256.19 30.45 5.60 +1.50 +1.68 K7III +0.016-0.063 +011 -3978 CD-51 4471 87816237690 R Vel 100223.0-514204100607.1-521117279.02 2.84 6.52 +0.98 +0.82 K1III -0.068+0.015 +005 * -3979 BD+32 1982 87822 61882 7651 100229.3+320542100815.9+313615195.72 54.37 6.24 +0.45 +0.01 F4V -0.083-0.080 -008 8 0.3 0.2AB 4* -3980 31 LeoBD+10 2112 87837 98964 I 7649 100235.8+102916100754.3+095951228.95 47.89 4.37 +1.45 +1.75 +0.76 K3.5IIIbFe-1 -0.080-0.061 +041V? < 19: 7.7 7.9 * -3981 15Alp SexBD+00 2615 878871373662814 100249.1+000701100756.3-002218241.11 42.07 4.49 -0.04 -0.07 -0.05 A0III -0.016-0.013 +.015+007V? 9 -3982 32Alp LeoBD+12 2149 87901 98967 380I 7654A 4750 100302.8+122722100822.3+115802226.43 48.94 1.35 -0.11 -0.36 -0.10 B7V e-0.248+0.006 +.045+006SB 329 6.8 177.6AB 4* -3983 Mu 1ChaCP-81 399 879712585543980 100324.3-814351100043.7-821253297.28-21.29 5.52 +0.03 +0.05 A0IV -0.031+0.032 +016SB2 76 -3984 CD-36 6156 88013201081 100342.7-365040100801.7-372001270.36 14.99 6.36 +0.98 K0III -0.011+0.003 +001V -3985 BD-10 3000 88024155765 100350.3-102342100845.7-105305251.36 35.23 6.53 +0.02 +0.02 A2V +0.004-0.003 -009 -3986 BD-14 3036 88025155763 100345.8-150721100835.5-153642255.27 31.80 6.27 -0.01 -0.04 A0V -0.027+0.014 +009V 68 -3987 BD+41 2063 88161 43220 100457.3+410911101058.9+403941180.10 54.43 6.32 +1.25 gK3 -0.014-0.002 +014V? -3988 BD-11 2818 88182155777 100502.3-113613100956.5-120545252.65 34.57 6.24 +0.18 +0.15 +0.09 A5m -0.005-0.036 -014 -3989 17 SexBD-07 2972 88195137385 100509.4-075501101007.5-082430249.45 37.19 5.91 +0.02 -0.05 A1V -0.026-0.001 +016V? 100 * -3990 CD-51 4507 88206237736 100508.7-511914100856.3-514840279.15 3.40 4.86 -0.12 -0.69 -0.09 B3IV -0.010+0.001 +014V 229 * -3991 BD-12 3101 88215155780 100513.4-121917101005.9-124858253.29 34.08 5.31 +0.36 0.00 F5V -0.125-0.113 +.028+023SB1O 148 * -3992 CD-35 6194 882182011092816 W 100513.1-352158100931.8-355124269.69 16.36 6.13 +0.60 +0.16 F8V -0.437+0.014 +.048+041 4.7 2.3 * -3993 BD+38 2110 88231 619142817I 4764 100517.3+375341101112.8+372407185.68 54.90 5.85 +1.29 gK3 -0.021-0.031 +009 -3994 41Lam HyaBD-11 2820 88284155785 381I 7671 100542.7-115135101035.3-122115253.01 34.50 3.61 +1.01 +0.92 +0.48 K0IIICN1 -0.202-0.089 +.027+019SB1O < 19: 7.7 112.2AC 3* -3995 CP-65 1248 88323250836 W 100555.3-651932100842.6-654855287.29-08.02 5.28 +0.98 +0.75 K0III -0.072+0.042 -.014+000 4.2 63.3 -3996 18 SexBD-07 2977 88333137395 I 4767 100557.5-075530101055.8-082506249.63 37.33 5.65 +1.30 +1.42 K2III -0.006-0.044 +000V -3997 Mu 2ChaCP-80 423 88351258561 4744 100603.1-810443100407.6-813357296.93-20.72 6.60 +0.92 +0.53 G6-8III -0.046+0.047 -000V -3998 34 LeoBD+14 2217 88355 98991 7674 100615.5+135056101138.2+132118225.08 50.28 6.44 +0.46 +0.02 +0.27 F7V +0.040-0.036 -016 0.8 0.2 * -3999 CP-60 1701 88366250840 S Car 100610.6-610335100921.9-613257284.85-04.51 5.60 +1.60 +1.75 +1.54 M2-3IIIe -0.094+0.073 +289V? * -4000 BD-06 3096 883721374002818 100618.0-064925101117.8-071900248.70 38.16 6.25 +0.01 +0.01 A2Vn +0.012-0.014 +013SB -4001 CD-41 5658 88399221832 100625.3-411310101037.9-414254273.45 11.77 5.98 +1.24 +1.40 K2-3III +0.050-0.120 +033 -4002 CP-68 1034 88473250844 W 100701.7-681129100930.5-684100289.05-10.29 5.81 +0.02 -0.02 A0IV -0.008+0.010D+.007+010 0.1 0.8AB 3 -4003 CD-27 7266 88522178526 7681 100729.1-280644101202.9-283623265.45 22.43 6.28 +0.01 -0.01 A1V -0.026-0.014 +018V? 0.1 0.1 -4004 19 SexBD+05 2301 88547118164 100736.1+050632101248.3+043653236.56 46.03 5.77 +1.18 +1.11 gK0 -0.051-0.005 +032V? -4005 BD-18 2870 88595155820 100753.2-183922101237.8-190913258.87 29.82 6.44 +0.50 F6V -0.236-0.116 +034 -4006 BD+27 1862 88639 81243 100810.8+273751101349.8+270809203.65 55.08 6.04 +0.85 G3IIIFe-1 -0.018+0.002 +010SB * -4007 CP-58 1979 88647237773 V368 Car 100809.6-582005101135.2-584941283.50-02.12 6.40 +1.66 +1.75 +1.52 M3III -0.051+0.020 -010 * -4008 BD+60 1246 88651 151292821I U UMa 100813.7+602852101507.7+595908150.91 47.77 6.25 +1.60 M0III v+0.015+0.009 -021 * -4009 CP-57 2781 886612377762819 QY Car 100817.3-573400101146.5-580338283.08-01.48 5.72 -0.08 -0.91 -0.04 B2IVpne v-0.010+0.012 +031 360 * -4010 CD-51 4560 88693237784 100834.5-514012101223.0-520948279.79 3.41 6.16 +1.17 K2IIICNII -0.041+0.046 +011 -4011 CD-26 7752 88699178544 100843.3-263205101319.4-270144264.63 23.84 6.25 +0.31 A9mA8-F3 -0.056+0.038 +018V * -4012 BD+21 2165 88737 81250 100859.5+213957101429.7+211004213.71 53.85 6.02 +0.56 +0.12 F9V -0.142-0.082 +017V? 11 -4013 CD-32 7158 88742201186 100859.6-323218101324.8-330155268.58 19.10 6.38 +0.59 +0.09 G1V -0.360+0.061 +.055+042 -4014 22 LMiBD+32 2005 88786 61953 100921.8+315752101506.3+312805196.10 55.82 6.46R G8III -0.037-0.001 +015V? -4015 CD-39 6222 88809221877 W 100930.5-395102101345.9-402045273.12 13.23 5.90 +1.21 +1.25 K1III -0.078+0.017 +018V 7.0 4.7 -4016 BD+73 489 88815 7098 100935.7+733425101801.1+730424136.52 39.75 6.40 +0.23 -0.02 F2V -0.056-0.079 +016SB 42 -4017 CD-50 4924 88824237804 100931.1-504413101322.8-511400279.38 4.27 5.28 +0.25 A7V -0.041-0.026 +048 181 -4018 CP-59 1974 88825237799 100938.3-592522101301.3-595505284.27-02.92 6.10 -0.08 -0.48 -0.02 B4Ve -0.006 0.000 -002V? * -4019 CD-39 6225 88836221883 W 100940.6-394852101356.6-401838273.13 13.28 6.35 +0.94 G8III -0.026-0.002 +000 7.0 12.7 -4020 CD-51 4578 88842237807 W 4788 100937.7-511538101328.0-514522279.69 3.84 5.78 +0.14 A3IV-V -0.046+0.004 +018V? 1.5 0.3 -4021 BD+71 534 88849 7099 7705A 4802 100947.4+713336101750.6+710338138.45 41.12 6.66 +0.32 +0.20 A7m -0.031-0.048 +.026+011 =< 25 0.7 16.6AB 3* -4022 CP-61 1517 889072508752822 101005.6-610947101321.2-613932285.30-04.33 6.41 -0.11 -0.66 B2V -0.019-0.002 +013SB 55 * -4023 CD-41 5713 88955221895 382I' 101032.2-413735101444.2-420719274.33 11.88 3.85 +0.05 +0.06 +0.02 A2V -0.145+0.045 +.034+007SB 91 * -4024 23 LMiBD+30 1981 88960 812582823 101033.6+294832101614.4+291838199.96 55.90 5.35 +0.01 +0.01 A0Vn -0.075-0.023 +016V 139 * -4025 CP-65 1273 88981250880 101040.8-655236101330.6-662223288.01-08.19 5.16 +0.21 +0.18 +0.13 Am -0.039+0.004 +.012-015 24 * -4026 32 UMaBD+65 767 88983 151351262 101046.5+653626101802.0+650630144.61 45.02 5.82 +0.12 +0.10 A8III -0.087-0.009 -007V 100 -4027 24 LMiBD+29 2021 88986 81259 101048.1+291058101628.1+284057201.09 55.88 6.49 +0.60 +0.16 G0V -0.055-0.089 +030 =< 10 -4028 BD+18 2338 88987 99032 7704 101049.3+181417101616.1+174425219.37 53.09 6.55R A9IV -0.006+0.001D+.014-008V 0.3 1.1 * -4029 CD-35 6260 89015201211 101057.8-360114101520.9-363105271.08 16.52 6.19 +1.06 +0.93 K0III -0.033-0.005 +027 -4030 35 LeoBD+24 2207 89010 81260 I' 101100.1+240001101632.3+233011210.07 54.94 5.97 +0.67 G1.5IV-V -0.205+0.036 +.034-033SB =< 6 -4031 36Zet LeoBD+24 2209 89025 81265 384I W 4804 101107.7+235457101641.4+232502210.23 54.95 3.44 +0.31 +0.20 +0.19 F0III +0.018-0.007 +.017-016SB 84 2.3 325.9 * -4032 BD+26 2064 89024 81264 101106.7+255207101641.9+252217206.90 55.40 5.84 +1.20 +1.22 gK2 -0.107+0.029 +034V -4033 33Lam UMaBD+43 2005 89021 43268 383 101104.0+432450101705.8+425452175.87 55.09 3.45 +0.03 +0.06 -0.01 A2IV -0.164-0.038 +.030+018V 48 * -4034 BD-10 3029 89033155855 101113.4-104219101609.1-111212253.23 36.27 6.08 +1.10 K0 -0.013+0.008 +032V -4035 37 LeoBD+14 2228 89056 990342824I 101118.7+141337101640.7+134342225.42 51.54 5.41 +1.61 +1.95 M1.5IIIab -0.023-0.016 +003 -4036 CD-42 6074 89062221910 101119.6-423647101531.5-430645275.02 11.15 5.60 +1.52 K4III +0.009-0.064 +018 -4037 Ome CarCP-69 1178 89080250885 385 101121.6-693229101344.2-700217290.16-11.18 3.32 -0.08 -0.33 -0.03 B8III t-0.039+0.007 +007V 225 * -4038 CP-54 3356 89104237834 Var? 101134.2-542836101516.6-545827281.73 1.34 6.16 -0.17 -0.76 B2IV-V -0.015 0.000 +008V 104 * -4039 39 LeoBD+23 2207 89125 81270 7712 101144.5+233628101714.6+230622210.81 55.01 5.82 +0.50 -0.05 +0.27 F8Vb w -0.408-0.100 +.062+038 =< 6 6.0 7.6 * -4040 BD-19 2964 89169178610 7711 101201.2-201014101645.6-204014260.84 29.29 6.57 +0.48 F3V -0.127-0.038 -001V 3.5 1.3 -4041 BD+28 1867 89239 81278 101232.4+275454101810.3+272455203.42 56.08 6.52 -0.02 -0.10 A0V -0.057+0.006 +007 83 -4042 22Eps SexBD-07 3001 892541374691263 101239.6-073410101737.8-080408250.79 38.76 5.24 +0.31 +0.13 F2III -0.158+0.004 +.028+015V 76 * -4043 CP-59 2008 89263237853 W 101237.9-592418101603.1-595412284.58-02.69 6.22 +0.20 A5V -0.047+0.016D+.012+018 0.1 0.4 * -4044 BD+47 1761 89268 43281 W 101248.9+471543101859.0+464539169.34 54.28 6.43 K1III -0.021-0.030 -021 5.7 27.8 -4045 CD-50 4990 89273237858 GY Vel 101246.2-504221101640.2-511218279.80 4.58 6.30 +1.54 +1.75 M4-5III -0.028 0.000 +043 * -4046 BD+49 1940 89319 432852827 101314.1+485402101926.8+482349166.68 53.77 6.00 +1.02 K0 -0.097-0.107 -006 -4047 BD+69 568 89343 151472828 101326.1+691501102103.4+684451140.50 42.89 5.96 +0.20 +0.12 A7Vn -0.053-0.038 +004V 131 -4048 BD+25 2231 89344 81285 101326.5+251246101900.7+244242208.23 55.77 6.40R K0 -0.047-0.008 +000 -4049 CD-28 8070 893531786441265 AG Ant 101332.5-282931101807.6-285931266.85 22.93 5.34 +0.24 A0Ib-IIp -0.010+0.012 -033 * -4050 CP-60 1817 893882509051264 W V337 Car 101344.5-604957101705.0-611956285.48-03.80 3.40 +1.54 +1.72 +0.77 K3IIa -0.024+0.005 +.027+008 9.2 16.4AB 3* -4051 BD+54 1366 89389 27606 101348.4+541646102014.8+534645158.57 51.58 6.45 +0.54 +0.08 F9V -0.084+0.046 -021 =< 6 -4052 BD+54 1367 89414 276092829 101403.1+544308102031.2+541301157.93 51.40 6.00 +1.13 gK3 -0.032-0.002 +009V? -4053 CD-36 6281 89442201266 101414.0-361814101837.8-364817271.81 16.67 6.30 +1.28 K2-3III -0.043+0.008 +002V -4054 40 LeoBD+20 2466 89449 99065 4822 101417.6+195842101944.1+192815217.12 54.48 4.79 +0.45 +0.01 +0.23 F6IV -0.234-0.214 +.052+007V? 16 * -4055 BD-11 2851 89455155894 W 101422.2-120134101916.8-123141255.04 35.83 6.00 +0.26 A9V -0.014-0.019 -016 112 1.3 0.6 -4056 CD-41 5765 89461221948 101412.6-411004101828.2-414006274.65 12.65 5.96 -0.06 B9V -0.027+0.006 +023 -4057 41Gam1LeoBD+20 2467 89484 81298 I 7724A 4823 101427.6+202051101958.3+195030216.55 54.65 2.61 +1.15 +1.00 +0.62 K1-IIIbFe-0.5 +0.306-0.147 +.022-037SB < 17 1.2 4.5AB 4* -4058 41Gam2LeoBD+20 2467 89485 81299 I 7724B 4823 101427.8+202049101958.6+195026216.55 54.65 3.80H G7IIIFe-1 +0.312-0.169 +.022-036V 1.2 4.5AB 4* -4059 BD-04 2840 89490137490 101430.1-043609101932.2-050621248.44 41.16 6.37 +0.90 +0.60 K0 -0.053-0.061 +016 -4060 BD-08 2897 89565137495 101501.5-083318101959.4-090332252.21 38.47 6.32 +0.33 +0.03 F1IV -0.067-0.068 +015V 90 -4061 CP-55 3220 89569237902 101459.0-553644101837.6-560636282.76 0.66 5.81 +0.48 F6V -0.253+0.127 +011 -4062 BD+84 234 89571 1701 101509.2+844537102941.5+841508126.85 31.76 5.50 F0IV -0.129-0.032 +.034+004V 105 * -4063 CP-54 3474 896822379162830 GZ Vel 101551.2-543137101936.8-550146282.28 1.64 4.57 +1.62 +1.82 +0.87 K3II -0.014+0.003 -.008+013 * -4064 23 SexBD+03 2352 896881182481266 RS Sex 101552.1+024734102102.0+021723241.02 46.28 6.66 -0.08 -0.67 B2.5IV -0.007-0.003 +005V * -4065 CP-64 1248 89715250917 W 101558.8-641028101904.8-644035287.53-06.46 5.67 +0.05 +0.05 A1V -0.043+0.007 +010 0.1 2.4 * -4066 CD-47 5790 897362219702831 101612.0-471147102016.7-474157278.33 7.82 5.65 +1.67 K5-M0III -0.002+0.001 +016 -4067 BD+41 2076 89744 43309 101613.9+414414102210.5+411346178.39 56.39 5.76 +0.54 +0.08 F7V -0.124-0.136 +.041-007V 8 -4068 BD-17 3129 89747155920 101619.0-172851102107.8-175906259.77 32.01 6.51 +0.40 F3III-IV -0.051-0.028 +023V? 34 -4069 34Mu UMaBD+42 2115 89758 43310 386I 4829 101622.4+420009102219.7+412958177.90 56.36 3.05 +1.59 +1.89 +0.96 M0III e-0.082+0.035 +.035-021SBO * -4070 42 LeoBD+15 2192 89774 99080 4828 101627.6+152847102150.3+145832224.49 53.21 6.12 +0.02 -0.02 A1V -0.035-0.015 +009V 65 * -4071 BD-22 2904 898161787212832 101646.3-231227102128.7-234239263.97 27.59 6.50 +0.20 +0.15 A3 -0.049+0.019 +013 -4072 BD+66 664 89822 15163 387 4839 101655.5+660420102407.9+653359143.54 45.22 4.97 -0.06 -0.13 -0.06 A0pSiSr:Hg: -0.008-0.022 +.043-000SB2O 15 * -4073 BD-21 3045 89828178723 7739 101652.1-220129102136.0-223142263.18 28.54 6.51 +0.07 A0 -0.030+0.006D+.006+012 1.5 1.8 -4074 CP-55 3286 89890237959 W A 101711.5-553222102054.8-560235282.99 0.89 4.50 -0.12 -0.58 -0.09 B3IIIe v-0.016+0.003D+.008+010 81 3.7 7.1AB 3* -4075 27 LMiBD+34 2120 89904 620101267 101720.8+342447102306.3+335429191.68 57.53 5.90 +0.14 +0.10 A6V -0.013-0.005 -015V 150 -4076 BD-19 2987 89911155935 101725.9-192144102212.9-195201261.40 30.72 6.13 +0.03 A1V -0.031-0.001 +011SB2 50 * -4077 43 LeoBD+07 2289 89962118269 101746.5+070302102300.4+063233236.37 49.21 6.07 +1.12 +1.14 +0.37E K3III -0.018-0.100 -024V * -4078 BD+30 2005 89993 81328 101802.3+300718102341.8+293657199.69 57.54 6.39 +1.09 +0.94 G8III -0.006-0.010 -013 -4079 BD+06 2301 899951182712833 W 101803.0+061205102314.6+054139237.48 48.77 6.54 +0.46 -0.04 F6V -0.241-0.073 +.007+030 23 2.5 58.6 -4080 CD-41 5809 899982219981268 4837 101802.1-410848102219.6-413900275.25 13.07 4.83 +1.12 +1.08 +0.58 K1III -0.022+0.056 +.024+021 -4081 28 LMiBD+34 2123 90040 62019 I 101823.7+341328102408.6+334307192.02 57.75 5.50 +1.18 gK1 -0.019-0.003 -022V? -4082 25 SexBD-03 2911 90044137533 388 SS Sex 101823.2-033407102326.5-040427248.33 42.58 5.97 -0.10 -0.17 B9pSiCr:Sr: v-0.050+0.005 +023 * -4083 CD-29 8306 90071178759 101837.9-293923102313.1-300944268.56 22.64 6.27 +0.31 +0.05 F0III +0.006-0.011 -013V -4084 BD+83 297 90089 1714 911 4864 101854.9+830403103104.6+823331128.03 33.13 5.26 +0.37 -0.05 F2V -0.083+0.031 +.047+007V 107 -4085 BD+03 2358 90125118278 7755 101902.9+025230102413.1+022205241.65 46.96 6.32 +1.00 +0.74 G9V +0.037-0.023 -014 0.3 212.2AC 3* -4086 CD-37 6509 901322013461269 101906.5-373008102329.3-380036273.35 16.22 5.33 +0.25 A8V -0.158-0.057 +.015+017 208 -4087 CD-41 5833 90170222016 101923.8-412650102340.4-415712275.64 12.96 6.27 +0.88 +0.60 G8IV -0.130+0.011 +022 * -4088 44 LeoBD+09 2351 902541182862835I DE Leo 101959.0+091736102515.2+084705233.95 50.92 5.61 +1.62 +1.97 M3IIIabs +0.014-0.042 -020V * -4089 CP-66 1243 902642509402834 102000.2-662344102258.1-665406289.10-08.11 4.99 -0.13 -0.51 B8V v-0.024+0.008 +012SB2 79: * -4090 30 LMiBD+34 2128 90277 62038 102011.0+341820102554.9+334746191.85 58.11 4.74 +0.25 +0.17 +0.14 F0V -0.070-0.061 +014V 31 -4091 CP-57 3127 90289238021 4846 102011.2-572649102350.9-575714284.35-00.51 6.35 +1.52 +1.78 K4III -0.001-0.006 -013 -4092 BD-06 3146 903621375572836I 102044.3-063320102544.3-070335251.72 40.89 5.57 +1.52 +1.86 +0.95 K5:IIIbFe-0.5 -0.135+0.136 +032 -4093 CD-41 5850 90393222041 102059.6-415733102517.2-422805276.18 12.69 6.18 +1.00 G8III -0.002-0.034 -005 -4094 42Mu HyaBD-16 3052 90432155980 389I 102115.2-161933102605.4-165011259.99 33.65 3.81 +1.48 +1.82 +0.83 K4.5III -0.128-0.080 +.018+040V < 19: -4095 CP-57 3164 90454238046 102121.8-580407102459.4-583435284.81-00.95 5.95 +0.32 F2III -0.077+0.009 +005 -4096 BD+42 2123 90470 43344 102132.7+420644102728.0+413603177.30 57.27 6.02 +0.17 +0.08 A2V -0.055-0.076 +007 -4097 BD+20 2487 90472 991282837 102134.2+195225102700.5+192152218.32 56.05 6.15 +1.14 K0 -0.064-0.012 +032 -4098 BD+49 1961 90508 43351 W 102153.6+491908102803.8+484705165.08 54.91 6.44 +0.60 +0.05 +0.24E F9V +0.079-0.884 +.053-007V 3 6.0 4.7 * -4099 CD-42 6222 90518222047 102153.1-421343102609.5-424420276.47 12.55 6.13 +1.13 +1.08 K1III -0.127-0.052 +023 -4100 31Bet LMiBD+37 2080 90537 62053 390I 7780 102206.1+371311102753.0+364226186.28 58.28 4.21 +0.90 +0.64 +0.46 G9IIIab -0.118-0.101 +.022+006SBO < 19: 1.7 0.5 * -4101 45 LeoBD+10 2152 90569 99136 7781 CX Leo 102222.0+101620102739.0+094545233.13 51.94 6.04 -0.06 -0.09 A0pSiCr: +0.007+0.002 -008SBO 26 6.3 37.2 3* -4102 CP-73 733 90589256710 391 4856 102224.7-733122102423.7-740154293.16-14.02 4.00 +0.35 -0.01 +0.19 F2IV -0.021-0.026 +.086-004SB 55 -4103 BD+45 1832 90602 433562838 102235.0+454323102836.5+451244170.89 56.38 6.35 +1.32 +1.40 K0 -0.021-0.019 -004 -4104 Alp AntCD-30 8465 90610201405 392I 4862 102234.5-303331102709.1-310404269.88 22.39 4.25 +1.45 +1.63 +0.79 K4III -0.075+0.011 +.024+012SB * -4105 CP-73 735 90630256711 102244.3-732749102444.3-735818293.15-13.96 6.19 +0.07 +0.11 A2-3V -0.032+0.017 -003V? -4106 35 UMaBD+66 671 90633 15196 102248.4+660817102954.3+653734142.91 45.63 6.32 +1.14 gK2 0.000-0.032 -025V? -4107 CP-54 3651 90677238067 102257.6-542204102649.0-545239283.07 2.32 5.58 +1.56 K3II-III -0.007-0.008 +006 -4108 BD+64 789 90745 152002839 102329.3+644615103026.6+641527144.32 46.59 6.12 +0.16 +0.12 A7III -0.047-0.059 -013V 105 -4109 BD-03 2929 90763137591 Var? 102339.8-031351102844.0-034433249.25 43.76 6.05 +0.05 +0.04 A1pSr: +0.004-0.027 -026 * -4110 CP-57 3256 90772238077 V399 Car 102340.9-570743102724.4-573820284.59 0.01 4.66 +0.51 +0.02 +0.48 A9Ia -0.013 0.000 -.012-001 42 * -4111 CD-48 5655 90798222081 4868 102356.2-485338102801.9-492420280.35 7.07 6.10 +1.51 +1.76 K4III +0.006-0.036 +090 * -4112 36 UMaBD+56 1459 90839 27670 394 102413.8+562936103037.6+555850154.29 51.70 4.84 +0.52 -0.01 +0.28 F8V -0.176-0.030 +.077+009 0 3.4 139. AC 3* -4113 32 LMiBD+39 2357 90840 62076 102416.3+392613103006.4+385531181.98 58.36 5.77 +0.08 +0.14 A4V -0.017-0.002 +002SB? 70 -4114 CP-58 2227 90853238085 393 4869 102412.4-581343102752.7-584422285.22-00.90 3.82 +0.31 +0.24 +0.24 F2II -0.013 0.000 +.010+009 22 * -4115 CP-65 1354 90874250966 102416.1-651141102725.3-654217288.83-06.86 6.01 +0.09 +0.11 A2V -0.082+0.023 +006 -4116 29Del SexBD-02 3155 908821376001270 102423.9-021338102928.7-024421248.42 44.59 5.21 -0.06 -0.12 B9.5V -0.048-0.014 +019V 191 -4117 CD-29 8381 90957178888 I 102451.7-290908102929.0-293949269.46 23.83 5.58 +1.42 +1.72 K5III -0.059+0.015 -005V -4118 Del AntCD-29 8383 90972201442 W 4876 102459.1-300543102935.4-303626270.06 23.06 5.56 -0.04 -0.18 B9.5V -0.033 0.000D+.002+014SB2 0 3.9 10.9 * -4119 30Bet SexBD+00 2663 909941376082841 Bet Sex 102510.7-000727103017.5-003813246.42 46.17 5.09 -0.14 -0.52 -0.14 B6V -0.040-0.023 +012 114 * -4120 CP-63 1440 91056250979 102533.0-633938102852.6-641020288.16-05.47 5.29 +1.86 +2.10 M0III -0.013+0.006 +.010-003 * -4121 BD+81 343 91075 17352845 102544.3+810036103601.7+802940129.37 34.87 6.52 +0.95 +0.74 gG4 -0.027-0.006 -011 -4122 BD-06 3173 91106137614 I 7808 102558.3-070728103058.7-073815253.49 41.37 6.20 +1.38 +1.18 K5III+F6V -0.039+0.005 +007SB 2.3 2.8AB 3* -4123 BD-12 3181 91120156029 Var? 102605.0-130431103059.8-133518258.57 36.91 5.58 -0.04 -0.16 -0.04 B9Vn e-0.045+0.009 +013SB 310 * -4124 33 LMiBD+33 1999 91130 62101 7813 102610.8+325334103151.4+322246194.53 59.39 5.90 +0.11 +0.05 A0IV +0.015+0.006 -015V 125 6.6 43.3 * -4125 CD-25 8084 91135178917 102610.1-255816103051.4-262902267.74 26.62 6.51 +0.54 F7III -0.065+0.015 +016 -4126 BD+76 393 91190 7164 395I 102636.2+761342103505.5+754247133.12 38.59 4.84 +0.96 +0.72 G8.5III -0.030-0.003 +.027+017 < 19: -4127 46 LeoBD+14 2255 91232 991721272I 4883 102651.5+143902103211.8+140814227.68 55.08 5.46 +1.68 +2.04 M1.5IIIbCa-1 -0.042+0.024 -.008+034V? * -4128 CP-60 1945 91270250992 W 102705.6-605036103039.2-612122286.87-02.95 6.43 +1.76 +1.84 M2IIIe -0.003+0.022 -004V 1.2 82.6 * -4129 CP-66 1291 91272250989 4881 102702.4-662817103008.7-665906289.74-07.80 6.19 +0.01 -0.53 B4IV -0.025-0.008 -008V -4130 CD-27 7503 91280178938 102709.2-274323103148.6-281415269.04 25.30 6.05 +0.51 F7V -0.086-0.016 -021V -4131 BD+54 1381 91311 27682 102727.4+540047103343.6+532951157.30 53.44 6.45R A1V -0.047-0.025 +002 127 * -4132 BD+41 2101 91312 433792844 7826 102723.9+405625103313.9+402532178.93 58.62 4.75 +0.23 +0.08 +0.09 A7IV -0.140+0.006 +.031+009SBO 132 7.0 19.3 * -4133 47Rho LeoBD+10 2166 91316118355 396 W Rho Leo 102732.7+094917103248.7+091824234.89 52.77 3.85 -0.14 -0.96 -0.16 B1Ib -0.007-0.003 +.011+042SB 61 0.4 0.0 * -4134 CP-53 3909 91324238146 W 102728.6-531226103121.8-534256283.04 3.66 4.89 +0.50 +0.29 F6V -0.418+0.205 +.050+020 3.5 46.4 * -4135 CD-44 6583 91355222126 W A 102741.1-443309103157.5-450400278.63 11.12 5.74 -0.15 -0.71 B6II 0.000-0.002 -000 0.4 13.7 * -4136 CD-44 6582 91356222125 W B 102740.2-443319103156.6-450410278.63 11.12 6.09 -0.11 -0.47 B8II -0.013+0.006 -009V 0.4 13.7 * -4137 34 LMiBD+35 2154 91365 62121 102747.9+353014103330.9+345919189.36 59.60 5.58R +0.02 +0.04 A2Vn -0.029-0.006 +007V 153 -4138 CP-71 1034 913752567222842 102748.7-712842103020.1-715935292.41-12.07 4.74 +0.04 +0.07 +0.02 A1V +0.025-0.037 +.014+008 20 * -4139 CD-43 6347 91437222129 102816.1-440611103233.6-443708278.49 11.56 5.91 +0.92 G6-8III -0.011-0.032 -010 -4140 CP-61 1704 91465251006 397 PP Car 102828.0-611015103201.4-614107287.18-03.15 3.32 -0.09 -0.72 -0.07 B4Vne v-0.019+0.009 +026 303 * -4141 37 UMaBD+57 1277 91480 27695 398 102843.4+573552103509.7+570458152.26 51.57 5.16 +0.34 -0.02 +0.17 F1V +0.067+0.039 +.036-010V 87 * -4142 CP-72 981 91496256723 W 4886 102842.1-724226103102.0-731318293.12-13.08 4.93 +1.68 +1.83 +0.93 K4-5III -0.017-0.001 +011 7.6 32.0 * -4143 CD-46 6205 915042221361273 W 102843.6-462918103256.9-470012279.80 9.55 5.02 +1.04 +0.59 K4III -0.019+0.003 +.010+004 4.0 40.2 * -4144 CP-58 2285 91533238168 102902.9-580905103247.6-584001285.73-00.50 6.00 +0.32 -0.07 A2Iab -0.024 0.000 +010 * -4145 44 HyaBD-22 2946 91550178979 399I 7834 102915.4-231347103400.9-234443266.62 29.27 5.08 +1.60 +1.82 K4III -0.008+0.021 +.017-004V? 8.7 19.1 -4146 48 LeoBD+07 2330 916121183762846I 102935.0+072807103448.0+065713238.51 51.84 5.08 +0.94 +0.64 +0.48 G8.5IIIFe-1Ca-1 -0.102+0.056 +.034+005V? < 19: * -4147 CP-57 3431 91619238182 V369 Car 102938.5-574028103325.3-581125285.56-00.05 6.14 +0.35 -0.44 B7Iae v-0.017-0.003 +007 52 * -4148 49 LeoBD+09 2374 91636118380 7837 TX Leo 102947.3+091002103502.2+083901236.30 52.86 5.67 +0.05 +0.05 A2V -0.055-0.006D+.005+017SB1O=< 39 2.0 0.0 3* -4149 BD-22 2952 91706178993 103012.1-223937103457.7-231034266.45 29.86 6.10 +0.50 +0.01 F7V -0.098+0.036 +012V -4150 35 LMiBD+37 2100 91752 62147 103037.2+365044103621.4+361937186.58 60.01 6.28 +0.39 -0.03 F3V +0.036-0.037 -024V 8 -4151 CP-60 1983 91767251014 4898 103034.4-602815103412.9-605916287.05-02.42 6.23 +1.40 +1.55 K2-3III +0.004-0.003 -001 * -4152 BD-17 3187 91790156087 103047.8-180307103538.9-183409263.42 33.69 6.49 +0.20 A7V +0.009+0.008 -007 -4153 CD-38 6579 91793201533 U Ant 103046.3-390244103512.9-393346276.22 16.14 5.38 +2.88 +7.1 +1.37 N0: v-0.027-0.001 +037 * -4154 CD-43 6395 91805222170 W 103050.3-430854103510.5-433953278.40 12.62 6.08 +0.94 +0.71 0.00 G8II-IIICNVp -0.030+0.023 +008 8.4 14.7 * -4155 BD-09 3108 91858156092 103118.8-100352103617.4-103500257.37 40.04 6.57 +0.29 F0V +0.018-0.033 -022 112 -4156 Phi2HyaBD-15 3087 91880156093 I 7847 103123.6-154935103616.7-162040261.94 35.55 6.03 +1.65 +1.86 M1III -0.026-0.001 +016V 7.0 3.4 * -4157 CD-26 8022 91881179014 7846 4907 103121.5-260919103604.6-264030268.94 27.12 6.29 +0.48 F5V +0.009-0.062D+.020-023SB 1.0 1.0 * -4158 BD-11 2918 918891560951274 W 103133.6-114136103632.4-121349258.78 38.82 5.70 +0.52 0.00 F7V +0.268-0.673 +.048-006 5.1 14.4 * -4159 CP-56 3544 91942238222 4904 103144.7-570223103535.3-573328285.49 0.64 4.45 +1.62 +1.79 +0.84 K3-4II -0.023 0.000 +.026+010SB -4160 BD-10 3094 91992156105 103214.4-111344103711.6-114455258.56 39.29 6.52 +0.29 F0V -0.051-0.032 +009 176 -4161 CP-81 449 92029258581 W 103226.2-812417103151.0-815516298.01-20.42 7.07 -0.08 -0.51 B5III-IV -0.033+0.008 +007 2.5 41.9 * -4162 CD-26 8033 920361790412848I 103232.0-265340103713.7-272445269.64 26.65 4.89 +1.62 +1.95 +0.82E M2III -0.109+0.024 +.010+017 -4163 BD-12 3218 92055156110 I U Hya 103236.9-125152103733.2-132304259.97 38.07 4.82 +2.68 +5.78 +1.27 C5II +0.034-0.032 -025V? * -4164 CP-58 2371 92063238242 4909 103235.8-590241103620.3-593353286.57-01.05 5.08 +1.18 +1.20 K1III -0.059-0.053 +.038-013 -4165 BD+54 1387 92095 277242849I 103253.6+541125103905.7+534006156.32 54.01 5.52 +1.27 +1.34 K3III -0.087-0.074 +045V? -4166 37 LMiBD+32 2061 92125 621731275I 103305.6+322945103843.2+315834195.30 60.85 4.71 +0.81 +0.54 +0.38 G2.5IIa 0.000+0.008 +.021-007V < 19: -4167 CD-47 6042 92139222199 I'W 103305.8-474222103718.1-481333281.06 8.87 3.84 +0.30 +0.07 +0.16 F4IV+F3 -0.155-0.017 +.040+019SB2O 0 0.9 0.3 * -4168 38 LMiBD+38 2166 92168 621782852 103324.6+382553103907.6+375436183.25 60.29 5.85 +0.57 +0.17 F9V -0.222-0.044 +.038+007SBO * -4169 CP-58 2411 92207238271 V370 Car 103338.3-581250103726.8-584400286.29-00.26 5.45 +0.50 -0.24 A0Iae v-0.033+0.002 -009SB 56 * -4170 CP-75 678 922092567302847 103334.0-754726103524.8-761833295.03-15.57 6.30 +1.20 +1.27 K2III -0.018+0.004 +018V -4171 Phi3HyaBD-16 3100 922141561222850I 103342.5-162126103835.0-165236262.88 35.46 4.91 +0.92 +0.68 G8IIIFe-0.5 -0.097+0.027 +.014+018SB1O < 17 * -4172 BD-11 2925 92245156124 103353.7-115525103850.4-122637259.53 39.00 6.04 0.00 A0Vn -0.057+0.002 +012 210 -4173 CP-56 3588 92287238278 103409.1-564411103802.5-571523285.63 1.07 5.91 -0.14 -0.63 B3IV -0.028+0.002 -009SB * -4174 Gam ChaCP-77 622 92305256731 401I' 4913 103417.3-780521103528.1-783628296.28-17.53 4.11 +1.58 +1.95 +0.97 M0III -0.042+0.014 +.009-022 -4175 CD-42 6390 923282222222853 W 103426.7-421358103850.3-424513278.52 13.74 6.11 +0.66 +0.43 Am+Am: -0.016-0.016 +016 0.1 0.2 -4176 BD+69 583 92354 15260 I 103441.7+685757104148.3+682636138.94 44.44 5.75 +1.30 gK3 -0.026-0.026 -.000+005V? -4177 CP-58 2460 92397238295 W 4922 103456.5-583945103845.1-591059286.65-00.57 4.66 +1.48 +0.97 +0.90 K4-5III: -0.012+0.001 +.016+011 3.4 14.6 * -4178 38 UMaBD+66 678 92424 152612855I 4936 103507.5+661425104156.6+654259141.57 46.45 5.12 +1.20 +1.28 +0.57 K2III v-0.162-0.069 +.026-011SB < 19: -4179 CP-58 2474 92436238304 W 103510.5-581747103859.4-584901286.50-00.24 5.92 +1.65 +1.96 +1.22 M1III -0.086+0.012 +081 2.7 23.5 * -4180 CP-54 3915 92449238309 402 W 103519.5-550456103918.4-553612284.98 2.59 4.28 +1.04 +0.75 +0.47 G2-3Ib -0.019+0.005 +.023+020 2.2 51.8AB 3* -4181 BD+69 586 92523 15269 403I 103554.7+693558104304.1+690434138.24 44.04 5.00 +1.38 +1.54 +0.73 K3III-IIIb +0.002-0.012 +.005-000 < 19: -4182 33 SexBD-00 2364 92588137728 404 103618.9-011257104124.2-014430250.38 47.42 6.26 +0.88 +0.59 +0.45 K1IV -0.137-0.121 +.026+043V? -4183 CD-35 6646 925892016312856 W 103617.5-351311104051.6-354430275.16 19.99 6.37 +0.92 G8-K0III+F-G -0.021+0.001 +011V 2.5 0.6 -4184 BD+32 2066 92620 62206 I W RX LMi 103635.2+321313104211.3+314149195.85 61.59 6.02 +1.62 +1.83 +1.13E M4III +0.008-0.021 +016V 4.0 112.5 * -4185 CP-64 1403 92664251059 V364 Car 103643.5-643442104011.3-650602289.68-05.66 5.52 -0.16 -0.57 B9pSi -0.027+0.003 +030 66 * -4186 CP-73 758 92682256742 103654.8-735818103916.6-742937294.30-13.88 6.07 +1.71 +1.91 K3II 0.000-0.006 -004 -4187 39 UMaBD+57 1286 92728 27748 103724.6+574328104343.3+571157150.95 52.42 5.80 -0.02 -0.09 A0V s +0.017-0.053 -015V? 27 -4188 CP-59 2450 92740238353 4939 103728.2-590915104117.6-594037287.17-00.85 6.42 +0.08 -0.82 WN7-A -0.006-0.001 +033SBO * -4189 40 LMiBD+27 1927 92769 81485 7899 103732.4+265103104301.8+261932207.12 61.40 5.51 +0.17 +0.09 A4Vn -0.105-0.063 +010 162 6.3 18.4AB 4* -4190 BD-13 3197 92770156170 I 103735.2-132705104231.3-135830261.64 38.35 6.24 +1.54 K2 -0.020-0.002 -009V -4191 BD+46 1657 92787 434441276 W 103740.4+464346104332.9+461214167.29 58.39 5.18 +0.33 +0.01 F5III -0.269-0.066 +.021+004SB 52 2.8 286.9AB 5* -4192 41 LMiBD+23 2253 92825 81490 405 103758.7+234243104325.0+231118213.52 60.84 5.08 +0.04 +0.05 A3Vn -0.116+0.009 +.016+019V 154 -4193 35 SexBD+05 2384 92841118449 7902A 103809.4+051621104320.9+044452243.46 52.16 5.79 +1.17 +1.09 K3III+K0III +0.022-0.030D+.003-006SB 1.1 6.7AB 3* -4194 CD-32 7572 928452016651277 W 103805.0-321132104243.2-324257273.85 22.79 5.64 0.00 0.00 A0V -0.029+0.002 +004 131 8.2 17.4 -4195 BD+68 617 92839 15274 I VY UMa 103807.4+675609104504.0+672441139.59 45.41 6.00 +2.39 +4.62 +1.27 C5II +0.005-0.001 -005 * -4196 CP-63 1589 92938251078 103841.1-635635104214.0-642759289.56-05.00 4.82 -0.14 -0.58 B4V -0.026+0.018 +024 138 * -4197 BD+20 2514 92941 81496 103851.6+201702104414.5+194531220.27 60.00 6.27 +0.17 A5V -0.116-0.026 +005SB 168 -4198 CP-58 2581 92964238379 4948 103848.6-584131104240.6-591257287.11-00.36 5.38 +0.26 -0.65 +0.36 B2.5Iae v-0.009 0.000 -002 68 * -4199 The CarCP-63 1599 93030251083 406I 103923.3-635214104257.4-642340289.60-04.90 2.76 -0.22 -1.01 -0.23 B0Vp v-0.023+0.010 +024SB 151 * -4200 CP-59 2532 93070251090 4951 103943.8-600232104332.1-603400287.84-01.50 4.57 +1.71 +1.87 +0.99 K4III -0.032+0.006 +.020+009SB * -4201 36 SexBD+03 2408 93102118473 D 104000.3+030050104509.4+022917246.68 51.02 6.28 +1.21 +1.28 K4III -0.051-0.023 +011V 0.0 0.0 * -4202 41 UMaBD+58 1281 93132 27760 I 104006.4+575336104622.5+572157150.36 52.58 6.34 +1.56 +1.90 M1III -0.050-0.064 -002 * -4203 42 LMiBD+31 2180 93152 62236 407 W 104018.3+311233104551.9+304056198.01 62.38 5.24 -0.06 -0.14 A1Vn -0.023-0.037 +012SB 125 2.8 198.1 -4204 CP-63 1619 93163251095 Var? 104015.4-634327104351.2-641456289.61-04.73 5.77 0.00 -0.57 -0.03 B2.5V -0.014+0.006 +011 12 * -4205 CP-63 1623 93194251096 104029.7-632610104406.9-635740289.50-04.46 4.82 -0.13 -0.62 -0.13 B5Vn -0.019+0.013 +026 260 * -4206 CP-79 548 93237256745 104048.2-791533104151.3-794700297.18-18.39 5.97 -0.07 -0.51 B4IVe -0.031+0.010 +018V * -4207 BD+07 2356 932441184831278 104053.3+065401104605.7+062223242.08 53.72 6.37 +1.12 +1.12 gK1 -0.008-0.036 -009V * -4208 51 LeoBD+19 2371 93257 992811279I 104101.3+192508104624.5+185329222.26 60.16 5.49 +1.12 gK3 +0.097-0.038 -006 -4209 52 LeoBD+14 2294 93291 992822860 104107.5+144322104625.3+141141230.54 58.15 5.48 +0.91 +0.59 gG4 -0.123-0.066 +035V -4210 Eta CarCP-59 2620 93308238429 I W Eta Car 104110.8-590931104503.6-594103287.60-00.63 6.21 +0.61 -0.45 +0.49 pec -0.004+0.009 -025 0.1 0.2AP 15* -4211 CP-70 1183 93344256750 W A 104118.8-702002104419.4-705136292.82-10.53 6.26 +0.20 +0.17 A5IV-V -0.075-0.007 +010 0.2 63.0AB 3* -4212 CP-70 1185 93359256751 W B 104130.9-701946104432.1-705118292.83-10.51 6.46 +0.23 +0.14 A6IV -0.060+0.007 +015 0.2 63.0AB 3* -4213 CP-71 1118 93372256752 104139.9-715509104426.5-722638293.60-11.91 6.27 +0.49 +0.01 F6V -0.175+0.040 +019 -4214 BD-16 3124 93397156221 104158.0-164610104652.0-171748265.16 36.28 5.42 +0.11 +0.14 +0.04 A3V -0.020-0.013 -014V? -4215 BD+65 803 93427 15298 104209.2+653936104850.0+650756141.38 47.36 6.39 -0.02 -0.04 A1V +0.010 0.000 -005V 170 -4216 Mu VelCD-48 5913 93497222321 I'W 104228.0-485330104646.2-492512283.03 8.57 2.69 +0.90 +0.57 +0.49 G5III+G2V +0.074-0.048D+.022+006SB 3.7 1.7 * -4217 CP-59 2671 93502251113 W 104226.3-600435104616.8-603612288.16-01.37 6.25 +0.04 +0.03 A0IV -0.062-0.008 +008SB2 7.8 4.2 * -4218 BD-14 3186 93526156235 7930 104242.1-144403104738.0-151543263.88 38.05 6.67 -0.01 A0III +0.002-0.014D+.012+022SB 1.2 74.7AC 3 -4219 CP-63 1646 93540251115 104239.1-635916104616.5-643054289.97-04.84 5.34 -0.10 -0.45 B6V e-0.025-0.005 +032 228 * -4220 CP-63 1649 93549251117 W 104250.9-634411104629.7-641548289.88-04.61 5.23 -0.07 -0.47 B7IV -0.008+0.012 +012V 201 0.1 0.1 * -4221 CP-56 3800 93563238468 Var? 104255.3-561348104657.5-564526286.46 2.08 5.23 -0.08 -0.33 B8-9IIIe v-0.016-0.002 +031 218 * -4222 CP-63 1655 93607251120 104312.6-635123104651.2-642300289.97-04.69 4.85 -0.15 -0.65 -0.18 B3IV -0.023+0.012 +016 202 * -4223 43 LMiBD+30 2072 93636 81533 104326.3+295643104857.2+292457200.81 63.01 6.15 +1.15 +1.06 sgK1 -0.086-0.041 +.038+010 -4224 BD-01 2446 93655137800 I 104334.5-012551104840.6-015732252.55 48.53 5.93 +1.60 +1.94 M2III -0.012+0.008 +003 -4225 CD-31 8536 93657201766 104332.9-310935104814.2-314118274.38 24.27 5.88 +0.03 +0.04 A1V -0.020-0.013 +021V -4226 CP-56 3821 93662238480 4975 104337.4-565623104738.7-572804286.87 1.49 6.36 +1.62 +1.86 M1II +0.010-0.004 +002 * -4227 53 LeoBD+11 2283 93702 99305 409 104400.0+110428104915.4+103243237.00 56.82 5.34 +0.03 +0.02 A2V -0.003-0.025 +.007-007SB 191 -4228 CP-59 2720 937372384932862 104410.4-592328104805.4-595509288.04-00.66 6.00 +0.27 -0.30 A0Ia-Iab -0.001+0.006 -024 * -4229 40 SexBD-03 2999 93742137808 7936 104413.0-032943104917.3-040127254.80 47.11 6.61 +0.22 +0.08 A2IV -0.049-0.012D+.011+014 0.7 2.2 -4230 44 LMiBD+28 1931 93765 815422863 104424.0+283007104953.7+275826204.02 63.12 6.04 +0.37 -0.01 F3V -0.011+0.031 +003V? 22 -4231 Del1ChaCP-79 554 93779258592 W 104419.3-795630104515.7-802811297.68-18.91 5.47 +0.95 +0.75 K0III -0.038-0.033D+.003+011 0.3 0.6 -4232 Nu HyaBD-15 3138 93813156256 410I 104441.4-154013104937.5-161137265.05 37.56 3.11 +1.25 +1.30 +0.64 K2III +0.094+0.200 +.028-001 < 17 -4233 BD-09 3147 93833137815 104443.1-091922104943.5-095110260.17 42.69 5.86 +1.07 +0.91 gG8 +0.009-0.037 +040V? -4234 Del2ChaCP-79 556 93845258593 411 104451.0-800046104546.8-803225297.74-18.96 4.45 -0.19 -0.70 -0.20 B2.5IV -0.049+0.008 +023 55 * -4235 43 UMaBD+57 1294 93859 27791 104501.3+570642105111.1+563456150.63 53.59 5.67 +1.12 K2III -0.058+0.003 +015 -4236 42 UMaBD+60 1296 93875 277932865I 104506.6+595104105123.7+591912147.28 51.76 5.58 +1.14 +1.15 K2III -0.036-0.047 -017SB -4237 41 SexBD-08 3018 939031378231281 7942 104517.0-082205105018.1-085352259.52 43.53 5.79 +0.16 +0.13 +0.07 A3m -0.004-0.015 -004SB1O 20 5.8 27.3AB 3* -4238 CD-33 7288 93905201805 104517.7-333145104957.0-340329276.00 22.38 5.61 +0.04 +0.05 A1V -0.044+0.015 -012V? -4239 CP-58 2755 93943238514 W 104526.7-584740104924.1-591925287.92-00.06 5.91 0.00 -0.09 B9.5IV-V -0.043+0.001D+.010+004 1.2 1.1 -4240 BD-02 3236 94014137834 I 104600.4-023344105105.4-030533254.38 48.10 5.95 +1.48 +1.83 K2 -0.046-0.006 +037 -4241 BD+53 1439 94083 27809 104630.3+530548105230.8+523355155.83 56.29 6.65R gG8 -0.020-0.023 -008V -4242 BD+53 1440 94084 27810 104632.1+530208105231.9+523013155.91 56.33 6.44 +1.11 +1.01 +0.53 K2III -0.071-0.052 -003SB -4243 BD+70 634 94132 72292866 W 104640.1+702313105330.7+695114136.56 44.02 5.93 +0.99 +0.86 G9IV -0.398-0.067 +.029+015V 3.0 75.1AB 4 -4244 BD+01 2495 94180118550 W 104705.4+013321105213.7+010131250.31 51.29 6.38 +0.08 +0.13 A3V -0.002+0.003 -013V? 75 5.8 39.2 -4245 BD+00 2710 94237118555 I 104728.7+001948105236.1-001205251.78 50.48 6.31 +1.50 +1.82 +0.62E K5III -0.009-0.018 +009 * -4246 44 UMaBD+55 1418 94247 278152869I 104731.2+550700105334.5+543506152.85 55.15 5.10 +1.36 +1.52 +0.47E K3III -0.064-0.011 +.016+001 < 19: * -4247 46 LMiBD+34 2172 94264 62297 412I 4999 104743.2+344514105318.7+341254190.00 63.73 3.83 +1.04 +0.91 +0.54 K0+III-IV +0.087-0.278 +.024+016V < 19: * -4248 45Ome UMaBD+43 2058 94334 435122870 104813.4+434321105358.7+431124171.16 61.35 4.71 -0.05 -0.05 -0.04 A1V s +0.045-0.021 +.014-017SBO 35 * -4249 BD-01 2459 94363137863 7967 104819.8-014316105324.9-021519254.18 49.12 6.12 +0.90 +0.61 K0III+G0V -0.138-0.083 +026SB 2.6 35.2 * -4250 CP-56 3947 943672385572868 104825.0-564233105230.9-571426287.36 1.99 5.25 +0.16 -0.54 B9Ia e-0.004+0.002 -024 41 * -4251 BD-19 3125 94388156301 W 5006 104835.9-193601105329.5-200820268.69 34.78 5.24 +0.47 +0.06 F6V v+0.078-0.239 +.054-005V 14 4.0 124.5AB 4* -4252 BD-14 3213 94386156302 104835.8-145445105332.9-152644265.50 38.71 6.38 +1.16 K3IV +0.067-0.043 +000V -4253 BD-01 2460 94402137871 W 104838.2-013552105343.7-020745254.14 49.26 5.45 +0.96 +0.77 +0.33E G8III -0.084+0.013 +015V? * -4254 48 LMiBD+26 2147 94480 81576 104916.3+260123105442.2+252927209.85 63.85 6.20 +0.28 +0.12 +0.16 A8V -0.054+0.003 +008V 140 * -4255 BD-12 3293 944811563102871 104919.8-131333105417.8-134529264.46 40.21 5.66 +0.83 G4III -0.005+0.009 +005 -4256 BD+34 2178 94497 62310 104924.7+343407105458.2+340205190.31 64.10 5.72 +1.01 gG7 -0.060-0.049 -028V? * -4257 CP-58 2834 94510238574 W 5011 104925.8-581919105329.6-585112288.18 0.60 3.78 +0.95 +0.65 +0.49 K1III +0.067+0.030 +.059+008SB 2.7 153.9AB 3* -4258 46 UMaBD+34 2181 94600 62314 I 105012.1+340227105544.4+333025191.47 64.32 5.03 +1.10 +1.00 +0.55 K1III -0.109-0.027 -022V? < 19: -4259 54 LeoBD+25 2314 94601 81583 7979A 105012.0+251659105536.8+244459211.59 63.91 4.50 +0.01 +0.02 -0.01 A1V -0.072-0.012D+.015+005V 182 1.9 6.5 * -4260 54 LeoBD+25 2314 94602 81584 7979B 105012.4+251657105537.3+244456211.60 63.91 6.30H A2Vn -0.074-0.026D+.015-001SB 233 1.9 6.5 * -4261 BD-19 3134 946191793342872 105018.7-200755105511.6-203954269.45 34.54 6.44 +1.10 K0 -0.010+0.004 -012V? -4262 CP-70 1246 94650256770 W 105025.2-701115105342.0-704313293.45-10.05 5.99 -0.02 -0.46 B6V e-0.034-0.006D+.004+006 0.6 1.5 * -4263 CD-41 6220 94660222422 KQ Vel 105028.8-414305105501.0-421504280.98 15.60 6.11 -0.08 -0.25 A0pSiCr -0.037-0.001 +022V * -4264 BD+42 2162 94669 43535 105032.2+423239105614.5+420030173.09 62.21 6.03 +1.13 +1.08 +0.42E K2III +0.014-0.091 +.027-054 * -4265 55 LeoBD+01 2501 94672118574 7982 105033.7+011613105542.4+004413251.63 51.69 5.91 +0.42 -0.02 F2/3III/V +0.106 0.000 +.014-002SB 2.0 0.0 3* -4266 CP-61 1960 94683251173 W 105033.8-611737105429.6-614936289.59-02.02 5.93 +1.75 +1.97 K4III +0.003-0.004 -003 5.0 7.1 -4267 56 LeoBD+06 2369 94705118576 I VY Leo 105049.9+064309105601.5+061107245.05 55.50 5.81 +1.45 +1.00 +2.09 M5.5III v-0.022-0.008 -.003-013V? * -4268 CP-78 589 94717256768 105049.3-790138105227.5-793334297.51-17.96 6.33 +1.46 +1.57 K2II-III -0.040+0.002 +003 -4269 BD+23 2279 94720 815892873I 105053.8+225306105616.9+222106216.93 63.48 6.14 +1.55 +1.94 K2 -0.037+0.017 +025 -4270 50 LMiBD+26 2152 94747 81591 105108.9+260203105634.4+253000210.00 64.26 6.35 +1.03 +0.89 K0 -0.025-0.015 +030 -4271 CP-59 2840 94776251178 T Car 105117.4-595909105517.2-603101289.11-00.80 5.92 +1.08 +0.88 K0III -0.036+0.084 -026 * -4272 BD+78 367 94860 7255 413 105157.7+781821105956.8+774612130.13 37.76 6.20 +0.97 G9III -0.072-0.023 -050V? -4273 Iot AntCD-36 6808 94890201927 414 105203.3-363600105643.1-370816278.85 20.31 4.60 +1.03 +0.84 +0.53 K1III +0.077-0.128 +.025-000 -4274 CD-50 5534 949852386222874 IW Vel 105246.2-501351105707.9-504554285.14 8.11 5.91 +0.18 A4V -0.031+0.013 +016 * -4275 BD+52 1528 95057 278582876 5038 105323.5+522504105917.9+515256155.64 57.53 6.17 +1.38 +1.59 K0 -0.012-0.003 -007 * -4276 CP-59 2888 95109238635 U Car 105343.5-591150105748.4-594355289.06 0.04 6.11 +1.10 +1.10 G3Ia +0.007+0.016 +000 * -4277 47 UMaBD+41 2147 95128 435571282 105352.0+405752105928.0+402549175.78 63.37 5.05 +0.61 +0.13 +0.31 G1-VFe-0.5 -0.317+0.057 +.072+013V? =< 3 -4278 BD+36 2139 95129 62345 I 105358.0+363749105932.8+360535185.24 64.66 6.00 +1.59 +1.92 +1.29 M2III +0.071-0.049 +.018-026V -4279 CP-74 755 952082567752875 105424.9-743353105715.7-750559295.66-13.86 6.13 +1.53 +1.64 K1II -0.017+0.003 +008 -4280 BD+46 1680 95212 435622878I 105430.2+460344110014.7+453134165.76 61.27 5.47 +1.47 K5III +0.011+0.003 +009 -4281 BD+12 2284 95216 993922877 105427.6+121426105941.1+114221237.93 59.59 6.55 +0.43 -0.02 F5V -0.228+0.044 +020 8 -4282 CD-33 7401 95221201976 W 5041 105430.4-331201105913.9-334414277.67 23.57 5.71 +0.37 F2V +0.016-0.043 -010 3.0 1.8 -4283 BD+52 1529 95233 27868 105432.8+520219110025.6+513007155.99 57.90 6.43 G9III -0.029-0.015 +000 -4284 BD-15 3174 95234156372 I 105434.3-154903105930.9-162114267.68 38.74 5.89 +1.63 +1.91 M2III -0.046-0.016 -033V? -4285 BD+43 2068 95241 43564 W 105440.5+432705110020.6+425441170.63 62.52 6.02 +0.57 +0.02 F9V -0.109-0.132 +.019-006V 6 5.6 37.1 -4286 BD+64 824 95256 15360 105446.8+635732110105.8+632516141.55 49.53 6.39 +0.16 +0.14 +0.04 A2Vm -0.040-0.048 +007 50 -4287 7Alp CrtBD-17 3273 952721563751283I 105454.1-174558105946.5-181756269.06 37.12 4.08 +1.09 +1.00 +0.55 K0+III -0.460+0.130 +.031+047V < 19: * -4288 49 UMaBD+39 2400 95310 62354 105514.2+394457110050.4+391244178.15 64.04 5.08 +0.24 +0.17 +0.11 F0V s -0.072-0.019 +003 72 * -4289 BD-13 3271 95314156382 I 105513.2-133246110011.6-140500266.26 40.74 5.88 +1.50 +1.82 K5III -0.018-0.022 -006 -4290 CP-60 2433 95324251205 W 105512.4-604704105914.0-611913289.89-01.32 6.16 -0.06 -0.29 B8IV -0.031+0.019 +016 3.5 4.1 -4291 58 LeoBD+04 2407 953451186101284I D 105523.7+040916110033.6+033703249.69 54.59 4.84 +1.16 +1.12 +0.56 K1IIICN-0.5 +0.014-0.016 +.007+006V? < 19: 0.0 0.1 * -4292 CD-43 6692 95347222485 105526.7-431615105959.4-434826282.54 14.61 5.81 -0.08 B8-9V -0.058+0.011 -005 -4293 CD-41 6276 95370222487 415 105533.8-414122110009.3-421333281.86 16.05 4.39 +0.11 +0.12 +0.07 A3IV +0.028+0.003 +.003-005 111 -4294 59 LeoBD+06 2384 95382118615 8019 105533.8+063819110044.8+060605246.54 56.32 4.99 +0.16 +0.11 A5III -0.048-0.025 +.035-012 71 7.5 44.8 * -4295 48Bet UMaBD+57 1302 95418 27876 416I 5053 105548.6+565507110150.5+562257149.17 54.80 2.37 -0.02 +0.01 -0.04 A1V +0.082+0.034 +.053-012SB 39 * -4296 CD-51 5220 95429238674 W 105546.6-511652110008.6-514904286.02 7.36 6.15 +0.18 A3III-IV -0.038+0.004 +014 7.1 10.3 -4297 BD-15 3178 95441156396 105559.3-151517110057.2-154734267.67 39.40 6.34 +1.18 K0 +0.055-0.040 -005V? -4298 CD-31 8696 95456201998 105555.9-311820110040.8-315022277.02 25.40 6.07 +0.52 +0.09 F8V -0.080+0.105 -002 -4299 61 LeoBD-01 2471 955781379472879I 5059 105643.6-015646110149.7-022905256.87 50.32 4.74 +1.62 +1.95 +0.96 M0IIIBa0.2 +0.012-0.038 +.032-014V < 19: -4300 60 LeoBD+20 2547 95608 816372880 105659.5+204259110219.8+201047222.61 64.13 4.42 +0.05 +0.05 -0.02 A1m -0.006+0.042 +.017-010 24 -4301 50Alp UMaBD+62 1161 95689 15384 417I 8035 5070 105733.6+621727110343.7+614503142.85 51.01 1.79 +1.07 +0.92 +0.58 K0IIIa e-0.119-0.067 +.038-009SBO < 17 3.0 0.5 * -4302 CD-26 8302 95698179456 8028 105733.9-261725110224.4-264953274.77 30.01 6.23 +0.31 +0.09 F1V +0.065-0.120 +001 0.1 0.2 * -4303 BD+00 2728 95771137963 D 105807.6-001240110314.6-004509255.51 51.87 6.14 +0.26 +0.06 F0V -0.013-0.111 +004 * -4304 CP-80 509 95788258599 W 105803.3-810116105912.9-813322298.73-19.62 6.71 +0.55 +0.04 F7IV -0.160+0.073D+.010+011 0.1 0.4 -4305 BD-10 3184 95808156421 8037 105814.7-104544110314.9-111813265.03 43.47 5.50 +0.94 G7-III -0.070-0.108 -008V 5.9 3.7 * -4306 62 LeoBD+00 2729 95849118634 105829.5+003215110336.6-000003254.81 52.49 5.95 +1.22 +1.32 K3III -0.057+0.001 -008V -4307 CD-31 8726 958572020392881I 105830.0-312518110316.1-315739277.62 25.54 6.46 +1.62 +1.98 M1III -0.039-0.031 +080 -4308 BD-12 3333 95870156427 105837.1-125346110336.5-132604266.72 41.73 6.34 +0.88 +0.60 G5 +0.003+0.010 -010V -4309 51 UMaBD+39 2414 95934 623872882 8046 105857.7+384649110431.2+381429179.75 65.03 6.00 +0.16 +0.10 A3III-IV -0.064-0.003 +007V? 7.1 8.4AB 3* -4310 63Chi LeoBD+08 2455 96097118648 418 W 5079 105951.5+075236110501.0+072010246.14 57.94 4.63 +0.33 +0.08 +0.17 F2III-IV v-0.341-0.047 +.029+005V 25 4.3 276.4AC 4 -4311 CD-47 6466 961132225382884 110001.2-470826110431.2-474045284.94 11.42 5.67 +0.24 A8III-IV -0.110+0.027 -016 202 -4312 Eta OctCP-83 386 961242586001664 110001.3-840321105913.8-843538300.19-22.33 6.19 +0.11 +0.12 A1V -0.068-0.005 -003 -4313 CD-35 6954 961462020672885 110010.7-351555110454.2-354817279.80 22.24 5.43 +0.03 A2V -0.017+0.004 +011 -4314 Chi1HyaCD-26 8338 96202179514 419 W 110030.7-264514110519.9-271737275.69 29.91 4.94 +0.36 +0.04 F3IV -0.188-0.004 +.043+017V? 186 0.1 0.2 * -4315 BD-10 3190 962201564481286 110032.8-103249110534.0-110520265.52 43.96 6.09 +0.30 F0Vn +0.013-0.079 -020 -4316 CD-48 6157 96224222548 110035.2-485111110504.2-492333285.73 9.89 6.13 -0.02 -0.06 B9.5V -0.023+0.004 +004 -4317 Chi2HyaCD-26 8342 96314179522 Chi2 Hya 110106.5-264451110557.6-271716275.82 29.97 5.71 -0.06 -0.26 A0IV +0.034-0.014 +030SBO 193 * -4318 CD-50 5686 96407238763 110138.3-504014110605.8-511245286.62 8.29 6.30 +0.95 +0.59 G8III +0.005-0.065 +053 -4319 65 LeoBD+02 2387 964361186681287 8060 5090 110148.1+022954110654.2+015720253.65 54.50 5.52 +0.97 +0.66 G9IIICN-1 -0.383-0.086 +.035+055 3.8 2.2 * -4320 CD-28 8657 96441179542 110149.2-281111110638.7-284340276.73 28.76 6.77 +0.04 A1V -0.057-0.032 +018 -4321 CD-50 5693 96484238775 110200.0-502459110627.4-505724286.57 8.55 6.32 +1.16 +1.22? K2III -0.067+0.006 +009 -4322 64 LeoBD+24 2318 96528 81681 110218.5+235152110739.7+231925216.37 66.27 6.46 +0.16 +0.12 +0.09 A5m -0.014+0.008 -002SBO * -4323 CP-58 3112 96544238779 W 5091 110214.3-580804110629.3-584031289.64 1.46 6.02 +1.24 K2II-III -0.015 0.000 +003 5.9 12. AB 3* -4324 CD-31 8776 96557202100 110221.8-320242110708.4-323514278.74 25.34 6.59 +0.34 +0.03 F1III -0.081-0.052 -002 -4325 CP-61 2067 96566251269 110226.3-615301110632.4-622527291.12-01.98 4.61 +1.03 +0.81 +0.45 G8III -0.043+0.013 +.055-002 -4326 CP-64 1630 96568251267 110225.1-641757110624.2-645023292.06-04.21 6.41 +0.12 +0.13 A3V -0.050+0.008 -006V? -4327 CD-41 6343 96616222581 W V815 Cen 110239.0-420556110716.6-423819283.28 16.22 5.15 +0.03 ApSrCrEu -0.096+0.043 -.001+002 56 2.5 1.4 * -4328 CD-29 8875 96700179558 110309.0-293747110754.4-301029277.74 27.59 6.54 +0.60 +0.08 G2V -0.513-0.138 +.049+013 -4329 CP-70 1305 967062568001288 W Var 110313.2-702013110649.9-705241294.51-09.74 5.57 -0.05 -0.63 B2V -0.027 0.000 +007 62 8.2 15. * -4330 BD+68 632 96707 15414 Var? 110319.4+674509110939.9+671237137.06 47.03 6.06 +0.22 +0.13 F0pSr v-0.083-0.025 +005 45 * -4331 CD-29 8877 96723179568 110326.2-292551110815.8-295822277.71 27.80 6.49 +0.03 +0.05 A1V +0.008-0.020 -013V? -4332 67 LeoBD+25 2344 96738 816922889 8071 110327.2+251159110849.1+243930213.26 66.83 5.68 +0.06 +0.12 A3IV +0.003+0.004 -006V 6.6 4.8 -4333 BD+37 2162 96813 624272892I CO UMa 110349.1+365106110919.1+361834183.56 66.52 5.74 +1.51 +1.50 +1.32E M3.5IIIab -0.046-0.024 +022 * -4334 CD-27 7886 96819179577 5101 110353.5-273218110843.9-280450276.87 29.54 5.44 +0.07 +0.06 A1V -0.080-0.016 +.011+016V? 227 -4335 52Psi UMaBD+45 1897 96833 43629 420I 110402.6+450228110939.8+442955165.80 63.23 3.01 +1.14 +1.11 +0.57 K1III -0.065-0.028 -004V? < 19: -4336 BD+43 2083 96834 43627 I 5107 110402.6+434459110938.5+431227168.30 63.89 5.89 +1.57 +1.90 +0.97E M2III -0.064-0.011 +018 * -4337 CP-58 3189 969182388131289I V382 Car 110419.0-582600110835.4-585830290.01 1.29 3.91 +1.23 +0.94 +0.58 G40-Ia v-0.007 0.000 -.001+007SB 23 * -4338 CP-61 2075 969192512862891 V371 Car 110424.1-612420110834.0-615650291.15-01.45 5.13 +0.22 -0.44 B9Ia t-0.006+0.002 +.009-022 0 * -4339 CD-31 8816 97023202149 5111 110504.9-314928110953.4-322203279.22 25.79 5.81 +0.04 A2V +0.023-0.029 -000 -4340 BD+69 602 97138 15431 5119 110548.0+684853111211.0+681619135.92 46.27 6.40 A3V +0.032+0.010 -018 -4341 BD+15 2301 97244 99492 110629.1+145637111143.7+142401236.63 63.53 6.30 +0.21 +0.08 A5V -0.066-0.009 +006 82 -4342 CP-57 4387 97271238839 110635.5-575445111054.7-582719290.09 1.89 6.88 -0.08 -0.44 B7III -0.036+0.003 +017 -4343 11Bet CrtBD-22 3095 97277179624 421 110644.3-221647111139.5-224933274.78 34.53 4.48 +0.03 +0.06 +0.02 A2III +0.003-0.100 +.051+006SB 58 -4344 BD+55 1446 97302 27952 110655.4+552616111244.5+545339149.04 56.94 6.63 A4V +0.001-0.002 -006V -4345 BD+36 2162 97334 62451 W 110705.8+362143111232.2+354849184.33 67.28 6.41 +0.61 +0.10 G0V -0.271-0.170 -003V =< 6 1.6 138.7AB 4 -4346 CD-31 8847 973932021971290I 5129 110725.5-315326111214.8-322602279.75 25.93 6.38 +1.70 +1.85 +0.98E M1III +0.019+0.011 +027 -4347 Psi CrtBD-17 3321 97411156528 8086 110732.7-175720111230.4-183000272.49 38.45 6.13 -0.01 -0.01 A0V -0.019-0.030 +014 51 0.4 0.2 * -4348 BD-20 3374 97428179638 110738.7-211221111234.6-214457274.41 35.59 6.40 +1.38 K0 -0.011+0.012 -024V? -4349 CP-70 1336 97472256808 110747.9-705334111129.5-712611295.08-10.10 6.35 +1.37 +1.54 K2-3III -0.020+0.003 +026 -4350 CD-48 6263 974952226391291 110759.6-483329111233.1-490604286.76 10.64 5.36 +0.18 A3IV-V -0.096+0.033 -010SB 128 -4351 BD+41 2170 97501 43649 8093 110807.8+413757111340.2+410519171.83 65.55 6.33 +1.15 +1.12 K2III -0.004+0.013 +012V 4.8 3.1 * -4352 CP-59 3190 97534251316 W 5137 110818.5-594625111236.0-601903290.99 0.24 4.60 +0.55 +0.05 +0.38 A6Iae -0.007+0.004 +.005-008 34 6.8 21.7 * -4353 CD-49 5937 97550222643 110823.0-491132111256.9-494411287.06 10.08 6.11 +1.06 G8II-III -0.008-0.009 +007 -4354 CD-43 6872 975762226472894 110834.8-434941111314.7-442220285.02 15.06 5.80 +1.66 +2.08 K5-M0III -0.001 0.000 +001V? -4355 CP-63 1860 975832513202893 W 110836.8-633733111245.2-641011292.44-03.33 5.23 -0.06 -0.25 B8V -0.050+0.007 +021 206 6.7 19.1 * -4356 69 LeoBD+00 2761 97585118731 110838.4+002829111345.6-000411258.13 54.08 5.42 -0.03 -0.05 A0V -0.043-0.002 +.018+005V? 177 -4357 68Del LeoBD+21 2298 97603 81727 422I W 5143 110847.4+210418111406.5+203125224.22 66.83 2.56 +0.12 +0.12 +0.03 A4V +0.142-0.130 +.048-020V 181 6.0 191.4AB 3* -4358 BD+08 2476 976051187352895 W 110850.0+083629111401.8+080338247.99 60.08 5.79 +1.12 +1.13 +0.38E K3III +0.048-0.110 +017V? 6.0 21.5 * -4359 70The LeoBD+16 2234 97633 99512 423 5144 110859.6+155834111414.4+152546235.37 64.59 3.34 -0.01 +0.06 -0.03 A2V -0.061-0.079 +.026+008V 20 * -4360 CP-52 4350 97651238878 110909.5-524118111339.3-531354288.48 6.87 5.76 +1.32 +1.42 K2III -0.025+0.038 +047 -4361 CP-58 3315 97670238877 Var 110911.0-590430111330.8-593710290.83 0.93 5.74 -0.10 -0.71 B1.5V -0.009-0.006 +018 62 * -4362 72 LeoBD+23 2322 97778 817362897I 5147 110953.1+233826111512.2+230544218.10 67.88 4.63 +1.66 +1.85 +1.31 M3IIb e-0.024-0.006 +.010+016 * -4363 BD+53 1480 97855 27970 8108A 111018.8+531900111604.0+524623151.12 58.82 6.50 +0.43 -0.12 F6V+F9V +0.162+0.057 +.052-041V? =< 6 1.7 12.7 * -4364 CD-43 6899 97866222671 111012.9-431120111454.0-434403285.05 15.76 6.21 +1.61 +1.93 K4III -0.025-0.016 +009 -4365 73 LeoBD+14 2367 97907 99525 I S 111038.0+135111111551.9+131827239.93 63.74 5.32 +1.20 +1.09 K3III -0.007-0.008 +018SB 19: * -4366 BD+13 2379 97937 99527 111044.3+132330111557.8+125041240.81 63.49 6.67 +0.27 +0.07 A9Vp -0.034-0.055 -020SB 109 * -4367 BD+50 1807 97989 43675 424 111103.8+500120111641.9+492835155.72 61.19 5.88 +1.08 gK0 -0.083-0.009 +000V? -4368 74Phi LeoBD-02 3315 980581381021292 W 111134.6-030618111639.7-033906262.66 51.65 4.47 +0.21 +0.14 +0.11 A7IVn -0.108-0.036 +.019-003V? 225 4.7 96.9 * -4369 BD-06 3344 980881381062900 8115 SV Crt 111154.0-063521111658.2-070805265.81 48.81 6.14 +0.20 +0.15 A8IVpeSrCrSi -0.006+0.009D+.004-008SB2O 25 3.8 57.2AC 3* -4370 CD-45 6837 98096222687 W 111148.8-452010111627.7-455248286.15 13.87 6.31 +0.40 -0.03 F3V -0.136+0.066D+.016-002 0.3 2.4 * -4371 75 LeoBD+02 2409 981181187642902I 111208.6+023338111717.4+020038257.02 56.25 5.18 +1.52 +1.84 +0.94 M0III-IIIb +0.056-0.140 +.010-059V? -4372 CD-37 7146 98161202283 111225.5-372807111711.8-380052283.19 21.22 6.27 +0.10 A3Vn -0.088+0.010 -003 -4373 CD-34 7345 98221202289 111249.6-341128111739.2-344414281.91 24.28 6.45 +0.40 -0.03 F4V -0.006+0.002 -009 -4374 53Xi UMaBD+32 2132 98230 62484 I: 8119B 5165 111250.9+320531111810.9+313145195.08 69.25 4.87H G0V -0.432-0.586 +.137-016SB1O 3 0.5 3.1AB 4* -4375 53Xi UMaBD+32 2132 98231 62484 I 8119A 5165 111250.9+320531111811.0+313145195.08 69.25 4.41H +0.59 +0.04 +0.34 G0V -0.430-0.586 +.137-016SB1O 1 0.5 3.1AB 4* -4376 CD-35 7111 98233202291 111255.3-355920111743.0-363204282.68 22.62 6.68 +0.98 G8-K0III -0.077+0.026 +003V -4377 54Nu UMaBD+33 2098 98262 62486 425I 8123 111304.7+333824111828.7+330539190.73 69.08 3.48 +1.40 +1.55 +0.70 K3-IIIBa0.3 -0.026+0.028 +.020-009SB < 19: 6.0 7.2 * -4378 BD+12 2319 98280 99544 111308.0+123156111821.0+115905243.13 63.44 6.66 +0.07 +0.05 A2V +0.004-0.036 -035 -4379 CP-67 1703 982922513412903 W 5163 111314.2-671637111719.0-674925294.21-06.56 6.06 +1.76 +1.93 M2III +0.013-0.007 +026V 7.5 34.7 * -4380 55 UMaBD+38 2225 98353 624911293 111340.9+384403111907.9+381108177.34 67.74 4.78 +0.12 +0.03 +0.03 A1Vp: -0.057-0.068 +.025-003SB2O 47 * -4381 76 LeoBD+02 2411 98366118778 111347.0+021155111855.0+013902257.99 56.23 5.91 +1.04 +0.87 gK0 -0.038-0.055 +005V? -4382 12Del CrtBD-13 3345 98430156605 426I 111420.4-141414111920.5-144643272.07 42.51 3.56 +1.12 +0.97 +0.60 G8III-IV -0.122+0.208 +.024-005SB < 19: -4383 BD+67 692 98499 154782905 111446.9+673858112053.8+670602135.79 47.70 6.21 +1.01 G8 +0.049-0.052 -056 -4384 CP-63 1881 98560251357 111505.4-640211111916.5-643457293.25-03.46 5.99 +0.46 0.00 F6IV -0.302+0.044 +006 -4385 CP-78 638 986172568232904 111538.5-790715111834.3-794007298.68-17.57 6.35 +0.26 +0.08 A8IIIm: +0.031-0.026 -004 -4386 77Sig LeoBD+06 2437 98664118804 427 111558.8+063439112108.2+060146253.36 59.90 4.05 -0.06 -0.12 -0.07 B9.5V s -0.092-0.012 +.001-005SB 65 -4387 CP-74 801 98672256826 111600.3-743542111936.3-750833297.03-13.33 6.27 -0.03 -0.12 B9.5-A0V -0.038+0.004 +023V? -4388 BD+57 1316 98673 279992907 111605.5+573721112149.3+570430144.73 56.10 6.43 +0.15 +0.09 A7Vn -0.058+0.009 -010SB 230 -4389 CP-71 1238 98695256828 111610.8-712648112003.9-715940295.93-10.38 6.41 +0.05 -0.48 B4V -0.039-0.005 -000 -4390 Pi CenCP-53 4498 98718238986 428 W 111626.7-535635112100.4-542928289.96 6.09 3.89 -0.15 -0.59 -0.17 B5Vn -0.036-0.006D+.011+009V 326 0.7 0.2 * -4391 BD+65 828 98772 15486 429 111654.9+645240112251.3+641950137.71 50.18 6.02 +0.09 +0.09 A1Vnp -0.005+0.034 +001 160 * -4392 56 UMaBD+44 2083 98839 437192908I 111720.4+440153112249.6+432858164.73 65.77 4.99 +0.99 +0.80 +0.46 G7.5IIIa:Ba0.3 -0.038-0.013 -.002+003 < 19: -4393 CD-43 7006 98892222751 111738.9-440548112223.1-443845286.70 15.40 6.12 +0.92 +0.68 G8III -0.048-0.034 +001 -4394 BD+00 2782 98960118825 I 111810.7+004051112318.0+000754261.20 55.69 6.05 +1.46 +1.78 K3 -0.037-0.018 +022 -4395 13Lam CrtBD-17 3367 98991156646 111824.3-181349112321.9-184648275.60 39.37 5.09 +0.42 -0.06 F5III -0.312-0.034 +.023+011SB1O 14 * -4396 CD-35 7163 989932023912909 W 111822.0-353658112312.7-360953283.65 23.38 5.00 +1.46 +1.63 K6III -0.020 0.000 +.025-005SB 9.5 31.3 -4397 CP-76 662 99015256832 111834.8-770335112157.1-773630298.07-15.59 6.43 +0.20 +0.11 A5III-IV -0.081-0.005 -006V? -4398 CP-56 4449 990222390172910 111835.5-561350112308.1-564646291.02 4.04 5.79 +0.01 A4:pe -0.030+0.006 +003 * -4399 78Iot LeoBD+11 2348 99028 99587 I 8148 5184 111842.7+110449112355.5+103145247.60 63.55 3.94 +0.41 +0.07 +0.21 F4IV +0.168-0.075 +.052-010SB1O 20 2.8 1.1 * -4400 79 LeoBD+02 2418 99055118831 D 111854.4+015724112402.3+012428260.09 56.83 5.39 +0.94 +0.66 G8IIICN-0.5 -0.020+0.005 -010V? 0.7 0.0 * -4401 CP-64 1657 99104251383 W 111902.0-642421112321.8-645718293.78-03.66 5.11 -0.08 -0.42 B5V -0.001-0.005D+.010+019V? 78 1.2 2.6 -4402 14Eps CrtBD-10 3260 99167156658 I 111933.5-101839112436.6-105134271.04 46.57 4.83 +1.56 +1.96 +0.94 K5III -0.028+0.027 +003V < 19: -4403 CD-41 6529 991712227731294 111934.9-420712112422.1-424009286.33 17.38 6.12 -0.18 -0.81 B2IV-V -0.005+0.001 +010 -4404 BD+12 2335 99196 995982912I 111947.7+115847112458.9+112549246.45 64.34 5.80 +1.38 +1.58 +0.54E K4III -0.102-0.005 +038V? * -4405 15Gam CrtBD-16 3244 99211156661 431 8153 111953.1-170805112452.9-174102275.41 40.52 4.08 +0.21 +0.11 +0.11 A5V -0.098+0.004 +.028+001V? 131 4.8 5.3 * -4406 CP-71 1248 992642568342911 112011.8-714226112411.1-721524296.32-10.51 5.59 +0.06 -0.57 0.00 B2IV-V -0.030-0.003 +002V * -4407 BD+56 1518 99283 28017 112018.7+562355112557.1+555102145.26 57.42 5.75 K0III -0.066+0.048 -006V? -4408 81 LeoBD+17 2356 99285 996012913 W 112023.5+170023112536.4+162723236.75 67.45 5.57 +0.36 +0.02 F2V -0.143-0.005 +018V 30 3.6 55.7 -4409 CD-35 7189 99322202428 I 112038.4-353050112529.4-360347284.08 23.64 5.22 +0.99 +0.77 +0.31E K0III -0.113+0.020 +.032+004 4.6 1.3 * -4410 80 LeoBD+04 2463 99329118851 112041.6+042439112550.0+035136257.90 59.03 6.37 +0.33 +0.05 F3IV -0.080-0.041 -003SB 112 -4411 CD-37 7235 99333202430 W 112042.5-371151112533.1-374452284.73 22.07 5.89 +1.54 +1.72 M3III -0.042-0.014 +007 5.5 4.7 -4412 BD+34 2222 99373 62551 112104.4+335959112625.5+332702188.72 70.63 6.32 +0.43 0.00? F7V -0.040+0.016 -025 5 -4413 CP-63 1893 99453251402 112123.3-632515112543.2-635822293.70-02.65 5.17 +0.50 +0.04 F7V -0.313-0.078 +.040-005SB2 84 -4414 83 LeoBD+03 2502 994911188641296 8162A 112141.6+033329112645.3+030047259.28 58.52 6.50 +0.79 +0.49 +0.36 K0IV -0.724+0.180 +.054-003V? 1.1 28.5AB 3* -4415 CP-60 2941 99556251406 W 112205.4-603354112635.3-610655292.87 0.09 5.30 -0.08 -0.54 -0.06 B3IV -0.026+0.002 +009 205 8.5 13.0 * -4416 16Kap CrtBD-11 3098 995641566852914 W 112207.2-114826112709.5-122124272.85 45.53 5.94 +0.49 +0.03 F4III-IV -0.097+0.026 +006 7.0 27.9 -4417 CP-52 4567 99574239074 W 112207.6-523637112647.3-530936290.32 7.63 5.81 +0.52 K0III+A2-3V -0.041+0.014 -008 0.4 0.1 -4418 84Tau LeoBD+03 2504 996481188751297I W 112247.6+032425112756.2+025122259.90 58.57 4.95 +1.00 +0.79 +0.50 G7.5IIIa +0.018-0.012 +.034-009 < 19: 2.6 91.1AB 4* -4419 BD-00 2442 99651138216 W 112247.0-010858112753.7-014200264.70 54.85 6.25 +1.04 +0.73 gK2 -0.034-0.003 -010 1.4 0.3 -4420 CD-34 7471 99712202478 112305.3-344642112758.5-351943284.31 24.51 6.45 K5III: -0.006+0.012 -018V -4421 BD+62 1183 99747 155202915 112321.8+621921112904.6+614642138.87 52.73 5.83 +0.36 -0.05 F5Va vw -0.112+0.237 -008V -4422 57 UMaBD+40 2433 99787 62572 8175 112341.0+395314112904.2+392013172.23 68.97 5.31 +0.01 +0.01 A2V -0.050+0.016 +.025-011SB 176 2.5 346.3AD 6* -4423 CD-41 6565 99803222813 W 112346.0-420725112835.1-424027287.10 17.64 5.08 -0.03 B9V -0.040+0.008D+.007+003SB 0 2.7 13.2 * -4424 BD+57 1324 99859 28035 112407.6+571722112943.5+564415143.51 57.01 6.28 +0.15 +0.11 +0.04 A4m -0.089-0.034 +009 90 * -4425 CP-71 1253 99872256843 W 112412.7-715523112818.2-722828296.69-10.62 6.09 +0.16 -0.42 B3V -0.043-0.020 +012 0.1 0.3 -4426 85 LeoBD+16 2266 99902 99629 I 112429.3+155756112941.9+152448240.45 67.70 5.74 +1.32 gK4 -0.028-0.045 -029 -4427 BD+55 1468 99913 28038 112438.7+545452113012.9+542142146.03 58.97 6.41R K0III +0.010-0.057 -022 -4428 CD-2310009 99922179935 8183 112440.1-235448112938.6-242748280.16 34.77 5.76 +0.07 A0V -0.048+0.043D+.021-002 3.0 8.3AB 3 -4429 BD+81 373 99945 18843956 5230 112447.9+814040113150.4+810738126.62 35.42 6.15 +0.24 +0.12 A2m -0.149+0.032 +.020+003 -4430 BD+47 1880 99967 43784 EE UMa 112457.4+471229113025.0+463927156.83 64.78 6.35 +1.27 +1.19 K2IIICN-1 +0.011+0.032 +027SBO * -4431 58 UMaBD+43 2122 99984 43787 432 112506.5+434320113031.1+431024163.28 67.08 5.94 +0.49 -0.01 F4V -0.050+0.083 -030 =< 6 * -4432 87 LeoBD-02 3360 999981382382917I 112512.3-022706113018.9-030013266.78 54.07 4.77 +1.54 +1.83 +0.84 K3.5IIIFe-1 +0.022-0.014 +.015+019V? < 19: * -4433 86 LeoBD+19 2459 100006 996372918I 112515.9+185738113029.0+182435233.76 69.44 5.52 +1.05 +0.82 +0.37E K0III -0.088+0.020 +.026+027V * -4434 1Lam DraBD+70 665 100029 15532 433I 5231 112528.3+695259113124.2+691952132.98 46.20 3.84 +1.62 +1.97 +0.99 M0IIICa-1 -0.039-0.017 +.026+007 * -4435 BD+48 1952 100030 43790 112527.1+482857113052.9+475545154.61 63.94 6.42 +0.88 +0.54 G9IV -0.229-0.070 +038 -4436 BD+49 2062 100055 43793 112542.0+492030113110.2+484721153.20 63.35 6.56 +0.93 +0.72 G9III -0.030-0.040 +006 -4437 88 LeoBD+15 2345 100180 99648 8196A 112635.1+145518113144.9+142152243.43 67.48 6.20 +0.57 +0.07 G0V -0.330-0.189 +.035-004 =< 10 2.8 15.5 * -4438 CP-60 3011 100198251437 V809 Cen 112640.3-604336113115.0-611642293.45 0.11 6.38 +0.52 -0.11 A3Iae -0.007+0.003 -004V * -4439 BD+61 1246 100203 15542 8197 112641.0+613811113220.8+610457138.90 53.52 5.48 +0.50 -0.01 F8V +0.002-0.069 +.045-046SB 0 1.4 0.5 * -4440 BD-19 3285 1002191799642919 112647.8-201332113147.6-204636278.98 38.36 6.24 +0.54 F7IV -0.131+0.032 +010V? =< 15 -4441 Omi1CenCP-58 3692 100261239145 I W Omi1 Cen 112708.6-585325113146.1-592632292.95 1.88 5.13 +1.08 +0.78 +0.66 G30-Ia -0.005-0.005 +.024-020V 6.4 13.3 * -4442 Omi2CenCP-58 3693 1002622391462920 Omi2 Cen 112711.3-585749113148.8-593057292.98 1.81 5.15 +0.49 -0.11 +0.46 A2Ia -0.008+0.001 +.014-017 43 * -4443 CD-28 8928 100286179967 8202B 112718.5-284255113216.1-291548282.88 30.51 5.81 +0.53 +0.02 F8V -0.014+0.138D+.013+010V? 0.1 9.3 * -4444 CD-28 8928 100287179968 8202A 112718.9-284247113216.3-291540282.88 30.51 5.64 +0.53 +0.04 F8V -0.028+0.145D+.013+004V? 0.1 9.3 * -4445 CD-26 8620 100307179969 I 112725.2-261143113223.3-264448281.86 32.87 6.16 +1.66 +1.99 +0.98E M1III -0.079+0.033 +035V? -4446 BD-07 3250 1003431382652921I 112742.5-071631113247.5-074939271.56 50.19 5.95 +1.38 +1.64 K4III -0.007+0.004 -001V? -4447 CD-39 7168 1003782228562922 112755.9-395308113248.1-402611287.12 20.01 5.64 +1.58 +1.81 K6III -0.069+0.052 +003 -4448 CP-66 1605 100382251451 112753.0-662435113219.9-665744295.29-05.27 5.90 +1.13 +1.12 K1IIICNIb-II -0.004-0.001 -011 -4449 CD-30 9303 100393202554 I 5246 112757.2-303207113254.1-310514283.75 28.84 5.04 +1.58 +1.95 +1.01 M2IIIb -0.030+0.006 +.019+019 -4450 Xi HyaCD-31 9083 100407202558 434I W 112804.9-311815113300.1-315128284.08 28.13 3.54 +0.94 +0.71 +0.48 G7III -0.206-0.040 +.027-005V 7.0 68.2 * -4451 BD-15 3295 100418156750 112812.2-154337113314.6-161650277.05 42.63 6.05 +0.60 F9III -0.002-0.043 -004 -4452 BD+37 2195 100470 626042923 112837.3+372210113356.3+364856177.50 70.98 6.40 +1.05 +0.93 +0.53 K0III -0.129-0.046 -.014+018SB * -4453 CD-39 7175 100493222863 W 112844.7-400206113337.3-403513287.33 19.92 5.39 +0.12 A2IV-V -0.071+0.024 +.028+009 137 0.0 1.0 * -4454 BD+11 2372 100518 99668 112859.0+113437113410.0+110125250.77 65.72 6.55 +0.18 +0.10 +0.12 A2m +0.045-0.031 -005V -4455 89 LeoBD+03 2521 1005631189292924 112914.8+033656113422.0+030336262.18 59.69 5.77 +0.46 +0.01 F5V -0.182-0.104 +.045+003V? 14 -4456 90 LeoBD+17 2374 100600 99673 8220 112930.2+172059113442.5+164749239.18 69.47 5.95 -0.16 -0.64 -0.14 B4V -0.011+0.003D+.003+019SB 117 1.1 3.6AB 3* -4457 BD+55 1473 100615 280642925 112934.4+552016113504.9+544707144.44 59.04 5.63 +1.02 K0III +0.008+0.008 +018V? -4458 CD-32 8179 100623202583 112937.8-321805113429.5-324953284.79 27.31 5.98 +0.81 +0.39 +0.46 K0V -0.674+0.826 +.106-023V -4459 BD+21 2331 100655 81886 112950.7+205940113503.8+202629229.80 71.32 6.45 +1.01 G9III -0.059-0.005 -007 -4460 CP-53 4637 1006732391892926 113001.0-534242113445.7-541551291.79 6.94 4.62 -0.08 -0.21 -0.53 B9Ve -0.056+0.017 +003V 159 * -4461 2 DraBD+70 670 100696 15567 I 113011.3+695246113602.8+691922132.45 46.38 5.20 +1.01 +0.68 +0.50 K0III +0.111-0.127 +.025-002 < 19: -4462 CD-48 6630 100708222883 5253 113009.5-483518113456.8-490812290.29 11.85 5.50 +1.04 +0.92 K1III-IV -0.170+0.168 +.034-001 -4463 CD-46 7199 100733222887 W V763 Cen 113023.8-464910113513.2-472221289.79 13.55 5.71 +1.66 +1.93 +1.00E M3III -0.089-0.004 +.008+018 7.6 6.7 * -4464 BD+11 2377 100740 996832927 113032.7+112753113543.4+105440251.62 65.92 6.56 +0.13 +0.10 A4Vn +0.035-0.023 -005SB 232 -4465 BD+28 2022 100808 81893 8231 113102.2+282003113617.9+274652206.35 73.33 5.80 +0.23 +0.07 F0V +0.023+0.003D+.012+008SB 0.2 0.5AB 3* -4466 CD-46 7205 100825222895 435 113104.6-470514113555.6-473830289.99 13.32 5.25 +0.25 +0.12 A7m +0.036-0.049 +.022+005 43 -4467 Lam CenCP-62 2127 100841251472 436 W 113110.0-622759113546.8-630111294.47-01.40 3.13 -0.04 -0.17 -0.01 B9III -0.041-0.005 -001V 0 8.2 16.3 * -4468 21The CrtBD-08 3202 1008891382961299 113136.5-091457113640.9-094808274.25 48.86 4.70 -0.08 -0.18 -0.07 B9.5Vn -0.061+0.008 +001SB 192 * -4469 CD-32 8199 100893202622 W 113137.2-330057113635.0-333412285.51 26.76 5.74 +1.02 +0.83 K0III +0.040-0.037 +042 2.1 3.3AB 3 -4470 CD-36 7291 100911202627 113144.8-364102113640.8-371416286.81 23.28 6.31 +0.06 +0.06 A1V -0.013-0.019 -002V -4471 91Ups LeoBD-00 2458 100920138298 437I D 113149.7-001618113656.9-004926267.26 56.80 4.30 +1.00 +0.75 +0.52 G8.5IIICN-0.5 +0.004+0.043 +.019+001 < 19: 4.5 0.1 * -4472 CP-60 3140 100929251479 113142.2-602957113622.3-610308293.97 0.51 5.83 -0.09 -0.63 B2.5IV -0.021+0.008 +011 0 * -4473 CD-32 8202 100953202634 113203.4-322557113701.2-325917285.40 27.34 6.29 +0.46 +0.06 F6III-IV -0.011-0.079 +010 -4474 BD+51 1679 101013 280812929 113228.4+511021113753.0+503706148.77 62.66 6.14 +1.07 +0.76 +0.48 G9III:Ba2.5 -0.047-0.021 -004 -4475 CP-60 3182 101021251486 113222.8-604348113700.6-611700294.12 0.31 5.15 +1.12 +1.15 K0III -0.224+0.006 +.002+003 * -4476 CD-47 6997 101067222917 113243.0-471139113733.9-474450290.29 13.30 5.44 +1.24 +1.30 +0.44E K2III -0.072+0.027 +.001-001 * -4477 59 UMaBD+44 2110 101107 43837 113300.9+441048113820.6+433732159.98 67.87 5.59 +0.33 +0.01 F2II-III -0.145-0.033 +002V 51 -4478 BD+09 2523 101112118961 113300.5+092614113809.8+085303256.00 64.85 6.17 +1.08 +0.95 +0.36E K1III -0.059+0.019 +011 * -4479 Pi ChaCP-75 744 101132256857 438 113308.1-752034113715.6-755348298.36-13.69 5.65 +0.35 0.00 +0.21C F1III -0.134+0.001 -010 -4480 60 UMaBD+47 1894 101133 438392931 113311.4+472320113833.5+465003154.16 65.63 6.10 +0.38 +0.14 F5III s -0.037-0.033 -024 -4481 BD+65 843 101150 15580 8249 113312.1+645402113849.2+642049135.31 51.00 6.46R A5IV +0.016+0.006D+.004-022 1.3 1.8 -4482 BD+34 2242 101151 62635 113315.6+341047113832.2+333732186.02 73.02 6.27 +1.32 +1.48 K2III -0.028-0.019 -006 -4483 1Ome VirBD+08 2532 1011531189652932I Ome Vir 113318.2+084116113827.6+080803257.26 64.32 5.36 +1.57 +1.53 M4III -0.006+0.005 -.005+004V? * -4484 BD-01 2546 101154138314 8247 113317.5-015257113824.1-022610269.29 55.59 6.22 +1.12 +1.08 G9III -0.031+0.009 -015V? 4.7 5.2 * -4485 CP-66 1629 1011622515012930 113316.5-670359113748.4-673713295.99-05.75 5.96 +1.02 +0.83 K0III -0.083-0.007 +034 -4486 BD+45 1947 101177 43841 8250A 113329.1+453942113844.9+450631157.05 66.91 6.44 +0.56 +0.05 G0V -0.594+0.026 +.049-018SBO 1.9 9.4AB 5* -4487 CP-61 2463 101189251505 113326.9-611623113807.3-614935294.39-00.18 5.15 -0.02 -0.16 ApHgMn -0.071+0.017 +.024+004 0 * -4488 24Iot CrtBD-12 3466 101198156802 W 113335.2-123905113840.1-131207277.00 45.97 5.48 +0.52 F7V +0.092+0.120 -024 5.4 1.4 -4489 CD-24 9867 1012591800652933 113359.0-240938113900.4-244316282.69 35.29 6.42 +0.82 +0.32 G5 +0.033-0.241 +097V? -4490 BD-13 3420 1013691568202934 8259 113447.3-135451113951.1-142807278.08 44.92 6.21 0.00 A1V -0.038-0.011 +005 68 6.0 7.8 * -4491 BD-15 3323 101370156819 I 5284 113446.9-160357113950.4-163713279.21 42.93 6.19 +1.62 +1.75 M3.5IIIBa0.2Ca1 -0.010-0.009 +026V? * -4492 CP-64 1685 101379251522 W GT Mus 113451.4-645036113929.4-652352295.53-03.56 5.17 +0.80 +0.36 +0.63 G2III+A0V -0.042-0.006 +.006+014SB 0.8 0.2AB 4* -4493 BD+58 1331 101391 28093 113459.2+583127114027.4+575814140.07 56.73 6.37 -0.12 -0.34 B9pHgMn: -0.012+0.021 +004 -4494 Omi HyaCD-34 7610 101431202695 439 113514.7-341125114012.8-344441286.72 25.87 4.70 -0.07 -0.22 -0.05 B9V -0.042 0.000 +006 188: -4495 92 LeoBD+22 2391 101484 819412936I 113535.1+215430114047.1+212110228.85 72.91 5.26 +0.98 +0.44?+0.48 K1III -0.064-0.049 +009 < 17 -4496 61 UMaBD+35 2270 101501 626551300 W 5291 113547.1+344600114103.0+341206183.53 73.32 5.33 +0.72 +0.25 +0.36 G8V -0.012-0.381 +.119-005V < 17 4.9 159.3 -4497 CP-53 4691 101541239284 5289 113552.4-532449114042.6-535807292.55 7.47 5.96 +1.66 +2.02 M1III +0.004-0.019 -012V? * -4498 CD-28 9027 101563180098 113610.3-283852114108.4-291147284.99 31.21 6.44 +0.66 +0.19 G0V -0.324+0.215 +.032-019SB -4499 CP-61 2514 101570251535 113609.8-613208114053.6-620524294.78-00.34 4.94 +1.15 +0.81 +0.57 G3Ib -0.020+0.008 +.025+014SB -4500 BD+55 1481 101604 28101 I 113618.6+554334114143.6+551021142.47 59.23 6.27 +1.49 K5 -0.015+0.023 -007 -4501 62 UMaBD+32 2179 101606 626582938 W 113622.0+321759114134.3+314446191.85 74.13 5.73 +0.43 -0.07 F4V -0.351+0.032 +.026+032V =< 10 4.3 84.3 * -4502 CD-42 7155 1016152229602937 113624.6-423229114119.8-430545289.57 17.95 5.55 A0V -0.082+0.003 +008SB 0 -4503 CD-31 9181 101666202717 I W 113644.2-315638114144.0-322959286.29 28.11 5.22 +1.48 +1.78 K5III+F7V +0.004-0.042 +.015+034 3.1 67.0AC 4* -4504 3 DraBD+67 714 101673 15606 440I 113653.8+671754114228.4+664442133.20 48.99 5.30 +1.28 +1.24 K3III -0.043+0.038 +003V? < 17 -4505 BD+23 2375 101688 81949 113653.6+224602114205.2+221239226.49 73.51 6.59R F2IV-V -0.092-0.063 -023 60 -4506 BD-19 3326 101695180117 113700.6-194417114203.5-201738281.62 39.69 6.22 +0.95 K0 -0.015-0.048 -014V -4507 CP-82 469 1017822586213982 W 113733.2-823244114101.2-830600300.71-20.53 6.33 +1.08 +0.88 K0III -0.071+0.015 +012 5.2 22.2 -4508 CD-36 7371 1018832027442939 113828.3-363804114327.2-371125288.20 23.73 5.98 +1.46 +1.71 K3III -0.015-0.024 +036 -4509 CP-78 677 101917256865 113841.0-784504114255.4-791823299.66-16.87 6.39 +0.90 +0.59 K0III-IV +0.132-0.008 +033 -4510 BD-05 3340 101933138375 113848.6-060715114355.1-064038274.69 52.45 6.07 +0.96 +0.71 gG8 +0.059-0.040 -003V? -4511 CP-61 2559 101947251555 I V810 Cen 113844.8-615604114331.2-622922295.18-00.64 5.03 +0.80 +0.35 +0.36 G00-IaFe1 v-0.008+0.003 +.037+010V * -4512 BD+26 2250 101980 819602940I 8285 113900.8+254623114413.2+251306216.37 74.81 6.02 +1.53 +1.85 K5III -0.014+0.012 -003V? 4.7 36.7 * -4513 CP-62 2250 101995251559 113906.1-621922114352.9-625242295.32-01.01 6.10 +0.06 +0.13 A2III-IV +0.017-0.015 +002V? -4514 27Zet CrtBD-17 3460 1020701568691301I 113941.6-174741114445.8-182103281.53 41.73 4.73 +0.97 +0.74 +0.48 G8IIIa +0.031-0.030 +.030-005 < 19: * -4515 2Xi VirBD+09 2545 102124119029 114007.7+084851114517.1+081530260.18 65.48 4.85 +0.18 +0.10 A4V +0.061-0.018 +.039-001V 158 -4516 CD-48 6777 102150222997 114017.0-483054114512.6-490411291.91 12.38 6.26 +1.17 K1III -0.031+0.014 +004 -4517 3Nu VirBD+07 2479 1022121190351302I 5318 114043.1+070523114551.6+063146262.86 64.18 4.03 +1.51 +1.79 +1.01 M1IIIab e-0.018-0.184 +.014+051V? * -4518 63Chi UMaBD+48 1966 102224 43886 441I 5319 114046.3+482002114603.0+474646150.32 65.72 3.71 +1.18 +1.16 +0.60 K0.5IIIb -0.137+0.030 +.019-009V < 19: * -4519 CD-44 7564 102232223009 5317 114046.9-450806114543.9-454124291.09 15.67 5.29 -0.12 -0.55 -0.04C B6III -0.047+0.009 -010V? 56 -4520 Lam MusCP-66 1640 102249251575 442 W 114053.1-661027114536.4-664343296.49-04.68 3.64 +0.16 +0.15 +0.08 A7III -0.103+0.037 +016 71 9.0 40.6 * -4521 BD+56 1544 102328 281422941I 114134.5+561104114655.6+553742140.77 59.21 5.27 +1.27 +1.48 +0.60 K2.5IIIbCN1Ca1 +0.014-0.030 +002 < 19: -4522 CP-60 3325 102350251579 443 W 5325 114140.4-603721114630.8-611042295.19 0.71 4.11 +0.90 +0.58 +0.43 G5Ib-II -0.027-0.015 +.011-003 8.8 25. * -4523 CD-39 7301 102365223020 I' 114144.9-395722114631.1-403002289.82 20.71 4.91 +0.66 +0.10 +0.38 G3V -1.531+0.401 +.099+015 * -4524 CD-35 7438 102397202805 114205.7-352102114707.0-355425288.58 25.17 6.17 +0.96 G8III +0.034-0.037 +009V -4525 CD-29 9337 102438202811 114215.6-294328114715.7-301713286.84 30.58 6.48 +0.68 +0.24 G5V -0.276-0.240 +.064+012 -4526 CP-57 4989 1024612393732942 5334 114225.9-570829114719.1-574147294.42 4.11 5.41 +1.67 +1.99 K5III -0.025+0.017 +.004-052 * -4527 93 LeoBD+21 2358 102509 819981304I W DQ Leo 114249.6+204629114759.1+201308235.01 73.93 4.53 +0.55 +0.28 +0.36 G5III-IVe+A7V -0.149-0.003 +.022+000SBO =< 50 4.4 74.3 * -4528 4 VirBD+09 2549 102510119058 W 114246.6+084805114754.9+081445261.46 65.86 5.32 +0.02 +0.04 A1 -0.057+0.012 +.017-001V 68 6.8 150.2AB 3 -4529 BD-09 3366 102574156896 W 114318.3-094515114823.5-101848278.60 49.56 6.26 +0.58 +0.13 F7V -0.099-0.115 +015V? =< 10 3.3 88.4AB 3* -4530 Mu MusCP-66 1649 102584251597 Mu Mus 114325.7-661531114814.3-664853296.76-04.70 4.72 +1.54 +1.91 +0.88 K4III +0.013-0.015 +.013+037 * -4531 BD+15 2381 102590 99800 8311 5344 114329.9+145023114838.7+141703251.07 70.53 5.88 +0.29 +0.07 F0V -0.107+0.007 +.053+006V 2.4 1.1 * -4532 CD-26 8789 1026201802081305I II Hya 114341.9-261137114845.1-264459286.01 34.05 5.11 +1.60 +1.67 M4+III -0.032-0.010 +.019+007 * -4533 BD+00 2843 102634138420 114355.3+001414114901.2-001907271.74 58.72 6.15 +0.52 +0.08 F7V -0.217+0.009 +004V? 6 -4534 94Bet LeoBD+15 2383 102647 99809 444I 8314 Bet Leo 114357.5+150752114903.6+143419250.65 70.81 2.14 +0.09 +0.07 +0.02 A3V -0.497-0.114 +.082-000V 121 6.5 264.0AD 4* -4535 BD+17 2402 102660 99812 114404.8+164801114914.9+161434246.81 71.94 6.04 +0.27 +0.14 A3m +0.054-0.061 -023SB1O 22 * -4536 BD+35 2284 102713 62718 114430.0+352915114941.7+345554178.56 74.67 5.70 +0.46 +0.02 F5IV -0.115+0.006 -007SBO * -4537 CP-63 1988 1027762516022944 5357 114448.9-631357114941.1-634718296.18-01.73 4.32 -0.15 -0.59 -0.14 B3Vne -0.021+0.006 +029V 268 * -4538 CP-69 1595 1028392516042945 114509.3-694011114956.6-701333297.74-07.98 4.97 +1.40 +1.22 +0.75 G6Ib -0.009+0.001 +.009+018 -4539 BD-15 3363 102845156926 114514.2-151829115019.5-155150282.11 44.52 6.13 +0.95 K0 -0.013+0.009 -004V -4540 5Bet VirBD+02 2489 102870119076 445I W 114529.1+021942115041.7+014553270.50 60.75 3.61 +0.55 +0.11 +0.28 F9V +0.743-0.271 +.104+005V 3 5.0 512.3AC 3* -4541 CP-61 2677 102878251605 114533.3-620536115027.2-623858295.99-00.60 5.70 +0.26 -0.04 A2Iab -0.012-0.002 -010 * -4542 CD-26 8807 102888180232 114533.9-264319115037.1-271640286.67 33.67 6.48 +0.98 G8III -0.087+0.010 -003 -4543 BD+13 2465 102910 998272946 8320 114547.4+125003115055.3+121644256.30 69.47 6.35 +0.27 +0.08 F0IVm s -0.137+0.023 +007 60 4.9 14.9 * -4544 BD-04 3152 1029281384451306 D 114555.4-044638115102.2-052000276.47 54.41 5.64 +1.06 +0.88 K0III +0.003 0.000 +012SB * -4545 BD+34 2264 102942 62731 W 114557.7+335550115109.4+332230183.62 75.58 6.27 +0.32 +0.11 +0.09 Am -0.021+0.019 +002V 2.5 46.6 -4546 CD-44 7614 102964223062 446 114608.6-443701115108.7-451025291.92 16.40 4.46 +1.30 +1.46 +0.67 K3III -0.070-0.010 +.022+002 -4547 BD-11 3190 1029901569402947 W 5365 114617.5-113758115121.9-121116280.66 48.07 6.35 +0.40 F1III-IV -0.238+0.048 +009 28 7.2 30.7 -4548 CD-30 9506 1030262028832948 114638.0-301614115141.6-305006288.08 30.31 5.85 +0.56 +0.05 F7V -0.010-0.295 +.019+033 -4549 CP-64 1724 103079251617 W 114657.6-643858115151.2-651222296.73-03.05 4.90 -0.11 -0.54 -0.13 B4V -0.039-0.010 +021V? 57 2.2 1.8 * -4550 BD+38 2285 103095 627381307 CF UMa 114713.0+382610115258.8+374307168.42 73.69 6.45 +0.75 +0.17 +0.45 G8Vp +4.003-5.813 +.116-098V 5.5 1.7 * -4551 CP-56 4836 103101239443 W 114713.3-562556115210.1-565916294.89 4.96 5.57 +0.07 A2V -0.119+0.033 +023V? 5.3 54.6AB 3 -4552 Bet HyaCD-33 8018 103192202901 W Bet Hya 114751.3-332106115254.6-335429289.27 27.41 4.28 -0.10 -0.33 -0.08 B9IIIpSi -0.050+0.005D+.010-001 72 0.9 0.8 * -4553 CD-34 7760 1032662029102949 114823.7-343034115326.8-350400289.72 26.31 6.17 +0.08 +0.09 A2V -0.079-0.028 -009 -4554 64Gam UMaBD+54 1475 103287 28179 447I 5379 114834.3+541503115349.8+534141140.84 61.38 2.44 0.00 +0.02 -0.03 A0Ve +0.095+0.012 +.028-013SB 168 * -4555 BD+01 2624 103313119100 114843.1+010630115350.3+003307273.07 60.04 6.30 +0.20 +0.16 F0V -0.039-0.007 +010 75 -4556 CP-56 4861 103400239475 114911.8-565113115411.5-572436295.26 4.61 6.06 +0.05 A0-1:III -0.014+0.005 -014 -4557 CD-37 7536 103437202926 W 114924.7-371138115425.8-374456290.66 23.76 6.46 +0.52 -0.03 F7V -0.309+0.060 +.052-012 1.3 1.1 * -4558 CD-25 8930 1034621802882950 114937.0-250934115442.5-254250287.21 35.42 5.30 +0.88 +0.53 G4III +0.048+0.081 +.032-011V -4559 6 VirBD+09 2560 1034841191112951 114955.3+090000115503.1+082638264.79 67.04 5.58 +0.94 +0.67 +0.46 gK0 -0.031+0.016 -010 -4560 65 UMaBD+47 1913 103483 43945 8347A DN UMa 114953.6+470159115505.7+462837149.12 67.68 6.54 +0.10 +0.08 A3Vn +0.001+0.008D+.003-008SB 150 0.4 63.0ABxD 4* -4561 65 UMaBD+47 1914 103498 43946 8347D 114959.3+470134115511.2+462811149.10 67.70 7.03 +0.01 +0.02 A1pCrEuSr: -0.009+0.006D+.003-007 =< 25 0.4 63.0ABxD 4* -4562 BD+37 2230 103500 62754 I 115003.9+371851115514.1+364523170.44 74.71 6.49 +1.58 +1.83 +0.98E M3III -0.054-0.050 +019 -4563 CP-62 2408 103516251640 115001.4-624321115459.8-631644296.64-01.10 5.91 +0.19 +0.01 A3Ib -0.026+0.011 -028 -4564 95 LeoBD+16 2319 103578 998691308 W 115031.9+161212115540.5+153848251.67 72.70 5.53 +0.11 +0.12 A3V +0.009+0.002 -.003-021SBO 54 90. * -4565 CD-27 8384 103596180307 I 115034.9-275511115540.1-282837288.34 32.81 5.93 +1.50 +1.86 K5III +0.004-0.026 +011V -4566 66 UMaBD+57 1343 103605 281912953 115045.0+570918115558.4+563555137.73 58.91 5.84 +1.10 K1III +0.010 0.000 +013V -4567 30Eta CrtBD-16 3358 1036321569881309 5392 115055.1-163538115600.9-170903284.47 43.73 5.18 -0.02 0.00 A0V -0.051-0.006 +.023+015V? 74 -4568 CD-38 7410 103637202950 115050.1-390756115554.7-394121291.45 21.94 6.13 +1.02 K0III +0.048-0.008 -000 -4569 BD+62 1204 103736 15666 115140.1+620625115653.2+613257134.05 54.39 6.22 +0.96 G8III -0.031-0.040 +017 -4570 CD-46 7521 103746223127 115141.3-463059115643.9-470421293.35 14.78 6.26 +0.40 +0.04 +0.22C F5V -0.126+0.016 +008 -4571 CD-32 8413 103789202971 LV Hya 115158.8-324531115703.7-331855290.06 28.19 6.21 -0.04 A0V -0.055+0.003 -010 -4572 BD+41 2253 103799 439632954 115205.9+405407115714.6+402037159.77 72.68 6.62 +0.46 -0.02 F6V -0.160-0.062 +026 7 -4573 CP-61 2829 103884251659 5397 115238.3-615330115740.1-622656296.76-00.22 5.57 -0.15 -0.66 -0.23 B3V -0.022-0.006 +020V 185 * -4574 BD+33 2174 103928 627741310 8368 115259.0+324956115807.2+321626185.75 77.34 6.42 +0.29 A9V -0.109-0.060 +002V? 67 5.0 122.5AC 4* -4575 BD+62 1206 103953 15673 115308.0+620117115820.6+612753133.83 54.53 6.76 K0III +0.042 0.000 -026 -4576 CP-55 4751 1039612395332956 5402 115311.8-554538115815.2-561902295.57 5.79 5.44 -0.08 B8III -0.021+0.006 -005 -4577 CD-40 7041 103974223139 W 115315.5-402328115820.3-405650292.24 20.82 6.79 +0.97 +0.70 K1III -0.057+0.021 +007 2.6 3.1 -4578 CP-63 2073 104035251664 115344.8-634658115847.7-642021297.27-02.05 5.61 +0.18 -0.11 A3Ib -0.001+0.012 +002V -4579 CD-25 8963 104039180349 8371 115348.2-252105115854.4-255432288.40 35.48 6.43 +0.03 +0.04 A0-1V -0.027-0.019 +013 0.2 0.2 * -4580 BD+01 2636 104055119147 8372 115356.4+010512115903.4+003150275.47 60.58 6.17 +1.26 +1.41 K2IV -0.061+0.027 +012V? 7.7 14.2 * -4581 BD+33 2176 104075 62784 8374 115408.9+334327115917.6+331003181.58 77.23 5.96 +1.15 +1.11 +0.58 K1III +0.004+0.003 -001V? 6.0 4.5 * -4582 CD-51 6236 1040812395482959 115406.1-510823115910.9-514148294.74 10.34 6.05 +1.28 K1-2III -0.012-0.003 +010 -4583 Eps ChaCP-77 772 104174256894 W 115439.4-773954115937.3-781319300.21-15.62 4.91 -0.06 -0.16 -0.05 B9Vn -0.057-0.002D+.012+013V 205 0.6 0.9 * -4584 BD+34 2279 104179 62786 115449.3+343526115957.2+340206177.83 76.96 6.50 +0.22 +0.15 A9III -0.064+0.042 -008 101 -4585 7 VirBD+04 2556 1041811191562960 115449.5+041244115956.9+033919273.05 63.50 5.37 0.00 0.00 A1V -0.017-0.006 +.016-003V? 65 -4586 BD+81 389 104216 19673957I 5415 115505.5+812440120018.6+805111125.42 36.03 6.17 +1.61 +1.90 +1.04E M2III -0.068-0.038 +032V? * -4587 BD-09 3413 104304157041 115536.5-095234120044.5-102646283.11 50.47 5.55 +0.77 +0.44 +0.36 G8-K0IV +0.126-0.476 +.080+000V? -4588 BD-21 3443 104307180374 8389 115535.3-211650120042.5-215014287.61 39.52 6.28 +1.22 K0IV +0.028+0.006 +004V 7.1 11.7 -4589 8Pi VirBD+07 2502 1043211191641311 S 115544.9+071019120052.4+063651270.30 66.23 4.66 +0.13 +0.11 +0.04 A5V +0.001-0.030 +.021-010SBO 74 2.0 0.0 * -4590 BD-18 3295 1043371570422961 115544.2-190608120051.2-193932286.92 41.63 5.26 -0.20 B1.5V -0.021+0.013 +002SBO 119 * -4591 BD-00 2520 104356138533 115554.5-011233120101.8-014605278.14 58.66 6.31 +1.21 +1.06 gG8 -0.015-0.070 +036V? -4592 CP-56 4954 104430239589 115623.4-565647120129.0-573013296.24 4.72 6.16 0.00 -0.03 A0V -0.073-0.015 -004 -4593 BD+36 2230 104438 628022963 115632.4+363604120139.5+360231169.73 76.17 5.59 +1.01 +0.80 +0.51 K0III -0.091-0.081 +.028+030V? -4594 67 UMaBD+43 2179 104513 440022965 W DP UMa 115702.2+433602120206.8+430244151.89 71.20 5.21 +0.26 +0.07 +0.11 F0Vam -0.326+0.070 +.019+006V? 76 1.7 310.5AB 4* -4595 CP-84 371 1045552586323983 W 115719.1-850430120220.1-853754301.93-22.86 6.05 +1.29 +1.54 K3III -0.065+0.001 +017 4.3 25.0 -4596 CP-70 1454 104570256897 115722.6-705556120228.6-712920299.03-08.99 6.42 +1.17 +1.14 K1III -0.064+0.018 -009 -4597 CP-68 1604 1046002516992966 115731.0-683806120237.7-691132298.60-06.73 5.89 -0.08 -0.28 B9V -0.039-0.007 +008 -4598 BD-06 3499 104625138551 I 115744.5-070738120251.6-074101282.54 53.25 6.22 +1.49 +1.83 K5 -0.036+0.020 -008 -4599 The1CruCP-62 2543 104671251705 W 115755.8-624522120301.5-631846297.53-00.95 4.33 +0.27 +0.04 +0.18 Am -0.150+0.008 +.021-002SB2O 33 9.3 4.5 * -4600 CD-41 6938 104731223193 449 115828.7-415226120339.6-422603293.60 19.57 5.15 +0.41 -0.03 +0.25C F6V +0.331-0.114 +.039+036 0 -4601 CP-73 924 104752256898 115835.2-733926120344.3-741250299.64-11.65 6.44 +1.23 +0.97 +0.60C G6III -0.027+0.007 +009 -4602 2 ComBD+22 2437 104827 82123 8406 115909.3+220058120416.6+212733238.22 77.86 5.87 +0.22 +0.11 +0.11 F0IV-V +0.036-0.004D+.005+006SB =< 54 1.4 3.6 * -4603 The2CruCP-62 2561 104841251717 The2 Cru 115910.1-623632120419.2-630956297.64-00.78 4.72 -0.08 -0.61 -0.10 B2IV -0.020+0.008 +016SBO 56 * -4604 CP-67 1896 104878251720 115929.2-674619120438.7-681945298.62-05.85 5.35 -0.01 -0.17 A0IV -0.054-0.012 +.016+025SB 187 * -4605 Kap ChaCP-75 777 104902256899 115936.1-755749120446.5-763109300.15-13.90 5.04 +1.49 +1.78 +0.76 K4III -0.082+0.048 +.003-002 -4606 BD+86 176 104904 19751642 115942.8+860829120428.1+853514123.98 31.45 6.27 +0.59 F6V -0.056+0.092 +008V? -4607 CP-60 3697 104933251723 115947.7-602441120457.1-605809297.32 1.40 5.96 +1.67 +2.04 +0.92E M2III -0.038-0.032 -000 -4608 9Omi VirBD+09 2583 104979119213 450I 120006.9+091718120512.5+084359270.07 68.60 4.12 +0.98 +0.63 +0.49 G8IIIaCN-1Ba1CH1 -0.220+0.046 +.039-030V? < 19: * -4609 BD+77 461 104985 7500 451 120010.3+772754120515.1+765421126.32 39.92 5.80 +1.01 +0.85 G9III +0.147-0.091 +.014-020V -4610 BD+63 999 105043 15710 8417 5452 120036.7+632930120539.7+625559131.64 53.41 6.13 +1.17 +1.15 K2III -0.050-0.075 -026V? 5.4 2.3 * -4611 CP-64 1791 105071251734 120042.2-645924120553.2-653250298.24-03.09 6.33 +0.22 -0.47 B6Iab-Ib -0.031-0.012 -013V -4612 CD-35 7694 1050782031191312 W 5456 120048.1-350814120556.7-354138292.64 26.27 6.23 -0.08 B8V -0.031-0.002 -018V 7.7 25.4 -4613 BD-02 3460 1050891385852967 120052.5-023427120559.8-030754281.26 57.82 6.37 +1.00 +0.79 gG8 -0.028-0.019 +017V? -4614 CP-67 1903 105138251737 120107.2-680540120619.8-683903298.83-06.14 6.23 +1.24 +1.04 G3Ib -0.014+0.020 +006 -4615 CP-65 1788 105151251738 W 120111.7-650908120623.1-654233298.32-03.24 6.06 +0.65 +0.40 G8-K0III+A3-5V -0.049+0.002 -004 0.0 0.1AB 3* -4616 Eta CruCP-63 2145 1052112517422969 W 120139.8-640321120652.9-643649298.18-02.15 4.15 +0.34 +0.03 +0.16 F2III +0.033-0.037 +.053+009SB 65 7.5 44.0 -4617 CP-74 880 1053402569052971 120233.6-744839120749.8-752201300.13-12.73 5.18 +1.30 +1.37 +0.60C K2II-III -0.098+0.019 +.020-045 -4618 CD-49 6813 105382239687 W B 120254.3-500615120805.2-503941295.94 11.62 4.47 -0.15 -0.67 -0.18 B6IIIe v-0.035-0.010 +017 127 1.9 268.6AB 3* -4619 CD-50 6688 105383239686 W C 120253.9-501223120804.8-504548295.96 11.52 6.37 -0.05 B9V -0.037+0.002 +016V? 1.9 268.6AB 3* -4620 CD-47 7396 105416223235 120303.8-480808120814.7-484134295.62 13.57 5.34 -0.01 -0.04 0.00C B9V -0.025-0.017 +003V * -4621 Del CenCD-50 6697 105435239689 452 W A Del Cen 120310.4-500956120821.5-504321296.00 11.57 2.60 -0.12 -0.90 -0.12 B2IVne v-0.034-0.008 +.026+011V 181 1.9 268.6AB 3* -4622 CP-60 3777 105437251757 120311.4-601726120824.6-605050297.71 1.59 6.22 +1.74 +1.88 K3-4II -0.013+0.003 +010 -4623 1Alp CrvCD-2410174 105452180505 120315.2-241016120824.8-244344290.66 37.12 4.02 +0.32 -0.02 +0.18 F2III-IV +0.086-0.040 +.070+004V 16 * -4624 CD-43 7502 105509223241 V788 Cen 120343.3-434605120853.8-441934294.96 17.89 5.75 +0.24 +0.16 +0.11C A2mA5-F2 v-0.046-0.049 -009SB2 * -4625 CD-40 7128 105521223242 V817 Cen 120344.1-404029120854.5-411353294.39 20.93 5.48 -0.07 -0.62 -0.08 B3IV e-0.024-0.006 +000V? 204 * -4626 10 VirBD+02 2517 1056391192452972 W 120433.8+022734120941.3+015352279.54 62.86 5.95 +1.12 +1.14 K3III +0.043-0.178 +.009+003 7.3 39.5 * -4627 BD+75 469 105678 7512 120455.9+751304120947.3+743941126.63 42.17 6.35 +0.50 F6IV +0.001+0.006 -019 34 -4628 CD-34 7956 105686203183 W 120452.5-340853121002.5-344218293.36 27.40 6.17 +0.03 -0.02 A0V -0.052-0.018D+.006-010 1.8 3.4 -4629 11 VirBD+06 2559 1057021192492973 120457.6+062147121003.4+054825276.30 66.52 5.72 +0.35 +0.17 +0.15 F2-6IIIm vs -0.158+0.016 +.019-009V? * -4630 2Eps CrvBD-21 3487 105707180531 453I 5483 120458.8-220349121007.5-223711290.59 39.26 3.00 +1.33 +1.47 +0.64 K2.5IIIaBa0.2: -0.071+0.014 +.027+005 * -4631 CD-37 7714 1057762031952974 120522.4-371846121033.8-375213294.09 24.30 6.06 +0.20 A5V +0.047-0.035 -007 -4632 3 ComBD+17 2446 105778 999731313 120525.8+172157121031.6+164833258.30 76.00 6.39 +0.06 +0.10 A4V -0.017+0.001 -012V -4633 BD+28 2084 105805 82166 5485 120541.3+275017121046.1+271653209.63 80.96 6.01 +0.11 +0.09 A4Vn -0.009-0.014 -009SB2 172 * -4634 CP-60 3812 105841251778 120550.4-604314121104.9-611639298.10 1.22 6.08 +0.39 +0.09 F2-3IV -0.134-0.018 -003 -4635 3 CrvBD-22 3305 105850180546 120554.8-230244121103.9-233609291.12 38.34 5.46 +0.06 A2V -0.063-0.016 +.023+011 124 -4636 CD-44 7845 105852223266 W 120550.8-445159121102.9-452522295.54 16.87 6.61 +1.08 +0.79 +0.51C K0III -0.018+0.009 +006V 3.8 2.3 -4637 CD-50 6752 105920239735 120619.7-504804121131.4-512134296.61 11.02 6.23 +0.82 +0.49 G6III+G: -0.208-0.067 +026 -4638 Rho CenCD-51 6455 105937239737 120625.4-514842121139.1-522207296.78 10.03 3.96 -0.15 -0.62 -0.17 B3V -0.035-0.016 +.032+015V 140 * -4639 BD+82 356 105943 1991 W 120630.2+821558121100.0+814236124.71 35.28 6.00 +1.62 gK5 -0.029+0.007 -027V? 2.0 66.7 -4640 4 ComBD+26 2316 105981 821782976I 120646.7+262539121151.2+255213218.78 81.06 5.66 +1.41 +1.61 K4III -0.038-0.031 +022SBO * -4641 68 UMaBD+57 1359 106002 28291 I 120645.8+573640121144.9+570316133.49 59.25 6.43R gK5 +0.007-0.013 +035 -4642 BD+29 2265 106022 82181 120656.1+290540121201.2+283210201.47 81.17 6.49 +0.36 +0.01 F5V +0.097-0.071 -015V? * -4643 5 ComBD+21 2398 106057 821822977 120704.1+210556121209.3+203231247.11 78.87 5.57 +0.95 K0II-III -0.020-0.019 -025V -4644 CP-62 2624 106068251790 120703.7-622340121222.0-625703298.51-00.42 5.92 +0.29 -0.33 B8Ia-Iab -0.007+0.002 -002 * -4645 CP-69 1646 106111251791 S Mus 120723.8-693543121246.8-700907299.64-07.53 6.17 +0.84 +0.57 F6Ib v-0.022-0.009 +011SB * -4646 BD+78 412 106112 7522 454 120731.0+781019121211.9+773659125.64 39.31 5.14 +0.33 +0.10 A5m +0.010+0.022 +.031-000SB1O 79 * -4647 CD-33 8252 106198203245 5503 120801.7-333409121313.0-340732293.97 28.08 6.5 +1.66 +1.46 M4III -0.030-0.006 +003V * -4648 CD-38 7581 106231203250 120812.9-382222121325.3-385545294.89 23.35 5.76 -0.13 B4IV -0.003-0.006 -043V? * -4649 CP-77 804 106248256915 120818.1-780102121355.7-783425301.01-15.84 6.35 +1.24 +1.41 K2-3IIICNII -0.033-0.003 +035 -4650 12 VirBD+11 2440 106251 999972978 120820.3+104908121325.9+101544273.17 70.90 5.85 +0.27 +0.11 +0.11 A2m -0.091-0.010 +002 35 -4651 CD-33 8257 106257203252 W 120825.1-331411121336.7-334734294.00 28.42 6.33 +0.08 A0V -0.006-0.011 -011V? 1.8 1.6 * -4652 CD-45 7630 106321223297 W 120848.9-451004121402.6-454326296.13 16.65 5.31 +1.43 +1.59 +0.70C K3III -0.042+0.007 +.007+007SB 1.3 2.8 * -4653 CP-63 2203 106343251803 120855.7-635108121416.8-642431298.93-01.83 6.22 +0.12 -0.82 B1.5Ia -0.013+0.004 -007 100 -4654 BD+54 1504 106478 283091314 120946.0+535928121443.4+532605134.94 62.83 6.16 +1.04 gK0 -0.019-0.015 +000 * -4655 BD-20 3606 106485180602 120949.5-201718121459.6-205039291.58 41.22 5.83 +1.05 gG7 +0.001+0.004 +016V -4656 Del CruCP-58 4189 106490239791 455 Del Cru 120949.9-581133121508.7-584456298.23 3.79 2.80 -0.23 -0.91 -0.24 B2IV -0.041-0.009 +.003+022V? 194 * -4657 BD-09 3468 106516157168 W 121001.7-094342121510.6-101845288.49 51.55 6.11 +0.46 -0.13 +0.16E F5V +0.034-1.017 +.034+008V 8 6.8 73.3 * -4658 CD-41 7056 106572223309 121019.4-412108121530.5-415447295.81 20.46 6.26 +1.01 +0.76 K0III -0.331-0.175 +.025+025 -4659 BD+71 610 106574 75322980I 121022.6+704524121508.5+701200127.39 46.61 5.71 +1.19 gK2 -0.023-0.026 +.013-014V? -4660 69Del UMaBD+57 1363 106591 28315 456 W 5513 121028.7+573518121525.6+570157132.57 59.42 3.31 +0.08 +0.07 0.00 A3V +0.104+0.009 +.061-013V 177 6.6 189.6AB 3* -4661 BD-22 3322 106612180619 8481 121036.0-224749121547.0-232113292.42 38.79 6.54 +0.45 F3V +0.039-0.030D+.016+018V 1.2 1.6 * -4662 4Gam CrvBD-16 3424 106625157176 457I 5515 121039.7-165912121548.4-173231290.99 44.50 2.59 -0.11 -0.34 -0.09 B8IIIpHgMn -0.161+0.023 -004SB 41 * -4663 6 ComBD+15 2436 1066611000122981 121055.5+152721121600.2+145356267.16 75.25 5.10 +0.06 +0.08 A3V -0.080-0.034 +.026+010SB 170 -4664 CP-71 1323 106676256919 121052.3-720329121623.5-723653300.28-09.92 6.22 -0.01 -0.06 A0V -0.053-0.026 +028 -4665 BD+73 549 106677 7533 DK Dra 121059.5+730628121541.4+723303126.66 44.32 6.29 +1.14 K0IIIe+K0IIIe -0.014-0.035 -048SB2O * -4666 2 CVnBD+41 2284 106690 44097 458I 8489 121106.9+411301121607.6+403937148.99 74.63 5.66 +1.55 +1.96 M1III+F7V +0.017-0.032D+.004-016SB 3.1 11.4 * -4667 7 ComBD+24 2443 106714 822112982I 121117.0+243005121620.5+235643232.90 81.47 4.95 +0.97 +0.68 +0.48 G8IIIFe-0.5 -0.027-0.007 +.006-028 < 17 * -4668 BD+33 2213 106760 629282983I S Var? 121128.5+333713121630.1+330341172.65 80.40 5.00 +1.14 +1.07 +0.58 K0.5IIIb -0.053-0.111 +.022-042SB1O < 17 * -4669 CP-64 1844 106797251826 121141.2-650812121706.0-654134299.41-03.06 6.06 +0.03 -0.05 A0V -0.057-0.001 +021V -4670 BD-15 3442 106819157184 5527 121153.8-160817121703.3-164137291.17 45.39 6.05 +0.10 +0.12 A2IV -0.048+0.003 -012 -4671 Eps MusCP-67 1931 106849251830 I: Eps Mus 121209.9-672415121734.1-675739299.75-05.30 4.11 +1.58 +1.55 +1.69 M5III -0.244-0.025 +.046+007SB * -4672 BD+54 1510 106884 28327 I 121233.6+534453121729.5+531128134.24 63.19 5.81 +1.30 +1.52 K6III +0.034-0.046 -041 -4673 BD+29 2275 106887 82219 8501 121228.3+292930121730.5+285614197.38 82.30 5.70 +0.16 +0.12 +0.05 A4m: -0.042+0.037 -007V 75 4.9 8.6 * -4674 Bet ChaCP-78 741 106911256924 459 5532 121228.6-784525121820.7-791844301.34-16.54 4.26 -0.12 -0.51 -0.10 B5Vn -0.048+0.017 +023 255 * -4675 CD-35 7842 106922203319 W 121233.8-353217121747.3-360538295.36 26.28 6.15 +0.01 A0V -0.037-0.006D+.004-014 0.3 0.5 -4676 BD+15 2442 106926100023 121239.1+154205121744.3+150839268.05 75.68 6.34 +1.37 K4III +0.044-0.063 -042SB -4677 BD-03 3262 106975138703 8505B 121301.3-032357121809.1-035716287.17 57.89 6.99 +0.36 +0.03 F3V -0.017+0.016D+.016+001 0.4 20.1 * -4678 BD-03 3263 106976138704 8505A 121301.7-032338121809.6-035655287.17 57.90 6.54 +0.33 +0.01 F2V -0.013+0.024D+.016-001 0.4 20.1 * -4679 Zet CruCP-63 2235 106983251841 W 121300.9-632650121826.1-640011299.33-01.36 4.04 -0.17 -0.69 -0.19 B2.5V -0.050-0.010 +016 113 9.0 33.8 * -4680 BD+31 2350 107054 629432984 121329.1+304828121831.6+301457187.60 82.14 6.23 +0.30 +0.02 A9.5III +0.077-0.116 -018V 140 -4681 13 VirBD+00 2920 107070138710 121332.6-001353121840.3-004714285.85 60.99 5.90 +0.17 +0.13 A5Vn +0.029-0.016 -014V 195 -4682 CP-54 5113 1070792398382985 W 5544 121339.7-543514121859.7-550835298.27 7.43 5.00 +1.59 +1.95 +1.06 M1III -0.076-0.014 +.010-007SB 7.0 35.7 * -4683 BD+87 107 107113 2012 121355.8+865930121651.4+862610123.56 30.65 6.33 +0.43 -0.08 F4V +0.210-0.003 +.037-006 -4684 BD+26 2326 107131 82237 FM Com 121359.5+263350121902.1+260028219.89 82.67 6.48 +0.18 +0.09 +0.07 A5-7mIV-V -0.004-0.022 +001SB 175 * -4685 8 ComBD+23 2448 107168 82239 121416.1+233525121919.1+230205240.56 81.66 6.27 +0.17 +0.15 +0.02 A5III vs -0.022-0.012 +001V? =< 12 * -4686 BD+88 71 107192 20103958 121423.5+881515121520.3+874200123.35 29.40 6.28 +0.35 -0.01 F2V -0.028+0.054 -004V 67 -4687 BD+75 470 107193 75402986 121420.8+754256121849.9+750938125.72 41.79 5.38 -0.02 -0.05 A1V -0.040+0.002 +.018-003V 217 -4688 9 ComBD+28 2106 107213 82244 121429.0+284256121929.6+280925202.80 82.85 6.33 +0.50 +0.08 F8V s -0.197-0.129 +.025-008V 8 * -4689 15Eta VirBD+00 2926 107259138721 460 D 5555 121447.3-000640121954.4-004001286.40 61.19 3.89 +0.02 +0.06 0.00 A2IV -0.063-0.018 +.016+002SB2O 34 0.5 0.0 3* -4690 3 CVnBD+49 2130 107274 441271316I 121453.2+493221121948.7+485903136.46 67.31 5.29 +1.66 +1.97 +1.06 M0III -0.012+0.007 +008V -4691 BD-21 3511 107295180695 8515 121500.0-213711122010.7-221032293.46 40.12 5.97 +0.82 G3IV -0.109-0.025D+.008-001V? 1.8 0.3 -4692 CP-65 1842 107301251854 121458.8-651714122028.0-655034299.77-03.16 6.21 -0.04 -0.15 B9V -0.056-0.015 -008 -4693 BD+27 2114 107325 82250 5559 121518.0+271040122019.7+263710215.35 83.05 5.54 +1.09 +1.07 +0.54 K2III-IV -0.065-0.107 -013SBO * -4694 BD+26 2329 107326 82249 5557 121516.5+263323122017.7+260007220.37 82.95 6.15 +0.30 +0.08 +0.14 F0IV -0.145+0.019 +.060+008V 109 * -4695 16 VirBD+04 2604 1073281193411317I W 121516.2+035210122021.0+031845284.27 65.05 4.96 +1.16 +1.15 +0.61 K0-IIIbFe-1 -0.292-0.065 -.002+036V? < 19: 0.0 0.6 3* -4696 5Zet CrvBD-21 3514 107348180700 8517 121522.8-213936122033.7-221257293.58 40.09 5.21 -0.10 -0.38 -0.13 B8Vne -0.095-0.028 -006SB 8.4 11.2 * -4697 11 ComBD+18 2592 1073831000532987I 8521 121539.9+182044122043.0+174734264.15 78.28 4.74 +1.01 +0.79 +0.52 G8+III -0.111+0.092 +042V < 19: 8.0 9.1 * -4698 BD+27 2115 107398 82254 8519A 121539.4+273646122041.3+270317211.78 83.16 7.13 +0.36 -0.01 F3V+F3V -0.001-0.114D+.008-015 0.1 8.5 * -4699 BD-12 3614 1074181572262988I W 5564 121545.8-130039122055.7-133356291.67 48.64 5.14 +1.05 +0.89 +0.52 K1III -0.006+0.014 +.020+013V? < 19: 8.1 48.6 -4700 Eps CruCP-59 4188 1074462518622989 5568 121557.6-595055122121.6-602404299.23 2.25 3.59 +1.42 +1.63 +0.74 K3-4III -0.175+0.087 +.026-005 * -4701 70 UMaBD+58 1371 107465 28346 I 121600.2+582516122050.8+575150130.79 58.79 5.55 +1.43 +1.71 K5III +0.041-0.073 -043V -4702 CP-55 5019 107543239880 121633.5-554910122157.5-562229298.83 6.26 5.92 +1.57 +1.64 K4III+F: -0.008-0.012 -001 -4703 Zet2MusCP-66 1747 1075662518662990 W 121633.6-665801122207.3-673119300.13-04.81 5.15 +0.19 +0.17 A5V -0.031-0.003 +.007-017V? 86 5.4 32.4 -4704 Zet1MusCP-67 1939 107567251868 121636.7-674504122211.9-681827300.22-05.59 5.74 +1.04 +0.82 K0III -0.016-0.057 +020V -4705 BD+25 2498 107655 82271 121709.2+251943122210.8+244626231.00 83.02 6.19 -0.01 -0.04 -0.02 A0V -0.062-0.008 -004 53 * -4706 CP-56 5202 107696239901 Var? 121724.2-570716122249.3-574034299.10 4.98 5.39 -0.10 -0.41 B9V -0.046-0.013 -005V * -4707 12 ComBD+26 2337 107700 822731318 8530 5581 121728.7+262404122230.3+255046222.50 83.40 4.81 +0.49 +0.26 +0.33 G0III-IV+A3V -0.011-0.009 +.014+001SB2O 35 3.7 65.3AC 3* -4708 17 VirBD+06 2599 107705119360 8531 5579 121726.9+055142122232.0+051820284.15 67.12 6.40 +0.60 +0.08 +0.28 F8V -0.166-0.053 +.027+005 =< 10 3.0 20.6 * -4709 CP-85 343 107739258644 121737.1-853546122537.5-860902302.46-23.30 6.33 +1.08 +0.89 K0III -0.017-0.001 +025 -4710 CP-66 1752 107773251877 121750.9-670503122313.8-673754300.26-04.91 6.36 +0.89 +0.53 G8-K0IV -0.759+0.254 +.013+031 -4711 6 CrvCD-2410314 107815180747 121808.8-241708122321.6-245026294.89 37.59 5.68 +1.16 gK1 -0.019-0.010 -002 -4712 CD-34 8117 1078322034202992 121819.7-345129122335.4-352446296.56 27.11 5.32 -0.08 B9III -0.036-0.003 -010 45 * -4713 CD-38 7700 107833203421 121819.6-384453122336.9-391811297.08 23.25 6.40 +0.29 F2V -0.009-0.016 -013 -4714 CD-38 7701 107860203424 121828.0-382123122344.9-385440297.06 23.64 5.79 -0.08 B9V -0.036 0.000 -008 -4715 4 CVnBD+43 2218 107904 441552993 AI CVn 121851.9+430548122347.0+423234141.22 73.59 6.06 +0.33 +0.18 F3III-IV -0.078+0.015 -000SB 73 * -4716 5 CVnBD+52 1626 107950 283662994I Var 121910.0+520658122401.5+513344133.05 65.02 4.80 +0.87 +0.62 +0.44 G6IIIBa0.2 +0.014+0.013 +.038-012SB < 17 * -4717 13 ComBD+26 2344 107966 82291 GN Com 121917.5+263911122418.5+260555221.04 83.85 5.18 +0.08 +0.11 +0.02 A3V -0.016-0.011 +.009+001V 54 * -4718 CD-40 7281 107998223417 W 121926.7-404941122444.7-412303297.57 21.21 6.25 +1.18 +1.06 K2-3III -0.064-0.071 +001 2.4 10.0 * -4719 BD+26 2345 108007 82293 8539 121925.6+260813122426.7+253458225.75 83.76 6.42 +0.27 +0.08 +0.10 A7V+F4V -0.014-0.004D+.011-006V 148 1.0 1.4AB 3* -4720 CP-65 1862 108054251893 121942.5-651246122517.3-654614300.25-03.03 6.30 +0.96 +0.74 G8-K0IV -0.080-0.121 +025 -4721 CD-41 7163 1080632234262995 121950.4-415734122508.5-423052297.78 20.09 6.11 +0.65 G5III+F-G -0.130-0.022 +034 -4722 BD-10 3467 108107157272 122002.1-110320122511.7-113637292.75 50.74 5.95 +0.03 A1V -0.065-0.023 -003V? 160 -4723 CD-27 8670 1081101807861319 122004.1-271142122518.4-274457295.89 34.77 6.09 +1.27 K1III +0.005-0.001 +010V? -4724 CD-34 8146 108114203450 5610 122005.4-343756122521.8-351111296.93 27.38 5.73 -0.06 B9III v-0.034-0.006 -011 * -4725 BD+24 2455 108123 82297 122013.3+242853122515.1+235534239.94 83.28 6.03 +1.10 +1.00 +0.56 K0III +0.058-0.038 +.007-005V? * -4726 71 UMaBD+57 1373 108135 28375 I 122016.4+571956122503.2+564639130.16 59.98 5.81 +1.62 +1.83 +1.00E M3IIIb -0.014-0.018 -017V? -4727 BD+64 896 108150 158012996 W 122026.5+642124122506.4+634810127.76 53.08 6.32 +0.91 G8III -0.015+0.002 -004 3.7 52.3 -4728 6 CVnBD+39 2521 108225 63000 461I 122055.4+393424122550.9+390107145.50 76.97 5.02 +0.96 +0.73 +0.46 G9III -0.078-0.032 +.030-004V? < 19: -4729 CP-62 2742 108250251903 W C 122057.1-623404122630.9-630721300.12-00.39 4.86 -0.12 -0.59 B4IV -0.040-0.025 +027SBO 137 0.4 4.4AB 3* -4730 Alp1CruCP-62 2745 108248251904 462 W A 122102.0-623241122635.9-630557300.13-00.36 1.33 -0.24 -1.03 B0.5IV -0.036-0.012D+.008-011SBO 117 0.4 4.4AB 3* -4731 Alp2CruCP-62 2745 108249 W B 122102.5-623243122636.5-630558300.13-00.36 1.73 -0.26 -0.95 B1V -0.034-0.007D+.008-001 197 0.4 4.4AB 3* -4732 CD-50 6975 108257239948 W 122107.5-505347122631.6-512703298.98 11.23 4.82 -0.14 -0.64 -0.16 B3Vn -0.044-0.017 +005V 312 8.8 21.7 * -4733 14 ComBD+28 2115 108283 823102997I 122124.0+274920122624.1+271606210.06 84.43 4.95 +0.27 +0.18 +0.15 F0p -0.013-0.008 +.014-004SB 227 * -4734 CD-48 7426 108309223443 122131.2-482126122648.2-485448298.78 13.76 6.26 +0.68 +0.22 G3-5V -0.633-0.082 +.040+030 * -4735 CD-32 8713 108323203477 463 122135.3-321632122651.7-324948296.99 29.76 5.55 +0.01 B9V -0.005-0.027 -015 -4736 CP-63 2283 108355251911 122148.9-631406122724.6-634721300.28-01.04 6.00 +0.07 B8IV -0.035-0.018 +042 -4737 15Gam ComBD+29 2288 108381 823132999I 122157.2+284928122656.3+281606199.63 84.46 4.36 +1.13 +1.15 +0.51 K1IIIFe0.5 -0.083-0.080 +.003+004V? < 17 * -4738 16 ComBD+27 2134 108382 82314 122159.3+272246122659.3+264932214.72 84.55 5.00 +0.08 +0.13 +0.02 A4V -0.006-0.011 +.024+002V? 89 * -4739 CP-58 4289 108396239960 BL Cru 122158.0-582618122728.7-585931299.84 3.74 5.50 +1.45 +1.58 +1.88 M4-5III -0.031+0.005 +.007+072 * -4740 BD+72 565 108399 75632998 122203.6+722903122624.2+715547125.67 45.06 6.24 +1.06 +0.85 gG8 -0.153-0.023 +.005+006V -4741 BD+09 2628 108471119413 122236.8+090951122742.1+083637284.96 70.65 6.37 +0.93 +0.68 G8III +0.018-0.010 -006 -4742 BD-15 3471 108477157299 122237.8-160443122749.4-163755294.80 45.87 6.35 +0.84 +0.50 G3III -0.018+0.003 -008 -4743 Sig CenCD-49 7115 108483223454 464 122237.8-494036122802.4-501350299.10 12.47 3.91 -0.19 -0.78 -0.20 B2V -0.030-0.015 +008V 245 * -4744 CP-63 2297 108501251920 122242.0-634714122818.9-642029300.43-01.58 6.04 +0.02 -0.03 A0Vn -0.068-0.027 +009 -4745 73 UMaBD+56 1598 108502 283943000I 122249.7+561559122735.1+554246129.89 61.09 5.70 +1.55 M2IIIb -0.021-0.012 +017V? -4746 BD-03 3298 1085061387983001 FT Vir 122243.6-040343122751.6-043655291.87 57.75 6.22 +0.44 +0.08 A8n -0.086+0.006 -012SB 139 * -4747 CP-61 3209 108530251924 122251.1-611429122825.5-614743300.22 0.96 6.22 +1.26 +1.32 K2III -0.034-0.014 -014 -4748 CD-38 7753 1085412035081320 122303.3-382915122822.5-390229298.05 23.61 5.44 -0.08 B8V -0.023-0.017 +005 174 -4749 CP-55 5084 108570239977 W 122306.4-555053122833.4-562428299.75 6.33 6.15 +0.92 +0.64 K0-1III -0.240-0.220 +.021+008 5.8 49.0AC 3* -4750 BD+27 2138 108642 82326 122338.5+264649122838.1+261336221.68 84.83 6.54 +0.17 +0.12 +0.09 A2m -0.020-0.014 +002SB1O=< 12 * -4751 BD+26 2353 108651 82328 8568BC 122344.8+262711122844.6+255357225.26 84.78 6.65 +0.22 +0.08 +0.08 Am(A2/A9V/F0) -0.018-0.021 -002SBO =< 12 1.4 145.4AB 3* -4752 17 ComBD+26 2354 108662 82330 8568A AI Com 122355.0+262759122854.7+255446225.22 84.82 5.29 -0.05 -0.12 -0.08 A1IVp -0.025-0.020 +.021-003V 18 1.4 145.4AB 3* -4753 18 ComBD+24 2464 108722 82333 122426.9+243943122926.9+240632243.07 84.20 5.48 +0.43 +0.09 F5III -0.031-0.001 +025SB1O 93 * -4754 CP-55 5097 108732239999 122423.2-555820122953.9-563129299.95 6.22 5.80 +1.56 +1.82 M1III -0.022+0.019 +042V -4755 CD-41 7219 108759223471 5655 122436.4-411057122957.9-414410298.64 20.96 6.02 +1.52 +1.54 M2II-III +0.008-0.025 +003 -4756 20 ComBD+21 2424 108765 82336 466 122441.8+212700122943.2+205346263.27 82.04 5.69 +0.07 +0.09 A3V +0.024-0.032 -005SB2 -4757 7Del CrvBD-15 3482 108767157323 465I 8572A 5656 122441.3-155731122951.9-163056295.48 46.05 2.95 -0.05 -0.09 -0.04 B9.5V -0.210-0.138 +.024+009V 148 5.3 24.4 * -4758 BD-12 3647 108799157326 8573 122455.4-125021123004.8-132335294.98 49.15 6.35 +0.56 +0.05 G0V -0.248-0.041 +.049+000V? 2.7 1.5AB 4* -4759 BD-22 3383 108821180850 I 5662 122503.3-230837123017.5-234148296.71 38.92 5.63 +1.67 +2.03 M0III -0.020-0.003 -011V -4760 74 UMaBD+59 1444 108844 28405 467 122517.1+585721122957.3+582421128.32 58.50 5.35 +0.20 +0.14 +0.06 A5Del Del -0.062+0.091 +.039+007V 87 -4761 7 CVnBD+52 1631 108845 28407 W 122519.1+520515123002.9+513208130.89 65.26 6.21 +0.51 +0.03 F6-8V -0.289+0.024 +.035+019V? =< 10 2.8 229.0AC 3 -4762 75 UMaBD+59 1446 108861 28408 122523.4+591915123004.3+584603128.18 58.14 6.08 +0.98 G8III-IV +0.031-0.024 -017 -4763 Gam CruCP-56 5272 108903240019 468I W A 5672 122537.0-563312123109.9-570648300.17 5.65 1.63 +1.59 +1.78 +1.41 M3.5III +0.023-0.262 +021 5.1 110.6AB 3* -4764 Gam CruCP-56 5274 108925240022 W B 122543.9-563142123116.7-570452300.18 5.68 6.42 +0.16 A3V +0.002 0.000 +002 5.1 110.6AB 3 -4765 4 DraBD+70 700 108907 15816 I CQ Dra 122543.8+694519123006.7+691204125.75 47.81 4.95 +1.62 +1.81 +1.05E M3IIIa -0.059-0.052 +.016-013SB * -4766 21 ComBD+25 2517 108945 82346 UU Com 122600.9+250712123100.6+243402240.93 84.74 5.46 +0.05 +0.10 -0.03 A2p v-0.012-0.009 +000V 63 * -4767 BD+53 1554 108954 28413 122604.8+533726123050.1+530436129.94 63.77 6.21 +0.54 +0.07 F8-G0V +0.015+0.181 -021V? =< 6 -4768 CP-58 4344 108968240027 BG Cru 122605.0-585217123140.3-592526300.42 3.35 5.48 +0.63 +0.38 F7Ib-II v-0.018-0.004 +.010-020SB * -4769 CP-72 1261 108970256954 122607.2-722654123210.0-730006301.50-10.18 5.88 +1.11 +1.05 +0.49C K1III +0.038-0.024 +005 -4770 BD+08 2609 1089851194533002I 122616.5+080923123121.4+073615288.31 69.90 6.05 +1.52 +1.89 K5 -0.018+0.010 -017 -4771 CP-62 2805 109000251946 122615.8-625714123155.8-633022300.76-00.72 5.95 +0.27 A8III -0.063+0.008 +004 -4772 BD-04 3296 109014138832 122630.1-043004123138.7-050309293.74 57.47 6.19 +1.04 +0.86 gG9 -0.038+0.031 +002V? -4773 Gam MusCP-71 1336 109026256955 469 122629.4-713450123228.0-720759301.46-09.32 3.87 -0.15 -0.62 -0.17 B5V -0.058-0.002 +003V? 188 * -4774 CD-31 9746 109074203567 122646.4-315852123204.5-323201298.21 30.16 6.46 +0.20 +0.18 A3V -0.015-0.008 -009 -4775 8Eta CrvBD-15 3489 109085157345 5690 122654.9-153832123204.2-161146296.19 46.42 4.31 +0.38 +0.01 +0.18 F2III-IV -0.426-0.061 +.052-004SB2 59 * -4776 BD-13 3552 109141157350 122725.4-131820123236.0-135133295.99 48.76 5.74 +0.40 -0.02 F2V -0.144-0.051 -001V -4777 20 VirBD+11 2473 1092171001463004 122759.1+105051123302.9+101744287.63 72.62 6.26 +0.95 +0.70 +0.34E G8III -0.051+0.005 +001 * -4778 BD-18 3416 109238157359 5715 122808.7-191424123322.4-194731297.13 42.88 6.26 +0.29 F2V -0.013-0.002 +005 90 -4779 BD-12 3659 1092721573611321 122823.0-121648123334.3-124949296.18 49.81 5.58 +0.86 +0.45 G8III -0.016+0.052 -016V? -4780 22 ComBD+25 2523 109307 82378 122835.2+245006123334.2+241659247.20 85.07 6.29 +0.11 +0.10 +0.03 A4Vm -0.018-0.004 +002V 8 * -4781 21 VirBD-08 3372 109309138845 122837.0-085401123346.8-092707295.66 53.17 5.48 -0.03 -0.10 A0V -0.080+0.007 +.019-011V 110 -4782 CD-49 7195 109312223516 W 122832.1-492124123359.2-495434300.05 12.87 6.38 +0.46 F3III-IV -0.163-0.040 +018 6.5 7.8 -4783 BD+34 2332 109317 630701322I 122843.4+334800123338.9+331451153.97 82.78 5.42 +1.00 +0.83 +0.50 K0IIICN-1 +0.020-0.033 +.033-020V < 19: -4784 BD+34 2333 109345 63072 122852.1+335612123347.4+332305153.19 82.68 6.24 +1.05 +0.90 +0.52 K0III +0.002-0.008 +.056-043V -4785 8Bet CVnBD+42 2321 109358 44230 470I S 5725 122859.6+415403123344.5+412127136.10 75.32 4.26 +0.59 +0.05 +0.31 G0V -0.705+0.292 +.117+007SB1O=< 3 * -4786 9Bet CrvBD-22 3401 109379180915 471I 5729 122907.9-225037123423.2-232348297.87 39.31 2.65 +0.89 +0.60 +0.44 G5II +0.002-0.054 +.034-008V < 17 * -4787 5Kap DraBD+70 703 109387 7593 472I Kap Dra 122912.9+702022123329.0+694718125.21 47.26 3.87 -0.13 -0.57 -0.08 B6IIIpe v-0.059+0.012 +.013-011SBO 249 * -4788 CD-43 7755 109409223527 W 122917.5-440657123442.3-444024299.80 18.10 5.77 +0.70 +0.28 G1V -0.083-0.215 +.021+018 4.0 1.0 -4789 23 ComBD+23 2475 109485 823901323 W 122952.1+231048123451.1+223745262.15 84.14 4.81 0.00 -0.01 -0.02 A0IV -0.065+0.021 +.004-016SB2 66 2.4 0.4 * -4790 CP-61 3298 109492251962 I 122950.8-611717123529.0-615031301.05 0.97 6.22 +0.73 +0.30 G3III -0.304-0.084 +006 -4791 24 ComBD+19 2584 109510100159 8600B 5745 123005.3+185540123506.3+182238278.83 80.48 6.56 +0.25 +0.11 +0.16 A9Vm -0.003+0.024 +.002+005SB2O=< 25 1.5 20.2 * -4792 24 ComBD+19 2584 109511100160 473I 8600A 5748 123006.8+185539123507.8+182237278.86 80.48 5.02 +1.15 +1.11 K2III -0.006+0.023 +.002+004 =< 25 1.5 20.2 * -4793 BD+22 2490 109519 82394 I 123008.3+222559123508.1+215253266.81 83.58 5.85 +1.22 K1III +0.014-0.019 -014V -4794 CD-40 7376 1095362235423005 Var? 123022.5-402815123545.5-410119299.75 21.75 5.13 +0.22 0.00 +0.11 A7III -0.107-0.001 +.024-011 94 * -4795 6 DraBD+70 705 109551 7600 I 123030.2+703423123444.0+700119125.02 47.04 4.94 +1.31 +1.15 K3III* -0.032 0.000 +005V * -4796 CD-39 7717 109573203621 W 123038.1-391904123601.2-395212299.72 22.91 5.80 +0.01 A0V -0.034-0.037 +006 6.1 40.0AC 3 -4797 BD-19 3521 109585180937 TU Crv 123044.0-195830123558.6-203138298.04 42.20 6.20 +0.33 +0.08 F0III +0.014-0.037 -002V 67 * -4798 Alp MusCP-68 1702 109668251974 474 W Alp Mus 123113.0-683504123711.0-690808301.66-06.30 2.69 -0.20 -0.83 -0.24 B2IV-V -0.048-0.013 +013V 147 10.1 29.6 * -4799 25 VirBD-05 3535 1097041388731324 123138.2-051651123647.4-054955296.26 56.85 5.87 +0.07 +0.09 A3V -0.028-0.018 -006V -4800 BD+60 1406 109729 28444 I T UMa 123150.3+600216123623.3+592913126.49 57.54 5.5 H M4IIIe -0.025-0.011 -091V * -4801 25 ComBD+17 2504 1097421001763007I 123157.4+173826123658.3+170522283.77 79.42 5.68 +1.41 +1.75 K5III -0.037-0.016 -008 -4802 Tau CenCD-47 7745 109787223560 123213.8-475926123742.2-483228300.59 14.27 3.86 +0.05 +0.03 +0.04 A2V -0.184-0.005 +.024+005 281 -4803 CD-26 9233 109799180965 8612 123224.0-263510123742.2-270820299.17 35.63 5.45 +0.32 +0.03 +0.19 F1IV +0.076-0.091 +.037-001 0 5.9 1.4 * -4804 CP-74 955 109857256967 W 123249.3-744913123914.5-752210302.14-12.52 6.49 +0.08 -0.24 +0.08C B8Vne -0.032+0.031 -020 2.0 2.0 * -4805 BD+04 2631 109860119503 123258.5+034958123804.4+031657294.73 65.94 6.33 +0.01 +0.01 A1V -0.029-0.009 -008V? 24 -4806 CP-66 1861 109867251980 W 123256.2-663834123852.5-671135301.71-04.35 6.25 +0.06 -0.85 B1Ia t-0.006-0.002 -016 88 5.7 17.0 * -4807 BD+02 2560 1098961195083009I FW Vir 123316.3+022419123822.4+015117295.32 64.53 5.71 +1.60 +1.83 +1.42 M3+IIIbCa0.5 -0.080-0.018 +.029-016V? * -4808 BD+07 2561 109914119509 I R Vir 123325.4+073218123830.0+065918293.68 69.63 7.08 +1.44 +1.28 +1.74 M4.5IIIe -0.026-0.004 +.014-026V * -4809 BD-17 3668 1099311574153010 123331.2-174203123844.6-181501298.71 44.52 6.00 +0.29 dA6 -0.119+0.025 -013V -4810 CD-29 9845 1099602036663011 5822 123344.1-295220123903.5-302520299.77 32.37 5.89 +1.21 K2-3III -0.034-0.006 -013V -4811 9 CVnBD+41 2312 109980 44265 123357.6+412529123846.3+405228132.88 76.01 6.37 +0.18 +0.07 A7Vn -0.026-0.016 -015 220 -4812 BD+23 2479 109996 82420 W 123404.1+231235123902.1+223934270.09 84.72 6.38 +1.10 K1III -0.050-0.016 -027V 6.0 32.8 -4813 26Chi VirBD-07 3452 110014138892 475I W 123405.0-072643123914.8-075944297.70 54.75 4.66 +1.23 +1.39 +0.61 K2III-IIIbCN1 -0.076-0.025 +.020-020 < 17 4.3 173.1AB 4* -4814 CP-65 1941 110020251987 FH Mus 123400.4-655740123955.6-663042301.78-03.67 6.26 -0.05 -0.20 B8V -0.059-0.021 -003V * -4815 26 ComBD+21 2439 110024 824213012 123408.8+213645123907.3+210345277.43 83.32 5.46 +0.96 G9III -0.081-0.013 -021SBO * -4816 BD+36 2295 110066 631183013 AX CVn 123425.0+363006123916.9+355707138.51 80.81 6.45 +0.06 +0.03 A0pSrCrEu +0.022-0.006 -015V? 13 * -4817 CD-39 7748 110073203681 5835 123427.6-392613123952.5-395915300.53 22.83 4.64 -0.08 -0.42 -0.09 B8II/III -0.047-0.030 +015SB1 57 * -4818 CD-45 7944 1102872236011325 123553.2-453553124123.0-460844301.12 16.69 5.84 +1.52 +1.72 K4III -0.069+0.057 +007 -4819 Gam CenCD-48 7597 110304223603 W 123559.9-482438124131.0-485735301.26 13.88 2.17 -0.01 -0.01 0.00 A1IV -0.189-0.005 +.016-006SB 81 0.1 1.5AB 3* -4820 CP-68 1731 110311251996 R Mus 123558.4-685131124205.1-692427302.10-06.55 6.33 +0.78 +0.54 F7Ib-G2 v-0.004-0.002 +004 * -4821 BD-12 3676 110317157447 8627B 5855 123604.3-122754124116.0-130049299.10 49.78 6.08H F3Vn -0.113+0.019D+.014-014SBO 0.1 5.4AB 3* -4822 BD-12 3676 110318157448 8627A 5855 123604.6-122758124116.2-130054299.10 49.78 5.98H +0.42 +0.10 F5V -0.127+0.008D+.014-011SB2O 0.1 5.4AB 3* -4823 CP-59 4393 110335240161 5858 123611.2-590813124156.6-594109301.73 3.16 4.93 -0.04 -0.39 -0.01 B6IVe -0.025-0.002 +013SB 185: * -4824 27 VirBD+11 2484 110377100207 W GG Vir 123632.0+105830124134.4+102535294.55 73.14 6.19 +0.19 +0.10 A7Vn -0.109+0.004 +009SB 153 3.8 85.5 * -4825 29Gam VirBD-00 2601 110379138917 I 8630A 5859 123635.5-005403124139.6-012658297.85 61.33 3.65H +0.36 -0.03 +0.19 F0V -0.565+0.012 +.099-020SB 28 0.1 4.1AB 4* -4826 29Gam VirBD-00 2601 110380138917 I 8630B 5859 123635.5-005403124139.6-012658297.85 61.33 3.68H F0V -0.565+0.012 +.099-020V 30 0.1 4.1AB 4* -4827 BD-18 3442 110385157451 123635.2-191238124149.2-194531299.84 43.06 6.03 +0.39 +0.09 F3-5III -0.212+0.027 -003 82 * -4828 30Rho VirBD+11 2485 1104111002111326 Rho Vir 123649.3+104712124153.1+101408294.88 72.96 4.88 +0.09 +0.03 +0.02 A0V +0.084-0.091 +002SB 173 * -4829 31 VirBD+07 2568 110423119538 8633 5867 123653.0+072120124157.1+064824296.18 69.55 5.59 0.00 -0.02 A2V -0.068-0.012 +.012+004V 136 5.8 4.0 -4830 CP-62 2898 1104322520023015 BZ Cru 123658.1-623036124250.3-630331301.96-00.20 5.31 +0.27 -0.79 +0.21 B1IIIe v-0.015 0.000 +035SB 275 * -4831 CD-48 7608 110458223614 123703.1-481549124235.4-484847301.43 14.03 4.66 +1.09 +1.01 +0.57 K0III -0.127-0.032 +.025-012 * -4832 CP-55 5194 110461240176 123708.8-552353124249.6-555650301.72 6.90 6.08 -0.03 -0.19 B9V -0.047-0.019 +015V? -4833 76 UMaBD+63 1026 110462 15871 478 123711.8+631543124133.9+624247124.87 54.38 6.07 +0.01 +0.07 A2III -0.032-0.017 -004 -4834 CP-55 5197 110506240179 123727.6-553739124309.1-561034301.77 6.68 6.00 -0.08 -0.30 B7-8V -0.041-0.010 +010 -4835 CP-58 4453 110532240183 W 123743.2-582117124328.2-585411301.90 3.95 6.40 +1.09 +1.00 K0-1III -0.085-0.011 +017 3.3 29.8AC 3 -4836 CD-39 7785 110575203746 123758.9-393746124326.3-401040301.28 22.67 6.44 +0.25 +0.04 +0.14 A8V: +0.027-0.014 -005 * -4837 BD-00 2603 110646138933 123829.8-010137124338.1-013437298.88 61.23 5.93 +0.86 +0.46 +0.49 G8IIIp +0.050-0.076 +001 * -4838 CD-35 8155 1106532037563016 123833.8-354804124358.7-362057301.25 26.50 6.39 -0.06 A0V +0.013-0.007 -001 -4839 CD-27 8832 110666181063 479I 123840.6-274630124400.5-281926300.95 34.52 5.48 +1.34 +1.50 K4III -0.027-0.038 +007V -4840 BD+61 1312 110678 15877 Var 123841.0+614210124304.2+610920124.73 55.94 6.38 +1.26 +1.39 K0 -0.047+0.026 -006 * -4841 CP-68 1745 110716252012 123852.9-681659124501.7-684952302.35-05.97 6.16 +0.69 +0.38 F6Ia -0.032-0.015 -003V -4842 Iot CruCP-60 4273 110829252016 W 123945.0-602556124537.9-605852302.23 1.88 4.69 +1.05 +0.94 +0.52 K0III +0.098-0.063 +.036+007 4.8 27.5 * -4843 BD+44 2221 110834 44307 123943.9+443901124427.1+440611127.22 72.97 6.33 +0.43 F6IV -0.027+0.005 -016 127 -4844 Bet MusCP-67 2064 110879252019 W 124008.7-673338124616.9-680629302.45-05.24 3.05 -0.18 -0.74 -0.21 B2.5V -0.039-0.017D+.015+042V 184 0.2 1.3 * -4845 10 CVnBD+40 2570 110897 63177 124015.5+394920124459.5+391644128.81 77.78 5.95 +0.55 -0.03 +0.29 G0V -0.355+0.139 +.063+081V? 1 -4846 BD+46 1817 110914 443171327I Y CVn 124025.9+455913124507.8+452625126.45 71.65 4.99 +2.54 +6.33 +1.39 C7I -0.001+0.015 +.002+012 * -4847 32 VirBD+08 2639 1109511195741328 FM Vir 124033.9+081313124537.1+074024298.61 70.50 5.22 +0.33 +0.15 +0.16 F0IIIm -0.107+0.004 +.014-009SBO 66 * -4848 CP-55 5215 1109562402353018 W 124038.0-555629124622.7-562920302.23 6.38 4.65 -0.16 -0.64 -0.18 B3V v-0.036-0.013 +017V? 66 4.3 52.6 * -4849 33 VirBD+10 2468 111028119580 W 124117.6+100556124622.5+093224298.79 72.38 5.67 +0.99 +0.76 K1III-IV +0.277-0.446 +.021+052V 3.1 171.5 -4850 CD-32 8912 111032203797 W 124122.1-324605124646.0-331856301.81 29.55 5.86 +1.34 +1.60 K3III -0.007-0.030 +031 6.0 65. -4851 27 ComBD+17 2533 111067100252 I 124139.0+170726124638.7+163439296.68 79.39 5.12 +1.35 +1.54 +0.68 K3III +0.009+0.007 +053V < 17 -4852 BD+81 402 111112 20803017 124153.5+811009124426.0+803716123.29 36.50 6.40 +0.12 +0.13 A5m +0.030-0.042 -028SB 30 * -4853 Bet CruCP-59 4451 111123240259 481 W Bet Cru 124152.5-590831124743.2-594119302.46 3.18 1.25 -0.23 -1.00 -0.26 B0.5III -0.048-0.014 +016SB 38 6.0 371.6AC 3* -4854 BD+06 2660 111133119585 EP Vir 124157.5+062954124702.3+055703299.90 68.80 6.34 -0.05 -0.06 A0pSrEuCr v+0.035-0.043 +016V 10 * -4855 34 VirBD+12 2512 111164100260 W 124211.6+123017124713.6+115729299.00 74.80 6.07 +0.12 +0.13 A3V +0.042-0.018 -002V? 120 3.2 139.4 * -4856 BD-05 3569 111199138967 W 124223.2-054516124733.4-061807301.18 56.56 6.26 +0.55 +0.07 F7V +0.001-0.044 +013V? 12 6.1 16.3 -4857 CD-2410540 1112261811051329 124234.6-241824124753.7-245106301.91 38.01 6.44 -0.06 -0.45 B8III -0.041+0.040 +049V -4858 35 VirBD+04 2653 1112391195961330I 5947 124245.8+040708124751.4+033422300.70 66.43 6.41 +1.60 +1.83 +0.96E M3IIIb -0.006-0.003 +008V? * -4859 BD+63 1034 111270 15901 124302.8+631937124718.9+624651123.74 54.34 5.89R A9V +0.016-0.001 -011SB 106 -4860 CD-26 9340 111295181114 124306.3-270259124826.4-273551302.12 35.27 5.66 +0.95 +0.61 G5III-IV -0.139-0.063 -010V? -4861 28 ComBD+14 2546 111308100269 124313.8+140559124814.3+133311299.63 76.40 6.56 +0.01 +0.01 A1V -0.047-0.028 -000 130 -4862 CP-71 1391 111315256983 124315.9-712626124944.9-715911302.80-09.11 5.55 +1.17 +0.95 G8Ib-II +0.001-0.005 -007V * -4863 7 DraBD+67 764 111335 159023020I 124329.2+672011124734.4+664725123.53 50.33 5.43 +1.56 gK5 +0.010-0.005 +.023+008 -4864 BD+25 2568 111395 825113021 124354.7+252319124847.0+245025288.28 87.64 6.31 +0.70 +0.25 G7V -0.339-0.108 +.043-008V -4865 29 ComBD+14 2549 1113971002833022 124353.5+144007124854.2+140721300.20 76.98 5.70 +0.02 +0.07 -0.01 A1V +0.026-0.019 -008V? 145 * -4866 11 CVnBD+49 2163 111421 44332 124405.7+490043124841.8+482801124.18 68.66 6.27 +0.18 +0.17 A6m -0.065+0.016 -002V? 37 -4867 BD+61 1320 111456 15907 124418.3+605155124839.4+601912123.56 56.81 5.85 +0.46 -0.04 +0.28 F5V +0.105+0.001 +.041-012V 36 * -4868 CP-59 4483 111463252047 124417.0-595119125012.0-602403302.78 2.47 6.75 +0.35 +0.21 A3II -0.007-0.017 -009V -4869 30 ComBD+28 2153 111469 82515 8674 124425.1+280549124917.4+273308171.10 89.36 5.78 +0.03 +0.06 A2V -0.096+0.021 +000SB2 7.0 42.5 * -4870 Iot OctCP-84 407 111482258654 919 W 124427.3-843449125458.6-850724303.01-22.25 5.46 +1.02 +0.79 K0III +0.062+0.028 +053 0.5 0.6 * -4871 CD-47 7893 111519223698 124441.8-475453125019.6-482735302.74 14.41 6.24 +0.05 A0V -0.037+0.002 -017 -4872 CP-52 5947 1115882403143023 124514.5-521433125057.9-524715302.86 10.08 5.73 +0.13 A5V -0.026-0.012 -007 -4873 BD+23 2502 111591 82523 124521.0+232436125017.4+225148299.36 85.73 6.43 +1.00 +0.80 K0III +0.109-0.069 +006 * -4874 CD-33 8653 1115972038631331 W 124515.5-332715125041.2-335958302.75 28.87 4.91 -0.04 -0.11 A0IV -0.028-0.020 +.020+004V 178:10.0 27.6 * -4875 BD+38 2373 111604 63217 5983 124525.5+380340125010.7+373101124.31 79.61 5.89 +0.15 +0.08 A3V -0.097+0.027 -.000-014V 183 * -4876 CP-59 4494 111613252054 5991 124522.1-594707125117.8-601947302.91 2.54 5.72 +0.38 -0.10 A2Iabe -0.025+0.007 -021 18 * -4877 BD-09 3569 111720157550 8684A 5994 124610.6-094738125122.9-102018302.91 52.53 6.41 +1.02 +0.79 G8III -0.008-0.006 -017V 3.3 30.2AB 3* -4878 37 VirBD+03 2703 111765119633 124631.4+033601125136.9+030324303.04 65.93 6.02 +1.29 +1.44 gK4 -0.035+0.020 +003 -4879 CD-39 7879 111774203881 5999 124626.4-390809125156.8-394051303.04 23.19 5.98 -0.10 B8V -0.035-0.028 +005 -4880 CD-47 7917 111775223720 124627.0-473301125205.3-480539303.05 14.78 6.33 +0.03 +0.02 A0IV -0.060+0.013 -002 =< 49 -4881 CD-26 9369 111786181169 124637.1-261143125157.9-264417303.08 36.13 6.15 +0.23 A0III -0.111+0.040 -018 * -4882 CP-53 5359 111790240338 W 124638.6-531709125224.6-534946303.08 9.04 6.24 +1.13 G8Ib-II -0.020+0.012 -023 6.0 6.4 -4883 31 ComBD+28 2156 111812 825371332I' Var? 124649.7+280506125141.9+273226114.93 89.58 4.94 +0.67 +0.20 +0.35 G0III -0.012-0.008 +.011-001V? 77 * -4884 32 ComBD+17 2551 1118621003091333I W 124713.8+173704125212.3+170426303.98 79.94 6.32 +1.59 +1.99 M0III +0.001-0.007 -001V? 0.6 196.5AB 3 -4885 CP-54 5360 111884240347 124716.9-542433125303.9-545709303.17 7.92 5.93 +1.31 +1.40 +0.50E K2III -0.119+0.011 -009 * -4886 BD+16 2430 111893100312 124729.0+164000125227.6+160721304.22 78.99 6.30 +0.16 +0.10 A7V -0.043-0.019 -027 214 -4887 CP-59 4529 111904252069 6008 124724.0-594706125321.8-601943303.17 2.54 5.76 +0.33 -0.42 B9Ia -0.013 0.000 -019V? 81 * -4888 CD-48 7753 1119152237313024 124727.2-482357125306.9-485636303.22 13.93 4.33 +1.37 +1.58 +0.75 K3-4III -0.076-0.030 +.020-002SB -4889 CD-39 7893 111968203907 482 124753.7-393806125326.2-401044303.34 22.69 4.27 +0.21 +0.12 +0.14 A7III +0.063-0.022 +.056-003 81 -4890 Kap CruCP-59 4555 111973252077 124750.5-594959125349.1-602237303.23 2.49 5.90 +0.20 -0.65 B5Ia t+0.004-0.021 -004V? 0 * -4891 38 VirBD-02 3593 1119981390223025 D 124803.8-030035125311.2-033311303.79 59.32 6.11 +0.50 +0.04 F5V -0.262-0.003 +.042-007V * -4892 BD+84 289 112014 2101 8682B 124815.6+835742124906.6+832505123.01 33.71 5.85 -0.06 -0.12 A0V+A2V -0.026+0.022 +.001+001SB2O 17 0.5 21.6AB 3* -4893 BD+84 290 112028 2102 8682A 124823.1+835724124913.6+832446123.01 33.72 5.28 -0.03 -0.06 A1IIIShell -0.029+0.020 +.001+002V 275 0.5 21.6AB 3* -4894 35 ComBD+22 2519 112033 82550 I 8695 124822.3+214719125317.8+211442307.21 84.10 4.90 +0.90 +0.64 +0.45 G8III+F6V -0.047-0.022 +.021-007SBO < 17 2.1 1.0AB 4* -4895 CP-57 5776 112044240362 S Cru 124826.9-575315125422.0-582550303.32 4.44 6.58 +0.76 +0.60 F7Ib-II v-0.014-0.001 -007 * -4896 BD-03 3373 112048139027 124828.6-034047125338.1-041326303.98 58.64 6.44 +1.10 +1.02 K0 +0.001-0.041 +037V -4897 Lam CruCP-58 4584 112078240368 Lam Cru 124842.7-583612125439.2-590848303.35 3.72 4.62 -0.15 -0.61 -0.16 B4Vne -0.036-0.010 +012 317 * -4898 Mu 1CruCP-56 5487 112092240366 W A 124842.8-563805125435.6-571040303.36 5.69 4.03 -0.17 -0.76 -0.24 B2IV-V -0.033-0.006 +014 48 1.0 34.9 * -4899 Mu 2CruCP-56 5487 112091240367 W B Mu2 Cru 124844.0-563731125436.8-571006303.37 5.70 5.17 -0.12 -0.51 -0.06 B5Vne -0.035-0.001 +019V 201 1.0 34.9 * -4900 41 VirBD+13 2602 112097100322 124848.6+125744125349.7+122507305.23 75.28 6.25 +0.27 +0.05 +0.15 A7III +0.051-0.024 -010SB 67 * -4901 BD-10 3570 112131157584 D 6019 124906.2-110622125418.7-113855304.06 51.22 6.00 +0.08 A2V -0.141+0.013 -024 0.1 0.1 * -4902 40Psi VirBD-08 3449 1121421390331335I D Psi Vir 124909.1-085945125421.2-093220304.14 53.33 4.79 +1.60 +1.53 +1.28 M3-IIICa-1 e-0.024-0.015 +.021+018V? 3.3 0.0 * -4903 CD-43 7953 112164223753 124924.2-433612125458.5-440907303.61 18.72 5.89 +0.64 +0.25 G1V -0.223-0.225 +.044+032 -4904 BD+34 2369 112171 632443027 124926.5+340434125413.1+333204117.74 83.57 6.26 +0.20 +0.09 A7IV -0.090+0.032 +005 127 -4905 77Eps UMaBD+56 1627 112185 28553 483I Eps UMa 124937.8+563009125401.7+555735122.18 61.16 1.77 -0.02 +0.02 -0.03 A0pCr +0.112-0.006 +.009-009SB? 38 * -4906 CD-42 7975 1122132237603029 124944.4-422223125519.4-425457303.69 19.95 5.47 +1.68 +2.05 M0III -0.038-0.012 -007 -4907 CP-71 1404 112219256992 124950.5-713834125631.5-721107303.33-09.32 5.93 +1.13 +0.90 G8III -0.027-0.011 +010 -4908 CP-56 5498 112244240385 W 6024 125003.5-561737125557.0-565010303.55 6.03 5.32 +0.01 -0.84 O9Ib -0.024-0.010 +018V 145 5.0 29.1 * -4909 BD+47 2003 112264 443833030I TU CVn 125022.5+474421125456.5+471148121.20 69.92 5.84 +1.55 +1.57 M5III -0.016-0.006 -017 * -4910 43Del VirBD+04 2669 112300119674 484I W 6026 125033.9+035627125536.2+032351305.53 66.25 3.38 +1.58 +1.78 +1.33 M3+III e-0.469-0.054 +.022-018V? 7.0 164.5 * -4911 BD-14 3605 1123041575993033 125037.7-144707125553.3-151937304.52 47.53 6.17 0.00 A0Vn -0.017+0.003 -003 148 -4912 CD-25 9508 112374181244 LN Hya 125107.3-255505125630.1-262737304.34 36.40 6.62 +0.68 F3Ia +0.013-0.015 -024V * -4913 CD-50 7394 112409240407 125118.7-503925125704.4-511155303.83 11.66 5.16 -0.06 -0.32 B8-9V -0.026-0.015 +025 255 -4914 12Alp1CVnBD+39 2580 112412 63256 8706B 125119.7+385117125600.4+381853118.31 78.77 5.60 +0.34 -0.03 +0.23 F0V -0.236+0.062 +.027-003V 8 2.7 19.4 * -4915 12Alp2CVnBD+39 2580 112413 63257 485I 8706A Alp2 CVn 125121.0+385130125601.7+381906118.29 78.77 2.90 -0.12 -0.32 -0.06 A0pSiEuHg -0.234+0.056 +.027-003V 29 2.7 19.4 * -4916 8 DraBD+66 778 112429 15941 486 125129.7+655851125528.5+652619122.26 51.68 5.24 +0.28 +0.02 F0V -0.005-0.029 +.032+009 132 * -4917 BD+54 1556 112486 28572 8710 125154.7+543827125617.6+540558121.36 63.01 5.82 +0.19 +0.08 +0.08 A5m -0.077+0.001D+.012-005SB2O 20 1.8 3.5AB 3* -4918 BD-21 3635 112519181265 125213.0-221244125733.2-224514304.78 40.10 6.31 +1.07 G5 -0.052-0.029 +003V -4919 BD+46 1833 112570 44398 125233.8+464309125707.7+461037119.92 70.92 6.12 +1.01 +0.80 K0III-IV -0.022-0.047 +007V -4920 36 ComBD+18 2682 1127691003573036I 6046 125358.7+175654125855.4+172434313.41 80.13 4.78 +1.56 +1.96 +0.95 M1-IIIb -0.039+0.034 -002 -4921 44 VirBD-03 3384 1128461390861336 8727 125430.3-031621125939.5-034843306.92 59.00 5.79 +0.18 +0.08 A3V -0.037+0.008 -018 4.9 20.9 3* -4922 CD-32 9083 1129352040293038 125504.0-325750130032.6-333019305.11 29.33 6.02 +0.38 F0V -0.078-0.079 -023V? -4923 Del MusCP-70 1548 112985257000 487 125523.3-710034130216.2-713256303.80-08.69 3.62 +1.18 +1.26 +0.59 K2III +0.256-0.021 +.030+037SBO * -4924 37 ComBD+31 2434 112989 632883039I 8731 Var? 125529.3+311928130016.5+304706 95.60 85.86 4.90 +1.17 +1.05 +0.58 G9IIICH-2Fe1Ca1 -0.018-0.013 +.016-013V? < 19: 7.8 5.5 * -4925 46 VirBD-02 3609 112992139096 8732 6053 125526.9-024951130035.9-032207307.43 59.42 5.99 +1.12 +1.10 K2III -0.025+0.050 +023V? 3.9 1.1AB 3* -4926 BD+19 2622 113022100366 8735 125544.3+185437130038.8+182223317.04 80.99 6.20 +0.42 +0.02 F6V s -0.226+0.060 +.020+001V? 20 2.8 149.2AxBC 3* -4927 BD+76 473 113049 77143037 125549.8+760042125847.3+752821122.32 41.65 6.01 +0.99 +0.75 K0III +0.008+0.010 -015 -4928 9 DraBD+67 773 113092 15960 I 125608.4+670812125955.1+663550121.60 50.51 5.32 +1.29 +1.29 K2III -0.139-0.013 +.005-030V? < 17 -4929 38 ComBD+17 2573 113095100374 125612.9+173945130109.6+170723316.09 79.75 5.96 +0.96 K0III -0.005-0.025 -006 -4930 CP-70 1553 113120257003 6063 125617.1-705615130305.2-712834303.87-08.63 6.03 +0.05 -0.87 B1.5IIIne v-0.023-0.014 -005V 300 * -4931 78 UMaBD+57 1408 113139 28601 8739 6058 125626.4+565419130043.8+562159120.30 60.71 4.93 +0.36 +0.01 +0.21 F2V +0.114-0.009 +.034-010V? 92 2.5 1.3 * -4932 47Eps VirBD+11 2529 113226100384 488I W 6064 125711.9+112948130210.6+105733312.34 73.63 2.83 +0.94 +0.73 +0.45 G8IIIab -0.273+0.020 +.043-014V? < 17 8.9 248.7 * -4933 Xi 1CenCD-48 7887 113314223870 125745.8-485922130333.2-493138304.95 13.30 4.85 +0.02 +0.03 A0V -0.059-0.014 +.012+000V 185 * -4934 BD+64 927 113337 15962 W 125752.5+640851130146.8+633637121.00 53.48 6.00 +0.41 +0.02 F6V -0.180+0.029 +.033-011V? =< 6 9.4 119. -4935 BD-19 3629 113415181357 8757 125824.6-200247130346.1-203459306.83 42.20 5.58 +0.56 +0.07 F7V +0.142+0.018D+.003+034V? 0.1 0.4 * -4936 BD+60 1439 113436 286133041 125833.9+601514130240.4+594258120.31 57.35 6.53 +0.05 +0.06 +0.03 A3Vn -0.029-0.016 -023SB? 200 -4937 48 VirBD-02 3622 113459139131 8759 125845.2-030731130354.4-033948308.99 59.06 6.59 +0.29 +0.11 F0V -0.035-0.036D+.005+003V 109 0.3 0.6 -4938 CD-40 7662 113523223881 V789 Cen 125910.0-403933130448.1-411148305.64 21.61 6.26 +1.68 +1.83 M3-4III -0.028-0.034 -033 * -4939 CD-51 7248 113602240535 6084 125938.0-513446130530.8-520654305.13 10.70 6.43 +1.70 +1.99 M1III -0.048+0.032 -031V? * -4940 CD-47 8088 113703223900 W 130028.8-475538130616.7-482749305.47 14.34 4.71 -0.14 -0.58 -0.14 B5V -0.030-0.023 +006 189 6.5 11.4 * -4941 CD-40 7682 1137782239053044 6092 130055.0-410309130635.1-413519305.97 21.19 5.59 +1.05 K0II-III +0.046-0.017 +002 -4942 Xi 2CenCD-49 7644 113791223909 489 W 130104.2-492214130654.6-495422305.49 12.89 4.27 -0.19 -0.79 -0.20 B1.5V -0.026-0.012 +014SB1O 51 5.1 25.1 * -4943 14 CVnBD+36 2337 113797 633381337 6089 130103.9+362002130544.5+354756104.46 80.81 5.25 -0.08 -0.20 B9V -0.030+0.021 +.011-013V 175 * -4944 CP-59 4740 113823240566 W 130114.0-591930130724.2-595138304.94 2.95 5.99 +0.48 +0.12 F8-G2+B9IV -0.027-0.012 +004 0.2 0.9 -4945 BD+46 1847 113847 444651338I 8775 130122.3+454812130552.3+451607114.85 71.63 5.63 +1.13 K1III -0.012+0.028D+.012-020V 5.4 2.9 -4946 39 ComBD+21 2487 113848 826501339 W 130128.8+214124130621.2+210912333.39 83.13 5.99 +0.39 0.00 F4V -0.069-0.046 +.030+001 30 3.0 1.2 * -4947 CD-35 8441 113852204132 130120.1-351928130654.3-355143306.44 26.91 6.54 -0.02 -0.02 A0IV-III +0.041-0.078 +016 =< 49 -4948 BD+29 2365 113865 82648 8777 130123.9+293354130610.2+290146 64.11 86.23 6.54 +0.05 +0.09 A3IV -0.069+0.001 +005V 6.4 6.3AxBC 4* -4949 40 ComBD+23 2538 113866 82651 I FS Com 130130.5+230910130622.6+223658340.64 84.36 5.60 +1.59 +1.63 +1.81 M5III +0.025-0.049 +.045-005V? * -4950 BD+73 583 113889 7741 8772 130144.2+733337130449.7+730131121.57 44.07 6.31R F0V -0.019+0.020D+.007-016 90 2.0 1.3AB 3 -4951 CP-52 6194 1139022405731340 130141.6-525527130738.3-532735305.37 9.34 5.71 -0.07 -0.27 B8V -0.039-0.024 +022 -4952 The MusCP-64 2183 113904252162 W The Mus 130139.6-644617130807.0-651823304.67-02.49 5.51 -0.02 -0.87 B0Ia+WC5: v-0.016-0.009 -028SBO 106: 1.7 5.3 * -4953 BD+62 1275 113994 15985 130225.9+623441130622.7+620231119.88 55.00 6.14 +0.99 +0.65 G7III +0.005-0.037 +015V -4954 41 ComBD+28 2185 113996 826593045I 130222.8+280941130710.7+273729 41.94 86.47 4.80 +1.48 +1.85 +0.81 K5III +0.031-0.070 +.008-016V? < 17 -4955 49 VirBD-09 3628 114038157739 I 130239.4-101221130753.8-104425309.50 51.92 5.19 +1.14 +1.12 +0.58 K2III +0.017-0.006 +.025-009 < 19: * -4956 BD+28 2187 114092 82665 130306.4+280531130753.6+273321 40.56 86.32 6.19 +1.36 +1.64 +0.48E K4III -0.041-0.064 -009 -4957 BD-08 3491 1141131391753046I D 130319.5-082655130832.5-085904310.07 53.65 5.55 +1.18 +1.18 K3III -0.032-0.062 +016V? 0.0 0.1 -4958 45Psi HyaBD-22 3515 1141491814103048I 130340.0-223500130903.3-230705308.19 39.57 4.95 +1.05 +0.93 K1III -0.024-0.036 +.012-019V -4959 BD-08 3495 114203139183 130400.9-090016130914.4-093218310.25 53.08 6.32 +1.02 +0.79 K0 -0.033-0.009 +000V? -4960 BD+10 2516 114256100436 130411.9+103321130912.4+100120317.53 72.39 5.78 +1.00 K0III +0.017-0.003 -000 -4961 50 VirBD-09 3636 114287157760 I 6114 130431.1-094745130945.3-101946310.31 52.28 5.94 +1.49 +1.69 K5III -0.008-0.012 -007V? -4962 BD+17 2595 1143261004393049I 130452.8+172255130947.8+165055326.33 78.88 5.91 +1.45 +1.65 K5III -0.069-0.012 -017 -4963 51The VirBD-04 3430 114330139189 490 8801 130446.2-050018130957.0-053220311.42 57.03 4.38 -0.01 -0.01 0.00 A1IV s+Am -0.032-0.033 +.026-003SB 15 1.0 0.5 4* -4964 BD+38 2407 114357 63372 130502.0+375721130938.7+372523103.61 79.01 6.02 +1.15 K3III -0.103+0.005 -019 -4965 CD-51 7329 114365240627 V824 Cen 130500.9-520202131058.4-523401305.95 10.19 6.06 -0.09 -0.38 ApSi -0.041-0.017 +026V 76 * -4966 CP-69 1772 114371252185 W 130457.3-692435131151.6-695631304.69-07.14 5.91 +0.42 -0.03 F3IV-V +0.036+0.006 +007SB2 5.9 30.7 * -4967 15 CVnBD+39 2611 114376 63374 8805BC 130505.9+390400130942.0+383202105.55 77.97 6.28 -0.12 -0.48 B7III -0.016+0.003 -006V 125 0.3 284.4AC 3* -4968 42Alp ComBD+18 2697 114378100443 8804A 6116 130507.4+180330130959.3+173146327.96 79.49 5.22H +0.45 -0.06 F5V -0.431+0.136 +.054-018V? 28 0.1 0.2AB 3* -4969 42Alp ComBD+18 2697 114379100443 8804B 6116 130507.4+180330130959.3+173146327.96 79.49 5.22H F5V -0.430+0.136 +.054-018V? 0.1 0.2AB 3* -4970 CD-41 7648 114435223960 130526.9-414200131108.8-421359306.83 20.49 5.79 +0.52 F7IV -0.080-0.024 -011 -4971 17 CVnBD+39 2614 114447 63380 491 8805A 130527.7+390149131003.2+382956105.17 77.98 5.91 +0.29 A9III-IV -0.070+0.044 +000SB2? 77: 0.3 284.4AC 3* -4972 CP-62 3046 114461252187 130528.2-624615131153.1-631810305.23-00.52 6.33 +0.44 +0.35 A8II-III -0.006+0.003 -003V -4973 CD-42 8175 114474223966 130540.0-425009131123.2-432208306.77 19.35 5.25 +1.05 +0.92 +0.36E K1-2III -0.117-0.027 +.011-009 * -4974 BD+63 1056 114504 159993050 W 130558.2+624543130950.2+621345119.22 54.77 6.54 -0.02 -0.02 A1V -0.030-0.008 -017 68 3.2 107.8 -4975 CP-59 4815 114529240645 W V831 Cen 130602.8-592318131217.4-595515305.55 2.85 4.60 -0.08 -0.38 -0.09 B8V -0.049-0.024D+.014+012SB 216: 0.4 0.1AB 4* -4976 CP-77 890 1145332570193054 130557.9-775459131417.2-782650304.12-15.63 5.85 +1.07 +0.72 F8Ib -0.018+0.004 -018 -4977 CP-65 2201 114570252196 130611.6-654144131248.9-661337305.09-03.44 5.90 +0.06 +0.04 A0Vm: +0.024+0.006 +009 -4978 CD-25 9653 1145761814461341 W 130612.8-260112131139.2-263306308.53 36.10 6.50 +0.19 A5Vn -0.068+0.004 -021 177 0.1 0.2 * -4979 CD-37 8437 1146132042273051 130628.4-371622131203.2-374811307.43 24.89 4.85 +0.70 +0.31 +0.36 G3V -0.385+0.047 +.053-015V? -4980 CP-59 4827 114630240653 W 130640.2-591657131256.0-594900305.63 2.94 6.16 +0.60 +0.08 G0V +0.014-0.107 +016SB2 3.2 25.3 * -4981 53 VirBD-15 3613 114642157788 W 6136 130644.1-153933131203.5-161155310.12 46.39 5.04 +0.46 +0.02 F5III-IV +0.098-0.286 +.040-014 15 5.0 235.0AD 4* -4982 CD-42 8196 114707223980 130706.9-421007131250.9-424159307.12 20.00 6.22 +1.06 K0III -0.020+0.003 -001 -4983 43Bet ComBD+28 2193 114710 82706 492I W 130712.4+282306131152.4+275241 43.33 85.40 4.26 +0.57 +0.07 +0.30 F9.5V -0.801+0.882 +.120+006SB? 6 5.8 90.8 * -4984 BD+25 2610 114724 827083052 130719.4+244725131208.4+241529 2.47 84.52 6.33 +0.98 K1III -0.008-0.041 -024 -4985 CD-50 7589 114772240655 W 130727.3-501007131323.5-504200306.48 12.02 5.89 -0.02 B9V -0.019-0.027 -001 0.3 0.3 -4986 BD+12 2565 1147801004603053I 130734.3+120517131232.9+113322321.61 73.66 5.77 +1.51 M0III -0.050-0.033 +025 -4987 BD+19 2648 114793100461 130742.9+191657131235.9+184506334.19 80.31 6.53 +0.88 G8III -0.065-0.003 -020 -4988 CP-58 4738 1148352406633055 130759.0-580912131412.1-584102305.89 4.06 5.89 +1.08 K0-1III -0.051-0.012 -002 -4989 CP-58 4740 114837240666 W 130803.3-583407131414.8-590612305.87 3.64 4.92 +0.48 +0.27 F7IV -0.265-0.157 +.053-065 0 5.3 2.7 -4990 54 VirBD-18 3562 114846157798 8824A 130805.9-181744131326.8-184936310.15 43.74 6.28 +0.09 +0.01 B9III -0.020-0.017D+.011-041SB 0.4 5.4 * -4991 CD-42 8213 114873223989 130813.8-423634131357.5-430820307.29 19.54 6.16 +1.38 +1.62 K4III -0.170+0.028 +030 -4992 BD+19 2649 114889100467 130820.5+191532131312.4+184337334.87 80.22 6.11 +1.20 G8III -0.215-0.049 -024 * -4993 Eta MusCP-67 2224 114911252224 493 W Eta Mus 130828.0-672152131514.9-675340305.18-05.13 4.80 -0.08 -0.35 -0.08 B8V -0.041-0.008 -008SBO 268 3.2 60. * -4994 CP-69 1784 114912252225 130830.3-690855131525.7-694047305.03-06.90 6.37 +1.21 +1.33 K2-3III -0.101-0.048 -011 -4995 55 VirBD-19 3651 114946157806 130849.7-192420131410.9-195551310.21 42.62 5.33 +0.87 +0.44 G6V -0.122+0.167 +.010-045V? -4996 CD-48 8050 114971224000 130850.2-482529131443.1-485724306.86 13.74 5.89 +1.06 +0.93 K1III -0.129-0.081 +056 * -4997 BD+40 2633 115004 44519 I 130910.9+404057131343.0+400910104.83 76.18 4.92 +1.06 +0.93 +0.49 G8IIIaCN0.5 -0.048+0.015 +.004-021V? < 19: -4998 BD+12 2572 115046100473 I 8832 130931.9+115146131431.3+111954322.99 73.30 5.67 +1.50 +1.86 +0.90 M0III +0.074-0.052 +012V 6.7 49.1 * -4999 CD-35 8547 115050204282 130932.2-355029131509.7-362216308.26 26.26 6.19 +0.97 K1III -0.012-0.015 -004 -5000 CP-64 2316 115149252236 131009.3-643629131644.8-650818305.59-02.40 6.07 +0.44 -0.02 F5V -0.103-0.052 +018V -5001 57 VirBD-19 3653 115202157823 I 131034.2-192441131558.8-195635310.77 42.56 5.22 +1.03 +0.87 K1III-IV +0.306-0.116 +.048+034V * -5002 CP-66 2142 115211252240 6164 131028.5-661518131713.0-664701305.47-04.04 4.87 +1.50 +1.58 +0.75 K2Ib-II -0.020-0.014 +.007-010 * -5003 BD+73 587 115227 77823057 131040.0+731944131332.0+724756120.66 44.23 6.59 +0.08 +0.07 A2V +0.017-0.016 +002SB -5004 19 CVnBD+41 2374 115271 44531 131102.2+412300131532.0+405119104.57 75.40 5.79 +0.19 +0.12 A7V -0.108+0.015 -018 97 -5005 BD-00 2674 1153081392543058 DK Vir 131117.5-005142131625.5-012326315.84 60.85 6.68 +0.31 +0.08 F1IV -0.035-0.028 -012 51 * -5006 CD-3010457 1153102043121342I 131119.7-305837131653.1-313022309.26 31.05 5.10 +0.96 +0.61: K1III +0.034-0.048 +.016+013V? -5007 BD+19 2655 115319100484 131122.4+193447131614.3+190306339.43 80.12 6.45 +0.98 +0.75 G8III -0.102+0.002 -045 -5008 CD-43 8165 1153312240321343 131125.8-432705131713.9-435846307.82 18.65 5.84 +0.20 +0.15 +0.09 Am 0.000-0.008 -012V * -5009 BD+81 416 115337 21643056 W 6153 131131.4+810002131225.4+802817121.85 36.61 6.25 +0.94 K0Ib -0.009+0.012 -011V? 4.0 1.1 * -5010 BD+20 2814 115365 827513059 W 131141.1+201845131632.3+194707342.33 80.67 6.45 +0.25 +0.08 F0V -0.110+0.023 -035 161 1.9 203. * -5011 59 VirBD+10 2531 115383119847 W 131148.7+095648131646.5+092527322.80 71.31 5.22 +0.59 +0.10 +0.20E G0V s -0.334+0.190 +.079-026V? 7 9.1 34.3 -5012 CP-71 1458 1154392570283061 131200.2-713026131918.9-720208305.11-09.28 6.04 +1.35 +1.46 K3III -0.013-0.056 -031 -5013 BD+14 2591 115478100497 I 131218.8+141207131715.6+134032328.35 75.26 5.33 +1.31 +1.51 +0.66 K3III +0.007+0.039 -025V? < 19: -5014 BD+00 3040 115488139264 W 6171 131222.6-000855131729.9-004036316.69 61.50 6.37 +0.26 +0.04 F0V -0.058-0.025 -020 120 0.0 0.1 -5015 60Sig VirBD+06 2722 1155211198551344I 6173 131233.2+055948131736.3+052811320.14 67.46 4.80 +1.67 +1.95 +0.84E M1III -0.005+0.013 +.011-027V? * -5016 CD-50 7660 115529240721 131234.2-504531131834.6-511710307.25 11.36 6.19 +0.01 A0V -0.048-0.023 -004 -5017 20 CVnBD+41 2380 115604 44549 494 AO CVn 131303.5+410557131732.5+403421102.73 75.52 4.73 +0.30 +0.21 +0.15 F3III -0.125+0.021 +.019+008V? 17 * -5018 BD+69 694 115612 160333060 131311.3+685606131628.6+682429119.46 48.55 6.20 -0.06 -0.16 B9.5V -0.013+0.016 -007V 120: -5019 61 VirBD-17 3813 1156171578441345 W 131310.3-174518131824.3-181841311.88 44.10 4.74 +0.71 +0.26 +0.36 G6V -1.070-1.065 +.115-009V? < 17 5.5 231.5 -5020 46Gam HyaBD-22 3554 115659181543 495I W 6180 131329.0-223838131855.3-231018311.10 39.26 3.00 +0.92 +0.66 +0.47 G8-IIIa +0.064-0.045 +.027-005V? < 17 6.7 138.4 * -5021 BD+04 2721 115709119867 131347.1+041251131851.1+034116319.73 65.66 6.62 +0.06 +0.03 A1IV -0.050-0.011 -001SB 47 -5022 BD+34 2410 115723 63462 I 131349.9+343728131827.8+340553 84.77 80.93 5.82 +1.35 K4.5III +0.033+0.003 -020 -5023 21 CVnBD+50 1994 115735 445563063 BK CVn 131359.3+501229131814.5+494055111.85 66.87 5.15 -0.07 -0.20 A0V -0.033+0.015 +.020-003 106 * -5024 CP-59 4912 115778240756 W 131412.8-591449132034.9-594624306.60 2.89 6.18 +0.43 F3-F5II -0.042-0.024 -010 6.4 13.1 -5025 BD+35 2435 115810 634683064 8861D 131428.3+353912131904.2+350741 88.19 80.06 6.02 +0.24 F0IV -0.030+0.019 -002 82 3.6 319.0AD 4 -5026 CP-52 6405 115823240762 6190 131432.9-521320132037.8-524453307.41 9.87 5.48 -0.13 -0.52 -0.15 B6V -0.030-0.019 +010SB 73 * -5027 CP-55 5504 1158422407653065 6193 131436.3-551632132048.3-554802307.08 6.83 6.02 +0.29 -0.69 +0.22 B0.5Ia e-0.009+0.004 -003 90 * -5028 Iot CenCD-36 8497 115892204371 496 131458.4-361105132035.8-364244309.42 25.79 2.75 +0.04 +0.03 -0.01 A2V -0.341-0.085 +.062+000 85 -5029 CD-46 8580 115912224080 131503.8-462121132057.7-465250308.17 15.69 5.77 +1.12 +1.01 K1III -0.075+0.004 -003 -5030 CP-71 1467 115967257033 W 131527.3-713720132252.6-720848305.37-09.42 6.05 +0.09 -0.34 B6V -0.023-0.013 +033SB 1.4 0.3 * -5031 BD+03 2758 115995119889 8864 131537.1+032802132041.6+025630320.32 64.82 6.26 +0.10 +0.10 A3V -0.059-0.029D+.005-004V 80 0.4 1.1 -5032 23 CVnBD+40 2647 116010 445701346I 131550.1+404031132019.0+400902100.09 75.67 5.60 +1.20 K1III -0.058-0.002 -021 -5033 BD-18 3587 116061157879 6206 131607.2-185754132129.9-192920312.61 42.82 6.21 +0.09 +0.08 A2V -0.066+0.008 -008V? -5034 CP-60 4627 116072252283 W B V790 Cen 131607.7-602652132235.7-605820306.70 1.67 6.18 +0.01 -0.58 B2.5Vn -0.020-0.013 +003V 233 0.0 0.1AB 3* -5035 CP-60 4627 1160872522841347 W A 131610.1-602751132237.9-605918306.71 1.65 4.53 -0.13 -0.60 -0.15 B3V -0.039-0.014 +006V 241 0.0 0.1AB 3* -5036 CD-51 7465 116084240782 131611.1-513932132216.2-521059307.73 10.40 5.83 +0.12 -0.72 B2.5Ib -0.010+0.001 -015 * -5037 BD+02 2664 1161601198993067 131636.5+023646132141.6+020514320.35 63.93 5.69 +0.06 +0.03 A2V -0.061-0.053 -007V 200 -5038 CD-47 8260 116197224095 W 131654.8-472511132252.7-475635308.36 14.60 6.16 +0.18 A4V +0.036+0.005 -000V? 0.3 0.6 -5039 CD-47 8261 1162262240963068 131703.9-480222132302.6-483346308.31 13.98 6.38 -0.07 -0.44 B6IV -0.006-0.001 -041 * -5040 64 VirBD+05 2737 116235119905 131707.1+054045132209.7+050917322.72 66.84 5.87 +0.12 +0.10 +0.04 A2m -0.065-0.036 -010V 20 -5041 CP-63 2732 116243252293 131717.0-640044132400.5-643209306.42-01.88 4.53 +0.85 +0.47 +0.43 G6II +0.029-0.026 +.002+012 -5042 Iot1MusCP-74 1057 1162442570413070 131714.0-742142132507.1-745316305.17-12.16 5.05 +1.11 +1.01 +0.54 K0III -0.115-0.130 +.016+028 -5043 CD-32 9322 116278204420 6212 131731.6-324001132308.7-331124310.53 29.21 6.22 +1.65 +1.96 +0.94E M1III -0.005-0.005 -013 * -5044 63 VirBD-16 3650 116292157899 6213 131739.6-171241132301.1-174407313.50 44.49 5.37 +0.99 +0.75 +0.49 KIII -0.047-0.029 +.004-027 -5045 BD+44 2269 116303 44582 6210 131741.4+442534132203.8+435411104.70 72.12 6.35 +0.24 +0.06 +0.14 A7m -0.071+0.010 -001 36 -5046 CD-49 7884 116338224104 131751.4-491758132352.3-494923308.29 12.71 6.48 +0.96 G8III -0.067-0.044 -032V -5047 65 VirBD-04 3469 1163651393083069I 131807.9-042405132318.9-045528317.64 57.03 5.89 +1.43 +1.66 K3III -0.019-0.015 +010 -5048 CP-63 2743 1164572523043071 W 131832.1-635746132513.9-642907306.56-01.85 5.31 +0.40 -0.01 F2III -0.157-0.022 +.008-002 0 5.7 25.7 * -5049 CP-69 1838 116458257042 131832.5-700621132550.1-703739305.80-07.95 5.67 -0.03 -0.18 ApHgMn: -0.067-0.009 +008V =< 49 * -5050 66 VirBD-04 3472 116568139324 131920.8-043829132433.2-050950318.08 56.73 5.75 +0.42 -0.04 F3-4V s +0.159-0.030 +014SB 40 -5051 Iot2MusCP-74 1059 116579257047 131921.4-741015132718.3-744131305.34-11.99 6.63 -0.06 -0.24 B9V -0.049-0.017 -003 -5052 BD+37 2404 116581 63514 I 6220 131921.9+373322132354.0+370202 90.25 77.95 6.07 +1.68 M3III +0.022-0.006 +000 -5053 BD+13 2663 116594100553 131933.8+125709132430.5+122555332.35 73.39 6.44 +1.06 +0.91 K0III -0.016+0.041 -006SB -5054 79Zet UMaBD+55 1598 116656 28737 497I 8891A 6224 131954.0+552651132355.5+545531113.11 61.58 2.27 +0.02 +0.03 -0.02 A1VpSrSi +0.122-0.020 +.047-006SB2O 32 1.7 0.0AP 4* -5055 79Zet UMaBD+55 1598 116657 28738 I: 8891B 6225 131954.9+552639132356.4+545518113.11 61.58 3.95 +0.13 +0.09 A1m +0.119-0.028 +.047-009SB1O 57 1.7 0.0AP 4* -5056 67Alp VirBD-10 3672 116658157923 498I W Alp Vir 131955.4-103822132511.6-110941316.11 50.84 0.98 -0.23 -0.93 -0.24 B1III-IV+B2V -0.041-0.028 +.023+001SB2O 159 1.5 0.0 O 5* -5057 BD+24 2578 116706 828253072 132020.5+242232132506.7+235116 11.48 81.73 5.78 +0.06 +0.08 A3IV -0.013-0.009 -003SB? 60 -5058 CD-39 8246 1167132044653073 132019.7-391359132607.8-394519310.14 22.63 5.09 +1.20 +1.02 K0.5III:Ba3 +0.184-0.052 +.012+067V * -5059 BD-00 2686 1168311393373074 6242 132104.0-004021132611.4-011133320.78 60.47 5.97 +0.19 +0.13 A7III -0.111+0.004 -020 112 3* -5060 CD-40 7894 116835224148 132106.8-405840132656.1-412953310.04 20.88 5.69 +1.47 K3III -0.004-0.019 -024 -5061 CD-48 8202 116836224149 W 132104.2-483726132706.3-490838308.91 13.31 6.31 A0III-IV -0.021-0.006 -018 0.0 0.1 -5062 80 UMaBD+55 1603 116842 28751 6238 132113.1+553032132513.5+545917112.77 61.47 4.01 +0.16 +0.08 +0.07 A5V +0.118-0.016 +.045-009SB 218 * -5063 CD-48 8206 116862224151 132117.8-485142132720.8-492251308.92 13.07 6.28 -0.12 -0.69 B3IV +0.011+0.010 -006V? -5064 68 VirBD-11 3516 1168701579381348I 6244 132126.1-121114132643.2-124228316.18 49.25 5.25 +1.52 +1.75 +0.87 M0III v-0.130-0.020 -029V? * -5065 CD-39 8260 116873204483 W 132127.2-393836132714.7-400947310.31 22.20 6.40 +0.98 G8/K0III -0.007-0.002 +014V 5.7 45.4 -5066 CP-68 1929 116890252321 EZ Mus 132130.9-690628132846.4-693741306.19-06.99 6.20 +0.02 -0.42 ApSi -0.047-0.045 +016V * -5067 BD+46 1868 116957 44611 132159.1+463254132616.6+460141105.14 69.88 5.88 +0.97 gK0 +0.024-0.021 +004 -5068 69 VirBD-15 3668 116976157946 I 6253 132207.0-152718132727.2-155825315.45 46.02 4.76 +1.09 +1.06 +0.53 K0-III-IVCN2Fe0.5 v-0.119+0.024 +.059-014V * -5069 CP-64 2418 117025252329 132219.5-640926132907.6-644033306.95-02.10 6.11 +0.11 +0.05 +0.05 ApSrEuCr -0.083-0.005 +015 * -5070 BD+64 949 117043 16071 132234.8+634629132559.9+631540116.41 53.43 6.50 +0.74 +0.30 G6V -0.392+0.216 +.028-031V * -5071 CD-50 7812 117150240883 132317.3-503849132925.2-510955308.99 11.26 5.06 +0.07 +0.07 A1V -0.002-0.017 +.011-002V 243: -5072 70 VirBD+14 2621 1171761005821349 W 132332.3+141846132825.8+134644337.69 74.11 4.98 +0.71 +0.26 +0.39 G4V -0.236-0.577 +.043+005V 1 3.6 286.4 * -5073 BD+73 592 117187 7814 499I W 6254 132335.0+725439132608.1+722329119.27 44.49 5.79 +1.63 +1.90 M1IIIab +0.022-0.009 -048V 7.4 25.7 -5074 BD+65 935 117200 16078 W A 132342.6+651512132704.6+644408116.77 51.96 6.66 +0.37 0.00 F0 -0.068+0.028 -013 21 0.4 47.0AB 3* -5075 BD+65 936 117201 16079 W B 132348.6+651413132710.7+644310116.75 51.98 7.04 +0.39 -0.01 F0 -0.063+0.032 -015 =< 30 0.4 47.0AB 3* -5076 BD+53 1622 117242 28763 132358.4+531551132759.5+524445110.49 63.49 6.34 +0.23 +0.14 F0 -0.114-0.008 -007 101 -5077 BD+41 2400 117261 44621 132401.4+411457132826.2+404347 95.99 74.40 6.47 +0.92 G8III +0.009-0.056 -058 -5078 BD-00 2694 117267139359 132406.9-005043132914.9-012152322.16 60.09 6.43 +1.11 +1.11 +0.36E K0III -0.043-0.062 +039V? * -5079 BD+51 1846 117281 28766 132405.8+510615132811.7+503514108.77 65.52 6.80R F1IV -0.113+0.041 -016 -5080 BD-22 3601 117287181695 I 8920 R Hya 132414.8-224552132942.8-231653314.22 38.75 4.97 +1.60 +0.68 +2.42 M7IIIe v-0.056+0.016 -010V 8.5 21.2 * -5081 71 VirBD+11 2575 1173041005923076 132415.7+112012132913.0+104906333.33 71.42 5.65 +1.05 K0III -0.061-0.035 -001SB -5082 CP-76 767 117360257060 W S Cha 132433.3-770259133314.8-773406305.25-14.88 6.48 +0.48 -0.06 F6V -0.344-0.112 +.034-036V? 0 2.8 22.4 * -5083 BD+51 1847 117361 28771 132438.9+511417132845.7+504306108.68 65.36 6.43 +0.37 +0.05 F0IV +0.029-0.083 -007 * -5084 Kap OctCP-85 384 1173742586741665 132442.1-851625134055.5-854710303.91-23.01 5.58 +0.18 +0.16 Am -0.090-0.018 -009SB * -5085 BD+60 1461 117376 16080 500 W 132446.9+602744132827.1+595645114.52 56.57 5.40 -0.01 -0.02 A1Vn -0.080+0.037 +.025-003V 144 3.3 182.3AC 3* -5086 BD+07 2655 1174041199623077I 132459.1+074144133000.1+071044329.33 68.05 6.17 +1.47 +1.80 K5 +0.004+0.003 -003 -5087 BD+06 2750 117405119961 132455.8+063143132957.6+060048328.11 66.98 6.51 +0.96 +0.59 K0 -0.017+0.050 -019 -5088 72 VirBD-05 3706 117436139370 8924 6281 132512.6-055715133025.7-062813320.03 55.10 6.09 +0.33 +0.07 F2V +0.042+0.017 -009SB 131 4.9 29.8 * -5089 CD-38 8592 117440204545 W 6283 132514.6-385327133102.7-392427311.22 22.83 3.88 +1.17 +1.03 +0.59 G9Ib* -0.012-0.015 +.012-002SB 0.1 0.2 * -5090 CD-27 9278 117558181723 132559.7-273550133133.3-280646313.60 33.93 6.47 +0.10 A1V -0.062+0.002 -004 -5091 BD+79 422 117566 78213075 132605.5+790938132656.7+783838120.71 38.33 5.77 +0.77 +0.35 G2.5IIIbCH1 -0.146+0.029 +015 -5092 CD-37 8695 117597204561 132617.8-375258133205.3-382357311.62 23.79 6.16 +1.04 K1III +0.035-0.043 +004V -5093 CP-64 2465 117651252361 132637.4-650704133335.7-653757307.27-03.12 6.37 -0.02 -0.08 A0V -0.048-0.012 +012 -5094 73 VirBD-17 3877 1176611579873078 W HX Vir 132639.1-181248133202.8-184344316.15 43.10 6.01 +0.18 +0.16 +0.07 F0IV-V -0.099-0.014 -018 60 0.2 0.1 * -5095 74 VirBD-05 3714 1176751393903079I 6297 132645.9-054422133157.9-061521320.78 55.21 4.69 +1.62 +1.95 +1.16 M2III -0.104-0.045 +.020+018V -5096 BD+42 2405 117710 44637 132655.4+423714133115.8+420622 96.97 72.96 6.08 +1.05 K2III -0.093+0.026 +.012-020 -5097 CD-2810128 1177161817373080 132701.6-281039133235.9-284134313.74 33.31 5.69 +0.04 A1Vn -0.095-0.022 -022 -5098 CD-2810127 117718181735 132659.0-290303133234.5-293355313.54 32.46 6.45 +0.44 0.00? F3IV -0.072+0.004 -020 -5099 75 VirBD-14 3739 117789157998 I W 132730.9-145055133251.7-152147317.47 46.34 5.55 +1.23 +1.22 K1.5IIIb -0.073-0.002 -040V 5.6 79.6AB 3 -5100 76 VirBD-09 3711 1178181394013081I 132741.9-093859133258.1-100954319.44 51.37 5.21 +0.96 +0.60 +0.50 K0III -0.029-0.036 +.021-001 < 19: -5101 BD-06 3837 117833139403 I S Vir 132746.7-064051133300.7-071142320.76 54.23 6.68 +1.28 +0.91 +1.86 M7IIIe +0.050-0.005 +010 * -5102 BD+25 2643 117876 82875 8937 132803.9+245158133248.1+242047 18.61 80.28 6.11 +0.96 +0.70 +0.53 G8III +0.049-0.206 +006V? 6.7 1.5 -5103 CD-47 8417 117919224254 W 132824.1-474532133428.9-481620310.29 13.98 6.33 -0.05 B8III -0.029-0.012 -004 2.0 0.5 -5104 CD-32 9459 1180102046123082 6315 132902.7-324752133443.6-331839313.24 28.69 6.44 +1.26 K2III -0.049-0.012 -009 -5105 78 VirBD+04 2764 1180221200041351 CW Vir 132903.8+041021133407.9+033932328.27 64.41 4.94 +0.03 0.00 -0.03 A1pSrCrEu +0.044-0.024 +.021-012SB 15 * -5106 BD-12 3843 118054158021 8954 6316 132921.3-124205133440.5-131252318.87 48.32 5.91 +0.02 -0.09 A2pSrEu:Cr: -0.044-0.010D+.007-020V? 0.4 0.3AB 3* -5107 79Zet VirBD+00 3076 118098139420 501 132935.8-000505133441.6-003545325.25 60.39 3.37 +0.11 +0.10 +0.06 A3V -0.285+0.042 +.044-013 173 * -5108 BD+39 2658 118156 63616 8956 132956.7+391804133421.8+384721 88.07 75.29 6.37 +0.21 +0.11 F0IV +0.013+0.024 -012 97 4.3 30.6 * -5109 81 UMaBD+56 1667 118214 28803 6319 133016.6+555139133407.3+552055110.49 60.74 5.60 -0.03 -0.09 A0V -0.022-0.002 +.013-007V 156 -5110 BD+37 2426 118216 63623 502 BH CVn 133019.9+374141133447.8+371057 83.33 76.41 4.98 +0.40 +0.06 +0.30 F2IV +0.086-0.009 +.022+007SBO 0 * -5111 80 VirBD-04 3515 1182191394281352 133019.0-045313133531.3-052346322.71 55.77 5.73 +0.95 +0.66 G6III +0.017+0.085 -008 -5112 24 CVnBD+49 2227 118232 446683083 6322 133022.1+493138133427.3+490058104.99 66.59 4.70 +0.12 +0.11 +0.02 A5V -0.127+0.030 +.034-018V 178 * -5113 CP-61 3841 118261252387 W 133025.2-611040133712.2-614131308.33 0.70 5.63 +0.50 F6V +0.135-0.113D+.032+040SB 111 0.2 0.3AB 3* -5114 BD+10 2565 118266100630 W 133035.2+104305133533.3+101217336.59 70.14 6.49 +1.03 +0.90 +0.52 K1III+F6V +0.077-0.061 +033V? 2.0 70.2 * -5115 CP-75 882 118285257069 503 133038.2-751025133911.9-754102305.94-13.09 6.34 +0.01 -0.26 B8IV -0.027-0.006 +018SB2 * -5116 BD+44 2285 118295 446751353 133058.7+444229133514.1+441149 98.48 70.79 6.84 +0.20 +0.25 A7-F0III -0.016+0.015 -026 101 -5117 CD-33 9189 118319204653 133107.0-335722133650.5-342804313.47 27.47 6.50 +1.03 +0.85 K0III -0.011-0.028 +022V? -5118 CD-43 8418 1183382242753084 133107.7-433756133706.0-440836311.52 17.97 5.98 +0.94 G8-K0III -0.050-0.020 +006 -5119 CP-69 1898 1183442570703086 133110.2-695603133845.7-702642306.91-07.94 6.10 +1.42 +1.73 K3III -0.068-0.032 +002 -5120 CD-25 9900 118349181790 8966A 133115.4-255906133648.4-262942315.38 35.28 5.78 +0.22 +0.19 A7III -0.091+0.021 +.021-010 1.0 10.1AB 4* -5121 CD-45 8578 118354224283 133120.6-455501133723.7-462542311.13 15.71 5.90 -0.12 B8V -0.009-0.033 +003V? -5122 CP-57 6169 118384241013 W 133133.8-575414133807.6-582454309.03 3.90 6.42 +1.12 +0.93 K1III -0.008-0.036 +001 4.6 2.5 -5123 BD+25 2652 118508 829053085I 6342 133216.7+250724133659.1+243648 21.68 79.45 5.74 +1.55 +1.85 M2III -0.024-0.005 -031V -5124 CP-56 5856 118520241026 W 133217.2-570649133849.1-573723309.26 4.67 6.01 +1.14 G5Ib -0.006-0.014 -010 0.0 0.1 -5125 CP-70 1653 118522257074 133219.6-701644134000.6-704718306.94-08.30 6.59 +1.30 +1.09 K0III -0.026-0.028 -003 -5126 BD+50 2014 118536 44682 133235.8+495949133639.8+492912104.68 66.01 6.49R K1III -0.004-0.012 -010 -5127 25 CVnBD+37 2433 118623 63648 8974 133301.0+364813133727.6+361742 78.96 76.61 4.82 +0.23 +0.09 +0.13 A7III -0.099+0.027 +.030-006V 204 2.0 1.7AB 3* -5128 CD-2810181 118646181825 133304.8-290300133842.0-293339315.08 32.19 5.83 +0.40 F5V -0.078-0.069 +004 -5129 BD+15 2602 118660100644 133314.3+144841133807.9+141806345.58 73.18 6.52 +0.25 +0.11 A9V s +0.036-0.019 -002 90 * -5130 CP-63 2896 118666252400 133310.5-640407134010.9-643437308.14-02.20 5.79 +0.39 +0.02 F3III-IV -0.059-0.012 +004 -5131 BD+77 516 118686 7848 I 133323.5+770326133442.8+763248119.65 40.30 6.57R K5III: -0.026-0.003 -014 -5132 Eps CenCP-52 6655 118716241047 504 W Eps Cen 133332.9-525728133953.2-532759310.19 8.72 2.30 -0.22 -0.92 -0.24 B1III -0.028-0.016 +003 159 8.4 36.9 * -5133 BD+51 1856 118741 28819 I 8979 133342.6+511325133743.0+504253105.56 64.82 6.48 +1.55 +1.66 +1.05 M2II-III+K3III: -0.012+0.001D+.003-048V 1.3 1.8 * -5134 CD-49 8095 118767224317 I V744 Cen 133348.8-492633133959.7-495701310.89 12.17 6.00 +1.50 +1.15 +1.75E M5III -0.113+0.011 -011 * -5135 CD-39 8390 118781204708 V765 Cen 133348.4-391422133940.8-394453312.92 22.19 6.27 +1.66 +1.78 M4III -0.020-0.025 -048V * -5136 CD-39 8392 118799204712 133355.9-393232133948.6-400307312.88 21.88 5.60 +1.30 K2/3III -0.044-0.061 +001 -5137 BD+19 2697 118839100650 133413.5+184626133902.3+181555356.46 75.91 6.48 +1.20 +1.27 K3III -0.045-0.018 -011 -5138 BD+11 2589 118889100654 8987 6363 133438.7+111515133934.6+104446339.90 70.08 5.57 +0.33 +0.05 F0V -0.112-0.013 +.011-018V 111: 0.2 0.1AB 3* -5139 BD+71 659 118904 7854 505I 133446.8+714504133711.0+711432117.72 45.42 5.50 +1.20 gK2 -0.038-0.006 +015 -5140 CP-58 5059 118978241080 133522.9-581651134201.1-584714309.46 3.44 5.38 -0.03 -0.23 B9III -0.035-0.010 -008V 228: * -5141 CP-53 5725 118991241076 W 133520.3-540309134144.7-543336310.25 7.60 5.01 -0.05 -0.23 B8Vn -0.048-0.047D+.003+010V 281: 1.4 5.4 * -5142 82 UMaBD+53 1640 119024 28832 133538.3+532536133930.4+525517107.04 62.70 5.46 +0.10 +0.04 A3Vn -0.142+0.060 +.011-015V 181 -5143 BD+31 2526 119035 63676 133542.4+313058134015.6+310043 55.83 78.65 6.21 +0.96 G5II: -0.078+0.087 -018SB -5144 1 BooBD+20 2858 119055 82942 8991 133553.8+202741134040.5+195720 3.08 76.64 5.75 +0.01 0.00 A1V -0.049+0.023D+.018-026V 45 3.5 4.8AB 3* -5145 BD+28 2248 119081 82944 W 133602.2+283416134039.1+280355 40.68 79.06 6.23 +1.28 +1.50 K3III -0.066+0.014 -063 3.3 91.2 -5146 BD-22 3645 1190861818631354 8994 133559.6-225638134130.9-232659317.55 38.00 6.59 +0.06 +0.05 A0 -0.009+0.003 -013 0.0 0.1AB 3* -5147 CD-32 9549 119090204739 I: T Cen 133601.6-330530134145.7-333549314.80 28.11 6.05 +1.44 +1.10 +1.09 K0e-M4IIe v-0.014+0.026 +028V * -5148 BD+51 1859 119124 28836 8992 133625.3+510126134023.2+503110104.46 64.82 6.32 +0.54 -0.03 F7-9V -0.132+0.060 +.049-015V 12 4.3 17.6 * -5149 2 BooBD+23 2600 119126 82946 133618.4+230009134102.3+222945 13.26 77.84 5.62 +1.01 G9III -0.020-0.025 +005 -5150 82 VirBD-07 3674 1191491394901355I 6390 133621.7-081154134136.8-084211323.42 52.16 5.01 +1.63 +1.95 +1.16 M1.5III -0.094+0.040 +.013-037 -5151 CP-56 5891 1191592410961356 133623.7-561546134256.1-564605309.98 5.40 6.00 -0.08 B0.5III -0.011-0.004 -023V -5152 CD-50 7983 119193241098 133638.8-501706134254.6-504726311.19 11.25 6.41 +1.67 M0III -0.007-0.027 -010 -5153 BD+57 1456 119213 28838 CQ UMa 133641.9+574247134021.3+571227110.18 58.69 6.29 +0.10 +0.02 A2VpSrCrEu v-0.057+0.024 -000 * -5154 83 UMaBD+55 1625 119228 288433087I 6389 133656.7+551116134044.3+544054108.18 61.01 4.66 +1.64 +1.96 +1.12 M2IIIabBa0.5 -0.022-0.009 +.014-017 -5155 CD-40 8096 119250224359 133658.8-405342134255.0-412404313.20 20.44 5.98 +1.02 K0III -0.059-0.049 +028 -5156 BD+09 2798 119288120075 Var 133716.5+085344134212.7+082318337.96 67.74 6.16 +0.42 -0.04 F3Vp -0.382-0.090 +.035-011V 12 * -5157 CD-41 8089 119361224365 W 133741.9-413348134340.0-420403313.20 19.76 5.98 -0.08 B8III -0.026-0.006 -021 0.0 0.1AB 3* -5158 CD-50 7998 119419241120 V827 Cen 133759.0-503030134415.9-510047311.35 10.99 6.47 -0.13 A0pSiCr -0.036-0.041 +009 * -5159 84 VirBD+04 2775 119425120082 I 9000 6401 133802.0+040238134303.7+033217332.78 63.38 5.36 +1.11 +1.04 +0.54 K2III -0.291-0.071 +.006-041SB 2.8 3.0 * -5160 BD+42 2431 119445 44720 133813.1+421041134228.8+414027 90.49 72.09 6.30 +0.86 G6III -0.090+0.007 -033 -5161 BD+35 2474 119458 637013089 133816.0+352934134243.4+345920 71.71 76.51 5.98 +0.85 G5III +0.013+0.012 -015SBO * -5162 BD+65 953 119476 161423088 133823.1+651939134129.9+644921114.42 51.47 5.85 +0.07 +0.08 A2V +0.054-0.012 -006SB 105 -5163 BD-04 3540 119537139516 133841.9-045943134354.3-052956326.12 54.99 6.51 +0.05 +0.01 A1V -0.050-0.018 -022SB =< 38 -5164 BD+23 2606 119584 82969 I 133901.6+231217134345.2+224201 15.32 77.35 6.13 +1.42 +1.70 +0.75 K4III +0.049-0.036 +009 * -5165 83 VirBD-15 3731 1196051581311357 133906.0-154034134429.8-161045321.03 44.82 5.60 +0.81 +0.41 +0.40 G0Ib-IIa +0.013-0.004 +001V * -5166 CD-2411057 119623181921 133911.6-245952134445.7-253003317.81 35.83 6.21 +1.38 K0 -0.053-0.016 +006V -5167 CD-25 9972 119752181931 134001.9-253651134536.9-260658317.84 35.18 5.81 +0.02 A1Vn -0.071-0.010 -010V -5168 1 CenCD-32 9603 119756204812 506 Var? 134000.2-323217134541.2-330238315.86 28.46 4.23 +0.38 0.00 +0.21 F3IV -0.462-0.146 +.051-022SBO 86 * -5169 BD+52 1733 119765 28866 134002.1+523402134354.7+520352104.91 63.19 6.02 0.00 -0.01 A1V -0.026-0.003 -007V? 77 -5170 85 VirBD-15 3735 119786158147 W 134011.9-151554134535.1-154603321.56 45.14 6.19 +0.05 A2Vn -0.044-0.024 -041SB 1.7 0.0 O 4* -5171 CP-61 4003 119796252448 I W V766 Cen 134012.1-620520134710.7-623524309.30-00.41 6.51 +1.98 +1.19 +1.20 K00-Iae -0.023-0.011 -036V 4.0 9.4 * -5172 CD-50 8017 119834241157 W 6434 134019.4-505551134639.3-512558311.63 10.50 4.65 +0.96 +0.72 G8-K0III +0.006-0.033 +.018-006SB1O 6.3 40. * -5173 86 VirBD-11 3591 119853158152 9018 134036.5-115532134556.3-122536323.16 48.29 5.51 +0.90 G8III -0.017+0.008 -011V? 5.0 1.2AB 4* -5174 CD-35 8995 1199212048353091 W 134106.5-354504134656.4-361507315.28 25.29 5.15 -0.02 A0V -0.011-0.009 +.019-010 437 7.3 26.3 -5175 CD-49 8194 1199382411733092 134109.6-494458134727.6-501458312.02 11.63 5.91 +0.29 A3mA5F0 +0.058+0.013 +016 -5176 CD-49 8198 119971241177 134122.3-494914134738.4-501916312.04 11.55 5.45 +1.36 +1.36 K2III -0.151-0.023 +.013+028 -5177 BD+56 1683 119992 28878 134131.4+562326134513.2+555246107.97 59.66 6.50 +0.47 -0.06 F7IV-V +0.102-0.360 +.024-004 9 -5178 BD-08 3639 120033139544 I W 134156.2-091230134713.5-094233324.99 50.76 6.05 +1.42 +1.66 K5III +0.008-0.037 +007V 1.6 0.4 * -5179 BD+41 2424 120047 44742 134158.7+413525134613.5+410519 87.52 72.06 5.87 +0.21 +0.06 A5V -0.114-0.043 +.012-013V? 199 -5180 BD+39 2678 120048 63735 134159.2+390015134619.0+383014 81.11 73.84 5.94 +0.94 G9III -0.051-0.002 -014 -5181 87 VirBD-17 3932 120052158165 I 6442 134158.9-172133134725.4-175136321.28 43.01 5.43 +1.62 +1.94 +0.89E M2IIIab +0.059-0.034 +064 * -5182 3 BooBD+26 2494 120064 829931358 134204.7+261214134643.3+254208 29.48 77.55 5.95 +0.49 +0.10 G5III+A7V: -0.020-0.061 +008SB2O * -5183 BD+07 2690 120066120108 134159.9+065112134657.1+062102337.86 65.38 6.33 +0.63 +0.16 G0-1IV-V -0.510-0.108 +.026-031V? =< 10 3.5 486. * -5184 BD+78 466 120084 78763090 134213.2+783354134239.3+780352119.56 38.73 5.91 +1.01 gG7 -0.062+0.049 +.034-007V? * -5185 4Tau BooBD+18 2782 120136100706 507 9025 6444 134230.6+175719134715.7+172724358.95 73.88 4.50 +0.48 +0.04 +0.24 F6IV -0.482+0.041 +.059-016V 14 7.5 5.0 * -5186 BD+39 2680 120164 637393094 W 134241.0+390234134659.8+383234 80.90 73.71 5.50 +1.03 +0.84 +0.52 K0III+F8V -0.131-0.016 -010SB 3.2 71.3 -5187 84 UMaBD+55 1634 120198 28885 CR UMa 134251.7+545557134635.7+542558106.38 60.89 5.70 -0.08 -0.08 B9pEuCr v-0.019+0.001 -002V? 37 * -5188 CP-82 585 1202132586833986 134252.1-821014135538.7-823958305.09-20.06 5.95 +1.46 +1.57 0.00 K2.5IIIaCH-3Ba0.5 -0.036-0.023 -035V? * -5189 CD-35 9019 120237204867 W 134309.5-351203134855.1-354214315.87 25.72 6.53 +0.57 +0.05 G3IV-V -0.516-0.174 +.039+004 3.0 11.5 * -5190 Nu CenCD-41 8171 120307224469 Nu Cen 134330.2-411122134930.3-414116314.41 19.89 3.41 -0.22 -0.84 -0.23 B2IV -0.022-0.021 +009SB1O 91 * -5191 85Eta UMaBD+50 2027 120315 44752 509I 6450 134336.0+494845134732.4+491848100.69 65.32 1.86 -0.19 -0.67 -0.18 B3V -0.122-0.011 +.035-011SB? 205 * -5192 2 CenCD-33 9358 120323204875 I V806 Cen 134338.9-335705134926.7-342703316.32 26.91 4.19 +1.50 +1.45 +1.81 M4.5III -0.042-0.057 +.031+041 * -5193 Mu CenCD-41 8172 120324224471 508 W Mu Cen 134335.4-415832134937.0-422826314.24 19.12 3.04 -0.17 -0.72 -0.11 B2IV-Ve v-0.023-0.020 +009SB 175 10.7 48. * -5194 CP-68 2014 1204042524813099 134400.8-685417135147.4-692405308.23-07.15 5.75 +1.73 +2.02 K5-M0III +0.004-0.003 +010V? -5195 BD+31 2547 120420 637603096 134408.0+314113134838.7+311125 54.35 76.88 5.62 +1.01 K0III -0.007+0.037 +011 -5196 89 VirBD-17 3937 120452158186 510I 134426.1-173810134952.3-180803321.93 42.57 4.97 +1.06 +0.92 +0.50 K0.5III-IIIb -0.100-0.038 +.046-040 < 19: * -5197 CD-2810277 1204551819993097 6460 134426.3-283501135006.5-290453318.07 32.06 6.18 -0.03 -0.12 A0V -0.048-0.032 +000 -5198 CD-39 8501 120457204888 134421.9-392413135019.4-395404315.03 21.58 6.44 +0.99 K1III +0.007-0.012 -004 -5199 BD+40 2694 120499 63763 I R CVn 134439.7+400224134857.2+393234 82.66 72.77 7.4 M6IIIe v+0.023-0.002 -.006-006V * -5200 5Ups BooBD+16 2564 120477100725 I 6458 134439.2+161738134928.6+154752355.81 72.40 4.07 +1.52 +1.87 +0.87 K5.5III e-0.095+0.042 +.011-006V < 17 * -5201 6 BooBD+21 2578 120539 830153098I 134459.0+214538134942.8+211551 12.25 75.49 4.91 +1.43 +1.65 +0.74 K4III +0.024+0.017 -003 < 19: -5202 BD-19 3754 120544158192 134505.8-192406135034.5-195350321.42 40.84 6.53 +0.51 G5III-IV:+A5: -0.046+0.034 -030V 30 -5203 BD+83 397 120565 22661643 134510.2+831515134223.1+824509121.01 34.18 5.98 +1.01 G9III +0.035-0.041 -050SB -5204 BD+37 2457 120600 63772 134523.5+370743134945.0+363758 74.14 74.42 6.38R A7IV-V -0.074+0.022 -012 82 -5205 BD+06 2800 1206021201323100 134523.3+055937135024.7+052950338.54 64.21 6.01 +0.90 +0.59 K0 +0.009-0.003 -024 -5206 CD-46 8909 120640224489 134535.3-462410135147.2-465357313.53 14.73 5.77 -0.16 -0.75 B2Vp -0.018-0.030 -005V? 100 * -5207 CP-52 6787 120642241239 W 134538.1-521856135204.8-524842312.14 8.97 5.25 -0.09 -0.32 B9V -0.045-0.035 -.001+027 186 2.3 18.1 * -5208 CD-35 9054 120672204911 134545.4-355605135136.6-362600316.24 24.88 6.35 +0.48 +0.01 F6IV-V -0.100-0.117 +000SB2 * -5209 CD-2311329 120690182026 134549.8-235313135120.4-242327319.96 36.49 6.45 +0.69 +0.27 G5V -0.572-0.302 +.062+002 * -5210 3 CenCD-32 9676 120709204916 W A 134603.1-322953135149.6-325940317.28 28.19 4.56 -0.13 -0.60 -0.13 B5IIIp -0.033-0.038D+.017+010 12 1.5 7.9 * -5211 3 CenCD-32 9676 120710204917 W B 134603.8-322956135150.1-325941317.28 28.19 6.06 -0.04 -0.15 B8V -0.056-0.027D+.017+000 180 1.5 7.9 * -5212 CD-3110706 120759204922 W 134616.5-310723135200.9-313710317.74 29.50 6.12 +0.48 F7V -0.053-0.052D+.016+009 1.0 0.6 -5213 BD+62 1318 120787 161863101 134630.2+615917134945.5+612921111.06 54.27 5.96 +0.96 +0.64 G3V +0.065-0.099 -011V -5214 BD+35 2492 120818 63779 134639.7+351604135104.5+344621 67.50 75.13 6.65 +0.12 +0.07 +0.01 A5IV +0.031-0.010 -012V 108 * -5215 BD+35 2493 120819 63781 I 6468 134644.4+350939135109.2+343952 67.10 75.16 5.87 +1.62 +1.96 M2III +0.005-0.054 +.014-040 -5216 BD+59 1533 120874 28901 134701.4+590204135027.7+583222108.83 56.94 6.46 +0.09 +0.08 A3V -0.029+0.011 -040SB -5217 CP-52 6805 120908241262 134713.3-525246135343.1-532225312.25 8.37 5.89 +0.01 -0.41 0.00 B5III -0.024-0.029 +007 23 * -5218 CP-67 2426 120913252511 134712.5-670932135448.9-673909308.92-05.52 5.71 +1.49 +1.67 K2III -0.034-0.027 -008 -5219 BD+35 2496 120933 637933102I AW CVn 134722.8+345622135147.5+342639 66.10 75.14 4.74 +1.66 +1.96 +1.28 K5III -0.019-0.032 +.026-044 * -5220 BD+12 2635 1209341007453104 134724.4+123934135218.4+120955349.54 69.32 6.04 +0.04 +0.01 A1V +0.028-0.005 -016 74 -5221 4 CenCD-3110729 120955204944 W 134727.0-312601135312.5-315540317.93 29.14 4.73 -0.14 -0.54 -0.08 B4IV -0.015-0.012 +005SBO 27 3.7 14.9 * -5222 CD-35 9090 120987204955 W 134741.9-351014135332.8-353951316.88 25.52 5.54 +0.44 -0.01 F4V -0.078-0.019D+.009-008SB 0 0.2 0.9AB 5* -5223 CD-46 8931 120991224514 W V767 Cen 134743.5-463806135356.9-470741313.84 14.42 6.10 -0.07 -0.92 -0.10 B2IIIe v-0.037-0.001 -021 70 4.9 21.4 * -5224 CD-34 9223 121056204963 134803.4-344910135352.2-351852317.06 25.84 6.19 +1.02 +0.86 K1IV-V -0.270-0.075 +005V? -5225 7 BooBD+18 2795 121107100751 134826.2+182532135312.9+175558 3.30 73.05 5.70 +0.84 G5III -0.039+0.004 -010V? -5226 10 DraBD+65 963 121130 16199 511I 9039 CU Dra 134830.6+651302135125.9+644324112.77 51.21 4.65 +1.58 +1.89 +1.36 M3.5III +0.001-0.002 +.014-011V? 7.7 90.2AC 3* -5227 BD+69 724 121146 161973103 W 134831.8+684839135059.2+681855114.79 47.86 6.40 +1.17 +0.60 K2IV -0.172-0.055 +.025-045 1.8 79.1AB 3* -5228 CD-27 9478 121156182065 134836.8-280432135416.6-283411319.27 32.30 6.04 +1.13 K2III -0.170-0.069 -017V -5229 BD+29 2464 121164 830553106 134838.1+290825135310.3+283853 42.88 76.28 5.90 +0.20 +0.14 A7V -0.125+0.027 -012 57 -5230 CD-51 7832 121190241294 134845.0-514007135512.2-520940312.77 9.49 5.71 -0.08 -0.30 B9V -0.027-0.024 +023V * -5231 Zet CenCD-46 8949 121263224538 512 134917.9-464745135532.4-471718314.07 14.19 2.55 -0.22 -0.92 -0.20 B2.5IV -0.057-0.042 +007SB2O 219 * -5232 90 VirBD-00 2758 1212991396133107I 134933.9-010040135442.1-013011333.47 57.57 5.15 +1.08 +1.08 +0.52 K2III -0.088-0.018 +.027-007V? < 17 -5233 BD-07 3728 121325139618 9053 134943.3-073400135458.2-080332328.80 51.59 6.19 +0.53 +0.01 F8V+G0 -0.172-0.030 +.020-019V 0.9 3.4AB 4* -5234 CP-53 5805 121336241309 W 134946.1-533828135619.8-540755312.44 7.54 6.14 +0.07 +0.03 A1V -0.038-0.014D+.012+013 1.0 1.8AB 3 -5235 8Eta BooBD+19 2725 121370100766 513I W 134955.3+185356135441.1+182352 5.30 73.03 2.68 +0.58 +0.20 +0.29 G0IV -0.063-0.358 +.108-000SB1O 13 6.0 112.6 * -5236 CP-54 5806 121384241315 W 134957.2-541230135633.0-544216312.32 6.98 6.00 +0.78 G6IV-V -0.038-0.216 +005 6.9 33. -5237 CD-3011015 121397204994 134959.4-304740135544.5-311706318.73 29.61 6.51 +0.90 G8III -0.047+0.009 -018 -5238 86 UMaBD+54 1630 121409 28928 135010.2+541313135351.0+534343103.76 61.01 5.70 -0.05 -0.07 A0V -0.030-0.003 +.012-016V? 225 -5239 CD-45 8815 121416224555 135007.3-460600135619.5-463533314.39 14.83 5.83 +1.14 +1.11 K1III -0.164-0.076 +.025-001 * -5240 CP-77 922 1214392571073111 135013.4-780607140032.8-783524306.44-16.19 6.09 +0.03 -0.17 B9III -0.021-0.005 +006V -5241 CP-63 3070 121474252531 514 135024.5-631147135738.9-634112310.19-01.75 4.71 +1.11 +1.04 +0.40E K1.5III -0.044-0.030 +.033+022 -5242 CP-65 2553 1215572525343110 W 135103.2-651840135831.2-654802309.74-03.82 6.20 +1.05 +0.81 K0III -0.033-0.036 -029 4.0 6.4 -5243 BD+14 2680 1215601007763109 135100.8+143247135550.0+140323355.12 70.09 6.16 +0.50 -0.08 F6V -0.292+0.007 -013 =< 6 -5244 92 VirBD+01 2865 121607120185 135122.1+013223135627.9+010302336.53 59.61 5.91 +0.20 +0.14 A8V -0.026+0.014 -023 181 -5245 BD+32 2411 121682 638371360 135144.2+323114135610.5+320157 56.03 75.11 6.32 +0.37 +0.06 F4IV-V -0.118+0.048 +.014-022 8 -5246 BD-22 3687 121699182123 I 135153.6-223204135727.7-230122322.14 37.37 6.14 +1.43 K0 -0.041+0.006 +001V? -5247 9 BooBD+28 2278 121710 83084 I 6502 135200.2+275857135634.2+272931 38.12 75.54 5.01 +1.42 +1.72 +0.75 K3III v+0.028-0.048 +.008-040 < 19: * -5248 Phi CenCD-41 8329 121743224577 6509 135211.4-413644135816.3-420603315.98 19.07 3.83 -0.21 -0.83 -0.22 B2IV -0.024-0.021 +006V 126 * -5249 Ups1CenCD-44 9010 1217902245853112 135230.0-441856135840.8-444813315.29 16.45 3.87 -0.20 -0.80 -0.21 B2IV-V -0.025-0.024 +005V 122 * -5250 47 HyaCD-2411202 121847182134 515 135254.3-242903135831.1-245820321.66 35.45 5.15 -0.10 -0.40 B8VpShell -0.049-0.029 +005SB * -5251 CD-49 8356 121853241352 135252.1-495256135917.3-502212313.86 11.06 5.91 +0.96 G8-K0III +0.011-0.034 -005 -5252 CP-60 5135 121901252552 135312.2-605938140017.3-612853311.06 0.30 6.49 +0.33 -0.04 F1III-IV -0.072-0.040 +006 -5253 CP-65 2573 121932252554 W 135320.0-654657140052.2-661607309.85-04.33 5.97 +0.35 +0.07 F2III -0.136-0.016 -017 5.9 46.2 -5254 BD+15 2651 121980100801 I 135350.2+150815135839.9+143858357.75 69.98 6.00 +1.44 +1.71 K5III -0.061-0.056 -041 -5255 10 BooBD+22 2650 121996 831033113 135357.7+221103135838.9+214146 17.02 73.78 5.76 -0.03 +0.02 A0V s -0.009-0.045 +.013+006 60 -5256 BD+62 1325 122064 16230 135425.6+615826135732.1+612934109.61 53.90 6.37R K3V -0.034+0.210 -025 -5257 48 HyaCD-2411215 1220661821521361 135424.0-243120140000.1-250037322.04 35.31 5.77 +0.48 F7V -0.196-0.091 +.029-017V? -5258 BD-02 3768 1221061396661362 135438.3-030345135949.3-033259333.84 55.17 6.40 +0.49 +0.06 F8V -0.025-0.058 -008V? 12 -5259 CD-39 8628 122210205096 W 135516.6-394416140119.0-401320317.12 20.72 6.13 +1.25 +1.29 K1III -0.037-0.006 -045 6.2 10. -5260 Ups2CenCD-44 9040 122223224621 135529.1-450708140143.4-453613315.60 15.53 4.34 +0.60 +0.27 +0.33 F6II +0.002-0.019 +.013-001SB1O 0 * -5261 The ApsCP-76 799 1222502571121363I: The Aps 135534.5-761851140519.8-764748307.22-14.54 5.5 +1.55 +1.05 +1.77 M6.5III: -0.094-0.032 +010 * -5262 BD+09 2835 1223651202283114 135623.4+092243140120.4+085341348.38 65.40 5.99 +0.09 +0.10 A2V +0.036-0.007 -017 100 -5263 11 BooBD+28 2287 122405 83130 517 135638.4+275211140110.5+272312 37.90 74.51 6.23 +0.17 A7III -0.080+0.017 -024V 102 -5264 93Tau VirBD+02 2761 122408120238 516 9085A 135633.3+020142140138.8+013240339.22 59.38 4.26 +0.10 +0.12 +0.06 A3V +0.018-0.021 +.024-002SB 150 5.2 129.0AB 3* -5265 CD-2610060 122430182182 I 135641.4-265649140222.8-272548321.70 32.84 5.48 +1.34 +1.44 K3III -0.033-0.008 +000 -5266 CP-55 5846 122438241403 135640.8-554350140326.2-561249312.87 5.26 5.92 +1.22 +1.18 K2III -0.083-0.031 +017 -5267 Bet CenCP-59 5365 122451252582 518 W Bet Cen 135645.8-595326140349.4-602223311.77 1.25 0.61 -0.23 -0.98 B1III v-0.032-0.019 +.009+006SB 139 3.2 1.3 * -5268 CD-3110859 122510205123 W 135713.2-311214140301.7-314102320.29 28.76 6.18 +0.48 F8V +0.022+0.083 +.018+005 1.1 2.1 * -5269 CD-40 8373 1225322246411364 V828 Cen 135721.7-405628140327.5-412524317.16 19.45 6.11 -0.11 -0.39 -0.11 ApSi -0.034-0.017 +004V * -5270 BD+10 2617 122563120251 6526 135737.4+101013140231.8+094111350.17 65.80 6.20 +0.90 +0.38 +0.58 F8IV -0.196-0.063 -023 * -5271 BD+46 1922 122675 448583115 135813.8+461415140212.2+454513 90.56 66.67 6.27 +1.32 +1.45 K2III +0.033-0.076 -049 -5272 BD-21 3824 1227031822043117 135818.3-215627140353.1-222518324.15 37.45 6.30 +0.45 F5III -0.012+0.013 -019 -5273 BD+11 2625 122742100832 135837.5+111634140332.3+104712352.46 66.45 6.30 +0.74 +0.29 +0.40 G8V +0.083-0.307 +.059-017SB * -5274 BD+08 2810 122744120261 135838.8+080139140336.8+073247347.39 64.00 6.26 +0.94 +0.70 G9III -0.038-0.012 -020 -5275 BD+05 2836 1227971202653118 135854.5+052254140355.8+045403343.99 61.85 6.24 +0.39 -0.02 F4V -0.011-0.003 -023 50 -5276 BD-04 3614 122815139711 135901.2-045403140414.6-052253334.07 53.03 6.39 +1.32 +1.58 K0 -0.009-0.011 -009 -5277 BD-14 3863 1228371583251365 135902.0-142928140427.0-145818327.95 44.32 6.28 +1.08 +0.95 G6III -0.036-0.019 -015V -5278 CP-54 5887 1228442414303119 135904.6-541122140546.5-544010313.63 6.65 6.17 +0.23 A5III-IV -0.050-0.019 -036V -5279 CP-74 1142 1228622571163120 135916.0-742240140827.1-745101308.00-12.75 6.02 +0.58 +0.06 G2-3IV -0.252+0.179 +.041-022 -5280 BD+51 1889 122866 28989 135916.4+512710140259.7+505819 98.11 62.57 6.15 +0.01 A2V -0.021 0.000 -010 60 -5281 CP-59 5395 122879241439 6544 135922.0-591414140625.1-594256312.26 1.79 6.42 +0.12 -0.80 B0Ia -0.011+0.019 +002 * -5282 BD+69 733 122909 16254 I 135938.2+690936140150.6+684043113.63 47.16 6.34 +1.40 K5 -0.035-0.001 -022 -5283 BD+02 2768 122910120269 135933.3+024638140437.5+021751341.25 59.61 6.28 +1.02 +0.87 K0 -0.030-0.003 -029 -5284 BD-15 3805 122958158331 135947.0-155125140514.0-162009327.46 42.99 6.56 +0.10 A4V +0.002+0.006 -013 -5285 Chi CenCD-40 8405 122980224673 Chi Cen 135956.3-404202140602.8-411047317.73 19.54 4.36 -0.19 -0.77 -0.22 B2V -0.017-0.020 +012V? 33 * -5286 CD-42 9027 123004224676 140000.1-423644140610.9-430531317.15 17.71 6.20 +0.98 G8III -0.006-0.037 +022 -5287 49Pi HyaCD-2610095 123123182244 519I 140040.5-261202140622.3-264057323.00 33.25 3.27 +1.12 +1.04 +0.55 K2-III-IIIbFe-0.5 +0.044-0.139 +.049+027V -5288 5The CenCD-35 9260 123139205188 520I'W 140047.7-355241140641.0-362212319.46 24.08 2.06 +1.01 +0.87 +0.53 K0-IIIb -0.519-0.519 +.065+001 12.0 69.9 * -5289 CP-62 3941 1231512526163121 140051.1-624356140814.3-631229311.46-01.62 6.40 +1.02 G8-K0III +0.025+0.038 +039 -5290 95 VirBD-08 3697 123255139736 140125.4-085011140642.8-091848332.12 49.24 5.46 +0.34 +0.08 F2IV -0.139+0.011 -036V 120 -5291 11Alp DraBD+65 978 123299 16273 521 6546 140140.8+645114140423.3+642233110.52 50.96 3.65 -0.05 -0.08 -0.07 A0III -0.055+0.018 +.018-013SBO 18 * -5292 CP-58 5383 123335241478 140153.1-584803140856.3-591636312.70 2.12 6.34 +0.05 -0.51 B5IV -0.010-0.011 -002V 89 * -5293 CP-69 2012 1233772571193123 W 140210.6-694951141030.9-701820309.55-08.46 6.05 +1.74 +1.84 K4II -0.006-0.010 -001 8.5 5.2AB 3 -5294 CD-42 9065 123445224721 W 140239.1-425943140851.9-432816317.52 17.20 6.17 -0.06 B9V -0.019-0.028 -002V 6.6 28.6 * -5295 CP-69 2014 123492252636 140247.3-691443141101.9-694311309.77-07.91 6.06 +0.18 +0.15 A6IV -0.035-0.026 -003 -5296 CD-50 8294 1235152414913122 W 6565 140300.7-510148140935.0-513017315.12 9.51 6.00 -0.06 -0.27 B9IV -0.030-0.007 +005SB1O < 39 3.0 64.1 * -5297 CP-52 7028 123569241496 W 140315.3-525745140954.8-532621314.58 7.65 4.75 +0.94 +0.72 +0.32E G9-III -0.146-0.096 +.017-016 9.2 27.4 * -5298 96 VirBD-09 3865 123630158385 D 140340.8-095139140900.6-102004332.20 48.08 6.47 +1.00 +0.73 G8III -0.005+0.025 -020V? * -5299 BD+44 2325 123657 449011368I BY Boo 140355.9+441948140755.8+435116 85.26 67.26 5.27 +1.59 +1.66 +1.66 M4.5:III +0.011-0.028 +.024-036 * -5300 13 BooBD+50 2047 123782 449053124I W CF Boo 140433.1+495550140817.3+492729 94.58 63.23 5.25 +1.65 +1.92 +1.12 M1.5III -0.061+0.059 +.020-013V 4.5 79.7 * -5301 BD-15 3817 123934158401 I ET Vir 140522.6-154947141050.5-161807329.16 42.49 4.91 +1.72 +2.13 +0.85E M2IIIa +0.006-0.006 +.012+018V? * -5302 BD+60 1516 123977 290193126 140540.1+594841140846.0+592016105.75 55.14 6.46 +1.02 +0.82 +0.52 K0III -0.123-0.017 +011V? -5303 Eta ApsCP-80 706 1239982586933129 140539.5-803220141813.8-810028306.43-18.73 4.91 +0.25 +0.11 A2m -0.031-0.063 -009SB2 43 * -5304 12 BooBD+25 2737 123999 83203 522 140550.2+253355141023.9+250530 30.82 72.18 4.83 +0.54 +0.07 +0.29 F9IV w -0.022-0.061 +.042+011SB2O 26 * -5305 3 UMiBD+75 529 124063 79533125 140608.9+750403140656.4+743537116.34 41.55 6.45 +0.14 +0.12 A7V -0.052+0.012 -004 -5306 CP-77 940 124099257131 140622.2-771148141654.9-773950307.57-15.57 6.47 +1.42 +1.42 K2IIp -0.017+0.009 -010 * -5307 BD+02 2783 124115120334 140626.6+014957141131.2+012144342.99 57.87 6.43 +0.48 +0.04 F7V -0.125+0.028 -018 30 -5308 CP-53 5912 124147241543 140632.4-531144141316.4-533957314.98 7.28 5.56 +1.44 K5III+B-A -0.012-0.018 +.009-003 -5309 CD-2311551 124162182343 140644.9-235335141224.5-242151325.54 34.93 6.34 +1.35 K0 +0.011-0.028 +011V -5310 BD+32 2443 124186 63979 140653.4+324556141115.1+321744 54.36 71.95 6.11 +1.26 +1.43 K4III -0.025+0.022 -022 -5311 CP-54 5933 124195241552 V716 Cen 140652.2-540922141339.9-543733314.73 6.35 6.11 +0.05 -0.38 B5Ve -0.019-0.015 +066V * -5312 50 HyaCD-2610158 124206182349 I 140702.1-264726141246.0-271540324.34 32.21 5.08 +1.16 +1.13 K3III -0.012-0.034 +.048+027 -5313 BD+03 2867 1242241203393127 9152 CU Vir 140712.0+025248141215.8+022434344.43 58.61 5.01 -0.12 -0.42 -0.13 A0VpSi v-0.042-0.026 +.009-002SB 123 6.5 59.9 * -5314 CD-2610163 124281182354 140730.0-260833141313.2-263644324.74 32.77 6.24 +1.08 K0III +0.009-0.014 -010V -5315 98Kap VirBD-09 3878 124294158427 523I 140733.6-094830141253.8-101625333.51 47.70 4.19 +1.33 +1.47 +0.75 K2.5IIIFe-0.5 +0.008+0.140 +.022-004 < 19: * -5316 CP-56 6206 124367241563 W V795 Cen 140759.0-563704141457.0-570509314.13 3.96 5.07 -0.08 -0.63 +0.04 B4Vne v-0.039-0.009 +007V 242 5.8 33.9AB 3* -5317 BD-00 2796 124425139798 Var 140831.2-002224141340.8-005044341.52 55.74 5.91 +0.47 +0.03 F7V w +0.207-0.141 +.027+018SBO 30 * -5318 CD-41 8589 124433224791 140831.9-412210141442.6-415015319.14 18.40 5.61 +0.93 +0.58 G8III -0.133-0.021 -038 -5319 CP-52 7087 124454241569 140836.5-530234141521.2-533035315.33 7.33 6.39 +1.57 K3III -0.030+0.002 -021 -5320 CP-66 2490 124471252678 W 140844.4-660718141638.6-663516311.26-05.10 5.75 -0.06 -0.87 B1.5III -0.015-0.005 -009V 57 7.1 23.8 * -5321 4 UMiBD+78 478 124547 7958 524I S 140913.9+780103140850.9+773251117.67 38.78 4.82 +1.36 +1.39 +0.52E K3III -0.032+0.034 +.010+006SB1O < 17 * -5322 BD-05 3837 124553139806 140908.7-052858141421.3-055651337.22 51.32 6.36 +0.60 +0.16 F9V -0.306+0.088 +.023-032 -5323 14 BooBD+13 2764 124570100925 S 6597 140916.5+132542141405.2+125734 0.78 66.03 5.54 +0.54 +0.09 F6IV -0.256-0.052 +.022-039SBO 0 * -5324 CD-2810528 124576182374 140913.7-284853141501.3-291655324.02 30.14 6.08 A1V -0.030-0.015 -013 -5325 CD-44 9181 124580224798 140917.6-443150141538.8-450003318.20 15.36 6.31 +0.60 F9V +0.137-0.142 +003 -5326 CP-59 5476 124601241580 I W R Cen 140921.8-592652141634.2-595450313.42 1.21 6.39 +2.04 +1.24 +1.73 M5IIe v-0.019-0.018 -020V 6.9 28.0 * -5327 CP-82 601 124639258697 140935.1-822316142423.3-825055305.94-20.53 6.42 +0.02 -0.33 B8Ve +0.001-0.019 +027 -5328 17Kap1BooBD+52 1782 124674 29045 9173B 140952.8+521520141327.7+514716 96.46 60.92 6.69 +0.39 -0.04 F1V +0.054-0.019 +.010-020SB 40 2.2 13.4 * -5329 17Kap2BooBD+52 1782 124675 29046 9173A Kap2 Boo 140954.0+521527141329.0+514725 96.46 60.91 4.54 +0.20 +0.14 +0.12 A8IV +0.063-0.002 +.010-017SB 127 2.2 13.4 * -5330 15 BooBD+10 2654 1246791009343131I W 140956.9+103418141450.8+100602356.00 64.00 5.29 +1.00 +0.77 +0.50 K1III -0.028-0.167 +017V? < 19: 2.6 1.1 * -5331 BD+04 2841 124681120364 I FS Vir 140950.5+034811141453.0+032010346.51 58.96 6.45 +1.60 +1.72 +1.05E M4IIIab -0.045-0.014 -048 * -5332 BD-17 4046 124683158448 140953.3-174403141524.1-181203329.44 40.31 5.43 -0.03 -0.08 A1V -0.039-0.012 -019V 74 * -5333 BD+22 2678 124713 832423130 141002.9+222024141441.0+215224 21.95 70.38 6.39 +0.18 +0.09 A7V +0.039-0.006 -004 67 -5334 BD+70 778 124730 163053128I 6593 141012.4+695407141204.0+692557112.88 46.09 5.24 +1.58 +1.84 M2IIIab -0.027-0.047 +.016-023V? -5335 BD+42 2472 124755 44952 141021.5+415917141423.5+413108 78.52 67.73 6.24 +1.04 gK3 -0.024-0.105 +.030-010SB -5336 Eps ApsCP-79 755 124771257142 141016.6-793850142222.7-800632306.93-17.95 5.06 -0.10 -0.57 B4V -0.025-0.009 +005V 216 * -5337 CD-32 9982 1247802053713132 141023.0-324634141618.3-331429322.67 26.36 6.55 +0.30 F0V +0.022+0.004 +003 -5338 99Iot VirBD-05 3843 124850139824 525I 6604 141046.1-053124141600.9-060002337.75 51.07 4.08 +0.52 +0.04 +0.27 F6III -0.004-0.432 +.043+012 15 * -5339 Del OctCP-83 557 124882258698 6636 141051.6-831235142654.9-834004305.68-21.31 4.32 +1.31 +1.45 +0.49E K2III -0.105-0.007 +005 -5340 16Alp BooBD+19 2777 124897100944 526I 6603 141106.0+194211141539.7+191057 15.14 69.11-0.04 +1.23 +1.27 +0.65 K1.5IIIFe-0.5 v-1.093-1.998 +.090-005V < 17 * -5341 BD-05 3845 124915139828 141106.0-060924141621.5-063719337.36 50.49 6.44 +0.28 +0.09 A9III -0.032-0.016 -034 -5342 BD-02 3812 124931139830 6608 141119.1-024351141630.1-031147340.32 53.39 6.15 -0.01 -0.01 A1V -0.025-0.038 +002 56 -5343 BD+19 2779 124953100949 CN Boo 141122.0+192239141604.2+185443 14.49 68.90 5.98 +0.26 +0.05 +0.12 A8III +0.043-0.028 +004SB? * -5344 BD-17 4053 124990158462 141131.9-180717141703.8-183507329.69 39.80 6.22 +0.98 G5 +0.001+0.005 -012V? -5345 BD+53 1699 125019 29059 141146.6+530003141516.9+523209 97.00 60.16 6.58 +0.10 +0.09 A4V -0.032-0.004 -015 -5346 BD+20 2954 125040 83259 9192 141153.8+203518141632.8+200717 17.70 69.32 6.25 +0.49 F8V -0.148-0.103D+.031-008V 2.0 4.4 -5347 BD+40 2760 125111 64040 141220.1+401230141624.2+394441 73.94 68.33 6.38 +0.36 -0.07 F2IV -0.147+0.008 -024 =< 6 -5348 CD-3210005 125150205412 141228.6-324525141823.8-331314323.14 26.22 6.54 +0.27 F0V -0.070-0.042 -029 -5349 CP-60 5294 125158252703 141231.2-604833141951.5-611623313.35-00.20 5.23 +0.29 +0.16 +0.11 Am -0.171-0.093 +.034+021 74 * -5350 21Iot BooBD+52 1784 125161 29071 528 9198A Iot Boo 141237.4+514942141609.9+512202 95.23 60.96 4.75 +0.20 +0.06 +0.09 A9V -0.150+0.092 +.048-019SB 137 3.5 38.7AB 3* -5351 19Lam BooBD+46 1949 125162 44965 527 6611 141234.9+463251141623.0+460518 86.97 64.67 4.18 +0.08 +0.05 +0.03 A0p -0.187+0.161 +.045-008 110 * -5352 BD+15 2690 125180100956 I 6613 141241.5+154334141728.4+151548 6.61 66.76 5.80 +1.71 +2.07 +0.87E M3IIIa +0.012+0.011 -010V? -5353 BD-06 3964 125184139856 W 141242.0-070424141800.6-073233337.18 49.49 6.47 +0.73 +0.35 G5IV +0.254-0.240 -014V? 4.5 57.1 * -5354 Iot LupCD-45 9084 125238224833 6620 141259.9-453547141924.2-460328318.48 14.14 3.55 -0.18 -0.72 -0.14 B2.5IV -0.013+0.002 +022 370 * -5355 BD-18 3789 1252481584811369 CS Vir 141306.3-181511141838.3-184258330.06 39.52 5.90 0.00 -0.04 A0pCrEu v-0.059-0.042 -009SBO 9 * -5356 CD-2510271 125276182433 9212 141320.3-252150141900.8-254856326.53 33.01 5.87 +0.50 -0.09 F5V -0.372+0.350 +.051-021V? 5.1 64.0AC 3* -5357 CD-36 9268 125283205430 141320.9-363226141923.9-370013321.83 22.62 5.94 +0.08 +0.04 A2Vn -0.047-0.059 +000 -5358 CP-55 5984 125288241641 529 141320.2-555532142019.5-562312315.05 4.38 4.33 +0.12 -0.43 B6Ib -0.014-0.009 +004V? 10 * -5359100Lam VirBD-12 4018 1253371584891371I:D 6621 141341.8-125439141906.6-132216333.40 44.25 4.52 +0.13 +0.12 +0.06 A2m -0.015+0.030 +.017-011SB2O 16 0.1 0.0 * -5360 BD+51 1908 125349 29086 141347.8+514611141721.1+511826 94.87 60.88 6.20 +0.04 A2IV -0.025-0.005 -009V 85 -5361 BD+36 2468 125351 640531370I 141346.1+355815141759.8+353034 62.73 69.76 4.81 +1.06 +0.92 +0.53 K0III +0.004+0.016 -026SB1O < 17 * -5362 CD-42 9235 125383224838 W 141352.7-423556142009.7-430332319.69 16.91 5.56 +0.92 +0.60 G8III -0.010+0.010 -019 2.6 3.5 -5363 BD+48 2188 125406 44982 141405.6+482753141749.2+480006 89.83 63.20 6.32 +0.44 F5 -0.010-0.045 -017 30 -5364 CD-44 9236 125442224843 141419.5-444331142042.5-451114319.01 14.88 4.77 +0.31 +0.06 F0IV +0.034-0.080 +.020+000SB 33 -5365 18 BooBD+13 2782 1254511009751372 W 141425.8+132756141916.3+130015 2.76 65.08 5.41 +0.38 -0.03 +0.19 F5IV +0.106-0.030 -003V? 39 4.9 156.4 * -5366102Ups VirBD-01 2938 1254541398663134I 6629 141423.2-014812141932.5-021556342.25 53.74 5.14 +1.02 +0.85 +0.51 G9III -0.120-0.074 +.018-027V < 19: -5367 Psi CenCD-37 9336 1254732054531373 W 141428.3-372531142033.4-375307321.72 21.71 4.05 -0.03 -0.11 -0.02 A0IV -0.063-0.012 +.003-005V 101 9.5 36.0 -5368 BD+01 2913 125489120400 6630 141434.6+005041141940.9+002303344.97 55.88 6.19 +0.20 +0.09 A7V -0.041-0.013 -022V 157 -5369 BD+39 2749 125538 64064 141449.1+391337141855.7+384603 70.98 68.36 6.86 +1.06 +0.89 G9IV -0.001+0.031 -010V? -5370 20 BooBD+16 2637 1255601009803135I 6631 141501.2+164554141945.2+161825 9.59 66.86 4.86 +1.23 +1.40 +0.60 K3III -0.142+0.060 -008 < 17 * -5371 CP-57 6619 125628241673 W 141527.1-580008142237.0-582734314.64 2.33 4.92 +0.86 +0.48 G8III+F5V -0.052+0.013 +.024+015SB2 2.1 9.2AB 4* -5372 BD+55 1678 125632 29098 141536.7+551925141855.8+545151 99.05 58.02 6.53R A5Vn -0.028+0.011 -003 157 -5373 BD+39 2750 125642 64072 141541.3+391513141947.7+384738 70.85 68.19 6.33 +0.05 +0.05 -0.03 A2V +0.022-0.013 -011V 142 * -5374 BD+31 2605 125658 640743136 6633 141546.2+305317142008.7+302545 47.84 70.32 6.44 +0.15 +0.10 +0.05 A5III -0.010-0.005 +001 -5375 CD-47 9082 125721224870 W 141606.3-475146142238.7-481913318.20 11.83 6.09 -0.13 -0.91 B1III -0.013-0.013 -018V? 3.7 4.2AB 3* -5376 CD-34 9570 1257452054853137 141619.9-341947142219.7-344713323.33 24.46 5.56 -0.09 B8V -0.025+0.001 -037 -5377 CD-50 8501 1258102416863138 W 141639.8-501857142320.3-504620317.43 9.50 6.02 +1.36 K2III -0.005-0.004 -007 3.6 1.3 -5378 CD-38 9329 125823205497 V761 Cen 141652.4-390318142302.2-393044321.57 20.02 4.42 -0.18 -0.75 -0.17 B7IIIp v-0.027-0.032 +008 2 * -5379 CP-67 2574 125835252735 530 141648.5-674425142506.3-681143311.48-06.89 5.61 +0.49 +0.01 A3Ib -0.012-0.003 -022V 34 -5380 CP-52 7195 125869241691 141700.0-524313142348.4-531036316.64 7.22 6.00 +1.10 K1III -0.071-0.024 +007V -5381 51 HyaCD-27 9803 125932182483 I 6648 141719.9-271742142305.8-274514326.60 30.87 4.77 +1.31 +1.54 +0.67 K4III -0.193-0.112 +.040+020 * -5382 CP-65 2718 125990252737 141739.5-654307142539.5-661024312.26-05.02 6.36 +0.13 +0.06 A3V -0.059-0.026 +018 -5383 2 LibBD-11 3729 1260351585281374 141802.6-111526142325.6-114251335.82 45.20 6.21 +0.99 G7III -0.009-0.058 -001 -5384 BD+01 2920 126053120424 I' 141808.4+014236142315.3+011430347.17 56.02 6.27 +0.63 +0.09 +0.32 G1V +0.226-0.477 +.061-019V 1 -5385 BD+09 2882 126128 9247BC 141827.5+085400142322.6+082642356.56 61.33 6.86 +0.43 -0.01 F0V+F2V -0.075-0.008 +.016-018SB 71 1.7 6.2AxBC 3* -5386 BD+09 2882 126129120426 9247A 141827.6+085406142322.7+082648356.56 61.33 5.12 -0.02 -0.07 A0V -0.075-0.008 +.016-023V 93 1.7 6.2AxBC 3* -5387 BD+25 2770 126141 833213139 6653 141837.4+254728142306.8+252017 33.14 69.39 6.22 +0.37 -0.02 F5V -0.155+0.064 -010 8 -5388 BD+08 2857 126200120433 6654 141905.0+084154142400.9+081437356.48 61.08 5.95 +0.06 +0.08 A3V +0.003-0.025 -007 90 * -5389 CP-76 826 126209257163 141902.4-761642142936.8-764345308.60-14.95 6.07 +1.18 +1.11 K0-1III -0.039-0.026 -008V -5390 CD-2411469 1262181825171376 141906.1-242109142448.6-244823328.45 33.40 5.32 +0.96 +0.71 G8III -0.055-0.016 +.024-022V? -5391 CP-65 2732 1262412527453141 141907.8-652210142707.1-654918312.52-04.75 5.85 +1.50 +1.76 K3III -0.018-0.013 -020 -5392 BD+06 2875 1262481204341375 141912.7+061625142411.3+054912353.10 59.33 5.10 +0.12 +0.10 A5V -0.077+0.005 +.023-010SB 194 -5393 BD-11 3736 126251158550 9254 141918.2-111256142440.9-114011336.23 45.09 6.49 +0.42 +0.04 F4III -0.071-0.029D+.012-036V 1.6 1.2 * -5394 BD+08 2858 126271120436 6655 141923.0+083228142418.3+080506356.35 60.92 6.19 +1.20 +1.29 +0.60 K4III -0.114-0.092 +.015-031V? * -5395 Tau1LupCD-44 9322 1263412249191377 W Tau1 Lup 141942.9-444609142608.2-451317319.92 14.50 4.56 -0.15 -0.79 -0.11 B2IV -0.012-0.013 -022 30 4.7 158.2 * -5396 Tau2LupCD-44 9323 126354224920 W 141944.8-445538142610.8-452246319.87 14.35 4.35 +0.43 +0.19 +0.35 F4IV+A7: +0.016-0.008 +.002-001SB1 0 0.1 0.1 * -5397 BD-19 3880 126367158558 9258A 141954.7-193102142529.8-195811331.22 37.68 6.61 +0.14 +0.11 A2V -0.039-0.006D+.005-002 74 0.4 35.1AB 3* -5398 CD-41 8757 126386224923 141956.5-415155142613.4-421909321.06 17.19 6.32 +1.19 K2III -0.123-0.071 -033 -5399 CD-2610280 126400182535 142001.3-262355142547.7-265109327.67 31.45 6.48 +0.94 G7IV -0.019-0.061 +007V -5400 CD-39 8918 126475205561 142037.6-392521142649.9-395226322.14 19.41 6.35 -0.08 B7IV -0.019-0.016 +008V -5401 CD-45 9188 126504224929 W 142045.2-454054142712.2-460804319.75 13.59 5.83 +0.31 +0.16 +0.16 A1mA5/7-F2 -0.153-0.082 -026 5.6 30.0 * -5402 BD+39 2764 126597 641373142 142124.2+385041142529.2+382335 68.67 67.34 6.27 +1.23 +1.26 gK2 +0.007-0.013 +025 -5403 CP-58 5549 126610241737 142124.8-584454142843.5-591152315.11 1.35 6.45 +0.14 +0.13 A0II-III -0.011-0.015 +002V * -5404 23The BooBD+52 1804 126660 29137 531I W 6669 142147.5+521847142511.8+515103 93.84 59.65 4.05 +0.50 +0.01 +0.25 F7V -0.236-0.397 +.072-011 34 7.0 69.5 * -5405 22 BooBD+19 2810 1266611010251378 142148.2+194035142627.4+191337 18.06 66.82 5.39 +0.23 +0.23 +0.10 F0m -0.071+0.025 +.007-028 29 -5406104 VirBD-05 3880 126722139942 142209.3-054009142724.4-060713341.39 49.45 6.17 +0.09 +0.11 A2IV -0.071-0.058 -015V? -5407 52 HyaCD-2810712 126769182570 532 9270 6674 142218.9-290232142810.4-292930326.95 28.83 4.97 -0.07 -0.41 B8V -0.024-0.023 +016V 0.0 0.1AB 4* -5408 CP-67 2595 126862252767 W 142255.3-671610143116.5-674302312.20-06.66 5.83 +1.00 +0.78 K1III +0.035-0.066 +078 8.2 35.4 -5409105Phi VirBD-01 2957 126868139951 533 9273 6675 142302.9-014647142812.1-021341345.22 52.51 4.81 +0.70 +0.21 +0.37 G2IV -0.139-0.002 +.047-010SB 0 3.9 5.1AB 3* -5410106 VirBD-06 4009 1269271399573143I 142325.1-062705142841.7-065402341.13 48.62 5.42 +1.49 +1.76 K5III -0.019-0.052 -049 -5411 BD+41 2504 126943 45058 142329.9+412826142727.3+410130 74.26 65.88 6.63 +0.37 -0.05 F1IV -0.056-0.019 -017 75 -5412 CD-44 9383 126981224969 W 142341.4-445227143008.6-451918320.55 14.15 5.50 -0.08 -0.27 -0.04C B8Vn -0.046-0.040 +010V? 174 6.3 10.5 * -5413 CD-48 9098 126983224972 W 142341.1-490418143020.9-493109318.95 10.25 5.37 +0.05 A1V+B -0.052-0.047 +000SB2O 0 6.5 22.1 * -5414 BD+28 2331 127043 83373 9277B 142407.1+284412142831.5+281721 41.69 68.52 7.62 -0.01 0.00 A1V +0.028-0.013 -013SB 80 0.5 25.4 * -5415 BD+28 2332 127067 83374 9277A 142409.0+284416142833.3+281727 41.69 68.51 7.12 -0.03 -0.03 A1V +0.017+0.008 -012 100 0.5 25.4 * -5416 BD+36 2495 127065 641613144 142407.9+363839142816.4+361149 62.79 67.57 6.10R K0III -0.024+0.002 -018 -5417 CD-40 8729 127152224982 142440.4-402400143056.5-405042322.51 18.21 6.39 +1.44 K3III -0.030+0.003 -016 -5418 BD+01 2941 1271671204993145 142444.5+011628142950.5+004944348.95 54.66 5.94 +0.16 +0.11 A5IV +0.010+0.002 -009 125 -5419 CD-38 9430 1271932056373148 142459.0-382533143110.8-385211323.38 20.01 5.97 +1.06 K1III +0.005+0.023 +008 -5420 24 BooBD+50 2084 127243 29165 142509.0+501732142837.8+495041 90.16 60.64 5.59 +0.85 +0.44 G3IV -0.305-0.046 +.022-006 -5421 CP-56 6296 127297241777 V Cen 142522.8-562639143232.9-565316316.44 3.31 6.93 +0.91 +0.60 F5Ia -0.027-0.012 -022 * -5422 BD+32 2482 127304 64178 9288 142532.6+321410142949.7+314728 51.15 68.13 6.06 -0.03 -0.09 A0V s -0.018+0.004 -009V =< 41 5.0 25.8AB * -5423 BD+42 2508 127334 450753146 142540.3+421450142936.8+414745 75.46 65.16 6.35 +0.70 +0.21 G5V +0.162-0.218 +.031-001V =< 10 -5424 BD+05 2886 1273371205043149I W 142545.0+051301143045.4+044620353.97 57.44 6.02 +1.42 +1.67 gK4 +0.009-0.012 +006V 3.5 55.5 * -5425 Sig LupCD-49 8831 127381241781 142552.6-500050143236.9-502725318.93 9.25 4.42 -0.19 -0.84 B2III -0.043-0.010 -002V? 84 * -5426 CP-54 6053 127486241792 142630.8-543324143332.4-545954317.30 5.00 5.87 +0.48 F6IV-V -0.095+0.004 -000 -5427 CP-52 7301 127501241793 W 142636.6-521415143329.9-524048318.19 7.14 5.87 +1.09 K0III -0.006-0.031 -042 8.1 20. -5428 CD-3011519 127624205681 W 142713.9-301621143309.6-304251327.47 27.27 6.09 +1.03 +0.84 K0III +0.040-0.015D+.006+010V 3.3 2.5 -5429 25Rho BooBD+31 2628 127665 64202 534I 9296 6697 142731.2+304837143149.8+302217 47.29 67.80 3.58 +1.30 +1.44 +0.65 K3-III -0.100+0.119 +.029-014V? < 17 8.2 42.2 -5430 5 UMiBD+76 527 127700 80241379I 9286 6687 142743.8+760826142731.5+754146115.39 39.99 4.25 +1.44 +1.70 +0.75 K4-IIIBa0.3 +0.009+0.023 +.019+010V < 17 7.8 58.8AC 3* -5431 CD-41 8890 127716225027 142747.4-413931143408.0-420559322.56 16.83 6.60 +0.06 A2IV -0.016-0.029 -056V? -5432 CP-59 5642 127724241811 142749.0-593431143517.2-600057315.57 0.28 6.40 +1.26 K2III -0.021-0.031 -007 -5433 BD+27 2388 127726 83394 9301 6699 142754.6+270710143220.2+264038 37.58 67.54 6.01 +0.22 +0.07 A7Vn -0.064-0.029 +.011-004 204 0.2 0.2 * -5434 26 BooBD+22 2715 127739 833953151 142759.8+224201143232.5+221536 26.51 66.57 5.92 +0.35 +0.07 F2IV -0.127+0.039 -012V * -5435 27Gam BooBD+38 2565 127762 64203 535I 9300 Gam Boo 142803.0+384444143204.7+381830 67.26 66.17 3.03 +0.19 +0.12 +0.08 A7III -0.114+0.153 +.025-037V 139 9.5 33.4 3* -5436 BD+63 1136 127821 164063150 142823.4+633740143046.1+631108105.61 50.47 6.09 +0.41 -0.04 F4IV -0.178 0.000 -003 50 -5437 BD+60 1547 127929 16411 536 142859.8+603958143142.8+601332102.58 52.76 6.27 +0.24 +0.14 F0III -0.049+0.021 -019V? 67 -5438 BD-19 3903 127964182676 142912.9-200002143450.7-202621333.37 36.25 6.50 +0.14 A4V +0.017+0.002 -000 -5439 CD-40 8794 127971225046 W 142911.8-410443143531.5-413102323.05 17.25 5.87 -0.08 B7V -0.020-0.017 +010V 5.2 26.9 * -5440 Eta CenCD-41 8917 127972225044 537 I Eta Cen 142909.3-414307143530.4-420928322.77 16.67 2.31 -0.19 -0.83 -0.20 B1.5Vne v-0.035-0.035 -000SB 333 * -5441 BD+37 2545 127986 64212 CP Boo 142915.0+372403143320.3+365734 63.89 66.37 6.43R F8IV w -0.004-0.057 +002 =< 10 * -5442 BD+56 1746 128000 29191 I 142923.0+555019143230.9+552352 96.99 56.34 5.76 +1.50 gK5 +0.006-0.015 +003 -5443 CP-67 2616 1280202528243156 142922.4-672916143746.3-675556312.69-07.10 6.04 +0.50 -0.02 F7V -0.343-0.290 +.051-030 -5444 CD-45 9293 128068225054 W 6724 142946.1-454831143619.0-461443321.20 12.87 5.55 +1.48 +1.72 +0.72C K3III -0.038+0.019 +.019-060 7.1 40. * -5445 BD+33 2474 128093 642213153 W 142956.4+325823143411.7+323204 52.82 67.13 6.33 +0.40 -0.03 F5V +0.108+0.007 -008 12 5.0 24.7 -5446 CD-39 9047 128152205744 143009.1-390935143624.2-393550324.04 18.93 6.13 +1.05 K1III -0.037-0.018 -031V -5447 28Sig BooBD+30 2536 128167 834161380 W 6717 143019.5+301046143440.8+294442 45.62 67.20 4.46 +0.36 -0.08 +0.19 F2V +0.189+0.132 +.068+000 3 5.3 237.1AB 3* -5448 BD+37 2551 128198 64227 I 6718 143033.2+370355143438.5+363733 62.91 66.22 6.03 +1.38 gK5 -0.029-0.054 -012 -5449 CD-39 9050 128207205751 143027.3-394629143644.2-401242323.84 18.35 5.74 -0.12 B8n -0.016-0.025 +002 -5450 CD-45 9302 128266225062 W 143046.9-454151143720.1-460802321.41 12.90 5.41 +1.01 +0.73 +0.48C G8III -0.014-0.020 +.023-016 0.0 0.1AB 3* -5451 BD+57 1519 128332 292023154 143114.6+573034143415.9+570355 98.69 54.95 6.48 +0.49 -0.03 F6-8V +0.217-0.229 +.025-022 =< 6 * -5452 BD+50 2095 128333 451213155I CH Boo 143109.8+494815143439.6+492206 88.15 60.21 5.74 +1.56 +1.88 +0.72E M1IIIab -0.045+0.054 -020V? * -5453 Rho LupCD-48 9198 1283452250713158 6733 143109.4-485924143753.2-492533320.13 9.86 4.05 -0.15 -0.56 -0.11 B5V -0.024-0.031 +008 195 * -5454 BD+23 2710 128402 834273157 143135.6+234108143606.9+231501 29.44 66.05 6.38 +1.06 +0.90 K0 -0.012+0.027 +007 -5455 BD-11 3770 1284291586771381 143140.5-115249143659.8-121819339.35 42.97 6.20 +0.46 -0.03 F5V -0.872+0.365 +.034-070V 15 -5456 CD-38 9529 128488205786 143204.9-382134143819.6-384739324.76 19.51 6.02 +1.43 K3III +0.066-0.023 +028V -5457 CD-46 9469 128582225089 143237.2-460844143911.0-463503321.52 12.36 6.07 +0.51 +0.03 +0.28C F7V -0.182-0.211 +.021-012 -5458 CD-48 9218 128617225091 143242.8-483709143924.7-490320320.52 10.10 6.39 +0.44 +0.01? F3IV -0.167-0.132 +.009-017 * -5459 Alp1CenCP-60 5483 128620252838 538I W A 143248.3-602522143935.9-605007315.78-00.71-0.01 +0.71 +0.24 +0.22E G2V -3.642+0.699 +.751-022SBO 1.4 20.9AB 3* -5460 Alp2CenCP-60 5483 128621 I'W B 143248.3-602522143936.1-605008315.78-00.71 1.33 +0.88 +0.68 +0.30E K1V -3.646+0.700 +.751-021V? 1.4 20.9AB 3* -5461 CP-55 6107 1287132418983162 143319.1-560033144032.8-562627317.63 3.29 6.30 +1.18 K0-1II -0.007-0.011 -005 -5462 BD+18 2906 1287501011213160 143334.9+184359143814.0+181754 18.81 63.90 5.91 +1.10 +0.99 +0.56 gK2 -0.029-0.068 +.038-014 -5463 Alp CirCP-64 2977 128898252853 539 W Alp Cir 143425.2-643223144230.4-645831314.34-04.59 3.19 +0.24 +0.12 +0.10 ApSrEuCr: -0.192-0.232 +.056+007SB? 0 5.4 15.6 * -5464 BD+44 2376 128902 45145 I 143427.1+440424143812.5+433831 77.43 62.89 5.70 +1.48 +1.68 +0.82 K2III -0.113+0.030 -049V? -5465 CP-58 5672 128917241912 143429.7-581108144155.7-583658316.91 1.23 6.22 +0.45 F4V +0.019-0.042 +011 -5466 CD-35 9702 128974205823 143452.7-354218144101.4-360806326.50 21.67 5.67 -0.08 -0.38? A0p: -0.022-0.008 -023 -5467 BD+54 1693 128998 292273161 143504.8+542720143815.2+540124 94.17 56.73 5.85 -0.01 0.00 A1V +0.018-0.016 -003V? 84 -5468 33 BooBD+45 2204 129002 45153 540 143506.9+445010143850.2+442416 78.76 62.42 5.39 0.00 -0.04 A1V -0.067-0.017 +.012-013SB 79 -5469 Alp LupCD-46 9501 129056225128 541 W Alp Lup 143516.5-465732144155.8-472318321.61 11.44 2.30 -0.20 -0.89 -0.17 B1.5III/Vn -0.021-0.018 +005SB 24 11.1 27.6 * -5470 Alp ApsCP-78 893 129078257193 542 143525.6-783713144751.6-790241308.49-17.45 3.83 +1.43 +1.68 +0.53E K3IIIa -0.012-0.015 +.029-001 -5471 CD-37 9618 129116205839 143544.7-372151144157.6-374737325.90 20.10 4.00 -0.17 -0.70 -0.15 B3V -0.023-0.032 +001V 187 * -5472 BD+22 2731 129132 83458 S 143549.3+222415144021.9+215832 27.15 64.75 6.10 +0.40 +0.02 G0V -0.018+0.034 +001SBO 0.1 * -5473 BD+14 2769 129153101137 143555.4+135750144042.4+133203 10.34 61.10 5.91 +0.21 +0.04 F0V +0.055-0.025 -008 94 * -5474 CD-3011624 129161205841 W 143553.2-303015144151.1-305600329.23 26.24 6.37 -0.09 ApSi -0.031-0.022D+.003-011 0.9 1.0 -5475 29Pi 1BooBD+17 2768 129174101138 9338A 6762 143601.5+165049144043.6+162506 15.64 62.54 4.94 -0.03 -0.31 -0.02 B9pMnHgSi v+0.015+0.015 +.002-001SB 22 0.9 5.7AB 3* -5476 29Pi 2BooBD+17 2768 129175101139 9338B 6763 143602.0+165048144043.9+162504 15.64 62.54 5.88 +0.24:+0.10: A6V +0.001+0.010 +.002-007SB 148 0.9 5.7AB 3* -5477 30Zet BooBD+14 2770 129246101145 9343B 6766 143622.3+140926144108.9+134342 10.80 61.12 4.83H A2III +0.053-0.016 +.009-006 0.1 1.2AB 3* -5478 30Zet BooBD+14 2770 129247101145 9343A 6766 143622.3+140926144108.9+134342 10.80 61.12 4.43H +0.05 +0.05 -0.01 A2III +0.053-0.016 +.009-006SB? 156 0.1 1.2AB 3* -5479 BD+80 448 129245 80543159 143623.2+800532143338.3+793937117.41 36.35 6.26 +1.30 +1.46 K3III -0.101+0.081 +.015-023V? * -5480 31 BooBD+08 2903 1293121206013163I 6769 143644.0+083522144138.8+080942 2.05 57.76 4.86 +1.00 +0.76 +0.48 G7+IIIHdel -0.5 -0.009+0.003 +.011-022V < 17 -5481 32 BooBD+12 2729 1293361011521382 143655.2+120529144143.5+113938 7.46 59.86 5.56 +0.94 +0.67 +0.48 G8III -0.157-0.114 +.023-023V * -5482 CP-62 4275 129422252869 W 143721.6-622656144517.3-625233315.50-02.81 5.36 +0.29 A9V +0.063-0.084 +.011-001V? 213 5.5 36.3 * -5483 BD+21 2674 129430 83474 143720.4+213308144154.2+210725 25.53 64.15 6.38R G8III-IV -0.010-0.053 -011 * -5484 4 LibCD-2411637 129433182795 143726.6-243417144313.6-245951332.75 31.32 5.73 -0.01 -0.08 B9 v-0.019-0.001 -004V * -5485 CD-34 9868 129456205871 544 143732.3-344435144339.4-351025327.48 22.29 4.05 +1.35 +1.53 +0.73 K3IIIb e-0.064-0.180 +.014-038 * -5486 CP-57 6772 129462241966 143729.3-580306144455.5-582840317.32 1.19 6.11 +1.02 K0III -0.083-0.053 -024 -5487107Mu VirBD-05 3936 129502140090 545 143747.3-051325144303.6-053930346.55 47.54 3.88 +0.38 -0.02 +0.22 F2III +0.109-0.316 +.045+005SB 54 * -5488 CP-55 6150 129557241971 W BU Cir 143758.2-551038144510.9-553607318.57 3.78 6.10 -0.06 -0.80 B2III -0.015-0.013 -006 53 1.4 68.8 * -5489 CD-34 9888 129685205899 143851.0-344606144459.2-351131327.73 22.15 4.92 +0.01 -0.03 +0.02 A0V +0.003-0.004 +.019-005 455 -5490 34 BooBD+27 2413 129712 834881383I W Boo 143901.6+265710144325.4+263140 38.00 65.06 4.81 +1.66 +1.94 +1.22 M3-III -0.013-0.017 +.002+006V * -5491 CP-87 235 129723258720 920 BP Oct 143858.8-874430152819.1-880759304.24-25.68 6.48 +0.30 +0.10 Am -0.091-0.077 -015 89 * -5492 BD+61 1451 129798 16466 9357 DL Dra 143933.5+614117144203.2+611543102.09 51.16 6.25 +0.41 -0.01 +0.20 F2V +0.070-0.030 +.017-006SB 42 2.2 4.1 * -5493 BD+41 2523 129846 451903166I 143951.6+405256144344.4+402733 70.09 63.30 5.73 +1.39 K4III -0.014+0.023 +013SB -5494 CD-46 9562 129858225178 143947.6-470109144629.1-472628322.30 11.06 5.74 +0.07 +0.08 +0.03C A1V -0.022-0.015 -011 -5495 CD-51 8457 129893241992 546 W 144001.4-515737144701.3-522301320.20 6.57 5.21 +0.98 G8III -0.016-0.082 +.021-021 7.8 8.9 -5496 BD-00 2867 129902140116 I 144002.8-005942144511.7-012504351.32 50.45 6.07 +1.61 +1.94 +0.85E M1III -0.053-0.004 -047 * -5497 54 HyaCD-2411661 129926182855 9375A 144012.6-250107144600.1-252635333.13 30.63 4.94 +0.35 +0.10 F2III-IV -0.150-0.104 +.049-013 161 2.0 8.5 * -5498 CD-51 8461 129932241995 W 144013.1-514704144712.3-521220320.31 6.72 6.07 +0.09 A1III-IV -0.025-0.017 -034 5.3 39.1 -5499 BD-22 3844 1299441828573167 144022.2-224348144606.8-230911334.50 32.60 5.81 +0.98 gG5 +0.027-0.058 +007V -5500 CP-66 2645 129954252894 W 144016.2-661025144844.4-663538314.22-06.33 5.91 -0.07 -0.70 B2.5Ve -0.021-0.025 +019 3.0 60. AB 3* -5501108 VirBD+01 2972 129956120642 144024.5+010822144530.2+004302353.72 51.97 5.69 -0.03 -0.07 B9.5V -0.038-0.007 -020V? 76 -5502 35Omi BooBD+17 2780 129972101184 I 144034.4+172316144514.5+165752 17.74 61.82 4.60 +0.98 +0.75 +0.48 G8.5III -0.058-0.049 +.045-009 < 17 * -5503 5 LibBD-14 4023 129978158788 9376 144026.8-150217144557.8-152735339.48 39.15 6.33 +1.19 K1III -0.032 0.000 -040 4.7 3.1 -5504 BD-20 4087 129980182858 W 144030.4-204507144610.9-211034335.73 34.29 6.40 +0.58 +0.15 F7V -0.062-0.104D+.026-000V? 0.2 0.3 * -5505 36Eps BooBD+27 2417 129988 9372B 144037.1+272947144459.2+270430 39.38 64.78 5.12H A2V -0.050+0.021 +.016-023SB2 147 2.6 2.8AB 3* -5506 36Eps BooBD+27 2417 129989 83500 I 9372A 144037.1+272945144459.2+270427 39.38 64.78 2.70H +0.97 +0.73 +0.52 K0-II-III -0.049+0.021 +.016-017V 2.6 2.8AB 3* -5507 BD+19 2854 130025101187 144043.3+191822144520.7+185305 21.51 62.60 6.13 +0.83 K0 +0.032+0.014 -004 -5508 CD-37 9686 130055205937 144048.6-375205144705.1-381727326.62 19.20 5.94 +1.33 K3III +0.052-0.090 +041V * -5509 CD-43 9326 130073225183 144101.9-430812144732.1-433327324.22 14.46 6.30 +1.08 +0.88 +0.49C G8III -0.013-0.032 -023 -5510 BD+33 2489 130084 643061384I 144102.6+331243144513.7+324718 52.83 64.79 6.28 +1.58 +1.90 M1IIIb +0.045-0.072 +030V -5511109 VirBD+02 2862 130109120648 547 6794 144111.5+021851144614.9+015334355.28 52.68 3.72 -0.01 -0.03 -0.02 A0V -0.114-0.026 +.037-006V? 351 -5512 BD+15 2758 1301441012003168I 6796 144123.1+153307144606.0+150755 14.55 60.79 5.63 +1.57 +1.31 M5IIIab -0.084+0.020 -022 -5513 BD-20 4093 130157182873 I 144132.4-205419144713.7-211929335.89 34.03 6.06 +1.65 +1.98 K5III -0.013+0.004 -024V -5514 55 HyaCD-2510534 130158182875 144133.4-251216144722.5-253728333.34 30.32 5.63 A0IIIp -0.008-0.016 -018 0 * -5515 CP-56 6441 130227242026 6807 144147.6-561447144906.9-564004318.61 2.58 6.23 +1.13 +1.06 K1III -0.110-0.123 +013 * -5516 56 HyaCD-2510537 1302591828821385 144154.4-254006144744.8-260515333.15 29.87 5.24 +0.94 +0.65 G5III +0.041-0.007 +.034-001 -5517 57 HyaCD-2610519 130274182883 144206.4-261338144757.5-263847332.88 29.36 5.77 -0.02 -0.09 B9V -0.013-0.011 +006 183 -5518 BD-12 4134 130325158808 144227.4-122509144754.9-125023341.92 41.05 6.35 +1.10 +0.95 K0III +0.043-0.085 +033V? * -5519 CD-36 9645 130328205966 V768 Cen 144225.6-361256144838.1-363805327.72 20.53 6.04 +1.54 +1.28 +1.61 M3III -0.014-0.048 +041 * -5520 CP-72 1604 130458257206 W 144313.2-724639145313.7-731124311.56-12.39 5.60 +0.82 +0.42 G7IIIa+F9IV +0.021+0.033 +038 2.2 2.0 * -5521 CD-2311916 130529182898 I W 144331.9-235006144918.7-241506334.59 31.28 5.68 +1.30 gK1 -0.023-0.003 -026 2.9 61.0AB 3 -5522 BD-00 2886 1305571401523169 144345.8-002554144854.1-005052353.00 50.25 6.14 -0.04 -0.10 B9VSi:Cr: v-0.008+0.017 -016 71 -5523 7Mu LibBD-13 3986 130559158821 9396 6816 144350.0-134357144919.1-140856341.30 39.78 5.31 +0.07 -0.05 A1pSrCrEu -0.061-0.014 +.006-004SB? 26 0.9 1.8AB 5* -5524 BD+24 2779 130603 83535 9389 144357.2+244655144823.3+242200 33.54 63.58 6.14 +0.48 +0.08 F2-6V -0.110+0.045D+.010-031 38 1.1 1.9 -5525 Pi 1OctCP-82 629 1306502587133987 144413.7-824924150150.8-831340306.84-21.37 5.65 +0.95 +0.75 G8-K0III +0.016+0.053 +014 -5526 58 HyaCD-2710073 130694182911 I 144424.8-273238145017.3-275737332.65 27.97 4.41 +1.40 +1.49 +0.76 K4III -0.241-0.059 +.011-010 * -5527 CP-63 3436 130701252928 I AX Cir 144427.3-632348145235.0-634836315.83-04.01 5.87 +0.72 +0.22 G3II+B8V v-0.024-0.009 -021SB? * -5528 Omi LupCD-43 9391 130807225248 W 144506.5-430941145138.4-433432324.90 14.11 4.32 -0.15 -0.61 -0.11 B5IV -0.020-0.027 +007SB 84 0.0 0.1 * -5529 BD+38 2593 130817 643441386 144511.1+381324144906.7+374840 63.78 63.12 6.16 +0.36 -0.07 F2V -0.253+0.111 +.021-035V? 12 -5530 8Alp1LibBD-15 3965 1308191588361387 W B 144509.2-153453145041.2-155950340.31 38.07 5.15 +0.41 -0.03 +0.19 F4IV -0.098-0.066 +.050-023V 22 0.4 0.0 O 3* -5531 9Alp2LibBD-15 3966 130841158840 548I W A 6827 144520.7-153734145052.7-160230340.33 38.01 2.75 +0.15 +0.09 +0.04 A3IV -0.106-0.067 +.058-010SB 84 0.4 0.0 O 3* -5532 BD+29 2581 130917 835513171 W 144540.0+290148144958.4+283657 43.16 63.83 5.80 +0.05 +0.08 A4V +0.017+0.003 +001SB 175 4.9 111.2 -5533 38 BooBD+46 1993 130945 45226 144544.8+463158144918.7+460658 79.98 59.97 5.74 +0.48 0.00 F7IV w -0.002-0.076 -005V? 20 * -5534 BD+24 2786 130948 835533172 144547.4+241929145015.8+235443 32.76 63.06 5.85 +0.56 +0.02 G0-2V +0.143+0.034 +.069-002SB -5535 11 LibBD-01 2991 130952140176 I 144549.8-015257145101.0-021757352.08 48.82 4.94 +0.98 +0.72 +0.51 G8III-IV +0.084-0.123 +.016+083V < 17 -5536 BD+00 3253 130970140177 I 144552.8+000921145100.1-001526354.23 50.31 6.18 +1.40 +1.69 K3III -0.026+0.015 -020 -5537 BD+51 1957 131040 29296 9405 144617.5+514718144932.3+512229 88.43 57.10 6.51 +0.40 0.00 F5IV +0.012+0.008 -005SB 3.6 15.7AB 3* -5538 39 BooBD+49 2326 131041 45231 9406 144617.3+490754144941.3+484314 84.29 58.58 5.69 +0.47 F6V+F5V -0.076+0.096 +.009-032SB2O 0.5 2.9 * -5539 Zet CirCP-65 2918 131058252951 144614.1-653452145442.4-655929315.03-06.06 6.09 -0.06 -0.60 B3Vn -0.022-0.022 -018 -5540 CP-76 924 1311092572123175 R Aps 144628.8-761519145752.9-763946310.14-15.60 5.34 +1.45 +1.70 K4III: -0.074-0.015 +.008-031 * -5541 BD+37 2580 131111 64355 I 144632.7+374056145029.6+371619 62.48 62.99 5.48 +1.02 +0.84 +0.54 K0III-IV -0.211+0.094 +.026-067V < 17 * -5542 CD-3011780 131117206035 144635.5-300954145233.1-303437331.67 25.45 6.29 +0.60 +0.13 G1V -0.329-0.027 +.031-028V? * -5543 CD-37 9760 1311202060373173 144634.4-372330145251.1-374812327.93 19.11 5.03 -0.16 -0.72 B7IIIp -0.018-0.021 +006 95 * -5544 37Xi BooBD+19 2870 131156101250 I 9413 Xi Boo 144646.4+193057145123.3+190604 23.09 61.36 4.55 +0.76 +0.28 +0.43 G8Ve+K4Ve +0.137-0.098 +.156+003V? 3 2.1 7.2AB 4* -5545 Pi 2OctCP-82 636 131246258714 144720.9-823814150446.7-830218307.03-21.25 5.65 +1.30 +1.15 G8Ib -0.016-0.010 -021 -5546 CP-59 5753 1313422421113174 144751.7-594212145534.6-600651317.82-00.88 5.20 +1.16 +1.15 K2III -0.125-0.115 +.031-014 -5547 CP-76 931 131425257218 144826.6-764525150011.8-770937310.01-16.09 5.93 +1.05 +0.81 G8II -0.003+0.004 +002 -5548 12 LibCD-2411735 131430182983 I 144831.5-241400145420.1-243832335.49 30.35 5.30 +1.32 +1.54 K2III -0.010-0.027 +.041+009V? -5549 CD-3210457 131432206079 W 144831.3-325333145438.0-331802330.61 22.87 5.82 +1.42 K2III 0.000+0.002 -024 4.0 58.1AC 3* -5550 BD+16 2705 131473101273 9425 144841.9+160647145323.3+154216 17.22 59.51 6.40 +0.57 +0.12 F9V -0.022+0.009D+.021+021V? 0.5 1.5 * -5551 The CirCP-62 4337 131492252965 W The Cir 144840.5-622229145644.0-624651316.71-03.31 5.11 0.00 -0.77 +0.08 B4Vnpe v-0.011 0.000 +003V 199 0.0 0.1 * -5552 BD+59 1615 131507 29315 549I 144854.0+594201145126.4+591738 98.56 51.78 5.46 +1.36 +1.60 +0.70 K4III -0.122+0.139 +011V? -5553 BD+19 2881 131511101276 6847 144851.4+193319145323.7+190910 23.55 60.93 6.01 +0.83 +0.50 +0.45 K2V -0.452+0.216 +.087-029SBO * -5554 13Xi 1LibBD-11 3827 131530158887 144857.0-112925145422.9-115354344.34 40.88 5.80 +0.97 +0.72 +0.34E G7III -0.052-0.010 -024V? * -5555 CP-74 1281 131551257219 W 144908.5-743744145956.0-750157311.08-14.23 6.20 -0.04 -0.20 B9V -0.006-0.014 -003 6.7 30. -5556 CP-52 7634 1315622421203176 144909.9-522413145617.3-524835321.28 5.56 5.38 +0.13 A2III +0.026+0.005 +007SB 120 -5557 Ome OctCP-84 490 131596258717 144921.9-842339151108.3-844715306.17-22.82 5.91 -0.06 -0.13 B9.5V -0.008+0.009 -007V -5558 CD-3310169 1316252060991389 W 144936.3-332659145544.7-335121330.53 22.27 5.32 +0.04 A0V +0.020 0.000 +.007+000SB2 202 7.2 24.3 -5559 CD-47 9543 131657225306 W 144944.3-472824145632.0-475245323.63 9.90 5.64 -0.04 -0.27 -0.02C B9V -0.040-0.020 +015SB 0.8 2.2 * -5560 CD-50 8939 131705242128 145000.5-510231145701.4-512649322.01 6.71 6.64 +1.70 +2.04 +1.03E M2III -0.076-0.009 +024 -5561 CD-38 9785 131752206110 145013.8-390038145635.8-392458327.79 17.34 6.36 +0.06 A0-1V -0.026-0.024 -007 -5562 CD-3210480 131774206112 I 145025.2-321352145630.9-323812331.34 23.25 6.06 +1.41 K3III -0.008-0.028 +012V -5563 7Bet UMiBD+74 595 131873 8102 550I W 6846 145059.5+743351145042.3+740920112.65 40.50 2.08 +1.47 +1.78 +0.76 K4-III -0.031+0.012 +.039+017V < 17 9.2 209.1 * -5564 15Xi 2LibBD-10 3989 1319181589151390I 145120.4-110022145646.1-112435345.35 40.92 5.46 +1.49 +1.70 K4III +0.011+0.008 +015V -5565 CD-2811055 131919183030 I: 145115.5-284512145713.6-290928333.44 26.16 6.29 -0.04 -0.21 B9V -0.027-0.031 +008 -5566 CD-48 9494 1319232253283178 145116.6-482704145808.8-485147323.40 8.91 6.35 +0.71 +0.28 G3-5V -0.007-0.333 +.051+037 * -5567 BD+15 2796 131951101293 551 145129.9+145102145613.2+142647 15.69 58.32 5.77 -0.06 -0.08 A0V -0.013 0.000 -022V? 150 -5568 BD-20 4125 1319771830401391I 9446A 145137.4-205749145728.0-212456338.24 32.70 5.74 +1.11 +1.06 +0.56 K4V +1.045-1.729 +.173+020V 2.3 22.8AB 6* -5569 BD+32 2531 132029 64408 9442 145150.2+324215145558.7+321801 51.36 62.57 6.12 +0.10 +0.07 A2V -0.043+0.004 -012V 5.4 4.7 * -5570 16 LibBD-03 3696 1320521402403177 145157.6-035621145711.0-042047351.73 46.27 4.49 +0.32 +0.05 +0.17 F0V -0.094-0.150 +.047+022 117 -5571 Bet LupCD-42 9853 132058225335 552 145158.8-424352145831.9-430802326.25 13.91 2.68 -0.22 -0.87 -0.17 B2III/IV -0.035-0.039 +000SB 127 * -5572 CD-39 9402 132096206154 145212.9-393012145836.8-395424327.89 16.72 6.15 +1.23 +1.24 K2III -0.047-0.063 +024 -5573 BD+00 3277 1321321207581393I W 145225.5+001407145733.3-001003356.13 49.22 5.53 +1.13 +1.11 +0.55 K1III +0.062-0.026 +.034+020V? 2.9 86.3 * -5574 BD+22 2764 132145 835961392 145233.2+215731145703.6+213319 28.80 60.93 6.49 -0.01 +0.01 A1V -0.023-0.028 -011 =< 41 -5575 BD+16 2715 132146101299 145231.8+164727145711.7+162318 19.22 59.00 5.71 +0.94 gG5 +0.005+0.001 -016 -5576 Kap CenCD-41 9342 132200225344 553 W 6873 145239.2-414210145909.7-420615326.87 14.75 3.13 -0.20 -0.79 -0.16 B2IV -0.019-0.024 +008SB 28 8.1 3.9 * -5577 59 HyaCD-2710148 132219183058 9453 145244.0-271521145839.2-273926334.61 27.28 5.65 +0.24 +0.14 +0.14 A4V+A6V -0.042-0.010D+.008-010 0.3 0.4 * -5578 17 LibBD-10 3994 132230158935 145248.1-104511145813.4-110918345.93 40.90 6.60 +0.01 A1V -0.011-0.014 -017SB 71 -5579 CD-37 9836 1322382061673180 145254.9-372849145913.9-375253329.05 18.43 6.47 -0.08 B8V -0.017-0.020 +015V? * -5580 CD-42 9871 132242225351 145253.4-424533145927.1-430936326.39 13.81 6.10 +0.60 +0.30 +0.32C F5III -0.018-0.013 -010 * -5581 BD+50 2126 132254 452883179 145303.8+500215145623.0+493743 84.65 57.17 5.63 +0.50 0.00 F7V +0.115-0.223 +.027-015V? 6 -5582 18 LibBD-10 3999 132345158946 9456 145328.9-104431145853.6-110839346.11 40.80 5.87 +1.26 +1.44 +0.60 K3-IIICN1 -0.101-0.061 -012V 3.8 19.7AB 3* -5583 BD-04 3783 132375140256 9457 145340.0-043511145852.8-045921351.56 45.51 6.09 +0.50 +0.05 F8V -0.357-0.097 +.026-029 8 7.2 9.8 * -5584 BD+05 2954 132525120774 I 145423.5+045801145923.1+043404 2.14 52.07 5.93 +1.60 +1.90 M2III +0.005-0.008 -012 -5585 CD-37 9863 132604206208 145452.6-373937150113.0-380330329.31 18.08 5.89 +1.24 K2-3III +0.013-0.034 +041 -5586 19Del LibBD-07 3938 1327421402701394 W Del Lib 145537.7-080720150058.4-083108348.87 42.51 4.92 0.00 -0.10 +0.01 B9.5V -0.063-0.005 +.020-039SBO 77 6.4 106.3AC 4* -5587 CD-3310244 132763206223 145547.1-335745150158.1-342132331.45 21.19 6.22 +0.24 +0.13 +0.13 A8IV -0.025-0.020 -003 -5588 40 BooBD+39 2820 132772 644493182 145546.8+393942145936.9+391555 65.66 60.77 5.64 +0.31 +0.03 F0-2IV-III -0.032+0.042 +012 67 -5589 BD+66 878 132813 16558 554I RR UMi 145559.4+661951145735.0+655557104.87 46.53 4.60 +1.59 +1.59 +1.71 M4.5III -0.079+0.032 +.010+007SBO * -5590 BD-02 3928 1328331402763183I 6889 145608.0-022130150119.8-024518354.40 46.72 5.52 +1.68 +2.02 M0III +0.027-0.023 -015V -5591 60 HyaCD-2710183 1328511830993184 145608.6-273952150206.4-280338335.10 26.53 5.85 +0.16 +0.16 +0.08 A4IV +0.085-0.029 +008V -5592 BD+22 2772 132879 83616 145623.3+222629150052.4+220244 30.28 60.22 6.38R K0 +0.010+0.006 -026 -5593 Eta CirCP-63 3493 132905253005 145626.3-633820150448.2-640154316.91-04.84 5.17 +0.93 G8III +0.099+0.004 +.032+045 -5594 BD+00 3297 132933120798 I 9480 6890 145641.6+001518150148.9-000826357.28 48.48 5.71 +1.52 +1.56 M0.5IIb +0.009-0.024D+.002-034 1.1 0.5AB 3* -5595 CD-3210560 1329552062393186 W 145651.9-321456150259.3-323836332.60 22.54 5.44 -0.12 -0.61 B3V -0.015-0.021 +006 19 8.3 36.1 * -5596 BD+83 431 133002 24591644 145702.9+825522145020.4+823043118.49 33.56 5.64 +0.68 +0.17 F9V +0.176-0.222 +.016-043V -5597 BD+47 2192 133029 45326 9477 BX Boo 145714.0+474021150038.7+471640 80.19 57.71 6.37 -0.14 -0.27 B9pSiSrCr -0.009+0.024 -014V < 20 3.2 35.6 * -5598 CP-71 1729 133049257238 145712.1-713053150708.7-715419313.13-11.77 6.52 +1.59 +1.86 K4III +0.023-0.015 +009 -5599 BD-02 3933 133112140286 145733.1-023814150244.9-030153354.49 46.28 6.61 +0.20 +0.19 +0.13 A5m -0.039-0.020 -022 82 * -5600 41Ome BooBD+25 2861 133124 836243185I 145743.6+252412150206.5+250029 36.25 60.66 4.81 +1.50 +1.83 +0.79 K4-IIIabCa0.5 -0.007-0.051 +.025+014V? < 17 -5601110 VirBD+02 2905 1331651208093190I 145750.8+022902150254.0+020529 0.07 49.79 4.40 +1.04 +0.88 +0.54 K0.5IIIbFe-0.5 -0.054+0.016 +.025-016 < 17 -5602 42Bet BooBD+40 2840 133208 45337 555I 6898 145810.7+404706150156.8+402326 67.62 60.04 3.50 +0.97 +0.72 +0.44 G8IIIaBa0.3Fe-0.5 -0.041-0.028 +.037-020V? < 17 * -5603 20Sig LibCD-2411834 133216183139 556I Sig Lib 145812.9-245320150404.2-251655337.22 28.62 3.29 +1.70 +1.94 +1.29 M3-III e-0.073-0.043 +.064-004 * -5604 CD-40 9243 133220225422 GM Lup 145813.9-402809150442.9-405141328.45 15.32 6.41 +1.46 M6III -0.015-0.039 -030 * -5605 Pi LupCD-46 9773 133242225426 W 145818.4-463935150507.2-470304325.33 9.93 4.72H -0.14 -0.59 -0.11 B5V -0.020-0.019D+.009+005SB 161 0.1 1.8 * -5606 Pi LupCD-46 9773 133243225426 W 145818.4-463935150507.2-470304325.33 9.93 4.82H B5IV -0.019-0.019D+.009+005SB 0.1 1.8 * -5607 CD-40 9257 133340225435 W 145849.0-404037150519.1-410402328.44 15.08 5.15 +1.01 G8III +0.020-0.003 +.019-003 3.7 30. AC 3 -5608 BD+60 1582 133388 165743188 6899 145906.5+603550150127.1+601216 98.26 50.23 5.93 +0.09 +0.10 A4V -0.017+0.015 -009 -5609 BD+35 2642 133392 644763191 6908 145906.5+353550150306.1+351221 57.21 60.85 5.51 +1.02 +0.49 gG8 -0.038+0.012 -027 -5610 BD+06 2983 133408120822 9493A 145908.5+055304150406.4+052933 4.51 51.74 6.50 +0.31 +0.02 F0V -0.010-0.041D+.017-008 0.2 9.9 -5611 CP-64 3095 133456253024 6932 145922.6-645316150756.8-651632316.58-06.09 6.17 +1.47 +1.70 K3III +0.007-0.009 -004 -5612 BD+45 2251 133484 453483192 S 145934.5+450207150306.6+443840 75.33 58.43 6.65 +0.46 +0.04 F6IV -0.093+0.024 -020 20 0.2 -5613 BD+35 2644 133485 64484 145935.2+345727150336.5+343358 55.89 60.82 6.59 +1.02 G8III-IV -0.002-0.016 -025 -5614 CD-2510710 133529183163 145954.5-252401150547.7-254723337.27 27.98 6.67 -0.01 -0.38 B8V -0.002-0.020 -032 -5615 CD-3510035 133550206292 145956.9-355233150613.9-361551331.19 19.10 6.27 +1.65 K5III -0.017+0.008 -037 -5616 43Psi BooBD+27 2447 133582 83645 557I 150009.6+272015150426.7+265651 40.32 60.47 4.54 +1.24 +1.33 +0.65 K2III -0.174-0.006 +.018-026 < 17 -5617 CD-48 9630 133631225456 150028.2-484207150725.9-490518324.63 7.97 5.77 +0.92 G8III +0.014+0.017 -012V -5618 44 BooBD+48 2259 133640 45357 9494 i Boo 150029.4+480236150347.4+473916 80.36 57.06 4.76 +0.65 +0.11 F9-G1Vn -0.407+0.033 +.086-025SB2O=< 16 0.8 0.7 * -5619 CD-3011960 133652206300 150029.0-303148150633.3-305508334.30 23.60 5.96 -0.08 A0pSi v-0.016-0.038 +002 69 * -5620 BD-21 4030 133670183176 6931 150040.8-213834150627.1-220155339.86 30.99 6.17 +1.05 gK1 +0.063-0.058 +005 * -5621 CP-66 2725 1336832530313195 150036.2-664157150929.9-670503315.80-07.73 5.76 +0.69 +0.39 F6II -0.005-0.001 +009V -5622 21Nu LibBD-15 4026 1337741590283193I 150102.8-155209150637.6-161525344.00 35.62 5.20 +1.58 +1.92 +0.88 K5-III -0.033-0.022 +.020-015 -5623 CP-63 3518 133792253034 150104.8-631528150925.5-633834317.55-04.76 6.28 +0.06 A0pSrCrEu -0.015-0.018 +012 -5624 CD-40 9305 1338802254743194 HR Lup 150142.8-401152150812.1-403502329.18 15.22 5.79 -0.14 -0.40 B8IVSi -0.030-0.032 +003V * -5625 CD-4210050 133937225479 150202.8-422858150839.1-425204328.04 13.22 5.85 -0.11 -0.45 -0.13 B7V -0.027-0.018 +001SB 317 * -5626 Lam LupCD-44 9889 133955225483 W 150206.3-445342150850.6-451647326.80 11.13 4.05 -0.18 -0.68 -0.15 B3V -0.016-0.019D+.012+010SB 166 0.2 0.4 * -5627 47 BooBD+48 2262 133962 453701395 9500 6934 150207.1+483214150525.8+480904 80.95 56.60 5.57 0.00 -0.07 A1V -0.066+0.031 +.026-013 59 7.7 6.2 * -5628 CP-72 1714 133981257247 150216.1-722321151233.8-724613313.03-12.73 6.01 0.00 -0.24 B8-9III -0.024-0.007 -013 -5629 BD+66 887 133994 16587 150226.3+661829150357.8+655511104.18 46.09 6.13R A2V s +0.023-0.007 -005 -5630 BD+37 2608 134044 64503 150240.0+365026150635.1+362720 59.53 59.98 6.35 +0.52 +0.03 F8V -0.063+0.028 -005V? =< 6 -5631 BD+06 3001 1340471208523196 150242.6+055300150740.3+052953 5.39 51.04 6.16 +0.94 +0.71 K0III -0.003-0.017 +003SB -5632 CP-60 5656 134060253043 150242.8-610224151044.6-612521318.81-02.92 6.30 +0.63 +0.16 G2V -0.198-0.021 +038 -5633 BD+19 2924 134064101379 9505 150245.2+184941150720.4+182630 24.65 57.61 6.02 +0.06 +0.06 A3V +0.043-0.055D+.015-006SB 165 0.1 0.1 * -5634 45 BooBD+25 2873 134083 836711396 W 6945 150254.5+251531150718.1+245209 36.45 59.48 4.93 +0.43 -0.02 +0.21 F5V +0.185-0.165 +.064-007V 45 4.9 244.1AC 3* -5635 BD+55 1730 134190 294071397I 150325.3+545628150616.7+543323 90.43 53.21 5.25 +0.96 +0.64 +0.49 G7.5IIIFe-1 +0.048+0.015 +.029+016V? < 19: -5636 CD-3810020 134255206352 150342.4-382437151007.5-384733330.48 16.55 5.98 G8III -0.006-0.023 -035 -5637 CP-54 6367 1342702422873198 W 150348.5-545755151116.0-552046321.96 2.27 5.54 +1.14 +0.73 G2Ib-II -0.002-0.008 -004 6.7 11.2 * -5638 46 BooBD+26 2656 134320 83682 I 150404.7+264104150823.8+261804 39.31 59.50 5.67 +1.24 +1.26 +0.61 gK2 +0.005-0.014 +021SB -5639 BD+13 2901 134323101403 150409.6+133656150853.4+131406 16.44 55.04 6.10 +0.96 +0.62 dG6 -0.056+0.064 -049V? -5640 BD+25 2876 134335 83685 W 150414.1+252928150835.5+250631 37.03 59.24 5.81 +1.24 K1III -0.008-0.001 -016V? 4.1 57.5 -5641 CD-2510758 134373183237 150423.6-255705151018.6-261958337.87 26.96 5.76 +1.05 K0III -0.032-0.010 -033V? -5642 CD-44 9922 134444225517 W AB 150449.4-445354151134.9-451639327.22 10.88 6.44 +1.04 +0.85 K1III -0.009+0.014 -004 0.9 32.5AC 3* -5643 CD-44 9921 134443225516 W C 150446.1-445354151131.9-451646327.21 10.89 7.39 +1.08 +0.95 K0III +0.025-0.055 +021V 0.9 32.5AC 3* -5644 CP-69 2267 134453253062 I X TrA 150443.1-694208151419.1-700446314.60-10.52 5.81 +3.38 +6.69 C5,5 -0.001-0.006 -004 * -5645 CP-61 4856 134468253059 150452.6-612156151301.0-614438318.87-03.34 6.32 +1.90 K4Ib -0.010-0.008 -031V -5646 Kap1LupCD-48 9704 1344812255251398 W 150458.8-482127151156.1-484416325.46 7.89 3.87 -0.05 -0.13 -0.01 B9.5Vne -0.095-0.049 -006V 202 1.9 26.6 * -5647 Kap2LupCD-48 9705 134482225526 W 150500.4-482149151157.6-484437325.46 7.88 5.69 +0.14 +0.09 A3IV -0.103-0.040 +000 186 1.9 26.6 * -5648 BD+50 2146 134493 294203197 150509.1+502615150819.5+500318 83.57 55.29 6.39 +1.03 K0III -0.004-0.018 -029 -5649 Zet LupCD-51 8830 134505242304 558I W 150505.8-514307151217.1-520557323.76 4.98 3.41 +0.92 +0.66 G8III -0.112-0.073 +.043-010 3.6 71.9 * -5650 CD-47 9779 134597225533 150534.9-475024151231.3-481307325.81 8.29 6.33 +1.12 K2III -0.014-0.028 -043 -5651 CD-44 9932 134687225539 Var? 150606.4-440722151249.5-443002327.83 11.43 4.82 -0.17 -0.68 -0.16 B3IV -0.034-0.028 +014SB1O 16 * -5652 24Iot1LibBD-19 4047 134759159090 559 9532 6981 150631.1-192448151213.3-194730342.69 32.00 4.54 -0.08 -0.35 -0.09 A0pSi v-0.036-0.039 +.030-012SB2O 54 0.6 0.1AP 4* -5653 CD-3510119 134837206418 150649.1-354252151307.4-360529332.53 18.51 6.10 -0.08 B8V -0.043-0.021 -003 -5654 BD+19 2935 1349431014293199I W FL Ser 150731.2+192108151204.3+185833 26.32 56.76 5.89 +1.53 M4IIIab -0.017+0.005 +.006-035 1.9 0.5 * -5655 CD-2312133 134946183269 D 150726.6-233756151317.5-240030340.01 28.47 6.47 -0.04 -0.41 B9 -0.011-0.020 +003 0.0 0.0 * -5656 25Iot2LibBD-19 4055 134967159105 150737.3-191616151319.2-193851343.03 31.96 6.08 +0.12 A3Vn -0.051-0.037 -004SB -5657 23 LibCD-2411928 134987183275 150737.9-245556151328.7-251833339.19 27.38 6.45 +0.70 G4V -0.398-0.071 +.034+003V? -5658 CD-2510801 135051183285 9538 150757.7-254908151353.3-261137338.69 26.61 5.84 +1.14 gG5 -0.015 0.000 -028V? 4.5 1.8 -5659 BD+19 2939 135101101437 9535A 150815.2+193911151243.5+191709 26.94 56.71 6.68 +0.68 +0.25 +0.33 G5V -0.590+0.290 +.024-037V? 0.8 23.7 * -5660 1 LupCD-3111813 1351532064451399 150829.6-310845151437.3-313109335.50 22.15 4.91 +0.37 +0.28 +0.31 F1II -0.005+0.001 +.014-023 0 -5661 CP-60 5698 135160253082 W 150831.8-603156151636.4-605414319.68-02.84 5.73 -0.08 -0.89 B0.5Ve v-0.026 0.000 +006 196 2.9 1.2AB 3* -5662 26 LibBD-17 4285 135230159122 150855.0-172342151433.7-174607344.68 33.26 6.17 -0.05 -0.26 B9.5III -0.022-0.014 -026V? -5663 CD-47 9824 135235225590 W 150856.1-474205151553.8-480427326.37 8.11 5.95 +0.21 +0.11 A3m +0.018-0.032 -009 4.2 13.3 -5664 Del CirCP-60 5701 135240253084 W 6998 150851.4-603510151656.7-605727319.69-02.91 5.09 -0.06 -0.92 O8.5V -0.019-0.009 +009SBO 189 8.3 50. * -5665 BD+23 2789 135263 837233201 150906.5+232116151331.9+225900 33.56 57.66 6.30 +0.06 +0.06 A2V +0.049+0.093 -005 -5666 Eps CirCP-63 3544 1352912530883205 150911.8-631426151738.9-633638318.35-05.20 4.86 +1.25 +1.32 +0.27E K2.5III +0.001+0.008 +.004-005 -5667 CD-41 9682 135345225600 I 150929.1-410711151604.0-412928329.98 13.66 5.16 +0.58 +0.10? G5Ia+B -0.005-0.006 -.003-027 * -5668 CD-43 9749 135348225602 150929.2-430649151610.5-432905328.90 11.97 6.04 -0.14 -0.63 B3IV -0.007+0.003 -021 -5669 BD-04 3840 135367140408 I 150934.1-050750151450.7-053010355.07 42.40 6.28 +1.47 +1.81 K2 -0.018+0.005 -027 -5670 Bet CirCP-58 5875 135379242384 561 150940.9-582540151730.8-584804320.89-01.12 4.07 +0.09 +0.09 A3V -0.100-0.137 +.053+010 59 -5671 Gam TrACP-68 2383 135382253097 560 7008 150934.1-681836151854.6-684046315.71-09.55 2.89 0.00 -0.02 A1V -0.072-0.031 +.010-003V 214 -5672 BD+68 823 135384 16630 150940.4+680926151044.1+674653105.37 44.30 6.17R A8Vn +0.001 0.000 -008V 200 -5673 BD+38 2629 135402 645723202 150947.0+383820151335.6+381553 62.59 58.32 6.20 +1.20 gK2 -0.010-0.047 -062V? -5674 BD+32 2561 135438 64574 I W 151000.3+320940151406.1+314717 50.19 58.74 5.99 +1.52 K5 +0.043-0.018 +004 1.5 122.1 -5675 3 SerBD+05 2985 135482120916 562I 151013.0+051838151511.4+045622 6.46 49.21 5.33 +1.09 +0.91 +0.58 K0III -0.018+0.005 +.021-034 -5676 48Chi BooBD+29 2640 135502 837293204 151018.2+293207151429.2+290951 45.16 58.52 5.26 +0.03 +0.08 A2V -0.066+0.030 +.026-016V? 101 -5677 BD+42 2577 135530 45445 I 151033.4+423238151410.3+421017 69.70 57.34 6.13 +1.66 +1.93 +0.92E M2IIIa +0.019-0.014 -007V? -5678 BD-21 4065 1355341833283206I 151035.0-220146151623.0-222358341.76 29.34 5.50 +1.38 +1.48 K5III -0.034+0.003 -005V -5679 4 SerBD+00 3327 135559120920 151043.4+004432151549.1+002220 1.32 46.23 5.63 +0.18 +0.09 A4V -0.107+0.015 +.020-012V 117 -5680 CP-60 5720 135591253101 W 151045.7-600743151848.9-602947320.13-02.64 5.46 -0.10 -0.90? O7.5III((f)) -0.027-0.002 -003V 121 5.5 44.5AC 3* -5681 49Del BooBD+33 2561 135722 64589 563I 9559A 7002 151128.2+334116151530.2+331853 53.12 58.43 3.47 +0.95 +0.66 +0.51 G8IIIFe-1 +0.086-0.112 +.030-012SB < 19: 4.4 104.9 * -5682 CD-40 9481 135730225631 151134.8-404137151809.4-410339330.56 13.81 6.28 +0.18 +0.14 +0.08 Am +0.028+0.007 -006V -5683 Mu LupCD-47 9860 135734225638 W AB 151134.4-473025151832.0-475230326.86 8.05 4.27 -0.08 -0.37 -0.04 B8Ve -0.026-0.038D+.013+015 308: 0.1 1.3AB 3* -5684 CP-67 2836 135737253115 W 151132.1-670657152040.7-672853316.51-08.63 6.28 -0.09 -0.61 B3V -0.003-0.008 -004V 1.9 0.8 * -5685 27Bet LibBD-08 3935 135742140430 564I 7009 151137.4-090050151700.4-092259352.02 39.23 2.61 -0.11 -0.36 -0.10 B8V -0.096-0.019 -.003-035SB 230 * -5686 2 LupCD-2911630 1357581833463207I 7012 151144.6-294651151749.9-300856336.96 22.88 4.34 +1.10 +1.07 +0.56 G9IIIaFe1 -0.008-0.010 +.018-004V? * -5687 CD-40 9496 135876225647 GG Lup 151222.8-402518151856.4-404718330.85 13.95 5.59 -0.10 -0.46 B7V -0.014-0.024 +011SB2 150 * -5688 CD-3012117 135896206509 W 151233.4-305035151841.3-311234336.46 21.91 6.18 +1.23 G6-8III -0.006-0.008 -024 7.9 21.5 -5689 CD-3610062 136014206523 151309.1-364342151931.6-370548333.07 16.96 6.20 +0.96 +0.64 G6III-IV -0.092-0.124 +011 -5690 BD+00 3337 136028140444 I 151318.3-000545151826.2-002741 1.02 45.19 5.89 +1.51 +1.82 K5III +0.006-0.007 -013V? -5691 BD+67 876 136064 16660 565 151329.3+674335151438.3+672048104.58 44.33 5.13 +0.53 +0.08 F9IV +0.221-0.390 +.046-047 =< 6 -5692 BD+21 2755 136138 837551400 151355.4+205618151824.5+203422 29.93 55.89 5.70 +0.97 G8IIIaBa0.3 -0.012-0.020 -008V? -5693 BD+69 789 136174 16662 151407.0+691849151451.9+685643106.15 43.21 6.51R A1Vn +0.024-0.009 -011 151 -5694 5 SerBD+02 2944 136202120946 9584 MQ Ser 151412.4+020837151918.8+014555 3.68 46.46 5.06 +0.54 +0.06 +0.27 F8III-IV +0.374-0.514 +.037+054V 2 4.6 11.2AB 4* -5695 Del LupCD-40 9538 1362982256911402 Del Lup 151448.3-401707152122.3-403851331.32 13.82 3.22 -0.22 -0.89 -0.22 B1.5IV -0.015-0.026 +000V? 221 * -5696 CD-40 9539 136334225695 151500.9-402316152135.3-404459331.30 13.71 6.20 +0.07 A1V -0.010-0.032 -004 -5697 CD-3710171 136347206543 W 151503.2-375125152130.1-381309332.75 15.81 6.48 -0.06 -0.30 A0pSi -0.013-0.041 +007 2.6 5.7 * -5698 Nu 1LupCD-47 9922 1363512257033211 151510.1-473349152208.3-475540327.34 7.67 5.00 +0.50 +0.04? F8V -0.140-0.137 +.032-011 0 -5699 Nu 2LupCD-47 9919 136352225697 151503.4-475657152148.2-481904327.10 7.37 5.65 +0.65 +0.05 +0.22E G3-5V -1.617-0.277 +.066-069 -5700 CP-60 5760 136359253136 151504.0-601749152310.4-603925320.49-03.07 5.67 +0.48 0.00 F7V -0.090-0.020 +006 -5701 28 LibBD-17 4312 136366159187 151513.3-174743152053.7-180931345.78 32.01 6.17 +1.02 +0.73 +0.37E G8III -0.011-0.061 +003V? * -5702 BD+33 2574 136403 64630 151528.0+325238151930.2+323055 51.58 57.60 6.32 +0.24 +0.09 +0.08 A2m -0.015+0.016 -025SBO 18 * -5703 29Omi LibBD-15 4083 136407159191 W 151525.8-151116152101.4-153254347.81 33.98 6.30 +0.41 +0.05 F0III +0.024+0.026 +005V 82 2.2 44.4 -5704 Gam CirCP-58 5908 136415242463 W 151524.5-585738152322.7-591915321.25-01.96 4.51 +0.19 -0.35 B5IV+F8 -0.016-0.038D+.010-017 278 0.3 0.9 * -5705 Phi1LupCD-3510236 136422206552 566I W 151527.5-355355152148.4-361541333.96 17.39 3.56 +1.54 +1.88 +0.87 K5III e-0.089-0.084 +.014-029 10.9 17.3AC 3* -5706 BD-01 3047 136442140473 151537.4-020250152047.1-022448359.53 43.45 6.35 +1.06 +1.07 K0V -0.253-0.177 +.033-047V? -5707 BD-05 4057 1364791404743209 W 151550.5-052750152107.6-054929356.23 41.06 5.54 +1.04 +1.00 K1III -0.050-0.008 -033V 7.1 12.2 -5708 Eps LupCD-4410066 136504225712 W Var? 151553.3-441947152240.9-444122329.23 10.32 3.37 -0.18 -0.75 -0.16 B2IV-V -0.019-0.013D+.009+008SB2O 133 1.5 0.4AB 3* -5709 1Omi CrBBD+30 2647 136512 83768 W 7032 151600.2+295844152008.5+293658 46.21 57.33 5.51 +1.02 +0.77 +0.53 K0III -0.120-0.047 +.001-053V? 3.9 147.3 -5710 6 SerBD+01 3067 136514120955 I 9596 7037 151556.4+010444152102.0+004255 2.90 45.45 5.35 +1.19 +1.22 +0.60 K3III -0.042-0.106 +.007+009V < 17 4.0 3.1 * -5711 BD+25 2902 136643 83778 151647.5+251906152106.9+245728 37.83 56.43 6.39 +1.23 K0 -0.026-0.026 -002 -5712 Phi2LupCD-3610103 1366642065801403 151645.8-363000152309.4-365131333.84 16.75 4.54 -0.15 -0.63 -0.14 B4V -0.018-0.023 +002 194 * -5713 CP-67 2864 136672253155 W 7058 151648.6-675715152614.7-681833316.49-09.61 5.89 +1.02 +0.77 G8-K0III +0.121+0.011 +025 6.0 50. -5714 11 UMiBD+72 678 136726 8207 I 151710.2+721112151705.9+714926108.72 41.04 5.02 +1.37 +1.60 K4III +0.007+0.011 +.015-016 < 17 * -5715 BD+52 1869 136729 294873210 S 151708.6+521907152005.2+515731 84.96 52.77 5.66 +0.11 +0.11 A4V +0.014+0.012 +008V 181 0.2 -5716 BD+44 2453 136751 45497 151714.5+444749152041.6+442603 73.01 55.55 6.19 +0.39 +0.04 F3-4IV s +0.027-0.106 -000 * -5717 7 SerBD+13 2928 1368311015083213 151739.0+125532152223.2+123403 18.09 51.83 6.28 -0.02 -0.03 A0V -0.004-0.004 +004V? 72 -5718 50 BooBD+33 2581 136849 64656 151748.3+331730152148.6+325602 52.36 57.12 5.37 -0.07 -0.21 B9Vn -0.051+0.017 +.005-007SB 260 -5719 Ups LupCD-39 9827 136933206597 W 151812.9-392113152444.9-394237332.42 14.23 5.37 -0.11 A0pSi v-0.037-0.047 +.008-008 0 5.5 1.4 * -5720 BD-11 3940 1369561592273214 151822.9-120045152352.2-122210351.02 35.90 5.72 +1.04 gG6 -0.038-0.039 -026V? * -5721 8 SerBD-00 2961 1370061405021406 151834.3-003957152343.7-010121 1.64 43.82 6.12 +0.25 +0.07 +0.12 F0V +0.076-0.030 -002V 105 * -5722 CD-3710225 137015206607 W 151838.7-374852152506.6-381010333.39 15.45 7.03 +0.09 A2V -0.010-0.029 +003 0.0 0.2 -5723 31Eps LibBD-09 4138 137052159234 151846.5-095746152411.9-101920352.84 37.34 4.94 +0.44 +0.02 F5IV -0.067-0.154 +.035-010SB1O 0 * -5724 CD-3810289 137058206616 W 151851.0-382245152520.2-384401333.09 14.96 4.60 0.00 -0.06 A0IV -0.052-0.016 +.012-003 231 4.0 92.4AxBC 5 -5725 CP-64 3178 1370662531743217 151850.2-641044152733.1-643153318.75-06.57 5.71 +1.64 +1.98 K5-M0III -0.015-0.019 -009 -5726 BD+40 2877 137071 64667 I 151855.4+395618152237.4+393453 64.43 56.36 5.50 +1.59 gK4 +0.002-0.015 -012 -5727 2Eta CrBBD+30 2653 137107 64673 9617A 7054 151904.3+303856152312.3+301716 47.54 56.73 5.58H +0.58 +0.04 +0.28 G0V +0.138-0.187 +.061-007SBO 3 0.3 0.5AB 4* -5728 2Eta CrBBD+30 2653 137108 9617B 7054 151904.3+303856152312.3+301716 47.54 56.73 6.08H G3V +0.137-0.187 +.061-007 0.3 0.5AB 4* -5729 Rho OctCP-84 510 1373332587311666 152012.0-840755154316.8-842755307.02-23.02 5.57 +0.11 +0.08 A2V +0.131+0.097 -011 123 -5730 Kap1ApsCP-72 1802 137387257289 567 W Kap1 Aps 152036.6-730233153130.8-732322313.85-14.01 5.49 -0.12 -0.77 -0.02 B3IVe v-0.006-0.013 +062V 300v 6.9 27.0 * -5731 BD+62 1410 137389 16712 Var? 152045.3+622410152237.3+620250 97.98 47.09 5.98 -0.03 -0.10 A0pSi +0.010-0.034 -024 * -5732 BD+45 2284 137390 455213216 152042.7+453728152405.1+451616 74.08 54.73 6.01 +1.20 +1.23 K2III -0.014+0.008 -010 -5733 51Mu 1BooBD+37 2636 137391 64686 568 9626A 7063 152042.7+374340152429.4+372238 60.39 56.31 4.31 +0.31 +0.07 +0.15 F2IVa -0.146+0.087 +.039-013SB 84 2.2 108.9AxBC 3* -5734 51Mu 2BooBD+37 2637 137392 64687 9626BC 152044.1+374153152430.9+372052 60.34 56.31 6.50 +0.59 +0.13 G1V -0.144+0.094 +.039-009V? =< 25 2.2 108.9AxBC 3* -5735 13Gam UMiBD+72 679 137422 8220 569I Gam UMi 152052.9+721123152043.7+715002108.46 40.84 3.05 +0.05 +0.12 +0.06 A3II-III v-0.019+0.020 +.003-004V 171 * -5736 CD-3610161 137432206660 W 152053.7-362500152718.2-364604334.60 16.34 5.45 -0.15 -0.59 -0.17 B4Vp -0.012-0.035 +004V 134 7.0 30. AC 3* -5737 BD+63 1192 137443 167133215I 152058.1+634154152238.4+632029 99.48 46.30 5.79 +1.27 gK4 -0.013-0.091 +.005-046V? -5738 CD-51 9132 137465242569 W 152109.3-511456152827.2-513551326.14 4.06 6.10 +1.09 +0.76 G2II -0.007+0.005 -016 6.3 13.3 -5739 9Tau1SerBD+15 2858 137471101545 570I 7074 152109.0+154647152547.4+152541 22.86 52.36 5.17 +1.66 +1.95 +1.04 M1III -0.013-0.007 +.013-020V? -5740 BD+19 2966 137510101548 152123.3+194955152553.3+192851 29.13 53.87 6.27 +0.60 +0.20 G0IV-V -0.057-0.006 -003 =< 10 * -5741 BD+34 2645 137704 647013218I 152222.4+344103152617.4+342009 54.89 56.16 5.46 +1.40 +1.64 +0.77 K4III -0.114+0.056 -048 * -5742 CD-4610100 1377092258253220 152226.5-462309152924.3-464358329.05 7.97 5.24 +1.74 K4III -0.010-0.006 +.005-028 -5743 32Zet1LibBD-16 4089 1377441592801407I 152236.9-162204152815.4-164259348.46 31.96 5.64 +1.55 +1.84 K5III +0.017-0.032 -021V? * -5744 12Iot DraBD+59 1654 137759 29520 571I W 7077 152242.2+591859152455.8+585758 93.97 48.63 3.29 +1.16 +1.22 +0.60 K2III -0.009+0.017 +.040-011 < 17 5.7 254.6 * -5745 BD+25 2916 137853 838303219I 152320.7+252659152738.9+250606 38.63 55.02 6.02 +1.62 gM1 +0.007-0.014 -007 -5746 10 SerBD+02 2965 1378981210203221 152335.1+021122152838.2+015032 5.82 44.67 5.17 +0.23 +0.10 A8IV -0.083-0.029 +.031-010SB 129 -5747 3Bet CrBBD+29 2670 137909 83831 572 W Bet CrB 152342.3+292701152749.7+290621 45.59 55.61 3.68 +0.28 +0.11 +0.05 F0p v-0.179+0.086 +.032-019SBO 19 1.5 0.3 * -5748 BD+54 1747 137928 29527 152349.1+542207152632.5+540112 87.20 50.95 6.45 +0.05 A2IV +0.048-0.019 -005 -5749 BD-20 4246 138105183533 7114 152449.3-202304153036.3-204342345.90 28.57 6.22 +0.17 +0.08 +0.06 A5m +0.014-0.019 -011 30 -5750 34Zet3LibBD-16 4099 138137159307 152501.8-161559153040.4-163634349.05 31.66 5.82 +1.06 gG6 +0.018+0.001 -002V? -5751 CD-3810425 138204206736 152533.4-381646153204.4-383723334.26 14.29 6.25 +0.20 A7V -0.026-0.089 -001 -5752 BD+47 2227 138213 45562 152531.3+473245152844.5+471205 76.76 53.35 6.15 +0.10 +0.12 +0.04 AmA3-F0V: -0.015-0.002 -016SBO 30 * -5753 CD-3210868 1382212067343223 152535.1-323221153150.3-325252337.81 18.91 6.46 +0.09 B7V -0.012-0.024 +005V? -5754 BD+62 1414 138245 16740 152554.0+623717152740.8+621632 97.74 46.48 6.50 +0.14 +0.04 A5IV +0.033-0.024 -005V -5755 BD+61 1509 138265 16741 I 152552.3+610055152751.4+604013 95.79 47.38 5.90 +1.44 +1.64 K5III -0.019-0.002 -047SB -5756 BD-19 4128 138268159317 9681A 152558.1-194922153143.4-200953346.54 28.82 6.22 +0.22 +0.14 A8V -0.075-0.028 -040SB 225 0.0 0.0 O 4* -5757 CP-77 1134 1382892573033228 152600.9-773450153918.3-775505311.39-17.90 6.18 +1.20 +1.36 K2IIICN0.5Ba-1 -0.085-0.123 +013 -5758 BD+09 3055 1382901210381408 152604.0+085516153055.4+083445 14.34 48.02 6.57 +0.37 -0.03 F4V w +0.034-0.003 -001 23 -5759 BD+55 1756 138338 295403222 152621.8+553215152856.8+551142 88.57 50.09 6.43 +0.08 +0.09 +0.02 A3m -0.007+0.036 -007 40 -5760 BD+31 2742 138341 64736 152620.0+313743153022.7+311710 49.50 55.25 6.46 +0.19 +0.14 +0.11 A4IV -0.024-0.012 -004 -5761 BD+37 2651 138383 64741 152640.4+370843153027.9+364815 59.18 55.18 6.37R K0 -0.059+0.023 +002 -5762 BD-19 4135 1384131593303224 152651.9-191948153236.7-194014347.09 29.06 5.52 +0.18 +0.20 +0.09 A2m -0.021-0.035 +.018-033V? 27 -5763 52Nu 1BooBD+41 2609 138481 45580 573I 152720.2+411026153055.8+404959 66.11 54.58 5.02 +1.59 +1.90 +0.93 K4.5IIIbBa0.4 +0.011-0.007 +.020-010 < 17 * -5764 35Zet4LibBD-16 4110 138485159335 7126 152716.1-163049153255.2-165110349.32 31.11 5.50 -0.14 -0.75 -0.17 B2Vn -0.011-0.014 +009SB 256 2.0 0.0 * -5765 CD-2412155 138488183565 9689A 152714.3-240904153309.1-242922343.69 25.31 7.00 +0.27 +0.04 A3+F0V: -0.003-0.038 -008 0.1 9.3AxBC 3* -5766 CP-65 3100 138498253222 W 152718.0-651634153617.4-653648318.88-07.98 6.51 +0.35 +0.03 F3IV-V -0.092-0.063 -008 7.0 5.3 -5767 CD-39 9970 138505206763 152725.8-394340153401.6-400358333.69 12.90 5.82 +1.68 +1.93 +1.02E M2III -0.055-0.025 -040V? * -5768 BD+62 1416 138524 16746 152734.8+622630152921.2+620559 97.36 46.42 6.38R K5 -0.024-0.001 -040 -5769 BD+37 2653 138525 64754 152734.0+365726153122.4+363659 58.83 55.02 6.38 +0.50 F6III +0.006-0.031 -050 =< 10 -5770 12Tau2SerBD+16 2797 138527101600 152733.1+162343153209.7+160322 24.80 51.22 6.22 -0.05 -0.23 B9V +0.001+0.009 -018V 175 -5771 Eps TrACP-65 3102 138538253226 574 W 152733.9-655850153643.2-661901318.49-08.57 4.11 +1.17 +1.16 +0.40E K1-2III +0.023-0.055 +.038-016V? 5.4 83.2 * -5772 11 SerBD-00 2982 1385621405963226 152748.8-005049153257.9-011111 3.49 41.94 5.51 +1.09 +1.02 K0III -0.017-0.042 -016 -5773 CD-3810464 138564206769 152747.0-390040153420.9-392058334.18 13.44 6.36 -0.03 -0.11 B9V -0.028-0.047 +000 * -5774 53Nu 2BooBD+41 2611 138629 45590 9688 152812.1+411419153147.0+405358 66.17 54.41 5.02 +0.07 +0.11 +0.04 A5V -0.017-0.009 +.020-017V? 182 0.0 0.1AB 3* -5775 36 LibCD-2710443 138688183580 I 152833.4-274236153437.3-280249341.50 22.35 5.15 +1.30 +1.16 K4III +0.014-0.033 +.011+012SB -5776 Gam LupCD-40 9760 138690225938 W 152828.5-404950153508.5-411001333.19 11.89 2.78 -0.20 -0.82 -0.24 B2IV e-0.015-0.028D+.008+002V 266 0.1 0.6 * -5777 37 LibBD-09 4171 1387161406091409I 152842.6-094318153410.7-100352355.24 35.79 4.62 +1.01 +0.86 +0.52 K1III-IV +0.309-0.234 +.027+048 < 19: * -5778 4The CrBBD+31 2750 138749 64769 576 W 7134/5 152853.8+314148153255.8+312133 49.69 54.71 4.14 -0.13 -0.54 -0.11 B6Vnne -0.019-0.011 +.027-025V 393 1.4 0.5 * -5779 BD-05 4100 1387631406133227 152903.7-052134153420.8-054142359.28 38.75 6.51 +0.58 +0.04 F7V -0.095+0.011 -038V -5780 BD-08 4010 138764140614 152902.4-085049153426.6-091100356.08 36.36 5.17 -0.09 -0.45 -0.12 B6IV -0.016-0.023 -002SB? 24 * -5781 CD-4410239 138769225950 W Var? 152859.9-443724153553.2-445731331.02 8.76 4.54 -0.18 -0.69 -0.22 B3IVp -0.025-0.030D+.014+007SB 101 1.9 2.4 * -5782 Kap2ApsCP-73 1625 138800257307 W 152915.6-730659154021.2-732648314.34-14.44 5.65 -0.04 -0.38 B7III-IV -0.021-0.024 -019 6.7 15. AB 3* -5783 BD+17 2880 138803101618 152918.8+172829153352.8+170816 26.64 51.26 6.45R F3III -0.042-0.038 -021 67 -5784 CD-4310036 1388162259571410 152920.9-440342153612.1-442349331.40 9.18 5.43 +1.50 +1.82 K4-5III -0.045-0.057 +.017-019 -5785 BD+64 1074 138852 167543225 152931.3+643242153055.7+641231 99.67 45.05 5.79 +0.96 K0III-IV -0.117+0.081 +.002+010V? * -5786 CP-75 1222 1388672573103235 152936.9-754511154154.6-760455312.72-16.56 5.95 -0.04 -0.16 B9V -0.018-0.041 +000 -5787 38Gam LibBD-14 4237 138905159370 577I 9704 152955.8-142722153531.6-144722351.51 32.20 3.91 +1.01 +0.74 +0.55 G8.5III +0.065+0.009 +.041-028V < 17 0.2 0.1AP 3* -5788 13Del SerBD+11 2821 138917101623 9701B 153001.4+105219153448.1+103215 17.59 48.19 3.80 +0.26 +0.13 F0IV -0.074-0.005 +.021-038V? 70 1.1 3.9AB 4* -5789 13Del SerBD+11 2821 138918101624 9701A Del Ser 153001.4+105223153448.1+103221 17.59 48.19 3.80 +0.26 +0.12 +0.11 F0IV -0.074+0.012 +.021-042V 80 1.1 3.9AB 4* -5790 CD-3210930 138923206795 W 7149 152954.8-324533153611.4-330534338.43 18.19 6.24 B8V -0.016-0.017 -004 0.0 0.1 -5791 BD+02 2977 138936121071 153001.2+020014153504.6+014008 6.98 43.28 6.56 +0.28 +0.05 F0III -0.074-0.035 -020 71 -5792 CP-69 2422 1389652573083233 153007.7-695350154011.5-701340316.36-11.89 6.44 +0.08 +0.08 A1V -0.049-0.060 -002 -5793 5Alp CrBBD+27 2512 139006 83893 578I Alp CrB 153027.2+270304153441.3+264253 41.87 53.77 2.23 -0.02 -0.02 -0.04 A0V+G5V +0.121-0.089 +.045+002SBO 133 * -5794 39Ups LibCD-2710464 139063183619 579I 9705 153057.1-274814153701.5-280806341.89 21.94 3.58 +1.38 +1.58 +0.71 K3III e-0.009+0.003 +.044-025 7.0 3.5 * -5795 15Tau3SerBD+18 3044 1390741016313230 153100.8+175919153533.2+173920 27.65 51.08 6.12 +0.94 gG8 -0.079-0.014 -022V -5796 BD+11 2826 1390871016343231 153107.8+113553153553.4+111556 18.74 48.30 6.07 +1.09 gK0 -0.030-0.012 -026V -5797 Ome LupCD-4210601 1391272260043232 W 153118.8-421421153803.2-423403332.78 10.44 4.33 +1.42 +1.72 +0.73 K4.5III -0.153+0.057 +.017-007SB 6.7 11.8 * -5798 CD-51 9324 1391292427931411 W 153123.4-520234153849.5-522222326.99 2.50 5.44 0.00 0.00 A0V -0.036-0.035 +.015-012 0 4.5 53.4AB 3 -5799 14 SerBD-00 2988 139137140643 153125.7-001347153633.7-003342 4.89 41.63 6.51 +0.72 +0.45 G8III+A -0.027-0.022 -023SB -5800 6Mu CrBBD+39 2889 139153 64790 I 153134.7+392032153515.0+390036 62.81 54.03 5.11 +1.64 +2.01 M1.5III-IIIb +0.029+0.006 +.003-019V? -5801 CD-2511000 139160183631 153128.4-255656153728.5-261648343.25 23.31 6.19 +0.01 -0.42 B7IV -0.010-0.023 +001V 152 * -5802 16 SerBD+10 2884 139195101640 153141.2+102041153629.6+100036 17.21 47.57 5.26 +0.95 +0.67 +0.45 K0III:CN1Ba0.7Sr2 +0.045-0.129 +.030+008V < 17 -5803 CP-59 6206 1392112428033236 153145.4-593429153956.5-595430322.63-03.64 5.95 +0.48 F6V -0.122-0.220 +.029-022 -5804 18Tau5SerBD+16 2807 139225101642 153152.7+162700153629.3+160708 25.54 50.29 5.93 +0.29 +0.04 F3V +0.076-0.007 -002V * -5805 CD-3810532 1392332068263234 153158.1-384952153832.7-390939334.96 13.10 6.57 -0.07 -0.19 B9V -0.013-0.032 +005 * -5806 BD-22 3989 139254183637 153155.2-224836153748.1-230830345.55 25.65 5.78 +1.10 +0.89 K0III -0.022-0.080 +007V? * -5807 CD-3810536 139271206827 W 153207.4-384757153842.3-390741335.01 13.11 6.04 +0.21 A3-5mA3-F2 +0.023-0.008 +014 8.0 10.9 * -5808 BD+38 2678 139284 64797 153207.2+384219153549.3+382226 61.71 53.99 6.42R K2 +0.029-0.006 +003 -5809 CD-2710478 139290183641 153210.8-275238153815.7-281224342.06 21.72 6.32 +1.17 K1III +0.003-0.026 +029V -5810 BD-20 4285 139329183646 153227.3-204109153816.3-210058347.21 27.17 5.84 +1.08 gG9 +0.068-0.060 +032V? -5811 BD+54 1756 139357 29583 153237.3+541512153516.3+535519 86.16 49.85 5.97 +1.18 gK4 -0.011-0.004 -010 -5812 40Tau LibCD-2911837 139365183649 153230.7-292656153839.4-294640341.06 20.45 3.66 -0.17 -0.70 -0.19 B2.5V -0.015-0.030 +003SB 149 * -5813 BD+30 2682 139389 64808 153247.9+301920153653.4+295928 47.47 53.75 6.52 F5V: +0.087-0.060 -013 23 -5814 41 LibBD-18 4118 139446159411 7169 153309.0-185821153854.5-191807348.63 28.35 5.38 +0.86 +0.54 +0.46 G8III v+0.085-0.076 +047 -5815 BD-08 4031 139460140671 9728B 153316.0-082800153840.0-084740357.31 35.87 6.50 +0.53 -0.02 F6IV-V +0.022-0.014D+.011+004V? =< 25 0.2 11.9 * -5816 BD-08 4032 139461140672 9728A 153316.1-082748153840.1-084728357.32 35.87 6.48 +0.52 -0.02 F6V +0.028-0.018D+.011+000SB =< 25 0.2 11.9 * -5817 BD+52 1886 139478 29589 153315.9+522351153604.1+520411 83.44 50.49 6.74 +0.32 +0.04 F4IIIp -0.022+0.082 -016 -5818 BD+55 1766 139493 29588 S 7163 153322.7+545738153557.1+543750 87.08 49.45 5.74R A2V -0.035-0.010 -019 0.5 -5819 BD-22 3996 139518183665 153328.2-224923153921.3-230901345.84 25.41 6.34 +0.02 A0V -0.036-0.029 -009 -5820 3Psi1LupCD-3310631 1395212068433237 153324.8-340508153946.0-342443338.19 16.69 4.67 +0.99 +0.73 +0.49 G8III +0.004-0.015 +.032-023 -5821 CD-4710210 139599226059 W 153352.4-472437154058.3-474408330.05 6.01 6.23 +1.63 +1.98 K5-M0III -0.027-0.025 -054 5.9 18.1 -5822 CD-3012431 139613206858 153403.1-305316154015.4-311249340.38 19.12 6.34 +1.43 +1.65 K2III -0.061-0.020 -022 -5823 54Phi BooBD+40 2907 139641 45643 580 153414.0+404044153749.6+402112 64.95 53.37 5.24 +0.88 +0.53 +0.47 G7III-IVFe-2 +0.063+0.062 +.021-010V? < 19: * -5824 42 LibCD-2312458 1396631836863239I 153422.0-232935154016.9-234905345.53 24.77 4.96 +1.33 +1.51 +0.68 K3IIICN1 -0.013-0.012 +.049-022V * -5825 CD-4410310 139664226064 153418.7-441948154111.3-443940331.96 8.44 4.64 +0.40 -0.03 +0.20 F5IV-V -0.177-0.262 +.060-005 87 -5826 15The UMiBD+77 592 139669 82743229I 153422.4+774057153124.9+772058112.85 36.46 4.96 +1.58 +1.89 +0.87 K5III -0.049+0.010 +.021-025V < 17 -5827 BD+35 2711 139761 648253238 153456.9+350004153848.9+344030 55.41 53.58 6.11 +1.02 K0 -0.006-0.016 +004 -5828 BD+54 1758 139778 29597 153457.7+545010153732.0+543032 86.76 49.30 5.87 +1.07 gK1 -0.037-0.015 -023 -5829 BD+80 480 139777 2556 9696A 153458.7+804649152911.0+802655115.60 34.31 6.58 +0.67 +0.13 G0IV-V+G8IV-V -0.228+0.113 +.039-014SB 0.7 31.4AB 3* -5830 BD+47 2253 139798 456501412 153504.0+470738153816.2+464752 75.32 51.93 5.75 +0.36 -0.02 +0.18 F2V +0.090-0.126 +.009-002V * -5831 BD+12 2875 139862101673 9740 153526.6+122237154010.4+120311 20.52 47.74 6.25 +0.94 +0.71 G7.5IIIaFe-0.5 -0.007-0.007 -021SB 4.2 16.5 * -5832 CD-49 9909 1398712260893241 153522.8-491003154237.2-492922329.21 4.45 6.04 +1.31 K2III -0.004-0.018 -020 -5833 7Zet1CrBBD+37 2665 139891 64833 9737B 153536.2+365741153922.2+363812 58.70 53.41 6.00H B9V -0.014-0.013 +.015-019 25 1.0 6.4 * -5834 7Zet2CrBBD+37 2665 139892 64834 9737A 153536.6+365737153922.7+363809 58.70 53.41 5.07H -0.12 -0.47 B7V -0.013-0.006 +.015-024SB2O 100 1.0 6.4 * -5835 BD+50 2206 139906 29600 153538.9+504458153834.3+502524 80.80 50.74 5.84 +0.83 G8III +0.005-0.038 -014 -5836 CP-59 6257 139915253269 153537.4-595802154355.1-601714322.79-04.25 6.48 +1.05 G0Ib -0.017-0.005 -037 -5837 CD-3710441 1399802068873242 153608.2-370614154238.3-372530336.71 13.97 5.24 +0.98 G8-K0III -0.048-0.021 +.008-016 -5838 43Kap LibBD-19 4188 1399971594421413I W 7200 153611.0-192117154156.8-194044348.94 27.58 4.74 +1.57 +1.95 +0.94 M0-IIIb -0.037-0.103 +.040-004SB 5.0 172.0 -5839 4Psi2LupCD-3410494 140008206889 153618.5-342321154241.0-344238338.48 16.08 4.75 -0.14 -0.52 -0.16 B5V -0.021-0.029 +004SB2O 80 * -5840 19Tau6SerBD+16 2816 140027101678 153623.2+162050154059.2+160129 26.07 49.26 6.01 +0.90 +0.61 +0.46 G8III +0.028-0.013 +003 * -5841 BD+58 1583 140117 29609 7192 153656.9+581451153909.5+575528 91.21 47.56 6.45 +1.09 +1.04 K1III -0.005+0.011 -008 * -5842 21Iot SerBD+20 3138 140159101682 9744 153705.5+195932154133.1+194013 31.42 50.45 4.52 +0.04 +0.03 -0.01 A1V -0.057-0.046 +.011-017SB2 149 0.1 0.1AB 4* -5843 20Chi SerBD+13 2982 1401601016833243 Chi Ser 153705.0+131006154147.4+125051 21.83 47.75 5.33 +0.04 +0.05 -0.04 A0pSr v+0.040-0.003 +.032+002SB 64 * -5844 BD+69 806 140227 167943240I 153722.4+693622153739.1+691700104.68 41.46 5.62 +1.35 +1.58 K5IIIb -0.047+0.058 -029SB -5845 22Tau7SerBD+18 3059 140232101686 153724.6+184657154154.7+182750 29.69 49.96 5.81 +0.20 +0.11 +0.10 A2m -0.072+0.053 +.021-030V? 20 * -5846 CD-4110245 140285226132 W 153737.7-413003154422.6-414910334.19 10.32 5.94 0.00 -0.20 A0V+B -0.028-0.047 +019V 1.7 3.7 * -5847 BD-14 4266 140301159461 153748.3-144321154324.9-150236352.91 30.68 6.31 +1.16 +0.96 +0.42E K0IV -0.004-0.096 +021V? * -5848 44Eta LibBD-15 4171 1404171594663246 153826.7-152115154404.4-154022352.52 30.13 5.41 +0.23 +0.07 +0.09 F0IV -0.034-0.066 -031 101 -5849 8Gam CrBBD+26 2722 140436 83958 9757 Gam CrB 153832.5+263645154244.6+261744 41.74 51.92 3.84 0.00 -0.04 -0.02 B9IV+A3V -0.105+0.045 +.033-011 112 1.5 0.2 * -5850 BD+14 2922 140438101699 9758 153830.3+135911154310.6+134004 23.15 47.81 6.48 +0.86 +0.52 G5III -0.010-0.032D+.002-010SB 1.0 0.6 -5851 CP-65 3139 140483253297 W A 153846.0-650743154753.6-652633319.94-08.58 6.18 +0.22 +0.10 A5III-IV -0.005-0.042 -030V? 0.1 1.9 * -5852 CP-65 3139 140484 W B 153846.0-650743154753.7-652633319.94-08.58 6.39 +0.24 +0.10 F0-2IV -0.005-0.042 -024 0.1 1.9 * -5853 23Psi SerBD+02 2989 1405381211523248 9763 153859.9+025008154401.8+023054 9.70 41.97 5.88 +0.68 +0.25 +0.35 G2.5V -0.054-0.151 +.046+019SB 1.3 370. AE 5* -5854 24Alp SerBD+06 3088 140573121157 582I 9765 153920.5+064425154416.1+062532 14.20 44.08 2.65 +1.17 +1.24 +0.56 K2IIIbCN1 +0.137+0.047 +.053+003V? < 17 8.3 58.2AB 3* -5855 9Pi CrBBD+32 2621 140716 648703249 154002.8+324953154359.3+323057 51.87 52.44 5.56 +1.06 +0.53 gG9 -0.032-0.010 -004V? -5856 CD-2710550 140722183772 9775 154007.4-274452154612.8-280342343.60 20.69 6.51 +0.32 F2IV -0.067-0.026 -021 0.0 0.6AB 3* -5857 BD+52 1898 140728 296283247 BP Boo 154007.5+524035154250.7+522139 83.25 49.42 5.51 -0.07 -0.10 B9pSiCr -0.067+0.032 +.010-016SB 75 * -5858 26Tau8SerBD+17 2906 140729101712 S 154009.5+173443154442.1+171551 28.33 48.91 6.14 0.00 -0.03 A0V -0.026 0.000 -005SB 76 0.1 -5859 BD+05 3072 140775121170 154026.8+054540154523.5+052649 13.27 43.32 5.58 +0.04 +0.03 -0.01 A0V +0.027-0.015 -010 65 * -5860 CD-3410524 140784206962 W 7239 154020.8-342210154644.2-344057339.17 15.58 5.61 -0.11 -0.42 B7Vn -0.021-0.028 +005V 0.3 0.1 * -5861 BD+01 3125 140815121173 154034.0+011216154539.7+005329 8.25 40.69 6.33 +1.19 +1.20 K0III +0.043+0.008 +014 -5862 CD-3910157 140861226206 154046.4-395255154725.4-401139335.68 11.23 6.42 +0.88 G5III-IV -0.176-0.037 -028 -5863 25 SerBD-01 3092 140873140740 154055.2-012927154605.6-014816 5.53 38.99 5.40 -0.03 -0.40 B8III -0.027-0.038 -012SBO 116 * -5864 CD-3710500 140901206976 W 154059.3-373558154729.0-375459337.17 12.99 6.01 +0.72 +0.31 G6V -0.430-0.217 +.075-005 6.6 14.6AB 3* -5865 CP-52 8912 140979243001 W 154119.2-520743154850.3-522617328.16 1.52 6.07 +1.38 +1.45 K2-3III -0.007-0.002 -018 4.5 1.2 -5866 BD-05 4161 1409861407513250 154126.5-054833154645.4-060713 1.43 36.14 6.24 +1.17 +1.09 K0 -0.009-0.002 -051V? -5867 28Bet SerBD+15 2911 141003101725 583 9778 154134.3+154405154611.3+152519 25.98 47.87 3.67 +0.06 +0.08 +0.03 A2IV +0.067-0.045 +.041-001V 170 6.3 30.6AB 5* -5868 27Lam SerBD+07 3023 141004121186 I 7246 154135.3+073959154626.6+072111 15.70 44.10 4.43 +0.60 +0.11 +0.32 G0-V -0.223-0.067 +.094-066SB1O=< 6 * -5869 CP-52 8944 141168243022 W 154231.7-525407155006.9-531234327.83 0.80 5.77 -0.08 -0.23 B9Vn: -0.048-0.030 +016V? 5.8 28.4 * -5870 31Ups SerBD+14 2939 141187101739 154238.6+142525154717.3+140655 24.38 47.09 5.71 +0.09 +0.06 A3V -0.060+0.039 -034 * -5871 CD-4810349 141194226254 154243.1-483619154957.5-485443330.51 4.16 5.84 +0.07 +0.06 A1V -0.032-0.001 +012V -5872 CD-4510251 1412962262633251 W 154315.8-450542155016.3-452406332.77 6.86 6.12 +0.29 +0.03 A9III +0.045-0.033 +002 4.8 2.9AxBC 3 -5873 CP-54 6711 141318243044 W 154320.3-544502155106.8-550321326.79-00.73 5.73 +0.06 -0.70 B2II -0.001-0.014 -001SB 54 3.4 18.0AB 4* -5874 BD+14 2940 141353101744 I 154333.6+140558154813.3+134719 24.09 46.75 6.00 +1.25 +1.50 gK2 -0.006-0.116 -054V -5875 BD-03 3829 141378140775 154342.4-033043154856.8-034907 4.08 37.18 5.53 +0.12 +0.11 +0.04 A5IV -0.033+0.009 -016 120 -5876 CP-64 3286 141413253323 154348.1-645100155256.7-650909320.54-08.69 6.54 +0.19 +0.12 A5IV +0.035+0.008 +016 -5877 BD+32 2631 141456 64915 I 154403.7+320239154802.0+314409 50.70 51.53 6.44R K5 +0.032-0.041 -020 -5878 BD+55 1777 141472 29655 I 154411.5+554652154634.8+552829 87.27 47.72 5.92 +1.39 gK3 -0.125+0.076 -004 -5879 35Kap SerBD+18 3074 141477101752 584I 7269 154414.2+182701154844.4+180830 30.10 48.33 4.09 +1.62 +1.95 +0.98 M0.5IIIab e-0.051-0.088 +.021-039 * -5880 BD+28 2477 141527 84015 I R CrB 154427.1+282748154834.4+280924 45.05 50.98 5.85 +0.77 +0.29 G0Iep -0.002-0.015 +.010+025V 18 * -5881 32Mu SerBD-02 4052 141513140787 585 154424.0-030727154937.2-032549 4.59 37.29 3.53 -0.04 -0.10 -0.05 A0V -0.086-0.024 +.007-009SB 87 -5882 CD-4610430 141544226295 154425.3-464524155131.5-470338331.88 5.44 6.01 +1.16 +1.12 K2III -0.112-0.030 +030SB1O * -5883 5Chi LupCD-3310754 141556207040 586 154436.1-331921155057.5-333738340.57 15.82 3.95 -0.04 -0.13 -0.07 B9IV -0.006-0.030 +005SB2O 0 * -5884 CP-62 4990 141585253328 7299 154440.0-621819155322.8-623625322.22-06.76 6.19 +1.47 K3III -0.011-0.023 +008 -5885 1 ScoCD-2511131 141637183854 154457.7-252650155058.7-254505346.10 21.71 4.64 -0.05 -0.73 -0.10 B3V -0.018-0.024 +003V 300 * -5886 BD+63 1225 141653 16848 587 154508.4+625431154640.0+623558 96.42 44.46 5.19 +0.04 +0.10 A2IV +0.039-0.055 +.018-006V * -5887 BD+55 1779 141675 29668 9793 154512.9+554058154738.0+552236 87.05 47.62 5.86 +0.25 +0.16 +0.08 A3m +0.011+0.010D+.013-002SB 36 3.5 2.1 * -5888 34Ome SerBD+02 3007 141680121215 I 154514.5+023006155017.5+021147 10.54 40.50 5.23 +1.02 +0.82 +0.53 G8III +0.031-0.051 +.027-004V? < 17 * -5889 10Del CrBBD+26 2737 141714 840193252I Del CrB 154523.9+262228154935.7+260406 41.88 50.37 4.63 +0.80 +0.37 +0.42 G3.5III-IVFe-1 -0.076-0.063 +.014-019 < 17 -5890 CD-50 9939 141724243078 154527.7-501853155251.5-503655329.80 2.54 6.60 +1.53 K3III +0.015+0.011 -000 -5891 Kap TrACP-68 2585 1417672533423253 154536.4-681817155529.6-683611318.47-11.48 5.09 +1.13 +0.94 G5IIa -0.012-0.003 +.007+006 -5892 37Eps SerBD+04 3069 141795121218 588 154549.8+044643155049.0+042840 13.15 41.66 3.71 +0.15 +0.11 +0.06 A2Vm +0.128+0.063 +.041-009V 37 * -5893 CD-2912030 141832183873 9813 7301 154602.2-293459155212.8-295312343.36 18.46 6.40 +0.98 +0.85 K1III -0.135-0.089 -017 6.4 29.9AB 3* -5894 BD+15 2918 141850101771 I R Ser 154605.0+152614155041.7+150801 26.23 46.76 5.2 M7IIIe -0.005-0.041 +024V * -5895 36 SerBD-02 4058 141851140801 S 154603.0-024716155115.6-030526 5.25 37.18 5.11 +0.12 +0.07 A3Vnp -0.087-0.027 +.010-008V 0.1 * -5896 BD-13 4269 141853159544 154603.2-134955155138.4-140801355.27 29.89 6.19 +1.00 G8III -0.026-0.005 -022V -5897 Bet TrACP-63 3723 141891253346 589 W 154619.6-630719155508.5-632550321.85-07.52 2.85 +0.29 +0.05 +0.15 F2III -0.191-0.398 +.083+000 92 11.0 155. -5898 CP-60 6191 141913253344 W 7310 154624.9-602644155452.6-604436323.56-05.45 6.15 +0.10 B9II -0.009+0.003 -005 2.3 45.0AC 4* -5899 38Rho SerBD+21 2829 141992 84037 I 7300 154652.3+211642155115.9+205840 34.44 48.70 4.76 +1.54 +1.88 +0.85 K5-III -0.053+0.019 +.015-062V? < 17 -5900 CP-59 6428 142049253349 W 7318 154709.4-595245155532.3-601040323.99-05.06 5.77 +0.35 +0.14 G5II-III+A3 -0.052-0.075D+.028 56 3.0 3.9 * -5901 11Kap CrBBD+36 2652 142091 649481414I W 154727.8+355803155113.9+353927 57.02 51.04 4.82 +1.00 +0.87 +0.49 K1IVa -0.007-0.347 +.034-024 < 17 6.7 134.6 -5902 45Lam LibBD-19 4249 1420961838951415 154731.6-195205155320.1-201002350.72 25.38 5.03 -0.01 -0.56 -0.05 B2.5V -0.011-0.023 +006SB 197 2.0 0.0 * -5903 16Zet UMiBD+78 527 142105 8328 590 7263 154737.2+780608154403.5+774740112.68 35.66 4.32 +0.04 +0.05 +0.01 A3Vn +0.020-0.001 +.016-013V 206 * -5904 2 ScoCD-2412352 142114183896 9823 154736.3-250143155336.7-251938346.88 21.61 4.59 -0.07 -0.65 -0.09 B2.5Vn -0.016-0.025D+.006-010 308 2.5 2.3 * -5905 CP-60 6208 142139253353 154740.1-601106155606.0-602858323.85-05.34 5.76 +0.06 +0.07 A3V -0.034-0.081 -011V 96 * -5906 CD-2412354 142165183900 D 154755.4-241407155353.8-243159347.51 22.15 5.39 -0.02 -0.40 -0.02 B6IVn -0.024-0.023 +002V 273 * -5907 CD-2312569 142184183901 7314 154758.6-234048155355.8-235841347.93 22.55 5.42 -0.04 -0.61 -0.05 B2.5Vne -0.015-0.025 -009V 349 * -5908 46The LibBD-16 4174 142198159563 I 154807.8-162609155349.5-164346353.54 27.72 4.15 +1.02 +0.81 +0.52 G8.5IIIb +0.099+0.133 +.036+003 < 19: -5909 BD+17 2926 142244101789 154824.8+174204155256.2+172413 29.61 47.13 6.36R K0 -0.041+0.002 -012 -5910 CD-2611096 142250183907 154824.6-270230155430.0-272019345.57 20.00 6.14 -0.07 -0.44 B6Vp -0.025-0.023 +004V? 106 * -5911 39 SerBD+13 3024 1422671017923254 W 7313 154832.5+133035155312.1+131148 24.07 45.40 6.10 +0.60 0.00 +0.33 G0VFe-0.5 -0.151-0.561 +.041+036SB 5.6 98.3 -5912 3 ScoCD-2412365 142301183914 V927 Sco 154839.2-245650155439.5-251437347.12 21.51 5.87 -0.06 -0.58 B8IIIp -0.013-0.022 -009V 58 * -5913 BD+16 2840 142357101796 9828 154900.2+162220155334.9+160430 27.89 46.49 6.09R F5II-III +0.027-0.020 +002SB 30 6.4 3.6 * -5914 1Chi HerBD+42 2648 142373 457721416 154913.0+424353155240.5+422706 67.68 50.33 4.62 +0.56 0.00 +0.32 F8VFe-2Hdel -1 +0.440+0.632 +.056-055 0 * -5915 47 LibBD-18 4195 142378159572 9834 7327 154913.5-190515155500.3-192259351.65 25.66 5.94 -0.01 -0.53 -0.03 B5V -0.016-0.020 -007SB 240 2.0 0.7 * -5916 CD-3012663 142407207119 154914.9-304724155530.4-310501343.07 17.09 6.21 +1.37 K4III +0.014+0.024 +044 -5917 4 ScoCD-2511190 142445183931 154927.3-255816155530.1-261557346.52 20.64 5.62 +0.15 +0.19 A3V -0.045-0.021 -029 -5918 CD-3910237 142448207128 W 154925.1-393413155606.5-395151337.19 10.42 6.03 +0.15 B6V -0.035-0.018 -018V 5.9 18. * -5919 40 SerBD+09 3116 1425001212543256 FP Ser 154950.3+085229155440.3+083449 18.57 42.96 6.29 +0.18 +0.09 A7Vn +0.002+0.002 -025V? 230 * -5920 CP-64 3320 142514253362 W 154947.4-644450155858.1-650216321.11-09.01 5.75 -0.06 -0.40 B7III -0.013-0.019 +000 6.6 9.7 * -5921 CD-4710456 142529226392 154951.0-475202155703.8-480944331.90 3.99 6.31 +0.38 -0.03 F1IV -0.109-0.095 +002 -5922 BD+56 1838 142531 296983255 154956.9+560719155216.6+554936 87.29 46.84 5.81 +0.96 gG8 -0.023+0.057 -030V -5923 CD-3112407 142542207134 154956.2-312935155613.9-314709342.70 16.47 6.29 +0.43 F6V +0.036+0.001 +018 -5924 BD+20 3166 142574 840703257I 155010.1+203615155434.6+201839 33.84 47.76 5.44 +1.59 +1.94 +0.97 M0III -0.082+0.043 +.023-061V? * -5925 Xi 1LupCD-3310826 142629207144 W A 155029.7-334024155653.5-335759341.30 14.75 5.12 +0.12 +0.08 A3V +0.018-0.042 +.025-010 73 0.5 10.3 * -5926 Xi 2LupCD-3310826 142630207145 W B 155030.3-334017155654.2-335751341.30 14.75 5.62 +0.05 +0.06 B9V +0.020-0.039 +.025-012 191 0.5 10.3 * -5927 BD-13 4290 142640159584 155037.9-140619155614.4-142358355.92 28.90 6.37 +0.48 +0.08 F7V: +0.031-0.073 -006V -5928 5Rho ScoCD-2811714 1426691839573258 9846 155042.5-285519155653.1-291251344.63 18.27 3.88 -0.20 -0.82 -0.20 B2IV-V -0.013-0.025 -000V? 156 8.8 38.3 * -5929 CD-3510611 142691207152 155051.1-355339155721.3-361106339.85 13.03 5.80 +1.01 K0-1III -0.018-0.002 -005 * -5930 BD-14 4314 142703159587 D 155055.6-143213155633.4-144945355.62 28.55 6.13 +0.23 -0.03 A2III +0.069-0.027 +012 * -5931 BD+19 3036 142763101821 155111.1+185447155539.8+183714 31.61 46.96 6.26 -0.11 -0.43 B8III -0.014-0.015 -042V 80 * -5932 2 HerBD+43 2542 142780 45788 I 7335 155117.8+432547155437.9+430819 68.68 49.87 5.37 +1.65 +1.97 +1.25 M3IIIBa0.3 -0.032+0.065 +.034-010 -5933 41Gam SerBD+16 2849 142860101826 591I W 7350 155150.0+155916155627.2+153942 27.75 45.71 3.85 +0.48 -0.03 +0.24 F6V +0.312-1.281 +.069+007V? 8 6.6 201.5AB 3* -5934 BD-20 4364 142883183972 7359 155149.6-204135155740.4-205859350.88 24.09 5.85 +0.02 -0.43 B3V -0.016-0.018 +001SB2 98 * -5935 CD-3710620 142889207178 155156.3-371253155830.7-373011339.14 11.89 6.31 +1.01 K0III -0.025-0.002 -014V -5936 12Lam CrBBD+38 2712 142908 649743259 W 155209.2+381408155547.6+375649 60.60 50.10 5.45 +0.33 +0.03 F0IV +0.031+0.083 +.044-012V 74 4.5 94.3 * -5937 CP-53 6911 142919243219 155209.8-534402155954.0-540116328.43-00.76 6.10 0.00 -0.48 B5IV -0.023-0.017 -038 -5938 4 HerBD+42 2652 142926 45790 Var? 155208.5+425125155530.6+423358 67.77 49.78 5.75 -0.11 -0.41 -0.18 B9pe v-0.025+0.015 -017SBO 350 * -5939 CP-63 3765 142941253377 S TrA 155211.8-632928160110.7-634636322.13-08.22 6.41 +0.78 +0.54 F8II -0.009-0.003 +005V * -5940 Phi SerBD+14 2969 142980101834 I 155237.7+144204155714.6+142452 26.21 45.02 5.54 +1.14 +1.16 +0.56 K1IV -0.121+0.087 -068 -5941 48 LibBD-13 4302 1429831596071417 FX Lib 155235.2-135927155811.4-141646356.39 28.63 4.88 -0.10 -0.20 -0.03 B5IIIp t-0.012-0.015 -006SB? 393 * -5942 CD-2412427 142990183982 V913 Sco 155234.9-243235155834.8-244953348.12 21.20 5.43 -0.09 -0.64 B5IV v-0.014-0.018 -011V 200 * -5943 CD-4110478 1430092264251418 155241.5-412727155930.3-414440336.44 8.58 4.99 +1.00 K0II-III -0.040-0.018 +.019-027 -5944 6Pi ScoCD-2511228 143018183987 592 9862 7371 155248.0-254934155851.1-260651347.22 20.23 2.89 -0.19 -0.91 -0.20 B1V+B2V -0.011-0.026 +.010-003SB2O 100: 1.2 0.0 3* -5945 CD-4010113 143084226431 7375 155312.4-402202155958.0-403910337.23 9.34 6.49 +1.52 K1II-III +0.021+0.008 -026 -5946 CP-54 6922 143101243246 155318.7-541733160106.4-543440328.20-01.29 6.13 +0.25 A5V -0.043-0.039 -032 -5947 13Eps CrBBD+27 2558 143107 84098 593I 9859 155326.8+271002155735.3+265240 43.65 48.78 4.15 +1.23 +1.28 +0.62 K2IIIab -0.076-0.061 +.024-031V? < 17 7.3 101.4AC 3* -5948 Eta LupCD-3810797 143118207208 W A 155329.5-380639160007.3-382349338.77 11.01 3.41 -0.22 -0.83 -0.21 B2.5IV -0.022-0.032D+.008+008V 230 4.4 15.0AB 3* -5949 BD+59 1691 143187 29723 155353.1+591200155549.7+585442 91.08 45.17 6.31 -0.02 -0.18 A0V -0.024+0.022 -008V? 180 -5950 BD+40 2948 143209 64988 155358.5+395851155729.9+394143 63.29 49.68 6.31 +1.07 K0 -0.063+0.060 -014 * -5951 CP-62 5122 143238253390 155405.0-621533160252.4-623230323.10-07.43 6.25 -0.04 B9.5V -0.042-0.023 +004 -5952 CD-4010120 143248226442 W 155408.7-400910160053.7-402607337.51 9.39 6.21 +0.01 -0.01 A0V +0.014+0.037 -015 3.8 8.0ABxC 3 -5953 7Del ScoBD-22 4068 143275184014 594I S 155425.1-222014160020.0-223718350.10 22.49 2.32 -0.12 -0.91 -0.13 B0.3IV -0.012-0.022 -007SB 181 0.2 0.2 O 4* -5954 49 LibBD-16 4196 1433331596251419 W 155442.7-161420160019.6-163200354.92 26.72 5.47 +0.52 +0.03 F8V -0.630-0.394 +.035-025SB1O 5.6 155.1 * -5955 CP-72 1902 1433462573573269 155446.9-720730160555.8-722403316.51-14.88 5.70 +1.17 +1.26 K1IIICNII -0.037+0.069 +049 -5956 CD-3112470 143404207234 I 155500.8-313625160119.5-315322343.46 15.66 6.33 +1.45 K4III +0.010-0.004 +001 -5957 BD+37 2695 143435 65001 I 155516.0+365539155857.7+363838 58.57 49.49 5.62 +1.49 +0.83 gK5 +0.022+0.029 +011V? -5958 BD+26 2765 143454 84129 I W T CrB 155519.0+261213155930.2+255513 42.37 48.16 2.0 H +0.1 +1.56 sdBe+gM3+Q -0.005+0.013 -029SBO 0.2 * -5959 50 LibBD-07 4162 1434591408971420 155523.6-080743160047.6-082441 2.00 32.00 5.55 +0.05 -0.05 A0V s -0.014-0.013 -019 =< 41 -5960 BD+55 1793 143466 29727 595 CL Dra 155524.9+550156155747.4+544459 85.41 46.50 4.95 +0.26 +0.05 +0.14 F0IV -0.150+0.110 +.022-011SB 140 * -5961 Iot1NorCP-57 7500 143474243279 W 155523.7-572936160331.9-574631326.35-03.92 4.63 +0.24 +0.09 A7IV -0.124-0.085 +.023-014V 139 0.2 0.5AB 3* -5962 Eta NorCD-4810512 1435462264663266 155551.7-485702160312.9-491347331.97 2.52 4.65 +0.92 +0.64 +0.47 G8III +0.043+0.010 +.022-000 -5963 BD+04 3096 1435531213153262 155553.2+044226160051.1+042539 14.86 39.52 5.83 +1.00 +0.79 +0.53 gK0 -0.041+0.075 -004 -5964 BD+50 2239 143584 297373260 155614.0+500957155904.4+495252 78.49 47.77 6.05 +0.29 +0.03 F0IV +0.023-0.041 +004V? 63 -5965 CD-2811817 143619184049 9896 155627.7-285122160239.4-290809345.65 17.47 6.03 +1.31 K3III +0.036-0.013 +005V? 6.8 11.0 -5966 5 HerBD+18 3101 1436661018793263I 155644.6+180541160114.3+174906 31.20 45.44 5.12 +0.99 +0.74 +0.50 G8IIIbFe-0.5 -0.048+0.157 -.007-019V < 17 -5967 CD-3810832 1436992072763267 155645.0-381924160324.2-383609339.12 10.43 4.89 -0.14 -0.58 -0.14 B6IV -0.016-0.027 -002V? 201 * -5968 15Rho CrBBD+33 2663 143761 65024 W 155713.2+333619160102.7+331813 53.51 48.92 5.41 +0.60 +0.08 +0.32 G0+VaFe-1 -0.192-0.766 +.040+018V 7 3.2 89.6 * -5969 CD-2511295 143787184068 I 155717.9-253511160320.6-255155348.17 19.70 5.00 +1.22 +1.31 +0.46E K5III -0.071-0.038 +.032-039 * -5970 CD-3112505 143790207282 155715.2-314320160334.3-320002343.74 15.25 6.01 +0.47 F4IV -0.044-0.028 +028 -5971 14Iot CrBBD+30 2738 143807 841523264 7396 155726.1+300751160126.6+295104 48.30 48.46 4.99 -0.07 -0.19 -0.08 A0p:Hg: -0.039-0.009 +.010-019SB 12 * -5972 44Pi SerBD+23 2886 143894 841553268 155759.2+230455160217.7+224816 38.14 46.78 4.83 +0.07 +0.06 +0.01 A3V +0.002+0.028 +.012-028SB 110 -5973 CD-2412499 143900184075 I 155754.2-242700160354.7-244335349.12 20.42 6.21 +1.38 K0 +0.001+0.009 +026V -5974 CD-3211386 143902207292 155755.1-325612160417.8-331252343.00 14.26 6.10 +0.34 A9IV -0.031-0.055 -028 -5975 CD-3710680 143928207297 W 155800.6-373503160436.7-375147339.81 10.81 5.90 +0.40 F3IV -0.137-0.117 -006 7.0 40.7 -5976 43 SerBD+05 3131 144046121339 W 155848.9+051543160345.7+045912 15.97 39.20 6.08 +0.96 +0.75 +0.32E G9III -0.041+0.012 -044V? 7.8 30.8 * -5977 Xi ScoBD-10 4237 144069159665 9909B 155852.0-110551160422.1-112223 0.02 29.42 5.07H F5IV -0.060-0.029 +.048-029 0.2 1.2AB 5* -5978 Xi ScoBD-10 4237 144070159665 9909A 155852.0-110551160422.1-112223 0.02 29.42 4.77H +0.47 +0.01 +0.24 F5IV -0.060-0.029 +.048-029SBO 27 0.2 1.2AB 5* -5979 CP-55 7079 144183243339 155923.2-555511160724.0-561129327.80-03.09 6.16 +0.58 F2II -0.003-0.011 +002V -5980 Del NorCD-4410625 144197226500 596 155925.3-445407160629.4-451024335.09 5.17 4.72 +0.23 +0.15 +0.12 Am +0.002+0.028 +.035-016 0 -5981 BD+53 1834 144204 29763 I 155932.3+531137160205.5+525457 82.59 46.48 5.93 +1.48 gK5 -0.002-0.034 -007V? -5982 6Ups HerBD+46 2142 144206 458653271 155940.9+461851160247.9+460212 72.69 47.98 4.76 -0.11 -0.32 -0.10 B9III +0.059-0.058 +003 6 * -5983 BD+37 2708 144208 65049 S 155938.7+365427160319.4+363754 58.57 48.61 5.83 +0.56 A2V+F7III +0.010-0.017 -001SB2O 23 * -5984 8Bet1ScoBD-19 4307 144217159682 597I 9913A 7424 155937.2-193154160526.2-194820353.19 23.60 2.62 -0.07 -0.87 -0.09 B1V -0.006-0.019 +.009-001SBO 130 1.3 0.0 O 5* -5985 8Bet2ScoBD-19 4308 144218159683 9913C 7424 155937.6-193142160526.5-194807353.20 23.60 4.92 -0.02 -0.70 B2V -0.019-0.020 -004V 74 1.3 0.0 O 5* -5986 13The DraBD+58 1608 144284 29765 598I 160000.8+584956160153.3+583355 90.18 44.58 4.01 +0.52 +0.10 +0.25 F8IV -0.320+0.335 +.051-009SB1O 27 * -5987 The LupCD-3610642 144294207332 599 160001.4-363148160635.5-364808340.83 11.32 4.23 -0.17 -0.70 -0.17 B2.5Vn -0.017-0.029 +015 309 * -5988 CD-2312700 144334184113 V929 Sco 160008.4-232002160606.3-233623350.35 20.85 5.92 -0.08 -0.55 B8p v-0.013-0.028 -007 44 * -5989 BD-05 4234 144362140945 9918 160024.2-060110160544.5-061730 4.86 32.37 6.53 +0.48 +0.07 F2IV +0.037-0.008D+.012-011SB 45 0.0 0.1AP 5* -5990 BD-05 4235 144390140947 W 160040.3-055206160559.8-060822 5.05 32.41 6.41 +1.03 +0.80 K0 -0.030+0.004 -032V? 5.8 9.3 -5991 CD-3610648 144415207341 W 160041.5-362903160716.4-364520340.97 11.27 5.73 +0.29 +0.02 F1IV +0.066-0.043 +026 6.0 40.7 -5992 BD+08 3134 144426121361 160047.4+082204160537.8+080546 19.77 40.35 6.29 +0.08 +0.11 +0.06 A3m -0.009-0.002 -021SBO 39 * -5993 9Ome1ScoBD-20 4405 144470184123 160057.3-202354160648.4-204009352.75 22.77 3.96 -0.04 -0.81 -0.08 B1V -0.009-0.021 -003V? 142 * -5994 Iot2NorCP-57 7613 1444802433683273 160105.1-573955160918.6-575604326.81-04.55 5.57 -0.04 B9.5V -0.013-0.063 +000 96 -5995 BD+59 1697 144542 29777 I 160120.2+594107160309.3+592439 91.19 44.11 6.19 +1.58 +1.91 +0.81E M1III -0.023-0.022 -005 * -5996 BD-13 4342 144585159706 160128.7-134808160703.4-140415358.18 27.16 6.32 +0.66 +0.24 G4IV-V -0.258+0.024 -016V -5997 10Ome2ScoBD-20 4408 144608184135 I 7454 160132.3-203555160724.3-205207352.70 22.54 4.32 +0.84 +0.50 +0.43 G3II-III +0.041-0.038 +.021-005 * -5998 CD-2412552 144661184142 160151.6-241137160751.9-242743349.99 19.97 6.33 -0.06 -0.53 B7IIIp: -0.011-0.007 -005V 36 * -5999 CD-3810893 144668207367 W C V856 Sco 160152.1-385013160834.2-390619339.52 9.38 7.05 +0.36 +0.25 A7IVe -0.019-0.031 +008V 0.4 44.1AC 4* -6000 CD-3810894 144667207368 W A 160152.4-384929160834.4-390535339.53 9.38 6.65 -0.07 -0.44 A0-3III -0.027-0.035 -003 < 20 0.4 44.1AC 4* -6001 CD-2511369 144690184144 I 160201.8-260332160807.6-261936348.63 18.62 5.38 +1.65 +2.01 +0.95E M2III +0.108-0.003 -018V -6002 11 ScoBD-12 4425 144708159715 9924 160203.1-122835160736.4-124444359.41 27.93 5.78 +0.01 B9.5Vnn t-0.045-0.029 -025SB 239 4.3 3.5 * -6003 CD-2312731 1448441841643275 7470 160245.2-232507160843.7-234108350.73 20.37 5.88 +0.02 -0.31 B9IVp: -0.009-0.025 -014SB2 180 * -6004 45 SerBD+10 2958 1448741019393274 160251.0+100933160737.5+095330 22.16 40.77 5.63 +0.20 +0.17 A7V -0.021-0.004 -028SB 157 -6005 BD+22 2926 144889 84202 I 160302.1+220528160722.2+214921 37.26 45.38 6.14 +1.37 +1.51 +0.76 K4III -0.013-0.041 +057 -6006 CD-3211456 144927207396 W 160309.5-322259160931.7-323859344.22 13.91 6.19 +0.79 +0.46 K0-2III -0.026-0.053 -005 0.8 7.7 * -6007 CD-3310961 1449872074033277 160327.8-331649160952.6-333245343.63 13.22 5.54 -0.10 B8V -0.023-0.042 -021SB 181 * -6008 7Kap HerBD+17 2964 1450011019511421 9933A 7471 160333.6+171848160804.5+170249 31.02 43.64 5.00 +0.95 +0.61 +0.46 G8III -0.032-0.007 +.002-011V? 10 1.2 28.1AB 3* -6009 7Kap HerBD+17 2965 145000101952 I 9938B 160334.0+171917160804.9+170316 31.03 43.64 6.25 +1.14 +1.11 K1III -0.031-0.028 +.002+038V =< 25 1.2 28.1AB 3* -6010 47 SerBD+08 3141 145002121383 I FS Ser 160338.6+084800160828.0+083203 20.71 39.95 5.73 +1.61 +1.69 M3.5IIIa -0.017-0.010 -022V? * -6011 BD+03 3132 145085121390 I 160359.1+034308160858.9+032716 15.17 37.28 5.91 +1.47 +1.82 gK5 -0.028+0.016 +009V? -6012 BD-17 4502 145100159745 160409.6-180430160955.2-182027355.15 23.82 6.47 +0.44 F4V -0.084-0.076 -025V -6013 8 HerBD+17 2967 145122101962 7477 160416.1+172816160846.6+171221 31.31 43.54 6.14 0.00 -0.07 A0Vnn -0.021-0.026 -017V 275 -6014 BD+06 3169 1451481213921422 160415.7+063949160911.2+062244 18.40 38.75 5.97 +1.00 +0.81 +0.50 K1.5IV +0.236-0.738 +.030-004V -6015 CD-4010251 1451912265643278 160428.5-405117161117.7-410711338.51 7.55 5.86 +0.27 F0IV -0.077-0.127 -014 * -6016 BD-03 3884 145206141001 I 160436.4-031213160950.5-032801 8.28 33.24 5.37 +1.45 +1.46 +0.81 K4III -0.030-0.007 +.008-046SB * -6017 CD-2912343 145250184197 I 160449.1-290908161102.0-292459346.81 15.99 5.13 +1.12 +1.02 K3III -0.093-0.087 +.025-027 -6018 16Tau CrBBD+36 2699 145328 651081423I 9939 7488 160518.8+364442160858.3+362927 58.39 47.47 4.76 +1.01 +0.86 +0.54 K1-III-IV -0.053+0.333 +.031-019SB < 17 8.3 2.2 * -6019 Zet NorCP-55 7229 145361243449 160524.7-551653161322.6-553227328.86-03.19 5.81 +0.34 F2III -0.105-0.043 -046 -6020 Del1ApsCP-78 1092 1453662573801424 W A Del1 Aps 160523.5-782637162020.8-784145312.42-19.89 4.68 +1.69 +1.69 +1.33E M5IIIb -0.014-0.035 +.020-012 0.4 102.9AB 3* -6021 Del2ApsCP-78 1093 145388257381 W B 160530.7-782457162026.8-784002312.44-19.88 5.27 +1.41 +1.62 +0.56E K3III -0.007-0.025 +.020-010 0.4 102.9AB 3* -6022 CP-53 7413 145384243448 7527 160529.4-532445161316.8-534018330.13-01.82 5.83 +1.96 +2.21 M0Ib-II+F-G -0.017-0.016 -012V? * -6023 11Phi HerBD+45 2376 145389 45911 601 7490 160537.0+451149160846.2+445606 70.85 47.11 4.26 -0.07 -0.28 -0.09 B9p:Mn: -0.025+0.038 +.020-016SB1O 10 * -6024 Kap NorCP-54 7245 145397243454 600 W 160535.3-542218161328.7-543750329.49-02.53 4.94 +1.04 +0.78 G8III -0.002-0.024 +.022-014 7.9 14.9 -6025 BD+68 864 145454 169623276 160602.8+680425160619.7+674837101.15 40.09 5.44 -0.02 -0.08 A0Vn -0.035+0.066 +.010-018V? 204 * -6026 14Nu ScoBD-19 4332 145501159763 9951CD 160609.8-191125161158.6-192659354.61 22.71 6.30 +0.13 -0.37 B8V+B9VpSi -0.010-0.009 +.030-014 67 2.5 41.1AC 5* -6027 14Nu ScoBD-19 4333 145502159764 9951AB 160610.9-191203161159.7-192738354.61 22.70 4.01 +0.04 -0.65 +0.03 B3V -0.010-0.023 +.030+002SBO 199 2.5 41.1AC 5* -6028 13 ScoCD-2710841 145482184221 160608.5-274001161218.2-275535348.12 16.84 4.59 -0.16 -0.74 -0.17 B2V -0.013-0.025 +010V 225 * -6029 12 ScoCD-2811962 145483184217 9953 7520 160605.1-280926161215.9-282503347.75 16.50 5.67 +0.01 -0.20 B9V v-0.032-0.043D+.021-003V? 2.1 3.9 * -6030 Del TrACP-63 3854 145544253474 602 W 160619.9-632548161526.3-634108323.36-09.23 3.85 +1.11 +0.86 +0.39E G2Ib-IIa +0.002-0.011 +.029-005 8.0 30. -6031 15Psi ScoBD-09 4324 1455701410223280 160631.9-094818161200.0-100351 2.54 28.81 4.94 +0.09 +0.11 +0.07 A3IV -0.001-0.014 +.020-006V 33 * -6032 BD+10 2971 145589121414 W 160642.7+095818161129.7+094245 22.53 39.84 6.53 +0.24 +0.10 F0IV +0.014-0.005 -027 0.0 0.1 * -6033 16 ScoBD-08 4180 145607141024 160642.1-081721161207.3-083251 3.92 29.73 5.43 +0.12 +0.13 A4V +0.042+0.003 -.009+005V 201 -6034 BD+77 616 145622 8417 160649.3+770338160331.3+764737110.90 35.44 5.56R A3V -0.021+0.016 -016SB 80 -6035 BD+17 2982 1456471019943279 160657.0+165528161128.7+163956 30.94 42.74 6.08 +0.02 0.00 A0V +0.003+0.004 -017V 24 -6036 BD+58 1622 145674 29823 9944 160705.1+581154160902.9+575616 88.89 43.94 6.33R A1V -0.024+0.022 -010SB 195 5.4 12.3 * -6037 CP-67 3054 145689253481 160706.8-674110161705.5-675629320.42-12.36 5.75 +0.15 +0.09 A4V -0.046-0.094 -009 89 -6038 BD+56 1867 145694 29825 160713.8+560520160926.0+554944 86.09 44.58 6.49R K0 -0.033+0.025 -015 -6039 10 HerBD+23 2909 145713 84240 I LQ Her 160722.5+234512161138.0+232941 39.93 44.90 5.70 +1.56 +1.56 +1.81 M4.5IIIa -0.029-0.012 -025 * -6040 CP-57 7716 145782243509 160733.7-573927161549.7-575444327.46-05.13 5.63 +0.14 A3III -0.022-0.048 -015 * -6041 BD-03 3891 145788141031 160740.9-035750161256.5-041315 8.10 32.17 6.25 +0.13 +0.05 A1V -0.032-0.015 -016 =< 41 -6042 CD-2412623 145792184241 9967 160744.5-240958161345.7-242519351.01 19.03 6.41 +0.04 -0.44 B5V +0.013-0.013 +006V? 23 3.8 1.5 * -6043 BD+33 2696 145802 65129 9958 160750.5+333600161139.7+332033 53.83 46.72 6.29 +1.20 K2III +0.015+0.010D+.009+000V? 4.3 5.4AB 3* -6044 CD-3211525 145838207480 160758.2-324521161422.3-330041344.70 12.94 5.92 +1.02 K0III -0.015-0.034 -023 -6045 The NorCD-4710611 145842226600 160759.5-470702161515.3-472220334.70 2.53 5.14 -0.13 -0.40 B8V -0.032-0.051 +001 251 * -6046 BD+36 2706 145849 65132 I W 160808.6+364059161148.0+362530 58.33 46.90 5.63 +1.34 K3III -0.011-0.036 -031SB1O 0.1 0.1 * -6047 9 HerBD+05 3165 1458921214313283I 160818.5+051636161315.4+050116 17.55 37.18 5.48 +1.47 +1.78 +0.77 gK5 +0.040-0.007 +.014-002V? -6048 17Chi ScoBD-11 4096 145897159793 I 160818.9-113457161350.9-115015 1.30 27.34 5.22 +1.42 +1.54 +0.71 K3III -0.010-0.006 +.029-025V? < 17 * -6049 CD-4211132 145921226603 160826.6-423847161524.0-425359337.83 5.74 6.14 +1.11 K2III -0.026-0.009 +004 -6050 BD+42 2683 145931 459573281I 9962 160828.9+423750161147.6+422228 67.03 46.82 5.87 +1.45 +1.74 +0.77 K4II+F6-8V -0.006+0.027 -021V? 4.3 23.6 * -6051 BD-20 4444 145964184253 160836.0-205111161428.8-210627353.72 21.16 6.41 -0.01 A0V -0.027-0.026 -008 254 -6052 BD+27 2603 145976 84247 9966 160837.5+265538161245.3+264015 44.39 45.43 6.50 +0.39 -0.03 F3V +0.049-0.025D+.012-008 30 3.8 2.6 -6053 BD-18 4249 145997159807 D 160852.9-181644161439.1-183207355.81 22.85 6.32 +1.09 K2III -0.106-0.109 -017V? 0.3 0.0 * -6054 CD-2511453 146001184258 160849.7-251324161453.6-252837350.39 18.12 6.05 +0.04 -0.36 B7IV +0.007-0.019 -008V? 181 * -6055 CP-53 7594 146003243526 7574 160853.5-533336161643.1-534840330.40-02.27 5.44 +1.73 +1.86 +1.02E M2III -0.006+0.004 +.020-028 * -6056 1Del OphBD-03 3903 146051141052 603I W 7556 160906.2-032613161420.7-034140 8.85 32.20 2.74 +1.58 +1.96 +1.03 M0.5III e-0.044-0.143 +.034-020V 10.4 65.5 * -6057 BD+06 3184 146084121443 160918.5+060921161413.5+055407 18.66 37.42 6.31 +1.15 +1.17 K2III +0.029-0.012 -021 -6058 Gam1NorCD-4910474 146143226619 160931.5-494905161700.9-500406333.04 0.39 4.99 +0.80 +0.51 F9Ia -0.005-0.004 -.001-017 -6059 CP-52 9469 146145243544 W 160935.8-525007161720.9-530512330.98-01.81 6.33 +0.27 +0.14 A8IV -0.059-0.058 -024 6.6 21.0 -6060 18 ScoBD-07 4242 146233141066 W 7577 161011.0-080617161537.3-082210 4.70 29.16 5.50 +0.65 +0.17 +0.33 G2Va +0.234-0.501 +.062+011V 2 7.7 25.8 * -6061 BD-14 4383 1462541598213286 7578 161012.7-143555161551.5-145057359.07 25.04 6.09 +0.06 0.00 A0V +0.009+0.004 -011V 106 -6062 CP-57 7821 146323243586 S Nor 161034.4-573910161851.9-575359327.75-05.40 6.49 +1.00 +0.66 +0.57 F8-G0Ib 0.000-0.001 +005V * -6063 17Sig CrBBD+34 2750 146361 65165 9979A TZ CrB 161055.9+340642161440.8+335131 54.67 46.14 5.64 +0.51 0.00 G0VCaIIe -0.271-0.079 +.045-011SB2O=< 25 1.0 6.4AB 4* -6064 17Sig CrBBD+34 2750 146362 9979B 161055.9+340642161440.8+335130 54.67 46.14 6.66H G1V -0.271-0.079 +.045-017V? =< 30 1.0 6.4AB 4* -6065 16 HerBD+19 3075 146388102040 161102.7+190338161528.7+184830 34.13 42.62 5.69 +1.12 +1.01 K3III -0.064-0.077 +.010-018V -6066 BD-20 4454 146416184285 161105.1-210318161658.8-211814353.98 20.60 6.61 +0.02 -0.15 B9V -0.015-0.016 -008V? 300: * -6067 BD-03 3910 146514141075 161139.6-034220161655.3-035712 9.03 31.52 6.18 +0.31 +0.02 A9Vn +0.040+0.009 -008V? -6068 BD+27 2613 146537 84269 161142.5+274020161547.4+272520 45.63 44.93 6.14 +1.31 K2 -0.029-0.033 -011 -6069 BD+67 930 146603 16993 161202.5+672351161225.1+670839100.03 39.88 6.21 +0.99 +0.72 G8III -0.023-0.043 -010 -6070 CD-2812037 1466241843013288 161205.6-282155161817.9-283650348.56 15.41 4.78 +0.02 0.00 -0.05 A0V -0.028-0.099 +.031-013 35 -6071 Lam NorCD-4211188 146667226650 W 161219.9-422544161917.7-424026338.50 5.40 5.45 +0.10 A3Vn +0.016-0.011 -015V 0.8 0.3 * -6072 Gam2NorCD-4910536 146686243643 604I'W 161221.3-495437161950.4-500920333.30 0.01 4.02 +1.08 +1.16 +0.58 G8III -0.155-0.053 +.044-029 =< 12 6.0 44.9 * -6073 CP-54 7493 146690243654 161225.8-545346162025.2-550824329.86-03.59 5.77 +0.97 K0III +0.019-0.021 -000 -6074 18Ups CrBBD+29 2803 146738 842813287 9990 7596 161244.4+292351161644.8+290901 48.09 45.06 5.78 +0.07 +0.10 0.00 A3V +0.023-0.016 +007SB? 80 4.3 123.4AD 5* -6075 2Eps OphBD-04 4086 146791141086 605I W 161301.7-042656161819.3-044133 8.56 30.81 3.24 +0.96 +0.75 +0.49 G9.5IIIbFe-0.5 +0.085+0.041 +.043-010V < 17 9.1 110.6 * -6076 BD-19 4357 146834184309 161316.2-195826161907.7-201304355.21 20.95 6.29 +1.08 +0.78 +0.62 K5III +0.011-0.005 +008V * -6077 CD-3013041 1468362075581426 W A 161313.1-303951161932.7-305424347.03 13.63 5.49 +0.47 -0.01 F6III +0.085+0.023 +.030-008SB 0 1.6 23.2 * -6078 BD-14 4398 146850159846 I 161321.5-143745161900.4-145221359.59 24.44 5.94 +1.52 +1.95 K4III -0.028+0.015 -042SB -6079 19 UMiBD+76 594 146926 8446 606 161340.1+760746161049.5+755239109.67 35.61 5.48 -0.11 -0.36 B8V -0.001+0.013 -001V -6080 CD-3910412 146954207574 W 161346.7-391115162032.6-392551340.98 7.53 6.12 -0.07 -0.22 B9V -0.012-0.064 +003 4.7 15.6 -6081 19Omi ScoCD-2312849 147084184329 I 7632 161437.0-235542162038.2-241010352.33 18.05 4.55 +0.84 +0.62 +0.84 A5II v-0.003-0.023 +.005-008 7 * -6082 20 UMiBD+75 586 147142 8452 161502.6+752731161232.2+751238108.91 35.88 6.39R K2IV -0.041+0.034 -026V? -6083 CD-4910591 147152226693 161459.5-492000162228.0-493420334.01 0.13 5.33 -0.04 -0.23 B6IV -0.011-0.024 -010 190 * -6084 20Sig ScoCD-2511485 147165184336 607I 10009 Sig Sco 161506.5-252110162111.3-253534351.31 17.00 2.89 +0.13 -0.70 +0.11 B1III -0.010-0.021 +003SBO 53 2.0 0.0 O 4* -6085 CD-4310724 147225226696 W 161525.8-434027162228.9-435444338.03 4.11 5.88 +1.16 +0.83 G3II -0.027-0.014 -011 3.8 40.7 * -6086 BD+60 1665 147232 298743291I AT Dra 161535.1+595951161715.3+594518 90.74 42.32 5.40 +1.63 +1.67 M4IIIa +0.007+0.028 -036V? * -6087 BD+21 2902 147266 84306 161543.9+212226162004.3+210757 37.59 42.35 6.05 +0.94 +0.64 G8IIIb -0.017-0.050 -025V? -6088 BD+73 713 147321 84623289 161611.7+733822161433.5+732342106.90 36.71 5.98 +0.08 +0.15 A3V -0.005+0.040 -015 -6089 CP-62 5325 147349253539 161616.7-625331162522.0-630729324.55-09.63 6.15 +0.03 A1V -0.027+0.023 +031 -6090 BD+49 2491 147352 460253292I 161623.5+491639161911.2+490217 76.31 44.75 5.91 +1.37 gK6 -0.023+0.033 -032 -6091 BD+40 3005 147365 652333293 W 161629.5+395652161955.1+394231 63.12 45.37 5.46 +0.40 -0.08 F3IV-V -0.132+0.004 +.043-029V 50 4.5 2.2 * -6092 22Tau HerBD+46 2169 147394 46028 608 10010 7641 161644.0+463305161944.4+461848 72.48 45.04 3.89 -0.15 -0.56 -0.17 B5IV -0.011+0.040 +.030-014V? 32 10.7 6.7 * -6093 50Sig SerBD+01 3215 1474491215401427 161700.4+011550162204.4+010145 14.78 33.22 4.82 +0.34 +0.04 +0.15 F0V -0.155+0.050 +.043-050V? 80 * -6094 CD-3810983 1475132076223295 7680 161714.7-385733162401.3-391135341.62 7.21 5.40 +0.62 +0.15 G5V +0.075+0.001 +.054+010 * -6095 20Gam HerBD+19 3086 147547102107 609I 10022 7667 161730.4+192316162155.2+190911 35.26 41.30 3.75 +0.27 +0.18 +0.14 A9III -0.047+0.043 +.024-035SB 141 6.4 41.6AB 3* -6096 BD-01 3174 147550141129 161727.4-015040162238.9-020447 11.79 31.41 6.23 +0.07 -0.02 B9V -0.013+0.003 -016 -6097 CD-3211687 147553207625 W A 161730.4-325754162356.7-331158345.99 11.37 6.47 +0.01 -0.02 A0V+A0V -0.016-0.031D+.009-002 0.5 6.3AB 3* -6098 Zet TrACP-69 2558 147584253554 610 161742.5-695132162828.1-700504319.53-14.57 4.91 +0.55 +0.04 +0.28 F9V +0.196+0.108 +.094+009SBO * -6099 CD-4510633 147614226730 W 161744.1-450700162454.2-452057337.31 2.80 6.33 +0.19 A2-3V +0.024-0.001 +001V 6.0 5.3 -6100 CD-3710778 147628207637 W 161751.5-371957162431.7-373357342.87 8.27 5.42 -0.11 -0.40 B8IV -0.020-0.024 +009V 160: 0.1 0.1 * -6101 BD+68 868 147662 17036 161811.8+684733161809.4+683316101.34 38.77 6.41R K0 -0.044+0.047 -.004-011 -6102 Gam ApsCP-78 1103 147675257407 611 161806.0-784021163327.0-785350312.69-20.51 3.89 +0.91 +0.62 G8-K0III -0.131-0.076 +.056+005SB -6103 19Xi CrBBD+31 2845 147677 652543294I W 161812.0+310726162205.8+305331 50.77 44.21 4.85 +0.97 +0.80 +0.46 K0III -0.096+0.109 +.016-029 < 17 7.4 185.1 * -6104 4Psi OphBD-19 4365 147700159892 I 161815.0-194812162406.2-200215356.17 20.18 4.50 +1.01 +0.82 +0.50 K0II-III -0.027-0.047 -.002+000 < 17 -6105 CD-2912513 147722184368 10035B 161822.7-292807162439.6-294212348.72 13.65 6.63 +0.59 +0.11 G0IV +0.063-0.102D+.036-000 0.8 5.2 * -6106 CD-2912513 147723184369 10035A 161822.8-292814162439.7-294217348.72 13.65 5.84 +0.59 +0.13 G0IV +0.066-0.080D+.036-003 0.8 5.2 * -6107 20Nu 1CrBBD+34 2773 147749 65257 I W 7676 161835.5+340204162221.4+334757 54.82 44.55 5.20 +1.60 +1.94 +0.87E M2IIIab +0.007-0.037 +.003-013V 0.1 364.4AB 4 -6108 21Nu 2CrBBD+34 2774 147767 65259 I 161843.1+335610162229.2+334213 54.69 44.51 5.39 +1.53 +1.88 +0.87 K5III -0.007+0.059 +.021-040V < 17 -6109 Iot TrACP-63 3923 147787253555 W 161839.7-634950162757.3-640329324.06-10.48 5.27 +0.36 -0.02 F4IV +0.046+0.027 +.029-005SBO 0 4.1 19.6 * -6110 BD+32 2716 147835 652621428 10031 161906.1+323359162256.5+321959 52.80 44.25 6.40 +0.08 +0.11 A4Vn +0.023-0.007 -001SB 232 2.9 32.4 * -6111 21 HerBD+07 3164 1478691215681429 161918.5+071045162410.8+065653 21.30 35.77 5.85 -0.01 +0.01 A2pSr: +0.003+0.014 -033SB1O * -6112 5Rho OphCD-2312861 147933184382 10049A 161935.2-231301162535.2-232650353.69 17.69 5.02 +0.24 -0.55 +0.31 B2IV +0.002-0.018D+.013-010V 303 0.7 3.2AB 5* -6113 5Rho OphCD-2312861 147934184381 10049B 161935.2-231257162535.1-232646353.69 17.69 5.92H B2V -0.007-0.017D+.013-010 300 0.7 3.2AB 5* -6114 CP-58 6800 1479772438363297 161948.9-582220162815.2-583559328.12-06.78 5.69 0.00 B9II-III -0.021-0.038 +002 -6115 Eps NorCD-4710765 147971226773 W 161950.9-471936162711.1-473318336.00 0.98 4.47 -0.07 -0.53 -0.04 B4V -0.005-0.030 -012SB2O 165 2.7 22.8 * -6116 21Eta UMiBD+76 596 148048 8470 612 W 162025.2+755909161730.3+754519109.27 35.33 4.95 +0.37 +0.08 F5V -0.085+0.252 +.043-010V 76 10.8 227. * -6117 24Ome HerBD+14 3049 148112102153 613 10054 Ome Her 162048.0+141548162525.0+140200 29.46 38.63 4.57 0.00 -0.04 -0.04 B9pCr +0.044-0.059 +.041-006V 38 8.1 28.4AC 4* -6118 7Chi OphBD-18 4282 1481841599183298I Chi Oph 162113.6-181346162701.4-182723357.93 20.68 4.42 +0.28 -0.75 +0.22 B2IV:pe v-0.002-0.022 -003SB1O 134 * -6119 BD+19 3098 148206102160 I U Her 162122.2+190712162547.7+185333 35.35 40.35 6.7 +2.95 M7IIIe +0.022-0.003 +.010-028V? * -6120 CP-57 8035 148218243874 162124.5-573200162945.0-574521328.87-06.34 6.06 +1.48 G8Ib -0.018+0.015 +005 -6121 BD+11 2984 148228102165 162129.2+113802162611.5+112427 26.53 37.36 6.11 +1.03 G8III -0.031+0.014 -021 -6122 CD-3610783 148247207688 162134.6-365717162814.7-371046343.67 8.00 5.79 +1.10 K1IIICNII +0.033-0.008 -014 -6123 25 HerBD+37 2750 148283 652903296 S 162150.3+373718162524.2+372338 59.90 44.23 5.54 +0.17 +0.09 A5V +0.006-0.012 -001V 242 0.2 * -6124 BD+02 3106 148287121604 162147.7+023427162650.1+022051 16.87 32.91 6.07 +0.92 +0.61 G8III +0.023-0.027 +004V? -6125 CP-61 5701 1482912535823302 162156.0-612443163049.4-613801326.10-09.08 5.20 +1.23 K0II-IIICNIb-II -0.013-0.013 +.006+004V? -6126 BD+69 845 148293 17062 I 162202.2+692026162148.7+690634101.80 38.23 5.25 +1.12 +1.11 +0.53 K2III -0.019-0.004 +.009-008V < 19: -6127 BD+55 1845 148330 29931 614 DQ Dra 162214.0+552557162425.3+551218 84.45 42.72 5.74 0.00 +0.01 A2Si3955 Sr v+0.012+0.023 -004V 10 * -6128 BD-07 4292 148349141186 I V2105 Oph162220.0-072210162743.5-073553 7.43 27.22 5.23 +1.72 +2.07 +1.29 M3-III +0.014-0.155 +.008+099V? * -6129 3Ups OphBD-08 4243 1483671411873299 W 7738 162223.5-080853162748.1-082218 6.74 26.74 4.63 +0.17 +0.08 +0.09 A3m -0.087+0.021 +.028-031SBO 44 3.2 1.1 * -6130 BD+62 1478 148374 17073 10052 162227.5+615526162347.0+614148 92.82 40.91 5.67 +0.96 G8III -0.037+0.034D+.003-024V? 1.0 1.1 * -6131 CD-4510697 1483792268133301 QU Nor 162227.4-460116162942.3-461436337.25 1.58 5.35 +0.56 -0.44 +0.47 B1.5Iape -0.001-0.005 -012V 66 * -6132 14Eta DraBD+61 1591 148387 17074 I 10058 7713 162238.1+614426162359.5+613051 92.58 40.95 2.74 +0.91 +0.70 +0.46 G8-IIIab -0.017+0.061 +.051-014SB? < 17 4.8 564.9ABxC 3* -6133 CP-87 259 148451258754 162251.2-872333171559.3-873359305.41-26.12 6.57 +0.91 +0.56 G5III -0.119-0.155 -004 -6134 21Alp ScoCD-2611359 148478184415 616I 10074 Alp Sco 162316.4-261236162924.4-262555351.95 15.06 0.96 +1.83 +1.34 +1.23 M1.5Iab-Ib+B4Ve -0.010-0.020 +.024-003SB =< 20 4.2 2.9 * -6135 CP-70 2256 1484882574093306 162316.8-704619163419.3-705917319.16-15.53 5.50 +1.22 +1.24 K1IIICNIa-Ib -0.017-0.013 -017 -6136 BD+00 3529 1485131216233300I 162328.2+005320162834.0+003954 15.44 31.66 5.39 +1.46 +1.80 +0.78 K4IIIp +0.004-0.067 +.006+007V =< 19: * -6137 BD-07 4299 148515141195 10072 162324.6-075418162848.9-080744 7.13 26.69 6.48 +0.40 +0.02 F2V -0.058-0.073 +000SB 3.1 5.4AB 3* -6138 CP-82 687 148527258748 162330.8-830212164553.6-831420309.22-23.47 6.57 ?+1.57? K4III +0.009+0.013 -017 -6139 CP-86 333 148542258751 921 162334.7-861043170058.5-862152306.50-25.40 6.04 +0.05 +0.02 A2V +0.005-0.001 +007 89 -6140 BD-14 4433 1486041599481430 162407.7-141953162946.9-143303 1.65 22.62 5.68 +0.82 G2-6III +0.037+0.014 -031 -6141 22 ScoCD-2412695 148605184429 162407.8-245342163012.4-250654353.10 15.80 4.79 -0.11 -0.72 -0.14 B2V -0.008-0.022 +004V 232 * -6142 CD-4110695 148688226855 W 7781 162444.7-413600163141.7-414901340.72 4.35 5.33 +0.33 -0.77 +0.30 B1Iae v-0.016 0.000 -014 93 4.3 58.0AC 3* -6143 CD-3411044 1487032077321431 162450.7-342911163122.9-344216345.94 9.22 4.23 -0.16 -0.80 -0.15 B2III-IV -0.009-0.017 +001SB 90 * -6144 BD-07 4305 148743141206 162506.6-071748163029.9-073054 7.96 26.71 6.50 +0.37 +0.20 A7Ib -0.015-0.011 +002SB? 30 * -6145 CD-2611379 148760184437 162514.4-261912163122.8-263216352.17 14.66 6.10 +1.08 K1III -0.029-0.034 +039V -6146 30 HerBD+42 2714 148783 461083303I g Her 162521.4+420606162838.5+415254 66.16 43.72 5.04 +1.52 +1.17 +2.23 M6-III +0.030-0.009 +.018+003 * -6147 8Phi OphBD-16 4298 148786159963 I 10086 162524.8-162341163108.3-163646 0.13 21.08 4.28 +0.92 +0.72 +0.44 G8+IIIa -0.051-0.035 +.014-034V < 19: 6.8 120.0AC 3* -6148 27Bet HerBD+21 2934 148856 84411 618I W 7778 162555.2+214227163013.2+212923 39.01 40.21 2.77 +0.94 +0.69 +0.47 G7IIIa -0.098-0.015 +.024-026SB1O < 19: 7.3 256.2 * -6149 10Lam OphBD+02 3118 148857121658 10087 7784 162552.1+021210163054.8+015902 17.12 31.85 3.82 +0.01 +0.01 -0.01 A0V+A4V -0.027-0.073 +.010-014SB 127 1.0 1.2AB 4* -6150 BD+51 2106 148880 299563304 10079 162610.3+513735162843.4+512428 79.20 42.86 6.29 +1.05 G9III +0.034+0.006 -016 6.6 5.9 -6151 The TrACP-65 3331 1488902536143312 162606.8-651701163544.8-652943323.54-12.06 5.52 +0.93 +0.73 G8-K0III +0.032-0.029 +.014+010 -6152 BD+20 3283 148897 84416 I 7785 162613.0+204152163033.6+202845 37.79 39.82 5.25 +1.29 +1.22 +0.70 G8IIICN-2CH-1 -0.078-0.063 +.000+019V? < 17 * -6153 9Ome OphBD-21 4381 1488981844503307 Ome Oph 162612.4-211509163208.2-212759356.30 17.83 4.45 +0.13 +0.13 +0.02 A7p +0.028+0.039 +.028+003 41 * -6154 BD+22 2983 149009 84423 I 162656.6+222437163113.4+221143 39.98 40.21 5.76 +1.61 gK5 -0.012+0.003 -026V -6155 Mu NorCD-4310900 1490382269003311 Mu Nor 162658.5-435000163405.0-440243339.38 2.51 4.94 +0.05 -0.94 B0Ia +0.005-0.004 +009V? 147 * -6156 34 HerBD+49 2514 149081 46128 162721.2+491043163006.0+485739 75.86 42.99 6.45 +0.03 0.00 A1V -0.048-0.062 -008 59 -6157 BD+35 2828 149084 653563308I 162722.8+352625163102.8+351330 57.05 42.92 6.25 +1.64 +1.89 K5 -0.008-0.016 +024 -6158 28 HerBD+05 3223 1491211216763309 162740.3+054403163235.7+053116 21.01 33.25 5.63 -0.06 -0.18 B9.5III +0.015+0.001 -027 5 -6159 29 HerBD+11 3008 1491611022343310I 7812 162755.4+114210163236.3+112917 27.46 35.97 4.84 +1.49 +1.83 +0.86 K7III -0.180-0.078 -.012+003 < 19: * -6160 CD-4410964 149174226926 7829 162756.3-450159163507.9-451441338.62 1.56 6.46 +1.34 K2-3III -0.022-0.073 -056 * -6161 15 DraBD+69 850 149212 17107 619 162810.5+685904162759.0+684605101.11 37.87 5.00 -0.06 -0.12 -0.02 A0III -0.025+0.036 +.014-007V 160 -6162 BD+45 2422 149303 46147 10105 162846.5+454835163147.3+453554 71.24 43.01 5.65 +0.12 +0.13 A4Vn -0.007+0.043D+.022-016V 3.3 16.3 -6163 Bet ApsCP-77 1221 1493242574243319 W 162847.1-771829164304.6-773103314.18-20.06 4.24 +1.06 +0.95 +0.37E K0III -0.287-0.350 +.034-030 7.8 51.1 * -6164 CD-4211399 149404226953 V918 Sco 162920.4-423908163622.5-425132340.54 3.01 5.47 +0.40 -0.63 +0.35 O9Ia e-0.006-0.009 -036SBO 140 * -6165 23Tau ScoCD-2711015 149438184481 620 162939.3-280031163553.0-281258351.54 12.81 2.82 -0.25 -1.03 -0.25 B0V -0.008-0.022 +.020+002V 24 * -6166 CD-3411112 149447207814 I 7844 162947.5-350258163622.5-351520346.22 8.09 4.16 +1.57 +1.94 +1.00 K6III +0.022 0.000 +.022-002V? -6167 CP-60 6594 149485253638 163001.8-604711163852.7-605925327.24-09.37 6.18 -0.08 -0.39 B7Vn -0.005-0.023 -007 375 -6168 35Sig HerBD+42 2724 149630 46161 621 S 7837 163052.7+423836163406.2+422613 66.91 42.70 4.20 -0.01 -0.10 -0.01 B9V -0.011+0.046 +.010-011 270 3. 0.1 * -6169 BD+17 3053 1496321022593313 W 163057.3+171548163526.3+170326 34.18 37.56 6.41 +0.05 0.00 A2V -0.007-0.004 -009SB2O 71 1.0 156.6 * -6170 BD+61 1598 149650 171301432 163100.7+610158163225.7+604924 91.30 40.20 5.94 +0.02 +0.05 A2V +0.022-0.010 -009V 80 -6171 12 OphBD-02 4211 1496611412691433 V2133 Oph163106.2-020640163621.5-021929 13.73 28.42 5.75 +0.82 +0.48 +0.39 K2V +0.458-0.310 +.093-015V * -6172 Eta1TrACP-68 2789 149671253649 163103.9-680548164123.3-681746321.70-14.29 5.91 -0.08 -0.42 B7IVe -0.006-0.012 -043SB? -6173 BD+79 498 149681 85273305 163117.3+791038162543.1+785750112.31 33.28 5.56 +0.26 +0.05 F0V -0.115+0.108 +.028-012 -6174 CD-4310959 149711226989 W 163121.6-431145163826.2-432355340.39 2.37 5.83 -0.02 -0.59 B2.5IV -0.022-0.027 +001 3.2 16.3 * -6175 13Zet OphBD-10 4350 149757160006 622I Zet Oph 163139.0-102153163709.5-103402 6.28 23.59 2.56 +0.02 -0.86 -0.04 O9.5Vn t+0.014+0.026 +.003-015V 379 * -6176 BD+15 3029 149822102271 V773 Her 163210.4+154205163643.0+152953 32.51 36.69 6.30 -0.11 -0.18 B9pSiCrSr: -0.009-0.008 +000 85 * -6177 CP-60 6603 149837253651 W 163203.0-601444164050.5-602646327.81-09.20 6.18 +0.48 F2III-IV +0.051-0.070 +004 2.7 1.4 -6178 CD-3610879 1498862078783317 W 163223.5-370058163905.2-371303345.10 6.38 5.91 0.00 -0.12 B9-A0V+B -0.012-0.047 +003 0.0 0.1AB 3* -6179 BD-06 4467 1499111412843315 Var 163240.1-062012163801.6-063217 10.04 25.74 6.09 +0.16 +0.13 A0pCrEu v-0.007-0.008 -022 * -6180 BD+72 734 150010 8544 163300.0+724908163128.1+723643105.32 35.99 6.30 +1.32 +1.29 K2III -0.043+0.041 +.011-033 -6181 BD+13 3177 1500121022783316 163311.4+135322163748.0+134113 30.58 35.73 6.31 +0.41 +0.02 F5IV -0.035-0.063 -021 30 * -6182 CP-67 3196 150026253673 163314.5-671414164322.1-672557322.52-13.89 6.03 +0.02 +0.02 A0Vn +0.012-0.037 -002 -6183 BD+46 2194 150030 461843314 163316.1+464856163611.2+463648 72.55 42.19 5.79 +1.04 +0.88? G8II -0.011+0.004 -015 -6184 16 DraBD+53 1875 150100 30012 10129C 163349.4+530604163611.5+525401 80.94 41.48 5.53 -0.07 -0.15 B9.5Vn -0.009+0.033D+.010-009V 83 0.0 90.3AC 4* -6185 17 DraBD+53 1876 150117 30013 10129A 163351.9+530731163613.7+525528 80.97 41.48 5.08 -0.04 -0.15 B9V -0.009+0.027D+.010-010V 216 0.0 90.3AC 4* -6186 17 DraBD+53 1876 150118 10129B 163351.2+530730163614.1+525527 80.97 41.48 6.53 -0.06 -0.16 A1Vnn -0.009+0.027D+.010-018 250 0.0 90.3AC 4* -6187 CD-4811070 150136227049 W A 163350.8-483401164120.3-484547336.71-01.57 5.65 +0.13 -0.80 O5III(f) -0.008-0.003D+.007+023SB 152 1.2 9.6AC 6* -6188 CD-4910890 1501682270583321 163406.0-492722164140.2-493906336.08-02.20 5.65 -0.03 -0.87 B1Iab-Ib -0.001-0.007 +006SB 154 * -6189 BD-09 4430 150177141298 163410.8-092111163939.1-093316 7.57 23.68 6.35 +0.48 -0.07 F3V +0.007-0.145 -019V =< 15 -6190 BD-20 4537 150259184541 I: 163440.7-201249164034.5-202431358.46 16.97 6.26 +1.08 gG9 +0.012+0.034 +033V? -6191 BD+77 627 150275 8548 623 163456.2+773844163038.8+772648110.58 33.82 6.34 +1.00 +0.71 K1III -0.104+0.276 +.017-032V? * -6192 CD-3211913 150331207930 163517.0-325701164145.5-330847348.57 8.64 5.87 +0.65 +0.24 G3III -0.059-0.083 -008 -6193 CD-2412765 1503661845493322 163532.4-241627164136.2-242805355.34 14.23 6.09 +0.20 +0.06 +0.10 F0V -0.049-0.008 -047 34 -6194 36 HerBD+04 3234 150379121774 10149B 163537.2+042408164035.1+041226 20.79 30.87 6.93 +0.13 +0.12 A3IV -0.002-0.011 +.001-028V? 80 1.2 69.6AB 4* -6195 37 HerBD+04 3235 150378121776 10149A 163540.7+042453164038.7+041311 20.82 30.87 5.77 -0.02 -0.03 A1V -0.001-0.013 +.001-034 140 1.2 69.6AB 4* -6196 BD-17 4618 150416160046 624I 163547.3-173255164134.4-174432 0.82 18.43 4.96 +1.11 +0.87 +0.60 G7.5IICN1Ba0.4 -0.020-0.001 +.047-025 < 19: * -6197 CD-4510858 150421227092 163546.3-455242164303.4-460414338.93-00.02 6.23 +0.85 +0.59 F5Iab -0.015-0.018 -016 * -6198 BD+63 1289 150429 17165 I 163554.4+631626163655.0+630422 93.89 39.03 6.16 +1.53 K5 +0.004-0.087 -042 -6199 BD+56 1907 150449 300263320I 163559.1+561239163800.4+560056 84.94 40.67 5.29 +1.08 +0.90 +0.52 K1III 0.000+0.066 +.015-019V? < 17 -6200 42 HerBD+49 2531 150450 462101434I 10144 7896 163601.9+490726163844.9+485542 75.61 41.58 4.90 +1.55 +1.76 +0.90E M2.5IIIab -0.047+0.031 +.017-055 5.4 25.6 * -6201 BD-00 3168 150451141310 163602.1-004823164111.5-010002 15.73 28.10 6.24 +0.30 +0.07 +0.18 A7III +0.006-0.015 -012 64 -6202 BD-19 4406 150453160052 I:W 163600.9-194358164153.7-195528359.06 17.02 5.57 +0.43 F4IV-III +0.022+0.041 +005 8.0 22.5 -6203 BD+12 3063 150483102314 163611.9+123520164051.4+122342 29.51 34.53 6.08 +0.05 +0.03 A3Vn -0.026-0.010 -032V? 230 -6204 CP-66 3009 150549253688 W LP TrA 163635.9-665521164640.0-670635322.98-13.93 5.13 -0.08 -0.45 ApSi -0.014-0.015 +.005-002 56 6.2 25. AB 3* -6205 14 OphBD+01 3290 1505571217903324 163638.5+012220164142.5+011052 17.93 29.12 5.74 +0.32 +0.07 F2-4III-IV -0.097+0.051 +.030-045 67 * -6206 CD-4010649 150573227118 W 163649.2-405543164345.5-410708342.75 3.13 6.20 +0.14 +0.17 A4V -0.046-0.016 -026 0.1 95.7 * -6207 CP-5210161 1505762441063327 W 163645.3-525747164439.8-530909333.74-04.85 5.96 +1.26 G8III -0.009-0.018 -002V 6.0 40. -6208 BD+25 3115 150580 845363323I 163651.7+250306164100.6+245131 44.12 38.82 6.06 +1.31 K2 -0.034 0.000 -068 -6209 CD-4010653 150591227123 W 163657.4-405524164353.9-410647342.77 3.12 6.12 -0.07 -0.52 B6-7V -0.026-0.013 -002 0.1 95.7 * -6210 CD-3710942 150608207966 W 163701.9-375756164347.6-380924345.01 5.06 6.05 -0.06 B9II-III -0.009-0.049 +007 6.2 50.0 -6211 CD-3113161 1506382079673325 163712.8-315457164338.7-320622349.63 9.01 6.46 -0.08 B8V -0.002-0.023 -003V? -6212 40Zet HerBD+31 2884 150680 65485 I 10157 7915 163730.9+314701164117.2+313611 52.66 40.28 2.81 +0.65 +0.21 +0.32 G0IV -0.470+0.394 +.102-070SB1O=< 10 2.6 1.1 * -6213 39 HerBD+27 2668 150682 84543 S 163733.2+270634164136.7+265501 46.72 39.22 5.92 +0.40 -0.07 F2III +0.002-0.044 -012SB2O 0.1 * -6214 CD-4010661 1507422271463329 W 163746.9-403905164442.6-405023343.08 3.18 5.71 -0.12 -0.63 B3V -0.010-0.024 +012 6.3 8. * -6215 CP-58 6889 150745244122 163748.9-581903164621.2-583013329.77-08.48 5.74 -0.09 B2IV-V -0.008-0.016 -016 219 -6216 CD-2711103 150768184591 10173 7935 163804.9-271606164417.3-272722353.35 11.87 6.58 +0.10 A2V -0.019-0.007D+.012-026 4.0 2.0AB 3* -6217 Alp TrACP-68 2822 150798253700 625 163804.3-685038164839.9-690140321.54-15.26 1.92 +1.44 +1.56 K2IIb-IIIa +0.014-0.034 +.031-003 -6218 CD-2812358 150894184602 W 7944 163844.8-281924164500.2-283035352.63 11.08 6.02 +0.09 A3IV -0.028+0.001 -055 7.7 5.6 -6219 CP-58 6893 150898244133 163848.4-580927164719.5-582029329.98-08.47 5.58 -0.08 -1.00 B0.5Ia -0.019-0.020 -053V 128 * -6220 44Eta HerBD+39 3029 150997 65504 626I W 7934 163928.0+390644164253.8+385520 62.28 40.90 3.53 +0.92 +0.60 +0.48 G7.5IIIbFe-1 +0.037-0.083 +.034+008V? 8 113.5 * -6221 CD-3910677 151078208020 163957.4-391137164647.8-392238344.46 3.82 5.48 +0.98 K0III -0.032-0.034 -009 -6222 BD+34 2830 151087 655123330 164010.2+341323164351.7+340220 55.92 40.16 5.99 +0.29 +0.06 F2-3III-IV -0.071+0.058 -010V? -6223 18 DraBD+64 1145 151101 171883326I 164013.4+644643164055.1+643521 95.57 38.16 4.83 +1.22 +1.26 +0.61 K0III* +0.001-0.013 +.009+000 < 19: * -6224 16 OphBD+01 3298 151133121834 164024.7+011213164529.7+010113 18.32 28.22 6.03 -0.02 -0.14 B9.5III +0.002+0.013 -013V 100 -6225 25 ScoCD-2511667 151179184630 164043.9-252047164651.3-253143355.26 12.64 6.71 +1.18 gG6 -0.005-0.014 +002V -6226 BD+55 1872 151199 30062 7945 164055.7+555226164258.4+554125 84.35 40.04 6.16 +0.07 +0.11 A2VpSr +0.049+0.085 -045V 110 -6227 BD+16 3013 151203102365 I 7950 164050.7+155548164522.5+154443 33.78 34.86 5.56 +1.66 M3IIIab +0.027-0.043 +.023-019V? -6228 43 HerBD+08 3271 1512171218433332I W 7952 164101.7+084553164549.9+083457 26.03 31.77 5.15 +1.53 +1.94 +0.90 K5III 0.000+0.015 +.010-021V < 17 3.9 82.5AB 3 -6229 Eta AraCP-58 6906 1512492441681435 W 164108.8-585146164947.1-590229329.64-09.16 3.76 +1.57 +1.94 K5III +0.038-0.028 +.025+009 9.5 23.6 -6230 BD+43 2642 151388 46262 I 164203.5+432402164511.7+431302 67.98 40.67 6.05 +1.40 K4III -0.015-0.045 -013SB -6231 CP-67 3232 151404253718 164203.3-673022165217.4-674055322.86-14.71 6.32 +1.28 +1.51 K2III -0.073-0.064 +008 -6232 19 OphBD+02 3175 1514311218591436 10207 7962 164207.2+021441164709.8+020352 19.58 28.39 6.10 +0.14 +0.14 A3V -0.010-0.014 -006SB2 3.6 23.4AB 3 -6233 CP-65 3365 1514412537173337 164210.7-651203165153.9-652232324.72-13.28 6.13 -0.02 -0.28 B8II-III -0.004-0.014 -010 -6234 45 HerBD+05 3272 1515251218653333 W V776 Her 164250.9+052534164746.4+051448 22.85 29.80 5.24 -0.02 -0.02 B9pCr: -0.016-0.041 +.014-016SB 42 5.2 122.7 * -6235 BD-14 4486 1515271601043335 164246.1-144354164827.0-145434 4.25 18.81 6.03 +0.20 A0Vn -0.011-0.004 -026V 139 * -6236 CD-4910998 151566227281 W 164257.7-495212165035.9-500244336.71-03.55 6.47 +0.31 +0.07 A5III+F7III -0.018-0.023D+.008+025 0.1 3.2 * -6237 BD+57 1702 151613 30076 627 S 164323.9+565738164517.8+564655 85.67 39.53 4.85 +0.38 -0.06 +0.21 F2V +0.018+0.066 +.046-004SBO 53 * -6238 BD+79 511 151623 8592 164333.7+790622163752.9+785506111.93 32.79 6.32 +1.14 +1.20 +0.58 G9III -0.020+0.038 +.047-020 -6239 BD+13 3225 151627102393 164332.2+134604164808.9+133526 31.70 33.39 6.35 +0.87 G5III +0.016-0.016 +001 < 20 -6240 BD-15 4395 151676160116 V1010 Oph164344.9-152935164927.8-154003 3.76 18.16 6.10 A5V +0.012+0.031 -002SBO 155 * -6241 26Eps ScoCD-3411285 151680208078 628 7983 164341.1-340642165009.8-341736348.82 6.56 2.29 +1.15 +1.27 +0.60 K2.5III -0.611-0.255 +.022-003 -6242 BD+42 2749 151732 462883336I V636 Her 164407.7+422501164719.8+421420 66.70 40.25 5.87 +1.61 M4+III-IIIa +0.003-0.026 -007V? * -6243 20 OphBD-10 4394 1517691601181438 164418.0-103622164950.0-104659 8.04 20.93 4.65 +0.47 +0.07 +0.25 F7IV +0.096-0.093 +.016-001SB1O 13 * -6244 CD-3711023 151771208089 W Var? 164415.4-372028165059.8-373052346.42 4.39 6.11 +0.12 -0.14 B9pSi* -0.029-0.009D+.006-017SB? 2.2 6.7 * -6245 CD-4110957 151804227313 7992 164435.2-410331165133.7-411350343.62 1.94 5.22 +0.07 -0.84 O8Iaf +0.001-0.001 -065V? 124 * -6246 BD+13 3233 151862102410 10225 164457.5+132608164934.6+131541 31.51 32.94 5.91 +0.03 -0.02 A1V -0.029-0.021D+.013-023V? 74 4.0 5.3AB 4 -6247 Mu 1ScoCD-3711033 1518902081021439 Mu1 Sco 164505.7-375233165152.2-380251346.12 3.91 3.08 -0.20 -0.87 -0.19 B1.5V+B6.5V -0.011-0.025 -025SB2O 239 0.4 390. * -6248 BD-02 4259 151900141393 164509.1-022850165022.3-023914 15.51 25.28 6.32 +0.42 -0.05 F1III-IV +0.009-0.030 +031 40 -6249 CD-4110972 151932227328 I: V919 Sco 164518.2-414103165219.1-415116343.22 1.43 6.49 +0.23 -0.65 +0.39 WN7-A -0.018-0.001 +025V * -6250 47 HerBD+07 3256 151956121895 7990 164528.0+072513165019.4+071452 25.23 30.18 5.49 +0.10 +0.11 +0.05 A3m +0.053-0.011 +.025-004SB? 26 * -6251 CP-57 8157 151967244245 164530.9-574417165400.5-575434330.88-08.89 5.94 +1.59 +1.92 M1III -0.032-0.126 -041 -6252 Mu 2ScoCD-3711037 151985208116 164533.6-375049165220.1-380103346.20 3.86 3.57 -0.21 -0.85 -0.22 B2IV -0.011-0.024 +001V? 57 0.4 390. * -6253 CP-63 4032 152082253734 W 164604.7-630612165524.7-631611326.67-12.31 6.02 +0.05 A0III +0.008-0.023 -009 6.9 7. * -6254 52 HerBD+46 2220 152107 46305 10227 V637 Her 164618.5+460927164914.2+455900 71.61 39.96 4.82 +0.09 +0.04 +0.01 A2VpSrCrEu v+0.026-0.055 +.010-001V 31 4.6 1.8AxBC 5* -6255 21 OphBD+01 3323 152127121911 10230 164620.5+012311165124.9+011258 19.35 27.04 5.51 +0.05 +0.03 A2V s -0.023-0.005 +.021-026V 59 1.5 0.4 * -6256 BD+43 2654 152153 46311 164634.0+433609164940.5+432550 68.28 39.86 6.13 +1.26 +1.31 K0IV -0.017-0.007 -020 -6257 CD-4211627 152161227359 8012 164636.4-425259165342.5-430303342.46 0.48 5.96 +1.73 M3II-III -0.016-0.027 -012V? * -6258 50 HerBD+30 2884 152173 846413339I 164644.7+295837165039.0+294824 50.91 37.96 5.72 +1.60 +1.92 M1IIIa -0.005 0.000 -010V -6259 BD+32 2795 152224 65595 164657.0+324321165043.1+323313 54.34 38.50 6.13 +1.01 +0.78 K0III +0.019+0.046 -030SB -6260 CD-4111024 152234227377 W 164700.7-413824165401.8-414823343.46 1.22 5.45 +0.19 -0.72 B0.5Ia -0.008-0.008 -006SB 99 1.5 0.4AB 8* -6261 CD-4111021 152235227374 V900 Sco 164657.0-414940165358.8-415941343.31 1.10 6.32 +0.50 -0.45 B1Ia e-0.002-0.018 -036 * -6262 Zet1ScoCD-4211633 152236227375 Zet1 Sco 164656.3-421144165359.7-422144343.03 0.87 4.73 +0.49 -0.56 B1Iape v+0.004-0.004 -026V 57 * -6263 CD-4111036 152249227383 8023 164710.3-414100165411.8-415101343.45 1.16 6.45 +0.20 -0.74 O9Ib +0.012-0.039 -024SB2O 100 * -6264 BD+42 2753 152262 46317 164723.8+420352165036.1+415348 66.29 39.63 6.29 +1.08 gK3 -0.074+0.070 -037 -6265 CD-4111041 152270227390 W Var? 164718.5-413915165419.6-414912343.49 1.16 6.59 +0.21 -0.54 +0.33 WC7+O5-8 -0.011-0.011 -044SB2O 6.6 4.3 * -6266 CD-4211642 152293227392 164723.0-421848165426.9-422844342.99 0.73 5.88 +0.64 +0.22 F5Ib-II -0.003-0.005 -024V * -6267 BD+77 634 152303 8612 10214 164732.8+774111164306.0+773051110.29 33.19 5.98 +0.42 -0.05 F4V +0.048+0.212 +.030+007V? 3.3 2.6AB 3* -6268 49 HerBD+15 3066 152308102435 629 V823 Her 164731.6+150831165204.9+145827 33.67 33.07 6.52 -0.05 -0.07 B9.5pCr: +0.017+0.004 -023V? -6269 BD-20 4572 152311184754 164730.9-201454165325.2-202456 0.37 14.58 5.88 +0.68 G3V -0.050-0.029 -017V? -6270 51 HerBD+24 3069 152326 846511440I 164736.5+244928165145.3+243923 44.73 36.42 5.04 +1.25 +1.29 +0.61 K0.5IIIaCa0.5 +0.011+0.006 +.010-016 -6271 Zet2ScoCD-4211646 152334227402 8028 164732.7-421124165435.0-422141343.10 0.79 3.62 +1.37 +1.65 +0.68 K4III -0.124-0.236 +.028-019 * -6272 CD-4010919 152408227425 W 8031 164759.8-405912165458.4-410904344.08 1.49 5.77 +0.15 -0.75 O8:Iafpe -0.017-0.013 -140V 140: 7.0 5.4 * -6273 CD-3013594 152431208176 164813.0-302523165436.0-303514352.31 8.16 6.35 +0.21 +0.17 +0.11 A7IIIm: +0.039+0.002 +001V? -6274 CD-5010905 152478244280 8047 164825.9-503044165608.9-504030336.78-04.64 6.33 -0.02 B3Vnep -0.006-0.019 +019V? * -6275 CP-5210333 152527244285 164836.8-520716165628.7-521702335.55-05.68 5.94 -0.08 B9V -0.045-0.046 -006 -6276 CP-69 2666 152564253756 164849.5-690636165933.8-691606321.93-16.18 5.79 -0.10 -0.44 ApSi -0.022-0.016 -001 -6277 BD-01 3268 152569141427 W 164859.7-012647165410.6-013644 17.04 25.01 6.25 +0.28 +0.11 F0V +0.015-0.071 -020 176 7.0 15.0AB 3* -6278 BD-11 4231 152585160159 164906.2-113744165440.3-114733 7.87 19.37 6.57 +0.14 A2IV e+0.022-0.013 -005 * -6279 53 HerBD+31 2925 152598 656271441 W 164910.4+315201165258.1+314206 53.39 37.87 5.32 +0.29 -0.02 F0-2V -0.091-0.017 +.012-022 59 6.7 70.9 -6280 23 OphBD-05 4374 1526011414313342I 164914.9-055925165435.7-060914 12.89 22.52 5.25 +1.08 +1.06 +0.53 K2III -0.031-0.020 +.021-017V? < 19: -6281 25Iot OphBD+10 3092 1526141024581442 8034 164916.5+101948165400.5+100955 28.73 30.66 4.38 -0.08 -0.32 -0.08 B8V -0.051-0.036 +.029-021SB2 118 -6282 CD-3311570 152636208205 164925.8-332045165557.8-333026350.19 6.12 6.37 +1.71 +2.06 K5III +0.023-0.002 -093 -6283 CD-4010975 152667227473 V861 Sco 164938.3-403947165636.0-404925344.53 1.46 6.15 +0.26 -0.67 B0.5Ia e+0.005-0.009 +004SB1O 161 * -6284 BD-16 4371 152781160171 W 165015.4-163849165601.8-164822 3.76 16.22 6.37 +0.92 +0.68 K0IV +0.081+0.040 -003V? 7.3 21.4 -6285 Zet AraCP-55 7766 152786244315 631 165020.5-554955165837.2-555925332.80-08.20 3.13 +1.60 +1.97 K3III -0.019-0.036 +.044-006 -6286 BD+47 2400 152812 46349 I S 165030.0+473437165317.6+472501 73.45 39.24 6.00 +1.32 +1.44 +0.70 K2III -0.037+0.105 -063 0.3 -6287 BD+21 3002 152815 846873343 165036.6+210710165455.2+205731 40.68 34.59 5.41 +0.97 +0.71 +0.49 G8III +0.056+0.006 +.011-003V? < 17 -6288 27 ScoCD-3311590 152820208232 165039.9-330603165711.1-331534350.54 6.07 5.48 +1.59 K5III -0.009-0.005 -076V -6289 CD-5010924 1528242443131444 165034.7-502859165818.0-503828337.02-04.88 5.55 +0.02 B9IV -0.009-0.041 -044V -6290 BD+13 3258 152830102474 V644 Her 165039.5+134653165516.0+133711 32.56 31.82 6.34 +0.34 +0.06 F3V s +0.034-0.036 -005SBO 23 * -6291 24 OphBD-22 4249 152849184822 10265 165046.1-225929165648.0-230900358.60 12.31 5.58 -0.02 A0V -0.004+0.001D+.009-026 0.3 1.0 -6292 56 HerBD+25 3156 152863 84692 10259 165056.5+255330165502.1+254350 46.27 36.01 6.08 +0.92 +0.62 +0.48 G5III +0.014-0.021 +001SB 4.6 17.9 * -6293 54 HerBD+18 3266 152879102476 I 10262 165058.4+183535165522.2+182600 37.86 33.62 5.35 +1.41 +1.66 +0.75 K4III -0.110+0.014 +.020+012V? 4.2 2.5AB 3* -6294 BD-19 4471 152909160180 10266A 165111.3-192254165704.0-193224 1.62 14.41 6.27 +0.07 -0.30 B6V+B7V -0.010-0.015D+.008-027 1.1 4.5 -6295 Eps1AraCP-5210372 152980244331 632 165136.7-530023165935.1-530938335.15-06.59 4.06 +1.45 +1.71 +0.54E K4IIIab +0.004+0.017 +.005+023 -6296 BD-10 4417 153021160186 165153.9-104816165726.1-105748 9.00 19.28 6.19 +1.00 +0.76 G8-K0III-IV +0.021-0.081 -103 -6297 CP-54 7947 153053244338 W 165158.7-542630170006.2-543549334.05-07.52 5.65 +0.19 +0.10 A5IV-V -0.015-0.064 -020 6.1 20.1 -6298 CD-3711131 153072208259 W 165206.1-372753165852.4-373716347.32 3.10 6.09 +0.19 +0.11 A3V +0.024-0.061D+.018-027 0.2 0.2 * -6299 27Kap OphBD+09 3298 153210121962 633I Kap Oph 165256.0+093149165740.1+092230 28.37 29.50 3.20 +1.15 +1.18 +0.54 K2III -0.291-0.010 +.031-056V < 17 * -6300 CD-4811360 153221227542 W 165254.0-482937170027.1-483852338.81-03.93 6.00 +0.88 G8-K0III+G -0.003-0.079 -029 1.1 1.0 -6301 BD+14 3155 1532261024963346 165257.1+140215165732.0+135303 33.10 31.42 6.37 +0.94 +0.70 K0V -0.077+0.070 -031 * -6302 BD-14 4509 1532291602053348 165300.2-144254165841.6-145211 5.80 16.82 6.59 +0.40 +0.01 F3IV -0.002-0.030 -013 53 -6303 CD-4511123 153258227547 165314.6-451801170032.3-452706341.35-01.98 6.65 +1.80 K4III -0.004 0.000 -000V? -6304 CP-58 6964 153261244362 V828 Ara 165306.8-584828170147.4-585730330.66-10.33 6.11 -0.03 B2IVne v-0.003-0.011 -006 201 * -6305 57 HerBD+25 3166 153287 84720 165324.6+253026165731.0+252110 46.01 35.36 6.28 +0.90 +0.55 gG5 +0.004+0.013 +009 -6306 BD+50 2345 153299 30161 I 165332.7+501143165606.4+500220 76.80 38.69 6.56 +1.62 +1.98 M2IIIab -0.021-0.008 -031V? -6307 BD+24 3095 153312 847263347 165333.2+243210165742.3+242253 44.89 35.04 6.32 +1.10 +0.95 K0III +0.006-0.018 -022 -6308 CD-2412997 153336184892 I 165350.2-245625165957.6-250531357.46 10.57 5.86 +1.62 +1.96 +0.97E M3III -0.005-0.006 -032V -6309 NOVA 1848 V841 Oph -096 * -6310 26 OphCD-2413002 153363184897 D 165401.9-245011170009.5-245921357.57 10.59 5.75 +0.41 F4V +0.061-0.057 +019V? * -6311 CD-3511236 153368208293 165356.6-354654170036.9-355603348.86 3.87 5.97 +1.16 K2IIICNII -0.013-0.070 +017 -6312 CD-5010955 153370244370 W 165359.7-505850170146.1-510751336.97-05.62 6.45 +0.27 A7V -0.027-0.039 -028 0.3 0.1 * -6313 BD+42 2774 153472 464013349 165441.0+423959165750.2+423045 67.19 38.33 6.34 +1.28 +1.41 K3III -0.007-0.046 +028SB -6314 Eps2AraCP-53 8316 153580244388 W 165509.2-530512170308.8-531413335.41-07.06 5.29 +0.48 F6V -0.003-0.144 +.039+007 58 7.6 25. -6315 19 DraBD+65 1157 153597 17281 8078 165528.6+651715165601.7+650805 95.68 36.47 4.89 +0.48 -0.03 +0.27 F6V v+0.240+0.050 +.062-023SB1O 0 * -6316 CD-3113473 1536132083243354 W 165524.5-315941170152.7-320837352.04 5.97 5.03 -0.10 -0.35 B8V -0.007-0.051 +005V 7.5 23.8AB 4* -6317 BD+06 3332 1536531219953352 S 165536.7+064401170029.4+063501 25.88 27.63 6.59 +0.23 +0.09 A7V +0.044-0.048 -010SB 158 0.1 -6318 30 OphBD-04 4215 1536871414831445I W 8111 165547.1-040422170103.6-041321 15.58 22.18 4.82 +1.48 +1.83 +0.79 K4III -0.041-0.075 +.015-007 < 19: 4.8 94.1 -6319 20 DraBD+65 1159 153697 17285 10279 8081 165555.4+651128165625.2+650221 95.55 36.45 6.41 +0.38 +0.02 F1-3V -0.041+0.032 +.029-021 90 0.2 1.0 * -6320 CP-57 8265 1537162444013355 165553.6-573404170424.7-574244331.89-09.87 5.73 -0.10 -0.56 B5IV e-0.008-0.022 +003V? 181 * -6321 29 OphBD-18 4381 153727160231 165600.1-184418170151.2-185308 2.85 13.88 6.26 +1.38 +1.26 K0III -0.038-0.018 +044 -6322 22Eps UMiBD+82 498 153751 2770 912 10242 Eps UMi 165612.2+821208164558.1+820214115.00 31.05 4.23 +0.89 +0.55 +0.47 G5III +0.017+0.006 +.010-011SB1O 23 8.3 76.9 * -6323 CD-4611191 153791227588 W 165615.4-470059170341.7-470936340.33-03.45 6.06 A2-3V +0.005+0.029 +000 6.0 6.2 * -6324 58Eps HerBD+31 2947 153808 65716 634 165627.7+310425170017.4+305535 52.85 36.17 3.92 -0.01 -0.10 -0.04 A0V -0.047+0.028 +.028-025SBO 78 * -6325 BD+22 3045 153834 84758 I 165644.7+224646170058.1+223756 43.15 33.80 5.65 +1.33 gK3 -0.011-0.021 +011 -6326 BD+15 3095 153882102536 10310 V451 Her 165700.2+150544170133.0+145658 34.69 30.95 6.31 +0.04 +0.04 B9pCrEu v+0.004-0.008 -032V 26 4.6 19.0 * -6327 CD-3711201 153890208355 V923 Sco 165701.6-380031170350.8-380908347.50 2.00 5.91 +0.38 -0.02 +0.18 F4IV+F2V +0.071-0.023 -015SBO * -6328 BD+27 2738 153897 84765 165708.7+272039170109.6+271147 48.46 35.08 6.55 +0.41 -0.08 F5V -0.014-0.063 -031 40 -6329 BD+08 3337 153914122023 10312 165710.7+083544170159.1+082702 27.95 28.14 6.33 +0.09 +0.06 A4V +0.039+0.003D+.010+006SB 115 0.8 1.2 * -6330 BD+56 1934 153956 301903353 165731.3+565007165921.5+564119 85.18 37.64 6.03 +1.16 gK1 -0.051+0.037 -015 -6331 CD-4511188 154025227601 165746.9-452137170505.3-453006341.79-02.64 6.28 +0.07 +0.10 A2V -0.031-0.017 -005 -6332 59 HerBD+33 2817 154029 657361446 165754.8+334246170136.4+333406 56.13 36.45 5.25 +0.02 +0.02 A3IV +0.003+0.002 +.023-012V? 35 -6333 BD+25 3183 154084 847763356 165812.7+253847170218.7+253020 46.57 34.37 5.75 +1.02 +0.79 gG7 +0.055+0.097 +.014-050 -6334 CD-3311706 154090208377 W 165814.5-335856170449.4-340722350.83 4.29 4.87 +0.26 -0.68 +0.17 B1Ia t+0.008-0.002 +004V? 91 9.1 20. * -6335 BD+73 751 154099 86673351 165815.6+731644165616.8+730740105.04 34.11 6.30 +0.24 +0.11 F0V 0.000-0.021 -013V 177 -6336 BD+32 2835 154126 65745 165830.0+320136170217.2+315305 54.12 35.97 6.36 +1.13 K0 +0.045+0.037 -013 -6337 BD+14 3179 154143102553 I 8142 165832.9+141409170307.8+140531 33.95 30.26 4.98 +1.60 +1.92 +1.21 M3III +0.023-0.064 +.005+043V * -6338 CD-4311396 154153227615 165835.7-435800170548.6-440618342.98-01.90 6.19 +0.28 +0.02 A4III +0.028+0.019 -033 -6339 BD+14 3180 154160102554 8143 165837.8+143930170310.4+143040 34.41 30.42 6.52 +0.76 +0.45 G5IV: -0.169-0.185 +.029-056 -6340 BD-20 4627 154204184999 165849.8-202115170445.3-202941 1.91 12.39 6.30 -0.02 B6IV -0.006-0.024 -011V -6341 BD+13 3292 154228102564 W 8152 165903.5+134450170339.3+133619 33.50 29.95 5.93 0.00 -0.04 A1V -0.023-0.035 -032V 29 0.2 299.2AB 4 -6342 BD+13 3295 154278102569 165921.8+134240170358.0+133403 33.49 29.87 6.08 +1.03 +0.84 K1III +0.022-0.129 +046V? * -6343 BD+19 3218 154301102571 I 10323 8158 165931.9+194949170352.7+194126 40.11 32.18 6.35 +1.52 K4III -0.019+0.016 -039SB 4.3 108.1AC 3* -6344 CD-3711274 154310208406 W 165934.6-370523170620.3-371339348.53 2.17 5.98 +0.07 +0.10 A2IV +0.012-0.023 -021 4.9 5.8AB 3 -6345 BD+69 884 154319 17305 165935.8+691959165902.6+691111100.40 35.11 6.40R K0 0.000-0.038 +.017-027 -6346 61 HerBD+35 2911 154356 65761 I 8159 165954.7+353319170330.2+352451 58.48 36.40 6.69R M4IIIab +0.033-0.035 +.010-012V? -6347 CD-3511306 154368208410 W 165948.9-351851170628.4-352704349.97 3.22 6.13 +0.50 -0.53 O9.5Iab +0.013-0.006 +002V? 100 6.5 2.8 * -6348 BD+60 1728 154391 17312 170000.5+604725170116.7+603857 90.05 36.81 6.13 +1.00 +0.82 K1III -0.055+0.058 -017 -6349 BD+00 3629 154417122056 V2213 Oph170011.3+005058170516.9+004209 20.77 23.78 6.01 +0.58 +0.06 F8.5IV-V e-0.003-0.338 +.046-018V =< 6 * -6350 BD-21 4512 1544181850243358 170013.4-212533170611.8-213353 1.22 11.49 6.30 +0.13 A3m -0.011-0.077 -045 -6351 BD+34 2890 154431 65766 170016.8+345546170353.5+344725 57.73 36.21 6.04R +0.22? A5V -0.068-0.002 -020SB2 125 -6352 BD+19 3220 154441102579 10326 170020.1+194414170441.3+193557 40.08 31.97 6.17R -0.01 -0.09 B9.5V +0.009+0.001 -024V? 81 3.0 1.9 -6353 BD-00 3224 1544451415133357 170022.9-004518170532.3-005331 19.30 22.93 5.64 +0.16 -0.64 +0.05 B1V +0.002+0.004 +016V 174 * -6354 CD-2611896 1544811850331447 170041.3-262239170653.2-263047357.24 8.47 6.29 -0.04 -0.24 A0III +0.001-0.011 -024V -6355 60 HerBD+12 3142 154494102584 635 10334 170044.4+125241170522.7+124427 32.78 29.22 4.91 +0.12 +0.05 +0.02 A4IV +0.051-0.010 +.022-004V? 111 6.1 56.0 * -6356 CP-61 5842 1545552538183362 170058.6-613239171006.3-614032329.02-12.75 6.39 -0.04 B8II-III -0.001-0.010 +004 -6357 CP-70 2361 154556257472 170101.1-703525171219.8-704316321.29-17.89 6.22 +1.06 +1.04 K1IVCNIII +0.041-0.079 -024 -6358 BD+09 3322 154610122075 I 170124.6+095208170609.7+094400 29.77 27.78 6.37 +1.45 +1.73 K5III +0.023-0.008 -006 -6359 BD+10 3142 154619102592 170129.5+103520170613.1+102715 30.51 28.07 6.37 +0.87 +0.57 G8III-IV +0.049+0.018 -024 -6360 BD+64 1170 154633 17324 170142.0+644421170215.3+643602 94.84 35.94 6.10 +0.96 +0.71 G5V -0.050+0.025 +.016-025V? -6361 BD-01 3292 154660141522 10347 170141.7-013117170652.9-013923 18.76 22.26 6.38 +0.20 +0.10 A9V +0.033-0.036 +007V 3.4 20.3 * -6362 BD+44 2652 154713 464781448 170202.1+435653170505.0+434844 68.93 37.09 6.43 +0.09 +0.16 A3IV +0.006 0.000 -009 -6363 BD+49 2583 154732 464763359 8185 170210.5+485631170449.8+484815 75.20 37.31 6.09 +1.09 +1.00 K1III +0.026-0.066 +012SBO * -6364 BD+22 3073 154733 848353360I 10343 170204.1+221310170618.1+220503 43.00 32.45 5.56 +1.30 +1.52 +0.67 K3III -0.094-0.038 +.011-096V 7.9 30.3 * -6365 BD-17 4717 1547791603051449 170226.4-172836170814.9-173633 4.82 13.37 5.99 +1.01 K0III +0.006-0.032 -014V? -6366 CD-3013840 1547832084673363 170224.2-301616170847.5-302413354.33 5.83 5.97 +0.25 +0.33 A/FmDel Del -0.015-0.062 -030 * -6367 BD-00 3230 154895141528 10355 170304.0-005651170813.6-010446 19.49 22.26 6.06 +0.08 +0.04 A1V+F3V -0.020-0.034D+.008-021SB 2.0 0.3 * -6368 CP-67 3296 154903253827 W 170304.3-670410171317.5-671148324.46-16.09 5.89 +1.06 +0.90 K0-1III -0.180-0.093 -008 3.2 34.1 * -6369 21Mu DraBD+54 1857 154905 30239 10345B 170315.3+543607170519.8+542813 82.30 37.02 5.83H F7V -0.073+0.085 +.046-018 23 0.1 2.0AB 3* -6370 21Mu DraBD+54 1857 154906 30239 10345A 170315.3+543607170519.7+542813 82.30 37.02 5.80H +0.48 +0.05 +0.24 F7V -0.073+0.085 +.046-015 13 0.1 2.0AB 3* -6371 CD-4411502 154948227688 W 170327.4-442543171042.3-443327343.15-02.87 5.08 +0.86 +0.58 +0.43C G8-K0III+G -0.033-0.056 +.017-007 7.9 13.2 -6372 BD-03 4063 154962141535 170338.8-034457170854.5-035258 16.98 20.69 6.36 +0.69 +0.36 G5-8IV-V -0.059-0.158 +015 * -6373 CP-74 1610 1549722574783368 170339.1-742440171635.6-743159318.01-20.12 6.25 -0.01 0.00 A0V -0.027-0.058 +000 -6374 CD-4811492 155035227699 170402.4-484452171138.9-485227339.74-05.54 5.84 +1.84 +1.85 M1-2III +0.029-0.030 +015V -6375 BD-10 4445 1550781603241450 170416.2-102334170948.0-103124 11.15 16.99 5.56 +0.52 +0.02 F5IV +0.057-0.105 +.014-003V? -6376 BD+40 3103 155102 46502 636 170430.9+403848170746.7+403058 64.90 36.29 6.34 +0.03 +0.04 A2IV -0.038-0.033 -007 45 -6377 BD+36 2827 155103 65812 10360 170429.3+360354170802.0+355607 59.31 35.58 5.39 +0.31 +0.05 +0.14 A5-F1III/IVm s -0.024-0.010 +.015-030 82 0.1 0.1AB 3* -6378 35Eta OphBD-15 4467 155125160332 I 10374 170438.5-153604171022.7-154329 6.72 14.01 2.43 +0.06 +0.09 +0.01 A2V +0.039+0.098 +.052-001SB 26 0.4 0.3AB 4* -6379 BD+75 613 155154 8697 8183 170448.6+752609170140.2+751750107.35 33.04 6.21R F0IV-Vn +0.016-0.079 +001SB 157 * -6380 Eta ScoCD-4311485 155203227707 638 170459.3-430626171209.2-431421344.37-02.30 3.33 +0.41 +0.09 +0.20 F3III-IVp +0.024-0.287 +.063-028 150 * -6381 CD-3911182 1552592085213366 170521.7-392254171216.2-393025347.40-00.12 5.67 +0.04 A1V -0.013-0.075 +012V? -6382 CD-3811632 155276208522 170524.3-384152171216.5-384920347.95 0.28 6.30 +1.05 K1IIICNII +0.019-0.043 -032 -6383 BD+51 2178 155328 30262 10369 170549.8+505808170817.1+505032 77.74 36.73 6.46 0.00 -0.13 A1V -0.002+0.029 -015 65 5.1 18.3 3* -6384 CP-56 8098 155341244539 V829 Ara 170546.4-564604171413.2-565318333.35-10.48 6.09 +1.78 +1.34 M1-2II-III+A -0.016+0.003 -034V * -6385 BD+12 3161 155375102632 170607.1+123530171045.8+122802 33.11 27.91 6.57 +0.08 +0.09 +0.05 A1m +0.037-0.007 +005SBO * -6386 CD-2512018 155379185138 170604.9-250753171213.6-251517358.98 8.23 6.54 -0.04 A0pHg -0.014-0.033 -003 * -6387 CD-2711516 155401185142 170609.2-273819171225.0-274543356.95 6.74 6.14 -0.04 B9Vn: -0.011-0.040 +001V * -6388 BD+40 3109 155410 465243365I S 170618.7+405408170933.3+404638 65.27 35.99 5.08 +1.28 +1.39 +0.64 K3III -0.042+0.012 +.019-056SBO < 17 * -6389 CD-3212460 155450208539 W 170628.4-321902171258.7-322619353.20 3.91 6.01 +0.07 -0.77 B1II +0.013-0.012 +017SB 114 7.5 30. * -6390 BD+08 3367 1555001221641451 170655.8+080059171145.2+075341 28.60 25.73 6.33 +1.04 +0.86 K0III +0.035+0.014 -006 -6391 63 HerBD+24 3140 155514 84896 V620 Her 170654.7+242135171103.2+241416 45.82 32.10 6.19 +0.23? A8V -0.011+0.033 -002 163 * -6392 CD-3911212 155603208569 I W V915 Sco 170731.8-393854171427.7-394601347.43-00.62 6.60 +2.21 +1.35 +1.08 G5Ia +0.005-0.011 -006 4.2 14.4AB 3* -6393 37 OphBD+10 3165 1556441026463369I W 170744.9+104222171227.8+103507 31.38 26.74 5.33 +1.59 +1.64 M2IIIa +0.001-0.026 +026V? 8.7 30.3 -6394 BD+00 3654 155646122182 170747.8+002825171254.4+002107 21.45 21.95 6.65 +0.50 +0.05 +0.27 F6III +0.019-0.078 +058 =< 10 * -6395 BD+52 2032 155711 302773367 170813.1+523152171030.6+522432 79.68 36.35 6.29 0.00 -0.18 B9V -0.014-0.010 -034V 50 -6396 22Zet DraBD+65 1170 155763 17365 639 S 170829.7+655016170847.2+654253 96.01 35.04 3.17 -0.12 -0.43 -0.12 B6III -0.020+0.022 +.023-017V 31 * -6397 CD-3311875 155806208585 8388 170845.3-332558171519.3-333254352.59 2.87 5.53 -0.01 -0.91 O7.5V[n]e +0.009 0.000 +004V? 162 * -6398 CD-3811686 155826208591 W 170845.9-382802171535.9-383538348.52-00.11 5.96 +0.58 +0.11 F7V+G2V -0.182-0.412 +.042-054 0.1 0.1 * -6399 BD+49 2604 155860 46561 10397 8327 170907.1+495155171140.2+494448 76.38 36.19 6.04R A5III +0.020+0.035 -011 3.4 5.2AB 3* -6400 CP-69 2715 155875253870 W 170906.4-695549172012.8-700244322.26-18.11 6.53 +0.60 +0.15 G0-1IV: -0.045-0.201 -005 2.7 1.4 -6401 36 OphCD-2612026 155885185199 I 10417B 170911.7-262721171521.0-263610358.30 6.88 5.11 +0.86 +0.53 K1V -0.458-1.142 +.188+000V? 0.0 4.6AB 5* -6402 36 OphCD-2612026 155886185198 I 10417A 170911.8-262717171520.8-263605358.30 6.88 5.07 +0.85 +0.53 K0V -0.491-1.133 +.188-001SB 0.0 4.6AB 5* -6403 CD-3013968 155940208606 170928.1-300543171551.5-301238355.38 4.71 6.21 -0.03 -0.09 B9.5V -0.001-0.037 -004 -6404 BD-14 4585 155970160402 10419 170939.1-142809171520.3-143502 8.38 13.64 5.99 +1.10 K1III -0.012-0.001 -003V? 5.1 4.2 * -6405 CD-3511426 155974208610 W 170941.1-353738171621.5-354458350.92 1.42 6.12 +0.48 -0.02 G0IV-V -0.118-0.319 +.023-001 7.4 36.5 -6406 64Alp1HerBD+14 3207 156014102680 I 10418A Alp Her 171005.2+143015171438.9+142325 35.53 27.82 3.48H +1.44 +1.01 +2.14 M5Ib-II e-0.006+0.036 -.002-033V 21 2.2 4.9AB 4* -6407 64Alp2HerBD+14 3207 156015102681 10418B 171005.5+143013171439.2+142324 35.53 27.82 5.39H G5III+F2V -0.003+0.045 -.002-037SBO =< 50 2.2 4.9AB 4* -6408 CP-59 6954 156091244613 W 171021.3-593507171912.4-594140331.34-12.58 5.91 +1.37 K2IIICNIb-II -0.012-0.008 -005 7.0 20. -6409 CD-3212545 1560982086261452 171033.2-323259171703.7-323946353.52 3.08 5.55 +0.50 +0.05 F6IV -0.096-0.056 -036 0 * -6410 65Del HerBD+25 3221 156164 84951 641I 10424 8419 171055.4+245725171501.9+245021 46.83 31.42 3.14 +0.08 +0.08 +0.03 A3IV -0.021-0.157 +.044-040SB 290 5.6 8.5AB 4* -6411 Iot ApsCP-69 2719 156190257491 642 W 8509 171056.5-700104172205.9-700724322.28-18.29 5.41 -0.04 -0.23 B9V+B9.5V -0.006-0.012 -004 0.0 0.1 * -6412 BD+02 3283 156208122224 S 8438 171111.9+021754171614.2+021110 23.62 22.10 6.17 +0.22 +0.16 A2V +0.001-0.021 +004 25 0.1 -6413 BD-06 4575 1562271415853371 171121.2-060802171642.8-061442 15.90 17.80 6.09 +1.10 +0.97 K0 -0.004-0.005 -021 -6414 BD+01 3408 1562471222261453 10428 U Oph 171127.2+011919171631.7+011238 22.73 21.57 5.88 +0.06 -0.45 B5Vnn+B5V -0.001-0.013 +.002-011SB2O 105 7.3 20.7 * -6415 41 OphBD-00 3255 156266141586 I 10429 171128.6-001957171636.7-002643 21.20 20.75 4.73 +1.14 +1.13 +0.59 K2III -0.023-0.066 +.010-002V? < 17 3.0 1.0 * -6416 CD-4611370 156274227816 W 171127.7-463155171903.2-463802342.29-05.26 5.48 +0.80 +0.38 +0.46 G8-K0V +0.979+0.224 +.131+023 3.1 7.5AB 4* -6417 Zet ApsCP-67 3310 1562772538823374 171132.3-673958172159.4-674614324.40-17.10 4.78 +1.21 +1.27 K2-III -0.042-0.006 +.014+013 -6418 67Pi HerBD+36 2844 156283 65890 643I 8431 171133.8+365518171502.8+364833 60.66 34.34 3.16 +1.44 +1.66 +0.72 K3IIab e-0.026+0.004 +.025-026V? < 17 * -6419 BD+23 3070 156284 84955 I 171132.1+235115171541.6+234434 45.66 30.94 5.96 +1.31 K2III -0.025+0.022 -042V? -6420 CD-4311572 156293227813 171133.6-440116171848.0-440747344.34-03.80 5.76 -0.05 -0.13 -0.02C B9V 0.000-0.021 -012 -6421 BD+63 1336 156295 173913370 171140.7+625918171232.6+625228 92.50 35.14 5.56 +0.21 +0.06 F0IV +0.014+0.048 +.014-005V? 114 -6422 CD-3212573 156325208657 W Var? 171149.6-322640171820.4-323312353.77 2.93 6.36 +0.15 -0.36 B5Vn e-0.013-0.019 -014V? 5.6 19.5 * -6423 CD-4911324 156331244631 W 171146.7-495720171930.3-500348339.50-07.27 6.27 +0.41 F8III+B9V -0.014-0.015 +011 0.0 0.1 * -6424 39Omi OphCD-2413255 156349185238 I 10442A 171154.7-241041171800.7-241713 0.54 7.70 5.20 +1.10 +0.90 K0II-III -0.054-0.008 +.013-029 1.5 10.2 * -6425 39Omi OphCD-2413255 156350185237 10442B 171154.6-241030171800.5-241703 0.55 7.71 6.80 +0.51 +0.05 F6IV-V -0.073-0.009 +.013-028V 1.5 10.2 * -6426 CD-3411626 156384208670 W 8482 171208.7-345240171857.2-345923351.83 1.44 5.91 +1.04 +0.82 +0.59 K3V+K5V +1.170-0.164 +.141+000 1.0 0.5AB 4* -6427 CD-4411595 156398227821 W 171209.8-440657171924.5-441323344.32-03.94 6.65 +0.20 +0.01 +0.15C B9.5V+A6III -0.007-0.015 -015 0.3 0.2 * -6428 BD-16 4470 156462160440 I 171233.6-161217171819.2-161843 7.30 12.09 6.43 +1.66 +2.05 M2IIIFe1 -0.005+0.010 -040V -6429 CP-80 828 1565132587691455 8609 171245.1-804559173127.3-805133312.32-23.69 5.88 +1.67 +1.81 M3III -0.013-0.044 -019 -6430 BD+23 3074 156593 84982 I 171324.5+231153171735.9+230527 45.11 30.32 6.45R K2 -0.002-0.001 -015 -6431 68 HerBD+33 2864 156633 65913 10449 u Her 171337.8+331228171719.5+330600 56.40 33.14 4.82 -0.17 -0.76 -0.19 B1.5Vp+B5III -0.008-0.003 +.009-021SB2O 116 5.1 4.4 * -6432 BD+17 3216 156653102724 171338.5+172529171805.0+171905 38.95 28.19 6.00 +0.01 +0.02 A1V +0.014-0.011 +004SB 24 -6433 BD+11 3156 1566811027253372I 171354.8+105822171837.0+105152 32.38 25.49 5.03 +1.55 +1.89 +0.83 K4II-III +0.010-0.095 -.002+040V? < 17 -6434 BD+06 3386 156697122270 V2112 Oph171359.4+061126171852.8+060507 27.69 23.34 6.51 +0.39 +0.15 F0-2IV-Vn +0.020+0.006 -025 139 * -6435 BD-17 4773 156717160462 10465 171404.0-173907171953.3-174523 6.28 10.99 6.02 +0.04 A2Vnn -0.010-0.021D+.012-004 1.5 2.0AB 3* -6436 69 HerBD+37 2864 156729 65921 8489 171413.3+372346171740.3+371730 61.35 33.91 4.65 +0.05 -0.03 0.00 A2V -0.034+0.063 +.018-010SB 149 -6437 BD+49 2614 156753 46605 171415.8+494755171648.6+494128 76.33 35.36 7.48R K2 +0.023+0.002 -6438 CP-57 8478 156768244678 W 171417.8-575436172255.0-580037333.05-12.07 5.88 +1.07 +0.86 G8Ib-II -0.021-0.011 -010 3.6 2.0 -6439 BD-05 4426 156826141611 171438.3-054833171959.5-055502 16.64 17.27 6.32 +0.85 +0.47 G9V +0.040-0.180 +.017-031V -6440 CP-62 5558 1568382539033378 171437.5-624556172401.1-625151328.89-14.75 5.70 -0.14 -0.76 B2IV -0.001-0.008 +004V? * -6441 BD-19 4605 156846160474 10476 171441.9-191339172034.2-191958 5.04 9.98 6.52 +0.58 G3IV -0.151-0.102 -069 7.5 5.1 * -6442 CP-56 8191 156854244685 171441.0-562534172306.9-563131334.34-11.29 5.80 +1.00 +0.77 G8-K0III -0.008+0.009 -006 -6443 BD+28 2719 156874 850013375 171453.1+285539171848.5+284923 51.59 31.77 5.65 +0.98 +0.49 K0III +0.050-0.005 +.016-014 -6444 BD+38 2910 156891 659303373 171501.7+385450171823.3+384841 63.18 34.03 5.94 +1.00 +0.81 gG7 -0.014+0.077 -038V? -6445 40Xi OphBD-20 4731 156897185296 W 171500.6-210020172100.2-210646 3.59 8.92 4.39 +0.39 -0.05 +0.22 F1III-IV +0.232-0.206 +.061-009 0 4.5 3.7 -6446 53Nu SerBD-12 4722 1569281604793376 10481 171512.1-124444172049.7-125049 10.63 13.46 4.33 +0.03 +0.05 0.00 A2V +0.042+0.004 +.028+005V 115 4.8 46.3 * -6447 CP-60 6800 156942253908 171517.6-603435172418.7-604025330.84-13.64 5.77 -0.08 B8Ib-II -0.008-0.002 -010 -6448 BD+60 1743 156947 17414 VW Dra 171516.6+604636171629.4+604014 89.76 34.96 6.32 +1.09 K1.5IIIb -0.042+0.014 +.003+017V? * -6449 BD-10 4477 156971160482 W 171520.2-103541172052.7-104146 12.51 14.60 6.46 +0.33 +0.01 F1III +0.065-0.009 +012 28 7.8 8.1 -6450 CD-3711507 157038208740 W 171549.9-374222172239.4-374818349.95-00.79 6.41 +0.64 -0.32 B4Ia +0.017-0.013 -014 5.8 2.7AB 3* -6451 Iot AraCD-4711484 1570422278863379 W Iot Ara 171545.6-472211172316.1-472806342.01-06.33 5.25 -0.11 -0.82 -0.08 B2IIIne v-0.010-0.024 -019 369 5.3 42.8 * -6452 BD+18 3351 1570491027571454I V656 Her 171554.4+180935172018.9+180326 39.96 27.97 5.00 +1.62 +2.06 +0.77E M2IIIab +0.009-0.055 +.006-046V? * -6453 42The OphCD-2413292 157056185320 644 The Oph 171552.0-245359172200.6-245958 0.46 6.55 3.27 -0.22 -0.86 -0.21 B2IV -0.004-0.020 -002SB 35 2.0 0.0 * -6454 CD-3511505 157060208741 171554.9-354853172238.0-355436351.51 0.28 6.47 +0.54 F7V +0.080+0.112 -006V -6455 BD+25 3246 157087 85016 171605.2+253821172009.8+253215 48.01 30.53 5.38 +0.03 +0.10 A3III +0.021-0.015 +.011-005SB 11 -6456 CD-3711512 157097208747 W 171607.4-370719172254.9-371314350.47-00.51 5.93 +1.08 K1III +0.033-0.026 -036 8.4 20.2 -6457 70 HerBD+24 3167 157198 85021 W 171647.0+243556172054.2+242958 46.93 30.05 5.12 -0.03 +0.02 A2V -0.022+0.002 +.010-018SB 99 3.5 222.9AB 3 -6458 72 HerBD+32 2896 157214 659631456 10488 8553 171655.0+323547172039.6+322804 55.88 32.31 5.39 +0.62 +0.07 +0.35 G0V +0.137-1.041 +.069-078V 0 5.1 230.0AB 3* -6459 43 OphCD-2813081 157236185350 I 171703.9-280245172321.6-280835358.02 4.54 5.35 +1.55 +1.80 K5III +0.004-0.031 +.028-014 -6460 CD-4411669 157243227911 171658.0-440359172413.0-440945344.86-04.62 5.12 -0.06 -0.40 -0.01C B7III -0.011-0.028 +013V 150: * -6461 Bet AraCP-55 8100 157244244725 645I' 171659.1-552607172518.0-553148335.37-11.01 2.85 +1.46 +1.56 +0.53E K3Ib-IIa -0.008-0.025 +.034-000 * -6462 Gam AraCP-56 8225 157246244726 W 171658.5-561700172523.6-562239334.64-11.48 3.34 -0.13 -0.96 B1Ib -0.002-0.012 -003V 281 7.0 17.9AB 3* -6463 BD+16 3163 157257102770 I 171705.7+164948172133.4+164351 38.69 27.20 6.35 +1.61 +1.98 M2.5IIIab -0.018-0.024 +039 -6464 74 HerBD+46 2293 157325 466453377I 8556 171731.6+462020172021.1+461427 72.16 34.58 5.59 +1.57 +1.86 M0III -0.029+0.043 -057V? * -6465 BD-02 4343 157347141642 171738.2-021721172251.3-022318 20.22 18.43 6.29 +0.68 +0.24 G5IV +0.045-0.112 -035 -6466 BD+28 2728 157358 85028 W 171736.1+285121172131.2+284529 51.71 31.18 6.35 +0.70 G0III +0.006+0.006 -006SB 11 2.2 0.6 -6467 BD+48 2506 157373 46651 171751.6+481715172033.6+481118 74.53 34.68 6.43 +0.43 -0.08 F4V +0.190-0.019 +.007+031 =< 15 -6468 Kap AraCD-5011269 157457244734 W 171812.1-503231172600.0-503801339.60-08.45 5.23 +1.06 G8III +0.007+0.001 +.030+017 8.3 30. AC 3 -6469 BD+40 3136 157482 46664 S V819 Her 171826.6+400422172143.6+395828 64.69 33.58 5.51 +0.68 +0.21 F9Vn: e+0.009-0.063 +.021+003SB2 12 0.0 * -6470 CD-3411674 157486208786 171824.2-343611172502.7-344147352.79 0.56 6.16 +0.02 A0VSiCr +0.004-0.027 -018V -6471 CP-62 5590 157524253928 171841.7-625650172807.7-630211328.99-15.24 6.24 -0.09 B7-8V -0.023-0.027 -003 -6472 BD-21 4597 157527185367 10522 171843.1-212053172442.0-212630 3.79 8.01 5.85 +0.93 +0.67 +0.32E G8III -0.021-0.028 +.013-056V? 6.0 4.3 * -6473 BD-18 4516 1575461605233382 171845.7-182110172437.1-182645 6.32 9.67 6.21 +0.03 -0.13 B9Vn +0.018-0.004 -021V -6474 CD-2413325 157588185374 171859.4-240908172506.2-241437 1.49 6.39 6.19 +1.10 gK1 +0.016+0.012 +020V -6475 CD-5110881 157599244749 171900.5-515132172656.3-515657338.56-09.29 6.19 -0.03 B8-9V +0.005-0.021 +001V? -6476 BD+08 3405 157617122346 I 171910.8+085644172357.6+085110 31.00 23.44 5.77 +1.25 +1.27 gK1 +0.009-0.002 +016 -6477 CD-4511531 157661227971 W 8637 171928.8-454512172651.5-455037343.72-05.94 5.29 -0.07 -0.34 -0.03C B7V+B9.5V -0.040-0.040D+.009-009V? 0.8 2.3AB 3* -6478 CD-5011283 157662244755 W 171924.5-503229172712.4-503749339.71-08.61 5.92 +0.08 B9II -0.007-0.004 +011 4.7 76.1AB 4 -6479 BD+53 1937 157681 303543381I 171935.5+533056172145.4+532514 80.90 34.64 5.67 +1.47 K4III +0.021+0.005 -008V -6480 73 HerBD+23 3100 157728 850623383 8606 171955.4+230311172406.6+225737 45.53 28.86 5.74 +0.21 +0.05 F0IV -0.046-0.032 -020 67 * -6481 BD+16 3174 157740102805 172002.7+162335172431.5+161804 38.56 26.37 5.71 +0.07 +0.12 A3V +0.008-0.026 +011 * -6482 BD+15 3179 157741102806 10528 172003.3+154149172433.8+153622 37.84 26.10 6.35 -0.02 -0.18 B9V +0.008+0.015 -019 338 4.3 3.9 * -6483 CP-5210662 1577532447633386 W 171959.8-521230172757.6-521750338.35-09.61 5.75 +1.17 K2III -0.006-0.065 -009V? 7.2 17. AB 3 -6484 75Rho HerBD+37 2878 157778 66000 10526B 172013.6+371419172340.7+370848 61.44 32.71 5.47H A0Vn -0.041+0.004 -.002-019 190 1.0 4.2AB 3* -6485 75Rho HerBD+37 2878 157779 66001 10526A 8605 172013.9+371416172341.0+370845 61.44 32.71 4.52H -0.03 -0.05 -0.01 B9.5III -0.037+0.006 -.002-021 81 1.0 4.2AB 3* -6486 44 OphCD-2413337 1577921854011457 8640 172015.7-240500172622.2-241031 1.71 6.19 4.17 +0.28 +0.12 +0.12 A3m 0.000-0.116 +.045-037 59 * -6487 CP-55 8144 157819244770 W 172022.0-550500172838.7-551011335.94-11.22 5.94 +1.11 G8II-III -0.017-0.012 -013 6.5 37.0AC 3* -6488 BD+38 2928 157853 66006 10531 172040.3+384022172402.2+383458 63.14 32.91 6.49 +0.73 +0.21 F8IV -0.012+0.040D+.001+027 0.1 0.1 * -6489 BD-01 3329 1578561416611458 172046.3-013352172557.9-013906 21.29 18.12 6.44 +0.46 -0.02 F3V +0.063+0.051 -024 8 -6490 CD-2512160 157864185406 172043.9-255119172655.2-255636 0.30 5.11 6.44 -0.06 A0V -0.028-0.026 -008V? -6491 BD+37 2882 157910 66014 10535 172059.2+370227172427.1+365707 61.25 32.52 6.28 +0.88 +0.53 +0.45 G5III+F0V -0.026+0.047 -016V? 3.6 33.2 * -6492 45 OphCD-2913557 157919185412 646 172058.0-294635172721.3-295201357.08 2.85 4.29 +0.40 +0.09 +0.18 F5IVDel Sct* +0.020-0.139 +.021+037 25 * -6493 BD-04 4275 157950141665 647 8662 172119.4-045954172637.9-050512 18.26 16.27 4.54 +0.39 -0.03 +0.21 F3V -0.092-0.043 +.032+000SB2O 52 * -6494 CD-2913563 157955185417 172114.9-293816172737.5-294328357.23 2.88 6.00 0.00 B9IV -0.008-0.026 -021V -6495 BD+17 3241 157967102819 I W V640 Her 172127.3+170018172554.4+165503 39.33 26.30 5.98 +1.62 M4IIIab -0.008+0.011 -010V? 7.5 23.1AC 3* -6496 BD-12 4750 157968160553 172125.3-122527172702.1-123045 11.74 12.36 6.21 +0.51 F7V +0.037-0.062 -040V? * -6497 BD+07 3368 1579781223813385 172129.3+074059172619.0+073544 30.06 22.36 6.06 +0.58 +0.28 +0.43 B9.5V+G0V 0.000-0.005 -011SBO * -6498 49Sig OphBD+04 3422 1579991223871459I 8664 172133.1+041338172630.9+040825 26.77 20.75 4.34 +1.50 +1.62 +0.77 K2II +0.004+0.007 +.008-027 < 19: -6499 BD+27 2809 158067 850803387 W 172200.4+265755172600.9+265244 49.95 29.69 6.41 +0.10 +0.12 A5IV +0.008+0.023 -027 58 5.0 49.4AB 3 -6500 Del AraCP-60 6842 158094253945 648 W 172204.2-603601173105.9-604102331.27-14.36 3.62 -0.10 -0.31 B8Vn -0.059-0.096 +010 260: 8.0 47.4 * -6501 CD-3611546 158105208860 172210.0-364141172856.1-364642351.50-01.25 6.02 +1.11 K0III +0.002-0.009 -028 -6502 BD+20 3481 158148 850953388 172230.1+200958172649.1+200451 42.71 27.27 5.54 -0.13 -0.56 B5V +0.001+0.015 -030V 251 -6503 CD-3811927 158156208870 W 172233.0-382605172925.7-383100350.11-02.30 6.39 +0.09 A2V +0.032+0.020 +008 0.3 0.4 -6504 BD-08 4444 158170141679 172236.5-080715172802.3-081230 15.66 14.38 6.37 +0.58 +0.16 F5IV -0.081-0.128 -064 =< 15 -6505 CP-56 8304 158220244808 172253.0-565028173123.0-565514334.62-12.46 5.95 -0.08 B7II-III -0.018+0.008 -003 =< 41 -6506 BD+34 2971 158261 660543389 172310.5+344646172646.2+344145 58.77 31.59 5.94 -0.01 -0.06 A0V -0.024+0.047 -022SBO 10 * -6507 BD+00 3697 1583521224183391 172343.5+002442172849.7+001950 23.49 18.45 5.44 +0.22 +0.11 A8V e-0.062+0.023 +.012-036 184 * -6508 34Ups ScoCD-3711638 158408208896 649 172357.8-371257173045.8-371745351.27-01.84 2.69 -0.22 -0.82 -0.23 B2IV -0.001-0.031 +008SB 73 * -6509 77 HerBD+48 2517 158414 46723 650 172405.1+482038172644.2+481536 74.70 33.66 5.85 +0.12 +0.15 A4V +0.002-0.004 +.014-009SB 120 -6510 Alp AraCD-4911511 158427228069 651 W 8999 172406.6-494748173150.5-495234340.76-08.83 2.95 -0.17 -0.69 -0.24 B2Vne v-0.031-0.070 +.007+000SB 298 8.0 55.6 * -6511 BD+60 1754 158460 17472 172423.7+600756172541.3+600254 88.89 33.88 5.65 +0.03 +0.01 A1Vn -0.010+0.027 +007SB 180 -6512 BD-05 4450 158463141691 10583 8918 172426.5-055016172947.4-055511 17.92 15.17 6.37 +0.93 +0.67 K0III -0.022-0.073D+.008+004 2.1 1.3 * -6513 CD-4511626 158476228075 W 172424.6-455734173149.1-460211344.03-06.77 6.03 +0.83 F8-G0Ib +0.001+0.007 -029V 4.2 18.0 -6514 BD+58 1731 158485 303873390 172434.8+584407172604.9+583907 87.21 33.91 6.51 +0.14 +0.09 +0.05 A4V -0.007+0.015 -030 -6515 NOVA 1604 V843 Oph * -6516 BD-00 3300 158614141702 10598 172514.8-005848173023.8-010345 22.40 17.44 5.31 +0.72 +0.31 +0.36 G9IV-VHdel 1 -0.117-0.170 +.054-077SBO 0.1 0.7 * -6517 CD-3312149 158619208921 172511.8-333734173147.4-334210354.39-00.05 6.44 +1.19 K2III -0.005-0.015 -034 -6518 BD+67 1014 158633 17474 172518.4+672326172500.2+671823 97.56 33.16 6.43 +0.76 +0.29 K0V -0.525-0.004 +.078-040SB -6519 51 OphCD-2313412 158643185470 9037 172518.8-235307173125.0-235746 2.52 5.34 4.81 0.00 -0.06 +0.02 B9.5Ve +0.004-0.027 +.040-012V -6520 CD-2612152 158704185474 172531.7-261135173144.4-261611 0.62 4.02 6.05 -0.06 -0.37 B9p -0.004-0.025 +000 * -6521 BD+12 3234 158716102869 172543.2+120004173022.4+115530 34.76 23.32 6.39R +0.06 +0.01 A1V -0.026+0.053 -025 =< 41 -6522 CD-3411757 158741208935 V949 Sco 172547.1-341213173224.5-341647353.98-00.47 6.17 +0.35 F2V -0.017-0.039 -050 -6523 CD-4111742 158799228110 172604.2-410557173307.4-411025348.27-04.34 5.84 +0.06 -0.17 B9Ib-II +0.004-0.024 -019 -6524 BD+02 3337 158837122465 10607 172620.4+024758173121.3+024328 26.03 19.03 5.59 +0.84 +0.58 G8III+A7 -0.014+0.019 -029SB 0.0 0.1 * -6525 CP-59 7071 158895244866 172639.7-594633173534.9-595046332.31-14.42 6.28 -0.08 -0.46 B5II-III -0.007-0.009 -009 -6526 76Lam HerBD+26 3034 158899 851631460I 9070 172641.7+261109173044.3+260638 49.48 28.44 4.41 +1.44 +1.68 +0.75 K3.5III +0.020+0.018 +.016-026 < 17 * -6527 35Lam ScoCD-3711673 158926208954 652 W Lam Sco 172649.0-370151173336.5-370614351.74-02.21 1.63 -0.22 -0.89 -0.28 B2IV+B -0.001-0.029 -003SB2 163 10.3 94.9AC 3* -6528 BD+31 3047 158974 66103 172708.1+311358173055.4+310930 55.03 29.87 5.61 +0.95 G8III +0.009+0.022 -026V? -6529 BD+80 544 158996 28593384I 172711.3+801330171937.0+800811112.37 30.58 5.72 +1.50 +1.80 K5III +0.016+0.004 -007 -6530 CP-53 8682 159018244870 172714.5-531658173520.0-532110338.04-11.11 6.10 +0.02 B9III 0.000-0.016 +007V? -6531 BD+39 3147 159026 66102 172719.7+385725173040.3+385256 63.77 31.69 6.43 +0.49 +0.22 F6III +0.013+0.015 -027 139 -6532 BD+12 3241 159082102897 172735.5+120009173215.0+115549 34.98 22.90 6.42 -0.01 -0.20 B9.5VpHgMn +0.024+0.025 -012SBO 32 * -6533 78 HerBD+28 2767 159139 85182 172753.9+282847173149.6+282427 52.06 28.91 5.62R 0.00 -0.05 A1V +0.006+0.028 -026SB? 245 -6534 BD-05 4461 1591701417303392 172809.4-054017173329.9-054441 18.56 14.46 5.62 +0.18 +0.09 A5V -0.039-0.091 -026 255 -6535 CD-3212935 159176208977 W 9167 172810.4-323045173442.5-323454355.67 0.05 5.70 +0.04 -0.86 O7V+O7V +0.008-0.005 -004SB2O 161 4.8 5.4AB 3* -6536 23Bet DraBD+52 2065 159181 30429 653I 10611 172810.3+522231173026.0+521805 79.58 33.31 2.79 +0.98 +0.64 +0.48 G2Ib-IIa -0.016+0.015 +.013-020V 13 8.9 4.2AB 3* -6537 1Sig AraCD-4611661 159217228162 172812.8-462612173539.6-463020343.98-07.58 4.59 -0.03 -0.09 -0.05 A0V -0.028-0.035 -.014+004 -6538 BD+34 2989 159222 66118 172825.9+342029173201.1+341615 58.58 30.43 6.56 +0.65 +0.17 +0.32 G5V -0.233+0.050 +.055-052V? * -6539 CD-3711702 159312209001 172854.3-372218173543.0-372624351.69-02.75 6.48 +0.01 A0V -0.013-0.038 -008 -6540 BD+57 1774 159330 30434 172907.3+575700173043.8+575235 86.25 33.33 6.40R K2III +0.030-0.030 -014SB -6541 BD+19 3354 1593321029123393 172902.0+191944173322.8+191524 42.48 25.53 5.64 +0.48 -0.02 F6V -0.030-0.090 +.032-059V =< 10 -6542 BD+16 3218 1593531029173394 172910.9+162318173339.4+161903 39.51 24.36 5.69 +1.01 +0.82 +0.49 gK0 -0.001-0.051 +.030-022 -6543 BD+14 3279 159354102918 I V642 Her 172910.4+145446173342.8+145030 38.03 23.77 6.48 +1.60 +1.58 +1.28 M4IIIa +0.023-0.070 +030 * -6544 BD-11 4411 1593581606531461 W 172912.6-111027173446.4-111431 13.86 11.40 5.55 +0.02 -0.17 B8Vn +0.005+0.006 -011 3.0 54.6 * -6545 52 OphBD-21 4659 159376185526 V2125 Oph172917.5-215835173518.5-220238 4.63 5.62 6.57 +0.01 -0.18 B8p -0.004-0.009 -012V * -6546 CD-3812044 159433209019 9205 172939.5-383352173632.8-383807350.77-03.53 4.29 +1.09 +0.90 +0.55 K0IIIb -0.012-0.201 +.018-049V -6547 CD-4911577 159463244894 172941.5-495935173727.2-500336341.08-09.69 5.93 +1.10 K0III -0.009-0.099 +003 -6548 53 OphBD+09 3424 159480122526 10635A 172951.8+093915173436.7+093512 32.95 21.39 5.81 +0.02 -0.01 A2V +0.005-0.008 -014 16 2.0 41.3AB 4* -6549 Pi AraCP-54 8403 159492244896 172952.7-542559173805.6-543001337.24-12.04 5.25 +0.20 +0.08 A5IV-V -0.039-0.150 +.057-003 48 -6550 BD+41 2850 159501 467921462 172956.9+411851173307.3+411437 66.60 31.66 5.74 +1.09 +0.96 gK1 -0.068-0.060 +.015-029V? -6551 BD+16 3220 159503102928 172959.2+163418173427.2+163014 39.78 24.26 6.40R A8Vn -0.004-0.015 -041 142 -6552 CP-85 469 1595172587793989 172959.3-851034180134.1-851253308.13-26.00 6.45 +0.44 +0.02 F5IV -0.007-0.142 -023 -6553 The ScoCD-4212312 159532228201 654 9233 173007.9-425603173719.2-425952347.14-05.98 1.87 +0.40 +0.22 +0.20 F1II +0.015-0.002 +.027+001 105 * -6554 24Nu 1DraBD+55 1944 159541 30447 655 10628B 9163 173012.3+551509173210.6+551103 83.03 33.14 4.88 +0.26 +0.04 +0.13 A6V +0.147+0.057 +.035-015SB 66 0.0 62.3 * -6555 25Nu 2DraBD+55 1945 159560 30450 657 10628A 9164 173017.7+551428173216.0+551023 83.02 33.12 4.87 +0.28 +0.06 +0.13 A4m v+0.148+0.056 +.035-016SBO 50 0.0 62.3 * -6556 55Alp OphBD+12 3252 159561102932 656I A 9189 173017.5+123758173456.1+123336 35.90 22.57 2.08 +0.15 +0.10 +0.08 A5III +0.120-0.226 +.067+013SB? 219 0.1 * -6557 CD-3711723 159633209034 173035.7-380012173726.8-380356351.34-03.37 6.26 +1.25 G2Ib -0.013+0.026 +012 -6558 CD-4212327 159707228220 173057.9-424904173808.5-425250347.32-06.04 6.10 -0.06 -0.26 -0.02C B8V +0.002-0.041 +013 -6559 BD+21 3157 159834 85232 10655 173143.1+210336173559.6+205946 44.53 25.59 6.10 +0.19 +0.17 A7IV +0.012-0.015 -017SB 22 3.5 10.4 * -6560 BD+57 1780 159870 30464 S 173153.1+573729173331.7+573332 85.87 32.96 6.17 +0.59 +0.37 +0.38 G5III+A5V +0.015+0.014 -001SBO 28 0.1 * -6561 55Xi SerBD-15 4621 159876160700 658I W 9270 173151.6-152008173735.2-152355 10.61 8.66 3.54 +0.26 +0.14 +0.13 F0IVDel Sct -0.042-0.058 +.030-043SBO 32 9.4 22.0 * -6562 BD-15 4622 159877160701 173151.9-153035173736.2-153416 10.46 8.57 5.94 +0.37 F0IV -0.009-0.001 -008 30 -6563 BD+37 2908 159925 661653395 173216.1+372152173542.4+371806 62.20 30.40 6.10 +0.98 +0.82: G9III +0.015+0.003 +004 -6564 BD+28 2787 159926 85236 173211.9+281449173607.9+281105 52.14 27.94 6.38R K5 -0.031+0.017 -034 -6565 CP-72 2086 159964257525 W 173218.0-721017174419.7-721315321.16-20.84 6.49 +0.48 -0.04 F7IV+F5V -0.003+0.113D+.032+035SB 0.3 0.5 * -6566 27 DraBD+68 938 159966 17526 659I W 173221.7+681156173157.9+680806 98.42 32.40 5.05 +1.08 +0.92 +0.53 K0III -0.012+0.134 +.020-073SB < 17 6.2 163.4 -6567 57Mu OphBD-08 4472 1599751417723399 173224.5-080328173750.7-080708 17.00 12.34 4.62 +0.11 -0.20 +0.11 B8II-IIIp:Mn -0.009-0.017 -019 134 -6568 BD-10 4528 160018160708 I 173236.6-105159173809.5-105535 14.57 10.85 5.75 +1.23 gK0 -0.013-0.010 -033 -6569 Lam AraCD-4911616 160032228257 Var? 173240.3-492113174023.6-492456341.89-09.77 4.77 +0.40 -0.04 +0.22 F3IV +0.078-0.176 +.044+004 0 * -6570 BD+30 3033 160054 661753397 173248.3+305048173636.7+304707 55.00 28.59 6.02 +0.16 +0.09 A5V +0.030-0.005 -017 101 -6571 79 HerBD+24 3218 160181 852643400 S 173323.9+242210173731.1+241836 48.12 26.41 5.77 +0.11 +0.07 A2Vn -0.012+0.008 -004V 210 0.1 -6572 CD-4611747 1602632282793404 173346.6-465202174116.3-465519344.13-08.62 5.79 -0.01 -0.06 +0.01C A0V +0.012-0.009 -012 -6573 26 DraBD+61 1678 160269 17546 10660 173357.4+615704173459.5+615230 91.00 32.65 5.23 +0.61 +0.10 G0Va +0.260-0.507 +.069-013V? 41 2.8 0.6AB 3* -6574 82 HerBD+48 2542 160290 46838 I 173400.7+483837173637.6+483508 75.26 32.06 5.37 +1.15 +1.06 +0.61 gK1 +0.031+0.065 +.017+029V? -6575 BD+02 3373 160315122607 W 173405.6+020507173908.5+020141 26.33 16.98 6.26 +1.03 +0.83 +0.53 K0III+F4IV +0.040-0.021 +000SB 1.1 111.2AB 3* -6576 CD-5011474 160342244954 V626 Ara 173414.9-502726174203.9-503038341.06-10.56 6.24 +1.76 +1.89 +0.85E M3+II-III +0.024-0.012 -027 * -6577 BD+13 3421 160365102999 173422.1+132305173857.8+131945 37.09 21.99 6.12 +0.56 F6III -0.023+0.038 +000SB 82 -6578 BD-02 4425 160471141798 I 9461 173459.6-020552174011.8-020909 22.64 14.77 6.19 +1.67 +1.89 K2.5Ib -0.023-0.018 -049V -6579 BD+32 2964 160507 66214 173507.8+324744173849.7+324422 57.29 28.67 6.37R gG5 +0.017-0.011 -015 -6580 Kap ScoCD-3812137 160578209163 660 Kap Sco 173534.1-385842174229.3-390148351.04-04.72 2.41 -0.22 -0.89 -0.22 B1.5III -0.006-0.027 -014SB 131 * -6581 56Omi SerBD-12 4808 1606131607473405 Omi Ser 173547.6-124919174124.9-125231 13.28 9.17 4.26 +0.08 +0.10 +0.02 A2V -0.069-0.052 +.006-030SB2 125 * -6582 Eta PavCP-64 3662 160635254020 661 173555.0-644033174544.0-644326328.40-17.75 3.62 +1.19 +1.17 K2II -0.014-0.054 +.025-008 -6583 CD-3611804 160668209172 173603.6-365342174251.0-365645352.86-03.69 5.54 +1.55 K5III +0.001-0.034 -004 -6584 BD+31 3075 160677 66231 I 173610.8+311519173957.5+311209 55.68 28.02 6.03 +1.58 +1.98 M2IIIab -0.012+0.015 -009V? -6585 Mu AraCD-5111094 160691244981 662 173612.2-514650174408.7-515003340.06-11.50 5.15 +0.70 +0.24 +0.34 G3IV-V -0.014-0.194 +.077-009 -6586 CP-57 8703 160720244989 W 173619.0-572953174455.8-573243334.99-14.37 6.01 +0.90 G8III +0.010-0.002 -006 0.0 0.2AP 3 -6587 CD-3213208 160748209176 173632.9-330008174306.9-330304356.21-01.70 6.40 +1.81 +2.00 M1III +0.008+0.003 -003 -6588 85Iot HerBD+46 2349 160762 46872 663 W Iot Her 173638.4+460334173927.9+460023 72.32 31.27 3.80 -0.18 -0.69 -0.17 B3IV -0.005+0.005 +.005-020SB1O 11 8.3 116.0 * -6589 BD+15 3246 160765103020 173639.8+151347174111.0+151041 39.15 22.25 6.34 +0.03 +0.02 A1V -0.012-0.015 -023 85 -6590 BD+06 3498 160781122646 173639.7+062150174132.3+061846 30.62 18.41 5.95 +1.26 +1.18 G7III -0.005-0.010 -031 -6591 BD+31 3076 160822 66243 W 173655.2+312027174041.2+311715 55.83 27.90 6.28 +1.05 +0.88 K0III -0.067-0.073 -006 2.1 115.0 -6592 BD+24 3225 160835 85310 10715 173659.0+243346174105.5+243048 48.64 25.71 6.36 +1.20 +1.18 +0.59 K1III+F4V -0.019+0.058 +.002-032SB 3.0 16.3AB 3* -6593 CD-2711850 160839185655 D 173659.9-275009174317.8-275303 0.63 0.99 6.36 +0.47 A9V: +0.010-0.006 -026 * -6594 BD+16 3256 160910103033 10723 173729.3+155954174158.7+155707 40.00 22.38 5.52 +0.38 -0.05 F4V w +0.009+0.101 +.036-044V? 30 2.8 0.6AB 3* -6595 58 OphBD-21 4712 1609151856601463 D 173726.2-213804174325.8-214100 5.94 4.21 4.87 +0.47 -0.03 +0.24 F6V -0.095-0.043 +.060+011V 0 1.8 0.0 * -6596 28Ome DraBD+68 949 160922 17576 664 W 173732.1+684815173657.1+684529 99.08 31.87 4.80 +0.43 -0.01 +0.22 F5V +0.002+0.323 +.045-014SBO 26 8.3 72.3 * -6597 CD-4212431 160928228363 W 173731.6-424101174442.0-424344348.08-06.99 5.87 +0.16 +0.09 A1V+F0IV +0.005+0.019 -009 0.1 0.1 * -6598 BD+69 933 160933 17572 173731.0+693756173639.7+693415100.04 31.79 6.42 +0.58 +0.09 F9V -0.055-0.208 +.018-053V -6599 BD+43 2781 160950 46883 173735.9+433111174037.6+432815 69.44 30.67 6.59R K2 +0.056+0.061 -029 -6600 BD-13 4732 161023160784 173809.5-132734174348.6-133031 13.03 8.35 6.39 +0.37 -0.07 F0V -0.048-0.109 -007 =< 15 -6601 BD-07 4487 161056141832 173823.1-070200174347.0-070446 18.67 11.58 6.30 +0.38 -0.48 +0.27 B1.5V -0.001-0.006 -026V -6602 83 HerBD+24 3231 161074 85344 I W 173822.3+243652174228.4+243351 48.81 25.43 5.52 +1.46 +1.69 +0.80 K4III -0.055-0.105 +.020-027 3.6 159.6 -6603 60Bet OphBD+04 3489 161096122671 665I 173831.9+043632174328.4+043402 29.21 17.19 2.77 +1.16 +1.24 +0.57 K2III -0.040+0.159 +.033-012V =< 17 * -6604 BD+14 3321 1611491030523407 173848.6+142025174322.0+141742 38.51 21.41 6.24 +0.42 +0.18 F5II +0.006+0.023 -042 * -6605 BD+57 1791 161162 305153406 173856.4+572131174036.2+571837 85.58 32.00 6.77 +0.92 +0.58 K0 -0.004+0.027 -014 -6606 BD+72 800 161178 8862 173902.4+723030173708.8+722721103.38 31.35 5.86 +1.01 G9III +0.021+0.022 -.009+008V? -6607 BD+51 2243 161193 30522 173904.1+515159174121.8+514905 79.13 31.60 5.99 +1.05 gK0 -0.028-0.014 -009V? -6608 84 HerBD+24 3237 161239 85360 173915.3+242216174321.6+241940 48.64 25.16 5.71 +0.65 +0.27 +0.33 G2IIIb -0.115+0.071 +.006-026V? =< 10 -6609 61 OphBD+02 3390 161270122690 10750A 173932.7+023721174434.0+023446 27.50 16.04 6.17 +0.07 -0.01 A1IV-V +0.004+0.014 -031SB 100 0.4 20.6AB 3* -6610 BD+02 3391 161289122691 10750B 173934.0+023720174435.4+023444 27.50 16.03 6.56 A0V +0.004+0.010 -030 115 0.4 20.6AB 3* -6611 BD+14 3329 161321103069 10749 V624 Her 173944.1+142712174417.3+142437 38.72 21.25 6.19 +0.21 +0.20 +0.12 A3m +0.001+0.018 -031SB2O 35 5.7 39.7 * -6612 BD+44 2757 161369 469063408I 174007.6+440741174305.6+440504 70.23 30.34 6.34 +1.54 +1.84 K4III -0.040+0.034 -060 -6613 CD-3812189 161390209246 W 174015.4-380418174707.3-380642352.30-05.02 6.43 -0.02 B9V+A1V -0.002-0.007D+.009+001 0.3 0.1 * -6614 CP-55 8312 1614202450443412 174017.7-552154174838.1-552406337.19-13.80 6.11 +0.28 A9IV -0.018+0.036 -021 -6615 Iot1ScoCD-4011838 161471228420 666 W 174035.4-400517174735.1-400737350.61-06.13 3.03 +0.51 +0.27 F2Iae 0.000-0.008 +.019-028SB 36 9.9 37.5 -6616 3 SgrCD-2711930 1615921857551464I X Sgr 174115.9-274734174733.6-274951 1.17 0.21 4.54 +0.80 +0.50 F7II -0.001-0.009 +.035-013V 24 * -6617 BD-22 4423 161664185765 I 9682 174143.0-222626174745.6-222841 5.77 2.94 6.18 +1.49 G6IbHdel 1 +0.003-0.011 -022V -6618 BD+53 1978 161693 30538 174153.8+535037174359.3+534806 81.49 31.36 5.75 +0.01 +0.05 0.00 A2V +0.022-0.015 -002V 130 * -6619 BD+31 3090 161695 663113410 174154.5+313239174540.3+313017 56.40 26.94 6.23 0.00 -0.22 A0Ib +0.011-0.005 +002 -6620 BD-14 4770 1617011608223413 174154.5-144118174736.8-144333 12.44 6.93 5.94 +0.05 -0.32 B9pHgMn -0.019-0.020 -025SB2O 16 * -6621 CD-2612367 161756185779 V3894 Sgr174212.6-265621174827.8-265830 2.00 0.48 6.35 +0.12 -0.42 B4IVe 0.000-0.012 +009V * -6622 CP-53 8799 161783245065 W V539 Ara 174220.0-533445175028.2-533644338.94-13.20 5.92 -0.08 -0.64 B2V+B3V -0.014-0.006 -008SB2O 91 3.0 12.3 * -6623 86Mu HerBD+27 2888 161797 85397 667I 10786 174232.6+274645174627.5+274314 52.45 25.63 3.42 +0.75 +0.39 +0.38 G5IV -0.311-0.751 +.108-016V 20 6.4 33.8AxBC 4* -6624 CP-60 6950 161814254057 W 174235.6-600756175135.5-600952332.99-16.33 5.78 +1.00 K0III -0.005-0.028 +017 7.2 30. -6625 BD+38 2997 161815 663153411 174233.9+385514174553.7+385253 64.48 28.79 6.52 +1.00 +0.68 K0 +0.003-0.028 -012 -6626 BD+39 3219 161832 66317 10782 V826 Her 174240.3+392136174558.5+391921 64.97 28.88 6.68 +1.39 +1.46 K3III+F7V +0.012+0.016 -032SBO 3.1 7.9AB 3* -6627 BD+17 3334 161833103106 10795 174243.1+174402174708.0+174150 42.25 21.93 5.72R +0.01 0.00 A1V +0.011-0.007D+.004+003SB 54 1.3 0.6 * -6628 CD-3114609 161840209303 174240.7-314008174910.5-314212358.03-02.09 4.83 -0.04 -0.29 B8V +0.011-0.015 -013 45 -6629 62Gam OphBD+02 3403 161868122754 668 174252.6+024441174753.6+024226 28.02 15.36 3.75 +0.04 +0.04 0.00 A0Vnp -0.022-0.074 +.039-007SBO 205 * -6630 CD-3711907 161892209318 669 W 174303.0-370041174951.5-370236353.50-04.94 3.21 +1.17 +1.19 K2III +0.049+0.033 +.040+025 11.5 41.7AC 3 -6631 Iot2ScoCD-4011886 161912228466 W 174311.4-400329175011.2-400526350.89-06.54 4.81 +0.26 0.00 A2Ib +0.007-0.008 -.001-010V? 39 6.1 32.6 -6632 CP-53 8812 161917245072 174305.6-530556175111.0-530750339.43-13.06 6.09 0.00 B9.5III-IV +0.006-0.013 +019 * -6633 BD+03 3493 161941122766 174321.6+035018174820.2+034815 29.08 15.76 6.22 +0.16 -0.02 B9.5V +0.007+0.004 -044 =< 41 -6634 CP-65 3507 161955254063 174318.6-652730175318.4-652921328.03-18.80 6.49 +1.08 +1.00 K0-1III -0.017-0.083 -045 -6635 CP-76 1226 161988257542 W 174331.9-760918175741.8-761039317.57-23.16 6.07 +1.20 +1.28 K2III +0.002+0.017 +037 7.9 25.5 -6636 31Psi1DraBD+72 804 162003 8890 670 10759A 174342.9+721153174156.3+720856102.97 31.03 4.58 +0.42 +0.01 +0.23 F5IV-V +0.025-0.267 +.054-010V? 14 1.2 30.2AB 4* -6637 31Psi1DraBD+72 805 162004 8891 10759B 174344.6+721222174158.0+720925102.98 31.03 5.79 +0.53 +0.02 G0V +0.030-0.278 +.054-010V? =< 25 1.2 30.2AB 4* -6638 BD+20 3570 162076 854291465 174407.3+203555174824.8+203356 45.25 22.73 5.69 +0.94 +0.71 +0.47 G5IV +0.026+0.008 -026 -6639 BD+02 3406 162113122787 174416.3+015929174918.9+015740 27.50 14.70 6.47 +1.24 +1.26 K0III -0.025+0.065 -058 -6640 CD-4511958 162123228490 174420.8-453417175144.5-453602346.21-09.52 6.11 +0.95 G6III +0.009-0.005 -007 -6641 BD+47 2537 162132 46954 S 174427.0+473848174708.1+473644 74.39 30.19 6.43 +0.11 +0.06 A2V s -0.004+0.005 -026SBO 0.1 * -6642 BD+19 3435 162161103131 174427.2+191714174847.9+191519 43.97 22.16 6.12 +0.02 -0.09 A1V -0.006+0.022 -025SB? 66 -6643 CD-4011905 162189228489 W 174430.6-404431175132.8-404621350.43-07.10 5.96 +1.59 +1.83 +0.95E M2III -0.028-0.053 -085 6.5 23.6 -6644 87 HerBD+25 3353 162211 854373415I 174445.8+253922174849.2+253722 50.44 24.44 5.12 +1.16 +1.12 +0.58 K2III -0.003-0.039 +.016-026 < 17 -6645 CD-3014802 162220209357 W 174446.3-303139175112.5-303326359.24-01.88 6.66 +0.04 -0.07 A0Vn +0.002-0.011 -009 1.5 10.2 * -6646 CP-81 799 1623372587873990 174526.2-812827180526.7-812911312.15-25.13 6.35 +1.50 +1.75 K3-4III +0.018-0.040 -003 -6647 CD-3412165 162374209383 V957 Sco 174533.5-344619175213.6-344757355.69-04.22 5.90 -0.10 -0.64 B6V v+0.004-0.004 -013V < 40 * -6648 CD-3412170 162391209390 174540.9-342324175219.7-342500356.03-04.04 5.84 +1.13 G8III -0.001+0.003 -021V -6649 CD-4112139 162396228510 174543.7-415755175252.7-415948349.48-07.92 6.20 +0.54 F8IV-V +0.154-0.196 +.027-014 -6650 BD+12 3305 162468103145 174604.5+115832175043.5+115648 37.02 18.81 6.17 +1.25 +1.26 K1III-IV -0.022-0.024 -049 -6651 CD-3412186 162496209397 174611.4-340521175249.2-340651356.34-03.98 6.06 +1.23 K1III +0.001+0.017 -015V? -6652 CD-3412187 162515209401 174614.8-345937175255.9-350107355.57-04.45 6.45 +0.02 -0.07 B9.5V +0.015+0.007 -009SB2O 95 * -6653 CD-3512013 162517209404 174614.5-353551175257.9-353727355.05-04.76 6.03 +0.34 +0.09 F2III-IV +0.046-0.047 -021 -6654 BD+29 3126 162555 85464 174630.2+292056175022.9+291920 54.42 25.32 5.50 +1.05 +0.55 K1III +0.029+0.049 -015 -6655 BD+22 3227 162570 85468 174635.7+222039175048.4+221859 47.23 22.86 5.98R A9V +0.014-0.016 +004 212 -6656 30 DraBD+50 2468 162579 305913416 S 174641.0+504817174904.3+504652 78.07 30.30 5.02 +0.02 +0.01 A2V -0.048+0.211 -.002-055V 140 0.1 -6657 CD-3412200 162586209411 W 174639.6-344223175319.6-344350355.86-04.38 6.17 -0.03 -0.35 B8V +0.005-0.001D+.005-012 37 0.0 0.1 * -6658 CD-3412203 162587209416 W 174642.9-345215175323.3-345343355.72-04.47 5.60 +1.14 +1.01 K3III -0.009-0.010D+.003-007SB 0.1 0.4 * -6659 BD-01 3412 1625961419133418 174649.2-011240175159.5-011412 24.91 12.61 6.35 +1.12 +0.89 K0 -0.002+0.003 -044SBO * -6660 CD-3412219 162678209425 174705.3-344545175345.5-344709355.86-04.48 6.38 0.00 -0.06 B9V +0.009-0.003 -015V 37 * -6661 BD-06 4672 162714141926 I: Y Oph 174717.0-060709175238.8-060837 20.60 10.12 6.21 +1.40 +1.01 +0.95 F8Ib-G3Ib v+0.008-0.009 -.006-005SB * -6662 CD-3412226 162724209428 W V906 Sco 174714.7-344347175354.9-344509355.90-04.49 5.96 -0.01 -0.10 B9V+B9V +0.021-0.003 -005SB2O 95 0.8 0.3 * -6663 CD-3412228 162725209430 V951 Sco 174717.8-344830175358.1-344954355.84-04.54 6.42 +0.01 -0.06 ApSi* +0.007-0.023 -017 34 * -6664 88 HerBD+48 2581 162732 469973417 V744 Her 174726.3+482516175003.3+482339 75.36 29.82 6.68 -0.11 -0.41 BepShell v+0.004+0.012 -012SBO 300 * -6665 BD+15 3292 162734103161 10850 174727.7+152100175158.5+151933 40.41 19.92 6.46R K0III 0.000+0.031D+.004-043V? 0.2 0.8AB 6* -6666 BD-10 4560 162757160885 174730.1-105230175303.6-105359 16.45 7.70 6.18 +1.11 gK1 +0.055-0.033 -035V? -6667 BD+01 3528 162774122861 I 9800 174731.3+011946175235.4+011818 27.29 13.67 5.95 +1.58 +1.92 K5III -0.047-0.017 -065 -6668 CD-3412244 162817209446 174748.0-342642175427.2-342759356.21-04.44 5.96 -0.01 -0.10 B9.5V +0.010+0.006 -016V? 65 * -6669 BD+40 3225 162826 47009 174759.1+400550175114.0+400421 66.06 28.06 6.46R G0V -0.012+0.012 +002 =< 6 -6670 BD+06 3566 1629171228803420 174821.9+060718175314.2+060605 31.78 15.71 5.77 +0.42 -0.01 F3-5IV-V -0.122+0.069 +.038-033SB 30 -6671 CD-3612008 162926209458 174821.9-362720175507.9-362833354.53-05.57 6.06 +0.08 B9.5III -0.014-0.009 -015 -6672 CD-2413615 162978185928 174844.7-245202175454.0-245314 4.54 0.30 6.20 +0.04 -0.89 O7.5II((f)) -0.005-0.001 -011 50: * -6673 BD+40 3228 162989 664023419I 174849.4+400014175204.7+395856 66.01 27.88 6.04 +1.33 +1.49 gK4 -0.011+0.054 +.015-066SB -6674 BD+46 2379 163075 47023 174914.7+464010175201.0+463836 73.44 29.22 6.38 +1.09 +0.77 K0III +0.039-0.122 -028 -6675 CD-4412201 1631452285623425 174929.5-441931175647.4-442032347.76-09.69 4.86 +1.21 +1.22 K2III -0.006-0.017 +.017+045V? -6676 BD+11 3283 1631511031943422 W 174933.5+110918175414.2+110750 36.62 17.68 6.38 +0.45 F5Vn -0.058-0.165 +.007-041SB 120 0.2 0.1 * -6677 90 HerBD+40 3233 163217 47037 I 10875 9834 175002.7+400136175318.1+400029 66.09 27.66 5.16 +1.18 +1.12 +0.61 K1IIIbCN-1 +0.011+0.053 +.014-035V? < 19: 3.3 1.6 * -6678 CD-4012001 163234228564 174955.0-401723175655.8-401820351.35-07.76 6.43 +1.43 +1.65 K3III +0.016+0.005 -006 -6679 BD-18 4686 1632451609093423 175002.0-184704175555.0-184808 9.92 3.16 6.52 +0.05 +0.05 A4V +0.016-0.017 +004V * -6680 CD-2813878 163318185975 175023.0-280257175641.9-280355 1.99-01.65 5.80 +0.21 A7III/V: +0.040-0.017 +007 -6681 BD-15 4722 163336160915 10891 175033.8-154741175619.0-154845 12.56 4.57 5.89 +0.05 A1V -0.010-0.063 -024V 56 3.2 20.6AB 3* -6682 CD-4112231 163376228578 175041.4-414207175747.7-414258350.18-08.59 4.88 +1.65 +1.97 +0.81E M0III -0.015-0.010 -.005+004 -6683 CD-3912058 163433209524 W 175101.8-390721175757.8-390813352.48-07.37 6.29 +0.01 A0IV-V -0.005-0.039 -001 1.5 0.7 -6684 BD+00 3813 163472122935 V2052 Oph175112.6+004108175618.4+004013 27.16 12.55 5.82 +0.09 -0.65 B2IV-V -0.005+0.003 -017SB 120 * -6685 89 HerBD+26 3120 163506 855451468I V441 Her 175123.0+260357175525.2+260300 51.43 23.19 5.46 +0.34 +0.27 +0.21 F2Ib e+0.004+0.006 -.004-029SB 23 * -6686 BD-04 4376 163532141979 I 175130.9-040403175647.7-040455 22.94 10.21 5.47 +1.16 +1.06 gG9 -0.012-0.008 -039V -6687 BD+22 3237 163547 855523427I 175138.7+222846175550.8+222751 47.84 21.83 5.58 +1.24 gK3 -0.002+0.002 -044 -6688 32Xi DraBD+56 2033 163588 30631 671I W 175147.9+565318175331.7+565222 85.17 30.23 3.75 +1.18 +1.21 +0.59 K2-III +0.094+0.080 +.035-026V? < 17 11.1 316. * -6689 BD+00 3816 163624122950 10912 175156.9+000449175704.3+000359 26.70 12.10 5.97 +0.10 +0.12 A3V +0.028-0.016D+.004-011 0.2 0.2 -6690 BD+06 3578 163641122949 175203.6+063004175656.0+062916 32.57 15.06 6.29 0.00 -0.25 B9III +0.026+0.002 -014 80 -6691 CD-3612060 163652209545 W 175208.0-365053175855.6-365130354.57-06.42 5.74 +0.90 G8III +0.008+0.013 -087V? 2.4 51.7 * -6692 CD-2813936 163685186025 D 175218.3-284453175839.1-284533 1.61-02.37 6.01 -0.08 -0.56 B3IV 0.000-0.009 -009 1.0 0.3 * -6693 CD-3015035 163755 I W A 9929 175239.9-301434175905.2-301511 0.36-03.19 5.16 +1.77 +1.95 M1Ib +0.002-0.010 +.012-020SB 1.8 5.5AB 3* -6694 CD-3015035 163756209553 W B 9929 175240.3-301436175905.5-301512 0.36-03.19 7.04 +1.06 +0.80 G8II -0.020-0.002 +.012-023V 1.8 5.5AB 3* -6695 91The HerBD+37 2982 163770 66485 672I 9890 175249.3+371549175615.2+371502 63.26 26.42 3.86 +1.35 +1.46 +0.63 K1IIaCN+2 e+0.004+0.006 +.002-027V < 19: * -6696 BD+11 3299 163772103243 175245.7+110324175726.9+110239 36.89 16.93 6.36 +0.11 +0.08 A1V -0.017-0.024 -016SB 112 -6697 BD+24 3283 163840 85575 S 175306.5+240020175714.3+235945 49.51 22.08 6.30 +0.63 G2V -0.024+0.076 -034SB =< 6 1.5 0.1 * -6698 64Nu OphBD-09 4632 163917142004 673I 175331.2-094541175901.6-094625 18.17 6.98 3.34 +0.99 +0.88 +0.48 K0IIIaCN-1 -0.007-0.116 +.021+013 < 17 -6699 BD+55 1995 163929 306453428 175333.7+555853175523.7+555817 84.15 29.90 6.10 +0.32 +0.08 F0IV +0.037+0.126 -027 82 * -6700 4 SgrCD-2313731 1639551860613430 175341.2-234825175947.6-234858 6.02-00.13 4.76 -0.04 -0.05 -0.02 B9V +0.001-0.047 +.010-018V 191 -6701 35 DraBD+76 667 163989 8939 675 175355.4+765834174927.0+765746108.41 29.86 5.04 +0.49 +0.08 F6IV-V s +0.037+0.248 +.032-023 11 -6702 BD+45 2627 163990 47080 I OP Her 175356.2+452147175648.4+452103 72.16 28.17 6.02 +1.64 +1.52 +1.90 M5IIbS +0.008-0.028 +013V * -6703 92Xi HerBD+29 3156 163993 85590 674I 9927 175352.7+291531175745.9+291452 54.91 23.77 3.70 +0.94 +0.70 +0.46 G8+III +0.084-0.017 +.021-002 < 19: -6704 BD-20 4940 164028186070 D 175403.1-201954180000.1-202021 9.06 1.56 6.21 +1.40 K0II-III +0.005-0.007 -008V * -6705 33Gam DraBD+51 2282 164058 30653 676I 10923 175417.0+513002175636.4+512920 79.06 29.22 2.23 +1.52 +1.87 +0.85 K5III v-0.008-0.019 +.025-028 < 17 8.4 140.1AG 7* -6706 BD-04 4384 164064142012 I 175418.1-044841175936.7-044917 22.62 9.24 5.87 +1.56 +1.92 K5III -0.014-0.093 -032 * -6707 94Nu HerBD+30 3093 164136 66524 Nu Her 175440.5+301151175830.2+301122 55.94 23.92 4.41 +0.39 +0.15 +0.23 F2II 0.000+0.007 +.007-022SB? 28 * -6708 CD-3612115 164245209608 175502.5-362225180148.3-362240355.28-06.69 6.30 -0.03 -0.33 B7IV -0.007-0.017 +014 -6709 BD+00 3832 164258123004 V2126 Oph175509.6+003806180015.5+003746 27.59 11.66 6.37 +0.15 +0.18 A3pSrCrEu v-0.006+0.004 -034V? 65 * -6710 57Zet SerBD-03 4217 164259142025 175511.9-034102180029.0-034125 23.73 9.59 4.62 +0.38 0.00 +0.19 F2IV +0.147-0.045 +.048-043SB 70 -6711 BD+36 2986 164280 66531 175512.9+361748175842.3+361716 62.37 25.69 6.00 +0.94 gG5 +0.007-0.055 +010 -6712 66 OphBD+04 3570 164284123005 V2048 Oph175518.6+042227180015.8+042207 30.99 13.37 4.64 -0.03 -0.83 -0.02 B2Ve +0.003-0.013 -013SB 221 * -6713 93 HerBD+16 3335 1643491032851469I 175536.3+164523180003.4+164503 42.62 18.72 4.67 +1.26 +1.22 +0.59 K0.5IIb -0.007-0.010 +.004-024 < 17 * -6714 67 OphBD+02 3458 164353123013 677 10966 175538.1+025611180038.7+025554 29.73 12.63 3.97 +0.02 -0.62 0.00 B5Ib +0.002-0.008 -.002-004V 22 4.3 54.5AC 5* -6715 6 SgrBD-17 4987 1643581609981470I 175534.4-170911180123.1-170925 11.99 2.85 6.28 +1.80 K3III +0.003-0.005 -022V? -6716 BD-22 4503 164402186135 I: 10983 9996 175550.8-224639180154.4-224650 7.16-00.03 5.77 0.00 -0.89 B0Ib -0.003-0.008 -013 100 7.1 8.2AB 3* -6717 BD+78 616 164428 8946 I 9859 175548.4+781924175010.5+781824109.94 29.62 6.24 +1.44 K5 +0.018+0.018 -007 -6718 BD+45 2635 164429 47106 V771 Her 175600.8+452854175852.3+452834 72.38 27.84 6.48 -0.08 -0.22 B9pSiSr +0.002+0.027 -019V? 200: * -6719 BD+06 3597 1644321230173432 175600.1+061620180052.9+061606 32.81 14.09 6.34 -0.08 -0.75 B2IV +0.002-0.008 -014SB? -6720 BD+19 3494 164447103291 Var? 175607.5+193036180027.7+193021 45.34 19.71 6.50 -0.06 -0.39 B8Vne +0.015-0.001 -029 210: * -6721 Chi OctCP-87 274 164461258799 922 175601.9-873951185446.9-873621305.62-27.14 5.28 +1.28 +1.60 K3III -0.039-0.139 +034 -6722 BD+15 3327 164507103299 175626.2+150558180057.2+150536 41.12 17.85 6.26 +0.69 +0.24 G5IV -0.059-0.108 +004 -6723 68 OphBD+01 3560 164577123035 10990 10009 175640.7+011827180145.2+011819 28.38 11.64 4.45 +0.02 0.00 +0.01 A2Vn +0.015-0.012 +.021+006SB 252 2.5 0.6 * -6724 7 SgrCD-2413793 164584186163 175643.4-241653180251.1-241656 5.96-00.96 5.34 +0.52 +0.26 +0.36 F3III +0.005-0.008 +.007-012V 36 * -6725 34Psi2DraBD+72 818 164613 89613429 175655.0+720053175511.2+720018102.68 30.03 5.45 +0.30 +0.15 F2-3II-III +0.013-0.001 -002SB 45 -6726 BD+33 3006 164614 66551 I 175656.5+331302180036.4+331250 59.24 24.43 5.99 +1.51 gK6 -0.003-0.019 -016 -6727 BD-22 4516 164637186169 175658.3-224307180301.7-224306 7.34-00.23 6.74 -0.05 -0.87 B0.5III +0.003+0.007 -007SB 50 * -6728 BD+45 2638 164646 471213433I 9980 175704.8+453021175956.2+453005 72.45 27.66 5.67 +1.57 +1.91 M0IIIab +0.008-0.025 +.026-010V? -6729 95 HerBD+21 3280 164668 85647 I 10993B 10014 175715.3+213545180129.9+213543 47.50 20.29 5.18 +0.95 +0.57 G8III +0.011+0.032 +.000-031V? =< 25 0.1 6.3 * -6730 95 HerBD+21 3280 164669 85648 10993A 10014 175715.8+213546180130.4+213544 47.50 20.29 4.96 +0.12 +0.13 A5IIIn +0.012+0.035 +.000-030V? 180 0.1 6.3 * -6731 CP-75 1410 164712257569 678 W 175716.2-755337181115.7-755329318.15-23.85 5.86 +1.24 +1.43 K2III +0.010-0.295 +.016+015 7.3 25.9 -6732 BD-05 4560 164716142045 175726.3-052129180246.3-052131 22.52 8.29 6.76 +0.16 -0.10 B9V +0.011-0.035 -014 -6733 69Tau OphBD-08 4549 164764142050 11005B 10073 175738.1-081049180305.0-081049 20.06 6.87 5.94 F5V +0.029-0.037 +.058-038 0.7 1.9AB 3* -6734 69Tau OphBD-08 4549 164765142050 11005A 10073 175738.1-081049180304.9-081050 20.06 6.87 5.24 +0.38 +0.04 F2V +0.028-0.037 +.058-040SB 25 0.7 1.9AB 3* -6735 BD+75 647 164780 8962 175744.4+751047175426.6+751015106.32 29.79 6.36 +0.98 K0 -0.013+0.023 -.019-018 -6736 9 SgrCD-2413814 164794186204 I 175744.5-242146180352.4-242138 6.01-01.20 5.97 0.00 -0.89 +0.02 O4V((f)) +0.002+0.003 +009SB 140 * -6737 BD+33 3009 164824 665623434I 10998 175756.1+331840180135.9+331841 59.41 24.26 6.15 +1.55 K5III +0.025+0.023 -010V 6.0 14.2AB 3* -6738 96 HerBD+20 3649 164852 85672 V820 Her 175806.5+205000180223.1+205001 46.83 19.81 5.28 -0.09 -0.61 B3IV +0.005-0.010 +.004-015SB2O 205 * -6739 CD-3512229 1648702096713435 W 175806.3-355415180450.4-355405355.99-07.00 6.00 +1.16 K2III -0.016-0.035 -016 5.2 12.5 -6740 CP-64 3796 164871254141 175800.3-643320180748.3-643300329.59-19.84 6.41 +1.26 +1.41 K2-3III -0.015-0.053 -022 -6741 97 HerBD+22 3260 164900 85676 175819.2+225521180230.1+225523 48.91 20.57 6.21 -0.10 -0.64 B3Vn -0.004-0.008 -036SB -6742 Gam1SgrCD-2914447 164975186237 11029 W Sgr 175837.9-293504180501.3-293448 1.58-03.98 4.69 +0.78 +0.52 +0.45 F4-G1Ib v+0.013 0.000 -028SBO 25 0.0 0.1 4* -6743 The AraCD-5011720 1650242452421471 175850.7-500552180637.9-500530343.33-13.82 3.66 -0.08 -0.85 B2Ib -0.010-0.014 +003 117 * -6744 BD+19 3508 165029103334 175854.8+193638180314.7+193647 45.72 19.15 6.50R +0.01 -0.01 A0V +0.024-0.008 -032 171 -6745 Pi PavCP-63 4292 1650402541473437 10204 175857.1-634020180834.8-634006330.49-19.59 4.35 +0.22 +0.18 A7pSr +0.013-0.188 +.036-016SB 20 * -6746 10Gam2SgrCD-3015215 165135209696 679I 10173 175923.0-302531180548.5-302527 0.92-04.54 2.99 +1.00 +0.77 +0.51 K0III -0.053-0.185 +.025+022SB * -6747 BD+01 3578 165174123090 V986 Oph 175934.4+015451180437.3+015509 29.27 11.29 6.14 0.00 -0.91 B0IIIn -0.002-0.003 +017SB? 434 * -6748 CD-3612214 165185209710 175938.2-360139180623.7-360111356.04-07.33 5.95 +0.62 +0.07 G5V +0.110+0.015 +.059+013 -6749 CD-4312272 165189228708 W A 175935.9-432548180649.8-432529349.45-10.86 5.77H +0.22 +0.16 A5V -0.001-0.099D+.021-006SB 0.1 1.6 * -6750 CD-4312272 165190 W B 175935.9-432548180649.8-432529349.45-10.86 5.77H A5V -0.001-0.099D+.021-006 0.1 1.6 * -6751 CP-73 1888 165259257571 W 175952.0-734050181234.5-734018320.49-23.29 5.85 +0.46 +0.05 F5V -0.053-0.231 +.031+013 3.0 2.8 -6752 70 OphBD+02 3482 165341123107 I 11046 180024.1+023122180527.3+022958 29.91 11.38 4.03 +0.86 +0.54 +0.46 K0V +0.266-1.093 +.201-007SBO 16 1.8 1.9AB 11* -6753 BD+48 2627 165358 47173 11028 180032.1+482734180309.0+482752 75.85 27.69 6.21 +0.03 +0.06 A2V +0.029+0.015 -013 2.7 26.8AB 3* -6754 BD+23 3254 165373 85706 180032.0+235615180440.2+235633 50.11 20.48 6.34 +0.30 +0.03 F0IV-V +0.011-0.057 -033SB 70 -6755 BD-08 4558 1654021420833436 180040.5-081954180607.4-081926 20.30 6.14 5.85 +0.21 -0.20 B8III-IV -0.008-0.016 -023SB * -6756 BD-04 4395 165438142085 180055.7-044533180615.2-044505 23.48 7.82 5.77 +0.96 +0.81 K1+IV +0.141-0.032 -019V -6757 BD-00 3414 165462142084 180059.1-002716180607.4-002648 27.31 9.86 6.34 +1.06 +0.76 G8IIp -0.020-0.029 -009 -6758 BD+12 3383 165475103373 11056 180104.3+115944180543.3+120014 38.69 15.51 7.04 +0.30 +0.12 A3IV -0.008+0.001D+.009+013SB 218 0.5 6.9AB 3* -6759 CD-4512215 165493228734 W 180105.4-454642180830.1-454602347.45-12.19 6.15 -0.08 -0.49 B7-8II -0.009-0.025 -035V? 3.6 4.0 * -6760 CP-59 7231 165497245273 W 180107.7-590313180957.6-590224335.07-17.98 6.38 +1.55 K4III -0.021-0.001 -010 5.6 40. -6761 Iot PavCP-62 5797 165499254157 180108.5-620121181026.1-620008332.21-19.17 5.49 +0.58 +0.09 G0V -0.087+0.223 +.053+030SB -6762 BD-21 4855 1655161863023438 180111.4-212715180711.4-212638 8.93-00.44 6.28 +0.12 -0.78 B0.5Ib +0.004 0.000 -009V * -6763 BD+21 3300 165524 85718 180115.7+213818180530.2+213849 47.92 19.44 6.15 +1.23 gK3 +0.015+0.009 -035 -6764 BD+40 3276 165567 47193 180128.0+400434180443.2+400503 66.78 25.56 6.52 +0.46 +0.02 F7V +0.030+0.025 -001 12 -6765 98 HerBD+22 3273 165625 85725 I 10208 180149.1+221234180601.9+221308 48.53 19.55 5.06 +1.58 +1.93 +0.98E M3-IIIZrO 0+ -0.010-0.008 +.014-020V -6766 CD-2814174 1656341863283439I D 180144.9-282806180805.0-282726 2.89-04.02 4.57 +0.94 +0.74 +0.53 G7:IIIb* +0.027-0.030 +.023-005V? 0.8 0.3 * -6767 BD+41 2968 165645 47195 11054 180153.6+415607180500.8+415648 68.79 25.97 6.34 +0.26 +0.04 F0V -0.021+0.106 -020SB 139 3.6 23.4 -6768 BD+32 3047 165683 66626 180206.3+321318180549.6+321350 58.59 23.08 5.71 +1.16 +1.08 K0III +0.012-0.026 +001 -6769 BD-17 5028 165687161093 I 180200.4-171004180748.4-170915 12.75 1.51 5.52 +1.11 +1.08 +0.56 K1III -0.099+0.059 -032V? -6770 71 OphBD+08 3582 165760123140 I 180231.4+084316180718.4+084402 35.82 13.74 4.64 +0.96 +0.74 +0.50 G8III +0.011+0.032 +.021-003 < 19: -6771 72 OphBD+09 3564 165777123142 680 11076 180236.5+093258180721.0+093350 36.59 14.09 3.73 +0.12 +0.10 +0.05 A4IV s -0.060+0.080 +.047-024SB2 80 7.7 54.4AD 4* -6772 CD-3612265 165793209779 180235.6-364113180922.4-364021355.75-08.17 6.58 -0.03 -0.86 B1II -0.011-0.004 +039V? -6773 CD-2512793 165814186350 W V3792 Sgr180243.0-252913180854.1-252821 5.59-02.74 6.61 +0.02 -0.47 B3III +0.003+0.018 -006SBO 2.0 13.3 * -6774 CP-70 2507 1658612575753446 180254.1-704618181424.1-704505323.56-22.54 6.73 -0.03 -0.36 B7-8II-III -0.002-0.023 -007 -6775 99 HerBD+30 3128 165908 66648 11077 180313.7+303251180701.5+303343 56.97 22.30 5.04 +0.52 -0.09 +0.32 F7V -0.094+0.071 +.060+001SB 3 3.4 1.7AB 3* -6776 BD+13 3529 165910103406 11086 180311.9+130327180748.4+130416 39.92 15.50 6.63 +0.07 +0.09 A2Vn +0.016+0.008 -017V? 3.8 42.3 * -6777 CD-3213814 165978209794 180326.7-324355180959.9-324311359.32-06.42 6.43 +1.02 K0IV +0.001-0.149 +010 -6778 CD-4712098 166006228774 W 180331.1-473148181104.5-473047346.05-13.35 6.07 +1.20 +1.45? K1IIICNII +0.007-0.029 -015 5.4 1.7 -6779103Omi HerBD+28 2925 166014 85750 681 S Omi Her 180338.4+284455180732.6+284545 55.19 21.59 3.83 -0.03 -0.07 0.00 B9.5V e+0.001+0.009 +.005-030SB 134 * -6780 CD-3015316 166023209803 W 180338.8-304440181005.7-304343 1.10-05.49 5.53 +0.97 +0.70 K1II +0.003-0.027D+.004-022 2.3 3.9 * -6781100 HerBD+26 3178 166045 85753 11089A 10253 180347.6+260511180749.5+260605 52.54 20.60 5.86 +0.12 +0.08 A3V -0.006+0.033D+.012-017V? 176 0.0 14.3AB 4* -6782100 HerBD+26 3178 166046 85752 11089B 10253 180347.5+260456180749.5+260551 52.53 20.59 5.90 +0.14 +0.08 A3V -0.002+0.033D+.012-016 168 0.0 14.3AB 4* -6783 Eps TelCD-4512251 1660632287771473 W 180348.4-455818181113.8-455716347.50-12.69 4.53 +1.01 +0.78 +0.48 K0III -0.017-0.037 +.023-026 8.4 21.2 -6784 BD+14 3427 1660951034143442 180400.3+141610180833.7+141705 41.14 15.84 6.37 +0.17 +0.23 +0.08 A5m -0.005+0.004 -009V 20 -6785 BD-13 4863 1661031611251472I 180402.7-135704180943.4-135604 15.79 2.67 6.39 +1.42 K0 +0.016-0.003 -020V -6786 CD-4112491 1661142287783444 180400.2-412235181105.6-412133351.68-10.62 5.86 +0.29 +0.07 F2V +0.032-0.035 -004V -6787102 HerBD+20 3674 166182 857693443 11102 180428.8+204755180845.5+204852 47.42 18.42 4.36 -0.16 -0.81 -0.18 B2IV -0.001-0.005 -.010-015V? 33 7.9 23.4 * -6788 CD-3312917 166197209817 10304 180418.4-334907181055.2-334759358.45-07.10 6.16 -0.14 -0.86 B1V -0.011+0.013 -025SB 212 -6789 23Del UMiBD+86 269 166205 2937 913 180432.7+863648173212.9+863511119.29 28.24 4.36 +0.02 +0.03 -0.01 A1Vn +0.009+0.056 +.004-008V? 174 * -6790 BD+50 2525 166207 307513441 180429.9+504823180653.5+504922 78.59 27.52 6.29 +1.04 +0.96 +0.52 K0III +0.002+0.096 -057 * -6791 BD+43 2892 166208 47237 I 180427.9+432656180728.8+432742 70.55 25.90 5.00 +0.91 +0.71 +0.47 G8IIICN-1CH-3 +0.002-0.060 +.012-016SB? < 17 -6792 BD+49 2732 166228 47233 11090 180436.4+494144180706.3+494238 77.37 27.29 6.32R A2V -0.002+0.022D+.008-021SB 210 4.1 2.4 -6793 BD+36 3027 166229 66666 I 180434.1+362328180802.2+362405 63.08 23.92 5.48 +1.17 +1.21 +0.56 K2.5III -0.095-0.183 +.009-007 -6794101 HerBD+20 3675 166230 85770 180434.1+200146180852.9+200243 46.68 18.10 5.10 +0.15 +0.18 A8III +0.008-0.020 +.015-016V? 54 -6795 73 OphBD+03 3610 166233123187 11111 10287 180435.5+035835180933.8+035936 31.72 11.13 5.73 +0.37 +0.03 F2V +0.038-0.007 +.030-017V 94 1.2 0.3AB 3* -6796 CP-63 4334 166251254179 W 180439.1-634240181416.2-634122330.71-20.19 6.47 +1.41 K4III -0.033-0.051 -044 6.8 19. * -6797 BD+03 3613 166285123198 11113 180453.8+030626180954.0+030711 30.97 10.66 5.69 +0.47 -0.01 F5V +0.022-0.192 +.041-014SB2 =< 10 5.2 103.5AC 3 -6798 BD-19 4886 166393161153 11127 180519.2-195141181114.8-195032 10.79-00.50 6.36 +0.16 A4V -0.002-0.028D+.008-032 0.4 1.2AB 3* -6799 BD+30 3138 166411 66682 180520.7+302653180910.2+302810 57.04 21.83 6.38 +1.19 +1.22 +0.61 gK1 +0.071+0.133 -080 -6800 BD+03 3620 1664601232123445I 180540.5+031816181040.3+031927 31.24 10.58 5.51 +1.19 +1.22 +0.61 K2III +0.021-0.003 +010 -6801 11 SgrCD-2314047 166464186437 I 11133 180537.2-234317181143.4-234204 7.46-02.45 4.98 +1.05 +0.90 K0III +0.017-0.019 +.014+004 5.7 42.1 * -6802 CD-2814268 166469186444 V4045 Sgr180536.8-285522181158.2-285405 2.90-04.98 6.51 -0.01 B9IVpSrEuCr +0.017-0.005 -014 * -6803 BD+16 3390 166479103443 11123 10311 180540.8+162727181008.7+162836 43.39 16.40 6.09R B9V+F7III -0.004-0.007D+.004-013 0.8 1.2 * -6804 CD-4112534 166596228815 V692 CrA 180607.8-412134181312.6-412010351.89-10.97 5.47 -0.17 B2.5III -0.013-0.004 -015V? 197: * -6805 CP-63 4343 166599254189 W 180611.0-630452181540.9-630320331.40-20.11 5.60 +0.92 K0III-IV -0.023-0.031 -007 5.6 41.9 * -6806 BD+38 3095 166620 66700 10316 180618.7+382705180937.5+382727 65.34 24.21 6.40 +0.87 +0.59 +0.49 K2V -0.303-0.472 +.092-019V? * -6807 BD+36 3039 166640 66703 180630.1+362646180959.0+362759 63.27 23.56 5.58 +0.91 G8III +0.011+0.015 -026 -6808 CP-68 3081 1668412541963452 W 180719.1-681534181800.9-681345326.26-22.05 6.33 -0.04 -0.23 B9V -0.007-0.019 +022 224 3.5 2.0 -6809 40 DraBD+79 570 166865 8994 11061B 10205 180731.5+795917180003.4+800003111.78 28.91 6.04 +0.51 -0.01 F7 +0.045+0.129 +.025+004SBO =< 25 0.4 19.3AB 3* -6810 41 DraBD+79 571 166866 8996 11061A 10205 180737.7+795928180009.2+800015111.78 28.90 5.68 +0.50 -0.01 F7 +0.042+0.122 +.025+010SB 0 0.4 19.3AB 3* -6811 24 UMiBD+86 272 166926 2940 180747.5+865938173048.0+865805119.70 28.14 5.79 +0.25 +0.07 A2m +0.059+0.010 +001 55 -6812 13Mu SgrBD-21 4908 166937186497 682 11169 Mu Sgr 180746.9-210506181345.8-210332 10.00-01.60 3.86 +0.23 -0.49 +0.20 B8Iap e+0.002+0.001 +.012-006SBO =< 54 2.9 0.0 6* -6813 BD-04 4415 1669601421593450 180753.1-040216181310.0-040042 24.95 6.64 6.59 +0.27 +0.14 +0.14 A2m +0.015+0.022 -011V 25 -6814 BD+33 3044 166988 66733 11149 10363 180805.7+332521181145.1+332649 60.27 22.29 5.88R +0.01 +0.11 A3V +0.012+0.010 -019SB 100 0.3 0.1AB 3* -6815104 HerBD+31 3199 167006 667373448I V669 Her 180808.3+312249181154.2+312419 58.20 21.59 4.97 +1.65 +1.94 +0.97E M3III -0.013+0.030 +.007-000V * -6816 14 SgrBD-21 4916 167036186509 I 10393 180815.4-214424181415.9-214247 9.48-02.02 5.44 +1.52 +1.69 K3III -0.008-0.022 -059V * -6817 BD+54 1950 167042 307843447 180828.6+541524181031.6+541712 82.54 27.55 5.95 +0.94 +0.72 +0.48 K1III +0.104+0.245 +.019-016V? -6818 CD-4412456 167096228851 180834.7-441412181552.7-441224349.47-12.67 5.46 +0.96 +0.72? G8-K0III +0.074+0.012 -027V -6819 CP-56 8706 1671282453691474 Var? 180842.0-560316181707.5-560124338.39-17.69 5.33 -0.05 -0.69 -0.03 B3IIIep v-0.006-0.013 +015SB 50 * -6820 BD+21 3347 167193 85836 I 180902.2+215106181316.5+215249 48.88 17.87 6.12 +1.47 +1.72 +0.80 K4III +0.062+0.051 -066 -6821 CD-5111460 1672572453723453 180908.2-510559181700.9-510406343.13-15.73 6.06 -0.06 B9V -0.002-0.008 -005V? -6822 15 SgrBD-20 5054 167264186543 180914.9-204529181512.9-204342 10.46-01.74 5.38 +0.07 -0.86 B0Ia +0.003+0.003 -006SB 83 * -6823 16 SgrBD-20 5055 167263186544 11191 180915.9-202504181512.9-202317 10.76-01.58 5.95 +0.02 -0.87 O9.5II v-0.002+0.001 -005SB2 160 7.0 6.0 * -6824 BD+41 3011 167304 47305 180931.9+410716181242.6+410849 68.35 24.38 6.36 +1.03 +0.98 K0III -0.014-0.046 -048 -6825 BD-18 4864 167356161227 11196 180938.2-184131181530.8-183941 12.31-00.82 6.07 +0.20 -0.34? A0Ia +0.014+0.006 +002V 5.7 10.1 * -6826 BD+38 3113 167370 667653451 180944.6+384444181304.8+384625 65.87 23.65 6.04 -0.08 -0.22 B9IIIn -0.004+0.010 -009SB 250 -6827 BD+60 1813 167387 178033449 180954.8+602302181107.1+602434 89.43 28.26 6.49 0.00 -0.06 A1Vnn -0.010 0.000 -018 300 -6828 CP-63 4370 167425254209 W 180959.9-635454181940.2-635313330.73-20.81 6.18 +0.58 +0.07 F9V +0.043-0.285 +.017+000 4.6 7.7 -6829 Phi OctCP-75 1417 167468257584 181009.0-750509182336.1-750239319.27-24.38 5.47 +0.02 +0.04 A0V -0.006+0.030 +005 224 -6830 BD-03 4259 167564142185 181042.0-033901181558.0-033703 25.63 6.21 6.36 +0.20 +0.17 A4V +0.015+0.019 -022 -6831 BD+29 3213 167588 85856 181051.0+291059181444.0+291226 56.22 20.27 6.56 +0.54 +0.01 F8V +0.016-0.249 +.014+003 =< 6 -6832 Eta SgrCD-3612423 167618209957 683I'W Eta Sgr 181051.6-364730181737.6-364542356.44-09.68 3.11 +1.56 +1.71 +1.32 M3.5III e-0.128-0.167 +.045+001V? 4.9 3.5AB 4* -6833 CD-3412673 167647209959 W RS Sgr 181058.4-340830181736.1-340626358.83-08.47 6.16 -0.11 -0.60 B3V+A -0.015-0.009 +010SBO 186: 2.6 94.1AC 4* -6834 BD+02 3547 167654123308 I 10466 181103.7+022043181605.6+022240 31.01 8.95 6.01 +1.59 +1.56 M4IIIab -0.003-0.015 +022V? * -6835 CD-2814407 167666186594 181103.6-284110181724.0-283909 3.69-05.92 6.19 +0.18 A5/7V +0.004-0.027 -034 -6836 CD-2814408 167665186593 181103.4-281910181723.7-281721 4.01-05.74 6.40 +0.54 0.00 G0V +0.134-0.156 +007SB -6837 CP-80 849 167714258796 181118.0-801649182919.5-801358313.74-25.77 5.95 +1.16 +1.27 K2III -0.037-0.062 -014 -6838 BD-17 5112 1677201612603454I 181122.5-172429181711.6-172226 13.63-00.56 5.75 +1.58 +1.70 K4II-III -0.003-0.015 -007 -6839 CD-4213101 167756228895 181131.3-421930181840.0-421718351.47-12.30 6.30 -0.11 -0.99 B0.5Ia -0.007-0.004 -025 -6840 BD-03 4263 167768142189 181138.5-030204181653.1-030026 26.29 6.29 6.00 +0.89 +0.54 +0.34E G3III +0.012-0.268 +.005+002V * -6841 BD-18 4886 167771161267 W 181136.6-182955181728.5-182748 12.70-01.13 6.54 +0.11 -0.84 O7III:(n)((f)) -0.003 0.000 +001SBO 90: 6.6 8.4 * -6842 CD-2712684 167818186612 I 181147.6-270443181803.2-270233 5.18-05.29 4.65 +1.66 +1.81 +0.93 K3II +0.008+0.005 +.033-017 -6843 BD-09 4678 1678331421921475 181153.7-094733181724.2-094531 20.36 3.01 6.31 +0.38 +0.27 A8V +0.009-0.056 -014 120 -6844 BD+00 3907 167858123320 181159.8+005816181704.8+010021 29.89 8.10 6.63 +0.31 +0.05 F2V -0.011-0.026 -034V =< 15 -6845 BD+42 3035 167965 47342 684 181232.1+420730181538.8+420934 69.58 24.12 5.59 -0.10 -0.46 B7IV +0.001 0.000 -021SB 201 -6846 CD-2512995 167979186629 I: 181230.4-253830181841.7-253617 6.53-04.75 6.51 +1.34 +1.40 gK1 -0.004-0.030 -046V -6847 BD+45 2684 168009 47343 181240.1+451042181532.6+451234 72.82 24.92 6.29 +0.62 +0.12 G2V -0.068-0.110 +.044-064V? =< 6 -6848 BD-18 4896 168021161304 11240 10543 181250.8-183928181843.3-183710 12.70-01.47 6.84 +0.31 -0.65 B0Ib +0.013+0.006D+.020+004V 76 0.5 0.4AB 5* -6849 BD+56 2080 168092 30836 11213 181255.9+563314181441.1+563518 85.21 27.31 6.37 +0.34 +0.02 F1V -0.011+0.029 -008SB2O 55 3.4 95.6AB 4* -6850 36 DraBD+64 1252 168151 17828 685 181319.2+642148181353.8+642350 93.97 28.29 5.03 +0.38 -0.04 F5V +0.349+0.035 +.047-035 8 -6851 BD+13 3593 1681991035783456 S 181328.2+134420181802.9+134637 41.67 13.54 6.30 -0.03 -0.51 B5V -0.001-0.010 -021 0.1 -6852 BD+18 3623 168270103581 181343.9+180535181807.7+180753 45.76 15.33 5.99R +0.03 -0.10 B9V -0.006-0.004 -027SB 90 -6853 BD+40 3332 168322 47359 181356.4+405350181706.8+405612 68.38 23.52 6.11 +0.99 +0.70 +0.53 G8.5IIIbFe-1CH0.5 -0.163+0.069 +.010-073 * -6854 BD+23 3299 168323 85906 I W 181357.6+231530181807.7+231748 50.71 17.38 6.63R K5 +0.007-0.018 +003 2.3 155.4AC 3 -6855 Xi PavCP-61 6140 168339254226 686 W 10673 181400.6-613221182313.6-612938333.29-20.40 4.36 +1.48 +1.55 K4III +0.001+0.003 +.016+012SBO 4.6 3.5AB 3* -6856 CD-3712457 168357210017 181405.5-373148182055.3-372915356.07-10.59 6.45 +1.31 K2II +0.011-0.008 +002 -6857 BD+07 3629 168387123353 I 11254 181419.3+071309181909.5+071535 35.79 10.46 5.39 +1.07 +1.06 +0.55 K2III-IV -0.047+0.002 -008V 6.7 42.2 * -6858 BD-15 4927 168415161348 I 181423.3-155221182008.8-154954 15.32-00.45 5.39 +1.47 +1.64 K4III +0.037-0.033 +031 -6859 19Del SgrCD-2914834 168454186681 687I 11264 181435.5-295214182059.7-294941 3.00-07.15 2.70 +1.38 +1.55 +0.68 K3-IIIa* +0.035-0.028 +.047-020V? 10.2 58.1AD 4* -6860105 HerBD+24 3381 168532 859213457I 181503.7+242416181910.7+242646 51.92 17.60 5.27 +1.53 +1.74 +0.79 K3III:Ba0.4 +0.009+0.006 -.002-014SBO * -6861 CD-2414219 168574186699 I V4028 Sgr181522.0-245736182131.4-245454 7.44-04.99 6.25 +1.84 +2.03 +1.43E M5III +0.007+0.008 +003V * -6862 CD-3812729 168592210048 181524.9-384207182218.6-383925355.12-11.35 5.10 +1.49 K4-5III -0.033-0.028 +.011+018 -6863 BD-18 4926 168608161376 Y Sgr 181530.0-185416182123.1-185136 12.79-02.14 5.75 +0.94 +0.62 F8I +0.011-0.009 -.006-003V 18 * -6864 CD-2814495 168646186704 181540.4-282832182200.2-282548 4.35-06.71 6.16 +0.26 +0.26 A3III +0.014-0.001 -012 * -6865 37 DraBD+68 984 168653 178373455 181551.9+684311181517.0+684521 98.93 28.40 5.95 +1.06 gK1 +0.015-0.061 -.002-010V -6866 74 OphBD+03 3680 1686561233771476I 11271 181552.5+031956182052.1+032238 32.46 8.34 4.86 +0.91 +0.62 +0.45 G8III 0.000+0.010 +.019+005V? < 19: 7.3 28.1AB 3* -6867 BD+29 3236 168694 85933 I 181600.5+293722181952.1+293958 57.09 19.38 5.99 +1.29 gK4 0.000-0.001 -036 -6868106 HerBD+21 3390 168720 85941 I 181604.0+215508182017.9+215741 49.63 16.40 4.95 +1.59 +1.99 +1.00 M1III +0.017-0.056 +.016-033SB -6869 58Eta SerBD-02 4599 168723142241 688I W 10675 181608.1-025529182118.6-025356 26.91 5.36 3.26 +0.94 +0.66 +0.50 K0III-IV -0.547-0.700 +.058+009V? < 19: 8.7 179.7 * -6870 CD-3612524 168733210061 V4050 Sgr181606.4-364258182253.1-364010356.99-10.58 5.34 -0.14 Ap 0.000-0.018 -012SB? 0 * -6871 CP-63 4406 168740254237 181602.4-630409182531.5-630117331.84-21.15 6.14 +0.20 A3V -0.007-0.099 -021 123 * -6872 1Kap LyrBD+36 3094 168775 668691477I 10657 181621.4+360110181951.7+360352 63.52 21.55 4.33 +1.17 +1.19 +0.55 K2IIIabCN0.5 -0.015+0.043 +.011-022 < 17 * -6873 BD+05 3704 168797123385 10688 181633.6+052324182128.5+052609 34.39 9.13 6.13 -0.04 -0.62 B3Ve +0.013-0.004 -018SB 300 * -6874 CD-3612537 168838210075 181643.7-361713182328.9-361418357.44-10.50 5.55 +1.02 K0III +0.017-0.006 -006 -6875 CD-4412569 1689052289823461 W 10724 181701.7-440935182418.2-440637350.22-14.00 5.25 -0.19 -0.70 B2.5Vn -0.002-0.021 +000V? 297 4.6 75.3 * -6876108 HerBD+29 3241 168913 85956 181705.9+294841182057.1+295132 57.37 19.23 5.63 +0.21 +0.03 +0.11 A5m +0.014+0.057 +.013-020SB2O 20 * -6877107 HerBD+28 2981 168914 85957 10690 181706.9+284920182101.0+285212 56.40 18.86 5.12 +0.20 +0.15 A7V +0.005+0.050 +.021-030SB 183 -6878 BD-10 4673 169009161412 181730.6-101604182302.2-101307 20.61 1.57 6.33 +0.14 B9.5V +0.024-0.007 -024V? =< 41 -6879 20Eps SgrCD-3412784 169022210091 689 W 181732.0-342555182410.3-342305359.20-09.81 1.85 -0.03 -0.13 -0.01 B9.5III -0.038-0.124 +.023-015 140:12.3 36.1 * -6880 BD+51 2357 169028 30897 181735.4+511813181956.1+512052 79.61 25.61 6.30 +1.10 +1.08 gK1 -0.033-0.052 +.037-010SB -6881 BD-12 5024 1690331614153459 181736.4-120349182312.2-120053 19.04 0.69 5.73 +0.01 -0.26 B8IV-Ve -0.007-0.014 -011V 250 -6882 BD+23 3316 169110 85975 I 181758.4+231404182208.7+231707 51.07 16.53 5.41 +1.60 +1.01 M0IIIab +0.012+0.077 -058 -6883 BD+11 3442 169111103648 181756.1+115848182235.3+120144 40.53 11.79 5.89 +0.04 +0.08 A2V +0.012-0.008 -055 -6884 Zet SctBD-09 4712 169156142267 I 181810.8-085911182339.5-085603 21.81 2.03 4.68 +0.95 +0.72 +0.47 G9-IIIbFe-0.5 +0.045+0.046 +.015-006SB1O < 17 * -6885 BD+17 3555 1691911036553460I 181823.9+174634182249.0+174936 45.95 14.19 5.25 +1.27 +1.32 +0.65 K3III +0.071+0.016 +.023-019V < 17 -6886 BD+49 2776 169221 47411 181836.7+494036182107.1+494332 77.90 25.07 6.40 +1.07 K1III -0.007+0.025 -017 -6887 BD+16 3478 169223103660 181835.4+163816182302.9+164117 44.91 13.67 6.22 +1.20 K0 -0.019-0.016 +015SB -6888 18 SgrCD-3015661 169233210116 I 181835.7-304827182501.5-304524 2.57-08.35 5.60 +1.14 K0III-IV -0.123-0.072 -019 -6889 CD-3612589 169236210119 181837.8-360244182521.7-355930357.83-10.73 6.15 +1.00 K0III -0.033+0.013 +004 -6890 BD-03 4277 169268142274 181847.9-033802182403.5-033500 26.61 4.44 6.38 +0.34 -0.01 F6III-IV -0.025-0.055 -017SB2 34 * -6891 BD+49 2782 169305 474173458I 181859.1+490415182132.7+490718 77.27 24.87 5.05 +1.66 +1.94 +0.90E M2IIIab -0.020+0.053 +.000+014 -6892 BD-07 4598 169370142288 181917.2-070743182442.1-070431 23.58 2.67 6.31 +1.16 +1.09 K0 +0.134-0.004 -025 -6893 CD-3412802 169398210135 181917.6-340001182554.6-335643359.75-09.94 6.30 -0.08 -0.51 B5IV +0.002+0.006 -006 -6894 CD-4812505 169405229021 181918.1-481018182653.9-480701346.61-16.02 5.46 +0.84 K0-1III+F-G -0.007-0.042 +.026+004SB -6895109 HerBD+21 3411 169414 86003 690I W 10742 181926.1+214327182341.9+214611 49.77 15.60 3.84 +1.18 +1.17 +0.60 K2.5IIIab +0.196-0.242 +.025-058V? < 17 6.5 221.8 -6896 21 SgrBD-20 5134 169420186794 I 11325 181923.6-203543182521.0-203230 11.74-03.75 4.81 +1.31 +0.92 +0.84 K2II +0.006-0.025 +.013-012V? 3.6 1.7 * -6897 Alp TelCD-4612379 169467229023 691 181933.5-460124182658.4-455806348.67-15.18 3.51 -0.17 -0.64 -0.21 B3IV -0.016-0.054 -000V? 35 * -6898 BD-01 3486 169493142294 11324 181946.0-013801182457.0-013446 28.49 5.16 6.15 +0.37 +0.15 F6III+A9III -0.017-0.010D+.011-010V? 0.4 0.8 * -6899 CP-74 1682 1695702576013466 182004.9-740138183255.3-735756320.58-24.73 5.89 +0.98 +0.83 K0III -0.002-0.090 -025 -6900 BD+05 3730 169578123453 182013.2+050146182508.8+050505 34.49 8.16 6.74 +0.02 -0.21 B9V -0.003+0.008 -023V 250 -6901 BD+38 3160 169646 66936 I 11320 10756 182036.4+384105182357.4+384421 66.53 21.62 6.36R K4III +0.027+0.006 -040V 6.1 61.5AC 3* -6902 BD+07 3682 1696891234621478 182050.1+075833182538.8+080155 37.21 9.36 5.65 +0.92 +0.45 G8III-IV+A0V -0.002-0.006 -008SBO =< 50 * -6903 2Mu LyrBD+39 3410 169702 669433463 182056.1+392709182413.8+393026 67.33 21.80 5.12 +0.03 +0.08 A3IVn -0.023-0.002 +.004-024SB 165 * -6904 BD+27 3016 169718 86019 11334 182059.8+272022182458.5+272343 55.30 17.51 6.27 +0.05 +0.02 A0V+A4V +0.002+0.008D+.004-029SB 105 0.9 0.6AB 3* -6905 Zet TelCD-4912153 169767229047 182107.7-490729182849.9-490415345.82-16.68 4.13 +1.02 +0.82 +0.34E G8-K0III +0.144-0.242 +.027-031 * -6906 BD+14 3533 169820103709 S 182123.3+145434182555.4+145800 43.60 12.32 6.37 +0.01 -0.31 B9V +0.012-0.006 -021V 0.1 -6907 CD-2914965 169830186838 182125.8-295237182749.5-294859 3.69-08.47 5.92 +0.52 F9V -0.003+0.032 -017V -6908 CP-57 9063 1698362455103464 W 182119.8-573504182956.7-573123337.57-19.87 5.76 +0.98 K0III +0.051-0.025 -000 4.7 33.9AC 3 -6909 CD-2613184 169851186837 11354 182129.6-264137182743.8-263805 6.55-07.02 6.31 +0.26 A8V+F2V +0.003-0.025D+.009-029 0.0 1.1 * -6910 CD-3912626 169853210197 182132.0-390318182827.1-385944355.33-12.57 5.64 +0.13 A2mA2-F0 -0.002-0.038 -021 -6911 BD+53 2079 169885 30943 182138.5+531446182347.8+531803 81.86 25.44 6.32 +0.16 +0.14 +0.06 A3m +0.008-0.015 -004 40 -6912 CP-81 813 169904258804 182142.5-815306184214.1-814828312.09-26.50 6.27 -0.13 -0.37 B8V +0.001-0.006 -006V? -6913 22Lam SgrCD-2513149 169916186841 692I 182147.9-252837182758.2-252518 7.66-06.52 2.81 +1.04 +0.89 +0.56 K1+IIIb -0.044-0.185 +.053-043V? * -6914 CD-2613192 169938186843 182151.7-264901182806.2-264526 6.47-07.15 6.27 +0.16 A3/4V 0.000-0.036 -030 -6915 CD-4312564 169943229056 182157.8-435431182912.9-435045350.84-14.70 6.36 +0.90 G8III -0.002+0.028 -009 -6916 Nu PavCP-62 5879 169978254273 10889 182202.0-622030183122.4-621642332.82-21.56 4.64 -0.11 -0.39 B7-8III -0.003-0.045 +059 91 * -6917 BD+29 3259 169981 860431479 182207.3+294616182558.8+294944 57.76 18.20 5.83 +0.06 +0.09 +0.04 A2IV +0.026-0.022 +009SBO * -6918 59 SerBD+00 3936 169985123497 11353 d Ser 182205.5+000812182712.5+001146 30.34 5.48 5.21 +0.50 +0.21 +0.38 G0III+A6V -0.008-0.002 +.016-023SBO 270 2.3 3.8AB 3* -6919 BD-17 5203 169990161493 I: 10835 182206.4-175139182756.5-174800 14.45-03.02 6.20 +0.01 -0.30 B8V -0.004+0.007 -035V -6920 43Phi DraBD+71 889 170000 9084 11311 Phi Dra 182211.4+711705182045.5+712016101.88 28.04 4.22 -0.10 -0.33 -0.10 A0pSi: -0.004+0.040 +.012-016SB1O 88 1.7 0.2AB 3* -6921 CD-3812824 170040210213 182222.3-385449182916.8-385104355.54-12.66 6.63 -0.02 B8 -0.004-0.007 -028 -6922 CD-4712319 170069229064 182224.6-471701182955.8-471313347.68-16.14 5.70 +1.26 K2III +0.013-0.003 -018 -6923 39 DraBD+58 1809 170073 30949 11336 182226.9+584434182354.5+584802 87.88 26.44 4.98 +0.08 +0.04 +0.02 A1V -0.039+0.060 +.035-015SB 175 2.8 3.8AB 8* -6924 BD+26 3259 170111 86060 11356 182239.5+262322182640.9+262658 54.53 16.80 6.53 -0.11 -0.58 B3V -0.003 0.000 -018SB 2.7 62.3AC 3* -6925 BD+03 3716 170137123513 I 182251.5+034115182750.3+034455 33.59 6.96 6.07 +1.62 +1.84 K3III -0.005-0.005 -019 -6926 CD-2613206 170141186863 W 10864 182243.4-263840182857.4-263454 6.72-07.24 6.5 +0.11 A3III +0.003+0.009 -017 1.7 41.9 * -6927 44Chi DraBD+72 839 170153 9087 695 W 10749 182251.5+724122182103.4+724358103.46 28.06 3.57 +0.49 -0.06 +0.31 F7V +0.532-0.350 +.120+033SB2O 11 2. 0.1 * 4* -6928 BD+06 3790 170200123516 S 182305.7+060758182758.8+061139 35.81 8.03 5.73 -0.03 -0.35 B8III-IV 0.000-0.024 -012SBO 30 0.1 * -6929 CD-2513170 170235186873 V4031 Sgr182311.8-251912182922.0-251523 7.95-06.73 6.59 +0.07 -0.68 B2IVpe v+0.004-0.001 -004 130 * -6930 Gam SctBD-14 5071 170296161520 696 182329.8-143747182911.9-143357 17.46-01.79 4.70 +0.06 +0.06 +0.05 A3Vn +0.003-0.002 +.025-041V? 223 -6931 CD-4112871 170384229080 182356.3-415846183103.0-415449352.81-14.23 6.04 +0.14 A3V 0.000-0.022 -014 -6932 BD-14 5077 170397161528 V432 Sct 182404.6-143851182946.8-143454 17.51-01.92 5.96 -0.04 -0.14 B9pSiCr +0.021+0.025 -016V 46 * -6933 BD-18 4982 170433161540 182419.1-184732183011.9-184344 13.88-03.92 5.66 +1.06 gK0 +0.038-0.095 +.011-001 -6934 Del1TelCD-4512550 170465229092 182420.9-455855183145.4-455454349.06-15.93 4.96 -0.11 -0.42 B6IV -0.008-0.032 +007SB1O 33 * -6935 60 SerBD-02 4641 1704741423481480 182428.7-020300182941.0-015907 28.68 3.93 5.39 +0.96 +0.76 +0.48 K0III +0.032-0.033 +.013+028SB1 < 17 * -6936 CD-3313281 170479210257 W 182431.2-330319183104.8-325921 1.11-10.49 5.34 +0.16 +0.07 A3m -0.001-0.045 +.023+009 120 4.5 3.4AB 3* -6937 CD-4312600 170521229094 182442.8-433433183156.2-433028351.37-15.01 5.72 +1.34 K2III -0.005-0.019 +007 -6938 Del2TelCD-4512556 170523229095 182438.2-454933183202.0-454526349.23-15.91 5.07 -0.14 -0.56 B3III +0.004-0.008 +008SB1O 24 * -6939 CP-58 7418 170525245547 182443.3-584635183329.5-584233336.54-20.70 6.44 +0.68 +0.18 G5IV +0.027-0.124 +033 * -6940 BD-05 4675 1705471423533468 182453.5-054726183014.3-054327 25.42 2.08 6.28 +0.95 +0.65 G8II-III +0.004-0.018 +027SBO * -6941 BD+03 3727 1705801235713469 11399 182507.0+035955183005.1+040355 34.13 6.60 6.69 +0.11 -0.51 B2V 0.000-0.009 -022 95 4.2 20.1AB 5* -6942 CD-3912696 170642210277 182523.4-394622183221.4-394214354.99-13.55 5.16 +0.08 A3Vn +0.036-0.040 +.022-006 151 -6943 BD+23 3347 170650 86115 182526.9+234758182935.7+235158 52.32 15.19 5.90 -0.10 -0.51 B6IV 0.000-0.007 -017SB 200 -6944 BD-18 4988 170680161564 11411 182534.7-182816183126.3-182410 14.30-04.03 5.14 0.00 A0Vp -0.003-0.025 +.017-037V 213 8.9 25.2 * -6945 42 DraBD+65 1271 170693 178883465I 182541.8+653006182559.1+653349 95.42 27.13 4.82 +1.19 +1.11 +0.63 K1.5IIIFe-0.5 +0.105-0.023 +.021+032V < 17 -6946 BD-10 4713 170740161569 11414 182552.9-105153183125.7-104745 21.06-00.53 5.72 +0.24 -0.45 B2V 0.000-0.015 -015V? 3.6 12.3 * -6947 BD-19 5047 170764161571 W U Sgr 182559.9-191142183153.3-190730 13.71-04.46 6.68 +1.13 +0.69 +0.71 G1.5Ib -0.009+0.001 +002SB? 2.0 430.7AG 17* -6948 CD-3912704 1707732102863470 182601.8-395740183300.9-395332354.87-13.74 6.22 +0.42 F5IV +0.086-0.086 -016 -6949 BD+59 1899 170811 30990 182619.6+592857182742.3+593257 88.79 26.09 6.43 K0IV +0.052+0.045 -010 -6950 BD+20 3821 170829 86142 Var? 182624.4+204511183041.6+204855 49.55 13.72 6.50 +0.79 +0.40 G8IV +0.011-0.258 +.029-059SBO * -6951 The CrACD-4213378 170845229111 697 182621.7-422304183330.2-421845352.62-14.80 4.64 +1.01 +0.76 +0.50 G8III +0.031-0.022 -.001-002V? -6952 Kap1CrACD-3812896 170868210296 W B 182629.3-384731183323.3-384313356.00-13.33 6.32 A0III +0.021-0.028 -016 0.7 21.4 * -6953 Kap2CrACD-3812895 170867210295 W A 182629.3-384753183323.1-384334355.99-13.33 5.65 -0.06 B9V -0.003-0.030 -020 0.7 21.4 * -6954 CP-5211158 170873245559 182628.6-525752183431.2-525331342.43-18.91 6.22 +1.25 K2III -0.011-0.054 +024 -6955 BD+16 3529 1708781038001481 182637.5+165133183104.4+165543 45.96 12.02 5.77 +0.04 +0.07 A2V -0.032-0.021 -009SB? -6956 BD-14 5098 170902161580 S 182638.5-144254183220.8-143839 17.75-02.50 6.37 +0.22 A4V +0.019-0.017 -038 0.0 -6957 61 SerBD-01 3504 170920142372 182647.1-010426183157.0-010011 29.81 3.88 5.94 +0.16 +0.16 +0.12 A4III +0.010-0.006 -027 * -6958 BD+03 3737 170973123610 MV Ser 182707.8+033516183207.0+033935 34.00 5.96 6.43 -0.04 -0.26 A0pSiCr +0.031+0.015 -008V? 15 * -6959 BD-14 5099 170975161587 I 182700.6-145617183243.3-145156 17.59-02.68 5.50 +1.97 +2.17 K3Ib-IICN1 -0.004+0.001 +005 -6960 CD-3313338 1710342103123471 182724.1-330526183357.8-330100 1.35-11.05 5.28 -0.11 -0.69 B2IV-V +0.004-0.010 +004V 172 * -6961 24 SgrCD-2414472 171115186981 I 182746.9-240625183353.5-240157 9.52-07.10 5.49 +1.79 K4Ib +0.002-0.010 -014V? -6962 BD-14 5106 171130161605 182756.2-145541183339.0-145113 17.70-02.88 5.76 +0.04 A2V +0.025-0.013 -021V -6963 BD-06 4791 171149142386 182801.6-055907183322.9-055441 25.61 1.30 6.36 +0.02 -0.04 A0Vn +0.012-0.017 -024 210 -6964 CP-83 663 1711612588103992 182758.8-832445185157.9-831859310.43-26.94 7.16 +1.26 +1.30 K1IIICNII: -0.008-0.021 +011V -6965 25 SgrCD-2414479 171237186995 11035 182825.7-241755183432.8-241321 9.42-07.31 6.51 +0.54 +0.46 F3II-III +0.001-0.001 +008 17 * -6966 BD+23 3363 171245 861753472I W 182836.4+233232183246.2+233701 52.39 14.42 5.84 +1.46 gK5 +0.010+0.016 -004V? * -6967 BD+08 3741 171247123634 11448 182835.0+081136183323.3+081606 38.29 7.75 6.42 -0.03 -0.34 B8IIIpSiSr: +0.007-0.003 -022V? 4.0 38.7 * -6968 BD+30 3223 171301 67090 11446 182900.5+302844183249.9+303315 59.04 17.09 5.48 -0.10 -0.34 B8IV +0.010+0.009 +.009-010V 74 7.3 7.1 -6969 BD-20 5189 171369187012 182923.2-205507183521.3-205027 12.54-05.96 6.48 +0.28 F0IV +0.030-0.013 -010 -6970 BD-11 4681 1713911616323477 182928.9-110319183502.4-105838 21.31-01.40 5.14 +0.92 +0.60 +0.47 G8III +0.051-0.004 +.012+007V < 19: -6971 BD+30 3227 171406 67102 Var? 182934.7+304857183323.1+305333 59.41 17.11 6.59 -0.12 -0.51 B4Ve v+0.011+0.009 -004 * -6972 CD-2915123 1714161870243478 182936.6-294642183559.7-294157 4.58-10.01 6.37 +1.27 K1III +0.009-0.009 -050V? -6973 Alp SctBD-08 4638 1714431424081482I 11056 182945.9-081851183512.4-081439 23.76-00.17 3.85 +1.33 +1.54 +0.68 K3-III-IIIb -0.015-0.312 +.016+036V? < 17 * -6974 BD+52 2232 171461 310323474 182954.0+520225183211.4+520656 80.90 23.94 6.56 -0.07 -0.18 B9.5V -0.004+0.006 -023V? 59 -6975 BD+20 3847 171487 862033476 183001.4+202319183419.6+202759 49.58 12.81 6.57 +0.11 +0.07 A3V +0.008-0.006 -009SB -6976 BD+10 3573 171505103867 183005.4+104848183447.5+105330 40.82 8.60 6.40R +0.08 +0.05 A1V +0.004-0.007 -036 124 -6977 BD+18 3740 171623103879 S 183048.5+180724183512.6+181212 47.56 11.67 5.78R 0.00 -0.10 A0Vn +0.014+0.006 -021SB 280 0.2 -6978 45 DraBD+56 2113 171635 310393475 183051.0+565808183234.5+570244 86.20 24.99 4.77 +0.61 +0.44 +0.31 F7Ib +0.001-0.006 +.013-012V 18 -6979 BD+65 1276 171653 17912 W 183056.8+652131183114.8+652610 95.35 26.57 6.59 +0.30? A8m -0.019+0.071 -009SB2O 20 4.2 26.6 * -6980 BD+23 3385 171745 86224 11479 183120.6+233128183530.4+233620 52.64 13.84 5.61 +1.00 +0.83 G9III+G7III +0.004+0.005D+.006+016V 0.2 0.6 * -6981 BD+16 3560 171746103886 11483 11085 183125.7+165345183553.2+165832 46.50 11.00 6.21 +0.53 +0.01 G2V+G2V +0.049-0.068 +.020+010V? 0.2 1.8AB 3* -6982 Zet PavCP-71 2353 171759257620 698 W 183121.1-713050184302.1-712541323.49-24.95 4.01 +1.14 +1.02 +0.42E K0III -0.005-0.156 +.035-016 =< 9 7.9 55.6 * -6983 BD+52 2238 171779 31051 I 11468 183140.5+521626183356.7+522113 81.23 23.73 5.36 +1.09 +0.96 +0.54 K0III -0.002+0.008 +.004-024V? < 17 0.1 0.3AB 3* -6984 BD+34 3245 171780 67134 S Var 183136.6+342237183513.5+342728 63.04 18.05 6.10 -0.11 -0.55 B5Vne v+0.006+0.003 -.021-027SB 310 0.2 * -6985 BD+09 3783 1718021236901484 183141.6+090237183627.8+090721 39.40 7.45 5.39 +0.37 -0.02 F5III -0.002-0.129 +.033-022 14 * -6986 CD-4812644 1718192291653482 183140.2-475945183914.3-475435347.62-17.86 5.86 +0.23 A7IV-V +0.028+0.015 -009V -6987 BD+06 3855 171834123693 11496 183147.2+063535183639.1+064019 37.22 6.31 5.45 +0.37 -0.04 F3V -0.025-0.141 +.032-021SB 55 6.7 74.8AC 4* -6988 BD-21 5076 1718561870711485 D 183155.1-212849183754.4-212352 12.31-06.75 5.94 +0.19 A8IIIn 0.000-0.067 +006V 0.0 0.1 * -6989 BD-14 5139 171957161687 11512 183224.0-140524183804.6-140017 18.95-03.44 6.47 +0.21 -0.19 B9IV +0.019+0.002 -019V? 4.8 2.0AB 3* -6990 CD-2314572 171961187080 183225.8-233525183830.7-233018 10.47-07.81 5.81 +0.02 -0.41 B8III -0.003-0.020 -033V * -6991 CD-4312699 171967229172 183224.0-431618183935.0-431110352.23-16.17 5.37 +1.68 +1.95 +0.95E M2III -0.052-0.052 +.004+029 -6992 BD+11 3530 171975103912 183231.9+112015183712.6+112518 41.56 8.30 6.42R -0.02 -0.22 B9V -0.021-0.011 -027 200 -6993 BD-00 3521 1719781424443480 11122 183227.6-002337183736.0-001834 31.08 2.94 5.75 +0.07 +0.06 +0.04 A1V+A1V +0.016-0.019 +012SB2O 26 * -6994 CP-77 1314 171990257625 183227.7-775810184749.4-775202316.48-26.29 6.39 +0.60 +0.13 F8V -0.022+0.188 +015 -6995 BD+16 3563 171994103913 183239.8+160645183709.0+161154 45.92 10.40 6.29 +0.90 +0.56 G8IV +0.010+0.047 -046 -6996 CP-64 3942 172021254343 183236.4-644358184222.5-643835330.72-23.39 6.37 +0.15 +0.14 A5V -0.009-0.032 -009V? -6997 BD+33 3154 172044 67164 11504 11113 183257.2+332305183637.2+332808 62.18 17.42 5.42 -0.10 -0.50 B8II-IIIpHg -0.019 0.000 +.007-026SBO 46 4.6 7.3 * -6998 BD-21 5081 172051187086 183255.6-210804183853.4-210307 12.73-06.80 5.86 +0.68 +0.14 G4V -0.078-0.152 +.072+036V -6999 BD-03 4331 172088142461 11520 183308.9-031652183823.7-031137 28.60 1.44 6.49 +0.55 +0.06 F9IV -0.009+0.032 +.027-021V 0.1 0.1AB 3* -7000 BD-01 3529 172103142460 183309.2-011158183819.1-010648 30.44 2.41 6.66 +0.42 +0.01 F1IV-V -0.027-0.012 -025 23 -7001 3Alp LyrBD+38 3238 172167 67174 699I 11510 Alp Lyr 183333.1+384126183656.3+384701 67.44 19.24 0.03 0.00 -0.01 -0.03 A0Va +0.202+0.286 +.123-014V 15 10.4 62.8AB 5* -7002 BD+08 3780 172171123744 I 11524 X Oph 183334.1+084448183821.0+085002 39.35 6.90 6.4 H +1.32 +0.89 M6IIIe+K1III -0.014+0.006 +.011-071V 2.2 0.4 * -7003 BD+43 3027 172187 476443481 183341.8+430812183645.6+431319 71.90 20.72 6.20 +0.24 +0.09 F0V +0.023-0.006 +005SB 185 -7004 CP-64 3943 172211254353 183352.3-643838184337.2-643304330.86-23.50 5.78 +0.96 +0.77 K0III +0.003-0.036 -011 -7005 CD-4812668 172223229194 11183 183356.3-481058184130.6-480542347.58-18.28 6.49 +1.22 K2III-IVCNII -0.025-0.122 -046 * -7006 BD+77 699 172340 9151 700 183434.8+772809182944.9+773249108.91 27.61 5.64 +1.18 gK4 -0.001+0.001 +.014+001V? -7007 BD-07 4648 172348142480 I 11552 183434.9-075248184000.5-074726 24.70-01.02 5.84 +1.55 +1.83 K4III +0.004-0.032 -023V? 5.0 19.4 * -7008 BD+05 3891 1723651237783485 183441.5+051027183936.9+051551 36.28 5.02 6.38 +0.78 +0.42 F8Ib-II +0.006+0.001 -019SB? * -7009 BD+39 3476 172380 67193 I XY Lyr 183448.2+393447183806.5+394005 68.41 19.32 6.04 +1.65 +1.42 +1.96 M4.5-M5+II +0.006+0.006 -019 * -7010 BD+07 3798 172424123782 11555 183501.1+071609183951.6+072130 38.19 5.91 6.28 +0.96 +0.69 G8III +0.007-0.056 -041 5.3 23.1AB 4* -7011 26 SgrCD-2314625 1725461871463486 183545.7-235535184151.6-235000 10.51-08.64 6.23 +0.23 Am +0.032-0.024 +002V -7012 CP-64 3948 1725552543583489 183537.9-645754184526.9-645217330.57-23.76 4.79 +0.20 +0.08 A5IV-V +0.027-0.149 +.035+002 134 -7013 BD+65 1283 172569 17947 701 183554.4+652357183613.3+652919 95.49 26.07 6.06 +0.28 +0.09 F0V +0.019+0.083 +.009-023SB 135 * -7014 BD-14 5156 172594161730 183600.7-143930184142.5-143351 18.85-04.48 6.42 +0.81 F2Ib +0.006+0.001 -003V 17 -7015 CP-61 6229 172630254359 183605.0-611134184511.5-610542334.54-22.80 6.04 +1.46 K3III +0.023-0.023 -020 -7016 BD+30 3262 172631 67226 183613.2+304523184002.0+305058 59.93 15.77 6.36R K0 -0.005+0.032 -050 -7017 BD+40 3446 172671 47676 W 183619.6+405036183933.1+405606 69.77 19.49 6.25 -0.06 -0.17 B9V +0.027-0.002 -009SB 130 0.4 0.2 * -7018 BD+62 1637 172728 179583484 183639.3+622608183733.5+623136 92.27 25.43 5.74 -0.06 -0.17 A0V -0.005+0.051 -011V =< 41 -7019 BD+38 3254 172741 67233 183648.7+381626184012.2+382202 67.27 18.50 6.45 +0.21 +0.14 +0.09 A6m +0.026+0.001 +017 * -7020 Del SctBD-09 4796 1727481425151486 11581 Del Sct 183647.9-090854184216.4-090309 23.83-02.10 4.72 +0.35 +0.14 +0.19 F2IIIpDel Del +0.009+0.002 +.025-045SB 32 4.5 52.6AC 3* -7021 Lam CrACD-3813036 172777210501 W 11247 183655.3-382510184346.9-381925357.21-15.04 5.13 +0.09 A2Vn +0.003-0.057 +.024-026V 131 4.5 29.2AB 3* -7022 CP-57 9180 172781245681 183655.0-565851184523.7-565254338.92-21.66 6.22 +1.38 K3III -0.054-0.007 +069 -7023 BD-19 5134 172816161754 I D V3879 Sgr183701.6-192248184255.2-191702 14.74-06.86 6.35 +1.75 +1.56 +1.52E M4III -0.001-0.024 -033V? 2.6 0.6 * -7024 BD-07 4670 172831142525 183712.3-071012184236.1-070424 25.63-01.27 6.15 +1.00 +0.89 K0-1III -0.003+0.005 +026V -7025 BD+83 536 172864 30561646 183721.8+830606182409.2+831031115.27 27.73 6.17 +0.05 +0.06 A2V +0.015-0.027 -011 -7026 CD-3612946 172875210507 183722.0-364856184407.7-364307358.77-14.47 6.32 +0.98 K0III 0.000-0.060 -028V? -7027 CP-73 1939 172881257630 W 183725.5-730602184943.5-725941321.87-25.73 6.06 0.00 -0.09 B9.5IV-V -0.004+0.024 +003SB3 2.0 1.8 * -7028 BD+52 2263 172883 31093 183734.8+520606183952.8+521146 81.31 22.82 6.00 -0.07 -0.21 A0p:Hg: +0.004+0.028 -018V 65 * -7029 CD-3512876 1729102105093490 W 183737.5-354425184419.4-353831359.80-14.08 4.87 -0.18 -0.72 -0.16 B2.5V 0.000-0.031 +004 65 7.8 9.4 * -7030 BD+31 3332 172958 672563487 183754.7+313116184141.3+313704 60.81 15.74 6.41 -0.04 -0.20 B8V +0.008+0.009 -016 175 -7031 CD-3912864 172991210518 183800.4-394711184457.2-394111356.00-15.77 5.43 +0.87 +0.37?+0.60? K3II+B7 +0.008-0.011 +.012-017SB * -7032 Eps SctBD-08 4686 173009142546 702I 11601 183804.4-082227184331.3-081631 24.67-02.02 4.90 +1.12 +0.87 +0.61 G8IIb +0.022+0.008 +.016-011V < 19: 8.6 37.6AC 4* -7033 BD+34 3285 173087 67265 11593A 183831.7+343856184208.1+344448 63.87 16.83 6.47 -0.13 -0.57 B5V +0.010+0.008 -024SB 130 1.0 0.2AP 4* -7034 BD-06 4859 173093142557 183827.8-065459184351.4-064907 26.00-01.43 6.31 +0.48 +0.02 F7V +0.048-0.055 -066 30 -7035 CD-2513394 173117187216 D 183840.7-250640184449.6-250040 9.73-09.76 5.83 +0.05 -0.35 B5:V +0.005-0.022 +015V 0.2 0.0 * -7036 The PavCP-65 3754 173168254374 183848.0-651052184837.8-650440330.43-24.14 5.73 +0.24 +0.11 A8V -0.045-0.083 -001 190 -7037 CD-5012135 173263245702 183914.4-501151184659.1-500540345.91-19.80 6.54 +0.28 F0V -0.001-0.034 -032 -7038 BD-21 5131 173282187234 183920.5-210611184518.7-210005 13.44-08.12 6.36 +0.45 F5V +0.027-0.019 +002V -7039 27Phi SgrCD-2713170 1733001872391487 D 183924.5-270537184539.4-265927 8.00-10.77 3.17 -0.11 -0.36 -0.11 B8III +0.053 0.000 +022SB 68 0.0 0.1 * -7040 4 AqlBD+01 3766 173370123879 11290 183947.1+015730184449.9+020336 34.01 2.41 5.02 -0.06 -0.26 B9V e+0.009-0.018 +.005-013V 300 * -7041 BD+39 3505 173383 67287 I W 11271 183956.6+391159184316.7+391801 68.41 18.26 6.45 +1.59 +2.00 K5 +0.016-0.002 -034SB 3.8 60.2 -7042 BD+62 1641 173398 17975 184003.8+623900184056.3+624459 92.60 25.09 6.09 +0.98 K0III 0.000+0.061 -026 -7043 BD+36 3246 173416 67292 184005.7+362714184336.1+363324 65.74 17.22 6.01 +1.04 G8 +0.024+0.065 -061 -7044 BD+31 3348 173417 67293 184006.1+314943184351.6+315536 61.29 15.43 5.70 +0.34 +0.05 F1III-IV -0.033-0.129 +.026-002V -7045 BD-19 5154 173425161803 I 11309 184006.9-194238184601.2-193623 14.78-07.65 6.42 +1.65 M4III -0.002+0.004 -040V * -7046 28 SgrBD-22 4854 173460187255 I 11652 184018.8-222949184620.6-222332 12.28-08.94 5.37 +1.64 +1.90 K4III +0.031 0.000 -003V 7.7 13.7 -7047 BD+23 3439 173494 86393 184030.0+232922184440.2+233523 53.51 11.92 6.31 +0.40 0.00 F6V +0.009-0.087 +.019-012 -7048 BD+05 3941 173495123886 11640 184033.4+052346184528.4+052959 37.16 3.83 5.83 +0.04 +0.03 A1V+A1V +0.015-0.011D+.006-011SB 130 0.3 1.3AB 4* -7049 46 DraBD+55 2107 173524 311193491 W 11273 184041.7+552617184237.9+553222 84.94 23.29 5.04 -0.09 -0.30 B9.5pHg: -0.002+0.024 +.011-030SB2O 19 5.6 146.8AB 3* -7050 Mu CrACD-4012807 1735402292853492 184045.1-403045184744.6-402422355.51-16.54 5.24 +0.78 G5-6III +0.030-0.017 +.023-018V? -7051 4Eps1LyrBD+39 3509 173582 67310 11635A 184101.5+393355184420.4+394012 68.85 18.20 5.06H +0.16 +0.06 A4V +0.017+0.059 +.021-031V 200 0.0 209.3AC 10* -7052 4Eps1LyrBD+39 3509 173583 67309 11635B 184101.6+393358184420.3+394016 68.85 18.20 6.02H F1V +0.003+0.059 +.021-033V 150 0.0 209.3AC 10* -7053 5Eps2LyrBD+39 3510 173607 67315 11635C 11301 184103.9+393029184422.9+393647 68.79 18.17 5.14H +0.19 +0.08 A8Vn +0.008+0.064 +.021-024V? 177 0.0 209.3AC 10* -7054 5Eps2LyrBD+39 3510 173608 11635D 11301 184103.9+393029184422.9+393646 68.79 18.17 5.37H F0Vn +0.007+0.064 +.021-028V? 212 0.0 209.3AC 10* -7055 BD-10 4797 173638161817 11670 11333 184112.4-101352184643.3-100730 23.38-03.56 5.71 +0.59 +0.54 F2Ib-II -0.005+0.002 +010SB 16 8.2 3.4 * -7056 6Zet1LyrBD+37 3222 173648 67321 11639A 11308 184119.6+373002184446.4+373618 66.85 17.38 4.36 +0.19 +0.16 +0.08 A4m v+0.028+0.024 +.031-026SB1O 27 1.4 43.7AD 5* -7057 7Zet2LyrBD+37 3223 173649 67324 11639D 11311 184121.5+372924184448.2+373540 66.85 17.37 5.73 +0.28 +0.06 F0IV v+0.022+0.019 +.031-025SB 230 1.4 43.7AD 5* -7058 BD+21 3550 173650 86405 V535 Her 184121.0+215246184535.7+215906 52.11 11.05 6.51 +0.02 -0.08 B9pSiCr: v+0.015+0.012 -017SB? 16 * -7059 5 AqlBD-01 3559 173654142606 11667 184118.7-010401184628.5-005742 31.51 0.67 5.90 +0.13 +0.12 +0.07 A2Vm +0.013-0.022D+.009+017SB? =< 25 1.6 12.8AB 3* -7060 BD+53 2126 173664 31133 184121.1+534611184329.0+535219 83.22 22.74 6.11R +0.12? A2IV +0.006-0.008 +000 -7061110 HerBD+20 3926 173667 86406 703I 11658 11323 184121.4+202702184539.7+203247 50.79 10.43 4.19 +0.46 +0.01 +0.26 F6V -0.008-0.335 +.052+024 14 9.2 63.8AC 5* -7062 Eta1CrACD-4312841 1737152292991490 184137.5-434719184850.5-434048352.40-17.92 5.49 +0.13 A3V +0.025-0.019 -004 -7063 Bet SctBD-04 4582 1737641426181489I 184152.1-045118184710.5-044452 28.22-01.22 4.22 +1.10 +0.81 +0.57 G4IIa e-0.004-0.016 +.019-022SB1O 10 * -7064 BD+26 3349 173780 864181488I 184202.6+263318184604.5+263944 56.50 12.90 4.83 +1.20 +1.23 +0.61 K3III +0.018+0.024 +.023-017V? < 17 -7065 CD-4512779 1737912293063495 184204.2-455520184927.4-454837350.33-18.76 5.81 +0.90 +0.51 G8III +0.076+0.051 +010 -7066 BD-05 4760 173819142620 I R Sct 184208.6-054845184729.0-054218 27.40-01.72 5.20 +1.47 +1.64 +0.77 K0Ibp v-0.041-0.028 +.001+044V * -7067 BD+18 3817 173833104087 I 184218.1+183557184641.4+184221 49.21 9.42 6.17 +1.59 K5 +0.028-0.022 -013 -7068 Eta2CrACD-4312854 173861229307 184223.4-433240184935.0-432602352.69-17.95 5.61 -0.08 B9IV -0.003-0.024 -023V? -7069111 HerBD+18 3823 1738801040931491 W 184236.2+180412184701.3+181053 48.76 9.12 4.36 +0.13 +0.07 +0.03 A5III +0.073+0.116 +.032-045SB? 79 5.5 121.3AC 4* -7070 CD-3413128 173902210600 184238.4-345125184917.2-344455 1.06-14.66 6.62 +1.08 K1IVCNIII +0.046-0.101 -061 -7071 BD+54 2034 173920 31151 184254.2+544728184455.4+545348 84.36 22.81 6.23 +0.82 G5III +0.007-0.019 +007 -7072 BD-18 5079 173928161848 W 184253.7-184242184845.3-183605 15.98-07.79 6.47 G5III:+A0V: -0.007-0.004 -031V? 0.7 0.4 -7073 BD+41 3137 173936 477793493 184301.1+412002184613.0+412630 70.73 18.48 6.07 -0.13 -0.49 B6V +0.001-0.001 -019 125 -7074 Lam PavCP-62 5983 173948254393 704 W Lam Pav 184257.1-621807185213.0-621115333.61-23.87 4.22 -0.14 -0.89 -0.16 B2II-IIIe v-0.006-0.014 +009V 189 8.0 63.1 * -7075 BD+60 1845 173949 17995 11661 184307.5+605631184418.2+610253 90.85 24.36 5.99 +0.96 +0.73 G7IV -0.005+0.018D+.006-025V? 2.8 1.2 -7076 BD+04 3884 1739541239283494I 184304.9+040752184802.7+041429 36.32 2.69 6.21 +1.51 +1.79 K5 v-0.002+0.014 -001 * -7077 BD-19 5182 174115161871 D Var? 184342.4-191518184935.5-190832 15.57-08.21 6.75 +0.20 +0.15 +0.11 A1m +0.017+0.010 -043SB2 0.0 0.2 * -7078 29 SgrBD-20 5277 174116187324 I 11713 11372 184344.1-202618184940.1-201929 14.50-08.74 5.24 +1.41 K4III +0.005+0.036 +.034-018SB 8.6 16.6 -7079 BD+23 3461 174160 86451 184405.6+232412184816.4+233051 53.79 11.14 6.15 +0.49 +0.02?+0.60? F8V +0.024-0.030 -000 =< 15 * -7080 BD+46 2551 174177 47798 184408.5+461219184659.0+461854 75.64 19.98 6.52 +0.07 +0.17 A2IV -0.002-0.010 -001V? -7081 BD+31 3369 174179 67396 184410.8+313845184757.5+314525 61.48 14.57 6.06 -0.13 -0.66 B3IVp +0.009-0.002 -015 * -7082 BD+70 1023 174205 9222 184418.3+704114184310.2+704734101.44 26.18 6.44R K2 -0.002-0.004 -005 -7083 BD-06 4922 174208142661 I 11719 184419.8-060133184941.0-055446 27.47-02.30 5.99 +1.60 +1.65 K2Ib +0.005-0.006 -007SBO 2.5 113.7AC 3* -7084 BD+52 2280 174237 311651492 CX Dra 184429.0+525241184643.1+525917 82.45 22.03 5.88 -0.09 -0.73 B2.5Ve v+0.010-0.002 -016SBO 170 * -7085 BD+00 4027 174240123947 184431.5+004323184937.1+005009 33.47 0.79 6.25 +0.04 +0.01 A1V -0.001-0.024 -040SB 72 -7086 BD+19 3798 174262104129 184431.6+191259184853.4+191943 50.00 9.22 5.88 +0.03 +0.02 A1V +0.017-0.021 +006SB 74 -7087 Kap TelCP-5211268 1742952457723499 184443.6-521319185239.6-520627344.16-21.27 5.17 +0.94 G8-K0III +0.041-0.103 +.014-044 -7088 30 SgrBD-22 4881 1743091873421493 11731 184449.8-221636185050.5-220944 12.95-09.78 6.61 +0.38 +0.29 A7III -0.019-0.033 -035V? 120 6.8 21.1 * -7089 BD-08 4726 174325142674 I 11726 S Sct 184454.3-080120185020.0-075427 25.76-03.35 6.80 +3.09 +4.04 C5II +0.003+0.003 +000 4.0 14.4AB 3* -7090 BD+48 2767 174366 47815 S 184503.3+485745184740.0+490430 78.48 20.74 6.40R A1V +0.005+0.019 -017 71 0.5 -7091 BD+24 3545 174369 86462 S 184507.9+245558184914.4+250247 55.30 11.58 6.59R A1V +0.003-0.014 -009SBO 74 0.2 * -7092 CD-4612669 174387229336 184501.1-464245185227.1-463543349.73-19.51 5.54 +1.63 M0III +0.019-0.003 +.009-028 -7093 CP-5211273 174430245783 184517.5-520259185312.1-515552344.37-21.30 6.31 -0.09 B4III +0.010-0.006 -023 -7094 BD-09 4859 174464142692 184528.4-095325185058.5-094627 24.16-04.34 5.83 +0.61 +0.35 F2Ib +0.002-0.002 -018V? 19 -7095 CD-4812769 174474229342 184528.0-482839185302.5-482136347.99-20.18 6.19 +0.14 +0.08 A2V -0.003-0.046 -044 -7096 BD+48 2770 174481 478233497 184537.8+483910184816.1+484603 78.20 20.55 6.12 +0.21 +0.08 A7III -0.019+0.050 -030 185 -7097 CD-4612676 174500229343 184534.2-464219185259.6-463509349.78-19.60 6.19 +0.03 +0.05 A1IV-V -0.028+0.023 +035 -7098 BD+31 3373 174567 67438 184557.0+313051184944.0+313745 61.51 14.17 6.64 +0.02 -0.10 A0V s -0.003-0.012 -003 =< 7 -7099 BD+10 3685 174569104170 I 11750 184603.3+105134185045.6+105835 42.65 5.13 6.55R K5III+K3III +0.023+0.009D+.005-024SB 1.1 3.5 * -7100 8Nu 1LyrBD+32 3227 174585 67441 11732 11400 184602.5+324151184945.9+324846 62.64 14.63 5.91 -0.16 -0.71 B3IV +0.006-0.008 -017V 5.9 58.7AC 6* -7101 8 AqlBD-03 4392 1745891427063500 184607.0-032605185122.1-031904 29.97-01.50 6.10 +0.30 +0.09 F2III 0.000-0.020 +012V -7102 9Nu 2LyrBD+32 3228 174602 67446 11737 184608.8+322608184952.9+323303 62.40 14.50 5.25 +0.08 +0.11 A3V -0.009-0.014 +.020+010V? 141 7.8 19.0 * -7103 CD-2613562 174630187388 184615.2-264605185228.5-263901 8.96-12.01 6.29 +0.94 G8/K0III +0.013-0.046 -025V? -7104 CD-2915449 174631187389 184615.9-292951185237.0-292246 6.43-13.16 6.13 +1.35 K1III -0.002-0.040 -056V -7105 CD-3016356 1746322106633502 184616.4-305110185241.7-304403 5.16-13.72 6.63 -0.05 -0.27 B8V -0.002-0.023 -050V -7106 10Bet LyrBD+33 3223 174638 67451 705I 11745A Bet Lyr 184623.2+331447185004.8+332146 63.19 14.78 3.45 0.00 -0.56 +0.02 B8IIpe +0.003-0.003 -.002-019SBO 5.2 45.7AB 6* -7107 Kap PavCP-67 3603 1746942544133505 Kap Pav 184638.4-672131185657.0-671401328.29-25.39 4.44 +0.71 +0.60 F5I-II -0.010+0.012 +.010+038V * -7108 CD-5012206 174730229358 184649.9-500002185432.3-495243346.53-20.88 6.60 +0.08 A2V -0.010-0.012 -008 -7109 BD+13 3787 1748531041963503 S V822 Her 184726.8+135045185201.9+135756 45.48 6.19 6.14 0.00 -0.31 B8Vnn -0.011-0.005 -029SB2O 125 0.1 * -7110 BD-09 4876 174866142741 S 184732.1-094150185301.9-093434 24.57-04.70 6.34 +0.20 +0.11 A7Vn +0.040-0.002 -048 0.2 -7111 CP-62 6002 174877254415 184733.2-625540185654.7-624804333.08-24.54 6.48 +1.53 K3III 0.000+0.032 +027 -7112 BD+28 3104 174881 86512 184739.9+283950185135.9+284701 59.00 12.65 6.18 +1.18 K1II-III +0.012+0.008 -022 -7113112 HerBD+21 3582 174933 86521 184800.1+211816185216.4+212531 52.27 9.41 5.48 -0.07 -0.42 B9II-IIIpHg -0.006-0.008 +.007-020SB2O 13 * -7114 33 SgrBD-21 5176 174947187422 I 184801.5-212856185400.1-212135 14.00-10.10 5.69 +1.23 +1.05?+0.65? K1Ib +0.008-0.015 -007V -7115 BD+36 3295 174959 67485 184805.6+362508185136.5+363219 66.35 15.72 6.09 -0.11 -0.48 B6IV -0.007-0.022 -021 60 -7116 32Nu 1SgrBD-22 4907 174974187426 I 11794 184807.9-225204185410.2-224442 12.74-10.72 4.83 +1.41 +1.23 +0.69 K2I+B9V: +0.010-0.010 +.030-012V? 5.8 2.5AB 3* -7117 BD+73 835 174980 9241 184816.3+735811184546.7+740508105.11 26.39 5.27 +0.92 +0.80 K0II-III +0.005+0.077 +.020+003V < 17 -7118 BD+41 3167 175132 47874 184854.5+411541185207.1+412300 71.08 17.43 6.28 -0.09 -0.31 B9IIIpSi -0.016-0.001 -023 68 * -7119 BD-15 5143 175156161964 184859.2-154340185443.1-153611 19.33-07.75 5.10 +0.17 -0.39 B5II -0.008-0.005 -003V? 19 * -7120 35Nu 2SgrBD-22 4915 175190187445 I 184904.4-224746185507.1-224017 12.91-10.89 4.99 +1.33 +1.51 +0.66 K3II-IIIBa0.8CN2 +0.103-0.026 +.042-110SB -7121 34Sig SgrCD-2613595 175191187448 706I W 184903.9-262515185515.9-261748 9.56-12.43 2.02 -0.22 -0.75 -0.21 B2.5V +0.013-0.054 -011V 201 7.4 309.0 * -7122 CD-4213761 175219229383 184909.4-425013185616.9-424238353.85-18.85 5.36 +1.00 K0III -0.035-0.026 +.010-021 -7123 BD+52 2294 175225 31217 184920.5+525045185135.0+525830 82.65 21.33 5.51 +0.84 +0.51 +0.42 G9IVa -0.046+0.271 +.037+002V? -7124 50 DraBD+75 682 175286 92501494 184936.1+751858184622.2+752602106.61 26.50 5.35 +0.05 +0.04 A1Vn -0.015+0.073 +.008-008SB2O 57 * -7125 47Omi DraBD+59 1925 175306 31218 707I 11779 Omi Dra 184943.5+591558185112.1+592318 89.31 23.14 4.66 +1.19 +1.04 +0.64 G9IIIFe-0.5 +0.079+0.027 +.006-020SB1O 20 3.4 34.6AB 3* -7126 BD-16 5078 1753171619841495 184945.4-162954185531.0-162236 18.71-08.26 5.79 +0.36 +0.06 F4V -0.025-0.185 -042V? -7127 Ome PavCP-60 7213 1753292544233511 184943.2-601955185836.4-601202335.92-24.18 5.14 +1.37 +1.44 +0.52E K2IIICNIV -0.126+0.031 +.019+180 -7128 CD-2314844 175360187468 184957.4-231804185600.6-231025 12.53-11.29 5.93 -0.02 -0.41 B8 -0.002-0.009 -016V? -7129 CD-3712982 175362210734 V686 CrA 184953.6-372815185640.5-372036359.16-17.02 5.38 -0.14 -0.71 B8IVSi v+0.009-0.026 +001V 170 * -7130 CP-66 3404 175401254426 184954.2-664705190003.5-663912328.98-25.59 6.01 +0.97 +0.80 K0III +0.003-0.040 -020V -7131 11Del1LyrBD+36 3307 175426 675373506 W 11504 185013.9+365048185343.6+365818 66.93 15.49 5.58 -0.15 -0.66 B2.5V +0.004-0.002 -026SBO 123 3.7 174.6 * -7132 BD+27 3150 175443 86558 I 185014.6+274708185413.2+275434 58.43 11.76 5.62 +1.35 K4III -0.016-0.074 +015 -7133113 HerBD+22 3524 175492 865673508I 11820 185031.5+223106185444.9+223842 53.63 9.42 4.59 +0.78 +0.49 +0.46 G4III+A6V 0.000+0.001 +.013-024SBO 50 7.9 35.7AB 3* -7134 Lam TelCP-53 9402 175510245834 708 185027.8-530410185827.7-525619343.57-22.35 4.87 -0.05 A0V +0.010-0.011 -002SB 92 -7135 BD+06 3978 1755151240503509I 11536 185034.8+062924185527.5+063655 39.28 2.12 5.57 +1.04 +0.88 +0.55 K0III +0.021-0.087 +.011+023SBO * -7136 CD-3913012 175529210754 185038.3-395716185734.7-394924356.80-18.08 6.31 +0.20 A3 +0.037+0.029 +005 -7137 BD+50 2686 175535 31241 I 185044.9+503501185313.6+504230 80.43 20.40 4.92 +0.90 +0.57 +0.45 G7IIIaFe-1 +0.005-0.025 +.024+008V? < 19: -7138 BD+41 3174 175576 47902 185100.3+410554185414.3+411332 71.08 17.00 7.30R F5 +0.034+0.017 -7139 12Del2LyrBD+36 3319 175588 67559 I 11825 Del2 Lyr 185100.3+364617185430.2+365356 66.93 15.32 4.30 +1.68 +1.65 +1.63 M4II -0.009+0.010 -.001-026 7.0 86.2AB 3* -7140 BD+33 3257 175635 67566 11834 185112.6+335027185452.5+335807 64.18 14.11 6.02 +0.91 +0.64 +0.50 G8III+A2 -0.008+0.003 -016SB 1.0 45.4AC 4* -7141 63The1SerBD+04 3916 175638124068 709 11853A 11557 185114.9+040424185613.2+041213 37.22 0.85 4.62 +0.17 +0.09 A5V +0.049+0.031 +.030-046V? 143 0.4 22.2AB 3* -7142 63The2SerBD+04 3917 175639124070 11853B 185116.3+040419185614.6+041207 37.22 0.85 4.98 +0.20 +0.08 +0.07 A5Vn +0.049+0.026 +.030-053 196 0.4 22.2AB 3* -7143 BD-01 3602 1756401428253510 185111.0-015543185622.7-014800 31.89-01.92 6.22 -0.05 -0.30 B9III -0.005-0.022 -026V? * -7144 BD+02 3730 175679124073 W 185123.6+022029185625.6+022816 35.70 0.02 6.15 +0.97 +0.71 G8III +0.007-0.011 -015V 5.7 100. AB 3 -7145 36Xi 1SgrBD-20 5339 175687187498 185123.9-204713185720.5-203923 14.99-10.50 5.08 +0.13 -0.14? A0II -0.001-0.007 -.006+002 14 -7146 BD+41 3177 175740 47909 I 11840 185140.0+412828185452.2+413610 71.49 17.03 5.44 +1.03 K0III +0.002-0.002 -009V 6.9 23.6AC 3 -7147 BD+17 3778 175744104271 V828 Her 185138.4+175157185603.9+175942 49.54 7.11 6.63 -0.04 -0.44 B9pSi +0.011-0.018 -025 59 * -7148 BD+17 3779 175743104272 185141.4+175848185606.2+180619 49.65 7.15 5.69 +1.09 +1.06 K1III -0.041-0.162 +.004+044SB * -7149 Eta SctBD-06 4976 175751142838 I 185142.4-055834185703.7-055046 28.36-03.91 4.83 +1.08 +1.02 +0.53 K2III +0.066-0.036 +.039-093V < 19: -7150 37Xi 2SgrBD-21 5201 175775187504 710I 185145.8-211417185743.8-210624 14.61-10.78 3.51 +1.18 +1.13 +0.59 K1III +0.033-0.012 +.011-020 * -7151 CD-3116189 175794210773 185155.9-311002185821.3-310210 5.37-14.96 6.12 +1.35 K3III -0.045-0.056 +085 -7152 Eps CrACD-3713001 1758132107813512 Eps CrA 185158.7-371416185843.4-370627359.54-17.32 4.87 +0.41 +0.03 F2V -0.132-0.105 +.032+054SBO 132: * -7153 BD+57 1915 175823 31252 185202.2+572134185346.3+572913 87.41 22.31 6.22 +1.23 gK5 +0.018-0.006 -005 -7154 BD+48 2793 175824 47913 11846 185208.8+484403185447.1+485135 78.66 19.56 5.77 +0.43 +0.02 F3III -0.061-0.118 +.017-011V? 50 4.7 1.5AB 3* -7155 CD-2513574 175852187517 D 185212.6-250035185820.5-245236 11.17-12.48 6.62 +0.08 A0 +0.007+0.003 -017 0.0 0.1 * -7156 CD-3913032 175855210786 W 185216.3-394004185911.1-393205357.20-18.27 6.49 -0.04 A0 +0.009-0.035 -015 5.3 15.9 -7157 13 LyrBD+43 3117 175865 47919 711I R Lyr 185217.5+434851185520.1+435646 73.81 17.79 4.04 +1.59 +1.41 +1.91 M5III +0.023+0.083 +.000-028SBO * -7158 64 SerBD+02 3738 175869124089 185214.8+022414185716.6+023207 35.85-00.14 5.57 0.00 -0.27 B9IIIep:Hg: v-0.005-0.012 -010V 105 * -7159 BD-22 4928 175892187519 185223.4-223947185824.6-223146 13.36-11.52 6.14 +0.09 A2V -0.022+0.017 -007 -7160 BD+79 604 175938 92563501 185241.7+794920184538.1+795633111.64 26.93 6.39 +0.28 +0.04 A8V +0.015+0.057 -005V? 113 -7161 CP-68 3180 175986254446 W 185248.5-685342190329.7-684519326.72-26.23 5.88 +0.56 +0.13 F8V -0.015-0.003 +025 0.0 0.2 * -7162 BD+32 3267 176051 67612 11871 185316.6+324623185701.6+325405 63.35 13.27 5.22 +0.59 +0.03 +0.34 F9V +0.172-0.157 +.057-047V 4 2.2 0.7AB 6* -7163 BD+06 3989 176095124112 185330.4+060630185823.8+061425 39.28 1.30 6.21 +0.46 +0.01 F5IV -0.003-0.104 -009 =< 10 -7164 BD-18 5155 176123162050 D 185335.7-184206185926.8-183401 17.12-10.06 6.37 +0.99 G3II +0.003-0.043 -014V * -7165 BD+17 3799 176155104296 11884 FF Aql 185347.7+171335185814.7+172139 49.21 6.36 5.38 +0.80 +0.43 F8Ib -0.003-0.007 -.007-022SBO 17 5.3 6.6 * -7166 BD-13 5172 176162162052 W Var 185346.7-125834185923.8-125026 22.33-07.55 5.53 -0.04 B5IV +0.002-0.018D+.006-013SB 185 0.5 0.4 * -7167 10 AqlBD+13 3838 176232104303 V1286 Aql185411.4+134620185846.9+135424 46.16 4.70 5.89 +0.25 +0.09 F0pSrEu -0.002-0.052 +015 =< 6 * -7168 CD-2513614 176246187562 185416.6-250452190024.8-245632 11.31-12.94 6.36 +1.25 gK0 +0.055+0.044 -025 -7169 CD-3713017 176269210815 I W B 185417.7-371156190103.2-370339359.76-17.73 6.69 B9V +0.011-0.020 +012SB 172 0.2 12.8 * -7170 CD-3713018 176270210816 W A 185418.8-371158190104.3-370343359.76-17.74 6.40 -0.03 B8V-IV +0.010-0.040 -015SB =< 39 0.2 12.8 * -7171 BD+19 3858 176301104306 185424.1+193930185845.1+194739 51.45 7.34 6.50 -0.04 -0.43 B7III-IV +0.004-0.004 -001 125 -7172 11 AqlBD+13 3841 176303104308 11902 11618 185429.4+132921185905.7+133721 45.94 4.50 5.23 +0.53 +0.07 +0.30 F8V +0.014-0.123 +.039+016V? 26 4.3 17.8AB 3* -7173 BD+09 3951 176304104313 185432.9+100015185917.5+100827 42.85 2.88 6.75 +0.25 -0.43 B2Vp +0.025-0.011 -015V? 49 -7174 BD+38 3373 176318 67642 185436.5+380751185801.9+381558 68.51 15.21 5.89 -0.17 -0.52 B7IV +0.001 0.000 -028SB1O 125 * -7175 48 DraBD+57 1922 176408 312843513 185503.5+574056185645.0+574854 87.87 22.02 5.66 +1.15 +1.19 K1III -0.029-0.062 +.018-034V? -7176 13Eps AqlBD+14 3736 176411104318 712I W 185505.0+145557185937.4+150406 47.30 5.04 4.02 +1.08 +1.04 +0.52 K1-IIICN0.5Ba0.2 -0.051-0.073 +.028-048SB < 17 5.9 131.1AB 3* -7177 CD-4213839 176425229446 185504.5-420304190208.7-415436355.04-19.60 6.23 0.00 A0V +0.048+0.002 -013 -7178 14Gam LyrBD+32 3286 176437 67663 713 11908 11624 185512.1+323308185856.6+324122 63.32 12.81 3.24 -0.05 -0.09 -0.01 B9III -0.002+0.002 +.021-021V 76 8.3 176.9AC 4* -7179 BD+40 3544 176502 47965 11910 185530.2+403230185846.6+404045 70.88 16.00 6.22 -0.16 -0.65 B3V +0.008 0.000 -014SB 3.5 19.0 * -7180 52Ups DraBD+71 915 176524 9283 714I 185537.4+710949185423.9+711750102.15 25.36 4.82 +1.15 +1.10 +0.56 K0IIIBa0.2 +0.049+0.044 +.014-007SB < 17 -7181 BD+26 3418 176527 86673 I 185541.0+260531185945.5+261350 57.41 9.94 5.27 +1.24 +1.27 K2III +0.088-0.008 -.002-024SB < 17 -7182 BD-22 4946 176537187584 I 185536.0-225011190137.8-224144 13.53-12.26 6.24 +1.66 K5 +0.004 0.000 -014V? -7183 BD+22 3549 176541 86675 I 185545.0+224031185958.1+224853 54.32 8.41 6.29 +1.75 +2.00 M3.5IIIab -0.022+0.012 -053 -7184 BD+58 1849 176560 31292 11897 185549.5+580515185728.4+581331 88.33 22.04 6.46 +0.08 +0.05 A2IV +0.014+0.047 -.008-008V? 105 0.2 0.8 * -7185 BD+39 3602 176582 67675 185550.2+390445185912.3+391304 69.51 15.36 6.41 -0.17 -0.70 B5IV +0.002+0.012 -014V * -7186 BD-15 5185 176593162097 185550.6-152525190133.5-151657 20.35-09.10 6.32 +1.00 +0.78 gG6 0.000+0.003 +020V? -7187 BD+65 1309 176598 180793514 185559.0+650725185625.6+651529 95.68 23.95 5.63 +0.95 +0.69 G8III -0.028-0.032 -.002-005V? -7188 Zet CrACD-4213855 1766382294613519 185601.9-421413190306.9-420543354.91-19.83 4.75 -0.02 -0.07 B9.5V +0.061-0.049 +.031-013 -7189 NOVA 1899 V1016 Sgr * -7190 CD-5111893 176664245899 W 185609.8-510931190357.4-510107345.82-22.64 5.93 +1.24 +1.38 K0-1III +0.028-0.146 -061 6.5 22.0AC 3 -7191 BD+62 1669 176668 18082 11901 185617.0+621541185717.4+622348 92.68 23.18 6.45 +0.93 +0.66 G5IV+G8V +0.006-0.039 -008V? 2.8 17.0AB 4* -7192 15Lam LyrBD+31 3424 176670 67682 I 11641 185614.4+320020190000.9+320844 62.91 12.38 4.93 +1.47 +1.67 +0.73 K2.5IIIBa0.5 +0.013+0.013 -.003-016V < 19: -7193 12 AqlBD-05 4840 176678142931 I 11655 185620.4-055248190140.8-054420 28.98-04.89 4.02 +1.09 +1.04 +0.54 K1III v-0.019-0.033 +.021-044V < 17 -7194 38Zet SgrCD-3016575 176687187600 I 11950 185615.0-300123190236.7-295249 6.84-15.35 2.60 +0.08 +0.06 +0.01 A2III+A4IV -0.015-0.002 +.025+022SB 72 0.3 0.5AB 3* -7195 CD-2513655 176704187599 D 185620.4-245905190227.7-245049 11.60-13.32 5.65 +1.23 K3III -0.022-0.175 +002V? 0.0 0.1 * -7196 BD+50 2705 176707 31304 185630.3+504012185859.6+504834 80.84 19.57 6.30 +0.98 G8III +0.024+0.018 -021 -7197 CD-3813300 176723210859 185628.1-382350190317.7-381512358.75-18.57 5.74 +0.32 F0IIIn +0.013+0.009 +004V? 203 * -7198 BD+19 3879 176776104362 185643.1+191005190105.5+191835 51.26 6.63 6.39R K1III +0.018+0.002 -029 -7199 BD+75 683 176795 9286 11870 185655.3+753914185333.2+754715107.07 26.10 6.22R A1V +0.013+0.024 -.004-017SB 100 0.8 5.6 * -7200 BD+20 4022 176819 86704 11659 185704.1+204127190122.6+205001 52.67 7.25 6.69 +0.02 -0.69 B2IV-V +0.007+0.017 -010SBO * -7201 BD+40 3555 176844 47993 I 11652 185702.5+403236190019.0+404103 71.00 15.73 6.65R M4IIIa +0.002-0.011 -005 -7202 BD+26 3429 176871 867073518 185713.6+260857190117.4+261729 57.62 9.65 5.69 -0.08 -0.54 B5V 0.000-0.011 +.009-014V 296 -7203 BD-19 5273 176884162130 11972 185711.1-192323190303.8-191443 16.87-11.12 6.05 +1.29 +1.09 G6III +0.007+0.006 -020V? 3.5 7.4AB 4* -7204 BD+33 3287 176896 67699 185714.0+333936190055.2+334808 64.53 12.89 6.01 +0.97 gK0 +0.007+0.003 -028V -7205 BD-19 5275 176903162133 D 185714.6-191451190307.0-190612 17.00-11.07 6.37 +0.48 F5IV-V +0.007-0.015 +019V? 0.0 0.1 * -7206 BD+24 3608 176939 86714 185727.6+245258190134.9+250133 56.49 9.05 6.72R K2 -0.001 0.000 -021 -7207 BD+22 3561 176971 86716 185734.6+220714190149.5+221550 54.01 7.78 6.40R +0.16? A4V +0.021-0.008 -038V? -7208 BD+08 3951 176981124184 185732.9+081346190221.6+082227 41.63 1.40 6.30 +1.67 +1.73 K2III +0.026+0.022 -009 -7209 14 AqlBD-03 4460 176984142959 W 185738.5-035038190254.5-034156 30.94-04.23 5.42 0.00 -0.07 A1V +0.023+0.007 -039V? 56 0.0 0.1 * -7210 BD+50 2708 177003 313113515 185742.8+502330190013.7+503201 80.64 19.29 5.38 -0.18 -0.75 B2.5IV +0.009+0.005 -019SB 13 -7211 CD-3116306 177074210883 185759.8-311137190425.1-310249 5.88-16.16 5.50 +0.03 A0IV +0.014-0.016 -026V? 107 -7212 BD+33 3295 177109 67721 11965 185806.5+332838190148.3+333717 64.44 12.65 6.39 -0.12 -0.62 B5IV -0.003+0.003 -023 6.2 25.4 -7213 Rho TelCP-5211356 177171245921 185824.9-522915190619.9-522027344.54-23.35 5.16 +0.53 +0.04 F7V +0.030-0.118 +.022+002SB2 46 * -7214 BD+01 3865 177178124203 185828.7+014027190332.2+014908 35.93-01.86 5.83 +0.18 +0.10 A4V +0.006-0.067 -022SB2 160 -7215 16 LyrBD+46 2602 177196 48011 11964 11677 185836.5+464735190126.4+465605 77.15 17.86 5.01 +0.19 +0.08 +0.09 A7V +0.020-0.084 +.036+008V 121 6.3 200. AC 3* -7216 BD+19 3888 1771991044053521 185831.1+193055190252.6+193940 51.77 6.41 6.09 +1.34 K1III +0.004-0.001 -007 -7217 39Omi SgrBD-21 5237 177241187643 I 11996 11703 185841.4-215317190441.0-214430 14.71-12.51 3.77 +1.01 +0.85 +0.53 G9IIIb +0.080-0.060 +.044+025 9.9 35.7 -7218 49 DraBD+55 2137 177249 31323 185844.6+553054190043.4+553930 85.83 20.86 5.48 +0.86 G5.5IIbFe-0.5 -0.016-0.006 +010V -7219 BD+03 3882 177332124219 185910.5+031055190410.7+031950 37.35-01.31 6.73 +0.13 +0.14 +0.09 A5m +0.007+0.013 -013 -7220 BD-05 4858 177336142985 I V Aql 185903.7-054959190424.2-054106 29.33-05.47 6.90 +4.19 C5II +0.020-0.005 +037V? * -7221 CP-68 3185 177389254475 185916.7-683441190952.7-682529327.17-26.76 5.33 +0.91 +0.61 G8-K0III-IV +0.145-0.052 +.030-010 -7222 BD+21 3648 177392 86753 LT Vul 185924.9+210714190342.5+211604 53.30 6.95 6.52 +0.32? F2III +0.022-0.021 +005 120 * -7223 CD-4812901 1774062294933523 185923.3-482701190655.6-481757348.80-22.36 5.97 -0.02 -0.02 A0V +0.016-0.016 -006 -7224 BD+69 1018 177410 181033517 EE Dra 185929.9+692320185852.6+693152100.31 24.65 6.52 -0.15 -0.53 A0pSi +0.005+0.004 -015 * -7225 15 AqlBD-04 4684 177463142996 I 12007A 185940.9-041049190457.6-040153 30.88-04.84 5.42 +1.12 +1.01 +0.61 K1III +0.020-0.027 +.002-018V? =< 25 1.6 38.5 * -7226 Gam CrACD-3713048 177474210928 W 185939.5-371225190625.1-370348 0.16-18.73 4.93 +0.52 -0.00 F8V +0.096-0.274 +.054-052SB 0 0.1 1.6 * -7227 Gam CrACD-3713048 177475210928 W 185939.5-371225190625.1-370348 0.16-18.73 4.99 +0.52 +0.00 F8V +0.096-0.274 +.054-052 0.1 1.6 * -7228 Sig OctCP-89 47 177482258857 923 Sig Oct 185944.1-891517210846.2-885723303.91-27.71 5.47 +0.27 +0.13 F0III +0.023+0.005 +012 108 * -7229 BD+52 2326 177483 31337 11979 185945.9+520656190207.0+521540 82.47 19.59 6.31 +1.00 G8III -0.007-0.026D+.005+004V? 3.4 5.2AxBC 3* -7230 BD-15 5223 1775171621773522 W Var? 185957.5-154839190541.2-153937 20.44-10.16 5.97 -0.02 -0.25 B9V +0.003-0.007 -026SB 95 6.2 46.9 * -7231 BD-01 3642 177552143003 190007.7-013947190518.6-013046 33.17-03.78 6.53 +0.35 -0.04 F1V -0.003-0.007 -032 45 -7232 CD-3713049 177565210937 190006.6-375710190652.5-374837359.46-19.08 6.16 +0.72 +0.28 G5IV -0.184-0.352 +.063+059 -7233 CP-55 9001 177693245937 190035.4-555221190852.1-554313341.05-24.51 6.49 +1.10 K1III +0.031-0.110 -021 -7234 40Tau SgrCD-2713564 1777161876831496I 190041.8-274900190656.4-274014 9.34-15.37 3.32 +1.19 +1.15 +0.59 K1+IIIb -0.053-0.251 +.044+045SB * -7235 17Zet AqlBD+13 3899 177724104461 716I 12026 11724 190048.8+134253190524.6+135148 46.86 3.25 2.99 +0.01 -0.01 0.00 A0Vn -0.005-0.096 +.045-025SB 331 8.4 158.6AC 3* -7236 16Lam AqlBD-05 4876 177756143021 717I' 190056.5-050157190614.9-045257 30.26-05.51 3.44 -0.09 -0.27 -0.09 B9Vn -0.017-0.090 +.032-012V 176 -7237 BD+31 3453 177808 67782 I 190109.2+313542190457.9+314440 62.98 11.26 5.56 +1.54 +1.91 +0.91 M0III +0.076-0.067 +.018+006V? -7238 BD+30 3409 177809 67781 I 190106.9+303458190458.3+304400 62.05 10.83 6.06 +1.55 +1.88 M2.5IIIab +0.030-0.022 -016SB -7239 BD-16 5153 177817162201 12039 190107.1-162257190652.3-161344 20.04-10.66 6.03 -0.04 -0.35 B8IV +0.021+0.004 -017V? 4.0 6.4 * -7240 CD-2815403 177846187701 I 190113.1-284727190730.9-283813 8.46-15.86 6.04 +1.61 K3III +0.008-0.010 +005V -7241 BD-18 5206 177863162204 11743 190117.2-185330190708.5-184416 17.75-11.78 6.29 -0.04 -0.41 B8III +0.019-0.004 -011V -7242 Del CrACD-4013061 177873229513 190123.3-403906190820.9-402948356.86-20.24 4.59 +1.09 +1.03 K1III +0.037-0.026 +.016+020 -7243 BD+08 3970 177940124266 I W R Aql 190133.2+080443190622.2+081348 41.95 0.45 6.09 +1.60 +0.37 M7IIIe v+0.006-0.071 +032V 5.0 180.7AC 3* -7244 BD+29 3472 178003 86796 I 190153.4+294608190547.1+295518 61.38 10.32 6.31 +1.65 +1.98 M0III -0.005-0.009 -028 -7245 BD+00 4106 178065124282 190202.9+002911190709.1+003830 35.30-03.20 6.56 +0.05 -0.28 B9III +0.003+0.009 -011V 5 * -7246 CD-2415041 178075187718 190208.0-244848190814.6-243925 12.32-14.45 6.30 +0.04 -0.24 B9III +0.018+0.005 -013 -7247 BD+76 712 178089 9296 190209.1+765430185757.2+770303108.50 26.02 6.54 +0.38 -0.06 F2V -0.039-0.064 -027V? 15 -7248 18 AqlBD+10 3787 1781251044883525 Y Aql 190216.1+105502190658.6+110417 44.55 1.63 5.09 -0.07 -0.39 B8III +0.005-0.026 +.016-019SBO 57 * -7249 BD-19 5312 178175162229 V4024 Sgr190224.2-192649190816.7-191724 17.35-12.26 5.54 -0.11 -0.78 -0.04 B2Ve v+0.006+0.008 -020SB 176 * -7250 BD+24 3640 178187 86817 190228.2+240544190638.4+241503 56.30 7.67 5.77 +0.09? A4III +0.055+0.015 -022V? -7251 51 DraBD+53 2178 178207 31371 190240.3+531435190455.2+532348 83.76 19.56 5.38 -0.01 -0.08 A0Vn -0.003+0.025 +.023-024SB 173 -7252 BD+49 2929 178208 48071 12034 190234.8+494611190509.9+495524 80.32 18.34 6.43R K3III -0.004+0.014 +008 5.3 80. AC 3 -7253 BD+28 3193 178233 868191498 190239.6+282816190637.7+283743 60.28 9.60 5.55 +0.29 +0.04 F0III +0.076+0.085 +.025-024SB 158 -7254 Alp CrACD-3813350 178253210990 718 190240.2-380336190928.3-375416359.54-19.59 4.11 +0.04 +0.08 0.00 A2V +0.084-0.098 +.036-018 201 * -7255 CD-4013074 178254210994 190245.2-395907190939.7-394941357.62-20.26 6.46 +1.06 K0III -0.001-0.049 +017 -7256 CD-3613355 1782992109963528 190255.1-361924190936.4-360953 1.28-19.02 6.56 -0.02 A0IV -0.008-0.013 -011SB2 * -7257 CD-4213933 178322229531 190255.0-420304190957.8-415333355.55-20.98 5.88 -0.08 -0.46 B6V+F1IV +0.010-0.020 +013SB2O 102 * -7258 BD+41 3232 178329 480843526 190302.5+411532190617.0+412450 72.15 14.98 6.49 -0.15 -0.64 B3V +0.003-0.002 -021SBO * -7259 Bet CrACD-3913146 178345211005 190309.0-392958191001.7-392027358.14-20.17 4.11 +1.20 +1.07 +0.61 K0II +0.003-0.038 +.016+003 -7260 BD+16 3752 178428104511 W Var? 190328.1+164216190757.3+165112 49.80 4.07 6.07 +0.70 +0.27 +0.36 G5V +0.060-0.306 +.059+014SB1O 4.5 21.5 * -7261 17 LyrBD+32 3326 178449 67835 12061 190338.6+322038190725.6+323006 63.91 11.11 5.23 +0.34 +0.07 F0V +0.130+0.023 +.017+004SB1O 127 4.3 3.5AB 10* -7262 18Iot LyrBD+35 3485 178475 67834 719 S 190343.9+355636190718.1+360601 67.23 12.65 5.28 -0.11 -0.51 B6IV +0.001-0.004 -018V 250 * -7263 BD+21 3672 178476 86843 S 190346.6+213220190803.6+214156 54.15 6.24 6.23 +0.40 +0.01 F3V +0.051+0.074 +.008-040 50 0.2 * -7264 41Pi SgrBD-21 5275 178524187756 720I W 11769 190349.0-211057190945.8-210125 15.89-13.29 2.89 +0.35 +0.22 +0.24 F2II 0.000-0.035 +.026-010 28 0.0 0.1AB 3* -7265 BD-20 5415 178555162260 12096 190354.3-195741190948.1-194813 17.03-12.80 6.13 +1.16 +1.13 K1III +0.020-0.079D+.004+030V 0.2 0.1 * -7266 19 AqlBD+05 4040 1785961243183530 190406.0+055457190859.9+060424 40.34-01.12 5.22 +0.35 +0.04 F0III-IV -0.006-0.076 +.032-047V 104 -7267 BD+16 3758 1786191045243529 190411.6+164142190840.2+165105 49.88 3.91 6.48 +0.52 +0.25 F5IV-V -0.036-0.104 +.018+010SB2O * -7268 CD-3913156 178628211017 190410.6-390959191101.8-390018358.54-20.25 6.36 +0.01 B7IIIMn -0.011-0.018 -005SB * -7269 BD-00 3662 178744143087 190443.0-003521190951.6-002541 34.65-04.29 6.34 -0.04 -0.49 B5Vn +0.006-0.006 -011 -7270 CD-2915804 178840187786 190458.7-293954191118.9-293008 7.95-16.96 6.30 -0.04 B9 +0.033-0.018 -014 -7271 CD-5012377 178845245976 W 190503.0-503901191246.1-502911346.77-23.85 6.13 +0.95 G8III +0.040-0.044 -026 5.3 7. -7272 BD+34 3439 178911 67879 12101 190524.5+342603190904.4+343602 65.99 11.69 6.74 +0.63 +0.15 G1V +0.053+0.195 +.025-041V? 1.5 16.4AB 4* -7273 CD-3713090 178937211037 190523.8-374451191209.8-373458 0.05-19.99 6.57 +1.02 G2III +0.010+0.008 -039V? -7274 Tau PavCP-69 2962 179009254508 190544.7-692136191628.5-691126326.38-27.43 6.27 +0.17 +0.14 A6IV-V 0.000-0.024 -018 -7275 BD+52 2350 179094 31413 I V1762 Cyg190605.2+521558190825.8+522532 82.98 18.73 5.81 +1.09 +0.87 K1IV -0.099-0.059 +.002+004SBO * -7276 BD-21 5292 179201187816 190629.5-214926191228.0-213929 15.55-14.13 6.41 +1.13 gG8 +0.027-0.012 -005SB -7277 CD-2613936 1793231878353533I 190704.1-260428191313.7-255424 11.59-15.98 5.80 +1.38 +1.42? K1I -0.002-0.006 +003 -7278 CP-66 3417 179366254515 W 190708.8-665000191712.0-663941329.22-27.27 5.53 +0.18 +0.13 A5V+A8V -0.002-0.021 +012 0.3 0.4 * -7279 20 AqlBD-08 4887 1794061431341500 11808 190715.2-080624191240.7-075622 28.23-08.31 5.34 +0.13 -0.44 B3V +0.016-0.006 -015V 187 -7280 BD+26 3474 179422 86912 190727.3+263414191130.9+264409 59.04 7.79 6.36 +0.41 -0.03 F5V +0.023-0.036 -027 40 -7281 CD-4513054 179433229573 190723.1-452144191439.7-451136352.43-22.76 5.92 +0.90 G8III +0.059-0.036 +.022-035 -7282 BD-12 5311 1794971623263534I 11815 190740.1-122701191315.5-121657 24.34-10.35 5.51 +1.44 gK4 +0.012-0.027 -018 -7283 19 LyrBD+31 3497 179527 679463532 V471 Lyr 190755.8+310659191146.0+311700 63.19 9.75 5.98 -0.07 -0.30 B9pSi -0.002-0.003 -030 36 * -7284 BD+40 3620 179583 48168 190803.9+401547191123.1+402545 71.62 13.70 6.18 +0.09 +0.10 A3V 0.000-0.023 +006 -7285 BD+16 3775 179588104602 12160 190805.4+164043191234.4+165047 50.30 3.08 6.73 -0.01 -0.28 B9IV -0.006-0.015 +.007-018V 1.4 113.4AC 5* -7286 BD+21 3690 179648 86930 190819.3+212309191236.7+213316 54.50 5.23 5.93R +0.03 +0.02 A2Vn +0.005-0.002 -013V? 160 -7287 21 AqlBD+02 3824 1797611244083537 12182 V1288 Aql190840.1+020725191342.7+021737 37.52-03.90 5.15 -0.07 -0.41 B8II-III +0.009-0.003 +.009-005V 19 7.5 36.2 * -7288 BD+05 4081 179791124410 11827 190848.6+052044191344.1+053057 40.39-02.42 6.49 +0.09 +0.11 A2Vp +0.016-0.006 +009V? 175 * -7289 CD-4513072 179886229584 190904.9-453825191621.7-452759352.23-23.13 5.40 +1.35 K3III -0.003+0.002 +.010+006 -7290 55 DraBD+65 1326 179933 181873531 190923.3+654840190945.8+655843 96.82 22.80 6.25 0.00 -0.02 A0V +0.001+0.030 -022 68 -7291 CD-2415161 179949187883 190927.7-242059191533.2-241045 13.46-15.78 6.25 +0.54 +0.09 F9V +0.116-0.095 +.023-026 -7292 42Psi SgrCD-2513866 179950187882 I: 12214 190924.5-252545191532.4-251524 12.42-16.20 4.85 +0.56 +0.32 +0.34 G8:III+A8V +0.045-0.025 +.005-033SB2O 0 0.3 0.1AB 3* -7293 BD+49 2959 179957 48192 12169B 190929.5+494002191204.6+495115 80.67 17.27 6.75 +0.65 +0.19 G4V -0.190+0.637 +.044-041V =< 54 0.2 8.1AB 4* -7294 BD+49 2959 179958 48193 12169A 190930.2+494009191205.0+495122 80.67 17.27 6.57 +0.65 +0.21 G4V -0.210+0.635 +.044-038V =< 54 0.2 8.1AB 4* -7295 53 DraBD+56 2209 180006 314683535I 11819 190947.1+564120191140.5+565133 87.56 19.81 5.12 +1.01 +0.84 +0.49 G8III +0.039+0.048 +.012-016 < 19: -7296 CD-3314076 180093211117 I RY Sgr 191000.9-334150191632.8-333118 4.43-19.45 6.25 +0.02 -0.07 G0Ipe(C1,0) +0.012+0.024 -023V * -7297 CP-53 9513 180134246017 191011.0-533343191809.4-532312343.88-25.32 6.38 +0.49 0.00 F7V -0.013-0.065 -024 -7298 20Eta LyrBD+38 3490 180163 68010 12197 11839 191021.2+385826191345.5+390846 70.62 12.75 4.39 -0.15 -0.65 -0.15 B2.5IV +0.004+0.002 +.002-008SB1O 24 4.0 28.3AB 3* -7299 BD+19 3956 180242 86981 191041.7+200145191502.6+201212 53.56 4.11 6.00 +0.88 G8III -0.012 0.000 +007 -7300 BD+14 3846 180262104655 W 191046.7+145434191520.1+150501 49.05 1.67 5.57 +1.07 +0.87 +0.54 G8II-III +0.002-0.011 -025V 2.1 89.6 * -7301 1 SgeBD+20 4088 180317 86987 191058.8+210326191517.4+211356 54.50 4.53 5.64 +0.11 A4V +0.039+0.012 -023V 231 * -7302 BD+30 3491 180450 68040 I 191131.7+302106191524.8+303135 62.85 8.72 5.85 +1.67 +2.03 M0III +0.029-0.023 -063 -7303 22 AqlBD+04 4045 180482124455 191134.0+043930191631.0+045005 40.10-03.35 5.59 +0.08 +0.11 A3IV +0.015-0.016 +.016-023SB 73 -7304 43 SgrBD-19 5379 180540162413 722 D 191147.0-190751191738.1-185711 18.61-14.13 4.96 +1.02 +0.80 G8II-III -0.012-0.014 +.006+015V < 19: * -7305 BD+27 3313 180553 87005 12239 191155.1+271646191557.0+272720 60.14 7.23 6.54 -0.06 -0.59 B8V +0.007-0.018D+.002-009SBO 50 0.4 0.9AB 4* -7306 1 VulBD+21 3713 180554 870103540 12243 11866 191155.0+211249191613.0+212325 54.74 4.41 4.77 -0.05 -0.54 -0.07 B4IV 0.000-0.009 +.017-017SB1O 130 7.1 39.1AB 3* -7307 BD+14 3852 180555104668 12248 191152.0+142203191626.8+143241 48.69 1.19 5.63 -0.02 -0.16 B9.5V +0.010+0.009 +.021-019V? 147 3.8 8.2AB 4* -7308 BD+27 3314 180583 87008 V473 Lyr 191158.9+274459191559.4+275537 60.56 7.44 6.16 +0.61 +0.34 F6Ib-II +0.001+0.022 -016V 17 * -7309 54 DraBD+57 1968 180610 31497 I 191208.0+573157191355.2+574218 88.52 19.81 4.99 +1.16 +1.17 +0.58 K2III -0.010-0.070 +.025-027V < 19: -7310 57Del DraBD+67 1129 180711 18222 723I W 191231.9+672908191233.3+673942 98.65 23.00 3.07 +1.00 +0.78 +0.51 G9III +0.094+0.093 +.032+025V < 17 9.2 88.1 * -7311 BD+49 2968 180756 48247 12240 191242.8+495339191519.3+500415 81.09 16.87 6.27R G8III +0.005-0.003 +006V? 4.5 2.1AB 3* -7312 59 DraBD+76 717 180777 93413536 11824 191250.3+762339190909.8+763338108.08 25.31 5.13 +0.31 0.00 +0.17 A9V +0.047-0.123 +.049-004 63 * -7313 BD+01 3960 180782124478 191245.1+015110191748.2+020154 37.76-04.93 6.19 +0.02 +0.01 A1Vn -0.004-0.030 -023V? 215 * -7314 21The LyrBD+37 3398 180809 68065 724I W 11873 191253.8+375720191622.1+380801 69.90 11.86 4.36 +1.26 +1.23 +0.59 K0+II -0.001+0.004 +.013-031V < 19: 4.7 100.2AB 3 -7315 25Ome1AqlBD+11 3790 180868104691 725 191307.3+112454191749.0+113543 46.24-00.49 5.28 +0.20 +0.22 F0IV +0.003+0.013 +.014-014V 113 -7316 CD-3513393 1808852111751501 191302.4-353612191940.0-352517 2.76-20.69 5.59 -0.13 -0.56 B3V +0.007-0.013 +002V 158: * -7317 BD-15 5310 180928162462 I W 191318.0-154238191900.1-153211 21.95-13.00 6.06 +1.43 +1.57 +0.83 K3III -0.091-0.267 +.041-018V 5.5 48.6 -7318 2 VulBD+22 3648 180968 87036 12287 ES Vul 191329.7+225043191743.6+230132 56.36 4.85 5.43 +0.02 -0.79 B0.5IV +0.001-0.005D+.007+001V 332 4.7 1.8AB 3* -7319 23 AqlBD+00 4168 180972124487 I 12289 11889 191327.2+005412191832.5+010507 37.00-05.53 5.10 +1.15 +1.01 +0.58 K2II-III v+0.010+0.019 +.003-024V? < 19: 4.1 3.1AB 3* -7320 CP-68 3218 181019254551 191339.6-683332192405.4-682216327.36-28.06 6.34 +1.23 +1.25 K2III -0.026-0.003 -020 -7321 24 AqlBD+00 4170 181053124492 W 191344.0+000924191850.9+002021 36.37-05.94 6.41 +1.05 +0.79 K0-IIIa:Ba0.4CH1 +0.012+0.012 +.010-029V? 0.2 423.4AB 4 -7322 BD+46 2658 181096 482783541 191359.2+464840191651.4+465957 78.24 15.44 6.00 +0.44 -0.01 F6IV: -0.008+0.295 +.018-044V? =< 6 -7323 CD-3215071 181109211191 I 191400.3-320007192026.2-314904 6.43-19.62 6.58 +1.67 +2.00 M0III -0.004+0.004 -007 -7324 BD+30 3502 181119 68095 191409.1+305025191800.8+310120 63.56 8.44 6.68 +0.08 +0.13 A3V -0.004+0.020 -025 -7325 BD+09 4057 181122124497 191406.5+092612191852.7+093705 44.61-01.64 6.32 +1.05 +0.89 G9III +0.003-0.039 -012 * -7326 BD+19 3975 181182104711 W U Sge 191425.7+192540191848.5+193638 53.44 3.05 6.58 +0.03 -0.38 B8III+K: +0.022+0.002 -017SBO 76 3.0 92.0 * -7327 BD-22 5063 181240187992 191438.6-223519192038.1-222409 15.63-16.16 5.58 +0.27 F0III: -0.015+0.035 -006 67 -7328 1Kap CygBD+53 2216 181276 31537 726I 11886 191447.5+531102191706.2+532207 84.40 17.85 3.77 +0.96 +0.74 +0.47 G9III +0.059+0.125 +.024-029SB < 17 * -7329 Eta TelCP-54 9339 181296246055 191447.0-543634192251.1-542525342.90-26.21 5.05 +0.02 A0Vn +0.015-0.072 +.020+013 323 -7330 CD-3513422 181321211206 191453.2-351002192129.9-345902 3.33-20.90 6.48 +0.63 +0.11 G5V +0.106-0.099 -010 * -7331 28 AqlBD+12 3879 181333104722 W V1208 Aql191459.3+121124191939.3+122229 47.14-00.52 5.53 +0.26 +0.18 F0III +0.008+0.021 +.004+003V? 59 3.5 60.2AB 3* -7332 29Ome2AqlBD+11 3802 181383104728 191510.8+112058191953.0+113206 46.42-00.96 6.02 +0.08 +0.07 A2V +0.042+0.026 +.001-026 160 -7333 26 AqlBD-05 4936 1813911432863544I W 191512.6-053610192032.9-052457 31.39-08.93 5.01 +0.92 +0.63 +0.50 G8III-IV +0.116+0.048 +.030-019SB1O < 17 6.8 115.9 * -7334 CD-4214133 181401229643 191508.8-421209192209.6-420058356.15-23.18 6.34 +1.14 K1III -0.050-0.034 +093 -7335 BD+33 3409 181409 68125 191519.3+331221191903.8+332320 65.80 9.30 6.60 -0.19 -0.89 B2IVe e-0.010-0.033 +010SB * -7336 27 AqlBD-01 3716 181440143292 191526.1-010442192035.7-005332 35.47-06.89 5.49 -0.04 -0.23 B9III +0.006+0.006 +.008-027SB 77 -7337 Bet1SgrCD-4413277 1814542296461502 W 191527.0-443848192238.3-442732353.61-23.93 4.01 -0.10 -0.39 B9V +0.009-0.020 -011 84 3.3 28.3 * -7338 BD+37 3413 181470 68129 191529.9+371539191901.2+372643 69.49 11.09 6.22R -0.03 -0.09 A0III +0.014+0.017 -014SBO 5 * -7339 BD-19 5412 181558162511 W 191545.5-192517192137.1-191403 18.74-15.10 6.26 -0.10 -0.51 B5V +0.007-0.001 -023 3.6 90.8AC 3* -7340 44Rho1SgrBD-18 5322 181577162512 D Rho1 Sgr 191552.4-180208192140.4-175050 20.06-14.55 3.93 +0.22 +0.13 +0.10 F0IV-V -0.024+0.024 +.042+001 68 2.5 0.0 * -7341 BD+49 2977 181597 48315 191557.7+492302191837.7+493411 80.82 16.19 6.31 +1.12 K1III v+0.010+0.054 +.003-014 * -7342 46Ups SgrBD-16 5283 181615162518 727I:D Ups Sgr 191600.0-160834192143.6-155718 21.84-13.77 4.61 +0.10 -0.53 +0.13 B2Vpe+A2IaShell v+0.002-0.006 +009SBO 58 1.0 0.0 * -7343 Bet2SgrCD-4513171 181623229654 191559.6-445916192313.2-444759353.28-24.11 4.29 +0.34 +0.07 F2III +0.097-0.054 +.030+019 126 * -7344 45Rho2SgrBD-18 5325 181645162521 191600.9-182938192150.9-181830 19.64-14.77 5.87 +1.06 gG9 +0.102-0.092 -013SB -7345 BD+37 3417 181655 68144 191607.8+370900191938.9+371950 69.45 10.93 6.31 +0.68 +0.21 G8V -0.066-0.187 +.038+002V? -7346 BD+34 3503 181828 681643545 W 191654.0+345954192033.1+351110 67.57 9.82 6.31 -0.12 -0.51 B9V +0.014+0.006 -018 125 45.0 -7347 BD-08 4950 181858143321 191655.0-082324192220.7-081204 29.07-10.57 6.31 -0.10 -0.40 B3IVp -0.013-0.024 -010V? 67 -7348 Alp SgrCD-4013245 181869229659 728 191657.5-404814192353.2-403658357.71-23.09 3.97 -0.10 -0.33 B8V +0.030-0.123 -001SB 89 * -7349 BD-00 3725 1819071433243546 191713.0-002630192221.5-001509 36.25-06.99 5.83 +1.09 +0.97 gG8 +0.061-0.025 -011V? -7350 CD-4313352 181925229660 191713.4-435451192421.4-434323354.48-24.03 6.17 +1.60 +1.92 M1-2III +0.024-0.037 -017V? -7351 BD+54 2123 181960 31574 191723.9+541123191936.5+542234 85.53 17.88 6.26 +0.03 +0.04 A1V +0.018-0.025 -005 125 -7352 60Tau DraBD+73 857 181984 9366 729I 11898 191728.6+731012191533.0+732120104.73 24.21 4.45 +1.25 +1.45 +0.58 K2+IIIbCN1Fe1 -0.140+0.107 +.015-030SB < 17 -7353 BD-07 4942 182038143340 I 191740.4-073528192304.6-072401 29.88-10.38 6.32 +1.45 +1.69 K0 +0.042-0.007 +012 -7354 BD+09 4081 1821011245643548 191802.6+094307192248.4+095447 45.33-02.36 6.35 +0.44 -0.03 F6V +0.011+0.109 -020 12 -7355 CD-2815767 182180188079 191816.1-280333192430.1-275156 10.68-19.04 6.04 -0.13 -0.67 B2Vn +0.004-0.001 +006V * -7356 BD+57 1986 182190 31587 I 191826.1+572721192016.1+573843 88.77 18.99 5.91 +1.58 +2.01 M1IIIab +0.023+0.011 -021 -7357 BD+14 3896 182239104779 191834.2+144344192308.2+145516 49.78-00.07 6.64 +0.27? F1V -0.027-0.009 +009V? 49 -7358 3 VulBD+25 3811 182255 87136 11966 191845.1+260413192250.9+261545 59.78 5.32 5.18 -0.12 -0.52 -0.16 B6III -0.001-0.010 -012V 40 -7359 BD+33 3434 182272 68215 191848.7+331937192233.4+333105 66.25 8.71 6.06 +1.03 K0III +0.008-0.033 -016 -7360 CD-2916104 182286188093 12400 191846.1-293009192504.1-291833 9.30-19.67 5.93 +1.26 K3III +0.002-0.051 +025V? 4.4 12.1 * -7361 BD+64 1344 182308 18287 W 191859.9+641206191946.1+642327 95.51 21.33 6.52 -0.04 -0.47 B9IVpHgMn -0.002+0.010 -020V? =< 5 3.5 111.9 -7362 47Chi1SgrCD-2415303 182369188101 W 191911.4-244210192516.5-243031 14.03-17.95 5.03 +0.23 Am +0.056-0.054 +.035-042 46 0.0 0.1 * -7363 49Chi3SgrCD-2415307 182416188105 I 11992 191926.5-240930192529.7-235744 14.58-17.79 5.43 +1.43 +1.67 K4III -0.014-0.005 +040V? -7364 BD+19 4000 182422 87148 191925.5+200412192346.9+201552 54.57 2.32 6.40 +0.01 -0.07 B9.5V -0.007+0.008 -029 65 * -7365 BD+57 1993 182440 31604 191936.0+573427192125.4+574601 88.95 18.89 6.43R K2 +0.021+0.042 +007 -7366 BD-05 4964 182475143373 191943.0-050450192501.6-045303 32.38-09.69 6.52 +0.33 +0.12 A9V +0.054+0.015 -039V 105 -7367 BD-14 5428 1824771625953552I 191942.6-140542192521.6-135349 24.14-13.70 5.69 +1.43 +1.35 K3III +0.057+0.066 -034V? -7368 BD+32 3411 182488 68239 191947.6+330123192334.0+331320 66.07 8.38 6.37 +0.81 +0.46 G8V +0.085+0.168 +.057-021V? -7369 2 SgeBD+16 3839 182490104797 W 191952.6+164434192422.1+165616 51.70 0.63 6.25 +0.08 +0.04 +0.02 A2III-IV -0.003-0.011 +012SBO 43 0.8 340.6 * -7370 CP-54 9371 1825092461101504 W 191946.2-543129192748.1-541931343.15-26.90 5.69 +1.40 +1.68 K4III -0.006+0.009 -005 2.7 72.9AB 4* -7371 58Pi DraBD+65 1345 182564 182993547 192009.3+653119192040.1+654253 96.90 21.66 4.59 +0.02 +0.06 -0.03 A2III s +0.012+0.045 +.020-029 27 * -7372 2 CygBD+29 3584 182568 871593550 W 192010.9+292532192407.6+293717 62.90 6.63 4.97 -0.10 -0.71 -0.14 B3IV +0.013+0.013 -021V? 158 -7373 31 AqlBD+11 3833 1825721048071503 W 11994 192012.1+114349192458.2+115640 47.36-01.86 5.16 +0.77 +0.42 G8IVHdel 1 +0.722+0.643 +.059-100V < 17 3.5 105.6AB 3* -7374 BD+27 3379 182618 87165 192021.6+275331192422.4+280516 61.56 5.87 6.53 -0.08 -0.55 B5V -0.021+0.003 -020 -7375 50 SgrBD-22 5105 1826291881213553I 192021.3-215829192619.2-214636 16.77-17.13 5.59 +1.22 +1.20 K3III +0.040-0.005 -020 -7376 BD+36 3539 182635 68258 192030.7+361515192406.1+362707 69.04 9.74 6.36R K1III +0.010+0.077 -033 * -7377 30Del AqlBD+02 3879 182640124603 730I W 12004 192027.4+025455192529.9+030653 39.62-06.13 3.36 +0.32 +0.04 +0.16 F3IV +0.257+0.082 +.072-030SB 85 7.5 108.9AB 3* -7378 BD-15 5348 182645162609 192029.7-151505192611.1-150311 23.15-14.37 5.72 +0.02 -0.34 B8Vn t+0.023+0.010 -007V * -7379 BD-14 5435 182678162615 192044.2-144458192624.6-143304 23.64-14.21 6.70 +0.05 A1V +0.039-0.006 -023 65 -7380 CD-2916140 182681188127 731 192037.3-295627192656.5-294436 9.02-20.21 5.67 0.00 -0.10 B9V +0.018-0.048 +001V? -7381 BD+49 2994 182691 316233549 192046.4+500432192323.8+501617 81.81 15.76 6.51 -0.08 -0.27 B9III 0.000+0.012 -024 -7382 BD+43 3229 182694 48401 192046.8+431135192356.5+432317 75.39 12.82 5.84 +0.92 +0.63 G7III-IIIa +0.017-0.025 -000V? * -7383 CP-68 3251 1827092545903557 192047.0-683815193110.9-682602327.32-28.72 5.96 +1.64 +1.93 K4-5III +0.013-0.019 -014 -7384 BD+19 4009 182761 87186 192100.9+200428192522.4+201617 54.75 2.00 6.31 -0.02 -0.08 A0V -0.007-0.027 -032V 130 * -7385 4 VulBD+19 4010 182762104818 I 12425 192105.2+193609192528.6+194755 54.35 1.75 5.16 +0.98 +0.81 +0.51 K0III +0.095-0.063 +.026-001V < 19: 6.2 18.9AB 3* -7386 BD+24 3737 182807 87190 W 192117.4+244356192525.8+245446 58.86 4.18 6.19 +0.51 -0.03 F7V -0.175-0.630 +.027-004V =< 6 4.4 40.1AB 5* -7387 32Nu AqlBD+00 4206 182835124628 I W 12021 192124.2+000821192631.1+002019 37.26-07.64 4.66 +0.60 +0.42 +0.46 F2Ib 0.000+0.001 -.008-001 13 4.2 201.0 * -7388 CP-55 9096 182893246125 192143.6-553837192952.6-552629341.97-27.37 6.13 +0.98 +0.81 K0-1III +0.023-0.057 -027 -7389 BD+12 3907 182900104832 192145.2+124921192624.1+130126 48.49-01.66 5.74 +0.47 +0.04 F6III +0.010+0.062 +.032-034V 30 * -7390 5 VulBD+19 4015 182919104831 192151.2+195357192613.2+200552 54.69 1.74 5.63 -0.01 -0.04 A0V +0.003-0.035 -021SB 150 * -7391 BD+19 4017 1829551048391505I 12445 192206.1+194133192628.7+195329 54.54 1.59 5.81 +1.55 +1.99 M0III -0.001-0.046 -034V 3.8 152.5AD 5* -7392 CD-4313395 183007229712 192217.3-433845192923.9-432645355.03-24.84 5.71 +0.22 -0.01 Am +0.096-0.136 +.013-031SB1O < 39 * -7393 Mu TelCP-55 9100 183028246131 192227.9-551854193034.5-550636342.35-27.42 6.30 +0.45 F5V +0.033-0.015 +009V? -7394 Lam UMiBD+88 112 183030 3020 914 W 192229.3+885916171656.8+890216121.94 27.51 6.38 +1.57 +1.79 M1III -0.023-0.004 +002V? 7.5 54.7 -7395 4 CygBD+36 3557 183056 683013554 V1741 Cyg192233.0+360702192609.1+361904 69.11 9.31 5.15 -0.12 -0.43 B9pSi +0.005+0.014 -.007-022SBO 34 * -7396 BD+13 4020 1831441048623555 12049 192257.9+140449192733.9+141657 49.73-01.31 6.32 -0.06 -0.51 B4III +0.009-0.002 +004 -7397 BD+02 3892 183227124661 192319.5+024336192820.8+025549 39.79-06.85 5.85 +0.01 -0.39 B6III +0.004-0.006 -014V? 48 -7398 CD-2714004 183275188192 I 12506 192341.0-271125192952.2-265908 12.00-19.83 5.52 +1.12 +1.35 +0.36E K3III +0.034-0.041 +.045-031 3.5 7.6 * -7399 CD-3215233 183312211315 192348.4-321749193014.7-320532 6.91-21.67 6.60 +0.39 F3IV-V +0.083-0.065 +008 -7400 35 AqlBD+01 4010 183324124675 192357.6+014446192901.0+015701 38.99-07.45 5.80 +0.08 +0.07 A0IVp -0.003-0.033 +012V 73 * -7401 BD+57 1999 183339 316521507 192358.2+574932192546.7+580138 89.43 18.45 6.60 -0.15 -0.56 B8IVHe wk -0.004+0.008 -022 * -7402 BD-07 4968 183344143454 12503 U Aql 192358.4-071458192921.5-070238 30.91-11.62 6.61 +1.10 +0.70 +0.66 F7-G1I-II v+0.024+0.003 +.013-007V 5.5 1.5AB 3* -7403 BD+37 3465 183362 68346 192405.5+374415192736.5+375628 70.71 9.79 6.34 -0.14 -0.74 B3Ve +0.022-0.013 -028 244 * -7404 BD-00 3760 183387124681 I 192410.8+000226192918.0+001446 37.50-08.30 6.25 +1.32 +1.38 K2 +0.007-0.008 -060 -7405 6Alp VulBD+24 3759 183439 872611508I W 12069 192432.6+242744192842.3+243954 58.99 3.40 4.44 +1.50 +1.81 +0.97 M0III -0.125-0.106 +.014-086V? 1.4 413.7 * -7406 8 VulBD+24 3761 183491 87267 192446.6+243344192857.0+244607 59.11 3.40 5.81 +1.03 +0.87 K0III 0.000+0.014 +.004-027V? -7407 BD+14 3936 183492104896 192446.5+142325192922.1+143545 50.21-01.55 5.56 +1.05 +0.91 K0III +0.045-0.026 -040V? -7408 7Iot1CygBD+52 2434 183534 31673 192459.0+520700192725.9+521914 84.02 16.01 5.75 0.00 -0.01 A1V -0.014-0.024 +002SB 54 -7409 7 VulBD+19 4039 183537 87269 Var 192459.0+200424192920.9+201647 55.20 1.18 6.33 -0.10 -0.52 B5Vn +0.001-0.020 -037V * -7410 BD-21 5410 183545188219 192457.9-213112193054.0-211844 17.66-17.93 6.13 +0.12 A2 +0.012-0.017 -021 -7411 CP-53 9585 183552246151 192500.1-532346193253.8-531109344.56-27.45 5.75 +0.30 +0.20 +0.17 FmDel Del +0.029-0.013 +014V -7412 BD+02 3904 183589124698 I 12520 12088 192509.1+024147193010.5+025415 39.98-07.26 6.09 +1.82 +2.03 K5Ib -0.005 0.000 -013V? 4.9 34.1AB 4* -7413 BD+62 1716 183611 183433556 192517.1+622108192626.5+623326 93.93 20.02 6.38 +1.39 +1.71 K5III +0.034+0.043 -040 -7414 36 AqlBD-03 4612 1836301434821509I 12093 192526.0-025950193039.8-024720 34.93-10.00 5.03 +1.75 +2.05 M1III v+0.023-0.010 +.029-011V? -7415 BD+03 4043 183656124704 V923 Aql 192532.8+031408193033.1+032640 40.50-07.09 6.05 +0.01 -0.37 A0eShell +0.010+0.005 -026V 180 * -7416 CD-4513296 1838062297413558 PW Tel 192609.2-452901193321.6-451619353.26-25.97 5.61 -0.04 ApCrEuSr -0.012-0.031 -008 * -7417 6Bet1CygBD+27 3410 183912 87301 732I 12540A 12105 192641.3+274458193043.3+275735 62.11 4.57 3.08 +1.13 +0.62 +0.66 K3II+B9.5V +0.002-0.002 +.017-024V =< 25 2.0 34.7AB 3* -7418 6Bet2CygBD+27 3411 183914 87302 12540B 192643.4+274518193045.3+275755 62.12 4.57 5.11 -0.10 -0.32 B8Ve -0.009 0.000 +.017-018V 250 2.0 34.7AB 3* -7419 BD+35 3658 183986 68417 12545 192709.7+360105193046.9+361343 69.46 8.44 6.25 -0.04 -0.11 B9.5III +0.006-0.011 +.005+011V 65 7.7 27.7AB 3 -7420 10Iot2CygBD+51 2605 184006 31702 733 192711.0+513100192942.3+514347 83.61 15.45 3.79 +0.14 +0.11 +0.07 A5Vn +0.020+0.130 +.005-020V? 226 -7421 BD+26 3573 184010 87314 192715.8+262418193121.8+263702 60.99 3.81 5.87 +0.93 +0.63 K0III-IV +0.032+0.027 -001V? -7422 CD-4013356 1840352297463560 V4089 Sgr192717.0-401458193408.5-400205358.92-24.81 5.89 +0.09 A3III +0.005-0.005 +012SB1O 53 * -7423 BD+79 628 184102 9414 734 192744.8+792409192140.2+793610111.52 25.30 6.05 +0.07 +0.06 A3V +0.013-0.034 -003SB -7424 Iot TelCD-4813161 184127229751 735 192747.9-481853193513.0-480557350.25-26.89 4.90 +1.09 K0III -0.009-0.038 +.002+022 -7425 BD+83 552 184146 32093962 W 192757.0+831606191507.8+832746115.68 26.27 6.53 +0.10 +0.10 A3V +0.008+0.012 -014 105 3.7 25.0 -7426 8 CygBD+34 3590 184171 684471510 192803.3+341425193146.3+342711 67.97 7.44 4.74 -0.14 -0.65 -0.16 B3IV +0.001-0.003 -022V? 18 -7427 BD+49 3034 184293 31737 I 192840.4+500532193119.3+501824 82.38 14.62 5.53 +1.25 +0.65 gK1 -0.029+0.048 -009V? -7428 BD+55 2215 184398 31741 V1817 Cyg192906.6+553108193113.6+554355 87.51 16.87 6.37 +1.16 +0.91 K2II-IIIe+A0V v-0.002-0.011 -006SBO =< 50 * -7429 38Mu AqlBD+07 4132 1844061247991511I 12607 12155 192912.2+071000193405.4+072244 44.41-06.01 4.45 +1.17 +1.26 +0.61 K3-IIIbCN0.5 +0.216-0.157 +.045-024V? < 19: 5.0 177.5AE 6* -7430 37 AqlBD-10 5122 1844921627923562I 192936.6-104644193507.3-103337 28.30-14.44 5.12 +1.13 +0.89 G9IIIa +0.009+0.003 +.007-031 -7431 51 SgrCD-2415442 184552188326 12183 192957.4-245618193601.7-244309 14.79-20.30 5.65 +0.19 +0.17 +0.07 A7m +0.012-0.023 +.018-031SBO 16 2.0 0.0 * -7432 BD-07 4998 184573143564 193005.9-074043193529.8-072737 31.22-13.17 6.34 +1.12 +0.92 K0 +0.030-0.039 -010 -7433 BD-12 5461 184574162797 192959.2-122818193533.6-121510 26.77-15.26 6.27 +1.09 K0 +0.015-0.006 +006V? -7434 CP-58 7627 1845852461883566 193001.4-581215193825.9-575900339.28-28.86 6.18 +0.97 +0.81 K0III +0.026-0.065 +.015-011 -7435 CP-66 3445 1845862546223567 W 192958.8-665430193952.1-664108329.34-29.51 6.39 +0.02 +0.04 A1V +0.032-0.043 -014 6.1 19.7 -7436 BD+38 3650 184603 68499 S 193007.4+383239193336.4+384544 72.00 9.12 6.61 +0.03 +0.10 A3Vn +0.005+0.028 -017 0.1 -7437 9 VulBD+19 4063 184606104990 12622 12173 193011.3+193318193434.9+194624 55.35-00.14 5.00 -0.09 -0.43 -0.09 B8IIIn +0.008+0.002 +005V 235 7.8 108.3AC 3 -7438 BD+02 3932 184663124823 193023.7+024133193525.2+025448 40.60-08.42 6.38 +0.41 -0.02 F6IV +0.019+0.045 +004 40 -7439 BD-19 5521 184705162809 193036.3-190425193626.1-185110 20.57-18.16 6.11 +0.27? F0III +0.031-0.003 -042 -7440 52 SgrCD-2514184 184707188337 736 12654 12191 193037.3-250616193642.4-245301 14.68-20.51 4.60 -0.07 -0.15 -0.06 B9 +0.069-0.021D+.002-019V 68 4.5 2.7 * -7441 9 CygBD+29 3651 184759 87385 W 193052.5+291434193450.9+292747 63.87 4.50 5.38 +0.55 +0.33 F8III+A0V +0.015+0.024 +.021-011SB1O=< 50 0.5 0.1 * -7442 BD+48 2914 184786 48589 I V1743 Cyg193056.3+490240193341.6+491545 81.58 13.83 5.96 +1.64 +1.77 M4.5IIIaS +0.005-0.003 -010V? * -7443 BD-18 5432 1848351628163565 193115.2-182711193703.3-181352 21.23-18.05 5.64 +1.26 +1.08 K3III +0.013-0.009 +.010-007V -7444 BD+42 3386 184875 48601 193125.5+421136193441.2+422446 75.38 10.62 5.35 +0.05 +0.09 A2V -0.004-0.022 +.001+002 87 -7445 BD+10 3981 184884105032 12660 193124.5+105544193608.0+110900 47.98-04.65 6.68 A3V -0.004-0.010 -005 6.4 3.8 -7446 39Kap AqlBD-07 5006 184915143600 737I' 12204 193130.7-071500193653.5-070139 31.77-13.29 4.95 0.00 -0.87 -0.04 B0.5III +0.003-0.004 -019V 259 * -7447 41Iot AqlBD-01 3782 184930143597 12663 12201 193132.9-013030193643.3-011711 36.99-10.66 4.36 -0.08 -0.44 -0.08 B5III +0.004-0.018 +.004-021V 95 8.9 47.0 * -7448 BD+59 2060 184936 183953563I W 193135.9+595624193310.1+600931 91.89 18.38 6.29 +1.57 +1.98 K4III +0.005+0.006 -019 2.0 76.2 * -7449 BD+14 3974 184944105036 193139.4+141013193615.8+142330 50.84-03.11 6.38 +1.04 +0.89 K0II-III +0.034-0.023 -042 -7450 BD+70 1073 184958 94473561I 193148.3+704619193100.2+705922102.62 22.41 6.07 +1.41 K2 -0.016+0.037 -043 -7451 BD+50 2815 184960 31782 193144.4+510119193419.8+511412 83.46 14.59 5.73 +0.48 0.00 +0.28 F7V +0.032-0.190 +.037+000V? 6 * -7452 BD+22 3741 184961 874263564 12199 193151.6+222150193608.3+223509 57.99 0.91 6.32 -0.07 -0.28 B9pSi:Cr: +0.001-0.010 -023 50 * -7453 BD+47 2870 184977 48606 193149.2+475647193439.9+480953 80.64 13.21 6.67R +0.24? A9V -0.015-0.073 -001 -7454 BD-14 5479 184985162827 193156.3-143117193734.4-141806 25.05-16.56 5.47 +0.50 +0.04 F5V -0.105-0.142 +.047-021SB * -7455 CP-66 3447 184996254627 193156.2-660450194137.5-655115330.29-29.68 6.09 +1.55 +1.96 M0III +0.027-0.065 -042 -7456 BD+10 3984 185018105045 12670 193209.1+110300193652.5+111624 48.18-04.75 5.98 +0.88 G0Ib +0.018+0.005 -001 5.7 80. AD 5 -7457 11 CygBD+36 3619 185037 68552 193212.6+364321193548.3+365640 70.58 7.89 6.05 -0.11 -0.37 B8Vne +0.008-0.002 -015V 400: * -7458 BD+20 4200 185059 87447 U Vul 193215.4+200636193637.7+201958 56.07-00.29 7.14 +1.32 +1.00 F2-F8Iab -0.003-0.011 -.013-011V * -7459 CP-54 9438 185075246204 193219.1-543841194018.3-542503343.36-28.71 6.26 +1.00 K0III +0.038-0.009 +015 -7460 42 AqlBD-04 4861 185124143621 193229.0-045215193747.3-043851 34.06-12.42 5.46 +0.43 +0.03 F3IV +0.107-0.051 +.027-038V? -7461 CD-4513354 185139229800 QQ Tel 193230.8-453019193942.0-451641353.53-27.06 6.25 +0.28 F2IV -0.001+0.020 +008 * -7462 61Sig DraBD+69 1053 185144 18396 I W 12176 193233.2+692928193221.6+693940101.32 21.89 4.68 +0.79 +0.38 +0.41 K0V +0.600-1.738 +.177+027V < 17 315.6 * -7463 4Eps SgeBD+16 3918 185194105061 12693 12213 193245.7+161417193717.4+162746 52.77-02.32 5.66 +1.02 +0.81 G8III v+0.020+0.015 -033V? 2.7 88.9AB 4* -7464 CD-3913371 185257211451 V4090 Sgr193307.0-393933193955.7-392600359.88-25.72 6.61 +0.23 A2m +0.062-0.061 -036V * -7465 BD+49 3059 185264 31804 193315.1+500051193555.9+501419 82.65 13.93 6.52 +1.06 +0.84 G9III -0.005+0.038 +008V? -7466 BD+29 3670 185268 87462 12696 193310.6+290633193709.4+292001 64.00 3.99 6.43 -0.09 -0.50 B5V -0.016-0.001 -020 300 2.7 20.6AB 8* -7467 BD+38 3677 185330 68585 193325.7+380933193656.6+382302 71.97 8.37 6.50 -0.15 -0.61 B5II-III 0.000 0.000 -027 * -7468 BD+44 3185 185351 48649 193332.0+442824193637.9+444142 77.62 11.35 5.17 +0.93 +0.69 G9IIIbFe-0.5 -0.101-0.102 +.019-005 < 19: -7469 13The CygBD+49 3062 185395 31815 738I: 12695 193345.5+495922193626.5+501316 82.66 13.85 4.48 +0.38 -0.03 +0.21 F4V -0.017+0.257 +.056-028 7 6.9 48.4AC 3* -7470 53 SgrCD-2315618 185404188407 12741 193348.9-233918193949.4-232540 16.41-20.64 6.34 +0.03 B9.5V+A3IV +0.001-0.032 -011 0.2 0.2 * -7471 BD+03 4097 1854231248923569 193348.5+030916193849.0+032254 41.43-08.94 6.35 +0.04 -0.55 B3III +0.004 0.000 -001SB -7472 BD+20 4210 185436 87489 193356.5+203327193817.5+204658 56.66-00.41 6.48 +1.08 +0.98 K0III -0.055-0.048 +005 -7473 CD-2315625 185467188419 193406.5-233928194007.1-232543 16.43-20.70 5.97 +1.04 gK1 +0.026+0.002 -028V? -7474 44Sig AqlBD+05 4225 185507124903 12737 Sig Aql 193415.5+051011193911.6+052352 43.27-08.07 5.17 +0.03 -0.60 B3V+B3V v+0.001-0.001 -005SBO 121 6.6 47.8AB 3* -7475 BD+16 3936 185622105104 I 12750 193453.9+162032193925.4+163417 53.12-02.71 6.38 +2.07 +2.22 K4Ib +0.011+0.003 -004SB 2.7 31.8 * -7476 54 SgrBD-16 5399 1856441628831512I 12767A 12275 193459.7-163121194043.4-161736 23.47-18.07 6.2 +1.13 +1.06 K2III+F8V +0.071-0.048 +.037-058V? 0.0 0.1 4* -7477 BD+48 2922 185657 48673 W 193510.1+490310193756.7+491704 81.91 13.22 6.47 +0.99 +0.72 G6V +0.036+0.144 +.006-085V 2.9 29.6AB 4* -7478 12Phi CygBD+29 3684 185734 686373570I S 193525.6+295522193922.6+300912 64.95 3.97 4.69 +0.97 +0.80 +0.47 G8III-IV +0.004+0.037 +.007+006SB2O 0.0 * -7479 5Alp SgeBD+17 4042 185758105120 I 12766 193537.5+174702194005.8+180050 54.45-02.14 4.37 +0.78 +0.43 +0.37 G1II +0.014-0.021 +.000+002V? 0 6.8 90. AD 4* -7480 45 AqlBD-00 3813 1857621436783573 12775 193534.2-005111194043.3-003716 38.06-11.24 5.67 +0.11 +0.09 A3IV +0.017+0.017 +.018-046 96 7.2 42.0 3* -7481 BD+33 3547 185837 68654 12765 193559.1+334453193945.0+335845 68.34 5.76 6.10 +0.08 +0.13 A3IV +0.007+0.017 -033 80 4.5 1.3AB 3* -7482 BD+20 4218 185859 87542 193606.0+201444194028.3+202836 56.64-01.00 6.50 +0.39 -0.62 B0.5Iae -0.002-0.022 +005 -7483 14 CygBD+42 3413 185872 486913572 193611.1+423513193926.5+424906 76.16 10.03 5.40 -0.08 -0.22 B9III +0.022+0.031 +.019-028SB 45 -7484 BD+54 2193 185912 318503571 V1143 Cyg193626.2+544422193841.2+545826 87.25 15.59 5.82 +0.44 -0.10 F6Va +0.035+0.164 +.036-015SBO * -7485 BD+23 3733 185915 87551 12778 193625.2+232910194039.7+234303 59.48 0.56 6.64 +0.01 -0.39 B6IV +0.019-0.020 -020SB 1.5 118.4AC 3* -7486 BD+13 4098 1859361051323574 W QS Aql 193627.7+133500194105.5+134856 50.91-04.41 6.01 -0.08 -0.52 B5V -0.002-0.010 -014SBO 58 0.2 0.1 * -7487 BD+45 2940 185955 48697 193632.2+454332193934.4+455729 79.00 11.47 6.20 +0.90 +0.55 G8-K0II-III -0.005+0.046 -010V? -7488 6Bet SgeBD+17 4048 1859581051331513I 193633.4+171439194102.9+172834 54.10-02.60 4.37 +1.05 +0.89 +0.50 G8IIIaCN0.5 +0.010-0.032 +.011-022 < 19: * -7489 55 SgrBD-16 5413 1860051629151514 W 193647.9-162130194231.1-160726 23.82-18.40 5.06 +0.33 +0.09 F1III +0.068-0.009 +.040-027SB 134 0.0 0.2 * -7490 BD+22 3767 186021 87569 193657.1+221310194114.9+222710 58.45-00.18 6.36 +1.53 K0I +0.025-0.004 -023 -7491 CD-3713322 1860422115063576 193656.7-374627194337.6-373220 2.12-25.92 6.16 +0.01 B8 +0.006-0.019 -029V? -7492 BD+42 3419 186121 48714 I 193726.7+425040194041.2+430440 76.50 9.95 6.16 +1.56 +1.42 +1.01E M2III +0.012-0.006 -005V? -7493 46 AqlBD+11 3954 186122105156 193731.3+115730194212.8+121136 49.62-05.44 6.34 -0.03 -0.41 B9IIIpHgMn -0.002-0.004 -032 5 -7494 CP-81 868 1861542588441667 193736.9-813601195601.5-812059312.46-29.21 6.39 +1.40 +1.68 K3-4III +0.009-0.001 -006 -7495 BD+45 2949 186155 487183575 W 12300 193745.0+451716194050.2+453130 78.71 11.07 5.06 +0.40 +0.15 F5II-III +0.086+0.127 +.021-020V 42 6.7 88.0 -7496 BD-15 5444 186185162931 W 193751.3-154207194333.5-152812 24.55-18.36 5.49 +0.46 +0.02 F5IV +0.154-0.180 +.045+013V 21 6.2 70.4 * -7497 47Chi AqlBD+11 3955 186203105168 12808 12325 193751.6+113528194234.0+114936 49.34-05.70 5.27 +0.57 -0.04 G0:III+A3V -0.001-0.007 +.006-022SB 0 1.2 0.4AB 5* -7498 CP-72 2445 1862192577363580 193753.5-724450194925.3-723012322.60-30.12 5.41 +0.22 +0.11 +0.13C A4III 0.000+0.017 +.033-001SB 104 * -7499 BD+39 3878 186307 48737 W 193832.3+400103194157.5+401514 74.10 8.40 6.23 +0.18 +0.05 A6V -0.025+0.026 +.006-032 110 1.3 0.2 -7500 BD+60 1991 186340 18461 12789 193839.1+601624194013.0+603026 92.59 17.72 6.51 +0.22? A5V -0.008-0.005D+.026-001 135 2.2 18.3 -7501 BD+28 3447 186357 87612 V1276 Cyg193848.8+290536194249.1+291954 64.60 2.92 6.49 +0.33 +0.28 F1III +0.061+0.047 -025 84 * -7502 BD+32 3531 186377 687303577 193853.6+321123194244.6+322536 67.29 4.46 5.94 +0.11 +0.14 A5III +0.004+0.003 -007 27 -7503 16 CygBD+50 2847 186408 31898 12815A 193909.4+501735194148.9+503131 83.34 13.21 5.96 +0.64 +0.19 +0.33 G1.5Vb -0.149-0.153 +.039-026V 2 0.2 39.2AB 3* -7504 BD+50 2848 186427 31899 12815B 193912.2+501708194152.0+503103 83.34 13.20 6.20 +0.66 +0.20 +0.34 G2.5V -0.134-0.162 +.039-027V 3 0.2 39.2AB 3* -7505 BD+30 3706 186440 68744 193913.5+302623194309.5+304043 65.81 3.52 6.05 0.00 -0.01 A1V -0.012+0.038 -028 155 -7506 10 VulBD+25 3933 186486 876331515 193933.4+253157194342.9+254619 61.61 0.98 5.49 +0.93 +0.67 +0.47 G8III +0.012+0.019 +.023-009 < 17 -7507 CD-3215443 1865002115411516 193938.4-320859194601.2-315431 8.25-24.79 5.52 +0.02 B8V +0.005-0.017 -031 -7508 BD+26 3654 186518 87640 I 12850 PS Vul 193950.1+265346194355.9+270808 62.82 1.61 6.28 +1.10 B7V+G1:III -0.009+0.004 -.008-012V 1.5 0.4 * -7509 BD+55 2245 186532 31906 I V1351 Cyg193951.4+551337194204.1+552748 87.93 15.37 6.48 +1.61 M5IIIa +0.013-0.039 -028V? * -7510 Nu TelCP-56 9290 186543246271 739 193951.3-563610194801.2-562145341.27-30.01 5.35 +0.20 A7III-IV +0.088-0.137 -012V -7511 48Psi AqlBD+12 4059 186547105199 193955.0+130346194434.1+131810 50.88-05.40 6.26 -0.03 -0.21 B9III-IV -0.007-0.006 -018SB 35 * -7512 BD+33 3572 186568 68764 12852 194005.5+335522194351.4+340945 68.92 5.11 6.05 -0.06 -0.30 B8III -0.002+0.003 -011 15 7.3 33.9AC 3 -7513 CP-67 3680 186584254658 194004.5-670335194953.3-664846329.18-30.50 6.45 +1.48 +1.72 K4III -0.012+0.016 -002 -7514 BD+41 3469 186619 48771 I 194024.8+413158194345.0+414623 75.61 8.83 5.84 +1.57 +1.99 M0IIIab +0.016+0.010 +.014-041 -7515 56 SgrBD-20 5698 1866481629641517I 194031.7-200006194621.7-194540 20.65-20.67 4.86 +0.93 +0.96 K1III -0.129-0.089 +.025+020V -7516 BD-03 4701 1866601437763579 194038.5-030733194552.2-025300 36.61-13.42 6.48 +0.05 -0.54 B3III +0.005-0.002 -017 -7517 15 CygBD+37 3586 186675 68778 740I 194040.1+370645194416.6+372116 71.76 6.60 4.89 +0.95 +0.69 G7+III +0.075+0.035 +.021-024 < 19: -7518 BD+28 3460 186688 87659 SU Cyg 194048.4+290123194448.7+291553 64.76 2.51 6.82 +0.64 +0.20 +0.39 F2I v+0.001-0.002 -.010-036V * -7519 49Ups AqlBD+07 4210 186689125032 194048.0+072215194539.9+073648 46.01-08.42 5.91 +0.18 +0.09 A3IV +0.053+0.002 +.027-030 30 -7520 BD+34 3691 186702 68783 I 12372 194052.8+341022194438.2+342450 69.22 5.10 6.57R M1III +0.004-0.009 +009 -7521 CP-53 9678 1867562462773581 194108.4-530759194855.1-525317345.27-29.79 6.25 +1.13 +1.11 K1III +0.009-0.050 -021 -7522 BD+57 2057 186760 31923 194117.6+574640194314.6+580059 90.39 16.33 6.22 +0.56 +0.06 G0V +0.137-0.060 +.045-022 =< 10 -7523 BD+40 3866 186776 48789 I V973 Cyg 194125.3+402831194449.0+404300 74.77 8.15 6.34 +1.64 +1.94 +0.92E M4-III -0.064-0.023 -097 * -7524 CP-65 3827 186786254669 NZ Pav 194127.1-655059195101.3-653618330.58-30.65 6.05 +0.30 +0.08 F2III-IV +0.101-0.155 -041 * -7525 50Gam AqlBD+10 4043 186791105223 741I W 194130.3+102210194615.6+103648 48.73-07.08 2.72 +1.52 +1.68 +0.75 K3II e+0.018-0.002 +.016-002V < 17 8.0 132.6 * -7526 BD+56 2291 186815 31933 194137.0+564803194339.6+570233 89.50 15.86 6.27 +0.88 K2III +0.010+0.020 -026 -7527 CP-61 6413 186837254666 194136.8-611835195021.7-610341335.85-30.57 6.21 -0.14 -0.55 B5V -0.006-0.001 -015 * -7528 18Del CygBD+44 3234 186882 48796 I 12880 12380/1 194150.9+445312194458.5+450751 78.71 10.24 2.87 -0.03 -0.10 -0.02 B9.5IV+F1V +0.053+0.047 +.030-020SB 149 3.5 2.0AB 3* -7529 BD+35 3786 186901 68805 12893A 194159.4+355049194539.6+360528 70.79 5.74 6.43 -0.03 -0.13 B9.5VpSi +0.004+0.014D+.018-019 35 0.5 14.8AB 6* -7530 BD+34 3701 186927 68810 12900 194207.6+344608194551.4+350046 69.87 5.17 6.09 +1.06 +1.00 K0II-III+A2V +0.021-0.004 -019 2.4 44.6AC 3* -7531 CP-59 7534 186957246293 W 194215.7-592635195044.8-591135338.02-30.55 5.42 +0.08 A0IV +0.015+0.004 +.013+004 50 1.5 0.5 * -7532 BD-14 5555 186984162998 194225.9-135659194803.0-134212 26.72-18.63 6.11 +0.20 +0.13 +0.08 A6m +0.026-0.012 -008 75 -7533 BD+24 3877 186998 87706 194227.5+245319194639.5+250802 61.39 0.08 6.62 +0.27 A7IV +0.073-0.004 +013SB -7534 17 CygBD+33 3587 187013 68827 12913A 12398 194237.8+332941194625.6+334340 68.81 4.44 4.99 +0.47 0.00 F7V +0.023-0.446 +.049+005V? 9 3.5 26.0AB 3* -7535 BD+32 3558 187038 68835 12920 194245.1+323835194635.0+325319 68.10 3.99 6.18 +1.13 K3III -0.032-0.003D+.016-046 2.1 30.7AD 4* -7536 7Del SgeBD+18 4240 187076105259 743I W Del Sge 194255.7+181715194723.3+183203 55.77-03.38 3.82 +1.41 +0.96 +1.29 M2II+A0V +0.007+0.008 +.001+003SBO =< 50 * -7537 CD-4713103 187086229887 12432 194255.3-474825195013.8-473326351.37-29.27 5.94 +1.70 +1.97 M1III -0.017-0.008 -065V * -7538 CD-2916546 1870981886033582 12956 194257.2-290205194911.6-284720 11.75-24.46 6.05 +0.40 F2V +0.126-0.096 -034 * -7539 NOVA 1670 CK Vul * -7540 BD+25 3972 187193 87729 194337.1+250813194748.6+252302 61.74-00.02 5.95 +0.99 K0II-III +0.082-0.026 -018 -7541 BD-11 5131 187195163012 194331.3-110710194902.2-105215 29.53-17.66 6.04 +1.24 +1.36 K5III +0.036-0.020 -033V -7542 BD+10 4058 187203105278 194345.4+102644194830.4+104139 49.07-07.52 6.44 +0.96 +0.69 F8Ib-II -0.007-0.001 -005 28 -7543 BD+38 3758 187235 68859 12944 194354.8+380936194727.8+382427 72.99 6.57 5.77 -0.06 -0.37 B8Vn +0.015-0.003 -028 350 7.2 24.7 -7544 52Pi AqlBD+11 3994 187259105282 12962 12425 194359.3+113401194842.1+114857 50.08-07.01 5.72 G2III:+A1V: +0.018-0.004D+.003+013V? 0.5 1.4AB 3* -7545 BD+68 1079 187340 18508 194427.0+690534194418.5+692013101.37 20.78 5.92 +0.05 +0.11 A2III +0.016-0.023 +000 * -7546 8Zet SgeBD+18 4254 187362105298 12973 194432.3+185328194858.7+190832 56.48-03.40 5.00 +0.10 +0.05 +0.06 A3V +0.021+0.030 +.010-014V 225 0.5 0.2AB 4* -7547 BD+47 2916 187372 48842 I 194431.4+473936194726.8+475428 81.40 11.19 6.12 +1.64 +1.99 M2III -0.026-0.031 +003SB -7548 CP-55 9221 187420246311 W A 194439.6-551331195237.6-545816342.94-30.54 5.74 +0.92 +0.65 G8-K0III +0.008-0.002 -018 0.7 22.9 * -7549 CP-55 9222 187421246312 W B 194441.0-551351195239.0-545836342.93-30.55 6.50 +0.10 +0.12 A2V +0.008-0.003 -022 0.7 22.9 * -7550 BD+34 3727 187458 68893 12972 194459.9+350334194843.9+351841 70.42 4.81 6.53 +0.44 -0.09 F4V +0.085+0.062 +.017-027V 0.6 0.6 * -7551 BD+33 3602 187459 68895 V1765 Cyg194501.6+331113194850.6+332614 68.81 3.85 6.44 +0.20 -0.74 B0.5Ib +0.007-0.002 -010SB2O 126: * -7552 CD-4013514 1874742299033583 V3961 Sgr194503.2-400740195150.6-395228 0.03-28.05 5.33 -0.06 -0.22 A0pCrSr: v+0.023-0.015 +.020-002SB 6 * -7553 51 AqlBD-11 5149 187532163036 744 13017 194516.7-110102195046.8-104549 29.83-18.00 5.39 +0.38 F0V -0.030+0.033 +006V? 67 8.0 21.1 * -7554 BD+07 4252 187567125116 S V1339 Aql194526.3+073900195017.5+075409 46.83-09.28 6.51 -0.10 -0.70 B2.5IVe +0.005+0.001 -030 0.1 * -7555 BD+38 3772 187638 68909 12992 194555.1+382730194927.5+384236 73.45 6.39 6.11 +0.90 G5-8III +0.006-0.010 +011V? 4.9 11.6AB 3 -7556 BD+28 3493 187640 87786 12454 194551.5+281114194954.6+282626 64.61 1.13 6.38 -0.06 -0.50 B5V -0.021+0.027 -012SB 75 -7557 53Alp AqlBD+08 4236 187642125122 745I 13009 194554.2+083615195047.0+085206 47.74-08.91 0.77 +0.22 +0.08 +0.14 A7V +0.538+0.386 +.198-026 242 8.6 165.2AB 3* -7558 CP-61 6426 1876532546831518 194556.7-612544195440.4-611015335.74-31.09 6.24 +0.16 A4V -0.008+0.011 +011 -7559 BD-02 5133 187660143853 I 194558.4-024250195111.1-022739 37.62-14.40 6.13 +1.57 +1.82 K5III -0.007-0.035 +009 -7560 54Omi AqlBD+10 4073 187691105338 13012 194614.2+100955195101.6+102456 49.14-08.19 5.11 +0.55 +0.07 +0.29 F8V +0.242-0.139 +.048-000V =< 6 8.3 14.4AB 3* -7561 57 SgrBD-19 5631 187739163060 194623.3-191756195212.0-190242 21.92-21.67 5.92 +0.98 +0.64? G5III +0.002-0.058 +.021-026SB -7562 BD+09 4288 187753125139 194630.1+092233195117.7+093749 48.48-08.64 6.25 +0.10 +0.09 +0.06 A1m -0.001-0.012 +021 10 -7563 BD+68 1082 187764 18530 CN Dra 194637.5+681117194644.7+682618100.58 20.24 6.34 +0.28 +0.09 F0III +0.005+0.011 -012 98 * -7564 Chi CygBD+32 3593 187796 68943 I W Chi Cyg 194643.2+323940195033.9+325451 68.54 3.28 4.23 +1.82 +0.96 +2.68 S6+/1e v-0.027-0.040 +.012-002V? 5.2 158.0 * -7565 12 VulBD+22 3833 187811 878133585 Var 194645.7+222120195104.1+223636 59.72-02.07 4.95 -0.14 -0.68 -0.14 B2.5Ve v+0.028-0.017 -031SB? 281 * -7566 19 CygBD+38 3780 187849 68947 I 13014 V1509 Cyg194701.3+382754195034.0+384321 73.57 6.20 5.12 +1.69 +2.10 +0.93E M2IIIa +0.011+0.107 +.000-039V? 6.4 55.5AB 3* -7567 BD+40 3902 187879 488923584 V380 Cyg 194711.3+402043195037.3+403559 75.22 7.13 5.69 -0.04 -0.77 B1III+B3V +0.001-0.004 -004SBO 79 * -7568 BD+37 3636 187880 68953 I 194711.2+373417195047.0+374935 72.81 5.72 6.06 +1.70 +1.85 M4IIb +0.024+0.007 +.005-016V? -7569 BD+11 4019 187923105348 W 12490 194722.5+112252195203.5+113744 50.33-07.82 6.13 +0.65 +0.13 G0V -0.335-0.320 +.022-017V =< 10 5.5 90.5 -7570 55Eta AqlBD+00 4337 187929125159 746I Eta Aql 194722.7+004456195228.4+010020 40.93-13.07 3.90 +0.89 +0.51 +0.47 F6Ib v+0.011-0.007 +.010-015SB 0 * -7571 BD-14 5578 187949163080 S V505 Sgr 194727.8-145134195306.4-143611 26.38-20.12 6.48 +0.14 +0.09 A0V+F8IV -0.004-0.042 -002SBO 97 0.3 * -7572 BD+09 4295 187961105355 13041 12496 194729.5+100542195215.6+102105 49.23-08.49 6.54 -0.01 -0.38 B7V +0.004-0.015 -013 300 4.0 13.5AB 4* -7573 BD+24 3914 187982 878403587 12498 194749.1+244407195201.6+245932 61.88-01.04 5.57 +0.71 +0.13 A1Ia +0.003-0.005 +.006-003SBO * -7574 9 SgeBD+18 4276 188001105360 12503 194754.1+182453195221.8+184019 56.48-04.33 6.23 +0.01 -0.92 O7.5Iaf -0.002-0.003 +009SB 104 * -7575 BD-03 4742 1880411438831519 V1291 Aql194804.5-032225195318.7-030652 37.27-15.18 5.65 +0.20 +0.10 A5p v+0.024+0.015 +.003-020V 2 * -7576 20 CygBD+52 2547 188056 320423586I 12481 194807.1+524403195037.7+525917 86.23 13.14 5.03 +1.28 +1.53 +0.50E K3IIICN1 -0.008-0.068 +.014-020V < 19: * -7577 BD+47 2937 188074 48907 Var? 194820.1+470712195119.4+472238 81.25 10.36 6.20 +0.36 +0.04 F2V +0.018+0.019 -018SB * -7578 CD-2415668 188088188692 13072 Var? 194818.4-241123195417.7-235628 17.18-23.91 6.18 +1.02 +0.94 +0.35E K2V -0.131-0.414 +.075-007SB2 =< 8 4.0 31.5 * -7579 CP-69 3072 1880972546933589 194821.5-692533195841.3-690950326.39-31.18 5.75 +0.23 +0.16 +0.08 Am +0.063-0.099 +.032-012 89 * -7580 BD+04 4264 188107125182 194823.9+040829195322.6+042402 44.10-11.65 6.53 +0.02 -0.11 B9.5Vn +0.016+0.004 +002 260 -7581 Iot SgrCD-4214549 1881142299271520 194821.8-420751195515.7-415206357.97-29.11 4.13 +1.08 +0.90 +0.52C K0II-III +0.017+0.056 +.035+036 -7582 63Eps DraBD+69 1070 188119 9540 I 13007 12465 194830.7+700048194810.4+701604102.43 20.83 3.83 +0.89 +0.52 +0.48 G7IIIbCN-2 +0.082+0.037 +.016+003SB < 19: 3.2 3.2 * -7583 BD+36 3744 188149 69004 I 194835.9+361027195216.3+362556 71.76 4.76 6.10 +1.43 +1.62 K4III +0.002 0.000 -021 -7584 56 AqlBD-08 5150 188154143894 I W 194842.7-085002195408.2-083427 32.28-17.80 5.79 +1.64 +2.00 gK5 +0.005-0.018 -050V? 6.1 46.5 -7585 CD-3314560 188158211653 194840.6-331827195505.1-330247 7.66-26.95 6.46 +1.48 K2/3III -0.012-0.002 +034V -7586 CP-58 7683 188161246348 194841.5-581116195657.7-575532339.54-31.31 6.53 +1.53 +1.79 K4II -0.009-0.036 +026 -7587 CP-59 7550 188162246349 194842.4-590952195706.2-585405338.40-31.36 5.26 -0.01 B9.5IV +0.015-0.021 +.022-002 51 -7588 CP-69 3073 188164254696 194840.4-690133195853.0-684544326.85-31.23 6.39 +0.16 +0.09 A0V+F5IV +0.034-0.067 -018SB2O * -7589 BD+46 2793 188209 489173588 Var 194858.2+464609195159.1+470139 80.99 10.09 5.62 -0.07 -0.97 -0.12 O9.5Ia -0.003 0.000 +.009-006V 77 * -7590 Eps PavCP-73 2086 188228257757 748 12598 194901.8-731028200035.5-725438322.02-30.90 3.96 -0.03 -0.05 -0.03C A0V +0.074-0.132 +.016-002V? 110 -7591 BD+47 2939 188252 48920 12511 194910.4+474025195207.2+475555 81.81 10.51 5.91 -0.18 -0.85 B2III -0.005-0.007 -018 74 -7592 13 VulBD+23 3820 188260 87883 W 194912.6+234907195327.7+240447 61.27-01.79 4.58 -0.06 -0.14 -0.05 B9.5III +0.027+0.038 +.009-028SB 50 3.2 1.0 -7593 57 AqlBD-08 5154 188293143898 13087A 194912.8-082916195437.6-081338 32.66-17.76 5.71 -0.08 -0.48 B7Vn +0.010-0.025 +.010-006SB 340 0.8 35.7 * -7594 57 AqlBD-08 5155 188294143899 13087B 194913.2-082951195438.1-081414 32.65-17.77 6.49 -0.04 -0.26 B8V +0.021-0.027 +.010-005SB 266 0.8 35.7 * -7595 59Xi AqlBD+08 4261 188310125210 I 194924.1+081209195414.9+082741 47.81-09.85 4.71 +1.05 +0.91 +0.57 G9+IIIb +0.101-0.081 +.023-042V? < 19: -7596 58 AqlBD-00 3871 188350125219 194937.4+000044195444.8+001625 40.55-13.92 5.61 +0.10 -0.01 A0III +0.042-0.012 -050 130 -7597 58Ome SgrCD-2614637 188376188722 I 194942.9-263353195550.4-261758 14.86-25.04 4.70 +0.75 +0.32 +0.37 G5V +0.207+0.083 +.062-021SB * -7598 BD+06 4351 188385125221 13093 194947.1+065242195440.3+070825 46.70-10.60 6.15 +0.03 +0.04 A2V +0.034-0.003 -016 6.4 13.8 * -7599 BD-07 5102 188405143911 13104 194957.7-065945195519.6-064403 34.15-17.26 6.51 +0.39 +0.05 F2V +0.036-0.046D+.010-007SB3 1.1 0.2 * -7600 BD+47 2945 188439 48940 V819 Cyg 195003.6+473251195301.2+474827 81.77 10.32 6.29 -0.11 -0.91 B0.5IIIn -0.009-0.009 -065SB 400 * -7601 BD+23 3829 188485 87908 195016.4+240326195431.1+241910 61.60-01.87 5.52 -0.02 -0.16 A0III +0.026 0.000 +.015-008V 117 -7602 60Bet AqlBD+06 4357 188512125235 749I 13110 12557 195024.0+060925195518.8+062424 46.13-11.09 3.71 +0.86 +0.48 +0.49 G8IV +0.048-0.482 +.070-040V =< 16 7.7 175.0AC 3* -7603 Mu 1PavCP-67 3695 188584254702 195039.1-671246200023.0-665658328.96-31.52 5.76 +1.04 +0.80 K0III -0.020-0.197 +.037+029 -7604 59 SgrCD-2714399 188603188742 I 195048.7-272606195656.8-271012 14.05-25.56 4.52 +1.46 +1.57 +0.73 K2.5IIb +0.008-0.013 +.014-016SB * -7605 CD-3813776 188642211686 195100.8-381921195741.3-380330 2.33-28.74 6.55 +0.39 F4V +0.089-0.083 -031 -7606 BD+36 3766 188650 69072 195109.0+364355195448.3+365946 72.50 4.61 5.76 +0.75 +0.35 G1Ib-IICH1Fe-1Ca-1 +0.014+0.021 -024 * -7607 BD+29 3802 188651 69079 13117 195107.1+295552195506.5+301143 66.70 1.05 6.57 -0.08 -0.47 -0.14 B6V+A5V +0.011+0.017 -012 200 2.9 9.3AB 4 -7608 23 CygBD+57 2084 188665 32085 195114.2+571541195317.4+573125 90.55 14.91 5.14 -0.13 -0.55 B5V +0.009+0.013 -025V? 145 * -7609 10 SgeBD+16 4067 188727105436 S Sge 195128.6+162211195601.3+163805 55.17-06.12 5.36 +0.67 +0.42 +0.45 G5Ib v+0.004-0.004 +.009-010SBO 20: * -7610 61Phi AqlBD+11 4055 1887281054383590 195130.1+110929195614.3+112526 50.66-08.80 5.28 -0.01 -0.08 A1IV +0.034+0.009 +.023-027SB1O 26 * -7611 BD+59 2137 188793 32093 W 195148.0+592639195335.4+594232 92.58 15.87 6.06 +0.02 +0.03 A3V +0.043+0.061 -014SB 110 3.3 71.4 -7612 Mu 2PavCP-67 3698 188887254707 195208.6-671251200152.4-665639328.95-31.67 5.31 +1.22 +1.29 +0.41E K2IVCNII +0.030-0.073 +.025+042 * -7613 22 CygBD+38 3817 188892 69101 195217.2+381315195551.7+382912 73.90 5.19 4.94 -0.08 -0.51 -0.10 B5IV 0.000+0.002 -030V 85 * -7614 61 SgrBD-15 5516 1888991631411522 195216.7-154524195757.0-152929 26.02-21.54 5.02 +0.05 +0.07 A3IV +0.017-0.101 +.032+003V 102 -7615 21Eta CygBD+34 3798 188947 691161521I 13149 12586 195233.2+344903195618.4+350500 71.02 3.36 3.89 +1.02 +0.89 +0.52 K0III -0.032-0.027 +.015-027 < 19: 7.7 46.0AC 5* -7616 BD+20 4351 188971 87963 195237.7+204352195700.2+205953 59.05-04.08 6.48R +0.07 -0.05 A2IV -0.024-0.023 +008 -7617 CD-3017525 188981211708 195239.0-304822195856.4-303217 10.62-27.01 6.28 +1.05 K1III +0.090-0.053 -051V -7618 60 SgrCD-2614682 189005188778 I 195251.7-262759195857.2-261144 15.23-25.67 4.83 +0.90 +0.55 +0.47 G6IIIBa0.2 +0.035+0.033 +.014-049SB * -7619 24Psi CygBD+52 2572 189037 32114 13148 195302.6+521024195537.8+522620 86.11 12.21 4.92 +0.12 +0.06 +0.06 A4Vn -0.037-0.030 +.005-010V 276 2.3 3.1AB 4* -7620 BD+35 3878 189066 69129 195302.2+355859195644.2+361503 72.06 3.89 6.02 -0.15 -0.59 B5IV +0.004+0.005 -023 * -7621 CD-4912949 1890802299733595 195302.2-493721200025.3-492104349.59-31.19 6.17 +1.06 +0.92 K0III -0.082-0.006 +067 -7622 11 SgeBD+16 4081 1890901054713592 195312.9+163111195745.4+164721 55.52-06.40 5.53 -0.05 -0.17 B9III +0.012+0.016 -.003-026V? 52 -7623 The1SgrCD-3513831 189103211716 751 195313.7-353248195944.2-351635 5.52-28.47 4.37 -0.15 -0.67 B3IV +0.006-0.026 +001SBO 69 * -7624 The2SgrCD-3513832 189118211717 W 195321.9-345801195951.3-344152 6.17-28.34 5.30 +0.17 +0.06 +0.07 A4/5IV +0.100-0.075 +.033-018 0 5.5 30. AB 3 -7625 CP-59 7564 1891242463893598 NU Pav 195319.2-593854200144.7-592234337.85-31.96 5.13 +1.53 +1.31 +1.55E M6III +0.017-0.033 +.005-010 * -7626 BD+57 2092 189127 32116 195323.0+575909195522.1+581501 91.35 15.00 6.09 +1.02 G9III +0.021-0.071 -017 -7627 CD-4313735 189140229977 195329.4-431856200026.5-430236356.85-30.27 6.14 +1.64 +2.02 M0II-III +0.023+0.013 -034 -7628 BD+39 3968 189178 490113593 W 195345.4+400556195713.9+402205 75.65 5.93 5.45 -0.10 -0.52 B5V +0.008+0.007 -026SB 115 3.0 64.6 * -7629 CD-3813802 189195211719 W 195337.8-375825200015.9-374208 2.86-29.15 5.95 +1.00 +0.77 G8III +0.018-0.020 +023 7.6 23.0 -7630 CD-4513549 1891982299813597 195343.4-452309200048.3-450647354.49-30.68 5.81 +0.28 +0.11 +0.17C A8III 0.000+0.002 +.017+003SB 123 * -7631 CD-3414082 189245211724 12655 195353.6-335804200020.3-334214 7.29-28.18 5.66 +0.49 -0.02 F7V +0.136-0.306 +.049-008SB 86 * -7632 BD+50 2930 189253 32130 195401.0+503801195645.1+505409 84.82 11.31 6.43 -0.01 -0.05 A1V +0.005+0.008 -019V 118 -7633 BD+58 2013 189276 321223591I 195400.9+583444195555.4+585046 91.93 15.21 4.96 +1.59 +1.93 K5II-III -0.009-0.019 +.004+005 < 19: -7634 BD+56 2331 189296 32128 195408.6+562506195619.0+564113 89.98 14.15 6.12R A4Vn +0.022+0.016 -031V 175 -7635 12Gam SgeBD+19 4229 189319105500 752I 12638 195418.5+191314195845.4+192932 57.97-05.21 3.47 +1.57 +1.93 +0.92 M0-III e+0.066+0.024 +.013-033V? < 17 * -7636 BD+00 4375 1893221253103596 195417.6+010615195922.7+012240 42.11-14.42 6.17 +1.13 +0.90 G8III +0.026+0.065 +006 -7637 BD-10 5238 189340163168 W 195421.1-101310195947.4-095730 31.60-19.66 5.88 +0.58 +0.05 F8V -0.269-0.400 +.040+023V? 0.0 0.1 -7638 BD+41 3549 189377 49031 13186 195434.4+415926195756.2+421539 77.36 6.79 6.43R A3V +0.001-0.003D+.003-006SB 1.2 0.1AB 3* -7639 CD-4113807 189388229993 195438.2-410515200126.4-404851359.42-30.04 6.29 +0.11 A2-3V -0.015-0.038 -031 -7640 BD+30 3837 189395 691883594 195440.0+304244195838.0+305901 67.77 0.82 5.49 -0.06 -0.19 B9Vn +0.041+0.003 +.036-007V 175 -7641 14 VulBD+22 3872 189410 88016 195453.0+224944195910.5+230605 61.11-03.41 5.67R F0 -0.071+0.006 +.019-038SB 120 -7642 BD+37 3703 189432 69193 13198 195457.9+375002195834.4+380620 73.84 4.54 6.32 -0.09 -0.50 B5IV +0.009-0.004D+.004-014 15 1.1 1.9 -7643 CD-2315935 1895611888293600 195527.3-230044200123.9-224414 19.04-25.02 6.01 +0.97 +0.77 G7V +0.010-0.014 +008V? -7644 CP-67 3703 189567254721 195532.3-673453200532.8-671915328.48-31.98 6.07 +0.64 +0.08 +0.23E G3V +0.844-0.672 +.054-012 -7645 13 SgeBD+17 4183 189577105522 I 13230 VZ Sge 195532.3+171435200003.3+173100 56.43-06.49 5.37 +1.67 +1.75 +1.20E M4IIIa +0.004-0.011 -017V? 7.5 28.5 * -7646 BD+45 3025 189684 49058 195611.9+452957195920.5+454620 80.53 8.37 5.92 +0.16 +0.15 A5III +0.020-0.021 +006V -7647 25 CygBD+36 3806 189687 692313599 V1746 Cyg195615.1+364607195955.2+370234 73.07 3.76 5.19 -0.17 -0.69 B3IVe +0.006+0.001 -004SB 229 * -7648 BD+08 4300 189695125355 I 195608.7+081658200058.9+083329 48.74-11.25 5.91 +1.52 +1.89 K5III +0.008-0.009 -040V? -7649 63 SgrBD-14 5618 189741163195 195622.5-135451200158.6-133813 28.27-21.69 5.71 +0.08 A3V +0.038+0.018 +.020-042 -7650 62 SgrCD-2816355 189763188844 753I V3872 Sgr195630.6-275916200239.5-274235 13.92-26.93 4.58 +1.65 +1.80 +1.56 M4III +0.036+0.017 +.028+010V * -7651 BD+51 2728 189775 32170 195636.3+514654195915.4+520321 86.04 11.54 6.15 -0.19 -0.65 B5III +0.015+0.006 -016V -7652 CD-3813828 1898312117673602 195654.9-381302200333.5-375627 2.77-29.84 4.77 +1.41 +1.68 +0.56E K5III +0.059-0.092 +.020-038 * -7653 15 VulBD+27 3587 189849 880711523 NT Vul 195658.9+272837200106.1+274513 65.30-01.34 4.64 +0.18 +0.16 +0.09 A4III +0.059+0.005 +.030-021SBO 23 * -7654 BD+63 1584 189900 18627 195713.7+631540195828.7+633203 96.42 17.09 5.96R +0.09? A3V -0.005-0.026 -009 -7655 BD+36 3820 189942 69267 195734.8+364913200115.3+370556 73.26 3.56 6.20 +1.31 K0III +0.044+0.051 -016 -7656 BD+24 3975 189944 88088 195730.4+243122200144.7+244801 62.87-03.02 5.88 -0.12 -0.51 B4V +0.005-0.003 -015 -7657 16 VulBD+24 3977 190004 88098 13277 195746.8+243928200201.4+245617 63.02-03.00 5.22 +0.36 +0.09 F2III +0.088+0.070D+.004-037V 121 0.3 0.8 -7658 BD-22 5318 190009188863 D 195748.8-225235200344.3-223544 19.39-25.48 6.45 +0.50 F6V -0.042+0.020 +007V * -7659 CD-3215682 1900562117823606I W 12746 195759.2-322013200419.6-320323 9.34-28.55 4.99 +1.21 +1.16 K1III +0.047-0.015 +.007-012 7.6 51.3 -7660 26 CygBD+49 3158 190147 49098 I 13278A 195831.8+494935200121.6+500617 84.49 10.28 5.05 +1.11 +1.02 +0.55 K1II-III +0.019+0.004 +.014+001V < 19: 3.8 41.8AB 5 -7661 BD-07 5159 190172144038 195838.3-074459200401.2-072811 34.46-19.52 6.72 +0.35 +0.07 F4III +0.015-0.048 +004V? -7662 BD+18 4365 190211105608 I W 195847.2+181315200316.4+183002 57.67-06.63 5.96 +1.42 +1.60 K3II-III+G8IV +0.015-0.031 +009 3.3 47.1 -7663 CP-66 3473 190222254731 195849.4-663826200820.5-662117329.57-32.36 6.45 +1.58 +1.98 K5III -0.010-0.005 +036 -7664 BD+15 4033 190229105615 195855.4+154502200330.0+160153 55.58-07.97 5.67 -0.10 -0.48 B9pHgMn +0.003-0.005 +.008-022SB1 11 * -7665 Del PavCP-66 3474 190248254733 754 12790 195854.9-662612200843.6-661055329.79-32.40 3.56 +0.76 +0.45 +0.34 G6-8IV +1.207-1.131 +.170-022 * -7666 BD+69 1084 190252 9592 195856.5+700522195841.9+702201102.91 20.06 6.33 +0.88 +0.54 G8III +0.045+0.060 -010 * -7667 62 AqlBD-01 3887 190299144045 I 195914.0-005918200423.2-004234 40.83-16.51 5.68 +1.30 +1.35 K4III +0.003-0.118 +.004+000V? -7668 CD-3314700 190306211798 W 195909.4-331659200532.1-330000 8.38-29.04 6.53 -0.08 B8 +0.018-0.018 -018 1.0 0.4AB 3 -7669 63Tau AqlBD+06 4416 1903271254031524I 195915.2+065944200408.3+071641 48.01-12.57 5.52 +1.06 +0.86 gK0 +0.016+0.011 +.005-028 -7670 BD+29 3872 190360 88133 195930.7+293747200337.4+295348 67.41-00.66 5.71 +0.73 +0.37 G6IV+M6V +0.683-0.526 +.047-045V 9.8 179. * -7671 BD-12 5641 190390163245 W V1401 Aql195934.1-115256200505.4-113558 30.60-21.53 6.34 +0.52 F1III -0.001-0.012 -012V? 23 25. * -7672 15 SgeBD+16 4121 190406105635 W 12757 195936.6+164757200406.2+170412 56.56-07.55 5.80 +0.61 +0.09 G1V -0.395-0.414 +.060+004V 4 0.9 203.7AC 6 -7673 Xi TelCP-53 9794 190421246443 755 12783 195943.5-531001200723.2-525251345.55-32.57 4.94 +1.62 +1.84 +0.80E M1IIab -0.014+0.008 +.014+036SB * -7674 CP-55 9317 190422246444 195942.7-551811200735.1-550059343.02-32.69 6.26 +0.53 F8V +0.016+0.023 +013 -7675 65 SgrBD-13 5569 190454163253 195952.7-125652200526.4-123955 29.59-22.06 6.55 +0.04 0.00 A1Vn +0.009-0.049 -006 201 -7676 64 DraBD+64 1405 190544 186583604I W 200025.0+643227200128.5+644916 97.77 17.38 5.27 +1.56 +1.81 M1III-IIIb +0.007-0.012 +.006-034 193.8 -7677 BD+22 3913 190590 88163 S 200040.1+225533200458.6+231237 61.91-04.49 6.45R A5Vn +0.006-0.002 -022 0.1 -7678 BD+31 3925 190603 69362 13335 V1768 Cyg200040.8+315606200436.1+321307 69.49 0.39 5.64 +0.54 -0.46 +0.42 B1.5Ia e-0.011-0.012 +021V 29 4.5 32.1 * -7679 16Eta SgeBD+19 4277 1906081056593609I 200043.3+194215200509.5+195928 59.18-06.23 5.10 +1.06 +0.98 +0.34E K2III +0.030+0.078 +.032-040V? < 19: * -7680 BD+15 4040 190658105663 I 13344 200050.4+151253200526.5+153001 55.36-08.64 6.34 +1.64 +1.76 M2.5III +0.033+0.020 -112SB 4.0 2.7 * -7681 BD-04 5013 190664144062 200056.0-042147200612.2-040442 37.92-18.48 6.47 +1.16 +1.00 K0 +0.045-0.045 -002 -7682 65 DraBD+64 1407 190713 18669 W 200113.6+642107200220.3+643804 97.64 17.21 6.57R gG7 +0.046+0.010 +009V? 2.1 96.8AB 3 -7683 BD+38 3896 190771 69377 13348 200130.9+381124200509.8+382842 74.84 3.64 6.19 +0.64 +0.22 +0.38 G5IV +0.259+0.109 +.041-024 6.1 40. AC 3* -7684 BD+47 3004 190781 491523610 S 200129.2+475642200428.8+481347 83.12 8.88 6.16 +0.04 +0.04 A2IV +0.011+0.004 -014 0.3 -7685 67Rho DraBD+67 1222 190940 186763608I W 200222.1+673518200249.1+675225100.70 18.64 4.51 +1.32 +1.51 +0.65 K3III +0.016+0.046 +.017-009 < 19: 8.6 124. AB 3 -7686 69 DraBD+76 771 190960 96063605I 200225.1+761209195936.6+762853108.94 22.48 6.20 +1.61 +1.89 +0.94E M3III -0.029-0.055 -069V? -7687 BD+51 2763 190964 32272 I 200224.1+513308200506.7+515022 86.31 10.65 6.14 +1.60 +1.95 M1IIIa +0.029+0.034 -056 -7688 17 VulBD+23 3896 190993 882123611 200235.5+231934200653.4+233652 62.48-04.65 5.07 -0.18 -0.67 B3V +0.015+0.003 -005SB 214 -7689 27 CygBD+35 3959 191026 69413 W Var? 200238.8+354149200621.8+355821 72.86 2.10 5.36 +0.85 +0.54 +0.44 K0IV -0.224-0.438 +.032-033 4.0 11.9AD 4* -7690 64 AqlBD-01 3899 191067144095 200252.0-005758200801.8-004042 41.30-17.29 5.99 +1.02 +0.90 K1IV +0.116-0.070 -004V? -7691 CP-57 9622 191095246470 W 200300.3-574859201107.2-573126340.04-33.20 6.37 +0.06 B7V+A3V -0.002-0.025 -007SB3 0.6 0.8 * -7692 BD+55 2324 191096 32276 200305.1+560307200521.5+562029 90.30 12.90 6.21 +0.43 +0.03 F4V -0.004+0.080 -012V? 40 -7693 BD+08 4344 191104125478 13403 200301.2+090633200750.3+092359 50.35-12.29 6.43 +0.46 -0.02 F3V +0.047+0.022D+.015-027SB 2.1 3.1 * -7694 BD-10 5285 191110163290 200303.3-102108200831.3-100346 32.48-21.65 6.18 +0.06 B9.5III +0.008-0.042 -016SB2O * -7695 BD+63 1593 191174 18692 13371 200329.2+633608200444.6+635326 97.08 16.64 6.26 +0.10 +0.04 A2II-III +0.007+0.043D+.023-019V? 3.6 5.5AB 3 -7696 BD+16 4153 191178105733 I 200332.8+162225200806.5+163951 56.71-08.58 6.42 +1.91 +1.86 M3III +0.005-0.002 +011V? -7697 BD+52 2623 191195 322863613 W 200335.8+525212200613.8+530957 87.56 11.18 5.85 +0.39 -0.01 F5V +0.212+0.255 +.027-041V =< 10 3.8 170.4 -7698 CP-83 695 191220258856 200333.7-833708202454.4-831838310.00-29.60 6.17 +0.20 +0.13 Am +0.011+0.012 +000 * -7699 BD+34 3881 191243 694573615 200351.7+340757200741.4+342523 71.69 1.03 6.11 +0.16 -0.45 B5Ib +0.002 0.000 +010V? * -7700 BD+10 4189 1912631057433616 200352.1+102604200838.3+104333 51.62-11.78 6.31 -0.12 -0.67 B3V +0.004+0.001 -025 * -7701 66 DraBD+61 1970 191277 187003612I 200357.4+614218200532.8+615944 95.39 15.65 5.39 +1.18 +1.29 +0.59 K3III +0.121+0.074 +.037+006 -7702 BD+49 3195 191329 32296 200420.2+495622200711.5+501345 85.08 9.54 6.54 +0.13 A3V +0.018-0.020 +003 -7703 CD-3613940 191408211885 W 200437.7-362109201111.9-360604 5.26-30.91 5.32 +0.87 +0.46 +0.49 K3V +0.458-1.571 +.179-130V? 4.0 AD 4* -7704 BD+67 1226 191372 18699 I 200427.6+674421200453.3+680138100.94 18.54 6.28 +1.65 +2.00 +0.97E M3IIIa -0.017-0.012 -042 * -7705 17The SgeBD+20 4453 191570 88276 13442A 200531.8+203704200956.6+205455 60.55-06.68 6.48 +0.38 -0.04 F5IV +0.054+0.101 +.029-040 0.6 83.9AC 4* -7706 CD-4313855 191584230100 200531.5-430428201223.9-424650357.57-32.39 6.22 +1.23 K1III -0.014-0.118 -001 -7707 CP-63 4571 1916032547563619 200533.3-634257201426.9-632457332.97-33.29 6.09 +0.31 +0.09 F0IV -0.037+0.037 +019 -7708 28 CygBD+36 3907 191610 695181525 V1624 Cyg200542.7+363242200925.6+365023 73.91 2.04 4.93 -0.13 -0.77 -0.14 B2.5Ve v+0.005+0.014 -014SB? 310 * -7709 BD-09 5382 1916391441443618 Var 200544.7-090818201110.1-085032 33.97-21.71 6.49 -0.15 -0.92 B1V +0.006 0.000 -007 * -7710 65The AqlBD-01 3911 191692144150 756I'W 200608.7-010706201118.3-004917 41.58-18.08 3.23 -0.07 -0.14 -0.05 B9.5III +0.038+0.004 +.012-027SB2O 63 9.6 113.7 * -7711 18 VulBD+26 3815 191747 88295 200623.0+263628201033.5+265415 65.71-03.57 5.52 +0.08 +0.13 A3III +0.020+0.013 +.002-012SB2O 41 * -7712 1Xi 1CapBD-12 5664 191753163328 200625.4-124122201157.9-122333 30.58-23.39 6.34 +1.21 K0III -0.005-0.017 +001 -7713 BD+20 4462 191814 88309 200639.3+205013201103.5+210805 60.90-06.79 6.22 +0.90 K0 +0.017+0.034 -007 -7714 CP-5211643 191829246495 200644.2-524441201419.0-522644346.13-33.60 5.65 +1.50 K4III +0.022-0.045 +.020+014V -7715 2Xi 2CapBD-13 5608 191862163337 W 200651.6-125438201225.9-123703 30.41-23.59 5.85 +0.48 -0.07 F7V +0.197-0.193 +.037+023V? 6.2 71.6 -7716 BD+21 4088 191877 88315 200658.7+213440201121.1+215232 61.57-06.45 6.26 -0.02 -0.85 B1Ibe -0.001+0.007 -018 -7717 BD+00 4444 191984125567 13506A 200729.1+003407201235.2+005203 43.30-17.56 6.27 +0.02 -0.01 B9pCrEu:Sr: +0.010-0.014D+.009-019 0.2 2.8 * -7718 19 VulBD+26 3825 192004 88330 I 200737.2+263038201148.0+264832 65.78-03.85 5.49 +1.41 +1.51 +0.70 K3II-III +0.007-0.010 -023 * -7719 20 VulBD+26 3828 192044 88339 12890 200749.0+261048201200.7+262844 65.53-04.07 5.92 -0.11 -0.43 B7Ve +0.008-0.011 -022V 350 * -7720 66 AqlBD-01 3920 192107144181 I 200804.0-011833201313.9-010034 41.65-18.60 5.47 +1.43 +1.30 K5III +0.022-0.028 +.028-028V * -7721 BD+47 3045 192276 49314 200859.4+472612201203.8+474413 83.37 7.54 6.92 -0.12 -0.45 B7V +0.016+0.004 -019SBO * -7722 CD-2714659 192310189065 12933 200903.1-271953201517.4-270158 15.62-29.38 5.73 +0.88 +0.64 +0.45 K0V v+1.244-0.174 +.124-054SB? -7723 BD+23 3935 192342 88377 13543 200922.9+235608201340.6+241420 63.85-05.61 6.56 +0.29 +0.12 +0.14 A1m +0.050+0.031D+.011-037 3.3 2.7 * -7724 67Rho AqlBD+14 4227 1924251058781526 200938.9+145334201416.6+151151 56.24-10.61 4.95 +0.08 +0.01 0.00 A2V +0.057+0.057 +.023-023SB? 152 -7725 CD-3017773 1924332119403621 200937.9-301837201550.6-300019 12.38-30.36 6.30 +1.51 K4III +0.037+0.013 -099V -7726 BD+51 2796 192439 32354 13535 200944.8+510945201231.8+512749 86.60 9.47 6.01 +1.14 K2.5III -0.011-0.014 +013 5.6 4.0AB 5* -7727 68 DraBD+61 1983 192455 18751 W 200956.6+614633201134.9+620443 95.83 15.08 5.75 +0.47 +0.02 F5V +0.123+0.083 +.031-015V? =< 10 9.4 93. -7728 CD-3614011 192472211948 W 12949 200953.2-364532201623.7-362716 5.09-32.02 6.39 +1.54 M4III +0.009-0.042 -014V 5.1 38.0AB 3 -7729 CD-3514020 192486211950 200959.8-353020201626.5-351152 6.54-31.76 6.53 +0.37 F2V +0.009+0.081 -008 -7730 30 CygBD+46 2881 192514 49332 13554D 12926 201009.4+463047201318.0+464857 82.71 6.87 4.83 +0.09 +0.15 +0.08 A5IIIn +0.012-0.001 +.012-026V? 146 1.0 337.5AD 6* -7731 21 VulBD+28 3675 192518 88391 NU Vul 201007.9+282330201414.5+284141 67.66-03.27 5.18 +0.18 +0.16 A7IVn +0.014-0.022 +.010+007V? 197 * -7732 CP-63 4576 192531254772 201013.7-633215201903.0-631352333.13-33.82 6.27 +1.04 K0III -0.015-0.084 -008 -7733 BD+42 3642 192535 493363620I 13555 201020.8+430432201342.8+432245 79.85 4.93 6.14 +1.50 +1.83 K4III 0.000+0.006 -024 6.4 57.3AC 4 -7734 BD+36 3949 192538 69653 Var? 201020.1+361805201405.0+363619 74.23 1.14 6.45 0.00 -0.02 A0V +0.024+0.002 -022 142 -7735 31 CygBD+46 2882 192577 49337 757I 13554A V695 Cyg 201028.9+462616201337.9+464429 82.68 6.78 3.79 +1.28 +0.42 +0.76 K2II+B3V +0.004+0.003 +.007-008SBO =< 25 1.0 337.5AD 6* -7736 29 CygBD+36 3955 192640 69678 W V1644 Cyg201047.3+362959201432.0+364823 74.45 1.17 4.97 +0.14 0.00 +0.07 A2V +0.068+0.070 +.036-017V 37 1.6 212.4AB 5* -7737 BD+41 3668 192659 49345 13572 201054.7+414759201421.6+420613 78.85 4.13 6.71 -0.04 -0.28 B9IV-V +0.005-0.021 -018V 0.2 0.9AB 3* -7738 3 CapBD-12 5680 192666163402 13600 201050.6-123836201622.8-122013 31.12-24.35 6.32 +0.01 -0.17 B9pHg +0.012-0.013 -020 7.3 26.9AB 3 -7739 BD+25 4165 192685 88410 13589 QR Vul 201101.6+251711201515.9+253531 65.19-05.17 4.78 -0.18 -0.72 -0.20 B3Ve v+0.008-0.006 -007SB? 249 2.4 0.7AB 3* -7740 33 CygBD+56 2376 192696 32378 758 12935 201104.4+561542201323.9+563404 91.08 12.06 4.30 +0.11 +0.08 +0.06 A3IV-Vn +0.063+0.083 +.021-018SB 268 * -7741 22 VulBD+23 3944 192713 88416 I QS Vul 201111.0+231211201530.2+233031 63.47-06.36 5.15 +1.04 +0.71 +0.48 G3Ib-II 0.000-0.015 +.004-023SB1O 17: * -7742 BD+60 2099 192781 18766 I 201137.4+602005201327.7+603826 94.66 14.16 5.79 +1.47 gK5 +0.044+0.058 -001V? -7743 BD+33 3827 192787 69701 13596 201130.7+332534201523.7+334346 71.99-00.68 5.66 +0.91 +0.66 K0III -0.040-0.106 -010V 6.3 3.0 * -7744 23 VulBD+27 3666 192806 88428 I S 201137.4+273026201546.1+274851 67.11-04.04 4.52 +1.26 +1.12 +0.71 K3-IIIFe-1 -0.036+0.008 +.008+003 < 19: * -7745 CD-4813509 1928272301441528 201145.7-480115201856.0-474239351.87-34.08 6.31 +1.67 +2.02 M1III +0.012-0.004 -044V? * -7746 18 SgeBD+21 4130 192836 88433 201156.1+211730201619.7+213555 61.96-07.57 6.13 +1.04 +0.92 +0.53 K1III +0.001-0.024 -004 * -7747 5Alp1CapBD-12 5683 1928761634221527I 13632 201206.3-124902201738.9-123030 31.09-24.70 4.24 +1.07 +0.78 +0.53 G3Ib +0.023+0.001 +.006-026SB =< 54 0.4 377.7 * 9* -7748 4 CapBD-22 5384 1928791891141529 201208.9-220708201801.4-214836 21.50-28.31 5.87 +1.00 K0III +0.035-0.024 +.040-018V? -7749 CD-4713340 192886230150 201206.5-475310201917.9-473449352.03-34.13 6.13 +0.46 +0.01 +0.26C F5V +0.200-0.185 +.026-031 * -7750 1Kap CepBD+77 764 192907 9665 759 13524 201215.7+772437200853.3+774241110.38 22.50 4.39 -0.05 -0.11 -0.06 B9III +0.011+0.024 +.001-023V 18 3.8 7.3AB 3* -7751 32 CygBD+47 3059 192909 49385 I W V1488 Cyg201222.8+472425201528.3+474252 83.67 7.05 3.98 +1.52 +1.03 +0.92 K3Ib+B3V +0.001+0.008 +.014-014SBO < 25 5.5 208.9 * -7752 BD+38 3977 192934 69720 S 201225.4+383527201603.4+385352 76.36 2.08 6.27 +0.01 -0.01 A1V -0.001-0.037 +008V? 73 0.2 -7753 24 VulBD+24 4075 192944 88451 760 201230.3+242147201647.1+244016 64.61-05.97 5.32 +0.95 +0.67 G8III +0.016-0.018 -.003+015V < 19: -7754 6Alp2CapBD-12 5685 192947163427 761I 13645 201230.4-125117201803.3-123241 31.10-24.81 3.57 +0.94 +0.69 +0.48 G8IIIb +0.064+0.004 +.034+000SB? < 17 0.4 377.7 * 9* -7755 BD+49 3236 192983 32400 S 201248.8+495529201543.4+501358 85.82 8.38 6.31R A2Vn +0.024+0.010 -025V? 335 0.2 -7756 BD+45 3119 192985 49395 201246.1+451622201600.6+453446 81.93 5.80 5.91 +0.38 -0.04 F5V: +0.008-0.052 -040 =< 10 -7757 BD+36 3978 192987 69725 201244.3+364452201628.2+370323 74.87 0.99 6.48 -0.09 -0.41 B6III +0.013+0.001 -008 300 * -7758 CP-55 9365 1930022465353626 201245.6-552145202032.3-550303342.99-34.54 6.27 +1.59 +2.01 M0-1III +0.009-0.033 -009 -7759 BD+39 4114 193092 49410 I 13640 12981 201321.7+400320201655.3+402154 77.67 2.76 5.24 +1.65 +1.88 +0.89 K3.5IIab-IIb +0.004-0.003 +.004-020V? < 19: 5.5 12.8AB 3 -7760 BD+28 3695 193094 88473 13648 201325.7+285012201731.5+290853 68.43-03.62 6.22 +1.01 G9III -0.011+0.032D+.009-020 4.7 5.9 -7761 7Sig CapBD-19 5776 1931501634453625I 13675 201337.4-192550201923.6-190707 24.48-27.66 5.28 +1.40 +1.53 K3II +0.009-0.009 +.025-011V 3.5 56.5 -7762 BD+42 3670 193217 49425 I 201403.4+422440201729.1+424319 79.69 3.99 6.29 +1.64 +1.91 K4II: +0.014 0.000 -017 -7763 34 CygBD+37 3871 193237 69773 I P Cyg 201406.0+374319201747.2+380159 75.83 1.32 4.81 +0.42 -0.58 +0.26 B2pe -0.005-0.004 +.004-009V 75 * -7764 CD-2916981 193281189164 13702 201418.4-293041202028.1-291150 13.60-31.11 6.30 +0.17 A4/7V +0.028+0.004 +004V 82 1.1 27.2AC 5* -7765 CD-3614057 1933022120251530 201424.5-355920202051.9-354025 6.22-32.75 6.46 +1.31 K3-4III +0.039+0.018 -015 -7766 CD-5012929 1933072465463630 201425.3-501829202141.0-495958349.13-34.67 6.27 +0.55 -0.02 G0V -0.357-0.250 +.045+018 * -7767 BD+40 4103 193322 49438 13672 201434.4+402513201807.0+404356 78.10 2.78 5.84 +0.10 -0.78 +0.01 O9V +0.001-0.003 +.007-007V 110: 2.5 2.6AB 5* -7768 BD-01 3951 193329144296 201433.2-012335201943.3-010443 42.40-20.06 6.06 +1.09 +1.02 K0 +0.042+0.033 -045V -7769 36 CygBD+36 3998 193369 69803 201443.8+364112201828.6+370000 75.05 0.63 5.58 +0.06 0.00 A2V +0.037+0.025 -008SB 105 -7770 35 CygBD+34 3967 193370 698063627 12994 201448.6+344012201839.1+345858 73.40-00.54 5.17 +0.65 +0.48 +0.42 F5Ib +0.001-0.003 +.007-014SBO 13 * -7771 BD+12 4289 193373105961 I 201447.6+125413201929.2+131301 55.22-12.74 6.21 +1.63 M1III -0.029-0.012 +023V? -7772 BD-06 5451 1934291443133628I 13013 201506.7-064027202026.1-062142 37.47-22.67 6.63 +1.55 +1.84 K5 -0.081-0.090 +043V * -7773 8Nu CapBD-13 5642 193432163468 13714 201507.0-130426202039.8-124533 31.17-25.48 4.76 -0.05 -0.11 -0.06 B9.5V +0.019-0.019 +.021-002V? 17 7.0 54.1 * -7774 BD+13 4360 193472105974 201519.0+131401202000.2+133253 55.57-12.67 5.95 +0.31 +0.13 +0.16 A5-F2m +0.012-0.004 -008SB2 93 * -7775 BD-15 5626 193452163471 13717 201509.4-150601202046.6-144706 29.12-26.32 6.10 -0.02 -0.11 A0III +0.043 0.000 +.010-018SB1O 97 0.3 0.0 * 8* -7776 9Bet CapBD-15 5629 193495163481 762I W 201523.6-150550202100.7-144653 29.15-26.37 3.08 +0.79 +0.28 +0.50 F8V+A0 +0.042+0.002 +.010-019SBO 54 0.3 0.0 * 8* -7777 BD+45 3139 193536 49462 V1773 Cyg201537.2+460031201849.6+461922 82.82 5.80 6.45 -0.13 -0.69 B2V -0.005+0.010 -009SB2O * -7778 BD+14 4263 1935561059883629 201541.4+141513202020.5+143409 56.50-12.19 6.13 +0.91 +0.64 +0.44 G8III -0.001+0.004 +008 -7779 Kap1SgrCD-4214836 193571230177 763 W 201540.2-422153202227.5-420259358.75-34.13 5.59 0.00 0.00 -0.01C A0V +0.036-0.090 +.035-012V 6.0 52.0AC 3 -7780 BD+17 4294 193579105991 I 201548.9+172842202021.4+174735 59.26-10.44 5.80 +1.49 gK5 +0.020-0.033 -033 -7781 BD+54 2329 193592 32455 13692 201556.5+550503201824.8+552350 90.45 10.84 5.76 +0.11 +0.03 +0.06 A2V s -0.006-0.023 +.003+001SB 1.3 3.5AB 4* -7782 BD+36 4008 193621 69841 201603.7+364903201948.3+370757 75.31 0.48 6.57 0.00 -0.07 A0III +0.010-0.011 -019 * -7783 BD+66 1281 193664 18796 201632.3+663156201731.3+665114100.45 16.92 5.93 +0.58 +0.06 G3V +0.466+0.300 +.067-005V -7784 BD+38 4021 193702 69856 13728 201637.7+390516202015.2+392412 77.23 1.69 6.23 +0.06 +0.03 +0.03 A1V -0.002-0.022D+.003-001V 127 1.1 0.3AB 3* -7785 CP-81 901 1937212588613994 W 201639.3-811737203317.5-805754312.42-30.69 5.77 +1.14 +0.85 G6-8II -0.004-0.019 +009V 5.7 26.8 -7786 BD+46 2910 193722 49482 V1584 Cyg201645.3+463116201956.1+465015 83.35 5.93 6.50 -0.06 -0.37 B8/9IIIpSi +0.001+0.010 -011 250 * -7787 Kap2SgrCD-4214847 193807230184 W 201705.3-424438202353.2-422522358.34-34.44 5.64 +0.20 +0.10 +0.02 A5V 0.000+0.022 +.016+003V? 0.9 0.6AB 4* -7788 BD-10 5369 1938961443613632 201734.3-095827202300.8-093917 34.55-24.70 6.30 +0.91 +0.58 G5IIIa +0.024-0.018 -017V? -7789 25 VulBD+23 3986 193911 88580 201745.4+240737202203.4+242646 65.09-07.09 5.54 -0.06 -0.40 B8IIIne 0.000-0.007 -.008-013V 242 * -7790 Alp PavCP-57 9674 193924246574 764 W 13060 201744.3-570320202538.9-564406340.91-35.19 1.94 -0.20 -0.71 -0.16 B2IV +0.007-0.089 +002SBO 39 7.1 245.4AB 3* -7791 BD+53 2384 193944 32491 I 13743 201751.2+531641202030.4+533546 89.08 9.60 6.18 +1.56 K4III -0.016+0.014 -004 6.2 6.5AC 4 -7792 71 DraBD+61 2000 193964 18807 DE Dra 201756.6+615623201936.7+621527 96.48 14.36 5.72 -0.05 -0.21 B9V +0.010+0.026 -019SBO 0 * -7793 BD+14 4275 194012106042 201812.4+141351202252.3+143305 56.82-12.71 6.17 +0.51 -0.07 +0.26 F8V +0.075-0.001 +.034+002V? 6 -7794 BD+04 4434 1940131257471531 201813.4+050124202310.7+052035 48.75-17.63 5.31 +0.97 +0.77 +0.50 G8III-IV -0.026-0.039 +.002-012 < 19: -7795 BD+40 4136 194069 49524 201830.6+404845202203.0+410753 78.85 2.39 6.39 +1.07 +0.82 G5III+A -0.004-0.031 -004 * -7796 37Gam CygBD+39 4159 194093 49528 765I 13765 13048 201838.3+395611202213.7+401524 78.15 1.87 2.20 +0.68 +0.53 +0.34 F8Ib +0.004 0.000 +.003-008V 20 8.5 141.2AxBC 4* -7797 BD+30 4005 194097 69917 I 201835.9+305643202237.4+311554 70.81-03.33 6.09 +1.35 K2 +0.005-0.027 +012 -7798 BD+45 3152 194152 49531 13050 201849.5+452825202205.4+454742 82.70 5.04 5.58 +1.08 +1.02 K0III v+0.028+0.044 -022SB -7799 CD-4114024 194184230197 201907.1-410705202547.9-404747 0.35-34.58 6.09 +1.36 +1.61 K3III -0.102-0.093 +042SB1O * -7800 BD+40 4141 194193 49546 I 201912.3+404222202245.3+410134 78.84 2.22 5.93 +1.60 +1.98 K7III +0.001-0.047 +001V? -7801 CD-2917049 1942151892641532 D 201919.5-285916202526.8-283948 14.55-32.01 5.85 +1.10 +0.94 G8II/III +0.014+0.007 +.038-007SBO * -7802 BD+42 3721 194220 49550 13786 13053 201928.7+423938202255.5+425900 80.46 3.32 6.20 +0.95 +0.76 K0III v+0.053+0.036D+.014-020V 1.8 93.2AC 4* -7803 BD+00 4495 194244125769 13811 13064 201931.7+004441202437.5+010407 45.03-20.09 6.15 -0.04 -0.14 B9V +0.003+0.007 -009V? 265: 4.7 31.3AC 3* -7804 BD+68 1121 194258 188173631I AC Dra 201939.4+683338202006.0+685249102.43 17.72 5.55 +1.59 M4.5-5III +0.017+0.025 -043V * -7805 BD+63 1618 194298 18826 I 13769 201946.3+633934202111.4+635849 98.10 15.11 5.69 +1.56 K5III -0.004+0.023 +030V? 6.9 4.3 * -7806 39 CygBD+31 4062 194317 699503633I 201951.9+315202202351.7+321124 71.72-03.02 4.43 +1.33 +1.50 +0.67 K2.5IIIFe-0.5 +0.049-0.005 +.014-015V < 19: * -7807 BD+37 3916 194335 69951 Var? 201959.9+370912202344.4+372835 76.04 0.04 5.90 -0.20 -0.88 B2Ven +0.004-0.004 -030SB * -7808 CD-3713741 194433212126 W 202024.3-374336202653.0-372411 4.46-34.26 6.25 +0.97 +0.77 K2IV-V -0.242-0.116 +.042+023 1.4 1.1 * -7809 BD-03 4888 194454144412 202029.5-030729202542.5-024801 41.54-22.19 6.11 +1.19 +1.19 gK1 -0.007-0.030 +024V? -7810 BD+09 4526 194526125797 I 13076 202055.4+094352202544.0+100323 53.30-15.71 6.33 +1.56 +1.92 +0.66E K5III v+0.002-0.030 -077 -7811 BD+20 4559 194577 886643634 Var 202115.2+210501202540.5+212435 63.02-09.48 5.66 +0.93 G6III +0.010-0.011 -022 * -7812 CP-81 906 194612258864 202124.9-813737203818.6-811720311.99-30.75 5.91 +1.71 +2.02 K5III -0.005-0.030 +000 -7813 BD+19 4408 194616106100 202132.3+193217202601.2+195154 61.77-10.41 6.41 +1.02 K0III +0.029+0.002 -030 -7814 10Pi CapBD-18 5685 194636163592 13860 202135.8-183223202719.2-181242 26.22-29.08 5.25 -0.07 -0.41 B8II-III +0.015-0.011 -013V? 93 3.4 3.3AB 3* -7815 BD+53 2397 194668 32534 202150.7+531333202432.4+533307 89.38 9.08 6.51 +0.01 -0.13 B9.5III +0.010+0.015 -019 -7816 BD+16 4259 1946881061013635 202149.0+165918202623.2+171856 59.66-11.91 6.22 +1.01 K0 +0.008-0.006 -017 -7817 CD-3614166 1947832121603637 202221.8-355532202846.7-353545 6.69-34.31 6.10 -0.11 B8II/III v+0.008-0.021 -009 * -7818 BD+59 2228 194882 32562 13850 202300.6+591623202505.1+593600 94.55 12.38 6.44 +0.09 +0.12 A2IV s +0.010-0.007D+.005-022SB 0.3 0.2 * -7819 BD-16 5609 194918163612 202305.5-160421202843.6-154430 28.97-28.46 6.41 +0.99 +0.69 K0III +0.010-0.008 -018V? -7820 BD+07 4477 1949371258413638 202315.5+080623202807.5+082615 52.19-17.07 6.25 +1.08 +0.93 G9III +0.043+0.017 -011 -7821 68 AqlBD-03 4906 194939144468 W 202310.7-034117202824.9-032128 41.36-23.05 6.13 -0.06 -0.18 B9V +0.023-0.015 -009V 7.7 9.8 -7822 11Rho CapBD-18 5689 194943163614 13887 202309.4-180839202851.6-174849 26.80-29.27 4.78 +0.38 +0.04 +0.19 F2IV -0.014-0.021 +.047+018V 91 1.7 249.5AD 5* -7823 BD+33 3910 194951 70044 202313.4+335958202707.7+341944 73.86-02.34 6.39 +0.48 +0.45 F1II -0.006-0.003 -014 23 -7824 BD+02 4175 194953125843 202314.3+023622202816.8+025613 47.24-19.95 6.21 +0.90 +0.57 G8III +0.049-0.002 -022 -7825 BD-22 5442 1950061893453639I 202339.3-224323202931.3-222330 21.90-31.01 6.16 +1.55 +1.99 M1III +0.011-0.031 +056 -7826 40 CygBD+37 3941 195050 70056 202351.9+380642202734.3+382625 77.26-00.02 5.62 +0.06 +0.06 A3V -0.023-0.070 +.021+000V 133 -7827 BD+56 2421 195066 32590 13870 202358.5+561832202623.5+563820 92.13 10.59 6.36 0.00 0.00 B9V +0.014+0.010 -021SB 165 2.0 26.6 * -7828 43 CygBD+48 3128 195068 49643 202358.9+490306202702.3+492300 86.14 6.40 5.69 +0.26 +0.04 dF0 +0.071+0.060 +.012-020V? * -7829 12Omi CapBD-19 5830 195093163625 13902B 202408.6-185502202952.5-183512 26.07-29.78 6.74 +0.22 +0.04 A7V +0.020-0.089 -016 144 0.8 21.9 * -7830 12Omi CapBD-19 5831 195094163626 13902A 202409.9-185451202953.9-183500 26.08-29.78 5.94 +0.08 +0.30 A3Vn +0.026-0.082 -012 301 0.8 21.9 * -7831 69 AqlBD-03 4918 1951351444951533I 202425.4-031305202939.0-025308 41.97-23.10 4.91 +1.15 +1.22 +0.56 K2III +0.073-0.021 +.021-023V -7832 CD-2917122 195206189374 202449.4-292651203056.8-290645 14.42-33.29 6.39 +0.21 A5V +0.015+0.003 -020 -7833 BD+19 4423 195217106156 202452.6+194516202921.1+200516 62.41-10.94 6.55 +0.23 +0.10 +0.09 A3m -0.025-0.002 +004 -7834 41 CygBD+29 4057 195295 700951534I 13111 202518.5+300205202923.7+302207 70.91-05.04 4.01 +0.40 +0.27 +0.23 F5II +0.007 0.000 +.014-018V? 13 -7835 42 CygBD+35 4141 195324 700961535 202531.5+360715202920.4+362717 75.85-01.47 5.88 +0.52 +0.10 A1Ib +0.004-0.001 -018 -7836 1 DelBD+10 4303 195325106172 13920 13114 202530.6+103339203018.0+105345 54.66-16.21 6.08 -0.03 -0.11 A1eShell +0.021+0.003 -.000-016V? 320 1.8 0.9AB 3* -7837 BD-15 5696 195330163645 W 202528.2-152326203104.3-150323 29.94-28.71 6.12 +0.79 +0.42 gG5+F -0.041-0.056 +030V? 0.0 0.1 * -7838 CP-70 2792 195402254820 202556.6-695701203551.7-693640325.19-34.32 6.11 +1.29 +1.41 K2III +0.029-0.061 -005 -7839 BD+20 4602 195479 88783 W 202629.7+201605203058.1+203621 63.06-10.95 6.18 +0.15 +0.14 +0.04 A1m +0.093+0.045 -040 15 4.0 11.8AB 3 -7840 BD+10 4307 195483106196 13946 202626.5+105527203113.0+111538 55.10-16.21 7.11 +0.03 -0.39 B8V 0.000-0.003 -011 91 0.3 16.7AxBC 4* -7841 BD+45 3196 195506 49704 202641.2+453519202959.9+455543 83.60 3.99 6.41 +1.13 +1.07 K2III +0.071+0.154 +.007-031 -7842 CD-2514854 195549189416 202655.1-251653203252.4-245638 19.33-32.54 6.36 -0.01 A0 +0.010-0.041 -011 -7843 BD+55 2411 195554 326273640 W 13115 202657.2+554357202927.1+560405 91.89 9.92 5.91 -0.04 -0.24 B9Vne +0.002+0.005 -022 250 2.5 0.8 * -7844 45Ome1CygBD+48 3142 195556 497123641 13932 202657.6+483655203003.5+485706 86.07 5.74 4.95 -0.09 -0.63 -0.11 B2.5IV +0.013+0.008 -022SB? 184 7.0 56.3AC 3* -7845 BD-10 5423 1955641636651536 13960 202655.4-101141203223.7-095112 35.45-26.86 5.65 +0.69 +0.21 G2.5IV +0.308+0.104 +.033+009V? 4.2 103.2AC 3* -7846 Nu MicCD-4414020 1955692302763643 202702.8-445118203355.1-443058356.00-36.45 5.11 +1.01 +0.80 K0III +0.011-0.043 +.007+009 -7847 44 CygBD+36 4105 195593 70135 13949 202711.2+363556203059.2+365609 76.44-01.45 6.19 +1.01 +0.74 +0.69 F5Iab +0.003-0.004 -022 3.4 2.0AB 4* -7848 Phi1PavCP-61 6492 195627254823 202718.0-605506203534.8-603454336.04-36.09 4.76 +0.28 +0.05 F1III +0.068-0.182 +.026-020 121 * -7849 BD+25 4272 195692 88808 13964 202741.4+252801203158.2+254816 67.51-08.15 6.34 +0.26 +0.08 +0.13 Am +0.032-0.033D+.009-018 50 1.8 0.4 * -7850 2The CepBD+62 1821 195725 18897 767 202754.2+623929202934.9+625939 97.76 13.80 4.22 +0.20 +0.16 +0.09 A7III +0.044-0.013 +.038-007SB2O 59 * -7851 46Ome2CygBD+48 3154 195774 49741 I W 13128 202813.6+485258203118.8+491313 86.41 5.73 5.44 +1.55 +1.92 M2IIIab +0.012-0.028 -064V? 4.7 56.8 * -7852 2Eps DelBD+10 4321 195810106230 768 13137 202826.1+105748203312.8+111812 55.42-16.59 4.03 -0.13 -0.47 -0.11 B6III +0.013-0.022 +.025-019V 50 * -7853 CD-3814108 195814212246 202824.8-382554203455.5-380523 3.94-35.94 6.44 +0.26 A8III: +0.018-0.005 +021 -7854 BD+51 2882 195820 32649 202829.7+515808203121.1+521835 88.94 7.53 6.18 +1.01 K0III +0.036+0.068 -010 -7855 BD-14 5781 1958381636863645 202837.7-140353203411.7-134316 31.68-28.88 6.13 +0.54 -0.02 F6V +0.069+0.070 -043 -7856 CD-3018013 195843212249 202837.4-304855203447.4-302825 13.08-34.44 6.40 -0.08 B8V +0.018-0.020 +003V? -7857 BD+09 4579 195922125960 202904.6+094303203353.6+100335 54.42-17.41 6.56 +0.08 +0.05 A2Vnn -0.007+0.007 -013 -7858 3Eta DelBD+12 4378 195943106248 13147 202913.2+124104203357.0+130138 57.02-15.80 5.38 +0.07 +0.05 +0.02 A3IV s +0.072+0.026 +.010-025V 70 -7859 Rho PavCP-61 6495 1959612548353647 Rho Pav 202912.4-615224203735.3-613148334.83-36.18 4.88 +0.43 +0.19 F5Del Del +0.057-0.072 +.003+008 =< 49 * -7860 BD+56 2444 195964 32667 I 202919.8+562624203146.5+564648 92.67 10.06 6.14 +1.43 gK5 -0.018-0.007 -015V -7861 BD+42 3778 195986 497723644 202923.4+425101203252.3+431130 81.69 1.96 6.60 -0.11 -0.56 B4III +0.007+0.001 -017SBO * -7862 BD+20 4629 196035 88846 202942.5+203833203410.0+205907 63.81-11.35 6.48 -0.14 -0.66 B3IV +0.015-0.002 +003 -7863 Mu 1OctCP-76 1434 1960512578383650 202942.0-763150204202.9-761050317.51-32.78 6.00 +0.44 +0.11 +0.25C F4III-IV +0.180-0.006 -036 -7864 Mu 2OctCP-75 1644 196067257836 W 202949.8-754147204143.7-752102318.45-33.05 6.55 +0.62 +0.25 G5III +0.141-0.150 -013 0.6 17.0 * -7865 BD-17 6027 196078163712 202952.7-165210203532.2-163133 28.86-30.27 6.19 +0.20 +0.10 A7V +0.083-0.021 -001 90 -7866 47 CygBD+34 4079 196093 70203 I W 203000.7+345430203354.2+351503 75.43-02.93 4.61 +1.60 +0.78 +0.99 K2Ib+B3V +0.002-0.006 +.002-004SBO =< 50 5.6 117.6AC 3* -7867 BD+41 3805 196134 49796 203014.6+412554203348.4+414620 80.66 0.98 6.49 +1.00 +0.78 K0III-IV -0.015-0.081 +001 -7868 BD+72 957 196142 97931538 203026.5+721134203000.7+723154106.17 18.88 6.27 +1.35 +1.54 gK4 -0.003-0.022 -043V? -7869 Alp IndCD-4713477 196171230300 769 W 203032.1-473824203734.0-471729352.57-37.21 3.11 +1.00 +0.79 +0.36E K0IIICNIII-IV +0.053+0.066 +.046-001 8.8 66. AB 3 -7870 BD+46 2977 196178 49804 W 203038.3+462102203354.9+464138 84.62 3.89 5.78 -0.16 -0.53 B9pSi +0.011-0.001 -022 55 4.1 117.7 -7871 4Zet DelBD+14 4353 196180106274 13163 203037.9+141945203518.5+144027 58.63-15.16 4.68 +0.11 +0.11 +0.05 A3V +0.046+0.013 +.015-025V 119 -7872 CP-63 4602 196317254844 203118.9-631519203951.4-625428333.09-36.20 6.22 +1.10 K1III +0.012-0.078 +018V -7873 70 AqlBD-03 4961 1963211446243648I 203131.2-025347203643.6-023300 43.21-24.49 4.89 +1.60 +1.95 K5II +0.013-0.011 +.016-010 -7874 26 VulBD+25 4299 196362 88884 203151.1+253208203608.3+255257 68.13-08.87 6.41 +0.21 +0.16 A5III +0.019+0.011 -019SBO =< 15 * -7875 Phi2PavCP-60 7419 196378254846 203145.7-605300204002.6-603256335.98-36.63 5.12 +0.53 +0.01 F8V +0.307-0.570 +.048-032 0 -7876 BD+51 2895 196379 327093646 203155.6+513032203450.4+515115 88.89 6.83 6.11 +0.41 +0.42 A9II -0.003-0.005 -013 34 -7877 CD-2514920 196385189503 203155.0-252726203752.1-250632 19.54-33.67 6.36 +0.33 F0III +0.064-0.001 -026 30 -7878 BD-00 4056 196426144632 203210.8-001503203718.3+000549 45.81-23.32 6.22 -0.08 -0.39 B8IIIp 0.000-0.018 -023 5 -7879 73 DraBD+74 872 196502 9802 770 AF Dra 203249.8+743643203130.4+745717108.43 20.04 5.20 +0.07 +0.11 A0pSrCrEu v+0.005-0.015 +.012+009SB1 6 * -7880 27 VulBD+25 4302 196504 889033649 203248.6+260650203704.7+262743 68.73-08.70 5.59 -0.07 -0.22 B9V +0.017-0.012 -022SB 300 -7881 Ups PavCP-67 3754 196519254854 13208 203246.7-670647204157.1-664539328.39-35.58 5.15 -0.06 -0.28 B9III +0.009-0.025 +007V * -7882 6Bet DelBD+14 4369 196524106316 I 14073 203251.5+141450203733.0+143543 58.88-15.65 3.63 +0.44 +0.08 +0.24 F5IV +0.113-0.033 +.028-023SB1O 54 1.0 0.6AB 5* -7883 5Iot DelBD+10 4339 196544106322 203302.0+110143203749.1+112240 56.13-17.50 5.43 +0.06 +0.04 +0.02 A2V +0.040-0.007 +.024-004SBO 48 * -7884 71 AqlBD-01 4016 196574144649 I 14081 13187 203310.4-012717203820.3-010619 44.81-24.14 4.32 +0.95 +0.69 +0.46 G7.5IIIa +0.015-0.022 +.010-006SB1O < 19: 7.5 32.2 * -7885 48 CygBD+31 4159 196606 70287 W 203327.8+311323203731.8+313421 72.92-05.73 6.32 -0.09 -0.40 B8IIIn +0.010 0.000 -019V? 80 0.1 180.8AB 3* -7886 BD+17 4370 196610106329 I EU Del 203321.0+175500203754.6+181609 62.05-13.63 6.25 +1.48 +1.00 +2.48 M6III +0.019+0.099 -066V? * -7887 BD+31 4160 196629 70289 W 203328.9+311024203732.6+313119 72.89-05.76 6.49 +0.34 -0.03 F0V -0.045-0.033 +001V 154 0.1 180.8AB 3* -7888 BD+37 4002 196642 70288 203337.8+375850203723.6+381943 78.31-01.64 6.20 +0.99 +0.81 K0III +0.010-0.043 -037 -7889 14Tau CapBD-15 5743 196662163771 14099 203340.9-151820203916.4-145717 30.94-30.50 5.22 -0.12 B6III +0.007-0.022D+.005-005SB 151 0.6 0.3AB 4* -7890 BD-02 5328 196712144666 203401.1-024553203913.2-022446 43.67-24.97 6.22 -0.10 -0.42 B7IIIne v+0.006+0.009 -014SB2 250 * -7891 29 VulBD+20 4658 196724 889441539 203403.3+205100203831.3+211204 64.59-12.05 4.82 -0.02 -0.08 -0.04 A0V +0.071+0.005 +.002-018V 54 -7892 8The DelBD+12 4411 196725106342 I 203400.7+125750203843.9+131854 57.95-16.61 5.72 +1.53 +1.73 +0.75 K3Ib -0.001-0.004 -014V? -7893 CD-3315119 1967372123331540 203403.5-334708204019.8-332555 9.85-36.23 5.47 +1.12 +1.08 K1III +0.024+0.036 +014V? -7894 28 VulBD+23 4084 196740 88945 203410.5+234554203831.9+240658 67.00-10.35 5.04 -0.14 -0.53 B5IV +0.010-0.002 -022V? 330 -7895 BD+23 4085 196753 88946 203412.6+231946203835.1+234050 66.65-10.61 5.91 +0.98 K0II-III+A3V +0.015-0.007 +009SB =< 50 * -7896 7Kap DelBD+09 4600 196755126059 772 14101 203416.3+094402203907.8+100510 55.18-18.47 5.05 +0.72 +0.21 G2IV +0.321+0.023 +.026-052V < 19: 4.8 203.6AC 3* -7897 1 AqrBD-00 4064 1967581260623651I 14108 203417.4+000805203924.9+002911 46.47-23.58 5.16 +1.06 +0.97 K1III +0.101-0.015 +.010-043V < 19: 7.1 59.7AB 3* -7898 CD-2416193 196761189549 203414.7-240822204011.7-234626 21.25-33.77 6.37 +0.72 +0.23 +0.26E G8V +0.491+0.464 +.070-045V -7899 BD+15 4220 196775106347 14106 203426.6+152912203905.0+155017 60.16-15.25 5.97 -0.14 -0.70? B3V +0.001-0.017 +002 5.6 22.5AC 5* -7900 15Ups CapBD-18 5738 196777163779 773I 203421.5-182927204003.0-180819 27.57-31.87 5.10 +1.66 +1.99 +0.89E M2III -0.022-0.021 +.019-013 * -7901 75 DraBD+80 659 196787 34083963 W 203431.5+810450202814.6+812522114.41 23.36 5.46 +1.02 +0.84 G9III +0.033+0.015 +.012-006V? 1.3 197.7AC 3 -7902 CD-2714959 196815189559 203436.1-265953204036.0-263842 17.97-34.70 6.51 +0.57 F7V +0.033-0.017 -006SB2 -7903 BD+21 4305 196821 88959 13201 203444.1+212753203910.6+214902 65.20-11.82 6.08 -0.06 -0.08 A0III +0.019+0.014 -037SB? 20 -7904 BD+29 4121 196852 70323 203452.5+295902203859.5+302004 72.12-06.72 5.68 +1.09 +0.99 K2III -0.032-0.058 +.013+013 -7905 BD-16 5663 196857163783 203455.4-162848204032.5-160727 29.82-31.23 5.80 +1.00 +0.74 gG7 -0.067+0.071 -004 -7906 9Alp DelBD+15 4222 196867106357 774 14121 13207 203459.5+153333203938.3+155443 60.30-15.32 3.77 -0.06 -0.21 -0.04 B9IV +0.066-0.002 +.008-003SB 162 7.5 43.4AC 6* -7907 BD+10 4351 196885106360 W 203504.2+105338203951.8+111459 56.31-17.99 6.42 +0.55 +0.03 F8IV: +0.060+0.088 -028 =< 15 4.0 191.9 -7908 74 DraBD+80 660 196925 3413 W 203515.0+804430202927.5+810529114.11 23.16 5.96 +0.92 +0.60 K0III+F8V +0.064+0.222 +.022-014SB 3.2 209.0AB 3* -7909 CD-3216130 1969172123453652I 203511.6-315705204123.7-313554 12.13-36.07 5.76 +1.53 +1.85 M0III +0.113-0.065 +.023-097 -7910 CD-2615192 196947189575 203526.1-262115204124.1-260000 18.79-34.69 6.28 +1.22 K2III -0.002-0.029 -026 -7911 BD+40 4266 197018 49899 14126 203553.7+401333203933.3+403446 80.35-00.61 6.06 -0.16 -0.54 B6IIIpMn +0.007 0.000D+.003-015V? 0.1 0.8AB 4* -7912 BD+45 3233 197036 49898 203600.7+451848203923.1+454001 84.37 2.52 6.58 -0.06 -0.55 B5IV +0.005+0.001 -015V -7913 Bet PavCP-66 3501 197051254862 775 203557.0-663345204457.5-661211328.96-36.01 3.42 +0.16 +0.12 A7III -0.046+0.012 +.035+010 86 * -7914 BD+19 4484 197076106373 W 203613.8+193418204045.2+195607 63.85-13.22 6.45 +0.63 +0.09 +0.34 G5V +0.122+0.304 +.050-037V? 5 5.1 93.7 * -7915 CD-4013994 197093212369 203620.1-395457204253.0-393331 2.37-37.67 6.29 +1.08 K1III +0.024-0.006 -007 -7916 BD+55 2444 197101 32763 203624.9+553909203900.2+560018 92.63 8.80 6.48R F2Vn -0.005-0.035 -001 120 * -7917 BD+29 4131 197120 88997 14149 203627.2+292657204036.2+294819 71.90-07.32 6.08R +0.14 +0.15 A2V +0.008+0.036D+.010-030SB 110 4.5 0.9 * -7918 10 DelBD+14 4393 197121106384 13227 203635.2+141337204116.2+143459 59.40-16.40 5.99 +1.24 gK4 -0.006+0.002 -032 -7919 BD+42 3818 197139 49912 203633.4+430621204003.1+432731 82.69 1.08 5.95 +1.19 K2III -0.070-0.063 -019 -7920 Eta IndCP-5211752 197157246709 776 203641.9-521641204402.3-515516346.69-38.16 4.51 +0.27 +0.09 A7III-IV-A9 v+0.158-0.058 +.049-002 122 -7921 49 CygBD+31 4181 197177 70362 14158 203659.6+315705204102.6+321826 73.96-05.88 5.51 +0.88 G8IIb +0.007-0.014D+.004-029SB2 2.3 2.5AB 3* -7922 BD+38 4187 197226 703673653 W 203715.7+384334204100.4+390456 79.34-01.74 6.51 -0.12 -0.49 B6III +0.007 0.000 -015SBO 100 3.3 48.3 * -7923 BD+17 4382 197249106396 203722.6+170947204158.2+173117 62.00-14.85 6.22 +0.94 +0.57 G8III +0.022+0.044 -002 -7924 50Alp CygBD+44 3541 197345 49941 777I 14172 Alp Cyg 203801.3+445522204125.9+451649 84.28 2.00 1.25 +0.09 -0.24 +0.10 A2Ia t+0.003+0.002 -.006-005SBO 21 10.0 75.4 * -7925 BD+59 2272 197373 189793654 203810.4+600837204017.9+603019 96.41 11.33 6.01 +0.46 -0.06 F6IV +0.015+0.190 +.021-013 30 -7926 BD+41 3856 197392 499463655 203819.7+412131204156.5+414301 81.53-00.26 5.67 -0.12 -0.45 B8II-III +0.006 0.000 -027SB 25 -7927 BD+34 4127 197419 70406 V568 Cyg 203827.2+350552204222.2+352722 76.64-04.18 6.66 -0.16 -0.68 B2IV-Ve -0.019-0.009 -007V 115 * -7928 11Del DelBD+14 4403 197461106425 778 Del Del 203847.4+144257204327.5+150428 60.14-16.55 4.43 +0.32 +0.10 +0.17 A7IIIpDel Del -0.019-0.043 +.013+009SB 41 * -7929 51 CygBD+49 3353 197511 32809 14189 203907.6+495851204212.6+502024 88.37 4.99 5.39 -0.10 -0.63 B2V +0.003+0.005 -003V? 40 6.0 3.0AB 5* -7930 BD+83 588 197508 3418 203905.2+831645202903.1+833732116.56 24.35 6.19 +0.13? A3/4Vm +0.025-0.017 +010SB 38 -7931 CD-2715014 197540189641 203913.0-273634204513.2-271450 17.60-35.85 6.50 +0.94 G8III +0.008+0.006 -003V -7932 BD+35 4234 197572 70423 I X Cyg 203929.2+351338204324.2+353516 76.87-04.26 6.47 +1.23 +0.99 +0.64 F7Ib-G8Ib v-0.010-0.003 -.008+010SB 22 * -7933 CD-3913960 1976302124163658 203949.1-393344204620.1-391157 2.91-38.29 5.50 -0.10 B8/9V +0.049-0.030 -030 -7934 Sig PavCP-69 3138 1976352548713660 203950.3-690830204918.1-684635325.77-35.70 5.41 +1.12 +1.10 +0.32E K0III -0.069-0.049 -.000+019 * -7935 CD-3614396 197649212417 203956.5-362857204618.6-360713 6.79-37.90 6.49 +0.39 F3IV +0.044-0.055 -014SBO * -7936 16Psi CapCD-2515018 197692189664 779 204010.5-253749204605.7-251615 20.01-35.50 4.14 +0.43 +0.02 +0.20 F4V -0.050-0.157 +.098+026V 37 -7937 17 CapBD-22 5523 1977251896673659 204022.2-215239204610.0-213051 24.38-34.37 5.93 +0.04 +0.10 A0 +0.024-0.021 +018 -7938 BD+60 2154 197734 18998 204031.6+601427204239.7+603605 96.66 11.16 6.15 +0.01 +0.05 A2IV -0.003-0.014 -007 55 -7939 30 VulBD+24 4229 197752 890843657I 204032.8+245446204452.5+251614 68.82-10.81 4.91 +1.18 +1.18 +0.58 K2III -0.028-0.182 +.006+031SB < 17 * -7940 BD+56 2477 197770 32832 204042.4+564509204313.5+570651 93.88 9.00 6.32 +0.33 -0.48 B2III -0.013+0.003 -015SB -7941 BD+17 4401 197812106458 I U Del 204053.4+174335204528.2+180525 62.98-15.20 6.38 +1.68 +1.24 M5II-III +0.002+0.005 -021 * -7942 52 CygBD+30 4167 197912 70467 I 14259 204132.0+302116204539.7+304311 73.30-07.63 4.22 +1.05 +0.89 +0.53 G9.5III -0.010+0.028 +.015-001 < 17 5.0 6.1 * -7943 Iot MicCD-4414145 1979372303791542 W 204142.4-442111204829.2-435919356.83-39.02 5.11 +0.35 +0.06 F1IV +0.185-0.106 +.051-015V? 84 10.4 4.3 -7944 BD+55 2462 197939 32849 I 204146.3+560729204422.0+562917 93.47 8.50 5.78 +1.67 +1.86 M3III +0.006-0.015 -028V? -7945 4 CepBD+66 1318 197950 190043656 204156.1+661738204311.0+663927101.72 14.68 5.58 +0.22 +0.05 A8V +0.021+0.032 +.034-011 159 -7946 BD-03 5018 197954144802 I 204151.6-025109204703.6-022912 44.66-26.72 6.27 +1.55 +1.97 K2 -0.016-0.016 +028V -7947 12Gam1DelBD+15 4255 197963106475 14279B 204200.3+154549204638.7+160728 61.49-16.57 5.14 +0.49 +0.08 F7V -0.030-0.191 +.026-007V? =< 25 1.0 9.8 * -7948 12Gam2DelBD+15 4255 1979641064761541I 14279A 204201.1+154550204639.5+160727 61.50-16.58 4.27 +1.04 +0.97 +0.48 K1IV -0.032-0.197 +.026-007V? 0 1.0 9.8 * -7949 53Eps CygBD+33 4018 197989 70474 780I 14274 204209.8+333544204612.7+335813 75.94-05.71 2.46 +1.03 +0.87 +0.54 K0-III +0.356+0.328 +.057-011SB? < 17 9.3 54.9AB 3* -7950 2Eps AqrBD-10 5506 198001144810 781 204215.8-095143204740.6-092945 37.68-30.10 3.77 0.00 +0.02 0.00 A1V +0.035-0.034 +.021-016V? 98 * -7951 3 AqrBD-05 5378 1980261448141543I EN Aqr 204227.7-052338204744.2-050140 42.24-28.09 4.42 +1.65 +1.92 +1.31 M3III +0.003-0.040 +.008-022V? * -7952 Zet IndCD-4613718 1980482303913661 204236.0-463548204929.0-461337353.95-39.24 4.89 +1.52 +1.87 +0.64E K5III +0.040+0.024 +.012-005 -7953 13 DelBD+05 4613 198069126222 14293 13299 204251.1+053827204748.3+060030 52.78-22.50 5.58 -0.02 -0.09 A0V +0.010-0.006 +.002-007 202 3.6 1.4 * -7954 BD+02 4250 198070126221 204245.7+025619204747.8+031824 50.29-23.93 6.40 -0.02 -0.09 A0Vn +0.031+0.021 -021 142 -7955 BD+57 2240 198084 32862 782 W 204252.1+571315204521.1+573447 94.43 9.06 4.51 +0.54 +0.10 +0.28 F8IV-V -0.064-0.236 +.046-031SB2 0 5.7 66.4 * -7956 BD+33 4028 198134 70499 I 14290 T Cyg 204311.2+340023204710.8+342227 76.39-05.62 4.92 +1.32 +1.47 K3III +0.047+0.004 +.005-023V? < 19: 6.5 9.9AB 3* -7957 3Eta CepBD+61 2050 198149 19019 783I 14276 204315.3+612701204517.4+615020 97.86 11.64 3.43 +0.92 +0.62 +0.49 K0IV +0.087+0.818 +.071-087 < 17 8.2 51.7 * -7958 BD+45 3270 198151 50050 W 204316.7+460954204638.5+463154 85.83 2.06 6.30 +0.03 +0.04 A3V -0.024-0.013 -006V? 125 1.9 0.5 -7959 CP-62 6180 198160254883 W A 204317.6-624759205138.3-622545333.32-37.62 6.28 +0.15 +0.08 A2-3IV-V +0.076-0.047D+.009-016 0.2 2.4 * -7960 CP-62 6180 198161254884 W B 204318.1-624759205138.8-622545333.32-37.62 6.59 +0.17 +0.06 A2-3IV-V +0.078-0.043D+.009-010 0.2 2.4 * -7961 CD-2615282 198174189733 204321.4-260901204917.6-254653 19.65-36.34 5.86 -0.07 -0.46 B7IIIp +0.015-0.021 -012 -7962 BD+52 2799 198181 328771544 204327.2+523752204621.2+525943 90.87 6.12 6.33 +1.12 K0 -0.081-0.103 +.008-029 -7963 54Lam CygBD+35 4267 198183 70505 14296 204330.7+360723204724.5+362927 78.08-04.34 4.53 -0.11 -0.49 -0.11 B5Ve +0.009-0.005 +.008-023SB? 155 1.3 0.9AB 3* -7964 BD-18 5783 1982081639103663I W 204340.2-182418204920.5-180209 28.63-33.89 6.21 +1.42 K3III +0.002-0.030 +044V? 6.5 31.6 -7965 Alp MicCD-3414660 198232212472 W 13329 204343.4-340859204958.1-334647 9.88-38.26 4.90 +1.00 +0.73 G7III +0.010-0.025 +.012-015 5.0 20.5 -7966 BD+45 3275 198237 50060 I 14298 204354.9+451244204720.8+453447 85.16 1.37 6.40 +1.61 +2.02 K3III +0.005-0.025 -006 6.3 12.9 -7967 BD+69 1127 198236 19018 204356.7+692313204433.1+694507104.41 16.37 6.41R G8III -0.026-0.027 +.002-009 -7968 Iot IndCP-5211782 198308246762 204416.4-515850205130.1-513630346.98-39.34 5.05 +1.13 +1.05 K1II-III +0.007-0.014 +.001+021 -7969 BD+47 3188 198345 500733662I 14318 204431.7+472747204749.3+474955 86.97 2.72 5.57 +1.46 +1.78 K5III -0.006-0.015 -030SB 9.0 18.3 -7970 CD-3216236 198356212487 I 204437.1-322530205047.1-320316 12.08-38.12 6.36 +1.54 +1.81 K5III -0.016-0.061 -004 -7971 CD-3814250 198357212488 204435.5-381707205100.7-375448 4.68-39.06 5.52 +1.38 +1.63? K3II -0.011-0.022 +017SB -7972 BD+51 2954 198387 32897 14322 204453.6+520232204752.8+522426 90.55 5.58 6.27 +0.89 +0.55 G7IV +0.068-0.158 +.018-041V 5.2 12.2 * -7973 15 DelBD+12 4472 198390106536 W 204451.8+121016204937.8+123243 58.86-19.23 5.98 +0.43 -0.11 F5V +0.057+0.098 +.030+002 =< 10 5.2 108.0AC 4 -7974 14 DelBD+07 4556 1983911262653664 13337 204454.1+072933204948.3+075151 54.75-21.90 6.33 +0.02 -0.02 A1V s +0.032+0.011 -030SBO 32 * -7975 BD+05 4626 198404126267 W 204500.8+051022204959.1+053241 52.67-23.20 6.21 +0.98 +0.79 K0 +0.040+0.006 -022 2.5 79.9 -7976 BD-13 5773 1984311639243665 204511.1-125455205041.8-123242 34.83-32.07 5.88 +1.07 +0.94 gK1 +0.126-0.070 +.021-044SB -7977 55 CygBD+45 3291 198478 50099 14337 V1661 Cyg204531.8+454435204856.3+460651 85.75 1.49 4.84 +0.41 -0.45 +0.31 B3Ia e+0.004 0.000 +.017-007V 35 6.3 21.3 * -7978 BD+51 2957 198513 32908 14336 204541.5+513221204842.7+515438 90.24 5.17 6.29 -0.07 -0.56 B8Vnp +0.006+0.007 -025V? 100 2.3 4.0 * -7979 Bet MicCD-3315245 198529212499 204546.1-333307205158.8-331038 10.73-38.57 6.04 +0.03 A2Vn +0.015+0.014 -012V? -7980 18Ome CapCD-2715082 1985421897811546I 13351 204551.3-271736205149.3-265509 18.46-37.18 4.11 +1.64 +1.93 +0.94 M0-III-IIIbBa0.2 -0.006-0.001 +.001+009V * -7981 BD+17 4431 198552106562 204601.0+174040205037.0+180305 63.70-16.21 6.52R +0.04 0.00 A1V s +0.076+0.016 +013 53 -7982 4 AqrBD-06 5604 198571144877 14360 13350 204607.6-060002205125.7-053735 42.13-29.18 5.99 +0.46 +0.03 F5V+F7V +0.099-0.001 +.028-025 0.9 1.1AB 4* -7983 BD+46 3067 198625 50119 14350 204631.7+461718204954.7+463940 86.28 1.71 6.33 -0.07 -0.57 B4Ve +0.008 0.000 -015 5.3 19.2 * -7984 56 CygBD+43 3739 198639 501213666 W 204631.7+434057205004.9+440334 84.29 0.03 5.04 +0.20 +0.12 +0.09 A4mDel Del +0.126+0.133 +.025-021V? 90 6.0 75.5 * -7985 5 AqrBD-06 5606 198667144889 13360 204651.4-055256205208.7-053025 42.35-29.28 5.55 -0.08 -0.27 B9III +0.002 0.000 -.009-002V 50 -7986 Bet IndCP-58 7788 198700246784 785 W 204659.8-584953205448.6-582715338.16-38.85 3.65 +1.25 +1.23 K1II +0.017-0.026 -.005-005V? 8.8 17.3 -7987 CD-4014078 198716212522 204709.8-401103205340.2-394836 2.30-39.76 5.35 +1.32 K2III +0.044-0.102 +.020+020 -7988 BD+27 3890 198726 89216 I T Vul 204713.4+275232205128.2+281502 72.13-10.15 5.77 +0.72 +0.40 +0.38 F5Ib +0.003-0.003 +.006-001SB * -7989 CD-2416328 198732189801 14380 204709.3-240928205301.2-234659 22.33-36.58 6.33 +0.88 +0.56 K0III +0.099-0.053 -040 2.1 1.8 * -7990 6Mu AqrBD-09 5598 1987431448951547 S 204715.6-092131205239.2-085900 38.84-30.98 4.73 +0.32 +0.11 +0.17 A3m +0.044-0.030 +.019-009SBO 46 * -7991 CD-3117917 198751212521 204718.4-310543205325.0-304307 13.89-38.40 6.35 +1.09 K1III +0.036-0.008 -007V? -7992 CD-5112748 198766246786 204726.7-510618205435.0-504340348.07-39.89 6.24 -0.12 B5IV +0.002-0.036 -004 * -7993 BD+63 1663 198781 190513667 204732.0+634009204917.4+640232 99.94 12.61 6.45 +0.07 -0.77 B0.5V -0.006-0.004 -027 -7994 BD-12 5854 198802163953 S 204737.4-115706205305.6-113425 36.15-32.20 6.38 +0.67 +0.14 G1V +0.050+0.046 -001V 0.2 -7995 31 VulBD+26 4017 198809 89228 I 13373 204750.8+264321205207.7+270549 71.31-10.98 4.59 +0.83 +0.47 +0.46 G7IIIFe-1 -0.067-0.065 +.036+001SB < 19: -7996 BD+32 3974 198820 70596 204756.1+322823205200.3+325057 75.83-07.36 6.44 -0.15 -0.62 B3III -0.009+0.006 -018V? -7997 CD-2816975 198853189815 I 204806.8-281811205406.8-275532 17.39-37.93 6.41 +1.60 +1.90 M4III +0.027-0.025 +025V? -7998 BD-07 5433 198949144915 204838.6-071603205358.4-065323 41.19-30.33 6.44 +0.37 0.00 F1IV +0.033-0.027 -008 67 -7999 BD+29 4221 198976 89241 204855.4+291622205307.4+293858 73.47-09.56 6.34 +1.09 K2 -0.001-0.047 -010 -8000 19 CapBD-18 5805 199012163975 I 204908.8-181808205447.9-175523 29.33-35.06 5.78 +1.12 +1.00 K0III -0.051-0.020 -039V -8001 57 CygBD+43 3755 199081 50180 13388 204942.5+440031205314.8+442314 84.90-00.19 4.78 -0.14 -0.58 -0.13 B5V +0.010+0.001 -020SB2O 69 * -8002 76 DraBD+81 718 199095 3458 915 13319 204950.5+820940204235.2+823152115.73 23.46 5.75 0.00 -0.04 A0V +0.029+0.023 -020SB 27 -8003 BD+44 3617 199098 50182 13391 204948.9+444810205318.6+451055 85.52 0.31 5.45 +1.10 +0.93 K0II +0.014+0.003 -.005-024SB -8004 BD+41 3922 199099 50183 204947.7+420153205326.4+422437 83.41-01.49 6.66 -0.04 +0.01 A1V +0.011+0.002 -007 98 -8005 BD+32 3980 199101 706453668I W 204950.7+330327205353.9+332616 76.54-07.29 5.47 +1.52 gK5 -0.021+0.038 -010V 4.0 187.7 -8006 BD-01 4075 199124144941 EM Aqr 204958.1-014516205508.1-012224 46.88-27.92 6.55 +0.29 +0.06 A9Vn -0.002+0.020 -009 173 * -8007 BD+27 3909 199140 89265 BW Vul 205007.6+280831205422.4+283119 72.75-10.48 6.56 -0.13 -0.90 B2IIIe v+0.007-0.010 -006V 26 * -8008 32 VulBD+27 3911 199169 89272 786I 13398 205017.8+274038205433.6+280327 72.41-10.80 5.01 +1.48 +1.79 K4III 0.000-0.002 +.003+008V? < 17 -8009 BD+40 4354 199218 50209 14413 205038.1+401920205422.3+404211 82.21-02.72 6.70 -0.07 -0.41 B8Vnne +0.010+0.003 -022V? 350 3.9 5.8 * -8010 BD+03 4461 199223126373 14430 205040.2+040902205540.7+043158 52.58-24.94 6.05 +0.82 +0.49 G6III-IV +0.070+0.010 -.012-031V 1.4 2.1 * -8011 17 DelBD+13 4572 1992531066653669I 13408 205052.6+132024205536.7+134317 60.77-19.74 5.17 +1.12 +0.96 K0III +0.021-0.014 +.017-010 < 19: -8012 16 DelBD+12 4501 199254106666 14429 205052.2+121110205538.6+123407 59.78-20.42 5.58R +0.12 +0.07 A4V +0.040+0.018 +002SB 135 6.5 36.0 * -8013 CD-2615344 199260189856 13412 205050.8-264039205647.3-261747 19.59-38.09 5.70 +0.50 -0.04 F7V +0.093-0.065 +.039-016 -8014 BD-04 5307 199280144957 205104.3-035640205618.3-033341 44.88-29.25 6.57 -0.10 -0.29 B8Vn +0.027+0.018 -029V? -8015 7 AqrBD-10 5553 199345144968 I 14449 13419 205129.8-100451205654.0-094151 38.63-32.24 5.51 +1.47 +1.71 gK5 -0.003-0.010 -033V? 3.5 176.6AC 3* -8016 BD+80 672 199437 3467 I 13369 205207.9+801038204733.4+803308114.01 22.27 5.39 +1.12 +1.06 K1III -0.031-0.037 +.011-026 -8017 BD-00 4132 199442126396 14457 205203.5+000452205710.6+002749 48.95-27.42 6.05 +1.22 +1.36 K2III +0.018-0.065 -026V? 5.4 26.2AB 3* -8018 BD-16 5741 1994431640131548 205204.8-162459205740.6-160154 31.78-35.00 5.87 +0.18 +0.12 +0.06 A2m +0.053+0.001 -001V 76 * -8019 CP-68 3398 199475254918 205218.9-683553210128.1-681235325.99-36.94 6.37 +0.10 +0.11 A2V -0.010-0.002 +009 -8020 BD+46 3111 199478 50246 205227.1+470203205549.8+472504 87.51 1.42 5.67 +0.47 -0.33 +0.39 B8Ia t-0.003-0.002 -015V * -8021 Alp OctCP-77 1474 199532257879 787 205236.4-772418210443.0-770126315.96-33.65 5.15 +0.49 +0.13 A7III+G2III +0.006-0.369 +.025+045SB2O 57 * -8022 BD+50 3232 199578 33001 205304.2+504126205612.9+510430 90.34 3.73 6.63 -0.10 -0.50 B5V +0.017+0.004 -018 -8023 BD+44 3639 199579 50263 I 205303.1+443224205634.7+445530 85.70-00.30 5.96 +0.05 -0.85 O6V((f)) -0.005+0.008 -006SBO 170 * -8024 BD-15 5848 199603164027 DV Aqr 205309.6-145210205841.9-142858 33.64-34.63 6.01 +0.23 +0.11 F0IV -0.042-0.002 +010SBO * -8025 BD+50 3233 199611 330043670 14460 205315.0+502040205625.5+504343 90.10 3.49 5.81 +0.30 +0.04 F0III +0.041-0.015 -015SB 109 7.7 7.2 * -8026 BD+48 3249 199612 50262 205309.5+484840205625.9+491145 88.93 2.49 5.90 +1.04 +0.92 G8II-III +0.009+0.007 +.004-015V -8027 CD-5112778 1996232468203673 205314.7-513926210021.5-511555347.25-40.75 5.76 +0.47 -0.06 F5IV-V -0.084+0.130 -023 -8028 58Nu CygBD+40 4364 199629 50274 788 205326.6+404655205710.4+411002 82.91-02.82 3.94 +0.02 0.00 0.00 A1Vn +0.012-0.016 +.010-028SB 241 -8029 BD+56 2515 199661 330053671 205336.5+563009205617.0+565315 94.82 7.47 6.23 -0.18 -0.70 B2.5IV +0.004+0.002 -019 * -8030 18 DelBD+10 4425 199665106712 W 205336.9+102712205825.9+105021 58.69-21.98 5.48 +0.93 gG6 -0.051-0.036 +000V 4.6 198.2AB 3 -8031 CD-3614530 1996842126083674 205341.0-363059205959.7-360747 7.25-40.63 6.11 +0.39 -0.03 F5V +0.106-0.061 +016 -8032 33 VulBD+21 4424 199697 893321549I 205348.0+215621205816.4+221933 68.36-15.04 5.31 +1.40 +0.74 K3.5III -0.003-0.003 -028 -8033 20 CapBD-19 5982 199728164043 AO Cap 205355.2-192522205936.1-190207 28.54-36.52 6.25 -0.13 B9pSi +0.011-0.013 -010 * -8034 1Eps EquBD+03 4473 199766126428 14499AB 205404.6+035436205904.4+041737 52.87-25.78 5.23 +0.46 +0.02 +0.28 F6IV -0.109-0.148 +.021+018SB1O 54 0.3 1.0AB 4* -8035 BD+43 3777 199870 50298 205444.6+440455205819.5+442818 85.55-00.83 5.55 +0.97 +0.83 K0IIIbFe-0.5 +0.106+0.072 +.016-023SBO * -8036 BD+41 3949 199892 50303 205449.0+413307205830.8+415625 83.66-02.51 6.16 -0.08 -0.46 B7III -0.001+0.013 -033SBO 25 * -8037 BD+16 4425 199941106738 W 205511.6+162606205950.8+164927 64.05-18.71 6.66 +0.38 -0.13 F4III +0.041-0.014 +002 40 2.7 70.7 -8038 BD+06 4718 199942126447 W 205508.5+070734210003.9+073059 55.97-24.20 5.99 +0.26 +0.09 F1Vp +0.029+0.020D+.009-020V 145 1.1 0.2 * -8039 Gam MicCD-3216353 1999512126361550I W 205509.5-323855210117.5-321528 12.34-40.34 4.67 +0.89 +0.54 +0.32E G6III -0.002+0.005 +.034+018 9.0 25.7 * -8040 BD+49 3426 199955 33034 14504 205517.8+500425205830.1+502744 90.11 3.06 5.61 -0.15 -0.51 B5Vn +0.013+0.010 +.008-021V 0.9 1.8AB 3* -8041 11 AqrBD-05 5433 199960145022 789 205517.9-050700210033.8-044349 44.30-30.75 6.21 +0.63 +0.24 G1V +0.051-0.137 +.033-017V? =< 10 -8042 CD-4314325 200011230492 I'W 205535.5-432327210212.6-430007358.19-41.49 6.64 +0.68 +0.17 G3IV+K0IV +0.060-0.103 +.018-031 0.3 57.5 * -8043 BD+75 764 200039 99113672 205555.1+753219205444.3+755532110.14 19.35 6.05 +0.93 G5III +0.029+0.043 -025 -8044 BD+18 4675 2000441067473675I W 13454 205553.4+185626210027.7+191946 66.23-17.29 5.65 +1.61 M3IIIab -0.016-0.063 +.010-015V? 3.9 46.6 -8045 CD-2715197 200052189942 205549.2-271619210145.3-265252 19.22-39.32 6.05 +0.06 A7V:m: +0.015-0.023 -004 * -8046 CD-3914079 200073212653 205602.4-385508210227.2-383150 4.15-41.35 5.94 +1.11 K0IV +0.163-0.158 +.018+039V -8047 59 CygBD+46 3133 200120 503351551 14526 V832 Cyg 205625.4+470750205949.6+473116 88.03 0.97 4.74 -0.05 -0.94 -0.01 B1ne v+0.006+0.002 +001SB 374 4.4 20.1AB 4* -8048 Zet MicCD-3914089 200163212666 790 205634.6-390119210258.0-383754 4.03-41.46 5.30 +0.41 F3V -0.028-0.111 +.024+005V? 47 -8049 BD+58 2201 200205 330483676I 205657.4+590251205925.4+592619 97.06 8.79 5.51 +1.40 +1.64 gK4 +0.044+0.015 +.002-017V -8050 CD-2817077 200245189966 14565 205712.4-280729210310.2-274355 18.25-39.83 6.25 +0.95 +0.74 K0III +0.035-0.044 -030 0.6 0.1 * -8051 BD+35 4357 200253 707943677 205713.9+353802210112.9+360134 79.51-06.77 5.97 +0.98 G5III -0.005-0.005 -010SB -8052 CP-76 1473 200266257887 205715.3-763640210847.9-761245316.70-34.23 6.58 +1.23 +1.18 K1III -0.027-0.022 +037 -8053 60 CygBD+45 3364 200310 50359 14549 V1931 Cyg205741.4+454547210110.9+460921 87.15-00.10 5.37 -0.21 -0.93 B1Ve v+0.006+0.008 -012SB 320 4.5 2.6 * -8054 BD-01 4095 200340145050 205750.3-011909210259.6-005529 48.45-29.38 6.50 -0.10 -0.49 B6V +0.007-0.002 -012V -8055 Mu IndCP-55 9509 2003652468543680 205753.0-550721210514.2-544338342.58-40.96 5.16 +1.21 +1.22 K2III +0.010-0.046 +.023+012 -8056 BD+00 4648 200375126491 14573 205758.6+010819210303.0+013155 50.85-28.11 6.25 +0.48 +0.01 F5V -0.116-0.053 +.035+007 0.5 1.3AB 3* -8057 BD+14 4518 200430106796 I 205818.6+142006210301.8+144348 62.77-20.58 6.31 +1.67 +2.04 M1III +0.021+0.005 -039 -8058 12 AqrBD-06 5664 200496145064 14592 205847.3-061312210404.6-054924 43.66-32.04 7.31H A3V +0.003+0.012D+.003-005 1.9 2.7 3* -8059 12 AqrBD-06 5664 200497145065 14592 205847.3-061309210404.7-054923 43.66-32.04 5.89H +0.68 +0.41 G4III +0.018-0.009D+.003+001V 1.9 2.7 3* -8060 22Eta CapBD-20 6115 200499189986 W 205842.9-201501210424.3-195118 28.05-37.86 4.84 +0.17 +0.09 +0.07 A5V -0.034-0.037 +.055+024V 71 1.3 0.3 -8061 CP-73 2192 200525257890 W 205854.1-733352210922.3-731023320.01-35.61 5.68 +0.59 +0.10 F8-G0V +0.432-0.331 +.048-011 0.0 0.1AB 3* -8062 BD+44 3679 200527 50381 I 205849.7+442347210224.1+444728 86.27-01.17 6.19 +1.69 +1.84 +1.56 S4/1III -0.014+0.003 +001 * -8063 BD+38 4325 200577 70832 205911.9+381543210304.8+383927 81.75-05.32 6.07 +1.01 +0.79 G8III +0.016-0.008 -003V? -8064 BD+45 3374 200595 50390 14585 205917.4+452712210248.5+455056 87.11-00.52 6.48 -0.15 -0.55 B3Vn -0.005-0.001 +.009-012SB 0.0 0.2AB 5* -8065 BD+56 2524 200614 33078 14575 205923.6+561629210209.1+564011 95.18 6.72 5.83 -0.07 -0.34 B8III +0.016+0.004D+.004-021 60 0.6 1.6 * -8066 3 EquBD+04 4606 200644126518 I W 205935.8+050620210434.7+053010 54.83-26.26 5.61 +1.65 +2.02 K5III +0.017-0.002 +.011-016 6.9 81.7 * -8067 BD+02 4297 200661126519 205938.7+023240210441.7+025631 52.45-27.69 6.42 +1.05 +0.89 K0 +0.013+0.001 -010 -8068 BD+01 4418 2006631265223681 205940.7+015227210445.4+021611 51.82-28.07 6.33 +0.97 +0.62 G5 +0.098-0.065 -012 -8069 Eta MicCD-4114379 2007022305233684 W 205955.2-414705210625.5-412310 0.37-42.25 5.53 +1.35 +1.52 K3III +0.026-0.016 +011 2.8 132.9AC 3 -8070 Del MicCD-3018382 2007182127093683 205958.9-303120210601.2-300730 15.35-40.95 5.68 +1.03 K0/1III +0.041-0.068 +022V? -8071 BD+41 3987 200723 50409 W 210007.4+411357210352.1+413741 84.08-03.47 6.33 +0.38 +0.13 F3IV +0.001-0.054 -008V 75 2.3 57.3AB 3* -8072 BD+49 3448 200740 33091 210010.3+495714210326.0+502107 90.55 2.40 6.37 +0.98 +0.76 K0 +0.058+0.053 -022 * -8073 CP-64 4094 200751254941 210014.2-641948210832.9-635544330.81-39.04 5.76 +1.18 +1.15 K0III +0.007-0.011 -020 -8074 BD+46 3159 200753 50408 210015.7+462804210343.3+465143 87.97 0.04 6.32 +0.25 F0IVn -0.055-0.110 -015SB2 190 -8075 23The CapBD-17 6174 2007611641321552 210019.6-173749210556.8-171358 31.31-37.29 4.07 -0.01 +0.01 -0.02 A1V +0.083-0.060 +.017-011SB 123 * -8076 CD-3216398 200763212716 I 210017.9-324429210624.7-322030 12.47-41.42 5.18 +1.10 K2III -0.001+0.010 +.012+003 -8077 4 EquBD+05 4697 200790126535 W 210029.3+053347210526.7+055730 55.39-26.18 5.94 +0.54 +0.06 F8V -0.090-0.129 +.015-022V? =< 6 6.4 34.9 * -8078 BD+52 2859 200817 330983682 210044.3+525315210347.6+531710 92.78 4.30 5.90 +0.99 K0III +0.040+0.037 -016V -8079 62Xi CygBD+43 3800 200905 50424 792I 13518 210117.5+433144210455.9+435540 85.93-02.08 3.72 +1.65 +1.83 +0.90 K4.5Ib-II e+0.008+0.001 +.007-020SB < 17 * -8080 24 CapCD-2515235 200914190025 791I 14632 210116.8-252420210707.7-250021 21.98-40.01 4.50 +1.61 +1.93 +0.98 M0.5III -0.023-0.043 +.022+032V 7.1 26.2 -8081 CP-73 2195 200924257893 210116.8-725653211120.7-723239320.62-36.02 6.20 +1.08 +1.03 K1III +0.026-0.022 -015V? -8082 BD+26 4073 201051 894593686 210202.4+263126210623.5+265528 73.23-13.55 6.12 +1.05 +0.62 K0II-III +0.044-0.017 -006 -8083 BD-18 5862 201057164156 13549 210207.6-175124210744.6-172719 31.25-37.77 6.17 +0.02? A0V +0.018-0.027 -021V? 130 -8084 BD+30 4318 201078 709173687I DT Cyg 210218.4+304701210630.3+311105 76.55-10.78 5.82 +0.56 +0.32 F7.5Ib-II v+0.007-0.004 +000V 9 * -8085 61 CygBD+38 4343 201091 70919 793 14636A V1803 Cyg210224.8+381531210654.6+384445 82.25-05.81 5.21 +1.18 +1.11 +0.65 K5V +4.136+3.203 +.292-064V < 17 0.8 28.7AB 6* -8086 61 CygBD+38 4344 201092 I: 14636B 13546 210226.3+381510210655.3+384436 82.25-05.81 6.03 +1.37 +1.23 +0.83 K7V +4.126+3.208 +.294-064V? =< 25 0.8 28.7AB 6* -8087 25Chi CapBD-21 5933 2011841900503690 W 210250.0-213544210833.6-211137 26.84-39.21 5.30 +0.01 -0.03 A0V +0.022-0.060 +.046-007V? 199: 5.7 67.0AB 4 -8088 BD+15 4340 2011961068533689 210251.4+151528210733.6+153931 64.27-20.89 6.34 +1.01 +0.78 K2IV +0.049-0.059 -034 -8089 63 CygBD+47 3292 201251 504563688I 14649 13548 210309.3+471447210636.1+473854 88.88 0.20 4.55 +1.57 +1.75 +0.82 K4Ib-IIa +0.008+0.001 +.008-026V 8.3 15.7 -8090 BD+06 4754 2012981265663692I 210331.7+063507210828.2+065922 56.80-26.22 6.15 +1.66 +1.98 K5III -0.006+0.003 +020 -8091 27 CapBD-21 5940 201352190069 13566 210350.0-205729210933.0-203323 27.71-39.23 6.25 +0.38 F1IV +0.120-0.124 -043V? -8092 Omi PavCP-70 2835 2013712578961554 210358.0-703202211320.5-700735323.27-37.19 5.02 +1.58 +1.56 +0.90E M1-2III +0.040-0.025 +.008-019SB1 * -8093 13Nu AqrBD-11 5538 201381164182 794I 210408.8-114636210935.7-112218 38.45-35.77 4.51 +0.94 +0.70 +0.46 G8III +0.095-0.015 +.017-012 < 17 -8094 BD+29 4324 201433 70968 14682 V389 Cyg 210424.3+294805210838.9+301221 76.11-11.77 5.59 -0.10 -0.26 B9VpSi +0.025-0.017 -.006-026SBO 10 2.3 3.4AB 4* -8095 BD+02 4311 201507126587 210455.0+023212210958.3+025636 53.26-28.80 6.45 +0.37 +0.06 F5IV +0.040+0.017 -044 -8096 BD-09 5674 201567145171 210523.4-094535211046.9-092114 40.83-35.15 6.27 +1.16 +1.21 K0III +0.114-0.056 -040 -8097 5Gam EquBD+09 4732 2016011265931555 14702ABGam Equ 210528.7+094343211020.5+100754 59.93-24.76 4.69 +0.26 +0.10 +0.11 F0IIIp v+0.057-0.153 +.028-017V 8 1.2 352.5AD 4* -8098 6 EquBD+09 4735 201616126597 14702D 210539.7+093828211031.2+100256 59.89-24.85 6.07 +0.02 +0.04 A2V s -0.009+0.015 +.010+007 60 1.2 352.5AD 4 -8099 BD+70 1164 201636 99573693 210547.5+710151210623.3+712555106.95 15.95 5.87 +0.40 0.00 F3IV -0.048-0.116 +.030+002 60 -8100 CD-4014216 201647230575 210548.4-404020211213.6-401610 1.93-43.33 5.83 +0.45 +0.01 F5IV +0.047-0.222 +.042+011V? -8101 BD+21 4486 201671 89505 14710A 210601.7+220250211032.0+222717 70.33-17.15 6.68 +0.03 -0.06 A1V +0.020-0.008 -012SB 86 1.0 18.0 * -8102 BD-15 5908 201707164204 EW Aqr 210609.9-145252211141.3-142820 35.19-37.52 6.48 +0.28 +0.14 F0Del Del: +0.039+0.004 -039V? 120 * -8103 BD+44 3718 201733 50521 Var? 210623.2+450542210958.6+453009 87.70-01.68 6.63 -0.16 -0.66 B4IVpe +0.004-0.001 +009 * -8104 CD-3914152 201772212793 210639.2-394955211303.1-392531 3.10-43.46 5.26 +0.44 F5IV+F6V +0.186-0.123 +.029-044SB2 0 -8105 BD+35 4426 201819 71032 14724 Var 210702.5+355326211103.9+361757 81.05-08.08 6.54 -0.14 -0.92 B1Vp +0.021-0.015 -006 5.7 21.5 * -8106 BD+52 2880 201834 33185 210710.0+530917211015.6+533348 93.64 3.78 5.73 -0.12 -0.45 B9III +0.026+0.001 -021SB -8107 BD+47 3322 201836 50536 14720 210702.6+471702211031.0+474131 89.36-00.25 6.46 -0.01 -0.35 B6IV e+0.004-0.007 -009 120 0.8 136.1AC 6* -8108 CD-3614676 201852212800 210704.2-365004211318.9-362526 7.22-43.34 5.96 +0.98 +0.74 K0III +0.029-0.013 +000 -8109 BD+62 1903 201888 19223 210720.5+625315210928.9+631744100.81 10.41 6.54 -0.13 -0.48 B7III +0.013+0.005 -024 -8110 CD-2817178 2019011901291556I 210721.6-280138211317.3-273710 19.06-41.98 5.42 +1.42 +1.69 K5III +0.099-0.116 -042V -8111 CP-75 1697 2019062579043697 210722.5-754540211816.1-752048317.29-35.15 6.63 +0.03 0.00 A1V +0.013-0.035 +016 -8112 BD+77 800 201908 9959 795 210730.2+774315210529.3+780735112.40 20.19 5.91 -0.07 -0.24 B8Vn +0.020+0.029 -016SB 210 * -8113 BD+67 1291 202012 19229 I T Cep 210813.1+680500210932.0+682925104.81 13.84 7.33 +1.49 +0.33 M7IIIe v-0.032-0.067 +.002-012V * -8114 CP-5310015 202103246929 796 W 210837.4-534037211545.9-531547344.11-42.76 5.75 +0.19 A6IV +0.035-0.017 -013SB 103 0.1 0.2 * -8115 64Zet CygBD+29 4348 202109 71070 797I W 210840.7+294900211256.2+301337 76.75-12.45 3.20 +0.99 +0.76 +0.48 G8+III-IIIaBa0.6 +0.001-0.056 +.027+017SB < 17 7.9 91.2AC 4* -8116 BD+15 4375 202128106930 14761 210846.5+153414211328.8+155857 65.49-21.80 6.27 +0.24 +0.09 A7Vn +0.043-0.023 -.005-030V 0.1 0.2 * -8117 CD-4114440 202135230596 210849.1-405512211514.7-403023 1.61-43.90 6.21 +1.14 +1.10 K2III +0.139-0.009 -042 -8118 BD-11 5553 202149164240 210852.1-110107211416.7-103619 39.92-36.48 6.77 -0.08 -0.31 B9pHgMn +0.014+0.004 -004 35 -8119 BD+59 2334 202214 33210 14749 13598 210915.4+593431211148.2+595911 98.52 7.99 5.64 +0.11 -0.77 B0II 0.000-0.005D+.002-016 46 1.0 1.0AB 5* -8120 BD+36 4470 202240 71086 210925.2+361314211326.3+363801 81.63-08.20 6.05 +0.21 +0.21 F0III -0.018+0.006 -013 23 -8121 BD-00 4186 202259145229 I 13614 210929.2-001917211437.0+000532 51.22-31.32 6.38 +1.61 +1.92 M1III +0.028-0.009 -124V * -8122 BD-17 6216 202261164249 210930.9-174532211506.6-172042 32.19-39.37 6.04 +0.96 +0.68 G5 -0.004-0.020 +004V? -8123 7Del EquBD+09 4746 202275126643 14773 210936.6+093606211428.9+100025 60.50-25.65 4.49 +0.50 -0.01 +0.28 F5V+G0V +0.049-0.305 +.058-015SB2O 10 0.3 0.2AB 3* -8124 CD-3614699 2022872128433696 210933.3-363732211546.8-361239 7.57-43.81 6.12 +1.37 K3III +0.032-0.009 -016 -8125 CP-65 3900 202299254966 13627 210943.7-650551211800.3-644054329.44-39.74 6.31 -0.07 -0.22 B8V +0.006-0.037 +013 -8126 BD+29 4354 202314 89549 210953.8+292914211410.3+295404 76.69-12.87 6.17 +1.09 +0.81 G6Ib-IIaCa1Ba0.3 +0.001+0.005 -005 -8127 28Phi CapBD-21 5974 202320190173 I 210956.4-210400211537.9-203906 28.19-40.61 5.24 +1.17 +1.11 gG9 +0.013+0.002 +.020-005V -8128 29 CapBD-15 5935 202369164263 I 13620 211012.8-153514211544.9-151017 34.86-38.69 5.28 +1.64 +1.90 +1.08E M3III +0.027+0.005 -.000-038V * -8129 CP-85 519 202418258899 13686 211033.0-851417213204.2-844836307.53-30.40 6.45 +1.40 +1.66 K3III +0.045-0.027 +015 * -8130 65Tau CygBD+37 4240 202444 71121 I 14787 Tau Cyg 211047.9+373706211447.5+380244 82.85-07.43 3.72 +0.39 +0.02 +0.24 F2IV +0.160+0.435 +.055-021SB 89 2.5 1.0AB 7* -8131 8Alp EquBD+04 4635 202447126662 800I W 211049.5+045004211549.4+051452 56.38-28.71 3.92 +0.53 +0.29 +0.35 G0III+A5V +0.059-0.088 +.021-016SBO =< 50 0.1 * -8132 BD-02 5495 202554145259 211129.1-020129211639.6-013628 49.84-32.65 6.48 +0.98 +0.81 K0 +0.036-0.014 -026 -8133 BD+63 1708 202582 19257 14783 211139.1+635931211342.6+642414101.97 10.81 6.39 +0.60 +0.06 G2IV+G2IV +0.027-0.105D+.024+030V 0.2 0.6 * -8134 BD-13 5897 202606164279 211145.0-134148211713.5-131644 37.26-38.27 6.40 +0.04 A2V -0.022-0.002 -001V? -8135 Eps MicCD-3216498 202627212874 801 211152.5-323525211756.3-321021 13.20-43.80 4.71 +0.06 +0.02 A1V +0.058-0.026 +.033-001V 127 -8136 BD+47 3348 202654 50631 211207.4+473326211536.8+475825 90.16-00.68 6.46 -0.15 -0.66 B4IV -0.042-0.023 -026SB * -8137 30 CapBD-18 5903 202671164286 D 211220.8-182415211757.3-175907 31.73-40.23 5.43 -0.12 -0.50 B8III +0.017-0.002 -011V? 35 0.0 0.1 * -8138 BD+41 4067 202720 50656 211241.8+415003211629.6+421505 86.14-04.76 6.43R K2 +0.003-0.028 +008 -8139 31 CapBD-18 5904 202723164289 211240.0-175254211815.7-172744 32.40-40.11 7.05 +0.34 F2V +0.036+0.004 -007 -8140 The IndCP-5310037 202730246965 W 211244.4-535206211952.0-532659343.69-43.32 4.39 +0.19 +0.12 A5V +0.105-0.072 +.043-015 178 2.4 6.1 * -8141 15 AqrBD-05 5512 2027531452783698 211256.3-045622211811.1-043110 47.08-34.47 5.82 -0.13 -0.51 B5V +0.011+0.015 +.008-009 * -8142 CD-2917692 202773190220 211259.8-291103211854.4-284556 17.89-43.43 6.40 +0.97 G8IV -0.181-0.058 +038 -8143 67Sig CygBD+38 4431 202850 711651558 13640 211329.2+385832211725.0+392341 84.19-06.87 4.23 +0.12 -0.39 +0.14 B9Iab v+0.001-0.003 +.011-004SB 28 * -8144 BD+42 4046 202862 50671 211336.2+421551211723.2+424100 86.57-04.58 6.19 -0.11 -0.43 B7Vn +0.015-0.008 -020 -8145 CD-4514302 202874230635 T Ind 211334.0-452637212009.5-450120355.26-44.65 6.00 +2.33 +3.75 C5II 0.000-0.010 +002 * -8146 66Ups CygBD+34 4371 202904 711731559 14831 Ups Cyg 211348.3+342837211755.1+345349 80.98-10.05 4.43 -0.11 -0.82 -0.08 B2Vne +0.014-0.002 +.019+004SB? 261 6.4 15.3AB 3* -8147 BD+53 2588 202923 33281 211354.3+533438211702.0+535951 94.64 3.35 6.13 +0.05 +0.06 A1V +0.031+0.033 -008V? 68 -8148 CD-2615541 202940190236 14847 211358.8-264553211945.8-262111 21.19-43.11 6.56 +0.73 +0.23 +0.26E G5V -0.539-0.357 +.056-030SBO 3.0 2.5AB 5* -8149 BD+10 4516 2029511070203700I 211401.4+104655211852.0+111212 62.27-25.79 5.96 +1.65 K5III +0.026+0.015 -037 * -8150 BD+55 2549 202987 332873699I 211414.8+552240211714.3+554753 95.96 4.58 5.98 +1.45 +1.62 K3III +0.018+0.017 -019V -8151 The1MicCD-4114475 203006230644 802 The1 Mic 211421.9-411356212045.6-404835 1.19-44.95 4.82 +0.02 -0.07 +0.04 ApCrEuSr +0.069-0.005 +.012+002V? 48 * -8152 CD-5013325 203010246983 13662 211425.1-502125212116.4-495616348.40-44.22 6.38 +1.32 +1.59 K3III -0.021-0.151 +022 -8153 BD+57 2309 203025 33288 14832 13646 211434.0+581129211718.8+583642 98.00 6.53 6.42 +0.20 -0.50 B2IIIe +0.001+0.003 -017SBO 175 5.6 4.1AB 3* -8154 68 CygBD+43 3877 203064 506903701I V1809 Cyg211443.4+433130211827.2+435645 87.61-03.84 5.00 -0.01 -0.94 O7.5III:n((f)) e+0.006-0.009 +001SB 328 * -8155 BD+40 4485 203096 50699 14849 211503.3+403708211855.3+410227 85.59-05.93 6.15 +0.30? A5IV -0.006+0.009 +007 25 6.4 56. AC 3 -8156 CP-70 2844 203133254990 Y Pav 211513.4-700936212416.7-694403323.20-38.20 6.41 +2.82 +3.40 C5II +0.005-0.018 +001V * -8157 BD+37 4271 203156 71203 14859 V1334 Cyg211522.8+374855211922.2+381415 83.62-07.95 5.83 +0.50 +0.16 F1II +0.011-0.006 +008SB 28 0.0 0.1 * -8158 BD+21 4521 203206 89628 211541.4+213610212014.0+220135 71.53-19.13 6.29 -0.08 -0.49 B6IV +0.003+0.010 -017 70 -8159 CP-72 2598 203212257920 W 211546.4-721336212518.1-714758320.84-37.31 6.09 +1.26 +1.41 K2III +0.018-0.007 +011 5.9 44.6 -8160 16 AqrBD-05 5524 203222145317 211549.7-045904212104.3-043336 47.47-35.11 5.87 +0.92 +0.64 gG7 -0.012+0.011 +.014-006 -8161 BD+48 3345 203245 507133702 211602.2+490514211928.8+493037 91.70-00.06 5.76 -0.15 -0.48 B6V +0.017+0.002 +.001-023SB -8162 5Alp CepBD+61 2111 203280 19302 803I 14858 13660 211611.5+620943211834.8+623508101.00 9.17 2.44 +0.22 +0.11 +0.11 A7V +0.151+0.049 +.068-010V 246 9.1 206.8AB 4* -8163 9 EquBD+06 4802 203291126719 I 211608.0+065550212104.8+072116 59.19-28.55 5.82 +1.66 +1.97 M2IIIa +0.041-0.019 -020 -8164 BD+58 2249 203338 33318 I 14864 211629.5+581201211915.8+583725 98.18 6.36 5.66 +1.38 +0.07 +1.33 M1Ibep+B2pe+B3V v+0.005-0.001 +.004-021SB =< 50 3.8 4.6AB 4* -8165 BD+23 4294 203344 896403704 211633.1+232605212104.4+235121 73.10-18.06 5.57 +1.05 +0.91 K1III +0.243-0.120 -.005-089V? * -8166 BD+31 4425 203358 71230 14889 211636.8+320145212050.1+322710 79.60-12.18 5.68 +1.08 +0.93 G8IV +0.053-0.033D+.018-029V? 0.4 2.1AB 3* -8167 32Iot CapBD-17 6245 2033871643461561I 211640.7-171538212214.8-165004 33.62-40.77 4.28 +0.90 +0.58 +0.48 G7IIIFe-1.5 +0.033+0.004 +.033+012V? < 17 -8168 BD+76 833 203399 10007 I 211647.8+763529211542.2+770044111.85 19.06 5.95 +1.50 K5III +0.013+0.010 +015 -8169 BD+32 4134 203439 71237 211709.1+321116212122.0+323646 79.80-12.15 6.04 +0.03 +0.10 A1V +0.018-0.011 +.007-003SBO 50 * -8170 BD+39 4529 203454 50739 211706.9+395534212101.4+402044 85.37-06.70 6.40 +0.53 -0.01 +0.34 F8V -0.019-0.207 +.034+001SBO 12 * -8171 6 CepBD+64 1527 203467 193133703 Var 211717.7+642652211922.2+645219102.74 10.69 5.18 -0.04 -0.58 B3IVe +0.006+0.004 -.015-018SB 148 * -8172 CD-2316877 203475190285 I 211716.6-230545212300.5-224008 26.31-42.85 5.60 +1.63 +2.04 M1III +0.037+0.010 -007V? -8173 1 PegBD+19 4691 203504107073 804I 14909 211727.6+192236212205.2+194816 70.05-20.92 4.08 +1.11 +1.06 +0.54 K1III +0.106+0.064 +.014-076SB < 17 4.9 36.2AB 3* -8174 BD+80 690 203501 35343964 211730.7+804841211321.5+811351115.25 21.83 6.15 +0.09 +0.09 A3IV -0.009 0.000 -001 -8175 17 AqrBD-09 5728 2035251453513705I 211734.6-094444212256.3-091910 42.56-37.81 5.99 +1.54 +1.89 M0III -0.025-0.026 +018V -8176 CP-83 716 2035322589023995 211736.8-830707213354.4-824059309.46-31.74 6.38 +0.13 -0.36 B3IV +0.018 0.000 -005 -8177 CD-4713796 203548230665 211741.9-470233212420.8-463654352.92-45.21 6.31 +0.20 A7mSr: +0.042-0.022 -024 * -8178 10Bet EquBD+06 4811 203562126749 14920 211755.8+062301212253.6+064840 59.00-29.23 5.16 +0.05 +0.07 A3V +0.056+0.010 +.028-011SB 78 6.5 89.2AE 5* -8179 BD+60 2227 203574 19333 211759.3+601954212033.5+604525 99.84 7.73 6.11 +1.00 +0.75 G5III -0.040-0.001 -027 -8180 The2MicCD-4114503 203585230667 W 211802.3-412607212424.8-410024 0.89-45.64 5.77 -0.05 -0.20 A0IIIpSi +0.031 0.000D+.006+011 0.6 0.5AB 3 -8181 Gam PavCP-65 3918 203608254999 805 13689 211810.8-654907212626.6-652158328.14-40.29 4.22 +0.49 -0.12 +0.30 F6V +0.079+0.799 +.111-030 8 -8182 BD+29 4397 203630 71259 211824.0+295256212241.9+301835 78.29-13.94 6.05 +1.08 +1.07 K1III +0.015+0.004 -025 -8183 33 CapBD-21 6007 2036381902953707I 13683 211829.4-211637212409.6-205107 28.78-42.56 5.41 +1.16 +1.10 +0.41E K0III -0.007-0.125 +.021+022V? * -8184 CD-2316889 203639190293 211824.5-231031212407.9-224449 26.31-43.12 6.38 +1.02 gK0 -0.028-0.003 +014V -8185 BD+48 3357 203644 50761 211831.9+485737212200.4+492320 91.90-00.44 5.69 +1.10 +1.02 K0III +0.034+0.067 +.011-002SB -8186 BD+38 4471 203696 71266 211847.3+381226212246.9+383803 84.38-08.15 6.63 +0.01 +0.02 A1V +0.004-0.024 -015 130 -8187 18 AqrBD-13 5923 2037051643641562 W 13684 211843.6-131826212411.5-125241 38.63-39.64 5.49 +0.29 F1V +0.091+0.008 +008V 120 7.5 48.9 -8188 Gam IndCP-55 9586 2037602470311563 13692 211907.5-550533212615.4-543938341.75-43.94 6.12 +0.34 +0.04 F1III +0.004+0.036 +007 -8189 BD+36 4537 203784 71276 W 211919.9+365838212323.0+372424 83.58-09.10 6.58 F6II-III +0.046+0.025 -027 0.0 365.4AB 5* -8190 BD+23 4300 203803 89678 W 211928.4+235040212358.8+241627 73.90-18.27 5.71 +0.32 +0.08 F1IV +0.136+0.022 +.027-018V 97 4.8 53.9 -8191 BD+09 4800 203842126774 211931.6+094438212424.6+101027 62.30-27.50 6.35 +0.47 +0.12 F5III +0.072+0.021 -033V? 84 * -8192 20 AqrBD-04 5444 203843145376 211938.9-034937212451.7-032354 49.29-35.33 6.36 +0.33 +0.13 F0III -0.006-0.053 -023 -8193 BD+36 4543 203857 71280 W 211945.5+365521212348.3+372105 83.60-09.20 6.47R K5 -0.009-0.007 -003 0.0 365.4AB 5* -8194 BD+24 4394 203858 89680 14943 211939.6+245257212407.4+251844 74.72-17.59 6.15 A2V +0.039 0.000 -019SBO 5.6 66.8AE 6* -8195 19 AqrBD-10 5668 203875145382 211950.6-101028212513.1-094455 42.40-38.50 5.70 +0.20 F0IV +0.024-0.171 +.007-021 -8196 CP-70 2850 2038812550033712 SX Pav 211948.6-695614212844.9-693019323.22-38.65 5.34 +1.55 +1.45 +1.51E M5III +0.075-0.047 +.023+043 * -8197 BD+23 4305 203886 89682 211953.8+240556212423.1+243144 74.16-18.17 6.32 +1.04 +0.94 K0III +0.033 0.000 -024 -8198 BD+25 4531 203925 89685 212007.5+254439212434.0+261028 75.46-17.08 5.68 +0.31 +0.07 A8III +0.048+0.002 +.013-003SB 53 * -8199 21 AqrBD-04 5446 2039261453843708I 212004.0-035908212517.0-033324 49.19-35.51 5.49 +1.46 +1.82 K4III -0.008-0.065 -024 -8200 CD-3814551 2039492129983710 212008.0-381539212622.9-374946 5.45-46.01 5.63 +1.19 +1.22 K2III +0.163-0.012 -076 -8201 CP-80 1017 203955258904 W 212010.2-802833213320.6-800221311.99-33.30 6.47 +0.04 +0.05 A0V +0.006-0.012 +021 4.8 24.4 -8202 CD-4314539 204018230692 W 212036.8-425851212701.6-423252358.65-46.06 5.51 +0.39 +0.15 +0.19 Am -0.049+0.017 +018V? 53 2.7 2.8 -8203 BD-00 4215 204041126789 212044.3+000608212551.5+003204 53.47-33.44 6.46 +0.16 +0.05 A1IV +0.040+0.013 -009 68 -8204 34Zet CapBD-2215388 204075190341 806I 14971 212057.5-225040212640.0-222441 26.98-43.59 3.74 +1.00 +0.59 +0.43 G4Ib +0.001+0.023 -.010+003SB < 19 8.6 21.3 * -8205 BD+00 4726 2041211267943711 212121.2+004031212628.1+010612 54.14-33.25 6.13 +0.44 +0.01 F5V +0.113-0.163 +.028+011V? 12 -8206 BD+48 3376 204131 50817 14962 V1934 Cyg212125.8+485331212455.5+491924 92.20-00.82 6.58 -0.03 0.00 B9pSi:Cr:Sr: -0.015-0.007 +001 5.9 20.3 -8207 35 CapBD-21 6020 204139190349 I 212134.7-213743212714.8-211146 28.63-43.36 5.78 +1.44 +1.74 +0.76 K5III -0.026-0.030 +023V * -8208 BD+46 3305 204153 50824 212139.2+461652212519.6+464252 90.42-02.73 5.60 +0.32 -0.01 F0V +0.195+0.048 +.039+001V -8209 69 CygBD+36 4557 204172 71329 14969 212141.7+361407212547.0+364003 83.39-09.96 5.94 -0.08 -0.94 B0Ib +0.006-0.005 +003 80 5.3 53.4AC 3* -8210 BD+18 4794 204188107138 IK Peg 212147.9+185632212626.7+192232 70.43-21.98 6.07 +0.22 +0.06 +0.12 A8m +0.081+0.014 -011SBO 83 * -8211 CP-54 9872 204228247043 212157.4-540825212900.3-534221342.89-44.57 6.39 +1.14 K2IIICNIb +0.081-0.025 +010 -8212 BD-12 6005 204363164415 212249.0-120008212813.9-113406 40.72-39.98 6.61 +0.49 F3V +0.009-0.048 +023V -8213 36 CapBD-22 5692 204381190374 I 212301.3-221434212843.4-214826 27.97-43.87 4.51 +0.91 +0.60 +0.46 G5III +0.138-0.006 +.023-022V * -8214 5 PsACD-3118291 204394213034 212305.3-314027212903.8-311419 14.98-46.02 6.50 +0.03 A0 +0.022-0.011 -000 -8215 70 CygBD+36 4568 204403 713583714 212316.6+364055212721.4+370700 83.94-09.86 5.31 -0.14 -0.64 B3V 0.000+0.002 -020SB 135 * -8216 BD+48 3390 204411 50867 13718 212318.5+482400212651.6+485006 92.09-01.39 5.31 +0.07 +0.16 A6pCrEu: +0.060+0.023 +.008-013V 9 * -8217 35 VulBD+26 4164 204414 897203715 212315.5+271023212740.1+273631 77.04-16.60 5.41 +0.04 +0.05 A1V +0.041+0.018 +.019-008V? 97 -8218 BD+52 2939 204428 33434 212327.0+522751212645.0+525355 94.89 1.55 6.03 -0.12 -0.46 B6V +0.017+0.008 +.018-030 -8219 BD+07 4696 2044451268181564I 13727 212329.0+074538212824.8+081144 61.21-29.49 6.40 +1.64 +1.90 +0.93E M1 +0.011-0.025 -006 * -8220 BD+31 4462 204485 713713716 212351.8+314715212808.3+321331 80.53-13.44 5.80 +0.32 +0.04 F0V +0.137+0.083 +.023-024 * -8221 BD+17 4592 204560107168 13738 212419.0+172809212859.9+175421 69.67-23.41 6.44 +1.39 +1.64 K5 -0.015-0.001 -012 -8222 BD-19 6107 204577164433 212422.9-193503212959.6-190852 31.58-43.31 6.57 +0.41 F0V +0.034-0.045 -012V? =< 15 -8223 BD+21 4555 204585 89737 I W 13740 212425.5+214432212859.9+221046 73.09-20.54 5.93 +1.53 +1.32 M4.5III-IIIa +0.045+0.011 -022 2.7 41.1AB 3 -8224 BD+59 2383 204599 334433717I 14998 13729 212439.5+591853212725.3+594500 99.73 6.42 6.10 +1.75 +1.72 M3IIIaBa0.2 -0.022-0.018 -016V? 4.7 11.2 * -8225 2 PegBD+23 4325 204724 897521565I 15027 212525.0+231202212956.9+233820 74.39-19.70 4.57 +1.62 +1.93 +1.09 M1+III +0.024+0.004 +.013-019V 8.1 29.8 -8226 BD+54 2544 204754 33458 I 13745 212544.0+545850212852.7+552507 96.86 3.16 6.12 +0.14 -0.28 B8III +0.014+0.011 -007V? 0 -8227 7 CepBD+66 1405 204770 194323718 212550.2+662222212746.1+664833104.76 11.43 5.44 -0.11 -0.42 B7V -0.014-0.019 +.006+003V 295 -8228 71 CygBD+45 3558 204771 50934 807 212545.5+460558212927.0+463226 90.81-03.35 5.24 +0.97 +0.80 +0.49 K0-III +0.045+0.104 +.023-019V? < 19: -8229 Xi GruCD-4114550 2047832307263719 212546.1-413712213205.9-411045 0.56-47.08 5.29 +1.10 +1.01 K0III +0.018+0.015 +.012-008 -8230 6 PsACD-3415110 2048542130781566 W 13762 212611.7-342307213214.6-335641 11.18-46.99 5.97 +0.05 A2IV v-0.001-0.004 +016 7.3 6.8 -8231 BD+11 4583 204862107195 212619.4+114153213109.6+120815 65.20-27.55 6.08 -0.05 -0.21 B9.5V +0.019-0.014 -010SB2 125 -8232 22Bet AqrBD-06 5770 204867145457 808I 15050 212617.7-060040213133.5-053416 48.02-37.88 2.91 +0.83 +0.56 +0.43 G0Ib +0.021-0.008 +.006+007V? 18 7.9 35.5AB 3* -8233 CP-5310092 204873247080 212622.4-531044213317.7-524415343.97-45.45 6.41 +1.48 K4III -0.005-0.009 +034 -8234 CP-79 1158 2049042579423723 212627.1-795316213856.2-792633312.39-33.86 6.18 +0.46 +0.02 F4IV +0.059-0.022 -006 -8235 CD-2515479 2049431904233720 212647.6-250155213233.3-243526 24.54-45.47 6.43 +0.20 A7V +0.073+0.007 -009 -8236 CD-4514367 2049602307371567 212654.8-451726213323.5-445055355.16-46.99 5.57 +1.04 +0.85 K1III -0.017-0.007 +011V -8237 BD+52 2957 204965 33477 212700.4+523104213020.4+525729 95.32 1.22 6.02 +0.08 +0.11 A2Vp +0.024+0.015 -017SB 65 * -8238 8Bet CepBD+69 1173 205021 10057 809 15032 Bet Cep 212722.2+700718212839.6+703339107.54 14.03 3.23 -0.22 -0.95 -0.22 B1IV v+0.010+0.007 +.014-008SBO 28 4.6 13.4AB 3* -8239 BD+79 707 205072 3568 212746.7+800520212449.7+803129114.98 21.03 5.97 +0.92 gG6 +0.044-0.016 +003 -8240 BD+22 4418 205087 89786 13774 212754.2+225709213227.1+232340 74.62-20.29 6.70 -0.09 -0.28 B9pSiSrCr +0.036+0.002 -016V? 25 -8241 CD-4314602 205096230741 212754.2-432205213417.0-425530357.95-47.36 6.32 +1.09 K1IIICNII -0.041-0.024 +009 -8242 BD+51 3079 205114 33497 212805.8+521042213127.5+523712 95.22 0.86 6.16 +0.90 +0.44 G2Ib+B9V +0.009+0.003 -023SBO =< 50 * -8243 BD+59 2395 205139 19466 212814.4+600106213059.3+602734100.55 6.62 5.53 +0.12 -0.73 B1II -0.002-0.001 -015V? 73 * -8244 CD-3018703 2052651904583721 212859.1-300825213453.0-294146 17.47-47.03 6.41 -0.11 B8III +0.017-0.017 -015V -8245 37 CapBD-20 6237 205289190461 212914.1-203148213451.0-200504 30.88-44.70 5.69 +0.40 -0.02 F1V -0.037+0.031 +006V? -8246 BD+49 3553 205314 51019 S 212924.5+493202213256.6+495840 93.59-01.24 5.75 -0.03 -0.11 A0V +0.020+0.015 -033SB 265 0.0 -8247 CD-2416729 205342190469 212932.8-235357213515.9-232715 26.34-45.78 6.40 +1.10 gG7 +0.077-0.008 -015V? -8248 BD+45 3584 205349 51027 I 13784 212933.0+452437213317.9+455115 90.83-04.31 6.25 +1.81 +2.03 K1Ib v-0.001+0.003 -005 * -8249 CP-65 3937 205417255040 213004.1-651618213802.9-644927328.10-41.63 6.20 +0.03 +0.05 A0-1IV +0.032-0.010 -009V? -8250 BD+22 4431 205420 89807 212959.8+221839213434.0+224517 74.48-21.08 6.47 +0.51 +0.03 F7V +0.014-0.041 +014 -8251 BD-04 5489 205423145510 213004.4-042544213517.6-035859 50.35-37.86 5.77 +1.11 +1.05 gG9 -0.005+0.001 +.001-002V? -8252 73Rho CygBD+44 3865 205435 510351568I 13787 213013.1+450859213358.9+453531 90.74-04.58 4.02 +0.89 +0.56 +0.50 G8IIIFe-0.5 -0.023-0.094 +.002+007 < 19: * -8253 8 PsACD-2615702 205471190478 W 213023.1-263703213611.0-261017 22.61-46.64 5.73 +0.22 A7/8IV +0.111-0.023 -019 8.2 18.4 * -8254 Nu OctCP-77 1510 205478257948 810 A 213021.7-775002214128.5-772324314.29-35.19 3.76 +1.00 +0.89 K0III +0.045-0.240 +.053+034SBO 0.1 * * -8255 72 CygBD+37 4359 205512 714803722I 213041.4+380508213446.6+383203 86.01-09.85 4.90 +1.08 +1.02 +0.54 K0.5III +0.124+0.099 +.012-066V? < 17 -8256 7 PsACD-3315664 205529213136 213048.5-332943213648.9-330253 12.63-47.85 6.11 +0.22 A7Vn +0.089-0.003 -002 -8257 BD+27 4107 205539 89815 S 213053.1+274508213519.0+281150 78.72-17.39 6.31 +0.35 -0.05 F0IV +0.128-0.043 -042SB2O 0.2 * -8258 BD+23 4346 205541 89819 15115 213055.5+240022213527.0+242708 75.94-20.05 6.11 A4V +0.011-0.011 +.002-028SB2 170 0.3 0.3 * -8259 BD+51 3091 205551 33540 213100.6+511510213427.5+514154 94.93-00.13 6.15 +0.02 -0.29 B9IIIe +0.007 0.000 -.006-022V 175 -8260 39Eps CapBD-20 6251 2056371645203724 W Eps Cap 213128.9-195451213704.8-192758 31.94-44.99 4.68 -0.17 -0.65 -0.12 B2.5Vpe v+0.015+0.003 -024SB? 293 1.3 0.0 3* -8261 BD+29 4456 205688 89834 15126 213152.5+293622213613.9+300320 80.23-16.20 6.36R G8III-IV -0.063+0.062 -020 4.4 2.1 -8262 BD+44 3877 205730 51079 I W Cyg 213214.3+445536213602.4+452229 90.86-04.98 5.53 +1.58 +1.24 +2.14 M5IIIae +0.051+0.006 -014V * -8263 BD-01 4180 205765145533 15142 213225.6-005020213733.8-002325 54.52-36.38 6.25 +0.06 +0.05 +0.02 A2V -0.015-0.023 +017V? 156 3.3 31.5 * -8264 23Xi AqrBD-08 5701 2057671455371569 S 213225.7-081810213745.1-075115 46.45-40.34 4.69 +0.17 +0.13 +0.10 A7V +0.116-0.025 +.012-021SBO 154 2.0 0.1 * -8265 3 PegBD+05 4830 205811126940 15147A 213244.7+061008213743.7+063706 61.41-32.28 6.18 +0.02 +0.02 A2V +0.060-0.007 +003SB 89 1.5 39.2AB 3* -8266 74 CygBD+39 4612 205835 51101 811 213256.3+395751213657.0+402449 87.62-08.76 5.01 +0.18 +0.10 A5V -0.001+0.013 +.020+007V? 171 -8267 5 PegBD+18 4827 2058521072881570 213304.6+185207213745.4+191907 72.34-23.99 5.45 +0.30 +0.14 F1IV +0.101+0.013 +.007-025V? 134 * -8268 CD-3415163 205872213168 213305.4-340742213906.1-334045 11.74-48.38 6.28 +0.92 G8IV +0.066-0.051 -020 -8269 CP-5211911 2058772471283726 213310.2-524838213959.7-522133344.10-46.53 6.21 +0.60 +0.32 F7III -0.017+0.001 -000SB2 -8270 4 PegBD+05 4834 205924126956 15157 213331.4+051913213831.9+054618 60.76-32.96 5.67 +0.25 +0.08 A9IV-Vn +0.114+0.024 +.033-019V? 195 6.4 27.2 * -8271 CP-56 9700 205935247132 213330.5-561125214033.6-554415339.43-45.56 6.33 +1.06 K0II-III +0.010+0.023 +027 -8272 BD+44 3889 205939 51109 CP Cyg 213337.8+441451213727.9+444148 90.59-05.65 6.20 +0.19 A7III -0.001-0.028 +004V? 23 * -8273 BD-11 5640 2060051645553728 213405.6-110138213928.1-103437 43.53-42.00 6.08 +1.03 +0.89 K0 +0.019-0.050 -009 -8274 BD+24 4445 206027 89870 S 213414.7+250252213845.0+252956 77.29-19.84 6.16 +1.02 +0.82 G9III -0.021+0.003 -014 0.1 -8275 BD+53 2659 206040 33596 213418.9+533531213738.7+540232 96.86 1.29 6.15 +0.99 +0.74 K1III -0.019 0.000 +002 -8276 BD+19 4754 206043 89871 213421.4+194850213901.1+201555 73.31-23.55 5.85 +0.32 +0.03 F2V +0.113-0.003 +.021-013V? 105 -8277 25 AqrBD+01 4517 2060671269653729I W 213428.8+014738213933.3+021437 57.54-35.28 5.10 +1.04 +0.90 +0.52 K0III -0.026-0.082 +.006-035V < 19: 6.3 136.8 -8278 40Gam CapBD-17 6340 206088164560 812I 213433.1-170651214005.5-163944 36.00-44.67 3.68 +0.32 +0.20 +0.14 F0p +0.190-0.023 +.029-031SB 30 * -8279 9 CepBD+61 2169 206165 195413725 V337 Cep 213514.2+613751213755.2+620455102.27 7.25 4.73 +0.30 -0.53 +0.18 B2Ib v-0.003-0.002 -.008-013V? 36 * -8280 Lam OctCP-83 722 206240258914 W 213536.4-831044215054.3-824309309.02-32.13 5.29 +0.75 +0.47 G8-K0III +0.058-0.036D+.011-011 2.3 2.8 * -8281 BD+56 2617 206267 33626 813 15184 213551.4+570212213857.6+572921 99.29 3.74 5.62 +0.21 -0.74 O6.5V((f)) -0.001-0.003 -008SBO 154 2.2 11.8AC 5* -8282 CD-2515545 206291190555 213602.3-253323214146.1-250607 24.56-47.63 6.49 +1.19 K0 -0.021-0.003 +032V? -8283 42 CapBD-14 6102 206301164580 I' 213606.6-142937214132.9-140251 39.56-43.97 5.18 +0.65 +0.20 +0.24E G1V+G0V -0.118-0.307 +.034-001SB1O 17 2.0 0.0 * -8284 75 CygBD+42 4177 206330 511673730I 15208 13834 213615.5+424911214011.1+431626 90.00-07.04 5.11 +1.60 +1.90 M1IIIab +0.063+0.016 +.004-028V 4.2 57.9AC 3* -8285 41 CapCD-2317057 206356190559 I 15223 213619.1-234255214200.8-231546 27.21-47.22 5.24 +0.95 +0.75 G9III +0.102-0.089 +.025-044V 6.2 5.1 * -8286 CP-71 2632 2063992579553735 213636.8-712758214528.8-710032320.64-39.09 6.01 -0.10 -0.35 B8IV +0.009-0.019 -004V? * -8287 26 AqrBD+00 4770 206445126997 I 213704.1+004947214210.1+011707 57.05-36.37 5.67 +1.44 +1.67 K2III +0.001-0.007 +010V * -8288 43Kap CapBD-19 6152 206453164593 I 213704.5-191920214239.5-185159 33.38-46.03 4.73 +0.88 +0.52 +0.49 G8III +0.147-0.006 +.028-003V? < 19: -8289 7 PegBD+05 4850 2064871270023732I 13848 213715.3+051328214215.5+054048 61.36-33.75 5.30 +1.64 +1.95 M2IIIab +0.014-0.006 -004V? -8290 BD+54 2595 206509 336563731 213724.5+542502214043.3+545220 97.74 1.61 6.20 +1.16 +0.96 K0III +0.010+0.005 +004 * -8291 76 CygBD+40 4611 206538 51189 W 213732.8+402104214134.3+404819 88.54-09.06 6.11 +0.07 +0.07 +0.05 A2V -0.012-0.046 +.013+003SB 150 4.0 62.1AB 3* -8292 BD+10 4604 206540107340 213739.8+102206214233.0+104929 66.11-30.53 6.09 -0.11 -0.51 B5IV +0.024-0.002 +006V? 20 -8293 BD-20 6270 206546164601 213737.9-200439214313.5-193715 32.41-46.41 6.22 +0.27 +0.15 +0.12 A3m +0.077-0.011 -025SBO 47 0.1 0.0 * -8294 CP-89 53 2065532589311669 CG Oct 213737.1-891903224528.6-884906303.63-28.13 6.57 +0.28 +0.13 F0IV-V +0.016-0.040 +015 * -8295 44 CapBD-15 6046 206561164600 D 213737.1-145125214304.4-142359 39.32-44.45 5.88 +0.25 F0IV -0.002+0.025 -013 * -8296 NOVA 1876 Q Cyg * -8297 BD+34 4500 206570 71613 I V460 Cyg 213747.9+350315214201.1+353037 85.01-13.06 6.07 +2.52 +4.76 +1.40 C6.3 +0.007 0.000 +010 * -8298 BD+45 3637 206632 51204 I V1339 Cyg213818.9+451835214208.4+454557 91.92-05.40 6.17 +1.55 M4III: +0.006-0.013 +.003+009 * -8299 CD-3914405 2066422132483736 213820.3-390022214429.5-383309 4.35-49.57 6.30 +1.12 +0.93 G5III +0.081-0.168 -058 -8300 77 CygBD+40 4615 206644 51207 W 213821.4+403713214222.9+410438 88.84-08.96 5.69 +0.01 -0.01 A0V +0.021+0.003 +.003-025SB2O 45 0.2 0.1 * -8301 80Pi 1CygBD+50 3410 206672 336653733 213832.5+504359214205.7+511123 95.48-01.30 4.67 -0.12 -0.68 -0.13 B3IV +0.006-0.006 -008SBO 109 * -8302 45 CapBD-15 6052 206677164612 213833.4-151227214401.0-144458 39.00-44.80 5.99 +0.21 +0.07 +0.12 F0V -0.023+0.008 -004SB -8303 CD-5013463 206690230822 213841.2-495733214519.0-492955347.83-48.10 6.45 +1.15 K1III +0.094+0.053 -051 -8304 BD+48 3480 206731 51217 213900.3+490836214238.9+493601 94.51-02.56 6.09 +1.00 +0.74 G8II +0.010-0.002 -002V -8305 9Iot PsACD-3315734 206742213258 814 W 213859.5-332856214456.8-330133 12.88-49.55 4.34 -0.05 -0.11 -0.03 A0V +0.034-0.094 +.041+002SB2 47 7.0 20. * -8306 BD+40 4623 206749 51221 I 13857 213905.2+404152214306.4+410918 89.00-08.99 5.49 +1.59 +1.96 M2IIIab -0.023-0.015 -023V * -8307 79 CygBD+37 4408 206774 71643 W 213917.4+374933214325.7+381702 87.11-11.18 5.65R 0.00 -0.02 A0V +0.036+0.004 -023 165 1.3 151.2AB 5* -8308 8Eps PegBD+09 4891 206778127029 815I 15268 Eps Peg 213916.4+092459214411.2+095230 65.57-31.46 2.39 +1.53 +1.70 +0.76 K2Ib e+0.031-0.001 +.006+005V < 17 6.1 142.5AC 3* -8309 78Mu 1CygBD+28 4169 206826 89940 15270A 213940.1+281727214408.6+284434 80.58-18.34 4.73H +0.48 +0.01 +0.28 F6V +0.292-0.241 +.049+018SB2 18 1.3 2.0AB 5* -8310 78Mu 2CygBD+28 4169 206827 89939 15270B 213940.3+281726214408.3+284435 80.58-18.34 6.08H +0.36? G2V +0.231-0.219 +.049+017V? 1.3 2.0AB 5* -8311 46 CapBD-09 5829 206834145637 I 213940.3-093230214500.3-090457 46.17-42.51 5.09 +1.11 +0.95 +0.53 G8II-III +0.021-0.005 +.002-005SB < 17 -8312 BD+58 2314 206842 33683 213944.8+584847214245.4+591616100.84 4.75 6.08 +1.34 K1III -0.003+0.010 -002 -8313 9 PegBD+16 4582 206859107365 I 13864 213946.5+165328214430.7+172100 71.98-26.51 4.34 +1.17 +1.00 +0.55 G5Ib +0.012-0.013 +.008-022V? 20 -8314 BD+14 4668 2068601073643737 HN Peg 213942.0+141858214431.3+144619 69.86-28.27 5.94 +0.59 +0.04 G0V v+0.234-0.119 +.065-019V? 11 * -8315 10Kap PegBD+24 4463 206901 89949 I 15281 214006.9+251107214438.7+253842 78.41-20.67 4.13 +0.43 +0.03 +0.25 F5IV +0.034+0.010 +.035-008SB1O 29 0.4 0.3AB 3* -8316 Mu CepBD+58 2316 206936 33693 I 15271 Mu Cep 214026.8+581917214330.4+584648100.60 4.32 4.08 +2.35 +2.42 +1.76 M2-Ia e+0.003-0.003 +.003+019V 8.3 19.5AB 3* -8317 11 CepBD+70 1193 206952 10126 817I 214027.4+705103214155.3+711841108.88 13.82 4.56 +1.10 +1.10 +0.54 K1III +0.117+0.099 +.008-037 < 17 -8318 47 CapBD-09 5833 207005145648 I AG Cap 214056.2-094414214616.3-091633 46.14-42.88 6.00 +1.66 +1.87 +1.03E M3III +0.021+0.009 +021V? * -8319 48Lam CapBD-12 6087 207052164639 818 214109.1-114938214632.1-112157 43.64-43.91 5.58 -0.01 -0.05 A1V +0.031-0.008 +.015+001V 190 -8320 BD+35 4626 207088 716751571 214130.0+352345214544.5+355126 85.82-13.30 6.40 +1.00 +0.71 G8III +0.094+0.012 -005 -8321 12 PegBD+22 4472 207089 899723739I 214128.2+222916214604.4+225656 76.64-22.83 5.29 +1.41 +1.33 K0IbHdel 0.5 e+0.010-0.005 +.006-012 * -8322 49Del CapBD-16 5943 207098164644 819I 15314 Del Cap 214131.3-163452214702.4-160738 37.60-46.01 2.87 +0.29 +0.09 +0.17 Am v+0.263-0.297 +.087-006SBO 87 2.0 0.0 4* -8323 CD-4713928 2071292308461573 W 214145.6-474531214815.8-471813350.88-49.10 5.58 +0.60 +0.08 G0V +0.167-0.298 +.073-007 3.0 55.0 -8324 BD+71 1082 207130 10131 I 214151.1+715142214304.0+721913109.65 14.50 5.17 +1.05 +0.97 K0III -0.044-0.038 +.015-039V? < 17 * -8325 BD+24 4473 207134 89976 I: 214150.7+250601214624.0+253348 78.65-21.00 6.28 +1.21 +1.25 K3III: +0.166+0.044 +.006-045V? -8326 10The PsACD-3118466 2071552132923741 W 214152.1-312140214744.2-305354 16.24-49.94 5.01 +0.04 +0.05 A2V -0.032+0.002 +.006+014 139 0.1 0.1AB 3* -8327 BD+61 2193 207198 19621 W 214208.3+615959214453.3+622738103.14 6.99 5.95 +0.31 -0.64 +0.17 O9Ib-II e-0.007-0.002 -018 76 3.5 17.0 * -8328 11 PegBD+02 4414 2072031270601574 214209.7+021325214714.0+024110 59.38-36.56 5.64 0.00 -0.01 A1V +0.010-0.003 +.005+017V? 139 -8329 BD+42 4204 207218 51277 214218.2+423554214616.6+430339 90.71-07.93 6.54 +0.28 +0.13 G0:III+A4V +0.013+0.013 -019V 100 * -8330 BD+16 4598 207223107395 214219.3+164355214704.7+171139 72.32-27.05 6.21 +0.34 +0.01 F3V +0.094-0.014 -019 -8331 CP-65 3951 2072292550803742 214215.0-651034215000.1-644245327.40-42.80 5.62 +1.02 +0.83 K0III -0.003-0.042 -001 -8332 BD-06 5827 207235145671 214222.4-062249214738.1-055502 50.30-41.49 6.17 +0.22 +0.05 A7V +0.049-0.002 -011 120 -8333 Omi IndCP-70 2873 207241255087 820 214219.9-700541215047.1-693746321.80-40.23 5.53 +1.37 +1.63 K2-3III -0.031-0.002 +.029+020 -8334 10Nu CepBD+60 2288 207260 196241572I Nu Cep 214233.7+603933214526.9+610715102.31 5.93 4.29 +0.52 +0.13 +0.44 A2Ia -0.003-0.003 +.013-021V 33 * -8335 81Pi 2CygBD+48 3504 207330 51293 821 214305.8+485048214647.6+491834 94.83-03.22 4.23 -0.12 -0.71 -0.12 B3III +0.004-0.002 -.001-012SBO 43 * -8336 BD+35 4643 207446 71716 I 214355.4+360658214808.3+363450 86.68-13.08 6.47R K5 -0.028+0.002 -031 -8337 BD-13 6027 207503164679 214416.8-131121214941.1-124323 42.41-45.20 6.31 +0.22 A3m -0.003+0.015 +000SB2 20 * -8338 BD+37 4427 207516 71722 214420.1+381101214829.4+383855 88.12-11.56 6.12 -0.08 -0.34 B8V +0.022-0.002 -020 100 -8339 12 CepBD+60 2294 207528 19642 I 214428.2+601343214725.3+604134102.22 5.45 5.52 +1.52 +1.93 M1IIIb -0.008 0.000 +.021-020 -8340 BD-17 6389 207552164686 214443.0-171840215013.1-165041 37.05-46.99 6.38 +1.42 K0 +0.034 0.000 -001V -8341 BD+19 4793 207563 900273744 214446.4+195948214926.9+202745 75.35-25.15 6.29 -0.10 -0.64 B2V +0.003-0.002 -012V? 122 -8342 BD+69 1198 207636 19646 214515.3+694113214701.0+700903108.41 12.67 6.29R A0V -0.004-0.026 -002V? 205 -8343 14 PegBD+29 4525 207650 900401575 214525.2+294230214950.7+301027 82.57-18.12 5.04 -0.03 +0.03 A1V s +0.019-0.027 +.006-023SBO 68 * -8344 13 PegBD+16 4612 207652107425 W 13891 214523.1+164914215008.7+171708 72.97-27.52 5.29 +0.37 +0.03 +0.18 F2III-IV +0.076-0.061 +.015-004V 71 2.0 0.2 * -8345 BD+40 4648 207673 513443745 214535.9+404057214940.1+410856 89.94-09.80 6.48 +0.42 +0.07 A2Ib -0.002-0.007 -002V 21 -8346 BD-19 6176 207760164697 214608.6-190521215141.8-183723 34.79-47.96 6.16 +0.36 +0.06 F0III +0.148-0.079 -042V? -8347 BD+60 2300 207780 19663 I 214623.2+604824214919.0+611622102.77 5.75 6.17 +1.67 +2.03 M1II-III +0.003-0.024 -019 -8348 BD+19 4797 207840107445 15383 214652.4+192128215134.2+194936 75.25-25.96 5.77 -0.10 -0.40 B8III +0.014+0.017 -020 20 5.6 19.3AB 3* -8349 BD+38 4621 207857 71767 V1619 Cyg214656.6+390406215104.9+393212 89.10-11.20 6.17 -0.08 -0.42 B9pHgMn +0.006+0.005 +000V? 12 * -8350 BD+20 5027 207932 90059 I HO Peg 214738.3+204810215218.2+211623 76.50-25.04 6.89R M4III +0.015+0.021 -022 * -8351 51Mu CapBD-14 6149 2079581647131577 214750.7-140121215317.8-133306 41.88-46.35 5.08 +0.37 -0.01 F1III +0.313+0.013 +.047-022V 87 * -8352 CP-62 6277 207964255101 W 214749.0-622121215511.5-615311330.39-44.71 5.90 +0.39 F1III +0.050-0.084D+.019+001 0.1 0.3 * -8353 Gam GruCD-3714536 207971213374 822 214752.5-375006215355.7-372154 6.11-51.47 3.01 -0.12 -0.37 -0.06 B8III +0.102-0.021 +.013-002V? 68 -8354 15 PegBD+28 4215 207978 90065 214802.0+281931215229.9+284736 82.05-19.54 5.53 +0.42 -0.13 F6IV-V vw -0.059-0.067 +.040+019V? =< 6 * -8355 BD-10 5785 208008164717 W 214815.2-104657215336.0-101842 46.07-44.96 6.59 -0.12 B9V +0.012-0.004 -011V 0.5 0.1AB 3* -8356 16 PegBD+25 4635 208057 90075 823 214830.6+252716215303.8+255530 80.10-21.75 5.08 -0.17 -0.67 B3Ve +0.009-0.002 +.003-012SB 152 * -8357 BD+55 2639 208095 33819 15405A 13909 214837.9+551936215201.0+554749 99.56 1.28 5.71 -0.13 -0.46 B6IV-V +0.013+0.003D+.005-007SB2O 120: 1.0 18.3AB 3* -8358 BD+18 4879 208108107474 214855.0+191148215337.4+194006 75.51-26.41 5.68 +0.01 +0.01 A0V s +0.013+0.013 +006 =< 41 -8359 BD+06 4919 208110127141 214858.1+062334215357.8+065152 64.70-35.25 6.15 +0.80 +0.27 G0III s +0.081 0.000 -010 < 32 * -8360 BD-04 5568 208111145731 214857.0-044443215410.4-041634 53.33-41.99 5.71 +1.18 +1.27 K2III +0.057-0.093 +.017-037 -8361 BD+65 1664 208132 19686 15407 214907.2+651659215137.3+654510105.85 9.04 6.37 A1m -0.006-0.015D+.010+004V? 0.3 1.9AB 3* -8362 Pi IndCP-58 7911 208149247230 214913.0-582223215614.0-575358335.36-46.69 6.19 +0.21 +0.15 Am +0.016+0.011 +007V? * -8363 BD-03 5329 208177145735 15432 214924.0-034621215435.9-031804 54.49-41.54 6.20 +0.48 +0.07 F5IV +0.018-0.028 -016 3.4 17.6 * -8364 BD+19 4814 208202107489 15431 214935.3+191447215417.4+194306 75.68-26.48 6.39 +0.97 +0.68 K0III+F7V -0.034-0.008 +004V? 2.1 22.3AB 3* -8365 CD-3118541 208285213406 215005.8-310445215555.6-303623 17.01-51.66 6.41 +0.93 G8III +0.051-0.026 -085V -8366 CD-3714565 208321213414 215021.7-374339215622.8-371513 6.25-51.96 5.46 +0.08 A2Vn -0.016-0.002 +028V 222 -8367 CD-3814801 208435213427 BZ Gru 215100.1-381319215702.2-374449 5.44-52.07 6.18 +0.33 F1III-IV +0.022-0.003 +001 * -8368 Del IndCP-55 9733 208450247244 824 W 215106.9-552805215755.1-545933339.11-48.12 4.40 +0.28 +0.10 F0IV +0.048-0.007 +.020+015V? 130 0.1 0.1 * -8369 Kap1IndCP-59 7744 2084962472473752 BG Ind 215126.0-592920215830.1-590044333.72-46.45 6.12 +0.46 -0.02 F3V +0.005+0.026 +040SB2 * -8370 CP-78 1430 208500257990 215126.0-780826220152.1-773945313.17-35.87 6.41 +0.22 +0.08 A5IV-V -0.031-0.002 +001V -8371 13 CepBD+55 2644 208501 338643749 13963 215131.4+560815215453.2+563641100.39 1.68 5.80 +0.73 -0.02 +0.60 B8Ib v-0.003-0.001 -015V? 53 * -8372 BD+20 5046 208527 901121579I 215143.3+204552215624.0+211423 77.24-25.72 6.40 +1.70 +2.03 K5V +0.002+0.015 +.004+002 -8373 17 PegBD+11 4696 2085651075283751 215203.7+113605215656.4+120435 69.96-32.32 5.54 +0.05 +0.03 A2Vnn -0.024-0.014 +015V 240 -8374 BD+60 2318 208606 19738 I 215220.9+610402215520.7+613231103.50 5.51 6.13 +1.60 +1.62 G8Ib +0.004+0.007 -032SB * -8375 BD+64 1607 208682 19742 15467 13966 215253.6+645045215531.1+651915105.89 8.45 5.86 -0.06 -0.75 B2.5Ve +0.007+0.003 -015V 350: 2.2 1.1 * -8376 BD-06 5878 208703145778 215258.8-055356215813.3-052529 52.76-43.46 6.33 +0.37 -0.03 F5IV +0.040-0.101 +001V 12 -8377 BD+47 3618 208727 514773754 215312.9+481133215702.2+484007 95.74-04.77 6.42 -0.08 -0.37 B8V +0.005+0.002 -016V? 140 -8378 BD-21 6131 2087351907863757I 215309.2-213936215843.8-211058 31.90-50.35 6.12 +1.65 +1.83 M4III +0.023-0.002 +003 -8379 CD-3814820 208737213452 215315.2-385222215917.9-382343 4.34-52.47 5.50 +1.00 K0III +0.042-0.006 -010 -8380 CP-76 1542 2087412579933760 W 215316.5-763547220303.8-760707314.54-36.95 5.95 +0.39 +0.11 F3III +0.022-0.080 +007SB 4.2 34.6 -8381 CP-56 9784 208796247262 215334.8-562142220024.1-555258337.68-48.07 6.01 -0.10 -0.12 B9IV-V +0.010+0.014 +003 -8382 BD-05 5674 2088011457841580 215342.0-045038215855.0-042223 54.10-43.03 6.22 +1.00 +0.87 +0.35E K2V +0.001-0.254 +.034-044V -8383 BD+62 2007 208816 197533756I W VV Cep 215349.9+630857215639.1+633732104.92 7.05 4.91 +1.77 +0.39 +1.40 M2Iaep+B8Ve v-0.005-0.004 +.004-019SBO 0: 1.7 0.1 * -8384 BD+65 1691 208947 19760 I 215437.7+654044215711.1+660922106.55 9.00 6.43 -0.05 -0.68 B2V +0.005+0.001 +002SBO 250 0.2 91. * -8385 18 PegBD+06 4940 2090081272193759 215508.1+061417220007.9+064303 65.80-36.51 6.00 -0.12 -0.57 B3III +0.015+0.004 -007V? 78 -8386 12Eta PsACD-2918119 209014190822 15536 13993 215505.6-285601220050.2-282713 20.70-52.44 5.42 -0.09 -0.37 -0.07 B8V e+0.016+0.006D+.011-005V 1.0 1.9 * -8387 Eps IndCP-5710015 209100247287 825 215542.6-571148220321.6-564710336.28-48.01 4.69 +1.06 +0.99 +0.55 K4-5V +3.961-2.538 +.285-040 * -8388 BD+62 2010 209112 19773 I 215556.6+621307215853.4+624154104.54 6.16 5.93 +1.67 +1.81 M3IIIab +0.004+0.026 -016V? -8389 BD+56 2670 209124 33943 215601.9+571046215923.0+573930101.51 2.13 6.59 +0.03 -0.01 A0III-IV +0.004-0.015 -003 * -8390 28 AqrBD-00 4296 209128127235 I 215558.0+000729220105.0+003618 59.95-40.57 5.58 +1.28 +1.40 gK4 +0.010-0.013 +007 -8391 BD+32 4316 209149 71932 215603.0+323128220026.8+330022 86.30-17.44 6.46 F5III -0.006+0.064 -002 40 * -8392 20 PegBD+12 4737 209166107587 826 15543 215613.0+123827220105.4+130711 71.68-32.32 5.60 +0.34 +0.05 F4III +0.059-0.057 +.038+007V < 20 6.4 54.7 -8393 19 PegBD+07 4779 209167127239 I 215611.4+074636220109.2+081526 67.43-35.67 5.65 +1.44 +1.77 gK5 -0.009-0.002 -023V? -8394 BD-18 6056 2092401648273761 215641.6-182300220211.9-175413 37.15-50.04 6.28 +1.01 gG7 +0.123-0.060 -017 -8395 BD+74 946 209258 102083758I 215653.8+743105215751.0+745948112.28 15.84 6.35 +1.56 +1.61 K5 -0.007-0.012 -017 -8396 29 AqrBD-17 6422 209278164830 15562A DX Aqr 215658.3-172646220226.6-165751 38.54-49.74 6.37 +0.42 A2V+K0III +0.015+0.001D+.006+015SBO 0.1 3.6AB 3* -8397 BD+10 4676 209288107599 14001 215706.6+102931220201.4+105826 70.03-33.98 6.37 -0.10 -0.61 B5IIIn +0.022+0.003 -015V? -8398 CD-3018975 209335213502 215730.1-302312220317.2-295415 18.43-53.16 7.10 +0.32 F0IIIn +0.122-0.014 -012 -8399 BD+61 2233 209339 19792 W 13998 215739.7+620024220039.3+622917104.58 5.87 6.66 +0.06 -0.82 B0IV -0.001+0.007 -020V? 213 2.0 0.9 * -8400 16 CepBD+72 1009 209369 10216 W 215749.3+724214215915.0+731048111.17 14.38 5.03 +0.44 -0.03 F5V -0.068-0.161 +.033-021V 26 6.8 131.4 * -8401 30 AqrBD-07 5688 209396145836 215800.9-070020220316.4-063121 52.41-45.11 5.54 +0.96 +0.73 K0III +0.045+0.006 +030 -8402 31Omi AqrBD-02 5681 2094091458373765 Omi Aqr 215808.5-023817220318.9-020919 57.44-42.67 4.69 -0.06 -0.41 -0.05 B7IVe +0.028-0.012 +012V? 227 * -8403 BD+52 3083 209419 339853763 215810.6+522400220150.6+525256 98.91-01.89 5.78 -0.11 -0.50 B5III +0.011+0.006 -022V? * -8404 21 PegBD+10 4681 209459107625 215824.6+105412220319.0+112311 70.66-33.92 5.80 -0.07 -0.20 B9.5V +0.017-0.012 -000 4 -8405 13 PsACD-3018985 209476213517 I 215838.0-302403220423.9-295500 18.45-53.40 6.47 +1.63 +1.93 K5III +0.014+0.001 +023V -8406 14 CepBD+57 2441 209481 33990 LZ Cep 215842.8+573104220204.6+580002102.01 2.18 5.56 +0.06 -0.86 O9Vn -0.002 0.000 -.009-007SB2O 130: * -8407 BD+43 4119 209515 51595 15578 V1942 Cyg215854.4+441003220256.7+443900 94.08-08.58 5.60 -0.03 -0.10 -0.01 A0IV -0.018-0.033 -001V? 98 2.5 1.0AB 5* -8408 CD-2715757 2095221908643767 14011 215855.6-271823220436.8-264921 23.58-53.01 5.96 -0.14 -0.66 -0.15 B4IVne v+0.017-0.015 -018V 300 * -8409 Kap2IndCP-60 7541 209529247303 215849.7-600711220550.9-593810332.26-46.96 5.62 +1.46 +1.81 +0.56E K4III +0.048-0.056 -011 -8410 32 AqrBD-01 4242 209625145853 215938.8-012324220447.4-005424 59.10-42.22 5.30 +0.23 +0.15 +0.11 A5m v-0.015-0.052 +.014+020SB1O 19 * -8411 Lam GruCD-4014639 2096882135431581 220005.3-400133220606.9-393236 2.22-53.67 4.46 +1.37 +1.66 +0.78 K3III -0.023-0.124 +.013+039 -8412 BD+32 4329 209693 71998 15602 220009.2+322725220434.4+325631 86.97-18.03 6.38 +1.10 +0.80? G5Ia -0.007+0.001 -022V? 4.8 21.4 -8413 22Nu PegBD+04 4800 209747127285 I 14020 220038.1+043411220540.8+050331 65.37-38.64 4.84 +1.44 +1.81 +0.76 K4III +0.111+0.100 +.014-016SB < 17 -8414 34Alp AqrBD-01 4246 209750145862 827I W 220038.9-004821220547.0-001911 59.93-42.07 2.96 +0.98 +0.74 +0.49 G2Ib v+0.020-0.010 +.012+008V? < 17 9.0 113.0 * -8415 BD+25 4671 209761 90214 I 220036.2+261114220511.4+264026 82.85-22.98 5.78 +1.25 K2III +0.034+0.032 -025V -8416 18 CepBD+62 2028 209772 19828 I MO Cep 220053.1+623800220352.9+630711105.26 6.15 5.29 +1.58 +1.79 +1.26E M5IIIab +0.031+0.055 -.006-004 * -8417 17Xi CepBD+63 1802 209790 19827 15600A 220053.7+640826220347.4+643740106.15 7.37 4.29 +0.34 +0.09 +0.13 A3/6Vm +0.209+0.085 +.032-006SB2O 20 2.0 7.7AB 3* -8418 33Iot AqrBD-14 6209 209819164861 828 220102.2-142118220626.2-135211 43.51-49.37 4.27 -0.07 -0.29 -0.09 B9IV-V +0.042-0.056 -010SB2 169 -8419 23 PegBD+28 4284 209833 902173768 220102.7+282841220534.7+285750 84.49-21.27 5.70 -0.06 -0.21 B9Vn +0.031-0.012 -012SB 360 -8420 CP-76 1547 209855258003 220115.7-762212221042.5-755250314.37-37.45 6.55 +1.18 +1.30 K2IIICNII +0.035-0.002 +051 -8421 BD+46 3574 209857 51632 I HT Lac 220118.0+461533220516.4+464441 95.68-07.14 6.13 +1.61 +1.76 +1.56 M4IIIab -0.042-0.020 -013 * -8422 BD+44 4041 209932 51640 220147.5+443733220550.6+450644 94.77-08.52 6.44 -0.03 -0.14 A0V +0.026-0.009 -004SB 73 -8423 BD+82 673 209942 3673 15571A 220149.0+822319215812.7+825211117.67 21.84 6.98 +0.52 -0.02 F6IV-V -0.141-0.041 +.011-022SB2 30 0.5 13.7AB 3* -8424 BD+44 4043 209945 516503769I 14028 220158.9+443140220602.0+450052 94.74-08.61 5.14 +1.57 +1.94 +0.92 K5III -0.007-0.016 +.006-023V < 17 -8425 Alp GruCD-4714063 209952230992 829 W 14040 220155.9-472643220814.0-465740350.00-52.47 1.74 -0.13 -0.47 -0.09 B7IV e+0.129-0.151 +.057+012 236 10.1 28.4 * -8426 20 CepBD+62 2029 209960 19847 830I Var? 220158.0+621752220500.5+624708105.16 5.81 5.27 +1.41 +1.78 K4III +0.015+0.058 -.000-021V? < 17 * -8427 BD+47 3692 209961 51645 V365 Lac 220155.8+474441220551.2+481354 96.64-06.01 6.27 -0.06 -0.71 B2V -0.005+0.004 -018SB1O 160 * -8428 19 CepBD+61 2246 209975 19849 15624 220203.8+614736220508.9+621648104.87 5.39 5.11 +0.08 -0.84 +0.03 O9.5Ib +0.003 0.000 -013V 33 5.6 60.4AC 3* -8429 BD+44 4044 209993 51652 220209.3+444542220612.4+451455 94.91-08.44 6.19 +0.09 +0.14 A3V +0.036-0.010 -002 -8430 24Iot PegBD+24 4533 210027 90238 831I W 14034 220221.2+245124220700.7+252042 82.26-24.26 3.76 +0.44 -0.04 +0.25 F5V +0.298+0.025 +.082-004SB1O 7 7.4 103.7 * -8431 14Mu PsACD-3315922 210049213576 832 220233.0-332835220823.0-325919 13.34-54.46 4.50 +0.05 +0.05 +0.05 A2V +0.080-0.031 +.030+012 226 -8432 CP-76 1549 210056258006 220228.7-763621221155.3-760658314.09-37.34 6.15 +1.00 +0.82 K0III -0.044-0.043 +025 -8433 Ups PsACD-3415421 210066213577 I 220234.8-343153220826.0-340238 11.53-54.48 4.99 +1.48 +1.81 +0.60E M1III +0.008-0.049 +.009+020 * -8434 BD+55 2679 210071 34055 220242.0+555121220613.5+562035101.47 0.52 6.39 -0.10 -0.45 A0III +0.014-0.011 -020V? * -8435 BD+18 4930 210074107675 220242.7+185910220728.6+192832 78.06-28.77 5.75R dF2 +0.125+0.037 +.016-015V? 49 * -8436 BD+17 4693 210090107676 I 14039 220242.9+173048220730.0+180002 76.93-29.87 6.35 +1.64 M1 +0.025-0.040 -010 * -8437 CD-3315926 210111213583 220253.0-333656220842.7-330732 13.11-54.53 6.37 +0.20 A2III/IV +0.022+0.029 -004 -8438 25 PegBD+21 4695 210129 90252 220308.4+211258220750.3+214210 79.80-27.15 5.78 -0.10 -0.41 B7Vne v-0.047-0.069 -052V 250 * -8439 35 AqrBD-19 6227 210191164888 220330.0-190033220859.0-183111 37.15-51.76 5.81 -0.17 B2.5IV +0.003-0.012 -005 -8440 CD-4814143 210204231005 220338.5-483547220958.0-480626348.06-52.39 6.43 +1.39 K3III +0.077-0.047 +019 -8441 BD+24 4540 210210 90259 220340.2+250319220817.2+253237 82.64-24.29 6.11 +0.27 +0.12 F1IV -0.038-0.037 +002SB 75 -8442 BD+58 2393 210220 340723770 220347.3+582109220709.6+585027103.04 2.47 6.32 +0.88 +0.63 G6III -0.013-0.022 +.017-010V? -8443 BD+52 3114 210221 34076 220343.3+524907220725.5+531826 99.84-02.05 6.14 +0.43 +0.24 A3Ib -0.007-0.009 -026 26 -8444 CD-3415430 210271213599 14049 220405.3-343023220955.7-340053 11.58-54.79 5.37 +0.24 A5V -0.017+0.038 +.027+002 201 -8445 BD+49 3746 210289 51678 I 15659 220423.4+491827220816.5+494747 97.89-04.97 6.42R K5III +0.029-0.023 +017V? 6.7 38.5 -8446 CD-2817622 210300190930 220418.1-284702221000.1-281733 21.44-54.42 6.44 +0.15 A5V +0.032+0.026 +011 -8447 15Tau PsACD-3315941 210302213602 220417.3-330222221008.8-323254 14.12-54.81 4.92 +0.48 +0.01 F6V +0.434+0.013 +.053-015 -8448 BD+45 3813 210334 51684 AR Lac 220438.4+451503220841.0+454431 95.56-08.30 6.11 +0.72 +0.26 +0.33E G2IV+K0III -0.027+0.031 -035SBO * -8449 27Pi 1PegBD+32 4349 210354 72064 833 15672 220447.7+324101220913.6+331020 87.93-18.45 5.58 +1.00 +0.77 G8IIIb -0.059-0.067 +.006-006V? 5.8 70.2AC 5* -8450 26The PegBD+05 4961 210418127340 834 14057 220509.3+054221221012.0+061152 67.41-38.71 3.53 +0.08 +0.10 +0.04 A2Vp +0.276+0.027 +.049-006SB2 117 * -8451 BD-04 5623 210419145914 220509.0-042303221021.1-035339 56.90-45.11 6.27 -0.01 -0.07 A1Vnn +0.019-0.050 -010 254: -8452 38 AqrBD-12 6196 2104241649103771 220516.7-120325221037.5-113354 47.36-49.23 5.46 -0.12 B7III +0.036+0.009 +003V? 18 -8453 BD-04 5625 210434145916 220520.9-044531221033.8-041602 56.51-45.37 6.01 +0.98 +0.83 K0III-IV +0.076-0.003 -018V -8454 29Pi 2PegBD+32 4352 210459 72077 835 220532.7+324115220959.2+331042 88.06-18.54 4.29 +0.46 +0.18 +0.27 F5III -0.014-0.021 +.007+002 139 * -8455 BD+18 4946 210460107706 S 220533.0+190739221019.0+193701 78.74-29.11 6.18 +0.69 +0.17 G0V +0.086-0.075 +022V? * -8456 BD+13 4861 210461107707 15690 220530.6+140820221022.2+143748 74.85-32.81 6.33 +1.08 +0.94 K0III +0.034-0.026 -042V? 5.1 21.5 -8457 BD-21 6173 210464190945 220529.5-214325221102.4-211357 33.20-53.10 6.09 +0.50 F6V +0.122-0.033 -013V? -8458 BD+10 4701 2105021077123773I 220542.9+110803221037.4+113728 72.39-35.02 5.78 +1.58 +1.94 M1III -0.046-0.054 +017SB -8459 28 PegBD+20 5093 210516 902873772 220546.5+202911221030.2+205841 79.80-28.11 6.46 +0.12 +0.11 A3III 0.000-0.008 +008 -8460 BD+29 4604 210594 72095 220620.6+300340221051.6+303311 86.51-20.74 6.32 +0.18 +0.16 A8IV +0.008-0.009 +004 86 -8461 BD+15 4592 210702107729 220701.5+153252221151.3+160226 76.29-32.02 5.95 +0.95 +0.73 +0.49 K1III -0.008-0.019 +011V? * -8462 39 AqrBD-14 6229 210705164923 14068 220702.2-144111221225.8-141138 44.03-50.82 6.03 +0.38 0.00 F2V +0.028-0.042 +015V? -8463 BD+50 3602 210715 341433774 15708 220716.6+501945221109.9+504924 98.86-04.40 5.40 +0.15 +0.05 A5V +0.139+0.041 +.008-008V? 126 4.1 73.8AD 4* -8464 CD-2616033 210739190967 220719.4-264916221257.5-261940 24.97-54.75 6.17 +0.17 A3V -0.019-0.033 +015 -8465 21Zet CepBD+57 2475 210745 34137 836I 14066 220723.0+574230221051.3+581204103.06 1.67 3.35 +1.57 +1.71 +0.78 K1.5Ib +0.015+0.004 +.017-018SB < 17 * -8466 BD+24 4548 210762 90317 I 220729.0+242725221208.0+245700 82.97-25.30 5.92 +1.51 K0 -0.004-0.022 -003 -8467 BD-05 5732 210763145940 220731.4-051250221243.8-044315 56.42-46.07 6.39 +0.50 +0.06 F7V -0.051-0.035 +002SB2 12 -8468 24 CepBD+71 1111 210807 10265 837I 220753.1+715055220948.4+722028111.28 13.23 4.79 +0.92 +0.61 +0.48 G7II-III +0.032+0.003 +.017-015V < 19: -8469 22Lam CepBD+58 2402 210839 34149 I 14069 220806.8+585516221130.7+592452103.83 2.61 5.04 +0.25 -0.74 +0.15 O6I(n)fp +0.003-0.011 +.006-074V? 285 * -8470 CD-2515815 210848190976 220807.4-254034221344.4-251051 26.98-54.70 5.58 +0.49 +0.22 F6III-II +0.074+0.016 -028 -8471 Psi OctCP-78 1442 2108532580203779 220807.0-780033221750.5-773042312.56-36.59 5.51 +0.31 +0.12 F3III -0.041+0.011 +017 * -8472 BD+56 2727 210855 341513775 W 220811.9+562031221148.8+565022102.38 0.48 5.24 +0.51 +0.06 F8V +0.237+0.130 +.024-019V 0 5.1 72.9AB 3* -8473 BD+71 1112 210873 10267 220817.6+713708221015.3+720640111.17 13.03 6.37 -0.06 -0.18 -0.07 B9pHgMn: -0.009-0.028 -003 41 * -8474 BD+69 1228 210884 19922 15719 220821.8+693819221038.9+700758110.00 11.41 5.50 +0.38 -0.04 F2V -0.060+0.028 +.038+001V? 3.1 14.6 * -8475 BD+33 4456 210889 721323776I 220822.2+340641221247.8+343617 89.46-17.76 5.33 +1.13 +1.13 K2-III-IIIb +0.020-0.050 +.003-007V? < 19: -8476 BD+58 2403 210905 34158 220829.7+583518221156.9+590505103.68 2.31 6.30 +1.13 +1.07 K0III +0.129+0.083 -028 * -8477 CD-4114804 210918231045 I' 220832.0-415119221438.6-412254358.68-54.97 6.23 +0.65 +0.14 G5V +0.567-0.790 +.046-018V? -8478 16Lam PsACD-2817653 210934190985 838 220838.7-281545221418.8-274601 22.58-55.28 5.43 -0.16 -0.55 B8III +0.026+0.002 +.012-006 38 -8479 BD+60 2358 210939 19932 I W 220843.4+601552221201.9+604534104.65 3.68 5.35 +1.17 +1.15 K1III -0.008+0.019 -003 * -8480 41 AqrBD-21 6180 210960190986 15753 220846.7-213418221418.0-210427 33.83-53.78 5.32 +0.80 +0.43 K0III+F2V +0.016+0.066 +.016-024 1.6 5.1AB 4* -8481 Eps OctCP-81 995 210967258928 839I Eps Oct 220849.8-805615222001.5-802623310.04-34.50 5.10 +1.47 +1.09 +1.49E M5III +0.043-0.045 +012 * -8482 BD+27 4280 211006 90337 220903.6+280646221338.6+283630 85.75-22.64 5.89 +1.15 +1.22 K2III +0.071-0.001 -019V? -8483 BD+62 2048 211029 19937 I 220915.5+624748221222.3+631729106.14 5.73 5.79 +1.67 +1.93 M3IIIab -0.006-0.010 -014V? -8484 CD-4514644 211053231053 220927.8-445654221535.1-442707353.42-54.42 6.10 +1.02 +0.81 +0.46C G8-K0III +0.013-0.019 -004 -8485 BD+38 4711 211073 721551583I 15758 14076 220935.1+391307221352.7+394254 92.76-13.75 4.49 +1.39 +1.45 +0.74 K3III +0.038+0.013 +.020-011SB < 17 6.3 28.4AB 4* -8486 Mu 1GruCD-4114810 2110882310553777 220935.5-415039221536.9-412048358.65-55.16 4.79 +0.80 +0.47 G8III+G +0.044+0.022 +.009-007SB -8487 BD+44 4073 211096 51783 220942.3+445641221349.3+452627 96.12-09.07 5.53 +0.04 0.00 A0III +0.081+0.009 -009 111 -8488 Mu 2GruCD-4215846 211202231063 221025.6-420729221626.6-413739358.11-55.26 5.10 +0.92 G8III -0.005-0.013 +.010+013SB -8489 BD+42 4333 211211 517973778 221032.2+422728221444.4+425714 94.81-11.20 5.71 0.00 -0.04 A2Vnn +0.049-0.025 -038V? 245 -8490 BD+62 2053 211242 19948 221040.8+623958221349.5+630945106.20 5.53 6.11 -0.08 -0.43 B8Vn -0.020-0.003 +012SB -8491 BD+07 4834 2112871274203780 221101.0+080308221559.8+083258 70.86-38.13 6.21 +0.02 -0.04 A1Vn +0.034-0.011 +000SB 305 -8492 CD-2616057 211291191016 221100.4-262346221637.4-255354 25.98-55.48 6.15 +1.11 K1II/III +0.037-0.018 +026V? -8493 BD+72 1022 211300 10284 15764 14078 221104.1+724838221252.9+731826112.05 13.88 6.08 +1.01 +0.85 K0II-III+A3V +0.023+0.020 +.015+001V? 2.3 28.7 * -8494 23Eps CepBD+56 2741 211336 34227 W Eps Cep 221120.9+563241221502.0+570237102.86 0.40 4.19 +0.28 +0.04 +0.15 F0IV +0.447+0.048 +.041-001SB 86 5.3 127.8 * -8495 BD-02 5726 211356145989 221124.5-020540221633.6-013547 60.82-44.98 6.15 +0.19 +0.09 A5Vn -0.029-0.011 +001 199 -8496 42 AqrBD-13 6148 211361164974 I 221126.8-131948221648.1-124953 46.72-51.16 5.34 +1.14 +1.07 gK0 +0.015+0.006 +013V -8497 CD-2317344 211364191021 221126.1-233814221659.8-230824 30.73-54.95 6.17 +1.05 G5 +0.084-0.055 -002V -8498 1 LacBD+37 4526 211388 72191 I 221136.5+371502221558.2+374456 91.93-15.59 4.13 +1.46 +1.63 +0.72 K3-II-III +0.013+0.004 +.003-008V? < 19: -8499 43The AqrBD-08 5845 211391145991 840I 221133.4-081653221650.0-074700 53.51-48.62 4.16 +0.98 +0.81 +0.48 G8III-IV +0.121-0.022 +.021-015V? < 17 * -8500 BD-09 5948 211392145992 14095 221135.8-093218221652.6-090224 51.90-49.30 5.79 +1.16 +1.14 gK3 -0.047-0.009 +012 -8501 CP-5410055 211415247400 W 221142.3-540631221815.6-533740339.03-51.39 5.37 +0.60 +0.08 G3V +0.429-0.667 +.083-014 4.5 3.0 -8502 Alp TucCP-60 7561 211416255193 841 A 221139.2-604529221830.1-601535330.22-47.96 2.86 +1.39 +1.54 +0.73 K3III -0.072-0.043 +.026+042SBO 0.1 * -8503 BD+27 4288 211432 90379 221153.4+271821221629.7+274815 85.75-23.66 6.37 +0.99 G9III -0.009+0.002 +016 -8504 44 AqrBD-06 5960 2114341459933782 14100 221153.2-055312221706.5-052314 56.54-47.35 5.75 +0.88 +0.51 G6III -0.002+0.020 +007 -8505 Ups OctCP-86 406 2115392589321670 221235.4-862834223137.4-855802305.61-30.41 5.77 +1.02 +0.88 K0III -0.041+0.059 +019V -8506 BD+56 2746 211554 34256 221249.7+564316221626.5+571313103.12 0.43 5.88 +0.93 G8III +0.043+0.006 -008V -8507 BD-00 4333 211575146004 S 221256.6-004410221804.3-001416 62.64-44.42 6.39 +0.44 0.00 F3V -0.039-0.062 +017V 12 0.1 -8508 45 AqrBD-14 6255 211676164996 221338.7-134820221900.8-131818 46.45-51.85 5.95 +1.06 +0.94 gG7 +0.079-0.012 +030 -8509 CP-58 7942 211726247410 221356.7-580041222036.2-573036333.47-49.71 6.34 +1.37 +1.71 K3-4III +0.022-0.015 -034 -8510 BD+37 4537 211797 72228 15828 221433.0+371601221856.2+374610 92.44-15.91 6.17 +0.28 +0.11 A9IIIp +0.057+0.044D+.013+007 2.7 15.7AB 4* -8511 25 CepBD+62 2059 211833 19991 I 221456.9+621811221812.7+624816106.41 4.96 5.75 +1.26 +1.37 K3III +0.046+0.015 -002V -8512 46Rho AqrBD-08 5855 211838146023 221456.2-081924222011.9-074916 54.15-49.34 5.37 -0.06 -0.37 B8IIIpMn:Hg: +0.016-0.001 -009V 72 -8513 30 PegBD+05 4998 211924127453 15847 14122 221525.6+051713222027.6+054722 69.30-40.86 5.37 -0.02 -0.47 B5IV +0.023-0.001 -008V 32 5.9 14.8AC 3* -8514 BD+07 4853 211976127460 221556.1+074059222055.8+081112 71.63-39.25 6.17 +0.44 -0.03 F6V +0.048+0.023 +010 7 -8515 Nu IndCP-72 2690 211998258033 W 221602.0-724429222436.8-721520316.86-40.67 5.29 +0.65 -0.06 +0.41E A3V:+F9V +1.299-0.678 +.031+021V? 0.1 0.1 * -8516 47 AqrBD-22 5897 2120101910831584I 221605.3-220558222135.6-213554 33.84-55.56 5.13 +1.07 +0.92 K2III -0.008-0.085 +.015+049 -8517 BD+26 4410 212047 90437 I 14127 221621.3+262556222100.1+265607 86.05-24.96 6.47 +1.59 +1.71 M4III +0.015-0.006 -004 -8518 48Gam AqrBD-02 5741 212061146044 842 15864 14132 221629.5-015329222139.4-012314 62.18-45.84 3.84 -0.05 -0.12 -0.04 A0V +0.132+0.007 +.046-015SB 57 7.9 37.4 * -8519 BD+50 3673 212071 34335 221642.0+502839222039.6+505851100.20-05.11 6.42R K2 +0.012+0.004 -009 -8520 31 PegBD+11 4784 212076107854 843 IN Peg 221635.7+114205222131.1+121219 75.27-36.43 5.01 -0.13 -0.81 -0.14 B2IV-Ve v+0.009+0.006 +010V? 134 * -8521 Pi 1GruCD-4614292 212087231105 W Pi1 Gru 221637.4-462707222243.9-455652350.28-55.16 6.62 +2.01 +1.86 +2.64 S5,7e +0.007-0.012 -020 4.3 2.7 * -8522 32 PegBD+27 4299 212097 90440 15863 221642.2+274936222119.3+281950 87.03-23.88 4.81 0.00 -0.20 -0.01 B9III +0.018+0.002 +.023+008V? 81 6.3 72.6AB 5 -8523 2 LacBD+45 3894 212120 51904 15862 14130 221653.6+460159222101.6+463212 97.79-08.86 4.57 -0.10 -0.51 -0.11 B6V +0.023+0.005 +.040-010SB2O 47 6.4 48.2 * -8524 Pi 2GruCD-4614295 2121322311113786I:W 221659.5-462554222308.0-455543350.28-55.23 5.62 +0.36 +0.02 +0.22C F3III-IV +0.237-0.061 +.027+020V 5.4 4.9 * -8525 BD+75 820 212150 103123784 221708.1+755908221820.4+762917114.26 16.27 6.66 0.00 -0.11 A1Vn +0.005+0.003 -018 165: -8526 CP-75 1748 2121682580363789 W 221710.5-753120222551.0-750056314.28-38.73 6.04 +0.64 +0.14 G3V +0.048+0.010 +014 2.7 20.4 -8527 CP-71 2686 2122112580343788 221721.5-705609222510.5-702554318.51-41.99 5.78 +0.38 +0.03 F3III +0.115-0.062 +004 -8528 BD+41 4469 212222 51918 221734.0+413426222150.9+420442 95.41-12.66 6.41 -0.08 -0.51 B5V +0.019 0.000 -018 -8529 49 AqrCD-2515905 212271191105 221756.5-251605222330.9-244545 28.53-56.78 5.53 +0.99 +0.80 gG9 +0.103 0.000 -011V? -8530 BD-07 5765 212320146062 D 221817.4-074201222332.1-071140 55.66-49.69 5.93 +1.00 +0.69 G6IIIBaII -0.001+0.007 -014 * -8531 CP-58 7954 212330247441 I'W 221818.0-581739222456.4-574750332.61-50.04 5.32 +0.67 +0.13 +0.39 G3IV +0.143-0.343 +.058+008 7.6 81. -8532 33 PegBD+20 5139 212395 90462 15896 221850.8+202034222339.6+205054 82.41-30.16 6.04R F7V +0.337-0.015 +.037-023V 2.2 78.4AC 3* -8533 51 AqrBD-05 5780 212404146067 15902 221854.3-052035222406.9-045013 58.72-48.44 5.78 -0.04 -0.11 A0V +0.033-0.004D+.006+006 65 0.0 0.3AB 5* -8534 50 AqrBD-14 6276 2124301650443791 221905.7-140211222427.1-133146 47.12-53.13 5.76 +0.97 +0.71 G6.5III +0.053+0.012 -021V? -8535 BD+56 2765 212454 34383 221918.7+564643222300.2+571704103.90 0.00 6.16 -0.13 -0.55 B8III-IV +0.015+0.001 -013 * -8536 BD+37 4560 212487 72296 221928.6+380350222354.2+383425 93.74-15.80 6.22 +0.49 -0.01 F5IV: +0.255+0.119 -.005+005 =< 10 -8537 BD+61 2291 212495 20042 221938.5+615447222300.2+622512106.66 4.33 6.04 +0.05 +0.02 A1V -0.005+0.040 -015V 165 -8538 3Bet LacBD+51 3358 212496 34395 844I S 221937.5+514341222333.6+521345101.26-04.30 4.43 +1.02 +0.77 +0.57 G8.5IIIbCa1 -0.013-0.186 +.021-010 < 17 -8539 52Pi AqrBD+00 4872 2125711275201585I Pi Aqr 222010.2+005212222516.6+012239 66.01-44.74 4.66 -0.03 -0.98 +0.02 B1Ve v+0.019+0.001 +004V 278 * -8540 Del TucCP-65 4044 212581255222 W 14158 222013.4-652830222720.0-645759323.87-45.87 4.48 -0.03 -0.07 B9.5V +0.071+0.003 +012 245 4.5 6.9 * -8541 4 LacBD+48 3715 212593 51970 222027.6+485810222431.0+492835 99.90-06.71 4.57 +0.09 -0.34 +0.10 B9Iab -0.007-0.003 +.003-026 27 -8542 CD-2417171 2126431911443793 222038.9-241126222610.7-234057 30.71-57.13 6.29 -0.03 A0V +0.018-0.002 -015V -8543 BD+17 4746 2126701079061586 222051.1+175608222540.7+182640 81.10-32.34 6.26 +1.22 K0 +0.028+0.027 +022 -8544 53 AqrBD-17 6520 212697165077 15934B 222108.3-171459222634.2-164429 42.55-54.98 6.57H G2V +0.262-0.013 +.057-003V? 7 0.2 3.3AB 4* -8545 53 AqrBD-17 6521 212698165078 15934A 222108.7-171503222634.4-164433 42.55-54.98 6.35H +0.61 +0.09 G1V +0.223-0.003 +.057-006 9 0.2 3.3AB 4* -8546 BD+85 383 212710 37211648 222117.8+853617221310.6+860629120.22 24.10 5.27 -0.03 -0.11 B9.5Vn +0.052+0.045 +.006+004SB2 219 -8547 CP-68 3493 2127282552271587 222116.0-675948222837.7-672921321.11-44.26 5.55 +0.20 +0.08 A4V +0.149-0.072 -017 -8548 34 PegBD+03 4705 212754127529 15935 222132.0+035301222637.4+042337 69.38-42.93 5.75 +0.52 +0.04 F7V +0.301+0.048 +.041-018V 7 6.5 3.3AB 3* -8549 BD+36 4835 212883 72344 15942 222219.2+365605222645.7+372638 93.58-17.05 6.46 -0.13 -0.75 B2V +0.013-0.003 -007 25 3.3 4.3 * -8550 BD+77 860 212937 10351 222251.4+774406222341.3+781436115.55 17.55 6.76 -0.06 -0.16 B9 -0.008+0.018 -018 * -8551 35 PegBD+03 4710 2129431275403796I W 222247.8+041139222751.5+044144 69.98-42.94 4.79 +1.05 +0.89 +0.56 K0III +0.081-0.308 +.025+054V < 19: 4.9 181.5AC 3 -8552 Nu GruCD-3914723 212953213850 845 W 222247.6-393816222839.2-390755 1.71-58.04 5.47 +0.95 G9III +0.039-0.164 +.015+011 7.0 27.3 -8553 BD+39 4841 212978 72358 S 222303.4+391801222726.5+394835 95.04-15.14 6.14 -0.14 -0.77 B2V +0.001-0.011 -017 115 0.2 * -8554 BD+55 2750 212986 344603795 222311.8+555525222659.2+562600103.91-01.01 6.57 -0.10 -0.47 B5III +0.019 0.000 -007V? -8555 BD+31 4701 212988 72366 I 222311.4+311945222746.2+315025 90.46-21.82 5.98 +1.45 K2 +0.045+0.034 +001 -8556 Del1GruCD-4414931 213009231154 846 W 14169 222317.6-440023222916.2-432944353.77-57.05 3.97 +1.03 +0.80 +0.56 G6-8III +0.028-0.005 +.024+005 8.8 5.6 -8557 BD+70 1240 213022 103663794I 222325.6+701541222600.8+704615111.45 11.22 5.47 +1.20 gK2 +0.018+0.006 -017V -8558 55Zet1AqrBD-00 4365 213051146107 I: 15971B 222340.8-003153222849.7-000113 65.35-46.33 4.59H F6IV +0.181+0.009 +.022+029V? 58 0.2 1.8 3* -8559 55Zet2AqrBD-00 4365 213052146108 I 15971A 222341.0-003156222850.1-000112 65.35-46.33 4.42H +0.38 -0.01 +0.23 F3V +0.209+0.042 +.022+025 58 0.2 1.8 3* -8560 Del2GruCD-4414935 213080231161 I'W Del2 Gru 222347.1-441539222945.5-434458353.28-57.06 4.11 +1.57 +1.71 +1.58 M4.5IIIa -0.007 0.000 -.005+002V? 4.7 60.6 * -8561 26 CepBD+64 1664 213087 200753797 222352.2+643720222705.3+650756108.50 6.39 5.46 +0.37 -0.59 B0.5Ibe: +0.001-0.002 -015V * -8562 36 PegBD+08 4874 2131191275441588I 222408.5+083706222908.0+090744 74.39-39.97 5.58 +1.55 +1.91 K5IIIa +0.055-0.022 -030V? -8563 CD-2715932 2131351911823798 14175 222410.4-273707222946.0-270626 24.69-58.58 5.95 +0.33 F1V +0.123-0.012 +003 -8564 BD+26 4439 213179 905441589 222429.0+261507222910.2+264547 87.57-26.17 5.79 +1.25 K2II +0.026-0.004 -045V -8565 BD-13 6204 213198165123 222440.7-132537223001.5-125454 49.10-54.04 6.40 +0.32 -0.02 F3IV +0.168+0.001 -011 * -8566 37 PegBD+03 4713 213235127551 15988 222454.6+035525222958.0+042554 70.23-43.50 5.48 +0.38 +0.09 +0.20 F2V+F2V -0.023-0.144 +.032+001SB1O 66 1.4 0.9 * -8567 56 AqrBD-15 6231 213236165127 222455.8-150549223017.4-143509 46.61-54.87 6.37 -0.04 -0.37 B8V s +0.039-0.039 -027 25 * -8568 BD+63 1852 213242 20088 222459.6+633429222819.7+640508108.06 5.43 6.29 +1.08 K0 +0.023-0.013 -026 -8569 BD+34 4700 213272 72399 222514.1+351253222943.9+354332 93.12-18.81 6.56 A2V -0.026-0.037 -002 -8570 Zet PsACD-2616175 213296191196 14180 222520.2-263504223053.7-260425 26.73-58.67 6.43 +1.08 K1III +0.034-0.070 -026 -8571 27Del CepBD+57 2548 213306 34508 847I 15987A Del Cep 222527.3+575412222910.3+582455105.19 0.53 3.75 +0.60 +0.40 F5Ib-G2Ib v+0.015+0.001 +.011-015SB 9 2.4 40.8AC 3* -8572 5 LacBD+46 3719 213310 520553799I S 14177 222521.7+471142222931.8+474225 99.66-08.65 4.36 +1.68 +1.11 +1.07 M0II+B8V +0.002 0.000 +.006-004SBO =< 50 * -8573 57Sig AqrBD-11 5850 2133201651341591 222521.3-111123223038.8-104041 52.49-53.05 4.82 -0.06 -0.11 -0.04 A0IV s +0.003-0.030 +.021+011SB 23 * -8574 38 PegBD+31 4708 213323 724061590 S 222527.3+320339223001.8+323421 91.33-21.48 5.65 -0.04 -0.11 B9.5V +0.034-0.014 -016V 104 0.2 -8575 BD+48 3747 213389 52073 W V350 Lac 222559.6+485041223006.5+492122100.61-07.29 6.40 +1.15 +1.00 K2IIIe -0.024-0.043 +004SB1O 3.2 66.0 * -8576 17Bet PsACD-3217126 2133982138831592 W 222549.3-325132223130.3-322046 14.59-59.32 4.29 +0.01 +0.02 +0.02 A0V +0.065-0.018 +.021+006 36 3.5 30.3AD 4* -8577 CP-79 1206 2134022580493807 222555.3-791712223526.4-784618310.69-36.22 6.15 +1.38 +1.35 K1III +0.046-0.006 -013 -8578 28Rho1CepBD+78 796 213403 10375 222557.4+781634222642.5+784709116.00 17.91 5.83 +0.15? A2Vm -0.016-0.043 -006V? 58 -8579 6 LacBD+42 4420 213420 520793800 222610.2+423639223029.3+430724 97.36-12.64 4.51 -0.09 -0.74 -0.11 B2IV -0.001-0.005 -008SBO 74 * -8580 BD-03 5460 2134281461363802 222608.2-032525223118.4-025440 62.68-48.67 6.16 +1.08 +1.00 K0 -0.005-0.036 +010V -8581 BD-07 5797 213429146135 S 222603.6-070355223118.4-063318 58.21-50.90 6.14 +0.56 +0.06 F7V +0.173-0.106 +.044-006V =< 6 0.1 -8582 Nu TucCP-62 6348 2134422552473803 Nu Tuc 222614.5-622945223300.1-615856326.58-48.30 4.81 +1.61 +1.75 M4III +0.039-0.025 +.007-003 -8583 58 AqrBD-11 5855 213464165147 222623.2-112505223141.3-105420 52.39-53.39 6.38 +0.28 +0.07 +0.16 A8III +0.075-0.045 +004SB -8584 BD+28 4389 213534 90568 GX Peg 222656.1+290148223134.2+293234 89.80-24.18 6.35 +0.19? A5m -0.044-0.029 +002SBO 48 * -8585 7Alp LacBD+49 3875 213558 34542 848 16021 222710.2+494606223117.5+501657101.26-06.60 3.77 +0.01 0.00 -0.03 A1V +0.138+0.019 +.040-004V? 146 8.3 36.3 * -8586 39 PegBD+19 4949 2136171079863804 222745.5+194252223235.5+201348 83.91-31.92 6.42 +0.32 +0.02 F1V +0.163+0.029 +.013-019 * -8587 BD+15 4670 2136441079893806 222753.6+152052223246.9+155148 80.76-35.42 6.32 +1.19 +1.17 K0 +0.022+0.026 -028 -8588 BD+39 4871 213660 724463805 16031 222801.0+391555223226.4+394647 95.87-15.68 5.88 +0.16 +0.14 A6V +0.004-0.011 +005V? 111 5.5 43.1AB 5 -8589 BD+53 2910 213720 34555 222820.6+533119223218.8+540215103.32-03.45 6.35R G8III +0.035+0.027 -014 -8590 60 AqrBD-02 5781 213789146160 W 222853.6-020520223402.9-013427 64.89-48.33 5.89 +0.99 +0.73 G6III +0.036-0.040 -008 4.4 98.1AB 3 -8591 29Rho2CepBD+78 801 213798 104021593 222859.8+781840222952.9+784927116.16 17.86 5.50 +0.06 +0.07 A3V +0.001-0.022 +.008+001SB 115 * -8592 59Ups AqrBD-21 6251 213845191235 849 222913.5-211314223441.6-204230 37.08-58.20 5.20 +0.44 0.00 F4IV +0.222-0.145 +.046-002 18 -8593 CP-58 7971 213884247505 222924.5-582402223552.9-575301331.15-51.17 6.23 +0.20 A5V +0.077-0.009 +005 -8594 BD+55 2769 213930 34574 I 14213 222947.8+560627223340.6+563730104.80-01.32 5.71 +0.96 G8III-IV +0.073+0.047 -011SB * -8595 BD+69 1262 213973 20150 16057 223008.8+692345223302.9+695449111.50 10.17 6.6 +0.32 0.00 A9III +0.116+0.068 +.002-002V? 77 0.3 0.5AB 4* -8596 CD-2417232 213986191246 223006.4-243029223536.5-235928 31.10-59.30 5.97 +0.99 +0.81 gK0 +0.039-0.006 -003V -8597 62Eta AqrBD-00 4384 213998146181 850 223013.0-003759223521.4-000703 66.84-47.61 4.02 -0.09 -0.26 -0.07 B9IV-Vn +0.091-0.056 +.025-008V? 280 -8598 BD+69 1263 214019 10418 16062 223027.2+695126223317.0+702226111.76 10.56 6.34 0.00 -0.06 A0V +0.051+0.020 -.003-019 165 3.0 9.7AB 3* -8599 BD+75 836 214035 104141594 223030.9+754240223216.2+761335114.82 15.60 5.68 +0.05 +0.08 A2V -0.021-0.011 -022SB 100 -8600 Sig1GruCD-4114959 2140852312113811 223038.9-410555223629.3-403458358.33-59.17 6.28 +0.12 +0.13 A3Vn +0.048-0.070 +001SB -8601 CD-3217161 214122213948 W 223057.7-321050223635.4-313950 15.94-60.40 5.82 +1.09 +1.00 K1III -0.042-0.044 +013 1.8 91.7 -8602 Sig2GruCD-4114963 214150231217 W 223108.7-410626223658.8-403528358.27-59.26 5.86 +0.06 +0.06 A1V +0.038-0.075 +015 58 5.2 2.8 * -8603 8 LacBD+38 4808 214168 72509 16095A 14242 223125.2+390700223552.3+393803 96.38-16.15 5.73 -0.15 -0.90 B2Ve v+0.005-0.006 -010SB 348 0.7 22.4AB 8* -8604 BD+34 4728 214200 72517 W 223135.2+350340223607.9+353438 94.20-19.63 6.10 +1.00 K0 0.000-0.067 -016 * -8605 BD+10 4781 214203108036 223138.9+111042223636.4+114149 78.37-39.24 6.40 0.00 +0.06 A1III -0.008+0.018 -008 -8606 BD+49 3903 214240 52171 223144.0+493310223553.4+500416101.79-07.15 6.29 -0.05 -0.54 B3V +0.006+0.008 -015SB2O 60 * -8607 BD+55 2779 214279 34605 223156.6+553309223551.8+560412104.79-01.95 6.38 +0.12 +0.09 A3V -0.003-0.019 -002 -8608 BD+11 4838 214298108043 I 223208.1+120333223704.7+123438 79.21-38.63 6.30 K5 -0.030-0.017 -019 -8609 BD+34 4729 214313 725353812 223215.9+350802223648.7+353909 94.37-19.64 6.30 +1.37 K5 -0.004 0.000 +010 -8610 63Kap AqrBD-04 5716 2143761462101595I W 223234.6-044438223745.4-041341 62.68-50.75 5.03 +1.14 +1.16 +0.55 K2III -0.067-0.120 +.019+008 < 19: 3.5 98.3 * -8611 CP-5310326 214441247531 W CC Gru 223257.6-531242223908.4-524132337.71-54.56 6.65 +0.35 F1III +0.005-0.016 +011V? 4.7 33.8 * -8612 BD-08 5912 214448146216 16130 14255 223307.4-082502223822.2-075352 58.10-53.10 6.23 +0.78 +0.49 G0III+F0V +0.076-0.004 -017V? 1.8 0.2 * -8613 9 LacBD+50 3770 214454 34628 223315.8+510144223722.4+513243102.73-05.99 4.63 +0.24 +0.10 +0.14 A8IV -0.054-0.101 +.022+012SB 87 -8614 CD-2918414 214462191292 223311.0-291604223844.7-284452 21.91-60.74 6.47 +1.04 K1III -0.035+0.001 +003V? -8615 31 CepBD+72 1049 214470 10425 851 223317.8+730727223546.1+733835113.64 13.27 5.08 +0.39 +0.16 F3III-IV +0.172+0.023 +.008+000V 85 * -8616 CD-3316160 2144842139813814 223312.5-333606223851.5-330453 13.03-60.84 5.66 +0.05 A2Vp +0.006+0.014 +004SB2 0 -8617 BD+44 4185 214558 52211 S 223357.7+443947223817.5+451059 99.67-11.59 6.40R G2III+A4V +0.003 0.000 -004 =< 50 0.1 * -8618 40 PegBD+18 5014 214567108064 W 223402.2+190017223852.6+193120 84.84-33.37 5.82 +0.92 G8II -0.042-0.099 +.010-020V 5.6 1.5 -8619 CD-2817873 214599191308 16149A 223410.2-285043223944.0-281931 22.82-60.92 6.31 +1.01 K0IV +0.076-0.031D+.010-022 1.3 86.6AB 3* -8620 CP-58 7984 2146322475443816 223426.5-575637224048.9-572520331.07-51.97 5.97 +1.46 +1.70 K4III +0.055-0.007 -032 -8621 BD+56 2821 214665 34651 I 16140 14260 223441.8+561634223837.9+564745105.48-01.51 5.21R +1.58 +1.70 M4+III +0.053-0.029 -.013+008 5.2 30.9 * -8622 10 LacBD+38 4826 214680 72575 852 16148 223446.3+383147223915.7+390301 96.65-16.98 4.88 -0.20 -1.04 -0.22 O9V +0.001-0.005 -010V? 31 5.2 62.2 * -8623 CD-3118920 214690214000 I 14266 223447.6-311028224022.3-303932 18.02-61.20 5.87 +1.30 +1.44 K3III -0.103-0.209 +.014+079 -8624 41 PegBD+18 5021 214698108078 223456.2+190937223947.0+194052 85.16-33.36 6.21R 0.00 +0.08 A2V -0.004-0.010 -011V? 80 -8625 BD+74 978 214710 10440 I 223504.2+745106223713.0+752218114.63 14.71 5.79 +1.57 +1.91 M1IIIab +0.044+0.006 -007 -8626 BD+36 4902 214714 72581 16154 223502.8+370419223934.3+373534 95.93-18.27 6.03 +0.86 G3Ib-IICN-1CH2Fe-1 +0.008-0.001 -007V 5.7 19.5 * -8627 30 CepBD+62 2102 214734 20190 853 223506.0+630352223839.0+633504108.79 4.42 5.19 +0.06 0.00 A3IV -0.003-0.025 +.008+011SB2 140 -8628 18Eps PsACD-2716010 214748191318 854 14270 223507.5-273354224039.4-270237 25.49-60.97 4.17 -0.11 -0.37 -0.09 B8V e+0.030-0.001 +003 290 -8629 BD-04 5728 214810146239 W 223537.5-040429224048.0-033315 64.27-50.90 6.31 +0.52 0.00 F6V +0.003-0.042D+.012+012V 0.5 0.3AB 3* -8630 Bet OctCP-82 889 214846258941 924 223551.2-815421224603.3-812254308.35-34.38 4.15 +0.20 +0.11 +0.10 A9IV-V -0.067-0.001 +024SB 71 -8631 BD+13 4971 214850108094 16173 223555.3+140125224052.7+143258 81.67-37.65 5.71 +0.72 +0.22 G4V +0.268+0.144 +.032-010V 0.5 0.4AB 3* -8632 11 LacBD+43 4266 214868 52251 I 223607.6+434515224030.9+441635 99.56-12.57 4.46 +1.33 +1.36 +0.68 K2+III-IIIb +0.094+0.012 +.010-010V? < 17 * -8633 BD+53 2950 214878 34682 223614.2+531929224018.4+535046104.25-04.20 5.93 +0.93 K0III +0.001-0.014 -006 -8634 42Zet PegBD+10 4797 214923108103 855 16182 223628.4+101833224127.7+104953 78.86-40.66 3.40 -0.09 -0.25 -0.07 B8V +0.080-0.013 +.023+007V? 194 8.9 64.3 * -8635 CD-4714307 214953231257 W 14277 223639.3-474329224236.9-471238345.74-57.80 5.98 +0.58 +0.08 +0.32C G0V +0.009-0.326 +.067+017 4.0 7.8 * -8636 Bet GruCD-4714308 214952231258 856I Bet Gru 223641.8-472427224240.1-465305346.27-57.95 2.10 +1.60 +1.67 +1.65 M5III +0.137-0.008 +.008+002 * -8637 19 PsACD-3019267 214966191337 I 223648.4-295301224222.1-292139 20.76-61.58 6.17 +1.54 +1.90 M5III +0.028-0.015 -009V? -8638 BD+30 4771 214979 72625 I 223650.9+302636224131.4+305757 92.62-24.15 6.34R K5 +0.063 0.000 -035 -8639 CD-4415017 214987231260 14278 223650.3-444620224243.1-441452350.85-59.06 6.07 +0.98 +0.69 +0.46C K0III +0.042+0.037 +006V? * -8640 12 LacBD+39 4912 214993 72627 W DD Lac 223659.9+394211224128.6+401332 97.65-16.18 5.25 -0.14 -0.87 B2III -0.005-0.001 -015SB 53 4.0 69.0 * -8641 43Omi PegBD+28 4436 214994 90717 223703.6+284708224145.4+291827 91.71-25.59 4.79 -0.01 -0.01 -0.02 A1IV -0.004-0.027 +.024+009V 12 * -8642 BD+13 4974 214995108109 223701.1+135939224157.4+143059 81.92-37.83 5.90 +1.11 gK0 +0.092-0.021 -.010-026V -8643 BD+40 4885 215030 52270 223707.8+410129224136.1+413258 98.35-15.04 5.94R G9III +0.148+0.065 +.001-014 -8644 Rho GruCD-4216049 2151042312653818 W 223742.1-415608224330.0-412452356.00-60.20 4.85 +1.03 +0.80 +0.65 K0III +0.006-0.095 +.030+029V? 9.1 14.2 * -8645 BD-09 6038 215114146271 16208 223749.0-085006224303.5-081842 58.68-54.29 6.45 +0.17 +0.12 A5V +0.024-0.006D+.004+005V? 1.1 2.5AB 4* -8646 CP-61 6676 215121255299 223748.4-610127224416.5-602958326.89-50.30 6.30 +0.56 F3V +0.004+0.025 -006V -8647 67 AqrBD-07 5838 2151431462733819 223800.9-072911224314.3-065746 60.56-53.52 6.41 -0.04 -0.11 A0Vn +0.030-0.008 +002 142 -8648 BD+53 2960 215159 347133817I 223815.3+532308224220.8+535432104.55-04.29 6.12 +1.62 K2 -0.001-0.006 +009 -8649 66 AqrBD-19 6324 215167165252 I 14291 223812.4-192113224335.3-184949 41.88-59.52 4.69 +1.37 +1.56 +0.72 K4III -0.027-0.028 +.013+022 < 19: * -8650 44Eta PegBD+29 4741 215182 90734 857I 16211 14285 223818.8+294153224300.1+301317 92.50-24.95 2.94 +0.86 +0.55 +0.48 G2II-III+F0V +0.015-0.025 +.017+004SB1O 9 5.1 90.4AxBC 6* -8651 BD+37 4670 215191 72652 223822.9+371645224255.5+374810 96.64-18.42 6.43 -0.09 -0.81 B1V +0.011-0.009 -018SB * -8652 BD+46 3803 215242 52296 16214 14290 223845.3+463841224304.5+471007101.40-10.27 6.39 +0.47 -0.06 A1V+G: +0.014-0.002D+.002-017SB 1.6 0.5AxBC 3* -8653 BD+10 4805 215243108131 223843.7+102510224342.7+105621 79.52-40.92 6.51 +0.46 0.00 G8IV +0.015-0.168 -002 =< 6 * -8654 BD+38 4855 215359 72675 I 16228 223934.2+385629224405.2+392756 97.71-17.09 5.95 +1.48 K5III+K2III +0.007-0.021 +.010-027SB 3.5 2.7AB 3* -8655 Eta GruCP-5410123 2153692475703821 W 223929.7-540134224537.9-533001335.60-54.90 4.85 +1.18 +1.17 K2IIICNIV +0.029+0.014 +.005+028SB 6.6 24.4 -8656 13 LacBD+41 4594 215373 52317 858I 16227 223937.8+411740224405.5+414909 98.91-15.04 5.08 +0.96 +0.78 K0III -0.007+0.004 +.010+013V? < 19: 5.8 14.6 * -8657 CD-4714320 215405231278 223946.5-470421224540.7-463251346.39-58.57 5.51 +1.32 +1.43 +0.60C K2III -0.031-0.020 -.003+042V? -8658 CD-4913955 215456231285 224007.4-493012224608.0-485844342.31-57.46 6.62 +0.63 F9V +0.203-0.050 -019 -8659 CD-5013788 215504231287 224027.9-501215224628.3-494109341.14-57.14 6.48 +1.14 K1III +0.089-0.277 +002 -8660 45 PegBD+18 5046 2155101081541596 224036.2+185021224528.2+192200 86.26-34.39 6.25 +1.05 gG6 -0.026+0.056 -022V? -8661 BD+51 3460 215518 34757 I 224038.9+515929224449.2+523102104.21-05.69 6.55R K2 -0.001+0.012 +005 -8662 CD-4714331 215545231290 W 224048.6-472758224643.7-465622345.57-58.54 6.56 +0.30 +0.11 +0.16C A9IIIm: +0.058+0.004 -001SB 3.0 10.5 * -8663 Xi OctCP-80 1055 215573258946 224103.3-803905225022.9-800727309.03-35.53 5.35 -0.15 -0.50 B6IV +0.017-0.022 +016V? 0 -8664 CP-77 1554 215631258069 224121.6-773443224940.9-770302311.22-38.05 6.73 +0.11 +0.10 A4V +0.071+0.013 -009 -8665 46Xi PegBD+11 4875 215648108165 I 16261 224141.8+113936224641.6+121022 81.28-40.39 4.19 +0.50 -0.03 +0.31 F6III-IV +0.235-0.498 +.052-005V 7 7.5 145.0AC 3* -8666 BD+43 4300 215664 52348 14311 224143.9+440108224610.2+443246100.60-12.83 5.76 +0.36 +0.08 F0III-IV +0.140+0.032 +.019-010 * -8667 47Lam PegBD+22 4709 215665 90775 859I 224142.8+230222224631.9+233356 89.26-31.02 3.95 +1.07 +0.91 +0.51 G8IIIa* +0.058-0.010 +.042-004 < 19: * -8668 CD-3415735 215669214081 224142.6-344122224719.1-340940 10.46-62.51 6.28 +1.16 K1III -0.066+0.048 +041 -8669 CP-62 6369 215682255321 224152.4-621242224821.4-614103325.03-49.83 6.37 +1.06 +0.90 K0III +0.069+0.003 -018 -8670 68 AqrBD-20 6486 2157211652931597I 224210.9-200806224733.1-193648 41.10-60.68 5.26 +0.94 +0.59 G7III -0.101-0.204 +.034+023 -8671 CD-3815217 215724214087 224206.1-384450224747.1-381319 1.85-61.88 6.71 +0.48 -0.02? F4IV -0.068-0.076 +027 -8672 CP-71 2726 215729258070 224208.9-705236224917.4-702052316.54-43.41 6.34 +0.07 +0.10 A2V +0.005+0.040 +008 -8673 69Tau1AqrBD-14 6346 215766165298 16268 224224.2-143501224742.8-140323 51.06-58.35 5.66 -0.05 -0.25 A0V +0.032-0.009 +015SB 71 3.9 23.7AB 3* -8674 CD-2616324 2157821914123824 224226.9-262611224756.2-255443 28.36-62.41 6.30 +0.91 G5III +0.112-0.114 -026V -8675 Eps GruCD-5113389 215789247593 860 14320 224230.9-515034224833.3-511901338.31-56.53 3.49 +0.08 +0.10 +0.07 A3V +0.108-0.071 +.044+000V 236 -8676 70 AqrBD-11 5923 2158741653083825 FM Aqr 224314.5-110501224830.2-103320 56.80-56.68 6.19 +0.28 A9III-IV +0.035+0.007 -006 * -8677 BD+57 2612 215907 34824 224324.7+575719224723.2+582858107.31-00.57 6.36 -0.04 -0.03 B9.5IV +0.007+0.001 +004V 73 -8678 BD+36 4934 215943 72732 14321 224336.2+365326224810.9+372500 97.40-19.27 5.90 +1.03 +0.83 gG8 -0.055-0.058 -025 -8679 71Tau2AqrBD-14 6354 216032165321 861I W 14329 224417.9-140714224935.5-133533 52.27-58.52 4.01 +1.57 +1.95 +0.95 M0III -0.012-0.038 +.021+001 4.5 132.5 * -8680 CD-3316244 216042214119 W 224424.9-332002224959.1-324819 13.31-63.19 6.33 +0.31 F0V+F3V -0.050-0.017D+.015+024 0.2 0.3 * -8681 BD+09 5111 216048108204 224431.8+095703224932.3+102844 80.64-42.17 6.54 +0.29 +0.05 F0IV-V +0.091-0.031 -008V? 129 -8682 BD+53 2993 216057 34845 224438.7+535311224847.8+542454105.62-04.28 6.12 -0.07 -0.49 B5Vne -0.018+0.007 -019V? 358 * -8683 BD+62 2115 216102 20253 224457.8+622440224844.2+625618109.49 3.32 6.06 +1.20 K0 +0.007-0.052 -027 -8684 48Mu PegBD+23 4615 216131 90816 862I 224510.5+240425225000.2+243606 90.68-30.56 3.48 +0.93 +0.68 +0.47 G8+III +0.147-0.042 +.040+014 7 -8685 CD-3914848 2161492141341599 224520.7-394111225102.2-390925359.57-62.25 5.42 +1.43 +1.69 M0III +0.022-0.011 -.001+027 -8686 CP-60 7610 2161692553363826 224526.7-602441225144.9-595253326.58-51.40 6.46 +1.13 K1IIICNII -0.046-0.009 +000 -8687 BD+67 1468 216172 20259 16291A 224536.0+680222224900.7+683413112.09 8.31 6.19R F5V +0.112+0.068 +.025+003V? 0.2 4.3AB 3* -8688 BD+55 2820 216174 34858 I 224538.5+552221224946.2+555410106.42-03.02 5.43 +1.17 +1.12 K1III +0.083+0.043 -036 -8689 CP-63 4826 216187255339 W 224540.6-634304225209.9-631119322.94-49.05 6.12 +1.03 +0.94 K0III +0.016-0.040 -004 3.0 0.9 -8690 14 LacBD+41 4623 216200 52412 S V360 Lac 224551.0+412526225021.8+415713100.04-15.47 5.92 +0.08 -0.51 B3IV: e+0.010 0.000 -014SB2 225 1.0 * -8691 BD+18 5059 216201108211 224545.4+183642225039.1+190827 87.35-35.25 6.40R K0 +0.050-0.020 -039 -8692 BD+49 3954 216206 34862 224552.6+500850225010.2+504037104.10-07.71 6.21 +1.14 +0.89 G4Ib +0.013+0.004 -009SB? -8693 21 PsACD-3019324 216210191444 224550.1-300358225120.9-293210 20.59-63.54 5.97 +0.91 +0.59 G8/K0III -0.004-0.011 +005V? -8694 32Iot CepBD+65 1814 216228 20268 863I 224607.1+654028224940.8+661202111.07 6.18 3.52 +1.05 +0.90 +0.51 K0-III -0.065-0.125 +.041-012 < 19: * -8695 22Gam PsACD-3316270 216336214153 W 14338 224658.1-332421225231.6-325232 13.06-63.72 4.46 -0.04 -0.14 +0.02 A0III* -0.030-0.025 +.043+017V? 55 3.6 4.2 * -8696 BD+60 2450 216380 20281 16317 224728.2+610954225122.8+614149109.20 2.07 5.60 +0.78 +0.39 G8III-IV+G2IV +0.108+0.044 +.005+002 1.2 1.6AB 3* -8697 49Sig PegBD+09 5122 2163851278103828 224719.9+091813225224.1+095008 80.87-43.10 5.16 +0.48 -0.01 F7IV +0.522+0.044 +.043+012SB 0 8.4 248. * -8698 73Lam AqrBD-08 5968 216386146362 864I Lam Aqr 224723.8-080642225236.9-073447 62.19-55.73 3.74 +1.64 +1.74 +1.19 M2.5IIIaFe-1 e+0.011+0.037 +.017-009 * -8699 15 LacBD+42 4521 216397 52436 I 16325 224731.3+424651225202.0+431845100.97-14.41 4.94 +1.56 +1.94 +0.72E M0III +0.110+0.029 +.021-017V 6.0 104.4AC 5* -8700 Tau1GruCD-4913988 216435231343 I' 224742.7-490740225337.9-483553341.70-58.71 6.04 +0.62 +0.19 G0V +0.216-0.078 +.042-001 * -8701 Rho IndCP-70 2971 216437258084 865I' 224742.3-703628225439.4-700425316.27-43.90 6.05 +0.66 +0.24 G2-3IV -0.050+0.072 -003 -8702 BD+82 703 216446 3794 16294 224752.7+823724224729.0+830914119.16 21.21 4.74 +1.26 +1.35 +0.67 K3III +0.021+0.049 -.018-031 < 19: 4.7 3.5 -8703 BD+16 4831 2164891082313829 IM Peg 224806.9+161838225302.3+165028 86.36-37.48 5.64 +1.12 +0.90 K1-2II-III e-0.018-0.024 -012SB1O * -8704 74 AqrBD-12 6371 216494165359 S HI Aqr 224812.8-120854225328.7-113700 56.42-58.28 5.80 -0.08 -0.31 -0.05 B9III +0.025+0.001 -007SB2O 5 0.5 0.1 * -8705 BD+49 3962 216523 34917 224832.3+495251225252.3+502443104.37-08.14 6.46 -0.04 -0.34 B8V +0.019-0.011 -011V? -8706 BD+39 4957 216538 72812 14346 224837.1+393809225311.3+401002 99.67-17.30 6.34 -0.08 -0.44 B7III-IV +0.001-0.009 +007 15 -8707 BD+59 2595 216595 349213830I 224904.3+593409225303.8+600604108.68 0.55 6.01 +1.75 sgK2 +0.017+0.002 -007SB -8708 BD+43 4331 216608 52465 16345 224911.5+441302225340.1+444457101.91-13.26 5.81 +0.26 +0.10 +0.14 A3Vm+F6V -0.016-0.013 +.018+012SB 40 1.5 0.9AB 3* -8709 76Del AqrBD-16 6173 216627165375 866 14356 224920.6-162110225439.0-154915 49.58-60.67 3.27 +0.05 +0.08 +0.04 A3V -0.040-0.025 +.038+018V 71 * -8710 78 AqrBD-07 5886 216637146382 224921.7-074410225434.1-071217 63.25-55.87 6.19 +1.28 +1.41 K3III -0.012-0.038 +009V? -8711 77 AqrBD-17 6619 216640165376 14358 224928.0-164808225445.5-161619 48.79-60.90 5.56 +1.14 +1.09 K2.5IIIb -0.222-0.090 +.019-036V -8712 BD+39 4964 216646 52471 224931.7+395037225407.0+402237 99.94-17.20 5.81 +1.13 K0III +0.103+0.036 -006 * -8713 CD-3714981 2166662141823831 224938.2-365518225514.9-362319 5.02-63.75 6.40 +1.31 K2III +0.046+0.002 -026 -8714 BD+16 4833 216672108246 I HR Peg 224939.8+162434225435.7+165630 86.83-37.61 6.12 +1.77 +1.86 S4+/1+ +0.019-0.008 +011 * -8715 1 PscBD+00 4939 216701127836 224952.5+003155225459.5+010353 73.39-50.26 6.11 +0.20 +0.15 A7III +0.023+0.001 +013 -8716 BD-05 5885 216718146388 16365 14360 224959.8-053114225511.0-045916 66.38-54.55 5.72 +0.88 +0.60 K0III-IV +0.034-0.005D+.012-009V? 2.0 0.6 * -8717 50Rho PegBD+08 4961 216735127839 225011.6+081657225513.7+084857 80.79-44.34 4.90 0.00 0.00 -0.02 A1V +0.079+0.014 +.006-010SB? 97 -8718 BD+36 4956 216756 728381600 225023.5+363237225502.6+370437 98.51-20.21 5.91 +0.42 -0.08 F5II +0.086+0.007 -028 =< 10 -8719 CD-3217312 216761214187 225020.3-320959225551.4-313759 15.79-64.50 6.10 +1.36 +1.52 K3III -0.033-0.006 +022V -8720 23Del PsACD-3316303 216763214189 I W 225024.6-330426225556.9-323223 13.69-64.46 4.21 +0.97 +0.69 +0.61 G8III +0.018+0.031 +.021-012 5.0 5.2 * -8721 CD-3217321 216803214197 TW PsA 225050.3-320541225624.0-313356 15.94-64.61 6.48 +1.10 +1.02 +0.59 K4V +0.327-0.162 +.130+006V * -8722 Tau3GruCD-4814364 2168232313643832 225058.1-483011225647.8-475809342.17-59.49 5.70 +0.22 +0.19 +0.12 Am -0.028-0.001 +006 -8723 BD+35 4917 216831 72851 16376 225104.8+354905225544.5+362106 98.28-20.92 5.74 -0.05 -0.38 B7III +0.022+0.005 +001 70 3.7 51.0 * -8724 BD+11 4904 216900108275 16389 225151.4+111852225651.5+115054 83.69-42.13 6.51 +0.18 +0.05 A3V s +0.063-0.009D+.008+008 3.0 3.9 -8725 16 LacBD+40 4949 216916 52512 16381 EN Lac 225149.6+410412225623.6+413614100.92-16.30 5.59 -0.14 -0.83 B2IV -0.002 0.000 -007SB1O 23 3.6 62.1AC 3* -8726 BD+48 3887 216946 52516 I 14368 225202.8+491159225626.0+494401104.59-09.00 4.95 +1.78 +1.96 +1.05 K5Ib +0.003-0.002 -.001-010V? * -8727 BD-05 5894 216953146404 225206.6-052040225717.2-044836 67.22-54.82 6.31 +0.94 +0.72 G9III -0.015+0.002 -009V? -8728 24Alp PsACD-3019370 216956191524 867I 14372 225207.6-300908225739.1-293720 20.49-64.90 1.16 +0.09 +0.08 +0.02 A3V +0.333-0.165 +.149+007 100 * -8729 51 PegBD+19 5036 217014 90896 14374 225233.1+201357225727.9+204608 90.06-34.73 5.49 +0.67 +0.21 +0.34 G2.5IVa +0.204+0.059 +.074-031V 2 * -8730 BD+03 4799 2170191278603834 225227.2+031629225732.8+034837 76.91-48.62 6.28 +1.12 +1.08 K1III +0.070+0.029 +011 -8731 BD+47 3985 217050 525263833 EW Lac 225239.2+480859225704.5+484103104.22-09.99 5.43 -0.09 -0.53 B4IIIep v+0.012-0.009 -022SB 350 * -8732 CD-3615650 217096214215 225301.0-360319225835.0-353123 6.64-64.59 6.13 +0.58 F8III-IV -0.001-0.111 +021 * -8733 BD+38 4904 217101 728833835 225303.5+384627225740.7+391832100.07-18.46 6.18 -0.15 -0.80 B2IV-V +0.002-0.008 -016 168 * -8734 BD-03 5539 2171071464123836 D 225306.5-025548225815.5-022343 70.47-53.32 6.16 +0.74 +0.43 G8IV -0.003-0.018 -012V? 1.3 0.0 * -8735 BD-02 5858 217131146415 225314.6-015643225823.7-012437 71.66-52.64 6.37 +0.35 +0.02 F0-2V +0.090-0.007 -014 * -8736 BD+84 517 217157 3808 225328.8+845017225102.2+852225120.41 23.10 5.90 +1.32 K5 +0.003+0.107 -030 -8737 BD+08 4973 217166127870 16417 14379 225330.9+084932225835.1+092125 82.17-44.40 6.43 +0.64 +0.16 +0.36 G2V+G4V +0.403-0.141 +.035-027V 0.2 0.2AB 3* -8738 BD+06 5092 217186127874 225340.0+064823225842.6+072023 80.50-46.04 6.33 +0.06 +0.02 A1V -0.040-0.080 -001 56 -8739 52 PegBD+10 4859 217232108307 16428 225411.6+111139225911.8+114344 84.23-42.55 5.75 +0.32 +0.08 A8V+F6V +0.033-0.041D+.014+020V? 1.3 0.7 * -8740 CD-3019383 217236191550 14380 225407.6-295954225935.8-292744 20.89-65.33 5.51 +0.25 +0.19 A5n -0.003+0.009 +000 90 * -8741 BD-13 6318 217251165425 I 225419.7-133625225935.7-130415 55.63-60.33 6.07 +1.45 +1.76 K5III -0.010 0.000 +013V? -8742 2 PscBD+00 4950 217264127881 16431 225419.9+002544225927.4+005746 74.59-51.08 5.43 +0.98 +0.83 gK1 +0.086-0.071 -013V? 7.7 3.9 -8743 CD-2516220 217303191554 I 225441.0-254154230005.8-250951 31.11-64.99 5.65 +1.25 +1.20 gK0 +0.035-0.075 -035 -8744 BD+51 3514 217314 350223838I 225450.3+520704225910.3+523916106.24-06.54 6.29 +1.42 K2 -0.025+0.033 +028 -8745 BD+59 2615 217348 35026 225503.1+591644225909.0+594853109.25-00.04 6.43 +0.03 -0.24 B9III +0.003+0.005 -011V? -8746 CD-2616419 217358191565 225459.1-260943230024.6-253736 30.06-65.14 6.29 +1.13 K1III +0.086-0.034 -025 -8747 Zet GruCP-5310382 217364247680 868 225458.6-531725230052.8-524515334.11-57.16 4.12 +0.98 +0.70 +0.53 G8-K0III -0.067-0.014 +.039-001SB -8748 BD+83 640 217382 38161649 225512.8+834840225424.8+842046119.95 22.17 4.71 +1.43 +1.69 +0.73 K4III +0.092+0.026 +.001+003 < 17 * -8749 CD-5113446 217403247683 225514.9-512912230107.5-505700336.68-58.33 5.68 +1.42 +1.08 +0.54E K3III +0.078-0.006 +008 -8750 3 PscBD-00 4443 2174281464433840 Var? 225530.2-002104230037.9+001109 74.11-51.86 6.21 +0.89 +0.60 G4III +0.044+0.013 -016 * -8751 BD+02 4594 217459127894 I 225537.2+022839230042.9+030042 77.06-49.74 5.83 +1.34 +1.57 +0.50E K4III +0.011-0.086 +019V * -8752 BD+56 2923 217476 350393839I V509 Cas 225552.1+562432230005.1+565643108.16-02.70 5.00 +1.42 +1.16 +0.85 G40 v 0.000-0.003 +.002-058V? 35 * -8753 BD+30 4859 217477 72924 16443 225556.1+303246230042.5+310459 96.64-26.07 6.60 -0.04 -0.35 B9IIIpMn +0.031+0.005 +001V? 35 2.5 3.4 * -8754 CD-2918537 217484191581 I 225551.8-292325230119.4-285113 22.39-65.68 5.55 +1.35 +1.51 K3III +0.066-0.010 -025V -8755 BD+44 4302 217491 52587 225602.6+445018230034.4+452230103.32-13.23 6.50 A3V +0.010+0.002 -004V? -8756 CD-2317706 2174981915853842 225600.4-231938230123.0-224727 36.71-64.73 6.28 +0.13 A5V +0.026-0.027 -012 -8757 81 AqrBD-07 5910 217531146447 I 225611.8-073553230123.6-070340 65.42-57.08 6.21 +1.41 +1.77 K5III -0.015-0.011 -002V? -8758 BD+37 4744 217543 72929 14386 225615.4+381016230054.7+384229100.39-19.28 6.54 -0.11 -0.65 B3Vpe +0.001-0.005 -016SB 370 * -8759 BD-05 5910 217563146451 D 225621.1-051456230131.7-044241 68.60-55.53 5.94 +1.00 +0.75 K0 +0.019+0.009 +006 * -8760 CD-3715047 217642214261 W 225700.4-365728230234.0-362515 4.16-65.17 6.47 +0.94 +0.71 K1III +0.031-0.035D+.003+000 3.0 2.0 * -8761 BD+56 2927 217673 35062 I 225716.8+563405230130.7+570620108.40-02.63 6.20 +1.50 +1.53 K1.5II -0.003-0.007 -006 -8762 1Omi AndBD+41 4664 217675 52609 869 S Omi And 225719.1+414719230155.3+421934102.21-16.10 3.62 -0.09 -0.53 -0.08 B6IIIpe+A2p v+0.023-0.006 +.015-014SB2O 330 0.5 0.3 S 4* -8763 82 AqrBD-07 5913 217701146465 I 225721.0-070639230232.6-063427 66.44-56.97 6.15 +1.58 +1.90 +0.87E M2III -0.004-0.037 -008V? * -8764 BD-21 6354 217703191604 225723.9-212418230244.3-205214 41.20-64.46 5.97 +0.94 K0III-IV -0.058-0.117 +026V? -8765 BD+31 4829 217754 72949 225746.8+311435230233.1+314650 97.38-25.63 6.57 +0.35 +0.08 F2IV +0.005-0.016 -017 7 -8766 2 AndBD+41 4665 217782 52623 16467 14396 225800.0+421312230236.3+424528102.52-15.76 5.10 +0.09 +0.11 A3Vn +0.055-0.004 +.034+002SB 190 3.7 0.4AB 3* -8767 Pi PsACD-3515630 2177922142751601 Pi PsA 225757.8-351724230329.8-344458 7.99-65.72 5.11 +0.29 +0.02 F0V+F3V +0.076+0.080 +.052-006SBO 0 * -8768 BD+43 4378 217811 52626 16472 LN And 225810.7+433115230245.2+440332103.11-14.59 6.39 0.00 -0.58 B2V +0.001-0.002 -008 25 3.9 7.4 * -8769 CP-69 3301 2178312553953843 225815.8-692139230452.2-684913316.28-45.45 5.52 +0.36 +0.12 F4III +0.040+0.063 +004SB 87 -8770 BD+54 2900 217833 35092 16474 V638 Cas 225825.2+544153230243.8+551411107.79-04.41 6.50 -0.08 -0.55 B9IIIHe wk v+0.008+0.012 -013 3.6 19.5AB 4* -8771 CD-4216177 217842231419 225821.8-420108230359.5-412842352.86-63.75 5.79 +1.08 +0.95 K0III +0.006+0.069 -015 -8772 BD-05 5917 217877146482 225844.7-052005230357.3-044743 69.23-56.02 6.68 +0.58 +0.06 F8V +0.320+0.028 -014V * -8773 4Bet PscBD+03 4818 2178911279341602 14410 225847.2+031654230352.6+034912 78.79-49.61 4.53 -0.12 -0.49 -0.13 B6Ve v+0.013-0.011 +000 128 * -8774 Kap GruCP-5410197 2179022477113845 225844.9-543004230439.6-535754331.77-56.77 5.37 +1.45 +1.75 K5III +0.055-0.102 +.012+018V? * -8775 53Bet PegBD+27 4480 217906 90981 870I 16483 Bet Peg 225855.5+273225230346.5+280458 95.74-29.05 2.42 +1.67 +1.96 +1.32 M2.5II-III e+0.189+0.137 +.022+009V 7.0 253.1AC 3* -8776 BD+05 5123 217926127937 225857.3+060438230401.0+063700 81.40-47.41 6.41 +0.39 +0.03 F2V +0.003+0.019 +004 68 -8777 BD+59 2631 217943 20393 16481 225915.3+595424230323.7+602643109.99 0.32 6.74 -0.02 -0.63 B2V +0.007-0.006 -017SB 2.7 33.9 * -8778 BD+57 2676 217944 35103 225908.2+580132230321.6+583353109.22-01.40 6.43 +0.90 +0.52 G8IV +0.067+0.017 +015 -8779 BD+66 1575 218029 203983844I 225944.2+664012230332.9+671233112.75 6.50 5.24 +1.26 +1.40 K3III +0.026+0.007 -.002-007V < 17 -8780 3 AndBD+49 4028 218031 52649 I 225941.5+493030230411.0+500308105.86-09.23 4.65 +1.06 +0.88 +0.57 K0IIIbFe-0.5 +0.164+0.168 +.004-035 < 17 -8781 54Alp PegBD+14 4926 218045108378 871I 14417 225946.7+144002230445.7+151219 88.28-40.38 2.49 -0.04 -0.05 -0.03 B9V +0.063-0.042 +.038-004SB 148 * -8782 83 AqrBD-08 6018 218060146498 16497 225956.9-081401230509.8-074137 65.67-58.20 5.43 +0.30 +0.07 F2IV+F0V +0.129+0.011 +.021-013SB 101 0.2 0.2AB 3* -8783 BD-17 6661 2180611654813846I W 225955.4-173704230512.8-170445 49.67-63.50 6.14 +1.37 K0 -0.048-0.039 -015 5.1 56.1 -8784 BD+15 4760 218101108383 230009.8+160145230506.3+163347 89.29-39.26 6.44 +0.83 +0.55 G8IV -0.185-0.194 +.025-027 -8785 BD+00 4963 218103127960 230010.6+004605230517.6+011825 76.72-51.78 6.39 +0.94 +0.72 G9III +0.035-0.027 -012 -8786 CP-80 1064 2181082581053847 230015.3-800113230823.7-792851308.60-36.49 6.12 +0.14 +0.10 A3-4V +0.084-0.038 -007 -8787 The GruCD-4415149 218227231444 W 230114.8-440337230652.8-433114348.24-63.30 4.28 +0.42 +0.16 +0.18 F5mDel Del -0.039-0.023 +.017+010V? 80 2.5 1.2AB 3* -8788 BD+17 4866 218235108400 230119.9+175833230618.2+183103 90.87-37.72 6.13 +0.44 +0.10 F6V s +0.232+0.057 +.016-012SB * -8789 86 AqrCD-2417497 218240191651 I 16511 230118.6-241700230640.9-234435 35.23-66.15 4.47 +0.90 +0.58 +0.49 G9III +0.066-0.003 +.028+015 10.0 2.9 * -8790 Ups GruCD-3914936 218242214313 W 230119.6-392559230653.6-385332357.92-65.25 5.61 +0.01 A1V +0.040+0.013 +016V 2.3 1.1 -8791 CD-5013885 218255231445 230123.7-500849230709.5-493624337.56-59.92 6.33 +1.45 K4III +0.017-0.014 +022 -8792 BD+19 5058 218261108402 230134.0+192213230631.9+195439 91.79-36.54 6.30 +0.49 +0.02 F7V +0.295+0.002 -005V? 7 * -8793 CD-5113471 218269247739 W 230128.1-511335230714.7-504111335.89-59.25 5.83 +0.48 F6-7IV-V -0.044-0.020 +004V? 0.8 8.5 * -8794 CP-74 2054 218288258106 230138.2-740738230835.7-733511312.37-41.60 6.15 +1.42 +1.68 K3III +0.021-0.011 +005 * -8795 55 PegBD+08 4997 2183291279761603I 14428 230157.9+085209230700.3+092434 84.62-45.55 4.52 +1.57 +1.90 +1.02 M1IIIab +0.011-0.014 +.016-005V -8796 56 PegBD+24 4716 218356 910193848I 14429 230214.3+245542230706.8+252806 95.12-31.71 4.76 +1.34 +1.16 +0.68 G8Ib +0.004-0.031 +.006-027SB < 17 * -8797 1 CasBD+58 2545 218376 35147 230223.0+585245230636.9+592511109.95-00.78 4.85 -0.03 -0.87 -0.11 B0.5IV +0.009+0.001 -009V 50 * -8798 BD+32 4587 218395 73010 16519A 14430 230240.7+321705230727.7+324933 98.92-25.15 6.02R +0.12 +0.11 A4Vn -0.024+0.008D+.011-001V 165 1.5 8.4 * -8799 BD+20 5278 218396 910223850 Var 230232.6+203541230728.7+210803 92.76-35.57 5.99 +0.26 -0.04 A5V +0.108-0.052 -012 45 * -8800 BD+45 4147 218407 52707 230243.3+453138230718.1+460405104.71-13.09 6.66 -0.05 -0.68 B2V +0.005-0.001 -015SB1O 160 * -8801 BD+52 3371 218416 35151 230244.1+521632230710.1+524859107.42-06.89 6.11 +1.05 K0III +0.013+0.006 +005 -8802 CD-2918588 218434191674 230256.5-292150230821.0-284924 22.62-67.22 5.60 +0.88 +0.54 G9III -0.047-0.031 +019V -8803 BD+58 2546 218440 35152 230256.7+591112230710.4+594339110.13-00.53 6.40 -0.01 -0.63 B2V +0.005+0.001 -005SB2O * -8804 4 AndBD+45 4149 218452 527113852I 16526 230304.8+455049230739.3+462314104.90-12.82 5.33 +1.41 +1.72 +0.75 K5III -0.009-0.028 -006V? 5.5 48.2 * -8805 5 AndBD+48 3944 218470 527131604 230312.7+484504230745.4+491745106.09-10.16 5.70 +0.44 -0.03 F5V +0.154+0.133 +.021-002V? 9 -8806 BD+43 4399 218525 52717 230335.2+440114230812.3+443342104.24-14.53 6.56 +0.17 +0.20 A2IV +0.024-0.005 +002V 70 -8807 5 PscBD+01 4686 2185271279933854 230333.6+013500230840.9+020740 78.61-51.68 5.40 +0.91 +0.56 G8III-IV +0.145+0.108 -018V? -8808 BD+62 2171 218537 20439 16530 230342.7+630532230747.7+633800111.73 3.04 6.26 -0.02 -0.60 -0.06 B3V +0.002-0.004D+.006-019 180 0.5 0.2 * -8809 CP-67 3949 218558255420 230348.2-672402231011.7-665127317.29-47.35 6.47 +0.95 +0.72 K0III +0.201+0.038 -006 -8810 CP-81 1024 218559258961 230350.3-812719231212.0-805446307.59-35.30 6.41 +1.50 +1.84 K4III +0.009-0.011 +011 -8811 BD+63 1931 218560 204413853 230353.6+634052230757.2+641321111.97 3.58 6.21 +1.10 K0 +0.010+0.001 -028 -8812 88 AqrBD-21 6368 218594191683 873I 230406.9-214255230926.8-211021 41.76-66.03 3.66 +1.22 +1.24 +0.60 K1III +0.055+0.031 +.010+021 -8813 CD-2818099 2186191916863855I 230420.5-283751230944.6-280519 24.56-67.49 5.87 +1.31 +1.42 K2III +0.022+0.003 -014V -8814 CD-4315281 218630231464 W 230424.3-432409230957.3-425138348.92-64.11 5.81 +0.48 -0.02 F4IV -0.325-0.007 +.042+012 3.4 1.0 -8815 57 PegBD+07 4981 218634128001 I 16550 GZ Peg 230428.5+080807230931.5+084038 84.77-46.51 5.12 +1.47 +1.01 +1.26 M4IIIS+A2V +0.004+0.002 +.007+014SB =< 50 5.5 32.9 * -8816 BD-15 6360 2186391655223856 230433.9-150309230949.6-143038 55.87-63.19 6.42 +0.01 +0.01 A0Vn +0.031-0.009 +015V? 154 -8817 89 AqrCD-2317771 218640191687 I W 230434.5-225958230954.8-222727 38.81-66.53 4.69 +0.65 +0.39 +0.36 G2IV+A2V +0.026-0.009 +.040-005 0.8 0.4 * -8818 CD-4115163 218655231465 I 14441 230435.8-410757231009.8-403530353.60-65.18 5.83 +1.62 +1.84 M4III +0.035-0.046 -007 * -8819 33Pi CepBD+74 1006 218658 10629 I 16538 230442.9+745049230753.9+752315116.42 13.84 4.41 +0.80 +0.46 +0.43 G2III +0.012-0.030 +.006-019SB1O 22 2.2 1.0AB 3* -8820 Iot GruCD-4514947 2186702314681605 230442.0-454718231021.6-451448344.27-62.93 3.90 +1.02 +0.86 +0.53 K1III +0.136-0.030 +.030-004SB1O * -8821 58 PegBD+09 5170 218700128007 230459.3+091648231001.5+094919 85.83-45.62 5.39 -0.08 -0.29 B9III -0.012-0.012 +009V 175 * -8822 2 CasBD+58 2552 218753 35186 16556 Var? 230527.3+584725230944.1+591959110.28-01.02 5.70 +0.33 +0.32 A5III -0.003+0.009 -012V? 4.3 167.2AC 8* -8823 CD-3019460 218759191703 230522.3-300358231046.6-293130 20.81-67.76 6.51 +0.27 F1III-IV -0.034-0.058 +025 =< 15 -8824 BD+16 4882 218792108443 I 230544.4+170309231042.6+173540 91.45-39.04 5.71 +1.34 +1.51 K4III +0.021-0.028 +002V? -8825 6 AndBD+42 4592 218804 527613857 230549.8+430025231027.2+433239104.21-15.62 5.94 +0.44 -0.05 F5IV -0.191-0.191 +.023-043 18 -8826 59 PegBD+07 4991 2189181280221606 230641.2+081037231144.2+084312 85.47-46.77 5.16 +0.13 +0.08 A5Vn -0.006-0.006 +.029+010V 214 -8827 60 PegBD+26 4580 218935 91080 W 230657.8+261826231149.2+265050 96.95-30.95 6.17 +0.94 +0.67 G8III-IV -0.190-0.120 +.026-010 3.3 231.5AC 3* -8828 CD-5013915 219023231493 W 230733.5-500944231315.0-493708336.26-60.67 6.80 +0.92 G8-K0III +0.002-0.018 -026 1.6 0.5 -8829 CP-63 4862 219077255435 230756.6-631357231406.6-624200320.42-51.00 6.12 +0.79 +0.35 G8V +0.473-0.424 +.032-026 -8830 7 AndBD+48 3964 219080 52787 230757.9+485136231233.0+492423106.87-10.36 4.52 +0.29 +0.04 +0.16 F0V +0.092+0.098 +.051+013SB 59 * -8831 BD+28 4548 219110 91095 230812.7+285355231304.0+292630 98.52-28.73 6.35 +0.93 +0.61 G8III -0.031-0.033 +004 -8832 BD+56 2966 219134 35236 875 W 14458 230827.8+563658231317.0+571006109.87-03.19 5.56 +1.01 +0.89 +0.53 K3V +2.075+0.296 +.152-018V 3.8 106.6 * -8833 BD+10 4902 2191391084633858 16603 230824.5+103116231326.5+110354 87.78-45.01 5.82 +1.01 +0.91 G8III -0.005-0.003 +016V 3.9 33.3 * -8834 90Phi AqrBD-06 6170 2192151465851607I 230908.6-063517231419.4-060256 70.94-58.74 4.22 +1.56 +1.90 +1.08 M1.5III +0.042-0.196 +.010-000 * -8835 CD-4115197 2192632315123859 230925.8-413850231458.6-410620351.53-65.76 5.77 +1.18 +1.14 K2III +0.112-0.112 +026SB -8836 BD-11 6032 219279165578 I 16618 230927.4-111357231440.2-104119 64.11-61.92 6.12 +1.49 +1.80 K5III -0.001-0.034 -034V? 4.5 3.5AB 4* -8837 BD+49 4071 219290 35251 230940.1+500425231414.3+503704107.59-09.34 6.31 A0V +0.038-0.006 -014 56 -8838 BD+28 4555 219291 91111 W 230930.1+291339231421.7+294618 98.97-28.54 6.41 +0.45 -0.01 F6IV w -0.007-0.013 +009 86 3.5 34.9 -8839 BD+23 4704 219310 91113 230940.5+233329231436.5+240611 96.20-33.69 6.36R K2III +0.114+0.007 -027 -8840 BD-04 5852 2194021465933860 231025.1-040229231534.3-032947 74.66-57.09 5.55 +0.06 +0.06 A3V -0.007-0.003 +011SB -8841 91Psi1AqrBD-09 6156 2194491465981608I 16633A 231039.1-093757231553.5-090516 67.07-61.11 4.21 +1.11 +0.99 +0.56 K0III +0.372-0.016 +.049-026V < 17 4.8 49.2AB 5* -8842 61 PegBD+27 4521 219477 911303861 231053.1+274210231546.3+281452 98.56-30.06 6.49 +0.85 +0.48 G5II-III +0.020-0.005 +004 < 23 -8843 CP-62 6412 219482255446 876 231057.0-623246231657.7-620004320.63-51.76 5.66 +0.51 F7V +0.173-0.026 -009 -8844 BD+73 1023 219485 10664 231103.7+734110231437.3+741352116.38 12.61 5.84R A0V +0.048+0.006 -003 =< 41 -8845 BD+23 4712 219487 91133 231102.1+241332231557.9+244616 96.88-33.22 6.60 +0.40 -0.05 F5V +0.093+0.005 +005 20 -8846 CD-4514982 219507231532 W 231105.8-450204231639.7-442921344.28-64.28 5.92 +1.06 +0.91 K1III -0.004-0.007 +025 4.8 22.5 -8847 CD-4115205 219531231533 231119.1-414426231649.8-411140350.93-66.03 6.47 +1.08 K0III -0.024+0.012 +013 -8848 Gam TucCP-58 8062 219571247814 877 231135.7-584702231725.8-581409324.30-54.82 3.99 +0.40 -0.02 +0.23 F1III -0.029+0.079 +.043+018 94 -8849 CP-80 1067 219572258127 231137.1-800109231908.1-792822308.06-36.72 6.33 +0.91 +0.66 K0III +0.013+0.007 -003 -8850 92Chi AqrBD-08 6076 219576146612 I Chi Aqr 231139.9-081619231650.9-074336 69.45-60.36 5.06 +1.60 +1.60 +1.20E M3III -0.016-0.015 +.009-015V? * -8851 BD+70 1311 219586 106713862 231146.2+702034231537.8+705317115.19 9.47 5.56 +0.24 +0.12 F0IV +0.018-0.005 +012SB 140 -8852 6Gam PscBD+02 4648 219615128085 878I 231158.8+024409231709.9+031656 82.47-52.02 3.69 +0.92 +0.58 +0.51 G9-III:Fe-2 +0.762+0.017 +.036-014V? 7 * -8853 BD+52 3410 219623 352853863 W 231208.6+524027231642.3+531249108.90-07.06 5.54 +0.52 +0.02 F7V +0.115-0.233 +.036-025V? =< 6 7.3 129.3 -8854 BD+61 2413 219634 20531 V649 Cas 231208.9+612503231626.8+615747112.02 1.12 6.53 +0.23 -0.66 B0Vn -0.026-0.002 -015SB * -8855 CP-68 3567 2196442554553864 231208.8-680104231820.0-672816315.82-47.26 6.13 +1.35 +1.58 K2-3III +0.021+0.014 +018 -8856 BD-12 6461 219659165609 14483 231226.8-121533231740.0-114247 63.38-63.14 6.34 +0.05 +0.01 A1Vn +0.039-0.003 +003V? 195 -8857 BD+44 4368 219668 52865 231234.3+443711231716.6+450951106.01-14.59 6.43 +1.07 +1.01 K0IV +0.097-0.065 -038 -8858 93Psi2AqrBD-09 6160 219688146620 D 231242.4-094342231754.2-091057 67.62-61.54 4.39 -0.15 -0.56 -0.13 B5V +0.021-0.012 -006V? 332 * -8859 Phi GruCD-4115211 219693231539 231238.8-412203231809.9-404928351.44-66.43 5.53 +0.44 -0.05 F5V +0.136-0.128 +014 0 -8860 8 AndBD+48 3991 219734 52871 I 16656 14484 231306.3+482808231744.7+490055107.53-11.03 4.85 +1.67 +1.98 +1.26 M2+IIIBa0.3 +0.037+0.008 +.011-008V? 5.8 219.4AC 6* -8861 BD+44 4373 219749 52876 ET And 231314.3+445635231756.1+452920106.25-14.33 6.48 -0.03 -0.26 B9pSi v+0.034-0.017 +003SB1O 83 * -8862 Tau OctCP-88 204 219765258970 925 231309.9-880153232803.7-872856303.96-29.48 5.49 +1.27 +1.43 K2III +0.015+0.009 +031 -8863 Gam SclCD-3316476 219784214444 879I 231325.5-330436231849.4-323155 12.25-69.25 4.41 +1.13 +1.06 +0.63 K1III +0.019-0.070 +.043+016 -8864 9 AndBD+40 5043 219815 52881 AN And 231338.6+411339231823.4+414625104.91-17.82 6.02 A7/8Vm -0.006-0.012 -004SB1O 78 * -8865 95Psi3AqrBD-10 6094 2198321466351609 16671 14491 231345.6-100927231857.7-093639 67.31-62.02 4.98 -0.02 -0.02 A0V +0.047-0.002 +.012-010V 143 3.9 1.4AB 3* -8866 94 AqrBD-14 6448 219834165625 16672A 231351.1-140011231906.7-132732 60.70-64.47 5.08 +0.80 +0.41 G5IV +0.298-0.101 +.040+010SBO =< 17 2.4 0.2 S 3* -8867 BD+74 1016 219841 106843865 231347.3+744510231718.9+751757116.95 13.53 6.38 +0.03 +0.03 A2V s +0.018-0.002 -008 -8868 96 AqrBD-05 5966 219877146639 16676 231412.8-054015231924.0-050728 73.94-58.94 5.55 +0.39 0.00 F3IV-V +0.202-0.020 -009SB 50: 4.9 10.6 * -8869 BD-18 6283 2198791656283868I 231408.4-183722231924.1-180431 51.23-66.96 5.93 +1.52 +2.01 gK3 +0.004+0.009 +005V? -8870 BD+44 4378 219891 52892 231419.5+443525231902.4+450814106.30-14.73 6.50 A5Vn +0.058+0.006 +007 160 -8871 CD-3415985 219912214459 W 231418.6-341515231943.2-334229 8.90-69.21 6.37 +1.30 K2III +0.047-0.041 +023 6.1 43.8 -8872 34Omi CepBD+67 1514 219916 20554 I 16666 14495 231430.9+673352231837.5+680642114.42 6.79 4.75 +0.84 +0.49 +0.45 K0III +0.058+0.016 +.024-018V? < 17 2.3 3.1AB 3* -8873 BD+34 4899 219927 73171 231437.0+341446231927.4+344736102.31-24.37 6.32 -0.08 -0.39 B8III +0.016-0.003 -001V? 5 -8874 11 AndBD+47 4110 219945 52907 231450.1+480436231929.8+483731107.66-11.50 5.44 +1.03 +0.82 K0III +0.019+0.056 +.016+011 < 19: -8875 BD+47 4114 219962 52912 W 231459.7+474958231941.6+482251107.60-11.74 6.32 +1.12 +1.05 K1III +0.209+0.032 -.001+023 3.3 85.8AB 3 -8876 10 AndBD+41 4752 219981 529143870I 231506.6+413150231952.4+420441105.30-17.64 5.79 +1.48 +1.90 M0III +0.052+0.010 +003V? -8877 CD-5013948 220003247838 W 231512.6-505108232050.0-501824333.53-61.10 6.05 +0.42 +0.16 +0.22 F5mDel Del +0.028-0.077 -018V 2.0 0.5AB 3* -8878 7 PscBD+04 4997 2200091281263871I 231514.8+045008232020.6+052253 85.42-50.73 5.05 +1.20 +1.12 K2III +0.082-0.062 +.002+038V < 19: -8879 BD-06 6191 220035146652 D 14515 231531.5-062714232040.9-055429 73.36-59.73 6.17 +1.07 +0.97 K0III -0.101-0.057 -002 * -8880 62Tau PegBD+22 4810 220061 91186 880 Tau Peg 231541.1+231135232038.2+234425 97.51-34.61 4.60 +0.17 +0.10 +0.09 A5Vp +0.033-0.008 +.037+016V 143 * -8881 BD+61 2427 220074 20567 I 231552.0+612522232014.3+615812112.44 0.97 6.45R K1V +0.003-0.013 -035 * -8882 63 PegBD+29 4908 220088 73187 I 231555.6+295209232049.6+302454100.72-28.52 5.59 +1.50 +1.91 M0III +0.081-0.069 -019V -8883 CD-2716284 2200961918401611 231555.8-273204232115.5-265912 28.15-69.95 5.64 +0.82 G4V -0.013-0.012 +013 -8884 BD+43 4440 220105 52927 16685 231600.0+433410232044.0+440659106.22-15.79 6.13R +0.17? A5Vn -0.016-0.027 -002 4.0 13.2 * -8885 12 AndBD+37 4817 220117 731901610 W 231603.5+373811232053.3+381056103.98-21.33 5.77 +0.46 +0.02 F5V +0.130-0.063 -009V? 12 3.4 121.1AB 3 -8886 BD+61 2428 220130 20572 I 16690 231612.4+613956232034.6+621247112.56 1.19 6.39 +1.61 K2III +0.003-0.005 -023 5.5 12.7AB 4* -8887 64 PegBD+31 4897 220222 73205 16702 231701.9+311552232154.9+314845101.57-27.32 5.32 -0.11 -0.49 B6III +0.005-0.010 +.001+002SB 161 3.7 0.4AB 3 -8888 BD+25 4924 220242 91208 231703.2+260346232158.2+263632 99.25-32.11 6.62 +0.37 +0.01 F5V -0.098-0.074 +010 -8889 CP-60 7654 220263255474 14529 231707.5-603615232256.9-600321321.48-53.77 6.09 +1.60 +1.91 M3III +0.090-0.009 -028V? * -8890 97 AqrBD-15 6406 220278165658 16708 231724.7-153517232239.2-150221 58.78-66.08 5.20 +0.20 +0.10 A3Vp +0.112+0.019 +.022-012 141 0.7 0.4 * -8891 65 PegBD+20 5317 220318 912203873 231741.6+201650232240.5+204943 96.53-37.45 6.29 -0.04 -0.09 B9.5V +0.019-0.012 -014SBO 25 * -8892 98 AqrBD-20 6587 2203211918581612I 231743.1-203847232258.2-200602 47.35-68.59 3.97 +1.10 +0.95 +0.60 K0III -0.120-0.096 +.036-007V -8893 66 PegBD+11 4993 220363108580 I 16715 231801.9+114556232304.6+121850 91.56-45.11 5.08 +1.31 +1.49 K3III +0.027-0.017 -.001-004V? < 19: 0.0 0.1 * -8894 BD+59 2710 220369 353613874I 231804.7+593506232232.5+600801112.07-00.85 5.56 +1.68 +1.82 K3II +0.009-0.001 -012V? -8895 CP-5410281 220392247854 W 231815.0-542124232354.3-534830328.10-58.83 6.15 +0.26 +0.13 A4III +0.059-0.027 +007 153 0.8 26.5 * -8896 CD-4315360 220401231587 231816.4-434025232345.4-430728345.21-66.11 6.10 +1.46 K3III +0.015+0.010 +001 -8897 BD-00 4509 220406128156 I W 231824.1-001530232331.9+001729 81.72-55.38 6.31 +1.61 +1.95 K2 +0.068+0.010 +009 4.0 41.7 -8898 CP-5212150 220440247858 231836.8-522621232413.1-515329330.51-60.31 5.75 +1.59 +1.93 M0III +0.005-0.041 -005 -8899 BD+31 4901 220460 73223 231852.4+315853232347.5+323153102.29-26.80 6.69 +0.45 -0.12 F4V w +0.232+0.040 +.012+010SB2O * -8900 BD-19 6450 220465165672 231851.7-191419232407.8-184115 51.13-68.24 6.19 +1.02 +0.79 G8III +0.149+0.071 -019 -8901 CP-5710268 220572247867 231937.3-572352232519.4-565057324.29-56.56 5.59 +1.07 +0.98 +0.37E K0III +0.080-0.024 -019 =< 1: * -8902 BD+40 5068 220575 52987 231946.4+403349232435.0+410646105.80-18.85 6.72 +0.06? B8III +0.015-0.009 -003SB 30 * -8903 67 PegBD+31 4904 220599 732411613 231957.0+315008232450.8+322306102.46-27.02 5.57 -0.11 -0.26 B9III +0.017+0.002 +.004+018V 110 -8904 4 CasBD+61 2444 220652 20614 882I W 14549 232023.5+614402232450.3+621658113.05 1.08 4.98 +1.68 +2.07 +0.85E M1III +0.011-0.013 +.007-037 2.5 98.6AB 4* -8905 68Ups PegBD+22 4833 220657 91253 881I 232023.2+225113232522.8+232415 98.55-35.36 4.40 +0.61 +0.14 +0.32 F8III +0.193+0.037 +.036-011 79 * -8906 99 AqrBD-21 6420 220704191900 I 14554 232047.6-211124232602.8-203831 46.74-69.46 4.39 +1.47 +1.81 +0.81 K5III -0.052-0.058 +.007+016V? * -8907 Omi GruCP-5310461 220729247874 883 232100.9-531630232636.6-524318328.86-59.92 5.52 +0.40 F4V +0.038+0.123 +018SB 0 -8908 CP-67 3964 220759255486 232111.8-670751232707.2-663452315.38-48.46 6.45 +1.47 +1.77 K4III -0.042-0.023 +012 -8909 CP-59 7890 2207902478823876 232132.9-590142232715.0-582834322.23-55.38 5.63 +0.98 G8III +0.051+0.062 -011 -8910 CD-5013976 2208022478803875 232136.3-504228232709.1-500926332.22-61.91 6.20 -0.08 B9V +0.032+0.006 -001 -8911 8Kap PscBD+00 4998 220825128186 884 W Kap Psc 232148.3+004229232656.0+011520 83.92-55.08 4.94 +0.03 -0.02 -0.03 A0pCrSi:Sr: v+0.089-0.097 +.040-003V 41 7.0 163.4AB 3* -8912 9 PscBD+00 4999 220858128188 W 14568 232207.4+003424232714.8+010721 83.90-55.24 6.25 +1.02 +0.80 G7III +0.044-0.035 -007SB * -8913 13 AndBD+42 4672 220885 53039 232218.1+422141232707.4+425443106.91-17.32 5.75 0.00 -0.09 B9III +0.091+0.015 -009SB 67 * -8914 CD-3615895 2209292145613878 232238.7-360542232800.7-353240 2.43-70.35 6.32 +1.20 K2III +0.007+0.001 +013 -8915 69 PegBD+24 4778 220933 91278 HV Peg 232242.1+243704232740.4+251002 99.98-33.94 5.98 -0.06 -0.17 A0pHgMn +0.026-0.041 -016 40 * -8916 10The PscBD+05 5173 2209541281961614I 232253.7+054947232758.1+062244 88.81-50.88 4.28 +1.07 +1.01 +0.53 K1III -0.121-0.045 +.016+006V? < 17 -8917 BD-12 6496 220957165708 232252.9-115959232805.2-112659 67.58-64.92 6.37 +0.90 +0.56 G0V +0.102-0.023 -083V? -8918 BD+69 1332 220974 10737 232302.7+694834232716.6+702135115.92 8.64 5.60 +0.19? A6IV +0.119-0.006 +.023-003SB2 115 -8919 CP-63 4891 2210062554973880 CG Tuc 232313.7-633940232901.0-630639317.77-51.58 5.68 -0.17 ApSi v+0.037-0.017 +015 69 * -8920 CD-4515043 221051231622 232333.6-450255232900.8-442952341.10-66.03 6.43 +1.18 K2III +0.037-0.011 -020 -8921 BD-10 6120 221081146729 I 232350.3-094859232900.6-091558 71.60-63.59 6.18 +1.44 +1.70 K0 -0.050-0.026 +008V? -8922 BD+22 4844 221113 91295 232406.6+222958232905.6+230252 99.35-36.02 6.35R G9III -0.039-0.094 +020 -8923 70 PegBD+11 5009 221115108638 885I 232405.8+121232232909.3+124538 93.72-45.39 4.55 +0.94 +0.73 +0.45 G7+III +0.064+0.027 +.016-015V? < 19: -8924 BD-05 5999 2211481467363881 14588 232421.9-050439232932.1-043158 78.48-60.13 6.25 +1.09 +1.16 K3III v+0.183-0.232 +.019-025V -8925 BD+48 4070 221246 530883882I 232521.2+483454233007.4+490759109.51-11.61 6.17 +1.46 +1.71 K3III +0.033+0.002 +006 * -8926 BD+57 2748 221253 35478 16795 AR Cas 232524.6+575951233002.0+583256112.47-02.66 4.91 -0.12 -0.64 -0.14 B3IV +0.020+0.005D+.006-013SB1O 144 2.3 75.7AC 8* -8927 BD+37 4856 221293 73308 232546.5+380637233039.7+383943106.08-21.55 6.05 +0.99 G9III +0.042+0.011 -009 -8928 BD-07 6036 221308146748 232551.7-065020233101.1-061718 76.78-61.72 6.39 +1.26 +1.29 K0 -0.013-0.036 +013 -8929 CD-4515055 2213232316423883 232600.9-452341233127.0-445037339.76-66.14 6.02 +1.02 K1III +0.048-0.025 +008 -8930 14 AndBD+38 5023 221345 73311 I 14599 232622.2+384113233117.4+391411106.41-21.05 5.22 +1.02 +0.87 K0III +0.289-0.080 +.015-059V < 19: -8931 BD-04 5896 221356146752 232621.5-043802233131.5-040514 79.82-60.09 6.49 +0.54 -0.01 F8V +0.175-0.190 +.041-011V =< 6 -8932100 AqrBD-22 6141 2213571919703885 232627.5-215517233142.1-212210 46.21-70.96 6.29 +0.33 +0.16 A9III +0.009+0.005 -008SB -8933 BD+27 4568 221394 91321 Var 232645.4+275108233143.1+282413102.40-31.27 6.41 +0.01 +0.03 A1pSrCr:Eu: -0.025-0.008 -006V * -8934 13 PscBD-01 4450 221409146756 232649.7-013818233157.6-010509 83.41-57.73 6.38 +1.18 +1.10 K1III +0.012+0.017 -023 -8935 CP-78 1473 2214202581543887 232652.2-775615233319.5-772307308.32-38.91 5.81 +0.68 +0.31 G2V +0.010 0.000 +026 -8936 BD+34 4948 221491 73325 232729.4+342402233224.6+345709105.11-25.17 6.65 -0.06 -0.24 B8V -0.007-0.006 +012 250 -8937 Bet SclCD-3815527 221507214615 886 14608 232736.6-382216233258.3-374906355.04-70.36 4.37 -0.09 -0.36 -0.07 B9.5IVpHgMnEu +0.087+0.021 +002 37 * -8938 BD+86 344 221525 39163967 232748.7+864521232700.8+871827121.86 24.61 5.58 +0.23 +0.13 A7IV +0.075+0.018 -011V? 90 -8939101 AqrBD-21 6437 221565191988 W 232802.6-212802233316.6-205452 47.93-71.13 4.71 +0.02 0.00 +0.03 A1n -0.007+0.013 -.000+015 297 2.3 1.0 -8940 71 PegBD+21 4952 221615 913403889I HW Peg 232827.5+215649233328.1+222956100.25-36.92 5.32 +1.60 +1.61 M5IIIa +0.010-0.017 +003V? * -8941 BD+44 4441 221661 53147 232852.2+443019233342.7+450329108.81-15.67 6.24 +0.98 G8II -0.029+0.010 +007 -8942 BD+20 5352 221662 91349 I 232854.4+201720233355.5+205027 99.59-38.49 6.06 +1.73 +1.88 M3III -0.004-0.022 +005 -8943 72 PegBD+30 4978 221673 73341 I 16836 14617 232859.4+304624233357.2+311931104.09-28.69 4.98 +1.38 +1.62 K4IIIb +0.052-0.016 +.018-024SB < 19: 0.2 0.5 * -8944 14 PscBD-02 5986 2216751467803890 232900.5-014759233409.0-011451 84.09-58.17 5.87 +0.30 +0.16 +0.13 A2m +0.108-0.013 -003 60 * -8945 CP-65 4148 221740255520 W 232930.6-651433233512.7-644122315.61-50.52 7.4 F2IV-V +0.015+0.004 2.4 37.7 -8946 BD-16 6314 221745165780 I 232937.1-154747233449.4-151445 62.77-68.60 5.96 +1.36 +1.57 K0 +0.051-0.079 -037V? -8947 15 AndBD+39 5114 221756 733461616 14627 232943.8+394106233437.5+401411107.40-20.31 5.59 +0.10 +0.08 +0.06 A1Vp -0.017-0.046 +.014+013V 109 * -8948 73 PegBD+32 4667 221758 733453891 232941.4+325638233438.2+332950105.06-26.69 5.63 +1.03 gK0 +0.001+0.019 -003V? -8949 Iot PheCD-4315420 2217602316751617 W Iot Phe 232941.8-431005233504.6-423654343.07-68.07 4.71 +0.08 +0.07 +0.07 A2VpSrCrEu +0.046-0.001 +.005+019V 22 8.0 7.7 * -8950 BD+37 4866 221776 73351 I 16843 232951.7+372815233446.7+380126106.69-22.42 6.18 +1.58 K7III +0.008+0.009 -012 5.2 20.2 -8951 BD-08 6142 221835146795 888 233022.5-080104233532.1-072752 76.98-63.35 6.39 +0.88 +0.57 gG5 +0.001+0.016 +005 -8952 BD+70 1327 221861 107903893I 233038.5+710521233459.0+713832116.93 9.67 5.84 +1.80 +1.73 G9Ib -0.004 0.000 -003V? -8953 BD+23 4769 221905 913673894I 233055.5+240028233555.9+243340101.83-35.20 6.45 +1.73 +2.01 M1III +0.004+0.009 -012 -8954 16 PscBD+01 4744 2219501282813895 D 233117.1+013250233623.3+020608 88.23-55.63 5.68 +0.44 -0.08 F6Vb vw -0.103+0.061 +039SB2O=< 10 0.1 0.0 * -8955 BD+32 4671 221970 73368 233132.8+322103233630.5+325415105.25-27.38 6.35 +0.46 0.00 F6V -0.008 0.000 -001 -8956 CD-3217593 222004214659 W 233148.3-322528233705.4-315215 12.12-73.17 6.52 +1.26 +1.22 K1III +0.048+0.002D+.003-023 3.3 5.2 * -8957 CP-77 1583 222060258166 233211.1-772522233824.1-765212308.23-39.50 6.00 +0.90 +0.65 K0-2III +0.082-0.032 +002 -8958 BD-13 6439 222093165804 16878 233228.5-133652233739.6-130337 68.48-67.74 5.65 +1.03 +0.83 G9IIIFe-0.5 +0.037+0.024 -013 3.9 31.6 -8959 CD-4614720 222095231707 889 233228.0-460244233751.0-452933336.66-66.52 4.74 +0.08 +0.09 +0.05 A2V +0.073-0.014 +.016+010SB 126 * -8960 74 PegBD+16 4954 222098108729 W 233235.7+161619233739.8+164932 98.66-42.54 6.26 0.00 +0.08 A1V +0.134 0.000 -026SBO 45 4.5 98.3AB 3* -8961 16Lam AndBD+45 4283 222107 53204 890I W Lam And 233240.0+455459233733.9+462729109.90-14.53 3.82 +1.01 +0.69 +0.57 G8III-IV v+0.162-0.421 +.050+007SB1O < 19: 6.5 217.6AC 4* -8962 BD+43 4508 222109 53202 16877 233238.6+435233233732.0+442545109.28-16.47 5.80 -0.06 -0.31 B8V +0.015-0.010D+.004-011V 50 0.9 0.5AB 3* -8963 75 PegBD+17 4952 2221331087323896 W KS Peg 233253.7+175048233756.8+182402 99.54-41.11 5.53 0.00 -0.03 A1Vn +0.050+0.017 -016SB1 216 6.2 27.9 * -8964 BD+45 4288 222143 53210 233302.4+453846233758.6+461159109.89-14.80 6.58 +0.66 +0.16 G5 +0.370-0.003 +.032-001 -8965 17Iot AndBD+42 4720 222173 53216 891 14646 233313.7+424252233808.2+431605109.03-17.62 4.29 -0.10 -0.29 -0.09 B8V +0.029-0.001 +.011-001SB 84 -8966 The PheCD-4714651 222287231719 W 233405.9-471134233928.0-463816334.20-65.88 6.09 +0.24 +0.11 A8V+F0V +0.028+0.033D+.008+014 0.7 3.7 * -8967 18 AndBD+49 4180 222304 356423897 233417.4+495504233908.3+502818111.34-10.77 5.30 -0.06 -0.15 B9V -0.017-0.002 +009SB 178 -8968102Ome1AqrBD-15 6471 222345165818 233435.9-144629233947.1-141318 67.04-68.89 5.00 +0.24 F0IV +0.057-0.038 +.016-002SB 102 -8969 17Iot PscBD+04 5035 222368128310 892I W 14657 233448.3+050503233957.0+053735 92.46-52.96 4.13 +0.51 0.00 +0.31 F7V +0.378-0.438 +.075+005V 6 8.7 69.9 * -8970 BD+08 5095 222377128309 233449.2+090724233955.1+094038 95.27-49.31 5.97 +0.20 +0.13 +0.09 A2IVm +0.099-0.011 +000 60 -8971 BD+74 1032 222386 10814 233452.7+744419233910.4+751734118.30 13.08 5.95 +0.13 +0.12 A3V +0.012+0.011 +003SB 125 -8972 BD+73 1047 222387 108173898 233459.5+732655233921.1+740010117.93 11.83 5.98 +0.89 G8III -0.012+0.004 +009SB -8973 BD+36 5098 222399 73422 16913 233505.4+370603234002.8+373909107.64-23.09 6.53 +0.35 +0.08 F2IV -0.013-0.084 -016V? 4.4 14.9 * -8974 35Gam CepBD+76 928 222404 10818 893I 14656 233514.3+770427233920.8+773757118.99 15.31 3.21 +1.03 +0.94 +0.51 K1III-IV -0.067+0.151 +.064-042V? < 17 * -8975 Mu SclCD-3217621 2224332147011618 14661 233523.4-323734234038.2-320423 10.86-73.86 5.31 +0.97 +0.66 K1III -0.089-0.055 +.027+014 -8976 19Kap AndBD+43 4522 222439 532641619 16916 233528.8+434649234024.5+442002109.76-16.71 4.14 -0.08 -0.26 -0.07 B9IVn +0.083-0.019 +.018-009V 184 7.6 46.8AB 3* -8977 BD+35 5074 222451 734283899 233540.7+360957234040.6+364315107.46-24.02 6.23 +0.39 -0.05 F1V +0.236+0.020 -000 30 * -8978 CD-2417796 222485192083 I 14665 233553.8-244252234107.0-240937 39.63-73.89 6.60 +1.57 +1.92 M1III +0.006-0.010 +018V? * -8979 BD-12 6535 222493165828 233558.4-121407234108.9-114050 72.64-67.40 5.89 +1.00 +0.78 +0.35E G9III +0.070+0.009 -011V * -8980103 AqrBD-18 6357 222547165834 I 233623.3-183447234134.5-180138 58.77-71.51 5.34 +1.57 +1.93 +0.92 K5III -0.039-0.071 +025 -8981 BD+48 4127 222570 53276 233633.7+485730234126.9+493044111.43-11.79 6.26 +0.19? A4V +0.002-0.021 -006 -8982104 AqrBD-18 6358 222574165836 I W 14671 233634.3-182216234145.8-174859 59.40-71.44 4.82 +0.82 +0.49 +0.41 G0Ib-II +0.015+0.004 -.009+003SB 17 2.8 120.1AB 3* -8983 BD+06 5183 222602128335 14672 233650.9+064149234156.7+071502 94.37-51.72 5.89 +0.10 +0.08 A3Vn -0.024-0.042 +001 210 * -8984 18Lam PscBD+00 5037 2226031283361620 233656.6+011347234202.8+014648 90.15-56.61 4.50 +0.20 +0.08 +0.10 A7V -0.129-0.155 +.028+012SB 63 * -8985 BD+56 3067 222618 35682 233705.4+564220234154.5+571536113.61-04.35 6.24R G8III +0.005-0.002 -012 -8986 BD+44 4473 222641 53292 I 14674 233719.1+442615234214.8+445931110.28-16.17 6.57R gK5 -0.011-0.010 -010V -8987 BD-16 6345 222643165841 I 233717.0-160008234227.9-152652 65.53-70.18 5.28 +1.37 +1.49 K4III +0.025-0.008 +.015+007SB < 17 * -8988105Ome2AqrBD-15 6476 222661165842 894 16944 233732.2-150552234243.3-143242 67.66-69.64 4.49 -0.04 -0.12 -0.05 B9.5V +0.101-0.066 +.041+003SB 156 6.0 5.0 * -8989 BD+63 2038 222670 20791 I 16940 233737.5+635739234220.8+643056115.58 2.63 6.56 +1.88 +2.12 +1.33 M2III +0.003-0.002 -003 4.4 2.6 -8990 BD+60 2609 222682 207933900 W 233744.7+610731234231.5+614046114.85-00.11 6.40 +1.24 +1.36 K2III +0.043-0.021 -016 6.5 8. -8991 77 PegBD+09 5268 2227641087893902I 14679 233816.9+094635234322.4+101953 96.87-49.06 5.06 +1.68 +2.04 M2III +0.008+0.007 +.010-034V * -8992 BD-16 6352 222800165849 I R Aqr 233838.8-155019234349.5-151704 66.52-70.32 6.36 +1.58 +0.32 M7IIIpe v+0.032-0.025 -022V * -8993 CD-4515114 2228032317563903 233839.8-453817234401.4-450500335.38-67.56 6.09 +0.98 +0.71 K1III-IV +0.338-0.006 +.019-031 -8994 CP-71 2771 2228052581783905 233842.3-710249234425.4-702925310.84-45.59 6.07 +0.91 +0.62 G8-K0IV +0.243+0.062 +.014+020 -8995 CP-79 1239 2228062581793906 233836.2-792048234440.7-784729306.98-37.81 5.75 +1.11 +1.07 K1III +0.048+0.004 +021V -8996 CP-65 4159 2228202555573904 233841.6-645738234412.0-642416314.43-51.20 5.72 +1.40 +1.63 K2II-III +0.011+0.031 +.007-013 -8997 78 PegBD+28 4627 222842 91457 I 16957 233857.5+284827234359.5+292142105.73-31.25 4.93 +0.95 +0.63 +0.48 K0III +0.071-0.037 +.018-007SB < 19: 3.1 0.9 * -8998106 AqrBD-19 6500 2228471658541621 233900.9-184955234412.1-181637 59.17-72.17 5.24 -0.08 -0.27 B9Vn +0.029-0.003 +014V 258 -8999 CD-2616762 222872192116 16963 233916.7-264804234428.9-261447 32.50-75.03 6.17 +0.50 +0.10 F4V -0.070-0.015 +016 3.2 8.3 * -9000 BD+55 3010 222932 35728 233955.6+551441234448.3+554759113.61-05.86 6.51R gG4 +0.020-0.005 +.008+009 -9001 CD-4015239 223011231769 234044.7-404413234601.2-401057344.81-71.20 6.31 +0.20 +0.09 A7III-IV +0.097-0.036 +004 -9002107 AqrBD-19 6506 223024165867 16979A 234049.3-191403234600.9-184041 58.82-72.75 5.29 +0.28 +0.14 F2III+F2V +0.134+0.030 +.012-002 83 1.0 6.6 * -9003 20Psi AndBD+45 4321 223047 533551622I W 234104.5+455154234602.1+462513111.34-14.97 4.95 +1.11 +0.82 +0.38E G5Ib+A0V +0.011-0.005 +.001-025V < 19: 4.0 184.0AD 4* -9004 19 PscBD+02 4709 2230751283743908I TX Psc 234116.9+025555234623.5+032912 93.28-55.60 5.04 +2.60 +3.49 +1.35 C5II -0.030-0.025 -.004+011V * -9005 BD+65 1943 223128 20838 234150.3+661337234636.7+664656116.59 4.71 5.95 -0.04 -0.74 B2IV +0.004+0.001 -014 -9006 Sig PheCD-5014047 2231452480183910 234157.6-504653234716.0-501336326.59-63.85 5.18 -0.19 B3V +0.011-0.029 +011 217 -9007 CP-69 3335 2231482555673911 234152.1-685656234723.3-682339311.60-47.64 6.89 +0.46 +0.06 F2V +0.045-0.043 -002 -9008 5Tau CasBD+57 2804 223165 357633909I 14707 234209.9+580542234703.5+583907114.63-03.18 4.87 +1.11 +1.05 K1IIIa +0.061+0.057 +.014-021V < 17 -9009 BD-12 6559 223170165880 234206.9-122751234715.9-115439 75.12-68.59 5.73 +1.08 +0.97 gK1 -0.049-0.086 +011 -9010 BD+56 3085 223173 35761 I 234208.4+565346234701.9+572705114.33-04.34 5.51 +1.65 +1.81 K3IIb +0.002-0.003 -006V? -9011 BD+46 4169 223229 53374 17006 14709 234234.8+461638234733.2+464957111.71-14.64 6.07 -0.14 -0.66 B3IV +0.013-0.003D+.002-024SB 2.0 0.9 * -9012 20 PscBD-03 5707 2232521469151623 W 234248.1-031903234756.5-024542 88.27-61.28 5.49 +0.94 +0.70 +0.33E G8III +0.096+0.005 -007V? =< 11 4.4 172.7AB 3* -9013 BD+67 1562 223274 20853 895 234307.5+671504234754.8+674825116.97 5.67 5.04 -0.01 -0.04 A1Vn +0.014-0.001 +.015+010SB 185 -9014 BD-07 6086 2233111469193912I 14715 234324.1-065609234832.5-062250 84.33-64.43 6.07 +1.45 +1.71 K4III +0.003-0.019 -021V -9015 BD+01 4773 223346128393 234342.2+013934234849.3+021251 93.25-57.00 6.46 +0.44 -0.02 F5III-IV +0.007-0.042 -025SB 12 -9016 Del SclCD-2818353 223352192167 896 17021A 234343.1-284100234855.6-280749 25.18-76.13 4.57 +0.01 -0.03 -0.02 A0V +0.105-0.106 +.039+014V? 4.5 74.3AC 3* -9017 BD+64 1861 223358 20866 17020 V650 Cas 234348.3+641916234839.0+645235116.33 2.81 6.41 +0.06 +0.02 A0pSrSi:Cr: +0.013-0.020 +.009-003 2.0 0.7AB 4* -9018 6 CasBD+61 2533 223385 20869 17022 V566 Cas 234357.7+613931234850.2+621252115.71 0.22 5.43 +0.67 -0.02 A3Ia e-0.005-0.001D+.001-046SB? 50 5.1 1.5AB 3* -9019 BD+59 2777 223386 35794 234359.4+592522234853.9+595844115.18-01.95 6.34 -0.01 -0.05 A0V +0.048+0.007 -016 =< 41 -9020 BD+58 2653 223421 35798 234416.8+582427234912.0+585747114.97-02.94 6.33 +0.40 -0.01 F2IV +0.038-0.014 +030 -9021 BD-16 6373 223428165905 234421.6-162459234931.6-155140 67.89-71.75 6.24 +1.22 +1.17 K2IIIbFe-0.5 +0.049-0.022 -064V? -9022 21 PscBD+00 5054 223438128401 234420.2+003115234927.5+010434 92.57-58.09 5.77 +0.16 +0.12 A5Vm -0.002-0.030 +005SB 43 -9023 CP-63 4931 223444255578 234421.9-632340234944.7-625022314.54-52.88 6.59 +1.48 K5III +0.031-0.035 +011 -9024 BD+35 5110 223460 735353914 OU And 234439.0+355214234941.0+362531109.28-24.80 5.90 +0.79 G1III e+0.001-0.048 +001V? * -9025 79 PegBD+28 4649 223461 915223913 234435.6+281709234939.4+285033106.95-32.10 5.97 +0.19 +0.13 A2m +0.061+0.024 -004 38 -9026 CD-2616796 223466192180 17029 234438.7-255312234949.6-251953 36.88-76.08 6.42 +0.12 +0.12 A3V -0.021-0.024 +016 5.2 13.5 -9027 BD-10 6177 223524165911 897 234505.1-103157235014.7-095827 79.96-67.59 5.94 +1.13 +1.15 K0IV +0.140+0.076 -018V -9028 BD+50 4165 223552 35823 17032 234522.4+510358235022.3+513718113.37-10.11 6.44 +0.37 -0.09 F3V +0.123-0.015 -021 6.1 21.0AB 3 -9029 BD-15 6507 223559165915 234523.8-145725235033.3-142407 71.78-70.94 5.72 +1.51 +1.81 K4.5IIIb +0.037-0.033 -058V? -9030 80 PegBD+08 5127 223637128421 I HH Peg 234615.0+084532235121.2+091848 99.09-50.75 5.79 +1.66 +1.74 +0.54 M3IIIa -0.016-0.063 -009 * -9031108 AqrBD-19 6522 223640165918 ET Aqr 234611.5-192755235121.3-185432 60.54-73.94 5.18 -0.14 -0.42 B9pSiSrCr v+0.021 0.000 +.023+013V 40 * -9032 Gam1OctCP-82 905 2236472589893997 234614.9-823429235206.4-820108305.41-34.82 5.11 +0.92 +0.60 G7III -0.055-0.019 +015 -9033 22 PscBD+02 4725 2237191284273918I 234650.6+022228235157.9+025549 95.11-56.69 5.55 +1.53 +1.86 K4IIIaBa0.3 +0.020-0.015 +000 * -9034 BD+76 934 223731 108743919 234709.2+770245235157.6+773558119.66 15.11 6.55 +0.44 -0.11 F5V +0.264-0.092 +.042+001V? -9035 BD+20 5386 223755 91548 I 234718.7+210654235223.4+214015105.15-39.15 6.11 +1.59 +1.97 M2III -0.049-0.015 -005V? -9036 81Phi PegBD+18 5231 223768108878 898I 14735 234723.9+183354235229.3+190713104.18-41.60 5.08 +1.60 +1.86 M2.5IIIb -0.005-0.036 +.011-008V? -9037 BD-15 6515 223774165933 234721.7-144827235230.0-141504 73.14-71.17 5.87 +1.28 +1.37 K3III -0.101 0.000 +002 -9038 BD+74 1047 223778 10879 17062 234731.7+745913235225.1+753241119.18 13.10 6.39 +0.98 +0.71 K3V +0.314+0.049 +.097+001SBO 1.9 161.9AC 3* -9039 82 PegBD+10 5004 2237811088791625 HT Peg 234731.0+102328235237.1+105651100.44-49.34 5.30 +0.18 +0.09 A4Vn -0.029+0.001 +.018-003V 156 * -9040 BD-09 6277 223807146953 234741.8-093309235250.5-085948 82.82-67.19 5.75 +1.17 +1.15 K0III +0.064-0.021 -018V? -9041 24 PscBD-03 5723 223825146954 W 234747.3-034239235255.6-030920 90.15-62.24 5.93 +1.07 +0.96 G9III +0.075-0.046 -006V 0.0 0.1 * -9042 25 PscBD+01 4792 223855128436 234757.4+013205235304.8+020526 94.93-57.57 6.28 -0.01 -0.01 A1V +0.022-0.012 +005SB 46 -9043 CD-2417897 223884192218 234810.6-244707235320.8-241345 42.19-76.60 6.24 +0.19 A3Shell +0.047-0.011 -003 * -9044 CD-2716479 223991192231 17090 234911.4-273558235421.4-270232 30.05-77.30 6.35 +0.20 0.00 +0.11 A2V+F2V +0.020+0.025D+.006+017SB =< 39 0.7 6.4 * -9045 7Rho CasBD+56 3111 224014 35879 899I Rho Cas 234923.0+565635235423.0+572958115.30-04.52 4.54 +1.22 +1.12 +0.74 G20e v-0.002-0.002 +.023-043V 29 * -9046 CD-4015285 2240222318421626 234924.0-405127235438.6-401800341.05-72.35 6.03 +0.57 +0.11 F8IV +0.368+0.028 +.029-010 -9047 BD-00 4585 2240621469733920I XZ Psc 234939.5-002648235446.6+000633 94.06-59.55 5.61 +1.59 +1.51 +1.30E M5III -0.040-0.018 -002V? * -9048 26 PscBD+06 5216 224103128466 235000.8+063054235507.8+070416 99.18-53.18 6.21 -0.07 -0.19 B9V +0.021-0.019 +017V -9049 CD-3217723 2241132148603921 AL Scl 235006.3-322841235516.6-315518 8.14-76.89 6.10 -0.08 -0.46 B6V +0.022-0.003 -012SB1O 199 * -9050 CD-3217724 224112214861 235006.4-322627235516.6-315303 8.29-76.90 6.83 -0.08 -0.34 B8V +0.003+0.008 +001V? -9051 BD+25 5042 224128 91582 235017.6+252355235523.0+255718107.47-35.23 6.54R K5 -0.003-0.008 -015 -9052 BD+56 3115 224151 35899 V373 Cas 235032.7+565120235533.7+572444115.44-04.64 6.00 +0.21 -0.72 B0.5II+B0.5II v-0.008-0.003 +.029-026SBO * -9053 BD+46 4214 224165 53486 235030.5+464758235533.6+472121113.21-14.46 6.00 +1.16 +0.94 G8Ib 0.000-0.005 -017 -9054 CD-2516707 2242831922523922 235120.8-251739235629.9-244414 40.82-77.43 6.31 +0.92 G5 +0.003+0.010 -035V? -9055 BD+21 4999 224303 915951628I 235135.7+220530235641.5+223853106.73-38.50 6.15 +1.60 +1.97 M2III -0.022-0.005 +001V? -9056 BD+82 743 224309 39941650 V Cep 235145.3+823804235627.7+831128121.21 20.50 6.59 +0.05 +0.05 A3V +0.047+0.007 -013 * -9057 BD+41 4902 224342 535113923 235159.1+420606235703.6+423930112.39-19.10 5.97 +0.69 +0.30 F8III +0.008-0.001 -007V * -9058 CD-2716494 224350192262 I 14772 235158.7-271051235708.3-263725 32.23-77.89 6.26 +1.45 K3III +0.071+0.017 -012V -9059 BD+54 3076 224355 35917 14773 235205.8+550858235708.5+554221115.29-06.36 5.55 +0.49 +0.03 F1/6V+F3 -0.019-0.011 +013SBO * -9060 CP-63 4940 2243612556063924 235205.1-633050235719.9-625723313.13-53.09 5.97 +0.11 +0.10 A1IV +0.082+0.018 -013 * -9061 Gam2OctCP-82 907 224362258996 235204.1-824333235732.7-821012305.14-34.73 5.73 +1.05 +0.92 K0III -0.035-0.026 +027 -9062 Eta TucCP-64 4391 224392255609 235220.2-645112235735.2-641754312.34-51.84 5.00 +0.06 +0.08 A1V +0.086-0.068 +.036+033 191 -9063 BD+59 2795 224404 35922 235230.9+592801235733.5+600125116.24-02.15 6.47 +0.01 -0.10 B9III-IV +0.012-0.002 -008V? -9064 84Psi PegBD+24 4865 224427 916111629I S 14777 235239.7+243508235745.5+250829107.85-36.15 4.66 +1.59 +1.68 +1.34 M3III -0.034-0.033 +.005-004V? * -9065 1 CetBD-16 6394 2244811659723925 235312.5-162415235821.2-155051 72.72-73.30 6.26 +1.08 +1.03 K0II-III +0.086-0.006 +004V? -9066 BD+50 4202 224490 35938 I 17135 R Cas 235319.6+504954235824.8+512319114.56-10.62 4.8 +1.83 +0.08 M7IIIe v+0.080+0.009 +021V 5.4 29.5AC 3* -9067 27 PscBD-04 5996 224533147008 900I 17137 14785 235333.2-040639235840.4-033322 92.51-63.27 4.86 +0.93 +0.70 G9III -0.051-0.072 +.029-000SB < 19: 5.3 1.1 * -9068 BD+31 5012 224544 736503927 Var? 235343.2+314930235849.2+322254110.21-29.19 6.52 -0.11 -0.57 B6IVe +0.003-0.007 -006 * -9069 Pi PheCP-5310561 224554248087 901 235344.9-531816235855.8-524445320.30-62.57 5.13 +1.13 +1.03 K0III +0.055+0.061 +.016-014 -9070 BD+45 4381 224559 53540 LQ And 235341.2+455123235846.5+462447113.55-15.50 6.54 -0.09 -0.61 B4Ven v+0.022-0.005 -001V * -9071 8Sig CasBD+54 3082 224572 35947 17140 235356.0+551154235900.5+554518115.55-06.36 4.88 -0.07 -0.82 -0.11 B1V +0.009-0.004D+.006-013SB2 189 2.2 2.8AB 3* -9072 28Ome PscBD+06 5227 224617128513 902I 14793 235410.5+061835235918.7+065148100.69-53.74 4.01 +0.42 +0.06 +0.24 F4IV +0.153-0.115 +.018+002SBO 38 2.2 1.0 3* -9073 CD-3019765 224630192294 I 235419.5-300231235927.9-292906 18.25-78.33 5.62 +1.60 +2.00 K5III -0.001-0.001 -005 -9074 BD+32 4747 224635 73656 17149A 235423.5+331012235929.2+334328110.72-27.91 6.58H +0.55 -0.01 G0V -0.060-0.080D+.051-008V? 7 0.2 1.5AB 3* -9075 BD+32 4747 224636 73656 17149B 235423.5+331012235929.2+334328110.72-27.91 6.58H G0V -0.060-0.080D+.051-005V? 7 0.2 1.5AB 3* -9076 Eps TucCP-66 3819 224686255619 903 235443.3-660800235955.0-653438311.30-50.71 4.50 -0.08 -0.28 -0.05 B9IV v+0.048-0.024 +011 291 * -9077 CD-4415420 224750231888 W 235509.8-445040000019.2-441726330.51-70.00 6.29 +0.76 G3IV +0.080-0.111 +003 0.5 0.4 -9078 BD+26 4727 224758 91648 W 235516.8+262146000023.9+265506109.09-34.58 6.46 +0.50 +0.01 F7-8IV-V +0.044-0.052 +000V * -9079 BD+58 2685 224784 359833928 235526.5+590013000030.9+593335116.52-02.68 6.19 +1.01 +0.80 G9III-IV -0.077-0.024 -033 * -9080 BD+44 4538 224801 53568 CG And 235537.1+444147000043.7+451512113.65-16.70 6.38 -0.07 -0.33 B9pSiEu v+0.027+0.005 -003SB 49 * -9081 Tau PheCD-4914316 224834231895 235556.3-492200000104.5-484836323.79-66.23 5.71 +0.91 G8III -0.022-0.009 +008 -9082 CD-5113743 224865248103 235611.7-505340000120.0-502014321.98-64.90 5.53 +1.60 +1.93 M2III +0.002+0.013 +.008+002 -9083 BD+49 4309 224870 535733929 235612.6+492530000119.3+495854114.73-12.09 6.22 +0.97 G7II-III +0.018-0.006 -020 -9084 The OctCP-77 1596 224889258207 904 235627.5-773704000135.7-770357306.53-39.71 4.78 +1.27 +1.41 +0.67 K3III -0.063-0.177 +.017+024 -9085 BD+60 2657 224893 21009 235630.6+603958000136.9+611323116.97-01.07 5.55 +0.41 +0.39 F0III -0.006+0.005 -023SB? 38 -9086 BD+41 4920 224906 53580 235636.8+414837000143.8+422202113.22-19.56 6.25 -0.03 -0.25 B9IIIpHg:Mn: +0.005-0.003 -011V 42 -9087 29 PscBD-03 5749 224926147041 14804 235641.9-033503000149.4-030139 94.59-63.14 5.10 -0.12 -0.51 B7III-IV +0.016-0.009 +023V? 80 * -9088 85 PegBD+26 4734 224930 91669 17175 14809 235656.7+263310000210.2+270455109.60-34.50 5.75 +0.67 +0.05 +0.43 G5VbFe-2 +0.841-0.991 +.083-036SBO 2 3.1 75.5AC 4* -9089 30 PscBD-06 6345 2249351470421630I YY Psc 235649.8-063411000157.6-060051 91.58-65.83 4.41 +1.63 +1.83 +1.41 M3III e+0.051-0.041 +.006-012V * -9090 BD-15 6531 224960166005 I W Cet 235659.9-151357000207.3-144034 77.78-73.06 7.1 +1.80 +0.55 +3.71 S7.3e -0.010-0.019 +013 * -9091 Zet SclCD-3019790 224990 3932 W 235712.3-301639000219.9-294313 16.55-78.90 5.01 -0.15 -0.55 -0.14 B4III +0.019+0.016 +000SB 47 8.0 3. * -9092 31 PscBD+08 5164 224995128544 235716.8+082400000224.2+085725103.01-52.01 6.32 +0.18 +0.14 A6V +0.005-0.003 +011V 97 -9093 32 PscBD+07 5121 2250031285473933 235722.9+075548000229.7+082908102.81-52.46 5.63 +0.29 +0.03 F0V -0.092-0.047 +010V? * -9094 BD+65 1987 225009 10937 1A 235728.5+653232000236.1+660556118.01 3.70 5.86 +1.09 +0.91 G8III +0.010-0.001D+.010-018V =< 25 1.5 15.2AB 3* -9095 BD-20 6703 225045166014 235749.5-203618000257.6-200246 62.90-76.84 6.25 +0.53 +0.08 F6V +0.110+0.071 -004V? -9096 CD-2417960 225069166016 235800.2-244208000307.7-240843 45.57-78.72 6.44 +1.18 G5 +0.039 0.000 +025 -9097 BD+62 2356 225094 10942 V639 Cas 235817.4+630501000325.7+633831117.63 1.26 6.24 +0.33 -0.54 +0.23 B3Ia e-0.008+0.057 -043V? * -9098 2 CetBD-18 6417 225132147059 905 235837.0-175333000344.4-172010 72.10-75.26 4.55 -0.05 -0.12 -0.04 B9.5Vn +0.026-0.009 +.007-005V 186 -9099 BD+65 1993 225136 10948 I 235842.4+660920000351.9+664244118.25 4.27 6.29 +1.67 +1.94 M4III +0.021-0.008 +015 -9100 9 CasBD+61 2586 225180 10954 W 235904.5+614351000413.6+621716117.47-00.08 5.88 +0.30 +0.29 A1III -0.004+0.006 -018V 4.0 246.0 -9101 BD-17 6868 225197147064 235912.4-170503000419.7-163144 74.70-74.79 5.78 +1.10 +1.05 K2III +0.039-0.059 -027 -9102 CD-2918950 225200166031 235913.2-294933000420.3-291607 18.53-79.41 6.40 0.00 -0.05 A0V +0.030+0.014 +028 -9103 3 CetBD-11 6194 2252121470662001I 13 235923.0-110358000430.1-103034 87.07-70.04 4.94 +1.63 +1.92 K3Ib v-0.005-0.011 +.016-042V < 17 -9104 BD+66 1679 225216 10956 235930.1+663632000442.0+671000118.41 4.71 5.67 +1.07 +0.93 K1III +0.092+0.030 +.013-027 -9105 BD+41 4933 225218 36037 I 30 235928.2+413210000436.7+420532113.72-19.94 6.01R B9III +0.005-0.022 -008SB 3.7 5.4 * -9106 CP-73 2346 225233255629 235926.8-732712000430.7-725352307.68-43.80 7.31 +0.44 +0.01 F2V +0.010-0.054 +008 -9107 BD+33 4828 225239 536222002 235939.2+340602000453.8+343935112.17-27.24 6.12 +0.62 +0.09 G2V +0.772+0.089 +.035+004V -9108 CP-72 2800 2252532556311001 235937.0-715936000441.3-712613308.18-45.21 5.59 -0.12 -0.42 B8IV-V +0.028-0.014 -003V -9109 BD+25 5068 225276 73731 I 42 235947.1+260533000456.0+263856110.22-35.07 6.25 +1.40 +1.59 K4IIIb +0.110-0.012 -005 4.5 17.5 -9110 BD+60 2667 225289 10962 V567 Cas 235955.9+604526000506.2+611851117.40-01.06 5.80 -0.09 -0.32 B8IVpHgMn +0.015+0.005 +014V 50 *`) - stardat = bytes.Split(data, []byte("\n")) - chnidx = make(map[string]uint16) - for k, v := range hr2detail { - if v[0] != "" { - chnidx[v[0]] = k - } - if v[1] != "" { - chnidx[v[0]] = k - } - } - return nil -} - -func fullStarData(star InnerStarData) StarData { - star.HIP = hr2hip[star.HR] - if info, ok := hr2detail[star.HR]; ok { - return StarData{ - InnerStarData: star, - ChineseName: info[0], - ChineseAlias: info[1], - ChineseBayerName: info[2], - CommonName: info[3], - ComminAliasName: "", - Cst: info[5], - CstChinese: info[4], - } - } - - return StarData{InnerStarData: star} -} - -func StarDataByChinese(name string) (StarData, error) { - if len(stardat) == 0 { - err := LoadStarData() - if err != nil { - return StarData{}, err - } - } - if strings.HasSuffix(name, "星") { - name = strings.TrimSuffix(name, "星") - } - hr, ok := chnidx[name] - if !ok || int(hr) > len(stardat) || hr == 0 { - return StarData{}, errors.New("no such star") - } - data, err := parseStarData(stardat[hr-1]) - if err != nil { - return StarData{}, err - } - return fullStarData(data), nil -} - -func StarDataByHR(hr int) (StarData, error) { - if len(stardat) == 0 { - err := LoadStarData() - if err != nil { - return StarData{}, err - } - } - if hr > len(stardat) { - return StarData{}, errors.New("no such star") - } - data, err := parseStarData(stardat[hr-1]) - if err != nil { - return StarData{}, err - } - return fullStarData(data), nil -} - -func (s InnerStarData) RaDecByJde(jde float64) (float64, float64) { - //计算自行 - year := ((jde - 2451545.0) / 365.2422) - return ZuoBiaoSuiCha(s.Ra+(year*s.PmRA/3600), s.Dec+(year*s.PmDec/3600), 2451545.0, jde) -} - -func (s StarData) RaDecByDate(date time.Time) (float64, float64) { - jde := Date2JDE(date.UTC()) - return s.RaDecByJde(jde) -} diff --git a/vendor/github.com/starainrt/astro/basic/sun.go b/vendor/github.com/starainrt/astro/basic/sun.go deleted file mode 100644 index 1471f20..0000000 --- a/vendor/github.com/starainrt/astro/basic/sun.go +++ /dev/null @@ -1,651 +0,0 @@ -package basic - -import ( - "math" - - "github.com/starainrt/astro/planet" - . "github.com/starainrt/astro/tools" -) - -/* -黄赤交角、nutation==true时,计算交角章动 -*/ -func EclipticObliquity(jde float64, nutation bool) float64 { - U := (jde - 2451545) / 3652500.000 - sita := 23.000 + 26.000/60.000 + 21.448/3600.000 - ((4680.93*U - 1.55*U*U + 1999.25*U*U*U - 51.38*U*U*U*U - 249.67*U*U*U*U*U - 39.05*U*U*U*U*U*U + 7.12*U*U*U*U*U*U*U + 27.87*U*U*U*U*U*U*U*U + 5.79*U*U*U*U*U*U*U*U*U + 2.45*U*U*U*U*U*U*U*U*U*U) / 3600) - if nutation { - return sita + JJZD(jde) - } else { - return sita - } -} - -func Sita(JD float64) float64 { - return EclipticObliquity(JD, true) -} - -/* - * @name 黄经章动 - */ -func HJZD(jd float64) float64 { // '黄经章动 - t := (jd - 2451545) / 36525.000 - d := 297.8502042 + 445267.1115168*t - 0.0016300*t*t + t*t*t/545868 - t*t*t*t/113065000 - m := SunM(jd) - n := MoonM(jd) - f := MoonLonX(jd) - o := 125.04452 - 1934.136261*t + 0.0020708*t*t + t*t*t/450000 - tp := [][]float64{{0, 0, 0, 0, 1, -171996, -174.2 * t}, {-2, 0, 0, 2, 2, -13187, -1.6 * t}, {0, 0, 0, 2, 2, -2274, -0.2 * t}, {0, 0, 0, 0, 2, 2062, 0.2 * t}, {0, 1, 0, 0, 0, 1426, -3.4 * t}, {0, 0, 1, 0, 0, 712, 0.1 * t}, {-2, 1, 0, 2, 2, -517, 1.2 * t}, {0, 0, 0, 2, 1, -386, -0.4 * t}, {0, 0, 1, 2, 2, -301, 0}, {-2, -1, 0, 2, 2, 217, -0.5 * t}, {-2, 0, 1, 0, 0, -158, 0}, {-2, 0, 0, 2, 1, 129, 0.1 * t}, {0, 0, -1, 2, 2, 123, 0}, {2, 0, 0, 0, 0, 63, 0}, {0, 0, 1, 0, 1, 63, 0.1 * t}, {2, 0, -1, 2, 2, -59, 0}, {0, 0, -1, 0, 1, -58, -0.1 * t}, {0, 0, 1, 2, 1, -51, 0}, {-2, 0, 2, 0, 0, 48, 0}, {0, 0, -2, 2, 1, 46, 0}, {2, 0, 0, 2, 2, -38, 0}, {0, 0, 2, 2, 2, -31, 0}, {0, 0, 2, 0, 0, 29, 0}, {-2, 0, 1, 2, 2, 29, 0}, {0, 0, 0, 2, 0, 26, 0}, {-2, 0, 0, 2, 0, -22, 0}, {0, 0, -1, 2, 1, 21, 0}, {0, 2, 0, 0, 0, 17, -0.1 * t}, {2, 0, -1, 0, 1, 16, 0}, {-2, 2, 0, 2, 2, -16, 0.1 * t}, {0, 1, 0, 0, 1, -15, 0}, {-2, 0, 1, 0, 1, -13, 0}, {0, -1, 0, 0, 1, -12, 0}, {0, 0, 2, -2, 0, 11, 0}, {2, 0, -1, 2, 1, -10, 0}, {2, 0, 1, 2, 2, -8, 0}, {0, 1, 0, 2, 2, 7, 0}, {-2, 1, 1, 0, 0, -7, 0}, {0, -1, 0, 2, 2, -7, 0}, {2, 0, 0, 2, 1, -7, 0}, {2, 0, 1, 0, 0, 6, 0}, {-2, 0, 2, 2, 2, 6, 0}, {-2, 0, 1, 2, 1, 6, 0}, {2, 0, -2, 0, 1, -6, 0}, {2, 0, 0, 0, 1, -6, 0}, {0, -1, 1, 0, 0, 5, 0}, {-2, -1, 0, 2, 1, -5, 0}, {-2, 0, 0, 0, 1, -5, 0}, {0, 0, 2, 2, 1, -5, 0}, {-2, 0, 2, 0, 1, 4, 0}, {-2, 1, 0, 2, 1, 4, 0}, {0, 0, 1, -2, 0, 4, 0}, {-1, 0, 1, 0, 0, -4, 0}, {-2, 1, 0, 0, 0, -4, 0}, {1, 0, 0, 0, 0, -4, 0}, {0, 0, 1, 2, 0, 3, 0}, {0, 0, -2, 2, 2, -3, 0}, {-1, -1, 1, 0, 0, -3, 0}, {0, 1, 1, 0, 0, -3, 0}, {0, -1, 1, 2, 2, -3, 0}, {2, -1, -1, 2, 2, -3, 0}, {0, 0, 3, 2, 2, -3, 0}, {2, -1, 0, 2, 2, -3, 0}} - var s float64 - for i := 0; i < len(tp); i++ { - s += (tp[i][5] + tp[i][6]) * Sin(d*tp[i][0]+m*tp[i][1]+n*tp[i][2]+f*tp[i][3]+o*tp[i][4]) - } - //P=-17.20*Sin(o)-1.32*Sin(2*280.4665 + 36000.7698*t)-0.23*Sin(2*218.3165 + 481267.8813*t )+0.21*Sin(2*o); - //return P/3600; - return (s / 10000) / 3600 -} - -/* - * 交角章动 - */ -func JJZD(jd float64) float64 { //交角章动 - t := (jd - 2451545) / 36525 - //d = 297.85036 +455267.111480*t - 0.0019142*t*t+ t*t*t/189474; - //m = 357.52772 + 35999.050340*t - 0.0001603*t*t- t*t*t/300000; - //n= 134.96298 + 477198.867398*t + 0.0086972*t*t + t*t*t/56250; - //f = 93.27191 + 483202.017538*t - 0.0036825*t*t + t*t*t/327270; - d := 297.8502042 + 445267.1115168*t - 0.0016300*t*t + t*t*t/545868 - t*t*t*t/113065000 - m := SunM(jd) - n := MoonM(jd) - f := MoonLonX(jd) - o := 125.04452 - 1934.136261*t + 0.0020708*t*t + t*t*t/450000 - tp := [][]float64{{0, 0, 0, 0, 1, 92025, 8.9 * t}, {-2, 0, 0, 2, 2, 5736, -3.1 * t}, {0, 0, 0, 2, 2, 977, -0.5 * t}, {0, 0, 0, 0, 2, -895, 0.5 * t}, {0, 1, 0, 0, 0, 54, -0.1 * t}, {0, 0, 1, 0, 0, -7, 0}, {-2, 1, 0, 2, 2, 224, -0.6 * t}, {0, 0, 0, 2, 1, 200, 0}, {0, 0, 1, 2, 2, 129, -0.1 * t}, {-2, -1, 0, 2, 2, -95, 0.3 * t}, {-2, 0, 0, 2, 1, -70, 0}, {0, 0, -1, 2, 2, -53, 0}, {2, 0, 0, 0, 0, 63, 0}, {0, 0, 1, 0, 1, -33, 0}, {2, 0, -1, 2, 2, 26, 0}, {0, 0, -1, 0, 1, 32, 0}, {0, 0, 1, 2, 1, 27, 0}, {0, 0, -2, 2, 1, -24, 0}, {2, 0, 0, 2, 2, 16, 0}, {0, 0, 2, 2, 2, 13, 0}, {-2, 0, 1, 2, 2, -12, 0}, {0, 0, -1, 2, 1, -10, 0}, {2, 0, -1, 0, 1, -8, 0}, {-2, 2, 0, 2, 2, 7, 0}, {0, 1, 0, 0, 1, 9, 0}, {-2, 0, 1, 0, 1, 7, 0}, {0, -1, 0, 0, 1, 6, 0}, {2, 0, -1, 2, 1, 5, 0}, {2, 0, 1, 2, 2, 3, 0}, {0, 1, 0, 2, 2, -3, 0}, {0, -1, 0, 2, 2, 3, 0}, {2, 0, 0, 2, 1, 3, 0}, {-2, 0, 2, 2, 2, -3, 0}, {-2, 0, 1, 2, 1, -3, 0}, {2, 0, -2, 0, 1, 3, 0}, {2, 0, 0, 0, 1, 3, 0}, {-2, -1, 0, 2, 1, 3, 0}, {-2, 0, 0, 0, 1, 3, 0}, {0, 0, 2, 2, 1, 3, 0}} - var s float64 = 0 - for i := 0; i < len(tp); i++ { - s += (tp[i][5] + tp[i][6]) * Cos(d*tp[i][0]+m*tp[i][1]+n*tp[i][2]+f*tp[i][3]+o*tp[i][4]) - } - return s / 10000 / 3600 -} - -/* -@name 太阳几何黄经 -*/ -func SunLo(jd float64) float64 { - T := (jd - 2451545) / 365250 - SunLo := 280.4664567 + 360007.6982779*T + 0.03032028*T*T + T*T*T/49931 - T*T*T*T/15299 - T*T*T*T*T/1988000 - return Limit360(SunLo) -} - -func SunM(JD float64) float64 { - T := (JD - 2451545) / 36525 - sunM := 357.5291092 + 35999.0502909*T - 0.0001559*T*T - 0.00000048*T*T*T - return Limit360(sunM) -} - -/* -@name 地球偏心率 -*/ -func Earthe(JD float64) float64 { //'地球偏心率 - T := (JD - 2451545) / 36525 - Earthe := 0.016708617 - 0.000042037*T - 0.0000001236*T*T - return Earthe -} - -func EarthPI(JD float64) float64 { //近日點經度 - T := (JD - 2451545) / 36525 - return 102.93735 + 1.71953*T + 000046*T*T -} -func SunMidFun(JD float64) float64 { //'太阳中间方程 - T := (JD - 2451545) / 36525 - M := SunM(JD) - SunMidFun := (1.9146-0.004817*T-0.000014*T*T)*Sin(M) + (0.019993-0.000101*T)*Sin(2*M) + 0.00029*Sin(3*M) - return SunMidFun -} -func SunTrueLo(JD float64) float64 { // '太阳真黄经 - SunTrueLo := SunLo(JD) + SunMidFun(JD) - return SunTrueLo -} - -func SunApparentLo(JD float64) float64 { //'太阳视黄经 - - T := (JD - 2451545) / 36525 - SunApparentLo := SunTrueLo(JD) - 0.00569 - 0.00478*Sin(125.04-1934.136*T) - return SunApparentLo -} - -func SunApparentRa(JD float64) float64 { // '太阳视赤经 - return LoToRa(JD, SunApparentLo(JD), 0) -} - -func SunApparentRaDec(JD float64) (float64, float64) { - return LoBoToRaDec(JD, SunApparentLo(JD), 0) -} - -func SunTrueRa(JD float64) float64 { //'太阳真赤经 - - sitas := Sita(JD) - SunTrueRa := ArcTan(Cos(sitas) * Sin(SunTrueLo(JD)) / Cos(SunTrueLo(JD))) - //Select Case SunTrueLo(JD) - tmp := SunTrueLo(JD) - if tmp >= 90 && tmp < 180 { - SunTrueRa = 180 + SunTrueRa - } else if tmp >= 180 && tmp < 270 { - SunTrueRa = 180 + SunTrueRa - } else if tmp >= 270 && tmp <= 360 { - SunTrueRa = 360 + SunTrueRa - } - return SunTrueRa -} - -func SunApparentDec(JD float64) float64 { // '太阳视赤纬 - T := (JD - 2451545) / 36525 - sitas := Sita(JD) + 0.00256*Cos(125.04-1934.136*T) - SunApparentDec := ArcSin(Sin(sitas) * Sin(SunApparentLo(JD))) - return SunApparentDec -} - -func SunTrueDec(JD float64) float64 { // '太阳真赤纬 - sitas := Sita(JD) - SunTrueDec := ArcSin(Sin(sitas) * Sin(SunTrueLo(JD))) - return SunTrueDec -} -func SunTime(JD float64) float64 { //均时差 - - tm := (SunLo(JD) - 0.0057183 - (HSunApparentRa(JD)) + (HJZD(JD))*Cos(Sita(JD))) / 15 - if tm > 23 { - tm = -24 + tm - } - return tm -} - -func SunSC(Lo, JD float64) float64 { //黄道上的岁差,仅黄纬=0时 - - t := (JD - 2451545) / 36525 - //n := 47.0029/3600*t - 0.03302/3600*t*t + 0.000060/3600*t*t*t - //m := 174.876384/3600 - 869.8089/3600*t + 0.03536/3600*t*t - pk := 5029.0966/3600.00*t + 1.11113/3600.00*t*t - 0.000006/3600.00*t*t*t - return Lo + pk -} - -func HSunTrueLo(JD float64) float64 { - L := planet.WherePlanet(0, 0, JD) - return L -} - -func HSunTrueBo(JD float64) float64 { - L := planet.WherePlanet(0, 1, JD) - return L -} - -func HSunApparentLo(JD float64) float64 { - L := HSunTrueLo(JD) - /* - t := (JD - 2451545) / 365250.0 - R := planet.WherePlanet(-1, 2, JD) - t2 := t * t - t3 := t2 * t //千年数的各次方 - R += (-0.0020 + 0.0044*t + 0.0213*t2 - 0.0250*t3) - L = L + HJZD(JD) - 20.4898/R/3600.00 - */ - L = L + HJZD(JD) + SunLoGXC(JD) - return L -} - -func SunLoGXC(JD float64) float64 { - R := planet.WherePlanet(0, 2, JD) - return -20.49552 / R / 3600 -} - -func EarthAway(JD float64) float64 { - //t=(JD - 2451545) / 365250; - //R=Earth_R5(t)+Earth_R4(t)+Earth_R3(t)+Earth_R2(t)+Earth_R1(t)+Earth_R0(t); - return planet.WherePlanet(0, 2, JD) -} - -func HSunApparentRaDec(JD float64) (float64, float64) { - return LoBoToRaDec(JD, HSunApparentLo(JD), HSunTrueBo(JD)) -} - -func HSunApparentRa(JD float64) float64 { // '太阳视赤经 - return LoToRa(JD, HSunApparentLo(JD), HSunTrueBo(JD)) -} - -func HSunTrueRa(JD float64) float64 { //'太阳真赤经 - tmp := HSunTrueLo(JD) - sitas := Sita(JD) - HSunTrueRa := ArcTan(Cos(sitas) * Sin(tmp) / Cos(tmp)) - //Select Case SunTrueLo(JD) - if tmp >= 90 && tmp < 180 { - HSunTrueRa = 180 + HSunTrueRa - } else if tmp >= 180 && tmp < 270 { - HSunTrueRa = 180 + HSunTrueRa - } else if tmp >= 270 && tmp <= 360 { - HSunTrueRa = 360 + HSunTrueRa - } - return HSunTrueRa -} - -func HSunApparentDec(JD float64) float64 { // '太阳视赤纬 - T := (JD - 2451545) / 36525 - sitas := EclipticObliquity(JD, false) + 0.00256*Cos(125.04-1934.136*T) - HSunApparentDec := ArcSin(Sin(sitas) * Sin(HSunApparentLo(JD))) - return HSunApparentDec -} - -func HSunTrueDec(JD float64) float64 { // '太阳真赤纬 - sitas := EclipticObliquity(JD, false) - HSunTrueDec := ArcSin(Sin(sitas) * Sin(HSunTrueLo(JD))) - return HSunTrueDec -} - -func RDJL(jd float64) float64 { //ri di ju li - f := SunMidFun(jd) - m := SunM(jd) - e := Earthe(jd) - return (1.000001018 * (1 - e*e) / (1 + e*Cos(f+m))) -} - -func GetMoonLoops(year float64, loop int) []float64 { - var start float64 - var newMoon, tmp float64 - moon := make([]float64, loop) - if year < 6000 { - start = year + 11.00/12.00 + 5.00/30.00/12.00 - } else { - start = year + 9.00/12.00 + 5.00/30.00/12.00 - } - i := 1 - for j := 0; j < loop; j++ { - if year > 3000 { - newMoon = TD2UT(CalcMoonSH(start+float64(i-1)/12.5, 0)+8.0/24.0, false) - } else { - newMoon = TD2UT(CalcMoonS(start+float64(i-1)/12.5, 0)+8.0/24.0, false) - } - if i != 1 { - if newMoon == tmp { - j-- - i++ - continue - } - } - moon[j] = newMoon - tmp = moon[j] - i++ - // echo DateCalc(moon[i])."
"; - } - return moon -} - -func GetJieqiLoops(year, loop int) []float64 { - start := 270 - jq := make([]float64, loop) - for i := 1; i <= loop; i++ { - angle := start + 15*(i-1) - if angle > 360 { - angle -= 360 - } - jq[i-1] = GetJQTime(year+int(math.Ceil(float64(i-1)/24.000)), angle) + 8.0/24.0 - } - return jq -} - -func GetJQTime(Year, Angle int) float64 { //节气时间 - var j int = 1 - var Day int - var tp float64 - if Angle%2 == 0 { - Day = 18 - } else { - Day = 3 - } - if Angle%10 != 0 { - tp = float64(Angle+15.0) / 30.0 - } else { - tp = float64(Angle) / 30.0 - } - Month := 3 + tp - if Month > 12 { - Month -= 12 - } - JD1 := JDECalc(int(Year), int(Month), float64(Day)) - if Angle == 0 { - Angle = 360 - } - for i := 0; i < j; i++ { - for { - JD0 := JD1 - stDegree := JQLospec(JD0) - float64(Angle) - stDegreep := (JQLospec(JD0+0.000005) - JQLospec(JD0-0.000005)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - JD1 -= 0.001 - } - JD1 += 0.001 - return TD2UT(JD1, false) -} - -func JQLospec(JD float64) float64 { - t := HSunApparentLo(JD) - if t <= 12 { - t += 360 - } - return t -} - -func GetXC(jd float64) string { //十二次 - tlo := HSunApparentLo(jd) - if tlo >= 255 && tlo < 285 { - return "星纪" - } else if tlo >= 285 && tlo < 315 { - return "玄枵" - } else if tlo >= 315 && tlo < 345 { - return "娵訾" - } else if tlo >= 345 || tlo < 15 { - return "降娄" - } else if tlo >= 15 && tlo < 45 { - return "大梁" - } else if tlo >= 45 && tlo < 75 { - return "实沈" - } else if tlo >= 75 && tlo < 105 { - return "鹑首" - } else if tlo >= 105 && tlo < 135 { - return "鹑火" - } else if tlo >= 135 && tlo < 165 { - return "鹑尾" - } else if tlo >= 165 && tlo < 195 { - return "寿星" - } else if tlo >= 195 && tlo < 225 { - return "大火" - } else if tlo >= 225 && tlo < 255 { - return "析木" - } - return "" -} - -func GetWHTime(Year, Angle int) float64 { - tmp := Angle - var Day int - var tp float64 - Angle = int(Angle/15) * 15 - if Angle%2 == 0 { - Day = 18 - } else { - Day = 3 - } - if Angle%10 != 0 { - tp = float64(Angle+15) / 30.0 - } else { - tp = float64(Angle) / 30.0 - } - Month := int(3 + tp) - if Month > 12 { - Month -= 12 - } - JD1 := JDECalc(Year, Month, float64(Day)) - JD1 += float64(tmp - Angle) - Angle = tmp - if Angle <= 5 { - Angle = 360 + Angle - } - for { - JD0 := JD1 - stDegree := JQLospec(JD0) - float64(Angle) - stDegreep := (JQLospec(JD0+0.000005) - JQLospec(JD0-0.000005)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return TD2UT(JD1, false) -} - -/* - * 太阳中天时刻,通过均时差计算 - */ -func GetSunTZTime(JD, Lon, TZ float64) float64 { //实际中天时间 - JD = math.Floor(JD) - tmp := (TZ*15 - Lon) * 4 / 60 - return JD + tmp/24.0 - SunTime(JD)/24.0 -} - -/* - * 昏朦影传入 当天0时时刻 - */ -func GetBanTime(JD, Lon, Lat, TZ, An float64) float64 { - JD = math.Floor(JD) + 1.5 - ntz := math.Round(Lon / 15) - tztime := GetSunTZTime(JD, Lon, ntz) - if SunHeight(tztime, Lon, Lat, ntz) < An { - return -2 //极夜 - } - if SunHeight(tztime+0.5, Lon, Lat, ntz) > An { - return -1 //极昼 - } - tmp := (Sin(An) - Sin(HSunApparentDec(tztime))*Sin(Lat)) / (Cos(HSunApparentDec(tztime)) * Cos(Lat)) - var sundown float64 - if math.Abs(tmp) <= 1 && Lat < 85 { - rzsc := ArcCos(tmp) / 15 - sundown = tztime + rzsc/24.0 + 35.0/24.0/60.0 - } else { - sundown = tztime - i := 0 - for LowSunHeight(sundown, Lon, Lat, ntz) > An { - i++ - sundown += 15.0 / 60.0 / 24.0 - if i > 48 { - break - } - } - } - JD1 := sundown - 5.00/24.00/60.00 - for { - JD0 := JD1 - stDegree := SunHeight(JD0, Lon, Lat, ntz) - An - stDegreep := (SunHeight(JD0+0.000005, Lon, Lat, ntz) - SunHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) < 0.00001 { - break - } - } - return JD1 - ntz/24 + TZ/24 -} - -func GetAsaTime(JD, Lon, Lat, TZ, An float64) float64 { - JD = math.Floor(JD) + 1.5 - ntz := math.Round(Lon / 15) - tztime := GetSunTZTime(JD, Lon, ntz) - if SunHeight(tztime, Lon, Lat, ntz) < An { - return -2 //极夜 - } - if SunHeight(tztime-0.5, Lon, Lat, ntz) > An { - return -1 //极昼 - } - tmp := (Sin(An) - Sin(HSunApparentDec(tztime))*Sin(Lat)) / (Cos(HSunApparentDec(tztime)) * Cos(Lat)) - var sunrise float64 - if math.Abs(tmp) <= 1 && Lat < 85 { - rzsc := ArcCos(tmp) / 15 - sunrise = tztime - rzsc/24 - 25.0/24.0/60.0 - } else { - sunrise = tztime - i := 0 - for LowSunHeight(sunrise, Lon, Lat, ntz) > An { - i++ - sunrise -= 15.0 / 60.0 / 24.0 - if i > 48 { - break - } - } - } - JD1 := sunrise - 5.00/24.00/60.00 - for { - JD0 := JD1 - stDegree := SunHeight(JD0, Lon, Lat, ntz) - An - stDegreep := (SunHeight(JD0+0.000005, Lon, Lat, ntz) - SunHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) < 0.00001 { - break - } - } - return JD1 - ntz/24 + TZ/24 -} - -/* - * 太阳时角 - */ -func SunTimeAngle(JD, Lon, Lat, TZ float64) float64 { - startime := Limit360(ApparentSiderealTime(JD-TZ/24)*15 + Lon) - timeangle := startime - HSunApparentRa(TD2UT(JD-TZ/24, true)) - if timeangle < 0 { - timeangle += 360 - } - return timeangle -} - -/* - * 精确计算,传入当日0时JDE - */ -func GetSunRiseTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - var An float64 - JD = math.Floor(JD) + 1.5 - ntz := math.Round(Lon / 15) - if ZS != 0 { - An = -0.8333 - } - An = An - HeightDegreeByLat(HEI, Lat) - tztime := GetSunTZTime(JD, Lon, ntz) - if SunHeight(tztime, Lon, Lat, ntz) < An { - return -2 //极夜 - } - if SunHeight(tztime-0.5, Lon, Lat, ntz) > An { - return -1 //极昼 - } - //(sin(ho)-sin(φ)*sin(δ2))/(cos(φ)*cos(δ2)) - tmp := (Sin(An) - Sin(HSunApparentDec(tztime))*Sin(Lat)) / (Cos(HSunApparentDec(tztime)) * Cos(Lat)) - var sunrise float64 - if math.Abs(tmp) <= 1 && Lat < 85 { - rzsc := ArcCos(tmp) / 15 - sunrise = tztime - rzsc/24 - 25.0/24.0/60.0 - } else { - sunrise = tztime - i := 0 - //TODO:使用二分法计算 - for LowSunHeight(sunrise, Lon, Lat, ntz) > An { - i++ - sunrise -= 15.0 / 60.0 / 24.0 - if i > 48 { - break - } - } - } - JD1 := sunrise - for { - JD0 := JD1 - stDegree := SunHeight(JD0, Lon, Lat, ntz) - An - stDegreep := (SunHeight(JD0+0.000005, Lon, Lat, ntz) - SunHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 - ntz/24 + TZ/24 -} -func GetSunDownTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - var An float64 - JD = math.Floor(JD) + 1.5 - ntz := math.Round(Lon / 15) - if ZS != 0 { - An = -0.8333 - } - An = An - HeightDegreeByLat(HEI, Lat) - tztime := GetSunTZTime(JD, Lon, ntz) - if SunHeight(tztime, Lon, Lat, ntz) < An { - return -2 //极夜 - } - if SunHeight(tztime+0.5, Lon, Lat, ntz) > An { - return -1 //极昼 - } - tmp := (Sin(An) - Sin(HSunApparentDec(tztime))*Sin(Lat)) / (Cos(HSunApparentDec(tztime)) * Cos(Lat)) - var sundown float64 - if math.Abs(tmp) <= 1 && Lat < 85 { - rzsc := ArcCos(tmp) / 15 - sundown = tztime + rzsc/24.0 + 35.0/24.0/60.0 - } else { - sundown = tztime - i := 0 - for LowSunHeight(sundown, Lon, Lat, ntz) > An { - i++ - sundown += 15.0 / 60.0 / 24.0 - if i > 48 { - break - } - } - } - JD1 := sundown - for { - JD0 := JD1 - stDegree := SunHeight(JD0, Lon, Lat, ntz) - An - stDegreep := (SunHeight(JD0+0.000005, Lon, Lat, ntz) - SunHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 - ntz/24 + TZ/24 -} - -/* - * 太阳高度角 世界时 - */ -func SunHeight(JD, Lon, Lat, TZ float64) float64 { - //tmp := (TZ*15 - Lon) * 4 / 60 - //truejd := JD - tmp/24 - calcjd := JD - TZ/24.0 - tjde := TD2UT(calcjd, true) - st := Limit360(ApparentSiderealTime(calcjd)*15 + Lon) - ra, dec := HSunApparentRaDec(tjde) - H := Limit360(st - ra) - tmp2 := Sin(Lat)*Sin(dec) + Cos(dec)*Cos(Lat)*Cos(H) - return ArcSin(tmp2) -} -func LowSunHeight(JD, Lon, Lat, TZ float64) float64 { - //tmp := (TZ*15 - Lon) * 4 / 60 - //truejd := JD - tmp/24 - calcjd := JD - TZ/24 - st := Limit360(ApparentSiderealTime(calcjd)*15 + Lon) - H := Limit360(st - SunApparentRa(TD2UT(calcjd, true))) - dec := SunApparentDec(TD2UT(calcjd, true)) - tmp2 := Sin(Lat)*Sin(dec) + Cos(dec)*Cos(Lat)*Cos(H) - return ArcSin(tmp2) -} -func SunAngle(JD, Lon, Lat, TZ float64) float64 { - //tmp := (TZ*15 - Lon) * 4 / 60 - //truejd := JD - tmp/24 - calcjd := JD - TZ/24 - st := Limit360(ApparentSiderealTime(calcjd)*15 + Lon) - H := Limit360(st - HSunApparentRa(TD2UT(calcjd, true))) - tmp2 := Sin(H) / (Cos(H)*Sin(Lat) - Tan(HSunApparentDec(TD2UT(calcjd, true)))*Cos(Lat)) - Angle := ArcTan(tmp2) - if Angle < 0 { - if H/15 < 12 { - return Angle + 360 - } - return Angle + 180 - } - if H/15 < 12 { - return Angle + 180 - } - return Angle -} - -/* -* 干支 - */ -func GetGZ(year int) string { - tiangan := []string{"庚", "辛", "壬", "癸", "甲", "乙", "丙", "丁", "戊", "已"} - dizhi := []string{"申", "酉", "戌", "亥", "子", "丑", "寅", "卯", "辰", "巳", "午", "未"} - t := year - (year / 10 * 10) - d := year % 12 - return tiangan[t] + dizhi[d] + "年" -} diff --git a/vendor/github.com/starainrt/astro/basic/uranus.go b/vendor/github.com/starainrt/astro/basic/uranus.go deleted file mode 100644 index dadef0e..0000000 --- a/vendor/github.com/starainrt/astro/basic/uranus.go +++ /dev/null @@ -1,437 +0,0 @@ -package basic - -import ( - "math" - - "github.com/starainrt/astro/planet" - . "github.com/starainrt/astro/tools" -) - -func UranusL(JD float64) float64 { - return planet.WherePlanet(6, 0, JD) -} - -func UranusB(JD float64) float64 { - return planet.WherePlanet(6, 1, JD) -} -func UranusR(JD float64) float64 { - return planet.WherePlanet(6, 2, JD) -} -func AUranusX(JD float64) float64 { - l := UranusL(JD) - b := UranusB(JD) - r := UranusR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - return x -} - -func AUranusY(JD float64) float64 { - - l := UranusL(JD) - b := UranusB(JD) - r := UranusR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - return y -} -func AUranusZ(JD float64) float64 { - //l := UranusL(JD) - b := UranusB(JD) - r := UranusR(JD) - // el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - z := r*Sin(b) - er*Sin(eb) - return z -} - -func AUranusXYZ(JD float64) (float64, float64, float64) { - l := UranusL(JD) - b := UranusB(JD) - r := UranusR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - z := r*Sin(b) - er*Sin(eb) - return x, y, z -} - -func UranusApparentRa(JD float64) float64 { - lo, bo := UranusApparentLoBo(JD) - sita := Sita(JD) - ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo)) - ra = ra * 180 / math.Pi - return Limit360(ra) -} -func UranusApparentDec(JD float64) float64 { - lo, bo := UranusApparentLoBo(JD) - sita := Sita(JD) - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return dec -} - -func UranusApparentRaDec(JD float64) (float64, float64) { - lo, bo := UranusApparentLoBo(JD) - sita := Sita(JD) - ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo)) - ra = ra * 180 / math.Pi - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return Limit360(ra), dec -} - -func EarthUranusAway(JD float64) float64 { - x, y, z := AUranusXYZ(JD) - to := math.Sqrt(x*x + y*y + z*z) - return to -} - -func UranusApparentLo(JD float64) float64 { - x, y, z := AUranusXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AUranusXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - lo += HJZD(JD) - return lo -} - -func UranusApparentBo(JD float64) float64 { - x, y, z := AUranusXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AUranusXYZ(JD - to) - //lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - //lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - //lo+=GXCLo(lo,bo,JD); - //bo+=GXCBo(lo,bo,JD)/3600; - //lo+=HJZD(JD); - return bo -} - -func UranusApparentLoBo(JD float64) (float64, float64) { - x, y, z := AUranusXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AUranusXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - lo += HJZD(JD) - return lo, bo -} - -func UranusMag(JD float64) float64 { - AwaySun := UranusR(JD) - AwayEarth := EarthUranusAway(JD) - Away := planet.WherePlanet(-1, 2, JD) - i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth) - i = ArcCos(i) - Mag := -7.19 + 5*math.Log10(AwaySun*AwayEarth) + 0.016*i - return FloatRound(Mag, 2) -} - -func UranusHeight(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := UranusApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 高度角、时角与天球座标三角转换公式 - // sin(h)=sin(lat)*sin(dec)+cos(dec)*cos(lat)*cos(H) - sinHeight := Sin(lat)*Sin(dec) + Cos(dec)*Cos(lat)*Cos(H) - return ArcSin(sinHeight) -} - -func UranusAzimuth(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := UranusApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 三角转换公式 - tanAzimuth := Sin(H) / (Cos(H)*Sin(lat) - Tan(dec)*Cos(lat)) - Azimuth := ArcTan(tanAzimuth) - if Azimuth < 0 { - if H/15 < 12 { - return Azimuth + 360 - } - return Azimuth + 180 - } - if H/15 < 12 { - return Azimuth + 180 - } - return Azimuth -} - -func UranusHourAngle(JD, Lon, TZ float64) float64 { - startime := Limit360(ApparentSiderealTime(JD-TZ/24)*15 + Lon) - timeangle := startime - UranusApparentRa(TD2UT(JD-TZ/24.0, true)) - if timeangle < 0 { - timeangle += 360 - } - return timeangle -} - -func UranusCulminationTime(jde, lon, timezone float64) float64 { - //jde 世界时,非力学时,当地时区 0时,无需转换力学时 - //ra,dec 瞬时天球座标,非J2000等时间天球坐标 - jde = math.Floor(jde) + 0.5 - JD1 := jde + Limit360(360-UranusHourAngle(jde, lon, timezone))/15.0/24.0*0.99726851851851851851 - limitHA := func(jde, lon, timezone float64) float64 { - ha := UranusHourAngle(jde, lon, timezone) - if ha < 180 { - ha += 360 - } - return ha - } - for { - JD0 := JD1 - stDegree := limitHA(JD0, lon, timezone) - 360 - stDegreep := (limitHA(JD0+0.000005, lon, timezone) - limitHA(JD0-0.000005, lon, timezone)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func UranusRiseTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return uranusRiseDown(JD, Lon, Lat, TZ, ZS, HEI, true) -} - -func UranusDownTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return uranusRiseDown(JD, Lon, Lat, TZ, ZS, HEI, false) -} - -func uranusRiseDown(JD, Lon, Lat, TZ, ZS, HEI float64, isRise bool) float64 { - var An float64 - JD = math.Floor(JD) + 0.5 - ntz := math.Round(Lon / 15) - if ZS != 0 { - An = -0.8333 - } - An = An - HeightDegreeByLat(HEI, Lat) - tztime := UranusCulminationTime(JD, Lon, ntz) - if UranusHeight(tztime, Lon, Lat, ntz) < An { - return -2 //极夜 - } - if UranusHeight(tztime-0.5, Lon, Lat, ntz) > An { - return -1 //极昼 - } - dec := HSunApparentDec(TD2UT(tztime-ntz/24, true)) - //(sin(ho)-sin(φ)*sin(δ2))/(cos(φ)*cos(δ2)) - tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat)) - var rise float64 - if math.Abs(tmp) <= 1 { - rzsc := ArcCos(tmp) / 15 - if isRise { - rise = tztime - rzsc/24 - 25.0/24.0/60.0 - } else { - rise = tztime + rzsc/24 - 25.0/24.0/60.0 - } - } else { - rise = tztime - i := 0 - //TODO:使用二分法计算 - for UranusHeight(rise, Lon, Lat, ntz) > An { - i++ - if isRise { - rise -= 15.0 / 60.0 / 24.0 - } else { - rise += 15.0 / 60.0 / 24.0 - } - if i > 48 { - break - } - } - } - JD1 := rise - for { - JD0 := JD1 - stDegree := UranusHeight(JD0, Lon, Lat, ntz) - An - stDegreep := (UranusHeight(JD0+0.000005, Lon, Lat, ntz) - UranusHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 - ntz/24 + TZ/24 -} - -// Pos - -const URANUS_S_PERIOD = 1 / ((1 / 365.256363004) - (1 / 30799.095)) - -func uranusConjunction(jde, degree float64, next uint8) float64 { - //0=last 1=next - decSub := func(jde float64, degree float64, filter bool) float64 { - sub := Limit360(Limit360(UranusApparentLo(jde)-HSunApparentLo(jde)) - degree) - if filter { - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - } - return sub - } - dayCost := URANUS_S_PERIOD / 360 - nowSub := decSub(jde, degree, false) - if next == 0 { - jde -= (360 - nowSub) * dayCost - } else { - jde += dayCost * nowSub - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, degree, true) - stDegreep := (decSub(JD0+0.000005, degree, true) - decSub(JD0-0.000005, degree, true)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return TD2UT(JD1, false) -} - -func LastUranusConjunction(jde float64) float64 { - return uranusConjunction(jde, 0, 0) -} - -func NextUranusConjunction(jde float64) float64 { - return uranusConjunction(jde, 0, 1) -} - -func LastUranusOpposition(jde float64) float64 { - return uranusConjunction(jde, 180, 0) -} - -func NextUranusOpposition(jde float64) float64 { - return uranusConjunction(jde, 180, 1) -} - -func NextUranusEasternQuadrature(jde float64) float64 { - return uranusConjunction(jde, 90, 1) -} - -func LastUranusEasternQuadrature(jde float64) float64 { - return uranusConjunction(jde, 90, 0) -} - -func NextUranusWesternQuadrature(jde float64) float64 { - return uranusConjunction(jde, 270, 1) -} - -func LastUranusWesternQuadrature(jde float64) float64 { - return uranusConjunction(jde, 270, 0) -} - -func uranusRetrograde(jde float64, isLeft bool) float64 { - //0=last 1=next - decSub := func(jde float64, val float64) float64 { - sub := UranusApparentRa(jde+val) - UranusApparentRa(jde-val) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub / (2 * val) - } - jde = NextUranusOpposition(jde) - if isLeft { - jde -= 60 - } else { - jde += 60 - } - for { - nowSub := decSub(jde, 1.0/86400.0) - if math.Abs(nowSub) > 0.55 { - jde += 2 - continue - } - break - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, 2.0/86400.0) - stDegreep := (decSub(JD0+15.0/86400.0, 2.0/86400.0) - decSub(JD0-15.0/86400.0, 2.0/86400.0)) / (30.0 / 86400.0) - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 30.0/86400.0 { - break - } - } - JD1 = JD1 - 15.0/86400.0 - min := JD1 - minRa := 100.0 - for i := 0.0; i < 60.0; i++ { - tmp := decSub(JD1+i*0.5/86400.0, 0.5/86400.0) - if math.Abs(tmp) < math.Abs(minRa) { - minRa = tmp - min = JD1 + i*0.5/86400.0 - } - } - return TD2UT(min, false) -} - -func NextUranusRetrogradeToPrograde(jde float64) float64 { - date := uranusRetrograde(jde, false) - if date < jde { - op := NextUranusOpposition(jde) - return uranusRetrograde(op+10, false) - } - return date -} - -func LastUranusRetrogradeToPrograde(jde float64) float64 { - jde = LastUranusOpposition(jde) - 10 - date := uranusRetrograde(jde, false) - if date > jde { - op := LastUranusOpposition(jde) - return uranusRetrograde(op-10, false) - } - return date -} - -func NextUranusProgradeToRetrograde(jde float64) float64 { - date := uranusRetrograde(jde, true) - if date < jde { - op := NextUranusOpposition(jde) - return uranusRetrograde(op+10, true) - } - return date -} - -func LastUranusProgradeToRetrograde(jde float64) float64 { - jde = LastUranusOpposition(jde) - 10 - date := uranusRetrograde(jde, true) - if date > jde { - op := LastUranusOpposition(jde) - return uranusRetrograde(op-10, true) - } - return date -} diff --git a/vendor/github.com/starainrt/astro/basic/venus.go b/vendor/github.com/starainrt/astro/basic/venus.go deleted file mode 100644 index ecebfc4..0000000 --- a/vendor/github.com/starainrt/astro/basic/venus.go +++ /dev/null @@ -1,615 +0,0 @@ -package basic - -import ( - "math" - - "github.com/starainrt/astro/planet" - . "github.com/starainrt/astro/tools" -) - -func VenusL(JD float64) float64 { - return planet.WherePlanet(2, 0, JD) -} - -func VenusB(JD float64) float64 { - return planet.WherePlanet(2, 1, JD) -} -func VenusR(JD float64) float64 { - return planet.WherePlanet(2, 2, JD) -} -func AVenusX(JD float64) float64 { - l := VenusL(JD) - b := VenusB(JD) - r := VenusR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - return x -} - -func AVenusY(JD float64) float64 { - - l := VenusL(JD) - b := VenusB(JD) - r := VenusR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - return y -} -func AVenusZ(JD float64) float64 { - //l := VenusL(JD) - b := VenusB(JD) - r := VenusR(JD) - // el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - z := r*Sin(b) - er*Sin(eb) - return z -} - -func AVenusXYZ(JD float64) (float64, float64, float64) { - l := VenusL(JD) - b := VenusB(JD) - r := VenusR(JD) - el := planet.WherePlanet(-1, 0, JD) - eb := planet.WherePlanet(-1, 1, JD) - er := planet.WherePlanet(-1, 2, JD) - x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el) - y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el) - z := r*Sin(b) - er*Sin(eb) - return x, y, z -} - -func VenusApparentRa(JD float64) float64 { - lo, bo := VenusApparentLoBo(JD) - sita := Sita(JD) - ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo)) - ra = ra * 180 / math.Pi - return Limit360(ra) -} -func VenusApparentDec(JD float64) float64 { - lo, bo := VenusApparentLoBo(JD) - sita := Sita(JD) - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return dec -} - -func VenusApparentRaDec(JD float64) (float64, float64) { - lo, bo := VenusApparentLoBo(JD) - sita := Sita(JD) - ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo)) - ra = ra * 180 / math.Pi - dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo)) - return Limit360(ra), dec -} - -func EarthVenusAway(JD float64) float64 { - x, y, z := AVenusXYZ(JD) - to := math.Sqrt(x*x + y*y + z*z) - return to -} - -func VenusApparentLo(JD float64) float64 { - x, y, z := AVenusXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AVenusXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - lo += HJZD(JD) - return lo -} - -func VenusApparentBo(JD float64) float64 { - x, y, z := AVenusXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AVenusXYZ(JD - to) - //lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - //lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - //lo+=GXCLo(lo,bo,JD); - //bo+=GXCBo(lo,bo,JD)/3600; - //lo+=HJZD(JD); - return bo -} - -func VenusApparentLoBo(JD float64) (float64, float64) { - x, y, z := AVenusXYZ(JD) - to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z) - x, y, z = AVenusXYZ(JD - to) - lo := math.Atan2(y, x) - bo := math.Atan2(z, math.Sqrt(x*x+y*y)) - lo = lo * 180 / math.Pi - bo = bo * 180 / math.Pi - lo = Limit360(lo) - //lo-=GXCLo(lo,bo,JD)/3600; - //bo+=GXCBo(lo,bo,JD); - lo += HJZD(JD) - return lo, bo -} - -func VenusMag(JD float64) float64 { - AwaySun := VenusR(JD) - AwayEarth := EarthVenusAway(JD) - Away := planet.WherePlanet(-1, 2, JD) - i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth) - i = ArcCos(i) - Mag := -4.40 + 5*math.Log10(AwaySun*AwayEarth) + 0.0009*i + 0.000239*i*i - 0.00000065*i*i*i - return FloatRound(Mag, 2) -} - -func VenusHeight(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := VenusApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 高度角、时角与天球座标三角转换公式 - // sin(h)=sin(lat)*sin(dec)+cos(dec)*cos(lat)*cos(H) - sinHeight := Sin(lat)*Sin(dec) + Cos(dec)*Cos(lat)*Cos(H) - return ArcSin(sinHeight) -} - -func VenusAzimuth(jde, lon, lat, timezone float64) float64 { - // 转换为世界时 - utcJde := jde - timezone/24.0 - // 计算视恒星时 - ra, dec := VenusApparentRaDec(TD2UT(utcJde, true)) - st := Limit360(ApparentSiderealTime(utcJde)*15 + lon) - // 计算时角 - H := Limit360(st - ra) - // 三角转换公式 - tanAzimuth := Sin(H) / (Cos(H)*Sin(lat) - Tan(dec)*Cos(lat)) - Azimuth := ArcTan(tanAzimuth) - if Azimuth < 0 { - if H/15 < 12 { - return Azimuth + 360 - } - return Azimuth + 180 - } - if H/15 < 12 { - return Azimuth + 180 - } - return Azimuth -} - -func VenusHourAngle(JD, Lon, TZ float64) float64 { - startime := Limit360(ApparentSiderealTime(JD-TZ/24)*15 + Lon) - timeangle := startime - VenusApparentRa(TD2UT(JD-TZ/24.0, true)) - if timeangle < 0 { - timeangle += 360 - } - return timeangle -} - -func VenusCulminationTime(jde, lon, timezone float64) float64 { - //jde 世界时,非力学时,当地时区 0时,无需转换力学时 - //ra,dec 瞬时天球座标,非J2000等时间天球坐标 - jde = math.Floor(jde) + 0.5 - JD1 := jde + Limit360(360-VenusHourAngle(jde, lon, timezone))/15.0/24.0*0.99726851851851851851 - limitHA := func(jde, lon, timezone float64) float64 { - ha := VenusHourAngle(jde, lon, timezone) - if ha < 180 { - ha += 360 - } - return ha - } - for { - JD0 := JD1 - stDegree := limitHA(JD0, lon, timezone) - 360 - stDegreep := (limitHA(JD0+0.000005, lon, timezone) - limitHA(JD0-0.000005, lon, timezone)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 -} - -func VenusRiseTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return venusRiseDown(JD, Lon, Lat, TZ, ZS, HEI, true) -} - -func VenusDownTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 { - return venusRiseDown(JD, Lon, Lat, TZ, ZS, HEI, false) -} - -func venusRiseDown(JD, Lon, Lat, TZ, ZS, HEI float64, isRise bool) float64 { - var An float64 - JD = math.Floor(JD) + 0.5 - ntz := math.Round(Lon / 15) - if ZS != 0 { - An = -0.8333 - } - An = An - HeightDegreeByLat(HEI, Lat) - tztime := VenusCulminationTime(JD, Lon, ntz) - if VenusHeight(tztime, Lon, Lat, ntz) < An { - return -2 //极夜 - } - if VenusHeight(tztime-0.5, Lon, Lat, ntz) > An { - return -1 //极昼 - } - dec := HSunApparentDec(TD2UT(tztime-ntz/24, true)) - //(sin(ho)-sin(φ)*sin(δ2))/(cos(φ)*cos(δ2)) - tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat)) - var rise float64 - if math.Abs(tmp) <= 1 { - rzsc := ArcCos(tmp) / 15 - if isRise { - rise = tztime - rzsc/24 - 25.0/24.0/60.0 - } else { - rise = tztime + rzsc/24 - 25.0/24.0/60.0 - } - } else { - rise = tztime - i := 0 - //TODO:使用二分法计算 - for VenusHeight(rise, Lon, Lat, ntz) > An { - i++ - if isRise { - rise -= 15.0 / 60.0 / 24.0 - } else { - rise += 15.0 / 60.0 / 24.0 - } - if i > 48 { - break - } - } - } - JD1 := rise - for { - JD0 := JD1 - stDegree := VenusHeight(JD0, Lon, Lat, ntz) - An - stDegreep := (VenusHeight(JD0+0.000005, Lon, Lat, ntz) - VenusHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return JD1 - ntz/24 + TZ/24 -} - -// Pos - -const VENUS_S_PERIOD = 1 / ((1 / 224.701) - (1 / 365.256363004)) - -func venusConjunction(jde float64, next uint8) float64 { - //0=last 1=next - decSub := func(jde float64) float64 { - sub := Limit360(VenusApparentLo(jde) - HSunApparentLo(jde)) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub - } - nowSub := decSub(jde) - pos := math.Abs(decSub(jde+1/86400.0)) - math.Abs(nowSub) - if pos >= 0 && next == 1 && nowSub > 0 { - jde += VENUS_S_PERIOD/8.0 + 2 - } - if pos >= 0 && next == 1 && nowSub < 0 { - jde += VENUS_S_PERIOD/6.0 + 2 - } - if pos <= 0 && next == 0 && nowSub < 0 { - jde -= VENUS_S_PERIOD/8.0 + 2 - } - if pos <= 0 && next == 0 && nowSub > 0 { - jde -= VENUS_S_PERIOD/6.0 + 2 - } - for { - nowSub := decSub(jde) - pos := math.Abs(decSub(jde+1/86400.0)) - math.Abs(nowSub) - if math.Abs(nowSub) > 24 || (pos > 0 && next == 1) || (pos < 0 && next == 0) { - if next == 1 { - jde += 8 - } else { - jde -= 8 - } - continue - } - break - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0) - stDegreep := (decSub(JD0+0.000005) - decSub(JD0-0.000005)) / 0.00001 - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 0.00001 { - break - } - } - return TD2UT(JD1, false) -} - -func LastVenusConjunction(jde float64) float64 { - return venusConjunction(jde, 0) -} - -func NextVenusConjunction(jde float64) float64 { - return venusConjunction(jde, 1) -} - -func NextVenusInferiorConjunction(jde float64) float64 { - date := NextVenusConjunction(jde) - if EarthVenusAway(date) > EarthAway(date) { - return NextVenusConjunction(date + 2) - } - return date -} - -func NextVenusSuperiorConjunction(jde float64) float64 { - date := NextVenusConjunction(jde) - if EarthVenusAway(date) < EarthAway(date) { - return NextVenusConjunction(date + 2) - } - return date -} - -func LastVenusInferiorConjunction(jde float64) float64 { - date := LastVenusConjunction(jde) - if EarthVenusAway(date) > EarthAway(date) { - return LastVenusConjunction(date - 2) - } - return date -} - -func LastVenusSuperiorConjunction(jde float64) float64 { - date := LastVenusConjunction(jde) - if EarthVenusAway(date) < EarthAway(date) { - return LastVenusConjunction(date - 2) - } - return date -} - -func venusRetrograde(jde float64) float64 { - //0=last 1=next - decSunSub := func(jde float64) float64 { - sub := Limit360(VenusApparentRa(jde) - SunApparentRa(jde)) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub - } - decSub := func(jde float64, val float64) float64 { - sub := VenusApparentRa(jde+val) - VenusApparentRa(jde-val) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub / (2 * val) - } - lastHe := LastVenusConjunction(jde) - nextHe := NextVenusConjunction(jde) - nowSub := decSunSub(jde) - if nowSub > 0 { - jde = lastHe + ((nextHe - lastHe) / 5.0 * 3.5) - } else { - jde = lastHe + 10 - } - for { - nowSub := decSub(jde, 1.0/86400.0) - if math.Abs(nowSub) > 0.5 { - jde += 5 - continue - } - break - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, 0.5/86400.0) - stDegreep := (decSub(JD0+10.0/86400.0, 0.5/86400.0) - decSub(JD0-10.0/86400.0, 0.5/86400.0)) / (20.0 / 86400.0) - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 20.0/86400.0 { - break - } - } - JD1 = JD1 - 10.0/86400.0 - min := JD1 - minRa := 100.0 - for i := 0.0; i < 40.0; i++ { - tmp := decSub(JD1+i*0.5/86400.0, 0.5/86400.0) - if math.Abs(tmp) < math.Abs(minRa) { - minRa = tmp - min = JD1 + i*0.5/86400.0 - } - } - //fmt.Println((min - lastHe) / (nextHe - lastHe)) - return TD2UT(min, false) -} - -func NextVenusRetrograde(jde float64) float64 { - date := venusRetrograde(jde) - if date < jde { - nextHe := NextVenusConjunction(jde) - return venusRetrograde(nextHe + 2) - } - return date -} - -func LastVenusRetrograde(jde float64) float64 { - lastHe := LastVenusConjunction(jde) - date := venusRetrograde(lastHe + 2) - if date > jde { - lastLastHe := LastVenusConjunction(lastHe - 2) - return venusRetrograde(lastLastHe + 2) - } - return date -} - -func NextVenusProgradeToRetrograde(jde float64) float64 { - date := NextVenusRetrograde(jde) - sub := Limit360(VenusApparentRa(date) - SunApparentRa(date)) - if sub > 180 { - return NextVenusRetrograde(date + VENUS_S_PERIOD/2) - } - return date -} - -func NextVenusRetrogradeToPrograde(jde float64) float64 { - date := NextVenusRetrograde(jde) - sub := Limit360(VenusApparentRa(date) - SunApparentRa(date)) - if sub < 180 { - return NextVenusRetrograde(date + 12) - } - return date -} - -func LastVenusProgradeToRetrograde(jde float64) float64 { - date := LastVenusRetrograde(jde) - sub := Limit360(VenusApparentRa(date) - SunApparentRa(date)) - if sub > 180 { - return LastVenusRetrograde(date - 12) - } - return date -} - -func LastVenusRetrogradeToPrograde(jde float64) float64 { - date := LastVenusRetrograde(jde) - sub := Limit360(VenusApparentRa(date) - SunApparentRa(date)) - if sub < 180 { - return LastVenusRetrograde(date - VENUS_S_PERIOD/2) - } - return date -} - -func VenusSunElongation(jde float64) float64 { - lo1, bo1 := VenusApparentLoBo(jde) - lo2 := SunApparentLo(jde) - bo2 := HSunTrueBo(jde) - return StarAngularSeparation(lo1, bo1, lo2, bo2) -} -func venusGreatestElongation(jde float64) float64 { - decSunSub := func(jde float64) float64 { - sub := Limit360(VenusApparentRa(jde) - SunApparentRa(jde)) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub - } - decSub := func(jde float64, val float64) float64 { - sub := VenusSunElongation(jde+val) - VenusSunElongation(jde-val) - if sub > 180 { - sub -= 360 - } - if sub < -180 { - sub += 360 - } - return sub / (2 * val) - } - lastHe := LastVenusConjunction(jde) - nextHe := NextVenusConjunction(jde) - nowSub := decSunSub(jde) - if nowSub > 0 { - jde = lastHe + ((nextHe - lastHe) / 5.0 * 2.5) - } else { - jde = lastHe + ((nextHe - lastHe) / 5.0) - } - for { - nowSub := decSub(jde, 1.0/86400.0) - if math.Abs(nowSub) > 0.15 { - jde += 5 - continue - } - break - } - JD1 := jde - for { - JD0 := JD1 - stDegree := decSub(JD0, 2.0/86400.0) - stDegreep := (decSub(JD0+15.0/86400.0, 2.0/86400.0) - decSub(JD0-15.0/86400.0, 2.0/86400.0)) / (30.0 / 86400.0) - JD1 = JD0 - stDegree/stDegreep - if math.Abs(JD1-JD0) <= 30.0/86400.0 { - break - } - } - JD1 = JD1 - 15.0/86400.0 - min := JD1 - minRa := 100.0 - for i := 0.0; i < 60.0; i++ { - tmp := decSub(JD1+i*0.5/86400.0, 0.5/86400.0) - if math.Abs(tmp) < math.Abs(minRa) { - minRa = tmp - min = JD1 + i*0.5/86400.0 - } - } - //fmt.Println((min - lastHe) / (nextHe - lastHe)) - return TD2UT(min, false) -} - -func NextVenusGreatestElongation(jde float64) float64 { - date := venusGreatestElongation(jde) - if date < jde { - nextHe := NextVenusConjunction(jde) - return venusGreatestElongation(nextHe + 2) - } - return date -} - -func LastVenusGreatestElongation(jde float64) float64 { - lastHe := LastVenusConjunction(jde) - date := venusGreatestElongation(lastHe + 2) - if date > jde { - lastLastHe := LastVenusConjunction(lastHe - 2) - return venusGreatestElongation(lastLastHe + 2) - } - return date -} - -func NextVenusGreatestElongationEast(jde float64) float64 { - date := NextVenusGreatestElongation(jde) - sub := Limit360(VenusApparentRa(date) - SunApparentRa(date)) - if sub > 180 { - return NextVenusGreatestElongation(date + 1) - } - return date -} - -func NextVenusGreatestElongationWest(jde float64) float64 { - date := NextVenusGreatestElongation(jde) - sub := Limit360(VenusApparentRa(date) - SunApparentRa(date)) - if sub < 180 { - return NextVenusGreatestElongation(date + 1) - } - return date -} - -func LastVenusGreatestElongationEast(jde float64) float64 { - date := LastVenusGreatestElongation(jde) - sub := Limit360(VenusApparentRa(date) - SunApparentRa(date)) - if sub > 180 { - return LastVenusGreatestElongation(date - 1) - } - return date -} - -func LastVenusGreatestElongationWest(jde float64) float64 { - date := LastVenusGreatestElongation(jde) - sub := Limit360(VenusApparentRa(date) - SunApparentRa(date)) - if sub < 180 { - return LastVenusGreatestElongation(date - 1) - } - return date -} diff --git a/vendor/github.com/starainrt/astro/planet/planet.go b/vendor/github.com/starainrt/astro/planet/planet.go deleted file mode 100644 index 7fe9704..0000000 --- a/vendor/github.com/starainrt/astro/planet/planet.go +++ /dev/null @@ -1,282 +0,0 @@ -package planet - -import ( - . "github.com/starainrt/astro/tools" - "math" -) - -func WherePlanet(xt, zn int, jd float64) float64 { - var XL0 [][]float64 - XL0 = [][]float64{ - - //Dear精度:J2000+-4千年 黄经0.1角秒 黄纬0.1角秒 距离0.1AU/10^6 - []float64{ - 10000000000, //A的倍率 - 20, 578, 920, 1100, 1124, 1136, 1148, 1217, 1226, 1229, 1229, 1229, 1229, 1937, 2363, 2618, 2633, 2660, 2666, //位置索引表 - /*L0*/ 17534704567, 0.00000000000, 0.00000000000, 334165646, 4.669256804, 6283.075849991, 3489428, 4.6261024, 12566.1517000, 349706, 2.744118, 5753.384885, 341757, 2.828866, 3.523118, 313590, 3.627670, 77713.771468, 267622, 4.418084, 7860.419392, 234269, 6.135162, 3930.209696, 132429, 0.742464, 11506.769770, 127317, 2.037097, 529.690965, 119917, 1.109629, 1577.343542, 99025, 5.23268, 5884.92685, 90186, 2.04505, 26.29832, 85722, 3.50849, 398.14900, 77979, 1.17883, 5223.69392, 75314, 2.53339, 5507.55324, 50526, 4.58293, 18849.22755, 49238, 4.20507, 775.52261, 35666, 2.91954, 0.06731, 31709, 5.84902, 11790.62909, 28413, 1.89869, 796.29801, 27104, 0.31489, 10977.07880, 24281, 0.34481, 5486.77784, 20616, 4.80647, 2544.31442, 20539, 1.86948, 5573.14280, 20226, 2.45768, 6069.77675, 15552, 0.83306, 213.29910, 13221, 3.41118, 2942.46342, 12618, 1.08303, 20.77540, 11513, 0.64545, 0.98032, 10285, 0.63600, 4694.00295, 10190, 0.97569, 15720.83878, 10172, 4.26680, 7.11355, 9921, 6.2099, 2146.1654, 9761, 0.6810, 155.4204, 8580, 5.9832, 161000.6857, 8513, 1.2987, 6275.9623, 8471, 3.6708, 71430.6956, 7964, 1.8079, 17260.1547, 7876, 3.0370, 12036.4607, 7465, 1.7551, 5088.6288, 7387, 3.5032, 3154.6871, 7355, 4.6793, 801.8209, 6963, 0.8330, 9437.7629, 6245, 3.9776, 8827.3903, 6115, 1.8184, 7084.8968, 5696, 2.7843, 6286.5990, 5612, 4.3869, 14143.4952, 5558, 3.4701, 6279.5527, 5199, 0.1891, 12139.5535, 5161, 1.3328, 1748.0164, 5115, 0.2831, 5856.4777, 4900, 0.4874, 1194.4470, 4104, 5.3682, 8429.2413, 4094, 2.3985, 19651.0485, 3920, 6.1683, 10447.3878, 3677, 6.0413, 10213.2855, 3660, 2.5696, 1059.3819, 3595, 1.7088, 2352.8662, 3557, 1.7760, 6812.7668, 3329, 0.5931, 17789.8456, 3041, 0.4429, 83996.8473, 3005, 2.7398, 1349.8674, 2535, 3.1647, 4690.4798, 2474, 0.2148, 3.5904, 2366, 0.4847, 8031.0923, 2357, 2.0653, 3340.6124, 2282, 5.2220, 4705.7323, 2189, 5.5559, 553.5694, 2142, 1.4256, 16730.4637, 2109, 4.1483, 951.7184, 2030, 0.3713, 283.8593, 1992, 5.2221, 12168.0027, 1986, 5.7747, 6309.3742, 1912, 3.8222, 23581.2582, 1889, 5.3863, 149854.4001, 1790, 2.2149, 13367.9726, 1748, 4.5605, 135.0651, 1622, 5.9884, 11769.8537, 1508, 4.1957, 6256.7775, 1442, 4.1932, 242.7286, 1435, 3.7236, 38.0277, 1397, 4.4014, 6681.2249, 1362, 1.8893, 7632.9433, 1250, 1.1305, 5.5229, 1205, 2.6223, 955.5997, 1200, 1.0035, 632.7837, 1129, 0.1774, 4164.3120, 1083, 0.3273, 103.0928, 1052, 0.9387, 11926.2544, 1050, 5.3591, 1592.5960, 1033, 6.1998, 6438.4962, 1001, 6.0291, 5746.2713, 980, 0.999, 11371.705, 980, 5.244, 27511.468, 938, 2.624, 5760.498, 923, 0.483, 522.577, 922, 4.571, 4292.331, 905, 5.337, 6386.169, 862, 4.165, 7058.598, 841, 3.299, 7234.794, 836, 4.539, 25132.303, 813, 6.112, 4732.031, 812, 6.271, 426.598, 801, 5.821, 28.449, 787, 0.996, 5643.179, 776, 2.957, 23013.540, 769, 3.121, 7238.676, 758, 3.974, 11499.656, 735, 4.386, 316.392, 731, 0.607, 11513.883, 719, 3.998, 74.782, 706, 0.323, 263.084, 676, 5.911, 90955.552, 663, 3.665, 17298.182, 653, 5.791, 18073.705, 630, 4.717, 6836.645, 615, 1.458, 233141.314, 612, 1.075, 19804.827, 596, 3.321, 6283.009, 596, 2.876, 6283.143, 555, 2.452, 12352.853, 541, 5.392, 419.485, 531, 0.382, 31441.678, 519, 4.065, 6208.294, 513, 2.361, 10973.556, 494, 5.737, 9917.697, 450, 3.272, 11015.106, 449, 3.653, 206.186, 447, 2.064, 7079.374, 435, 4.423, 5216.580, 421, 1.906, 245.832, 413, 0.921, 3738.761, 402, 0.840, 20.355, 387, 1.826, 11856.219, 379, 2.344, 3.881, 374, 2.954, 3128.389, 370, 5.031, 536.805, 365, 1.018, 16200.773, 365, 1.083, 88860.057, 352, 5.978, 3894.182, 352, 2.056, 244287.600, 351, 3.713, 6290.189, 340, 1.106, 14712.317, 339, 0.978, 8635.942, 339, 3.202, 5120.601, 333, 0.837, 6496.375, 325, 3.479, 6133.513, 316, 5.089, 21228.392, 316, 1.328, 10873.986, 309, 3.646, 10.637, 303, 1.802, 35371.887, 296, 3.397, 9225.539, 288, 6.026, 154717.610, 281, 2.585, 14314.168, 262, 3.856, 266.607, 262, 2.579, 22483.849, 257, 1.561, 23543.231, 255, 3.949, 1990.745, 251, 3.744, 10575.407, 240, 1.161, 10984.192, 238, 0.106, 7.046, 236, 4.272, 6040.347, 234, 3.577, 10969.965, 211, 3.714, 65147.620, 210, 0.754, 13521.751, 207, 4.228, 5650.292, 202, 0.814, 170.673, 201, 4.629, 6037.244, 200, 0.381, 6172.870, 199, 3.933, 6206.810, 199, 5.197, 6262.300, 197, 1.046, 18209.330, 195, 1.070, 5230.807, 195, 4.869, 36.028, 194, 4.313, 6244.943, 192, 1.229, 709.933, 192, 5.595, 6282.096, 192, 0.602, 6284.056, 189, 3.744, 23.878, 188, 1.904, 15.252, 188, 0.867, 22003.915, 182, 3.681, 15110.466, 181, 0.491, 1.484, 179, 3.222, 39302.097, 179, 1.259, 12559.038, - /*L1*/ 62833196674749, 0.000000000000, 0.000000000000, 20605886, 2.67823456, 6283.07584999, 430343, 2.635127, 12566.151700, 42526, 1.59047, 3.52312, 11926, 5.79557, 26.29832, 10898, 2.96618, 1577.34354, 9348, 2.5921, 18849.2275, 7212, 1.1385, 529.6910, 6777, 1.8747, 398.1490, 6733, 4.4092, 5507.5532, 5903, 2.8880, 5223.6939, 5598, 2.1747, 155.4204, 4541, 0.3980, 796.2980, 3637, 0.4662, 775.5226, 2896, 2.6471, 7.1135, 2084, 5.3414, 0.9803, 1910, 1.8463, 5486.7778, 1851, 4.9686, 213.2991, 1729, 2.9912, 6275.9623, 1623, 0.0322, 2544.3144, 1583, 1.4305, 2146.1654, 1462, 1.2053, 10977.0788, 1246, 2.8343, 1748.0164, 1188, 3.2580, 5088.6288, 1181, 5.2738, 1194.4470, 1151, 2.0750, 4694.0030, 1064, 0.7661, 553.5694, 997, 1.303, 6286.599, 972, 4.239, 1349.867, 945, 2.700, 242.729, 858, 5.645, 951.718, 758, 5.301, 2352.866, 639, 2.650, 9437.763, 610, 4.666, 4690.480, 583, 1.766, 1059.382, 531, 0.909, 3154.687, 522, 5.661, 71430.696, 520, 1.854, 801.821, 504, 1.425, 6438.496, 433, 0.241, 6812.767, 426, 0.774, 10447.388, 413, 5.240, 7084.897, 374, 2.001, 8031.092, 356, 2.429, 14143.495, 350, 4.800, 6279.553, 337, 0.888, 12036.461, 337, 3.862, 1592.596, 325, 3.400, 7632.943, 322, 0.616, 8429.241, 318, 3.188, 4705.732, 297, 6.070, 4292.331, 295, 1.431, 5746.271, 290, 2.325, 20.355, 275, 0.935, 5760.498, 270, 4.804, 7234.794, 253, 6.223, 6836.645, 228, 5.003, 17789.846, 225, 5.672, 11499.656, 215, 5.202, 11513.883, 208, 3.955, 10213.286, 208, 2.268, 522.577, 206, 2.224, 5856.478, 206, 2.550, 25132.303, 203, 0.910, 6256.778, 189, 0.532, 3340.612, 188, 4.735, 83996.847, 179, 1.474, 4164.312, 178, 3.025, 5.523, 177, 3.026, 5753.385, 159, 4.637, 3.286, 157, 6.124, 5216.580, 155, 3.077, 6681.225, 154, 4.200, 13367.973, 143, 1.191, 3894.182, 138, 3.093, 135.065, 136, 4.245, 426.598, 134, 5.765, 6040.347, 128, 3.085, 5643.179, 127, 2.092, 6290.189, 125, 3.077, 11926.254, 125, 3.445, 536.805, 114, 3.244, 12168.003, 112, 2.318, 16730.464, 111, 3.901, 11506.770, 111, 5.320, 23.878, 105, 3.750, 7860.419, 103, 2.447, 1990.745, 96, 0.82, 3.88, 96, 4.08, 6127.66, 91, 5.42, 206.19, 91, 0.42, 7079.37, 88, 5.17, 11790.63, 81, 0.34, 9917.70, 80, 3.89, 10973.56, 78, 2.40, 1589.07, 78, 2.58, 11371.70, 77, 3.98, 955.60, 77, 3.36, 36.03, 76, 1.30, 103.09, 75, 5.18, 10969.97, 75, 4.96, 6496.37, 73, 5.21, 38.03, 72, 2.65, 6309.37, 70, 5.61, 3738.76, 69, 2.60, 3496.03, 69, 0.39, 15.25, 69, 2.78, 20.78, 65, 1.13, 7058.60, 64, 4.28, 28.45, 61, 5.63, 10984.19, 60, 0.73, 419.48, 60, 5.28, 10575.41, 58, 5.55, 17298.18, 58, 3.19, 4732.03, - /*L2*/ 5291887, 0.0000000, 0.0000000, 871984, 1.072097, 6283.075850, 30913, 0.86729, 12566.15170, 2734, 0.0530, 3.5231, 1633, 5.1883, 26.2983, 1575, 3.6846, 155.4204, 954, 0.757, 18849.228, 894, 2.057, 77713.771, 695, 0.827, 775.523, 506, 4.663, 1577.344, 406, 1.031, 7.114, 381, 3.441, 5573.143, 346, 5.141, 796.298, 317, 6.053, 5507.553, 302, 1.192, 242.729, 289, 6.117, 529.691, 271, 0.306, 398.149, 254, 2.280, 553.569, 237, 4.381, 5223.694, 208, 3.754, 0.980, 168, 0.902, 951.718, 153, 5.759, 1349.867, 145, 4.364, 1748.016, 134, 3.721, 1194.447, 125, 2.948, 6438.496, 122, 2.973, 2146.165, 110, 1.271, 161000.686, 104, 0.604, 3154.687, 100, 5.986, 6286.599, 92, 4.80, 5088.63, 89, 5.23, 7084.90, 83, 3.31, 213.30, 76, 3.42, 5486.78, 71, 6.19, 4690.48, 68, 3.43, 4694.00, 65, 1.60, 2544.31, 64, 1.98, 801.82, 61, 2.48, 10977.08, 50, 1.44, 6836.65, 49, 2.34, 1592.60, 46, 1.31, 4292.33, 46, 3.81, 149854.40, 43, 0.04, 7234.79, 40, 4.94, 7632.94, 39, 1.57, 71430.70, 38, 3.17, 6309.37, 35, 0.99, 6040.35, 35, 0.67, 1059.38, 31, 3.18, 2352.87, 31, 3.55, 8031.09, 30, 1.92, 10447.39, 30, 2.52, 6127.66, 28, 4.42, 9437.76, 28, 2.71, 3894.18, 27, 0.67, 25132.30, 26, 5.27, 6812.77, 25, 0.55, 6279.55, 23, 1.38, 4705.73, 22, 0.64, 6256.78, 20, 6.07, 640.88, - /*L3*/ 28923, 5.84384, 6283.07585, 3496, 0.0000, 0.0000, 1682, 5.4877, 12566.1517, 296, 5.196, 155.420, 129, 4.722, 3.523, 71, 5.30, 18849.23, 64, 5.97, 242.73, 40, 3.79, 553.57, - /*L4*/ 11408, 3.14159, 0.00000, 772, 4.134, 6283.076, 77, 3.84, 12566.15, 42, 0.42, 155.42, - /*L5*/ 88, 3.14, 0.00, 17, 2.77, 6283.08, 5, 2.01, 155.42, 3, 2.21, 12566.15, - /*B0*/ 27962, 3.19870, 84334.66158, 10164, 5.42249, 5507.55324, 8045, 3.8801, 5223.6939, 4381, 3.7044, 2352.8662, 3193, 4.0003, 1577.3435, 2272, 3.9847, 1047.7473, 1814, 4.9837, 6283.0758, 1639, 3.5646, 5856.4777, 1444, 3.7028, 9437.7629, 1430, 3.4112, 10213.2855, 1125, 4.8282, 14143.4952, 1090, 2.0857, 6812.7668, 1037, 4.0566, 71092.8814, 971, 3.473, 4694.003, 915, 1.142, 6620.890, 878, 4.440, 5753.385, 837, 4.993, 7084.897, 770, 5.554, 167621.576, 719, 3.602, 529.691, 692, 4.326, 6275.962, 558, 4.410, 7860.419, 529, 2.484, 4705.732, 521, 6.250, 18073.705, - /*B1*/ 903, 3.897, 5507.553, 618, 1.730, 5223.694, 380, 5.244, 2352.866, - /*B2*/ 166, 1.627, 84334.662, - /*R0*/ 10001398880, 0.00000000000, 0.00000000000, 167069963, 3.098463508, 6283.075849991, 1395602, 3.0552461, 12566.1517000, 308372, 5.198467, 77713.771468, 162846, 1.173877, 5753.384885, 157557, 2.846852, 7860.419392, 92480, 5.45292, 11506.76977, 54244, 4.56409, 3930.20970, 47211, 3.66100, 5884.92685, 34598, 0.96369, 5507.55324, 32878, 5.89984, 5223.69392, 30678, 0.29867, 5573.14280, 24319, 4.27350, 11790.62909, 21183, 5.84715, 1577.34354, 18575, 5.02194, 10977.07880, 17484, 3.01194, 18849.22755, 10984, 5.05511, 5486.77784, 9832, 0.8868, 6069.7768, 8650, 5.6896, 15720.8388, 8583, 1.2708, 161000.6857, 6490, 0.2725, 17260.1547, 6292, 0.9218, 529.6910, 5706, 2.0137, 83996.8473, 5574, 5.2416, 71430.6956, 4938, 3.2450, 2544.3144, 4696, 2.5781, 775.5226, 4466, 5.5372, 9437.7629, 4252, 6.0111, 6275.9623, 3897, 5.3607, 4694.0030, 3825, 2.3926, 8827.3903, 3749, 0.8295, 19651.0485, 3696, 4.9011, 12139.5535, 3566, 1.6747, 12036.4607, 3454, 1.8427, 2942.4634, 3319, 0.2437, 7084.8968, 3192, 0.1837, 5088.6288, 3185, 1.7778, 398.1490, 2846, 1.2134, 6286.5990, 2779, 1.8993, 6279.5527, 2628, 4.5890, 10447.3878, 2460, 3.7866, 8429.2413, 2393, 4.9960, 5856.4777, 2359, 0.2687, 796.2980, 2329, 2.8078, 14143.4952, 2210, 1.9500, 3154.6871, 2035, 4.6527, 2146.1654, 1951, 5.3823, 2352.8662, 1883, 0.6731, 149854.4001, 1833, 2.2535, 23581.2582, 1796, 0.1987, 6812.7668, 1731, 6.1520, 16730.4637, 1717, 4.4332, 10213.2855, 1619, 5.2316, 17789.8456, 1381, 5.1896, 8031.0923, 1364, 3.6852, 4705.7323, 1314, 0.6529, 13367.9726, 1041, 4.3329, 11769.8537, 1017, 1.5939, 4690.4798, 998, 4.201, 6309.374, 966, 3.676, 27511.468, 874, 6.064, 1748.016, 779, 3.674, 12168.003, 771, 0.312, 7632.943, 756, 2.626, 6256.778, 746, 5.648, 11926.254, 693, 2.924, 6681.225, 680, 1.423, 23013.540, 674, 0.563, 3340.612, 663, 5.661, 11371.705, 659, 3.136, 801.821, 648, 2.650, 19804.827, 615, 3.029, 233141.314, 612, 5.134, 1194.447, 563, 4.341, 90955.552, 552, 2.091, 17298.182, 534, 5.100, 31441.678, 531, 2.407, 11499.656, 523, 4.624, 6438.496, 513, 5.324, 11513.883, 477, 0.256, 11856.219, 461, 1.722, 7234.794, 458, 3.766, 6386.169, 458, 4.466, 5746.271, 423, 1.055, 5760.498, 422, 1.557, 7238.676, 415, 2.599, 7058.598, 401, 3.030, 1059.382, 397, 1.201, 1349.867, 379, 4.907, 4164.312, 360, 5.707, 5643.179, 352, 3.626, 244287.600, 348, 0.761, 10973.556, 342, 3.001, 4292.331, 336, 4.546, 4732.031, 334, 3.138, 6836.645, 324, 4.164, 9917.697, 316, 1.691, 11015.106, 307, 0.238, 35371.887, 298, 1.306, 6283.143, 298, 1.750, 6283.009, 293, 5.738, 16200.773, 286, 5.928, 14712.317, 281, 3.515, 21228.392, 280, 5.663, 8635.942, 277, 0.513, 26.298, 268, 4.207, 18073.705, 266, 0.900, 12352.853, 260, 2.962, 25132.303, 255, 2.477, 6208.294, 242, 2.800, 709.933, 231, 1.054, 22483.849, 229, 1.070, 14314.168, 216, 1.314, 154717.610, 215, 6.038, 10873.986, 200, 0.561, 7079.374, 198, 2.614, 951.718, 197, 4.369, 167283.762, 186, 2.861, 5216.580, 183, 1.660, 39302.097, 183, 5.912, 3738.761, 175, 2.145, 6290.189, 173, 2.168, 10575.407, 171, 3.702, 1592.596, 171, 1.343, 3128.389, 164, 5.550, 6496.375, 164, 5.856, 10984.192, 161, 1.998, 10969.965, 161, 1.909, 6133.513, 157, 4.955, 25158.602, 154, 6.216, 23543.231, 153, 5.357, 13521.751, 150, 5.770, 18209.330, 150, 5.439, 155.420, 139, 1.778, 9225.539, 139, 1.626, 5120.601, 128, 2.460, 13916.019, 123, 0.717, 143571.324, 122, 2.654, 88860.057, 121, 4.414, 3894.182, 121, 1.192, 3.523, 120, 4.030, 553.569, 119, 1.513, 17654.781, 117, 3.117, 14945.316, 113, 2.698, 6040.347, 110, 3.085, 43232.307, 109, 0.998, 955.600, 108, 2.939, 17256.632, 107, 5.285, 65147.620, 103, 0.139, 11712.955, 103, 5.850, 213.299, 102, 3.046, 6037.244, 101, 2.842, 8662.240, 100, 3.626, 6262.300, 98, 2.36, 6206.81, 98, 5.11, 6172.87, 98, 2.00, 15110.47, 97, 2.67, 5650.29, 97, 2.75, 6244.94, 96, 4.02, 6282.10, 96, 5.31, 6284.06, 92, 0.10, 29088.81, 85, 3.26, 20426.57, 84, 2.60, 28766.92, 81, 3.58, 10177.26, 80, 5.81, 5230.81, 78, 2.53, 16496.36, 77, 4.06, 6127.66, 73, 0.04, 5481.25, 72, 5.96, 12559.04, 72, 5.92, 4136.91, 71, 5.49, 22003.91, 70, 3.41, 7.11, 69, 0.62, 11403.68, 69, 3.90, 1589.07, 69, 1.96, 12416.59, 69, 4.51, 426.60, 67, 1.61, 11087.29, 66, 4.50, 47162.52, 66, 5.08, 283.86, 66, 4.32, 16858.48, 65, 1.04, 6062.66, 64, 1.59, 18319.54, 63, 5.70, 45892.73, 63, 4.60, 66567.49, 63, 3.82, 13517.87, 62, 2.62, 11190.38, 61, 1.54, 33019.02, 60, 5.58, 10344.30, 60, 5.38, 316428.23, 60, 5.78, 632.78, 59, 6.12, 9623.69, 57, 0.16, 17267.27, 57, 3.86, 6076.89, 57, 1.98, 7668.64, 56, 4.78, 20199.09, 55, 4.56, 18875.53, 55, 3.51, 17253.04, 54, 3.07, 226858.24, 54, 4.83, 18422.63, 53, 5.02, 12132.44, 52, 3.63, 5333.90, 52, 0.97, 155427.54, 51, 3.36, 20597.24, 50, 0.99, 11609.86, 50, 2.21, 1990.75, 48, 1.62, 12146.67, 48, 1.17, 12569.67, 47, 4.62, 5436.99, 47, 1.81, 12562.63, 47, 0.59, 21954.16, 47, 0.76, 7342.46, 46, 0.27, 4590.91, 46, 3.77, 156137.48, 45, 5.66, 10454.50, 44, 5.84, 3496.03, 43, 0.24, 17996.03, 41, 5.93, 51092.73, 41, 4.21, 12592.45, 40, 5.14, 1551.05, 40, 5.28, 15671.08, 39, 3.69, 18052.93, 39, 4.94, 24356.78, 38, 2.72, 11933.37, 38, 5.23, 7477.52, 38, 4.99, 9779.11, 37, 3.70, 9388.01, 37, 4.44, 4535.06, 36, 2.16, 28237.23, 36, 2.54, 242.73, 36, 0.22, 5429.88, 35, 6.15, 19800.95, 35, 2.92, 36949.23, 34, 5.63, 2379.16, 34, 5.73, 16460.33, 34, 5.11, 5849.36, 33, 6.19, 6268.85, - /*R1*/ 10301861, 1.10748970, 6283.07584999, 172124, 1.064423, 12566.151700, 70222, 3.14159, 0.00000, 3235, 1.0217, 18849.2275, 3080, 2.8435, 5507.5532, 2497, 1.3191, 5223.6939, 1849, 1.4243, 1577.3435, 1008, 5.9138, 10977.0788, 865, 1.420, 6275.962, 863, 0.271, 5486.778, 507, 1.686, 5088.629, 499, 6.014, 6286.599, 467, 5.987, 529.691, 440, 0.518, 4694.003, 410, 1.084, 9437.763, 387, 4.750, 2544.314, 375, 5.071, 796.298, 352, 0.023, 83996.847, 344, 0.949, 71430.696, 341, 5.412, 775.523, 322, 6.156, 2146.165, 286, 5.484, 10447.388, 284, 3.420, 2352.866, 255, 6.132, 6438.496, 252, 0.243, 398.149, 243, 3.092, 4690.480, 225, 3.689, 7084.897, 220, 4.952, 6812.767, 219, 0.420, 8031.092, 209, 1.282, 1748.016, 193, 5.314, 8429.241, 185, 1.820, 7632.943, 175, 3.229, 6279.553, 173, 1.537, 4705.732, 158, 4.097, 11499.656, 158, 5.539, 3154.687, 150, 3.633, 11513.883, 148, 3.222, 7234.794, 147, 3.653, 1194.447, 144, 0.817, 14143.495, 135, 6.151, 5746.271, 134, 4.644, 6836.645, 128, 2.693, 1349.867, 123, 5.650, 5760.498, 118, 2.577, 13367.973, 113, 3.357, 17789.846, 110, 4.497, 4292.331, 108, 5.828, 12036.461, 102, 5.621, 6256.778, 99, 1.14, 1059.38, 98, 0.66, 5856.48, 93, 2.32, 10213.29, 92, 0.77, 16730.46, 88, 1.50, 11926.25, 86, 1.42, 5753.38, 85, 0.66, 155.42, 81, 1.64, 6681.22, 80, 4.11, 951.72, 66, 4.55, 5216.58, 65, 0.98, 25132.30, 64, 4.19, 6040.35, 64, 0.52, 6290.19, 63, 1.51, 5643.18, 59, 6.18, 4164.31, 57, 2.30, 10973.56, 55, 2.32, 11506.77, 55, 2.20, 1592.60, 55, 5.27, 3340.61, 54, 5.54, 553.57, 53, 5.04, 9917.70, 53, 0.92, 11371.70, 52, 3.98, 17298.18, 52, 3.60, 10969.97, 49, 5.91, 3894.18, 49, 2.51, 6127.66, 48, 1.67, 12168.00, 46, 0.31, 801.82, 42, 3.70, 10575.41, 42, 4.05, 10984.19, 40, 2.17, 7860.42, 40, 4.17, 26.30, 38, 5.82, 7058.60, 37, 3.39, 6496.37, 36, 1.08, 6309.37, 36, 5.34, 7079.37, 34, 3.62, 11790.63, 32, 0.32, 16200.77, 31, 4.24, 3738.76, 29, 4.55, 11856.22, 29, 1.26, 8635.94, 27, 3.45, 5884.93, 26, 5.08, 10177.26, 26, 5.38, 21228.39, 24, 2.26, 11712.96, 24, 1.05, 242.73, 24, 5.59, 6069.78, 23, 3.63, 6284.06, 23, 1.64, 4732.03, 22, 3.46, 213.30, 21, 1.05, 3496.03, 21, 3.92, 13916.02, 21, 4.01, 5230.81, 20, 5.16, 12352.85, 20, 0.69, 1990.75, 19, 2.73, 6062.66, 19, 5.01, 11015.11, 18, 6.04, 6283.01, 18, 2.85, 7238.68, 18, 5.60, 6283.14, 18, 5.16, 17253.04, 18, 2.54, 14314.17, 17, 1.58, 7.11, 17, 0.98, 3930.21, 17, 4.75, 17267.27, 16, 2.19, 6076.89, 16, 2.19, 18073.70, 16, 6.12, 3.52, 16, 4.61, 9623.69, 16, 3.40, 16496.36, 15, 0.19, 9779.11, 15, 5.30, 13517.87, 15, 4.26, 3128.39, 15, 0.81, 709.93, 14, 0.50, 25158.60, 14, 4.38, 4136.91, 13, 0.98, 65147.62, 13, 3.31, 154717.61, 13, 2.11, 1589.07, 13, 1.92, 22483.85, 12, 6.03, 9225.54, 12, 1.53, 12559.04, 12, 5.82, 6282.10, 12, 5.61, 5642.20, 12, 2.38, 167283.76, 12, 0.39, 12132.44, 12, 3.98, 4686.89, 12, 5.81, 12569.67, 12, 0.56, 5849.36, 11, 0.45, 6172.87, 11, 5.80, 16858.48, 11, 6.22, 12146.67, 11, 2.27, 5429.88, - /*R2*/ 435939, 5.784551, 6283.075850, 12363, 5.57935, 12566.15170, 1234, 3.1416, 0.0000, 879, 3.628, 77713.771, 569, 1.870, 5573.143, 330, 5.470, 18849.228, 147, 4.480, 5507.553, 110, 2.842, 161000.686, 101, 2.815, 5223.694, 85, 3.11, 1577.34, 65, 5.47, 775.52, 61, 1.38, 6438.50, 50, 4.42, 6286.60, 47, 3.66, 7084.90, 46, 5.39, 149854.40, 42, 0.90, 10977.08, 40, 3.20, 5088.63, 35, 1.81, 5486.78, 32, 5.35, 3154.69, 30, 3.52, 796.30, 29, 4.62, 4690.48, 28, 1.84, 4694.00, 27, 3.14, 71430.70, 27, 6.17, 6836.65, 26, 1.42, 2146.17, 25, 2.81, 1748.02, 24, 2.18, 155.42, 23, 4.76, 7234.79, 21, 3.38, 7632.94, 21, 0.22, 4705.73, 20, 4.22, 1349.87, 20, 2.01, 1194.45, 20, 4.58, 529.69, 19, 1.59, 6309.37, 18, 5.70, 6040.35, 18, 6.03, 4292.33, 17, 2.90, 9437.76, 17, 2.00, 8031.09, 17, 5.78, 83996.85, 16, 0.05, 2544.31, 15, 0.95, 6127.66, 14, 0.36, 10447.39, 14, 1.48, 2352.87, 13, 0.77, 553.57, 13, 5.48, 951.72, 13, 5.27, 6279.55, 13, 3.76, 6812.77, 11, 5.41, 6256.78, 10, 0.68, 1592.60, 10, 4.95, 398.15, 10, 1.15, 3894.18, 10, 5.20, 244287.60, 10, 1.94, 11856.22, 9, 5.39, 25132.30, 8, 6.18, 1059.38, 8, 0.69, 8429.24, 8, 5.85, 242.73, 7, 5.26, 14143.50, 7, 0.52, 801.82, 6, 2.24, 8635.94, 6, 4.00, 13367.97, 6, 2.77, 90955.55, 6, 5.17, 7058.60, 5, 1.46, 233141.31, 5, 4.13, 7860.42, 5, 3.91, 26.30, 5, 3.89, 12036.46, 5, 5.58, 6290.19, 5, 5.54, 1990.75, 5, 0.83, 11506.77, 5, 6.22, 6681.22, 4, 5.26, 10575.41, 4, 1.91, 7477.52, 4, 0.43, 10213.29, 4, 1.09, 709.93, 4, 5.09, 11015.11, 4, 4.22, 88860.06, 4, 3.57, 7079.37, 4, 1.98, 6284.06, 4, 3.93, 10973.56, 4, 6.18, 9917.70, 4, 0.36, 10177.26, 4, 2.75, 3738.76, 4, 3.33, 5643.18, 4, 5.36, 25158.60, - /*R3*/ 14459, 4.27319, 6283.07585, 673, 3.917, 12566.152, 77, 0.00, 0.00, 25, 3.73, 18849.23, 4, 2.80, 6286.60, - /*R4*/ 386, 2.564, 6283.076, 31, 2.27, 12566.15, 5, 3.44, 5573.14, 2, 2.05, 18849.23, 1, 2.06, 77713.77, 1, 4.41, 161000.69, 1, 3.82, 149854.40, 1, 4.08, 6127.66, 1, 5.26, 6438.50, - /*R5*/ 9, 1.22, 6283.08, 1, 0.66, 12566.15}, - - //Dmer精度:J2000+-4千年 黄经0.2角秒 黄纬0.2角秒 距离0.2AU/10^6 - []float64{ - 1000000000, //A的倍率 - 20, 443, 710, 761, 791, 818, 824, 1043, 1106, 1142, 1169, 1190, 1196, 1550, 1742, 1781, 1808, 1823, 1823, //位置索引表 - /*L0*/ 4402507101, 0.0000000000, 0.0000000000, 409894150, 1.483020342, 26087.903141574, 50462942, 4.47785490, 52175.80628315, 8553468, 1.1652032, 78263.7094247, 1655904, 4.1196916, 104351.6125663, 345619, 0.779308, 130439.515708, 75835, 3.71348, 156527.41885, 35597, 1.51203, 1109.37855, 18035, 4.10333, 5661.33205, 17260, 0.35832, 182615.32199, 15899, 2.99510, 25028.52121, 13647, 4.59918, 27197.28169, 10173, 0.88031, 31749.23519, 7142, 1.5414, 24978.5246, 6438, 5.3027, 21535.9496, 4511, 6.0499, 51116.4244, 4042, 3.2823, 208703.2251, 3524, 5.2416, 20426.5711, 3452, 2.7921, 15874.6176, 3433, 5.7653, 955.5997, 3392, 5.8633, 25558.2122, 3253, 1.3367, 53285.1848, 2729, 2.4945, 529.6910, 2643, 3.9171, 57837.1383, 2596, 0.9873, 4551.9535, 2388, 0.1134, 1059.3819, 2348, 0.2667, 11322.6641, 2166, 0.6599, 13521.7514, 2090, 2.0918, 47623.8528, 1834, 2.6288, 27043.5029, 1816, 2.4341, 25661.3050, 1760, 4.5364, 51066.4277, 1726, 2.4520, 24498.8302, 1423, 3.3600, 37410.5672, 1379, 0.2910, 10213.2855, 1252, 3.7208, 39609.6546, 1182, 2.7815, 77204.3275, 1064, 4.2057, 19804.8273, 969, 6.204, 234791.128, 900, 5.852, 41962.521, 883, 5.413, 26617.594, 868, 2.642, 51646.115, 867, 1.960, 46514.474, 850, 4.331, 79373.088, 697, 3.572, 25132.303, 692, 4.194, 19.670, 685, 0.634, 83925.041, 648, 0.048, 33326.579, 635, 3.147, 7238.676, 595, 2.747, 16983.996, 565, 5.119, 73711.756, 554, 4.053, 30639.857, 544, 3.143, 27147.285, 515, 5.478, 50586.733, 496, 3.990, 6770.711, 480, 5.493, 51749.208, 476, 5.497, 3.881, 447, 1.224, 77154.331, 419, 5.193, 6283.076, 418, 5.642, 53131.406, 380, 2.431, 12566.152, 360, 1.424, 2218.757, 356, 0.814, 32858.614, 354, 3.370, 36301.189, 340, 0.475, 65697.558, 340, 2.786, 14765.239, 308, 5.770, 103292.231, 306, 5.840, 43071.899, 295, 0.698, 213.299, 285, 0.650, 426.598, 275, 0.980, 45892.730, 271, 0.085, 63498.470, 268, 1.061, 3442.575, 263, 0.648, 1589.073, 262, 5.242, 22645.328, 243, 4.400, 7.114, 237, 2.842, 260879.031, 229, 2.585, 68050.424, 224, 1.025, 105460.991, 223, 5.653, 77734.018, 223, 2.179, 52705.497, 222, 3.224, 25448.006, 220, 4.934, 72602.377, 186, 4.527, 28306.660, 178, 3.612, 110012.945, 176, 4.717, 25874.604, 172, 0.284, 51220.207, 172, 3.261, 153.779, 149, 1.835, 99799.659, 144, 0.966, 26107.573, 144, 1.910, 23969.139, 142, 5.142, 26068.233, 142, 6.124, 53235.188, 140, 2.302, 76674.637, 134, 4.518, 26080.790, 134, 0.766, 56727.760, 124, 2.223, 77837.111, 120, 6.205, 18849.228, 116, 2.385, 79219.309, 115, 4.178, 103242.234, 112, 2.048, 32370.979, 111, 3.783, 26301.202, 100, 2.046, 48733.231, 98, 2.27, 26091.78, 97, 3.84, 26084.02, 97, 2.99, 59414.48, 97, 5.78, 25938.34, 94, 5.44, 38654.05, 93, 4.03, 467.96, 90, 6.23, 25021.41, 90, 3.48, 91785.46, 90, 0.11, 62389.09, 89, 2.85, 25035.63, 83, 5.34, 19317.19, 82, 5.78, 40853.14, 81, 1.12, 26095.02, 80, 2.46, 129380.13, 76, 0.18, 12432.04, 74, 4.71, 6.63, 70, 3.99, 71980.63, 70, 1.63, 23869.15, 66, 3.66, 26514.50, 61, 3.67, 27676.98, 60, 0.00, 51535.91, 59, 3.99, 131548.89, 59, 4.12, 29530.48, 59, 5.57, 94138.33, 59, 5.76, 286966.93, 59, 6.13, 26011.64, 59, 2.14, 20760.43, 58, 2.35, 103821.92, 58, 4.45, 19406.68, 57, 3.02, 89586.37, 57, 5.18, 78793.40, 57, 1.61, 98690.28, 52, 3.29, 38519.95, 51, 3.78, 58946.52, 46, 0.29, 136100.85, 45, 1.50, 51962.51, 45, 4.89, 50057.04, 44, 3.25, 77308.11, - /*L1*/ 26088147062227, 0.000000000000, 0.000000000000, 11260078, 6.21703971, 26087.90314157, 3034714, 3.0556547, 52175.8062831, 805385, 6.104547, 78263.709425, 212450, 2.835319, 104351.612566, 55921, 5.82676, 130439.51571, 14722, 2.51845, 156527.41885, 3883, 5.4804, 182615.3220, 3522, 3.0524, 1109.3786, 1027, 2.1488, 208703.2251, 935, 6.118, 27197.282, 906, 0.000, 24978.525, 519, 5.621, 5661.332, 444, 4.573, 25028.521, 281, 3.042, 51066.428, 273, 5.092, 234791.128, 220, 0.865, 955.600, 204, 3.715, 20426.571, 202, 0.519, 21535.950, 175, 5.727, 4551.953, 167, 1.351, 529.691, 154, 5.743, 19.670, 153, 1.792, 11322.664, 140, 3.594, 24498.830, 128, 2.696, 53285.185, 126, 3.895, 3.881, 126, 4.705, 1059.382, 86, 6.06, 77154.33, 80, 3.93, 27043.50, 80, 4.18, 26617.59, 79, 0.50, 46514.47, 77, 2.48, 57837.14, 73, 1.75, 260879.03, 72, 2.98, 2218.76, 68, 2.77, 7.11, 66, 5.53, 6770.71, 64, 2.14, 25132.30, 59, 2.20, 13521.75, 58, 4.28, 16984.00, 50, 3.94, 25661.30, 50, 2.48, 30639.86, 49, 4.85, 37410.57, 46, 0.82, 25558.21, 46, 1.56, 27147.29, 45, 5.79, 3442.57, 44, 4.94, 213.30, 43, 5.09, 10213.29, 42, 5.54, 83925.04, 37, 1.40, 77204.33, 36, 2.34, 32858.61, 35, 3.59, 26068.23, 34, 0.50, 22645.33, 33, 5.23, 25448.01, 32, 1.26, 14765.24, 31, 6.21, 26080.79, 31, 6.07, 28306.66, 30, 4.45, 7238.68, 30, 0.14, 50586.73, 29, 1.64, 25021.41, 29, 0.67, 26091.78, 28, 2.51, 26107.57, 28, 3.54, 72602.38, 27, 5.64, 1589.07, 27, 0.88, 52705.50, 26, 2.78, 103242.23, 25, 5.80, 26095.02, 25, 4.35, 41962.52, 24, 1.16, 25035.63, 23, 5.44, 26084.02, 23, 1.85, 36301.19, 21, 5.16, 51220.21, 21, 1.07, 43071.90, 20, 2.96, 23969.14, 20, 4.44, 103292.23, 20, 0.84, 12566.15, 20, 4.68, 286966.93, 18, 1.81, 26301.20, 18, 5.18, 426.60, 17, 2.29, 110012.94, 17, 4.63, 53235.19, 17, 1.26, 33326.58, 16, 5.53, 56727.76, 16, 0.08, 23869.15, 16, 4.66, 79373.09, 16, 3.76, 73711.76, 14, 1.14, 68050.42, 14, 1.45, 51646.12, 13, 3.80, 19317.19, 13, 1.73, 12432.04, - /*L2*/ 530498, 0.000000, 0.000000, 169037, 4.690723, 26087.903142, 73967, 1.34736, 52175.80628, 30183, 4.45644, 78263.70942, 11074, 1.26227, 104351.61257, 3782, 4.3200, 130439.5157, 1230, 1.0687, 156527.4188, 387, 4.080, 182615.322, 149, 4.633, 1109.379, 119, 0.792, 208703.225, 52, 4.72, 24978.52, 36, 3.77, 234791.13, 26, 1.44, 27197.28, 20, 1.50, 51066.43, 11, 0.46, 260879.03, 10, 1.80, 955.60, 8, 4.54, 77154.33, - /*L3*/ 1881, 0.0347, 52175.8063, 1422, 3.1251, 26087.9031, 969, 3.004, 78263.709, 437, 6.019, 104351.613, 354, 0.000, 0.000, 180, 2.775, 130439.516, 70, 5.82, 156527.42, 26, 2.57, 182615.32, 9, 5.59, 208703.23, 3, 2.32, 234791.13, - /*L4*/ 1141, 3.1416, 0.0000, 32, 2.03, 26087.90, 19, 1.42, 78263.71, 17, 4.50, 52175.81, 12, 4.50, 104351.61, 6, 1.27, 130439.52, 3, 4.31, 156527.42, 1, 1.06, 182615.32, 1, 4.09, 208703.23, - /*L5*/ 9, 3.14, 0.00, 1, 3.38, 52175.81, - /*B0*/ 117375290, 1.983574988, 26087.903141574, 23880770, 5.03738960, 52175.80628315, 12228395, 3.14159265, 0.00000000, 5432518, 1.7964436, 78263.7094247, 1297788, 4.8323250, 104351.6125663, 318669, 1.580885, 130439.515708, 79633, 4.60972, 156527.41885, 20142, 1.35324, 182615.32199, 5140, 4.3784, 208703.2251, 2086, 2.0202, 24978.5246, 2077, 4.9177, 27197.2817, 1320, 1.1191, 234791.1283, 1214, 1.8127, 53285.1848, 1005, 5.6568, 20426.5711, 992, 0.094, 51116.424, 946, 1.242, 31749.235, 916, 2.282, 25028.521, 843, 5.085, 51066.428, 788, 4.407, 57837.138, 777, 0.526, 1059.382, 499, 3.498, 5661.332, 465, 3.237, 77204.327, 448, 4.878, 79373.088, 408, 2.466, 46514.474, 374, 4.458, 4551.953, 359, 1.091, 1109.379, 341, 4.142, 260879.031, 320, 1.185, 83925.041, 318, 2.415, 47623.853, 310, 3.503, 21535.950, 287, 1.848, 77154.331, 258, 2.776, 27043.503, 252, 3.591, 27147.285, 202, 3.068, 51646.115, 201, 4.066, 25132.303, 186, 5.584, 73711.756, 170, 6.137, 41962.521, 170, 0.028, 103292.231, 158, 3.796, 529.691, 156, 6.077, 53131.406, 150, 1.647, 105460.991, 142, 0.331, 10213.286, 140, 5.528, 72602.377, 130, 3.480, 37410.567, 129, 4.817, 30639.857, 124, 4.051, 39609.655, 123, 3.166, 14765.239, 113, 0.113, 13521.751, 112, 0.557, 63498.470, 110, 5.797, 51749.208, 110, 4.232, 110012.945, 107, 1.537, 25661.305, 105, 5.830, 50586.733, 102, 2.879, 12566.152, 99, 0.95, 65697.56, 98, 1.66, 24498.83, 94, 1.82, 15874.62, 92, 6.16, 77734.02, 91, 4.89, 103242.23, 90, 1.04, 426.60, 89, 0.40, 53235.19, 88, 0.88, 286966.93, 88, 5.81, 11322.66, 87, 3.04, 68050.42, 85, 1.05, 1589.07, 83, 5.27, 25558.21, 82, 0.84, 51220.21, 76, 3.44, 36301.19, 73, 2.37, 99799.66, 71, 5.74, 26617.59, 66, 2.67, 52705.50, 58, 6.25, 33326.58, 57, 2.87, 79219.31, - /*B1*/ 4291514, 3.5016978, 26087.9031416, 1462337, 3.1415927, 0.0000000, 226753, 0.015154, 52175.806283, 108950, 0.485402, 78263.709425, 63535, 3.42944, 104351.61257, 24957, 0.16051, 130439.51571, 8596, 3.1845, 156527.4188, 2775, 6.2102, 182615.3220, 862, 2.952, 208703.225, 277, 0.291, 27197.282, 261, 5.977, 234791.128, 128, 3.377, 53285.185, 127, 0.538, 24978.525, 78, 2.72, 260879.03, 75, 3.58, 51066.43, 62, 2.92, 31749.24, 55, 1.97, 51116.42, 35, 0.11, 79373.09, 34, 0.35, 77154.33, 29, 5.95, 57837.14, 27, 0.99, 25028.52, - /*B2*/ 118309, 4.790656, 26087.903142, 19135, 0.00000, 0.00000, 10448, 1.21217, 52175.80628, 2662, 4.4342, 78263.7094, 1703, 1.6226, 104351.6126, 963, 4.800, 130439.516, 447, 1.608, 156527.419, 183, 4.669, 182615.322, 69, 1.43, 208703.23, 25, 4.47, 234791.13, 17, 1.83, 27197.28, 9, 1.23, 260879.03, - /*B3*/ 2354, 0.3539, 26087.9031, 1605, 0.0000, 0.0000, 189, 4.363, 52175.806, 64, 2.51, 78263.71, 46, 6.14, 104351.61, 31, 3.12, 130439.52, 17, 6.27, 156527.42, 9, 3.08, 182615.32, 4, 6.15, 208703.23, - /*B4*/ 43, 1.75, 26087.90, 10, 3.14, 0.00, 4, 4.03, 52175.81, 3, 0.21, 78263.71, 1, 3.75, 104351.61, 1, 1.18, 130439.52, 1, 4.55, 156527.42, - /*B5*/ 1, 3.95, 26087.90, 1, 3.14, 0.00, - /*R0*/ 395282717, 0.000000000, 0.000000000, 78341318, 6.19233723, 26087.90314157, 7955256, 2.9598969, 52175.8062831, 1212818, 6.0106415, 78263.7094247, 219220, 2.778201, 104351.612566, 43541, 5.82895, 130439.51571, 9182, 2.5965, 156527.4188, 2900, 1.4244, 25028.5212, 2600, 3.0282, 27197.2817, 2019, 5.6473, 182615.3220, 2015, 5.5923, 31749.2352, 1420, 6.2526, 24978.5246, 1001, 3.7344, 21535.9496, 776, 3.670, 20426.571, 755, 4.474, 51116.424, 668, 2.525, 5661.332, 633, 4.299, 25558.212, 630, 4.766, 1059.382, 483, 6.068, 53285.185, 457, 2.415, 208703.225, 442, 1.220, 15874.618, 408, 2.359, 57837.138, 372, 0.517, 47623.853, 352, 1.059, 27043.503, 339, 0.864, 25661.305, 309, 0.884, 24498.830, 301, 1.795, 37410.567, 284, 3.021, 51066.428, 261, 2.150, 39609.655, 213, 5.369, 13521.751, 194, 4.984, 10213.286, 187, 4.965, 11322.664, 171, 1.241, 77204.327, 169, 3.888, 26617.594, 163, 2.633, 19804.827, 151, 0.445, 46514.474, 150, 4.282, 41962.521, 140, 4.771, 33326.579, 139, 1.626, 27147.285, 139, 2.000, 25132.303, 134, 1.077, 51646.115, 128, 6.064, 1109.379, 128, 2.076, 529.691, 121, 2.850, 79373.088, 119, 2.365, 4551.953, 106, 5.466, 234791.128, 95, 0.84, 12566.15, 94, 5.41, 83925.04, 91, 1.21, 14765.24, 89, 3.88, 50586.73, 85, 3.57, 73711.76, 77, 3.92, 51749.21, 75, 2.45, 30639.86, 75, 5.53, 32858.61, 72, 1.17, 16984.00, 71, 5.33, 426.60, 69, 5.31, 1589.07, 69, 1.82, 36301.19, 66, 4.28, 43071.90, 65, 6.07, 77154.33, 59, 4.07, 53131.41, 54, 5.20, 65697.56, 52, 3.57, 6283.08, 44, 5.69, 45892.73, 41, 1.65, 25448.01, 41, 3.68, 22645.33, 41, 4.29, 103292.23, 36, 2.96, 28306.66, 34, 0.65, 52705.50, 34, 3.49, 72602.38, 33, 3.14, 25874.60, 33, 1.03, 68050.42, 31, 4.13, 77734.02, 30, 5.91, 105460.99, 28, 4.63, 18849.23, 28, 5.05, 51220.21, 28, 5.68, 26107.57, 27, 4.68, 53235.19, 27, 4.75, 63498.47, 27, 3.57, 26068.23, 26, 2.95, 26080.79, 25, 0.35, 23969.14, 25, 2.23, 260879.03, 23, 0.50, 32370.98, 23, 2.18, 110012.94, 21, 0.85, 76674.64, 21, 2.19, 26301.20, 20, 0.34, 99799.66, 20, 0.47, 48733.23, 20, 3.77, 19317.19, 20, 1.37, 7238.68, 19, 2.37, 6770.71, 19, 0.69, 26091.78, 19, 3.93, 38654.05, 19, 2.27, 26084.02, 18, 4.21, 25938.34, 18, 0.92, 79219.31, 18, 5.51, 56727.76, 17, 0.68, 77837.11, 17, 4.29, 40853.14, 17, 2.15, 26514.50, 17, 4.98, 9103.91, 16, 4.66, 25021.41, 16, 1.28, 25035.63, 16, 5.85, 26095.02, 16, 2.84, 103242.23, 15, 1.55, 955.60, 15, 2.16, 27676.98, 14, 0.06, 23869.15, 14, 4.85, 62389.09, 12, 1.97, 91785.46, 12, 1.73, 38519.95, 11, 4.56, 26011.64, 10, 2.78, 213.30, 10, 1.06, 129380.13, 10, 2.44, 71980.63, 10, 4.71, 51535.91, 10, 2.54, 29530.48, - /*R1*/ 2173477, 4.6561716, 26087.9031416, 441418, 1.423855, 52175.806283, 100945, 4.474663, 78263.709425, 24328, 1.24226, 104351.61257, 16244, 0.00000, 0.00000, 6040, 4.2930, 130439.5157, 1529, 1.0606, 156527.4188, 392, 4.111, 182615.322, 180, 4.712, 24978.525, 178, 4.544, 27197.282, 102, 0.879, 208703.225, 81, 3.01, 25028.52, 44, 2.14, 20426.57, 44, 1.48, 51066.43, 35, 3.21, 1059.38, 31, 5.24, 21535.95, 27, 3.93, 234791.13, 25, 2.03, 24498.83, 20, 1.24, 53285.18, 20, 4.05, 5661.33, 15, 2.62, 26617.59, 15, 2.36, 27043.50, 14, 1.38, 1109.38, 13, 5.19, 46514.47, 13, 0.56, 25132.30, 12, 0.21, 11322.66, 12, 4.53, 77154.33, 11, 0.86, 57837.14, 11, 6.24, 27147.29, 10, 3.28, 37410.57, 9, 2.37, 25661.30, 9, 5.55, 25558.21, 8, 5.96, 14765.24, 7, 0.78, 32858.61, 7, 4.07, 1589.07, 7, 2.71, 16984.00, 7, 0.93, 30639.86, 7, 0.70, 260879.03, 7, 2.02, 26068.23, 6, 0.86, 4551.95, 6, 3.66, 25448.01, 6, 4.50, 28306.66, 6, 4.65, 26080.79, 6, 3.50, 10213.29, 6, 0.63, 13521.75, 5, 5.38, 26091.78, 5, 0.94, 26107.57, 5, 5.22, 22645.33, 5, 0.06, 25021.41, 5, 3.89, 83925.04, 5, 4.84, 50586.73, 5, 5.55, 12566.15, 5, 4.24, 26095.02, 5, 6.01, 77204.33, 5, 0.73, 529.69, 4, 3.87, 26084.02, 4, 5.87, 25035.63, 4, 5.79, 43071.90, 4, 0.26, 36301.19, 4, 2.78, 41962.52, 4, 5.60, 52705.50, 4, 3.82, 426.60, 4, 1.96, 72602.38, 4, 6.00, 33326.58, - /*R2*/ 31179, 3.08232, 26087.90314, 12454, 6.15183, 52175.80628, 4248, 2.9258, 78263.7094, 1361, 5.9798, 104351.6126, 422, 2.749, 130439.516, 218, 3.142, 0.000, 128, 5.801, 156527.419, 38, 2.57, 182615.32, 11, 5.62, 208703.23, 10, 3.15, 24978.52, 5, 6.14, 27197.28, 3, 2.39, 234791.13, 3, 6.21, 51066.43, - /*R3*/ 327, 1.680, 26087.903, 242, 4.634, 52175.806, 121, 1.390, 78263.709, 51, 4.44, 104351.61, 20, 1.21, 130439.52, 15, 3.14, 0.00, 7, 4.26, 156527.42, 3, 1.03, 182615.32, 1, 4.08, 208703.23, - /*R4*/ 4, 0.37, 26087.90, 4, 3.19, 52175.81, 3, 6.17, 78263.71, 1, 2.92, 104351.61, 1, 5.96, 130439.52}, - - //Dven精度:J2000+-4千年 黄经0.2角秒 黄纬0.2角秒 距离0.2AU/10^6 - []float64{ - 1000000000, //A的倍率 - 20, 257, 374, 425, 437, 449, 458, 566, 629, 641, 653, 665, 668, 929, 1040, 1082, 1091, 1094, 1094, //位置索引表 - /*L0*/ 3176146668, 0.0000000000, 0.0000000000, 13539684, 5.59313320, 10213.28554621, 898916, 5.306500, 20426.571092, 54772, 4.41631, 7860.41939, 34557, 2.69964, 11790.62909, 23721, 2.99378, 3930.20970, 16641, 4.25019, 1577.34354, 14383, 4.15745, 9683.59458, 13171, 5.18668, 26.29832, 12005, 6.15357, 30639.85664, 7693, 0.8163, 9437.7629, 7614, 1.9501, 529.6910, 7077, 1.0647, 775.5226, 5848, 3.9984, 191.4483, 4999, 4.1234, 15720.8388, 4295, 3.5864, 19367.1892, 3270, 5.6774, 5507.5532, 3262, 4.5906, 10404.7338, 2319, 3.1625, 9153.9036, 1797, 4.6534, 1109.3786, 1555, 5.5704, 19651.0485, 1283, 4.2260, 20.7754, 1279, 0.9621, 5661.3320, 1055, 1.5372, 801.8209, 991, 0.833, 213.299, 988, 5.394, 13367.973, 880, 3.889, 9999.986, 857, 0.356, 3154.687, 821, 3.216, 18837.498, 716, 0.111, 11015.106, 702, 0.675, 23581.258, 561, 4.240, 7.114, 508, 0.245, 11322.664, 461, 5.316, 18073.705, 446, 6.063, 40853.142, 426, 1.800, 7084.897, 426, 5.329, 2352.866, 412, 0.362, 382.897, 357, 2.704, 10206.172, 339, 2.023, 6283.076, 333, 2.100, 27511.468, 302, 4.942, 13745.346, 299, 4.022, 10239.584, 293, 3.514, 283.859, 291, 3.592, 22003.915, 285, 2.224, 1059.382, 263, 0.541, 17298.182, 244, 2.702, 8624.213, 243, 4.278, 5.523, 237, 4.829, 6872.673, 205, 0.585, 38.028, 203, 3.795, 14143.495, 191, 6.120, 29050.784, 190, 4.138, 4551.953, 183, 3.047, 19999.973, 171, 3.522, 31441.678, 159, 1.501, 8635.942, 137, 4.413, 3532.061, 118, 1.913, 21228.392, 116, 5.810, 19896.880, 110, 2.584, 9786.687, 110, 2.846, 18307.807, 106, 0.854, 10596.182, 101, 2.343, 10742.977, 99, 1.09, 7064.12, 94, 4.95, 35371.89, 92, 5.52, 12566.15, 89, 1.97, 10186.99, 82, 1.92, 15.25, 70, 1.00, 632.78, 68, 4.40, 8662.24, 67, 1.55, 14945.32, 64, 2.18, 10988.81, 63, 0.36, 103.09, 60, 5.05, 245.83, 60, 2.97, 4732.03, 58, 1.93, 3340.61, 56, 0.49, 522.58, 55, 3.37, 25158.60, - /*L1*/ 10213529430529, 0.000000000000, 0.000000000000, 957077, 2.464244, 10213.285546, 144450, 0.516246, 20426.571092, 2134, 1.7955, 30639.8566, 1739, 2.6554, 26.2983, 1517, 6.1064, 1577.3435, 822, 5.702, 191.448, 697, 2.681, 9437.763, 524, 3.600, 775.523, 383, 1.034, 529.691, 296, 1.251, 5507.553, 251, 6.107, 10404.734, 178, 6.194, 1109.379, 165, 2.643, 7.114, 142, 5.451, 9153.904, 126, 1.245, 40853.142, 126, 1.881, 382.897, 116, 4.976, 213.299, 89, 0.95, 13367.97, 74, 4.39, 10206.17, 67, 5.06, 801.82, 66, 2.28, 2352.87, 63, 4.08, 3154.69, 49, 3.45, 11015.11, 43, 0.08, 6283.08, 41, 4.12, 18837.50, 37, 2.48, 5661.33, 36, 1.48, 1059.38, 35, 6.20, 5.52, 34, 1.77, 11322.66, 30, 2.24, 18073.70, 30, 0.39, 15.25, 30, 5.35, 7084.90, 28, 1.46, 10239.58, 26, 0.35, 22003.91, 24, 2.36, 10596.18, 23, 2.37, 17298.18, 22, 2.08, 8635.94, 21, 4.47, 8624.21, - /*L2*/ 541271, 0.000000, 0.000000, 38915, 0.34514, 10213.28555, 13379, 2.02011, 20426.57109, 238, 2.046, 26.298, 193, 3.535, 30639.857, 100, 3.971, 775.523, 70, 1.52, 1577.34, 60, 1.00, 191.45, 32, 4.36, 9437.76, 21, 2.66, 40853.14, 19, 3.39, 382.90, 15, 6.05, 529.69, 13, 2.95, 5507.55, 12, 3.73, 3154.69, 10, 3.53, 11015.11, 10, 1.41, 10404.73, 10, 5.11, 801.82, - /*L3*/ 1357, 4.8039, 10213.2855, 778, 3.669, 20426.571, 260, 0.000, 0.000, 12, 5.32, 30639.86, - /*L4*/ 1140, 3.1416, 0.0000, 32, 5.21, 20426.57, 17, 2.51, 10213.29, 1, 0.71, 30639.86, - /*L5*/ 9, 3.14, 0.00, 1, 1.91, 10213.29, 1, 0.55, 20426.57, - /*B0*/ 59236385, 0.26702776, 10213.28554621, 401080, 1.147372, 20426.571092, 328149, 3.141593, 0.000000, 10114, 1.08946, 30639.85664, 1495, 6.2539, 18073.7049, 1378, 0.8602, 1577.3435, 1300, 3.6715, 9437.7629, 1195, 3.7047, 2352.8662, 1080, 4.5390, 22003.9146, 920, 1.540, 9153.904, 530, 2.281, 5507.553, 456, 0.723, 10239.584, 435, 6.140, 11790.629, 417, 5.991, 19896.880, 396, 3.868, 8635.942, 392, 3.950, 529.691, 389, 2.934, 10186.987, 333, 4.832, 14143.495, 237, 2.906, 10988.808, 235, 2.008, 13367.973, 218, 2.697, 19651.048, 207, 0.987, 775.523, 186, 1.805, 40853.142, 178, 5.963, 25934.124, 170, 4.137, 10021.837, 154, 3.296, 11015.106, 149, 5.611, 10404.734, 131, 5.707, 9683.595, 129, 5.427, 29580.475, 120, 3.576, 10742.977, 118, 1.191, 8624.213, 115, 5.128, 6283.076, 98, 0.15, 20618.02, 95, 2.75, 191.45, 86, 0.43, 9786.69, 81, 1.31, 15720.84, - /*B1*/ 5133476, 1.8036431, 10213.2855462, 43801, 3.38616, 20426.57109, 1992, 0.0000, 0.0000, 1966, 2.5300, 30639.8566, 140, 2.271, 9437.763, 130, 1.507, 18073.705, 119, 5.605, 1577.344, 103, 5.242, 2352.866, 93, 6.08, 22003.91, 80, 0.29, 9153.90, 75, 5.08, 10186.99, 74, 1.50, 11790.63, 47, 3.88, 10239.58, 47, 0.75, 5507.55, 44, 3.59, 40853.14, 40, 1.28, 10404.73, 38, 4.33, 19651.05, 36, 1.26, 19896.88, 35, 5.51, 529.69, 34, 4.89, 10988.81, 29, 0.09, 14143.50, - /*B2*/ 223777, 3.385091, 10213.285546, 2817, 0.0000, 0.0000, 1732, 5.2556, 20426.5711, 269, 3.870, 30639.857, - /*B3*/ 6467, 4.9917, 10213.2855, 200, 3.142, 0.000, 55, 0.77, 20426.57, 25, 5.44, 30639.86, - /*B4*/ 141, 0.315, 10213.286, 2, 3.14, 0.00, 2, 2.35, 20426.57, 2, 0.74, 30639.86, - /*B5*/ 2, 2.05, 10213.29, - /*R0*/ 723348209, 0.000000000, 0.000000000, 4898242, 4.0215183, 10213.2855462, 16581, 4.90207, 20426.57109, 16321, 2.84549, 7860.41939, 13780, 1.12847, 11790.62909, 4984, 2.5868, 9683.5946, 3740, 1.4231, 3930.2097, 2636, 5.5294, 9437.7629, 2375, 2.5514, 15720.8388, 2220, 2.0135, 19367.1892, 1259, 2.7277, 1577.3435, 1195, 3.0198, 10404.7338, 853, 3.986, 19651.048, 762, 1.596, 9153.904, 743, 4.120, 5507.553, 425, 3.819, 13367.973, 419, 1.643, 18837.498, 394, 5.390, 23581.258, 313, 2.318, 9999.986, 290, 5.677, 5661.332, 276, 5.724, 775.523, 273, 4.822, 11015.106, 198, 0.532, 27511.468, 197, 4.962, 11322.664, 162, 0.565, 529.691, 136, 3.755, 18073.705, 132, 3.372, 13745.346, 131, 5.244, 17298.182, 129, 1.134, 10206.172, 118, 5.090, 3154.687, 117, 0.234, 7084.897, 114, 4.568, 29050.784, 108, 2.450, 10239.584, 107, 1.955, 31441.678, 104, 1.202, 15874.618, 96, 1.47, 19999.97, 93, 1.62, 2352.87, 91, 3.07, 1109.38, 84, 5.78, 30639.86, 82, 1.95, 22003.91, 76, 1.14, 8624.21, 65, 2.17, 14143.50, 64, 0.84, 6283.08, 62, 3.26, 6872.67, 61, 0.35, 21228.39, 60, 3.38, 35371.89, 59, 0.01, 8635.94, 56, 3.95, 12566.15, 55, 1.27, 18307.81, 45, 4.73, 19896.88, 45, 2.48, 191.45, 43, 2.60, 4551.95, 40, 0.00, 801.82, 39, 5.57, 10596.18, 39, 1.01, 9786.69, 35, 4.80, 39302.10, 33, 0.71, 10742.98, 32, 0.40, 10186.99, 32, 1.81, 25158.60, 31, 6.26, 14945.32, 30, 4.21, 28521.09, 27, 5.80, 7064.12, 25, 0.69, 10988.81, 24, 3.78, 21535.95, 22, 2.83, 8662.24, 21, 6.22, 43232.31, 20, 5.42, 16496.36, 20, 2.21, 19786.67, 19, 2.86, 3532.06, 19, 2.63, 29580.47, 19, 1.50, 10021.84, 18, 3.23, 29088.81, 18, 0.42, 4705.73, 17, 3.68, 26.30, 15, 0.00, 17277.41, 15, 2.48, 31749.24, 14, 5.86, 9676.48, 14, 5.18, 10316.38, 13, 2.49, 9690.71, 13, 1.36, 47162.52, 13, 5.25, 19360.08, 12, 1.88, 19374.30, 12, 5.56, 6770.71, 12, 1.42, 4732.03, 12, 1.43, 18875.53, 11, 5.92, 13936.79, 11, 4.64, 33019.02, - /*R1*/ 345510, 0.891987, 10213.285546, 2342, 1.7722, 20426.5711, 2340, 3.1416, 0.0000, 239, 1.113, 9437.763, 106, 4.592, 1577.344, 91, 4.54, 10404.73, 66, 5.98, 5507.55, 47, 3.88, 9153.90, 38, 5.66, 13367.97, 27, 2.82, 10206.17, 22, 2.05, 775.52, 21, 2.55, 18837.50, 18, 1.88, 11015.11, 18, 2.65, 30639.86, 13, 0.21, 11322.66, 12, 0.79, 17298.18, 11, 4.95, 6283.08, 10, 6.17, 10239.58, 9, 4.60, 1109.38, 9, 0.81, 10596.18, 9, 2.48, 3154.69, 9, 0.67, 18073.70, 8, 5.59, 12566.15, 8, 0.44, 8635.94, 8, 5.49, 529.69, 8, 3.75, 7084.90, 8, 0.90, 5661.33, 7, 2.87, 8624.21, 7, 5.07, 22003.91, 6, 4.10, 191.45, 6, 3.14, 10186.99, 6, 2.25, 21228.39, 6, 2.17, 18307.81, 5, 5.87, 2352.87, 5, 5.33, 14143.50, 5, 4.34, 9786.69, 5, 5.56, 10742.98, - /*R2*/ 14066, 5.06366, 10213.28555, 155, 5.473, 20426.571, 131, 0.000, 0.000, 11, 2.79, 9437.76, 5, 6.28, 1577.34, 4, 1.95, 11015.11, 4, 2.33, 775.52, 4, 6.12, 10404.73, 3, 1.39, 5507.55, 2, 5.63, 10239.58, 2, 6.17, 30639.86, 2, 1.11, 13367.97, 2, 3.64, 7084.90, 2, 2.22, 3154.69, - /*R3*/ 496, 3.223, 10213.286, 8, 3.21, 20426.57, 1, 3.14, 0.00, - /*R4*/ 6, 0.92, 10213.29}, - - //Dmar精度:J2000+-4千年 黄经0.5角秒 黄纬0.5角秒 距离1AU/10^6 - []float64{ - 1000000000, //A的倍率 - 20, 596, 1028, 1289, 1385, 1427, 1454, 1586, 1670, 1694, 1709, 1718, 1724, 2360, 2873, 3155, 3239, 3275, 3287, //位置索引表 - /*L0*/ 6203477116, 0.0000000000, 0.0000000000, 186563681, 5.050371003, 3340.612426700, 11082168, 5.40099837, 6681.22485340, 917984, 5.754787, 10021.837280, 277450, 5.970495, 3.523118, 123159, 0.849561, 2810.921462, 106102, 2.939585, 2281.230497, 89268, 4.15698, 0.01725, 87157, 6.11005, 13362.44971, 77749, 3.33969, 5621.84292, 67976, 0.36462, 398.14900, 41611, 0.22815, 2942.46342, 35751, 1.66187, 2544.31442, 30753, 0.85697, 191.44827, 29375, 6.07894, 0.06731, 26281, 0.64806, 3337.08931, 25798, 0.02997, 3344.13555, 23894, 5.03896, 796.29801, 17988, 0.65634, 529.69097, 15464, 2.91580, 1751.53953, 15281, 1.14979, 6151.53389, 12862, 3.06796, 2146.16542, 12644, 3.62275, 5092.15196, 10249, 3.69334, 8962.45535, 8916, 0.1829, 16703.0621, 8588, 2.4009, 2914.0142, 8327, 4.4950, 3340.6297, 8327, 2.4642, 3340.5952, 7487, 3.8225, 155.4204, 7239, 0.6750, 3738.7614, 7129, 3.6634, 1059.3819, 6552, 0.4886, 3127.3133, 6356, 2.9218, 8432.7644, 5527, 4.4748, 1748.0164, 5505, 3.8100, 0.9803, 4722, 3.6255, 1194.4470, 4260, 0.5537, 6283.0758, 4151, 0.4966, 213.2991, 3121, 0.9985, 6677.7017, 3066, 0.3805, 6684.7480, 3024, 4.4862, 3532.0607, 2994, 2.7832, 6254.6267, 2932, 4.2213, 20.7754, 2836, 5.7689, 3149.1642, 2811, 5.8816, 1349.8674, 2740, 0.1337, 3340.6797, 2740, 0.5422, 3340.5451, 2389, 5.3716, 4136.9104, 2361, 5.7550, 3333.4989, 2312, 1.2824, 3870.3034, 2212, 3.5047, 382.8965, 2042, 2.8213, 1221.8486, 1931, 3.3572, 3.5904, 1886, 1.4910, 9492.1463, 1792, 1.0056, 951.7184, 1741, 2.4136, 553.5694, 1721, 0.4394, 5486.7778, 1600, 3.9485, 4562.4610, 1443, 1.4187, 135.0651, 1399, 3.3259, 2700.7151, 1382, 4.3015, 7.1135, 1310, 4.0449, 12303.0678, 1281, 2.2081, 1592.5960, 1281, 1.8067, 5088.6288, 1169, 3.1281, 7903.0734, 1135, 3.7007, 1589.0729, 1104, 1.0520, 242.7286, 1045, 0.7854, 8827.3903, 1001, 3.2434, 11773.3768, 989, 4.846, 6681.242, 989, 2.815, 6681.208, 956, 0.540, 20043.675, 869, 2.202, 11243.686, 868, 1.021, 7079.374, 842, 3.990, 4399.994, 837, 3.203, 4690.480, 750, 0.766, 6467.926, 735, 2.184, 8429.241, 721, 5.847, 5884.927, 714, 2.803, 3185.192, 690, 3.764, 6041.328, 684, 2.738, 2288.344, 667, 0.736, 3723.509, 653, 2.681, 28.449, 634, 0.913, 3553.912, 633, 4.528, 426.598, 617, 6.168, 2274.117, 566, 5.063, 15.252, 564, 1.687, 6872.673, 559, 3.463, 263.084, 555, 4.606, 4292.331, 523, 0.899, 9623.688, 517, 2.813, 3339.632, 513, 4.148, 3341.593, 485, 3.957, 4535.059, 459, 0.287, 5614.729, 458, 0.788, 1990.745, 442, 3.195, 5628.956, 419, 3.583, 8031.092, 412, 6.020, 3894.182, 407, 3.138, 9595.239, 395, 5.632, 3097.884, 388, 1.352, 10018.314, 384, 5.829, 3191.049, 382, 2.348, 162.467, 381, 0.734, 10025.360, 378, 4.155, 2803.808, 371, 0.685, 2818.035, 367, 2.637, 692.158, 340, 2.595, 11769.854, 336, 6.120, 6489.777, 331, 1.140, 5.523, 326, 0.484, 6681.292, 326, 0.893, 6681.158, 312, 3.982, 20.355, 290, 2.427, 3319.837, 287, 5.721, 7477.523, 276, 1.597, 7210.916, 275, 6.084, 6674.111, 273, 4.556, 3361.388, 264, 1.345, 3496.033, 256, 0.250, 522.577, 255, 3.432, 3443.705, 254, 0.521, 10.637, 246, 4.003, 11371.705, 244, 0.970, 632.784, 238, 1.841, 12832.759, 231, 4.750, 3347.726, 228, 3.526, 1648.447, 227, 4.985, 7632.943, 227, 3.954, 4989.059, 226, 5.241, 3205.547, 225, 5.649, 2388.894, 223, 0.721, 266.607, 215, 6.154, 3264.346, 213, 4.282, 4032.770, 212, 3.118, 2957.716, 210, 4.279, 5099.266, 202, 3.671, 1758.653, 201, 1.082, 7064.121, 198, 2.377, 10713.995, 193, 3.239, 7.046, 184, 4.225, 2787.043, 181, 3.258, 3337.022, 180, 4.254, 2487.416, 177, 3.697, 3344.203, 176, 4.092, 74.782, 168, 5.486, 3.881, 168, 4.397, 15643.680, 166, 2.528, 14584.298, 161, 2.369, 3265.831, 161, 3.794, 2118.764, 160, 1.768, 3475.678, 160, 1.547, 14054.607, 158, 0.569, 103.093, 158, 3.132, 59.374, 146, 3.452, 7373.382, 145, 4.380, 316.392, 142, 0.598, 23.878, 140, 1.442, 10404.734, 139, 5.408, 10973.556, 137, 3.591, 15113.989, 137, 2.541, 4933.208, 135, 4.042, 4929.685, 134, 5.169, 10213.286, 133, 6.178, 1744.426, 128, 0.105, 7234.794, 127, 1.799, 13745.346, 123, 2.521, 2906.901, 123, 3.169, 10021.820, 123, 5.199, 10021.855, 122, 1.731, 36.028, 122, 4.423, 14712.317, 119, 5.480, 2921.128, 119, 4.766, 5828.028, 118, 5.727, 0.420, 109, 0.604, 5085.038, 108, 1.372, 10419.986, 107, 4.339, 7740.607, 106, 5.477, 419.485, 106, 3.450, 639.897, 106, 0.896, 23384.287, 106, 1.091, 12168.003, 100, 1.383, 3583.341, 99, 2.69, 36.61, 98, 5.84, 14314.17, 98, 3.60, 206.19, 97, 6.28, 9225.54, 96, 4.89, 3230.41, 96, 4.33, 131.54, 91, 1.10, 9808.54, 88, 3.97, 170.67, - /*L1*/ 3340856274743, 0.000000000000, 0.000000000000, 14582271, 3.60426054, 3340.61242670, 1649013, 3.9263125, 6681.2248534, 199633, 4.265941, 10021.837280, 34524, 4.73210, 3.52312, 24855, 4.61278, 13362.44971, 8416, 4.4586, 2281.2305, 5376, 5.0159, 398.1490, 5210, 4.9942, 3344.1355, 4326, 2.5607, 191.4483, 4297, 5.3165, 155.4204, 3817, 3.5388, 796.2980, 3141, 4.9634, 16703.0621, 2828, 3.1597, 2544.3144, 2057, 4.5689, 2146.1654, 1688, 1.3289, 3337.0893, 1576, 4.1850, 1751.5395, 1337, 2.2333, 0.9803, 1336, 5.9742, 1748.0164, 1176, 6.0241, 6151.5339, 1166, 2.2135, 1059.3819, 1139, 2.1287, 1194.4470, 1136, 5.4280, 3738.7614, 911, 1.096, 1349.867, 853, 3.909, 553.569, 833, 5.296, 6684.748, 808, 4.428, 529.691, 795, 2.249, 8962.455, 729, 2.502, 951.718, 725, 5.842, 242.729, 715, 3.856, 2914.014, 676, 5.023, 382.897, 651, 1.018, 3340.595, 651, 3.049, 3340.630, 615, 4.152, 3149.164, 565, 3.888, 4136.910, 485, 4.874, 213.299, 476, 1.182, 3333.499, 466, 1.315, 3185.192, 413, 0.714, 1592.596, 403, 2.725, 7.114, 401, 5.316, 20043.675, 329, 5.411, 6283.076, 282, 0.045, 9492.146, 266, 3.890, 1221.849, 266, 5.113, 2700.715, 233, 6.168, 3532.061, 228, 1.545, 2274.117, 226, 0.838, 3097.884, 224, 5.466, 20.355, 223, 5.885, 3870.303, 214, 4.971, 3340.680, 214, 5.379, 3340.545, 211, 3.525, 15.252, 204, 2.364, 1589.073, 202, 3.364, 5088.629, 200, 4.731, 4690.480, 200, 5.787, 7079.374, 197, 2.578, 12303.068, 195, 0.492, 6677.702, 195, 2.531, 4399.994, 185, 5.579, 1990.745, 178, 6.125, 4292.331, 166, 1.255, 3894.182, 165, 2.603, 3341.593, 154, 2.470, 4535.059, 153, 2.265, 3723.509, 150, 1.035, 2288.344, 147, 3.370, 6681.242, 147, 1.339, 6681.208, 136, 1.977, 5614.729, 135, 2.123, 5486.778, 133, 3.422, 5621.843, 130, 1.514, 5628.956, 130, 5.619, 10025.360, 127, 2.950, 3496.033, 119, 5.476, 3553.912, 119, 3.127, 426.598, 118, 2.586, 8432.764, 114, 6.234, 135.065, 111, 5.842, 2803.808, 110, 4.158, 2388.894, 109, 5.282, 2818.035, 105, 2.736, 2787.043, 97, 4.53, 6489.78, 88, 4.23, 7477.52, 87, 4.44, 5092.15, 87, 4.33, 3339.63, 86, 3.16, 162.47, 85, 1.91, 11773.38, 84, 3.16, 3347.73, 83, 2.18, 23.88, 81, 1.61, 2957.72, 80, 5.70, 6041.33, 77, 5.72, 9623.69, 74, 6.18, 3583.34, 67, 5.08, 8031.09, 64, 2.12, 5884.93, 62, 3.54, 692.16, 61, 1.66, 6525.80, 57, 3.68, 8429.24, 55, 2.01, 522.58, 55, 6.13, 2487.42, 55, 0.19, 7632.94, 54, 1.05, 4933.21, 54, 0.18, 2942.46, 53, 2.23, 3127.31, 52, 0.37, 12832.76, 52, 1.15, 28.45, 51, 5.67, 23384.29, 50, 1.51, 1744.43, 50, 2.45, 5099.27, 49, 3.10, 5.52, 49, 5.61, 6467.93, 49, 5.29, 6681.29, 48, 5.70, 6681.16, 47, 0.23, 36.03, 47, 0.03, 7210.92, 45, 4.17, 2906.90, 44, 0.31, 10018.31, 43, 4.43, 640.88, 43, 2.88, 2810.92, 41, 1.60, 7234.79, 41, 3.96, 3.88, 38, 2.26, 2699.73, 37, 2.92, 15643.68, 35, 1.76, 1758.65, 34, 1.53, 6674.11, 34, 2.66, 4929.69, 33, 2.59, 2118.76, 32, 6.14, 10419.99, 32, 2.33, 5085.04, 32, 2.87, 7740.61, 31, 1.76, 9595.24, 31, 2.56, 7064.12, 30, 1.87, 7.05, 29, 1.28, 574.34, 28, 0.99, 3191.05, 28, 0.43, 5828.03, 28, 1.76, 639.90, 27, 3.71, 10021.85, 27, 1.68, 10021.82, 26, 3.12, 6836.65, 26, 3.77, 2921.13, - /*L2*/ 580158, 2.049795, 3340.612427, 541876, 0.000000, 0.000000, 139084, 2.457424, 6681.224853, 24651, 2.80000, 10021.83728, 3984, 3.1412, 13362.4497, 2220, 3.1944, 3.5231, 1210, 0.5433, 155.4204, 615, 3.485, 16703.062, 536, 3.542, 3344.136, 343, 6.002, 2281.230, 317, 4.140, 191.448, 298, 1.999, 796.298, 232, 4.334, 242.729, 217, 3.445, 398.149, 204, 5.422, 553.569, 162, 0.657, 0.980, 160, 6.110, 2146.165, 156, 1.221, 1748.016, 149, 6.095, 3185.192, 144, 4.019, 951.718, 143, 2.619, 1349.867, 134, 0.602, 1194.447, 119, 3.861, 6684.748, 113, 4.718, 2544.314, 104, 0.250, 382.897, 95, 0.68, 1059.38, 92, 3.83, 20043.67, 90, 3.88, 3738.76, 75, 5.46, 1751.54, 69, 2.58, 3149.16, 67, 2.38, 4136.91, 65, 5.48, 1592.60, 63, 2.34, 3097.88, 59, 1.15, 7.11, 48, 2.90, 3333.50, 46, 4.43, 6151.53, 42, 3.69, 5614.73, 40, 6.12, 5628.96, 37, 4.07, 1990.75, 36, 2.47, 529.69, 33, 0.68, 8962.46, 33, 2.80, 3894.18, 31, 4.57, 3496.03, 29, 5.41, 2914.01, 29, 1.23, 2787.04, 29, 3.41, 3337.09, 28, 1.39, 4292.33, 26, 4.68, 3583.34, 26, 1.04, 3341.59, 26, 2.65, 2388.89, 26, 1.50, 3340.63, 26, 5.75, 3340.60, 24, 0.96, 4535.06, 24, 1.05, 4399.99, 24, 4.27, 7079.37, 24, 4.85, 9492.15, 23, 4.18, 10025.36, 23, 0.01, 4690.48, 22, 3.26, 213.30, 22, 0.16, 6525.80, 21, 0.48, 2700.72, 18, 0.97, 1589.07, 18, 2.52, 2810.92, 18, 3.81, 3723.51, 16, 1.11, 12303.07, 16, 4.94, 1221.85, 16, 4.96, 5088.63, 15, 2.93, 640.88, 15, 0.11, 2957.72, 14, 2.98, 6489.78, 14, 1.54, 3347.73, 14, 3.86, 6283.08, 14, 2.73, 7477.52, 14, 4.18, 23384.29, 13, 5.30, 6677.70, 12, 3.77, 2699.73, 12, 6.14, 6681.21, 12, 1.89, 6681.24, 12, 1.51, 426.60, 11, 3.78, 3870.30, 11, 5.05, 5621.84, 11, 3.81, 3553.91, 10, 5.83, 4933.21, 9, 1.91, 3532.06, 9, 3.82, 5092.15, 9, 4.13, 162.47, 9, 3.83, 3340.55, - /*L3*/ 14824, 0.44435, 3340.61243, 6621, 0.8847, 6681.2249, 1883, 1.2880, 10021.8373, 415, 1.649, 13362.450, 260, 0.000, 0.000, 227, 2.053, 155.420, 105, 1.580, 3.523, 80, 2.00, 16703.06, 49, 2.82, 242.73, 38, 2.02, 3344.14, 32, 4.59, 3185.19, 31, 0.65, 553.57, 17, 5.54, 951.72, 15, 5.72, 191.45, 14, 0.46, 796.30, 14, 2.34, 20043.67, 13, 5.36, 0.98, 12, 4.15, 1349.87, 11, 2.38, 6684.75, 10, 1.77, 382.90, 9, 5.34, 1194.45, 8, 2.75, 1748.02, 6, 3.18, 3583.34, 6, 6.11, 3496.03, 6, 5.86, 7.11, 6, 1.85, 398.15, 5, 4.93, 6525.80, 5, 1.01, 3149.16, 5, 0.84, 4136.91, 5, 5.98, 2787.04, 4, 1.27, 2281.23, 4, 2.33, 3738.76, - /*L4*/ 1140, 3.1416, 0.0000, 287, 5.637, 6681.225, 244, 5.139, 3340.612, 112, 6.032, 10021.837, 33, 0.13, 13362.45, 32, 3.56, 155.42, 8, 0.49, 16703.06, 8, 1.32, 242.73, 5, 3.06, 3185.19, 4, 2.16, 553.57, 3, 6.23, 3.52, 2, 0.44, 3344.14, 2, 0.82, 20043.67, 2, 3.74, 3496.03, - /*L5*/ 9, 3.14, 0.00, 7, 4.04, 6681.22, 5, 4.49, 10021.84, 4, 5.07, 155.42, 2, 3.51, 3340.61, 2, 4.85, 13362.45, 1, 6.09, 242.73, 1, 5.19, 16703.06, 1, 1.56, 3185.19, - /*B0*/ 31971350, 3.76832042, 3340.61242670, 2980332, 4.1061700, 6681.2248534, 2891047, 0.0000000, 0.0000000, 313655, 4.446511, 10021.837280, 34841, 4.78813, 13362.44971, 4434, 5.0264, 3344.1355, 4430, 5.6523, 3337.0893, 3991, 5.1306, 16703.0621, 2925, 3.7929, 2281.2305, 1820, 6.1365, 6151.5339, 1632, 4.2640, 529.6910, 1597, 2.2319, 1059.3819, 1493, 2.1650, 5621.8429, 1427, 1.1822, 3340.5952, 1427, 3.2129, 3340.6297, 1393, 2.4180, 8962.4553, 864, 5.744, 3738.761, 833, 5.989, 6677.702, 825, 5.367, 6684.748, 736, 5.092, 398.149, 727, 5.538, 6283.076, 631, 0.730, 5884.927, 623, 4.851, 2942.463, 601, 3.680, 796.298, 472, 4.522, 3149.164, 470, 5.135, 3340.680, 470, 5.543, 3340.545, 466, 5.474, 20043.675, 456, 2.133, 2810.921, 413, 0.200, 9492.146, 385, 4.080, 4136.910, 331, 4.066, 1751.540, 327, 2.621, 2914.014, 297, 5.922, 3532.061, 295, 2.753, 12303.068, 286, 4.947, 3870.303, 282, 2.063, 5486.778, 266, 3.551, 6681.242, 266, 1.520, 6681.208, 261, 2.601, 4399.994, 233, 2.276, 1589.073, 226, 2.275, 1194.447, 199, 2.674, 8432.764, 189, 6.044, 7079.374, - /*B1*/ 3500688, 5.3684784, 3340.6124267, 141160, 3.141593, 0.000000, 96708, 5.47878, 6681.22485, 14719, 3.20206, 10021.83728, 4259, 3.4084, 13362.4497, 1020, 0.7762, 3337.0893, 788, 3.718, 16703.062, 327, 3.458, 5621.843, 262, 2.483, 2281.230, 207, 1.441, 6151.534, 183, 6.031, 529.691, 170, 4.811, 3344.136, 157, 3.931, 8962.455, 156, 2.782, 3340.595, 156, 4.813, 3340.630, 143, 0.246, 2942.463, 138, 1.680, 3532.061, 131, 0.973, 6677.702, 127, 4.045, 20043.675, 125, 2.256, 5884.927, 93, 4.35, 3496.03, 89, 5.95, 2810.92, 88, 0.34, 398.15, 86, 1.75, 2544.31, 81, 0.84, 6283.08, 81, 4.30, 6684.75, 59, 3.70, 5486.78, 58, 3.55, 5092.15, - /*B2*/ 167267, 0.602214, 3340.612427, 49868, 3.14159, 0.00000, 3021, 5.5587, 6681.2249, 258, 1.897, 13362.450, 215, 0.917, 10021.837, 118, 2.242, 3337.089, 80, 2.25, 16703.06, 30, 5.89, 3496.03, - /*B3*/ 6065, 1.9805, 3340.6124, 426, 0.000, 0.000, 137, 1.796, 6681.225, 27, 3.45, 10021.84, 9, 3.75, 3337.09, - /*B4*/ 134, 0.000, 0.000, 113, 3.457, 3340.612, 7, 0.50, 6681.22, - /*B5*/ 5, 4.87, 3340.61, 1, 5.31, 6681.22, - /*R0*/ 1530334883, 0.0000000000, 0.0000000000, 141849532, 3.479712835, 3340.612426700, 6607764, 3.8178344, 6681.2248534, 461791, 4.155953, 10021.837280, 81097, 5.55958, 2810.92146, 74853, 1.77239, 5621.84292, 55232, 1.36436, 2281.23050, 38252, 4.49407, 13362.44971, 24844, 4.92546, 2942.46342, 23065, 0.09082, 2544.31442, 19994, 5.36060, 3337.08931, 19602, 4.74249, 3344.13555, 11671, 2.11262, 5092.15196, 11028, 5.00908, 398.14900, 9923, 5.8386, 6151.5339, 8991, 4.4079, 529.6910, 8073, 2.1022, 1059.3819, 7979, 3.4484, 796.2980, 7410, 1.4991, 2146.1654, 7256, 1.2452, 8432.7644, 6923, 2.1338, 8962.4553, 6331, 0.8935, 3340.5952, 6331, 2.9243, 3340.6297, 6300, 1.2874, 1751.5395, 5744, 0.8290, 2914.0142, 5262, 5.3829, 3738.7614, 4728, 5.1985, 3127.3133, 3481, 4.8322, 16703.0621, 2837, 2.9069, 3532.0607, 2796, 5.2575, 6283.0758, 2755, 1.2177, 6254.6267, 2752, 2.9082, 1748.0164, 2699, 3.7639, 5884.9268, 2391, 2.0367, 1194.4470, 2338, 5.1055, 5486.7778, 2281, 3.2553, 6872.6731, 2232, 4.1986, 3149.1642, 2194, 5.5834, 191.4483, 2083, 4.8463, 3340.6797, 2083, 5.2548, 3340.5451, 1862, 5.6987, 6677.7017, 1827, 5.0806, 6684.7480, 1786, 4.1842, 3333.4989, 1760, 5.9534, 3870.3034, 1635, 3.7989, 4136.9104, 1443, 0.2130, 5088.6288, 1418, 2.4779, 4562.4610, 1331, 1.5391, 7903.0734, 1286, 5.4988, 8827.3903, 1188, 2.1218, 1589.0729, 1149, 4.3175, 1349.8674, 1115, 0.5534, 11243.6858, 1021, 6.1814, 9492.1463, 867, 1.750, 2700.715, 853, 1.616, 4690.480, 845, 0.623, 1592.596, 832, 0.616, 8429.241, 825, 1.622, 11773.377, 718, 2.475, 12303.068, 686, 2.402, 4399.994, 665, 2.213, 6041.328, 636, 2.673, 426.598, 620, 1.101, 1221.849, 590, 3.262, 6681.242, 590, 1.232, 6681.208, 586, 4.721, 213.299, 558, 1.233, 3185.192, 557, 5.447, 3723.509, 550, 5.727, 951.718, 524, 3.024, 4292.331, 516, 5.723, 7079.374, 489, 5.616, 3553.912, 454, 5.433, 6467.926, 446, 2.015, 8031.092, 443, 5.003, 5614.729, 433, 1.037, 11769.854, 424, 2.266, 155.420, 422, 1.633, 5628.956, 392, 1.242, 3339.632, 390, 2.578, 3341.593, 364, 4.439, 3894.182, 360, 1.160, 2288.344, 353, 5.490, 1990.745, 336, 5.170, 20043.675, 331, 0.855, 553.569, 323, 2.382, 4535.059, 320, 1.940, 382.897, 319, 4.593, 2274.117, 319, 4.375, 3.523, 303, 2.442, 11371.705, 294, 4.060, 3097.884, 279, 4.258, 3191.049, 275, 1.577, 9595.239, 262, 5.585, 9623.688, 252, 0.814, 10713.995, 248, 5.390, 2818.035, 247, 2.580, 2803.808, 234, 6.015, 3496.033, 228, 3.417, 7632.943, 221, 0.857, 3319.837, 213, 6.192, 14054.607, 210, 2.385, 4989.059, 206, 2.987, 3361.388, 204, 4.536, 6489.777, 199, 2.735, 5099.266, 197, 1.863, 3443.705, 195, 6.038, 10018.314, 194, 5.185, 6681.292, 194, 5.594, 6681.158, 191, 5.420, 10025.360, 191, 0.226, 13745.346, 186, 4.073, 2388.894, 183, 5.796, 7064.121, 182, 5.613, 7.114, 180, 2.814, 4032.770, 172, 3.671, 3205.547, 172, 3.188, 3347.726, 171, 1.550, 2957.716, 170, 6.155, 10404.734, 167, 4.521, 6674.111, 165, 4.141, 7477.523, 165, 3.845, 10973.556, 165, 2.866, 14712.317, 163, 6.282, 7210.916, 163, 1.923, 7373.382, 161, 0.928, 14584.298, 160, 4.584, 3264.346, 154, 2.208, 2118.764, 151, 2.654, 2787.043, 137, 1.686, 3337.022, 134, 2.128, 3344.203, 131, 4.275, 14314.168, 119, 0.799, 3265.831, 119, 4.821, 7234.794, 118, 0.197, 3475.678, 118, 3.229, 5828.028, 112, 0.239, 12832.759, 110, 0.445, 10213.286, 106, 1.740, 639.897, 102, 5.748, 242.729, 102, 2.665, 2487.416, 101, 5.375, 5085.038, 101, 0.789, 9381.940, 101, 2.451, 4929.685, 90, 0.96, 4933.21, 90, 1.99, 15113.99, 90, 4.18, 9225.54, 83, 1.94, 1648.45, 83, 0.95, 2906.90, 82, 5.25, 10575.41, 80, 3.92, 2921.13, 79, 2.81, 15643.68, 78, 2.05, 1758.65, 75, 5.68, 13916.02, 74, 6.10, 3583.34, 74, 0.84, 692.16, 70, 3.32, 3230.41, 68, 4.69, 17654.78, 65, 6.12, 135.07, 65, 2.74, 7740.61, 64, 4.20, 5202.36, 63, 3.32, 3767.21, 63, 4.50, 8425.65, 62, 6.11, 17256.63, 62, 4.48, 22747.29, 62, 4.59, 6531.66, 62, 1.57, 10021.82, 62, 3.60, 10021.85, 61, 0.00, 6836.65, 57, 0.14, 13524.92, 55, 5.75, 12168.00, 55, 6.06, 10419.99, 54, 5.22, 5305.45, 54, 5.08, 2707.83, 53, 4.55, 1744.43, 52, 2.70, 4459.37, 51, 1.57, 6525.80, 51, 1.29, 8439.88, 50, 2.34, 1052.27, 50, 4.68, 522.58, 47, 0.01, 3325.36, 47, 5.78, 9808.54, 47, 3.06, 5518.75, 47, 5.15, 1066.50, 45, 1.44, 3369.06, 45, 5.95, 6894.52, 44, 5.57, 16865.53, 44, 0.82, 3302.48, 43, 3.11, 4569.57, 43, 2.79, 3503.08, 42, 1.91, 263.08, 41, 4.40, 3074.01, 41, 5.49, 2699.73, 41, 5.47, 3120.20, 40, 1.34, 6247.51, 40, 1.84, 3134.43, 40, 3.83, 3355.86, 39, 1.98, 8969.57, 39, 1.49, 9168.64, 39, 0.38, 10177.26, 39, 1.23, 16858.48, 39, 3.48, 20618.02, 38, 0.80, 13517.87, 38, 0.27, 17395.22, 37, 4.25, 6261.74, 37, 1.58, 6680.24, 36, 2.95, 6144.42, 36, 5.55, 632.78, 36, 2.92, 6682.21, 36, 3.68, 5724.94, 36, 0.15, 2178.14, 35, 1.18, 10184.30, - /*R1*/ 11074333, 2.03250525, 3340.61242670, 1031759, 2.3707185, 6681.2248534, 128772, 0.000000, 0.000000, 108159, 2.708881, 10021.837280, 11946, 3.04702, 13362.44971, 4386, 2.8884, 2281.2305, 3957, 3.4232, 3344.1355, 1826, 1.5843, 2544.3144, 1359, 3.3851, 16703.0621, 1284, 6.0434, 3337.0893, 1282, 0.6299, 1059.3819, 1271, 1.9539, 796.2980, 1184, 2.9976, 2146.1654, 875, 3.421, 398.149, 830, 3.856, 3738.761, 756, 4.451, 6151.534, 720, 2.764, 529.691, 665, 2.549, 1751.540, 664, 4.406, 1748.016, 575, 0.544, 1194.447, 543, 0.678, 8962.455, 510, 3.726, 6684.748, 494, 5.730, 3340.595, 494, 1.477, 3340.630, 483, 2.581, 3149.164, 479, 2.285, 2914.014, 390, 2.319, 4136.910, 372, 5.814, 1349.867, 364, 6.027, 3185.192, 360, 5.895, 3333.499, 311, 0.978, 191.448, 272, 5.414, 1592.596, 243, 3.758, 155.420, 228, 1.748, 5088.629, 223, 0.939, 951.718, 217, 3.836, 6283.076, 216, 4.569, 3532.061, 213, 0.780, 1589.073, 204, 3.135, 4690.480, 182, 0.413, 5486.778, 180, 4.219, 3870.303, 169, 4.537, 4292.331, 168, 5.549, 3097.884, 165, 0.968, 4399.994, 165, 3.539, 2700.715, 163, 3.808, 3340.545, 163, 3.399, 3340.680, 162, 2.349, 553.569, 158, 4.757, 9492.146, 157, 3.724, 20043.675, 147, 5.953, 3894.182, 143, 3.999, 1990.745, 132, 0.415, 5614.729, 130, 5.142, 6677.702, 127, 0.690, 3723.509, 125, 1.032, 3341.593, 124, 6.231, 5628.956, 122, 4.223, 7079.374, 118, 6.253, 2274.117, 113, 1.024, 12303.068, 112, 1.318, 3496.033, 104, 1.233, 426.598, 103, 0.901, 4535.059, 98, 3.45, 382.90, 92, 1.82, 6681.24, 92, 6.07, 6681.21, 92, 3.90, 3553.91, 90, 2.58, 2388.89, 88, 2.20, 1221.85, 86, 1.16, 2787.04, 79, 5.74, 2288.34, 78, 4.15, 6041.33, 77, 1.01, 8432.76, 73, 4.27, 2803.81, 72, 3.70, 2818.04, 71, 3.51, 8031.09, 68, 4.05, 10025.36, 68, 0.24, 11773.38, 67, 4.26, 242.73, 65, 0.04, 2957.72, 65, 2.12, 8429.24, 65, 2.76, 3339.63, 63, 1.90, 5621.84, 63, 1.60, 3347.73, 60, 2.96, 6489.78, 57, 3.14, 213.30, 55, 4.91, 7632.94, 55, 4.61, 3583.34, 53, 3.78, 5092.15, 52, 2.67, 7477.52, 51, 3.98, 7.11, 47, 0.91, 5099.27, 46, 1.82, 2810.92, 40, 4.14, 9623.69, 40, 4.91, 2942.46, 39, 0.54, 5884.93, 39, 3.08, 3.52, 39, 0.67, 3127.31, 38, 0.03, 7234.79, 37, 0.09, 6525.80, 36, 5.77, 4933.21, 32, 4.55, 2487.42, 31, 1.00, 2118.76, 30, 2.59, 2906.90, 30, 4.15, 6681.16, 30, 3.74, 6681.29, 30, 0.83, 5085.04, 29, 4.66, 7210.92, 28, 1.01, 7064.12, 28, 0.05, 639.90, 28, 3.98, 6467.93, 28, 5.17, 5828.03, 27, 0.69, 2699.73, 26, 5.34, 10973.56, 26, 5.01, 10018.31, 26, 1.09, 4929.69, 26, 5.09, 12832.76, 25, 1.53, 6836.65, 24, 3.94, 11371.70, 22, 0.19, 9595.24, 21, 5.69, 3191.05, 21, 1.30, 7740.61, 21, 3.54, 1066.50, 21, 6.24, 6674.11, 20, 6.16, 1744.43, 20, 0.46, 10575.41, 19, 5.02, 3475.68, 19, 1.37, 15643.68, 18, 4.06, 23384.29, 18, 6.16, 8425.65, 18, 5.68, 3319.84, 18, 2.31, 3355.86, 18, 5.87, 3320.26, 17, 4.58, 10419.99, 17, 2.22, 2921.13, 17, 1.93, 3767.21, 16, 4.34, 5331.36, 16, 5.93, 8439.88, 15, 1.54, 3361.39, 15, 0.35, 8969.57, 14, 2.15, 10021.85, 14, 0.12, 10021.82, 14, 0.56, 15113.99, 14, 1.39, 6682.21, 14, 4.65, 4562.46, 14, 1.50, 3325.36, 14, 0.15, 1758.65, 13, 1.25, 7875.67, 13, 1.87, 692.16, 13, 1.45, 6254.63, 13, 5.79, 14584.30, 13, 1.35, 10404.73, 12, 6.03, 3264.35, 12, 1.88, 10177.26, 12, 0.85, 3120.20, 12, 4.30, 6894.52, 12, 0.90, 13916.02, 12, 4.18, 3360.97, 12, 3.00, 6247.51, 11, 0.15, 3134.43, 11, 2.84, 640.88, 11, 2.58, 6261.74, 11, 0.49, 11243.69, 11, 0.25, 3337.02, 11, 0.13, 522.58, 11, 0.68, 3344.20, 10, 4.06, 6158.65, 10, 5.70, 536.80, 10, 5.77, 14314.17, 10, 1.28, 4569.57, 10, 2.92, 5729.51, - /*R2*/ 442422, 0.479306, 3340.612427, 81380, 0.86998, 6681.22485, 12749, 1.22594, 10021.83728, 1874, 1.5730, 13362.4497, 524, 3.142, 0.000, 407, 1.971, 3344.136, 266, 1.917, 16703.062, 178, 4.435, 2281.230, 117, 4.525, 3185.192, 102, 5.391, 1059.382, 100, 0.419, 796.298, 92, 4.54, 2146.17, 78, 5.93, 1748.02, 73, 3.14, 2544.31, 72, 2.29, 6684.75, 68, 5.27, 155.42, 67, 5.30, 1194.45, 65, 2.31, 3738.76, 58, 1.05, 1349.87, 54, 1.00, 3149.16, 47, 0.77, 3097.88, 46, 0.81, 4136.91, 44, 2.46, 951.72, 43, 3.90, 1592.60, 39, 3.86, 553.57, 37, 2.26, 20043.67, 36, 1.32, 3333.50, 35, 1.85, 398.15, 34, 3.82, 1751.54, 32, 2.12, 5614.73, 31, 4.55, 5628.96, 30, 2.86, 6151.53, 29, 1.19, 529.69, 29, 1.20, 3894.18, 28, 2.49, 1990.75, 27, 2.92, 3496.03, 27, 6.07, 4292.33, 24, 4.68, 4690.48, 24, 5.94, 2787.04, 23, 2.56, 191.45, 22, 1.85, 3337.09, 22, 5.37, 8962.46, 22, 1.07, 2388.89, 21, 2.75, 242.73, 20, 3.82, 2914.01, 20, 5.76, 3341.59, 20, 5.76, 4399.99, 20, 4.17, 3340.60, 20, 6.21, 3340.63, 20, 3.11, 3583.34, 18, 5.69, 1589.07, 18, 3.32, 5088.63, 16, 5.68, 4535.06, 15, 4.96, 382.90, 15, 2.23, 3723.51, 14, 2.70, 7079.37, 14, 5.19, 2700.72, 13, 4.88, 6525.80, 13, 4.82, 2957.72, 12, 2.62, 10025.36, 12, 0.93, 2810.92, 12, 3.27, 9492.15, 10, 6.27, 3347.73, 10, 3.40, 5621.84, 10, 2.11, 3870.30, 9, 1.40, 6489.78, 9, 5.81, 12303.07, 9, 2.20, 2699.73, 9, 5.96, 426.60, 8, 2.26, 6283.08, 8, 2.24, 3553.91, 8, 1.17, 7477.52, 8, 2.01, 5092.15, 8, 0.23, 3532.06, 8, 2.06, 5486.78, 7, 4.26, 4933.21, 7, 0.30, 6681.24, 7, 4.55, 6681.21, 7, 2.34, 7.11, 7, 3.99, 6677.70, 7, 0.16, 7632.94, 6, 2.25, 3340.55, 6, 1.84, 3340.68, 6, 1.55, 7234.79, 6, 3.30, 1221.85, 6, 5.06, 8031.09, 5, 4.26, 3339.63, 5, 2.60, 23384.29, 5, 3.08, 6836.65, 4, 1.34, 640.88, 4, 4.96, 8969.57, 4, 2.85, 5331.36, 4, 6.27, 2487.42, 4, 6.10, 7740.61, - /*R3*/ 11131, 5.14987, 3340.61243, 4244, 5.6134, 6681.2249, 1000, 5.9973, 10021.8373, 196, 0.076, 13362.450, 47, 3.14, 0.00, 35, 0.43, 16703.06, 29, 0.45, 3344.14, 24, 3.02, 3185.19, 7, 0.81, 6684.75, 6, 0.78, 20043.67, 5, 3.87, 1059.38, 5, 1.61, 3583.34, 5, 4.52, 3496.03, 4, 5.72, 3149.16, 4, 4.42, 2787.04, 4, 5.56, 4136.91, 3, 3.38, 6525.80, 3, 0.76, 3738.76, 2, 2.14, 3097.88, 2, 5.83, 2388.89, 2, 0.57, 155.42, 2, 4.20, 3341.59, 2, 0.97, 1990.75, 2, 2.35, 1592.60, 2, 4.15, 4535.06, 2, 3.76, 1194.45, 2, 1.14, 10025.36, 2, 5.13, 796.30, - /*R4*/ 196, 3.582, 3340.612, 163, 4.051, 6681.225, 58, 4.46, 10021.84, 15, 4.84, 13362.45, 4, 1.51, 3185.19, 3, 5.21, 16703.06, 2, 5.16, 3344.14, 1, 0.00, 0.00, 1, 2.19, 3496.03, 1, 0.10, 3583.34, 1, 5.55, 20043.67, 1, 1.87, 6525.80, - /*R5*/ 5, 2.48, 6681.22, 3, 2.92, 10021.84, 1, 1.77, 3340.61, 1, 3.31, 13362.45}, - - //Djup精度:J2000+-4千年 黄经0.5角秒 黄纬0.5角秒 距离3AU/10^6 - []float64{ - 100000000, //A的倍率 - 20, 503, 863, 1256, 1451, 1529, 1550, 1676, 1802, 1910, 1964, 1988, 1991, 2513, 2945, 3482, 3761, 3896, 3923, //位置索引表 - /*L0*/ 59954691, 0.00000000, 0.00000000, 9695899, 5.0619179, 529.6909651, 573610, 1.444062, 7.113547, 306389, 5.417347, 1059.381930, 97178, 4.14265, 632.78374, 72903, 3.64043, 522.57742, 64264, 3.41145, 103.09277, 39806, 2.29377, 419.48464, 38858, 1.27232, 316.39187, 27965, 1.78455, 536.80451, 13590, 5.77481, 1589.07290, 8769, 3.6300, 949.1756, 8246, 3.5823, 206.1855, 7368, 5.0810, 735.8765, 6263, 0.0250, 213.2991, 6114, 4.5132, 1162.4747, 5305, 4.1863, 1052.2684, 5305, 1.3067, 14.2271, 4905, 1.3208, 110.2063, 4647, 4.6996, 3.9322, 3045, 4.3168, 426.5982, 2610, 1.5667, 846.0828, 2028, 1.0638, 3.1814, 1921, 0.9717, 639.8973, 1765, 2.1415, 1066.4955, 1723, 3.8804, 1265.5675, 1633, 3.5820, 515.4639, 1432, 4.2968, 625.6702, 973, 4.098, 95.979, 884, 2.437, 412.371, 733, 6.085, 838.969, 731, 3.806, 1581.959, 709, 1.293, 742.990, 692, 6.134, 2118.764, 614, 4.109, 1478.867, 582, 4.540, 309.278, 495, 3.756, 323.505, 441, 2.958, 454.909, 417, 1.036, 2.448, 390, 4.897, 1692.166, 376, 4.703, 1368.660, 341, 5.715, 533.623, 330, 4.740, 0.048, 262, 1.877, 0.963, 261, 0.820, 380.128, 257, 3.724, 199.072, 244, 5.220, 728.763, 235, 1.227, 909.819, 220, 1.651, 543.918, 207, 1.855, 525.759, 202, 1.807, 1375.774, 197, 5.293, 1155.361, 175, 3.730, 942.062, 175, 3.226, 1898.351, 175, 5.910, 956.289, 158, 4.365, 1795.258, 151, 3.906, 74.782, 149, 4.377, 1685.052, 141, 3.136, 491.558, 138, 1.318, 1169.588, 131, 4.169, 1045.155, 117, 2.500, 1596.186, 117, 3.389, 0.521, 106, 4.554, 526.510, 100, 1.421, 532.872, 96, 1.18, 117.32, 92, 0.86, 1272.68, 88, 1.22, 453.42, 77, 4.43, 39.36, 72, 4.24, 2111.65, 70, 5.14, 835.04, 69, 2.35, 2.92, 67, 2.99, 2214.74, 66, 5.34, 1471.75, 63, 4.98, 0.75, 62, 0.51, 220.41, 60, 4.13, 4.19, 59, 4.11, 2001.44, 58, 5.87, 5753.38, 56, 1.15, 21.34, 54, 1.57, 983.12, 53, 0.91, 10.29, 52, 4.10, 1258.45, 47, 3.55, 5.42, 47, 4.79, 305.35, 46, 4.67, 5.63, 46, 5.11, 4.67, 43, 0.15, 528.21, 42, 4.68, 302.16, 40, 4.69, 0.16, 39, 4.25, 853.20, 39, 1.72, 11.05, 39, 6.08, 518.65, 38, 2.44, 433.71, 38, 0.21, 2648.45, 38, 6.19, 831.86, 36, 2.45, 430.53, 36, 4.61, 2008.56, 34, 1.01, 9683.59, 33, 5.29, 88.87, 32, 5.14, 1788.14, 31, 0.42, 1.48, 30, 3.67, 508.35, 30, 5.34, 2221.86, 28, 1.85, 0.21, 27, 2.81, 18.16, 27, 1.78, 532.14, 26, 2.74, 2531.13, 26, 3.86, 2317.84, 25, 2.63, 114.14, 24, 3.82, 1574.85, 24, 2.53, 494.27, 23, 3.24, 984.60, 23, 3.85, 2428.04, 22, 6.02, 1063.31, 21, 1.29, 35.42, 21, 4.03, 355.75, 20, 1.02, 628.85, 20, 5.60, 527.24, 19, 0.52, 14.98, 19, 4.86, 1361.55, 18, 4.30, 6.15, 17, 1.59, 1439.51, 16, 2.77, 760.26, 16, 5.27, 142.45, 16, 1.89, 529.64, 16, 5.09, 529.74, 16, 4.12, 636.72, 15, 6.08, 149.56, 15, 2.82, 621.74, 15, 4.86, 2104.54, 15, 0.88, 99.16, 15, 6.26, 569.05, 14, 2.41, 530.65, 14, 2.72, 0.26, 14, 3.56, 217.23, 13, 2.19, 1055.45, 13, 2.72, 1364.73, 13, 4.76, 528.73, 13, 1.39, 7.07, 12, 2.61, 405.26, 12, 4.30, 604.47, 12, 0.25, 1485.98, 12, 3.60, 2634.23, 12, 4.60, 7.16, 12, 2.35, 643.83, 11, 2.01, 1073.61, 11, 2.48, 423.42, 11, 4.05, 519.40, 11, 5.04, 458.84, 11, 5.09, 2324.95, 11, 2.51, 2847.53, 11, 2.08, 92.05, 11, 3.12, 1.27, 10, 3.63, 2744.43, 10, 2.09, 511.53, 10, 1.31, 1905.46, 10, 3.66, 107.02, 10, 4.06, 38.13, 10, 1.70, 1699.28, 10, 1.22, 32.24, - /*L1*/ 52993480757, 0.00000000000, 0.00000000000, 489741, 4.220667, 529.690965, 228919, 6.026475, 7.113547, 27655, 4.57266, 1059.38193, 20721, 5.45939, 522.57742, 12106, 0.16986, 536.80451, 6068, 4.4242, 103.0928, 5434, 3.9848, 419.4846, 4238, 5.8901, 14.2271, 2212, 5.2677, 206.1855, 1746, 4.9267, 1589.0729, 1296, 5.5513, 3.1814, 1173, 5.8565, 1052.2684, 1163, 0.5145, 3.9322, 1099, 5.3070, 515.4639, 1007, 0.4648, 735.8765, 1004, 3.1504, 426.5982, 848, 5.758, 110.206, 827, 4.803, 213.299, 816, 0.586, 1066.495, 725, 5.518, 639.897, 568, 5.989, 625.670, 474, 4.132, 412.371, 413, 5.737, 95.979, 345, 4.242, 632.784, 336, 3.732, 1162.475, 234, 4.035, 949.176, 234, 6.243, 309.278, 199, 1.505, 838.969, 195, 2.219, 323.505, 187, 6.086, 742.990, 184, 6.280, 543.918, 171, 5.417, 199.072, 131, 0.626, 728.763, 115, 0.680, 846.083, 115, 5.286, 2118.764, 108, 4.493, 956.289, 80, 5.82, 1045.15, 72, 5.34, 942.06, 70, 5.97, 532.87, 67, 5.73, 21.34, 66, 0.13, 526.51, 65, 6.09, 1581.96, 59, 0.59, 1155.36, 58, 0.99, 1596.19, 57, 5.97, 1169.59, 57, 1.41, 533.62, 55, 5.43, 10.29, 52, 5.73, 117.32, 52, 0.23, 1368.66, 50, 6.08, 525.76, 47, 3.63, 1478.87, 47, 0.51, 1265.57, 40, 4.16, 1692.17, 34, 0.10, 302.16, 33, 5.04, 220.41, 32, 5.37, 508.35, 29, 5.42, 1272.68, 29, 3.36, 4.67, 29, 0.76, 88.87, 25, 1.61, 831.86, 22, 6.15, 1685.05, 21, 5.86, 1258.45, 20, 2.17, 316.39, 18, 0.83, 433.71, 18, 5.96, 5.42, 18, 0.50, 1375.77, 17, 0.71, 1471.75, 17, 2.76, 853.20, 14, 0.91, 18.16, 14, 0.63, 2.92, 12, 1.76, 380.13, 12, 4.30, 405.26, 11, 5.57, 1574.85, 10, 0.31, 1361.55, 10, 0.39, 1073.61, 10, 5.90, 519.40, 9, 3.22, 1795.26, 9, 0.54, 1788.14, 8, 5.88, 2001.44, 8, 5.10, 1485.98, 8, 5.65, 2648.45, 7, 6.19, 11.05, 7, 2.41, 4.19, 6, 1.36, 1148.25, 6, 4.22, 2008.56, 6, 5.57, 191.96, 5, 4.40, 2221.86, 5, 1.46, 330.62, 5, 5.23, 628.85, 5, 2.93, 518.65, 5, 0.17, 629.60, 5, 0.79, 721.65, 5, 6.25, 1677.94, 5, 4.95, 635.97, 5, 2.07, 453.42, 4, 0.09, 1062.56, 4, 4.36, 423.42, 4, 0.15, 1699.28, 4, 4.14, 511.53, 4, 0.24, 2104.54, 4, 1.44, 2125.88, 4, 0.50, 1056.20, 4, 6.19, 636.72, 4, 2.55, 74.78, 4, 2.93, 32.24, 4, 5.67, 2317.84, 4, 0.25, 1055.45, 3, 5.89, 1802.37, 3, 4.61, 416.30, 3, 5.50, 107.02, 3, 1.09, 1464.64, 3, 5.73, 99.91, 3, 3.31, 0.75, 3, 1.61, 1063.31, 3, 1.25, 540.74, 3, 3.04, 422.67, 3, 4.29, 106.27, 3, 0.35, 1898.35, 3, 3.60, 750.10, - /*L2*/ 47234, 4.32148, 7.11355, 38966, 0.00000, 0.00000, 30629, 2.93021, 529.69097, 3189, 1.0550, 522.5774, 2729, 4.8455, 536.8045, 2723, 3.4141, 1059.3819, 1721, 4.1873, 14.2271, 383, 5.768, 419.485, 378, 0.760, 515.464, 367, 6.055, 103.093, 337, 3.786, 3.181, 308, 0.694, 206.186, 218, 3.814, 1589.073, 199, 5.340, 1066.495, 197, 2.484, 3.932, 156, 1.406, 1052.268, 146, 3.814, 639.897, 142, 1.634, 426.598, 130, 5.837, 412.371, 117, 1.414, 625.670, 97, 4.03, 110.21, 91, 1.11, 95.98, 87, 2.52, 632.78, 79, 4.64, 543.92, 72, 2.22, 735.88, 58, 0.83, 199.07, 57, 3.12, 213.30, 49, 1.67, 309.28, 40, 4.02, 21.34, 40, 0.62, 323.51, 36, 2.33, 728.76, 29, 3.61, 10.29, 28, 3.24, 838.97, 26, 4.50, 742.99, 26, 2.51, 1162.47, 25, 1.22, 1045.15, 24, 3.01, 956.29, 19, 4.29, 532.87, 18, 0.81, 508.35, 17, 4.20, 2118.76, 17, 1.83, 526.51, 15, 5.81, 1596.19, 15, 0.68, 942.06, 15, 4.00, 117.32, 14, 5.95, 316.39, 14, 1.80, 302.16, 13, 2.52, 88.87, 13, 4.37, 1169.59, 11, 4.44, 525.76, 10, 1.72, 1581.96, 9, 2.18, 1155.36, 9, 3.29, 220.41, 9, 3.32, 831.86, 8, 5.76, 846.08, 8, 2.71, 533.62, 7, 2.18, 1265.57, 6, 0.50, 949.18, 5, 6.01, 405.26, 5, 3.65, 1272.68, 5, 1.41, 1258.45, 4, 3.02, 1692.17, 4, 5.48, 433.71, 4, 2.27, 1368.66, 4, 5.07, 1073.61, 4, 5.29, 18.16, 4, 1.27, 853.20, 3, 1.54, 519.40, 3, 0.99, 191.96, 3, 2.05, 1361.55, 3, 2.10, 1478.87, 3, 1.06, 1574.85, 2, 2.37, 1471.75, 2, 3.03, 1148.25, 2, 2.48, 721.65, 2, 3.71, 1485.98, 2, 6.17, 330.62, 2, 1.88, 1685.05, 1, 5.15, 1375.77, 1, 4.72, 32.24, 1, 3.19, 635.97, 1, 1.99, 629.60, 1, 4.27, 551.03, 1, 1.28, 1038.04, 1, 4.02, 539.99, 1, 4.76, 1062.56, 1, 4.63, 2648.45, 1, 2.26, 1788.14, 1, 0.03, 2125.88, 1, 1.70, 1677.94, 1, 2.18, 1795.26, 1, 2.98, 81.75, 1, 5.06, 1699.28, 1, 0.14, 416.30, 1, 1.99, 295.05, 1, 3.75, 28.45, 1, 1.91, 750.10, 1, 2.81, 1464.64, 1, 3.01, 124.43, 1, 1.18, 99.91, 1, 3.53, 227.53, 1, 1.75, 1898.35, 1, 2.07, 1056.20, 1, 2.74, 618.56, 1, 6.25, 423.42, 1, 2.00, 2111.65, 1, 1.65, 2001.44, 1, 4.92, 1055.45, 1, 2.89, 2008.56, 1, 4.32, 1802.37, 1, 1.26, 1382.89, 1, 3.03, 2221.86, 1, 2.65, 106.27, 1, 3.30, 628.85, 1, 3.44, 824.74, 1, 0.08, 963.40, 1, 3.12, 5746.27, 1, 5.47, 5760.50, 1, 1.88, 2104.54, 1, 1.20, 422.67, 1, 4.68, 611.44, 1, 1.86, 636.72, 1, 4.54, 9676.48, 1, 0.61, 9690.71, 1, 2.84, 1905.46, 1, 3.08, 380.13, 1, 0.84, 1891.24, 1, 3.96, 440.83, 1, 1.56, 1994.33, 1, 2.55, 1781.03, 1, 1.11, 107.02, 1, 4.44, 647.01, - /*L3*/ 6502, 2.5986, 7.1135, 1357, 1.3464, 529.6910, 471, 2.475, 14.227, 417, 3.245, 536.805, 353, 2.974, 522.577, 155, 2.076, 1059.382, 87, 2.51, 515.46, 44, 0.00, 0.00, 34, 3.83, 1066.50, 28, 2.45, 206.19, 24, 1.28, 412.37, 23, 2.98, 543.92, 20, 2.10, 639.90, 20, 1.40, 419.48, 19, 1.59, 103.09, 17, 2.30, 21.34, 17, 2.60, 1589.07, 16, 3.15, 625.67, 16, 3.36, 1052.27, 13, 2.76, 95.98, 13, 2.54, 199.07, 13, 6.27, 426.60, 9, 1.76, 10.29, 9, 2.27, 110.21, 7, 3.43, 309.28, 7, 4.04, 728.76, 6, 2.52, 508.35, 5, 2.91, 1045.15, 5, 5.25, 323.51, 4, 4.30, 88.87, 4, 3.52, 302.16, 4, 4.09, 735.88, 3, 1.43, 956.29, 3, 4.36, 1596.19, 3, 1.25, 213.30, 3, 5.02, 838.97, 3, 2.24, 117.32, 2, 2.90, 742.99, 2, 2.36, 942.06, 2, 2.77, 1169.59, 2, 5.01, 831.86, 2, 1.40, 405.26, 1, 1.61, 220.41, 1, 3.09, 2118.76, 1, 3.98, 1155.36, 1, 3.46, 1073.61, 1, 3.39, 532.87, 1, 2.70, 191.96, 1, 1.48, 632.78, 1, 3.30, 1258.45, 1, 1.11, 1162.47, 1, 3.66, 1581.96, 1, 3.75, 433.71, 1, 5.90, 853.20, 1, 1.96, 1272.68, 1, 2.93, 1574.85, 1, 3.53, 525.76, 1, 2.02, 526.51, 1, 4.15, 721.65, 1, 4.69, 81.75, 1, 2.28, 551.03, 1, 4.36, 1368.66, 1, 1.57, 949.18, 1, 4.96, 1148.25, 1, 4.31, 330.62, - /*L4*/ 669, 0.853, 7.114, 114, 3.142, 0.000, 100, 0.743, 14.227, 50, 1.65, 536.80, 44, 5.82, 529.69, 32, 4.86, 522.58, 15, 4.29, 515.46, 9, 0.71, 1059.38, 5, 1.30, 543.92, 4, 2.32, 1066.50, 4, 0.48, 21.34, 3, 3.00, 412.37, 2, 0.40, 639.90, 2, 4.26, 199.07, 2, 4.91, 625.67, 2, 4.26, 206.19, 1, 5.26, 1052.27, 1, 4.72, 95.98, 1, 1.29, 1589.07, 1, 4.78, 1045.15, 1, 6.06, 88.87, 1, 5.78, 728.76, 1, 4.55, 426.60, 1, 3.40, 419.48, 1, 3.55, 103.09, 1, 0.52, 110.21, - /*L5*/ 50, 5.26, 7.11, 16, 5.25, 14.23, 4, 0.01, 536.80, 2, 1.10, 522.58, 1, 3.14, 0.00, 1, 5.86, 543.92, 1, 0.87, 515.46, - /*B0*/ 2268616, 3.5585261, 529.6909651, 110090, 0.000000, 0.000000, 109972, 3.908093, 1059.381930, 8101, 3.6051, 522.5774, 6438, 0.3063, 536.8045, 6044, 4.2588, 1589.0729, 1107, 2.9853, 1162.4747, 944, 1.675, 426.598, 942, 2.936, 1052.268, 894, 1.754, 7.114, 836, 5.179, 103.093, 767, 2.155, 632.784, 684, 3.678, 213.299, 629, 0.643, 1066.495, 559, 0.014, 846.083, 532, 2.703, 110.206, 464, 1.173, 949.176, 431, 2.608, 419.485, 351, 4.611, 2118.764, 132, 4.778, 742.990, 123, 3.350, 1692.166, 116, 1.387, 323.505, 115, 5.049, 316.392, 104, 3.701, 515.464, 103, 2.319, 1478.867, 102, 3.153, 1581.959, 79, 3.98, 1265.57, 70, 2.56, 956.29, 63, 4.50, 735.88, 56, 0.38, 1375.77, 55, 0.40, 525.76, 52, 0.99, 1596.19, 50, 0.19, 543.92, 49, 3.57, 533.62, 29, 5.43, 206.19, 28, 1.54, 625.67, 24, 6.11, 1169.59, 23, 5.95, 838.97, 23, 4.06, 526.51, 23, 6.19, 532.87, 21, 2.69, 1045.15, 21, 4.96, 2648.45, - /*B1*/ 177352, 5.701665, 529.690965, 3230, 5.7794, 1059.3819, 3081, 5.4746, 522.5774, 2212, 4.7348, 536.8045, 1694, 3.1416, 0.0000, 346, 4.746, 1052.268, 234, 5.189, 1066.495, 196, 6.186, 7.114, 150, 3.927, 1589.073, 114, 3.439, 632.784, 97, 2.91, 949.18, 82, 5.08, 1162.47, 77, 2.51, 103.09, 77, 0.61, 419.48, 74, 5.50, 515.46, 61, 5.45, 213.30, 50, 3.95, 735.88, 46, 0.54, 110.21, 45, 1.90, 846.08, 37, 4.70, 543.92, 36, 6.11, 316.39, 32, 4.92, 1581.96, 25, 3.94, 2118.76, 23, 5.85, 323.51, 21, 5.63, 1596.19, 17, 5.65, 533.62, 17, 5.67, 1265.57, 17, 5.90, 526.51, 16, 4.43, 1045.15, 13, 4.30, 532.87, 12, 4.30, 525.76, 12, 1.81, 956.29, 11, 6.16, 14.23, 10, 2.03, 206.19, 9, 4.87, 1155.36, 9, 1.56, 426.60, 8, 3.93, 1478.87, 8, 4.20, 1169.59, 8, 3.85, 625.67, 8, 2.99, 942.06, 6, 3.41, 639.90, 5, 0.83, 117.32, - /*B2*/ 8094, 1.4632, 529.6910, 813, 3.142, 0.000, 742, 0.957, 522.577, 399, 2.899, 536.805, 342, 1.447, 1059.382, 74, 0.41, 1052.27, 46, 3.48, 1066.50, 30, 1.93, 1589.07, 29, 0.99, 515.46, 23, 4.27, 7.11, 14, 2.92, 543.92, 12, 5.22, 632.78, 11, 4.88, 949.18, 6, 6.21, 1045.15, 6, 0.53, 1581.96, 5, 6.03, 735.88, 5, 1.43, 526.51, 5, 0.92, 1162.47, 5, 4.02, 1596.19, 4, 4.54, 110.21, 3, 1.39, 533.62, 3, 0.42, 419.48, 3, 4.40, 14.23, 3, 2.48, 2118.76, 3, 2.40, 532.87, 3, 2.06, 316.39, 3, 3.98, 323.51, 2, 0.88, 213.30, 2, 0.37, 1155.36, 2, 4.78, 942.06, 2, 3.89, 426.60, 2, 3.90, 846.08, 2, 1.20, 103.09, 2, 5.80, 625.67, 2, 2.24, 525.76, 2, 1.42, 1265.57, - /*B3*/ 252, 3.381, 529.691, 122, 2.733, 522.577, 49, 1.04, 536.80, 11, 2.31, 1052.27, 8, 2.77, 515.46, 7, 4.25, 1059.38, 6, 1.78, 1066.50, 4, 1.13, 543.92, 3, 3.14, 0.00, 2, 2.29, 7.11, 2, 1.78, 1045.15, 1, 0.45, 632.78, 1, 0.33, 1589.07, 1, 0.31, 949.18, 1, 1.53, 735.88, 1, 2.64, 14.23, 1, 2.37, 1581.96, 1, 2.48, 1596.19, - /*B4*/ 15, 4.53, 522.58, 5, 4.47, 529.69, 4, 5.44, 536.80, 3, 0.00, 0.00, 2, 4.52, 515.46, 1, 4.20, 1052.27, 1, 5.59, 543.92, 1, 0.06, 1066.50, - /*B5*/ 1, 0.09, 522.58, - /*R0*/ 520887429, 0.000000000, 0.000000000, 25209327, 3.49108640, 529.69096509, 610600, 3.841154, 1059.381930, 282029, 2.574199, 632.783739, 187647, 2.075904, 522.577418, 86793, 0.71001, 419.48464, 72063, 0.21466, 536.80451, 65517, 5.97996, 316.39187, 30135, 2.16132, 949.17561, 29135, 1.67759, 103.09277, 23947, 0.27458, 7.11355, 23453, 3.54023, 735.87651, 22284, 4.19363, 1589.07290, 13033, 2.96043, 1162.47470, 12749, 2.71550, 1052.26838, 9703, 1.9067, 206.1855, 9161, 4.4135, 213.2991, 7895, 2.4791, 426.5982, 7058, 2.1818, 1265.5675, 6138, 6.2642, 846.0828, 5477, 5.6573, 639.8973, 4170, 2.0161, 515.4639, 4137, 2.7222, 625.6702, 3503, 0.5653, 1066.4955, 2617, 2.0099, 1581.9593, 2500, 4.5518, 838.9693, 2128, 6.1275, 742.9901, 1912, 0.8562, 412.3711, 1611, 3.0887, 1368.6603, 1479, 2.6803, 1478.8666, 1231, 1.8904, 323.5054, 1217, 1.8017, 110.2063, 1015, 1.3867, 454.9094, 999, 2.872, 309.278, 961, 4.549, 2118.764, 886, 4.148, 533.623, 821, 1.593, 1898.351, 812, 5.941, 909.819, 777, 3.677, 728.763, 727, 3.988, 1155.361, 655, 2.791, 1685.052, 654, 3.382, 1692.166, 621, 4.823, 956.289, 615, 2.276, 942.062, 562, 0.081, 543.918, 542, 0.284, 525.759, 496, 5.530, 380.128, 470, 2.819, 1795.258, 458, 0.127, 1375.774, 445, 0.146, 14.227, 436, 2.603, 95.979, 346, 1.564, 491.558, 338, 2.799, 1045.155, 319, 1.348, 2214.743, 309, 5.369, 1272.681, 303, 1.154, 5753.385, 294, 2.049, 199.072, 291, 6.031, 1169.588, 291, 3.893, 1471.753, 277, 2.522, 2001.444, 275, 2.989, 526.510, 257, 6.134, 532.872, 239, 3.574, 835.037, 215, 2.636, 2111.650, 201, 2.373, 1258.454, 197, 5.929, 453.425, 192, 0.920, 1596.186, 191, 6.283, 983.116, 177, 2.577, 9683.595, 139, 3.640, 1788.145, 129, 1.106, 2531.135, 128, 4.666, 831.856, 124, 2.262, 2317.836, 120, 2.952, 3.932, 113, 4.862, 528.206, 112, 0.856, 433.712, 106, 5.815, 220.413, 104, 2.222, 74.782, 99, 4.50, 518.65, 94, 2.73, 853.20, 86, 2.11, 1574.85, 86, 2.34, 2428.04, 82, 3.23, 1361.55, 80, 0.89, 430.53, 77, 2.10, 508.35, 70, 3.22, 305.35, 70, 3.04, 302.16, 70, 0.20, 532.14, 68, 3.36, 2104.54, 64, 1.10, 1364.73, 60, 0.96, 494.27, 58, 5.72, 628.85, 58, 3.46, 2008.56, 57, 2.00, 2634.23, 57, 3.92, 2221.86, 54, 0.87, 2847.53, 53, 1.20, 760.26, 52, 4.02, 527.24, 49, 5.60, 2810.92, 46, 2.54, 636.72, 45, 4.90, 2648.45, 45, 1.62, 984.60, 44, 4.43, 1063.31, 44, 1.25, 621.74, 43, 0.03, 1439.51, 42, 0.32, 529.64, 42, 3.52, 529.74, 40, 2.10, 2744.43, 40, 4.39, 1148.25, 40, 2.46, 355.75, 39, 4.71, 569.05, 39, 4.32, 149.56, 38, 2.93, 1677.94, 37, 5.08, 1905.46, 37, 0.84, 530.65, 34, 3.09, 2420.93, 34, 0.76, 643.83, 33, 3.19, 528.73, 32, 2.73, 604.47, 32, 6.19, 3.18, 31, 5.36, 1485.98, 29, 1.84, 1891.24, 28, 2.48, 519.40, 27, 3.92, 2324.95, 27, 1.75, 2950.62, 27, 1.04, 405.26, 26, 0.60, 1055.45, 26, 1.34, 330.62, 26, 0.52, 511.53, 26, 3.46, 458.84, 24, 0.88, 423.42, 24, 5.00, 1289.95, 23, 5.27, 672.14, 23, 0.65, 3163.92, 22, 0.43, 1073.61, 22, 5.92, 1802.37, 22, 1.42, 540.74, 21, 3.08, 629.60, 20, 2.73, 39.36, 20, 4.14, 1464.64, 19, 1.86, 3060.83, 19, 5.17, 635.97, 19, 3.66, 415.55, 19, 3.69, 88.87, 19, 1.97, 38.13, 18, 1.90, 1021.25, 18, 3.60, 746.92, 18, 2.67, 1994.33, 17, 2.82, 2737.32, 17, 1.91, 217.23, 17, 5.67, 408.44, 16, 0.18, 1699.28, 16, 3.35, 1056.20, 16, 3.82, 721.65, 15, 1.06, 114.14, 15, 1.32, 117.32, 15, 3.74, 2641.34, 15, 1.33, 490.33, 15, 4.65, 6283.08, 15, 1.67, 529.17, 15, 0.80, 5223.69, 15, 2.17, 530.21, 14, 3.54, 142.45, 13, 1.49, 3267.01, 13, 3.97, 2538.25, 13, 0.74, 908.33, 12, 0.21, 1062.56, 12, 3.67, 750.10, 12, 1.72, 911.30, 12, 2.97, 505.31, 12, 1.67, 2207.63, 12, 5.12, 685.47, 12, 5.23, 524.06, 12, 1.60, 1474.67, - /*R1*/ 1271802, 2.6493751, 529.6909651, 61662, 3.00076, 1059.38193, 53444, 3.89718, 522.57742, 41390, 0.00000, 0.00000, 31185, 4.88277, 536.80451, 11847, 2.41330, 419.48464, 9166, 4.7598, 7.1135, 3404, 3.3469, 1589.0729, 3203, 5.2108, 735.8765, 3176, 2.7930, 103.0928, 2806, 3.7422, 515.4639, 2677, 4.3305, 1052.2684, 2600, 3.6344, 206.1855, 2412, 1.4695, 426.5982, 2101, 3.9276, 639.8973, 1646, 5.3095, 1066.4955, 1641, 4.4163, 625.6702, 1050, 3.1611, 213.2991, 1025, 2.5543, 412.3711, 806, 2.678, 632.784, 741, 2.171, 1162.475, 677, 6.250, 838.969, 567, 4.577, 742.990, 485, 2.469, 949.176, 469, 4.710, 543.918, 445, 0.403, 323.505, 416, 5.368, 728.763, 402, 4.605, 309.278, 347, 4.681, 14.227, 338, 3.168, 956.289, 261, 5.343, 846.083, 247, 3.923, 942.062, 220, 4.842, 1368.660, 203, 5.600, 1155.361, 200, 4.439, 1045.155, 197, 3.706, 2118.764, 196, 3.759, 199.072, 184, 4.265, 95.979, 180, 4.402, 532.872, 170, 4.846, 526.510, 146, 6.130, 533.623, 133, 1.322, 110.206, 132, 4.512, 525.759, 124, 2.043, 1478.867, 122, 4.406, 1169.588, 115, 4.467, 1581.959, 111, 3.625, 1272.681, 100, 5.247, 1265.567, 99, 5.73, 1596.19, 92, 4.53, 1685.05, 86, 0.08, 831.86, 82, 3.81, 508.35, 81, 4.11, 1258.45, 80, 2.72, 1692.17, 78, 5.57, 1471.75, 56, 4.75, 302.16, 55, 0.35, 316.39, 52, 5.53, 433.71, 51, 4.86, 1375.77, 49, 4.01, 220.41, 44, 4.94, 1361.55, 42, 1.22, 853.20, 38, 5.33, 1788.14, 38, 4.27, 2001.44, 36, 3.85, 1574.85, 36, 1.76, 1795.26, 29, 5.17, 3.93, 27, 6.10, 1148.25, 25, 4.34, 519.40, 25, 2.73, 405.26, 23, 0.19, 380.13, 20, 4.33, 3.18, 20, 4.63, 1677.94, 20, 5.11, 1073.61, 19, 5.05, 2104.54, 18, 6.03, 330.62, 18, 3.77, 1485.98, 17, 4.02, 2317.84, 17, 5.43, 88.87, 16, 2.93, 1905.46, 15, 2.93, 2008.56, 15, 5.51, 721.65, 14, 3.63, 628.85, 14, 2.74, 2221.86, 14, 4.88, 629.60, 13, 1.39, 518.65, 13, 5.84, 1464.64, 12, 1.59, 2111.65, 12, 3.38, 635.97, 12, 4.08, 2648.45, 11, 2.58, 511.53, 11, 3.55, 1891.24, 11, 4.63, 636.72, 10, 0.50, 453.42, 10, 2.76, 423.42, 10, 4.39, 1994.33, 9, 4.33, 1802.37, 9, 4.79, 2420.93, 9, 4.81, 1062.56, 9, 1.86, 750.10, 9, 5.16, 1056.20, 9, 4.54, 21.34, 8, 3.73, 2634.23, 8, 1.29, 2428.04, 7, 3.02, 416.30, 7, 4.98, 1699.28, 7, 4.98, 1898.35, 7, 4.99, 1055.45, 7, 5.97, 540.74, 7, 2.91, 2324.95, 7, 5.55, 1781.03, 7, 4.57, 1038.04, 6, 1.39, 422.67, 6, 6.14, 2125.88, 6, 4.46, 551.03, 6, 3.87, 191.96, 6, 3.66, 621.74, 6, 2.58, 569.05, 6, 4.23, 539.99, 5, 5.63, 618.56, 5, 4.91, 835.04, 5, 0.18, 117.32, 5, 6.22, 963.40, 5, 0.07, 1063.31, 5, 1.35, 1382.89, 5, 4.56, 2737.32, 5, 4.61, 643.83, 5, 3.35, 2207.63, 5, 4.24, 227.53, 5, 4.08, 2310.72, 4, 1.48, 408.44, 4, 0.19, 824.74, 4, 4.61, 647.01, 4, 2.38, 2538.25, 4, 1.13, 415.55, 4, 4.10, 430.53, 4, 1.15, 74.78, 4, 3.43, 2950.62, 4, 1.03, 2744.43, 4, 2.19, 534.36, 4, 4.12, 440.83, 4, 4.64, 2214.74, 4, 5.29, 2097.42, 4, 1.63, 525.03, - /*R2*/ 79645, 1.35866, 529.69097, 8252, 5.7777, 522.5774, 7030, 3.2748, 536.8045, 5314, 1.8384, 1059.3819, 1861, 2.9768, 7.1135, 964, 5.480, 515.464, 836, 4.199, 419.485, 498, 3.142, 0.000, 427, 2.228, 639.897, 406, 3.783, 1066.495, 377, 2.242, 1589.073, 363, 5.368, 206.186, 342, 6.099, 1052.268, 339, 6.127, 625.670, 333, 0.003, 426.598, 280, 4.262, 412.371, 257, 0.963, 632.784, 230, 0.705, 735.877, 201, 3.069, 543.918, 200, 4.429, 103.093, 139, 2.932, 14.227, 114, 0.787, 728.763, 95, 1.70, 838.97, 86, 5.14, 323.51, 83, 0.06, 309.28, 80, 2.98, 742.99, 75, 1.60, 956.29, 70, 1.51, 213.30, 67, 5.47, 199.07, 62, 6.10, 1045.15, 56, 0.96, 1162.47, 52, 5.58, 942.06, 50, 2.72, 532.87, 45, 5.52, 508.35, 44, 0.27, 526.51, 40, 5.95, 95.98, 30, 0.94, 1155.36, 29, 1.79, 831.86, 28, 2.88, 525.76, 27, 2.65, 2118.76, 27, 2.81, 1169.59, 26, 4.27, 1596.19, 23, 0.18, 302.16, 22, 1.89, 1272.68, 21, 4.35, 316.39, 21, 0.54, 1265.57, 20, 0.04, 949.18, 20, 1.16, 533.62, 20, 0.06, 1581.96, 18, 4.15, 846.08, 17, 5.89, 1258.45, 17, 0.53, 1368.66, 13, 0.79, 110.21, 13, 3.90, 433.71, 12, 2.23, 220.41, 12, 0.41, 1361.55, 12, 4.44, 405.26, 10, 1.00, 1471.75, 10, 6.01, 853.20, 9, 1.51, 1148.25, 9, 1.60, 1692.17, 9, 6.27, 519.40, 9, 3.52, 1073.61, 8, 5.60, 1574.85, 8, 0.18, 1685.05, 8, 0.65, 1478.87, 7, 0.88, 88.87, 7, 0.89, 721.65, 7, 4.44, 330.62, 6, 2.50, 3.18, 5, 0.85, 1788.14, 5, 2.79, 21.34, 5, 2.98, 1375.77, 5, 0.05, 1677.94, 5, 0.86, 3.93, 5, 2.28, 1485.98, 4, 1.28, 1464.64, 4, 0.41, 629.60, 4, 1.61, 635.97, 4, 2.71, 551.03, 3, 2.45, 539.99, 3, 0.55, 1795.26, 3, 1.19, 1905.46, 3, 6.19, 1038.04, 3, 5.55, 191.96, 3, 6.23, 2001.44, 3, 4.82, 416.30, 3, 0.55, 2104.54, 3, 3.24, 1062.56, 3, 0.03, 1898.35, 3, 1.24, 2221.86, 3, 2.40, 227.53, 2, 0.07, 750.10, 2, 4.28, 963.40, 2, 1.95, 824.74, 2, 6.19, 1994.33, 2, 1.72, 628.85, 2, 5.33, 1891.24, 2, 1.05, 1781.03, 2, 3.33, 1699.28, 2, 4.62, 423.42, 2, 0.29, 636.72, 2, 0.29, 2111.65, 2, 0.32, 295.05, 2, 3.44, 647.01, 2, 2.79, 1802.37, 2, 3.14, 611.44, 2, 1.12, 618.56, 2, 4.72, 2125.88, 2, 1.60, 2008.56, 2, 3.01, 2648.45, 2, 2.32, 440.83, 2, 5.89, 2317.84, 2, 2.42, 10.29, 2, 0.37, 1056.20, 2, 3.52, 1055.45, 2, 5.83, 422.67, 2, 5.76, 117.32, 1, 0.08, 1382.89, 1, 0.18, 2420.93, 1, 1.20, 1063.31, 1, 0.76, 2097.42, 1, 5.99, 2310.72, 1, 1.59, 380.13, 1, 4.20, 547.85, 1, 4.23, 934.95, 1, 3.86, 1603.30, 1, 1.35, 732.70, 1, 1.55, 2324.95, 1, 5.60, 99.91, 1, 6.18, 945.99, 1, 1.03, 81.75, 1, 0.09, 2737.32, 1, 2.54, 6283.08, 1, 1.15, 952.36, 1, 5.22, 2207.63, 1, 6.01, 511.53, 1, 3.03, 3046.60, 1, 2.71, 3370.10, 1, 6.01, 2214.74, 1, 5.00, 319.57, 1, 3.91, 10213.29, 1, 2.52, 3679.38, 1, 4.69, 5746.27, 1, 2.39, 3267.01, 1, 0.77, 5760.50, 1, 6.12, 9676.48, 1, 3.99, 337.73, 1, 2.19, 9690.71, 1, 1.12, 739.81, 1, 5.93, 2634.23, 1, 1.15, 2641.34, 1, 0.73, 1354.43, 1, 0.65, 2538.25, 1, 4.84, 860.31, 1, 4.23, 9683.59, 1, 1.20, 124.43, 1, 5.44, 107.02, 1, 0.90, 106.27, 1, 2.22, 2015.67, 1, 6.00, 501.24, 1, 5.12, 3156.81, 1, 1.24, 3803.82, 1, 2.43, 739.06, 1, 2.98, 1262.39, 1, 6.00, 1049.09, 1, 1.85, 453.42, 1, 6.19, 1987.22, 1, 5.33, 2751.55, 1, 4.92, 447.80, 1, 1.00, 462.02, 1, 4.77, 3473.20, 1, 5.61, 2524.02, 1, 5.82, 2627.11, 1, 2.43, 3686.50, 1, 3.89, 2516.91, 1, 3.55, 3178.15, 1, 3.29, 4.67, 1, 5.36, 9.56, - /*R3*/ 3519, 6.0580, 529.6910, 1073, 1.6732, 536.8045, 916, 1.413, 522.577, 342, 0.523, 1059.382, 255, 1.196, 7.114, 222, 0.952, 515.464, 90, 3.14, 0.00, 69, 2.27, 1066.50, 58, 1.41, 543.92, 58, 0.53, 639.90, 51, 5.98, 412.37, 47, 1.58, 625.67, 43, 6.12, 419.48, 37, 1.18, 14.23, 34, 1.67, 1052.27, 34, 0.85, 206.19, 31, 1.04, 1589.07, 30, 4.63, 426.60, 21, 2.50, 728.76, 15, 0.89, 199.07, 14, 0.96, 508.35, 13, 1.50, 1045.15, 12, 2.61, 735.88, 12, 3.56, 323.51, 11, 1.79, 309.28, 11, 6.28, 956.29, 10, 6.26, 103.09, 9, 3.45, 838.97, 7, 1.28, 742.99, 7, 0.92, 942.06, 7, 3.45, 831.86, 7, 1.87, 302.16, 6, 1.38, 95.98, 5, 2.83, 1596.19, 4, 1.21, 1169.59, 4, 5.99, 213.30, 4, 6.11, 405.26, 3, 2.33, 1155.36, 2, 0.35, 1272.68, 2, 1.87, 532.87, 2, 0.43, 220.41, 2, 5.97, 1162.47, 2, 1.95, 1073.61, 2, 0.09, 632.78, 2, 1.59, 2118.76, 2, 1.51, 1258.45, 2, 1.07, 21.34, 2, 2.16, 433.71, 2, 5.94, 110.21, 2, 3.17, 1148.25, 2, 2.55, 88.87, 2, 2.70, 721.65, 2, 2.26, 1361.55, 2, 1.98, 525.76, 2, 2.71, 330.62, 2, 0.44, 533.62, 2, 4.46, 853.20, 2, 0.47, 526.51, 2, 0.12, 949.18, 1, 0.67, 551.03, 1, 1.17, 1038.04, 1, 3.02, 963.40, 1, 1.16, 1574.85, 1, 2.55, 846.08, 1, 1.79, 1581.96, 1, 1.07, 227.53, 1, 2.70, 519.40, 1, 4.17, 2627.11, 1, 3.69, 824.74, 1, 4.91, 1670.83, 1, 2.93, 1368.66, 1, 0.60, 539.99, 1, 4.52, 750.10, 1, 0.94, 191.96, 1, 4.87, 611.44, 1, 0.21, 1141.13, 1, 3.23, 2125.88, 1, 2.39, 2317.84, 1, 2.25, 2538.25, 1, 5.80, 1485.98, 1, 2.27, 1699.28, 1, 0.67, 440.83, 1, 2.48, 1265.57, 1, 5.51, 2413.82, 1, 4.41, 1382.89, 1, 6.14, 1279.79, 1, 1.93, 2634.23, 1, 2.18, 1062.56, 1, 1.96, 1677.94, 1, 2.32, 1471.75, 1, 2.05, 295.05, 1, 2.50, 2207.63, 1, 0.19, 10.29, - /*R4*/ 129, 0.084, 536.805, 113, 4.249, 529.691, 83, 3.30, 522.58, 38, 2.73, 515.46, 27, 5.69, 7.11, 18, 5.40, 1059.38, 13, 6.02, 543.92, 9, 0.77, 1066.50, 8, 5.68, 14.23, 7, 1.43, 412.37, 6, 5.12, 639.90, 5, 3.34, 625.67, 3, 3.40, 1052.27, 3, 4.16, 728.76, 3, 2.90, 426.60, 2, 6.22, 1589.07, 2, 3.12, 1045.15, 2, 1.89, 419.48, 2, 2.60, 199.07, 2, 0.00, 0.00, 2, 2.81, 206.19, 2, 1.33, 1596.19, 1, 5.16, 831.86, 1, 4.42, 956.29, 1, 5.47, 220.41, 1, 0.67, 1361.55, 1, 1.87, 1148.25, 1, 3.17, 508.35, 1, 5.79, 1169.59, 1, 1.48, 1272.68, 1, 2.42, 117.32, 1, 2.20, 942.06, 1, 5.31, 551.03, 1, 0.50, 1073.61, 1, 2.85, 191.96, 1, 3.72, 88.87, 1, 3.53, 302.16, 1, 1.84, 10.29, 1, 1.59, 3.18, 1, 3.82, 618.56, 1, 0.86, 330.62, 1, 5.26, 21.34, 1, 1.83, 647.01, 1, 0.24, 433.71, 1, 4.44, 110.21, - /*R5*/ 11, 4.75, 536.80, 4, 5.92, 522.58, 2, 5.57, 515.46, 2, 4.30, 543.92, 2, 3.69, 7.11, 2, 4.13, 1059.38, 2, 5.49, 1066.50, 1, 3.78, 14.23, 1, 4.51, 529.69}, - - //Dsat精度:J2000+-4千年 黄经0.5角秒 黄纬0.5角秒 距离5AU/10^6 - []float64{ - 100000000, //A的倍率 - 20, 806, 1406, 1946, 2177, 2282, 2333, 2537, 2726, 2867, 2963, 3008, 3026, 4091, 5063, 5789, 6260, 6452, 6536, //位置索引表 - /*L0*/ 87401354, 0.00000000, 0.00000000, 11107660, 3.96205090, 213.29909544, 1414151, 4.5858152, 7.1135470, 398379, 0.521120, 206.185548, 350769, 3.303299, 426.598191, 206816, 0.246584, 103.092774, 79271, 3.84007, 220.41264, 23990, 4.66977, 110.20632, 16574, 0.43719, 419.48464, 15820, 0.93809, 632.78374, 15054, 2.71670, 639.89729, 14907, 5.76903, 316.39187, 14610, 1.56519, 3.93215, 13160, 4.44891, 14.22709, 13005, 5.98119, 11.04570, 10725, 3.12940, 202.25340, 6126, 1.7633, 277.0350, 5863, 0.2366, 529.6910, 5228, 4.2078, 3.1814, 5020, 3.1779, 433.7117, 4593, 0.6198, 199.0720, 4006, 2.2448, 63.7359, 3874, 3.2228, 138.5175, 3269, 0.7749, 949.1756, 2954, 0.9828, 95.9792, 2461, 2.0316, 735.8765, 1758, 3.2658, 522.5774, 1640, 5.5050, 846.0828, 1581, 4.3727, 309.2783, 1391, 4.0233, 323.5054, 1124, 2.8373, 415.5525, 1087, 4.1834, 2.4477, 1017, 3.7170, 227.5262, 957, 0.507, 1265.567, 853, 3.421, 175.166, 849, 3.191, 209.367, 789, 5.007, 0.963, 749, 2.144, 853.196, 744, 5.253, 224.345, 687, 1.747, 1052.268, 654, 1.599, 0.048, 634, 2.299, 412.371, 625, 0.970, 210.118, 580, 3.093, 74.782, 546, 2.127, 350.332, 543, 1.518, 9.561, 530, 4.449, 117.320, 478, 2.965, 137.033, 474, 5.475, 742.990, 452, 1.044, 490.334, 449, 1.290, 127.472, 372, 2.278, 217.231, 355, 3.013, 838.969, 347, 1.539, 340.771, 343, 0.246, 0.521, 330, 0.247, 1581.959, 322, 0.961, 203.738, 322, 2.572, 647.011, 309, 3.495, 216.480, 287, 2.370, 351.817, 278, 0.400, 211.815, 249, 1.470, 1368.660, 227, 4.910, 12.530, 220, 4.204, 200.769, 209, 1.345, 625.670, 208, 0.483, 1162.475, 208, 1.283, 39.357, 205, 6.011, 265.989, 185, 3.503, 149.563, 184, 0.973, 4.193, 182, 5.491, 2.921, 174, 1.863, 0.751, 165, 0.440, 5.417, 149, 5.736, 52.690, 148, 1.535, 5.629, 146, 6.231, 195.140, 140, 4.295, 21.341, 131, 4.068, 10.295, 125, 6.277, 1898.351, 122, 1.976, 4.666, 118, 5.341, 554.070, 117, 2.679, 1155.361, 114, 5.594, 1059.382, 112, 1.105, 191.208, 110, 0.166, 1.484, 109, 3.438, 536.805, 107, 4.012, 956.289, 104, 2.192, 88.866, 103, 1.197, 1685.052, 101, 4.965, 269.921, 97, 4.54, 302.16, 96, 2.83, 275.55, 91, 1.88, 38.13, 90, 5.80, 114.14, 89, 3.86, 278.52, 84, 5.49, 0.11, 83, 2.29, 628.85, 82, 3.05, 440.83, 79, 4.45, 35.42, 76, 1.61, 284.15, 75, 2.18, 728.76, 74, 5.09, 1375.77, 72, 5.11, 65.22, 70, 4.87, 0.21, 70, 3.71, 14.98, 69, 3.44, 515.46, 68, 0.73, 1478.87, 67, 0.03, 70.85, 66, 2.02, 142.45, 64, 3.32, 62.25, 63, 3.49, 479.29, 63, 2.59, 422.67, 61, 1.50, 210.85, 61, 2.69, 388.47, 55, 0.97, 942.06, 54, 2.46, 22.09, 54, 0.78, 191.96, 53, 3.18, 8.08, 53, 5.51, 0.26, 51, 4.27, 99.16, 50, 6.03, 2214.74, 49, 2.39, 1471.75, 47, 2.03, 312.20, 47, 4.60, 437.64, 46, 0.54, 212.34, 45, 0.93, 2001.44, 45, 1.12, 6.15, 44, 3.93, 525.50, 43, 2.53, 288.08, 43, 1.37, 563.63, 43, 3.82, 330.62, 42, 1.90, 430.53, 40, 5.71, 408.44, 40, 1.63, 1066.50, 38, 0.31, 423.42, 38, 1.20, 2.71, 38, 3.70, 1272.68, 38, 4.52, 24.38, 36, 6.01, 18.16, 36, 0.85, 213.35, 36, 3.93, 213.25, 35, 4.19, 215.75, 35, 4.46, 214.26, 35, 1.02, 203.00, 33, 0.54, 107.02, 33, 0.66, 692.59, 33, 0.81, 1795.26, 32, 5.22, 92.05, 32, 5.59, 6069.78, 32, 1.69, 0.16, 32, 5.50, 56.62, 31, 0.37, 703.63, 31, 6.14, 417.04, 30, 0.72, 222.86, 30, 5.30, 33.94, 29, 0.15, 131.40, 29, 1.20, 404.51, 28, 5.64, 128.96, 28, 1.46, 7.16, 27, 6.23, 1.27, 27, 1.90, 1045.15, 27, 0.07, 205.22, 27, 4.57, 7.07, 26, 5.41, 140.00, 26, 4.36, 32.24, 24, 3.09, 145.63, 24, 3.94, 414.07, 24, 2.54, 76.27, 23, 3.97, 483.22, 23, 2.10, 1788.14, 23, 3.20, 208.63, 23, 3.66, 207.67, 23, 6.10, 177.87, 23, 5.24, 212.78, 22, 5.92, 173.94, 21, 0.72, 1258.45, 21, 5.79, 2531.13, 21, 2.02, 860.31, 21, 0.67, 2317.84, 21, 5.22, 6.59, 20, 2.82, 429.78, 20, 5.07, 617.81, 19, 1.64, 565.12, 19, 5.94, 425.11, 19, 5.78, 213.82, 18, 0.73, 9999.99, 18, 5.23, 73.30, 18, 6.11, 210.38, 18, 3.14, 831.86, 17, 0.24, 134.59, 17, 0.72, 2111.65, 17, 3.28, 98.90, 16, 3.97, 355.75, 16, 3.10, 106.27, 15, 3.29, 1589.07, 15, 3.25, 78.71, 15, 5.19, 305.35, 15, 2.75, 1.22, 14, 3.88, 54.17, 14, 4.52, 59.80, 14, 1.72, 69.15, 14, 6.18, 245.54, 14, 2.37, 125.99, 14, 2.55, 405.26, 14, 2.54, 1.70, 14, 3.59, 234.64, 13, 0.83, 99.91, 13, 4.17, 225.83, 13, 6.01, 214.78, 13, 4.69, 767.37, 13, 5.31, 344.70, 12, 2.12, 28.31, 12, 3.60, 124.43, 12, 1.62, 1361.55, 12, 4.07, 280.97, 12, 4.00, 267.47, 12, 0.12, 7.63, 12, 2.79, 362.86, 11, 5.51, 192.69, 11, 1.82, 2104.54, 11, 2.62, 7.86, 11, 2.61, 339.29, 11, 5.51, 199.28, 11, 3.58, 1.44, 11, 0.19, 217.49, 11, 2.37, 831.10, 10, 2.84, 85.83, 10, 1.69, 31.02, 10, 4.72, 216.22, 10, 0.22, 198.32, 10, 0.22, 144.15, 10, 3.61, 14.01, 10, 3.94, 207.88, 10, 4.02, 207.15, 10, 0.42, 2634.23, 10, 1.61, 0.89, 10, 3.67, 212.55, 10, 3.34, 223.59, 10, 0.64, 218.93, 9, 0.72, 347.88, 9, 4.26, 20.61, 9, 5.40, 342.26, 9, 4.28, 312.46, 9, 5.08, 241.61, 9, 4.25, 46.47, 9, 1.65, 210.33, 9, 0.91, 497.45, 9, 5.81, 329.73, 9, 4.23, 6.36, 9, 0.57, 2428.04, 9, 5.36, 343.22, 9, 5.55, 2847.53, 9, 4.48, 1692.17, 9, 0.49, 1574.85, 8, 4.06, 237.68, 8, 0.81, 264.50, 8, 4.71, 333.66, 8, 2.73, 4.14, 8, 3.82, 380.13, 8, 5.54, 116.43, 8, 5.63, 518.65, 8, 5.44, 621.74, - /*L1*/ 21354295596, 0.00000000000, 0.00000000000, 1296855, 1.8282054, 213.2990954, 564348, 2.885001, 7.113547, 107679, 2.277699, 206.185548, 98323, 1.08070, 426.59819, 40255, 2.04128, 220.41264, 19942, 1.27955, 103.09277, 10512, 2.74880, 14.22709, 6939, 0.4049, 639.8973, 4803, 2.4419, 419.4846, 4056, 2.9217, 110.2063, 3769, 3.6497, 3.9322, 3385, 2.4169, 3.1814, 3302, 1.2626, 433.7117, 3071, 2.3274, 199.0720, 1953, 3.5639, 11.0457, 1249, 2.6280, 95.9792, 922, 1.961, 227.526, 706, 4.417, 529.691, 650, 6.174, 202.253, 628, 6.111, 309.278, 487, 6.040, 853.196, 479, 4.988, 522.577, 468, 4.617, 63.736, 417, 2.117, 323.505, 408, 1.299, 209.367, 352, 2.317, 632.784, 344, 3.959, 412.371, 340, 3.634, 316.392, 336, 3.772, 735.877, 332, 2.861, 210.118, 289, 2.733, 117.320, 281, 5.744, 2.448, 266, 0.543, 647.011, 230, 1.644, 216.480, 192, 2.965, 224.345, 173, 4.077, 846.083, 167, 2.597, 21.341, 136, 2.286, 10.295, 131, 3.441, 742.990, 128, 4.095, 217.231, 109, 6.161, 415.552, 98, 4.73, 838.97, 94, 3.48, 1052.27, 92, 3.95, 88.87, 87, 1.22, 440.83, 83, 3.11, 625.67, 78, 6.24, 302.16, 67, 0.29, 4.67, 66, 5.65, 9.56, 62, 4.29, 127.47, 62, 1.83, 195.14, 58, 2.48, 191.96, 57, 5.02, 137.03, 55, 0.28, 74.78, 54, 5.13, 490.33, 51, 1.46, 536.80, 47, 1.18, 149.56, 47, 5.15, 515.46, 46, 2.23, 956.29, 44, 2.71, 5.42, 40, 0.41, 269.92, 40, 3.89, 728.76, 38, 0.65, 422.67, 38, 2.53, 12.53, 37, 3.78, 2.92, 35, 6.08, 5.63, 34, 3.21, 1368.66, 33, 4.64, 277.03, 33, 5.43, 1066.50, 33, 0.30, 351.82, 32, 4.39, 1155.36, 31, 2.43, 52.69, 30, 2.84, 203.00, 30, 6.19, 284.15, 30, 3.39, 1059.38, 29, 2.03, 330.62, 28, 2.74, 265.99, 26, 4.51, 340.77, 23, 4.14, 191.21, 23, 5.89, 210.85, 22, 1.96, 203.74, 22, 5.14, 4.19, 22, 2.68, 942.06, 21, 6.16, 860.31, 20, 2.31, 437.64, 19, 4.77, 70.85, 19, 4.10, 18.16, 18, 0.90, 429.78, 18, 1.85, 234.64, 18, 2.45, 423.42, 17, 5.97, 628.85, 16, 4.06, 949.18, 16, 1.94, 1272.68, 16, 1.06, 56.62, 16, 5.59, 6.15, 15, 4.24, 1162.47, 15, 0.74, 200.77, 15, 5.77, 22.09, 15, 3.60, 1045.15, 14, 2.94, 1685.05, 14, 1.44, 408.44, 14, 4.10, 1471.75, 13, 6.25, 38.13, 13, 5.76, 138.52, 13, 4.25, 405.26, 12, 4.85, 831.86, 12, 1.86, 131.40, 12, 1.81, 124.43, 11, 1.55, 223.59, 11, 5.37, 215.75, 10, 3.47, 1375.77, 10, 6.08, 32.24, 10, 2.38, 107.02, 10, 3.95, 430.53, 10, 2.55, 99.91, 10, 1.39, 145.63, 9, 5.81, 7.16, 9, 3.65, 142.45, 9, 4.95, 208.63, 9, 1.24, 106.27, 9, 0.08, 288.08, 8, 4.42, 703.63, 8, 5.64, 62.25, 8, 2.42, 1258.45, 8, 6.22, 14.98, 8, 0.53, 654.12, 8, 3.75, 312.20, 7, 4.85, 222.86, 7, 0.28, 0.75, 7, 0.53, 388.47, 7, 2.05, 99.16, 7, 0.24, 8.08, 7, 5.83, 483.22, 7, 3.49, 35.42, 6, 2.89, 114.14, 6, 3.33, 1361.55, 6, 3.81, 1788.14, 6, 0.55, 65.22, 6, 1.63, 1589.07, 6, 2.68, 2001.44, 6, 0.89, 92.05, 6, 4.39, 81.75, 5, 5.48, 563.63, 5, 4.58, 134.59, 5, 2.12, 214.26, 5, 4.68, 212.34, 5, 3.34, 1.48, 5, 5.77, 565.12, 5, 2.20, 207.88, 5, 4.20, 404.51, 5, 0.42, 76.27, 5, 3.78, 1265.57, 5, 0.46, 362.86, 5, 4.53, 1148.25, 5, 4.59, 554.07, 5, 5.80, 217.96, 5, 3.25, 231.46, 5, 5.38, 497.45, 4, 0.11, 295.05, 4, 1.80, 213.25, 4, 5.00, 213.35, 4, 4.88, 98.90, 4, 0.59, 750.10, 4, 0.99, 24.38, 4, 0.82, 344.70, 4, 0.81, 343.22, 4, 5.13, 218.93, 4, 1.61, 245.54, 4, 0.35, 333.66, 3, 5.30, 350.33, 3, 1.85, 225.83, 3, 2.20, 1574.85, 3, 5.31, 347.88, 3, 0.21, 635.97, 3, 2.88, 216.22, 3, 1.72, 1169.59, 3, 1.92, 17.41, 3, 3.04, 1677.94, 3, 4.31, 6062.66, 3, 1.34, 543.92, 3, 0.25, 120.36, 3, 3.36, 7.86, 3, 2.53, 1692.17, 3, 2.49, 46.47, 3, 3.53, 2104.54, 3, 4.87, 144.15, 3, 5.73, 9992.87, 3, 3.73, 6076.89, 3, 0.24, 357.45, 3, 2.43, 2317.84, 3, 5.76, 618.56, 3, 5.15, 10007.10, 3, 0.72, 85.83, 3, 3.43, 31.02, 3, 3.80, 17.27, 3, 1.63, 182.28, 3, 0.92, 479.29, 3, 4.52, 198.32, 3, 2.11, 168.05, - /*L2*/ 116441, 1.179879, 7.113547, 91921, 0.07425, 213.29910, 90592, 0.00000, 0.00000, 15277, 4.06492, 206.18555, 10631, 0.25778, 220.41264, 10605, 5.40964, 426.59819, 4265, 1.0460, 14.2271, 1216, 2.9186, 103.0928, 1165, 4.6094, 639.8973, 1082, 5.6913, 433.7117, 1045, 4.0421, 199.0720, 1020, 0.6337, 3.1814, 634, 4.388, 419.485, 549, 5.573, 3.932, 457, 1.268, 110.206, 425, 0.209, 227.526, 274, 4.288, 95.979, 162, 1.381, 11.046, 129, 1.566, 309.278, 117, 3.881, 853.196, 105, 4.900, 647.011, 101, 0.893, 21.341, 96, 2.91, 316.39, 95, 5.63, 412.37, 85, 5.73, 209.37, 83, 6.05, 216.48, 82, 1.02, 117.32, 75, 4.76, 210.12, 67, 0.46, 522.58, 66, 0.48, 10.29, 64, 0.35, 323.51, 61, 4.88, 632.78, 53, 2.75, 529.69, 46, 5.69, 440.83, 45, 1.67, 202.25, 42, 5.71, 88.87, 32, 0.07, 63.74, 32, 1.67, 302.16, 31, 4.16, 191.96, 27, 0.83, 224.34, 25, 5.66, 735.88, 20, 5.94, 217.23, 18, 4.90, 625.67, 17, 1.63, 742.99, 16, 0.58, 515.46, 14, 0.21, 838.97, 14, 3.76, 195.14, 12, 4.72, 203.00, 12, 0.13, 234.64, 12, 3.12, 846.08, 11, 5.92, 536.80, 11, 5.60, 728.76, 11, 3.20, 1066.50, 10, 4.99, 422.67, 10, 0.26, 330.62, 10, 4.15, 860.31, 9, 0.46, 956.29, 8, 2.14, 269.92, 8, 5.25, 429.78, 8, 4.03, 9.56, 7, 5.40, 1052.27, 6, 4.46, 284.15, 6, 5.93, 405.26, 6, 5.41, 149.56, 6, 4.29, 415.55, 6, 0.02, 124.43, 6, 6.02, 223.59, 6, 0.30, 127.47, 5, 5.54, 949.18, 5, 3.20, 277.03, 5, 4.93, 654.12, 5, 2.27, 18.16, 5, 6.14, 1155.36, 5, 4.41, 942.06, 4, 2.89, 56.62, 4, 4.69, 74.78, 4, 5.31, 1045.15, 4, 0.29, 831.86, 4, 0.37, 12.53, 4, 6.10, 81.75, 4, 3.30, 490.33, 4, 4.93, 52.69, 4, 0.41, 137.03, 4, 0.15, 437.64, 4, 0.20, 1272.68, 3, 4.77, 423.42, 3, 4.29, 99.91, 3, 1.57, 1059.38, 3, 3.13, 70.85, 3, 0.33, 191.21, 3, 3.38, 408.44, 3, 1.88, 295.05, 3, 5.15, 1368.66, 3, 3.59, 131.40, 3, 5.12, 265.99, 2, 1.59, 32.24, 2, 3.90, 210.85, 2, 5.83, 106.27, 2, 4.77, 351.82, 2, 3.14, 22.09, 2, 5.98, 6062.66, 2, 2.06, 6076.89, 2, 5.95, 145.63, 2, 5.23, 1265.57, 2, 1.12, 9992.87, 2, 3.48, 10007.10, 2, 5.87, 1471.75, 2, 4.52, 138.52, 2, 4.15, 1258.45, 2, 5.05, 1361.55, 2, 4.14, 107.02, 2, 1.36, 231.46, 2, 6.24, 1148.25, 2, 3.75, 628.85, 2, 5.62, 447.94, 2, 5.97, 430.53, 1, 0.48, 340.77, 1, 0.85, 6069.78, 1, 2.91, 215.75, 1, 0.71, 28.45, 1, 2.28, 9999.99, 1, 5.84, 543.92, 1, 6.24, 1589.07, 1, 2.83, 200.77, 1, 3.52, 497.45, 1, 0.72, 508.35, 1, 2.61, 1279.79, 1, 4.96, 1685.05, 1, 1.20, 618.56, 1, 4.53, 635.97, 1, 1.09, 184.84, 1, 2.41, 703.63, 1, 3.40, 1073.61, 1, 4.91, 750.10, 1, 1.39, 483.22, 1, 1.59, 1375.77, 1, 2.66, 134.59, 1, 4.21, 288.08, 1, 4.68, 362.86, 1, 2.43, 222.86, 1, 4.52, 38.13, 1, 5.01, 1581.96, 1, 5.59, 1788.14, 1, 0.77, 113.39, 1, 4.80, 1677.94, 1, 2.22, 333.66, 1, 5.95, 1464.64, 1, 4.49, 643.08, 1, 5.82, 416.30, 1, 2.51, 343.22, 1, 3.97, 1574.85, 1, 4.84, 76.27, 1, 6.00, 337.73, 1, 2.28, 1162.47, 1, 2.35, 120.36, 1, 3.67, 347.88, 1, 0.01, 1169.59, 1, 0.21, 99.16, 1, 2.89, 92.05, 1, 5.63, 17.27, 1, 3.76, 203.74, 1, 5.75, 721.65, 1, 3.78, 217.96, 1, 0.68, 46.47, 1, 4.86, 357.45, 1, 5.27, 436.89, 1, 3.27, 208.63, 1, 3.88, 565.12, 1, 5.99, 1905.46, 1, 3.69, 350.33, 1, 4.96, 358.93, 1, 0.31, 98.90, 1, 1.22, 62.25, 1, 0.87, 1692.17, 1, 6.17, 182.28, 1, 2.59, 313.21, 1, 1.54, 195.89, 1, 5.42, 312.20, 1, 4.71, 2001.44, 1, 3.81, 168.05, - /*L3*/ 16039, 5.73945, 7.11355, 4250, 4.5854, 213.2991, 1907, 4.7608, 220.4126, 1466, 5.9133, 206.1855, 1162, 5.6197, 14.2271, 1067, 3.6082, 426.5982, 239, 3.861, 433.712, 237, 5.768, 199.072, 166, 5.116, 3.181, 151, 2.736, 639.897, 131, 4.743, 227.526, 63, 0.23, 419.48, 62, 4.74, 103.09, 40, 5.47, 21.34, 40, 5.96, 95.98, 39, 5.83, 110.21, 28, 3.01, 647.01, 25, 0.99, 3.93, 19, 1.92, 853.20, 18, 4.97, 10.29, 18, 1.03, 412.37, 18, 4.20, 216.48, 18, 3.32, 309.28, 16, 3.90, 440.83, 16, 5.62, 117.32, 13, 1.18, 88.87, 11, 5.58, 11.05, 11, 5.93, 191.96, 10, 3.95, 209.37, 9, 3.39, 302.16, 8, 4.88, 323.51, 7, 0.38, 632.78, 6, 2.25, 522.58, 6, 1.06, 210.12, 5, 4.64, 234.64, 4, 3.14, 0.00, 4, 2.31, 515.46, 3, 2.20, 860.31, 3, 0.59, 529.69, 3, 4.93, 224.34, 3, 0.42, 625.67, 2, 4.77, 330.62, 2, 3.35, 429.78, 2, 3.20, 202.25, 2, 1.19, 1066.50, 2, 1.35, 405.26, 2, 4.16, 223.59, 2, 3.07, 654.12, 2, 1.03, 728.76, 2, 4.40, 124.43, 2, 3.09, 422.67, 2, 4.15, 536.80, 2, 5.83, 195.14, 2, 6.04, 742.99, 1, 0.38, 316.39, 1, 1.58, 81.75, 1, 2.11, 838.97, 1, 1.38, 735.88, 1, 2.33, 217.23, 1, 5.02, 956.29, 1, 1.66, 63.74, 1, 3.88, 269.92, 1, 3.73, 295.05, 1, 2.76, 284.15, 1, 3.31, 18.16, 1, 2.02, 831.86, 1, 0.71, 846.08, 1, 3.84, 447.94, 1, 4.71, 56.62, 1, 0.80, 1045.15, 1, 2.41, 203.00, 1, 4.27, 437.64, 1, 1.65, 423.42, 1, 6.18, 942.06, 1, 2.86, 184.84, 1, 6.26, 1059.38, 1, 3.43, 149.56, - /*L4*/ 1662, 3.9983, 7.1135, 257, 2.984, 220.413, 236, 3.902, 14.227, 149, 2.741, 213.299, 114, 3.142, 0.000, 110, 1.515, 206.186, 68, 1.72, 426.60, 40, 2.05, 433.71, 38, 1.24, 199.07, 31, 3.01, 227.53, 15, 0.83, 639.90, 9, 3.71, 21.34, 6, 2.42, 419.48, 6, 1.16, 647.01, 4, 1.45, 95.98, 4, 2.12, 440.83, 3, 4.09, 110.21, 3, 2.77, 412.37, 3, 3.01, 88.87, 3, 0.00, 853.20, 3, 0.39, 103.09, 2, 3.78, 117.32, 2, 2.83, 234.64, 2, 5.08, 309.28, 2, 2.24, 216.48, 2, 5.19, 302.16, 1, 1.55, 191.96, 1, 3.45, 323.51, 1, 4.83, 210.12, 1, 2.29, 209.37, 1, 0.30, 860.31, 1, 2.38, 632.78, 1, 4.03, 522.58, 1, 4.19, 515.46, 1, 2.17, 124.43, - /*L5*/ 124, 2.259, 7.114, 34, 2.16, 14.23, 28, 1.20, 220.41, 6, 1.22, 227.53, 5, 0.24, 433.71, 4, 6.23, 426.60, 3, 2.97, 199.07, 3, 4.29, 206.19, 2, 6.25, 213.30, 1, 5.28, 639.90, 1, 0.24, 440.83, 1, 3.14, 0.00, 1, 5.57, 647.01, 1, 0.69, 302.16, 1, 6.18, 191.96, 1, 4.88, 88.87, 1, 4.78, 419.48, - /*B0*/ 4330678, 3.6028443, 213.2990954, 240348, 2.852385, 426.598191, 84746, 0.00000, 0.00000, 34116, 0.57297, 206.18555, 30863, 3.48442, 220.41264, 14734, 2.11847, 639.89729, 9917, 5.7900, 419.4846, 6994, 4.7360, 7.1135, 4808, 5.4331, 316.3919, 4788, 4.9651, 110.2063, 3432, 2.7326, 433.7117, 1506, 6.0130, 103.0928, 1060, 5.6310, 529.6910, 969, 5.204, 632.784, 942, 1.396, 853.196, 708, 3.803, 323.505, 552, 5.131, 202.253, 400, 3.359, 227.526, 319, 3.626, 209.367, 316, 1.997, 647.011, 314, 0.465, 217.231, 284, 4.886, 224.345, 236, 2.139, 11.046, 215, 5.950, 846.083, 209, 2.120, 415.552, 207, 0.730, 199.072, 179, 2.954, 63.736, 141, 0.644, 490.334, 139, 4.595, 14.227, 139, 1.998, 735.877, 135, 5.245, 742.990, 122, 3.115, 522.577, 116, 3.109, 216.480, 114, 0.963, 210.118, 96, 4.48, 117.32, 81, 1.32, 277.03, 74, 2.89, 149.56, 73, 3.06, 536.80, 69, 4.92, 309.28, 68, 2.18, 351.82, 62, 0.68, 1066.50, 57, 2.61, 440.83, 49, 5.79, 95.98, 48, 2.18, 74.78, 38, 5.29, 1059.38, 37, 6.28, 1162.47, 36, 1.63, 628.85, 35, 1.71, 1052.27, 34, 5.98, 412.37, 34, 2.46, 422.67, 34, 1.14, 949.18, 32, 4.15, 437.64, 27, 1.27, 860.31, 24, 3.07, 215.75, 24, 4.11, 3.93, 24, 2.75, 838.97, 23, 0.99, 210.85, 21, 0.14, 430.53, 21, 3.51, 330.62, 20, 2.82, 127.47, 19, 2.98, 137.03, 19, 6.27, 423.42, 18, 2.29, 388.47, 18, 6.20, 703.63, 17, 3.90, 214.26, 17, 0.17, 212.34, 17, 1.67, 38.13, 16, 4.55, 956.29, - /*B1*/ 397555, 5.332900, 213.299095, 49479, 3.14159, 0.00000, 18572, 6.09919, 426.59819, 14801, 2.30586, 206.18555, 9644, 1.6967, 220.4126, 3757, 1.2543, 419.4846, 2717, 5.9117, 639.8973, 1455, 0.8516, 433.7117, 1291, 2.9177, 7.1135, 853, 0.436, 316.392, 298, 0.919, 632.784, 292, 5.316, 853.196, 284, 1.619, 227.526, 275, 3.889, 103.093, 172, 0.052, 647.011, 166, 2.444, 199.072, 158, 5.209, 110.206, 128, 1.207, 529.691, 110, 2.457, 217.231, 82, 2.76, 210.12, 81, 2.86, 14.23, 69, 1.66, 202.25, 65, 1.26, 216.48, 61, 1.25, 209.37, 59, 1.82, 323.51, 46, 0.82, 440.83, 36, 1.82, 224.34, 34, 2.84, 117.32, 33, 1.31, 412.37, 32, 1.19, 846.08, 27, 4.65, 1066.50, 27, 4.44, 11.05, 23, 4.13, 415.55, 21, 1.41, 309.28, 18, 5.56, 860.31, 15, 1.22, 63.74, 15, 1.34, 95.98, 15, 1.01, 536.80, 13, 2.46, 490.33, 13, 3.22, 277.03, 13, 2.27, 742.99, 13, 4.89, 522.58, 13, 0.30, 422.67, 12, 1.87, 423.42, 10, 3.12, 625.67, 10, 1.75, 330.62, 9, 0.46, 429.78, 8, 4.68, 215.75, 8, 2.42, 430.53, 7, 5.97, 149.56, 7, 1.52, 437.64, 7, 3.91, 351.82, 7, 3.01, 949.18, 6, 1.49, 234.64, 6, 0.02, 654.12, 6, 5.37, 735.88, 5, 3.81, 74.78, 5, 4.34, 628.85, 4, 5.64, 210.85, 4, 2.64, 3.18, 4, 1.73, 1059.38, 4, 4.99, 3.93, 4, 1.16, 223.59, - /*B2*/ 20630, 0.50482, 213.29910, 3720, 3.9983, 206.1855, 1627, 6.1819, 220.4126, 1346, 0.0000, 0.0000, 706, 3.039, 419.485, 365, 5.099, 426.598, 330, 5.279, 433.712, 219, 3.828, 639.897, 139, 1.043, 7.114, 104, 6.157, 227.526, 93, 1.98, 316.39, 71, 4.15, 199.07, 52, 2.88, 632.78, 49, 4.43, 647.01, 41, 3.16, 853.20, 29, 4.53, 210.12, 24, 1.12, 14.23, 21, 4.35, 217.23, 20, 5.31, 440.83, 18, 0.85, 110.21, 17, 5.68, 216.48, 16, 4.26, 103.09, 14, 3.00, 412.37, 12, 2.53, 529.69, 8, 3.32, 202.25, 7, 5.56, 209.37, 7, 0.29, 323.51, 6, 1.16, 117.32, 6, 3.61, 860.31, 6, 3.58, 309.28, 6, 2.48, 1066.50, 4, 3.02, 846.08, 4, 4.80, 625.67, 3, 3.77, 423.42, 3, 6.04, 234.64, 3, 4.82, 429.78, 3, 4.48, 654.12, 3, 3.29, 95.98, 3, 5.64, 735.88, 3, 0.22, 522.58, 2, 0.03, 415.55, 2, 6.25, 330.62, 2, 4.56, 422.67, 2, 5.06, 277.03, 2, 5.53, 536.80, 2, 5.54, 224.34, 2, 5.60, 223.59, - /*B3*/ 666, 1.990, 213.299, 632, 5.698, 206.186, 398, 0.000, 0.000, 188, 4.338, 220.413, 92, 4.84, 419.48, 52, 3.42, 433.71, 42, 2.38, 426.60, 26, 4.40, 227.53, 21, 5.85, 199.07, 18, 1.99, 639.90, 11, 5.37, 7.11, 10, 2.55, 647.01, 7, 3.46, 316.39, 6, 4.80, 632.78, 6, 0.02, 210.12, 6, 3.52, 440.83, 5, 5.64, 14.23, 5, 1.22, 853.20, 4, 4.71, 412.37, 3, 0.63, 103.09, 2, 3.72, 216.48, 2, 6.11, 217.23, 1, 1.69, 860.31, 1, 4.31, 234.64, 1, 5.75, 309.28, 1, 2.66, 654.12, 1, 5.69, 117.32, 1, 5.48, 202.25, 1, 0.60, 1066.50, 1, 0.22, 625.67, 1, 2.86, 429.78, 1, 4.52, 323.51, - /*B4*/ 80, 1.12, 206.19, 32, 3.12, 213.30, 17, 2.48, 220.41, 12, 3.14, 0.00, 9, 0.38, 419.48, 6, 1.56, 433.71, 5, 2.63, 227.53, 5, 1.28, 199.07, 1, 1.43, 426.60, 1, 0.67, 647.01, 1, 1.72, 440.83, 1, 6.18, 639.90, 1, 3.85, 14.23, 1, 3.49, 7.11, 1, 0.31, 412.37, - /*B5*/ 8, 2.82, 206.19, 1, 0.51, 220.41, 1, 3.14, 0.00, 1, 2.99, 199.07, 1, 0.78, 227.53, 1, 5.96, 433.71, - /*R0*/ 955758136, 0.000000000, 0.000000000, 52921382, 2.39226220, 213.29909544, 1873680, 5.2354961, 206.1855484, 1464664, 1.6476305, 426.5981909, 821891, 5.935200, 316.391870, 547507, 5.015326, 103.092774, 371684, 2.271148, 220.412642, 361778, 3.139043, 7.113547, 140618, 5.704067, 632.783739, 108975, 3.293136, 110.206321, 69007, 5.94100, 419.48464, 61053, 0.94038, 639.89729, 48913, 1.55733, 202.25340, 34144, 0.19519, 277.03499, 32402, 5.47085, 949.17561, 20937, 0.46349, 735.87651, 20839, 1.52103, 433.71174, 20747, 5.33256, 199.07200, 15298, 3.05944, 529.69097, 14296, 2.60434, 323.50542, 12884, 1.64892, 138.51750, 11993, 5.98051, 846.08283, 11380, 1.73106, 522.57742, 9796, 5.2048, 1265.5675, 7753, 5.8519, 95.9792, 6771, 3.0043, 14.2271, 6466, 0.1773, 1052.2684, 5850, 1.4552, 415.5525, 5307, 0.5974, 63.7359, 4696, 2.1492, 227.5262, 4044, 1.6401, 209.3669, 3688, 0.7802, 412.3711, 3461, 1.8509, 175.1661, 3420, 4.9455, 1581.9593, 3401, 0.5539, 350.3321, 3376, 3.6953, 224.3448, 2976, 5.6847, 210.1177, 2885, 1.3876, 838.9693, 2881, 0.1796, 853.1964, 2508, 3.5385, 742.9901, 2448, 6.1841, 1368.6603, 2406, 2.9656, 117.3199, 2174, 0.0151, 340.7709, 2024, 5.0541, 11.0457, 1888, 0.0297, 3.9322, 1861, 5.9336, 625.6702, 1817, 5.7771, 490.3341, 1781, 0.7631, 217.2312, 1740, 2.3466, 309.2783, 1611, 1.1730, 74.7816, 1475, 5.6767, 203.7379, 1472, 1.4006, 137.0330, 1463, 1.9259, 216.4805, 1395, 5.9367, 127.4718, 1315, 5.1120, 211.8146, 1304, 0.7724, 647.0108, 1296, 4.6918, 1898.3512, 1277, 2.9841, 1059.3819, 1207, 0.7529, 351.8166, 1150, 5.7402, 1162.4747, 1127, 4.4671, 265.9893, 1099, 1.8177, 149.5632, 1071, 1.1357, 1155.3612, 1021, 5.9123, 1685.0521, 998, 2.631, 200.769, 986, 2.260, 956.289, 932, 3.670, 554.070, 664, 0.603, 728.763, 660, 4.666, 195.140, 626, 5.942, 1478.867, 618, 5.621, 942.062, 553, 3.411, 269.921, 534, 1.264, 275.551, 517, 4.443, 2214.743, 494, 2.286, 278.519, 490, 5.806, 191.208, 488, 2.794, 3.181, 482, 1.841, 479.288, 473, 1.882, 515.464, 470, 0.838, 1471.753, 453, 3.003, 302.165, 452, 5.645, 2001.444, 427, 0.057, 284.149, 405, 1.640, 536.805, 386, 1.997, 1272.681, 343, 5.856, 1795.258, 341, 2.376, 525.498, 341, 0.891, 628.852, 340, 1.402, 440.825, 303, 0.879, 6069.777, 295, 0.671, 88.866, 294, 0.426, 312.199, 292, 6.214, 210.851, 288, 1.122, 422.666, 277, 5.319, 692.587, 276, 0.478, 38.133, 262, 0.318, 1045.155, 243, 5.372, 1258.454, 241, 1.125, 388.465, 237, 0.908, 1375.774, 234, 4.228, 114.138, 231, 5.495, 191.958, 226, 0.375, 142.450, 225, 0.548, 1788.145, 224, 2.281, 330.619, 222, 5.946, 39.357, 219, 5.256, 212.336, 214, 4.203, 2531.135, 208, 5.381, 2317.836, 206, 0.958, 288.081, 197, 3.901, 52.690, 192, 2.959, 437.644, 188, 6.079, 563.631, 187, 6.036, 404.507, 183, 5.669, 2111.650, 180, 4.410, 408.439, 178, 0.382, 430.530, 177, 2.303, 9999.986, 175, 5.714, 1066.495, 173, 1.849, 1589.073, 172, 2.365, 213.251, 172, 5.563, 213.347, 170, 2.857, 99.161, 166, 2.637, 215.747, 165, 2.891, 214.262, 163, 3.458, 617.806, 162, 5.731, 203.004, 150, 4.407, 417.037, 146, 1.566, 831.856, 145, 5.082, 423.417, 143, 0.998, 76.266, 137, 5.439, 222.860, 132, 2.859, 312.460, 129, 2.553, 414.068, 125, 4.784, 205.222, 120, 0.043, 1361.547, 113, 5.031, 703.633, 112, 0.262, 2104.537, 110, 2.437, 355.749, 109, 1.632, 208.633, 109, 2.093, 207.670, 109, 2.855, 21.341, 107, 3.671, 212.778, 104, 3.637, 65.220, 99, 5.14, 1574.85, 98, 5.12, 2634.23, 97, 4.20, 305.35, 97, 4.84, 131.40, 97, 2.56, 1692.17, 96, 5.45, 2428.04, 95, 2.52, 2.45, 94, 2.40, 483.22, 93, 0.74, 831.10, 92, 2.95, 35.42, 91, 3.97, 2847.53, 91, 4.21, 213.82, 89, 5.39, 107.02, 89, 4.06, 128.96, 88, 3.87, 140.00, 87, 1.33, 1905.46, 86, 2.30, 85.83, 86, 4.55, 210.38, 86, 0.03, 860.31, 84, 1.18, 429.78, 84, 4.61, 177.87, 83, 1.53, 145.63, 82, 1.66, 62.25, 77, 3.15, 767.37, 74, 3.57, 1.48, 74, 3.72, 92.05, 73, 4.38, 425.11, 73, 4.63, 245.54, 72, 0.01, 565.12, 71, 0.99, 405.26, 70, 4.04, 173.94, 67, 1.08, 339.29, 67, 4.75, 70.85, 66, 2.47, 280.97, 65, 2.45, 267.47, 65, 0.09, 9.56, 64, 1.29, 1148.25, 64, 4.10, 327.44, 63, 2.02, 234.64, 63, 4.40, 214.78, 61, 5.12, 756.32, 59, 4.23, 700.66, 59, 2.62, 225.83, 58, 6.06, 1677.94, 58, 5.47, 347.88, 57, 6.27, 2420.93, 56, 2.07, 124.43, 56, 4.30, 329.73, 55, 1.60, 543.02, 55, 3.86, 342.26, 54, 3.71, 344.70, 54, 1.07, 362.86, 54, 4.98, 134.59, 53, 3.79, 343.22, 50, 5.76, 320.32, 50, 3.93, 192.69, 50, 5.21, 2744.43, 50, 3.23, 333.66, 49, 4.90, 217.49, 49, 5.33, 3127.31, 48, 3.15, 216.22, 48, 2.39, 207.88, 48, 3.93, 199.28, 47, 2.45, 207.15, 47, 2.07, 2008.56, 46, 2.09, 212.55, 46, 4.86, 2950.62, 46, 2.64, 10.29, 46, 4.97, 198.32, 45, 5.36, 218.93, 45, 1.78, 223.59, 45, 5.56, 264.50, 43, 1.84, 106.27, 43, 0.40, 357.45, 42, 0.08, 210.33, 42, 0.74, 125.99, 41, 2.47, 237.68, 41, 4.92, 1891.24, 41, 4.08, 621.74, 40, 4.01, 12.53, 39, 3.46, 241.61, 39, 3.74, 3163.92, 39, 4.40, 18.16, 38, 4.44, 160.61, 38, 2.06, 247.24, 37, 4.75, 348.85, 37, 1.69, 22.09, 36, 3.83, 56.62, 35, 3.44, 273.10, 35, 5.65, 497.45, 35, 5.96, 217.96, 35, 2.25, 487.37, 35, 5.63, 99.91, 35, 1.83, 380.13, 34, 6.01, 166.83, 34, 0.73, 750.10, 34, 5.31, 206.23, 34, 1.24, 2221.86, 34, 5.80, 251.43, 33, 2.45, 969.62, 33, 4.87, 209.11, 33, 1.07, 252.66, 33, 1.93, 98.90, 33, 2.23, 319.57, 32, 3.78, 33.94, 32, 3.58, 231.46, 32, 1.00, 1464.64, 32, 2.13, 206.14, 32, 3.82, 73.30, 31, 2.05, 282.45, 31, 1.96, 244.32, 31, 4.90, 144.15, 31, 2.27, 1169.59, 30, 3.93, 206.71, 29, 5.98, 2737.32, 29, 4.84, 905.89, 29, 2.22, 14.98, 29, 6.03, 188.92, 29, 5.80, 1994.33, 29, 0.04, 5.63, 29, 0.76, 488.85, 29, 1.69, 78.71, 28, 4.73, 552.59, 28, 2.72, 32.24, 28, 0.79, 546.96, 28, 5.18, 5.42, 28, 1.45, 258.88, 28, 6.12, 214.05, 27, 2.45, 254.94, 27, 3.58, 561.18, 27, 0.25, 313.21, 27, 4.26, 179.36, 27, 5.20, 148.08, 27, 5.54, 555.55, 27, 2.86, 24.38, 26, 1.59, 491.82, 26, 0.65, 654.12, 26, 2.10, 248.72, 26, 1.62, 2324.95, 26, 3.36, 0.96, 25, 5.29, 636.72, 25, 4.97, 3060.83, 25, 5.12, 168.05, 25, 1.78, 182.28, 24, 0.01, 69.15, 24, 0.52, 894.84, 24, 3.15, 240.39, 24, 1.60, 738.80, 24, 2.55, 196.62, 23, 3.51, 458.84, 22, 3.25, 681.54, 22, 4.76, 213.19, 22, 3.17, 213.41, 22, 0.88, 635.97, 22, 4.61, 3267.01, 21, 3.86, 116.43, 21, 0.63, 189.72, 21, 1.67, 274.07, 21, 1.07, 494.27, 20, 6.05, 173.68, 20, 1.84, 533.62, 20, 2.95, 59.80, 20, 2.91, 120.36, 20, 4.94, 121.25, 20, 5.59, 4.19, 20, 0.08, 842.15, 20, 2.52, 1485.98, 20, 2.14, 54.17, 19, 0.11, 218.72, 19, 0.55, 4.67, 19, 5.38, 213.09, 19, 2.55, 213.51, 18, 3.19, 295.05, 18, 2.71, 181.81, 18, 2.26, 672.14, 17, 2.90, 477.80, 17, 0.68, 151.05, 17, 0.71, 1781.03, 17, 4.74, 2207.63, 17, 1.63, 5856.48, 17, 3.53, 3480.31, 16, 3.26, 6283.08, 16, 5.39, 424.15, 16, 3.98, 2.92, 16, 0.91, 280.00, 16, 0.63, 358.93, 16, 0.98, 2538.25, 16, 0.60, 746.92, 16, 0.83, 176.65, 16, 4.46, 643.83, 16, 5.23, 135.55, 16, 1.19, 486.40, 16, 5.70, 3053.71, 15, 1.49, 543.92, 15, 5.53, 2310.72, 15, 2.67, 46.47, 15, 1.24, 2641.34, 15, 1.77, 569.05, 15, 2.92, 167.09, 15, 2.66, 292.01, 15, 6.06, 468.24, 15, 5.26, 472.17, 14, 0.22, 235.39, 14, 0.12, 313.68, 14, 0.38, 601.76, 14, 2.63, 618.56, 14, 0.82, 221.38, 14, 3.19, 213.56, 14, 4.73, 213.04, 14, 2.51, 1802.37, 14, 2.21, 228.28, - /*R1*/ 6182981, 0.2584352, 213.2990954, 506578, 0.711147, 206.185548, 341394, 5.796358, 426.598191, 188491, 0.472157, 220.412642, 186262, 3.141593, 0.000000, 143891, 1.407449, 7.113547, 49621, 6.01744, 103.09277, 20928, 5.09246, 639.89729, 19953, 1.17560, 419.48464, 18840, 1.60820, 110.20632, 13877, 0.75886, 199.07200, 12893, 5.94330, 433.71174, 5397, 1.2885, 14.2271, 4869, 0.8679, 323.5054, 4247, 0.3930, 227.5262, 3252, 1.2585, 95.9792, 3081, 3.4366, 522.5774, 2909, 4.6068, 202.2534, 2856, 2.1673, 735.8765, 1988, 2.4505, 412.3711, 1941, 6.0239, 209.3669, 1581, 1.2919, 210.1177, 1340, 4.3080, 853.1964, 1316, 1.2530, 117.3199, 1203, 1.8665, 316.3919, 1091, 0.0753, 216.4805, 966, 0.480, 632.784, 954, 5.152, 647.011, 898, 0.983, 529.691, 882, 1.885, 1052.268, 874, 1.402, 224.345, 785, 3.064, 838.969, 740, 1.382, 625.670, 658, 4.144, 309.278, 650, 1.725, 742.990, 613, 3.033, 63.736, 599, 2.549, 217.231, 503, 2.130, 3.932, 413, 4.593, 415.552, 395, 0.533, 956.289, 363, 4.707, 302.165, 356, 2.303, 728.763, 345, 5.888, 440.825, 336, 1.616, 1368.660, 322, 0.979, 3.181, 317, 3.584, 515.464, 294, 2.816, 11.046, 291, 2.831, 1155.361, 278, 0.260, 195.140, 265, 2.427, 88.866, 265, 5.829, 149.563, 264, 1.285, 1059.382, 246, 0.907, 191.958, 245, 1.045, 942.062, 222, 5.132, 269.921, 215, 3.565, 490.334, 195, 4.567, 846.083, 183, 2.679, 127.472, 182, 4.934, 74.782, 175, 3.446, 137.033, 170, 4.635, 284.149, 166, 5.998, 536.805, 158, 2.996, 340.771, 155, 1.197, 265.989, 153, 0.270, 1272.681, 152, 5.439, 422.666, 152, 0.529, 330.619, 141, 1.271, 203.004, 141, 2.021, 1045.155, 140, 1.353, 1685.052, 136, 5.017, 351.817, 129, 1.143, 21.341, 128, 2.539, 1471.753, 127, 3.003, 277.035, 108, 4.319, 210.851, 103, 0.382, 203.738, 100, 3.614, 1066.495, 98, 2.56, 191.21, 97, 3.26, 831.86, 96, 0.79, 1258.45, 83, 0.28, 234.64, 73, 0.63, 1375.77, 72, 4.38, 860.31, 72, 5.58, 429.78, 71, 0.73, 437.64, 70, 0.88, 423.42, 69, 2.47, 949.18, 67, 5.45, 200.77, 67, 0.07, 408.44, 66, 2.68, 405.26, 66, 0.06, 1589.07, 64, 1.75, 1361.55, 62, 1.09, 2001.44, 60, 2.25, 1788.14, 55, 4.59, 628.85, 54, 0.28, 124.43, 51, 6.27, 223.59, 50, 3.80, 215.75, 49, 4.17, 138.52, 48, 0.84, 10.29, 47, 2.17, 312.20, 43, 3.38, 208.63, 43, 2.99, 1148.25, 42, 4.83, 288.08, 40, 5.18, 1478.87, 40, 0.28, 131.40, 39, 0.56, 1574.85, 37, 0.63, 52.69, 35, 4.68, 38.13, 33, 1.98, 142.45, 33, 3.28, 222.86, 33, 6.12, 145.63, 32, 5.19, 76.27, 32, 6.02, 1905.46, 31, 1.48, 1677.94, 30, 1.96, 2104.54, 29, 5.10, 654.12, 29, 4.96, 1795.26, 29, 2.75, 404.51, 28, 0.83, 1692.17, 28, 0.83, 2317.84, 28, 2.24, 430.53, 27, 5.24, 388.47, 27, 1.00, 107.02, 26, 4.28, 483.22, 26, 2.21, 1265.57, 25, 2.87, 703.63, 25, 6.24, 106.27, 25, 1.08, 99.91, 25, 0.81, 312.46, 24, 3.11, 212.34, 24, 0.55, 214.26, 24, 0.65, 207.88, 23, 5.08, 479.29, 23, 4.87, 295.05, 22, 4.23, 217.96, 22, 5.51, 343.22, 22, 3.90, 563.63, 22, 0.73, 99.16, 22, 6.07, 85.83, 22, 4.17, 2.45, 22, 3.80, 347.88, 21, 3.09, 554.07, 21, 0.39, 319.57, 21, 5.11, 333.66, 21, 2.69, 1464.64, 21, 3.29, 70.85, 21, 5.12, 362.86, 21, 1.69, 231.46, 21, 2.46, 18.16, 20, 0.23, 213.25, 20, 5.08, 750.10, 20, 3.43, 213.35, 19, 2.02, 313.21, 19, 0.05, 245.54, 18, 5.70, 56.62, 18, 3.84, 497.45, 17, 3.55, 218.93, 17, 4.72, 2111.65, 17, 1.41, 114.14, 16, 3.05, 134.59, 16, 1.71, 2420.93, 16, 4.94, 357.45, 16, 4.22, 565.12, 16, 0.27, 225.83, 16, 0.33, 1891.24, 16, 2.83, 81.75, 15, 1.21, 1994.33, 15, 1.31, 216.22, 15, 3.85, 1162.47, 15, 5.57, 344.70, 14, 0.45, 2008.56, 14, 5.71, 92.05, 14, 0.57, 2634.23, 13, 5.76, 2221.86, 13, 0.45, 1169.59, 13, 1.60, 320.32, 13, 3.74, 508.35, 13, 3.43, 258.88, 13, 1.64, 273.10, 13, 1.92, 1581.96, 13, 5.19, 635.97, 12, 1.01, 329.73, 12, 5.95, 543.92, 12, 4.45, 32.24, 12, 5.11, 4.67, 12, 4.31, 618.56, 12, 2.46, 721.65, 12, 1.76, 160.61, 12, 3.71, 350.33, 12, 2.80, 217.49, 11, 3.00, 198.32, 11, 1.89, 561.18, 11, 2.41, 1781.03, 11, 1.58, 212.78, 11, 0.77, 218.72, 11, 2.07, 213.82, 10, 2.41, 546.96, 10, 0.09, 182.28, 10, 0.49, 305.35, 10, 2.64, 416.30, 10, 4.05, 62.25, 10, 3.28, 275.55, 10, 1.61, 327.44, 10, 1.10, 113.39, 9, 5.46, 414.07, 9, 4.46, 2428.04, 9, 2.92, 1279.79, 9, 4.88, 120.36, 9, 0.54, 168.05, 9, 6.14, 621.74, 9, 1.83, 629.60, 9, 1.95, 35.42, 9, 2.18, 425.11, 8, 0.36, 617.81, 8, 3.77, 251.43, 8, 0.92, 1485.98, 8, 1.38, 1.48, 8, 5.31, 65.22, 8, 3.46, 424.15, 8, 0.35, 278.52, 8, 5.44, 254.94, 8, 0.96, 767.37, 8, 1.43, 2737.32, 8, 3.38, 144.15, 8, 0.94, 636.72, 8, 5.14, 22.09, 8, 0.94, 2310.72, 8, 5.14, 358.93, 8, 4.56, 280.97, 8, 0.10, 2324.95, 8, 5.75, 447.94, 8, 2.19, 264.50, 7, 4.52, 5.63, 7, 3.85, 214.05, 7, 3.39, 98.90, 7, 1.20, 5.42, 7, 1.65, 1898.35, 7, 1.79, 12.53, 7, 3.50, 9.56, 6, 5.31, 6076.89, 6, 0.45, 10007.10, 6, 0.33, 2950.62, 6, 2.12, 274.07, 6, 0.76, 210.38, 6, 3.21, 219.45, 6, 3.80, 339.29, 6, 4.59, 207.67, 6, 0.18, 2207.63, 6, 2.11, 2097.42, 6, 4.67, 543.02, 6, 5.13, 692.59, 6, 6.17, 650.94, 6, 5.95, 486.40, 6, 1.04, 9992.87, 6, 6.10, 209.11, 6, 5.48, 2538.25, 6, 3.01, 121.25, 6, 5.92, 6062.66, 6, 3.56, 1073.61, 6, 0.56, 116.43, 6, 4.40, 196.62, 6, 4.83, 643.08, 6, 0.95, 1802.37, 6, 0.81, 472.17, 6, 2.24, 1038.04, 6, 3.61, 125.99, 6, 3.84, 181.06, 5, 5.81, 237.68, 5, 6.19, 337.73, 5, 0.56, 192.69, 5, 3.82, 842.15, 5, 4.85, 267.47, 5, 0.50, 248.72, 5, 4.01, 205.22, 5, 3.36, 824.74, 5, 1.63, 166.83, 5, 0.85, 46.47, 5, 4.04, 487.37, 5, 0.85, 247.24, 5, 4.49, 291.26, 5, 2.67, 417.04, 5, 0.25, 129.92, 5, 4.18, 2744.43, 5, 3.74, 235.39, 5, 5.58, 342.26, 5, 1.55, 214.78, 5, 3.17, 148.08, 5, 3.67, 189.72, 4, 4.71, 151.05, 4, 3.74, 699.70, 4, 0.25, 128.96, 4, 5.69, 252.66, 4, 4.95, 184.09, 4, 5.43, 436.89, 4, 6.20, 268.44, 4, 4.19, 685.47, 4, 2.98, 380.13, 4, 5.97, 212.55, 4, 6.10, 2641.34, 4, 5.82, 491.82, 4, 4.87, 14.98, 4, 4.19, 501.38, 4, 1.15, 3053.71, 4, 3.08, 710.75, 4, 5.17, 114.40, 4, 3.46, 220.46, 4, 0.75, 2627.11, 4, 0.99, 271.41, 4, 4.78, 175.17, 4, 3.71, 204.70, 4, 1.27, 211.81, 4, 3.56, 244.32, 4, 4.53, 488.85, 4, 2.87, 411.62, 4, 2.22, 2.92, 4, 3.06, 409.92, 4, 5.54, 458.84, 4, 1.58, 643.83, 4, 4.51, 601.76, 4, 1.11, 6283.08, 4, 2.20, 135.34, 4, 3.64, 229.97, 4, 1.32, 69.15, - /*R2*/ 436902, 4.786717, 213.299095, 71923, 2.50070, 206.18555, 49767, 4.97168, 220.41264, 43221, 3.86940, 426.59819, 29646, 5.96310, 7.11355, 4721, 2.4753, 199.0720, 4142, 4.1067, 433.7117, 3789, 3.0977, 639.8973, 2964, 1.3721, 103.0928, 2556, 2.8507, 419.4846, 2327, 0.0000, 0.0000, 2208, 6.2759, 110.2063, 2188, 5.8555, 14.2271, 1957, 4.9245, 227.5262, 924, 5.464, 323.505, 706, 2.971, 95.979, 546, 4.129, 412.371, 431, 5.178, 522.577, 405, 4.173, 209.367, 391, 4.481, 216.480, 374, 5.834, 117.320, 361, 3.277, 647.011, 356, 3.192, 210.118, 326, 2.269, 853.196, 207, 4.022, 735.877, 204, 0.088, 202.253, 180, 3.597, 632.784, 178, 4.097, 440.825, 154, 3.135, 625.670, 148, 0.136, 302.165, 133, 2.594, 191.958, 132, 5.933, 309.278, 123, 4.189, 88.866, 119, 5.554, 224.345, 111, 4.779, 838.969, 109, 5.293, 515.464, 100, 5.461, 3.181, 97, 4.02, 728.76, 96, 6.26, 742.99, 94, 4.38, 217.23, 81, 5.11, 956.29, 79, 5.73, 21.34, 69, 4.05, 3.93, 65, 3.78, 1052.27, 64, 5.81, 529.69, 63, 2.18, 195.14, 57, 3.15, 203.00, 56, 4.84, 234.64, 53, 5.08, 330.62, 53, 3.93, 949.18, 51, 2.77, 942.06, 45, 0.56, 269.92, 42, 4.79, 63.74, 41, 3.73, 316.39, 41, 4.58, 1155.36, 39, 3.51, 422.67, 38, 3.74, 1045.15, 38, 4.19, 536.80, 35, 2.91, 284.15, 35, 5.94, 1059.38, 34, 3.80, 149.56, 33, 4.97, 831.86, 31, 4.84, 1272.68, 30, 2.48, 860.31, 30, 4.35, 405.26, 30, 3.66, 429.78, 30, 1.59, 1066.50, 27, 1.66, 277.03, 26, 4.45, 223.59, 26, 4.82, 124.43, 26, 3.55, 1368.66, 24, 5.31, 10.29, 22, 2.76, 415.55, 22, 1.04, 11.05, 21, 3.62, 1265.57, 20, 2.52, 1258.45, 18, 4.31, 1471.75, 17, 3.49, 1361.55, 17, 3.28, 654.12, 16, 1.73, 490.33, 15, 5.01, 127.47, 15, 3.60, 265.99, 14, 4.69, 1148.25, 14, 3.05, 423.42, 13, 1.90, 408.44, 13, 0.32, 295.05, 13, 4.89, 437.64, 13, 4.62, 1589.07, 13, 3.14, 74.78, 12, 2.33, 210.85, 11, 5.48, 1375.77, 11, 4.55, 81.75, 11, 5.05, 191.21, 11, 5.03, 137.03, 10, 3.34, 1685.05, 10, 5.20, 340.77, 10, 3.17, 351.82, 9, 3.40, 1581.96, 9, 2.81, 99.91, 8, 3.23, 1677.94, 8, 4.04, 1788.14, 8, 2.36, 1574.85, 8, 6.08, 231.46, 8, 3.68, 846.08, 8, 3.29, 750.10, 7, 2.00, 131.40, 7, 4.38, 1464.64, 7, 4.83, 319.57, 7, 4.37, 145.63, 7, 5.43, 508.35, 7, 3.78, 313.21, 6, 1.34, 215.75, 6, 4.00, 447.94, 6, 4.56, 106.27, 6, 2.85, 138.52, 6, 0.55, 18.16, 6, 4.14, 543.92, 6, 4.35, 1905.46, 6, 1.13, 56.62, 5, 4.20, 721.65, 5, 3.63, 6076.89, 5, 4.50, 416.30, 5, 2.64, 288.08, 5, 5.05, 10007.10, 5, 2.45, 628.85, 5, 3.12, 1898.35, 5, 6.18, 483.22, 5, 5.92, 618.56, 5, 3.30, 76.27, 5, 3.12, 2001.44, 5, 5.78, 184.84, 5, 0.76, 333.66, 5, 1.27, 6062.66, 5, 1.20, 200.77, 5, 2.69, 9992.87, 5, 0.95, 343.22, 4, 0.80, 222.86, 4, 1.92, 497.45, 4, 2.90, 107.02, 4, 1.98, 347.88, 4, 2.88, 38.13, 4, 2.93, 1994.33, 4, 5.18, 404.51, 4, 5.45, 1692.17, 4, 4.12, 1781.03, 4, 3.12, 635.97, 4, 0.88, 703.63, 4, 3.79, 2104.54, 4, 3.25, 362.86, 4, 0.05, 32.24, 4, 3.48, 388.47, 4, 5.55, 113.39, 4, 5.46, 6283.08, 4, 4.08, 430.53, 3, 1.82, 70.85, 3, 3.52, 629.60, 3, 0.55, 10213.29, 3, 4.21, 337.73, 3, 3.28, 357.45, 3, 1.98, 203.74, 3, 3.88, 85.83, 3, 3.92, 1038.04, 3, 2.46, 867.42, 3, 1.26, 134.59, 3, 1.61, 1073.61, 3, 4.09, 1478.87, 3, 2.18, 1891.24, 3, 2.67, 52.69, 3, 0.41, 561.18, 3, 5.60, 216.22, 3, 5.01, 312.46, 3, 2.55, 6069.78, 3, 5.46, 258.88, 3, 2.19, 217.96, 3, 3.97, 9999.99, 3, 0.89, 1279.79, 3, 4.21, 650.94, 3, 1.67, 213.35, 3, 2.38, 181.06, 3, 3.91, 312.20, 3, 4.75, 213.25, 3, 5.09, 1169.59, 3, 5.74, 160.61, 3, 2.88, 643.08, 3, 3.62, 436.89, 3, 0.01, 195.89, 3, 1.69, 208.63, 3, 2.32, 565.12, 3, 1.13, 344.70, 3, 6.13, 273.10, 3, 5.10, 824.74, 3, 5.30, 444.76, 2, 3.58, 2420.93, 2, 2.96, 2214.74, 2, 3.46, 6275.96, 2, 4.74, 218.72, 2, 0.90, 121.25, 2, 4.08, 131.55, 2, 2.60, 305.35, 2, 4.22, 2221.86, 2, 5.18, 99.16, 2, 5.43, 207.88, 2, 3.38, 22.09, 2, 3.32, 358.93, 2, 3.95, 1795.26, 2, 1.61, 218.93, 2, 3.37, 320.32, 2, 4.85, 1141.13, 2, 4.63, 188.03, 2, 2.29, 2627.11, 2, 5.67, 28.45, 2, 1.69, 350.33, 2, 4.26, 546.96, 2, 0.18, 12.53, 2, 4.61, 182.28, 2, 2.90, 2310.72, 2, 1.31, 212.34, 2, 4.13, 225.83, 2, 3.01, 2317.84, 2, 1.59, 424.15, 2, 3.58, 329.73, 2, 2.24, 168.05, 2, 2.07, 144.15, 2, 2.86, 636.72, 2, 5.35, 45.58, 2, 5.05, 214.26, 2, 2.73, 291.26, 2, 2.70, 12.74, 2, 1.32, 219.45, 2, 5.56, 92.80, 2, 1.95, 129.92, 2, 3.44, 2428.04, 2, 3.55, 1354.43, 2, 4.98, 2008.56, 2, 6.14, 554.07, 2, 3.30, 1670.83, 2, 5.73, 1485.98, 2, 1.16, 235.39, 2, 4.51, 210.38, 2, 2.16, 207.67, 2, 5.51, 204.70, 2, 4.99, 1162.47, - /*R3*/ 20315, 3.02187, 213.29910, 8924, 3.1914, 220.4126, 6909, 4.3517, 206.1855, 4087, 4.2241, 7.1135, 3879, 2.0106, 426.5982, 1071, 4.2036, 199.0720, 907, 2.283, 433.712, 606, 3.175, 227.526, 597, 4.135, 14.227, 483, 1.173, 639.897, 393, 0.000, 0.000, 229, 4.698, 419.485, 188, 4.590, 110.206, 150, 3.202, 103.093, 121, 3.768, 323.505, 102, 4.710, 95.979, 101, 5.819, 412.371, 93, 1.44, 647.01, 84, 2.63, 216.48, 73, 4.15, 117.32, 62, 2.31, 440.83, 55, 0.31, 853.20, 50, 2.39, 209.37, 45, 4.37, 191.96, 41, 0.69, 522.58, 40, 1.84, 302.16, 38, 5.94, 88.87, 32, 4.01, 21.34, 28, 5.77, 210.12, 25, 0.73, 515.46, 25, 3.06, 234.64, 21, 4.93, 625.67, 18, 1.46, 309.28, 17, 5.73, 728.76, 17, 3.53, 3.18, 13, 3.36, 330.62, 12, 5.99, 735.88, 11, 3.37, 224.34, 11, 3.42, 956.29, 11, 6.07, 405.26, 10, 0.28, 838.97, 10, 0.58, 860.31, 10, 1.59, 202.25, 9, 2.57, 223.59, 9, 2.94, 124.43, 9, 4.65, 632.78, 9, 1.76, 429.78, 8, 4.48, 742.99, 8, 4.20, 195.14, 8, 0.44, 831.86, 8, 1.46, 654.12, 7, 4.51, 942.06, 7, 5.47, 1045.15, 7, 1.52, 422.67, 7, 4.83, 316.39, 7, 3.42, 10.29, 6, 6.01, 1066.50, 6, 2.34, 269.92, 6, 0.83, 217.23, 6, 1.15, 284.15, 6, 4.18, 529.69, 6, 2.47, 536.80, 5, 2.12, 295.05, 4, 0.92, 203.00, 4, 3.23, 1272.68, 4, 0.11, 1155.36, 4, 6.01, 1052.27, 4, 0.06, 81.75, 3, 4.33, 1258.45, 3, 0.19, 1148.25, 3, 2.19, 447.94, 3, 1.89, 149.56, 3, 5.64, 3.93, 3, 5.41, 1361.55, 3, 4.97, 1677.94, 3, 0.92, 508.35, 3, 3.00, 1589.07, 3, 2.31, 543.92, 3, 3.71, 408.44, 2, 4.24, 1059.38, 2, 3.22, 319.57, 2, 5.73, 313.21, 2, 1.30, 184.84, 2, 5.88, 721.65, 2, 0.52, 416.30, 2, 6.18, 1464.64, 2, 6.23, 1471.75, 2, 2.41, 337.73, 2, 5.17, 2854.64, 2, 2.41, 131.55, 2, 5.62, 11.05, 2, 0.54, 635.97, 2, 5.59, 1038.04, 2, 1.82, 436.89, 2, 1.51, 750.10, 2, 6.12, 1073.61, 2, 4.58, 1994.33, 2, 0.03, 423.42, 2, 2.58, 2090.31, 2, 2.95, 437.64, 2, 1.75, 195.89, 2, 5.97, 1781.03, 2, 0.56, 2324.95, 2, 6.15, 490.33, 2, 0.61, 210.85, 2, 3.85, 1251.34, 1, 0.27, 497.45, 1, 0.99, 643.08, 1, 5.35, 1354.43, 1, 3.29, 1884.12, 1, 1.50, 430.53, 1, 0.85, 415.55, 1, 5.33, 2538.25, 1, 4.12, 1574.85, 1, 5.58, 1382.89, 1, 0.70, 867.42, 1, 3.79, 1567.73, 1, 2.29, 2420.93, 1, 1.41, 2634.23, 1, 0.48, 824.74, 1, 2.97, 241.75, 1, 3.11, 2200.52, 1, 5.13, 25.27, 1, 4.70, 113.39, 1, 1.80, 618.56, 1, 3.96, 1891.24, 1, 3.78, 1375.77, 1, 3.73, 131.40, 1, 4.48, 2214.74, 1, 0.79, 127.47, 1, 5.42, 1279.79, 1, 0.05, 63.74, 1, 4.80, 1987.22, 1, 5.85, 215.75, 1, 4.06, 231.46, 1, 1.09, 362.86, 1, 4.23, 1802.37, 1, 5.33, 2428.04, 1, 5.91, 265.99, 1, 0.74, 16.67, 1, 6.26, 2015.67, 1, 5.99, 2524.02, 1, 1.92, 483.22, 1, 2.66, 145.63, 1, 2.97, 934.95, 1, 6.26, 2.45, 1, 3.16, 2207.63, 1, 0.09, 628.85, 1, 1.24, 74.78, 1, 5.87, 1368.66, 1, 2.90, 2008.56, 1, 2.38, 2228.97, 1, 2.28, 1478.87, 1, 1.16, 3053.71, 1, 4.70, 1670.83, 1, 5.92, 1685.05, 1, 3.13, 56.62, - /*R4*/ 1202, 1.4150, 220.4126, 708, 1.162, 213.299, 516, 6.240, 206.186, 427, 2.469, 7.114, 268, 0.187, 426.598, 170, 5.959, 199.072, 150, 0.480, 433.712, 145, 1.442, 227.526, 121, 2.405, 14.227, 47, 5.57, 639.90, 19, 5.86, 647.01, 17, 0.53, 440.83, 16, 2.90, 110.21, 15, 0.30, 419.48, 14, 1.30, 412.37, 13, 2.09, 323.51, 11, 0.22, 95.98, 11, 2.46, 117.32, 10, 3.14, 0.00, 9, 1.56, 88.87, 9, 2.28, 21.34, 9, 0.68, 216.48, 8, 1.27, 234.64, 8, 4.49, 853.20, 8, 3.59, 302.16, 6, 5.17, 103.09, 5, 2.59, 515.46, 4, 4.97, 860.31, 4, 0.02, 191.96, 4, 5.97, 654.12, 4, 1.60, 330.62, 4, 1.60, 405.26, 4, 3.30, 210.12, 3, 2.73, 522.58, 3, 0.75, 209.37, 3, 1.32, 728.76, 2, 1.19, 124.43, 2, 0.49, 447.94, 2, 3.28, 203.00, 2, 0.73, 625.67, 2, 6.15, 429.78, 2, 0.75, 295.05, 2, 3.89, 1066.50, 2, 2.00, 831.86, 2, 0.09, 942.06, 2, 0.82, 223.59, 2, 1.40, 224.34, 2, 3.02, 184.84, 2, 5.41, 824.74, 2, 5.96, 422.67, 1, 2.12, 529.69, 1, 0.72, 536.80, 1, 1.65, 17.41, 1, 1.90, 956.29, 1, 5.97, 195.14, 1, 1.12, 838.97, 1, 0.89, 721.65, 1, 1.59, 735.88, 1, 3.06, 1574.85, 1, 1.01, 1045.15, 1, 5.36, 316.39, 1, 4.93, 56.62, 1, 2.72, 508.35, 1, 1.11, 1169.59, - /*R5*/ 129, 5.913, 220.413, 32, 0.69, 7.11, 27, 5.91, 227.53, 20, 4.95, 433.71, 20, 0.67, 14.23, 14, 2.67, 206.19, 14, 1.46, 199.07, 13, 4.59, 426.60, 7, 4.63, 213.30, 5, 3.61, 639.90, 4, 4.90, 440.83, 3, 4.07, 647.01, 3, 4.66, 191.96, 3, 0.49, 323.51, 3, 3.18, 419.48, 2, 3.70, 88.87, 2, 3.32, 95.98, 2, 0.56, 117.32, 2, 5.33, 302.16, 2, 0.00, 0.00, 2, 2.67, 853.20, 2, 0.86, 515.46, 1, 5.83, 234.64, 1, 0.16, 412.37, 1, 5.98, 3.18, 1, 5.23, 216.48, 1, 5.05, 124.43, 1, 0.37, 28.45}, - - //Dura精度:J2000+-4千年 黄经1角秒 黄纬1角秒 距离20AU/10^6 - []float64{ - 100000000, //A的倍率 - 20, 539, 836, 980, 1070, 1085, 1088, 1193, 1271, 1307, 1322, 1325, 1325, 2150, 2660, 2936, 3089, 3122, 3122, //位置索引表 - /*L0*/ 548129294, 0.000000000, 0.000000000, 9260408, 0.8910642, 74.7815986, 1504248, 3.6271926, 1.4844727, 365982, 1.899622, 73.297126, 272328, 3.358237, 149.563197, 70328, 5.39254, 63.73590, 68893, 6.09292, 76.26607, 61999, 2.26952, 2.96895, 61951, 2.85099, 11.04570, 26469, 3.14152, 71.81265, 25711, 6.11380, 454.90937, 21079, 4.36059, 148.07872, 17819, 1.74437, 36.64856, 14613, 4.73732, 3.93215, 11163, 5.82682, 224.34480, 10998, 0.48865, 138.51750, 9527, 2.9552, 35.1641, 7546, 5.2363, 109.9457, 4220, 3.2333, 70.8494, 4052, 2.2775, 151.0477, 3490, 5.4831, 146.5943, 3355, 1.0655, 4.4534, 3144, 4.7520, 77.7505, 2927, 4.6290, 9.5612, 2922, 5.3524, 85.8273, 2273, 4.3660, 70.3282, 2149, 0.6075, 38.1330, 2051, 1.5177, 0.1119, 1992, 4.9244, 277.0350, 1667, 3.6274, 380.1278, 1533, 2.5859, 52.6902, 1376, 2.0428, 65.2204, 1372, 4.1964, 111.4302, 1284, 3.1135, 202.2534, 1282, 0.5427, 222.8603, 1244, 0.9161, 2.4477, 1221, 0.1990, 108.4612, 1151, 4.1790, 33.6796, 1150, 0.9334, 3.1814, 1090, 1.7750, 12.5302, 1072, 0.2356, 62.2514, 946, 1.192, 127.472, 708, 5.183, 213.299, 653, 0.966, 78.714, 628, 0.182, 984.600, 607, 5.432, 529.691, 559, 3.358, 0.521, 524, 2.013, 299.126, 483, 2.106, 0.963, 471, 1.407, 184.727, 467, 0.415, 145.110, 434, 5.521, 183.243, 405, 5.987, 8.077, 399, 0.338, 415.552, 396, 5.870, 351.817, 379, 2.350, 56.622, 310, 5.833, 145.631, 300, 5.644, 22.091, 294, 5.839, 39.618, 252, 1.637, 221.376, 249, 4.746, 225.829, 239, 2.350, 137.033, 224, 0.516, 84.343, 223, 2.843, 0.261, 220, 1.922, 67.668, 217, 6.142, 5.938, 216, 4.778, 340.771, 208, 5.580, 68.844, 202, 1.297, 0.048, 199, 0.956, 152.532, 194, 1.888, 456.394, 193, 0.916, 453.425, 187, 1.319, 0.160, 182, 3.536, 79.235, 173, 1.539, 160.609, 172, 5.680, 219.891, 170, 3.677, 5.417, 169, 5.879, 18.159, 165, 1.424, 106.977, 163, 3.050, 112.915, 158, 0.738, 54.175, 147, 1.263, 59.804, 143, 1.300, 35.425, 139, 5.386, 32.195, 139, 4.260, 909.819, 124, 1.374, 7.114, 110, 2.027, 554.070, 109, 5.706, 77.963, 104, 5.028, 0.751, 104, 1.458, 24.379, 103, 0.681, 14.978, 95, 0.91, 74.67, 94, 3.94, 74.89, 89, 0.52, 181.76, 86, 1.71, 82.86, 85, 5.89, 256.54, 85, 0.37, 186.21, 83, 2.93, 265.99, 80, 3.01, 297.64, 80, 1.01, 6.59, 77, 4.59, 6.22, 75, 4.63, 69.36, 74, 6.24, 447.80, 73, 4.28, 87.31, 73, 2.85, 462.02, 70, 1.19, 66.70, 70, 0.87, 305.35, 70, 3.76, 131.40, 69, 4.44, 39.36, 62, 0.17, 479.29, 62, 3.19, 77.23, 58, 1.59, 60.77, 58, 2.67, 381.61, 58, 3.67, 51.21, 57, 1.63, 143.63, 55, 1.50, 71.60, 54, 5.52, 128.96, 50, 1.12, 20.61, 46, 4.36, 75.74, 45, 0.48, 14.01, 42, 3.82, 81.00, 40, 4.57, 46.21, 40, 0.70, 218.41, 40, 6.06, 293.19, 39, 5.59, 99.16, 39, 3.44, 153.50, 38, 6.07, 211.81, 36, 1.67, 258.02, 35, 1.97, 835.04, 35, 3.72, 692.59, 35, 1.03, 203.74, 35, 0.39, 1.37, 34, 1.08, 191.21, 34, 2.94, 140.00, 34, 6.06, 275.55, 33, 4.22, 200.77, 32, 5.51, 72.33, 30, 1.89, 269.92, 30, 3.87, 259.51, 29, 0.17, 528.21, 28, 2.18, 125.99, 27, 2.10, 209.37, 27, 4.75, 41.10, 27, 6.28, 28.57, 27, 4.48, 373.91, 26, 4.77, 284.15, 26, 5.81, 75.30, 26, 6.20, 134.59, 26, 3.63, 490.33, 26, 0.54, 41.64, 26, 0.75, 278.52, 25, 5.43, 116.43, 25, 4.71, 378.64, 24, 3.19, 81.37, 23, 3.58, 1.60, 23, 0.93, 288.08, 23, 0.53, 1514.29, 22, 1.84, 617.81, 22, 4.59, 404.51, 22, 5.87, 45.58, 22, 0.06, 173.94, 21, 2.74, 28.31, 21, 1.98, 114.40, 21, 5.62, 55.66, 21, 2.64, 105.49, 21, 0.89, 255.06, 20, 0.10, 195.14, 20, 3.78, 135.55, 19, 1.49, 0.89, 19, 6.22, 329.84, 19, 2.84, 159.12, 19, 0.51, 67.36, 19, 2.30, 5.11, - /*L1*/ 7502543122, 0.0000000000, 0.0000000000, 154458, 5.242017, 74.781599, 24456, 1.71256, 1.48447, 9258, 0.4284, 11.0457, 8266, 1.5022, 63.7359, 7842, 1.3198, 149.5632, 3899, 0.4648, 3.9322, 2284, 4.1737, 76.2661, 1927, 0.5301, 2.9689, 1233, 1.5863, 70.8494, 791, 5.436, 3.181, 767, 1.996, 73.297, 482, 2.984, 85.827, 450, 4.138, 138.517, 446, 3.723, 224.345, 427, 4.731, 71.813, 354, 2.583, 148.079, 348, 2.454, 9.561, 317, 5.579, 52.690, 206, 2.363, 2.448, 189, 4.202, 56.622, 184, 0.284, 151.048, 180, 5.684, 12.530, 171, 3.001, 78.714, 158, 2.909, 0.963, 155, 5.591, 4.453, 154, 4.652, 35.164, 152, 2.942, 77.751, 143, 2.590, 62.251, 121, 4.148, 127.472, 116, 3.732, 65.220, 102, 4.188, 145.631, 102, 6.034, 0.112, 88, 3.99, 18.16, 88, 6.16, 202.25, 81, 2.64, 22.09, 72, 6.05, 70.33, 69, 4.05, 77.96, 59, 3.70, 67.67, 47, 3.54, 351.82, 44, 5.91, 7.11, 43, 5.72, 5.42, 39, 4.92, 222.86, 36, 5.90, 33.68, 36, 3.29, 8.08, 36, 3.33, 71.60, 35, 5.08, 38.13, 31, 5.62, 984.60, 31, 5.50, 59.80, 31, 5.46, 160.61, 30, 1.66, 447.80, 29, 1.15, 462.02, 29, 4.52, 84.34, 27, 5.54, 131.40, 27, 6.15, 299.13, 26, 4.99, 137.03, 25, 5.74, 380.13, 23, 2.25, 111.43, 22, 0.93, 213.30, 22, 2.81, 69.36, 19, 1.86, 108.46, 19, 3.56, 54.17, 16, 3.10, 14.98, 14, 1.54, 340.77, 14, 2.69, 225.83, 14, 4.38, 5.94, 13, 1.95, 87.31, 13, 5.88, 6.22, 12, 0.33, 51.21, 12, 3.60, 269.92, 12, 5.34, 152.53, 12, 0.33, 35.42, 12, 1.75, 79.24, 11, 3.38, 72.33, 11, 1.69, 45.58, 11, 5.97, 265.99, 11, 3.07, 284.15, 10, 4.17, 24.38, 10, 3.52, 529.69, 10, 4.65, 77.23, 10, 5.50, 153.50, 10, 1.01, 68.84, 10, 0.50, 209.37, 10, 5.60, 82.86, 9, 3.54, 41.64, 9, 3.93, 39.62, 9, 4.49, 20.61, 9, 1.97, 195.14, 9, 3.89, 60.77, 8, 4.41, 134.59, 8, 2.44, 146.59, 8, 5.73, 184.73, 8, 0.17, 120.36, 8, 5.36, 75.74, 8, 5.77, 73.82, 8, 4.44, 14.01, 7, 2.19, 145.11, 7, 4.12, 191.21, 7, 2.13, 116.43, - /*L2*/ 53033, 0.00000, 0.00000, 2358, 2.2601, 74.7816, 769, 4.526, 11.046, 552, 3.258, 63.736, 542, 2.276, 3.932, 529, 4.923, 1.484, 258, 3.691, 3.181, 239, 5.858, 149.563, 182, 6.218, 70.849, 54, 1.44, 76.27, 49, 6.03, 56.62, 45, 3.91, 2.45, 45, 0.81, 85.83, 38, 1.78, 52.69, 37, 4.46, 2.97, 33, 0.86, 9.56, 29, 5.10, 73.30, 24, 2.11, 18.16, 22, 5.99, 138.52, 22, 4.82, 78.71, 21, 2.40, 77.96, 21, 2.17, 224.34, 17, 2.54, 145.63, 17, 3.47, 12.53, 12, 0.02, 22.09, 11, 0.08, 127.47, 10, 5.16, 71.60, 10, 4.46, 62.25, 9, 4.26, 7.11, 8, 5.50, 67.67, 7, 1.25, 5.42, 6, 3.36, 447.80, 6, 5.45, 65.22, 6, 4.52, 151.05, 6, 5.73, 462.02, 6, 5.61, 148.08, 6, 1.83, 202.25, 5, 1.06, 131.40, 5, 3.52, 59.80, 5, 3.36, 4.45, 5, 1.20, 71.81, 4, 0.68, 77.75, 4, 1.76, 351.82, 4, 4.57, 454.91, 3, 3.84, 45.58, 3, 3.32, 160.61, 3, 6.15, 77.23, 3, 5.36, 269.92, - /*L3*/ 121, 0.024, 74.782, 68, 4.12, 3.93, 53, 2.39, 11.05, 46, 0.00, 0.00, 45, 2.04, 3.18, 44, 2.96, 1.48, 25, 4.89, 63.74, 21, 4.55, 70.85, 20, 2.31, 149.56, 9, 1.58, 56.62, 4, 0.23, 18.16, 4, 5.39, 76.27, 4, 0.95, 77.96, 3, 4.98, 85.83, 3, 4.13, 52.69, 3, 0.37, 78.71, 2, 0.86, 145.63, 2, 5.66, 9.56, 2, 2.68, 7.11, 2, 0.49, 71.60, 1, 5.20, 73.30, 1, 4.87, 224.34, 1, 1.25, 12.53, 1, 3.93, 22.09, 1, 2.19, 127.47, 1, 3.98, 462.02, 1, 5.06, 447.80, 1, 1.06, 138.52, 1, 0.35, 5.63, 1, 2.94, 131.40, - /*L4*/ 114, 3.142, 0.000, 6, 4.58, 74.78, 3, 0.35, 11.05, 1, 3.42, 56.62, 1, 4.66, 18.16, - /*L5*/ 1, 3.14, 0.00, - /*B0*/ 1346278, 2.6187781, 74.7815986, 62341, 5.08111, 149.56320, 61601, 3.14159, 0.00000, 9964, 1.6160, 76.2661, 9926, 0.5763, 73.2971, 3259, 1.2612, 224.3448, 2972, 2.2437, 1.4845, 2010, 6.0555, 148.0787, 1522, 0.2796, 63.7359, 924, 4.038, 151.048, 761, 6.140, 71.813, 522, 3.321, 138.517, 463, 0.743, 85.827, 437, 3.381, 529.691, 435, 0.341, 77.751, 431, 3.554, 213.299, 420, 5.213, 11.046, 245, 0.788, 2.969, 233, 2.257, 222.860, 216, 1.591, 38.133, 180, 3.725, 299.126, 175, 1.236, 146.594, 174, 1.937, 380.128, 160, 5.336, 111.430, 144, 5.962, 35.164, 116, 5.739, 70.849, 106, 0.941, 70.328, 102, 2.619, 78.714, 86, 0.70, 39.62, 73, 0.21, 225.83, 71, 0.83, 109.95, 58, 2.67, 108.46, 54, 3.35, 184.73, 44, 2.74, 152.53, 41, 3.22, 160.61, - /*B1*/ 206366, 4.123943, 74.781599, 8563, 0.3382, 149.5632, 1726, 2.1219, 73.2971, 1374, 0.0000, 0.0000, 1369, 3.0686, 76.2661, 451, 3.777, 1.484, 400, 2.848, 224.345, 307, 1.255, 148.079, 154, 3.786, 63.736, 112, 5.573, 151.048, 111, 5.329, 138.517, 83, 3.59, 71.81, 56, 3.40, 85.83, 54, 1.70, 77.75, 42, 1.21, 11.05, 41, 4.45, 78.71, 32, 3.77, 222.86, 30, 2.56, 2.97, 27, 5.34, 213.30, 26, 0.42, 380.13, 23, 2.49, 146.59, 20, 3.70, 70.85, 20, 5.93, 529.69, 20, 5.37, 299.13, 19, 3.83, 38.13, 19, 1.09, 111.43, - /*B2*/ 9212, 5.8004, 74.7816, 557, 0.000, 0.000, 286, 2.177, 149.563, 95, 3.84, 73.30, 45, 4.88, 76.27, 20, 5.46, 1.48, 15, 0.88, 138.52, 14, 2.85, 148.08, 14, 5.07, 63.74, 10, 5.00, 224.34, 8, 6.27, 78.71, 5, 5.16, 71.81, - /*B3*/ 268, 1.251, 74.782, 11, 3.14, 0.00, 6, 4.01, 149.56, 3, 5.78, 73.30, 2, 1.06, 63.74, - /*B4*/ 6, 2.85, 74.78, - /*R0*/ 1921264848, 0.0000000000, 0.0000000000, 88784984, 5.60377527, 74.78159857, 3440836, 0.3283610, 73.2971259, 2055653, 1.7829517, 149.5631971, 649322, 4.522473, 76.266071, 602248, 3.860038, 63.735898, 496404, 1.401399, 454.909367, 338526, 1.580027, 138.517497, 243508, 1.570866, 71.812653, 190522, 1.998094, 1.484473, 161858, 2.791379, 148.078724, 143706, 1.383686, 11.045700, 93192, 0.17437, 36.64856, 89806, 3.66105, 109.94569, 71424, 4.24509, 224.34480, 46677, 1.39977, 35.16409, 39026, 3.36235, 277.03499, 39010, 1.66971, 70.84945, 36755, 3.88649, 146.59425, 30349, 0.70100, 151.04767, 29156, 3.18056, 77.75054, 25786, 3.78538, 85.82730, 25620, 5.25656, 380.12777, 22637, 0.72519, 529.69097, 20473, 2.79640, 70.32818, 20472, 1.55589, 202.25340, 17901, 0.55455, 2.96895, 15503, 5.35405, 38.13304, 14702, 4.90434, 108.46122, 12897, 2.62154, 111.43016, 12328, 5.96039, 127.47180, 11959, 1.75044, 984.60033, 11853, 0.99343, 52.69020, 11696, 3.29826, 3.93215, 11495, 0.43774, 65.22037, 10793, 1.42105, 213.29910, 9111, 4.9964, 62.2514, 8421, 5.2535, 222.8603, 8402, 5.0388, 415.5525, 7449, 0.7949, 351.8166, 7329, 3.9728, 183.2428, 6046, 5.6796, 78.7138, 5524, 3.1150, 9.5612, 5445, 5.1058, 145.1098, 5238, 2.6296, 33.6796, 4079, 3.2206, 340.7709, 3919, 4.2502, 39.6175, 3802, 6.1099, 184.7273, 3781, 3.4584, 456.3938, 3687, 2.4872, 453.4249, 3102, 4.1403, 219.8914, 2963, 0.8298, 56.6224, 2942, 0.4239, 299.1264, 2940, 2.1464, 137.0330, 2938, 3.6766, 140.0020, 2865, 0.3100, 12.5302, 2538, 4.8546, 131.4039, 2364, 0.4425, 554.0700, 2183, 2.9404, 305.3462, 1979, 6.1284, 106.9767, 1963, 0.0411, 221.3759, 1963, 5.2434, 84.3428, 1849, 2.9111, 909.8187, 1830, 4.0111, 68.8437, 1656, 1.9643, 79.2350, 1643, 0.3556, 67.6681, 1632, 4.2306, 22.0914, 1585, 3.1627, 225.8293, 1563, 1.4792, 112.9146, 1507, 5.2419, 181.7583, 1482, 5.6620, 152.5321, 1477, 4.3221, 256.5399, 1439, 1.5305, 447.7958, 1409, 4.4192, 462.0229, 1404, 5.6356, 4.4534, 1401, 1.3908, 265.9893, 1250, 6.2448, 160.6089, 1249, 5.4403, 54.1747, 1248, 4.8898, 479.2884, 1228, 5.9770, 59.8037, 1197, 2.5219, 145.6310, 1091, 4.1539, 77.9630, 1072, 1.7429, 528.2065, 906, 5.620, 74.670, 900, 2.373, 74.893, 845, 0.129, 82.858, 759, 2.137, 692.587, 719, 4.000, 128.956, 710, 5.416, 218.407, 710, 4.220, 381.612, 710, 4.490, 293.189, 705, 0.455, 835.037, 700, 0.040, 143.625, 690, 3.081, 69.365, 652, 4.423, 18.159, 642, 2.711, 87.312, 630, 4.461, 275.551, 598, 0.358, 269.921, 594, 3.838, 32.195, 594, 4.501, 8.077, 588, 5.083, 186.212, 576, 5.896, 66.705, 575, 5.579, 2.448, 570, 1.639, 77.229, 557, 1.072, 1059.382, 549, 5.628, 3.181, 545, 5.694, 203.738, 542, 5.395, 278.519, 540, 6.208, 71.600, 516, 3.233, 284.149, 503, 5.839, 191.208, 496, 2.651, 200.769, 488, 0.064, 60.767, 477, 2.894, 39.357, 464, 2.354, 211.815, 464, 1.434, 297.642, 455, 2.593, 490.334, 455, 4.084, 99.161, 449, 0.280, 617.806, 437, 0.528, 209.367, 436, 2.082, 51.206, 436, 2.101, 1514.291, 436, 2.794, 75.745, 429, 3.080, 41.102, 420, 2.254, 81.001, 414, 0.090, 258.024, 410, 3.050, 404.507, 405, 6.123, 24.379, 387, 0.686, 230.565, 380, 0.058, 378.643, 368, 0.712, 125.987, 365, 5.595, 255.055, 359, 0.009, 35.425, 359, 0.352, 426.598, 358, 4.714, 173.942, 354, 4.657, 329.837, 326, 4.720, 134.585, 324, 4.829, 195.140, 320, 5.486, 14.978, 308, 3.924, 116.426, 306, 3.761, 344.703, 305, 2.555, 6208.294, 302, 0.132, 565.116, 296, 4.211, 1364.728, 293, 3.995, 72.334, 287, 1.850, 153.495, 262, 3.837, 831.105, 256, 1.167, 177.874, 250, 4.242, 75.303, 248, 1.063, 105.492, 245, 5.949, 20.607, 241, 1.605, 81.374, 234, 2.971, 46.210, 234, 4.481, 628.852, 225, 0.407, 114.399, 220, 0.196, 180.274, 220, 2.961, 120.358, 219, 0.248, 294.673, 217, 3.429, 241.610, 211, 4.931, 103.093, 205, 2.304, 259.509, 194, 6.117, 414.068, 192, 5.767, 291.704, 189, 2.236, 5.417, 188, 2.045, 408.439, 187, 3.035, 135.549, 182, 0.784, 417.037, 182, 0.707, 391.173, 179, 4.824, 366.486, 178, 3.980, 10138.504, 176, 1.960, 756.323, 176, 5.508, 7.114, 172, 5.217, 41.644, 171, 2.309, 98.900, 170, 4.950, 206.186, 170, 4.510, 288.081, 169, 4.043, 55.659, 168, 5.258, 518.645, 167, 4.922, 422.666, 164, 5.225, 67.359, 162, 3.273, 443.864, 162, 4.995, 73.818, 161, 3.823, 451.940, 157, 0.663, 220.413, 155, 4.320, 760.256, 154, 4.278, 45.577, 154, 4.707, 543.024, 152, 4.647, 155.783, 146, 2.657, 465.955, 143, 2.078, 457.878, 142, 1.270, 159.124, 134, 5.309, 14.015, 133, 2.889, 373.908, 129, 0.363, 96.873, 127, 0.424, 331.322, 125, 4.305, 339.286, 123, 2.383, 141.486, 117, 3.950, 74.260, 117, 1.837, 1289.947, 116, 4.435, 5.938, 116, 2.512, 296.157, 115, 6.249, 767.369, 113, 4.654, 80.198, 113, 0.831, 100.384, 113, 0.081, 558.002, 112, 1.212, 329.725, 111, 0.750, 80.719, 111, 0.387, 216.922, 108, 3.773, 142.450, 107, 2.394, 347.884, 107, 1.821, 306.831, 106, 0.816, 1087.693, 105, 5.945, 328.353, 104, 2.994, 6.220, 103, 0.698, 358.930, 101, 1.057, 92.308, 99, 4.33, 74.52, 98, 3.73, 75.04, 97, 0.69, 977.49, 96, 5.55, 969.62, 95, 0.80, 342.26, 94, 4.54, 28.57, 94, 4.99, 403.13, 91, 5.17, 144.15, 91, 0.22, 333.66, 90, 0.37, 0.96, 90, 3.80, 986.08, 89, 2.19, 74.83, 89, 5.88, 74.73, 89, 4.74, 604.47, 89, 4.44, 154.02, 87, 5.62, 300.61, 86, 2.83, 983.12, 85, 5.80, 6.59, 85, 1.26, 142.14, 84, 1.84, 227.31, 83, 1.88, 387.24, 83, 2.21, 74.94, 83, 5.86, 74.62, 80, 2.98, 526.72, 79, 5.67, 267.47, 78, 2.73, 110.21, 76, 2.78, 88.11, 76, 4.66, 101.87, 76, 5.41, 50.40, 75, 5.37, 373.01, 75, 1.35, 350.33, 74, 6.21, 312.46, 73, 0.58, 367.97, 71, 3.17, 23.58, 71, 3.65, 894.84, 71, 0.56, 92.94, 71, 4.66, 44.73, 70, 1.52, 552.59, 70, 3.74, 546.96, 70, 3.95, 187.70, 69, 2.45, 555.55, 69, 2.42, 235.39, 69, 4.77, 991.71, 67, 0.86, 522.58, 66, 5.05, 30.71, 65, 4.24, 771.30, 65, 0.69, 152.74, 65, 3.74, 536.80, 65, 5.27, 68.19, 64, 2.37, 157.64, 64, 0.10, 681.54, 63, 4.60, 67.88, 63, 2.90, 79.89, 63, 0.29, 119.51, 63, 5.36, 92.05, 63, 0.34, 561.18, 62, 2.68, 130.44, 62, 2.32, 74.03, 61, 0.58, 253.57, - /*R1*/ 1479896, 3.6720571, 74.7815986, 71212, 6.22601, 63.73590, 68627, 6.13411, 149.56320, 24060, 3.14159, 0.00000, 21468, 2.60177, 76.26607, 20857, 5.24625, 11.04570, 11405, 0.01848, 70.84945, 7497, 0.4236, 73.2971, 4244, 1.4169, 85.8273, 3927, 3.1551, 71.8127, 3578, 2.3116, 224.3448, 3506, 2.5835, 138.5175, 3229, 5.2550, 3.9322, 3060, 0.1532, 1.4845, 2564, 0.9808, 148.0787, 2429, 3.9944, 52.6902, 1645, 2.6535, 127.4718, 1584, 1.4305, 78.7138, 1508, 5.0600, 151.0477, 1490, 2.6756, 56.6224, 1413, 4.5746, 202.2534, 1403, 1.3699, 77.7505, 1228, 1.0470, 62.2514, 1033, 0.2646, 131.4039, 992, 2.172, 65.220, 862, 5.055, 351.817, 744, 3.076, 35.164, 687, 2.499, 77.963, 647, 4.473, 70.328, 624, 0.863, 9.561, 604, 0.907, 984.600, 575, 3.231, 447.796, 562, 2.718, 462.023, 530, 5.917, 213.299, 528, 5.151, 2.969, 494, 0.463, 145.631, 487, 0.706, 380.128, 460, 4.223, 12.530, 444, 2.156, 67.668, 406, 1.230, 22.091, 381, 3.851, 3.181, 373, 5.051, 529.691, 348, 1.749, 71.600, 339, 2.538, 18.159, 272, 3.384, 222.860, 269, 6.241, 340.771, 259, 3.921, 59.804, 256, 2.957, 84.343, 255, 3.504, 38.133, 238, 2.049, 269.921, 234, 0.278, 108.461, 225, 3.910, 160.609, 222, 3.647, 137.033, 212, 0.680, 111.430, 206, 1.534, 284.149, 201, 1.249, 69.365, 196, 4.772, 299.126, 189, 4.413, 265.989, 163, 4.341, 33.680, 153, 5.218, 209.367, 151, 1.990, 54.175, 137, 0.403, 195.140, 128, 2.403, 39.618, 117, 0.396, 87.312, 107, 1.230, 225.829, 106, 0.698, 2.448, 106, 0.171, 79.235, 105, 4.436, 305.346, 104, 2.922, 134.585, 104, 1.816, 72.334, 104, 2.576, 191.208, 100, 4.941, 120.358, 97, 3.81, 152.53, 95, 4.03, 82.86, 94, 5.02, 51.21, 93, 3.09, 77.23, 86, 0.53, 145.11, 85, 0.62, 116.43, 85, 5.72, 68.84, 85, 5.56, 344.70, 78, 1.64, 479.29, 77, 0.08, 45.58, 76, 4.20, 73.82, 76, 3.79, 75.74, 72, 4.31, 565.12, 72, 3.71, 408.44, 72, 3.94, 153.50, 71, 2.38, 60.77, 65, 1.56, 106.98, 64, 1.94, 41.64, 63, 4.19, 184.73, 62, 3.24, 422.67, 62, 4.39, 453.42, 62, 3.90, 4.45, 60, 0.60, 74.89, 59, 1.56, 456.39, 58, 5.33, 220.41, 57, 0.84, 146.59, 55, 1.60, 14.98, 54, 3.73, 7.11, 53, 4.45, 426.60, 53, 5.20, 358.93, 53, 3.50, 125.99, 52, 6.09, 404.51, 52, 1.76, 8.08, 51, 0.37, 206.19, 51, 0.53, 490.33, 49, 5.85, 112.91, 49, 4.26, 5.42, 49, 0.94, 99.16, 49, 3.63, 81.00, 48, 1.97, 288.08, 46, 5.35, 152.74, 44, 3.04, 20.61, 43, 1.26, 1514.29, 42, 0.05, 128.96, 42, 2.51, 24.38, 41, 2.34, 277.03, 40, 5.10, 35.42, 39, 5.49, 200.77, 39, 0.74, 347.88, 39, 4.95, 92.94, 38, 2.06, 333.66, 38, 3.62, 173.94, 36, 3.73, 96.87, 34, 3.68, 66.92, 33, 6.26, 1059.38, 33, 1.38, 74.67, 32, 4.38, 221.38, 32, 0.54, 203.74, 31, 0.80, 373.01, 31, 2.05, 230.56, 31, 2.54, 977.49, 30, 0.71, 109.95, 30, 0.19, 387.24, 29, 5.43, 58.11, 29, 3.11, 991.71, 28, 4.77, 415.55, 28, 0.37, 80.20, 27, 2.15, 140.00, 27, 2.03, 536.80, 27, 1.36, 0.96, 26, 4.53, 454.91, 26, 3.47, 144.15, 26, 5.43, 546.96, 26, 2.57, 522.58, 25, 1.80, 143.63, 25, 5.12, 81.37, 25, 0.55, 181.76, 25, 3.04, 14.01, 24, 3.30, 617.81, 24, 2.20, 628.85, 24, 5.67, 443.86, 24, 5.60, 32.20, 24, 4.95, 561.18, 24, 0.66, 46.21, 23, 3.81, 55.14, 23, 5.85, 297.64, 22, 4.82, 135.55, 22, 4.62, 391.17, 22, 4.59, 241.61, 22, 1.23, 41.10, 21, 5.27, 159.12, 21, 4.19, 329.73, 21, 0.24, 465.96, 21, 0.91, 76.48, 20, 3.16, 186.21, 20, 0.66, 66.70, 20, 1.30, 518.65, 20, 4.91, 909.82, - /*R2*/ 22440, 0.69953, 74.78160, 4727, 1.6990, 63.7359, 1682, 4.6483, 70.8494, 1650, 3.0966, 11.0457, 1434, 3.5212, 149.5632, 770, 0.000, 0.000, 500, 6.172, 76.266, 461, 0.767, 3.932, 390, 4.496, 56.622, 390, 5.527, 85.827, 292, 0.204, 52.690, 287, 3.534, 73.297, 273, 3.847, 138.517, 220, 1.964, 131.404, 216, 0.848, 77.963, 205, 3.248, 78.714, 149, 4.898, 127.472, 129, 2.081, 3.181, 117, 4.934, 447.796, 114, 4.787, 145.631, 113, 1.014, 462.023, 104, 3.586, 71.600, 99, 6.16, 224.34, 91, 0.68, 18.16, 89, 0.23, 202.25, 88, 2.93, 62.25, 71, 6.10, 454.91, 64, 3.39, 1.48, 64, 3.96, 67.67, 62, 3.30, 351.82, 59, 5.56, 9.56, 58, 4.91, 22.09, 51, 3.87, 65.22, 49, 3.75, 269.92, 44, 5.90, 71.81, 44, 1.93, 59.80, 42, 6.14, 284.15, 42, 2.62, 151.05, 42, 2.09, 12.53, 37, 5.91, 984.60, 36, 5.40, 77.75, 31, 4.59, 148.08, 31, 2.27, 195.14, 28, 4.58, 77.23, 28, 4.91, 277.03, 27, 3.53, 209.37, 26, 0.66, 120.36, 24, 5.87, 69.36, 23, 1.04, 84.34, 23, 1.71, 160.61, 21, 2.20, 45.58, 20, 2.32, 2.45, 17, 4.37, 54.17, 17, 4.78, 213.30, 17, 1.86, 340.77, 16, 0.40, 265.99, 16, 3.65, 152.74, 15, 5.44, 408.44, 14, 3.39, 358.93, 13, 1.53, 422.67, 13, 5.25, 137.03, 13, 1.26, 134.59, 13, 4.43, 87.31, 13, 3.03, 92.94, 12, 1.33, 51.21, 12, 3.24, 116.43, 12, 5.10, 191.21, 12, 4.66, 41.64, 12, 3.73, 220.41, 12, 4.17, 60.55, 11, 2.03, 7.11, 11, 1.08, 72.33, 10, 1.19, 344.70, 10, 0.33, 70.33, 10, 5.97, 35.16, 10, 3.06, 2.97, 10, 0.39, 415.55, 9, 2.44, 565.12, 9, 6.05, 146.38, 9, 5.19, 225.83, 9, 6.01, 5.42, 9, 5.82, 153.50, 9, 5.25, 347.88, 8, 3.91, 333.66, 8, 4.49, 70.12, 8, 3.72, 14.98, 8, 2.27, 299.13, 8, 2.26, 206.19, 8, 5.72, 55.14, 8, 0.90, 222.86, 7, 1.51, 991.71, 7, 1.18, 96.87, - /*R3*/ 1164, 4.7345, 74.7816, 212, 3.343, 63.736, 196, 2.980, 70.849, 105, 0.958, 11.046, 73, 1.00, 149.56, 72, 0.03, 56.62, 55, 2.59, 3.93, 36, 5.65, 77.96, 34, 3.82, 76.27, 32, 3.60, 131.40, 30, 3.44, 85.83, 28, 0.43, 3.18, 27, 2.55, 52.69, 25, 5.14, 78.71, 19, 5.13, 18.16, 18, 0.00, 0.00, 16, 5.20, 71.60, 16, 0.37, 447.80, 15, 2.97, 145.63, 15, 5.57, 462.02, 15, 3.86, 73.30, 11, 6.03, 138.52, 11, 3.58, 224.34, 8, 2.62, 22.09, 8, 0.30, 127.47, 8, 1.45, 1.48, 7, 5.44, 269.92, 7, 0.01, 151.05, 6, 4.37, 284.15, 6, 4.23, 373.01, 5, 4.16, 195.14, 5, 0.78, 62.25, 5, 1.84, 202.25, 5, 2.78, 120.36, 4, 3.96, 9.56, 4, 1.84, 72.33, 4, 1.86, 152.74, 4, 1.89, 209.37, 4, 1.05, 92.94, 4, 2.00, 65.22, 4, 1.17, 153.50, 4, 3.93, 124.29, 3, 1.54, 148.08, 3, 1.41, 351.82, 3, 2.99, 387.24, 3, 5.84, 160.61, 3, 6.04, 12.53, 3, 0.79, 572.23, 3, 5.65, 134.59, 3, 2.77, 213.30, 3, 1.99, 450.98, - /*R4*/ 53, 3.01, 74.78, 10, 1.91, 56.62, 7, 5.09, 11.05, 7, 5.43, 149.56, 4, 5.23, 131.40, 3, 1.30, 85.83, 3, 3.14, 0.00, 3, 0.44, 63.74, 2, 6.21, 358.93, 2, 0.92, 145.63, 2, 2.23, 440.68}, - - //Dnep精度:J2000+-4千年 黄经1角秒 黄纬1角秒 距离40AU/10^6 - []float64{ - 100000000, //A的倍率 - 20, 188, 260, 281, 293, 299, 302, 359, 404, 419, 422, 425, 425, 638, 701, 743, 746, 746, 746, //位置索引表 - /*L0*/ 531188633, 0.000000000, 0.000000000, 1798476, 2.9010127, 38.1330356, 1019728, 0.4858092, 1.4844727, 124532, 4.830081, 36.648563, 42064, 5.41055, 2.96895, 37715, 6.09222, 35.16409, 33785, 1.24489, 76.26607, 16483, 0.00008, 491.55793, 9199, 4.9375, 39.6175, 8994, 0.2746, 175.1661, 4216, 1.9871, 73.2971, 3365, 1.0359, 33.6796, 2285, 4.2061, 4.4534, 1434, 2.7834, 74.7816, 900, 2.076, 109.946, 745, 3.190, 71.813, 506, 5.748, 114.399, 400, 0.350, 1021.249, 345, 3.462, 41.102, 340, 3.304, 77.751, 323, 2.248, 32.195, 306, 0.497, 0.521, 287, 4.505, 0.048, 282, 2.246, 146.594, 267, 4.889, 0.963, 252, 5.782, 388.465, 245, 1.247, 9.561, 233, 2.505, 137.033, 227, 1.797, 453.425, 170, 3.324, 108.461, 151, 2.192, 33.940, 150, 2.997, 5.938, 148, 0.859, 111.430, 119, 3.677, 2.448, 109, 2.416, 183.243, 103, 0.041, 0.261, 103, 4.404, 70.328, 102, 5.705, 0.112, 98, 2.81, 8.08, 86, 4.23, 490.07, 82, 5.20, 493.04, 78, 4.16, 4.19, 74, 1.33, 529.69, 72, 5.30, 350.33, 64, 3.55, 168.05, 63, 0.15, 182.28, 58, 3.50, 145.11, 48, 1.11, 112.91, 48, 0.13, 484.44, 48, 2.58, 219.89, 47, 4.57, 46.21, 47, 4.50, 173.68, 47, 3.02, 498.67, 45, 5.47, 176.65, 39, 1.67, 213.30, 39, 2.39, 2.92, - /*L1*/ 3837687717, 0.0000000000, 0.0000000000, 16604, 4.86319, 1.48447, 15807, 2.27923, 38.13304, 3335, 3.6820, 76.2661, 1306, 3.6732, 2.9689, 605, 1.505, 35.164, 179, 3.453, 39.618, 107, 2.451, 4.453, 106, 2.755, 33.680, 73, 5.49, 36.65, 57, 1.86, 114.40, 57, 5.22, 0.52, 35, 4.52, 74.78, 32, 5.90, 77.75, 30, 3.67, 388.47, 29, 5.17, 9.56, 29, 5.17, 2.45, 26, 5.25, 168.05, 25, 4.73, 182.28, 20, 5.79, 1021.25, 19, 1.83, 484.44, 19, 1.32, 498.67, 15, 3.99, 32.20, 15, 4.95, 137.03, - /*L2*/ 53893, 0.00000, 0.00000, 296, 1.855, 1.484, 281, 1.191, 38.133, 270, 5.721, 76.266, 23, 1.21, 2.97, 9, 4.43, 35.16, 7, 0.54, 2.45, - /*L3*/ 31, 0.00, 0.00, 15, 1.35, 76.27, 12, 6.04, 1.48, 12, 6.11, 38.13, - /*L4*/ 114, 3.142, 0.000, 1, 3.18, 76.27, - /*L5*/ 1, 3.14, 0.00, - /*B0*/ 3088623, 1.4410437, 38.1330356, 27780, 5.91272, 76.26607, 27624, 0.00000, 0.00000, 15448, 3.50877, 39.61751, 15355, 2.52124, 36.64856, 2000, 1.5100, 74.7816, 1968, 4.3778, 1.4845, 1015, 3.2156, 35.1641, 606, 2.802, 73.297, 595, 2.129, 41.102, 589, 3.187, 2.969, 402, 4.169, 114.399, 280, 1.682, 77.751, 262, 3.767, 213.299, 254, 3.271, 453.425, 206, 4.257, 529.691, 140, 3.530, 137.033, 99, 4.17, 33.68, 68, 4.67, 71.81, - /*B1*/ 227279, 3.807931, 38.133036, 1803, 1.9758, 76.2661, 1433, 3.1416, 0.0000, 1386, 4.8256, 36.6486, 1073, 6.0805, 39.6175, 148, 3.858, 74.782, 136, 0.478, 1.484, 70, 6.19, 35.16, 52, 5.05, 73.30, 43, 0.31, 114.40, 37, 4.89, 41.10, 37, 5.76, 2.97, 26, 5.22, 213.30, 19, 0.90, 453.42, 17, 4.26, 77.75, - /*B2*/ 9691, 5.5712, 38.1330, 79, 3.63, 76.27, 72, 0.45, 36.65, 59, 3.14, 0.00, 30, 1.61, 39.62, - /*B3*/ 273, 1.017, 38.133, - /*B4*/ 6, 2.67, 38.13, - /*B5*/ - /*R0*/ 3007013206, 0.0000000000, 0.0000000000, 27062259, 1.32999459, 38.13303564, 1691764, 3.2518614, 36.6485629, 807831, 5.185928, 1.484473, 537761, 4.521139, 35.164090, 495726, 1.571057, 491.557929, 274572, 1.845523, 175.166060, 135134, 3.372206, 39.617508, 121802, 5.797544, 76.266071, 100895, 0.377027, 73.297126, 69792, 3.79617, 2.96895, 46688, 5.74938, 33.67962, 24594, 0.50802, 109.94569, 16939, 1.59422, 71.81265, 14230, 1.07786, 74.78160, 12012, 1.92062, 1021.24889, 8395, 0.6782, 146.5943, 7572, 1.0715, 388.4652, 5721, 2.5906, 4.4534, 4840, 1.9069, 41.1020, 4483, 2.9057, 529.6910, 4421, 1.7499, 108.4612, 4354, 0.6799, 32.1951, 4270, 3.4134, 453.4249, 3381, 0.8481, 183.2428, 2881, 1.9860, 137.0330, 2879, 3.6742, 350.3321, 2636, 3.0976, 213.2991, 2530, 5.7984, 490.0735, 2523, 0.4863, 493.0424, 2306, 2.8096, 70.3282, 2087, 0.6186, 33.9402, 1977, 5.1170, 168.0525, 1905, 1.7219, 182.2796, 1654, 1.9278, 145.1098, 1499, 1.0162, 219.8914, 1435, 1.7001, 484.4444, 1403, 6.0766, 173.6816, 1403, 4.5891, 498.6715, 1399, 0.7622, 176.6505, 1228, 1.5988, 77.7505, 1129, 5.9666, 9.5612, 835, 3.971, 114.399, 811, 3.003, 46.210, 732, 2.104, 181.758, 705, 1.187, 256.540, 616, 2.979, 106.977, 530, 4.241, 111.430, 502, 1.387, 5.938, 437, 2.270, 1550.940, 422, 5.532, 525.498, 421, 1.891, 30.711, 400, 1.256, 8.077, 382, 3.300, 983.116, 355, 2.278, 218.407, 345, 1.359, 293.189, 333, 5.751, 39.096, 321, 1.506, 454.909, 314, 3.959, 381.352, 309, 2.855, 72.073, 307, 0.320, 601.764, 306, 2.725, 6244.943, 294, 4.891, 528.206, 292, 4.024, 68.844, 281, 4.542, 44.725, 280, 1.541, 98.900, 268, 5.133, 112.915, 251, 3.540, 312.199, 248, 3.411, 37.612, 246, 1.015, 141.226, 240, 3.164, 143.625, - /*R1*/ 236339, 0.704980, 38.133036, 13220, 3.32015, 1.48447, 8622, 6.2163, 35.1641, 2702, 1.8814, 39.6175, 2155, 2.0943, 2.9689, 2153, 5.1687, 76.2661, 1603, 0.0000, 0.0000, 1464, 1.1842, 33.6796, 1136, 3.9189, 36.6486, 898, 5.241, 388.465, 790, 0.533, 168.053, 760, 0.021, 182.280, 607, 1.077, 1021.249, 572, 3.401, 484.444, 561, 2.887, 498.671, 490, 3.468, 137.033, 271, 3.274, 71.813, 264, 0.862, 4.453, 204, 2.418, 32.195, 155, 0.365, 41.102, 133, 3.602, 9.561, - /*R2*/ 4247, 5.8991, 38.1330, 218, 0.346, 1.484, 163, 2.239, 168.053, 156, 4.594, 182.280, 127, 2.848, 35.164, 118, 5.103, 484.444, 112, 1.190, 498.671, 99, 3.42, 175.17, 77, 0.02, 491.56, 65, 3.46, 388.47, 50, 4.07, 76.27, 39, 6.10, 1021.25, 37, 5.97, 2.97, 36, 5.17, 137.03, - /*R3*/ 166, 4.552, 38.133}, - } - - sata := 0 - if xt == -1 { - xt = 0 - sata = 1 - } - rad := 180.0000 * 3600.0000 / math.Pi - - n := -1 - t := (jd - 2451545) / 36525.0000 - t /= 10 //转为儒略千年数 - - tn := float64(1) - F := XL0[xt] - pn := zn*6 + 1 - N0 := F[pn+1] - F[pn] //N0序列总数 - var N, v float64 - for i := 0; i < 6; i++ { - n1 := F[pn+i] - n2 := F[pn+1+i] - n0 := n2 - n1 - if n0 == 0 { - continue - } - if n < 0 { - N = n2 //确定项数 - } else { - N = math.Floor(3*float64(n)*n0/N0+0.5) + n1 - } - if i != 0 { - N += 3 - } - if N > n2 { - N = n2 - } - - var c float64 - for j := n1; j < N; j += 3 { - c += F[int(j)] * math.Cos(F[int(j)+1]+t*F[int(j)+2]) - } - v += c * tn - tn *= t - } - v /= F[0] - - if xt == 0 { //地球 - t2 := t * t - t3 := t2 * t //千年数的各次方 - if zn == 0 { - v += (-0.0728 - 2.7702*t - 1.1019*t2 - 0.0996*t3) / rad - } else if zn == 1 { - v += (+0.0000 + 0.0004*t + 0.0004*t2 - 0.0026*t3) / rad - } else if zn == 2 { - v += (-0.0020 + 0.0044*t + 0.0213*t2 - 0.0250*t3) / 1000000 - } - } else { //其它行星 - XL0_xzb := []float64{ //行星星历修正表 - //经(角秒),纬(角秒), 距(10-6AU) - -0.08631, +0.00039, -0.00008, //水星 - -0.07447, +0.00006, +0.00017, //金星 - -0.07135, -0.00026, -0.00176, //火星 - -0.20239, +0.00273, -0.00347, //木星 - -0.25486, +0.00276, +0.42926, //土星 - +0.24588, +0.00345, -14.46266, //天王星 - -0.95116, +0.02481, +58.30651, //海王星 - } - dv := XL0_xzb[(xt-1)*3+zn] - if zn == 0 { - v += -3 * t / rad - } - if zn == 2 { - v += dv / 1000000 - } else { - v += dv / rad - } - } - if zn == 0 && xt == 0 { - if sata != 0 { - return (Limit360(v * 180 / math.Pi)) - } - return (Limit360(v*180/math.Pi + 180)) - } - if zn == 1 && xt == 0 { - if sata != 0 { - return (v * 180 / math.Pi) - } - return (-(v * 180 / math.Pi)) - } - if xt > 0 && zn == 1 { - return (v * 180 / math.Pi) - } - if xt > 0 && zn == 0 { - return (Limit360(v * 180 / math.Pi)) - } - return v -} diff --git a/vendor/github.com/starainrt/astro/sun/sun.go b/vendor/github.com/starainrt/astro/sun/sun.go deleted file mode 100644 index fe84d2e..0000000 --- a/vendor/github.com/starainrt/astro/sun/sun.go +++ /dev/null @@ -1,275 +0,0 @@ -package sun - -import ( - "errors" - "math" - "time" - - "github.com/starainrt/astro/basic" -) - -var ( - ERR_SUN_NEVER_RISE = errors.New("ERROR:极夜,太阳在今日永远在地平线下!") - ERR_SUN_NEVER_DOWN = errors.New("ERROR:极昼,太阳在今日永远在地平线上!") - ERR_TWILIGHT_NOT_EXISTS = errors.New("ERROR:今日晨昏朦影不存在!") -) - -/* -太阳 -视星等 −26.74 -绝对星等 4.839 -光谱类型 G2V -金属量 Z = 0.0122 -角直径 31.6′ – 32.7′ -*/ - -// RiseTime 太阳升起时间 -// date,取日期,时区忽略 -// lon,经度,东正西负 -// lat,纬度,北正南负 -// height,高度 -// aero,true时进行大气修正 -func RiseTime(date time.Time, lon, lat, height float64, aero bool) (time.Time, error) { - var err error - var aeroFloat float64 - if aero { - aeroFloat = 1 - } - if date.Hour() > 12 { - date = date.Add(time.Hour * -12) - } - jde := basic.Date2JDE(date) - _, loc := date.Zone() - timezone := float64(loc) / 3600.0 - riseJde := basic.GetSunRiseTime(jde, lon, lat, timezone, aeroFloat, height) - if riseJde == -2 { - err = ERR_SUN_NEVER_RISE - } - if riseJde == -1 { - err = ERR_SUN_NEVER_DOWN - } - return basic.JDE2DateByZone(riseJde, date.Location(), true), err -} - -// SunDownTime 太阳落下时间 -// date,当地时区日期,务必做时区修正 -// lon,经度,东正西负 -// lat,纬度,北正南负 -// height,高度 -// aero,true时进行大气修正 -func DownTime(date time.Time, lon, lat, height float64, aero bool) (time.Time, error) { - var err error - var aeroFloat float64 - if aero { - aeroFloat = 1 - } - if date.Hour() > 12 { - date = date.Add(time.Hour * -12) - } - jde := basic.Date2JDE(date) - _, loc := date.Zone() - timezone := float64(loc) / 3600.0 - downJde := basic.GetSunDownTime(jde, lon, lat, timezone, aeroFloat, height) - if downJde == -2 { - err = ERR_SUN_NEVER_RISE - } - if downJde == -1 { - err = ERR_SUN_NEVER_DOWN - } - return basic.JDE2DateByZone(downJde, date.Location(), true), err -} - -// MorningTwilight 晨朦影 -// date,当地时区日期 -// lon,经度,东正西负 -// lat,纬度,北正南负 -// angle,朦影角度:可选-6 -12 -18(民用、航海、天文) -func MorningTwilight(date time.Time, lon, lat, angle float64) (time.Time, error) { - var err error - if date.Hour() > 12 { - date = date.Add(time.Hour * -12) - } - jde := basic.Date2JDE(date) - _, loc := date.Zone() - timezone := float64(loc) / 3600.0 - calcJde := basic.GetAsaTime(jde, lon, lat, timezone, angle) - if calcJde == -2 { - err = ERR_TWILIGHT_NOT_EXISTS - } - if calcJde == -1 { - err = ERR_TWILIGHT_NOT_EXISTS - } - return basic.JDE2Date(calcJde), err -} - -// EveningTwilight 昏朦影 -// date,当地时区日期 -// lon,经度,东正西负 -// lat,纬度,北正南负 -// angle,朦影角度:可选-6 -12 -18(民用、航海、天文) -func EveningTwilight(date time.Time, lon, lat, angle float64) (time.Time, error) { - var err error - if date.Hour() > 12 { - date = date.Add(time.Hour * -12) - } - jde := basic.Date2JDE(date) - _, loc := date.Zone() - timezone := float64(loc) / 3600.0 - //不需要进行力学时转换,会在GetBanTime中转换 - calcJde := basic.GetBanTime(jde, lon, lat, timezone, angle) - if calcJde == -2 { - err = ERR_TWILIGHT_NOT_EXISTS - } - if calcJde == -1 { - err = ERR_TWILIGHT_NOT_EXISTS - } - return basic.JDE2Date(calcJde), err -} - -// EclipticObliquity 黄赤交角 -// 返回date对应UTC世界时的黄赤交角,nutation为true时,计算交角章动 -func EclipticObliquity(date time.Time, nutation bool) float64 { - //转换为UTC时间 - jde := basic.Date2JDE(date.UTC()) - //进行力学时转换 - jde = basic.TD2UT(jde, true) - //黄赤交角计算 - return basic.EclipticObliquity(jde, nutation) -} - -// EclipticNutation 黄经章动 -// 返回date对应UTC世界时的黄经章动 -func EclipticNutation(date time.Time) float64 { - //转换为UTC时间 - jde := basic.Date2JDE(date.UTC()) - //进行力学时转换与章动计算 - return basic.HJZD(basic.TD2UT(jde, true)) -} - -// AxialtiltNutation 交角章动 -// 返回date对应UTC世界时的交角章动 -func AxialtiltNutation(date time.Time) float64 { - //转换为UTC时间 - jde := basic.Date2JDE(date.UTC()) - //进行力学时转换与章动计算 - return basic.JJZD(basic.TD2UT(jde, true)) -} - -// GeometricLo 太阳几何黄经 -// 返回date对应UTC世界时的太阳几何黄经 -func GeometricLo(date time.Time) float64 { - //转换为UTC时间 - jde := basic.Date2JDE(date.UTC()) - return basic.SunLo(basic.TD2UT(jde, true)) -} - -// TrueLo 太阳真黄经 -// 返回date对应UTC世界时的太阳真黄经 -func TrueLo(date time.Time) float64 { - //转换为UTC时间 - jde := basic.Date2JDE(date.UTC()) - return basic.HSunTrueLo(basic.TD2UT(jde, true)) -} - -// TrueBo 太阳真黄纬 -// 返回date对应UTC世界时的太阳真黄纬 -func TrueBo(date time.Time) float64 { - //转换为UTC时间 - jde := basic.Date2JDE(date.UTC()) - return basic.HSunTrueLo(basic.TD2UT(jde, true)) -} - -// ApparentLo 太阳视黄经 -// 返回date对应UTC世界时的太阳视黄经 -func ApparentLo(date time.Time) float64 { - //转换为UTC时间 - jde := basic.Date2JDE(date.UTC()) - return basic.HSunApparentLo(basic.TD2UT(jde, true)) -} - -// ApparentRa 太阳地心视赤经 -// 返回date对应UTC世界时的太阳视赤经(使用黄道坐标转换,且默认忽略黄纬) -func ApparentRa(date time.Time) float64 { - //转换为UTC时间 - jde := basic.Date2JDE(date.UTC()) - return basic.HSunApparentRa(basic.TD2UT(jde, true)) -} - -// ApparentDec 太阳地心视赤纬 -// 返回date对应UTC世界时的太阳视赤纬(使用黄道坐标转换,且默认忽略黄纬) -func ApparentDec(date time.Time) float64 { - //转换为UTC时间 - jde := basic.Date2JDE(date.UTC()) - return basic.HSunApparentDec(basic.TD2UT(jde, true)) -} - -// ApparentRaDec 太阳地心视赤经和赤纬 -// 返回date对应UTC世界时的太阳视赤纬(使用黄道坐标转换,且默认忽略黄纬) -func ApparentRaDec(date time.Time) (float64, float64) { - //转换为UTC时间 - jde := basic.Date2JDE(date.UTC()) - return basic.HSunApparentRaDec(basic.TD2UT(jde, true)) -} - -// MidFunc 太阳中间方程 -func MidFunc(date time.Time) float64 { - //转换为UTC时间 - jde := basic.Date2JDE(date.UTC()) - return basic.SunMidFun(basic.TD2UT(jde, true)) -} - -// EquationTime 均时差 -// 返回date对应UTC世界时的均时差 -func EquationTime(date time.Time) float64 { - //转换为UTC时间 - jde := basic.Date2JDE(date.UTC()) - return basic.SunTime(basic.TD2UT(jde, true)) -} - -// HourAngle 太阳时角 -// 返回给定经纬度、对应date时区date时刻的太阳时角( -func HourAngle(date time.Time, lon, lat float64) float64 { - jde := basic.Date2JDE(date) - _, loc := date.Zone() - timezone := float64(loc) / 3600.0 - return basic.SunTimeAngle(jde, lon, lat, timezone) -} - -// Azimuth 太阳方位角 -// 返回给定经纬度、对应date时区date时刻的太阳方位角(正北为0,向东增加) -func Azimuth(date time.Time, lon, lat float64) float64 { - jde := basic.Date2JDE(date) - _, loc := date.Zone() - timezone := float64(loc) / 3600.0 - return basic.SunAngle(jde, lon, lat, timezone) -} - -// Zenith 太阳高度角 -// 返回给定经纬度、对应date时区date时刻的太阳高度角 -func Zenith(date time.Time, lon, lat float64) float64 { - jde := basic.Date2JDE(date) - _, loc := date.Zone() - timezone := float64(loc) / 3600.0 - return basic.SunHeight(jde, lon, lat, timezone) -} - -// CulminationTime 太阳中天时间 -// 返回给定经纬度、对应date时区date时刻的太阳中天日期 -func CulminationTime(date time.Time, lon float64) time.Time { - jde := basic.Date2JDE(date) - if jde-math.Floor(jde) > 0.5 { - jde++ - } - _, loc := date.Zone() - timezone := float64(loc) / 3600.0 - calcJde := basic.GetSunTZTime(jde, lon, timezone) - timezone/24.00 - return basic.JDE2DateByZone(calcJde, date.Location(), false) -} - -// EarthDistance 日地距离 -// 返回date对应UTC世界时日地距离 -func EarthDistance(date time.Time) float64 { - jde := basic.Date2JDE(date.UTC()) - jde = basic.TD2UT(jde, true) - return basic.EarthAway(jde) -} diff --git a/vendor/github.com/starainrt/astro/tools/format.go b/vendor/github.com/starainrt/astro/tools/format.go deleted file mode 100644 index afcb469..0000000 --- a/vendor/github.com/starainrt/astro/tools/format.go +++ /dev/null @@ -1,24 +0,0 @@ -package tools - -import ( - "fmt" - "math" -) - -func Format(val float64, typed uint8) string { - belowZero := false - if val < 0 { - belowZero = true - val = -val - } - degree := math.Floor(val) - min := math.Floor((val - degree) * 60) - sec := (val - degree - min/60) * 3600 - if belowZero { - degree = -degree - } - if typed == 0 { - return fmt.Sprintf("%.0f°%.0f′%.2f″", degree, min, sec) - } - return fmt.Sprintf("%.0fh%.0fm%.2fs", degree, min, sec) -} diff --git a/vendor/github.com/starainrt/astro/tools/math.go b/vendor/github.com/starainrt/astro/tools/math.go deleted file mode 100644 index adf64a0..0000000 --- a/vendor/github.com/starainrt/astro/tools/math.go +++ /dev/null @@ -1,53 +0,0 @@ -package tools - -import ( - "math" -) - -func Sin(x float64) float64 { - return (math.Sin(x * math.Pi / 180.00000)) -} - -func Cos(x float64) float64 { - return (math.Cos(x * math.Pi / 180.00000)) -} - -func Tan(x float64) float64 { - return (math.Tan(x * math.Pi / 180.00000)) -} - -func ArcSin(x float64) float64 { - return (math.Asin(x) / math.Pi * 180.00000) -} - -func ArcCos(x float64) float64 { - return (math.Acos(x) / math.Pi * 180.00000) -} - -func ArcTan(x float64) float64 { - return (math.Atan(x) / math.Pi * 180.00000) -} - -func FloatRound(f float64, n int) float64 { - p := math.Pow10(n) - return math.Floor(f*p+0.5) / p -} - -func Limit360(x float64) float64 { - x = math.Mod(x, 360) - if x < 0 { - x += 360 - } - return x -} - -func FR(f float64) float64 { - return FloatRound(f, 14) -} - -func Abs(x int) int { - if x < 0 { - return -x - } - return x -} diff --git a/vendor/github.com/subosito/gotenv/.env b/vendor/github.com/subosito/gotenv/.env deleted file mode 100644 index 6405eca..0000000 --- a/vendor/github.com/subosito/gotenv/.env +++ /dev/null @@ -1 +0,0 @@ -HELLO=world diff --git a/vendor/github.com/subosito/gotenv/.env.invalid b/vendor/github.com/subosito/gotenv/.env.invalid deleted file mode 100644 index 016d5e0..0000000 --- a/vendor/github.com/subosito/gotenv/.env.invalid +++ /dev/null @@ -1 +0,0 @@ -lol$wut diff --git a/vendor/github.com/subosito/gotenv/.gitignore b/vendor/github.com/subosito/gotenv/.gitignore deleted file mode 100644 index 7db37c1..0000000 --- a/vendor/github.com/subosito/gotenv/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.test -*.out -annotate.json -profile.cov diff --git a/vendor/github.com/subosito/gotenv/.golangci.yaml b/vendor/github.com/subosito/gotenv/.golangci.yaml deleted file mode 100644 index 8c82a76..0000000 --- a/vendor/github.com/subosito/gotenv/.golangci.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# Options for analysis running. -run: - timeout: 1m - -linters-settings: - gofmt: - simplify: true diff --git a/vendor/github.com/subosito/gotenv/CHANGELOG.md b/vendor/github.com/subosito/gotenv/CHANGELOG.md deleted file mode 100644 index c4fe7d3..0000000 --- a/vendor/github.com/subosito/gotenv/CHANGELOG.md +++ /dev/null @@ -1,105 +0,0 @@ -# Changelog - -## [1.5.0] - 2023-08-15 - -### Fixed - -- Use io.Reader instead of custom Reader - -## [1.5.0] - 2023-08-15 - -### Added - -- Support for reading UTF16 files - -### Fixed - -- Scanner error handling -- Reader error handling - -## [1.4.2] - 2023-01-11 - -### Fixed - -- Env var initialization - -### Changed - -- More consitent line splitting - -## [1.4.1] - 2022-08-23 - -### Fixed - -- Missing file close - -### Changed - -- Updated dependencies - -## [1.4.0] - 2022-06-02 - -### Added - -- Add `Marshal` and `Unmarshal` helpers - -### Changed - -- The CI will now run a linter and the tests on PRs. - -## [1.3.0] - 2022-05-23 - -### Added - -- Support = within double-quoted strings -- Add support for multiline values - -### Changed - -- `OverLoad` prefer environment variables over local variables - -## [1.2.0] - 2019-08-03 - -### Added - -- Add `Must` helper to raise an error as panic. It can be used with `Load` and `OverLoad`. -- Add more tests to be 100% coverage. -- Add CHANGELOG -- Add more OS for the test: OSX and Windows - -### Changed - -- Reduce complexity and improve source code for having `A+` score in [goreportcard](https://goreportcard.com/report/github.com/subosito/gotenv). -- Updated README with mentions to all available functions - -### Removed - -- Remove `ErrFormat` -- Remove `MustLoad` and `MustOverload`, replaced with `Must` helper. - -## [1.1.1] - 2018-06-05 - -### Changed - -- Replace `os.Getenv` with `os.LookupEnv` to ensure that the environment variable is not set, by [radding](https://github.com/radding) - -## [1.1.0] - 2017-03-20 - -### Added - -- Supports carriage return in env -- Handle files with UTF-8 BOM - -### Changed - -- Whitespace handling - -### Fixed - -- Incorrect variable expansion -- Handling escaped '$' characters - -## [1.0.0] - 2014-10-05 - -First stable release. - diff --git a/vendor/github.com/subosito/gotenv/LICENSE b/vendor/github.com/subosito/gotenv/LICENSE deleted file mode 100644 index f64ccae..0000000 --- a/vendor/github.com/subosito/gotenv/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Alif Rachmawadi - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/subosito/gotenv/README.md b/vendor/github.com/subosito/gotenv/README.md deleted file mode 100644 index fc9616e..0000000 --- a/vendor/github.com/subosito/gotenv/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# gotenv - -[![Build Status](https://github.com/subosito/gotenv/workflows/Go%20workflow/badge.svg)](https://github.com/subosito/gotenv/actions) -[![Coverage Status](https://badgen.net/codecov/c/github/subosito/gotenv)](https://codecov.io/gh/subosito/gotenv) -[![Go Report Card](https://goreportcard.com/badge/github.com/subosito/gotenv)](https://goreportcard.com/report/github.com/subosito/gotenv) -[![GoDoc](https://godoc.org/github.com/subosito/gotenv?status.svg)](https://godoc.org/github.com/subosito/gotenv) - -Load environment variables from `.env` or `io.Reader` in Go. - -## Usage - -Put the gotenv package on your `import` statement: - -```go -import "github.com/subosito/gotenv" -``` - -To modify your app environment variables, `gotenv` expose 2 main functions: - -- `gotenv.Load` -- `gotenv.Apply` - -By default, `gotenv.Load` will look for a file called `.env` in the current working directory. - -Behind the scene, it will then load `.env` file and export the valid variables to the environment variables. Make sure you call the method as soon as possible to ensure it loads all variables, say, put it on `init()` function. - -Once loaded you can use `os.Getenv()` to get the value of the variable. - -Let's say you have `.env` file: - -```sh -APP_ID=1234567 -APP_SECRET=abcdef -``` - -Here's the example of your app: - -```go -package main - -import ( - "github.com/subosito/gotenv" - "log" - "os" -) - -func init() { - gotenv.Load() -} - -func main() { - log.Println(os.Getenv("APP_ID")) // "1234567" - log.Println(os.Getenv("APP_SECRET")) // "abcdef" -} -``` - -You can also load other than `.env` file if you wish. Just supply filenames when calling `Load()`. It will load them in order and the first value set for a variable will win.: - -```go -gotenv.Load(".env.production", "credentials") -``` - -While `gotenv.Load` loads entries from `.env` file, `gotenv.Apply` allows you to use any `io.Reader`: - -```go -gotenv.Apply(strings.NewReader("APP_ID=1234567")) - -log.Println(os.Getenv("APP_ID")) -// Output: "1234567" -``` - -Both `gotenv.Load` and `gotenv.Apply` **DO NOT** overrides existing environment variables. If you want to override existing ones, you can see section below. - -### Environment Overrides - -Besides above functions, `gotenv` also provides another functions that overrides existing: - -- `gotenv.OverLoad` -- `gotenv.OverApply` - -Here's the example of this overrides behavior: - -```go -os.Setenv("HELLO", "world") - -// NOTE: using Apply existing value will be reserved -gotenv.Apply(strings.NewReader("HELLO=universe")) -fmt.Println(os.Getenv("HELLO")) -// Output: "world" - -// NOTE: using OverApply existing value will be overridden -gotenv.OverApply(strings.NewReader("HELLO=universe")) -fmt.Println(os.Getenv("HELLO")) -// Output: "universe" -``` - -### Throw a Panic - -Both `gotenv.Load` and `gotenv.OverLoad` returns an error on something wrong occurred, like your env file is not exist, and so on. To make it easier to use, `gotenv` also provides `gotenv.Must` helper, to let it panic when an error returned. - -```go -err := gotenv.Load(".env-is-not-exist") -fmt.Println("error", err) -// error: open .env-is-not-exist: no such file or directory - -gotenv.Must(gotenv.Load, ".env-is-not-exist") -// it will throw a panic -// panic: open .env-is-not-exist: no such file or directory -``` - -### Another Scenario - -Just in case you want to parse environment variables from any `io.Reader`, gotenv keeps its `Parse` and `StrictParse` function as public API so you can use that. - -```go -// import "strings" - -pairs := gotenv.Parse(strings.NewReader("FOO=test\nBAR=$FOO")) -// gotenv.Env{"FOO": "test", "BAR": "test"} - -pairs, err := gotenv.StrictParse(strings.NewReader(`FOO="bar"`)) -// gotenv.Env{"FOO": "bar"} -``` - -`Parse` ignores invalid lines and returns `Env` of valid environment variables, while `StrictParse` returns an error for invalid lines. - -## Notes - -The gotenv package is a Go port of [`dotenv`](https://github.com/bkeepers/dotenv) project with some additions made for Go. For general features, it aims to be compatible as close as possible. diff --git a/vendor/github.com/subosito/gotenv/gotenv.go b/vendor/github.com/subosito/gotenv/gotenv.go deleted file mode 100644 index 1191d35..0000000 --- a/vendor/github.com/subosito/gotenv/gotenv.go +++ /dev/null @@ -1,409 +0,0 @@ -// Package gotenv provides functionality to dynamically load the environment variables -package gotenv - -import ( - "bufio" - "bytes" - "fmt" - "io" - "os" - "path/filepath" - "regexp" - "sort" - "strconv" - "strings" - - "golang.org/x/text/encoding/unicode" - "golang.org/x/text/transform" -) - -const ( - // Pattern for detecting valid line format - linePattern = `\A\s*(?:export\s+)?([\w\.]+)(?:\s*=\s*|:\s+?)('(?:\'|[^'])*'|"(?:\"|[^"])*"|[^#\n]+)?\s*(?:\s*\#.*)?\z` - - // Pattern for detecting valid variable within a value - variablePattern = `(\\)?(\$)(\{?([A-Z0-9_]+)?\}?)` -) - -// Byte order mark character -var ( - bomUTF8 = []byte("\xEF\xBB\xBF") - bomUTF16LE = []byte("\xFF\xFE") - bomUTF16BE = []byte("\xFE\xFF") -) - -// Env holds key/value pair of valid environment variable -type Env map[string]string - -// Load is a function to load a file or multiple files and then export the valid variables into environment variables if they do not exist. -// When it's called with no argument, it will load `.env` file on the current path and set the environment variables. -// Otherwise, it will loop over the filenames parameter and set the proper environment variables. -func Load(filenames ...string) error { - return loadenv(false, filenames...) -} - -// OverLoad is a function to load a file or multiple files and then export and override the valid variables into environment variables. -func OverLoad(filenames ...string) error { - return loadenv(true, filenames...) -} - -// Must is wrapper function that will panic when supplied function returns an error. -func Must(fn func(filenames ...string) error, filenames ...string) { - if err := fn(filenames...); err != nil { - panic(err.Error()) - } -} - -// Apply is a function to load an io Reader then export the valid variables into environment variables if they do not exist. -func Apply(r io.Reader) error { - return parset(r, false) -} - -// OverApply is a function to load an io Reader then export and override the valid variables into environment variables. -func OverApply(r io.Reader) error { - return parset(r, true) -} - -func loadenv(override bool, filenames ...string) error { - if len(filenames) == 0 { - filenames = []string{".env"} - } - - for _, filename := range filenames { - f, err := os.Open(filename) - if err != nil { - return err - } - - err = parset(f, override) - f.Close() - if err != nil { - return err - } - } - - return nil -} - -// parse and set :) -func parset(r io.Reader, override bool) error { - env, err := strictParse(r, override) - if err != nil { - return err - } - - for key, val := range env { - setenv(key, val, override) - } - - return nil -} - -func setenv(key, val string, override bool) { - if override { - os.Setenv(key, val) - } else { - if _, present := os.LookupEnv(key); !present { - os.Setenv(key, val) - } - } -} - -// Parse is a function to parse line by line any io.Reader supplied and returns the valid Env key/value pair of valid variables. -// It expands the value of a variable from the environment variable but does not set the value to the environment itself. -// This function is skipping any invalid lines and only processing the valid one. -func Parse(r io.Reader) Env { - env, _ := strictParse(r, false) - return env -} - -// StrictParse is a function to parse line by line any io.Reader supplied and returns the valid Env key/value pair of valid variables. -// It expands the value of a variable from the environment variable but does not set the value to the environment itself. -// This function is returning an error if there are any invalid lines. -func StrictParse(r io.Reader) (Env, error) { - return strictParse(r, false) -} - -// Read is a function to parse a file line by line and returns the valid Env key/value pair of valid variables. -// It expands the value of a variable from the environment variable but does not set the value to the environment itself. -// This function is skipping any invalid lines and only processing the valid one. -func Read(filename string) (Env, error) { - f, err := os.Open(filename) - if err != nil { - return nil, err - } - defer f.Close() - return strictParse(f, false) -} - -// Unmarshal reads a string line by line and returns the valid Env key/value pair of valid variables. -// It expands the value of a variable from the environment variable but does not set the value to the environment itself. -// This function is returning an error if there are any invalid lines. -func Unmarshal(str string) (Env, error) { - return strictParse(strings.NewReader(str), false) -} - -// Marshal outputs the given environment as a env file. -// Variables will be sorted by name. -func Marshal(env Env) (string, error) { - lines := make([]string, 0, len(env)) - for k, v := range env { - if d, err := strconv.Atoi(v); err == nil { - lines = append(lines, fmt.Sprintf(`%s=%d`, k, d)) - } else { - lines = append(lines, fmt.Sprintf(`%s=%q`, k, v)) - } - } - sort.Strings(lines) - return strings.Join(lines, "\n"), nil -} - -// Write serializes the given environment and writes it to a file -func Write(env Env, filename string) error { - content, err := Marshal(env) - if err != nil { - return err - } - // ensure the path exists - if err := os.MkdirAll(filepath.Dir(filename), 0o775); err != nil { - return err - } - // create or truncate the file - file, err := os.Create(filename) - if err != nil { - return err - } - defer file.Close() - _, err = file.WriteString(content + "\n") - if err != nil { - return err - } - - return file.Sync() -} - -// splitLines is a valid SplitFunc for a bufio.Scanner. It will split lines on CR ('\r'), LF ('\n') or CRLF (any of the three sequences). -// If a CR is immediately followed by a LF, it is treated as a CRLF (one single line break). -func splitLines(data []byte, atEOF bool) (advance int, token []byte, err error) { - if atEOF && len(data) == 0 { - return 0, nil, bufio.ErrFinalToken - } - - idx := bytes.IndexAny(data, "\r\n") - switch { - case atEOF && idx < 0: - return len(data), data, bufio.ErrFinalToken - - case idx < 0: - return 0, nil, nil - } - - // consume CR or LF - eol := idx + 1 - // detect CRLF - if len(data) > eol && data[eol-1] == '\r' && data[eol] == '\n' { - eol++ - } - - return eol, data[:idx], nil -} - -func strictParse(r io.Reader, override bool) (Env, error) { - env := make(Env) - - buf := new(bytes.Buffer) - tee := io.TeeReader(r, buf) - - // There can be a maximum of 3 BOM bytes. - bomByteBuffer := make([]byte, 3) - _, err := tee.Read(bomByteBuffer) - if err != nil && err != io.EOF { - return env, err - } - - z := io.MultiReader(buf, r) - - // We chooes a different scanner depending on file encoding. - var scanner *bufio.Scanner - - if bytes.HasPrefix(bomByteBuffer, bomUTF8) { - scanner = bufio.NewScanner(transform.NewReader(z, unicode.UTF8BOM.NewDecoder())) - } else if bytes.HasPrefix(bomByteBuffer, bomUTF16LE) { - scanner = bufio.NewScanner(transform.NewReader(z, unicode.UTF16(unicode.LittleEndian, unicode.ExpectBOM).NewDecoder())) - } else if bytes.HasPrefix(bomByteBuffer, bomUTF16BE) { - scanner = bufio.NewScanner(transform.NewReader(z, unicode.UTF16(unicode.BigEndian, unicode.ExpectBOM).NewDecoder())) - } else { - scanner = bufio.NewScanner(z) - } - - scanner.Split(splitLines) - - for scanner.Scan() { - if err := scanner.Err(); err != nil { - return env, err - } - - line := strings.TrimSpace(scanner.Text()) - if line == "" || line[0] == '#' { - continue - } - - quote := "" - // look for the delimiter character - idx := strings.Index(line, "=") - if idx == -1 { - idx = strings.Index(line, ":") - } - // look for a quote character - if idx > 0 && idx < len(line)-1 { - val := strings.TrimSpace(line[idx+1:]) - if val[0] == '"' || val[0] == '\'' { - quote = val[:1] - // look for the closing quote character within the same line - idx = strings.LastIndex(strings.TrimSpace(val[1:]), quote) - if idx >= 0 && val[idx] != '\\' { - quote = "" - } - } - } - // look for the closing quote character - for quote != "" && scanner.Scan() { - l := scanner.Text() - line += "\n" + l - idx := strings.LastIndex(l, quote) - if idx > 0 && l[idx-1] == '\\' { - // foud a matching quote character but it's escaped - continue - } - if idx >= 0 { - // foud a matching quote - quote = "" - } - } - - if quote != "" { - return env, fmt.Errorf("missing quotes") - } - - err := parseLine(line, env, override) - if err != nil { - return env, err - } - } - - return env, scanner.Err() -} - -var ( - lineRgx = regexp.MustCompile(linePattern) - unescapeRgx = regexp.MustCompile(`\\([^$])`) - varRgx = regexp.MustCompile(variablePattern) -) - -func parseLine(s string, env Env, override bool) error { - rm := lineRgx.FindStringSubmatch(s) - - if len(rm) == 0 { - return checkFormat(s, env) - } - - key := strings.TrimSpace(rm[1]) - val := strings.TrimSpace(rm[2]) - - var hsq, hdq bool - - // check if the value is quoted - if l := len(val); l >= 2 { - l -= 1 - // has double quotes - hdq = val[0] == '"' && val[l] == '"' - // has single quotes - hsq = val[0] == '\'' && val[l] == '\'' - - // remove quotes '' or "" - if hsq || hdq { - val = val[1:l] - } - } - - if hdq { - val = strings.ReplaceAll(val, `\n`, "\n") - val = strings.ReplaceAll(val, `\r`, "\r") - - // Unescape all characters except $ so variables can be escaped properly - val = unescapeRgx.ReplaceAllString(val, "$1") - } - - if !hsq { - fv := func(s string) string { - return varReplacement(s, hsq, env, override) - } - val = varRgx.ReplaceAllStringFunc(val, fv) - } - - env[key] = val - return nil -} - -func parseExport(st string, env Env) error { - if strings.HasPrefix(st, "export") { - vs := strings.SplitN(st, " ", 2) - - if len(vs) > 1 { - if _, ok := env[vs[1]]; !ok { - return fmt.Errorf("line `%s` has an unset variable", st) - } - } - } - - return nil -} - -var varNameRgx = regexp.MustCompile(`(\$)(\{?([A-Z0-9_]+)\}?)`) - -func varReplacement(s string, hsq bool, env Env, override bool) string { - if s == "" { - return s - } - - if s[0] == '\\' { - // the dollar sign is escaped - return s[1:] - } - - if hsq { - return s - } - - mn := varNameRgx.FindStringSubmatch(s) - - if len(mn) == 0 { - return s - } - - v := mn[3] - - if replace, ok := os.LookupEnv(v); ok && !override { - return replace - } - - if replace, ok := env[v]; ok { - return replace - } - - return os.Getenv(v) -} - -func checkFormat(s string, env Env) error { - st := strings.TrimSpace(s) - - if st == "" || st[0] == '#' { - return nil - } - - if err := parseExport(st, env); err != nil { - return err - } - - return fmt.Errorf("line `%s` doesn't match format", s) -} diff --git a/vendor/github.com/x-cray/logrus-prefixed-formatter/.gitignore b/vendor/github.com/x-cray/logrus-prefixed-formatter/.gitignore deleted file mode 100644 index 450aeaa..0000000 --- a/vendor/github.com/x-cray/logrus-prefixed-formatter/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof - -# IDEA files -.idea -*.iml - -# OS X -.DS_Store - -# Unit testing -*.coverprofile diff --git a/vendor/github.com/x-cray/logrus-prefixed-formatter/.travis.yml b/vendor/github.com/x-cray/logrus-prefixed-formatter/.travis.yml deleted file mode 100644 index 0c80b19..0000000 --- a/vendor/github.com/x-cray/logrus-prefixed-formatter/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: go - -go: - - 1.5 - - 1.6 - - 1.7 - -install: - - make deps - -script: - - make test - -sudo: false diff --git a/vendor/github.com/x-cray/logrus-prefixed-formatter/LICENSE b/vendor/github.com/x-cray/logrus-prefixed-formatter/LICENSE deleted file mode 100644 index b41cb23..0000000 --- a/vendor/github.com/x-cray/logrus-prefixed-formatter/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Denis Parchenko - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/x-cray/logrus-prefixed-formatter/Makefile b/vendor/github.com/x-cray/logrus-prefixed-formatter/Makefile deleted file mode 100644 index 70c028c..0000000 --- a/vendor/github.com/x-cray/logrus-prefixed-formatter/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -NAME=logrus-prefixed-formatter -PACKAGES=$(shell go list ./...) - -deps: - @echo "--> Installing dependencies" - @go get -d -v -t ./... - -test-deps: - @which ginkgo 2>/dev/null ; if [ $$? -eq 1 ]; then \ - go get -u -v github.com/onsi/ginkgo/ginkgo; \ - fi - -test: test-deps - @echo "--> Running tests" - @ginkgo -r --randomizeAllSpecs --randomizeSuites --failOnPending --cover --trace --race - -format: - @echo "--> Running go fmt" - @go fmt $(PACKAGES) diff --git a/vendor/github.com/x-cray/logrus-prefixed-formatter/README.md b/vendor/github.com/x-cray/logrus-prefixed-formatter/README.md deleted file mode 100644 index cf10f27..0000000 --- a/vendor/github.com/x-cray/logrus-prefixed-formatter/README.md +++ /dev/null @@ -1,116 +0,0 @@ -# Logrus Prefixed Log Formatter -[![Build Status](https://travis-ci.org/x-cray/logrus-prefixed-formatter.svg?branch=master)](https://travis-ci.org/x-cray/logrus-prefixed-formatter) - -[Logrus](https://github.com/sirupsen/logrus) formatter mainly based on original `logrus.TextFormatter` but with slightly -modified colored output and support for log entry prefixes, e.g. message source followed by a colon. In addition, custom -color themes are supported. - -![Formatter screenshot](http://cl.ly/image/1w0B3F233F3z/formatter-screenshot@2x.png) - -Just like with the original `logrus.TextFormatter` when a TTY is not attached, the output is compatible with the -[logfmt](http://godoc.org/github.com/kr/logfmt) format: - -```text -time="Oct 27 00:44:26" level=debug msg="Started observing beach" animal=walrus number=8 -time="Oct 27 00:44:26" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10 -time="Oct 27 00:44:26" level=warning msg="The group's number increased tremendously!" number=122 omg=true -time="Oct 27 00:44:26" level=debug msg="Temperature changes" temperature=-4 -time="Oct 27 00:44:26" level=panic msg="It's over 9000!" animal=orca size=9009 -time="Oct 27 00:44:26" level=fatal msg="The ice breaks!" number=100 omg=true -exit status 1 -``` - -## Installation -To install formatter, use `go get`: - -```sh -$ go get github.com/x-cray/logrus-prefixed-formatter -``` - -## Usage -Here is how it should be used: - -```go -package main - -import ( - "github.com/sirupsen/logrus" - prefixed "github.com/x-cray/logrus-prefixed-formatter" -) - -var log = logrus.New() - -func init() { - log.Formatter = new(prefixed.TextFormatter) - log.Level = logrus.DebugLevel -} - -func main() { - log.WithFields(logrus.Fields{ - "prefix": "main", - "animal": "walrus", - "number": 8, - }).Debug("Started observing beach") - - log.WithFields(logrus.Fields{ - "prefix": "sensor", - "temperature": -4, - }).Info("Temperature changes") -} -``` - -## API -`prefixed.TextFormatter` exposes the following fields and methods. - -### Fields - -* `ForceColors bool` — set to true to bypass checking for a TTY before outputting colors. -* `DisableColors bool` — force disabling colors. For a TTY colors are enabled by default. -* `DisableUppercase bool` — set to true to turn off the conversion of the log level names to uppercase. -* `ForceFormatting bool` — force formatted layout, even for non-TTY output. -* `DisableTimestamp bool` — disable timestamp logging. Useful when output is redirected to logging system that already adds timestamps. -* `FullTimestamp bool` — enable logging the full timestamp when a TTY is attached instead of just the time passed since beginning of execution. -* `TimestampFormat string` — timestamp format to use for display when a full timestamp is printed. -* `DisableSorting bool` — the fields are sorted by default for a consistent output. For applications that log extremely frequently and don't use the JSON formatter this may not be desired. -* `QuoteEmptyFields bool` — wrap empty fields in quotes if true. -* `QuoteCharacter string` — can be set to the override the default quoting character `"` with something else. For example: `'`, or `` ` ``. -* `SpacePadding int` — pad msg field with spaces on the right for display. The value for this parameter will be the size of padding. Its default value is zero, which means no padding will be applied. - -### Methods - -#### `SetColorScheme(colorScheme *prefixed.ColorScheme)` - -Sets an alternative color scheme for colored output. `prefixed.ColorScheme` struct supports the following fields: -* `InfoLevelStyle string` — info level style. -* `WarnLevelStyle string` — warn level style. -* `ErrorLevelStyle string` — error style. -* `FatalLevelStyle string` — fatal level style. -* `PanicLevelStyle string` — panic level style. -* `DebugLevelStyle string` — debug level style. -* `PrefixStyle string` — prefix style. -* `TimestampStyle string` — timestamp style. - -Color styles should be specified using [mgutz/ansi](https://github.com/mgutz/ansi#style-format) style syntax. For example, here is the default theme: - -```go -InfoLevelStyle: "green", -WarnLevelStyle: "yellow", -ErrorLevelStyle: "red", -FatalLevelStyle: "red", -PanicLevelStyle: "red", -DebugLevelStyle: "blue", -PrefixStyle: "cyan", -TimestampStyle: "black+h" -``` - -It's not necessary to specify all colors when changing color scheme if you want to change just specific ones: - -```go -formatter.SetColorScheme(&prefixed.ColorScheme{ - PrefixStyle: "blue+b", - TimestampStyle: "white+h", -}) -``` - -# License -MIT diff --git a/vendor/github.com/x-cray/logrus-prefixed-formatter/formatter.go b/vendor/github.com/x-cray/logrus-prefixed-formatter/formatter.go deleted file mode 100644 index 1235bcc..0000000 --- a/vendor/github.com/x-cray/logrus-prefixed-formatter/formatter.go +++ /dev/null @@ -1,366 +0,0 @@ -package prefixed - -import ( - "bytes" - "fmt" - "io" - "os" - "regexp" - "sort" - "strings" - "sync" - "time" - - "github.com/sirupsen/logrus" - "github.com/mgutz/ansi" - "golang.org/x/crypto/ssh/terminal" -) - -const defaultTimestampFormat = time.RFC3339 - -var ( - baseTimestamp time.Time = time.Now() - defaultColorScheme *ColorScheme = &ColorScheme{ - InfoLevelStyle: "green", - WarnLevelStyle: "yellow", - ErrorLevelStyle: "red", - FatalLevelStyle: "red", - PanicLevelStyle: "red", - DebugLevelStyle: "blue", - PrefixStyle: "cyan", - TimestampStyle: "black+h", - } - noColorsColorScheme *compiledColorScheme = &compiledColorScheme{ - InfoLevelColor: ansi.ColorFunc(""), - WarnLevelColor: ansi.ColorFunc(""), - ErrorLevelColor: ansi.ColorFunc(""), - FatalLevelColor: ansi.ColorFunc(""), - PanicLevelColor: ansi.ColorFunc(""), - DebugLevelColor: ansi.ColorFunc(""), - PrefixColor: ansi.ColorFunc(""), - TimestampColor: ansi.ColorFunc(""), - } - defaultCompiledColorScheme *compiledColorScheme = compileColorScheme(defaultColorScheme) -) - -func miniTS() int { - return int(time.Since(baseTimestamp) / time.Second) -} - -type ColorScheme struct { - InfoLevelStyle string - WarnLevelStyle string - ErrorLevelStyle string - FatalLevelStyle string - PanicLevelStyle string - DebugLevelStyle string - PrefixStyle string - TimestampStyle string -} - -type compiledColorScheme struct { - InfoLevelColor func(string) string - WarnLevelColor func(string) string - ErrorLevelColor func(string) string - FatalLevelColor func(string) string - PanicLevelColor func(string) string - DebugLevelColor func(string) string - PrefixColor func(string) string - TimestampColor func(string) string -} - -type TextFormatter struct { - // Set to true to bypass checking for a TTY before outputting colors. - ForceColors bool - - // Force disabling colors. For a TTY colors are enabled by default. - DisableColors bool - - // Force formatted layout, even for non-TTY output. - ForceFormatting bool - - // Disable timestamp logging. useful when output is redirected to logging - // system that already adds timestamps. - DisableTimestamp bool - - // Disable the conversion of the log levels to uppercase - DisableUppercase bool - - // Enable logging the full timestamp when a TTY is attached instead of just - // the time passed since beginning of execution. - FullTimestamp bool - - // Timestamp format to use for display when a full timestamp is printed. - TimestampFormat string - - // The fields are sorted by default for a consistent output. For applications - // that log extremely frequently and don't use the JSON formatter this may not - // be desired. - DisableSorting bool - - // Wrap empty fields in quotes if true. - QuoteEmptyFields bool - - // Can be set to the override the default quoting character " - // with something else. For example: ', or `. - QuoteCharacter string - - // Pad msg field with spaces on the right for display. - // The value for this parameter will be the size of padding. - // Its default value is zero, which means no padding will be applied for msg. - SpacePadding int - - // Color scheme to use. - colorScheme *compiledColorScheme - - // Whether the logger's out is to a terminal. - isTerminal bool - - sync.Once -} - -func getCompiledColor(main string, fallback string) func(string) string { - var style string - if main != "" { - style = main - } else { - style = fallback - } - return ansi.ColorFunc(style) -} - -func compileColorScheme(s *ColorScheme) *compiledColorScheme { - return &compiledColorScheme{ - InfoLevelColor: getCompiledColor(s.InfoLevelStyle, defaultColorScheme.InfoLevelStyle), - WarnLevelColor: getCompiledColor(s.WarnLevelStyle, defaultColorScheme.WarnLevelStyle), - ErrorLevelColor: getCompiledColor(s.ErrorLevelStyle, defaultColorScheme.ErrorLevelStyle), - FatalLevelColor: getCompiledColor(s.FatalLevelStyle, defaultColorScheme.FatalLevelStyle), - PanicLevelColor: getCompiledColor(s.PanicLevelStyle, defaultColorScheme.PanicLevelStyle), - DebugLevelColor: getCompiledColor(s.DebugLevelStyle, defaultColorScheme.DebugLevelStyle), - PrefixColor: getCompiledColor(s.PrefixStyle, defaultColorScheme.PrefixStyle), - TimestampColor: getCompiledColor(s.TimestampStyle, defaultColorScheme.TimestampStyle), - } -} - -func (f *TextFormatter) init(entry *logrus.Entry) { - if len(f.QuoteCharacter) == 0 { - f.QuoteCharacter = "\"" - } - if entry.Logger != nil { - f.isTerminal = f.checkIfTerminal(entry.Logger.Out) - } -} - -func (f *TextFormatter) checkIfTerminal(w io.Writer) bool { - switch v := w.(type) { - case *os.File: - return terminal.IsTerminal(int(v.Fd())) - default: - return false - } -} - -func (f *TextFormatter) SetColorScheme(colorScheme *ColorScheme) { - f.colorScheme = compileColorScheme(colorScheme) -} - -func (f *TextFormatter) Format(entry *logrus.Entry) ([]byte, error) { - var b *bytes.Buffer - var keys []string = make([]string, 0, len(entry.Data)) - for k := range entry.Data { - keys = append(keys, k) - } - lastKeyIdx := len(keys) - 1 - - if !f.DisableSorting { - sort.Strings(keys) - } - if entry.Buffer != nil { - b = entry.Buffer - } else { - b = &bytes.Buffer{} - } - - prefixFieldClashes(entry.Data) - - f.Do(func() { f.init(entry) }) - - isFormatted := f.ForceFormatting || f.isTerminal - - timestampFormat := f.TimestampFormat - if timestampFormat == "" { - timestampFormat = defaultTimestampFormat - } - if isFormatted { - isColored := (f.ForceColors || f.isTerminal) && !f.DisableColors - var colorScheme *compiledColorScheme - if isColored { - if f.colorScheme == nil { - colorScheme = defaultCompiledColorScheme - } else { - colorScheme = f.colorScheme - } - } else { - colorScheme = noColorsColorScheme - } - f.printColored(b, entry, keys, timestampFormat, colorScheme) - } else { - if !f.DisableTimestamp { - f.appendKeyValue(b, "time", entry.Time.Format(timestampFormat), true) - } - f.appendKeyValue(b, "level", entry.Level.String(), true) - if entry.Message != "" { - f.appendKeyValue(b, "msg", entry.Message, lastKeyIdx >= 0) - } - for i, key := range keys { - f.appendKeyValue(b, key, entry.Data[key], lastKeyIdx != i) - } - } - - b.WriteByte('\n') - return b.Bytes(), nil -} - -func (f *TextFormatter) printColored(b *bytes.Buffer, entry *logrus.Entry, keys []string, timestampFormat string, colorScheme *compiledColorScheme) { - var levelColor func(string) string - var levelText string - switch entry.Level { - case logrus.InfoLevel: - levelColor = colorScheme.InfoLevelColor - case logrus.WarnLevel: - levelColor = colorScheme.WarnLevelColor - case logrus.ErrorLevel: - levelColor = colorScheme.ErrorLevelColor - case logrus.FatalLevel: - levelColor = colorScheme.FatalLevelColor - case logrus.PanicLevel: - levelColor = colorScheme.PanicLevelColor - default: - levelColor = colorScheme.DebugLevelColor - } - - if entry.Level != logrus.WarnLevel { - levelText = entry.Level.String() - } else { - levelText = "warn" - } - - if !f.DisableUppercase { - levelText = strings.ToUpper(levelText) - } - - level := levelColor(fmt.Sprintf("%5s", levelText)) - prefix := "" - message := entry.Message - - if prefixValue, ok := entry.Data["prefix"]; ok { - prefix = colorScheme.PrefixColor(" " + prefixValue.(string) + ":") - } else { - prefixValue, trimmedMsg := extractPrefix(entry.Message) - if len(prefixValue) > 0 { - prefix = colorScheme.PrefixColor(" " + prefixValue + ":") - message = trimmedMsg - } - } - - messageFormat := "%s" - if f.SpacePadding != 0 { - messageFormat = fmt.Sprintf("%%-%ds", f.SpacePadding) - } - - if f.DisableTimestamp { - fmt.Fprintf(b, "%s%s "+messageFormat, level, prefix, message) - } else { - var timestamp string - if !f.FullTimestamp { - timestamp = fmt.Sprintf("[%04d]", miniTS()) - } else { - timestamp = fmt.Sprintf("[%s]", entry.Time.Format(timestampFormat)) - } - fmt.Fprintf(b, "%s %s%s "+messageFormat, colorScheme.TimestampColor(timestamp), level, prefix, message) - } - for _, k := range keys { - if k != "prefix" { - v := entry.Data[k] - fmt.Fprintf(b, " %s=%+v", levelColor(k), v) - } - } -} - -func (f *TextFormatter) needsQuoting(text string) bool { - if f.QuoteEmptyFields && len(text) == 0 { - return true - } - for _, ch := range text { - if !((ch >= 'a' && ch <= 'z') || - (ch >= 'A' && ch <= 'Z') || - (ch >= '0' && ch <= '9') || - ch == '-' || ch == '.') { - return true - } - } - return false -} - -func extractPrefix(msg string) (string, string) { - prefix := "" - regex := regexp.MustCompile("^\\[(.*?)\\]") - if regex.MatchString(msg) { - match := regex.FindString(msg) - prefix, msg = match[1:len(match)-1], strings.TrimSpace(msg[len(match):]) - } - return prefix, msg -} - -func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}, appendSpace bool) { - b.WriteString(key) - b.WriteByte('=') - f.appendValue(b, value) - - if appendSpace { - b.WriteByte(' ') - } -} - -func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) { - switch value := value.(type) { - case string: - if !f.needsQuoting(value) { - b.WriteString(value) - } else { - fmt.Fprintf(b, "%s%v%s", f.QuoteCharacter, value, f.QuoteCharacter) - } - case error: - errmsg := value.Error() - if !f.needsQuoting(errmsg) { - b.WriteString(errmsg) - } else { - fmt.Fprintf(b, "%s%v%s", f.QuoteCharacter, errmsg, f.QuoteCharacter) - } - default: - fmt.Fprint(b, value) - } -} - -// This is to not silently overwrite `time`, `msg` and `level` fields when -// dumping it. If this code wasn't there doing: -// -// logrus.WithField("level", 1).Info("hello") -// -// would just silently drop the user provided level. Instead with this code -// it'll be logged as: -// -// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."} -func prefixFieldClashes(data logrus.Fields) { - if t, ok := data["time"]; ok { - data["fields.time"] = t - } - - if m, ok := data["msg"]; ok { - data["fields.msg"] = m - } - - if l, ok := data["level"]; ok { - data["fields.level"] = l - } -} diff --git a/vendor/go.mongodb.org/mongo-driver/LICENSE b/vendor/go.mongodb.org/mongo-driver/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/vendor/go.mongodb.org/mongo-driver/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bson.go b/vendor/go.mongodb.org/mongo-driver/bson/bson.go deleted file mode 100644 index a0d8185..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bson.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -// -// Based on gopkg.in/mgo.v2/bson by Gustavo Niemeyer -// See THIRD-PARTY-NOTICES for original license terms. - -package bson // import "go.mongodb.org/mongo-driver/bson" - -import ( - "go.mongodb.org/mongo-driver/bson/primitive" -) - -// Zeroer allows custom struct types to implement a report of zero -// state. All struct types that don't implement Zeroer or where IsZero -// returns false are considered to be not zero. -type Zeroer interface { - IsZero() bool -} - -// D is an ordered representation of a BSON document. This type should be used when the order of the elements matters, -// such as MongoDB command documents. If the order of the elements does not matter, an M should be used instead. -// -// A D should not be constructed with duplicate key names, as that can cause undefined server behavior. -// -// Example usage: -// -// bson.D{{"foo", "bar"}, {"hello", "world"}, {"pi", 3.14159}} -type D = primitive.D - -// E represents a BSON element for a D. It is usually used inside a D. -type E = primitive.E - -// M is an unordered representation of a BSON document. This type should be used when the order of the elements does not -// matter. This type is handled as a regular map[string]interface{} when encoding and decoding. Elements will be -// serialized in an undefined, random order. If the order of the elements matters, a D should be used instead. -// -// Example usage: -// -// bson.M{"foo": "bar", "hello": "world", "pi": 3.14159} -type M = primitive.M - -// An A is an ordered representation of a BSON array. -// -// Example usage: -// -// bson.A{"bar", "world", 3.14159, bson.D{{"qux", 12345}}} -type A = primitive.A diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/array_codec.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/array_codec.go deleted file mode 100644 index 4e24f9e..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/array_codec.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "reflect" - - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" -) - -// ArrayCodec is the Codec used for bsoncore.Array values. -type ArrayCodec struct{} - -var defaultArrayCodec = NewArrayCodec() - -// NewArrayCodec returns an ArrayCodec. -func NewArrayCodec() *ArrayCodec { - return &ArrayCodec{} -} - -// EncodeValue is the ValueEncoder for bsoncore.Array values. -func (ac *ArrayCodec) EncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tCoreArray { - return ValueEncoderError{Name: "CoreArrayEncodeValue", Types: []reflect.Type{tCoreArray}, Received: val} - } - - arr := val.Interface().(bsoncore.Array) - return bsonrw.Copier{}.CopyArrayFromBytes(vw, arr) -} - -// DecodeValue is the ValueDecoder for bsoncore.Array values. -func (ac *ArrayCodec) DecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tCoreArray { - return ValueDecoderError{Name: "CoreArrayDecodeValue", Types: []reflect.Type{tCoreArray}, Received: val} - } - - if val.IsNil() { - val.Set(reflect.MakeSlice(val.Type(), 0, 0)) - } - - val.SetLen(0) - arr, err := bsonrw.Copier{}.AppendArrayBytes(val.Interface().(bsoncore.Array), vr) - val.Set(reflect.ValueOf(arr)) - return err -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/bsoncodec.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/bsoncodec.go deleted file mode 100644 index 098ed69..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/bsoncodec.go +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec // import "go.mongodb.org/mongo-driver/bson/bsoncodec" - -import ( - "fmt" - "reflect" - "strings" - - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/bson/bsontype" - "go.mongodb.org/mongo-driver/bson/primitive" -) - -var ( - emptyValue = reflect.Value{} -) - -// Marshaler is an interface implemented by types that can marshal themselves -// into a BSON document represented as bytes. The bytes returned must be a valid -// BSON document if the error is nil. -type Marshaler interface { - MarshalBSON() ([]byte, error) -} - -// ValueMarshaler is an interface implemented by types that can marshal -// themselves into a BSON value as bytes. The type must be the valid type for -// the bytes returned. The bytes and byte type together must be valid if the -// error is nil. -type ValueMarshaler interface { - MarshalBSONValue() (bsontype.Type, []byte, error) -} - -// Unmarshaler is an interface implemented by types that can unmarshal a BSON -// document representation of themselves. The BSON bytes can be assumed to be -// valid. UnmarshalBSON must copy the BSON bytes if it wishes to retain the data -// after returning. -type Unmarshaler interface { - UnmarshalBSON([]byte) error -} - -// ValueUnmarshaler is an interface implemented by types that can unmarshal a -// BSON value representation of themselves. The BSON bytes and type can be -// assumed to be valid. UnmarshalBSONValue must copy the BSON value bytes if it -// wishes to retain the data after returning. -type ValueUnmarshaler interface { - UnmarshalBSONValue(bsontype.Type, []byte) error -} - -// ValueEncoderError is an error returned from a ValueEncoder when the provided value can't be -// encoded by the ValueEncoder. -type ValueEncoderError struct { - Name string - Types []reflect.Type - Kinds []reflect.Kind - Received reflect.Value -} - -func (vee ValueEncoderError) Error() string { - typeKinds := make([]string, 0, len(vee.Types)+len(vee.Kinds)) - for _, t := range vee.Types { - typeKinds = append(typeKinds, t.String()) - } - for _, k := range vee.Kinds { - if k == reflect.Map { - typeKinds = append(typeKinds, "map[string]*") - continue - } - typeKinds = append(typeKinds, k.String()) - } - received := vee.Received.Kind().String() - if vee.Received.IsValid() { - received = vee.Received.Type().String() - } - return fmt.Sprintf("%s can only encode valid %s, but got %s", vee.Name, strings.Join(typeKinds, ", "), received) -} - -// ValueDecoderError is an error returned from a ValueDecoder when the provided value can't be -// decoded by the ValueDecoder. -type ValueDecoderError struct { - Name string - Types []reflect.Type - Kinds []reflect.Kind - Received reflect.Value -} - -func (vde ValueDecoderError) Error() string { - typeKinds := make([]string, 0, len(vde.Types)+len(vde.Kinds)) - for _, t := range vde.Types { - typeKinds = append(typeKinds, t.String()) - } - for _, k := range vde.Kinds { - if k == reflect.Map { - typeKinds = append(typeKinds, "map[string]*") - continue - } - typeKinds = append(typeKinds, k.String()) - } - received := vde.Received.Kind().String() - if vde.Received.IsValid() { - received = vde.Received.Type().String() - } - return fmt.Sprintf("%s can only decode valid and settable %s, but got %s", vde.Name, strings.Join(typeKinds, ", "), received) -} - -// EncodeContext is the contextual information required for a Codec to encode a -// value. -type EncodeContext struct { - *Registry - MinSize bool -} - -// DecodeContext is the contextual information required for a Codec to decode a -// value. -type DecodeContext struct { - *Registry - Truncate bool - - // Ancestor is the type of a containing document. This is mainly used to determine what type - // should be used when decoding an embedded document into an empty interface. For example, if - // Ancestor is a bson.M, BSON embedded document values being decoded into an empty interface - // will be decoded into a bson.M. - // - // Deprecated: Use DefaultDocumentM or DefaultDocumentD instead. - Ancestor reflect.Type - - // defaultDocumentType specifies the Go type to decode top-level and nested BSON documents into. In particular, the - // usage for this field is restricted to data typed as "interface{}" or "map[string]interface{}". If DocumentType is - // set to a type that a BSON document cannot be unmarshaled into (e.g. "string"), unmarshalling will result in an - // error. DocumentType overrides the Ancestor field. - defaultDocumentType reflect.Type -} - -// DefaultDocumentM will decode empty documents using the primitive.M type. This behavior is restricted to data typed as -// "interface{}" or "map[string]interface{}". -func (dc *DecodeContext) DefaultDocumentM() { - dc.defaultDocumentType = reflect.TypeOf(primitive.M{}) -} - -// DefaultDocumentD will decode empty documents using the primitive.D type. This behavior is restricted to data typed as -// "interface{}" or "map[string]interface{}". -func (dc *DecodeContext) DefaultDocumentD() { - dc.defaultDocumentType = reflect.TypeOf(primitive.D{}) -} - -// ValueCodec is the interface that groups the methods to encode and decode -// values. -type ValueCodec interface { - ValueEncoder - ValueDecoder -} - -// ValueEncoder is the interface implemented by types that can handle the encoding of a value. -type ValueEncoder interface { - EncodeValue(EncodeContext, bsonrw.ValueWriter, reflect.Value) error -} - -// ValueEncoderFunc is an adapter function that allows a function with the correct signature to be -// used as a ValueEncoder. -type ValueEncoderFunc func(EncodeContext, bsonrw.ValueWriter, reflect.Value) error - -// EncodeValue implements the ValueEncoder interface. -func (fn ValueEncoderFunc) EncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - return fn(ec, vw, val) -} - -// ValueDecoder is the interface implemented by types that can handle the decoding of a value. -type ValueDecoder interface { - DecodeValue(DecodeContext, bsonrw.ValueReader, reflect.Value) error -} - -// ValueDecoderFunc is an adapter function that allows a function with the correct signature to be -// used as a ValueDecoder. -type ValueDecoderFunc func(DecodeContext, bsonrw.ValueReader, reflect.Value) error - -// DecodeValue implements the ValueDecoder interface. -func (fn ValueDecoderFunc) DecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - return fn(dc, vr, val) -} - -// typeDecoder is the interface implemented by types that can handle the decoding of a value given its type. -type typeDecoder interface { - decodeType(DecodeContext, bsonrw.ValueReader, reflect.Type) (reflect.Value, error) -} - -// typeDecoderFunc is an adapter function that allows a function with the correct signature to be used as a typeDecoder. -type typeDecoderFunc func(DecodeContext, bsonrw.ValueReader, reflect.Type) (reflect.Value, error) - -func (fn typeDecoderFunc) decodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - return fn(dc, vr, t) -} - -// decodeAdapter allows two functions with the correct signatures to be used as both a ValueDecoder and typeDecoder. -type decodeAdapter struct { - ValueDecoderFunc - typeDecoderFunc -} - -var _ ValueDecoder = decodeAdapter{} -var _ typeDecoder = decodeAdapter{} - -// decodeTypeOrValue calls decoder.decodeType is decoder is a typeDecoder. Otherwise, it allocates a new element of type -// t and calls decoder.DecodeValue on it. -func decodeTypeOrValue(decoder ValueDecoder, dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - td, _ := decoder.(typeDecoder) - return decodeTypeOrValueWithInfo(decoder, td, dc, vr, t, true) -} - -func decodeTypeOrValueWithInfo(vd ValueDecoder, td typeDecoder, dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type, convert bool) (reflect.Value, error) { - if td != nil { - val, err := td.decodeType(dc, vr, t) - if err == nil && convert && val.Type() != t { - // This conversion step is necessary for slices and maps. If a user declares variables like: - // - // type myBool bool - // var m map[string]myBool - // - // and tries to decode BSON bytes into the map, the decoding will fail if this conversion is not present - // because we'll try to assign a value of type bool to one of type myBool. - val = val.Convert(t) - } - return val, err - } - - val := reflect.New(t).Elem() - err := vd.DecodeValue(dc, vr, val) - return val, err -} - -// CodecZeroer is the interface implemented by Codecs that can also determine if -// a value of the type that would be encoded is zero. -type CodecZeroer interface { - IsTypeZero(interface{}) bool -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/byte_slice_codec.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/byte_slice_codec.go deleted file mode 100644 index 5a916cc..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/byte_slice_codec.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "fmt" - "reflect" - - "go.mongodb.org/mongo-driver/bson/bsonoptions" - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/bson/bsontype" -) - -// ByteSliceCodec is the Codec used for []byte values. -type ByteSliceCodec struct { - EncodeNilAsEmpty bool -} - -var ( - defaultByteSliceCodec = NewByteSliceCodec() - - _ ValueCodec = defaultByteSliceCodec - _ typeDecoder = defaultByteSliceCodec -) - -// NewByteSliceCodec returns a StringCodec with options opts. -func NewByteSliceCodec(opts ...*bsonoptions.ByteSliceCodecOptions) *ByteSliceCodec { - byteSliceOpt := bsonoptions.MergeByteSliceCodecOptions(opts...) - codec := ByteSliceCodec{} - if byteSliceOpt.EncodeNilAsEmpty != nil { - codec.EncodeNilAsEmpty = *byteSliceOpt.EncodeNilAsEmpty - } - return &codec -} - -// EncodeValue is the ValueEncoder for []byte. -func (bsc *ByteSliceCodec) EncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tByteSlice { - return ValueEncoderError{Name: "ByteSliceEncodeValue", Types: []reflect.Type{tByteSlice}, Received: val} - } - if val.IsNil() && !bsc.EncodeNilAsEmpty { - return vw.WriteNull() - } - return vw.WriteBinary(val.Interface().([]byte)) -} - -func (bsc *ByteSliceCodec) decodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tByteSlice { - return emptyValue, ValueDecoderError{ - Name: "ByteSliceDecodeValue", - Types: []reflect.Type{tByteSlice}, - Received: reflect.Zero(t), - } - } - - var data []byte - var err error - switch vrType := vr.Type(); vrType { - case bsontype.String: - str, err := vr.ReadString() - if err != nil { - return emptyValue, err - } - data = []byte(str) - case bsontype.Symbol: - sym, err := vr.ReadSymbol() - if err != nil { - return emptyValue, err - } - data = []byte(sym) - case bsontype.Binary: - var subtype byte - data, subtype, err = vr.ReadBinary() - if err != nil { - return emptyValue, err - } - if subtype != bsontype.BinaryGeneric && subtype != bsontype.BinaryBinaryOld { - return emptyValue, decodeBinaryError{subtype: subtype, typeName: "[]byte"} - } - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a []byte", vrType) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(data), nil -} - -// DecodeValue is the ValueDecoder for []byte. -func (bsc *ByteSliceCodec) DecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tByteSlice { - return ValueDecoderError{Name: "ByteSliceDecodeValue", Types: []reflect.Type{tByteSlice}, Received: val} - } - - elem, err := bsc.decodeType(dc, vr, tByteSlice) - if err != nil { - return err - } - - val.Set(elem) - return nil -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/cond_addr_codec.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/cond_addr_codec.go deleted file mode 100644 index cb8180f..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/cond_addr_codec.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "reflect" - - "go.mongodb.org/mongo-driver/bson/bsonrw" -) - -// condAddrEncoder is the encoder used when a pointer to the encoding value has an encoder. -type condAddrEncoder struct { - canAddrEnc ValueEncoder - elseEnc ValueEncoder -} - -var _ ValueEncoder = (*condAddrEncoder)(nil) - -// newCondAddrEncoder returns an condAddrEncoder. -func newCondAddrEncoder(canAddrEnc, elseEnc ValueEncoder) *condAddrEncoder { - encoder := condAddrEncoder{canAddrEnc: canAddrEnc, elseEnc: elseEnc} - return &encoder -} - -// EncodeValue is the ValueEncoderFunc for a value that may be addressable. -func (cae *condAddrEncoder) EncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if val.CanAddr() { - return cae.canAddrEnc.EncodeValue(ec, vw, val) - } - if cae.elseEnc != nil { - return cae.elseEnc.EncodeValue(ec, vw, val) - } - return ErrNoEncoder{Type: val.Type()} -} - -// condAddrDecoder is the decoder used when a pointer to the value has a decoder. -type condAddrDecoder struct { - canAddrDec ValueDecoder - elseDec ValueDecoder -} - -var _ ValueDecoder = (*condAddrDecoder)(nil) - -// newCondAddrDecoder returns an CondAddrDecoder. -func newCondAddrDecoder(canAddrDec, elseDec ValueDecoder) *condAddrDecoder { - decoder := condAddrDecoder{canAddrDec: canAddrDec, elseDec: elseDec} - return &decoder -} - -// DecodeValue is the ValueDecoderFunc for a value that may be addressable. -func (cad *condAddrDecoder) DecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if val.CanAddr() { - return cad.canAddrDec.DecodeValue(dc, vr, val) - } - if cad.elseDec != nil { - return cad.elseDec.DecodeValue(dc, vr, val) - } - return ErrNoDecoder{Type: val.Type()} -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/default_value_decoders.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/default_value_decoders.go deleted file mode 100644 index e95cab5..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/default_value_decoders.go +++ /dev/null @@ -1,1729 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "encoding/json" - "errors" - "fmt" - "math" - "net/url" - "reflect" - "strconv" - "time" - - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/bson/bsontype" - "go.mongodb.org/mongo-driver/bson/primitive" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" -) - -var ( - defaultValueDecoders DefaultValueDecoders - errCannotTruncate = errors.New("float64 can only be truncated to an integer type when truncation is enabled") -) - -type decodeBinaryError struct { - subtype byte - typeName string -} - -func (d decodeBinaryError) Error() string { - return fmt.Sprintf("only binary values with subtype 0x00 or 0x02 can be decoded into %s, but got subtype %v", d.typeName, d.subtype) -} - -func newDefaultStructCodec() *StructCodec { - codec, err := NewStructCodec(DefaultStructTagParser) - if err != nil { - // This function is called from the codec registration path, so errors can't be propagated. If there's an error - // constructing the StructCodec, we panic to avoid losing it. - panic(fmt.Errorf("error creating default StructCodec: %v", err)) - } - return codec -} - -// DefaultValueDecoders is a namespace type for the default ValueDecoders used -// when creating a registry. -type DefaultValueDecoders struct{} - -// RegisterDefaultDecoders will register the decoder methods attached to DefaultValueDecoders with -// the provided RegistryBuilder. -// -// There is no support for decoding map[string]interface{} because there is no decoder for -// interface{}, so users must either register this decoder themselves or use the -// EmptyInterfaceDecoder available in the bson package. -func (dvd DefaultValueDecoders) RegisterDefaultDecoders(rb *RegistryBuilder) { - if rb == nil { - panic(errors.New("argument to RegisterDefaultDecoders must not be nil")) - } - - intDecoder := decodeAdapter{dvd.IntDecodeValue, dvd.intDecodeType} - floatDecoder := decodeAdapter{dvd.FloatDecodeValue, dvd.floatDecodeType} - - rb. - RegisterTypeDecoder(tD, ValueDecoderFunc(dvd.DDecodeValue)). - RegisterTypeDecoder(tBinary, decodeAdapter{dvd.BinaryDecodeValue, dvd.binaryDecodeType}). - RegisterTypeDecoder(tUndefined, decodeAdapter{dvd.UndefinedDecodeValue, dvd.undefinedDecodeType}). - RegisterTypeDecoder(tDateTime, decodeAdapter{dvd.DateTimeDecodeValue, dvd.dateTimeDecodeType}). - RegisterTypeDecoder(tNull, decodeAdapter{dvd.NullDecodeValue, dvd.nullDecodeType}). - RegisterTypeDecoder(tRegex, decodeAdapter{dvd.RegexDecodeValue, dvd.regexDecodeType}). - RegisterTypeDecoder(tDBPointer, decodeAdapter{dvd.DBPointerDecodeValue, dvd.dBPointerDecodeType}). - RegisterTypeDecoder(tTimestamp, decodeAdapter{dvd.TimestampDecodeValue, dvd.timestampDecodeType}). - RegisterTypeDecoder(tMinKey, decodeAdapter{dvd.MinKeyDecodeValue, dvd.minKeyDecodeType}). - RegisterTypeDecoder(tMaxKey, decodeAdapter{dvd.MaxKeyDecodeValue, dvd.maxKeyDecodeType}). - RegisterTypeDecoder(tJavaScript, decodeAdapter{dvd.JavaScriptDecodeValue, dvd.javaScriptDecodeType}). - RegisterTypeDecoder(tSymbol, decodeAdapter{dvd.SymbolDecodeValue, dvd.symbolDecodeType}). - RegisterTypeDecoder(tByteSlice, defaultByteSliceCodec). - RegisterTypeDecoder(tTime, defaultTimeCodec). - RegisterTypeDecoder(tEmpty, defaultEmptyInterfaceCodec). - RegisterTypeDecoder(tCoreArray, defaultArrayCodec). - RegisterTypeDecoder(tOID, decodeAdapter{dvd.ObjectIDDecodeValue, dvd.objectIDDecodeType}). - RegisterTypeDecoder(tDecimal, decodeAdapter{dvd.Decimal128DecodeValue, dvd.decimal128DecodeType}). - RegisterTypeDecoder(tJSONNumber, decodeAdapter{dvd.JSONNumberDecodeValue, dvd.jsonNumberDecodeType}). - RegisterTypeDecoder(tURL, decodeAdapter{dvd.URLDecodeValue, dvd.urlDecodeType}). - RegisterTypeDecoder(tCoreDocument, ValueDecoderFunc(dvd.CoreDocumentDecodeValue)). - RegisterTypeDecoder(tCodeWithScope, decodeAdapter{dvd.CodeWithScopeDecodeValue, dvd.codeWithScopeDecodeType}). - RegisterDefaultDecoder(reflect.Bool, decodeAdapter{dvd.BooleanDecodeValue, dvd.booleanDecodeType}). - RegisterDefaultDecoder(reflect.Int, intDecoder). - RegisterDefaultDecoder(reflect.Int8, intDecoder). - RegisterDefaultDecoder(reflect.Int16, intDecoder). - RegisterDefaultDecoder(reflect.Int32, intDecoder). - RegisterDefaultDecoder(reflect.Int64, intDecoder). - RegisterDefaultDecoder(reflect.Uint, defaultUIntCodec). - RegisterDefaultDecoder(reflect.Uint8, defaultUIntCodec). - RegisterDefaultDecoder(reflect.Uint16, defaultUIntCodec). - RegisterDefaultDecoder(reflect.Uint32, defaultUIntCodec). - RegisterDefaultDecoder(reflect.Uint64, defaultUIntCodec). - RegisterDefaultDecoder(reflect.Float32, floatDecoder). - RegisterDefaultDecoder(reflect.Float64, floatDecoder). - RegisterDefaultDecoder(reflect.Array, ValueDecoderFunc(dvd.ArrayDecodeValue)). - RegisterDefaultDecoder(reflect.Map, defaultMapCodec). - RegisterDefaultDecoder(reflect.Slice, defaultSliceCodec). - RegisterDefaultDecoder(reflect.String, defaultStringCodec). - RegisterDefaultDecoder(reflect.Struct, newDefaultStructCodec()). - RegisterDefaultDecoder(reflect.Ptr, NewPointerCodec()). - RegisterTypeMapEntry(bsontype.Double, tFloat64). - RegisterTypeMapEntry(bsontype.String, tString). - RegisterTypeMapEntry(bsontype.Array, tA). - RegisterTypeMapEntry(bsontype.Binary, tBinary). - RegisterTypeMapEntry(bsontype.Undefined, tUndefined). - RegisterTypeMapEntry(bsontype.ObjectID, tOID). - RegisterTypeMapEntry(bsontype.Boolean, tBool). - RegisterTypeMapEntry(bsontype.DateTime, tDateTime). - RegisterTypeMapEntry(bsontype.Regex, tRegex). - RegisterTypeMapEntry(bsontype.DBPointer, tDBPointer). - RegisterTypeMapEntry(bsontype.JavaScript, tJavaScript). - RegisterTypeMapEntry(bsontype.Symbol, tSymbol). - RegisterTypeMapEntry(bsontype.CodeWithScope, tCodeWithScope). - RegisterTypeMapEntry(bsontype.Int32, tInt32). - RegisterTypeMapEntry(bsontype.Int64, tInt64). - RegisterTypeMapEntry(bsontype.Timestamp, tTimestamp). - RegisterTypeMapEntry(bsontype.Decimal128, tDecimal). - RegisterTypeMapEntry(bsontype.MinKey, tMinKey). - RegisterTypeMapEntry(bsontype.MaxKey, tMaxKey). - RegisterTypeMapEntry(bsontype.Type(0), tD). - RegisterTypeMapEntry(bsontype.EmbeddedDocument, tD). - RegisterHookDecoder(tValueUnmarshaler, ValueDecoderFunc(dvd.ValueUnmarshalerDecodeValue)). - RegisterHookDecoder(tUnmarshaler, ValueDecoderFunc(dvd.UnmarshalerDecodeValue)) -} - -// DDecodeValue is the ValueDecoderFunc for primitive.D instances. -func (dvd DefaultValueDecoders) DDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.IsValid() || !val.CanSet() || val.Type() != tD { - return ValueDecoderError{Name: "DDecodeValue", Kinds: []reflect.Kind{reflect.Slice}, Received: val} - } - - switch vrType := vr.Type(); vrType { - case bsontype.Type(0), bsontype.EmbeddedDocument: - dc.Ancestor = tD - case bsontype.Null: - val.Set(reflect.Zero(val.Type())) - return vr.ReadNull() - default: - return fmt.Errorf("cannot decode %v into a primitive.D", vrType) - } - - dr, err := vr.ReadDocument() - if err != nil { - return err - } - - decoder, err := dc.LookupDecoder(tEmpty) - if err != nil { - return err - } - tEmptyTypeDecoder, _ := decoder.(typeDecoder) - - // Use the elements in the provided value if it's non nil. Otherwise, allocate a new D instance. - var elems primitive.D - if !val.IsNil() { - val.SetLen(0) - elems = val.Interface().(primitive.D) - } else { - elems = make(primitive.D, 0) - } - - for { - key, elemVr, err := dr.ReadElement() - if err == bsonrw.ErrEOD { - break - } else if err != nil { - return err - } - - // Pass false for convert because we don't need to call reflect.Value.Convert for tEmpty. - elem, err := decodeTypeOrValueWithInfo(decoder, tEmptyTypeDecoder, dc, elemVr, tEmpty, false) - if err != nil { - return err - } - - elems = append(elems, primitive.E{Key: key, Value: elem.Interface()}) - } - - val.Set(reflect.ValueOf(elems)) - return nil -} - -func (dvd DefaultValueDecoders) booleanDecodeType(dctx DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t.Kind() != reflect.Bool { - return emptyValue, ValueDecoderError{ - Name: "BooleanDecodeValue", - Kinds: []reflect.Kind{reflect.Bool}, - Received: reflect.Zero(t), - } - } - - var b bool - var err error - switch vrType := vr.Type(); vrType { - case bsontype.Int32: - i32, err := vr.ReadInt32() - if err != nil { - return emptyValue, err - } - b = (i32 != 0) - case bsontype.Int64: - i64, err := vr.ReadInt64() - if err != nil { - return emptyValue, err - } - b = (i64 != 0) - case bsontype.Double: - f64, err := vr.ReadDouble() - if err != nil { - return emptyValue, err - } - b = (f64 != 0) - case bsontype.Boolean: - b, err = vr.ReadBoolean() - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a boolean", vrType) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(b), nil -} - -// BooleanDecodeValue is the ValueDecoderFunc for bool types. -func (dvd DefaultValueDecoders) BooleanDecodeValue(dctx DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.IsValid() || !val.CanSet() || val.Kind() != reflect.Bool { - return ValueDecoderError{Name: "BooleanDecodeValue", Kinds: []reflect.Kind{reflect.Bool}, Received: val} - } - - elem, err := dvd.booleanDecodeType(dctx, vr, val.Type()) - if err != nil { - return err - } - - val.SetBool(elem.Bool()) - return nil -} - -func (DefaultValueDecoders) intDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - var i64 int64 - var err error - switch vrType := vr.Type(); vrType { - case bsontype.Int32: - i32, err := vr.ReadInt32() - if err != nil { - return emptyValue, err - } - i64 = int64(i32) - case bsontype.Int64: - i64, err = vr.ReadInt64() - if err != nil { - return emptyValue, err - } - case bsontype.Double: - f64, err := vr.ReadDouble() - if err != nil { - return emptyValue, err - } - if !dc.Truncate && math.Floor(f64) != f64 { - return emptyValue, errCannotTruncate - } - if f64 > float64(math.MaxInt64) { - return emptyValue, fmt.Errorf("%g overflows int64", f64) - } - i64 = int64(f64) - case bsontype.Boolean: - b, err := vr.ReadBoolean() - if err != nil { - return emptyValue, err - } - if b { - i64 = 1 - } - case bsontype.Null: - if err = vr.ReadNull(); err != nil { - return emptyValue, err - } - case bsontype.Undefined: - if err = vr.ReadUndefined(); err != nil { - return emptyValue, err - } - default: - return emptyValue, fmt.Errorf("cannot decode %v into an integer type", vrType) - } - - switch t.Kind() { - case reflect.Int8: - if i64 < math.MinInt8 || i64 > math.MaxInt8 { - return emptyValue, fmt.Errorf("%d overflows int8", i64) - } - - return reflect.ValueOf(int8(i64)), nil - case reflect.Int16: - if i64 < math.MinInt16 || i64 > math.MaxInt16 { - return emptyValue, fmt.Errorf("%d overflows int16", i64) - } - - return reflect.ValueOf(int16(i64)), nil - case reflect.Int32: - if i64 < math.MinInt32 || i64 > math.MaxInt32 { - return emptyValue, fmt.Errorf("%d overflows int32", i64) - } - - return reflect.ValueOf(int32(i64)), nil - case reflect.Int64: - return reflect.ValueOf(i64), nil - case reflect.Int: - if int64(int(i64)) != i64 { // Can we fit this inside of an int - return emptyValue, fmt.Errorf("%d overflows int", i64) - } - - return reflect.ValueOf(int(i64)), nil - default: - return emptyValue, ValueDecoderError{ - Name: "IntDecodeValue", - Kinds: []reflect.Kind{reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int}, - Received: reflect.Zero(t), - } - } -} - -// IntDecodeValue is the ValueDecoderFunc for int types. -func (dvd DefaultValueDecoders) IntDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() { - return ValueDecoderError{ - Name: "IntDecodeValue", - Kinds: []reflect.Kind{reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int}, - Received: val, - } - } - - elem, err := dvd.intDecodeType(dc, vr, val.Type()) - if err != nil { - return err - } - - val.SetInt(elem.Int()) - return nil -} - -// UintDecodeValue is the ValueDecoderFunc for uint types. -// -// Deprecated: UintDecodeValue is not registered by default. Use UintCodec.DecodeValue instead. -func (dvd DefaultValueDecoders) UintDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - var i64 int64 - var err error - switch vr.Type() { - case bsontype.Int32: - i32, err := vr.ReadInt32() - if err != nil { - return err - } - i64 = int64(i32) - case bsontype.Int64: - i64, err = vr.ReadInt64() - if err != nil { - return err - } - case bsontype.Double: - f64, err := vr.ReadDouble() - if err != nil { - return err - } - if !dc.Truncate && math.Floor(f64) != f64 { - return errors.New("UintDecodeValue can only truncate float64 to an integer type when truncation is enabled") - } - if f64 > float64(math.MaxInt64) { - return fmt.Errorf("%g overflows int64", f64) - } - i64 = int64(f64) - case bsontype.Boolean: - b, err := vr.ReadBoolean() - if err != nil { - return err - } - if b { - i64 = 1 - } - default: - return fmt.Errorf("cannot decode %v into an integer type", vr.Type()) - } - - if !val.CanSet() { - return ValueDecoderError{ - Name: "UintDecodeValue", - Kinds: []reflect.Kind{reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint}, - Received: val, - } - } - - switch val.Kind() { - case reflect.Uint8: - if i64 < 0 || i64 > math.MaxUint8 { - return fmt.Errorf("%d overflows uint8", i64) - } - case reflect.Uint16: - if i64 < 0 || i64 > math.MaxUint16 { - return fmt.Errorf("%d overflows uint16", i64) - } - case reflect.Uint32: - if i64 < 0 || i64 > math.MaxUint32 { - return fmt.Errorf("%d overflows uint32", i64) - } - case reflect.Uint64: - if i64 < 0 { - return fmt.Errorf("%d overflows uint64", i64) - } - case reflect.Uint: - if i64 < 0 || int64(uint(i64)) != i64 { // Can we fit this inside of an uint - return fmt.Errorf("%d overflows uint", i64) - } - default: - return ValueDecoderError{ - Name: "UintDecodeValue", - Kinds: []reflect.Kind{reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint}, - Received: val, - } - } - - val.SetUint(uint64(i64)) - return nil -} - -func (dvd DefaultValueDecoders) floatDecodeType(ec DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - var f float64 - var err error - switch vrType := vr.Type(); vrType { - case bsontype.Int32: - i32, err := vr.ReadInt32() - if err != nil { - return emptyValue, err - } - f = float64(i32) - case bsontype.Int64: - i64, err := vr.ReadInt64() - if err != nil { - return emptyValue, err - } - f = float64(i64) - case bsontype.Double: - f, err = vr.ReadDouble() - if err != nil { - return emptyValue, err - } - case bsontype.Boolean: - b, err := vr.ReadBoolean() - if err != nil { - return emptyValue, err - } - if b { - f = 1 - } - case bsontype.Null: - if err = vr.ReadNull(); err != nil { - return emptyValue, err - } - case bsontype.Undefined: - if err = vr.ReadUndefined(); err != nil { - return emptyValue, err - } - default: - return emptyValue, fmt.Errorf("cannot decode %v into a float32 or float64 type", vrType) - } - - switch t.Kind() { - case reflect.Float32: - if !ec.Truncate && float64(float32(f)) != f { - return emptyValue, errCannotTruncate - } - - return reflect.ValueOf(float32(f)), nil - case reflect.Float64: - return reflect.ValueOf(f), nil - default: - return emptyValue, ValueDecoderError{ - Name: "FloatDecodeValue", - Kinds: []reflect.Kind{reflect.Float32, reflect.Float64}, - Received: reflect.Zero(t), - } - } -} - -// FloatDecodeValue is the ValueDecoderFunc for float types. -func (dvd DefaultValueDecoders) FloatDecodeValue(ec DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() { - return ValueDecoderError{ - Name: "FloatDecodeValue", - Kinds: []reflect.Kind{reflect.Float32, reflect.Float64}, - Received: val, - } - } - - elem, err := dvd.floatDecodeType(ec, vr, val.Type()) - if err != nil { - return err - } - - val.SetFloat(elem.Float()) - return nil -} - -// StringDecodeValue is the ValueDecoderFunc for string types. -// -// Deprecated: StringDecodeValue is not registered by default. Use StringCodec.DecodeValue instead. -func (dvd DefaultValueDecoders) StringDecodeValue(dctx DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - var str string - var err error - switch vr.Type() { - // TODO(GODRIVER-577): Handle JavaScript and Symbol BSON types when allowed. - case bsontype.String: - str, err = vr.ReadString() - if err != nil { - return err - } - default: - return fmt.Errorf("cannot decode %v into a string type", vr.Type()) - } - if !val.CanSet() || val.Kind() != reflect.String { - return ValueDecoderError{Name: "StringDecodeValue", Kinds: []reflect.Kind{reflect.String}, Received: val} - } - - val.SetString(str) - return nil -} - -func (DefaultValueDecoders) javaScriptDecodeType(dctx DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tJavaScript { - return emptyValue, ValueDecoderError{ - Name: "JavaScriptDecodeValue", - Types: []reflect.Type{tJavaScript}, - Received: reflect.Zero(t), - } - } - - var js string - var err error - switch vrType := vr.Type(); vrType { - case bsontype.JavaScript: - js, err = vr.ReadJavascript() - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a primitive.JavaScript", vrType) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(primitive.JavaScript(js)), nil -} - -// JavaScriptDecodeValue is the ValueDecoderFunc for the primitive.JavaScript type. -func (dvd DefaultValueDecoders) JavaScriptDecodeValue(dctx DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tJavaScript { - return ValueDecoderError{Name: "JavaScriptDecodeValue", Types: []reflect.Type{tJavaScript}, Received: val} - } - - elem, err := dvd.javaScriptDecodeType(dctx, vr, tJavaScript) - if err != nil { - return err - } - - val.SetString(elem.String()) - return nil -} - -func (DefaultValueDecoders) symbolDecodeType(dctx DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tSymbol { - return emptyValue, ValueDecoderError{ - Name: "SymbolDecodeValue", - Types: []reflect.Type{tSymbol}, - Received: reflect.Zero(t), - } - } - - var symbol string - var err error - switch vrType := vr.Type(); vrType { - case bsontype.String: - symbol, err = vr.ReadString() - case bsontype.Symbol: - symbol, err = vr.ReadSymbol() - case bsontype.Binary: - data, subtype, err := vr.ReadBinary() - if err != nil { - return emptyValue, err - } - - if subtype != bsontype.BinaryGeneric && subtype != bsontype.BinaryBinaryOld { - return emptyValue, decodeBinaryError{subtype: subtype, typeName: "primitive.Symbol"} - } - symbol = string(data) - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a primitive.Symbol", vrType) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(primitive.Symbol(symbol)), nil -} - -// SymbolDecodeValue is the ValueDecoderFunc for the primitive.Symbol type. -func (dvd DefaultValueDecoders) SymbolDecodeValue(dctx DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tSymbol { - return ValueDecoderError{Name: "SymbolDecodeValue", Types: []reflect.Type{tSymbol}, Received: val} - } - - elem, err := dvd.symbolDecodeType(dctx, vr, tSymbol) - if err != nil { - return err - } - - val.SetString(elem.String()) - return nil -} - -func (DefaultValueDecoders) binaryDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tBinary { - return emptyValue, ValueDecoderError{ - Name: "BinaryDecodeValue", - Types: []reflect.Type{tBinary}, - Received: reflect.Zero(t), - } - } - - var data []byte - var subtype byte - var err error - switch vrType := vr.Type(); vrType { - case bsontype.Binary: - data, subtype, err = vr.ReadBinary() - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a Binary", vrType) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(primitive.Binary{Subtype: subtype, Data: data}), nil -} - -// BinaryDecodeValue is the ValueDecoderFunc for Binary. -func (dvd DefaultValueDecoders) BinaryDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tBinary { - return ValueDecoderError{Name: "BinaryDecodeValue", Types: []reflect.Type{tBinary}, Received: val} - } - - elem, err := dvd.binaryDecodeType(dc, vr, tBinary) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -func (DefaultValueDecoders) undefinedDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tUndefined { - return emptyValue, ValueDecoderError{ - Name: "UndefinedDecodeValue", - Types: []reflect.Type{tUndefined}, - Received: reflect.Zero(t), - } - } - - var err error - switch vrType := vr.Type(); vrType { - case bsontype.Undefined: - err = vr.ReadUndefined() - case bsontype.Null: - err = vr.ReadNull() - default: - return emptyValue, fmt.Errorf("cannot decode %v into an Undefined", vr.Type()) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(primitive.Undefined{}), nil -} - -// UndefinedDecodeValue is the ValueDecoderFunc for Undefined. -func (dvd DefaultValueDecoders) UndefinedDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tUndefined { - return ValueDecoderError{Name: "UndefinedDecodeValue", Types: []reflect.Type{tUndefined}, Received: val} - } - - elem, err := dvd.undefinedDecodeType(dc, vr, tUndefined) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -// Accept both 12-byte string and pretty-printed 24-byte hex string formats. -func (dvd DefaultValueDecoders) objectIDDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tOID { - return emptyValue, ValueDecoderError{ - Name: "ObjectIDDecodeValue", - Types: []reflect.Type{tOID}, - Received: reflect.Zero(t), - } - } - - var oid primitive.ObjectID - var err error - switch vrType := vr.Type(); vrType { - case bsontype.ObjectID: - oid, err = vr.ReadObjectID() - if err != nil { - return emptyValue, err - } - case bsontype.String: - str, err := vr.ReadString() - if err != nil { - return emptyValue, err - } - if oid, err = primitive.ObjectIDFromHex(str); err == nil { - break - } - if len(str) != 12 { - return emptyValue, fmt.Errorf("an ObjectID string must be exactly 12 bytes long (got %v)", len(str)) - } - byteArr := []byte(str) - copy(oid[:], byteArr) - case bsontype.Null: - if err = vr.ReadNull(); err != nil { - return emptyValue, err - } - case bsontype.Undefined: - if err = vr.ReadUndefined(); err != nil { - return emptyValue, err - } - default: - return emptyValue, fmt.Errorf("cannot decode %v into an ObjectID", vrType) - } - - return reflect.ValueOf(oid), nil -} - -// ObjectIDDecodeValue is the ValueDecoderFunc for primitive.ObjectID. -func (dvd DefaultValueDecoders) ObjectIDDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tOID { - return ValueDecoderError{Name: "ObjectIDDecodeValue", Types: []reflect.Type{tOID}, Received: val} - } - - elem, err := dvd.objectIDDecodeType(dc, vr, tOID) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -func (DefaultValueDecoders) dateTimeDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tDateTime { - return emptyValue, ValueDecoderError{ - Name: "DateTimeDecodeValue", - Types: []reflect.Type{tDateTime}, - Received: reflect.Zero(t), - } - } - - var dt int64 - var err error - switch vrType := vr.Type(); vrType { - case bsontype.DateTime: - dt, err = vr.ReadDateTime() - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a DateTime", vrType) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(primitive.DateTime(dt)), nil -} - -// DateTimeDecodeValue is the ValueDecoderFunc for DateTime. -func (dvd DefaultValueDecoders) DateTimeDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tDateTime { - return ValueDecoderError{Name: "DateTimeDecodeValue", Types: []reflect.Type{tDateTime}, Received: val} - } - - elem, err := dvd.dateTimeDecodeType(dc, vr, tDateTime) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -func (DefaultValueDecoders) nullDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tNull { - return emptyValue, ValueDecoderError{ - Name: "NullDecodeValue", - Types: []reflect.Type{tNull}, - Received: reflect.Zero(t), - } - } - - var err error - switch vrType := vr.Type(); vrType { - case bsontype.Undefined: - err = vr.ReadUndefined() - case bsontype.Null: - err = vr.ReadNull() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a Null", vr.Type()) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(primitive.Null{}), nil -} - -// NullDecodeValue is the ValueDecoderFunc for Null. -func (dvd DefaultValueDecoders) NullDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tNull { - return ValueDecoderError{Name: "NullDecodeValue", Types: []reflect.Type{tNull}, Received: val} - } - - elem, err := dvd.nullDecodeType(dc, vr, tNull) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -func (DefaultValueDecoders) regexDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tRegex { - return emptyValue, ValueDecoderError{ - Name: "RegexDecodeValue", - Types: []reflect.Type{tRegex}, - Received: reflect.Zero(t), - } - } - - var pattern, options string - var err error - switch vrType := vr.Type(); vrType { - case bsontype.Regex: - pattern, options, err = vr.ReadRegex() - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a Regex", vrType) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(primitive.Regex{Pattern: pattern, Options: options}), nil -} - -// RegexDecodeValue is the ValueDecoderFunc for Regex. -func (dvd DefaultValueDecoders) RegexDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tRegex { - return ValueDecoderError{Name: "RegexDecodeValue", Types: []reflect.Type{tRegex}, Received: val} - } - - elem, err := dvd.regexDecodeType(dc, vr, tRegex) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -func (DefaultValueDecoders) dBPointerDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tDBPointer { - return emptyValue, ValueDecoderError{ - Name: "DBPointerDecodeValue", - Types: []reflect.Type{tDBPointer}, - Received: reflect.Zero(t), - } - } - - var ns string - var pointer primitive.ObjectID - var err error - switch vrType := vr.Type(); vrType { - case bsontype.DBPointer: - ns, pointer, err = vr.ReadDBPointer() - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a DBPointer", vrType) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(primitive.DBPointer{DB: ns, Pointer: pointer}), nil -} - -// DBPointerDecodeValue is the ValueDecoderFunc for DBPointer. -func (dvd DefaultValueDecoders) DBPointerDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tDBPointer { - return ValueDecoderError{Name: "DBPointerDecodeValue", Types: []reflect.Type{tDBPointer}, Received: val} - } - - elem, err := dvd.dBPointerDecodeType(dc, vr, tDBPointer) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -func (DefaultValueDecoders) timestampDecodeType(dc DecodeContext, vr bsonrw.ValueReader, reflectType reflect.Type) (reflect.Value, error) { - if reflectType != tTimestamp { - return emptyValue, ValueDecoderError{ - Name: "TimestampDecodeValue", - Types: []reflect.Type{tTimestamp}, - Received: reflect.Zero(reflectType), - } - } - - var t, incr uint32 - var err error - switch vrType := vr.Type(); vrType { - case bsontype.Timestamp: - t, incr, err = vr.ReadTimestamp() - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a Timestamp", vrType) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(primitive.Timestamp{T: t, I: incr}), nil -} - -// TimestampDecodeValue is the ValueDecoderFunc for Timestamp. -func (dvd DefaultValueDecoders) TimestampDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tTimestamp { - return ValueDecoderError{Name: "TimestampDecodeValue", Types: []reflect.Type{tTimestamp}, Received: val} - } - - elem, err := dvd.timestampDecodeType(dc, vr, tTimestamp) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -func (DefaultValueDecoders) minKeyDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tMinKey { - return emptyValue, ValueDecoderError{ - Name: "MinKeyDecodeValue", - Types: []reflect.Type{tMinKey}, - Received: reflect.Zero(t), - } - } - - var err error - switch vrType := vr.Type(); vrType { - case bsontype.MinKey: - err = vr.ReadMinKey() - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a MinKey", vr.Type()) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(primitive.MinKey{}), nil -} - -// MinKeyDecodeValue is the ValueDecoderFunc for MinKey. -func (dvd DefaultValueDecoders) MinKeyDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tMinKey { - return ValueDecoderError{Name: "MinKeyDecodeValue", Types: []reflect.Type{tMinKey}, Received: val} - } - - elem, err := dvd.minKeyDecodeType(dc, vr, tMinKey) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -func (DefaultValueDecoders) maxKeyDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tMaxKey { - return emptyValue, ValueDecoderError{ - Name: "MaxKeyDecodeValue", - Types: []reflect.Type{tMaxKey}, - Received: reflect.Zero(t), - } - } - - var err error - switch vrType := vr.Type(); vrType { - case bsontype.MaxKey: - err = vr.ReadMaxKey() - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a MaxKey", vr.Type()) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(primitive.MaxKey{}), nil -} - -// MaxKeyDecodeValue is the ValueDecoderFunc for MaxKey. -func (dvd DefaultValueDecoders) MaxKeyDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tMaxKey { - return ValueDecoderError{Name: "MaxKeyDecodeValue", Types: []reflect.Type{tMaxKey}, Received: val} - } - - elem, err := dvd.maxKeyDecodeType(dc, vr, tMaxKey) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -func (dvd DefaultValueDecoders) decimal128DecodeType(dctx DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tDecimal { - return emptyValue, ValueDecoderError{ - Name: "Decimal128DecodeValue", - Types: []reflect.Type{tDecimal}, - Received: reflect.Zero(t), - } - } - - var d128 primitive.Decimal128 - var err error - switch vrType := vr.Type(); vrType { - case bsontype.Decimal128: - d128, err = vr.ReadDecimal128() - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a primitive.Decimal128", vr.Type()) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(d128), nil -} - -// Decimal128DecodeValue is the ValueDecoderFunc for primitive.Decimal128. -func (dvd DefaultValueDecoders) Decimal128DecodeValue(dctx DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tDecimal { - return ValueDecoderError{Name: "Decimal128DecodeValue", Types: []reflect.Type{tDecimal}, Received: val} - } - - elem, err := dvd.decimal128DecodeType(dctx, vr, tDecimal) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -func (dvd DefaultValueDecoders) jsonNumberDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tJSONNumber { - return emptyValue, ValueDecoderError{ - Name: "JSONNumberDecodeValue", - Types: []reflect.Type{tJSONNumber}, - Received: reflect.Zero(t), - } - } - - var jsonNum json.Number - var err error - switch vrType := vr.Type(); vrType { - case bsontype.Double: - f64, err := vr.ReadDouble() - if err != nil { - return emptyValue, err - } - jsonNum = json.Number(strconv.FormatFloat(f64, 'f', -1, 64)) - case bsontype.Int32: - i32, err := vr.ReadInt32() - if err != nil { - return emptyValue, err - } - jsonNum = json.Number(strconv.FormatInt(int64(i32), 10)) - case bsontype.Int64: - i64, err := vr.ReadInt64() - if err != nil { - return emptyValue, err - } - jsonNum = json.Number(strconv.FormatInt(i64, 10)) - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a json.Number", vrType) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(jsonNum), nil -} - -// JSONNumberDecodeValue is the ValueDecoderFunc for json.Number. -func (dvd DefaultValueDecoders) JSONNumberDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tJSONNumber { - return ValueDecoderError{Name: "JSONNumberDecodeValue", Types: []reflect.Type{tJSONNumber}, Received: val} - } - - elem, err := dvd.jsonNumberDecodeType(dc, vr, tJSONNumber) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -func (dvd DefaultValueDecoders) urlDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tURL { - return emptyValue, ValueDecoderError{ - Name: "URLDecodeValue", - Types: []reflect.Type{tURL}, - Received: reflect.Zero(t), - } - } - - urlPtr := &url.URL{} - var err error - switch vrType := vr.Type(); vrType { - case bsontype.String: - var str string // Declare str here to avoid shadowing err during the ReadString call. - str, err = vr.ReadString() - if err != nil { - return emptyValue, err - } - - urlPtr, err = url.Parse(str) - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a *url.URL", vrType) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(urlPtr).Elem(), nil -} - -// URLDecodeValue is the ValueDecoderFunc for url.URL. -func (dvd DefaultValueDecoders) URLDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tURL { - return ValueDecoderError{Name: "URLDecodeValue", Types: []reflect.Type{tURL}, Received: val} - } - - elem, err := dvd.urlDecodeType(dc, vr, tURL) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -// TimeDecodeValue is the ValueDecoderFunc for time.Time. -// -// Deprecated: TimeDecodeValue is not registered by default. Use TimeCodec.DecodeValue instead. -func (dvd DefaultValueDecoders) TimeDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if vr.Type() != bsontype.DateTime { - return fmt.Errorf("cannot decode %v into a time.Time", vr.Type()) - } - - dt, err := vr.ReadDateTime() - if err != nil { - return err - } - - if !val.CanSet() || val.Type() != tTime { - return ValueDecoderError{Name: "TimeDecodeValue", Types: []reflect.Type{tTime}, Received: val} - } - - val.Set(reflect.ValueOf(time.Unix(dt/1000, dt%1000*1000000).UTC())) - return nil -} - -// ByteSliceDecodeValue is the ValueDecoderFunc for []byte. -// -// Deprecated: ByteSliceDecodeValue is not registered by default. Use ByteSliceCodec.DecodeValue instead. -func (dvd DefaultValueDecoders) ByteSliceDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if vr.Type() != bsontype.Binary && vr.Type() != bsontype.Null { - return fmt.Errorf("cannot decode %v into a []byte", vr.Type()) - } - - if !val.CanSet() || val.Type() != tByteSlice { - return ValueDecoderError{Name: "ByteSliceDecodeValue", Types: []reflect.Type{tByteSlice}, Received: val} - } - - if vr.Type() == bsontype.Null { - val.Set(reflect.Zero(val.Type())) - return vr.ReadNull() - } - - data, subtype, err := vr.ReadBinary() - if err != nil { - return err - } - if subtype != 0x00 { - return fmt.Errorf("ByteSliceDecodeValue can only be used to decode subtype 0x00 for %s, got %v", bsontype.Binary, subtype) - } - - val.Set(reflect.ValueOf(data)) - return nil -} - -// MapDecodeValue is the ValueDecoderFunc for map[string]* types. -// -// Deprecated: MapDecodeValue is not registered by default. Use MapCodec.DecodeValue instead. -func (dvd DefaultValueDecoders) MapDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Kind() != reflect.Map || val.Type().Key().Kind() != reflect.String { - return ValueDecoderError{Name: "MapDecodeValue", Kinds: []reflect.Kind{reflect.Map}, Received: val} - } - - switch vr.Type() { - case bsontype.Type(0), bsontype.EmbeddedDocument: - case bsontype.Null: - val.Set(reflect.Zero(val.Type())) - return vr.ReadNull() - default: - return fmt.Errorf("cannot decode %v into a %s", vr.Type(), val.Type()) - } - - dr, err := vr.ReadDocument() - if err != nil { - return err - } - - if val.IsNil() { - val.Set(reflect.MakeMap(val.Type())) - } - - eType := val.Type().Elem() - decoder, err := dc.LookupDecoder(eType) - if err != nil { - return err - } - - if eType == tEmpty { - dc.Ancestor = val.Type() - } - - keyType := val.Type().Key() - for { - key, vr, err := dr.ReadElement() - if err == bsonrw.ErrEOD { - break - } - if err != nil { - return err - } - - elem := reflect.New(eType).Elem() - - err = decoder.DecodeValue(dc, vr, elem) - if err != nil { - return err - } - - val.SetMapIndex(reflect.ValueOf(key).Convert(keyType), elem) - } - return nil -} - -// ArrayDecodeValue is the ValueDecoderFunc for array types. -func (dvd DefaultValueDecoders) ArrayDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.IsValid() || val.Kind() != reflect.Array { - return ValueDecoderError{Name: "ArrayDecodeValue", Kinds: []reflect.Kind{reflect.Array}, Received: val} - } - - switch vrType := vr.Type(); vrType { - case bsontype.Array: - case bsontype.Type(0), bsontype.EmbeddedDocument: - if val.Type().Elem() != tE { - return fmt.Errorf("cannot decode document into %s", val.Type()) - } - case bsontype.Binary: - if val.Type().Elem() != tByte { - return fmt.Errorf("ArrayDecodeValue can only be used to decode binary into a byte array, got %v", vrType) - } - data, subtype, err := vr.ReadBinary() - if err != nil { - return err - } - if subtype != bsontype.BinaryGeneric && subtype != bsontype.BinaryBinaryOld { - return fmt.Errorf("ArrayDecodeValue can only be used to decode subtype 0x00 or 0x02 for %s, got %v", bsontype.Binary, subtype) - } - - if len(data) > val.Len() { - return fmt.Errorf("more elements returned in array than can fit inside %s", val.Type()) - } - - for idx, elem := range data { - val.Index(idx).Set(reflect.ValueOf(elem)) - } - return nil - case bsontype.Null: - val.Set(reflect.Zero(val.Type())) - return vr.ReadNull() - case bsontype.Undefined: - val.Set(reflect.Zero(val.Type())) - return vr.ReadUndefined() - default: - return fmt.Errorf("cannot decode %v into an array", vrType) - } - - var elemsFunc func(DecodeContext, bsonrw.ValueReader, reflect.Value) ([]reflect.Value, error) - switch val.Type().Elem() { - case tE: - elemsFunc = dvd.decodeD - default: - elemsFunc = dvd.decodeDefault - } - - elems, err := elemsFunc(dc, vr, val) - if err != nil { - return err - } - - if len(elems) > val.Len() { - return fmt.Errorf("more elements returned in array than can fit inside %s, got %v elements", val.Type(), len(elems)) - } - - for idx, elem := range elems { - val.Index(idx).Set(elem) - } - - return nil -} - -// SliceDecodeValue is the ValueDecoderFunc for slice types. -// -// Deprecated: SliceDecodeValue is not registered by default. Use SliceCodec.DecodeValue instead. -func (dvd DefaultValueDecoders) SliceDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Kind() != reflect.Slice { - return ValueDecoderError{Name: "SliceDecodeValue", Kinds: []reflect.Kind{reflect.Slice}, Received: val} - } - - switch vr.Type() { - case bsontype.Array: - case bsontype.Null: - val.Set(reflect.Zero(val.Type())) - return vr.ReadNull() - case bsontype.Type(0), bsontype.EmbeddedDocument: - if val.Type().Elem() != tE { - return fmt.Errorf("cannot decode document into %s", val.Type()) - } - default: - return fmt.Errorf("cannot decode %v into a slice", vr.Type()) - } - - var elemsFunc func(DecodeContext, bsonrw.ValueReader, reflect.Value) ([]reflect.Value, error) - switch val.Type().Elem() { - case tE: - dc.Ancestor = val.Type() - elemsFunc = dvd.decodeD - default: - elemsFunc = dvd.decodeDefault - } - - elems, err := elemsFunc(dc, vr, val) - if err != nil { - return err - } - - if val.IsNil() { - val.Set(reflect.MakeSlice(val.Type(), 0, len(elems))) - } - - val.SetLen(0) - val.Set(reflect.Append(val, elems...)) - - return nil -} - -// ValueUnmarshalerDecodeValue is the ValueDecoderFunc for ValueUnmarshaler implementations. -func (dvd DefaultValueDecoders) ValueUnmarshalerDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.IsValid() || (!val.Type().Implements(tValueUnmarshaler) && !reflect.PtrTo(val.Type()).Implements(tValueUnmarshaler)) { - return ValueDecoderError{Name: "ValueUnmarshalerDecodeValue", Types: []reflect.Type{tValueUnmarshaler}, Received: val} - } - - if val.Kind() == reflect.Ptr && val.IsNil() { - if !val.CanSet() { - return ValueDecoderError{Name: "ValueUnmarshalerDecodeValue", Types: []reflect.Type{tValueUnmarshaler}, Received: val} - } - val.Set(reflect.New(val.Type().Elem())) - } - - if !val.Type().Implements(tValueUnmarshaler) { - if !val.CanAddr() { - return ValueDecoderError{Name: "ValueUnmarshalerDecodeValue", Types: []reflect.Type{tValueUnmarshaler}, Received: val} - } - val = val.Addr() // If the type doesn't implement the interface, a pointer to it must. - } - - t, src, err := bsonrw.Copier{}.CopyValueToBytes(vr) - if err != nil { - return err - } - - fn := val.Convert(tValueUnmarshaler).MethodByName("UnmarshalBSONValue") - errVal := fn.Call([]reflect.Value{reflect.ValueOf(t), reflect.ValueOf(src)})[0] - if !errVal.IsNil() { - return errVal.Interface().(error) - } - return nil -} - -// UnmarshalerDecodeValue is the ValueDecoderFunc for Unmarshaler implementations. -func (dvd DefaultValueDecoders) UnmarshalerDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.IsValid() || (!val.Type().Implements(tUnmarshaler) && !reflect.PtrTo(val.Type()).Implements(tUnmarshaler)) { - return ValueDecoderError{Name: "UnmarshalerDecodeValue", Types: []reflect.Type{tUnmarshaler}, Received: val} - } - - if val.Kind() == reflect.Ptr && val.IsNil() { - if !val.CanSet() { - return ValueDecoderError{Name: "UnmarshalerDecodeValue", Types: []reflect.Type{tUnmarshaler}, Received: val} - } - val.Set(reflect.New(val.Type().Elem())) - } - - _, src, err := bsonrw.Copier{}.CopyValueToBytes(vr) - if err != nil { - return err - } - - // If the target Go value is a pointer and the BSON field value is empty, set the value to the - // zero value of the pointer (nil) and don't call UnmarshalBSON. UnmarshalBSON has no way to - // change the pointer value from within the function (only the value at the pointer address), - // so it can't set the pointer to "nil" itself. Since the most common Go value for an empty BSON - // field value is "nil", we set "nil" here and don't call UnmarshalBSON. This behavior matches - // the behavior of the Go "encoding/json" unmarshaler when the target Go value is a pointer and - // the JSON field value is "null". - if val.Kind() == reflect.Ptr && len(src) == 0 { - val.Set(reflect.Zero(val.Type())) - return nil - } - - if !val.Type().Implements(tUnmarshaler) { - if !val.CanAddr() { - return ValueDecoderError{Name: "UnmarshalerDecodeValue", Types: []reflect.Type{tUnmarshaler}, Received: val} - } - val = val.Addr() // If the type doesn't implement the interface, a pointer to it must. - } - - fn := val.Convert(tUnmarshaler).MethodByName("UnmarshalBSON") - errVal := fn.Call([]reflect.Value{reflect.ValueOf(src)})[0] - if !errVal.IsNil() { - return errVal.Interface().(error) - } - return nil -} - -// EmptyInterfaceDecodeValue is the ValueDecoderFunc for interface{}. -// -// Deprecated: EmptyInterfaceDecodeValue is not registered by default. Use EmptyInterfaceCodec.DecodeValue instead. -func (dvd DefaultValueDecoders) EmptyInterfaceDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tEmpty { - return ValueDecoderError{Name: "EmptyInterfaceDecodeValue", Types: []reflect.Type{tEmpty}, Received: val} - } - - rtype, err := dc.LookupTypeMapEntry(vr.Type()) - if err != nil { - switch vr.Type() { - case bsontype.EmbeddedDocument: - if dc.Ancestor != nil { - rtype = dc.Ancestor - break - } - rtype = tD - case bsontype.Null: - val.Set(reflect.Zero(val.Type())) - return vr.ReadNull() - default: - return err - } - } - - decoder, err := dc.LookupDecoder(rtype) - if err != nil { - return err - } - - elem := reflect.New(rtype).Elem() - err = decoder.DecodeValue(dc, vr, elem) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -// CoreDocumentDecodeValue is the ValueDecoderFunc for bsoncore.Document. -func (DefaultValueDecoders) CoreDocumentDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tCoreDocument { - return ValueDecoderError{Name: "CoreDocumentDecodeValue", Types: []reflect.Type{tCoreDocument}, Received: val} - } - - if val.IsNil() { - val.Set(reflect.MakeSlice(val.Type(), 0, 0)) - } - - val.SetLen(0) - - cdoc, err := bsonrw.Copier{}.AppendDocumentBytes(val.Interface().(bsoncore.Document), vr) - val.Set(reflect.ValueOf(cdoc)) - return err -} - -func (dvd DefaultValueDecoders) decodeDefault(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) ([]reflect.Value, error) { - elems := make([]reflect.Value, 0) - - ar, err := vr.ReadArray() - if err != nil { - return nil, err - } - - eType := val.Type().Elem() - - decoder, err := dc.LookupDecoder(eType) - if err != nil { - return nil, err - } - eTypeDecoder, _ := decoder.(typeDecoder) - - idx := 0 - for { - vr, err := ar.ReadValue() - if err == bsonrw.ErrEOA { - break - } - if err != nil { - return nil, err - } - - elem, err := decodeTypeOrValueWithInfo(decoder, eTypeDecoder, dc, vr, eType, true) - if err != nil { - return nil, newDecodeError(strconv.Itoa(idx), err) - } - elems = append(elems, elem) - idx++ - } - - return elems, nil -} - -func (dvd DefaultValueDecoders) readCodeWithScope(dc DecodeContext, vr bsonrw.ValueReader) (primitive.CodeWithScope, error) { - var cws primitive.CodeWithScope - - code, dr, err := vr.ReadCodeWithScope() - if err != nil { - return cws, err - } - - scope := reflect.New(tD).Elem() - elems, err := dvd.decodeElemsFromDocumentReader(dc, dr) - if err != nil { - return cws, err - } - - scope.Set(reflect.MakeSlice(tD, 0, len(elems))) - scope.Set(reflect.Append(scope, elems...)) - - cws = primitive.CodeWithScope{ - Code: primitive.JavaScript(code), - Scope: scope.Interface().(primitive.D), - } - return cws, nil -} - -func (dvd DefaultValueDecoders) codeWithScopeDecodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tCodeWithScope { - return emptyValue, ValueDecoderError{ - Name: "CodeWithScopeDecodeValue", - Types: []reflect.Type{tCodeWithScope}, - Received: reflect.Zero(t), - } - } - - var cws primitive.CodeWithScope - var err error - switch vrType := vr.Type(); vrType { - case bsontype.CodeWithScope: - cws, err = dvd.readCodeWithScope(dc, vr) - case bsontype.Null: - err = vr.ReadNull() - case bsontype.Undefined: - err = vr.ReadUndefined() - default: - return emptyValue, fmt.Errorf("cannot decode %v into a primitive.CodeWithScope", vrType) - } - if err != nil { - return emptyValue, err - } - - return reflect.ValueOf(cws), nil -} - -// CodeWithScopeDecodeValue is the ValueDecoderFunc for CodeWithScope. -func (dvd DefaultValueDecoders) CodeWithScopeDecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tCodeWithScope { - return ValueDecoderError{Name: "CodeWithScopeDecodeValue", Types: []reflect.Type{tCodeWithScope}, Received: val} - } - - elem, err := dvd.codeWithScopeDecodeType(dc, vr, tCodeWithScope) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -func (dvd DefaultValueDecoders) decodeD(dc DecodeContext, vr bsonrw.ValueReader, _ reflect.Value) ([]reflect.Value, error) { - switch vr.Type() { - case bsontype.Type(0), bsontype.EmbeddedDocument: - default: - return nil, fmt.Errorf("cannot decode %v into a D", vr.Type()) - } - - dr, err := vr.ReadDocument() - if err != nil { - return nil, err - } - - return dvd.decodeElemsFromDocumentReader(dc, dr) -} - -func (DefaultValueDecoders) decodeElemsFromDocumentReader(dc DecodeContext, dr bsonrw.DocumentReader) ([]reflect.Value, error) { - decoder, err := dc.LookupDecoder(tEmpty) - if err != nil { - return nil, err - } - - elems := make([]reflect.Value, 0) - for { - key, vr, err := dr.ReadElement() - if err == bsonrw.ErrEOD { - break - } - if err != nil { - return nil, err - } - - val := reflect.New(tEmpty).Elem() - err = decoder.DecodeValue(dc, vr, val) - if err != nil { - return nil, newDecodeError(key, err) - } - - elems = append(elems, reflect.ValueOf(primitive.E{Key: key, Value: val.Interface()})) - } - - return elems, nil -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/default_value_encoders.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/default_value_encoders.go deleted file mode 100644 index 6bdb43c..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/default_value_encoders.go +++ /dev/null @@ -1,766 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "encoding/json" - "errors" - "fmt" - "math" - "net/url" - "reflect" - "sync" - "time" - - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/bson/bsontype" - "go.mongodb.org/mongo-driver/bson/primitive" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" -) - -var defaultValueEncoders DefaultValueEncoders - -var bvwPool = bsonrw.NewBSONValueWriterPool() - -var errInvalidValue = errors.New("cannot encode invalid element") - -var sliceWriterPool = sync.Pool{ - New: func() interface{} { - sw := make(bsonrw.SliceWriter, 0) - return &sw - }, -} - -func encodeElement(ec EncodeContext, dw bsonrw.DocumentWriter, e primitive.E) error { - vw, err := dw.WriteDocumentElement(e.Key) - if err != nil { - return err - } - - if e.Value == nil { - return vw.WriteNull() - } - encoder, err := ec.LookupEncoder(reflect.TypeOf(e.Value)) - if err != nil { - return err - } - - err = encoder.EncodeValue(ec, vw, reflect.ValueOf(e.Value)) - if err != nil { - return err - } - return nil -} - -// DefaultValueEncoders is a namespace type for the default ValueEncoders used -// when creating a registry. -type DefaultValueEncoders struct{} - -// RegisterDefaultEncoders will register the encoder methods attached to DefaultValueEncoders with -// the provided RegistryBuilder. -func (dve DefaultValueEncoders) RegisterDefaultEncoders(rb *RegistryBuilder) { - if rb == nil { - panic(errors.New("argument to RegisterDefaultEncoders must not be nil")) - } - rb. - RegisterTypeEncoder(tByteSlice, defaultByteSliceCodec). - RegisterTypeEncoder(tTime, defaultTimeCodec). - RegisterTypeEncoder(tEmpty, defaultEmptyInterfaceCodec). - RegisterTypeEncoder(tCoreArray, defaultArrayCodec). - RegisterTypeEncoder(tOID, ValueEncoderFunc(dve.ObjectIDEncodeValue)). - RegisterTypeEncoder(tDecimal, ValueEncoderFunc(dve.Decimal128EncodeValue)). - RegisterTypeEncoder(tJSONNumber, ValueEncoderFunc(dve.JSONNumberEncodeValue)). - RegisterTypeEncoder(tURL, ValueEncoderFunc(dve.URLEncodeValue)). - RegisterTypeEncoder(tJavaScript, ValueEncoderFunc(dve.JavaScriptEncodeValue)). - RegisterTypeEncoder(tSymbol, ValueEncoderFunc(dve.SymbolEncodeValue)). - RegisterTypeEncoder(tBinary, ValueEncoderFunc(dve.BinaryEncodeValue)). - RegisterTypeEncoder(tUndefined, ValueEncoderFunc(dve.UndefinedEncodeValue)). - RegisterTypeEncoder(tDateTime, ValueEncoderFunc(dve.DateTimeEncodeValue)). - RegisterTypeEncoder(tNull, ValueEncoderFunc(dve.NullEncodeValue)). - RegisterTypeEncoder(tRegex, ValueEncoderFunc(dve.RegexEncodeValue)). - RegisterTypeEncoder(tDBPointer, ValueEncoderFunc(dve.DBPointerEncodeValue)). - RegisterTypeEncoder(tTimestamp, ValueEncoderFunc(dve.TimestampEncodeValue)). - RegisterTypeEncoder(tMinKey, ValueEncoderFunc(dve.MinKeyEncodeValue)). - RegisterTypeEncoder(tMaxKey, ValueEncoderFunc(dve.MaxKeyEncodeValue)). - RegisterTypeEncoder(tCoreDocument, ValueEncoderFunc(dve.CoreDocumentEncodeValue)). - RegisterTypeEncoder(tCodeWithScope, ValueEncoderFunc(dve.CodeWithScopeEncodeValue)). - RegisterDefaultEncoder(reflect.Bool, ValueEncoderFunc(dve.BooleanEncodeValue)). - RegisterDefaultEncoder(reflect.Int, ValueEncoderFunc(dve.IntEncodeValue)). - RegisterDefaultEncoder(reflect.Int8, ValueEncoderFunc(dve.IntEncodeValue)). - RegisterDefaultEncoder(reflect.Int16, ValueEncoderFunc(dve.IntEncodeValue)). - RegisterDefaultEncoder(reflect.Int32, ValueEncoderFunc(dve.IntEncodeValue)). - RegisterDefaultEncoder(reflect.Int64, ValueEncoderFunc(dve.IntEncodeValue)). - RegisterDefaultEncoder(reflect.Uint, defaultUIntCodec). - RegisterDefaultEncoder(reflect.Uint8, defaultUIntCodec). - RegisterDefaultEncoder(reflect.Uint16, defaultUIntCodec). - RegisterDefaultEncoder(reflect.Uint32, defaultUIntCodec). - RegisterDefaultEncoder(reflect.Uint64, defaultUIntCodec). - RegisterDefaultEncoder(reflect.Float32, ValueEncoderFunc(dve.FloatEncodeValue)). - RegisterDefaultEncoder(reflect.Float64, ValueEncoderFunc(dve.FloatEncodeValue)). - RegisterDefaultEncoder(reflect.Array, ValueEncoderFunc(dve.ArrayEncodeValue)). - RegisterDefaultEncoder(reflect.Map, defaultMapCodec). - RegisterDefaultEncoder(reflect.Slice, defaultSliceCodec). - RegisterDefaultEncoder(reflect.String, defaultStringCodec). - RegisterDefaultEncoder(reflect.Struct, newDefaultStructCodec()). - RegisterDefaultEncoder(reflect.Ptr, NewPointerCodec()). - RegisterHookEncoder(tValueMarshaler, ValueEncoderFunc(dve.ValueMarshalerEncodeValue)). - RegisterHookEncoder(tMarshaler, ValueEncoderFunc(dve.MarshalerEncodeValue)). - RegisterHookEncoder(tProxy, ValueEncoderFunc(dve.ProxyEncodeValue)) -} - -// BooleanEncodeValue is the ValueEncoderFunc for bool types. -func (dve DefaultValueEncoders) BooleanEncodeValue(ectx EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Kind() != reflect.Bool { - return ValueEncoderError{Name: "BooleanEncodeValue", Kinds: []reflect.Kind{reflect.Bool}, Received: val} - } - return vw.WriteBoolean(val.Bool()) -} - -func fitsIn32Bits(i int64) bool { - return math.MinInt32 <= i && i <= math.MaxInt32 -} - -// IntEncodeValue is the ValueEncoderFunc for int types. -func (dve DefaultValueEncoders) IntEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - switch val.Kind() { - case reflect.Int8, reflect.Int16, reflect.Int32: - return vw.WriteInt32(int32(val.Int())) - case reflect.Int: - i64 := val.Int() - if fitsIn32Bits(i64) { - return vw.WriteInt32(int32(i64)) - } - return vw.WriteInt64(i64) - case reflect.Int64: - i64 := val.Int() - if ec.MinSize && fitsIn32Bits(i64) { - return vw.WriteInt32(int32(i64)) - } - return vw.WriteInt64(i64) - } - - return ValueEncoderError{ - Name: "IntEncodeValue", - Kinds: []reflect.Kind{reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int}, - Received: val, - } -} - -// UintEncodeValue is the ValueEncoderFunc for uint types. -// -// Deprecated: UintEncodeValue is not registered by default. Use UintCodec.EncodeValue instead. -func (dve DefaultValueEncoders) UintEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - switch val.Kind() { - case reflect.Uint8, reflect.Uint16: - return vw.WriteInt32(int32(val.Uint())) - case reflect.Uint, reflect.Uint32, reflect.Uint64: - u64 := val.Uint() - if ec.MinSize && u64 <= math.MaxInt32 { - return vw.WriteInt32(int32(u64)) - } - if u64 > math.MaxInt64 { - return fmt.Errorf("%d overflows int64", u64) - } - return vw.WriteInt64(int64(u64)) - } - - return ValueEncoderError{ - Name: "UintEncodeValue", - Kinds: []reflect.Kind{reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint}, - Received: val, - } -} - -// FloatEncodeValue is the ValueEncoderFunc for float types. -func (dve DefaultValueEncoders) FloatEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - switch val.Kind() { - case reflect.Float32, reflect.Float64: - return vw.WriteDouble(val.Float()) - } - - return ValueEncoderError{Name: "FloatEncodeValue", Kinds: []reflect.Kind{reflect.Float32, reflect.Float64}, Received: val} -} - -// StringEncodeValue is the ValueEncoderFunc for string types. -// -// Deprecated: StringEncodeValue is not registered by default. Use StringCodec.EncodeValue instead. -func (dve DefaultValueEncoders) StringEncodeValue(ectx EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if val.Kind() != reflect.String { - return ValueEncoderError{ - Name: "StringEncodeValue", - Kinds: []reflect.Kind{reflect.String}, - Received: val, - } - } - - return vw.WriteString(val.String()) -} - -// ObjectIDEncodeValue is the ValueEncoderFunc for primitive.ObjectID. -func (dve DefaultValueEncoders) ObjectIDEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tOID { - return ValueEncoderError{Name: "ObjectIDEncodeValue", Types: []reflect.Type{tOID}, Received: val} - } - return vw.WriteObjectID(val.Interface().(primitive.ObjectID)) -} - -// Decimal128EncodeValue is the ValueEncoderFunc for primitive.Decimal128. -func (dve DefaultValueEncoders) Decimal128EncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tDecimal { - return ValueEncoderError{Name: "Decimal128EncodeValue", Types: []reflect.Type{tDecimal}, Received: val} - } - return vw.WriteDecimal128(val.Interface().(primitive.Decimal128)) -} - -// JSONNumberEncodeValue is the ValueEncoderFunc for json.Number. -func (dve DefaultValueEncoders) JSONNumberEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tJSONNumber { - return ValueEncoderError{Name: "JSONNumberEncodeValue", Types: []reflect.Type{tJSONNumber}, Received: val} - } - jsnum := val.Interface().(json.Number) - - // Attempt int first, then float64 - if i64, err := jsnum.Int64(); err == nil { - return dve.IntEncodeValue(ec, vw, reflect.ValueOf(i64)) - } - - f64, err := jsnum.Float64() - if err != nil { - return err - } - - return dve.FloatEncodeValue(ec, vw, reflect.ValueOf(f64)) -} - -// URLEncodeValue is the ValueEncoderFunc for url.URL. -func (dve DefaultValueEncoders) URLEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tURL { - return ValueEncoderError{Name: "URLEncodeValue", Types: []reflect.Type{tURL}, Received: val} - } - u := val.Interface().(url.URL) - return vw.WriteString(u.String()) -} - -// TimeEncodeValue is the ValueEncoderFunc for time.TIme. -// -// Deprecated: TimeEncodeValue is not registered by default. Use TimeCodec.EncodeValue instead. -func (dve DefaultValueEncoders) TimeEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tTime { - return ValueEncoderError{Name: "TimeEncodeValue", Types: []reflect.Type{tTime}, Received: val} - } - tt := val.Interface().(time.Time) - dt := primitive.NewDateTimeFromTime(tt) - return vw.WriteDateTime(int64(dt)) -} - -// ByteSliceEncodeValue is the ValueEncoderFunc for []byte. -// -// Deprecated: ByteSliceEncodeValue is not registered by default. Use ByteSliceCodec.EncodeValue instead. -func (dve DefaultValueEncoders) ByteSliceEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tByteSlice { - return ValueEncoderError{Name: "ByteSliceEncodeValue", Types: []reflect.Type{tByteSlice}, Received: val} - } - if val.IsNil() { - return vw.WriteNull() - } - return vw.WriteBinary(val.Interface().([]byte)) -} - -// MapEncodeValue is the ValueEncoderFunc for map[string]* types. -// -// Deprecated: MapEncodeValue is not registered by default. Use MapCodec.EncodeValue instead. -func (dve DefaultValueEncoders) MapEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Kind() != reflect.Map || val.Type().Key().Kind() != reflect.String { - return ValueEncoderError{Name: "MapEncodeValue", Kinds: []reflect.Kind{reflect.Map}, Received: val} - } - - if val.IsNil() { - // If we have a nill map but we can't WriteNull, that means we're probably trying to encode - // to a TopLevel document. We can't currently tell if this is what actually happened, but if - // there's a deeper underlying problem, the error will also be returned from WriteDocument, - // so just continue. The operations on a map reflection value are valid, so we can call - // MapKeys within mapEncodeValue without a problem. - err := vw.WriteNull() - if err == nil { - return nil - } - } - - dw, err := vw.WriteDocument() - if err != nil { - return err - } - - return dve.mapEncodeValue(ec, dw, val, nil) -} - -// mapEncodeValue handles encoding of the values of a map. The collisionFn returns -// true if the provided key exists, this is mainly used for inline maps in the -// struct codec. -func (dve DefaultValueEncoders) mapEncodeValue(ec EncodeContext, dw bsonrw.DocumentWriter, val reflect.Value, collisionFn func(string) bool) error { - - elemType := val.Type().Elem() - encoder, err := ec.LookupEncoder(elemType) - if err != nil && elemType.Kind() != reflect.Interface { - return err - } - - keys := val.MapKeys() - for _, key := range keys { - if collisionFn != nil && collisionFn(key.String()) { - return fmt.Errorf("Key %s of inlined map conflicts with a struct field name", key) - } - - currEncoder, currVal, lookupErr := dve.lookupElementEncoder(ec, encoder, val.MapIndex(key)) - if lookupErr != nil && lookupErr != errInvalidValue { - return lookupErr - } - - vw, err := dw.WriteDocumentElement(key.String()) - if err != nil { - return err - } - - if lookupErr == errInvalidValue { - err = vw.WriteNull() - if err != nil { - return err - } - continue - } - - err = currEncoder.EncodeValue(ec, vw, currVal) - if err != nil { - return err - } - } - - return dw.WriteDocumentEnd() -} - -// ArrayEncodeValue is the ValueEncoderFunc for array types. -func (dve DefaultValueEncoders) ArrayEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Kind() != reflect.Array { - return ValueEncoderError{Name: "ArrayEncodeValue", Kinds: []reflect.Kind{reflect.Array}, Received: val} - } - - // If we have a []primitive.E we want to treat it as a document instead of as an array. - if val.Type().Elem() == tE { - dw, err := vw.WriteDocument() - if err != nil { - return err - } - - for idx := 0; idx < val.Len(); idx++ { - e := val.Index(idx).Interface().(primitive.E) - err = encodeElement(ec, dw, e) - if err != nil { - return err - } - } - - return dw.WriteDocumentEnd() - } - - // If we have a []byte we want to treat it as a binary instead of as an array. - if val.Type().Elem() == tByte { - var byteSlice []byte - for idx := 0; idx < val.Len(); idx++ { - byteSlice = append(byteSlice, val.Index(idx).Interface().(byte)) - } - return vw.WriteBinary(byteSlice) - } - - aw, err := vw.WriteArray() - if err != nil { - return err - } - - elemType := val.Type().Elem() - encoder, err := ec.LookupEncoder(elemType) - if err != nil && elemType.Kind() != reflect.Interface { - return err - } - - for idx := 0; idx < val.Len(); idx++ { - currEncoder, currVal, lookupErr := dve.lookupElementEncoder(ec, encoder, val.Index(idx)) - if lookupErr != nil && lookupErr != errInvalidValue { - return lookupErr - } - - vw, err := aw.WriteArrayElement() - if err != nil { - return err - } - - if lookupErr == errInvalidValue { - err = vw.WriteNull() - if err != nil { - return err - } - continue - } - - err = currEncoder.EncodeValue(ec, vw, currVal) - if err != nil { - return err - } - } - return aw.WriteArrayEnd() -} - -// SliceEncodeValue is the ValueEncoderFunc for slice types. -// -// Deprecated: SliceEncodeValue is not registered by default. Use SliceCodec.EncodeValue instead. -func (dve DefaultValueEncoders) SliceEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Kind() != reflect.Slice { - return ValueEncoderError{Name: "SliceEncodeValue", Kinds: []reflect.Kind{reflect.Slice}, Received: val} - } - - if val.IsNil() { - return vw.WriteNull() - } - - // If we have a []primitive.E we want to treat it as a document instead of as an array. - if val.Type().ConvertibleTo(tD) { - d := val.Convert(tD).Interface().(primitive.D) - - dw, err := vw.WriteDocument() - if err != nil { - return err - } - - for _, e := range d { - err = encodeElement(ec, dw, e) - if err != nil { - return err - } - } - - return dw.WriteDocumentEnd() - } - - aw, err := vw.WriteArray() - if err != nil { - return err - } - - elemType := val.Type().Elem() - encoder, err := ec.LookupEncoder(elemType) - if err != nil && elemType.Kind() != reflect.Interface { - return err - } - - for idx := 0; idx < val.Len(); idx++ { - currEncoder, currVal, lookupErr := dve.lookupElementEncoder(ec, encoder, val.Index(idx)) - if lookupErr != nil && lookupErr != errInvalidValue { - return lookupErr - } - - vw, err := aw.WriteArrayElement() - if err != nil { - return err - } - - if lookupErr == errInvalidValue { - err = vw.WriteNull() - if err != nil { - return err - } - continue - } - - err = currEncoder.EncodeValue(ec, vw, currVal) - if err != nil { - return err - } - } - return aw.WriteArrayEnd() -} - -func (dve DefaultValueEncoders) lookupElementEncoder(ec EncodeContext, origEncoder ValueEncoder, currVal reflect.Value) (ValueEncoder, reflect.Value, error) { - if origEncoder != nil || (currVal.Kind() != reflect.Interface) { - return origEncoder, currVal, nil - } - currVal = currVal.Elem() - if !currVal.IsValid() { - return nil, currVal, errInvalidValue - } - currEncoder, err := ec.LookupEncoder(currVal.Type()) - - return currEncoder, currVal, err -} - -// EmptyInterfaceEncodeValue is the ValueEncoderFunc for interface{}. -// -// Deprecated: EmptyInterfaceEncodeValue is not registered by default. Use EmptyInterfaceCodec.EncodeValue instead. -func (dve DefaultValueEncoders) EmptyInterfaceEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tEmpty { - return ValueEncoderError{Name: "EmptyInterfaceEncodeValue", Types: []reflect.Type{tEmpty}, Received: val} - } - - if val.IsNil() { - return vw.WriteNull() - } - encoder, err := ec.LookupEncoder(val.Elem().Type()) - if err != nil { - return err - } - - return encoder.EncodeValue(ec, vw, val.Elem()) -} - -// ValueMarshalerEncodeValue is the ValueEncoderFunc for ValueMarshaler implementations. -func (dve DefaultValueEncoders) ValueMarshalerEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - // Either val or a pointer to val must implement ValueMarshaler - switch { - case !val.IsValid(): - return ValueEncoderError{Name: "ValueMarshalerEncodeValue", Types: []reflect.Type{tValueMarshaler}, Received: val} - case val.Type().Implements(tValueMarshaler): - // If ValueMarshaler is implemented on a concrete type, make sure that val isn't a nil pointer - if isImplementationNil(val, tValueMarshaler) { - return vw.WriteNull() - } - case reflect.PtrTo(val.Type()).Implements(tValueMarshaler) && val.CanAddr(): - val = val.Addr() - default: - return ValueEncoderError{Name: "ValueMarshalerEncodeValue", Types: []reflect.Type{tValueMarshaler}, Received: val} - } - - fn := val.Convert(tValueMarshaler).MethodByName("MarshalBSONValue") - returns := fn.Call(nil) - if !returns[2].IsNil() { - return returns[2].Interface().(error) - } - t, data := returns[0].Interface().(bsontype.Type), returns[1].Interface().([]byte) - return bsonrw.Copier{}.CopyValueFromBytes(vw, t, data) -} - -// MarshalerEncodeValue is the ValueEncoderFunc for Marshaler implementations. -func (dve DefaultValueEncoders) MarshalerEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - // Either val or a pointer to val must implement Marshaler - switch { - case !val.IsValid(): - return ValueEncoderError{Name: "MarshalerEncodeValue", Types: []reflect.Type{tMarshaler}, Received: val} - case val.Type().Implements(tMarshaler): - // If Marshaler is implemented on a concrete type, make sure that val isn't a nil pointer - if isImplementationNil(val, tMarshaler) { - return vw.WriteNull() - } - case reflect.PtrTo(val.Type()).Implements(tMarshaler) && val.CanAddr(): - val = val.Addr() - default: - return ValueEncoderError{Name: "MarshalerEncodeValue", Types: []reflect.Type{tMarshaler}, Received: val} - } - - fn := val.Convert(tMarshaler).MethodByName("MarshalBSON") - returns := fn.Call(nil) - if !returns[1].IsNil() { - return returns[1].Interface().(error) - } - data := returns[0].Interface().([]byte) - return bsonrw.Copier{}.CopyValueFromBytes(vw, bsontype.EmbeddedDocument, data) -} - -// ProxyEncodeValue is the ValueEncoderFunc for Proxy implementations. -func (dve DefaultValueEncoders) ProxyEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - // Either val or a pointer to val must implement Proxy - switch { - case !val.IsValid(): - return ValueEncoderError{Name: "ProxyEncodeValue", Types: []reflect.Type{tProxy}, Received: val} - case val.Type().Implements(tProxy): - // If Proxy is implemented on a concrete type, make sure that val isn't a nil pointer - if isImplementationNil(val, tProxy) { - return vw.WriteNull() - } - case reflect.PtrTo(val.Type()).Implements(tProxy) && val.CanAddr(): - val = val.Addr() - default: - return ValueEncoderError{Name: "ProxyEncodeValue", Types: []reflect.Type{tProxy}, Received: val} - } - - fn := val.Convert(tProxy).MethodByName("ProxyBSON") - returns := fn.Call(nil) - if !returns[1].IsNil() { - return returns[1].Interface().(error) - } - data := returns[0] - var encoder ValueEncoder - var err error - if data.Elem().IsValid() { - encoder, err = ec.LookupEncoder(data.Elem().Type()) - } else { - encoder, err = ec.LookupEncoder(nil) - } - if err != nil { - return err - } - return encoder.EncodeValue(ec, vw, data.Elem()) -} - -// JavaScriptEncodeValue is the ValueEncoderFunc for the primitive.JavaScript type. -func (DefaultValueEncoders) JavaScriptEncodeValue(ectx EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tJavaScript { - return ValueEncoderError{Name: "JavaScriptEncodeValue", Types: []reflect.Type{tJavaScript}, Received: val} - } - - return vw.WriteJavascript(val.String()) -} - -// SymbolEncodeValue is the ValueEncoderFunc for the primitive.Symbol type. -func (DefaultValueEncoders) SymbolEncodeValue(ectx EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tSymbol { - return ValueEncoderError{Name: "SymbolEncodeValue", Types: []reflect.Type{tSymbol}, Received: val} - } - - return vw.WriteSymbol(val.String()) -} - -// BinaryEncodeValue is the ValueEncoderFunc for Binary. -func (DefaultValueEncoders) BinaryEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tBinary { - return ValueEncoderError{Name: "BinaryEncodeValue", Types: []reflect.Type{tBinary}, Received: val} - } - b := val.Interface().(primitive.Binary) - - return vw.WriteBinaryWithSubtype(b.Data, b.Subtype) -} - -// UndefinedEncodeValue is the ValueEncoderFunc for Undefined. -func (DefaultValueEncoders) UndefinedEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tUndefined { - return ValueEncoderError{Name: "UndefinedEncodeValue", Types: []reflect.Type{tUndefined}, Received: val} - } - - return vw.WriteUndefined() -} - -// DateTimeEncodeValue is the ValueEncoderFunc for DateTime. -func (DefaultValueEncoders) DateTimeEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tDateTime { - return ValueEncoderError{Name: "DateTimeEncodeValue", Types: []reflect.Type{tDateTime}, Received: val} - } - - return vw.WriteDateTime(val.Int()) -} - -// NullEncodeValue is the ValueEncoderFunc for Null. -func (DefaultValueEncoders) NullEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tNull { - return ValueEncoderError{Name: "NullEncodeValue", Types: []reflect.Type{tNull}, Received: val} - } - - return vw.WriteNull() -} - -// RegexEncodeValue is the ValueEncoderFunc for Regex. -func (DefaultValueEncoders) RegexEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tRegex { - return ValueEncoderError{Name: "RegexEncodeValue", Types: []reflect.Type{tRegex}, Received: val} - } - - regex := val.Interface().(primitive.Regex) - - return vw.WriteRegex(regex.Pattern, regex.Options) -} - -// DBPointerEncodeValue is the ValueEncoderFunc for DBPointer. -func (DefaultValueEncoders) DBPointerEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tDBPointer { - return ValueEncoderError{Name: "DBPointerEncodeValue", Types: []reflect.Type{tDBPointer}, Received: val} - } - - dbp := val.Interface().(primitive.DBPointer) - - return vw.WriteDBPointer(dbp.DB, dbp.Pointer) -} - -// TimestampEncodeValue is the ValueEncoderFunc for Timestamp. -func (DefaultValueEncoders) TimestampEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tTimestamp { - return ValueEncoderError{Name: "TimestampEncodeValue", Types: []reflect.Type{tTimestamp}, Received: val} - } - - ts := val.Interface().(primitive.Timestamp) - - return vw.WriteTimestamp(ts.T, ts.I) -} - -// MinKeyEncodeValue is the ValueEncoderFunc for MinKey. -func (DefaultValueEncoders) MinKeyEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tMinKey { - return ValueEncoderError{Name: "MinKeyEncodeValue", Types: []reflect.Type{tMinKey}, Received: val} - } - - return vw.WriteMinKey() -} - -// MaxKeyEncodeValue is the ValueEncoderFunc for MaxKey. -func (DefaultValueEncoders) MaxKeyEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tMaxKey { - return ValueEncoderError{Name: "MaxKeyEncodeValue", Types: []reflect.Type{tMaxKey}, Received: val} - } - - return vw.WriteMaxKey() -} - -// CoreDocumentEncodeValue is the ValueEncoderFunc for bsoncore.Document. -func (DefaultValueEncoders) CoreDocumentEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tCoreDocument { - return ValueEncoderError{Name: "CoreDocumentEncodeValue", Types: []reflect.Type{tCoreDocument}, Received: val} - } - - cdoc := val.Interface().(bsoncore.Document) - - return bsonrw.Copier{}.CopyDocumentFromBytes(vw, cdoc) -} - -// CodeWithScopeEncodeValue is the ValueEncoderFunc for CodeWithScope. -func (dve DefaultValueEncoders) CodeWithScopeEncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tCodeWithScope { - return ValueEncoderError{Name: "CodeWithScopeEncodeValue", Types: []reflect.Type{tCodeWithScope}, Received: val} - } - - cws := val.Interface().(primitive.CodeWithScope) - - dw, err := vw.WriteCodeWithScope(string(cws.Code)) - if err != nil { - return err - } - - sw := sliceWriterPool.Get().(*bsonrw.SliceWriter) - defer sliceWriterPool.Put(sw) - *sw = (*sw)[:0] - - scopeVW := bvwPool.Get(sw) - defer bvwPool.Put(scopeVW) - - encoder, err := ec.LookupEncoder(reflect.TypeOf(cws.Scope)) - if err != nil { - return err - } - - err = encoder.EncodeValue(ec, scopeVW, reflect.ValueOf(cws.Scope)) - if err != nil { - return err - } - - err = bsonrw.Copier{}.CopyBytesToDocumentWriter(dw, *sw) - if err != nil { - return err - } - return dw.WriteDocumentEnd() -} - -// isImplementationNil returns if val is a nil pointer and inter is implemented on a concrete type -func isImplementationNil(val reflect.Value, inter reflect.Type) bool { - vt := val.Type() - for vt.Kind() == reflect.Ptr { - vt = vt.Elem() - } - return vt.Implements(inter) && val.Kind() == reflect.Ptr && val.IsNil() -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/doc.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/doc.go deleted file mode 100644 index 5f903eb..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/doc.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2022-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -// Package bsoncodec provides a system for encoding values to BSON representations and decoding -// values from BSON representations. This package considers both binary BSON and ExtendedJSON as -// BSON representations. The types in this package enable a flexible system for handling this -// encoding and decoding. -// -// The codec system is composed of two parts: -// -// 1) ValueEncoders and ValueDecoders that handle encoding and decoding Go values to and from BSON -// representations. -// -// 2) A Registry that holds these ValueEncoders and ValueDecoders and provides methods for -// retrieving them. -// -// # ValueEncoders and ValueDecoders -// -// The ValueEncoder interface is implemented by types that can encode a provided Go type to BSON. -// The value to encode is provided as a reflect.Value and a bsonrw.ValueWriter is used within the -// EncodeValue method to actually create the BSON representation. For convenience, ValueEncoderFunc -// is provided to allow use of a function with the correct signature as a ValueEncoder. An -// EncodeContext instance is provided to allow implementations to lookup further ValueEncoders and -// to provide configuration information. -// -// The ValueDecoder interface is the inverse of the ValueEncoder. Implementations should ensure that -// the value they receive is settable. Similar to ValueEncoderFunc, ValueDecoderFunc is provided to -// allow the use of a function with the correct signature as a ValueDecoder. A DecodeContext -// instance is provided and serves similar functionality to the EncodeContext. -// -// # Registry and RegistryBuilder -// -// A Registry is an immutable store for ValueEncoders, ValueDecoders, and a type map. See the Registry type -// documentation for examples of registering various custom encoders and decoders. A Registry can be constructed using a -// RegistryBuilder, which handles three main types of codecs: -// -// 1. Type encoders/decoders - These can be registered using the RegisterTypeEncoder and RegisterTypeDecoder methods. -// The registered codec will be invoked when encoding/decoding a value whose type matches the registered type exactly. -// If the registered type is an interface, the codec will be invoked when encoding or decoding values whose type is the -// interface, but not for values with concrete types that implement the interface. -// -// 2. Hook encoders/decoders - These can be registered using the RegisterHookEncoder and RegisterHookDecoder methods. -// These methods only accept interface types and the registered codecs will be invoked when encoding or decoding values -// whose types implement the interface. An example of a hook defined by the driver is bson.Marshaler. The driver will -// call the MarshalBSON method for any value whose type implements bson.Marshaler, regardless of the value's concrete -// type. -// -// 3. Type map entries - This can be used to associate a BSON type with a Go type. These type associations are used when -// decoding into a bson.D/bson.M or a struct field of type interface{}. For example, by default, BSON int32 and int64 -// values decode as Go int32 and int64 instances, respectively, when decoding into a bson.D. The following code would -// change the behavior so these values decode as Go int instances instead: -// -// intType := reflect.TypeOf(int(0)) -// registryBuilder.RegisterTypeMapEntry(bsontype.Int32, intType).RegisterTypeMapEntry(bsontype.Int64, intType) -// -// 4. Kind encoder/decoders - These can be registered using the RegisterDefaultEncoder and RegisterDefaultDecoder -// methods. The registered codec will be invoked when encoding or decoding values whose reflect.Kind matches the -// registered reflect.Kind as long as the value's type doesn't match a registered type or hook encoder/decoder first. -// These methods should be used to change the behavior for all values for a specific kind. -// -// # Registry Lookup Procedure -// -// When looking up an encoder in a Registry, the precedence rules are as follows: -// -// 1. A type encoder registered for the exact type of the value. -// -// 2. A hook encoder registered for an interface that is implemented by the value or by a pointer to the value. If the -// value matches multiple hooks (e.g. the type implements bsoncodec.Marshaler and bsoncodec.ValueMarshaler), the first -// one registered will be selected. Note that registries constructed using bson.NewRegistryBuilder have driver-defined -// hooks registered for the bsoncodec.Marshaler, bsoncodec.ValueMarshaler, and bsoncodec.Proxy interfaces, so those -// will take precedence over any new hooks. -// -// 3. A kind encoder registered for the value's kind. -// -// If all of these lookups fail to find an encoder, an error of type ErrNoEncoder is returned. The same precedence -// rules apply for decoders, with the exception that an error of type ErrNoDecoder will be returned if no decoder is -// found. -// -// # DefaultValueEncoders and DefaultValueDecoders -// -// The DefaultValueEncoders and DefaultValueDecoders types provide a full set of ValueEncoders and -// ValueDecoders for handling a wide range of Go types, including all of the types within the -// primitive package. To make registering these codecs easier, a helper method on each type is -// provided. For the DefaultValueEncoders type the method is called RegisterDefaultEncoders and for -// the DefaultValueDecoders type the method is called RegisterDefaultDecoders, this method also -// handles registering type map entries for each BSON type. -package bsoncodec diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/empty_interface_codec.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/empty_interface_codec.go deleted file mode 100644 index eda417c..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/empty_interface_codec.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "reflect" - - "go.mongodb.org/mongo-driver/bson/bsonoptions" - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/bson/bsontype" - "go.mongodb.org/mongo-driver/bson/primitive" -) - -// EmptyInterfaceCodec is the Codec used for interface{} values. -type EmptyInterfaceCodec struct { - DecodeBinaryAsSlice bool -} - -var ( - defaultEmptyInterfaceCodec = NewEmptyInterfaceCodec() - - _ ValueCodec = defaultEmptyInterfaceCodec - _ typeDecoder = defaultEmptyInterfaceCodec -) - -// NewEmptyInterfaceCodec returns a EmptyInterfaceCodec with options opts. -func NewEmptyInterfaceCodec(opts ...*bsonoptions.EmptyInterfaceCodecOptions) *EmptyInterfaceCodec { - interfaceOpt := bsonoptions.MergeEmptyInterfaceCodecOptions(opts...) - - codec := EmptyInterfaceCodec{} - if interfaceOpt.DecodeBinaryAsSlice != nil { - codec.DecodeBinaryAsSlice = *interfaceOpt.DecodeBinaryAsSlice - } - return &codec -} - -// EncodeValue is the ValueEncoderFunc for interface{}. -func (eic EmptyInterfaceCodec) EncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tEmpty { - return ValueEncoderError{Name: "EmptyInterfaceEncodeValue", Types: []reflect.Type{tEmpty}, Received: val} - } - - if val.IsNil() { - return vw.WriteNull() - } - encoder, err := ec.LookupEncoder(val.Elem().Type()) - if err != nil { - return err - } - - return encoder.EncodeValue(ec, vw, val.Elem()) -} - -func (eic EmptyInterfaceCodec) getEmptyInterfaceDecodeType(dc DecodeContext, valueType bsontype.Type) (reflect.Type, error) { - isDocument := valueType == bsontype.Type(0) || valueType == bsontype.EmbeddedDocument - if isDocument { - if dc.defaultDocumentType != nil { - // If the bsontype is an embedded document and the DocumentType is set on the DecodeContext, then return - // that type. - return dc.defaultDocumentType, nil - } - if dc.Ancestor != nil { - // Using ancestor information rather than looking up the type map entry forces consistent decoding. - // If we're decoding into a bson.D, subdocuments should also be decoded as bson.D, even if a type map entry - // has been registered. - return dc.Ancestor, nil - } - } - - rtype, err := dc.LookupTypeMapEntry(valueType) - if err == nil { - return rtype, nil - } - - if isDocument { - // For documents, fallback to looking up a type map entry for bsontype.Type(0) or bsontype.EmbeddedDocument, - // depending on the original valueType. - var lookupType bsontype.Type - switch valueType { - case bsontype.Type(0): - lookupType = bsontype.EmbeddedDocument - case bsontype.EmbeddedDocument: - lookupType = bsontype.Type(0) - } - - rtype, err = dc.LookupTypeMapEntry(lookupType) - if err == nil { - return rtype, nil - } - } - - return nil, err -} - -func (eic EmptyInterfaceCodec) decodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tEmpty { - return emptyValue, ValueDecoderError{Name: "EmptyInterfaceDecodeValue", Types: []reflect.Type{tEmpty}, Received: reflect.Zero(t)} - } - - rtype, err := eic.getEmptyInterfaceDecodeType(dc, vr.Type()) - if err != nil { - switch vr.Type() { - case bsontype.Null: - return reflect.Zero(t), vr.ReadNull() - default: - return emptyValue, err - } - } - - decoder, err := dc.LookupDecoder(rtype) - if err != nil { - return emptyValue, err - } - - elem, err := decodeTypeOrValue(decoder, dc, vr, rtype) - if err != nil { - return emptyValue, err - } - - if eic.DecodeBinaryAsSlice && rtype == tBinary { - binElem := elem.Interface().(primitive.Binary) - if binElem.Subtype == bsontype.BinaryGeneric || binElem.Subtype == bsontype.BinaryBinaryOld { - elem = reflect.ValueOf(binElem.Data) - } - } - - return elem, nil -} - -// DecodeValue is the ValueDecoderFunc for interface{}. -func (eic EmptyInterfaceCodec) DecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tEmpty { - return ValueDecoderError{Name: "EmptyInterfaceDecodeValue", Types: []reflect.Type{tEmpty}, Received: val} - } - - elem, err := eic.decodeType(dc, vr, val.Type()) - if err != nil { - return err - } - - val.Set(elem) - return nil -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/map_codec.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/map_codec.go deleted file mode 100644 index e1fbef9..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/map_codec.go +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "encoding" - "fmt" - "reflect" - "strconv" - - "go.mongodb.org/mongo-driver/bson/bsonoptions" - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/bson/bsontype" -) - -var defaultMapCodec = NewMapCodec() - -// MapCodec is the Codec used for map values. -type MapCodec struct { - DecodeZerosMap bool - EncodeNilAsEmpty bool - EncodeKeysWithStringer bool -} - -var _ ValueCodec = &MapCodec{} - -// KeyMarshaler is the interface implemented by an object that can marshal itself into a string key. -// This applies to types used as map keys and is similar to encoding.TextMarshaler. -type KeyMarshaler interface { - MarshalKey() (key string, err error) -} - -// KeyUnmarshaler is the interface implemented by an object that can unmarshal a string representation -// of itself. This applies to types used as map keys and is similar to encoding.TextUnmarshaler. -// -// UnmarshalKey must be able to decode the form generated by MarshalKey. -// UnmarshalKey must copy the text if it wishes to retain the text -// after returning. -type KeyUnmarshaler interface { - UnmarshalKey(key string) error -} - -// NewMapCodec returns a MapCodec with options opts. -func NewMapCodec(opts ...*bsonoptions.MapCodecOptions) *MapCodec { - mapOpt := bsonoptions.MergeMapCodecOptions(opts...) - - codec := MapCodec{} - if mapOpt.DecodeZerosMap != nil { - codec.DecodeZerosMap = *mapOpt.DecodeZerosMap - } - if mapOpt.EncodeNilAsEmpty != nil { - codec.EncodeNilAsEmpty = *mapOpt.EncodeNilAsEmpty - } - if mapOpt.EncodeKeysWithStringer != nil { - codec.EncodeKeysWithStringer = *mapOpt.EncodeKeysWithStringer - } - return &codec -} - -// EncodeValue is the ValueEncoder for map[*]* types. -func (mc *MapCodec) EncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Kind() != reflect.Map { - return ValueEncoderError{Name: "MapEncodeValue", Kinds: []reflect.Kind{reflect.Map}, Received: val} - } - - if val.IsNil() && !mc.EncodeNilAsEmpty { - // If we have a nil map but we can't WriteNull, that means we're probably trying to encode - // to a TopLevel document. We can't currently tell if this is what actually happened, but if - // there's a deeper underlying problem, the error will also be returned from WriteDocument, - // so just continue. The operations on a map reflection value are valid, so we can call - // MapKeys within mapEncodeValue without a problem. - err := vw.WriteNull() - if err == nil { - return nil - } - } - - dw, err := vw.WriteDocument() - if err != nil { - return err - } - - return mc.mapEncodeValue(ec, dw, val, nil) -} - -// mapEncodeValue handles encoding of the values of a map. The collisionFn returns -// true if the provided key exists, this is mainly used for inline maps in the -// struct codec. -func (mc *MapCodec) mapEncodeValue(ec EncodeContext, dw bsonrw.DocumentWriter, val reflect.Value, collisionFn func(string) bool) error { - - elemType := val.Type().Elem() - encoder, err := ec.LookupEncoder(elemType) - if err != nil && elemType.Kind() != reflect.Interface { - return err - } - - keys := val.MapKeys() - for _, key := range keys { - keyStr, err := mc.encodeKey(key) - if err != nil { - return err - } - - if collisionFn != nil && collisionFn(keyStr) { - return fmt.Errorf("Key %s of inlined map conflicts with a struct field name", key) - } - - currEncoder, currVal, lookupErr := defaultValueEncoders.lookupElementEncoder(ec, encoder, val.MapIndex(key)) - if lookupErr != nil && lookupErr != errInvalidValue { - return lookupErr - } - - vw, err := dw.WriteDocumentElement(keyStr) - if err != nil { - return err - } - - if lookupErr == errInvalidValue { - err = vw.WriteNull() - if err != nil { - return err - } - continue - } - - err = currEncoder.EncodeValue(ec, vw, currVal) - if err != nil { - return err - } - } - - return dw.WriteDocumentEnd() -} - -// DecodeValue is the ValueDecoder for map[string/decimal]* types. -func (mc *MapCodec) DecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if val.Kind() != reflect.Map || (!val.CanSet() && val.IsNil()) { - return ValueDecoderError{Name: "MapDecodeValue", Kinds: []reflect.Kind{reflect.Map}, Received: val} - } - - switch vrType := vr.Type(); vrType { - case bsontype.Type(0), bsontype.EmbeddedDocument: - case bsontype.Null: - val.Set(reflect.Zero(val.Type())) - return vr.ReadNull() - case bsontype.Undefined: - val.Set(reflect.Zero(val.Type())) - return vr.ReadUndefined() - default: - return fmt.Errorf("cannot decode %v into a %s", vrType, val.Type()) - } - - dr, err := vr.ReadDocument() - if err != nil { - return err - } - - if val.IsNil() { - val.Set(reflect.MakeMap(val.Type())) - } - - if val.Len() > 0 && mc.DecodeZerosMap { - clearMap(val) - } - - eType := val.Type().Elem() - decoder, err := dc.LookupDecoder(eType) - if err != nil { - return err - } - eTypeDecoder, _ := decoder.(typeDecoder) - - if eType == tEmpty { - dc.Ancestor = val.Type() - } - - keyType := val.Type().Key() - - for { - key, vr, err := dr.ReadElement() - if err == bsonrw.ErrEOD { - break - } - if err != nil { - return err - } - - k, err := mc.decodeKey(key, keyType) - if err != nil { - return err - } - - elem, err := decodeTypeOrValueWithInfo(decoder, eTypeDecoder, dc, vr, eType, true) - if err != nil { - return newDecodeError(key, err) - } - - val.SetMapIndex(k, elem) - } - return nil -} - -func clearMap(m reflect.Value) { - var none reflect.Value - for _, k := range m.MapKeys() { - m.SetMapIndex(k, none) - } -} - -func (mc *MapCodec) encodeKey(val reflect.Value) (string, error) { - if mc.EncodeKeysWithStringer { - return fmt.Sprint(val), nil - } - - // keys of any string type are used directly - if val.Kind() == reflect.String { - return val.String(), nil - } - // KeyMarshalers are marshaled - if km, ok := val.Interface().(KeyMarshaler); ok { - if val.Kind() == reflect.Ptr && val.IsNil() { - return "", nil - } - buf, err := km.MarshalKey() - if err == nil { - return buf, nil - } - return "", err - } - // keys implement encoding.TextMarshaler are marshaled. - if km, ok := val.Interface().(encoding.TextMarshaler); ok { - if val.Kind() == reflect.Ptr && val.IsNil() { - return "", nil - } - - buf, err := km.MarshalText() - if err != nil { - return "", err - } - - return string(buf), nil - } - - switch val.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return strconv.FormatInt(val.Int(), 10), nil - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return strconv.FormatUint(val.Uint(), 10), nil - } - return "", fmt.Errorf("unsupported key type: %v", val.Type()) -} - -var keyUnmarshalerType = reflect.TypeOf((*KeyUnmarshaler)(nil)).Elem() -var textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() - -func (mc *MapCodec) decodeKey(key string, keyType reflect.Type) (reflect.Value, error) { - keyVal := reflect.ValueOf(key) - var err error - switch { - // First, if EncodeKeysWithStringer is not enabled, try to decode withKeyUnmarshaler - case !mc.EncodeKeysWithStringer && reflect.PtrTo(keyType).Implements(keyUnmarshalerType): - keyVal = reflect.New(keyType) - v := keyVal.Interface().(KeyUnmarshaler) - err = v.UnmarshalKey(key) - keyVal = keyVal.Elem() - // Try to decode encoding.TextUnmarshalers. - case reflect.PtrTo(keyType).Implements(textUnmarshalerType): - keyVal = reflect.New(keyType) - v := keyVal.Interface().(encoding.TextUnmarshaler) - err = v.UnmarshalText([]byte(key)) - keyVal = keyVal.Elem() - // Otherwise, go to type specific behavior - default: - switch keyType.Kind() { - case reflect.String: - keyVal = reflect.ValueOf(key).Convert(keyType) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - n, parseErr := strconv.ParseInt(key, 10, 64) - if parseErr != nil || reflect.Zero(keyType).OverflowInt(n) { - err = fmt.Errorf("failed to unmarshal number key %v", key) - } - keyVal = reflect.ValueOf(n).Convert(keyType) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - n, parseErr := strconv.ParseUint(key, 10, 64) - if parseErr != nil || reflect.Zero(keyType).OverflowUint(n) { - err = fmt.Errorf("failed to unmarshal number key %v", key) - break - } - keyVal = reflect.ValueOf(n).Convert(keyType) - case reflect.Float32, reflect.Float64: - if mc.EncodeKeysWithStringer { - parsed, err := strconv.ParseFloat(key, 64) - if err != nil { - return keyVal, fmt.Errorf("Map key is defined to be a decimal type (%v) but got error %v", keyType.Kind(), err) - } - keyVal = reflect.ValueOf(parsed) - break - } - fallthrough - default: - return keyVal, fmt.Errorf("unsupported key type: %v", keyType) - } - } - return keyVal, err -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/mode.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/mode.go deleted file mode 100644 index fbd9f0a..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/mode.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import "fmt" - -type mode int - -const ( - _ mode = iota - mTopLevel - mDocument - mArray - mValue - mElement - mCodeWithScope - mSpacer -) - -func (m mode) String() string { - var str string - - switch m { - case mTopLevel: - str = "TopLevel" - case mDocument: - str = "DocumentMode" - case mArray: - str = "ArrayMode" - case mValue: - str = "ValueMode" - case mElement: - str = "ElementMode" - case mCodeWithScope: - str = "CodeWithScopeMode" - case mSpacer: - str = "CodeWithScopeSpacerFrame" - default: - str = "UnknownMode" - } - - return str -} - -// TransitionError is an error returned when an invalid progressing a -// ValueReader or ValueWriter state machine occurs. -type TransitionError struct { - parent mode - current mode - destination mode -} - -func (te TransitionError) Error() string { - if te.destination == mode(0) { - return fmt.Sprintf("invalid state transition: cannot read/write value while in %s", te.current) - } - if te.parent == mode(0) { - return fmt.Sprintf("invalid state transition: %s -> %s", te.current, te.destination) - } - return fmt.Sprintf("invalid state transition: %s -> %s; parent %s", te.current, te.destination, te.parent) -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/pointer_codec.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/pointer_codec.go deleted file mode 100644 index 616a3e7..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/pointer_codec.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "reflect" - "sync" - - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/bson/bsontype" -) - -var _ ValueEncoder = &PointerCodec{} -var _ ValueDecoder = &PointerCodec{} - -// PointerCodec is the Codec used for pointers. -type PointerCodec struct { - ecache map[reflect.Type]ValueEncoder - dcache map[reflect.Type]ValueDecoder - l sync.RWMutex -} - -// NewPointerCodec returns a PointerCodec that has been initialized. -func NewPointerCodec() *PointerCodec { - return &PointerCodec{ - ecache: make(map[reflect.Type]ValueEncoder), - dcache: make(map[reflect.Type]ValueDecoder), - } -} - -// EncodeValue handles encoding a pointer by either encoding it to BSON Null if the pointer is nil -// or looking up an encoder for the type of value the pointer points to. -func (pc *PointerCodec) EncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if val.Kind() != reflect.Ptr { - if !val.IsValid() { - return vw.WriteNull() - } - return ValueEncoderError{Name: "PointerCodec.EncodeValue", Kinds: []reflect.Kind{reflect.Ptr}, Received: val} - } - - if val.IsNil() { - return vw.WriteNull() - } - - pc.l.RLock() - enc, ok := pc.ecache[val.Type()] - pc.l.RUnlock() - if ok { - if enc == nil { - return ErrNoEncoder{Type: val.Type()} - } - return enc.EncodeValue(ec, vw, val.Elem()) - } - - enc, err := ec.LookupEncoder(val.Type().Elem()) - pc.l.Lock() - pc.ecache[val.Type()] = enc - pc.l.Unlock() - if err != nil { - return err - } - - return enc.EncodeValue(ec, vw, val.Elem()) -} - -// DecodeValue handles decoding a pointer by looking up a decoder for the type it points to and -// using that to decode. If the BSON value is Null, this method will set the pointer to nil. -func (pc *PointerCodec) DecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Kind() != reflect.Ptr { - return ValueDecoderError{Name: "PointerCodec.DecodeValue", Kinds: []reflect.Kind{reflect.Ptr}, Received: val} - } - - if vr.Type() == bsontype.Null { - val.Set(reflect.Zero(val.Type())) - return vr.ReadNull() - } - if vr.Type() == bsontype.Undefined { - val.Set(reflect.Zero(val.Type())) - return vr.ReadUndefined() - } - - if val.IsNil() { - val.Set(reflect.New(val.Type().Elem())) - } - - pc.l.RLock() - dec, ok := pc.dcache[val.Type()] - pc.l.RUnlock() - if ok { - if dec == nil { - return ErrNoDecoder{Type: val.Type()} - } - return dec.DecodeValue(dc, vr, val.Elem()) - } - - dec, err := dc.LookupDecoder(val.Type().Elem()) - pc.l.Lock() - pc.dcache[val.Type()] = dec - pc.l.Unlock() - if err != nil { - return err - } - - return dec.DecodeValue(dc, vr, val.Elem()) -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/proxy.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/proxy.go deleted file mode 100644 index 4cf2b01..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/proxy.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -// Proxy is an interface implemented by types that cannot themselves be directly encoded. Types -// that implement this interface with have ProxyBSON called during the encoding process and that -// value will be encoded in place for the implementer. -type Proxy interface { - ProxyBSON() (interface{}, error) -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go deleted file mode 100644 index 8064402..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go +++ /dev/null @@ -1,469 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "errors" - "fmt" - "reflect" - "sync" - - "go.mongodb.org/mongo-driver/bson/bsontype" -) - -// ErrNilType is returned when nil is passed to either LookupEncoder or LookupDecoder. -var ErrNilType = errors.New("cannot perform a decoder lookup on ") - -// ErrNotPointer is returned when a non-pointer type is provided to LookupDecoder. -var ErrNotPointer = errors.New("non-pointer provided to LookupDecoder") - -// ErrNoEncoder is returned when there wasn't an encoder available for a type. -type ErrNoEncoder struct { - Type reflect.Type -} - -func (ene ErrNoEncoder) Error() string { - if ene.Type == nil { - return "no encoder found for " - } - return "no encoder found for " + ene.Type.String() -} - -// ErrNoDecoder is returned when there wasn't a decoder available for a type. -type ErrNoDecoder struct { - Type reflect.Type -} - -func (end ErrNoDecoder) Error() string { - return "no decoder found for " + end.Type.String() -} - -// ErrNoTypeMapEntry is returned when there wasn't a type available for the provided BSON type. -type ErrNoTypeMapEntry struct { - Type bsontype.Type -} - -func (entme ErrNoTypeMapEntry) Error() string { - return "no type map entry found for " + entme.Type.String() -} - -// ErrNotInterface is returned when the provided type is not an interface. -var ErrNotInterface = errors.New("The provided type is not an interface") - -// A RegistryBuilder is used to build a Registry. This type is not goroutine -// safe. -type RegistryBuilder struct { - typeEncoders map[reflect.Type]ValueEncoder - interfaceEncoders []interfaceValueEncoder - kindEncoders map[reflect.Kind]ValueEncoder - - typeDecoders map[reflect.Type]ValueDecoder - interfaceDecoders []interfaceValueDecoder - kindDecoders map[reflect.Kind]ValueDecoder - - typeMap map[bsontype.Type]reflect.Type -} - -// A Registry is used to store and retrieve codecs for types and interfaces. This type is the main -// typed passed around and Encoders and Decoders are constructed from it. -type Registry struct { - typeEncoders map[reflect.Type]ValueEncoder - typeDecoders map[reflect.Type]ValueDecoder - - interfaceEncoders []interfaceValueEncoder - interfaceDecoders []interfaceValueDecoder - - kindEncoders map[reflect.Kind]ValueEncoder - kindDecoders map[reflect.Kind]ValueDecoder - - typeMap map[bsontype.Type]reflect.Type - - mu sync.RWMutex -} - -// NewRegistryBuilder creates a new empty RegistryBuilder. -func NewRegistryBuilder() *RegistryBuilder { - return &RegistryBuilder{ - typeEncoders: make(map[reflect.Type]ValueEncoder), - typeDecoders: make(map[reflect.Type]ValueDecoder), - - interfaceEncoders: make([]interfaceValueEncoder, 0), - interfaceDecoders: make([]interfaceValueDecoder, 0), - - kindEncoders: make(map[reflect.Kind]ValueEncoder), - kindDecoders: make(map[reflect.Kind]ValueDecoder), - - typeMap: make(map[bsontype.Type]reflect.Type), - } -} - -func buildDefaultRegistry() *Registry { - rb := NewRegistryBuilder() - defaultValueEncoders.RegisterDefaultEncoders(rb) - defaultValueDecoders.RegisterDefaultDecoders(rb) - return rb.Build() -} - -// RegisterCodec will register the provided ValueCodec for the provided type. -func (rb *RegistryBuilder) RegisterCodec(t reflect.Type, codec ValueCodec) *RegistryBuilder { - rb.RegisterTypeEncoder(t, codec) - rb.RegisterTypeDecoder(t, codec) - return rb -} - -// RegisterTypeEncoder will register the provided ValueEncoder for the provided type. -// -// The type will be used directly, so an encoder can be registered for a type and a different encoder can be registered -// for a pointer to that type. -// -// If the given type is an interface, the encoder will be called when marshalling a type that is that interface. It -// will not be called when marshalling a non-interface type that implements the interface. -func (rb *RegistryBuilder) RegisterTypeEncoder(t reflect.Type, enc ValueEncoder) *RegistryBuilder { - rb.typeEncoders[t] = enc - return rb -} - -// RegisterHookEncoder will register an encoder for the provided interface type t. This encoder will be called when -// marshalling a type if the type implements t or a pointer to the type implements t. If the provided type is not -// an interface (i.e. t.Kind() != reflect.Interface), this method will panic. -func (rb *RegistryBuilder) RegisterHookEncoder(t reflect.Type, enc ValueEncoder) *RegistryBuilder { - if t.Kind() != reflect.Interface { - panicStr := fmt.Sprintf("RegisterHookEncoder expects a type with kind reflect.Interface, "+ - "got type %s with kind %s", t, t.Kind()) - panic(panicStr) - } - - for idx, encoder := range rb.interfaceEncoders { - if encoder.i == t { - rb.interfaceEncoders[idx].ve = enc - return rb - } - } - - rb.interfaceEncoders = append(rb.interfaceEncoders, interfaceValueEncoder{i: t, ve: enc}) - return rb -} - -// RegisterTypeDecoder will register the provided ValueDecoder for the provided type. -// -// The type will be used directly, so a decoder can be registered for a type and a different decoder can be registered -// for a pointer to that type. -// -// If the given type is an interface, the decoder will be called when unmarshalling into a type that is that interface. -// It will not be called when unmarshalling into a non-interface type that implements the interface. -func (rb *RegistryBuilder) RegisterTypeDecoder(t reflect.Type, dec ValueDecoder) *RegistryBuilder { - rb.typeDecoders[t] = dec - return rb -} - -// RegisterHookDecoder will register an decoder for the provided interface type t. This decoder will be called when -// unmarshalling into a type if the type implements t or a pointer to the type implements t. If the provided type is not -// an interface (i.e. t.Kind() != reflect.Interface), this method will panic. -func (rb *RegistryBuilder) RegisterHookDecoder(t reflect.Type, dec ValueDecoder) *RegistryBuilder { - if t.Kind() != reflect.Interface { - panicStr := fmt.Sprintf("RegisterHookDecoder expects a type with kind reflect.Interface, "+ - "got type %s with kind %s", t, t.Kind()) - panic(panicStr) - } - - for idx, decoder := range rb.interfaceDecoders { - if decoder.i == t { - rb.interfaceDecoders[idx].vd = dec - return rb - } - } - - rb.interfaceDecoders = append(rb.interfaceDecoders, interfaceValueDecoder{i: t, vd: dec}) - return rb -} - -// RegisterEncoder registers the provided type and encoder pair. -// -// Deprecated: Use RegisterTypeEncoder or RegisterHookEncoder instead. -func (rb *RegistryBuilder) RegisterEncoder(t reflect.Type, enc ValueEncoder) *RegistryBuilder { - if t == tEmpty { - rb.typeEncoders[t] = enc - return rb - } - switch t.Kind() { - case reflect.Interface: - for idx, ir := range rb.interfaceEncoders { - if ir.i == t { - rb.interfaceEncoders[idx].ve = enc - return rb - } - } - - rb.interfaceEncoders = append(rb.interfaceEncoders, interfaceValueEncoder{i: t, ve: enc}) - default: - rb.typeEncoders[t] = enc - } - return rb -} - -// RegisterDecoder registers the provided type and decoder pair. -// -// Deprecated: Use RegisterTypeDecoder or RegisterHookDecoder instead. -func (rb *RegistryBuilder) RegisterDecoder(t reflect.Type, dec ValueDecoder) *RegistryBuilder { - if t == nil { - rb.typeDecoders[nil] = dec - return rb - } - if t == tEmpty { - rb.typeDecoders[t] = dec - return rb - } - switch t.Kind() { - case reflect.Interface: - for idx, ir := range rb.interfaceDecoders { - if ir.i == t { - rb.interfaceDecoders[idx].vd = dec - return rb - } - } - - rb.interfaceDecoders = append(rb.interfaceDecoders, interfaceValueDecoder{i: t, vd: dec}) - default: - rb.typeDecoders[t] = dec - } - return rb -} - -// RegisterDefaultEncoder will registr the provided ValueEncoder to the provided -// kind. -func (rb *RegistryBuilder) RegisterDefaultEncoder(kind reflect.Kind, enc ValueEncoder) *RegistryBuilder { - rb.kindEncoders[kind] = enc - return rb -} - -// RegisterDefaultDecoder will register the provided ValueDecoder to the -// provided kind. -func (rb *RegistryBuilder) RegisterDefaultDecoder(kind reflect.Kind, dec ValueDecoder) *RegistryBuilder { - rb.kindDecoders[kind] = dec - return rb -} - -// RegisterTypeMapEntry will register the provided type to the BSON type. The primary usage for this -// mapping is decoding situations where an empty interface is used and a default type needs to be -// created and decoded into. -// -// By default, BSON documents will decode into interface{} values as bson.D. To change the default type for BSON -// documents, a type map entry for bsontype.EmbeddedDocument should be registered. For example, to force BSON documents -// to decode to bson.Raw, use the following code: -// -// rb.RegisterTypeMapEntry(bsontype.EmbeddedDocument, reflect.TypeOf(bson.Raw{})) -func (rb *RegistryBuilder) RegisterTypeMapEntry(bt bsontype.Type, rt reflect.Type) *RegistryBuilder { - rb.typeMap[bt] = rt - return rb -} - -// Build creates a Registry from the current state of this RegistryBuilder. -func (rb *RegistryBuilder) Build() *Registry { - registry := new(Registry) - - registry.typeEncoders = make(map[reflect.Type]ValueEncoder) - for t, enc := range rb.typeEncoders { - registry.typeEncoders[t] = enc - } - - registry.typeDecoders = make(map[reflect.Type]ValueDecoder) - for t, dec := range rb.typeDecoders { - registry.typeDecoders[t] = dec - } - - registry.interfaceEncoders = make([]interfaceValueEncoder, len(rb.interfaceEncoders)) - copy(registry.interfaceEncoders, rb.interfaceEncoders) - - registry.interfaceDecoders = make([]interfaceValueDecoder, len(rb.interfaceDecoders)) - copy(registry.interfaceDecoders, rb.interfaceDecoders) - - registry.kindEncoders = make(map[reflect.Kind]ValueEncoder) - for kind, enc := range rb.kindEncoders { - registry.kindEncoders[kind] = enc - } - - registry.kindDecoders = make(map[reflect.Kind]ValueDecoder) - for kind, dec := range rb.kindDecoders { - registry.kindDecoders[kind] = dec - } - - registry.typeMap = make(map[bsontype.Type]reflect.Type) - for bt, rt := range rb.typeMap { - registry.typeMap[bt] = rt - } - - return registry -} - -// LookupEncoder inspects the registry for an encoder for the given type. The lookup precedence works as follows: -// -// 1. An encoder registered for the exact type. If the given type represents an interface, an encoder registered using -// RegisterTypeEncoder for the interface will be selected. -// -// 2. An encoder registered using RegisterHookEncoder for an interface implemented by the type or by a pointer to the -// type. -// -// 3. An encoder registered for the reflect.Kind of the value. -// -// If no encoder is found, an error of type ErrNoEncoder is returned. -func (r *Registry) LookupEncoder(t reflect.Type) (ValueEncoder, error) { - encodererr := ErrNoEncoder{Type: t} - r.mu.RLock() - enc, found := r.lookupTypeEncoder(t) - r.mu.RUnlock() - if found { - if enc == nil { - return nil, ErrNoEncoder{Type: t} - } - return enc, nil - } - - enc, found = r.lookupInterfaceEncoder(t, true) - if found { - r.mu.Lock() - r.typeEncoders[t] = enc - r.mu.Unlock() - return enc, nil - } - - if t == nil { - r.mu.Lock() - r.typeEncoders[t] = nil - r.mu.Unlock() - return nil, encodererr - } - - enc, found = r.kindEncoders[t.Kind()] - if !found { - r.mu.Lock() - r.typeEncoders[t] = nil - r.mu.Unlock() - return nil, encodererr - } - - r.mu.Lock() - r.typeEncoders[t] = enc - r.mu.Unlock() - return enc, nil -} - -func (r *Registry) lookupTypeEncoder(t reflect.Type) (ValueEncoder, bool) { - enc, found := r.typeEncoders[t] - return enc, found -} - -func (r *Registry) lookupInterfaceEncoder(t reflect.Type, allowAddr bool) (ValueEncoder, bool) { - if t == nil { - return nil, false - } - for _, ienc := range r.interfaceEncoders { - if t.Implements(ienc.i) { - return ienc.ve, true - } - if allowAddr && t.Kind() != reflect.Ptr && reflect.PtrTo(t).Implements(ienc.i) { - // if *t implements an interface, this will catch if t implements an interface further ahead - // in interfaceEncoders - defaultEnc, found := r.lookupInterfaceEncoder(t, false) - if !found { - defaultEnc = r.kindEncoders[t.Kind()] - } - return newCondAddrEncoder(ienc.ve, defaultEnc), true - } - } - return nil, false -} - -// LookupDecoder inspects the registry for an decoder for the given type. The lookup precedence works as follows: -// -// 1. A decoder registered for the exact type. If the given type represents an interface, a decoder registered using -// RegisterTypeDecoder for the interface will be selected. -// -// 2. A decoder registered using RegisterHookDecoder for an interface implemented by the type or by a pointer to the -// type. -// -// 3. A decoder registered for the reflect.Kind of the value. -// -// If no decoder is found, an error of type ErrNoDecoder is returned. -func (r *Registry) LookupDecoder(t reflect.Type) (ValueDecoder, error) { - if t == nil { - return nil, ErrNilType - } - decodererr := ErrNoDecoder{Type: t} - r.mu.RLock() - dec, found := r.lookupTypeDecoder(t) - r.mu.RUnlock() - if found { - if dec == nil { - return nil, ErrNoDecoder{Type: t} - } - return dec, nil - } - - dec, found = r.lookupInterfaceDecoder(t, true) - if found { - r.mu.Lock() - r.typeDecoders[t] = dec - r.mu.Unlock() - return dec, nil - } - - dec, found = r.kindDecoders[t.Kind()] - if !found { - r.mu.Lock() - r.typeDecoders[t] = nil - r.mu.Unlock() - return nil, decodererr - } - - r.mu.Lock() - r.typeDecoders[t] = dec - r.mu.Unlock() - return dec, nil -} - -func (r *Registry) lookupTypeDecoder(t reflect.Type) (ValueDecoder, bool) { - dec, found := r.typeDecoders[t] - return dec, found -} - -func (r *Registry) lookupInterfaceDecoder(t reflect.Type, allowAddr bool) (ValueDecoder, bool) { - for _, idec := range r.interfaceDecoders { - if t.Implements(idec.i) { - return idec.vd, true - } - if allowAddr && t.Kind() != reflect.Ptr && reflect.PtrTo(t).Implements(idec.i) { - // if *t implements an interface, this will catch if t implements an interface further ahead - // in interfaceDecoders - defaultDec, found := r.lookupInterfaceDecoder(t, false) - if !found { - defaultDec = r.kindDecoders[t.Kind()] - } - return newCondAddrDecoder(idec.vd, defaultDec), true - } - } - return nil, false -} - -// LookupTypeMapEntry inspects the registry's type map for a Go type for the corresponding BSON -// type. If no type is found, ErrNoTypeMapEntry is returned. -func (r *Registry) LookupTypeMapEntry(bt bsontype.Type) (reflect.Type, error) { - t, ok := r.typeMap[bt] - if !ok || t == nil { - return nil, ErrNoTypeMapEntry{Type: bt} - } - return t, nil -} - -type interfaceValueEncoder struct { - i reflect.Type - ve ValueEncoder -} - -type interfaceValueDecoder struct { - i reflect.Type - vd ValueDecoder -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/slice_codec.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/slice_codec.go deleted file mode 100644 index 3c1b6b8..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/slice_codec.go +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "fmt" - "reflect" - - "go.mongodb.org/mongo-driver/bson/bsonoptions" - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/bson/bsontype" - "go.mongodb.org/mongo-driver/bson/primitive" -) - -var defaultSliceCodec = NewSliceCodec() - -// SliceCodec is the Codec used for slice values. -type SliceCodec struct { - EncodeNilAsEmpty bool -} - -var _ ValueCodec = &MapCodec{} - -// NewSliceCodec returns a MapCodec with options opts. -func NewSliceCodec(opts ...*bsonoptions.SliceCodecOptions) *SliceCodec { - sliceOpt := bsonoptions.MergeSliceCodecOptions(opts...) - - codec := SliceCodec{} - if sliceOpt.EncodeNilAsEmpty != nil { - codec.EncodeNilAsEmpty = *sliceOpt.EncodeNilAsEmpty - } - return &codec -} - -// EncodeValue is the ValueEncoder for slice types. -func (sc SliceCodec) EncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Kind() != reflect.Slice { - return ValueEncoderError{Name: "SliceEncodeValue", Kinds: []reflect.Kind{reflect.Slice}, Received: val} - } - - if val.IsNil() && !sc.EncodeNilAsEmpty { - return vw.WriteNull() - } - - // If we have a []byte we want to treat it as a binary instead of as an array. - if val.Type().Elem() == tByte { - var byteSlice []byte - for idx := 0; idx < val.Len(); idx++ { - byteSlice = append(byteSlice, val.Index(idx).Interface().(byte)) - } - return vw.WriteBinary(byteSlice) - } - - // If we have a []primitive.E we want to treat it as a document instead of as an array. - if val.Type().ConvertibleTo(tD) { - d := val.Convert(tD).Interface().(primitive.D) - - dw, err := vw.WriteDocument() - if err != nil { - return err - } - - for _, e := range d { - err = encodeElement(ec, dw, e) - if err != nil { - return err - } - } - - return dw.WriteDocumentEnd() - } - - aw, err := vw.WriteArray() - if err != nil { - return err - } - - elemType := val.Type().Elem() - encoder, err := ec.LookupEncoder(elemType) - if err != nil && elemType.Kind() != reflect.Interface { - return err - } - - for idx := 0; idx < val.Len(); idx++ { - currEncoder, currVal, lookupErr := defaultValueEncoders.lookupElementEncoder(ec, encoder, val.Index(idx)) - if lookupErr != nil && lookupErr != errInvalidValue { - return lookupErr - } - - vw, err := aw.WriteArrayElement() - if err != nil { - return err - } - - if lookupErr == errInvalidValue { - err = vw.WriteNull() - if err != nil { - return err - } - continue - } - - err = currEncoder.EncodeValue(ec, vw, currVal) - if err != nil { - return err - } - } - return aw.WriteArrayEnd() -} - -// DecodeValue is the ValueDecoder for slice types. -func (sc *SliceCodec) DecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Kind() != reflect.Slice { - return ValueDecoderError{Name: "SliceDecodeValue", Kinds: []reflect.Kind{reflect.Slice}, Received: val} - } - - switch vrType := vr.Type(); vrType { - case bsontype.Array: - case bsontype.Null: - val.Set(reflect.Zero(val.Type())) - return vr.ReadNull() - case bsontype.Undefined: - val.Set(reflect.Zero(val.Type())) - return vr.ReadUndefined() - case bsontype.Type(0), bsontype.EmbeddedDocument: - if val.Type().Elem() != tE { - return fmt.Errorf("cannot decode document into %s", val.Type()) - } - case bsontype.Binary: - if val.Type().Elem() != tByte { - return fmt.Errorf("SliceDecodeValue can only decode a binary into a byte array, got %v", vrType) - } - data, subtype, err := vr.ReadBinary() - if err != nil { - return err - } - if subtype != bsontype.BinaryGeneric && subtype != bsontype.BinaryBinaryOld { - return fmt.Errorf("SliceDecodeValue can only be used to decode subtype 0x00 or 0x02 for %s, got %v", bsontype.Binary, subtype) - } - - if val.IsNil() { - val.Set(reflect.MakeSlice(val.Type(), 0, len(data))) - } - - val.SetLen(0) - for _, elem := range data { - val.Set(reflect.Append(val, reflect.ValueOf(elem))) - } - return nil - case bsontype.String: - if sliceType := val.Type().Elem(); sliceType != tByte { - return fmt.Errorf("SliceDecodeValue can only decode a string into a byte array, got %v", sliceType) - } - str, err := vr.ReadString() - if err != nil { - return err - } - byteStr := []byte(str) - - if val.IsNil() { - val.Set(reflect.MakeSlice(val.Type(), 0, len(byteStr))) - } - - val.SetLen(0) - for _, elem := range byteStr { - val.Set(reflect.Append(val, reflect.ValueOf(elem))) - } - return nil - default: - return fmt.Errorf("cannot decode %v into a slice", vrType) - } - - var elemsFunc func(DecodeContext, bsonrw.ValueReader, reflect.Value) ([]reflect.Value, error) - switch val.Type().Elem() { - case tE: - dc.Ancestor = val.Type() - elemsFunc = defaultValueDecoders.decodeD - default: - elemsFunc = defaultValueDecoders.decodeDefault - } - - elems, err := elemsFunc(dc, vr, val) - if err != nil { - return err - } - - if val.IsNil() { - val.Set(reflect.MakeSlice(val.Type(), 0, len(elems))) - } - - val.SetLen(0) - val.Set(reflect.Append(val, elems...)) - - return nil -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/string_codec.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/string_codec.go deleted file mode 100644 index 5332b7c..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/string_codec.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "fmt" - "reflect" - - "go.mongodb.org/mongo-driver/bson/bsonoptions" - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/bson/bsontype" -) - -// StringCodec is the Codec used for struct values. -type StringCodec struct { - DecodeObjectIDAsHex bool -} - -var ( - defaultStringCodec = NewStringCodec() - - _ ValueCodec = defaultStringCodec - _ typeDecoder = defaultStringCodec -) - -// NewStringCodec returns a StringCodec with options opts. -func NewStringCodec(opts ...*bsonoptions.StringCodecOptions) *StringCodec { - stringOpt := bsonoptions.MergeStringCodecOptions(opts...) - return &StringCodec{*stringOpt.DecodeObjectIDAsHex} -} - -// EncodeValue is the ValueEncoder for string types. -func (sc *StringCodec) EncodeValue(ectx EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if val.Kind() != reflect.String { - return ValueEncoderError{ - Name: "StringEncodeValue", - Kinds: []reflect.Kind{reflect.String}, - Received: val, - } - } - - return vw.WriteString(val.String()) -} - -func (sc *StringCodec) decodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t.Kind() != reflect.String { - return emptyValue, ValueDecoderError{ - Name: "StringDecodeValue", - Kinds: []reflect.Kind{reflect.String}, - Received: reflect.Zero(t), - } - } - - var str string - var err error - switch vr.Type() { - case bsontype.String: - str, err = vr.ReadString() - if err != nil { - return emptyValue, err - } - case bsontype.ObjectID: - oid, err := vr.ReadObjectID() - if err != nil { - return emptyValue, err - } - if sc.DecodeObjectIDAsHex { - str = oid.Hex() - } else { - byteArray := [12]byte(oid) - str = string(byteArray[:]) - } - case bsontype.Symbol: - str, err = vr.ReadSymbol() - if err != nil { - return emptyValue, err - } - case bsontype.Binary: - data, subtype, err := vr.ReadBinary() - if err != nil { - return emptyValue, err - } - if subtype != bsontype.BinaryGeneric && subtype != bsontype.BinaryBinaryOld { - return emptyValue, decodeBinaryError{subtype: subtype, typeName: "string"} - } - str = string(data) - case bsontype.Null: - if err = vr.ReadNull(); err != nil { - return emptyValue, err - } - case bsontype.Undefined: - if err = vr.ReadUndefined(); err != nil { - return emptyValue, err - } - default: - return emptyValue, fmt.Errorf("cannot decode %v into a string type", vr.Type()) - } - - return reflect.ValueOf(str), nil -} - -// DecodeValue is the ValueDecoder for string types. -func (sc *StringCodec) DecodeValue(dctx DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Kind() != reflect.String { - return ValueDecoderError{Name: "StringDecodeValue", Kinds: []reflect.Kind{reflect.String}, Received: val} - } - - elem, err := sc.decodeType(dctx, vr, val.Type()) - if err != nil { - return err - } - - val.SetString(elem.String()) - return nil -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/struct_codec.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/struct_codec.go deleted file mode 100644 index da1ae18..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/struct_codec.go +++ /dev/null @@ -1,669 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "errors" - "fmt" - "reflect" - "sort" - "strings" - "sync" - "time" - - "go.mongodb.org/mongo-driver/bson/bsonoptions" - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/bson/bsontype" -) - -// DecodeError represents an error that occurs when unmarshalling BSON bytes into a native Go type. -type DecodeError struct { - keys []string - wrapped error -} - -// Unwrap returns the underlying error -func (de *DecodeError) Unwrap() error { - return de.wrapped -} - -// Error implements the error interface. -func (de *DecodeError) Error() string { - // The keys are stored in reverse order because the de.keys slice is builtup while propagating the error up the - // stack of BSON keys, so we call de.Keys(), which reverses them. - keyPath := strings.Join(de.Keys(), ".") - return fmt.Sprintf("error decoding key %s: %v", keyPath, de.wrapped) -} - -// Keys returns the BSON key path that caused an error as a slice of strings. The keys in the slice are in top-down -// order. For example, if the document being unmarshalled was {a: {b: {c: 1}}} and the value for c was supposed to be -// a string, the keys slice will be ["a", "b", "c"]. -func (de *DecodeError) Keys() []string { - reversedKeys := make([]string, 0, len(de.keys)) - for idx := len(de.keys) - 1; idx >= 0; idx-- { - reversedKeys = append(reversedKeys, de.keys[idx]) - } - - return reversedKeys -} - -// Zeroer allows custom struct types to implement a report of zero -// state. All struct types that don't implement Zeroer or where IsZero -// returns false are considered to be not zero. -type Zeroer interface { - IsZero() bool -} - -// StructCodec is the Codec used for struct values. -type StructCodec struct { - cache map[reflect.Type]*structDescription - l sync.RWMutex - parser StructTagParser - DecodeZeroStruct bool - DecodeDeepZeroInline bool - EncodeOmitDefaultStruct bool - AllowUnexportedFields bool - OverwriteDuplicatedInlinedFields bool -} - -var _ ValueEncoder = &StructCodec{} -var _ ValueDecoder = &StructCodec{} - -// NewStructCodec returns a StructCodec that uses p for struct tag parsing. -func NewStructCodec(p StructTagParser, opts ...*bsonoptions.StructCodecOptions) (*StructCodec, error) { - if p == nil { - return nil, errors.New("a StructTagParser must be provided to NewStructCodec") - } - - structOpt := bsonoptions.MergeStructCodecOptions(opts...) - - codec := &StructCodec{ - cache: make(map[reflect.Type]*structDescription), - parser: p, - } - - if structOpt.DecodeZeroStruct != nil { - codec.DecodeZeroStruct = *structOpt.DecodeZeroStruct - } - if structOpt.DecodeDeepZeroInline != nil { - codec.DecodeDeepZeroInline = *structOpt.DecodeDeepZeroInline - } - if structOpt.EncodeOmitDefaultStruct != nil { - codec.EncodeOmitDefaultStruct = *structOpt.EncodeOmitDefaultStruct - } - if structOpt.OverwriteDuplicatedInlinedFields != nil { - codec.OverwriteDuplicatedInlinedFields = *structOpt.OverwriteDuplicatedInlinedFields - } - if structOpt.AllowUnexportedFields != nil { - codec.AllowUnexportedFields = *structOpt.AllowUnexportedFields - } - - return codec, nil -} - -// EncodeValue handles encoding generic struct types. -func (sc *StructCodec) EncodeValue(r EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Kind() != reflect.Struct { - return ValueEncoderError{Name: "StructCodec.EncodeValue", Kinds: []reflect.Kind{reflect.Struct}, Received: val} - } - - sd, err := sc.describeStruct(r.Registry, val.Type()) - if err != nil { - return err - } - - dw, err := vw.WriteDocument() - if err != nil { - return err - } - var rv reflect.Value - for _, desc := range sd.fl { - if desc.inline == nil { - rv = val.Field(desc.idx) - } else { - rv, err = fieldByIndexErr(val, desc.inline) - if err != nil { - continue - } - } - - desc.encoder, rv, err = defaultValueEncoders.lookupElementEncoder(r, desc.encoder, rv) - - if err != nil && err != errInvalidValue { - return err - } - - if err == errInvalidValue { - if desc.omitEmpty { - continue - } - vw2, err := dw.WriteDocumentElement(desc.name) - if err != nil { - return err - } - err = vw2.WriteNull() - if err != nil { - return err - } - continue - } - - if desc.encoder == nil { - return ErrNoEncoder{Type: rv.Type()} - } - - encoder := desc.encoder - - var isZero bool - rvInterface := rv.Interface() - if cz, ok := encoder.(CodecZeroer); ok { - isZero = cz.IsTypeZero(rvInterface) - } else if rv.Kind() == reflect.Interface { - // sc.isZero will not treat an interface rv as an interface, so we need to check for the zero interface separately. - isZero = rv.IsNil() - } else { - isZero = sc.isZero(rvInterface) - } - if desc.omitEmpty && isZero { - continue - } - - vw2, err := dw.WriteDocumentElement(desc.name) - if err != nil { - return err - } - - ectx := EncodeContext{Registry: r.Registry, MinSize: desc.minSize} - err = encoder.EncodeValue(ectx, vw2, rv) - if err != nil { - return err - } - } - - if sd.inlineMap >= 0 { - rv := val.Field(sd.inlineMap) - collisionFn := func(key string) bool { - _, exists := sd.fm[key] - return exists - } - - return defaultMapCodec.mapEncodeValue(r, dw, rv, collisionFn) - } - - return dw.WriteDocumentEnd() -} - -func newDecodeError(key string, original error) error { - de, ok := original.(*DecodeError) - if !ok { - return &DecodeError{ - keys: []string{key}, - wrapped: original, - } - } - - de.keys = append(de.keys, key) - return de -} - -// DecodeValue implements the Codec interface. -// By default, map types in val will not be cleared. If a map has existing key/value pairs, it will be extended with the new ones from vr. -// For slices, the decoder will set the length of the slice to zero and append all elements. The underlying array will not be cleared. -func (sc *StructCodec) DecodeValue(r DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Kind() != reflect.Struct { - return ValueDecoderError{Name: "StructCodec.DecodeValue", Kinds: []reflect.Kind{reflect.Struct}, Received: val} - } - - switch vrType := vr.Type(); vrType { - case bsontype.Type(0), bsontype.EmbeddedDocument: - case bsontype.Null: - if err := vr.ReadNull(); err != nil { - return err - } - - val.Set(reflect.Zero(val.Type())) - return nil - case bsontype.Undefined: - if err := vr.ReadUndefined(); err != nil { - return err - } - - val.Set(reflect.Zero(val.Type())) - return nil - default: - return fmt.Errorf("cannot decode %v into a %s", vrType, val.Type()) - } - - sd, err := sc.describeStruct(r.Registry, val.Type()) - if err != nil { - return err - } - - if sc.DecodeZeroStruct { - val.Set(reflect.Zero(val.Type())) - } - if sc.DecodeDeepZeroInline && sd.inline { - val.Set(deepZero(val.Type())) - } - - var decoder ValueDecoder - var inlineMap reflect.Value - if sd.inlineMap >= 0 { - inlineMap = val.Field(sd.inlineMap) - decoder, err = r.LookupDecoder(inlineMap.Type().Elem()) - if err != nil { - return err - } - } - - dr, err := vr.ReadDocument() - if err != nil { - return err - } - - for { - name, vr, err := dr.ReadElement() - if err == bsonrw.ErrEOD { - break - } - if err != nil { - return err - } - - fd, exists := sd.fm[name] - if !exists { - // if the original name isn't found in the struct description, try again with the name in lowercase - // this could match if a BSON tag isn't specified because by default, describeStruct lowercases all field - // names - fd, exists = sd.fm[strings.ToLower(name)] - } - - if !exists { - if sd.inlineMap < 0 { - // The encoding/json package requires a flag to return on error for non-existent fields. - // This functionality seems appropriate for the struct codec. - err = vr.Skip() - if err != nil { - return err - } - continue - } - - if inlineMap.IsNil() { - inlineMap.Set(reflect.MakeMap(inlineMap.Type())) - } - - elem := reflect.New(inlineMap.Type().Elem()).Elem() - r.Ancestor = inlineMap.Type() - err = decoder.DecodeValue(r, vr, elem) - if err != nil { - return err - } - inlineMap.SetMapIndex(reflect.ValueOf(name), elem) - continue - } - - var field reflect.Value - if fd.inline == nil { - field = val.Field(fd.idx) - } else { - field, err = getInlineField(val, fd.inline) - if err != nil { - return err - } - } - - if !field.CanSet() { // Being settable is a super set of being addressable. - innerErr := fmt.Errorf("field %v is not settable", field) - return newDecodeError(fd.name, innerErr) - } - if field.Kind() == reflect.Ptr && field.IsNil() { - field.Set(reflect.New(field.Type().Elem())) - } - field = field.Addr() - - dctx := DecodeContext{ - Registry: r.Registry, - Truncate: fd.truncate || r.Truncate, - defaultDocumentType: r.defaultDocumentType, - } - - if fd.decoder == nil { - return newDecodeError(fd.name, ErrNoDecoder{Type: field.Elem().Type()}) - } - - err = fd.decoder.DecodeValue(dctx, vr, field.Elem()) - if err != nil { - return newDecodeError(fd.name, err) - } - } - - return nil -} - -func (sc *StructCodec) isZero(i interface{}) bool { - v := reflect.ValueOf(i) - - // check the value validity - if !v.IsValid() { - return true - } - - if z, ok := v.Interface().(Zeroer); ok && (v.Kind() != reflect.Ptr || !v.IsNil()) { - return z.IsZero() - } - - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - case reflect.Struct: - if sc.EncodeOmitDefaultStruct { - vt := v.Type() - if vt == tTime { - return v.Interface().(time.Time).IsZero() - } - for i := 0; i < v.NumField(); i++ { - if vt.Field(i).PkgPath != "" && !vt.Field(i).Anonymous { - continue // Private field - } - fld := v.Field(i) - if !sc.isZero(fld.Interface()) { - return false - } - } - return true - } - } - - return false -} - -type structDescription struct { - fm map[string]fieldDescription - fl []fieldDescription - inlineMap int - inline bool -} - -type fieldDescription struct { - name string // BSON key name - fieldName string // struct field name - idx int - omitEmpty bool - minSize bool - truncate bool - inline []int - encoder ValueEncoder - decoder ValueDecoder -} - -type byIndex []fieldDescription - -func (bi byIndex) Len() int { return len(bi) } - -func (bi byIndex) Swap(i, j int) { bi[i], bi[j] = bi[j], bi[i] } - -func (bi byIndex) Less(i, j int) bool { - // If a field is inlined, its index in the top level struct is stored at inline[0] - iIdx, jIdx := bi[i].idx, bi[j].idx - if len(bi[i].inline) > 0 { - iIdx = bi[i].inline[0] - } - if len(bi[j].inline) > 0 { - jIdx = bi[j].inline[0] - } - if iIdx != jIdx { - return iIdx < jIdx - } - for k, biik := range bi[i].inline { - if k >= len(bi[j].inline) { - return false - } - if biik != bi[j].inline[k] { - return biik < bi[j].inline[k] - } - } - return len(bi[i].inline) < len(bi[j].inline) -} - -func (sc *StructCodec) describeStruct(r *Registry, t reflect.Type) (*structDescription, error) { - // We need to analyze the struct, including getting the tags, collecting - // information about inlining, and create a map of the field name to the field. - sc.l.RLock() - ds, exists := sc.cache[t] - sc.l.RUnlock() - if exists { - return ds, nil - } - - numFields := t.NumField() - sd := &structDescription{ - fm: make(map[string]fieldDescription, numFields), - fl: make([]fieldDescription, 0, numFields), - inlineMap: -1, - } - - var fields []fieldDescription - for i := 0; i < numFields; i++ { - sf := t.Field(i) - if sf.PkgPath != "" && (!sc.AllowUnexportedFields || !sf.Anonymous) { - // field is private or unexported fields aren't allowed, ignore - continue - } - - sfType := sf.Type - encoder, err := r.LookupEncoder(sfType) - if err != nil { - encoder = nil - } - decoder, err := r.LookupDecoder(sfType) - if err != nil { - decoder = nil - } - - description := fieldDescription{ - fieldName: sf.Name, - idx: i, - encoder: encoder, - decoder: decoder, - } - - stags, err := sc.parser.ParseStructTags(sf) - if err != nil { - return nil, err - } - if stags.Skip { - continue - } - description.name = stags.Name - description.omitEmpty = stags.OmitEmpty - description.minSize = stags.MinSize - description.truncate = stags.Truncate - - if stags.Inline { - sd.inline = true - switch sfType.Kind() { - case reflect.Map: - if sd.inlineMap >= 0 { - return nil, errors.New("(struct " + t.String() + ") multiple inline maps") - } - if sfType.Key() != tString { - return nil, errors.New("(struct " + t.String() + ") inline map must have a string keys") - } - sd.inlineMap = description.idx - case reflect.Ptr: - sfType = sfType.Elem() - if sfType.Kind() != reflect.Struct { - return nil, fmt.Errorf("(struct %s) inline fields must be a struct, a struct pointer, or a map", t.String()) - } - fallthrough - case reflect.Struct: - inlinesf, err := sc.describeStruct(r, sfType) - if err != nil { - return nil, err - } - for _, fd := range inlinesf.fl { - if fd.inline == nil { - fd.inline = []int{i, fd.idx} - } else { - fd.inline = append([]int{i}, fd.inline...) - } - fields = append(fields, fd) - - } - default: - return nil, fmt.Errorf("(struct %s) inline fields must be a struct, a struct pointer, or a map", t.String()) - } - continue - } - fields = append(fields, description) - } - - // Sort fieldDescriptions by name and use dominance rules to determine which should be added for each name - sort.Slice(fields, func(i, j int) bool { - x := fields - // sort field by name, breaking ties with depth, then - // breaking ties with index sequence. - if x[i].name != x[j].name { - return x[i].name < x[j].name - } - if len(x[i].inline) != len(x[j].inline) { - return len(x[i].inline) < len(x[j].inline) - } - return byIndex(x).Less(i, j) - }) - - for advance, i := 0, 0; i < len(fields); i += advance { - // One iteration per name. - // Find the sequence of fields with the name of this first field. - fi := fields[i] - name := fi.name - for advance = 1; i+advance < len(fields); advance++ { - fj := fields[i+advance] - if fj.name != name { - break - } - } - if advance == 1 { // Only one field with this name - sd.fl = append(sd.fl, fi) - sd.fm[name] = fi - continue - } - dominant, ok := dominantField(fields[i : i+advance]) - if !ok || !sc.OverwriteDuplicatedInlinedFields { - return nil, fmt.Errorf("struct %s has duplicated key %s", t.String(), name) - } - sd.fl = append(sd.fl, dominant) - sd.fm[name] = dominant - } - - sort.Sort(byIndex(sd.fl)) - - sc.l.Lock() - sc.cache[t] = sd - sc.l.Unlock() - - return sd, nil -} - -// dominantField looks through the fields, all of which are known to -// have the same name, to find the single field that dominates the -// others using Go's inlining rules. If there are multiple top-level -// fields, the boolean will be false: This condition is an error in Go -// and we skip all the fields. -func dominantField(fields []fieldDescription) (fieldDescription, bool) { - // The fields are sorted in increasing index-length order, then by presence of tag. - // That means that the first field is the dominant one. We need only check - // for error cases: two fields at top level. - if len(fields) > 1 && - len(fields[0].inline) == len(fields[1].inline) { - return fieldDescription{}, false - } - return fields[0], true -} - -func fieldByIndexErr(v reflect.Value, index []int) (result reflect.Value, err error) { - defer func() { - if recovered := recover(); recovered != nil { - switch r := recovered.(type) { - case string: - err = fmt.Errorf("%s", r) - case error: - err = r - } - } - }() - - result = v.FieldByIndex(index) - return -} - -func getInlineField(val reflect.Value, index []int) (reflect.Value, error) { - field, err := fieldByIndexErr(val, index) - if err == nil { - return field, nil - } - - // if parent of this element doesn't exist, fix its parent - inlineParent := index[:len(index)-1] - var fParent reflect.Value - if fParent, err = fieldByIndexErr(val, inlineParent); err != nil { - fParent, err = getInlineField(val, inlineParent) - if err != nil { - return fParent, err - } - } - fParent.Set(reflect.New(fParent.Type().Elem())) - - return fieldByIndexErr(val, index) -} - -// DeepZero returns recursive zero object -func deepZero(st reflect.Type) (result reflect.Value) { - result = reflect.Indirect(reflect.New(st)) - - if result.Kind() == reflect.Struct { - for i := 0; i < result.NumField(); i++ { - if f := result.Field(i); f.Kind() == reflect.Ptr { - if f.CanInterface() { - if ft := reflect.TypeOf(f.Interface()); ft.Elem().Kind() == reflect.Struct { - result.Field(i).Set(recursivePointerTo(deepZero(ft.Elem()))) - } - } - } - } - } - - return -} - -// recursivePointerTo calls reflect.New(v.Type) but recursively for its fields inside -func recursivePointerTo(v reflect.Value) reflect.Value { - v = reflect.Indirect(v) - result := reflect.New(v.Type()) - if v.Kind() == reflect.Struct { - for i := 0; i < v.NumField(); i++ { - if f := v.Field(i); f.Kind() == reflect.Ptr { - if f.Elem().Kind() == reflect.Struct { - result.Elem().Field(i).Set(recursivePointerTo(f)) - } - } - } - } - - return result -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/struct_tag_parser.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/struct_tag_parser.go deleted file mode 100644 index 62708c5..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/struct_tag_parser.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "reflect" - "strings" -) - -// StructTagParser returns the struct tags for a given struct field. -type StructTagParser interface { - ParseStructTags(reflect.StructField) (StructTags, error) -} - -// StructTagParserFunc is an adapter that allows a generic function to be used -// as a StructTagParser. -type StructTagParserFunc func(reflect.StructField) (StructTags, error) - -// ParseStructTags implements the StructTagParser interface. -func (stpf StructTagParserFunc) ParseStructTags(sf reflect.StructField) (StructTags, error) { - return stpf(sf) -} - -// StructTags represents the struct tag fields that the StructCodec uses during -// the encoding and decoding process. -// -// In the case of a struct, the lowercased field name is used as the key for each exported -// field but this behavior may be changed using a struct tag. The tag may also contain flags to -// adjust the marshalling behavior for the field. -// -// The properties are defined below: -// -// OmitEmpty Only include the field if it's not set to the zero value for the type or to -// empty slices or maps. -// -// MinSize Marshal an integer of a type larger than 32 bits value as an int32, if that's -// feasible while preserving the numeric value. -// -// Truncate When unmarshaling a BSON double, it is permitted to lose precision to fit within -// a float32. -// -// Inline Inline the field, which must be a struct or a map, causing all of its fields -// or keys to be processed as if they were part of the outer struct. For maps, -// keys must not conflict with the bson keys of other struct fields. -// -// Skip This struct field should be skipped. This is usually denoted by parsing a "-" -// for the name. -// -// TODO(skriptble): Add tags for undefined as nil and for null as nil. -type StructTags struct { - Name string - OmitEmpty bool - MinSize bool - Truncate bool - Inline bool - Skip bool -} - -// DefaultStructTagParser is the StructTagParser used by the StructCodec by default. -// It will handle the bson struct tag. See the documentation for StructTags to see -// what each of the returned fields means. -// -// If there is no name in the struct tag fields, the struct field name is lowercased. -// The tag formats accepted are: -// -// "[][,[,]]" -// -// `(...) bson:"[][,[,]]" (...)` -// -// An example: -// -// type T struct { -// A bool -// B int "myb" -// C string "myc,omitempty" -// D string `bson:",omitempty" json:"jsonkey"` -// E int64 ",minsize" -// F int64 "myf,omitempty,minsize" -// } -// -// A struct tag either consisting entirely of '-' or with a bson key with a -// value consisting entirely of '-' will return a StructTags with Skip true and -// the remaining fields will be their default values. -var DefaultStructTagParser StructTagParserFunc = func(sf reflect.StructField) (StructTags, error) { - key := strings.ToLower(sf.Name) - tag, ok := sf.Tag.Lookup("bson") - if !ok && !strings.Contains(string(sf.Tag), ":") && len(sf.Tag) > 0 { - tag = string(sf.Tag) - } - return parseTags(key, tag) -} - -func parseTags(key string, tag string) (StructTags, error) { - var st StructTags - if tag == "-" { - st.Skip = true - return st, nil - } - - for idx, str := range strings.Split(tag, ",") { - if idx == 0 && str != "" { - key = str - } - switch str { - case "omitempty": - st.OmitEmpty = true - case "minsize": - st.MinSize = true - case "truncate": - st.Truncate = true - case "inline": - st.Inline = true - } - } - - st.Name = key - - return st, nil -} - -// JSONFallbackStructTagParser has the same behavior as DefaultStructTagParser -// but will also fallback to parsing the json tag instead on a field where the -// bson tag isn't available. -var JSONFallbackStructTagParser StructTagParserFunc = func(sf reflect.StructField) (StructTags, error) { - key := strings.ToLower(sf.Name) - tag, ok := sf.Tag.Lookup("bson") - if !ok { - tag, ok = sf.Tag.Lookup("json") - } - if !ok && !strings.Contains(string(sf.Tag), ":") && len(sf.Tag) > 0 { - tag = string(sf.Tag) - } - - return parseTags(key, tag) -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/time_codec.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/time_codec.go deleted file mode 100644 index ec7e30f..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/time_codec.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "fmt" - "reflect" - "time" - - "go.mongodb.org/mongo-driver/bson/bsonoptions" - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/bson/bsontype" - "go.mongodb.org/mongo-driver/bson/primitive" -) - -const ( - timeFormatString = "2006-01-02T15:04:05.999Z07:00" -) - -// TimeCodec is the Codec used for time.Time values. -type TimeCodec struct { - UseLocalTimeZone bool -} - -var ( - defaultTimeCodec = NewTimeCodec() - - _ ValueCodec = defaultTimeCodec - _ typeDecoder = defaultTimeCodec -) - -// NewTimeCodec returns a TimeCodec with options opts. -func NewTimeCodec(opts ...*bsonoptions.TimeCodecOptions) *TimeCodec { - timeOpt := bsonoptions.MergeTimeCodecOptions(opts...) - - codec := TimeCodec{} - if timeOpt.UseLocalTimeZone != nil { - codec.UseLocalTimeZone = *timeOpt.UseLocalTimeZone - } - return &codec -} - -func (tc *TimeCodec) decodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - if t != tTime { - return emptyValue, ValueDecoderError{ - Name: "TimeDecodeValue", - Types: []reflect.Type{tTime}, - Received: reflect.Zero(t), - } - } - - var timeVal time.Time - switch vrType := vr.Type(); vrType { - case bsontype.DateTime: - dt, err := vr.ReadDateTime() - if err != nil { - return emptyValue, err - } - timeVal = time.Unix(dt/1000, dt%1000*1000000) - case bsontype.String: - // assume strings are in the isoTimeFormat - timeStr, err := vr.ReadString() - if err != nil { - return emptyValue, err - } - timeVal, err = time.Parse(timeFormatString, timeStr) - if err != nil { - return emptyValue, err - } - case bsontype.Int64: - i64, err := vr.ReadInt64() - if err != nil { - return emptyValue, err - } - timeVal = time.Unix(i64/1000, i64%1000*1000000) - case bsontype.Timestamp: - t, _, err := vr.ReadTimestamp() - if err != nil { - return emptyValue, err - } - timeVal = time.Unix(int64(t), 0) - case bsontype.Null: - if err := vr.ReadNull(); err != nil { - return emptyValue, err - } - case bsontype.Undefined: - if err := vr.ReadUndefined(); err != nil { - return emptyValue, err - } - default: - return emptyValue, fmt.Errorf("cannot decode %v into a time.Time", vrType) - } - - if !tc.UseLocalTimeZone { - timeVal = timeVal.UTC() - } - return reflect.ValueOf(timeVal), nil -} - -// DecodeValue is the ValueDecoderFunc for time.Time. -func (tc *TimeCodec) DecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() || val.Type() != tTime { - return ValueDecoderError{Name: "TimeDecodeValue", Types: []reflect.Type{tTime}, Received: val} - } - - elem, err := tc.decodeType(dc, vr, tTime) - if err != nil { - return err - } - - val.Set(elem) - return nil -} - -// EncodeValue is the ValueEncoderFunc for time.TIme. -func (tc *TimeCodec) EncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - if !val.IsValid() || val.Type() != tTime { - return ValueEncoderError{Name: "TimeEncodeValue", Types: []reflect.Type{tTime}, Received: val} - } - tt := val.Interface().(time.Time) - dt := primitive.NewDateTimeFromTime(tt) - return vw.WriteDateTime(int64(dt)) -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/types.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/types.go deleted file mode 100644 index 07f4b70..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/types.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "encoding/json" - "net/url" - "reflect" - "time" - - "go.mongodb.org/mongo-driver/bson/primitive" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" -) - -var tBool = reflect.TypeOf(false) -var tFloat64 = reflect.TypeOf(float64(0)) -var tInt32 = reflect.TypeOf(int32(0)) -var tInt64 = reflect.TypeOf(int64(0)) -var tString = reflect.TypeOf("") -var tTime = reflect.TypeOf(time.Time{}) - -var tEmpty = reflect.TypeOf((*interface{})(nil)).Elem() -var tByteSlice = reflect.TypeOf([]byte(nil)) -var tByte = reflect.TypeOf(byte(0x00)) -var tURL = reflect.TypeOf(url.URL{}) -var tJSONNumber = reflect.TypeOf(json.Number("")) - -var tValueMarshaler = reflect.TypeOf((*ValueMarshaler)(nil)).Elem() -var tValueUnmarshaler = reflect.TypeOf((*ValueUnmarshaler)(nil)).Elem() -var tMarshaler = reflect.TypeOf((*Marshaler)(nil)).Elem() -var tUnmarshaler = reflect.TypeOf((*Unmarshaler)(nil)).Elem() -var tProxy = reflect.TypeOf((*Proxy)(nil)).Elem() - -var tBinary = reflect.TypeOf(primitive.Binary{}) -var tUndefined = reflect.TypeOf(primitive.Undefined{}) -var tOID = reflect.TypeOf(primitive.ObjectID{}) -var tDateTime = reflect.TypeOf(primitive.DateTime(0)) -var tNull = reflect.TypeOf(primitive.Null{}) -var tRegex = reflect.TypeOf(primitive.Regex{}) -var tCodeWithScope = reflect.TypeOf(primitive.CodeWithScope{}) -var tDBPointer = reflect.TypeOf(primitive.DBPointer{}) -var tJavaScript = reflect.TypeOf(primitive.JavaScript("")) -var tSymbol = reflect.TypeOf(primitive.Symbol("")) -var tTimestamp = reflect.TypeOf(primitive.Timestamp{}) -var tDecimal = reflect.TypeOf(primitive.Decimal128{}) -var tMinKey = reflect.TypeOf(primitive.MinKey{}) -var tMaxKey = reflect.TypeOf(primitive.MaxKey{}) -var tD = reflect.TypeOf(primitive.D{}) -var tA = reflect.TypeOf(primitive.A{}) -var tE = reflect.TypeOf(primitive.E{}) - -var tCoreDocument = reflect.TypeOf(bsoncore.Document{}) -var tCoreArray = reflect.TypeOf(bsoncore.Array{}) diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/uint_codec.go b/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/uint_codec.go deleted file mode 100644 index 0b21ce9..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/uint_codec.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsoncodec - -import ( - "fmt" - "math" - "reflect" - - "go.mongodb.org/mongo-driver/bson/bsonoptions" - "go.mongodb.org/mongo-driver/bson/bsonrw" - "go.mongodb.org/mongo-driver/bson/bsontype" -) - -// UIntCodec is the Codec used for uint values. -type UIntCodec struct { - EncodeToMinSize bool -} - -var ( - defaultUIntCodec = NewUIntCodec() - - _ ValueCodec = defaultUIntCodec - _ typeDecoder = defaultUIntCodec -) - -// NewUIntCodec returns a UIntCodec with options opts. -func NewUIntCodec(opts ...*bsonoptions.UIntCodecOptions) *UIntCodec { - uintOpt := bsonoptions.MergeUIntCodecOptions(opts...) - - codec := UIntCodec{} - if uintOpt.EncodeToMinSize != nil { - codec.EncodeToMinSize = *uintOpt.EncodeToMinSize - } - return &codec -} - -// EncodeValue is the ValueEncoder for uint types. -func (uic *UIntCodec) EncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error { - switch val.Kind() { - case reflect.Uint8, reflect.Uint16: - return vw.WriteInt32(int32(val.Uint())) - case reflect.Uint, reflect.Uint32, reflect.Uint64: - u64 := val.Uint() - - // If ec.MinSize or if encodeToMinSize is true for a non-uint64 value we should write val as an int32 - useMinSize := ec.MinSize || (uic.EncodeToMinSize && val.Kind() != reflect.Uint64) - - if u64 <= math.MaxInt32 && useMinSize { - return vw.WriteInt32(int32(u64)) - } - if u64 > math.MaxInt64 { - return fmt.Errorf("%d overflows int64", u64) - } - return vw.WriteInt64(int64(u64)) - } - - return ValueEncoderError{ - Name: "UintEncodeValue", - Kinds: []reflect.Kind{reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint}, - Received: val, - } -} - -func (uic *UIntCodec) decodeType(dc DecodeContext, vr bsonrw.ValueReader, t reflect.Type) (reflect.Value, error) { - var i64 int64 - var err error - switch vrType := vr.Type(); vrType { - case bsontype.Int32: - i32, err := vr.ReadInt32() - if err != nil { - return emptyValue, err - } - i64 = int64(i32) - case bsontype.Int64: - i64, err = vr.ReadInt64() - if err != nil { - return emptyValue, err - } - case bsontype.Double: - f64, err := vr.ReadDouble() - if err != nil { - return emptyValue, err - } - if !dc.Truncate && math.Floor(f64) != f64 { - return emptyValue, errCannotTruncate - } - if f64 > float64(math.MaxInt64) { - return emptyValue, fmt.Errorf("%g overflows int64", f64) - } - i64 = int64(f64) - case bsontype.Boolean: - b, err := vr.ReadBoolean() - if err != nil { - return emptyValue, err - } - if b { - i64 = 1 - } - case bsontype.Null: - if err = vr.ReadNull(); err != nil { - return emptyValue, err - } - case bsontype.Undefined: - if err = vr.ReadUndefined(); err != nil { - return emptyValue, err - } - default: - return emptyValue, fmt.Errorf("cannot decode %v into an integer type", vrType) - } - - switch t.Kind() { - case reflect.Uint8: - if i64 < 0 || i64 > math.MaxUint8 { - return emptyValue, fmt.Errorf("%d overflows uint8", i64) - } - - return reflect.ValueOf(uint8(i64)), nil - case reflect.Uint16: - if i64 < 0 || i64 > math.MaxUint16 { - return emptyValue, fmt.Errorf("%d overflows uint16", i64) - } - - return reflect.ValueOf(uint16(i64)), nil - case reflect.Uint32: - if i64 < 0 || i64 > math.MaxUint32 { - return emptyValue, fmt.Errorf("%d overflows uint32", i64) - } - - return reflect.ValueOf(uint32(i64)), nil - case reflect.Uint64: - if i64 < 0 { - return emptyValue, fmt.Errorf("%d overflows uint64", i64) - } - - return reflect.ValueOf(uint64(i64)), nil - case reflect.Uint: - if i64 < 0 || int64(uint(i64)) != i64 { // Can we fit this inside of an uint - return emptyValue, fmt.Errorf("%d overflows uint", i64) - } - - return reflect.ValueOf(uint(i64)), nil - default: - return emptyValue, ValueDecoderError{ - Name: "UintDecodeValue", - Kinds: []reflect.Kind{reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint}, - Received: reflect.Zero(t), - } - } -} - -// DecodeValue is the ValueDecoder for uint types. -func (uic *UIntCodec) DecodeValue(dc DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error { - if !val.CanSet() { - return ValueDecoderError{ - Name: "UintDecodeValue", - Kinds: []reflect.Kind{reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint}, - Received: val, - } - } - - elem, err := uic.decodeType(dc, vr, val.Type()) - if err != nil { - return err - } - - val.SetUint(elem.Uint()) - return nil -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/byte_slice_codec_options.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/byte_slice_codec_options.go deleted file mode 100644 index b1256a4..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/byte_slice_codec_options.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsonoptions - -// ByteSliceCodecOptions represents all possible options for byte slice encoding and decoding. -type ByteSliceCodecOptions struct { - EncodeNilAsEmpty *bool // Specifies if a nil byte slice should encode as an empty binary instead of null. Defaults to false. -} - -// ByteSliceCodec creates a new *ByteSliceCodecOptions -func ByteSliceCodec() *ByteSliceCodecOptions { - return &ByteSliceCodecOptions{} -} - -// SetEncodeNilAsEmpty specifies if a nil byte slice should encode as an empty binary instead of null. Defaults to false. -func (bs *ByteSliceCodecOptions) SetEncodeNilAsEmpty(b bool) *ByteSliceCodecOptions { - bs.EncodeNilAsEmpty = &b - return bs -} - -// MergeByteSliceCodecOptions combines the given *ByteSliceCodecOptions into a single *ByteSliceCodecOptions in a last one wins fashion. -func MergeByteSliceCodecOptions(opts ...*ByteSliceCodecOptions) *ByteSliceCodecOptions { - bs := ByteSliceCodec() - for _, opt := range opts { - if opt == nil { - continue - } - if opt.EncodeNilAsEmpty != nil { - bs.EncodeNilAsEmpty = opt.EncodeNilAsEmpty - } - } - - return bs -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/doc.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/doc.go deleted file mode 100644 index c40973c..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2022-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -// Package bsonoptions defines the optional configurations for the BSON codecs. -package bsonoptions diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/empty_interface_codec_options.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/empty_interface_codec_options.go deleted file mode 100644 index 6caaa00..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/empty_interface_codec_options.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsonoptions - -// EmptyInterfaceCodecOptions represents all possible options for interface{} encoding and decoding. -type EmptyInterfaceCodecOptions struct { - DecodeBinaryAsSlice *bool // Specifies if Old and Generic type binarys should default to []slice instead of primitive.Binary. Defaults to false. -} - -// EmptyInterfaceCodec creates a new *EmptyInterfaceCodecOptions -func EmptyInterfaceCodec() *EmptyInterfaceCodecOptions { - return &EmptyInterfaceCodecOptions{} -} - -// SetDecodeBinaryAsSlice specifies if Old and Generic type binarys should default to []slice instead of primitive.Binary. Defaults to false. -func (e *EmptyInterfaceCodecOptions) SetDecodeBinaryAsSlice(b bool) *EmptyInterfaceCodecOptions { - e.DecodeBinaryAsSlice = &b - return e -} - -// MergeEmptyInterfaceCodecOptions combines the given *EmptyInterfaceCodecOptions into a single *EmptyInterfaceCodecOptions in a last one wins fashion. -func MergeEmptyInterfaceCodecOptions(opts ...*EmptyInterfaceCodecOptions) *EmptyInterfaceCodecOptions { - e := EmptyInterfaceCodec() - for _, opt := range opts { - if opt == nil { - continue - } - if opt.DecodeBinaryAsSlice != nil { - e.DecodeBinaryAsSlice = opt.DecodeBinaryAsSlice - } - } - - return e -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/map_codec_options.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/map_codec_options.go deleted file mode 100644 index 7a6a880..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/map_codec_options.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsonoptions - -// MapCodecOptions represents all possible options for map encoding and decoding. -type MapCodecOptions struct { - DecodeZerosMap *bool // Specifies if the map should be zeroed before decoding into it. Defaults to false. - EncodeNilAsEmpty *bool // Specifies if a nil map should encode as an empty document instead of null. Defaults to false. - // Specifies how keys should be handled. If false, the behavior matches encoding/json, where the encoding key type must - // either be a string, an integer type, or implement bsoncodec.KeyMarshaler and the decoding key type must either be a - // string, an integer type, or implement bsoncodec.KeyUnmarshaler. If true, keys are encoded with fmt.Sprint() and the - // encoding key type must be a string, an integer type, or a float. If true, the use of Stringer will override - // TextMarshaler/TextUnmarshaler. Defaults to false. - EncodeKeysWithStringer *bool -} - -// MapCodec creates a new *MapCodecOptions -func MapCodec() *MapCodecOptions { - return &MapCodecOptions{} -} - -// SetDecodeZerosMap specifies if the map should be zeroed before decoding into it. Defaults to false. -func (t *MapCodecOptions) SetDecodeZerosMap(b bool) *MapCodecOptions { - t.DecodeZerosMap = &b - return t -} - -// SetEncodeNilAsEmpty specifies if a nil map should encode as an empty document instead of null. Defaults to false. -func (t *MapCodecOptions) SetEncodeNilAsEmpty(b bool) *MapCodecOptions { - t.EncodeNilAsEmpty = &b - return t -} - -// SetEncodeKeysWithStringer specifies how keys should be handled. If false, the behavior matches encoding/json, where the -// encoding key type must either be a string, an integer type, or implement bsoncodec.KeyMarshaler and the decoding key -// type must either be a string, an integer type, or implement bsoncodec.KeyUnmarshaler. If true, keys are encoded with -// fmt.Sprint() and the encoding key type must be a string, an integer type, or a float. If true, the use of Stringer -// will override TextMarshaler/TextUnmarshaler. Defaults to false. -func (t *MapCodecOptions) SetEncodeKeysWithStringer(b bool) *MapCodecOptions { - t.EncodeKeysWithStringer = &b - return t -} - -// MergeMapCodecOptions combines the given *MapCodecOptions into a single *MapCodecOptions in a last one wins fashion. -func MergeMapCodecOptions(opts ...*MapCodecOptions) *MapCodecOptions { - s := MapCodec() - for _, opt := range opts { - if opt == nil { - continue - } - if opt.DecodeZerosMap != nil { - s.DecodeZerosMap = opt.DecodeZerosMap - } - if opt.EncodeNilAsEmpty != nil { - s.EncodeNilAsEmpty = opt.EncodeNilAsEmpty - } - if opt.EncodeKeysWithStringer != nil { - s.EncodeKeysWithStringer = opt.EncodeKeysWithStringer - } - } - - return s -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/slice_codec_options.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/slice_codec_options.go deleted file mode 100644 index ef965e4..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/slice_codec_options.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsonoptions - -// SliceCodecOptions represents all possible options for slice encoding and decoding. -type SliceCodecOptions struct { - EncodeNilAsEmpty *bool // Specifies if a nil slice should encode as an empty array instead of null. Defaults to false. -} - -// SliceCodec creates a new *SliceCodecOptions -func SliceCodec() *SliceCodecOptions { - return &SliceCodecOptions{} -} - -// SetEncodeNilAsEmpty specifies if a nil slice should encode as an empty array instead of null. Defaults to false. -func (s *SliceCodecOptions) SetEncodeNilAsEmpty(b bool) *SliceCodecOptions { - s.EncodeNilAsEmpty = &b - return s -} - -// MergeSliceCodecOptions combines the given *SliceCodecOptions into a single *SliceCodecOptions in a last one wins fashion. -func MergeSliceCodecOptions(opts ...*SliceCodecOptions) *SliceCodecOptions { - s := SliceCodec() - for _, opt := range opts { - if opt == nil { - continue - } - if opt.EncodeNilAsEmpty != nil { - s.EncodeNilAsEmpty = opt.EncodeNilAsEmpty - } - } - - return s -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/string_codec_options.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/string_codec_options.go deleted file mode 100644 index 65964f4..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/string_codec_options.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsonoptions - -var defaultDecodeOIDAsHex = true - -// StringCodecOptions represents all possible options for string encoding and decoding. -type StringCodecOptions struct { - DecodeObjectIDAsHex *bool // Specifies if we should decode ObjectID as the hex value. Defaults to true. -} - -// StringCodec creates a new *StringCodecOptions -func StringCodec() *StringCodecOptions { - return &StringCodecOptions{} -} - -// SetDecodeObjectIDAsHex specifies if object IDs should be decoded as their hex representation. If false, a string made -// from the raw object ID bytes will be used. Defaults to true. -func (t *StringCodecOptions) SetDecodeObjectIDAsHex(b bool) *StringCodecOptions { - t.DecodeObjectIDAsHex = &b - return t -} - -// MergeStringCodecOptions combines the given *StringCodecOptions into a single *StringCodecOptions in a last one wins fashion. -func MergeStringCodecOptions(opts ...*StringCodecOptions) *StringCodecOptions { - s := &StringCodecOptions{&defaultDecodeOIDAsHex} - for _, opt := range opts { - if opt == nil { - continue - } - if opt.DecodeObjectIDAsHex != nil { - s.DecodeObjectIDAsHex = opt.DecodeObjectIDAsHex - } - } - - return s -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/struct_codec_options.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/struct_codec_options.go deleted file mode 100644 index 78d1dd8..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/struct_codec_options.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsonoptions - -var defaultOverwriteDuplicatedInlinedFields = true - -// StructCodecOptions represents all possible options for struct encoding and decoding. -type StructCodecOptions struct { - DecodeZeroStruct *bool // Specifies if structs should be zeroed before decoding into them. Defaults to false. - DecodeDeepZeroInline *bool // Specifies if structs should be recursively zeroed when a inline value is decoded. Defaults to false. - EncodeOmitDefaultStruct *bool // Specifies if default structs should be considered empty by omitempty. Defaults to false. - AllowUnexportedFields *bool // Specifies if unexported fields should be marshaled/unmarshaled. Defaults to false. - OverwriteDuplicatedInlinedFields *bool // Specifies if fields in inlined structs can be overwritten by higher level struct fields with the same key. Defaults to true. -} - -// StructCodec creates a new *StructCodecOptions -func StructCodec() *StructCodecOptions { - return &StructCodecOptions{} -} - -// SetDecodeZeroStruct specifies if structs should be zeroed before decoding into them. Defaults to false. -func (t *StructCodecOptions) SetDecodeZeroStruct(b bool) *StructCodecOptions { - t.DecodeZeroStruct = &b - return t -} - -// SetDecodeDeepZeroInline specifies if structs should be zeroed before decoding into them. Defaults to false. -func (t *StructCodecOptions) SetDecodeDeepZeroInline(b bool) *StructCodecOptions { - t.DecodeDeepZeroInline = &b - return t -} - -// SetEncodeOmitDefaultStruct specifies if default structs should be considered empty by omitempty. A default struct has all -// its values set to their default value. Defaults to false. -func (t *StructCodecOptions) SetEncodeOmitDefaultStruct(b bool) *StructCodecOptions { - t.EncodeOmitDefaultStruct = &b - return t -} - -// SetOverwriteDuplicatedInlinedFields specifies if inlined struct fields can be overwritten by higher level struct fields with the -// same bson key. When true and decoding, values will be written to the outermost struct with a matching key, and when -// encoding, keys will have the value of the top-most matching field. When false, decoding and encoding will error if -// there are duplicate keys after the struct is inlined. Defaults to true. -func (t *StructCodecOptions) SetOverwriteDuplicatedInlinedFields(b bool) *StructCodecOptions { - t.OverwriteDuplicatedInlinedFields = &b - return t -} - -// SetAllowUnexportedFields specifies if unexported fields should be marshaled/unmarshaled. Defaults to false. -func (t *StructCodecOptions) SetAllowUnexportedFields(b bool) *StructCodecOptions { - t.AllowUnexportedFields = &b - return t -} - -// MergeStructCodecOptions combines the given *StructCodecOptions into a single *StructCodecOptions in a last one wins fashion. -func MergeStructCodecOptions(opts ...*StructCodecOptions) *StructCodecOptions { - s := &StructCodecOptions{ - OverwriteDuplicatedInlinedFields: &defaultOverwriteDuplicatedInlinedFields, - } - for _, opt := range opts { - if opt == nil { - continue - } - - if opt.DecodeZeroStruct != nil { - s.DecodeZeroStruct = opt.DecodeZeroStruct - } - if opt.DecodeDeepZeroInline != nil { - s.DecodeDeepZeroInline = opt.DecodeDeepZeroInline - } - if opt.EncodeOmitDefaultStruct != nil { - s.EncodeOmitDefaultStruct = opt.EncodeOmitDefaultStruct - } - if opt.OverwriteDuplicatedInlinedFields != nil { - s.OverwriteDuplicatedInlinedFields = opt.OverwriteDuplicatedInlinedFields - } - if opt.AllowUnexportedFields != nil { - s.AllowUnexportedFields = opt.AllowUnexportedFields - } - } - - return s -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/time_codec_options.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/time_codec_options.go deleted file mode 100644 index 13496d1..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/time_codec_options.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsonoptions - -// TimeCodecOptions represents all possible options for time.Time encoding and decoding. -type TimeCodecOptions struct { - UseLocalTimeZone *bool // Specifies if we should decode into the local time zone. Defaults to false. -} - -// TimeCodec creates a new *TimeCodecOptions -func TimeCodec() *TimeCodecOptions { - return &TimeCodecOptions{} -} - -// SetUseLocalTimeZone specifies if we should decode into the local time zone. Defaults to false. -func (t *TimeCodecOptions) SetUseLocalTimeZone(b bool) *TimeCodecOptions { - t.UseLocalTimeZone = &b - return t -} - -// MergeTimeCodecOptions combines the given *TimeCodecOptions into a single *TimeCodecOptions in a last one wins fashion. -func MergeTimeCodecOptions(opts ...*TimeCodecOptions) *TimeCodecOptions { - t := TimeCodec() - for _, opt := range opts { - if opt == nil { - continue - } - if opt.UseLocalTimeZone != nil { - t.UseLocalTimeZone = opt.UseLocalTimeZone - } - } - - return t -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/uint_codec_options.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/uint_codec_options.go deleted file mode 100644 index e08b7f1..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/uint_codec_options.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsonoptions - -// UIntCodecOptions represents all possible options for uint encoding and decoding. -type UIntCodecOptions struct { - EncodeToMinSize *bool // Specifies if all uints except uint64 should be decoded to minimum size bsontype. Defaults to false. -} - -// UIntCodec creates a new *UIntCodecOptions -func UIntCodec() *UIntCodecOptions { - return &UIntCodecOptions{} -} - -// SetEncodeToMinSize specifies if all uints except uint64 should be decoded to minimum size bsontype. Defaults to false. -func (u *UIntCodecOptions) SetEncodeToMinSize(b bool) *UIntCodecOptions { - u.EncodeToMinSize = &b - return u -} - -// MergeUIntCodecOptions combines the given *UIntCodecOptions into a single *UIntCodecOptions in a last one wins fashion. -func MergeUIntCodecOptions(opts ...*UIntCodecOptions) *UIntCodecOptions { - u := UIntCodec() - for _, opt := range opts { - if opt == nil { - continue - } - if opt.EncodeToMinSize != nil { - u.EncodeToMinSize = opt.EncodeToMinSize - } - } - - return u -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/copier.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/copier.go deleted file mode 100644 index 5cdf646..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/copier.go +++ /dev/null @@ -1,445 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsonrw - -import ( - "fmt" - "io" - - "go.mongodb.org/mongo-driver/bson/bsontype" - "go.mongodb.org/mongo-driver/bson/primitive" - "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" -) - -// Copier is a type that allows copying between ValueReaders, ValueWriters, and -// []byte values. -type Copier struct{} - -// NewCopier creates a new copier with the given registry. If a nil registry is provided -// a default registry is used. -func NewCopier() Copier { - return Copier{} -} - -// CopyDocument handles copying a document from src to dst. -func CopyDocument(dst ValueWriter, src ValueReader) error { - return Copier{}.CopyDocument(dst, src) -} - -// CopyDocument handles copying one document from the src to the dst. -func (c Copier) CopyDocument(dst ValueWriter, src ValueReader) error { - dr, err := src.ReadDocument() - if err != nil { - return err - } - - dw, err := dst.WriteDocument() - if err != nil { - return err - } - - return c.copyDocumentCore(dw, dr) -} - -// CopyArrayFromBytes copies the values from a BSON array represented as a -// []byte to a ValueWriter. -func (c Copier) CopyArrayFromBytes(dst ValueWriter, src []byte) error { - aw, err := dst.WriteArray() - if err != nil { - return err - } - - err = c.CopyBytesToArrayWriter(aw, src) - if err != nil { - return err - } - - return aw.WriteArrayEnd() -} - -// CopyDocumentFromBytes copies the values from a BSON document represented as a -// []byte to a ValueWriter. -func (c Copier) CopyDocumentFromBytes(dst ValueWriter, src []byte) error { - dw, err := dst.WriteDocument() - if err != nil { - return err - } - - err = c.CopyBytesToDocumentWriter(dw, src) - if err != nil { - return err - } - - return dw.WriteDocumentEnd() -} - -type writeElementFn func(key string) (ValueWriter, error) - -// CopyBytesToArrayWriter copies the values from a BSON Array represented as a []byte to an -// ArrayWriter. -func (c Copier) CopyBytesToArrayWriter(dst ArrayWriter, src []byte) error { - wef := func(_ string) (ValueWriter, error) { - return dst.WriteArrayElement() - } - - return c.copyBytesToValueWriter(src, wef) -} - -// CopyBytesToDocumentWriter copies the values from a BSON document represented as a []byte to a -// DocumentWriter. -func (c Copier) CopyBytesToDocumentWriter(dst DocumentWriter, src []byte) error { - wef := func(key string) (ValueWriter, error) { - return dst.WriteDocumentElement(key) - } - - return c.copyBytesToValueWriter(src, wef) -} - -func (c Copier) copyBytesToValueWriter(src []byte, wef writeElementFn) error { - // TODO(skriptble): Create errors types here. Anything thats a tag should be a property. - length, rem, ok := bsoncore.ReadLength(src) - if !ok { - return fmt.Errorf("couldn't read length from src, not enough bytes. length=%d", len(src)) - } - if len(src) < int(length) { - return fmt.Errorf("length read exceeds number of bytes available. length=%d bytes=%d", len(src), length) - } - rem = rem[:length-4] - - var t bsontype.Type - var key string - var val bsoncore.Value - for { - t, rem, ok = bsoncore.ReadType(rem) - if !ok { - return io.EOF - } - if t == bsontype.Type(0) { - if len(rem) != 0 { - return fmt.Errorf("document end byte found before end of document. remaining bytes=%v", rem) - } - break - } - - key, rem, ok = bsoncore.ReadKey(rem) - if !ok { - return fmt.Errorf("invalid key found. remaining bytes=%v", rem) - } - - // write as either array element or document element using writeElementFn - vw, err := wef(key) - if err != nil { - return err - } - - val, rem, ok = bsoncore.ReadValue(rem, t) - if !ok { - return fmt.Errorf("not enough bytes available to read type. bytes=%d type=%s", len(rem), t) - } - err = c.CopyValueFromBytes(vw, t, val.Data) - if err != nil { - return err - } - } - return nil -} - -// CopyDocumentToBytes copies an entire document from the ValueReader and -// returns it as bytes. -func (c Copier) CopyDocumentToBytes(src ValueReader) ([]byte, error) { - return c.AppendDocumentBytes(nil, src) -} - -// AppendDocumentBytes functions the same as CopyDocumentToBytes, but will -// append the result to dst. -func (c Copier) AppendDocumentBytes(dst []byte, src ValueReader) ([]byte, error) { - if br, ok := src.(BytesReader); ok { - _, dst, err := br.ReadValueBytes(dst) - return dst, err - } - - vw := vwPool.Get().(*valueWriter) - defer vwPool.Put(vw) - - vw.reset(dst) - - err := c.CopyDocument(vw, src) - dst = vw.buf - return dst, err -} - -// AppendArrayBytes copies an array from the ValueReader to dst. -func (c Copier) AppendArrayBytes(dst []byte, src ValueReader) ([]byte, error) { - if br, ok := src.(BytesReader); ok { - _, dst, err := br.ReadValueBytes(dst) - return dst, err - } - - vw := vwPool.Get().(*valueWriter) - defer vwPool.Put(vw) - - vw.reset(dst) - - err := c.copyArray(vw, src) - dst = vw.buf - return dst, err -} - -// CopyValueFromBytes will write the value represtend by t and src to dst. -func (c Copier) CopyValueFromBytes(dst ValueWriter, t bsontype.Type, src []byte) error { - if wvb, ok := dst.(BytesWriter); ok { - return wvb.WriteValueBytes(t, src) - } - - vr := vrPool.Get().(*valueReader) - defer vrPool.Put(vr) - - vr.reset(src) - vr.pushElement(t) - - return c.CopyValue(dst, vr) -} - -// CopyValueToBytes copies a value from src and returns it as a bsontype.Type and a -// []byte. -func (c Copier) CopyValueToBytes(src ValueReader) (bsontype.Type, []byte, error) { - return c.AppendValueBytes(nil, src) -} - -// AppendValueBytes functions the same as CopyValueToBytes, but will append the -// result to dst. -func (c Copier) AppendValueBytes(dst []byte, src ValueReader) (bsontype.Type, []byte, error) { - if br, ok := src.(BytesReader); ok { - return br.ReadValueBytes(dst) - } - - vw := vwPool.Get().(*valueWriter) - defer vwPool.Put(vw) - - start := len(dst) - - vw.reset(dst) - vw.push(mElement) - - err := c.CopyValue(vw, src) - if err != nil { - return 0, dst, err - } - - return bsontype.Type(vw.buf[start]), vw.buf[start+2:], nil -} - -// CopyValue will copy a single value from src to dst. -func (c Copier) CopyValue(dst ValueWriter, src ValueReader) error { - var err error - switch src.Type() { - case bsontype.Double: - var f64 float64 - f64, err = src.ReadDouble() - if err != nil { - break - } - err = dst.WriteDouble(f64) - case bsontype.String: - var str string - str, err = src.ReadString() - if err != nil { - return err - } - err = dst.WriteString(str) - case bsontype.EmbeddedDocument: - err = c.CopyDocument(dst, src) - case bsontype.Array: - err = c.copyArray(dst, src) - case bsontype.Binary: - var data []byte - var subtype byte - data, subtype, err = src.ReadBinary() - if err != nil { - break - } - err = dst.WriteBinaryWithSubtype(data, subtype) - case bsontype.Undefined: - err = src.ReadUndefined() - if err != nil { - break - } - err = dst.WriteUndefined() - case bsontype.ObjectID: - var oid primitive.ObjectID - oid, err = src.ReadObjectID() - if err != nil { - break - } - err = dst.WriteObjectID(oid) - case bsontype.Boolean: - var b bool - b, err = src.ReadBoolean() - if err != nil { - break - } - err = dst.WriteBoolean(b) - case bsontype.DateTime: - var dt int64 - dt, err = src.ReadDateTime() - if err != nil { - break - } - err = dst.WriteDateTime(dt) - case bsontype.Null: - err = src.ReadNull() - if err != nil { - break - } - err = dst.WriteNull() - case bsontype.Regex: - var pattern, options string - pattern, options, err = src.ReadRegex() - if err != nil { - break - } - err = dst.WriteRegex(pattern, options) - case bsontype.DBPointer: - var ns string - var pointer primitive.ObjectID - ns, pointer, err = src.ReadDBPointer() - if err != nil { - break - } - err = dst.WriteDBPointer(ns, pointer) - case bsontype.JavaScript: - var js string - js, err = src.ReadJavascript() - if err != nil { - break - } - err = dst.WriteJavascript(js) - case bsontype.Symbol: - var symbol string - symbol, err = src.ReadSymbol() - if err != nil { - break - } - err = dst.WriteSymbol(symbol) - case bsontype.CodeWithScope: - var code string - var srcScope DocumentReader - code, srcScope, err = src.ReadCodeWithScope() - if err != nil { - break - } - - var dstScope DocumentWriter - dstScope, err = dst.WriteCodeWithScope(code) - if err != nil { - break - } - err = c.copyDocumentCore(dstScope, srcScope) - case bsontype.Int32: - var i32 int32 - i32, err = src.ReadInt32() - if err != nil { - break - } - err = dst.WriteInt32(i32) - case bsontype.Timestamp: - var t, i uint32 - t, i, err = src.ReadTimestamp() - if err != nil { - break - } - err = dst.WriteTimestamp(t, i) - case bsontype.Int64: - var i64 int64 - i64, err = src.ReadInt64() - if err != nil { - break - } - err = dst.WriteInt64(i64) - case bsontype.Decimal128: - var d128 primitive.Decimal128 - d128, err = src.ReadDecimal128() - if err != nil { - break - } - err = dst.WriteDecimal128(d128) - case bsontype.MinKey: - err = src.ReadMinKey() - if err != nil { - break - } - err = dst.WriteMinKey() - case bsontype.MaxKey: - err = src.ReadMaxKey() - if err != nil { - break - } - err = dst.WriteMaxKey() - default: - err = fmt.Errorf("Cannot copy unknown BSON type %s", src.Type()) - } - - return err -} - -func (c Copier) copyArray(dst ValueWriter, src ValueReader) error { - ar, err := src.ReadArray() - if err != nil { - return err - } - - aw, err := dst.WriteArray() - if err != nil { - return err - } - - for { - vr, err := ar.ReadValue() - if err == ErrEOA { - break - } - if err != nil { - return err - } - - vw, err := aw.WriteArrayElement() - if err != nil { - return err - } - - err = c.CopyValue(vw, vr) - if err != nil { - return err - } - } - - return aw.WriteArrayEnd() -} - -func (c Copier) copyDocumentCore(dw DocumentWriter, dr DocumentReader) error { - for { - key, vr, err := dr.ReadElement() - if err == ErrEOD { - break - } - if err != nil { - return err - } - - vw, err := dw.WriteDocumentElement(key) - if err != nil { - return err - } - - err = c.CopyValue(vw, vr) - if err != nil { - return err - } - } - - return dw.WriteDocumentEnd() -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/doc.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/doc.go deleted file mode 100644 index 750b0d2..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -// Package bsonrw contains abstractions for reading and writing -// BSON and BSON like types from sources. -package bsonrw // import "go.mongodb.org/mongo-driver/bson/bsonrw" diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_parser.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_parser.go deleted file mode 100644 index 54c76bf..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_parser.go +++ /dev/null @@ -1,806 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsonrw - -import ( - "encoding/base64" - "encoding/hex" - "errors" - "fmt" - "io" - "strings" - - "go.mongodb.org/mongo-driver/bson/bsontype" -) - -const maxNestingDepth = 200 - -// ErrInvalidJSON indicates the JSON input is invalid -var ErrInvalidJSON = errors.New("invalid JSON input") - -type jsonParseState byte - -const ( - jpsStartState jsonParseState = iota - jpsSawBeginObject - jpsSawEndObject - jpsSawBeginArray - jpsSawEndArray - jpsSawColon - jpsSawComma - jpsSawKey - jpsSawValue - jpsDoneState - jpsInvalidState -) - -type jsonParseMode byte - -const ( - jpmInvalidMode jsonParseMode = iota - jpmObjectMode - jpmArrayMode -) - -type extJSONValue struct { - t bsontype.Type - v interface{} -} - -type extJSONObject struct { - keys []string - values []*extJSONValue -} - -type extJSONParser struct { - js *jsonScanner - s jsonParseState - m []jsonParseMode - k string - v *extJSONValue - - err error - canonical bool - depth int - maxDepth int - - emptyObject bool - relaxedUUID bool -} - -// newExtJSONParser returns a new extended JSON parser, ready to to begin -// parsing from the first character of the argued json input. It will not -// perform any read-ahead and will therefore not report any errors about -// malformed JSON at this point. -func newExtJSONParser(r io.Reader, canonical bool) *extJSONParser { - return &extJSONParser{ - js: &jsonScanner{r: r}, - s: jpsStartState, - m: []jsonParseMode{}, - canonical: canonical, - maxDepth: maxNestingDepth, - } -} - -// peekType examines the next value and returns its BSON Type -func (ejp *extJSONParser) peekType() (bsontype.Type, error) { - var t bsontype.Type - var err error - initialState := ejp.s - - ejp.advanceState() - switch ejp.s { - case jpsSawValue: - t = ejp.v.t - case jpsSawBeginArray: - t = bsontype.Array - case jpsInvalidState: - err = ejp.err - case jpsSawComma: - // in array mode, seeing a comma means we need to progress again to actually observe a type - if ejp.peekMode() == jpmArrayMode { - return ejp.peekType() - } - case jpsSawEndArray: - // this would only be a valid state if we were in array mode, so return end-of-array error - err = ErrEOA - case jpsSawBeginObject: - // peek key to determine type - ejp.advanceState() - switch ejp.s { - case jpsSawEndObject: // empty embedded document - t = bsontype.EmbeddedDocument - ejp.emptyObject = true - case jpsInvalidState: - err = ejp.err - case jpsSawKey: - if initialState == jpsStartState { - return bsontype.EmbeddedDocument, nil - } - t = wrapperKeyBSONType(ejp.k) - - // if $uuid is encountered, parse as binary subtype 4 - if ejp.k == "$uuid" { - ejp.relaxedUUID = true - t = bsontype.Binary - } - - switch t { - case bsontype.JavaScript: - // just saw $code, need to check for $scope at same level - _, err = ejp.readValue(bsontype.JavaScript) - if err != nil { - break - } - - switch ejp.s { - case jpsSawEndObject: // type is TypeJavaScript - case jpsSawComma: - ejp.advanceState() - - if ejp.s == jpsSawKey && ejp.k == "$scope" { - t = bsontype.CodeWithScope - } else { - err = fmt.Errorf("invalid extended JSON: unexpected key %s in CodeWithScope object", ejp.k) - } - case jpsInvalidState: - err = ejp.err - default: - err = ErrInvalidJSON - } - case bsontype.CodeWithScope: - err = errors.New("invalid extended JSON: code with $scope must contain $code before $scope") - } - } - } - - return t, err -} - -// readKey parses the next key and its type and returns them -func (ejp *extJSONParser) readKey() (string, bsontype.Type, error) { - if ejp.emptyObject { - ejp.emptyObject = false - return "", 0, ErrEOD - } - - // advance to key (or return with error) - switch ejp.s { - case jpsStartState: - ejp.advanceState() - if ejp.s == jpsSawBeginObject { - ejp.advanceState() - } - case jpsSawBeginObject: - ejp.advanceState() - case jpsSawValue, jpsSawEndObject, jpsSawEndArray: - ejp.advanceState() - switch ejp.s { - case jpsSawBeginObject, jpsSawComma: - ejp.advanceState() - case jpsSawEndObject: - return "", 0, ErrEOD - case jpsDoneState: - return "", 0, io.EOF - case jpsInvalidState: - return "", 0, ejp.err - default: - return "", 0, ErrInvalidJSON - } - case jpsSawKey: // do nothing (key was peeked before) - default: - return "", 0, invalidRequestError("key") - } - - // read key - var key string - - switch ejp.s { - case jpsSawKey: - key = ejp.k - case jpsSawEndObject: - return "", 0, ErrEOD - case jpsInvalidState: - return "", 0, ejp.err - default: - return "", 0, invalidRequestError("key") - } - - // check for colon - ejp.advanceState() - if err := ensureColon(ejp.s, key); err != nil { - return "", 0, err - } - - // peek at the value to determine type - t, err := ejp.peekType() - if err != nil { - return "", 0, err - } - - return key, t, nil -} - -// readValue returns the value corresponding to the Type returned by peekType -func (ejp *extJSONParser) readValue(t bsontype.Type) (*extJSONValue, error) { - if ejp.s == jpsInvalidState { - return nil, ejp.err - } - - var v *extJSONValue - - switch t { - case bsontype.Null, bsontype.Boolean, bsontype.String: - if ejp.s != jpsSawValue { - return nil, invalidRequestError(t.String()) - } - v = ejp.v - case bsontype.Int32, bsontype.Int64, bsontype.Double: - // relaxed version allows these to be literal number values - if ejp.s == jpsSawValue { - v = ejp.v - break - } - fallthrough - case bsontype.Decimal128, bsontype.Symbol, bsontype.ObjectID, bsontype.MinKey, bsontype.MaxKey, bsontype.Undefined: - switch ejp.s { - case jpsSawKey: - // read colon - ejp.advanceState() - if err := ensureColon(ejp.s, ejp.k); err != nil { - return nil, err - } - - // read value - ejp.advanceState() - if ejp.s != jpsSawValue || !ejp.ensureExtValueType(t) { - return nil, invalidJSONErrorForType("value", t) - } - - v = ejp.v - - // read end object - ejp.advanceState() - if ejp.s != jpsSawEndObject { - return nil, invalidJSONErrorForType("} after value", t) - } - default: - return nil, invalidRequestError(t.String()) - } - case bsontype.Binary, bsontype.Regex, bsontype.Timestamp, bsontype.DBPointer: - if ejp.s != jpsSawKey { - return nil, invalidRequestError(t.String()) - } - // read colon - ejp.advanceState() - if err := ensureColon(ejp.s, ejp.k); err != nil { - return nil, err - } - - ejp.advanceState() - if t == bsontype.Binary && ejp.s == jpsSawValue { - // convert relaxed $uuid format - if ejp.relaxedUUID { - defer func() { ejp.relaxedUUID = false }() - uuid, err := ejp.v.parseSymbol() - if err != nil { - return nil, err - } - - // RFC 4122 defines the length of a UUID as 36 and the hyphens in a UUID as appearing - // in the 8th, 13th, 18th, and 23rd characters. - // - // See https://tools.ietf.org/html/rfc4122#section-3 - valid := len(uuid) == 36 && - string(uuid[8]) == "-" && - string(uuid[13]) == "-" && - string(uuid[18]) == "-" && - string(uuid[23]) == "-" - if !valid { - return nil, fmt.Errorf("$uuid value does not follow RFC 4122 format regarding length and hyphens") - } - - // remove hyphens - uuidNoHyphens := strings.Replace(uuid, "-", "", -1) - if len(uuidNoHyphens) != 32 { - return nil, fmt.Errorf("$uuid value does not follow RFC 4122 format regarding length and hyphens") - } - - // convert hex to bytes - bytes, err := hex.DecodeString(uuidNoHyphens) - if err != nil { - return nil, fmt.Errorf("$uuid value does not follow RFC 4122 format regarding hex bytes: %v", err) - } - - ejp.advanceState() - if ejp.s != jpsSawEndObject { - return nil, invalidJSONErrorForType("$uuid and value and then }", bsontype.Binary) - } - - base64 := &extJSONValue{ - t: bsontype.String, - v: base64.StdEncoding.EncodeToString(bytes), - } - subType := &extJSONValue{ - t: bsontype.String, - v: "04", - } - - v = &extJSONValue{ - t: bsontype.EmbeddedDocument, - v: &extJSONObject{ - keys: []string{"base64", "subType"}, - values: []*extJSONValue{base64, subType}, - }, - } - - break - } - - // convert legacy $binary format - base64 := ejp.v - - ejp.advanceState() - if ejp.s != jpsSawComma { - return nil, invalidJSONErrorForType(",", bsontype.Binary) - } - - ejp.advanceState() - key, t, err := ejp.readKey() - if err != nil { - return nil, err - } - if key != "$type" { - return nil, invalidJSONErrorForType("$type", bsontype.Binary) - } - - subType, err := ejp.readValue(t) - if err != nil { - return nil, err - } - - ejp.advanceState() - if ejp.s != jpsSawEndObject { - return nil, invalidJSONErrorForType("2 key-value pairs and then }", bsontype.Binary) - } - - v = &extJSONValue{ - t: bsontype.EmbeddedDocument, - v: &extJSONObject{ - keys: []string{"base64", "subType"}, - values: []*extJSONValue{base64, subType}, - }, - } - break - } - - // read KV pairs - if ejp.s != jpsSawBeginObject { - return nil, invalidJSONErrorForType("{", t) - } - - keys, vals, err := ejp.readObject(2, true) - if err != nil { - return nil, err - } - - ejp.advanceState() - if ejp.s != jpsSawEndObject { - return nil, invalidJSONErrorForType("2 key-value pairs and then }", t) - } - - v = &extJSONValue{t: bsontype.EmbeddedDocument, v: &extJSONObject{keys: keys, values: vals}} - - case bsontype.DateTime: - switch ejp.s { - case jpsSawValue: - v = ejp.v - case jpsSawKey: - // read colon - ejp.advanceState() - if err := ensureColon(ejp.s, ejp.k); err != nil { - return nil, err - } - - ejp.advanceState() - switch ejp.s { - case jpsSawBeginObject: - keys, vals, err := ejp.readObject(1, true) - if err != nil { - return nil, err - } - v = &extJSONValue{t: bsontype.EmbeddedDocument, v: &extJSONObject{keys: keys, values: vals}} - case jpsSawValue: - if ejp.canonical { - return nil, invalidJSONError("{") - } - v = ejp.v - default: - if ejp.canonical { - return nil, invalidJSONErrorForType("object", t) - } - return nil, invalidJSONErrorForType("ISO-8601 Internet Date/Time Format as described in RFC-3339", t) - } - - ejp.advanceState() - if ejp.s != jpsSawEndObject { - return nil, invalidJSONErrorForType("value and then }", t) - } - default: - return nil, invalidRequestError(t.String()) - } - case bsontype.JavaScript: - switch ejp.s { - case jpsSawKey: - // read colon - ejp.advanceState() - if err := ensureColon(ejp.s, ejp.k); err != nil { - return nil, err - } - - // read value - ejp.advanceState() - if ejp.s != jpsSawValue { - return nil, invalidJSONErrorForType("value", t) - } - v = ejp.v - - // read end object or comma and just return - ejp.advanceState() - case jpsSawEndObject: - v = ejp.v - default: - return nil, invalidRequestError(t.String()) - } - case bsontype.CodeWithScope: - if ejp.s == jpsSawKey && ejp.k == "$scope" { - v = ejp.v // this is the $code string from earlier - - // read colon - ejp.advanceState() - if err := ensureColon(ejp.s, ejp.k); err != nil { - return nil, err - } - - // read { - ejp.advanceState() - if ejp.s != jpsSawBeginObject { - return nil, invalidJSONError("$scope to be embedded document") - } - } else { - return nil, invalidRequestError(t.String()) - } - case bsontype.EmbeddedDocument, bsontype.Array: - return nil, invalidRequestError(t.String()) - } - - return v, nil -} - -// readObject is a utility method for reading full objects of known (or expected) size -// it is useful for extended JSON types such as binary, datetime, regex, and timestamp -func (ejp *extJSONParser) readObject(numKeys int, started bool) ([]string, []*extJSONValue, error) { - keys := make([]string, numKeys) - vals := make([]*extJSONValue, numKeys) - - if !started { - ejp.advanceState() - if ejp.s != jpsSawBeginObject { - return nil, nil, invalidJSONError("{") - } - } - - for i := 0; i < numKeys; i++ { - key, t, err := ejp.readKey() - if err != nil { - return nil, nil, err - } - - switch ejp.s { - case jpsSawKey: - v, err := ejp.readValue(t) - if err != nil { - return nil, nil, err - } - - keys[i] = key - vals[i] = v - case jpsSawValue: - keys[i] = key - vals[i] = ejp.v - default: - return nil, nil, invalidJSONError("value") - } - } - - ejp.advanceState() - if ejp.s != jpsSawEndObject { - return nil, nil, invalidJSONError("}") - } - - return keys, vals, nil -} - -// advanceState reads the next JSON token from the scanner and transitions -// from the current state based on that token's type -func (ejp *extJSONParser) advanceState() { - if ejp.s == jpsDoneState || ejp.s == jpsInvalidState { - return - } - - jt, err := ejp.js.nextToken() - - if err != nil { - ejp.err = err - ejp.s = jpsInvalidState - return - } - - valid := ejp.validateToken(jt.t) - if !valid { - ejp.err = unexpectedTokenError(jt) - ejp.s = jpsInvalidState - return - } - - switch jt.t { - case jttBeginObject: - ejp.s = jpsSawBeginObject - ejp.pushMode(jpmObjectMode) - ejp.depth++ - - if ejp.depth > ejp.maxDepth { - ejp.err = nestingDepthError(jt.p, ejp.depth) - ejp.s = jpsInvalidState - } - case jttEndObject: - ejp.s = jpsSawEndObject - ejp.depth-- - - if ejp.popMode() != jpmObjectMode { - ejp.err = unexpectedTokenError(jt) - ejp.s = jpsInvalidState - } - case jttBeginArray: - ejp.s = jpsSawBeginArray - ejp.pushMode(jpmArrayMode) - case jttEndArray: - ejp.s = jpsSawEndArray - - if ejp.popMode() != jpmArrayMode { - ejp.err = unexpectedTokenError(jt) - ejp.s = jpsInvalidState - } - case jttColon: - ejp.s = jpsSawColon - case jttComma: - ejp.s = jpsSawComma - case jttEOF: - ejp.s = jpsDoneState - if len(ejp.m) != 0 { - ejp.err = unexpectedTokenError(jt) - ejp.s = jpsInvalidState - } - case jttString: - switch ejp.s { - case jpsSawComma: - if ejp.peekMode() == jpmArrayMode { - ejp.s = jpsSawValue - ejp.v = extendJSONToken(jt) - return - } - fallthrough - case jpsSawBeginObject: - ejp.s = jpsSawKey - ejp.k = jt.v.(string) - return - } - fallthrough - default: - ejp.s = jpsSawValue - ejp.v = extendJSONToken(jt) - } -} - -var jpsValidTransitionTokens = map[jsonParseState]map[jsonTokenType]bool{ - jpsStartState: { - jttBeginObject: true, - jttBeginArray: true, - jttInt32: true, - jttInt64: true, - jttDouble: true, - jttString: true, - jttBool: true, - jttNull: true, - jttEOF: true, - }, - jpsSawBeginObject: { - jttEndObject: true, - jttString: true, - }, - jpsSawEndObject: { - jttEndObject: true, - jttEndArray: true, - jttComma: true, - jttEOF: true, - }, - jpsSawBeginArray: { - jttBeginObject: true, - jttBeginArray: true, - jttEndArray: true, - jttInt32: true, - jttInt64: true, - jttDouble: true, - jttString: true, - jttBool: true, - jttNull: true, - }, - jpsSawEndArray: { - jttEndObject: true, - jttEndArray: true, - jttComma: true, - jttEOF: true, - }, - jpsSawColon: { - jttBeginObject: true, - jttBeginArray: true, - jttInt32: true, - jttInt64: true, - jttDouble: true, - jttString: true, - jttBool: true, - jttNull: true, - }, - jpsSawComma: { - jttBeginObject: true, - jttBeginArray: true, - jttInt32: true, - jttInt64: true, - jttDouble: true, - jttString: true, - jttBool: true, - jttNull: true, - }, - jpsSawKey: { - jttColon: true, - }, - jpsSawValue: { - jttEndObject: true, - jttEndArray: true, - jttComma: true, - jttEOF: true, - }, - jpsDoneState: {}, - jpsInvalidState: {}, -} - -func (ejp *extJSONParser) validateToken(jtt jsonTokenType) bool { - switch ejp.s { - case jpsSawEndObject: - // if we are at depth zero and the next token is a '{', - // we can consider it valid only if we are not in array mode. - if jtt == jttBeginObject && ejp.depth == 0 { - return ejp.peekMode() != jpmArrayMode - } - case jpsSawComma: - switch ejp.peekMode() { - // the only valid next token after a comma inside a document is a string (a key) - case jpmObjectMode: - return jtt == jttString - case jpmInvalidMode: - return false - } - } - - _, ok := jpsValidTransitionTokens[ejp.s][jtt] - return ok -} - -// ensureExtValueType returns true if the current value has the expected -// value type for single-key extended JSON types. For example, -// {"$numberInt": v} v must be TypeString -func (ejp *extJSONParser) ensureExtValueType(t bsontype.Type) bool { - switch t { - case bsontype.MinKey, bsontype.MaxKey: - return ejp.v.t == bsontype.Int32 - case bsontype.Undefined: - return ejp.v.t == bsontype.Boolean - case bsontype.Int32, bsontype.Int64, bsontype.Double, bsontype.Decimal128, bsontype.Symbol, bsontype.ObjectID: - return ejp.v.t == bsontype.String - default: - return false - } -} - -func (ejp *extJSONParser) pushMode(m jsonParseMode) { - ejp.m = append(ejp.m, m) -} - -func (ejp *extJSONParser) popMode() jsonParseMode { - l := len(ejp.m) - if l == 0 { - return jpmInvalidMode - } - - m := ejp.m[l-1] - ejp.m = ejp.m[:l-1] - - return m -} - -func (ejp *extJSONParser) peekMode() jsonParseMode { - l := len(ejp.m) - if l == 0 { - return jpmInvalidMode - } - - return ejp.m[l-1] -} - -func extendJSONToken(jt *jsonToken) *extJSONValue { - var t bsontype.Type - - switch jt.t { - case jttInt32: - t = bsontype.Int32 - case jttInt64: - t = bsontype.Int64 - case jttDouble: - t = bsontype.Double - case jttString: - t = bsontype.String - case jttBool: - t = bsontype.Boolean - case jttNull: - t = bsontype.Null - default: - return nil - } - - return &extJSONValue{t: t, v: jt.v} -} - -func ensureColon(s jsonParseState, key string) error { - if s != jpsSawColon { - return fmt.Errorf("invalid JSON input: missing colon after key \"%s\"", key) - } - - return nil -} - -func invalidRequestError(s string) error { - return fmt.Errorf("invalid request to read %s", s) -} - -func invalidJSONError(expected string) error { - return fmt.Errorf("invalid JSON input; expected %s", expected) -} - -func invalidJSONErrorForType(expected string, t bsontype.Type) error { - return fmt.Errorf("invalid JSON input; expected %s for %s", expected, t) -} - -func unexpectedTokenError(jt *jsonToken) error { - switch jt.t { - case jttInt32, jttInt64, jttDouble: - return fmt.Errorf("invalid JSON input; unexpected number (%v) at position %d", jt.v, jt.p) - case jttString: - return fmt.Errorf("invalid JSON input; unexpected string (\"%v\") at position %d", jt.v, jt.p) - case jttBool: - return fmt.Errorf("invalid JSON input; unexpected boolean literal (%v) at position %d", jt.v, jt.p) - case jttNull: - return fmt.Errorf("invalid JSON input; unexpected null literal at position %d", jt.p) - case jttEOF: - return fmt.Errorf("invalid JSON input; unexpected end of input at position %d", jt.p) - default: - return fmt.Errorf("invalid JSON input; unexpected %c at position %d", jt.v.(byte), jt.p) - } -} - -func nestingDepthError(p, depth int) error { - return fmt.Errorf("invalid JSON input; nesting too deep (%d levels) at position %d", depth, p) -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_reader.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_reader.go deleted file mode 100644 index 35832d7..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_reader.go +++ /dev/null @@ -1,644 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package bsonrw - -import ( - "fmt" - "io" - "sync" - - "go.mongodb.org/mongo-driver/bson/bsontype" - "go.mongodb.org/mongo-driver/bson/primitive" -) - -// ExtJSONValueReaderPool is a pool for ValueReaders that read ExtJSON. -type ExtJSONValueReaderPool struct { - pool sync.Pool -} - -// NewExtJSONValueReaderPool instantiates a new ExtJSONValueReaderPool. -func NewExtJSONValueReaderPool() *ExtJSONValueReaderPool { - return &ExtJSONValueReaderPool{ - pool: sync.Pool{ - New: func() interface{} { - return new(extJSONValueReader) - }, - }, - } -} - -// Get retrieves a ValueReader from the pool and uses src as the underlying ExtJSON. -func (bvrp *ExtJSONValueReaderPool) Get(r io.Reader, canonical bool) (ValueReader, error) { - vr := bvrp.pool.Get().(*extJSONValueReader) - return vr.reset(r, canonical) -} - -// Put inserts a ValueReader into the pool. If the ValueReader is not a ExtJSON ValueReader nothing -// is inserted into the pool and ok will be false. -func (bvrp *ExtJSONValueReaderPool) Put(vr ValueReader) (ok bool) { - bvr, ok := vr.(*extJSONValueReader) - if !ok { - return false - } - - bvr, _ = bvr.reset(nil, false) - bvrp.pool.Put(bvr) - return true -} - -type ejvrState struct { - mode mode - vType bsontype.Type - depth int -} - -// extJSONValueReader is for reading extended JSON. -type extJSONValueReader struct { - p *extJSONParser - - stack []ejvrState - frame int -} - -// NewExtJSONValueReader creates a new ValueReader from a given io.Reader -// It will interpret the JSON of r as canonical or relaxed according to the -// given canonical flag -func NewExtJSONValueReader(r io.Reader, canonical bool) (ValueReader, error) { - return newExtJSONValueReader(r, canonical) -} - -func newExtJSONValueReader(r io.Reader, canonical bool) (*extJSONValueReader, error) { - ejvr := new(extJSONValueReader) - return ejvr.reset(r, canonical) -} - -func (ejvr *extJSONValueReader) reset(r io.Reader, canonical bool) (*extJSONValueReader, error) { - p := newExtJSONParser(r, canonical) - typ, err := p.peekType() - - if err != nil { - return nil, ErrInvalidJSON - } - - var m mode - switch typ { - case bsontype.EmbeddedDocument: - m = mTopLevel - case bsontype.Array: - m = mArray - default: - m = mValue - } - - stack := make([]ejvrState, 1, 5) - stack[0] = ejvrState{ - mode: m, - vType: typ, - } - return &extJSONValueReader{ - p: p, - stack: stack, - }, nil -} - -func (ejvr *extJSONValueReader) advanceFrame() { - if ejvr.frame+1 >= len(ejvr.stack) { // We need to grow the stack - length := len(ejvr.stack) - if length+1 >= cap(ejvr.stack) { - // double it - buf := make([]ejvrState, 2*cap(ejvr.stack)+1) - copy(buf, ejvr.stack) - ejvr.stack = buf - } - ejvr.stack = ejvr.stack[:length+1] - } - ejvr.frame++ - - // Clean the stack - ejvr.stack[ejvr.frame].mode = 0 - ejvr.stack[ejvr.frame].vType = 0 - ejvr.stack[ejvr.frame].depth = 0 -} - -func (ejvr *extJSONValueReader) pushDocument() { - ejvr.advanceFrame() - - ejvr.stack[ejvr.frame].mode = mDocument - ejvr.stack[ejvr.frame].depth = ejvr.p.depth -} - -func (ejvr *extJSONValueReader) pushCodeWithScope() { - ejvr.advanceFrame() - - ejvr.stack[ejvr.frame].mode = mCodeWithScope -} - -func (ejvr *extJSONValueReader) pushArray() { - ejvr.advanceFrame() - - ejvr.stack[ejvr.frame].mode = mArray -} - -func (ejvr *extJSONValueReader) push(m mode, t bsontype.Type) { - ejvr.advanceFrame() - - ejvr.stack[ejvr.frame].mode = m - ejvr.stack[ejvr.frame].vType = t -} - -func (ejvr *extJSONValueReader) pop() { - switch ejvr.stack[ejvr.frame].mode { - case mElement, mValue: - ejvr.frame-- - case mDocument, mArray, mCodeWithScope: - ejvr.frame -= 2 // we pop twice to jump over the vrElement: vrDocument -> vrElement -> vrDocument/TopLevel/etc... - } -} - -func (ejvr *extJSONValueReader) skipObject() { - // read entire object until depth returns to 0 (last ending } or ] seen) - depth := 1 - for depth > 0 { - ejvr.p.advanceState() - - // If object is empty, raise depth and continue. When emptyObject is true, the - // parser has already read both the opening and closing brackets of an empty - // object ("{}"), so the next valid token will be part of the parent document, - // not part of the nested document. - // - // If there is a comma, there are remaining fields, emptyObject must be set back - // to false, and comma must be skipped with advanceState(). - if ejvr.p.emptyObject { - if ejvr.p.s == jpsSawComma { - ejvr.p.emptyObject = false - ejvr.p.advanceState() - } - depth-- - continue - } - - switch ejvr.p.s { - case jpsSawBeginObject, jpsSawBeginArray: - depth++ - case jpsSawEndObject, jpsSawEndArray: - depth-- - } - } -} - -func (ejvr *extJSONValueReader) invalidTransitionErr(destination mode, name string, modes []mode) error { - te := TransitionError{ - name: name, - current: ejvr.stack[ejvr.frame].mode, - destination: destination, - modes: modes, - action: "read", - } - if ejvr.frame != 0 { - te.parent = ejvr.stack[ejvr.frame-1].mode - } - return te -} - -func (ejvr *extJSONValueReader) typeError(t bsontype.Type) error { - return fmt.Errorf("positioned on %s, but attempted to read %s", ejvr.stack[ejvr.frame].vType, t) -} - -func (ejvr *extJSONValueReader) ensureElementValue(t bsontype.Type, destination mode, callerName string, addModes ...mode) error { - switch ejvr.stack[ejvr.frame].mode { - case mElement, mValue: - if ejvr.stack[ejvr.frame].vType != t { - return ejvr.typeError(t) - } - default: - modes := []mode{mElement, mValue} - if addModes != nil { - modes = append(modes, addModes...) - } - return ejvr.invalidTransitionErr(destination, callerName, modes) - } - - return nil -} - -func (ejvr *extJSONValueReader) Type() bsontype.Type { - return ejvr.stack[ejvr.frame].vType -} - -func (ejvr *extJSONValueReader) Skip() error { - switch ejvr.stack[ejvr.frame].mode { - case mElement, mValue: - default: - return ejvr.invalidTransitionErr(0, "Skip", []mode{mElement, mValue}) - } - - defer ejvr.pop() - - t := ejvr.stack[ejvr.frame].vType - switch t { - case bsontype.Array, bsontype.EmbeddedDocument, bsontype.CodeWithScope: - // read entire array, doc or CodeWithScope - ejvr.skipObject() - default: - _, err := ejvr.p.readValue(t) - if err != nil { - return err - } - } - - return nil -} - -func (ejvr *extJSONValueReader) ReadArray() (ArrayReader, error) { - switch ejvr.stack[ejvr.frame].mode { - case mTopLevel: // allow reading array from top level - case mArray: - return ejvr, nil - default: - if err := ejvr.ensureElementValue(bsontype.Array, mArray, "ReadArray", mTopLevel, mArray); err != nil { - return nil, err - } - } - - ejvr.pushArray() - - return ejvr, nil -} - -func (ejvr *extJSONValueReader) ReadBinary() (b []byte, btype byte, err error) { - if err := ejvr.ensureElementValue(bsontype.Binary, 0, "ReadBinary"); err != nil { - return nil, 0, err - } - - v, err := ejvr.p.readValue(bsontype.Binary) - if err != nil { - return nil, 0, err - } - - b, btype, err = v.parseBinary() - - ejvr.pop() - return b, btype, err -} - -func (ejvr *extJSONValueReader) ReadBoolean() (bool, error) { - if err := ejvr.ensureElementValue(bsontype.Boolean, 0, "ReadBoolean"); err != nil { - return false, err - } - - v, err := ejvr.p.readValue(bsontype.Boolean) - if err != nil { - return false, err - } - - if v.t != bsontype.Boolean { - return false, fmt.Errorf("expected type bool, but got type %s", v.t) - } - - ejvr.pop() - return v.v.(bool), nil -} - -func (ejvr *extJSONValueReader) ReadDocument() (DocumentReader, error) { - switch ejvr.stack[ejvr.frame].mode { - case mTopLevel: - return ejvr, nil - case mElement, mValue: - if ejvr.stack[ejvr.frame].vType != bsontype.EmbeddedDocument { - return nil, ejvr.typeError(bsontype.EmbeddedDocument) - } - - ejvr.pushDocument() - return ejvr, nil - default: - return nil, ejvr.invalidTransitionErr(mDocument, "ReadDocument", []mode{mTopLevel, mElement, mValue}) - } -} - -func (ejvr *extJSONValueReader) ReadCodeWithScope() (code string, dr DocumentReader, err error) { - if err = ejvr.ensureElementValue(bsontype.CodeWithScope, 0, "ReadCodeWithScope"); err != nil { - return "", nil, err - } - - v, err := ejvr.p.readValue(bsontype.CodeWithScope) - if err != nil { - return "", nil, err - } - - code, err = v.parseJavascript() - - ejvr.pushCodeWithScope() - return code, ejvr, err -} - -func (ejvr *extJSONValueReader) ReadDBPointer() (ns string, oid primitive.ObjectID, err error) { - if err = ejvr.ensureElementValue(bsontype.DBPointer, 0, "ReadDBPointer"); err != nil { - return "", primitive.NilObjectID, err - } - - v, err := ejvr.p.readValue(bsontype.DBPointer) - if err != nil { - return "", primitive.NilObjectID, err - } - - ns, oid, err = v.parseDBPointer() - - ejvr.pop() - return ns, oid, err -} - -func (ejvr *extJSONValueReader) ReadDateTime() (int64, error) { - if err := ejvr.ensureElementValue(bsontype.DateTime, 0, "ReadDateTime"); err != nil { - return 0, err - } - - v, err := ejvr.p.readValue(bsontype.DateTime) - if err != nil { - return 0, err - } - - d, err := v.parseDateTime() - - ejvr.pop() - return d, err -} - -func (ejvr *extJSONValueReader) ReadDecimal128() (primitive.Decimal128, error) { - if err := ejvr.ensureElementValue(bsontype.Decimal128, 0, "ReadDecimal128"); err != nil { - return primitive.Decimal128{}, err - } - - v, err := ejvr.p.readValue(bsontype.Decimal128) - if err != nil { - return primitive.Decimal128{}, err - } - - d, err := v.parseDecimal128() - - ejvr.pop() - return d, err -} - -func (ejvr *extJSONValueReader) ReadDouble() (float64, error) { - if err := ejvr.ensureElementValue(bsontype.Double, 0, "ReadDouble"); err != nil { - return 0, err - } - - v, err := ejvr.p.readValue(bsontype.Double) - if err != nil { - return 0, err - } - - d, err := v.parseDouble() - - ejvr.pop() - return d, err -} - -func (ejvr *extJSONValueReader) ReadInt32() (int32, error) { - if err := ejvr.ensureElementValue(bsontype.Int32, 0, "ReadInt32"); err != nil { - return 0, err - } - - v, err := ejvr.p.readValue(bsontype.Int32) - if err != nil { - return 0, err - } - - i, err := v.parseInt32() - - ejvr.pop() - return i, err -} - -func (ejvr *extJSONValueReader) ReadInt64() (int64, error) { - if err := ejvr.ensureElementValue(bsontype.Int64, 0, "ReadInt64"); err != nil { - return 0, err - } - - v, err := ejvr.p.readValue(bsontype.Int64) - if err != nil { - return 0, err - } - - i, err := v.parseInt64() - - ejvr.pop() - return i, err -} - -func (ejvr *extJSONValueReader) ReadJavascript() (code string, err error) { - if err = ejvr.ensureElementValue(bsontype.JavaScript, 0, "ReadJavascript"); err != nil { - return "", err - } - - v, err := ejvr.p.readValue(bsontype.JavaScript) - if err != nil { - return "", err - } - - code, err = v.parseJavascript() - - ejvr.pop() - return code, err -} - -func (ejvr *extJSONValueReader) ReadMaxKey() error { - if err := ejvr.ensureElementValue(bsontype.MaxKey, 0, "ReadMaxKey"); err != nil { - return err - } - - v, err := ejvr.p.readValue(bsontype.MaxKey) - if err != nil { - return err - } - - err = v.parseMinMaxKey("max") - - ejvr.pop() - return err -} - -func (ejvr *extJSONValueReader) ReadMinKey() error { - if err := ejvr.ensureElementValue(bsontype.MinKey, 0, "ReadMinKey"); err != nil { - return err - } - - v, err := ejvr.p.readValue(bsontype.MinKey) - if err != nil { - return err - } - - err = v.parseMinMaxKey("min") - - ejvr.pop() - return err -} - -func (ejvr *extJSONValueReader) ReadNull() error { - if err := ejvr.ensureElementValue(bsontype.Null, 0, "ReadNull"); err != nil { - return err - } - - v, err := ejvr.p.readValue(bsontype.Null) - if err != nil { - return err - } - - if v.t != bsontype.Null { - return fmt.Errorf("expected type null but got type %s", v.t) - } - - ejvr.pop() - return nil -} - -func (ejvr *extJSONValueReader) ReadObjectID() (primitive.ObjectID, error) { - if err := ejvr.ensureElementValue(bsontype.ObjectID, 0, "ReadObjectID"); err != nil { - return primitive.ObjectID{}, err - } - - v, err := ejvr.p.readValue(bsontype.ObjectID) - if err != nil { - return primitive.ObjectID{}, err - } - - oid, err := v.parseObjectID() - - ejvr.pop() - return oid, err -} - -func (ejvr *extJSONValueReader) ReadRegex() (pattern string, options string, err error) { - if err = ejvr.ensureElementValue(bsontype.Regex, 0, "ReadRegex"); err != nil { - return "", "", err - } - - v, err := ejvr.p.readValue(bsontype.Regex) - if err != nil { - return "", "", err - } - - pattern, options, err = v.parseRegex() - - ejvr.pop() - return pattern, options, err -} - -func (ejvr *extJSONValueReader) ReadString() (string, error) { - if err := ejvr.ensureElementValue(bsontype.String, 0, "ReadString"); err != nil { - return "", err - } - - v, err := ejvr.p.readValue(bsontype.String) - if err != nil { - return "", err - } - - if v.t != bsontype.String { - return "", fmt.Errorf("expected type string but got type %s", v.t) - } - - ejvr.pop() - return v.v.(string), nil -} - -func (ejvr *extJSONValueReader) ReadSymbol() (symbol string, err error) { - if err = ejvr.ensureElementValue(bsontype.Symbol, 0, "ReadSymbol"); err != nil { - return "", err - } - - v, err := ejvr.p.readValue(bsontype.Symbol) - if err != nil { - return "", err - } - - symbol, err = v.parseSymbol() - - ejvr.pop() - return symbol, err -} - -func (ejvr *extJSONValueReader) ReadTimestamp() (t uint32, i uint32, err error) { - if err = ejvr.ensureElementValue(bsontype.Timestamp, 0, "ReadTimestamp"); err != nil { - return 0, 0, err - } - - v, err := ejvr.p.readValue(bsontype.Timestamp) - if err != nil { - return 0, 0, err - } - - t, i, err = v.parseTimestamp() - - ejvr.pop() - return t, i, err -} - -func (ejvr *extJSONValueReader) ReadUndefined() error { - if err := ejvr.ensureElementValue(bsontype.Undefined, 0, "ReadUndefined"); err != nil { - return err - } - - v, err := ejvr.p.readValue(bsontype.Undefined) - if err != nil { - return err - } - - err = v.parseUndefined() - - ejvr.pop() - return err -} - -func (ejvr *extJSONValueReader) ReadElement() (string, ValueReader, error) { - switch ejvr.stack[ejvr.frame].mode { - case mTopLevel, mDocument, mCodeWithScope: - default: - return "", nil, ejvr.invalidTransitionErr(mElement, "ReadElement", []mode{mTopLevel, mDocument, mCodeWithScope}) - } - - name, t, err := ejvr.p.readKey() - - if err != nil { - if err == ErrEOD { - if ejvr.stack[ejvr.frame].mode == mCodeWithScope { - _, err := ejvr.p.peekType() - if err != nil { - return "", nil, err - } - } - - ejvr.pop() - } - - return "", nil, err - } - - ejvr.push(mElement, t) - return name, ejvr, nil -} - -func (ejvr *extJSONValueReader) ReadValue() (ValueReader, error) { - switch ejvr.stack[ejvr.frame].mode { - case mArray: - default: - return nil, ejvr.invalidTransitionErr(mValue, "ReadValue", []mode{mArray}) - } - - t, err := ejvr.p.peekType() - if err != nil { - if err == ErrEOA { - ejvr.pop() - } - - return nil, err - } - - ejvr.push(mValue, t) - return ejvr, nil -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_tables.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_tables.go deleted file mode 100644 index ba39c96..0000000 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_tables.go +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -// -// Based on github.com/golang/go by The Go Authors -// See THIRD-PARTY-NOTICES for original license terms. - -package bsonrw - -import "unicode/utf8" - -// safeSet holds the value true if the ASCII character with the given array -// position can be represented inside a JSON string without any further -// escaping. -// -// All values are true except for the ASCII control characters (0-31), the -// double quote ("), and the backslash character ("\"). -var safeSet = [utf8.RuneSelf]bool{ - ' ': true, - '!': true, - '"': false, - '#': true, - '$': true, - '%': true, - '&': true, - '\'': true, - '(': true, - ')': true, - '*': true, - '+': true, - ',': true, - '-': true, - '.': true, - '/': true, - '0': true, - '1': true, - '2': true, - '3': true, - '4': true, - '5': true, - '6': true, - '7': true, - '8': true, - '9': true, - ':': true, - ';': true, - '<': true, - '=': true, - '>': true, - '?': true, - '@': true, - 'A': true, - 'B': true, - 'C': true, - 'D': true, - 'E': true, - 'F': true, - 'G': true, - 'H': true, - 'I': true, - 'J': true, - 'K': true, - 'L': true, - 'M': true, - 'N': true, - 'O': true, - 'P': true, - 'Q': true, - 'R': true, - 'S': true, - 'T': true, - 'U': true, - 'V': true, - 'W': true, - 'X': true, - 'Y': true, - 'Z': true, - '[': true, - '\\': false, - ']': true, - '^': true, - '_': true, - '`': true, - 'a': true, - 'b': true, - 'c': true, - 'd': true, - 'e': true, - 'f': true, - 'g': true, - 'h': true, - 'i': true, - 'j': true, - 'k': true, - 'l': true, - 'm': true, - 'n': true, - 'o': true, - 'p': true, - 'q': true, - 'r': true, - 's': true, - 't': true, - 'u': true, - 'v': true, - 'w': true, - 'x': true, - 'y': true, - 'z': true, - '{': true, - '|': true, - '}': true, - '~': true, - '\u007f': true, -} - -// htmlSafeSet holds the value true if the ASCII character with the given -// array position can be safely represented inside a JSON string, embedded -// inside of HTML