GNSS Receiver Class#
- class rocketpy.sensors.GnssReceiver[source]#
Class for the GNSS Receiver sensor.
- Variables:
prints (
_GnssReceiverPrints
) – Object that contains the print functions for the sensor.sampling_rate (
float
) – Sample rate of the sensor in Hz.position_accuracy (
float
) – Accuracy of the sensor interpreted as the standard deviation of the position in meters.altitude_accuracy (
float
) – Accuracy of the sensor interpreted as the standard deviation of the position in meters.name (
str
) – The name of the sensor.measurement (
tuple
) – The measurement of the sensor.measured_data (
list
) – The stored measured data of the sensor.
- __init__(sampling_rate, position_accuracy=0, altitude_accuracy=0, name='GnssReceiver')[source]#
Initialize the Gnss Receiver sensor.
- Parameters:
sampling_rate (
float
) – Sample rate of the sensor in Hz.position_accuracy (
float
) – Accuracy of the sensor interpreted as the standard deviation of the position in meters. Default is 0.altitude_accuracy (
float
) – Accuracy of the sensor interpreted as the standard deviation of the position in meters. Default is 0.name (
str
) – The name of the sensor. Default is “GnssReceiver”.
- measure(time, **kwargs)[source]#
Measure the position of the rocket in latitude, longitude and altitude.
- Parameters:
time (
float
) – Current time in seconds.kwargs (
dict
) –Keyword arguments dictionary containing the following keys: - u : np.array
State vector of the rocket.
- u_dotnp.array
Derivative of the state vector of the rocket.
- relative_positionnp.array
Position of the sensor relative to the rocket center of mass.
- environmentEnvironment
Environment object containing the atmospheric conditions.