diff --git a/Makefile b/Makefile index e6aaebb..288c486 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CFLAGS = -O3 -Wall -ggdb -CXXFLAGS:= -std=gnu++17 -Wall -O3 -MMD -MP -ggdb -fno-omit-frame-pointer -Iext/CLI11 \ +CXXFLAGS:= -std=gnu++17 -Wall -O0 -MMD -MP -fno-omit-frame-pointer -Iext/CLI11 \ -Iext/fmt-5.2.1/include/ -Iext/powerblog/ext/simplesocket -Iext/powerblog/ext/ \ -I/usr/local/opt/openssl/include/ \ -Iext/sgp4/libsgp4/ \ diff --git a/ephemeris.hh b/ephemeris.hh index 7729e04..bdbb487 100644 --- a/ephemeris.hh +++ b/ephemeris.hh @@ -1,9 +1,21 @@ #pragma once #include "minivec.hh" #include +#include + // lat, lon, height (rad, rad, meters) std::tuple ecefToWGS84(double x, double y, double z); +// lat, lon, height (deg, deg, meters) +inline std::tuple ecefToWGS84Deg(double x, double y, double z) +{ + auto ret = ecefToWGS84(x, y, z); + std::get<0>(ret) /= (M_PI / 180); + std::get<1>(ret) /= (M_PI / 180); + return ret; +} + + double ephAge(double tow, int t0e); template diff --git a/ext/powerblog b/ext/powerblog index bb78d2f..9f53fbb 160000 --- a/ext/powerblog +++ b/ext/powerblog @@ -1 +1 @@ -Subproject commit bb78d2f67c5db647f32e1c958ac55a914386cad8 +Subproject commit 9f53fbba7d910ca06f73149d5ec375f73a85e5ac diff --git a/ubxtool.cc b/ubxtool.cc index 1f05124..1413785 100644 --- a/ubxtool.cc +++ b/ubxtool.cc @@ -1632,7 +1632,12 @@ int main(int argc, char** argv) NS.iTow = 0; if(memcmp(&NS, &lastNS, sizeof(NS))) { cerr<(latlonh)<<" lon "<< get<1>(latlonh) << " h " << get<2>(latlonh) << endl; } lastNS = NS; }