DSM Telemetry support

More
18 Apr 2013 18:05 #9035 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
Not me, some guy has the really high flying field, 1300m above sea level. :)

Please Log in or Create an account to join the conversation.

More
18 Apr 2013 20:20 - 23 Apr 2013 14:45 #9038 by RandMental
Replied by RandMental on topic DSM Telemetry support
Definitely a necessary change, ground level at my house is 1475m asl :)
Last edit: 23 Apr 2013 14:45 by RandMental.

Please Log in or Create an account to join the conversation.

More
23 Apr 2013 13:10 #9155 by kenkenlau
Replied by kenkenlau on topic DSM Telemetry support
here is my previous finding of the GPS packet of TM1000

Byte
16h 00h, Alt(X.Xm), Alt(x10m), LAT_LSB, LAT, LAT, LAT_MSB, LON_LSB, LON, LON, LON_MSB, HDG_L, HDG_H, unknown, LON+WE+NS
17h 00h, Speed_L, Speed_H, unknown, SS,MM,HH, Sats, Alt(x100m), unknown, unknown, unknown, unknown, unknown, unknown

the last byte of 16h is as follow:
8-bit XXXX XLWN
L=longitude first bit
W= West / East
N= North / South

when SATS no. is less than 3, the alt will be blocked by DX8

Please Log in or Create an account to join the conversation.

More
23 Apr 2013 13:57 #9157 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support

kenkenlau wrote: the last byte of 16h is as follow:
8-bit XXXX XLWN
L=longitude first bit
W= West / East
N= North / South


What does it mean "L=longitude first bit"? Can you provide any example?

Data type = 0x16 GPS Sensor

0[00] 22(0x16)
1[01] 00
2[02] Altitude LSB (Decimal) //In 0.1m
3[03] Altitude MSB (Decimal)
4[04] 1/100th of a degree second latitude (Decimal) (XX YY.SSSS)
5[05] degree seconds latitude (Decimal)
6[06] degree minutes latitude (Decimal)
7[07] degrees latitude (Decimal)
8[08] 1/100th of a degree second longitude (Decimal) (XX YY.SSSS)
9[09] degree seconds longitude (Decimal)
10[0A] degree minutes longitude (Decimal)
11[0B] degrees longitude (Decimal)
12[0C] Heading LSB (Decimal)
13[0D] Heading MSB (Decimal) Divide by 10 for Degrees
14[0E] Unknown
15[0F] First bit for latitude: 1=N(+), 0=S(-);
Second bit for longitude: 1=E(+), 0=W(-);
Third bit for longitude over 99 degrees: 1=+-100 degrees


Data type = 0x17 GPS Sensor

0[00] 23(0x17)
1[01] 00
2[02] Speed LSB (Decimal)
3[03] Speed MSB (Decimal) Divide by 10 for Knots. Multiply by 0.185 for Kph and 0.115 for Mph
4[04] UTC Time LSB (Decimal) 1/100th sec. (HH:MM:SS.SS)
5[05] UTC Time (Decimal) = SS
6[06] UTC Time (Decimal) = MM
7[07] UTC Time MSB (Decimal) = HH
8[08] Number of Sats (Decimal)
9[09] Altitude in 1000m (Decimal) Altitude = Value * 10000 + Altitude(0x16) (in 0.1m)
10[0A]-15[0F] Unused (But contains Data left in buffer)

Please Log in or Create an account to join the conversation.

More
23 Apr 2013 15:38 - 23 Apr 2013 15:39 #9159 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
Interesting thing, UMX planes and QR (DSMX) transmit basic telemetry (Flight Log). By sorry, Rx voltage is not transmitted.
Last edit: 23 Apr 2013 15:39 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
23 Apr 2013 23:42 #9167 by kenkenlau
Replied by kenkenlau on topic DSM Telemetry support

vlad_vy wrote:
What does it mean "L=longitude first bit"? Can you provide any example?

15[0F] First bit for latitude: 1=N(+), 0=S(-);
Second bit for longitude: 1=E(+), 0=W(-);
Third bit for longitude over 99 degrees: 1=+-100 degrees


I think you have a better description. The 4 bytes cover 99.999999E to 99.999999W of Longitude only. That bit will set the Long 1XX.XXXXXX

