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: 307475

Attachments:

Reply to This

Replies to This Discussion

Rolf, I'm having issues. For some reason none of data in the ap_  GPS variables (eg ap_groundspeed) make it from MavLink_FrSkySPort.ino to FrSkySPort.ino. They all end up zero. Got any ideas?

Not having real data from the GPS to work with, I took the values of the ap_ variables and assigned them in FrSkySPort.ino. Hurray data showed up on the Taranis. Only the gps_status (sent as T1) made it unmodified. Latitude and longitude degrees made it OK, but minutes got modified. For example 39 degrees 34.5846 minutes ended up as 39 degrees 20.7504 minutes and 75 degrees 43.9724 minutes came out as 75 degrees 26.3832 minutes. Here is an example of what I fed in: latlong=((393458460/100)*6);

I know I'm doing something wrong. I just can't figure out what.

Roger

Hello Rolf,

case MAVLINK_MSG_ID_RC_CHANNELS_RAW: / / 35
       ap_rc_ch3 = mavlink_msg_rc_channels_raw_get_chan3_raw (& msg);

works great. Thank you. I would not have done it without your help.


case MAVLINK_MSG_ID_RC_CHANNELS_SCALED: / / 34
       ap_rc_ch3 = mavlink_msg_rc_channels_raw_get_chan3_scaled (& msg);

does not work. But it's not bad.

Peter

Rolf,

I was just looking at the information you provided about the conversion FrSky does to the incoming GPS Lat and Long data. It answered my questions about how it determined N-S and E-W. Now I'm wondering what the AP does to the raw GPS data. It has to be coming from the GPS in raw NMEA format.  What does the AP do with the raw data? I'd be happy to find it myself, if you can point me to the location of the GPS code.

I still haven't figured out why the data is being zeroed out as it goes from MavLink_FrSkySPort.ino to FrSkySPort.ino.  I guess my lack of experience with C++ really shows.

I really appreciate your help, patience, and all the hard work you put into this. Without your work to start from, I would never have attempted this in the first place.

Roger

Roger,

The data for Lat. and Long you supply is a decimal number and the Taranis  convert this to  degrees and minutes

check this.. http://www.onlineconversion.com/map_decimaldegrees.htm

ap_groundspeed will be zero as long as you don't have real GPS data (with movement aka groundspeed)

also my program checks the gps_fix and don't send any data as long as gps_fix is less than 3.( 3D lock)

Sorry, my misstake.. it should be:

case MAVLINK_MSG_ID_RC_CHANNELS_SCALED: / / 34
       ap_rc_ch3 = mavlink_msg_rc_channels_scaled_get_chan3_scaled (& msg);

See above...

case MAVLINK_MSG_ID_RC_CHANNELS_SCALED: / / 34
       ap_rc_ch3 = mavlink_msg_rc_channels_scaled_get_chan3_scaled (& msg);

works. Thank you.

Peter

I just now found the Mavlink RAW GPS code and saw that it deals in decimal degrees, not degrees and decimal minutes. Now it makes sense.

I understand your program only sends data on a 3D fix. I turn on he LED when I have a 3D fix, so I have some visual confirmation of the fix. Like I said only the gps_status value is being passed to FrSkySPort.ino. All of the others are zero. I'll keep slogging away at it. It's the best way to learn I guess.

Thanks again.

Roger

Is the Mavlink data coming from an APM with an GPS connected? or do you use something else as the mavlink source?

Rolf, I flashed my Taranis with your FW (opentx-x9d-v1.1.02) and it still has the same bugs. Are you using the newest APM firmware? I am running the quadcopter 3.1.2 firmware, which is the newest

I was running fw 3.1, updated it to  3.1.2 and it still works for me...

I have made a new file with simulated lat/long try to install this on the Teensy

and see if you get 43'23,8644N, 79'16.3368E

Attachments:

Hello Rolf and Andrew,

I have the same issue with an incorrect longitude value as I am further West in Vancouver Canada.

Both the APM (3.1.2) and Taranis have the latest stable software version installed. I will try the suggestions in the thread (reload the Taranis firmware) and try your test code you just posted.

Thanks,

Marc

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service