Commit adc30892f35309750579a77f07c4669ac4cf91ee
1 parent
8944ec40
Exists in
master
and in
100 other branches
correct venus bowshocl
Showing
3 changed files
with
41 additions
and
2 deletions
Show diff stats
src/ExternLib/PlotCurves/AMDAPlugin.cc
... | ... | @@ -99,10 +99,13 @@ extern "C" void registerPlugin(AMDA::Plugins::PluginManager & /*pm*/) |
99 | 99 | ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("bowshock_farris",&bowshock_farris); |
100 | 100 | // Elena TBD : id in plotCurves.xml acts as function name - to change Request generation procedure |
101 | 101 | ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("mars_bowshock",&bowshock); |
102 | - ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("venus_bowshock_min",&bowshock); | |
103 | - ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("venus_bowshock_max",&bowshock); | |
102 | + ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("venus_bowshock",&bowshock); | |
104 | 103 | ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("mercury_bowshock",&bowshock); |
105 | 104 | ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("saturn_bowshock_went",&saturn_bowshock_went); |
105 | + ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("jupiter_bowshock_high",&bowshock1); | |
106 | + ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("jupiter_bowshock_low",&bowshock1); | |
107 | + ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("jupiter_magnetopause_high",&bowshock1); | |
108 | + ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("jupiter_magnetopause_low",&bowshock1); | |
106 | 109 | ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("venus_magnetopause",&venus_magnetopause); |
107 | 110 | ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("mars_magnetopause",&mars_magnetopause); |
108 | 111 | ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("mercury_magnetopause",&mercury_magnetopause); | ... | ... |
src/ExternLib/PlotCurves/Boundaries.cc
... | ... | @@ -84,6 +84,41 @@ using namespace plot; |
84 | 84 | * @details This procedure return the curve definition of general bowshock |
85 | 85 | * r = L/(1+epsilon*cos(theta)) |
86 | 86 | */ |
87 | +void bowshock1(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList) | |
88 | +{ | |
89 | + CurveFunctionWriter::AttributeList::iterator lparam1It = pAttributeList.find("param1"); | |
90 | + if ( lparam1It == pAttributeList.end()) | |
91 | + { | |
92 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_INFORMATION_REQUEST_ERR) << AMDA::ex_msg(std::string("bowshock not found param1 attribute"))); | |
93 | + } | |
94 | + | |
95 | + CurveFunctionWriter::AttributeList::iterator lparam2It = pAttributeList.find("param2"); | |
96 | + if ( lparam2It == pAttributeList.end()) | |
97 | + { | |
98 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_INFORMATION_REQUEST_ERR) << AMDA::ex_msg(std::string("bowshock not found param2 attribute"))); | |
99 | + } | |
100 | + | |
101 | + CurveFunctionWriter::AttributeList::iterator lparam3It = pAttributeList.find("param3"); | |
102 | + if ( lparam3It == pAttributeList.end()) | |
103 | + { | |
104 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_INFORMATION_REQUEST_ERR) << AMDA::ex_msg(std::string("bowshock not found param3 attribute"))); | |
105 | + } | |
106 | + | |
107 | + | |
108 | + double theta, rr; | |
109 | + for (int i = 0; i < precision; ++i) | |
110 | + { | |
111 | + theta = (lparam1It->second * M_PI / 180.) * (double)(((double)i) / precision); | |
112 | + rr = lparam2It->second / (1.0 + lparam3It->second * cos(theta)); | |
113 | + CurveFunctionWriter::CurvePoint point; | |
114 | + point.x = rr * cos(theta); | |
115 | + point.y = rr * sin(theta); | |
116 | + point.z = point.y; | |
117 | + //std::cout << "BRE - " << point.x << " - " << point.y << " - " << point.z << std::endl; | |
118 | + curvePointList.push_back(point); | |
119 | + } | |
120 | +} | |
121 | + | |
87 | 122 | void bowshock(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList) |
88 | 123 | { |
89 | 124 | CurveFunctionWriter::AttributeList::iterator lparam1It = pAttributeList.find("param1"); | ... | ... |
src/ExternLib/PlotCurves/Boundaries.hh
... | ... | @@ -13,6 +13,7 @@ using namespace plot; |
13 | 13 | void venus_bowshock(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList); |
14 | 14 | void mars_bowshock(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList);*/ |
15 | 15 | |
16 | +void bowshock1(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList); | |
16 | 17 | void bowshock(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList); |
17 | 18 | void bowshock_farris(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList); |
18 | 19 | void saturn_bowshock_went(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList); | ... | ... |