diff --git a/chirpstack/src/integration/loracloud/client.rs b/chirpstack/src/integration/loracloud/client.rs index a0e12159..bd84a76a 100644 --- a/chirpstack/src/integration/loracloud/client.rs +++ b/chirpstack/src/integration/loracloud/client.rs @@ -663,11 +663,12 @@ pub struct LoraDownlink { // PositionSolution implements the Positition Solution object. #[derive(Serialize, Deserialize, Clone)] pub struct PositionSolution { - pub ecef: Vec, + pub algorithm_type: Option, + pub ecef: Option>, pub llh: Vec, - pub capture_time_gps: f64, - pub gdop: f64, - pub accuracy: f32, + pub capture_time_gps: Option, + pub gdop: Option, + pub accuracy: Option, pub timestamp: f64, } diff --git a/chirpstack/src/integration/loracloud/mod.rs b/chirpstack/src/integration/loracloud/mod.rs index d4423e3e..e65dd570 100644 --- a/chirpstack/src/integration/loracloud/mod.rs +++ b/chirpstack/src/integration/loracloud/mod.rs @@ -192,6 +192,9 @@ impl Integration { return Err(anyhow!("{}", resp.error)); } + self.handle_response_integration_event(vars, pl, &resp.result) + .await?; + if self.config.modem_geolocation_services.parse_tlv && resp.result.stream_records.is_some() { self.handle_response_tlv_records( @@ -202,9 +205,6 @@ impl Integration { .await?; } - self.handle_response_integration_event(vars, pl, &resp.result) - .await?; - if let Some(v) = &resp.result.downlink { self.handle_response_downlink(pl, v).await?; } @@ -427,7 +427,7 @@ impl Integration { longitude: result.llh[1], altitude: result.llh[2], source: source.into(), - accuracy: result.accuracy, + accuracy: result.accuracy.unwrap_or_default(), }), };