Skip to content

Commit

Permalink
removeLocationServices
Browse files Browse the repository at this point in the history
  • Loading branch information
MAnn223 committed Jul 29, 2024
1 parent 13fcc84 commit 27799c7
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/cellular/dataCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "cli/conio.hpp"
#include "util.hpp"
#include "imu/imu.hpp"

#include "ubloxGPS.h"
#include "Particle.h"

typedef struct Ensemble10_eventData_
Expand All @@ -32,9 +32,6 @@ void SS_ensemble10Func()
float gyroData[3] = {0,0,0};
float magData[3] = {0,0,0};

LocationPoint point;
LocationService& instance= LocationService::instance();


bool hasGPS = false;
Ensemble10_eventData_t* pData = &ensemble10Data;
Expand Down Expand Up @@ -64,13 +61,17 @@ void SS_ensemble10Func()
temp = pSystemDesc->pTempSensor->getTemp();
#endif

instance.getLocation(point);

if(point.locked == 1 && point.satsInView > 4)
{

bool locked;
unsigned int satsInView;
ubloxGPS* ubloxGps_(nullptr);
locked = (ubloxGps_->getLock()) ? 1 : 0;
gps_sat_t sats_in_view_desc[NUM_SAT_DESC];
satsInView = ubloxGps_->getSatellitesDesc(sats_in_view_desc);
if (locked && satsInView > 4) {
hasGPS = true;
lat = point.latitude;
lng = point.longitude;
lat = ubloxGps_->getLatitude();
lng = ubloxGps_->getLongitude();
}
else
{
Expand Down

0 comments on commit 27799c7

Please sign in to comment.