I got a deque of way-point struct, and i need to extract an specific properties.
struct way_point
{
double time_stamp_s; 
double lat_deg; 
double  long_deg; 
double height_m; 
double roll_deg;
double pitch_deg; 
double yaw_deg; 
double speed_ms; 
double pdop; 
unsigned int gps_nb; 
unsigned int glonass_nb; 
unsigned int beidou_nb;
};
for example i got
28729.257 48.66081132 15.63964745 322.423 1.1574 4.8230 35.3177 0.00 0.00 0 0 0
28731.257 48.66081132 15.63964744 322.423 1.1558 4.8238 35.3201 0.00 1.15 9 6 0
28733.257 48.66081132 15.63964745 322.423 1.1593 4.8233 35.3221 0.00 1.15 9 6 0
...
and if I need for example the speed_ms properties, i would like to get back an array like :
0.00
0.00
0.00
...
but the propreties to extract isn't known before the fonction, it's depending for the need. I was thinking of a function like this :
function extract (string propertie_to_extract = "speed_ms", deque<struct way_point> way_point){
retrun vector[i]=way_point[i]."propertie_to_extract"}
 
    