Giter VIP home page Giter VIP logo

Comments (3)

bjorgan avatar bjorgan commented on July 17, 2024

We have kind of been following https://www.kernel.org/doc/Documentation/CodingStyle, Chapter 5: Typedefs on this, but probably not very consistently.

History:

struct predict_observation never had the _t-ending in order to elucidate that it was a pure output struct where all elements could/should be freely accessed, and didn't need no create function. So in solving issue #22, I also changed predict_orbit_t to struct predict_orbit in order to make it be consistent with struct predict_observation. I considered that it might cause some trouble with predict_orbit(...), but couldn't see any errors or warnings or find any indications of this on the Internet, so I thought it was fine. O:-)

Possible solutions:

  1. Rename struct predict_orbit and struct predict_observation to predict_orbit_t and predict_observation_t.
  2. Rename struct predict_orbit to something else (difficult to find a better name).
  3. Rename predict_orbit(...) to something else (predict_calculate_orbit?)
  4. Add a typedef of struct predict_orbit for the python bindings.

Personally, I think it is nice to use struct name instead of name_t for the output structs in order to have clear separation between those and the structs that need initialization through a ..._create_... function.

@ryeng, what do you think? o:-) Even if C handles struct predict_orbit and predict_orbit(...) fine, I guess it is a bit confusing to have the same name in the API anyway.

from libpredict.

thomasing avatar thomasing commented on July 17, 2024

Rename to struct predict_satellite? struct predict_orbiter?

from libpredict.

bjorgan avatar bjorgan commented on July 17, 2024

After an oral discussion, we decided to go for struct predict_position, as it sums up what we wanted to convey with predict_orbit.

TODO:

  • Replace in all source files, header files
  • Replace in examples
  • Replace tests
  • Replace in README.md

from libpredict.

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.