Skip to content

Commit

Permalink
Fixed GPS Epoch
Browse files Browse the repository at this point in the history
Added offset between UTC and TT at GPS epoch in GpsTimeToJD and JDToGpsTime
  • Loading branch information
ericstoneking committed Jan 2, 2024
1 parent 5056a9a commit 0019f24
Show file tree
Hide file tree
Showing 634 changed files with 1,179,194 additions and 2,718 deletions.
4 changes: 2 additions & 2 deletions Database/AcParmDump00.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ SC[0].AC.Whl[3].Tcmd = 4.330127018922e-02
SC[0].AC.MTB[0].Mcmd = 8.800548569006e+00
SC[0].AC.MTB[1].Mcmd = -2.137387806672e+00
SC[0].AC.MTB[2].Mcmd = -5.018295046486e+01
SC[0].AC.Cmd.AngRate = 2.312342778563e-314 5.470770398582e-315 2.312185986336e-314
SC[0].AC.Cmd.Ang = 2.312307055640e-314 6.951594276136e-310 6.951594276130e-310
SC[0].AC.Cmd.AngRate = 2.353524928780e-314 5.470770398582e-315 2.353368136553e-314
SC[0].AC.Cmd.Ang = 2.353489205858e-314 6.951592154901e-310 6.951592154895e-310
SC[0].AC.ID = 0
SC[0].AC.EchoEnabled = 1
SC[0].AC.Nb = 2
Expand Down
12 changes: 6 additions & 6 deletions Database/AcParmDump01.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ SC[1].AC.bvb = -1.900000000000e-05 -1.700000000000e-05 -5.000000000000e-06
SC[1].AC.Hvb = 0.000000000000e+00 -2.346498216570e+00 4.984766121226e-01
SC[1].AC.G[0].Cmd.AngRate = 1.745329251994e-02 0.000000000000e+00 0.000000000000e+00
SC[1].AC.G[0].Cmd.Ang = 1.570796326795e+00 0.000000000000e+00 0.000000000000e+00
SC[1].AC.Whl[0].Tcmd = 3.353538970494e-02
SC[1].AC.Whl[1].Tcmd = 3.376473171143e-02
SC[1].AC.Whl[2].Tcmd = 2.331740744481e-02
SC[1].AC.Whl[3].Tcmd = 2.308806543833e-02
SC[1].AC.Whl[0].Tcmd = 3.356265958666e-02
SC[1].AC.Whl[1].Tcmd = 3.379200422587e-02
SC[1].AC.Whl[2].Tcmd = 2.329013808130e-02
SC[1].AC.Whl[3].Tcmd = 2.306079344210e-02
SC[1].AC.MTB[0].Mcmd = 2.020659348894e+01
SC[1].AC.MTB[1].Mcmd = -9.471055630330e+00
SC[1].AC.MTB[2].Mcmd = -4.458346611483e+01
SC[1].AC.Cmd.AngRate = 2.280641629514e-314 5.470770398582e-315 2.280484837287e-314
SC[1].AC.Cmd.Ang = 2.280605906591e-314 6.951599698419e-310 6.951599698413e-310
SC[1].AC.Cmd.AngRate = 2.163486000994e-314 5.470770398582e-315 2.163329208767e-314
SC[1].AC.Cmd.Ang = 2.163450278072e-314 6.951602388919e-310 6.951602388913e-310
SC[1].AC.ID = 1
SC[1].AC.EchoEnabled = 1
SC[1].AC.Nb = 2
Expand Down
12 changes: 5 additions & 7 deletions Database/JsonToIPC.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def WriteProlog():
outfile.write(" long Isc,Iorb,Iw,Ipfx,i;\n")

if Pipe == "Socket":
outfile.write(" int Success;\n")
outfile.write(" char AckMsg[5] = \"Ack\\n\";\n")
outfile.write(" char Msg[16384];\n")
outfile.write(" long MsgLen = 0;\n")
Expand Down Expand Up @@ -168,9 +167,8 @@ def ReadProlog():
#endif

if Pipe == "Socket":
outfile.write(" long MsgLen;\n\n")
outfile.write(" \n")
outfile.write(" memset(Msg,'\\0',16384);\n")
outfile.write(" MsgLen = 0;\n\n")
outfile.write(" NumBytes = recv(Socket,Msg,16384,0);\n")
outfile.write(" if (NumBytes <= 0) return; /* Bail out if no message */\n\n")
outfile.write(" Done = 0;\n")
Expand Down Expand Up @@ -231,7 +229,7 @@ def WriteEpilog():
outfile.write(" LineLen = strlen(line);\n")
outfile.write(" memcpy(&Msg[MsgLen],line,LineLen);\n")
outfile.write(" MsgLen += LineLen;\n")
outfile.write(" Success = send(Socket,Msg,MsgLen,0);\n\n")
outfile.write(" send(Socket,Msg,MsgLen,0);\n\n")
outfile.write(" /* Wait for Ack */\n");
outfile.write(" recv(Socket,AckMsg,5,0);\n")
elif Pipe == "Gmsec":
Expand Down Expand Up @@ -342,7 +340,7 @@ def StateRefreshCode():
outfile.write(" /* Update Dyn */\n")
outfile.write(" MapJointStatesToStateVector(S);\n")
outfile.write(" D = &S->Dyn;\n")
outfile.write(" MapStateVectorToBodyStates(D->u,D->x,D->h,D->uf,D->xf,S);\n")
outfile.write(" MapStateVectorToBodyStates(D->u,D->x,D->h,D->a,D->uf,D->xf,S);\n")
outfile.write(" MotionConstraints(S);\n")
outfile.write(" }\n")
outfile.write(" }\n")
Expand Down Expand Up @@ -647,7 +645,7 @@ def main():
VerbList = {"WriteTo","ReadFrom"}
PipeList = {"Socket","Gmsec","File","Cmd"}

infile = open('42.json','rU')
infile = open('42.json')
StructDict = json.load(infile)
infile.close()

Expand Down Expand Up @@ -791,7 +789,7 @@ def main():
#endif

outfile.close()
infile = open("TempIpc.c","rU")
infile = open("TempIpc.c")
outfile = open("../Source/IPC/"+Prog+Verb+Pipe+".c","w")
StripEmptyLoops(infile,outfile)
infile.close()
Expand Down
2 changes: 1 addition & 1 deletion Database/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Only one variable definition per line, please.

By custom, I use only a limited subset of C variable types. If you add a variable that is not in the following list, you'll need to add it to the list of recognized types in HeadersToJson.py: long, double, char, float, unsigned char, unsigned int, FILE, struct.

The section partitions (Parameters, Inputs, Outputs, Diagnostics, and Internal Variables) correspond to traditional command/telemetry packet roles. I don't use them (much) myself, but CCDD and its adherents do. The Prototypes tag is to signal to the python script that all structure definitions have been read.
The section partitions (Parameters, Inputs, Outputs, Diagnostics, and Internal Variables) correspond to traditional command/telemetry packet roles. I don't use them (much) myself, but other folks do. The Prototypes tag is to signal to the python script that all structure definitions have been read.

Any trailing comment gets copied into the dictionary as a description. Some key
character combinations have special meaning:
Expand Down
Empty file modified Demo/Cmd_Demo.txt
100644 → 100755
Empty file.
Loading

0 comments on commit 0019f24

Please sign in to comment.