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
[Horus] Reading internal GPS via LUA Script #5112
Comments
Currently the internal GPS is not supported very well. You cannot it from lua or other telemetry. Search for Making this available via lua should be easy but the question is rather if the internal GPS should available as normal telemetry source. |
I have done that already. But I sadly don't know enough about the rest of the code to do a quick fix and provide it by a pull request. It is not obvious for me how the data comes to the Lua Scripts. Maybe there should be a |
probably not. As a quick hack, this might work, after the internal GPS position should available as telemetry value: diff --git a/radio/src/gps.cpp b/radio/src/gps.cpp
index 5a62fb5ac..9b10694a5 100644
--- a/radio/src/gps.cpp
+++ b/radio/src/gps.cpp
@@ -265,6 +265,8 @@ bool gpsNewFrameNMEA(char c)
gpsData.altitude = gps_Msg.altitude;
__enable_irq();
}
+ setTelemetryValue(TELEM_PROTO_FRSKY_SPORT, GPS_ID, 1, 0, gpsData.latitude, UNIT_GPS_LATITUDE, 0);
+ setTelemetryValue(TELEM_PROTO_FRSKY_SPORT, GPS_ID, 1, 0, gpsData.longitude, UNIT_GPS_LONGITUDE, 0);
break;
case FRAME_RMC:
gpsData.speed = gps_Msg.speed; |
Yeah, GPS and lua need some love, I had a few things ready (like disatnce computation for lua), need to do some code archeology :D |
Should be easy:
|
Perfect idea, the position and acceleration sensors are also essential. Then you can finally create a follow me mode. |
I would be already very happy if I can display the internal GPS. |
All that is available Was done in #5610 |
Dear Open TX,
Thank you for replay.
I both my Horus 12s a half year ago, I’m very happy with it, but I still have to learn a lot.
I see that I have to do this by a Lua script, never used lua scripts before, but internet has all the answers. I gone try to find out how to do.
During this winter I have setup a sensor system based on Pawelsky libraries in RC-Groeps.
Now I have the GPS working. And want use the internal GPS as well.
With kind regards,
Wim Sanders
…________________________________
Van: 3djc <notifications@github.com>
Verzonden: woensdag 7 maart 2018 15:44
Aan: opentx/opentx
CC: WimSanders; Comment
Onderwerp: Re: [opentx/opentx] [Horus] Reading internal GPS via LUA Script (#5112)
All that is available
Was done in #5610<#5610>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#5112 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AXhMevQUtC-KfEeGARwJ_rb5y6oLfDc2ks5tb_IogaJpZM4Ohn4q>.
|
You do not. You have been able to display internal sensor on widgets since 2.2.0 without any lua knowledge. Create a sensor display widget and select the internal GPS, it is available as a source |
Thank you for replay.
I did but is say only Sats:0.
I waited for 30 minutes outside.
With kind regards.
Wim Sanders
…________________________________
Van: 3djc <notifications@github.com>
Verzonden: woensdag 7 maart 2018 16:26
Aan: opentx/opentx
CC: WimSanders; Comment
Onderwerp: Re: [opentx/opentx] [Horus] Reading internal GPS via LUA Script (#5112)
You do not. You have been able to display internal sensor on widgets since 2.2.0 without any lua knowledge.
Create a sensor display widget and select the internal GPS, it is available as a source
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#5112 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AXhMevf0gGCYyQLU-AtCeOt9RJS33TDtks5tb_xBgaJpZM4Ohn4q>.
|
Either the radio could not get a fix (very cloudy, obstacles,...) or your internal gps is defective, because it does work |
Sorry did not wait not long enough, now I have a fix
THNX
…________________________________
Van: 3djc <notifications@github.com>
Verzonden: woensdag 7 maart 2018 17:29
Aan: opentx/opentx
CC: WimSanders; Comment
Onderwerp: Re: [opentx/opentx] [Horus] Reading internal GPS via LUA Script (#5112)
Either the radio could not get a fix (very cloudy, obstacles,...) or your internal gps is defective, because it does work
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#5112 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AXhMem7xLg5B03MeSCX-D-kgvj2Rfoupks5tcAqjgaJpZM4Ohn4q>.
|
I like to read the internal GPS from the Horus via LUA Script to implement a Widget which can show me the distance between model (is also equipped with a GPS) and pilot.
For this widget I need access to the internal GPS from the Horus via LUA. Currently I did much research including reading much opentx code but did not find any suggestion how the internal gps is available. Could anybody help me please?
The text was updated successfully, but these errors were encountered: