Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulator 2.1.3 - getValue("pilot-latitude") and getValue("pilot-latitude") return always 0 #2921

Closed
Sacre100 opened this issue Sep 22, 2015 · 7 comments

Comments

@Sacre100
Copy link

In Companion Simulator 2.1.3, getValue("pilot-latitude") and getValue("pilot-latitude") return always 0 even with valid simulated GSP latitude and longitude.

GPS coord 1 : 46.515826, 6.999142 -> converted for : 27909495 -2143284163
GPS coord 2 : 46.510178, 6.992867 -> converted for : 27906106 -2143287928

Distance between point : 790m (OK in simulator).

@projectkk2glider
Copy link
Member

Not a valid field name in 2.1, see http://downloads-21.open-tx.org/firmware/lua_fields.txt

This is still missing and must be coded in 2.1.

@projectkk2glider projectkk2glider added this to the OpenTX 2.1.X milestone Sep 23, 2015
@Sacre100
Copy link
Author

Current flight mode ("flight-mode") seems also missing.

@ptsneves
Copy link

Is there a list of the missing fields so could implement them?

@projectkk2glider
Copy link
Member

Not really. You could compare the list with the 2.0 list http://downloads-20.open-tx.org/firmware/lua_fields.txt and see what is missing. You should forget about all telemetry fields that are handled natively in 2.1 (like Alt, Alt-max, etc..) and then the diff between 2.1 list should produce missing ones.

@projectkk2glider
Copy link
Member

This could be easily solved by adding additional values to the getValue() It currently returns latitude and longitude, we could add: pilot lat, pilot lon and distance.

projectkk2glider added a commit that referenced this issue Nov 25, 2015
Fixes #2921: getValue() now also returns pilot position
Fixes #3062: Close any Lua open files when radio powers off
Fixes #3095: Lua string library added (only 6k bytes of flash used)
Re #3095: luaGetVersion() also returns version as numbers
(Ported from master 7ef790d..4d0bd14 and squashed into one commit)
@mcshaz
Copy link

mcshaz commented Dec 5, 2015

getValue("flight-mode") does not appear to be solved by #3097 (which did solve the 1st issue of pilot-latitude). Should I open another issue?

@projectkk2glider
Copy link
Member

No, I forgot about that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants