Skip to content

Commit

Permalink
Updated Telemetry for Resurgence (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanzhao2021 authored Oct 28, 2023
1 parent 6c18297 commit 6d59368
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/network/MissionControlProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,11 @@ void MissionControlProtocol::sendRoverPos() {
Eigen::Quaterniond quat(Eigen::AngleAxisd(rpy.roll, Eigen::Vector3d::UnitX()) *
Eigen::AngleAxisd(rpy.pitch, Eigen::Vector3d::UnitY()) *
Eigen::AngleAxisd(rpy.yaw, Eigen::Vector3d::UnitZ()));
double posX = 0, posY = 0;
double lon = 0, lat = 0;
if (gps.isValid()) {
posX = gps.getData().lon;
posY = gps.getData().lat;
lon = gps.getData().lon;
lat = gps.getData().lat;
}
double posZ = 0.0;
double imuRecency = util::durationToSec(dataclock::now() - imu.getTime());
double recency = imuRecency;
if (gps.isValid()) {
Expand All @@ -213,9 +212,8 @@ void MissionControlProtocol::sendRoverPos() {
{"orientX", quat.x()},
{"orientY", quat.y()},
{"orientZ", quat.z()},
{"posX", posX},
{"posY", posY},
{"posZ", posZ},
{"lon", lon},
{"lat", lat},
{"recency", recency}};
this->_server.sendJSON(Constants::MC_PROTOCOL_NAME, msg);
}
Expand Down

0 comments on commit 6d59368

Please sign in to comment.