<div dir="ltr">Greetings.<div><br></div><div>For anyone familiar with GPStk... I am using GPStk in a positioning project but strangely I'm having problems to use the broadcast ephemerides. </div><div><br></div><div><p> I was trying to extract the satellites position from the broadcast navigation message using an <span class="">GPSEphemerisStore<a rel="nofollow" href="http://www.gpstk.org/bin/edit/Forum/GPSEphemerisStore?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span>
 object like in example 4. But then when trying to use the function 
.getXvt(prn, t) the program crashes  (although no error is detected in 
code before compilation), with the following message:
</p><p>
"Non processed exception: <span class="">InteropServices<a rel="nofollow" href="http://www.gpstk.org/bin/edit/System/Runtime/InteropServices?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span>.SEHException: The external component activated an exception.
   in gpstk.OrbitEph.svXvt(<span class="">OrbitEph<a rel="nofollow" href="http://www.gpstk.org/bin/edit/Forum/OrbitEph?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span>* , Xvt* , <span class="">CommonTime<a rel="nofollow" href="http://www.gpstk.org/bin/edit/Forum/CommonTime?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span>* )
   in main() em c:\users\user\documents\visual studio 2012\projects\gnssrelpos\g
nssrelpos\main.cpp:line 143
   in mainCRTStartup()
Press key to continue . . ."
</p><p>
I already used this approach successfully a few years ago in another project using version 1.6 of GPStk. 
</p><p>
</p><p>
I tried to investigate a little bit the origin of the problem by making a few tests: 
</p><p>
code:
</p><p>
<span class="">RinexNavStream<a rel="nofollow" href="http://www.gpstk.org/bin/edit/Forum/RinexNavStream?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span> rin_nav(nav_path.c_str());
</p><p>
<span class="">RinexNavData<a rel="nofollow" href="http://www.gpstk.org/bin/edit/Forum/RinexNavData?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span> nav_data;
</p><p>
while (rin_nav >> nav_data) <span class="">BcEStore<a rel="nofollow" href="http://www.gpstk.org/bin/edit/Forum/BcEStore?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span>.addEphemeris(nav_data); 
</p><p>
<span class="">SatID<a rel="nofollow" href="http://www.gpstk.org/bin/edit/Forum/SatID?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span> s(23, <span class="">SatID<a rel="nofollow" href="http://www.gpstk.org/bin/edit/Forum/SatID?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span>::systemGPS);
</p><p>
<span class="">CommonTime<a rel="nofollow" href="http://www.gpstk.org/bin/edit/Forum/CommonTime?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span> t = <span class="">BcEStore<a rel="nofollow" href="http://www.gpstk.org/bin/edit/Forum/BcEStore?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span>.getInitialTime();
</p><p>
const <span class="">OrbitEph<a rel="nofollow" href="http://www.gpstk.org/bin/edit/Forum/OrbitEph?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span> *eph = <span class="">BcEStore<a rel="nofollow" href="http://www.gpstk.org/bin/edit/Forum/BcEStore?topicparent=Forum.DiscussionForumArticle2014x09x03x09x49" title="Create this topic"><sup>?</sup></a></span>.findOrbitEph(s, t);
</p><p>
cout << "test: " << eph->asString() << endl;
</p><p>
cout << "test2: " << eph->ecc << endl;
</p><p>
cout << "test3: " << eph->svClockBias(t) << endl;
</p><p>
cout << "test4: " << eph->isValid(t) << endl;
</p><p>
Xvt sv = eph->svXvt(t);
</p><p>
cout << "x = " << sv.x[0] << endl;
</p><p>
These tests resulted in the following output:
</p><p>
test: EPH G23 | 2011  74 12:00:00 |  74 12:00:00 |  74 12:00:00 |  74 14:00:00
 |  74 12:00:00 |  71 |  71 | 0
</p><p>
test2: 0.00703742
</p><p>
test3: 0.00032
</p><p>
test4: 0
</p><p>
All of which are consistent with the nav file. After that the program crashes and the exception message appears. Has anyone had similar difficulties using broadcast ephemerides? </p><p>I suspect it may be some glitch in the classes involved from one of the version updates between 1.6 and the current 2.4 version. So, before diving into the code itself I was wondering if anyone has noticed this issue also.</p><p>Thank you</p><p>Sérgio Santos</p><p></p></div></div>