Please Log in or Create an account to join the conversation.

More
24 Apr 2013 04:49 - 03 Dec 2013 05:12 #9170 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
I will try to document DSM telemetry data structure:

//===============================================================

Data type = 0x03 High Current Sensor

0 [00] 03
1 [01] 00
2 [02] MSB (Hex) //16bit signed integer
3 [03] LSB (Hex) //In 0.196791A
4 [04] 00
5 [05] 00
6 [06] 00
7 [07] 00
8 [08] 00
9 [09] 00
10 [0A] 00
11 [0B] 00
12 [0C] 00
13 [0D] 00
14 [0E] 00
15 [0F] 00

//===============================================================

Data type = 0x0A PowerBox Sensor

0 [00] 0x0A
1 [01] 00
2 [02] V1 MSB (Hex)
3 [03] V1 LSB (Hex) //In 0.01V
4 [04] V2 MSB (Hex)
5 [05] V2 LSB (Hex) //In 0.01V
6 [06] Cap1 MSB (Hex)
7 [07] Cap1 LSB (Hex) //In 1mAh
8 [08] Cap2 MSB (Hex)
9 [09] Cap2 LSB (Hex) //In 1mAh
10 [0A] 00
11 [0B] 00
12 [0C] 00
13 [0D] 00
14 [0E] 00
15 [0F] Alarm // The fist bit is alarm V1, the second V2, the third Capacity 1, the 4th capacity 2.

//===============================================================

Data type = 0x11 AirSpeed Sensor

0[00] 17(0x11)
1[01] 00
2[02] Speed MSB (Hex)
3[03] Speed LSB (Hex) //In 1 km/h
4[04] Unknown
5[05] Unknown
6[06] Unknown
7[07] Unknown
8[08] Unknown
9[09] Unknown
10[0A] Unknown
11[0B] Unknown
12[0C] Unknown
13[0D] Unknown
14[0E] Unknown
15[0F] Unknown

//===============================================================

Data type = 0x12 Altimeter Sensor

0[00] 18(0x12)
1[01] 00
2[02] Altitude MSB (Hex)
3[03] Altitude LSB (Hex) 16bit signed integer, in 0.1m
4[04] Max Altitude MSB (Hex)
5[05] Max Altitude LSB (Hex) 16bit signed integer, in 0.1m
6[05] Unknown
7[07] Unknown
8[08] Unknown
9[09] Unknown
10[0A] Unknown
11[0B] Unknown
12[0C] Unknown
13[0D] Unknown
14[0E] Unknown
15[0F] Unknown

//===============================================================

Data type = 0x14 Gforce Sensor

0[00] 20(0x14)
1[01] 00
2[02] x MSB (Hex, signed integer)
3[03] x LSB (Hex, signed integer) //In 0.01g
4[04] y MSB (Hex, signed integer)
5[05] y LSB (Hex, signed integer) //In 0.01g
6[06] z MSB (Hex, signed integer)
7[07] z LSB (Hex, signed integer) //In 0.01g
8[08] x max MSB (Hex, signed integer)
9[09] x max LSB (Hex, signed integer) //In 0.01g
10[0A] y max MSB (Hex, signed integer)
11[0B] y max LSB (Hex, signed integer) //In 0.01g
12[0C] z max MSB (Hex, signed integer)
13[0D] z max LSB (Hex, signed integer) //In 0.01g
14[0E] z min MSB (Hex, signed integer)
15[0F] z min LSB (Hex, signed integer) //In 0.01g

//===============================================================

Data type = 0x15 JetCat Sensor

