Bug fix in vertical sign

Incorrect shift amount when detecting vertical rate sign.  Thanks
John-vk1et.
This commit is contained in:
Malcolm Robb 2013-04-19 09:32:34 +01:00
parent 3d25f4bf1a
commit e98728108c

View file

@ -56,7 +56,7 @@
// MinorVer changes when additional features are added, but not for bug fixes (range 00-99) // MinorVer changes when additional features are added, but not for bug fixes (range 00-99)
// DayDate & Year changes for all changes, including for bug fixes. It represent the release date of the update // DayDate & Year changes for all changes, including for bug fixes. It represent the release date of the update
// //
#define MODES_DUMP1090_VERSION "1.01.1704.13" #define MODES_DUMP1090_VERSION "1.01.1904.13"
#define MODES_DEFAULT_RATE 2000000 #define MODES_DEFAULT_RATE 2000000
#define MODES_DEFAULT_FREQ 1090000000 #define MODES_DEFAULT_FREQ 1090000000
@ -1208,7 +1208,7 @@ void decodeModesMessage(struct modesMessage *mm, unsigned char *msg) {
mm->ns_dir = (msg[7]&0x80) >> 7; mm->ns_dir = (msg[7]&0x80) >> 7;
mm->ns_velocity = ((msg[7]&0x7f) << 3) | ((msg[8]&0xe0) >> 5); mm->ns_velocity = ((msg[7]&0x7f) << 3) | ((msg[8]&0xe0) >> 5);
mm->vert_rate_source = (msg[8]&0x10) >> 4; mm->vert_rate_source = (msg[8]&0x10) >> 4;
mm->vert_rate_sign = (msg[8]&0x8) >> 5; mm->vert_rate_sign = (msg[8]&0x8) >> 3;
mm->vert_rate = ((msg[8]&7) << 6) | ((msg[9]&0xfc) >> 2); mm->vert_rate = ((msg[8]&7) << 6) | ((msg[9]&0xfc) >> 2);
/* Compute velocity and angle from the two speed /* Compute velocity and angle from the two speed
* components. */ * components. */