kopia lustrzana https://github.com/cyoung/stratux
Add copyright and examples.
rodzic
522d74c22e
commit
cfd23d54eb
29
main/fisb.go
29
main/fisb.go
|
@ -1,3 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -7,6 +17,25 @@ import (
|
|||
"uatparse"
|
||||
)
|
||||
|
||||
/*
|
||||
Examples:
|
||||
|
||||
METAR KIND 261654Z 10005KT 10SM SCT250 11/02 A3015 RMK AO2 SLP212
|
||||
T01060017=
|
||||
SPECI KTDZ 261738Z AUTO 04006KT 8SM SCT020 07/00 A3025 RMK AO2
|
||||
T00670000=
|
||||
TAF KCMI 261131Z 2612/2712 12007KT P6SM SCT250
|
||||
FM261600 13013KT P6SM SCT100
|
||||
FM270000 15006KT P6SM BKN200=
|
||||
TAF.AMD KMKG 261725Z 2617/2718 VRB05KT P6SM SCT250
|
||||
FM270100 11006KT P6SM BKN150
|
||||
FM271200 13008KT P6SM VCSH BKN150=
|
||||
WINDS COU 271200Z FT 3000 6000 9000 12000 18000 24000 30000 34000 39000
|
||||
2109 2019+05 2134+01 2347-04 2353-21 2454-33 257949 259857 257955
|
||||
PIREP HNN 261618Z CRW UA /OV HNN/TM 1618/FL360/TP B737/TB OCNL LGT CHOP 360/RM OVER HNN AWC-WEB:SWA
|
||||
|
||||
*/
|
||||
|
||||
const (
|
||||
FISB_METAR = iota
|
||||
FISB_SPECI
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,27 +1,35 @@
|
|||
package main
|
||||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
// "time"
|
||||
"../uatparse"
|
||||
"os"
|
||||
"bufio"
|
||||
"strings"
|
||||
"unicode"
|
||||
"strconv"
|
||||
"github.com/gonum/plot"
|
||||
"github.com/gonum/plot/plotter"
|
||||
"github.com/gonum/plot/plotutil"
|
||||
"github.com/gonum/plot/vg"
|
||||
"os"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
const (
|
||||
UPLINK_FRAME_DATA_BYTES = 432
|
||||
)
|
||||
|
||||
|
||||
/*
|
||||
|
||||
From AC 00-45G [http://www.faa.gov/documentLibrary/media/Advisory_Circular/AC_00-45G_CHG_1-2.pdf]
|
||||
|
@ -73,7 +81,6 @@ func append_metars(rawUplinkMessage string, curMetars []string) []string {
|
|||
return ret
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Average number of METARs received for an airport for which you first received a METAR in the first 5 minutes, over 10 minutes. Divided by two.
|
||||
*/
|
||||
|
|
|
@ -1,16 +1,25 @@
|
|||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"../uatparse"
|
||||
"strconv"
|
||||
"os"
|
||||
"bufio"
|
||||
"fmt"
|
||||
"github.com/kellydunn/golang-geo"
|
||||
"math"
|
||||
"os"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
|
||||
// Most adapted from extract_nexrad.c
|
||||
|
||||
const (
|
||||
|
@ -34,7 +43,6 @@ type NEXRADFrame struct {
|
|||
intensity []uint8 // Really only 4-bit values.
|
||||
}
|
||||
|
||||
|
||||
func block_location(block_num int, ns_flag bool, scale_factor int) (float64, float64, float64, float64) {
|
||||
var realScale float64
|
||||
if scale_factor == 1 {
|
||||
|
@ -97,7 +105,7 @@ func decode_nexrad(f *uatparse.UATFrame) []NEXRADFrame {
|
|||
|
||||
intensityData := f.FISB_data[3:]
|
||||
for _, v := range intensityData {
|
||||
intensity := uint8(v) & 0x7;
|
||||
intensity := uint8(v) & 0x7
|
||||
runlength := (uint8(v) >> 3) + 1
|
||||
for runlength > 0 {
|
||||
tmp.intensity = append(tmp.intensity, intensity)
|
||||
|
@ -322,7 +330,6 @@ func main() {
|
|||
points := []*geo.Point{leftTop, rightTop, rightBottom, leftBottom, leftTop}
|
||||
poly := geo.NewPolygon(points)
|
||||
|
||||
|
||||
var maxpt *geo.Point
|
||||
var maxIntensity uint8
|
||||
|
||||
|
@ -337,7 +344,6 @@ func main() {
|
|||
|
||||
// fmt.Printf("maxes: %d %v\n", maxIntensity, maxpt)
|
||||
|
||||
|
||||
if maxIntensity > 0 && maxpt != nil {
|
||||
desc := intensityToText(maxIntensity)
|
||||
direction := fixHeading(myPos.BearingTo(maxpt))
|
||||
|
|
|
@ -1,19 +1,28 @@
|
|||
package main
|
||||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
// "time"
|
||||
"os"
|
||||
"bufio"
|
||||
"strings"
|
||||
"unicode"
|
||||
"strconv"
|
||||
"github.com/gonum/plot"
|
||||
"github.com/gonum/plot/plotter"
|
||||
"github.com/gonum/plot/plotutil"
|
||||
"github.com/gonum/plot/vg"
|
||||
"os"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2015-2016 Christopher Young
|
||||
Distributable under the terms of The "BSD New"" License
|
||||
that can be found in the LICENSE file, herein included
|
||||
as part of this header.
|
||||
|
||||
gen_gdl90.go: Input demodulated UAT and 1090ES information, output GDL90. Heartbeat,
|
||||
ownship, status messages, stats collection.
|
||||
*/
|
||||
|
||||
package uatparse
|
||||
|
||||
import (
|
||||
|
|
Ładowanie…
Reference in New Issue