[Gpredict-svn] SF.net SVN: gpredict:[901] trunk
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <aa...@us...> - 2011-09-21 20:05:12
|
Revision: 901
http://gpredict.svn.sourceforge.net/gpredict/?rev=901&view=rev
Author: aa1vs
Date: 2011-09-21 20:05:06 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
Corrects satellite name not being update correctly when a satellite occurs with international ID and name in same update.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-09-21 02:35:04 UTC (rev 900)
+++ trunk/ChangeLog 2011-09-21 20:05:06 UTC (rev 901)
@@ -1,3 +1,10 @@
+2011-09-21 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
+ * src/tle-update.c
+ Corrects satellite name not being update correctly when a satellite occurs with international ID and name in same update.
+
+
2011-09-20 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-09-21 02:35:04 UTC (rev 900)
+++ trunk/src/tle-update.c 2011-09-21 20:05:06 UTC (rev 901)
@@ -1017,6 +1017,8 @@
else {
/* satellite is already in hash */
/* apply various merge routines */
+
+ /*time merge */
if (ntle->epoch == tle.epoch) {
/* if satellite epoch has the same time, merge status as appropriate */
if ( (ntle->status != tle.status) && ( ntle->status != OP_STAT_UNKNOWN )) {
@@ -1038,8 +1040,6 @@
ntle->catnum = catnr;
ntle->epoch = tle.epoch;
ntle->status = tle.status;
- g_free (ntle->satname);
- ntle->satname = g_strdup (g_strchomp(tle_str[0]));
g_free (ntle->line1);
ntle->line1 = g_strdup (tle_str[1]);
g_free (ntle->line2);
@@ -1048,8 +1048,18 @@
ntle->srcfile = g_strdup (fnam);
ntle->isnew = TRUE; /* flag will be reset when using data */
}
+
+ /* merge based on name */
+ if ((!g_regex_match_simple ("\\d{4,}-\\d{3,}",ntle->satname,0,0)) &&
+ (!g_regex_match_simple ("\\d{4,}-\\d{3,}",tle_str[0],0,0))) {
+ g_free (ntle->satname);
+ ntle->satname = g_strdup (g_strchomp(tle_str[0]));
+ }
+
/* free the key since we do not commit it to the cache */
g_free (key);
+
+
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|