Skip to content

Commit

Permalink
Merge pull request riebl#234 from khevessy/socktap-gpsd
Browse files Browse the repository at this point in the history
Fix my bugs in riebl#233
  • Loading branch information
riebl authored Aug 23, 2024
2 parents a63d1ae + 7b281ea commit 234d00f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/socktap/cam_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void CamApplication::on_timer(Clock::time_point)

auto position = positioning_.position_fix();

if (!std::isfinite(position.latitude.value()) || !std::isfinite(position.latitude.value())) {
if (!std::isfinite(position.latitude.value()) || !std::isfinite(position.longitude.value())) {
std::cerr << "Skipping CAM, because no good position is available, yet." << std::endl;
return;
}
Expand Down
4 changes: 2 additions & 2 deletions vanetza/facilities/cam_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ void copy(const PositionFix& position, ReferencePosition& reference_position) {
reference_position.longitude = round(position.longitude, microdegree) * Longitude_oneMicrodegreeEast;
reference_position.latitude = round(position.latitude, microdegree) * Latitude_oneMicrodegreeNorth;
if (std::isfinite(position.confidence.semi_major.value())
&& std::isfinite(position.confidence.semi_major.value()))
&& std::isfinite(position.confidence.semi_minor.value()))
{
if ((position.confidence.semi_major.value() * 100 < SemiAxisLength_outOfRange)
&& (position.confidence.semi_major.value() * 100 < SemiAxisLength_outOfRange)
&& (position.confidence.semi_minor.value() * 100 < SemiAxisLength_outOfRange)
&& (position.confidence.orientation.value() * 10 < HeadingValue_unavailable))
{
reference_position.positionConfidenceEllipse.semiMajorConfidence = position.confidence.semi_major.value() * 100; // Value in centimeters
Expand Down

0 comments on commit 234d00f

Please sign in to comment.