changes from PR comments

This commit is contained in:
Jonathan Bosson
2017-07-13 20:10:35 -06:00
parent 8b46b2a63a
commit d9fa55581f
13 changed files with 39 additions and 185 deletions

5
.gitignore vendored
View File

@@ -118,7 +118,4 @@ data/spice/nh_kernels
data/spice/OsirisRexKernels
data/spice/plu055.bsp
data/spice/Rosetta
data/spice/sat375.bsp
data/scene/lodglobes/saturn/Launcher.config
data/scene/lodglobes/mars/test_stats
data/scene/lodglobes/saturn/GDAL_cache_ESRI_Imagery_World_2d/
data/spice/sat375.bsp

View File

@@ -126,19 +126,16 @@ return {
Name = "JunoTrail",
Parent = "JupiterBarycenter",
Renderable = {
Type = "RenderableTrail",
Body = "JUNO",
Frame = "GALACTIC",
Observer = "JUPITER BARYCENTER",
RGB = { 0.70,0.50,0.20 },
TropicalOrbitPeriod = 394250.0,
EarthOrbitRatio = 4.5,
DayLength = 9.9259,
TimeStamps = false,
Textures = {
Type = "simple",
Color = "textures/glare_blue.png",
},
Type = "RenderableTrailTrajectory",
Translation = {
Type = "SpiceTranslation",
Body = "JUNO",
Observer = "JUPITER BARYCENTER"
},
Color = { 0.70, 0.50, 0.20 },
StartTime = "2016 JUN 28",
EndTime = "2016 APR 01",
SampleInterval = 3600
},
},
}

View File

@@ -1,148 +0,0 @@
KPL/LSK
LEAPSECONDS KERNEL FILE
===========================================================================
Modifications:
--------------
2015, Jan. 5 NJB Modified file to account for the leapsecond that
will occur on June 30, 2015.
2012, Jan. 5 NJB Modified file to account for the leapsecond that
will occur on June 30, 2012.
2008, Jul. 7 NJB Modified file to account for the leapsecond that
will occur on December 31, 2008.
2005, Aug. 3 NJB Modified file to account for the leapsecond that
will occur on December 31, 2005.
1998, Jul 17 WLT Modified file to account for the leapsecond that
will occur on December 31, 1998.
1997, Feb 22 WLT Modified file to account for the leapsecond that
will occur on June 30, 1997.
1995, Dec 14 KSZ Corrected date of last leapsecond from 1-1-95
to 1-1-96.
1995, Oct 25 WLT Modified file to account for the leapsecond that
will occur on Dec 31, 1995.
1994, Jun 16 WLT Modified file to account for the leapsecond on
June 30, 1994.
1993, Feb. 22 CHA Modified file to account for the leapsecond on
June 30, 1993.
1992, Mar. 6 HAN Modified file to account for the leapsecond on
June 30, 1992.
1990, Oct. 8 HAN Modified file to account for the leapsecond on
Dec. 31, 1990.
Explanation:
------------
The contents of this file are used by the routine DELTET to compute the
time difference
[1] DELTA_ET = ET - UTC
the increment to be applied to UTC to give ET.
The difference between UTC and TAI,
[2] DELTA_AT = TAI - UTC
is always an integral number of seconds. The value of DELTA_AT was 10
seconds in January 1972, and increases by one each time a leap second
is declared. Combining [1] and [2] gives
[3] DELTA_ET = ET - (TAI - DELTA_AT)
= (ET - TAI) + DELTA_AT
The difference (ET - TAI) is periodic, and is given by
[4] ET - TAI = DELTA_T_A + K sin E
where DELTA_T_A and K are constant, and E is the eccentric anomaly of the
heliocentric orbit of the Earth-Moon barycenter. Equation [4], which ignores
small-period fluctuations, is accurate to about 0.000030 seconds.
The eccentric anomaly E is given by
[5] E = M + EB sin M
where M is the mean anomaly, which in turn is given by
[6] M = M + M t
0 1
where t is the number of ephemeris seconds past J2000.
Thus, in order to compute DELTA_ET, the following items are necessary.
DELTA_TA
K
EB
M0
M1
DELTA_AT after each leap second.
The numbers, and the formulation, are taken from the following sources.
1) Moyer, T.D., Transformation from Proper Time on Earth to
Coordinate Time in Solar System Barycentric Space-Time Frame
of Reference, Parts 1 and 2, Celestial Mechanics 23 (1981),
33-56 and 57-68.
2) Moyer, T.D., Effects of Conversion to the J2000 Astronomical
Reference System on Algorithms for Computing Time Differences
and Clock Rates, JPL IOM 314.5--942, 1 October 1985.
The variable names used above are consistent with those used in the
Astronomical Almanac.
\begindata
DELTET/DELTA_T_A = 32.184
DELTET/K = 1.657D-3
DELTET/EB = 1.671D-2
DELTET/M = ( 6.239996D0 1.99096871D-7 )
DELTET/DELTA_AT = ( 10, @1972-JAN-1
11, @1972-JUL-1
12, @1973-JAN-1
13, @1974-JAN-1
14, @1975-JAN-1
15, @1976-JAN-1
16, @1977-JAN-1
17, @1978-JAN-1
18, @1979-JAN-1
19, @1980-JAN-1
20, @1981-JUL-1
21, @1982-JUL-1
22, @1983-JUL-1
23, @1985-JUL-1
24, @1988-JAN-1
25, @1990-JAN-1
26, @1991-JAN-1
27, @1992-JUL-1
28, @1993-JUL-1
29, @1994-JUL-1
30, @1996-JAN-1
31, @1997-JUL-1
32, @1999-JAN-1
33, @2006-JAN-1
34, @2009-JAN-1
35, @2012-JUL-1
36, @2015-JUL-1 )
\begintext

