Hi all,

I just bought an FrSky Taranis for my quad copter and needed to get the Mavlink data up on the Taranis LCD telemetry display. So here is my solution using a Teensy3.1 as a converter between MavLink and the S.Port on FrSky X8R.

See attached file below...

Views: 306221

Attachments:

Reply to This

Replies to This Discussion

Yes, I have just made.
Thank you.

Rolf, can you embed also the Jeti protocol? :)

Rolf, I've just ordered x8r and teensy and planning to use your program on it, however, I am new to the arduino/microcontroller programming, I used to program in java and in c++ back in school and right after the school. So I am not new to programming, but certainly new to teensy. I need to grub some data from the mavlink, reduce its bitrate and send it to a FSK modem. would I need to use digital or analog pins to write to FSK? and if you happen to know an example of anything remotely similar to what I am planning on doing I would appreciate a link. 

Thank you! 

p.s. I think I've received an email update from diydrones forum bot about you mentioning possibility of using teensy to convert s.bus to ppm. I do think it should be possible, however, I do not know a thing about s.bus protocol. It would be very elegant to use just a single board. 

Hey Artem, 

There is already Frysky S.BUS to CPPM converter for single cable connection. Not sure if this is what your looking for:

 http://www.alofthobbies.com/frsky-sbus-converter.html for around $13.

 

I am talking about illuminating that very cable :) since we are already using teensy, why not use it for its full potential? 

ah,, looks like we won't be able to do 2 things at one, (sbus-ppm conversion and frsky telemetry) it looks like teensy 3.1 has only 3 UART ports and for this we need 4. maybe the next ++ version will have 4 UART ports? 

Not sure that we need that many serial ports, the PPM output can be an standard IO pin.
This is some code i found https://github.com/sebseb7/SbusToPPM.

genious :)  looking at the main.c right now.... 

Hello,

I am looking for a way to do the oposite :)

Convert SPort sensors data into MavLink to use it with an OSD like minimosd. Basically to see the sensors data on fatshark googles.

Hello Rolf,

the program works fine.

But I miss the display of HDOP data. Can you integrate that?

regards Peter

Nice work Rolf!

Would I be wrong to assume we could do this inboard the flight controller if there were a spare uart port? Such as the pixhawk?

I have a taranis, x8r and pix hawk and am willing to try this. Do you know of anyone that has done this?

I have no experience with the Pixhawk so I can’t help you on this. The only thing to have in mind when porting this program to another CPU is that the serial port must be inverted,

/Rolf

Hi Peter,

No problem, do like this:

First declare an variable:

uint16_t ap_HDOP;

then change this in the MavLink_FrSkyPort.ini file

 case MAVLINK_MSG_ID_GPS_RAW_INT:   // 24
       ap_fixtype = mavlink_msg_gps_raw_int_get_fix_type(&msg);                             
       ap_sat_visible =  mavlink_msg_gps_raw_int_get_satellites_visible(&msg);      
       gps_status = (ap_sat_visible*10) + ap_fixtype;

       ap_HDOP = mavlink_msg_gps_raw_int_get_eph(&msg);  //   horizontal dilution of position in cm

       if(ap_fixtype == 3)  {
                ap_latitude = mavlink_msg_gps_raw_int_get_lat(&msg);
                 ap_longitude = mavlink_msg_gps_raw_int_get_lon(&msg);
                 ap_gps_altitude = mavlink_msg_gps_raw_int_get_alt(&msg);   
                  }

 

Then you can change the FrSkySPort.ino depending on where you wont the returned value to be shown,

for example as the FUEL value:

 

             case 19:
                   FrSkySPort_SendPackage(FR_ID_FUEL,ap_HDOP);
                   break;  

 

 

/Rolf

Reply to Discussion

RSS

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service