Skip to content

Optimization with Time Flag#60

Open
Eesha-Jain wants to merge 23 commits into
mainfrom
optimization-with-time-flag
Open

Optimization with Time Flag#60
Eesha-Jain wants to merge 23 commits into
mainfrom
optimization-with-time-flag

Conversation

@Eesha-Jain

@Eesha-Jain Eesha-Jain commented Nov 15, 2025

Copy link
Copy Markdown

Description

Resolves #44

Adds a time flag request to found's distance command that marks when the image was taken (in nanoseconds). This allows for a more accurate understanding of the satellite's latitude and longitude. Currently outputs time into the outputted .found file.

This PR also modifies the output of output.cpp's GetEarthCoordinates function to be ECEF coordinates. This is the standard set for representing position by NASA (example: https://ntrs.nasa.gov/api/citations/20190002515/downloads/20190002515.pdf) and other space grade receivers.

Note that the nanoseconds since epoch is being stored as an unsigned 64-bit integer throughout the code. This can reliably store up until the year 2557.

Artifacts for PR #60 (DO NOT CHANGE)

@Eesha-Jain Eesha-Jain linked an issue Nov 15, 2025 that may be closed by this pull request
Comment thread test/integration/integration-test.cpp
Comment thread README.md Outdated
Copilot AI review requested due to automatic review settings December 14, 2025 23:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a --image-time flag to the distance command that records when an image was captured, enabling more accurate satellite position calculations by using the actual image capture time instead of the current system time. The timestamp is stored in the output .found file.

  • Adds new strtodatetime converter function to parse datetime strings in YYYY-MM-DD HH:MM:SS format
  • Replaces automatic timestamp generation with user-provided image capture time in position records
  • Updates all distance command tests and README documentation to include the new time parameter

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/providers/converters.hpp Adds strtodatetime function to convert string timestamps to DateTime structures
src/command-line/parsing/options.hpp Adds image-time option definition for the distance command
src/command-line/execution/executors.cpp Modifies OutputResults to use provided imageTime instead of calling getUT1Time()
test/integration/integration-test.cpp Updates integration tests to include the new --image-time parameter and removes obsolete test
test/command-line/parsing/parser-test.cpp Adds parser tests for the new imageTime field
test/command-line/execution/executors-test.cpp Updates executor test to include sample imageTime data
README.md Updates documentation and examples to show usage of the new --image-time flag

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread README.md
Comment thread README.md
Comment thread src/providers/converters.hpp Outdated
Comment thread README.md Outdated

@nguy8tri nguy8tri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is by no means comprehensive, but great job, just left some comments!

Comment thread src/common/spatial/attitude-utils.hpp Outdated
Comment thread src/common/time/time.cpp Outdated
Comment thread src/common/time/time.hpp Outdated
Comment thread src/common/decimal.hpp Outdated
Comment thread src/distance/output.cpp Outdated
Comment thread src/providers/converters.hpp Outdated

@nguy8tri nguy8tri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job on the fixes. This time, my comments are more towards having you think critically about some code changes you've made. Please respond to my comments as appropriate. Also if it takes a long time for me to review your code, ping me on slack so I can make time for it.

Comment thread src/common/spatial/attitude-utils.hpp
Comment thread src/common/time/time.cpp Outdated
Comment thread src/common/time/time.cpp Outdated
Comment thread src/common/time/time.cpp Outdated
Comment thread src/common/time/time.cpp Outdated
Comment thread src/distance/output.cpp Outdated
Comment thread src/distance/output.hpp Outdated
Comment thread test/providers/converters-test.cpp Outdated
Comment thread test/providers/converters-test.cpp
Comment thread README.md Outdated
@j4lando

j4lando commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

It might be better to replace celestial coordinate with equatorial coordinate since equatorial coordinates are a specific definition of celestial coordinates.

@Eesha-Jain

Copy link
Copy Markdown
Author

It seems that you changed celestial to equatorial in your PR, so I won't implement that here to prevent merge conflicts in the future

@Eesha-Jain Eesha-Jain force-pushed the optimization-with-time-flag branch from 385ce43 to 1d8013f Compare March 24, 2026 20:44
@Eesha-Jain Eesha-Jain requested a review from nguy8tri March 26, 2026 18:34

@nguy8tri nguy8tri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, just a few more minor comments.

Comment thread src/common/time/time.cpp
Comment thread src/providers/converters.hpp Outdated
Comment thread src/providers/converters.hpp
Comment thread src/command-line/parsing/options.hpp Outdated
Comment thread test/command-line/parsing/parser-test.cpp Outdated
Comment thread test/common/common.hpp
Comment thread README.md Outdated
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

Successfully merging this pull request may close these issues.

Enhancement/Optimization: Time Flag

4 participants