#include <string>#include "astro.h"#include "body.h"#include "parser.h"Include dependency graph for parseobject.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
| Orbit * | CreateOrbit (PlanetarySystem *system, Hash *planetData, const std::string &path, bool usePlanetUnits) |
| void | FillinRotationElements (Hash *rotationData, RotationElements &re) |
| bool | ParseDate (Hash *hash, const string &name, double &jd) |
|
||||||||||||||||||||
|
|
|
||||||||||||
|
Definition at line 194 of file parseobject.cpp. References degToRad(). Referenced by CreatePlanet(), and StarDatabase::createStar(). 00195 {
00196 float period = 0.0f;
00197 if (rotationData->getNumber("RotationPeriod", period))
00198 re.period = period / 24.0f;
00199
00200 float offset = 0.0f;
00201 if (rotationData->getNumber("RotationOffset", offset))
00202 re.offset = degToRad(offset);
00203
00204 rotationData->getNumber("RotationEpoch", re.epoch);
00205
00206 float obliquity = 0.0f;
00207 if (rotationData->getNumber("Obliquity", obliquity))
00208 re.obliquity = degToRad(obliquity);
00209
00210 float ascendingNode = 0.0f;
00211 if (rotationData->getNumber("EquatorAscendingNode", ascendingNode))
00212 re.ascendingNode = degToRad(ascendingNode);
00213
00214 float precessionRate = 0.0f;
00215 if (rotationData->getNumber("PrecessionRate", precessionRate))
00216 re.precessionRate = degToRad(precessionRate);
00217 }
|
|
||||||||||||||||
|
Definition at line 23 of file parseobject.cpp. Referenced by CreateEllipticalOrbit(), and CreatePlanet(). 00024 {
00025 // Check first for a number value representing a Julian date
00026 if (hash->getNumber(name, jd))
00027 return true;
00028
00029 string dateString;
00030 if (hash->getString(name, dateString))
00031 {
00032 astro::Date date(1, 1, 1);
00033 if (astro::parseDate(dateString, date))
00034 {
00035 jd = (double) date;
00036 return true;
00037 }
00038 }
00039
00040 return false;
00041 }
|
1.4.1