21namespace localization {
25 BandObservationMsg* out) {
27 if (in.has_band_id()) {
28 out->set_band_id(GnssBandID(in.
band_id()));
30 if (in.has_frequency_value()) {
33 if (in.has_pseudo_type()) {
36 if (in.has_pseudo_range()) {
39 if (in.has_carrier_phase()) {
42 if (in.has_loss_lock_index()) {
45 if (in.has_doppler()) {
49 out->set_snr(in.
snr());
55 SatelliteObservationMsg* out) {
57 if (in.has_sat_prn()) {
60 if (in.has_sat_sys()) {
61 out->set_sat_sys(GnssType(in.
sat_sys()));
63 if (in.has_band_obs_num()) {
66 out->clear_band_obs();
67 for (
int idx = 0; idx < in.band_obs_size(); ++idx) {
68 auto tmp = out->add_band_obs();
75 EpochObservationMsg* out) {
77 if (in.has_receiver_id()) {
80 if (in.has_gnss_time_type()) {
83 if (in.has_gnss_week()) {
86 if (in.has_gnss_second_s()) {
89 if (in.has_position_x()) {
92 if (in.has_position_y()) {
95 if (in.has_position_z()) {
98 if (in.has_health_flag()) {
101 if (in.has_sat_obs_num()) {
104 out->clear_sat_obs();
105 for (
int idx = 0; idx < in.sat_obs_size(); ++idx) {
106 auto tmp = out->add_sat_obs();
112 KepplerOrbitMsg* out) {
114 if (in.has_gnss_type()) {
115 out->set_gnss_type(GnssType(in.
gnss_type()));
117 if (in.has_sat_prn()) {
118 out->set_sat_prn(in.
sat_prn());
120 if (in.has_gnss_time_type()) {
124 out->set_year(in.
year());
126 if (in.has_month()) {
127 out->set_month(in.
month());
130 out->set_day(in.
day());
133 out->set_hour(in.
hour());
135 if (in.has_minute()) {
136 out->set_minute(in.
minute());
138 if (in.has_second_s()) {
141 if (in.has_week_num()) {
144 if (in.has_reserved()) {
148 out->set_af0(in.
af0());
151 out->set_af1(in.
af1());
154 out->set_af2(in.
af2());
157 out->set_iode(in.
iode());
159 if (in.has_deltan()) {
160 out->set_deltan(in.
deltan());
163 out->set_m0(in.
m0());
168 if (in.has_roota()) {
169 out->set_roota(in.
roota());
172 out->set_toe(in.
toe());
175 out->set_toc(in.
toc());
178 out->set_cic(in.
cic());
181 out->set_crc(in.
crc());
184 out->set_cis(in.
cis());
187 out->set_crs(in.
crs());
190 out->set_cuc(in.
cuc());
193 out->set_cus(in.
cus());
195 if (in.has_omega0()) {
196 out->set_omega0(in.
omega0());
198 if (in.has_omega()) {
199 out->set_omega(in.
omega());
202 out->set_i0(in.
i0());
204 if (in.has_omegadot()) {
208 out->set_idot(in.
idot());
210 if (in.has_codesonl2channel()) {
211 out->set_codesonl2channel(in.codesonl2channel());
213 if (in.has_l2pdataflag()) {
214 out->set_l2pdataflag(in.l2pdataflag());
216 if (in.has_accuracy()) {
219 if (in.has_health()) {
220 out->set_health(in.
health());
223 out->set_tgd(in.
tgd());
226 out->set_iodc(in.
iodc());
231 GlonassOrbitMsg* out) {
233 if (in.has_gnss_type()) {
234 out->set_gnss_type(GnssType(in.
gnss_type()));
236 if (in.has_slot_prn()) {
239 if (in.has_gnss_time_type()) {
243 out->set_toe(in.
toe());
246 out->set_year(in.
year());
248 if (in.has_month()) {
249 out->set_month(in.
month());
252 out->set_day(in.
day());
255 out->set_hour(in.
hour());
257 if (in.has_minute()) {
258 out->set_minute(in.
minute());
260 if (in.has_second_s()) {
263 if (in.has_frequency_no()) {
266 if (in.has_week_num()) {
269 if (in.has_week_second_s()) {
273 out->set_tk(in.
tk());
275 if (in.has_clock_offset()) {
278 if (in.has_clock_drift()) {
281 if (in.has_health()) {
282 out->set_health(in.
health());
284 if (in.has_position_x()) {
287 if (in.has_position_y()) {
290 if (in.has_position_z()) {
293 if (in.has_velocity_x()) {
296 if (in.has_velocity_y()) {
299 if (in.has_velocity_z()) {
302 if (in.has_accelerate_x()) {
305 if (in.has_accelerate_y()) {
308 if (in.has_accelerate_z()) {
311 if (in.has_infor_age()) {
317 GnssEphemerisMsg* out) {
319 if (in.has_gnss_type()) {
320 out->set_gnss_type(GnssType(in.
gnss_type()));
322 if (in.has_keppler_orbit()) {
323 auto tmp = out->mutable_keppler_orbit();
326 if (in.has_glonass_orbit()) {
327 auto tmp = out->mutable_glonass_orbit();
static void Transfer(const apollo::drivers::gnss::BandObservation &in, BandObservationMsg *out)
The class of GnssMsgTransfer
optional GnssBandID band_id
optional double frequency_value
optional double pseudo_range
optional double carrier_phase
optional PseudoType pseudo_type
optional uint32 loss_lock_index
optional double position_z
repeated SatelliteObservation sat_obs
optional double gnss_second_s
optional uint32 sat_obs_num
optional uint32 gnss_week
optional uint32 health_flag
optional GnssTimeType gnss_time_type
optional double position_y
optional uint32 receiver_id
optional double position_x
optional double velocity_z
optional double velocity_y
optional double position_x
optional double accelerate_y
optional double position_y
optional double position_z
optional double velocity_x
optional double accelerate_z
optional double infor_age
optional double clock_offset
optional double week_second_s
optional int32 frequency_no
optional double accelerate_x
optional double clock_drift
optional GnssTimeType gnss_time_type
optional GnssType gnss_type
optional GnssType gnss_type
optional GlonassOrbit glonass_orbit
optional KepplerOrbit keppler_orbit
optional GnssType gnss_type
optional GnssTimeType gnss_time_type
optional GnssType sat_sys
repeated BandObservation band_obs
optional uint32 band_obs_num