-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Conversation
Changed GPS sensor data to contain information about elevation data. However the elevation might not be in right units.
There was a problem hiding this 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()}, |
There was a problem hiding this comment.
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}); | ||
|
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 🙏
Changed GPS sensor data to contain information about elevation data and for that data to be sent over in the positionReport Json.