RRC
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package producer
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
@@ -9,6 +12,7 @@ import (
|
||||
"github.com/duke-git/lancet/v2/mathutil"
|
||||
"github.com/paulmach/orb"
|
||||
"github.com/paulmach/orb/geo"
|
||||
"github.com/paulmach/orb/geojson"
|
||||
"github.com/paulmach/orb/planar"
|
||||
"starwiz.cn/sjy01/image-proc/pkg/auxilary"
|
||||
"starwiz.cn/sjy01/image-proc/pkg/calculator"
|
||||
@@ -20,6 +24,20 @@ func (r *Registrator) LoadAuxData() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// 数据校验和测试
|
||||
func (r *Registrator) AuxPrint() {
|
||||
var fcPos84 geojson.FeatureCollection
|
||||
for _, p := range r.AuxPlatforms {
|
||||
lat, lon, _ := calculator.WGS84XYZtoLatLngH(p.W84PosX, p.W84PosY, p.W84PosZ)
|
||||
point := orb.Point{lon, lat}
|
||||
fcPos84.Features = append(fcPos84.Features, geojson.NewFeature(point))
|
||||
}
|
||||
data, _ := json.Marshal(fcPos84)
|
||||
f, _ := os.Create(fmt.Sprintf("log/%s_aux_pos_84.geojson", r.Params.DataId))
|
||||
defer f.Close()
|
||||
f.Write(data)
|
||||
}
|
||||
|
||||
func (r *Registrator) SceneImageTime(scene *Scene) (start, center, end time.Time) {
|
||||
startPosInAux, endPosInAux := r.SceneInAuxIndex(scene)
|
||||
centerPosInAux := (startPosInAux + endPosInAux) / 2
|
||||
|
||||
Reference in New Issue
Block a user