diff --git a/dump978/Makefile b/dump978/Makefile index 2d4aebb3..6645fdc3 100644 --- a/dump978/Makefile +++ b/dump978/Makefile @@ -1,4 +1,4 @@ -CFLAGS+=-O2 -g -Wall -Werror -Ifec +CFLAGS+=-O2 -Wall -Werror -Ifec LDFLAGS= LIBS=-lm CC=gcc diff --git a/image/spindle/wheezy-stage4 b/image/spindle/wheezy-stage4 index 5a547a5e..d372e81a 100755 --- a/image/spindle/wheezy-stage4 +++ b/image/spindle/wheezy-stage4 @@ -135,7 +135,6 @@ cd stratux make www make xdump978 make xdump1090 -cp -f dump978/dump978 /usr/bin/ cp -f dump1090/dump1090 /usr/bin/ mv /tmp/gen_gdl90 /usr/bin/gen_gdl90 diff --git a/main/gen_gdl90.go b/main/gen_gdl90.go index 50ff54de..a3b17bd6 100644 --- a/main/gen_gdl90.go +++ b/main/gen_gdl90.go @@ -349,7 +349,7 @@ func makeOwnshipGeometricAltitudeReport() bool { /* "SX" Stratux GDL90 message. - http://hiltonsoftware.com/stratux/StratuxStatusMessage-V01.pdf + http://hiltonsoftware.com/stratux/ for latest version (currently using V104) */ @@ -492,7 +492,7 @@ func makeSXHeartbeat() []byte { v := uint16(float32(10.0) * globalStatus.CPUTemp) msg[26] = byte((v & 0xFF00) >> 8) - msg[27] = byte(v * 0xFF) + msg[27] = byte(v & 0xFF) // Number of ADS-B towers. num_towers := uint8(len(ADSBTowers)) diff --git a/main/traffic.go b/main/traffic.go index 05765cb8..0fac4465 100644 --- a/main/traffic.go +++ b/main/traffic.go @@ -442,7 +442,7 @@ func esListen() { //FIXME: Some stale information will be renewed. valid_change := true - if x[1] == "3" { + if x[1] == "3" { // ES airborne position message. DF17 BDS 0,5. //MSG,3,111,11111,AC2BB7,111111,2015/07/28,03:59:12.363,2015/07/28,03:59:12.353,,5550,,,42.35847,-83.42212,,,,,,0 //MSG,3,111,11111,A5D007,111111, , , , ,,35000,,,42.47454,-82.57433,,,0,0,0,0 alt := x[11] @@ -478,7 +478,7 @@ func esListen() { ti.Position_valid = true } } - if x[1] == "4" { + if x[1] == "4" { // ES airborne velocity message. DF17 BDS 0,9. // MSG,4,111,11111,A3B557,111111,2015/07/28,06:13:36.417,2015/07/28,06:13:36.398,,,414,278,,,-64,,,,,0 speed := x[12] track := x[13] @@ -513,7 +513,7 @@ func esListen() { ti.Speed_valid = true } } - if x[1] == "1" { + if x[1] == "1" { // ES identification and category. DF17 BDS 0,8. // MSG,1,,,%02X%02X%02X,,,,,,%s,,,,,,,,0,0,0,0 tail := x[10] @@ -525,6 +525,16 @@ func esListen() { ti.Tail = tail } } + if x[1] == "5" { // Surveillance alt message. DF4, DF20. + // MSG,5,,,%02X%02X%02X,,,,,,,%d,,,,,,,%d,%d,%d,%d + // MSG,5,111,11111,AB5F1B,111111,2016/01/03,04:43:52.028,2016/01/03,04:43:52.006,,13050,,,,,,,0,,0,0 + alt := x[11] + + altFloat, err := strconv.ParseFloat(alt, 32) + if len(alt) != 0 && err == nil { + ti.Alt = int32(altFloat) + } + } // Update "last seen" (any type of message, as long as the ICAO addr can be parsed). ti.Last_source = TRAFFIC_SOURCE_1090ES