Strange data from RS232 port ....

Michel_MTR

New Member
Joined
Jan 3, 2006
Messages
10
Location
Cholet FRANCE
Hi,

First of all, thanks to the DYNON team who gave us so marvelous EFIS.

I fly with my MRC01 an a D10-A (with the new firmware) and they seem to be created one for the other !!!!

But, yes the home-builders are like that (!), I try to use data (specially altitude) pushed from the serial interface and have some problems.

I studied the user's manual and hooked (and programed !) a CUBLOC CB-280
( http://cubloc.com/product/01_01.php?PHPSESSID=c2bf9c73fbc1233380698d7d84aad16b )

I proceed as follow :

I read 210 byte each second
I search the first <CR><LF> position
I take datas I need at the positions they are in the string.

I display results on a 2x16 char LCD.

In order to control the correct picking of data, I read char 1 to 8 and can verify I have datas each second.
I display altitude after conversion from meters to feet

During ground test I obtain correct altitude and time to time an abnormal value. Looking nearer I see that the altitude sign (char 25) became "-" time to time. I programed a "cataplasm" (!!!) it became "OK" and altitude display strictly conform with the EFIS

With the cataplasm, during in-flight test the altitude was not stable, passing from correct value to one 100-150 ft under.

In order to verify if my program runs well, I add the display of the airspeed (converted to km/h) and without any cataplasm the display was always the same of the EFIS 'one and altitude still unstable (vith cataplasm !).

I think that I can't go forward alone ....

Thanks for your help

Michel RIAZUELO
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,226
Michel,

With our latest firmware update, the output sometimes changes to pressure altitude (as if the baro was at 29.92). This is what you are seeing. There is a bit in the stream which changes to tell you that the output in that sentence is pressure alt not corrected alt. If you check for this bit and ignore that alt, you'll be fine. This isn't fully documented yet, but it should be easy to figure out.
 

Michel_MTR

New Member
Joined
Jan 3, 2006
Messages
10
Location
Cholet FRANCE
Thanks for the quick answer.
You know that it is not recommended to think that the responsible of a program problem is not yourself !!

Very happy to know this new feature "isn't fully documented yet" (!) et more that "it should be easy to figure out".

So, where is this magic bit, in order to code a more sofisticated "cataplasm".

Cheers,

Michel RIAZUELO
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,226
Michel,

Turns out I was wrong, but in a good way. It IS documented in the latest user's manual. Go download it and you'll see how to read when it is pressure altitude or corrected altitude.
 

Michel_MTR

New Member
Joined
Jan 3, 2006
Messages
10
Location
Cholet FRANCE
Thanks,
Too much infomations, kill information !

If I well understood, I can only test the LS Bit of the char n° 47 witch is displayed as 6 (ASCI 54 LSBit = 0) for altitude or 7 (ASCI 55 LSBit = 1) for pressure-alt.

Is it correct ?

Cheers,
Michel
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,226
Not quite:

Chars 46 & 47 (the last two of the status field) represent the hexadecimal value of one byte, the low bit of which corresponds to the altitude type. You need to test the LSbit individually (after converting from hex to binary) since the hex value may change to values other than 6 or 7 if other bits in the status field change.
 
Top