Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request an option to format CSV output. #475

Open
goehle opened this issue Jul 29, 2020 · 2 comments
Open

Request an option to format CSV output. #475

goehle opened this issue Jul 29, 2020 · 2 comments

Comments

@goehle
Copy link

goehle commented Jul 29, 2020

  • what are you trying to do? We are printing debugging output to a CSV using the common::CSV class. The debugging information includes reported latitude and longitude at each time step.

  • what is the problem and how can it be recreated? CSV uses std::to_string to print the rows which produces 6 decimal places. This isn't enough for latitudes and longitudes. For debugging purposes we usually use 12 decimal places. One solution would be to modify CSV to use something like sprintf and allow for formatting fields. Another solution would be to modify CSV to support string inputs to rows so that entries could be preformatted.

  • what scrimmage commit are you on? You can see this with git rev-parse HEAD
    cb566bc

  • describe any changes you made to scrimmage.
    None. We could add the feature ourselves but don't want to fork the CSV library.

  • If you can recreate the issue using only plugins in the scrimmage repository, what mission file are you running?
    N/A

@mday299
Copy link

mday299 commented Sep 29, 2020

@goehle Confirming: is this the Apache library at https://commons.apache.org/proper/commons-csv/

If so, what is preventing you from submitting a patch yourself to https://github.com/apache/commons-csv ?

@goehle
Copy link
Author

goehle commented Sep 29, 2020

I was referring to https://github.com/gtri/scrimmage/blob/master/src/common/CSV.cpp Now that you suggest it though, I should amend my feature request to just replace the homegrown CSV library with a wrapper around a more fully featured one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants