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

Added elevation data on simulator side #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

PatrickRung
Copy link

Changed GPS sensor data to contain information about elevation data and for that data to be sent over in the positionReport Json.

Changed GPS sensor data to contain information about elevation data. However the elevation might not be in right units.
Copy link
Contributor

@imisaacwu imisaacwu left a comment

Choose a reason for hiding this comment

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

Looks good so far 👍🏻

transform.position.x + _noise * Utilities.GaussianRandom()},
new double[] {initLat, initLon});
transform.position.x + _noise * Utilities.GaussianRandom(),
transform.position.y + _noise * Utilities.GaussianRandom()},
Copy link
Contributor

Choose a reason for hiding this comment

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

If we are reporting the altitude in meters anyway, I don't think we need to pass it into this metersToGPS function

new double[] {initLat, initLon});
transform.position.x + _noise * Utilities.GaussianRandom(),
transform.position.y + _noise * Utilities.GaussianRandom()},
new double[] {initLat, initLon, initAlt});

Copy link
Contributor

Choose a reason for hiding this comment

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

Can probably just insert something like double altitude = transform.position.y + _noise * Utilities.GaussianRandom(); here and use it in the report below


JObject positionReport = new JObject()
{
["type"] = "simGpsPositionReport",
["latitude"] = GPS[0],
["longitude"] = GPS[1]
["longitude"] = GPS[1],
["altitude"] = GPS[2]
};
_socket.Send(positionReport);
Copy link
Contributor

Choose a reason for hiding this comment

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

Make sure to update the READMEs with the updated report packets please 🙏

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.

2 participants