View File

@@ -1,4 +1,4 @@
var levels = ['debug', 'info', 'warning', 'error', 'fatal'];
var levels = ['trace', 'debug', 'info', 'warning', 'error', 'fatal'];
var filterLevel = 0;
function insertAfter(newNode, referenceNode) {

View File

@@ -27,6 +27,15 @@ label {
margin-right: 0.5em;
}
.log-level-trace {
color: #eeeeee;
background-color: #aaaaaa;
border-bottom: 1px solid #eaeaea;
}
.log-level-trace td:first-child {
border-left: 10px solid #eaeaea;
}
.log-level-debug {
background-color: #bbdda9;
border-bottom: 1px solid #7bc142;

View File

@@ -58,11 +58,11 @@ class TouchMarker : public properties::PropertyOwner
bool initialize();
bool deinitialize();
void render(const std::vector<TUIO::TuioCursor> list);
void render(const std::vector<TUIO::TuioCursor>& list);
private:
void createVertexList(const std::vector<TUIO::TuioCursor> list);
void createVertexList(const std::vector<TUIO::TuioCursor>& list);
properties::BoolProperty _visible;
properties::FloatProperty _radiusSize;

View File

@@ -78,7 +78,7 @@ TouchInteraction::TouchInteraction()
, _friction("Friction", "Friction for different interactions (orbit, zoom, roll, pan)", glm::vec4(0.01, 0.025, 0.02, 0.02), glm::vec4(0.0), glm::vec4(0.2))
, _vel{ glm::dvec2(0.0), 0.0, 0.0, glm::dvec2(0.0) }
, _sensitivity{glm::dvec2(0.0808181818181818, 0.0454545454545455), 4.0, 2.75, glm::dvec2(0.0808181818181818, 0.0454545454545455) }
, _sensitivity{glm::dvec2(0.08, 0.045), 4.0, 2.75, glm::dvec2(0.08, 0.045) }
, _centroid{ glm::dvec3(0.0) }
, _projectionScaleFactor{ 1.000004 } // calculated with two vectors with known diff in length, then projDiffLength/diffLength.
, _currentRadius{ 1.0 }, _slerpdT{ 1000 }, _numOfTests{ 0 }, _timeSlack{ 0.0 }
@@ -412,8 +412,8 @@ void TouchInteraction::findSelectedNode(const std::vector<TuioCursor>& list) {
// Interprets the input gesture to a specific interaction
int TouchInteraction::interpretInteraction(const std::vector<TuioCursor>& list, const std::vector<Point>& lastProcessed) {
glm::dvec3 lastCentroid = _centroid;
_centroid.x = std::accumulate(list.begin(), list.end(), 0.0f, [](double x, const TuioCursor& c) { return x + c.getX(); }) / list.size();
_centroid.y = std::accumulate(list.begin(), list.end(), 0.0f, [](double y, const TuioCursor& c) { return y + c.getY(); }) / list.size();
_centroid.x = std::accumulate(list.begin(), list.end(), 0.0, [](double x, const TuioCursor& c) { return x + c.getX(); }) / list.size();
_centroid.y = std::accumulate(list.begin(), list.end(), 0.0, [](double y, const TuioCursor& c) { return y + c.getY(); }) / list.size();
// see if the distance between fingers changed - used in pan interpretation
double dist = 0;

View File

@@ -93,7 +93,7 @@ bool TouchMarker::deinitialize() {
return true;
}
void TouchMarker::render(const std::vector<TUIO::TuioCursor> list) {
void TouchMarker::render(const std::vector<TUIO::TuioCursor>& list) {
if (_visible && !list.empty()) {
createVertexList(list);
_shader->activate();
@@ -115,7 +115,7 @@ void TouchMarker::render(const std::vector<TUIO::TuioCursor> list) {
}
}
void TouchMarker::createVertexList(const std::vector<TUIO::TuioCursor> list) {
void TouchMarker::createVertexList(const std::vector<TUIO::TuioCursor>& list) {
_numFingers = list.size();
GLfloat vertexData[MAX_FINGERS];
int i = 0;

View File

@@ -34,9 +34,6 @@
#include <ghoul/logging/logmanager.h>
using namespace TUIO;
namespace {
const std::string _loggerCat = "TuioEar";
}
void TuioEar::addTuioObject(TuioObject *tobj) { }
@@ -89,12 +86,15 @@ void TuioEar::removeTuioCursor(TuioCursor *tcur) {
_removeList.push_back(tcur->getSessionID());
// Check if the cursor ID could be considered a tap
std::list<TuioPoint>& path = tcur->getPath();
glm::dvec2 currPos = glm::dvec2(tcur->getX(), tcur->getY());
double dist = 0;
for (const TuioPoint& p : tcur->getPath()) {
dist += glm::length(glm::dvec2(p.getX(), p.getY()) - glm::dvec2(tcur->getX(), tcur->getY()));
dist += glm::length(glm::dvec2(p.getX(), p.getY()) - currPos);
}
dist /= tcur->getPath().size();
double heldTime = tcur->getPath().back().getTuioTime().getTotalMilliseconds() - tcur->getPath().front().getTuioTime().getTotalMilliseconds();
double heldTime = path.back().getTuioTime().getTotalMilliseconds() - path.front().getTuioTime().getTotalMilliseconds();
if (heldTime < 180 && dist < 0.0004 && _list.size() == 1 && _removeList.size() == 1) {
_tapCo = TuioCursor(*tcur);
_tap = true;
@@ -111,12 +111,10 @@ void TuioEar::removeTuioBlob(TuioBlob *tblb) { }
void TuioEar::refresh(TuioTime frameTime) { } // about every 15ms
std::vector<TuioCursor> TuioEar::getInput() {
std::lock_guard<std::mutex> lock(_mx);
return _list;
}
bool TuioEar::tap() {
std::lock_guard<std::mutex> lock(_mx);
if (_tap) {
_tap = false;
return !_tap;

View File

@@ -40,10 +40,6 @@
using namespace TUIO;
namespace {
const std::string _loggerCat = "TouchModule";
}
namespace openspace {
bool TouchModule::hasNewInput() {

View File

@@ -13,7 +13,7 @@ return {
-- SGCTConfig = sgct.config.single{1920, 1080},
-- A windowed 1920x1080 fullscreen
SGCTConfig = sgct.config.single{1920, 1080, border=false, windowPos={0,0}, shared=true, name="WV_OBS_SPOUT1"},
-- SGCTConfig = sgct.config.single{1920, 1080, border=false, windowPos={0,0}, shared=true, name="WV_OBS_SPOUT1"},
-- A 1k fisheye rendering
-- SGCTConfig = sgct.config.fisheye{1024, 1024},

View File

@@ -263,8 +263,10 @@ OrbitalInteractionMode::MouseStates::MouseStates(double sensitivity, double velo
{}
void OrbitalInteractionMode::MouseStates::updateMouseStatesFromInput(const InputState& inputState, double deltaTime) {
#ifdef OPENSPACE_MODULE_TOUCH_ENABLED
ghoul::any t = property("Global Properties.Touch.TouchInteraction.TouchEvents")->get();
if (!*(ghoul::any_cast<bool>(&t))) {
#endif // OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
glm::dvec2 mousePosition = inputState.getMousePosition();
bool button1Pressed = inputState.isMouseButtonPressed(MouseButton::Button1);
@@ -333,7 +335,10 @@ void OrbitalInteractionMode::MouseStates::updateMouseStatesFromInput(const Input
_localRollMouseState.previousPosition = mousePosition;
_localRollMouseState.velocity.decelerate(deltaTime);
}
#ifdef OPENSPACE_MODULE_TOUCH_ENABLED
}
#endif // OPENSPACE_MODULE_TOUCH_ENABLED
}
void OrbitalInteractionMode::MouseStates::setRotationalFriction(double friction) {