You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phoenix uses a barometric pressure sensor to derive its altitude. This sensor is critical for knowing when to deploy the parachute.
Because the altimeter uses barometric pressure to derive altitude, there will be some noise and some error. Our goal here is to create a 'virtual' altimeter that, given the true position of the rocket in the simulation, outputs a noisy and less certain estimate.
This is essentially a one-dimensional version of #2. Unlike the virtual GPS, this sensor is not rate-limited.
Requirements
Create a VirtualBarometer class
In its constructor, it should take...
long random_seed -- This is the seed of the random number generator
double altitude_of_launch_site -- The altitude of the launch site
double noise -- The maximum magnitude of error.
It should have a double get_reported_altitude(double deltaTime) function that produces an estimate of altitude that is noisy based on the input parameters.
For any given deltaTime1=deltaTime2, this function must have the condition get_reported_altitude(deltaTime1)== get_reported_altitude(deltaTime2). In other words, calling this function multiple times for the same simulation step should produce the same result. It should only produce a different result every step.
While this virtual barometer should use randomness to simulate measurement noise, do note that **rpl-sim should be deterministic between runs.` In other words, on a given machine, running the simulation with the same input parameters should always produce the same output.
Testing
This should be thoroughly unit tested. Determinism should also be something you should test for.
The text was updated successfully, but these errors were encountered:
Background
Phoenix uses a barometric pressure sensor to derive its altitude. This sensor is critical for knowing when to deploy the parachute.
Because the altimeter uses barometric pressure to derive altitude, there will be some noise and some error. Our goal here is to create a 'virtual' altimeter that, given the true position of the rocket in the simulation, outputs a noisy and less certain estimate.
This is essentially a one-dimensional version of #2. Unlike the virtual GPS, this sensor is not rate-limited.
Requirements
VirtualBarometer
classlong random_seed
-- This is the seed of the random number generatordouble altitude_of_launch_site
-- The altitude of the launch sitedouble noise
-- The maximum magnitude of error.double get_reported_altitude(double deltaTime)
function that produces an estimate of altitude that is noisy based on the input parameters.deltaTime1=deltaTime2
, this function must have the conditionget_reported_altitude(deltaTime1)== get_reported_altitude(deltaTime2)
. In other words, calling this function multiple times for the same simulation step should produce the same result. It should only produce a different result every step.rpl-sim
should be deterministic between runs.` In other words, on a given machine, running the simulation with the same input parameters should always produce the same output.Testing
This should be thoroughly unit tested. Determinism should also be something you should test for.
The text was updated successfully, but these errors were encountered: