Merge branch 'master' into jdp_dev

pull/101/head
Joseph Poirier 2015-11-05 22:17:22 -06:00
commit afe13d1587
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -56,6 +56,7 @@ const (
type TrafficInfo struct {
Icao_addr uint32
OnGround bool
addr_type uint8
emitter_category uint8
@ -146,7 +147,10 @@ func makeTrafficReport(ti TrafficInfo) {
msg[11] = byte((alt & 0xFF0) >> 4) // Altitude.
msg[12] = byte((alt & 0x00F) << 4)
msg[12] = byte(((alt & 0x00F) << 4) | 0xB) //FIXME. "Airborne".
msg[12] = byte(((alt & 0x00F) << 4) | 0x3) // True heading.
if !ti.OnGround {
msg[12] = msg[12] | 0x08 // Airborne.
}
msg[13] = 0x11 //FIXME.
@ -302,6 +306,7 @@ func parseDownlinkReport(s string) {
}
}
} else if airground_state == 2 { // Ground vehicle.
ti.OnGround = true
raw_gs := ((uint16(frame[12]) & 0x1f) << 6) | ((uint16(frame[13]) & 0xfc) >> 2)
if raw_gs != 0 {
speed_valid = true