35#define GPS_NPS_PACC 200
40#define GPS_NPS_HACC 120
45#define GPS_NPS_VACC 180
50#define GPS_NPS_SACC 20
55#define GPS_NPS_PDOP 140
62 if (gps_start_ms == 0) {
64 clock_gettime(CLOCK_REALTIME, &now);
96 gps_nps.ned_vel.x = ned_vel_d.
x * 100;
97 gps_nps.ned_vel.y = ned_vel_d.
y * 100;
98 gps_nps.ned_vel.z = ned_vel_d.
z * 100;
102 gps_nps.gspeed = sqrt(ned_vel_d.
x * ned_vel_d.
x + ned_vel_d.
y * ned_vel_d.
y) * 100;
103 gps_nps.speed_3d = sqrt(ned_vel_d.
x * ned_vel_d.
x + ned_vel_d.
y * ned_vel_d.
y + ned_vel_d.
z * ned_vel_d.
z) * 100;
105#if GpsId(PRIMARY_GPS) == GPS_DATALINK_ID
107 gps_nps.course =
fdm.ltp_to_body_eulers.psi * 1e7;
110 gps_nps.course = atan2(ned_vel_d.
y, ned_vel_d.
x) * 1e7;
Main include for ABI (AirBorneInterface).
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Handling of messages coming from ground and other A/Cs.
Device independent GPS code (interface).
#define GPS_VALID_VEL_ECEF_BIT
#define GPS_VALID_VEL_NED_BIT
#define GPS_VALID_POS_LLA_BIT
#define GPS_FIX_NONE
No GPS fix.
#define GPS_VALID_POS_ECEF_BIT
#define GPS_VALID_HMSL_BIT
#define GPS_FIX_3D
3D GPS fix
#define GPS_VALID_COURSE_BIT
data structure for GPS information
void gps_feed_value(void)
#define GPS_NPS_PACC
Simulated position accuracy (cm).
#define GPS_NPS_PDOP
Simulated position dilution of precision (x100).
#define GPS_NPS_VACC
Simulated vertical position accuracy (cm).
#define GPS_NPS_SACC
Simulated speed accuracy (cm/s).
#define GPS_NPS_HACC
Simulated horizontal position accuracy (cm).
void ltp_def_from_ecef_d(struct LtpDef_d *def, struct EcefCoor_d *ecef)
void ned_of_ecef_vect_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
definition of the local (flat earth) coordinate system
vector in North East Down coordinates Units: meters
struct NpsFdm fdm
Holds all necessary NPS FDM state information.
volatile uint32_t nb_sec
full seconds since startup
#define SYS_TIME_GPS_LEAP_SECONDS
Difference between GPS time and UTC.
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
#define SYS_TIME_MSEC_PER_WEEK
#define SYS_TIME_UNIX_GPS_EPOCH_MS
unix time of the GPS epoch (1980-01-06) in ms
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned long long uint64_t