Skip to content

Commit

Permalink
Remove zero-padding in string
Browse files Browse the repository at this point in the history
Signed-off-by: Cees Bassa <[email protected]>
  • Loading branch information
cbassa committed Dec 28, 2024
1 parent dbc250f commit 07cfdba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rffit.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ void format_tle(orbit_t orb,char *line1,char *line2)
// Print lines
number_to_alpha5(orb.satno,satstr);
satstr[5]='\0';
sprintf(line1,"1 %05sU %2d%012.8f .00000000 00000-0 %8s 0 0",satstr,orb.ep_year-2000,orb.ep_day,sbstar);
sprintf(line2,"2 %05s %8.4f %8.4f %07.0f %8.4f %8.4f %11.8f 0",satstr,DEG(orb.eqinc),DEG(orb.ascn),1E7*orb.ecc,DEG(orb.argp),DEG(orb.mnan),orb.rev);
sprintf(line1,"1 %5sU %2d%012.8f .00000000 00000-0 %8s 0 0",satstr,orb.ep_year-2000,orb.ep_day,sbstar);
sprintf(line2,"2 %5s %8.4f %8.4f %07.0f %8.4f %8.4f %11.8f 0",satstr,DEG(orb.eqinc),DEG(orb.ascn),1E7*orb.ecc,DEG(orb.argp),DEG(orb.mnan),orb.rev);

// Compute checksums
for (i=0,csum=0;i<strlen(line1);i++) {
Expand Down

0 comments on commit 07cfdba

Please sign in to comment.