Code Monkey home page Code Monkey logo

Comments (3)

soulcmdc-zz avatar soulcmdc-zz commented on July 19, 2024

Related to #22

from piksi_firmware.

cbeighley avatar cbeighley commented on July 19, 2024

@soulcmdc looks like there are still improvements to be made:

From libswiftnav/src/ephemeris.c:

/** Is this ephemeris usable?
 *
 * \todo This should actually be more than just the "valid" flag.
 *       When we write an is_usable() function, lets use that instead
 *       of just es[prn].valid.
 *
 * \param eph Ephemeris struct
 * \return 1 if the ephemeris is valid and not too old.
 *         0 otherwise.
 */
u8 ephemeris_good(ephemeris_t *eph, gps_time_t t)
{
  /* Seconds from the time from ephemeris reference epoch (toe) */
  double dt = gpsdifftime(t, eph->toe);

  /* TODO: this doesn't exclude ephemerides older than a week so could be made
   * better. */
  return (eph->valid && eph->healthy && fabs(dt) < 4*3600);
}

from piksi_firmware.

ljbade avatar ljbade commented on July 19, 2024

@fnoble in https://github.com/swift-nav/libswiftnav/blob/master/src/ephemeris.c#L254 I decided to drop the "unhealthy" check here (due to edge case where before we happily use an unhealthy sat as a result).

Do you know what the remaining TODOs are about? I am particularly interested in older than a week comment, due to my work on fixing time bugs.

from piksi_firmware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.