mstrens / oXs_on_RP2040

version of openXsensor to be used on raspberry pi pico RP2040 (more protocols, more functionalities)
87 stars 22 forks source link

Featurerequest: DateTime and PDOP for GPS #24

Closed ParkerEde closed 1 year ago

ParkerEde commented 1 year ago

Hello, would it be possible to get additional datetime and PDOP with the GPS sensor?

Satcomix commented 1 year ago

Hello Mstrens, If it wasn't too much work at the moment, I could also liked this feature in the oXs_on_RP2040, since the internal clock of the FrSky X20S is very imprecise and has to be adjusted regularly. In the older oXs 8.2.15 I could do it with,

define GPS_TRANSMIT_TIME

set in the handheld to get the exact time from the GPS.

br, Torsten

doloebig commented 1 year ago

will be great. I can test on edgetx (Zorro) and OTX (Taranis 2019 plus) also X20S

ParkerEde commented 1 year ago

I would test with x10 express with edgetx2.9.0 and archer SR6 The SR6 is with actual firmware 2.1.11 maximal critical. oxs with arduino does not work properly because the rssi constantly has interruptions. With oxs on rp2040 it's fine

mstrens commented 1 year ago

I propose to add date and time in Sport (not sure it is supported in other protocols) but only for Ublox M7, M8 and upper. This would allow to extract date and time from a frame that is already sent to oXs for those GPS. This frame does not exist for "old" M6.

Satcomix commented 1 year ago

Hello Mstrens, Ver.0.6.0-hott show me the GPS Date Time on my FrSky X20S Ethos. Thank you!!! br, Torsten

ParkerEde commented 1 year ago

Fantastic. @mstrens What do you think about PDOP as Tmp2 sensor? The raw uncalculated value would be fine.

doloebig commented 1 year ago

can confirm Time an date ist on OTX (Taranis 2019 plus) 2.3.14 and Zorro with edgetx as well

Satcomix commented 1 year ago

GPS PDOP ID 0X5101 and GPS Date-Time have full Function on FrSky X20S Ethos 1.4.6 S.PORT protocol. Great work! br, Torsten

ParkerEde commented 1 year ago

GPS, Datetime and PDOP works very well now. Great work and many thanks. Horus X10S Express 2.9.0 EdgeTx, Archer SR6 2.1.11

ParkerEde commented 1 year ago

@mstrens one addition question. Can you set defaultnames to the senors like "SATs" and "PDOP"? I have an issue with edgetx in lua to getvalue with pure numeric sensornames. This doesn't work.

best regards Ralf

mstrens commented 1 year ago

In sport protocol, the sensor can't give a name to a data field. Frsky uses codes in 2 bytes (not 2 alpha characters). Some codes are reserved and so openTx/edge can do the conversion between a code and a name. oXs generates some data that does not have a predefine code. In this case, oXs uses a code in a range reserved for "DIY sensors". In openTx, I think you can assign a name to a telemetry field in the handset once the sensor has been discovered. Perhaps that you can than use this name in Lua. I am not sure (not tested). I presume it is the same for Edge or Ethos.

ParkerEde commented 1 year ago

okay. Thank you. Just in case anyone else needs it. In EdgeTx, a purely numeric sensor name can be read out in this way: getValue(getSourceIndex(CHAR_TELEMETRY.. "5100")) For this, an EdgeTx developer had to dig very deep to find it. Many thanks again to @mstrens for this superfast solution