0[00] 21(0x15)
1[01] 00
2[02] Status
3[03] Throttle //up to 159% (the upper nibble is 0-f, the lower nibble 0-9)
4[04] Pack_Volt LSB (Decimal)
5[05] Pack_Volt MSB (Decimal) //In 0.01V
6[06] Pump_Volt LSB (Decimal)
7[07] Pump_Volt MSB (Decimal) //In 0.01V
8[08] RPM LSB (Decimal) //Up to 999999rpm
9[09] RPM Mid (Decimal)
10[0A] RPM MSB (Decimal)
11[0B] 00
12[0C] TempEGT (Decimal) LSB
13[0D] TempEGT (Decimal) MSB //used only lover nibble, up to 999°C
14[0E] Off_Condition
15[0F] 00
//**************************************************************
//Messages for Status:
//0x00:OFF
//0x01:WAIT FOR RPM
//0x02:IGNITE
//0x03;ACCELERATE
//0x04:STABILIZE
//0x05:LEARN HIGH
//0x06:LEARN LOW
//0x07:undef
//0x08:SLOW DOWN
//0x09:MANUAL
//0x0a,0x10:AUTO OFF
//0x0b,0x11:RUN
//0x0c,0x12:ACCELERATION DELAY
//0x0d,0x13:SPEED REG
//0x0e,0x14:TWO SHAFT REGULATE
//0x0f,0x15:PRE HEAT
//0x16:PRE HEAT 2
//0x17:MAIN F START
//0x18:not used
//0x19:KERO FULL ON
//0x1a:MAX STATE
//**************************************************************
//Messages for Off_Condition:
//0x00:NA
//0x01:OFF BY RC
//0x02:OVER TEMPERATURE
//0x03:IGNITION TIMEOUT
//0x04:ACCELERATION TIMEOUT
//0x05:ACCELERATION TOO SLOW
//0x06:OVER RPM
//0x07:LOW RPM OFF
//0x08:LOW BATTERY
//0x09:AUTO OFF
//0x0a,0x10:LOW TEMP OFF
//0x0b,0x11:HIGH TEMP OFF
//0x0c,0x12:GLOW PLUG DEFECTIVE
//0x0d,0x13:WATCH DOG TIMER
//0x0e,0x14:FAIL SAFE OFF
//0x0f,0x15:MANUAL OFF
//0x16:POWER BATT FAIL
//0x17:TEMP SENSOR FAIL
//0x18:FUEL FAIL
//0x19:PROP FAIL
//0x1a:2nd ENGINE FAIL
//0x1b:2nd ENGINE DIFFERENTIAL TOO HIGH
//0x1c:2nd ENGINE NO COMMUNICATION
//0x1d:MAX OFF CONDITION

//===============================================================

Data type = 0x16 GPS Sensor (always second GPS packet)

0[00] 22(0x16)
1[01] 00
2[02] Altitude LSB (Decimal) //In 0.1m
3[03] Altitude MSB (Decimal) //Altitude = Altitude(0x17) * 10000 + Value (in 0.1m)
4[04] 1/10000 degree minutes latitude (Decimal) (DD MM.MMMM)
5[05] 1/100 degree minutes latitude (Decimal)
6[06] degree minutes latitude (Decimal)
7[07] degrees latitude (Decimal)
8[08] 1/10000 degree minutes longitude (Decimal) (DD MM.MMMM)
9[09] 1/100 degree minutes longitude (Decimal)
10[0A] degree minutes longitude (Decimal)
11[0B] degrees longitude (Decimal)
12[0C] Heading LSB (Decimal)
13[0D] Heading MSB (Decimal) Divide by 10 for Degrees
14[0E] Unknown
15[0F] First bit for latitude: 1=N(+), 0=S(-);
Second bit for longitude: 1=E(+), 0=W(-);
Third bit for longitude over 99 degrees: 1=+-100 degrees

//===============================================================

Data type = 0x17 GPS Sensor (always first GPS packet)

0[00] 23(0x17)
1[01] 00
2[02] Speed LSB (Decimal)
3[03] Speed MSB (Decimal) //Divide by 10 for Knots. Multiply by 0.185 for Kph and 0.115 for Mph
4[04] UTC Time LSB (Decimal) 1/100th sec. (HH:MM:SS.SS)
5[05] UTC Time (Decimal) = SS
6[06] UTC Time (Decimal) = MM
7[07] UTC Time MSB (Decimal) = HH
8[08] Number of Sats (Decimal)
9[09] Altitude in 1000m (Decimal)
10[0A]-15[0F] Unused (But contains Data left in buffer)

//===============================================================

Data type = 7E{TM1000} or FE{TM1100}

0[00] 7E or FE
1[01] 00
2[02] RPM MSB (Hex)
3[03] RPM LSB (Hex) //RPM = 120000000 / number_of_poles(2, 4, ... 32) / gear_ratio(0.01 - 30.99) / Value
4[04] Volt MSB (Hex)
5[05] Volt LSB (Hex) //In 0.01V
6[06] Temp MSB (Hex)
7[07] Temp LSB (Hex) //Value (Decimal) is in Fahrenheit, for Celsius (Value (Decimal) - 32) * 5) / 9)
8[08] Unknown
9[09] Unknown
10[0A] Unknown
11[0B] Unknown
12[0C] Unknown
13[0D] Unknown
14[0E] Unknown
15[0F] Unknown

//===============================================================

Data type = 7F{TM1000} or FF{TM1100}

0[00] 7F or FF
1[01] 00
2[02] A MSB (Hex)
3[03] A LSB (Hex)
4[04] B MSB (Hex)
5[05] B LSB (Hex)
6[06] L MSB (Hex)
7[07] L LSB (Hex) //0xFFFF = NC (not connected)
8[08] R MSB (Hex)
9[09] R LSB (Hex) //0xFFFF = NC (not connected)
10[0A] Frame loss MSB (Hex)
11[0B] Frame loss LSB (Hex)
12[0C] Holds MSB (Hex)
13[0D] Holds LSB (Hex)
14[0E] Receiver Volts MSB (Hex) //In 0.01V
15[0F] Receiver Volts LSB (Hex)

//===============================================================

If anybody have any additions or corrections, it's the time to ...
Last edit: 03 Dec 2013 05:12 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
19 May 2013 12:40 - 19 May 2013 12:56 #10111 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
PowerBox Sensor verified = OK. Only JetCat Sensor remains untested.
Last edit: 19 May 2013 12:56 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
19 May 2013 16:08 - 19 May 2013 16:09 #10113 by kicaj222
Replied by kicaj222 on topic DSM Telemetry support
Hi everybody

will telemetry work with 7e and TM1100 ?

thanks
Last edit: 19 May 2013 16:09 by kicaj222.

Please Log in or Create an account to join the conversation.

More
20 May 2013 02:40 #10124 by RW9UAO
Replied by RW9UAO on topic DSM Telemetry support
yes

Please Log in or Create an account to join the conversation.

More
20 May 2013 04:22 - 20 May 2013 04:27 #10126 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
But for now is supported only voltage, temperature, RPM and GPS. TM1100 supports voltage, temperature and RPM only, so it will be enough for you.
Last edit: 20 May 2013 04:27 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
23 May 2013 19:07 #10260 by Parees
Replied by Parees on topic DSM Telemetry support

vlad_vy wrote: PowerBox Sensor verified = OK. Only JetCat Sensor remains untested.


Could you confirm that the powerbox sensor was verified on the officially released (3.0.0) version of the firmware? Or are you referring to a test version?
Thanks.

Please Log in or Create an account to join the conversation.

More
24 May 2013 04:10 - 24 May 2013 04:12 #10266 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
I've verified that data structure and decoding are correct. But, up to now Deviation v3.0 supports voltage, temperature, RPM and GPS sensor only (as Walkera telemetry, that implemented first).

We need ask PB to extend Spektrum DSM(X) telemetry support.

Possible we need in future completely divide telemetry support, parsing and setup by protocols, since telemetry sensors set and data structures very different among different protocols.
Last edit: 24 May 2013 04:12 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
27 May 2013 14:15 - 27 Jun 2013 06:07 #10343 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
JetCat Sensor verified = changed.

//===============================================================

Data type = 0x15 JetCat Sensor

