T
Todd
Hello all,
I hope that this topic is considered valid in this group. If not,
could you (kindly) point me to where I should post it?
I am having a bit of trouble deciding where to place objects within my
design. I have been following the "has a" "is a" guidelines so far.
I now have an "is acted upon by" and an "is constrained by" which I
don't know how to resolve.
I am designing some orbital analysis software (I am sure I am
reinventing a wheel, however ... ). I have one vehicle which can
travel many trajectories, i.e., standard orbit (trajectory) -> thrust
trajectory -> elliptical parking orbit -> thrust trajectory -> sling-
shot orbit, etc. With this thought, I created a parent trajectory
class from which I create (via extension) the various trajectories I
need.
Here is my problem statement:
Within each trajectory the vehicle is acted upon by several
perturbations (gravity, solar wind, etc.) and is constrained to
perform actions when in view of a ground station.
While the vehicle is the object experiencing the perturbations and
constraints, the perturbations and constraints can be different for
each trajectory, so I thought that I should add the perturbations and
constraints to the Trajectory class, but this feels wrong since:
a vehicle has a trajectory
the vehicle is acted upon by perturbations
the vehicle is constrainted by various things
which makes me think that these all belong in the vehicle class.
So, do I fish or cut bait?
Todd
I hope that this topic is considered valid in this group. If not,
could you (kindly) point me to where I should post it?
I am having a bit of trouble deciding where to place objects within my
design. I have been following the "has a" "is a" guidelines so far.
I now have an "is acted upon by" and an "is constrained by" which I
don't know how to resolve.
I am designing some orbital analysis software (I am sure I am
reinventing a wheel, however ... ). I have one vehicle which can
travel many trajectories, i.e., standard orbit (trajectory) -> thrust
trajectory -> elliptical parking orbit -> thrust trajectory -> sling-
shot orbit, etc. With this thought, I created a parent trajectory
class from which I create (via extension) the various trajectories I
need.
Here is my problem statement:
Within each trajectory the vehicle is acted upon by several
perturbations (gravity, solar wind, etc.) and is constrained to
perform actions when in view of a ground station.
While the vehicle is the object experiencing the perturbations and
constraints, the perturbations and constraints can be different for
each trajectory, so I thought that I should add the perturbations and
constraints to the Trajectory class, but this feels wrong since:
a vehicle has a trajectory
the vehicle is acted upon by perturbations
the vehicle is constrainted by various things
which makes me think that these all belong in the vehicle class.
So, do I fish or cut bait?
Todd