Changeset 15208
- Timestamp:
- 03/31/13 02:43:06 (12 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/InterpreterV8.cc
r15204 r15208 1667 1667 return ThrowException(String::New("Argument must be a Date")); 1668 1668 1669 Nova:: HrzPosn hrz;1670 hrz. alt = 90-GetDataMember(args, "zd");1671 hrz.az =GetDataMember(args, "az");1672 1673 if (!finite(hrz. alt) || !finite(hrz.az))1669 Nova::ZdAzPosn hrz; 1670 hrz.zd = GetDataMember(args, "zd"); 1671 hrz.az = GetDataMember(args, "az"); 1672 1673 if (!finite(hrz.zd) || !finite(hrz.az)) 1674 1674 return ThrowException(String::New("zd and az must be finite.")); 1675 1675 … … 1717 1717 const Time utc(v/1000, v%1000); 1718 1718 1719 const Nova:: HrzPosn hrz = Nova::GetHrzFromEqu(equ, utc.JD());1720 1721 Handle<Value> arg[] = { Number::New( 90-hrz.alt), Number::New(hrz.az), date };1719 const Nova::ZdAzPosn hrz = Nova::GetHrzFromEqu(equ, utc.JD()); 1720 1721 Handle<Value> arg[] = { Number::New(hrz.zd), Number::New(hrz.az), date }; 1722 1722 return handle_scope.Close(fTemplateLocal->GetFunction()->NewInstance(3, arg)); 1723 1723 } … … 1744 1744 const Time utc(v/1000, v%1000); 1745 1745 1746 const Nova:: HrzPosn hrz = Nova::GetHrzFromEqu(equ, utc.JD());1747 1748 Handle<Value> arg[] = { Number::New( 90-hrz.alt), Number::New(hrz.az), date };1746 const Nova::ZdAzPosn hrz = Nova::GetHrzFromEqu(equ, utc.JD()); 1747 1748 Handle<Value> arg[] = { Number::New(hrz.zd), Number::New(hrz.az), date }; 1749 1749 return handle_scope.Close(fTemplateLocal->GetFunction()->NewInstance(3, arg)); 1750 1750 } -
trunk/FACT++/src/smartfact.cc
r15201 r15208 257 257 fSet = Time(moon.set); 258 258 259 const Nova::EquPosn pos = Nova::GetLunarEquCoords(JD);260 const Nova:: HrzPosn hrz = Nova::GetHrzFromEqu(pos, JD);261 262 az = 263 zd = 90-hrz.alt;259 const Nova::EquPosn pos = Nova::GetLunarEquCoords(JD); 260 const Nova::ZdAzPosn hrz = Nova::GetHrzFromEqu(pos, JD); 261 262 az = hrz.az; 263 zd = hrz.zd; 264 264 265 265 ra = pos.ra/15; … … 2149 2149 pos.dec = dec; 2150 2150 2151 const Nova:: HrzPosn hrz = Nova::GetHrzFromEqu(pos, now.JD());2151 const Nova::ZdAzPosn hrz = Nova::GetHrzFromEqu(pos, now.JD()); 2152 2152 2153 2153 /*const*/ pair<vector<float>, pair<Time, float>> vis = GetVisibility(&pos, now.JD()); … … 2176 2176 2177 2177 string col = HTML::kWhite; 2178 if (hrz. alt>5)2178 if (hrz.zd<85) 2179 2179 col = HTML::kRed; 2180 if (hrz. alt>25)2180 if (hrz.zd<65) 2181 2181 col = HTML::kYellow; 2182 if (hrz. alt>60)2182 if (hrz.zd<30) 2183 2183 col = HTML::kGreen; 2184 2184 2185 2185 out2 << "<tr bgcolor='" << col << "'>"; 2186 2186 out2 << "<td>" << name << "</td>"; 2187 if (hrz. alt>5)2187 if (hrz.zd<85) 2188 2188 { 2189 out2 << "<td>" << 90-hrz.alt<< "°</td>";2189 out2 << "<td>" << hrz.zd << "°</td>"; 2190 2190 out2 << "<td>" << GetDir(hrz.az) << "</td>"; 2191 2191 }
Note:
See TracChangeset
for help on using the changeset viewer.