Back To Overview
Broadcast ephemeris problem
Posted on 03 Sep, 2014 by SergioSantos
Greetings.

I was trying to extract the satellites position from the broadcast navigation message using an GPSEphemerisStore 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:

"Non processed exception: InteropServices.SEHException: The external component activated an exception. in gpstk.OrbitEph.svXvt(OrbitEph* , Xvt* , CommonTime* ) in main() em c:\users\user\documents\visual studio 2012\projects\gnssrelpos\g nssrelpos\main.cpp:line 143 in mainCRTStartup() Press key to continue . . ."

I already used this approach successfully a few years ago in another project using version 1.6.

I tried to investigate a little bit the origin of the problem by making a few tests:

code:

RinexNavStream rin_nav(nav_path.c_str());

RinexNavData nav_data;

while (rin_nav >> nav_data) BcEStore.addEphemeris(nav_data);

SatID s(23, SatID::systemGPS);

CommonTime t = BcEStore.getInitialTime();

const OrbitEph *eph = BcEStore.findOrbitEph(s, t);

cout << "test: " << eph->asString() << endl;

cout << "test2: " << eph->ecc << endl;

cout << "test3: " << eph->svClockBias(t) << endl;

cout << "test4: " << eph->isValid(t) << endl;

Xvt sv = eph->svXvt(t);

cout << "x = " << sv.x[0] << endl;

These tests resulted in the following output:

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

test2: 0.00703742

test3: 0.00032

test4: 0

All of which are consistent with the nav file. After that the program crashes and the exception message appears. Does anyone knows what's happening?

Thank you. Regards


Add your comments to the Discussion
 

In case this topic is of interest to anyone, it seems that the issue with this broadcast ephemeris problem that I had can be traced to the OrbitEph.cpp file where the computation of the elapsed time since Toe ("elapte") by subtracting t and ctToe. In my program configuration these variables have different time systems: t is GPS time and ctToe is, defined as Unknown (UNK).
This problem can be solved by redefining t as Any with t.setTimeSystem(TimeSystem::Any); before using getXvt(prn,t).
SergioSantos 06 Nov 2014 - 05:17

  SergioSantos 06 Nov 2014 - 05:09



Topic revision: r2 - 06 Nov 2014, SergioSantos
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback