You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ x] I have searched the issues of this repository and believe that this is not a duplicate.
Summary
I have investigated the consentratord backend code and found that the Fine timestamp information basis on PPS signal missing from current implementation?
Consertratord-sx1302 implementation has been build on Semtechs's HAL library (libloragw). Sx1302_hal library includes code for Fine timestamp implementation (for hardware with PPS signal). It seems that the Fine Timestamp solution can be added to consertratord-sx1302 backend quite easily.
A Fine Timestamp is used to get the TDoA geolocation of the transmitter (sensor).
Implementation description - Solution proposal
Add Fine Timestamp information to the up-event of the concentratord-sx1302 backend.
1) consertratord.toml
consertratord.toml file found in the same folder where chirpstack-concentratord-sx1302 executable is. Following lines to be added into consertratord.toml configuration file for enabling Fine Timestamp functionality:
model_flags=["USB","GNSS"]
[gateway.fine_timestamp]
enable=true
mode="ALL_SF"
# LoRa gateway configuration.
[gateway]
# Antenna gain (dB).
antenna_gain=0
# Public LoRaWAN network.
lorawan_public=true
# Gateway vendor / model.
#
# This configures various vendor and model specific settings like the min / max
# frequency and TX gain table.
#model="rak_2287_eu868"
model="semtech_sx1302css868gw1_eu868"
# Gateway vendor / model flags.
#
# Flag can be used to configure additional vendor / model features. The
# following flags can be used:
#
# Global flags:
# GNSS - Enable GNSS / GPS support
# USB - Use USB for concentrator communication (default is SPI)
model_flags=["USB","GNSS"]
# Time fallback.
#
# In case the gateway does not have a GNSS module or is unable to aquire a
# GNSS fix, use the system-time for setting the 'time' field on RX.
time_fallback_enabled=true
#Fine Timestamp
#mode: HIGH_CAPACITY or ALL_SF
[gateway.fine_timestamp]
enable=true
mode="ALL_SF"
Now consertratord-sx1302 log shows Fine Timestamp information "...fts: 143869299, fts_recv: true". The Fts field is a nano secons since last trailing edge of the PPS signal of the GPS module. This nano second information is need for aproximation of the geolocation.
pub fn uplink_to_proto() returns Resultgw::UplinkFrame. fine_time_since_gps_epoch structe is added to gw::UplinkFrame. packet.ftime field holds precise receiving time information if Fine Timestamp property is enabled on consertratord-sx1302.
fine_time_since_gps_epoch: match packet.ftime_received {
true => Some(prost_types::Duration {
seconds: 0i64,
nanos: packet.ftime as i32
}),
false => None
},
And here is whole changed uplink_to_proto() function.
I wrote a simple Rust zeromq client program for printing up-events of the consertratord-sx1302 backend. Now Fine Timestamp information found in fine_time_since_gps_epoch: Some(Duration { seconds: 0, nanos: 48290698 }) Structure as follows. In this example second part is allway zere. Only nano second part matters for the geolocation calculations.
Hi @LouneCode please do create a pull-request for this 👍
I think we can use the seconds part of the time_since_gps_epoch for the fine_time_since_gps_epoch + the packet.ftime as nanos, then we have the full duration since GPS epoch.
Summary
I have investigated the consentratord backend code and found that the Fine timestamp information basis on PPS signal missing from current implementation?
Consertratord-sx1302 implementation has been build on Semtechs's HAL library (libloragw). Sx1302_hal library includes code for Fine timestamp implementation (for hardware with PPS signal). It seems that the Fine Timestamp solution can be added to consertratord-sx1302 backend quite easily.
Similar cases can be found from following issues:
What is the use-case?
A Fine Timestamp is used to get the TDoA geolocation of the transmitter (sensor).
Implementation description - Solution proposal
Add Fine Timestamp information to the up-event of the concentratord-sx1302 backend.
1) consertratord.toml
consertratord.toml file found in the same folder where
chirpstack-concentratord-sx1302
executable is. Following lines to be added into consertratord.toml configuration file for enabling Fine Timestamp functionality:model_flags=["USB","GNSS"]
[gateway.fine_timestamp]
enable=true
mode="ALL_SF"
2) chirpstack-concentratord-sx1302/src/handler/uplink.rs
Added
frame.ftime
andframe.ftime_received
fields and needed formating to info!() macro.Now consertratord-sx1302 log shows Fine Timestamp information "...fts: 143869299, fts_recv: true". The
Fts
field is a nano secons since last trailing edge of the PPS signal of the GPS module. This nano second information is need for aproximation of the geolocation.3) chirpstack-concentratord-sx1302/src/wrapper/mod.rs
pub fn uplink_to_proto() returns Resultgw::UplinkFrame. fine_time_since_gps_epoch structe is added to gw::UplinkFrame.
packet.ftime
field holds precise receiving time information if Fine Timestamp property is enabled on consertratord-sx1302.And here is whole changed uplink_to_proto() function.
I wrote a simple Rust zeromq client program for printing up-events of the consertratord-sx1302 backend. Now Fine Timestamp information found in
fine_time_since_gps_epoch: Some(Duration { seconds: 0, nanos: 48290698 })
Structure as follows. In this example second part is allway zere. Only nano second part matters for the geolocation calculations.Can you implement this by yourself and make a pull request?
Yes ! can. I have a smoke tested this solution proposal and it seems to work . But first let's wait for the review and comments of the idea....
The text was updated successfully, but these errors were encountered: