From 37a4c4a841c047cde6fce8be472eb8d616062540 Mon Sep 17 00:00:00 2001
From: joanvallve <jvallve@iri.upc.edu>
Date: Tue, 9 Mar 2021 10:28:42 +0100
Subject: [PATCH] bug fixed and RTKLIB version

---
 deps/RTKLIB             |  2 +-
 src/utils/satellite.cpp | 19 ++++++++++---------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/deps/RTKLIB b/deps/RTKLIB
index 0260d91..4ab9a19 160000
--- a/deps/RTKLIB
+++ b/deps/RTKLIB
@@ -1 +1 @@
-Subproject commit 0260d91932df0ca0691842aa99b39acde5d49c45
+Subproject commit 4ab9a199ff46b1220fb4fe99b019c8df526e53e9
diff --git a/src/utils/satellite.cpp b/src/utils/satellite.cpp
index f0ebbfc..242f4ad 100644
--- a/src/utils/satellite.cpp
+++ b/src/utils/satellite.cpp
@@ -47,15 +47,16 @@ Satellites computeSatellites(const Observations&             obs,
     //   std::cout << std::endl;
 
     // compute positions
-    satposs(obs.getObservations().front().time,
-            obs.data(),
-            obs.size(),
-            &nav.getNavigation(),
-            eph_opt,
-            rs,
-            dts,
-            var,
-            svh);
+    if (not obs.getObservations().empty())
+        satposs(obs.getObservations().front().time,
+                obs.data(),
+                obs.size(),
+                &nav.getNavigation(),
+                eph_opt,
+                rs,
+                dts,
+                var,
+                svh);
 
     // fill Satellites
     Satellites sats;
-- 
GitLab