Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
nps_sensor_baro.c
Go to the documentation of this file.
1
#include "
nps_sensor_baro.h
"
2
3
#include "generated/airframe.h"
4
5
#include "
std.h
"
6
#include "
nps_fdm.h
"
7
#include "
nps_random.h
"
8
#include "
nps_sensors.h
"
9
10
#ifndef NPS_BARO_NOISE_STD_DEV
11
#define NPS_BARO_NOISE_STD_DEV 0.
12
#endif
13
14
void
nps_sensor_baro_init
(
struct
NpsSensorBaro
*baro,
double
time)
15
{
16
baro->
value
= 0.;
17
baro->
noise_std_dev
=
NPS_BARO_NOISE_STD_DEV
;
18
baro->
next_update
=
time
;
19
baro->
data_available
=
FALSE
;
20
}
14
void
nps_sensor_baro_init
(
struct
NpsSensorBaro
*baro,
double
time) {
…
}
21
22
23
void
nps_sensor_baro_run_step
(
struct
NpsSensorBaro
*baro,
double
time)
24
{
25
if
(
time < baro->
next_update) {
26
return
;
27
}
28
29
/* pressure in Pascal */
30
baro->
value
=
fdm
.
pressure
;
31
/* add noise with std dev Pascal */
32
baro->
value
+=
get_gaussian_noise
() * baro->
noise_std_dev
;
33
34
baro->
next_update
+=
NPS_BARO_DT
;
35
baro->
data_available
=
TRUE
;
36
}
23
void
nps_sensor_baro_run_step
(
struct
NpsSensorBaro
*baro,
double
time) {
…
}
time
float time
Definition
eff_scheduling_rotwing_V2.c:400
foo
uint16_t foo
Definition
main_demo5.c:58
nps_fdm.h
NpsFdm::pressure
double pressure
current (static) atmospheric pressure in Pascal
Definition
nps_fdm.h:110
fdm
struct NpsFdm fdm
Holds all necessary NPS FDM state information.
Definition
nps_fdm_crrcsim.c:84
get_gaussian_noise
double get_gaussian_noise(void)
Definition
nps_random.c:109
nps_random.h
nps_sensor_baro_init
void nps_sensor_baro_init(struct NpsSensorBaro *baro, double time)
Definition
nps_sensor_baro.c:14
nps_sensor_baro_run_step
void nps_sensor_baro_run_step(struct NpsSensorBaro *baro, double time)
Definition
nps_sensor_baro.c:23
NPS_BARO_NOISE_STD_DEV
#define NPS_BARO_NOISE_STD_DEV
Definition
nps_sensor_baro.c:11
nps_sensor_baro.h
NpsSensorBaro::data_available
bool data_available
Definition
nps_sensor_baro.h:13
NpsSensorBaro::noise_std_dev
double noise_std_dev
noise standard deviation
Definition
nps_sensor_baro.h:11
NpsSensorBaro::next_update
double next_update
Definition
nps_sensor_baro.h:12
NpsSensorBaro::value
double value
pressure in Pascal
Definition
nps_sensor_baro.h:10
NpsSensorBaro
Definition
nps_sensor_baro.h:9
nps_sensors.h
std.h
TRUE
#define TRUE
Definition
std.h:4
FALSE
#define FALSE
Definition
std.h:5
sw
simulator
nps
nps_sensor_baro.c
Generated on Fri Apr 4 2025 14:56:52 for Paparazzi UAS by
1.9.8