Replies

  • shvars.speedUnits is set by your units selection on the configuration page (which is the code in confrun.lib), which writes the chosen value to your model config file. Its read back in from the config file when the code is initialised. I think you are over thinking this - assuming that there is a code issue.

  • I am not a programmer but it seems that the below variable needs to be set:

    shvars.speedUnits == 2

    I am assuming that units_set is unset so it traverses the if/elseif/elseif/else code.  Let me know if I am wrong.  If I am right, how would I set speedUnit to 2?  If I correct this, will this corrupt the speed displayed on the lua display?

    Thx

    Scot

  • Robert, the telemetry sensor is configured for kts as you know (the log file shows the same), but the numeric value on the sensor is actually m/s. The teensy sends in m/s, but if the sensor on the taranis is configured in anything other than kts, OpenTx applies a scaling factor to the received value which skews it beyond use. So you should expect the value in the OpenTx logs to be in m/s even though the column header shows kts. My telemetry script scales this depending on which scale you choose. This scaling is applied in https://github.com/athertop/MavLink_FrSkySPort/blob/Mav_Sport2.1-2.... in the function setUnits()

    for kph multiplication factor is 3.6, for kts its 1.94384, and for mph its 2.23694 (of course, for m/s its simply 1).

    Regards, Paul  

    athertop/MavLink_FrSkySPort
    APM MavLink to FrSky S.Port converter. Contribute to athertop/MavLink_FrSkySPort development by creating an account on GitHub.
  • This is clearer to me now.  I did two more flight and noticed that the speed on the lua dashboard is likely correct.  Outside of that, I have my own telemetry screen that has air and groundspeed in it as well as voice alerts for providing warning speeds.  Those elements are either reporting in KPS or m/s.  I am not sure which.  I also got the sensors to dump logs and they seem to indicate the airspeed to be in kts but the values in the logs are consistent with my dashboard and not the Lua dashboard.  I can upload the logs if you want to see them.  I would like both dashboards to be consistent with each so I can setup custom alerts.  

    Let me get the GS Telemetry, onboard logs, and Taranis logs uploaded.

    Link to logs below

    https://drive.google.com/drive/folders/0B_rKS7jwgyK3dVN4bFFRV25iUHc

    20171101 - Google Drive
  • Robert, That is an issue with the wiki (missed removing a bit) since the configuration page took over from the offset.lua mixer script - that was how we used to set the offsets and plane/copter before I rewrote the LUA scripts. Thanks for spotting the wiki issue - I have just fixed that.

    I haven't had the weather lately to do any flying, but once I do I will get my fx61 in the air to test the windspeed (its the only pixhawk equipped plane I have (also has digital windspeed sensor.

    Cheers, Paul

  • I did find a config file with my planes name on it that seems to have the variables mentioned in the doc.  SpeedUnits is set to 2 there.  

    On the https://github.com/athertop/MavLink_FrSkySPort/wiki/0.-Overview page, it indicates the following options:

    Speed: m/s, kph, mph, kts

    According to https://github.com/athertop/MavLink_FrSkySPort/wiki/0.-Overview, the options for the speed are:

    Ground Speed - units can be set in mixes/offset.lua under "SpeedUnits" 1 = m/s, 2 = kph, 3 = mph

    I see no ground speed option for kts.  Is 4 a valid value for kts?

    Below is my config:

    File name:  Auto Telmstr.cfg

     return {["speedUnits"] = 2,["altUnits"] = 1,["apType"] = 1,["offsetmah"] = 0,["offsetwh"] = 0,["whCap"] = 0,["armGvar"] = 0}

    athertop/MavLink_FrSkySPort
    APM MavLink to FrSky S.Port converter. Contribute to athertop/MavLink_FrSkySPort development by creating an account on GitHub.
  • Paul

    Looking at the documentation, there is supposed to be a file called mixes/offset.lua.   Is that supposed to be in the scripts dir on the Taranis SD Card?  I see no such file on my card.  Do I just create a text file with some values in it?  

    Thx

  • Paul

    To answer previous questions, see below:

    I have OpenTx 2.2

    Software is AP 3.8.2

    Teensy is plugged into Telem2.  I have no other smart devices or sensors plugged in.

    Telem 1 has the 3dr radio.

    I do not see anywhere is says Telemetry type on the sensor page.  Am I looking in the wrong place?

    Thx

    I will have to check to see if I have ignore instances checked.

  •  Below is a quote from the wiki.

    Additionally Note - ASpd & GSpd- These sensors will be discovered with the unit of kts configured - even though the value it displays will actually be in m/s. Do not change the units of these sensors - leave as kts and the telemetry screen will display their values correctly in the chosen scale (chosen in the telemetry screen configuration).

    There is obviously something funny going on here.  I do have my telemetry and sensor units set to knots.  I will test it again tomorrow.

  • The sensors are configured in knots as is the lua page.  I did not configure all sensors.  I will check each one of them tonight.  aspd and gspd are in knots for sure.

    Regarding the AOA, the telemetry logs do have an attribute for it but it seems to be zeroed out.  I guess I assumed that AOA could be figured out between gyro and accel measurements.  In theory, this should be doable.  The gyros know the attitude of the plane while the accelerometers should know the exact direction of the plane.  Maybe there is too much error to make that happen.

    Thank you for the response.

    Scot (Robert is my first name, but I go by Scot)

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…