load("/Users/emu/Library/Mobile Documents/com~apple~CloudDocs/GPS_Buch/Maxima/gps.mac")$

## RINEX-Dateien einlesen ...

einlesen();

## Funktion show_eph() einlesen

show_eph(sv):=block(
[k],
k:find_ephindex(sv),
if k=0 then (print("SV:",sv,"nicht vorhanden"),return()),
print("       SV: ",navmatrix[k][1]),
print("     Date: ",navmatrix[k][4],".",navmatrix[k][3],".",navmatrix[k][2]),
print("     Time: ",navmatrix[k][5],":",navmatrix[k][6],":",navmatrix[k][7]),
print("      af0: ",navmatrix[k][8]),
print("      af1: ",navmatrix[k][9]),
print("      af2: ",navmatrix[k][10]),
print("     IODE: ",navmatrix[k][11]),
print("      crs: ",navmatrix[k][12]),
print("  delta_n: ",navmatrix[k][13]),
print("       M0: ",navmatrix[k][14]),
print("      cuc: ",navmatrix[k][15]),
print("      ecc: ",navmatrix[k][16]),
print("      cus: ",navmatrix[k][17]),
print("   sqrt_A: ",navmatrix[k][18]),
print("      toe: ",navmatrix[k][19]),
print("      cic: ",navmatrix[k][20]),
print("  OMEGA_0: ",navmatrix[k][21]),
print("      cis: ",navmatrix[k][22]),
print("       i0: ",navmatrix[k][23]),
print("      crc: ",navmatrix[k][24]),
print("    omega: ",navmatrix[k][25]),
print("OMEGA_dot: ",navmatrix[k][26]),
print("    i_dot: ",navmatrix[k][27]),
print("    codes: ",navmatrix[k][28]),
print(" gps_week: ",navmatrix[k][29]),
print("  L2_flag: ",navmatrix[k][30]),
print(" sv_accur: ",navmatrix[k][31]),
print("sv_health: ",navmatrix[k][32]),
print("      tgd: ",navmatrix[k][33]),
print("     iodc: ",navmatrix[k][34]),
print("      tom: ",navmatrix[k][35]),
print(" interval: ",navmatrix[k][36]).
return(true));

## Ephemeriden verschiedener Satelliten feststellen

Gewünschte Satellitennummer angeben

SV:5;

show_eph(SV);

set_eph(SV);

## Werte für bestimmte Satelliten

M0;

ecc;

A:sqrt_A^2;

lin_exz:ecc*A;

b:sqrt(A^2-lin_exz^2);