0[00] 21(0x15)
1[01] 00
2[02] Status
3[03] Throttle //up to 159% (the upper nibble is 0-f, the lower nibble 0-9)
4[04] Pack_Volt LSB (Decimal)
5[05] Pack_Volt MSB (Decimal) //In 0.01V
6[06] Pump_Volt LSB (Decimal)
7[07] Pump_Volt MSB (Decimal) //In 0.01V
8[08] RPM LSB (Decimal) //Up to 999999rpm
9[09] RPM Mid (Decimal)
10[0A] RPM MSB (Decimal)
11[0B] 00
12[0C] TempEGT (Decimal) LSB
13[0D] TempEGT (Decimal) MSB //used only lover nibble, up to 999°C
14[0E] Off_Condition
15[0F] 00
//**************************************************************
//Messages for Status:
//0x00:OFF
//0x01:WAIT FOR RPM
//0x02:IGNITE
//0x03;ACCELERATE
//0x04:STABILIZE
//0x05:LEARN HIGH
//0x06:LEARN LOW
//0x07:undef
//0x08:SLOW DOWN
//0x09:MANUAL
//0x0a,0x10:AUTO OFF
//0x0b,0x11:RUN
//0x0c,0x12:ACCELERATION DELAY
//0x0d,0x13:SPEED REG
//0x0e,0x14:TWO SHAFT REGULATE
//0x0f,0x15:PRE HEAT
//0x16:PRE HEAT 2
//0x17:MAIN F START
//0x18:not used
//0x19:KERO FULL ON
//0x1a:MAX STATE
//**************************************************************
//Messages for Off_Condition:
//0x00:NA
//0x01:OFF BY RC
//0x02:OVER TEMPERATURE
//0x03:IGNITION TIMEOUT
//0x04:ACCELERATION TIMEOUT
//0x05:ACCELERATION TOO SLOW
//0x06:OVER RPM
//0x07:LOW RPM OFF
//0x08:LOW BATTERY
//0x09:AUTO OFF
//0x0a,0x10:LOW TEMP OFF
//0x0b,0x11:HIGH TEMP OFF
//0x0c,0x12:GLOW PLUG DEFECTIVE
//0x0d,0x13:WATCH DOG TIMER
//0x0e,0x14:FAIL SAFE OFF
//0x0f,0x15:MANUAL OFF
//0x16:POWER BATT FAIL
//0x17:TEMP SENSOR FAIL
//0x18:FUEL FAIL
//0x19:PROP FAIL
//0x1a:2nd ENGINE FAIL
//0x1b:2nd ENGINE DIFFERENTIAL TOO HIGH
//0x1c:2nd ENGINE NO COMMUNICATION
//0x1d:MAX OFF CONDITION

//===============================================================

