Skip to content

Instantly share code, notes, and snippets.

Created March 9, 2014 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/9455583 to your computer and use it in GitHub Desktop.
Save anonymous/9455583 to your computer and use it in GitHub Desktop.
struct star {
float BTmag,
float VTmag,
int Plx,
int Plx_err
}
void main() {
const char *source_holder = "H|000.00996534|-40.59122440| | 2.87| 2.53| 9.07| 0.64| 0.61| 1.11| 0.67| 0.74| 0.10| 0.24| 0.06| 0.26|-0.10| 0.20|-0.16|-0.30|-0.19| 0.06| 0|-1.24| 5| 9.693|0.014| 8.656|0.010| | 0.902|0.013|T|0.90|0.01|L| | 8.7077|0.0018|0.019|161| | 8.68| 8.74| | | | | | | | 1| | | | | | | | | | | | |224705| |C-41 15372|P-41 9991|0.95|G8III |2
H| 6| |00 00 04.35|+03 56 47.4|12.31| |";
struct star hp;
sscanf(source_holder, "%*c|%12f|%12f|%*c|%*7f|%*8f|%*8f|%*6f|%*6f|%*6f|%*6f|%*6f|%*5f|%*5f|%*5f|%*5f|%*5f|%*5f|%*5f|%*5f|%*5f|%*5f|%3d|%*5f|%6d|%*6f|%*5f|%*6f|%*5f|%*c|%*6f|%*5f|%*c|%*4f|%*4f|%*c|%*c|%*7f|%*6f|%*5f|%*3d|%*c|%*5f|%*5f|%*7f|%*c|%*1d|%*c|%*5d%*5d|%*c|%*2d|%*2d|%*c|%*c|%*c|%*2c|%*3c|%*7c|%*5c|%*5c|%*4c|%*c|%*c|%*c|%*6d|%*c%*3d %*5d|%*c%*3d %*5d|%*c%*3d %*5d|%*4f|%*12c|%*c%*c%*c|%*12d|%*c|%*2d %*2d %*5f|%*3d %*2d %*4f|%*5f|%*1d|",
&hp.BTmag, &hp.VTmag, &hp.Plx, &hp.Plx_err);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment