Commit 8944ec40466cee518da7f697866239ad9616142e

Authored by Elena.Budnik
1 parent 81286aae

saturn magnetopuse, venus bowshock - 2

.gitignore
... ... @@ -25,3 +25,7 @@ test/FitNesseRoot/ErrorLogs/
25 25 test/FitNesseRoot/FitNesse/
26 26 test/FitNesseRoot/TemplateLibrary/
27 27 test/FitNesseRoot/files/testResults/
  28 +config/MissionInfo/*
  29 +config/InstrumentInfo/*
  30 +config/DataSetInfo/*
  31 +config/DataBaseParameters/*.xml
28 32 \ No newline at end of file
... ...
src/ExternLib/PlotCurves/AMDAPlugin.cc
... ... @@ -99,12 +99,14 @@ 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",&bowshock);
  102 + ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("venus_bowshock_min",&bowshock);
  103 + ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("venus_bowshock_max",&bowshock);
103 104 ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("mercury_bowshock",&bowshock);
104 105 ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("saturn_bowshock_went",&saturn_bowshock_went);
105 106 ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("venus_magnetopause",&venus_magnetopause);
106 107 ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("mars_magnetopause",&mars_magnetopause);
107 108 ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("mercury_magnetopause",&mercury_magnetopause);
  109 + ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("saturn_magnetopause",&saturn_magnetopause);
108 110 ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("magnetopause_shue",&magnetopause_shue);
109 111 ServicesServer::getInstance()->addServiceImpl<CurveFunctionWriter::CurveFunctionProcess>("circle",&circle);
110 112 }
... ...
src/ExternLib/PlotCurves/Boundaries.cc
... ... @@ -408,4 +408,49 @@ void mercury_magnetopause(double precision, CurveFunctionWriter::AttributeList&amp;
408 408 point.z = point.y;
409 409 curvePointList.push_back(point);
410 410 }
411   -}
412 411 \ No newline at end of file
  412 +}
  413 +/**
  414 + * @details This procedure return the curve definition of Shue magnetopause for Saturn (Arridge; JGR; 2006).
  415 + */
  416 +void saturn_magnetopause(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList)
  417 +{
  418 +
  419 + CurveFunctionWriter::AttributeList::iterator lparam1It = pAttributeList.find("param1");
  420 + if ( lparam1It == pAttributeList.end())
  421 + {
  422 + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_INFORMATION_REQUEST_ERR) << AMDA::ex_msg(std::string("magnetopause not found param1 attribute")));
  423 + }
  424 +
  425 + CurveFunctionWriter::AttributeList::iterator lparam2It = pAttributeList.find("ramPressure");
  426 + if ( lparam2It == pAttributeList.end())
  427 + {
  428 + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_INFORMATION_REQUEST_ERR) << AMDA::ex_msg(std::string("magnetopause not found param2 attribute")));
  429 + }
  430 +
  431 +
  432 +// rr=rnose*(2./(1.+COS(theta)))^alpha
  433 +// rnose = a1*RamPress^(-a2)
  434 +// alpha = a3 + a4*RamPress
  435 +
  436 + double rr, theta;
  437 + double a1 = 9.7, a2 = -0.24, a3 = 0.77, a4 = -1.5;
  438 + double rnose, alpha;
  439 +
  440 + rnose = a1 * pow(lparam2It->second,a2);
  441 + alpha = a3 + a4 * lparam2It->second;
  442 +
  443 + for (int i = 0; i < precision; ++i)
  444 + {
  445 + CurveFunctionWriter::CurvePoint point;
  446 +
  447 + theta = (lparam1It->second * M_PI / 180.) * (double)(((double)i) / precision);
  448 + rr = rnose * pow((2.0 / (1.0 + cos(theta))),alpha);
  449 +
  450 + point.y = rr * sin(theta);
  451 +
  452 + point.x = rr * cos(theta);
  453 +
  454 + point.z = point.y;
  455 + curvePointList.push_back(point);
  456 + }
  457 +}
... ...
src/ExternLib/PlotCurves/Boundaries.hh
... ... @@ -19,6 +19,7 @@ void saturn_bowshock_went(double precision, CurveFunctionWriter::AttributeList&amp;
19 19 void venus_magnetopause(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList);
20 20 void mars_magnetopause(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList);
21 21 void mercury_magnetopause(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList);
  22 +void saturn_magnetopause(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList);
22 23 void magnetopause_shue(double precision, CurveFunctionWriter::AttributeList& pAttributeList, CurveFunctionWriter::CurvePointList& curvePointList);
23 24  
24 25 #endif /* BOUNDRIES_HH_*/
... ...