Message Boards Message Boards

0
|
12448 Views
|
6 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Need help importing data from a file.

Posted 9 years ago

I need help figuring out how to have a Mathematica script open a file. Each line of the script is in the format: C Name ti tf x y z xdot ydot zdot xsig ysig zsig xdotsig ydotsig zdotsig I have attached the file. I need my script to open the file, and for each satellite it needs to take the first row, take Name, X, Y, Z... so the second column, 5th column, 6th column, and 7th column, for the first row of the file for each satellite. (there are several satellites numbered GPS15, GPS24, GPS25, etc.... It then needs to map x, y, z for all of the satellites and label them on the map with their Name. I know it involves lists. I've tried, I can't figure out how to do this. Thank you so much!

Attachments:
POSTED BY: Nathan Lundholm
6 Replies

Sorry about the delay. I usually can't reply on weekdays, thanks to workload.

The attached file is pretty much what you need for this job. It is not complete, since I do not understand ECEF and the format is not directly supported by Mathematica. You will have to write a conversion function. I have, however, done pretty much all of the rest of the job. You will also have to alter SetDirectory[] to the name of the folder in which your data resides.

It is late here for me, and I haven't cleaned up the file as well as I should. It should execute without errors as it stands, if you can get the value in SetDirectory[] right. Post again here if it does not execute, please.

Understanding what I'm sending will take you some time. If you want to use Mathematica, take the time. It has the steep learning curve typical of computer languages (or maybe a bit steeper), but it's worth the trouble. When you have questions, post again here. I'll be notified by e-mail. I will get to them on weekends and occasionally during the week. Good luck.

Attachments:
POSTED BY: Bill Lewis

I really do need help badly. I am clueless. I'm about ready to just give up.

POSTED BY: Nathan Lundholm

{ C, Name, ti, tf, x, y, z, xdot, ydot, zdot, xsig, ysig, zsig, xdotsig, ydotsig, zdotsig } For each satellite there's many lines, each is a different time of day, I think 15 minutes apart? Right now we're only worried about the first line for each satellite. We need Name, x, y, z. We then need to put a peg on a map for X, Y, and Z for each satellite, and label each peg with Name. Here's the issue, the file is in ECEF... not latitude/longtiude.

POSTED BY: Nathan Lundholm

Ok, please put the names in Mathematica format: { name1, name2, name3, etc}, and I'll give it another try.

POSTED BY: Bill Lewis

If you look again I provided the names for all 16 columns... you missed C and Name apparently.

POSTED BY: Nathan Lundholm
POSTED BY: Bill Lewis
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract