Skip to content

Commit

Permalink
monitoring: add time accuracy in json output
Browse files Browse the repository at this point in the history
Export time accuracy metric into monitoring data

Signed-off-by: Vadim Fedorenko <vadfed@meta.com>
  • Loading branch information
vvfedorenko authored and agagniere committed Apr 6, 2024
1 parent efab0a9 commit d5ccb78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gnss.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,8 @@ static void * gnss_thread(void * p_data)
gnss_info->lsChange = gnss->session->context->lsChange;
gnss_info->satellites_count = gnss->session->satellites_count;
gnss_info->survey_in_position_error = gnss->session->survey_in_position_error;
gnss_info->time_accuracy = gnss->session->time_accuracy;
gnss_info->position_accuracy = gnss->session->position_accuracy;
pthread_mutex_unlock(&gnss_info->lock);
}

Expand Down
2 changes: 2 additions & 0 deletions src/monitoring.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@ static void json_add_gnss_data(struct json_object *resp, struct monitoring *moni
json_object_new_int(monitoring->gnss_info.satellites_count));
json_object_object_add(gnss, "survey_in_position_error",
json_object_new_int(monitoring->gnss_info.survey_in_position_error));
json_object_object_add(gnss, "time_accuracy",
json_object_new_int(monitoring->gnss_info.time_accuracy));

json_object_object_add(resp, "gnss", gnss);
}
Expand Down

0 comments on commit d5ccb78

Please sign in to comment.