static void parse_telemetry_packet()
{
    static s32 altitude;
    u32 time_ms = CLOCK_getms();
    
    switch(packet[0]) {
        case 0x7f: //TM1000 Flight log
        case 0xff: //TM1100 Flight log
            //Telemetry.fadesA = ((s32)packet[2] << 8) | packet[3]; //0xFFFF = NC (not connected)
            //Telemetry.fadesB = ((s32)packet[4] << 8) | packet[5]; //0xFFFF = NC (not connected)
            //Telemetry.fadesL = ((s32)packet[6] << 8) | packet[7]; //0xFFFF = NC (not connected)
            //Telemetry.fadesR = ((s32)packet[8] << 8) | packet[9]; //0xFFFF = NC (not connected)
            //Telemetry.frameloss = ((s32)packet[10] << 8) | packet[11];
            //Telemetry.holds = ((s32)packet[12] << 8) | packet[13];
            Telemetry.volt[1] = ((((s32)packet[14] << 8) | packet[15]) + 5) / 10;  //In 1/10 of Volts
            Telemetry.time[0] = time_ms;
            Telemetry.time[1] = Telemetry.time[0];
            break;
        case 0x7e: //TM1000
        case 0xfe: //TM1100
            Telemetry.rpm[0] = (packet[2] << 8) | packet[3];
            if ((Telemetry.rpm[0] == 0xffff) || (Telemetry.rpm[0] < 200))
            	  Telemetry.rpm[0] = 0; 
            else
            	  Telemetry.rpm[0] = 120000000 / 2 / Telemetry.rpm[0]; //In RPM (2 = number of poles)
                //Telemetry.rpm[0] = 120000000 / number_of_poles(2, 4, ... 32) / gear_ratio(0.01 - 30.99) / Telemetry.rpm[0];
                //by default number_of_poles = 2, gear_ratio = 1.00
            Telemetry.volt[0] = ((((s32)packet[4] << 8) | packet[5]) + 5) / 10;  //In 1/10 of Volts
            Telemetry.temp[0] = ((s32)((s16)(packet[6] << 8) | packet[7]) - 32) * 5 / 9; //In degrees-C (16Bit signed integer)
            if (Telemetry.temp[0] > 500 || Telemetry.temp[0] < -100)
                Telemetry.temp[0] = 0;
            Telemetry.time[0] = time_ms;
            Telemetry.time[1] = Telemetry.time[0];
            break;
        case 0x03: //High Current sensor
            //Telemetry.current = (s32)((s16)(packet[2] << 8) | packet[3]) * 196791 / 100000; //In 1/10 of Amps (16bit signed integer, 1 unit is 0.196791A)
            //Telemetry.time[x1] = time_ms;
            break;
        case 0x0a: //Powerbox sensor
            //Telemetry.pwb.volt1 = (((s32)packet[2] << 8) | packet[3] + 5) /10; //In 1/10 of Volts
            //Telemetry.pwb.volt1 = (((s32)packet[4] << 8) | packet[5] + 5) /10; //In 1/10 of Volts
            //Telemetry.pwb.capacity1 = ((s32)packet[6] << 8) | packet[7]; //In mAh
            //Telemetry.pwb.capacity2 = ((s32)packet[8] << 8) | packet[9]; //In mAh
            //Telemetry.pwb.alarm_v1 = packet[15] & 0x01; //0 = disable, 1 = enable
            //Telemetry.pwb.alarm_v2 = (packet[15] >> 1) & 0x01; //0 = disable, 1 = enable
            //Telemetry.pwb.alarm_c1 = (packet[15] >> 2) & 0x01; //0 = disable, 1 = enable
            //Telemetry.pwb.alarm_c2 = (packet[15] >> 3) & 0x01; //0 = disable, 1 = enable
            //Telemetry.time[x2] = time_ms;
            break;
        case 0x11: //AirSpeed sensor
            //Telemetry.airspeed = ((s32)packet[2] << 8) | packet[3]; //In km/h (16Bit value, 1 unit is 1 km/h)
            //Telemetry.time[x3] = time_ms;
            break;
        case 0x12: //Altimeter sensor
            //Telemetry.altitude = (s16)(packet[2] << 8) | packet[3]; //In 0.1 meters (16Bit signed integer, 1 unit is 0.1m)
            //Telemetry.time[x4] = time_ms;
            break;
        case 0x14: //G-Force sensor
            //Telemetry.gforce.x = (s16)(packet[2] << 8) | packet[3]; //In 0.01g (16Bit signed integers, unit is 0.01g)
            //Telemetry.gforce.y = (s16)(packet[4] << 8) | packet[5];
            //Telemetry.gforce.z = (s16)(packet[6] << 8) | packet[7];
            //Telemetry.gforce.xmax = (s16)(packet[8] << 8) | packet[9];
            //Telemetry.gforce.ymax = (s16)(packet[10] << 8) | packet[11];
            //Telemetry.gforce.zmax = (s16)(packet[12] << 8) | packet[13];
            //Telemetry.gforce.zmin = (s16)(packet[14] << 8) | packet[15];
            //Telemetry.time[x5] = time_ms;
            break;
        case 0x15: //JetCat sensor
            //Telemetry.jc.status = packet[2];
                //Possible messages for status:
                //0x00:OFF
                //0x01:WAIT FOR RPM
                //0x02:IGNITE
                //0x03;ACCELERATE
                //0x04:STABILIZE
                //0x05:LEARN HIGH
                //0x06:LEARN LOW
                //0x07:undef
                //0x08:SLOW DOWN
                //0x09:MANUAL
                //0x0a,0x10:AUTO OFF
                //0x0b,0x11:RUN
                //0x0c,0x12:ACCELERATION DELAY
                //0x0d,0x13:SPEED REG
                //0x0e,0x14:TWO SHAFT REGULATE
                //0x0f,0x15:PRE HEAT
                //0x16:PRE HEAT 2
                //0x17:MAIN F START
                //0x18:not used
                //0x19:KERO FULL ON
                //0x1a:MAX STATE
            //Telemetry.jc.throttle = (packet[3] >> 4) * 10 + (packet[3] & 0x0f); //up to 159% (the upper nibble is 0-f, the lower nibble 0-9)
            //Telemetry.jc.pack_volt = (((packet[5] >> 4) * 10 + (packet[5] & 0x0f)) * 100 
            //                         + (packet[4] >> 4) * 10 + (packet[4] & 0x0f) + 5) / 10; //In 1/10 of Volts
            //Telemetry.jc.pump_volt = (((packet[7] >> 6) * 10 + (packet[7] & 0x0f)) * 100 
            //                         + (packet[6] >> 4) * 10 + (packet[6] & 0x0f) + 5) / 10; //In 1/10 of Volts (low voltage)
            //Telemetry.jc.rpm = ((packet[10] >> 4) * 10 + (packet[10] & 0x0f)) * 10000 
            //                 + ((packet[9] >> 4) * 10 + (packet[9] & 0x0f)) * 100 
            //                 + ((packet[8] >> 4) * 10 + (packet[8] & 0x0f)); //RPM up to 999999
            //Telemetry.jc.tempEGT = (packet[13] & 0x0f) * 100 + (packet[12] >> 4) * 10 + (packet[12] & 0x0f); //EGT temp up to 999°C
            //Telemetry.jc.off_condition = packet[14];
                //Messages for Off_Condition:
                //0x00:NA
                //0x01:OFF BY RC
                //0x02:OVER TEMPERATURE
                //0x03:IGNITION TIMEOUT
                //0x04:ACCELERATION TIMEOUT
                //0x05:ACCELERATION TOO SLOW
                //0x06:OVER RPM
                //0x07:LOW RPM OFF
                //0x08:LOW BATTERY
                //0x09:AUTO OFF
                //0x0a,0x10:LOW TEMP OFF
                //0x0b,0x11:HIGH TEMP OFF
                //0x0c,0x12:GLOW PLUG DEFECTIVE
                //0x0d,0x13:WATCH DOG TIMER
                //0x0e,0x14:FAIL SAFE OFF
                //0x0f,0x15:MANUAL OFF
                //0x16:POWER BATT FAIL
                //0x17:TEMP SENSOR FAIL
                //0x18:FUEL FAIL
                //0x19:PROP FAIL
                //0x1a:2nd ENGINE FAIL
                //0x1b:2nd ENGINE DIFFERENTIAL TOO HIGH
                //0x1c:2nd ENGINE NO COMMUNICATION
                //0x1d:MAX OFF CONDITION
            //Telemetry.time[x6] = time_ms;
            break;
        case 0x16: //GPS sensor (always second GPS packet)
            altitude += (((packet[3] >> 4) * 10 + (packet[3] & 0x0f)) * 100 
                       + ((packet[2] >> 4) * 10 + (packet[2] & 0x0f))) * 100; //In meters * 1000 (16Bit decimal, 1 unit is 0.1m)
            Telemetry.gps.altitude = altitude;
            Telemetry.gps.latitude = ((packet[7] >> 4) * 10 + (packet[7] & 0x0f)) * 3600000 
                                   + ((packet[6] >> 4) * 10 + (packet[6] & 0x0f)) * 60000 
                                   + ((packet[5] >> 4) * 10 + (packet[5] & 0x0f)) * 600 
                                   + ((packet[4] >> 4) * 10 + (packet[4] & 0x0f)) * 6; // (decimal, format DD MM.SSSS)
            if ((packet[15] & 0x01)  == 0)
                Telemetry.gps.latitude *= -1; //1=N(+), 0=S(-)
            Telemetry.gps.longitude = ((packet[11] >> 4) * 10 + (packet[11] & 0x0f)) * 3600000 
                                    + ((packet[10] >> 4) * 10 + (packet[10] & 0x0f)) * 60000 
                                    + ((packet[9] >> 4) * 10 + (packet[9] & 0x0f)) * 600 
                                    + ((packet[8] >> 4) * 10 + (packet[8] & 0x0f)) * 6; // (decimal, format DD MM.SSSS)
            if ((packet[15] & 0x04) == 4)
                Telemetry.gps.longitude += 360000000; //1=+100 degrees
            if ((packet[15] & 0x02) == 0)
                Telemetry.gps.longitude *= -1; //1=E(+), 0=W(-)
            //Telemetry.gps.heading = ((packet[13] >> 4) * 10 + (packet[13] & 0x0f)) * 10 
            //                      + ((packet[12] >> 4) * 10 + (packet[12] & 0x0f)) / 10; //In degrees (16Bit decimal, 1 unit is 0.1 degree)
            Telemetry.time[2] = time_ms;
            break;
        case 0x17: //GPS sensor (always first GPS packet)
            Telemetry.gps.velocity = (((packet[3] >> 4) * 10 + (packet[3] & 0x0f)) * 100 
                                    + ((packet[2] >> 4) * 10 + (packet[2] & 0x0f))) * 5556 / 108; //In m/s * 1000
            u8 hour  = (packet[7] >> 4) * 10 + (packet[7] & 0x0f);
            u8 min   = (packet[6] >> 4) * 10 + (packet[6] & 0x0f);
            u8 sec   = (packet[5] >> 4) * 10 + (packet[5] & 0x0f);
            //u8 ssec   = (packet[4] >> 4) * 10 + (packet[4] & 0x0f);
            u8 day   = 0;
            u8 month = 0;
            u8 year  = 0; // + 2000
            Telemetry.gps.time = ((year & 0x3F) << 26)
                               | ((month & 0x0F) << 22)
                               | ((day & 0x1F) << 17)
                               | ((hour & 0x1F) << 12)
                               | ((min & 0x3F) << 6)
                               | ((sec & 0x3F) << 0);
            //Telemetry.gps.sats = ((packet[8] >> 4) * 10 + (packet[8] & 0x0f));
            altitude = ((packet[9] >> 4) * 10 + (packet[9] & 0x0f)) * 1000000; //In 1000 meters * 1000 (8Bit decimal, 1 unit is 1000m)
            Telemetry.time[2] = time_ms;
            break;
    }
}
Last edit: 27 Jun 2013 06:07 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
14 Jun 2013 04:45 #10942 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
PB, there is any hope to get full telemetry support (flight log and all possible sensors) for DSM2(X) protocol?

