77#include " ephemeris.hh"
88#include " bits.hh"
99
10- bool getTOWFromInav (std::basic_string_view <uint8_t > inav, uint32_t *satTOW, uint16_t *wn);
10+ bool getTOWFromInav (const std::vector <uint8_t >& inav, uint32_t *satTOW, uint16_t *wn);
1111
1212struct GalileoMessage : GPSLikeEphemeris
1313{
1414 uint8_t wtype;
1515
16- typedef void (GalileoMessage::*func_t )(std::basic_string_view <uint8_t > page);
16+ typedef void (GalileoMessage::*func_t )(const std::vector <uint8_t >& page);
1717 std::map<int , func_t > parsers{
1818 {0 , &GalileoMessage::parse0},
1919 {1 , &GalileoMessage::parse1},
@@ -34,7 +34,7 @@ struct GalileoMessage : GPSLikeEphemeris
3434 };
3535
3636
37- int parse (std::basic_string_view <uint8_t > page)
37+ int parse (const std::vector <uint8_t >& page)
3838 {
3939 wtype = getbitu (&page[0 ], 0 , 6 );
4040 if (!parsers.count (wtype)) {
@@ -46,7 +46,7 @@ struct GalileoMessage : GPSLikeEphemeris
4646 return wtype;
4747 }
4848
49- int parseFnav (std::basic_string_view <uint8_t > page);
49+ int parseFnav (const std::vector <uint8_t >& page);
5050
5151 uint8_t sparetime{0 };
5252 uint16_t wn{0 };
@@ -58,7 +58,7 @@ struct GalileoMessage : GPSLikeEphemeris
5858
5959
6060 // spare word, only contains a WN and a TOW, but only if the 'time' field is set to 2
61- void parse0 (std::basic_string_view <uint8_t > page)
61+ void parse0 (const std::vector <uint8_t >& page)
6262 {
6363 sparetime = getbitu (&page[0 ], 6 , 2 );
6464 if (sparetime == 2 ) {
@@ -164,7 +164,7 @@ struct GalileoMessage : GPSLikeEphemeris
164164
165165
166166 // an ephemeris word
167- void parse1 (std::basic_string_view <uint8_t > page)
167+ void parse1 (const std::vector <uint8_t >& page)
168168 {
169169 iodnav = getbitu (&page[0 ], 6 , 10 );
170170 t0e = getbitu (&page[0 ], 16 , 14 );
@@ -174,7 +174,7 @@ struct GalileoMessage : GPSLikeEphemeris
174174 }
175175
176176 // another ephemeris word
177- void parse2 (std::basic_string_view <uint8_t > page)
177+ void parse2 (const std::vector <uint8_t >& page)
178178 {
179179 iodnav = getbitu (&page[0 ], 6 , 10 );
180180 omega0 = getbits (&page[0 ], 16 , 32 );
@@ -184,7 +184,7 @@ struct GalileoMessage : GPSLikeEphemeris
184184 }
185185
186186 // yet another ephemeris word
187- void parse3 (std::basic_string_view <uint8_t > page)
187+ void parse3 (const std::vector <uint8_t >& page)
188188 {
189189 iodnav = getbitu (&page[0 ], 6 , 10 );
190190 omegadot = getbits (&page[0 ], 16 , 24 );
@@ -264,7 +264,7 @@ struct GalileoMessage : GPSLikeEphemeris
264264
265265
266266 // can't get enough of that ephemeris
267- void parse4 (std::basic_string_view <uint8_t > page)
267+ void parse4 (const std::vector <uint8_t >& page)
268268 {
269269 iodnav = getbitu (&page[0 ], 6 , 10 );
270270 cic = getbits (&page[0 ], 22 , 16 );
@@ -277,7 +277,7 @@ struct GalileoMessage : GPSLikeEphemeris
277277 }
278278
279279 // ionospheric disturbance, health, group delay, time
280- void parse5 (std::basic_string_view <uint8_t > page)
280+ void parse5 (const std::vector <uint8_t >& page)
281281 {
282282 ai0 = getbitu (&page[0 ], 6 , 11 );
283283 ai1 = getbits (&page[0 ], 17 , 11 ); // ai1 & 2 are signed, 0 not
@@ -300,7 +300,7 @@ struct GalileoMessage : GPSLikeEphemeris
300300 }
301301
302302 // time stuff
303- void parse6 (std::basic_string_view <uint8_t > page)
303+ void parse6 (const std::vector <uint8_t >& page)
304304 {
305305 a0 = getbits (&page[0 ], 6 , 32 );
306306 a1 = getbits (&page[0 ], 38 , 24 );
@@ -315,7 +315,7 @@ struct GalileoMessage : GPSLikeEphemeris
315315 }
316316
317317 // almanac
318- void parse7 (std::basic_string_view <uint8_t > page)
318+ void parse7 (const std::vector <uint8_t >& page)
319319 {
320320 iodalmanac = getbitu (&page[0 ], 6 , 4 );
321321 alma1.wnalmanac = wnalmanac = getbitu (&page[0 ], 10 , 2 );
@@ -331,7 +331,7 @@ struct GalileoMessage : GPSLikeEphemeris
331331
332332 }
333333 // almanac
334- void parse8 (std::basic_string_view <uint8_t > page)
334+ void parse8 (const std::vector <uint8_t >& page)
335335 {
336336 iodalmanac = getbitu (&page[0 ], 6 , 4 );
337337 alma1.af0 = getbits (&page[0 ], 10 , 16 );
@@ -350,7 +350,7 @@ struct GalileoMessage : GPSLikeEphemeris
350350 }
351351
352352 // almanac
353- void parse9 (std::basic_string_view <uint8_t > page)
353+ void parse9 (const std::vector <uint8_t >& page)
354354 {
355355 iodalmanac = getbitu (&page[0 ], 6 , 4 );
356356 alma2.wnalmanac = wnalmanac = getbitu (&page[0 ], 10 , 2 );
@@ -371,7 +371,7 @@ struct GalileoMessage : GPSLikeEphemeris
371371 }
372372
373373 // almanac + more time stuff (GPS)
374- void parse10 (std::basic_string_view <uint8_t > page)
374+ void parse10 (const std::vector <uint8_t >& page)
375375 {
376376 iodalmanac = getbitu (&page[0 ], 6 , 4 );
377377 alma3.Omega0 = getbits (&page[0 ], 10 , 16 );
@@ -391,7 +391,7 @@ struct GalileoMessage : GPSLikeEphemeris
391391
392392
393393 // reduced clock and ephemeris data (redced)
394- void parse16 (std::basic_string_view <uint8_t > page)
394+ void parse16 (const std::vector <uint8_t >& page)
395395 {
396396 deltaAred = getbits (&page[0 ], 6 , 5 );
397397 exred = getbits (&page[0 ], 11 , 13 );
@@ -404,7 +404,7 @@ struct GalileoMessage : GPSLikeEphemeris
404404 }
405405
406406 // reed-solomon data
407- void parseRS (std::basic_string_view <uint8_t > page)
407+ void parseRS (const std::vector <uint8_t >& page)
408408 {
409409 // see 5.1.13.2 of the Galileo SIS ICD 2.0
410410 rs2bitiod = getbitu (&page[0 ], 6 +8 , 2 );
0 commit comments