spiceorbit.h
上传用户:center1979
上传日期:2022-07-26
资源大小:50633k
文件大小:2k
- // spiceorbit.h
- //
- // Interface to the SPICE Toolkit
- //
- // Copyright (C) 2006, Chris Laurel <claurel@shatters.net>
- //
- // This program is free software; you can redistribute it and/or
- // modify it under the terms of the GNU General Public License
- // as published by the Free Software Foundation; either version 2
- // of the License, or (at your option) any later version.
- #ifndef _CELENGINE_SPICEORBIT_H_
- #define _CELENGINE_SPICEORBIT_H_
- #include <string>
- #include <list>
- #include <celengine/orbit.h>
- class SpiceOrbit : public CachingOrbit
- {
- public:
- SpiceOrbit(const std::string& _targetBodyName,
- const std::string& _originName,
- double _period,
- double _boundingRadius,
- double _beginning,
- double _ending);
- SpiceOrbit(const std::string& _targetBodyName,
- const std::string& _originName,
- double _period,
- double _boundingRadius);
- virtual ~SpiceOrbit();
- bool init(const std::string& path,
- const std::list<std::string>* requiredKernels);
- virtual bool isPeriodic() const;
- virtual double getPeriod() const;
- virtual double getBoundingRadius() const
- {
- return boundingRadius;
- }
- Point3d computePosition(double jd) const;
- Vec3d computeVelocity(double jd) const;
- virtual void getValidRange(double& begin, double& end) const;
- private:
- const std::string targetBodyName;
- const std::string originName;
- double period;
- double boundingRadius;
- bool spiceErr;
- // NAIF ID codes for the target body and origin body
- int targetID;
- int originID;
- double validIntervalBegin;
- double validIntervalEnd;
- bool useDefaultTimeInterval;
- };
- #endif // _CELENGINE_SPICEORBIT_H_