Please Log in or Create an account to join the conversation.

More
14 Jun 2013 14:09 #10954 by PhracturedBlue
Replied by PhracturedBlue on topic DSM Telemetry support
I'm sure I'll get to it eventually. There are several things holding it back:
a) We don't have room on the devo7e for the full DSM* telemetry parser. So I need to do something special there
b) The telemetry display needs to be completely reworked to support the additional information
c) the alarms likely need to be reworked to support the additional info.

I'm not sure what you mean by sensor logs, but if you mean a flight-log (including telemetry) then that will likely happen 1st, as it should be easier to implement.

Please Log in or Create an account to join the conversation.

More
14 Jun 2013 14:19 #10955 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
I have in mind the flight log, nothing else. In devo 7e we can keep basic DSM* telemetry support only, as now.

Please Log in or Create an account to join the conversation.

More
17 Jun 2013 16:31 - 17 Jun 2013 16:31 #11067 by Sid3ways
Replied by Sid3ways on topic DSM Telemetry support
Guys please forgive my lack of knowledge but I haven't visited the forum in over a month. Going through this thread it is hard to decipher if DSMX Telemetry is fully compatible out of the box with the 3.0 software.

I'm in the market to pick up another Devo12 or Devo 8 and curious as to the advancements made thus far. I guess I should probably go read the release notes too. :) Keep up the great work!
Last edit: 17 Jun 2013 16:31 by Sid3ways.

Please Log in or Create an account to join the conversation.

More
01 Jul 2013 15:32 #11674 by PhracturedBlue
Replied by PhracturedBlue on topic DSM Telemetry support
I've started work on the extra telemetry info available from the DSM2 protocol, but I'm at somewhat of a loss.
There are 32 new variables that need to be managed to fully support DSM2 telemetry. How do DSM transmitters handle this info? Is it all displayed? Storing and logging it would be trivial, But I'm not sure it is worth the effort to display all of it on the Tx. Does anyone here actually have (and use) these sensors?

Please Log in or Create an account to join the conversation.

More
01 Jul 2013 16:01 #11675 by briareos7777
Replied by briareos7777 on topic DSM Telemetry support
For the rpm telemetry, would it take too much processing power to calculate the head speed for a helicopter before displaying it? I think other transmitters allow the user to enter a gear ratio to accomplish this.

Please Log in or Create an account to join the conversation.

Time to create page: 0.096 seconds
Powered by Kunena Forum