 Map ROI: kernel command from a click on the monitoring map, cameras look at the point
- CMD_KRNL_MAP_ROI (242), PARAM "<format>;<lat|y>;<lon|x>" from Mojo_Web
(doApplicationOperation 15): format 0 = WGS84 degrees, 1 = local
binding (bitmap map, map units).
- mojoKernel::mapROI(): WGS84 -> system coordinates through the site
anchor (its UTM zone, the site's ground level); local -> map minus the
anchor (the map shows a node at anchor + its local coordinates). A
format that does not match the anchor (map type changed after the
start) or a wrong parameter is logged and ignored. Starts a session and
broadcasts EVT_ROI_ACTIVE (EVT_CLASS_SYSTEM, TARGET_DATA) like a sensor's
ROI; dispatchEvent saves it as an event of the report.
- Cameras: a map ROI has no preferred camera, so PTZ, preset and static
cameras act on it only when the point passes their testFOV (range,
pan limits, field of view): PTZ/preset lookAt, static makeSnap.
- systemAnchor: new convertToSystem(WGS84) in the anchor's own UTM zone;
the existing convertToSystem(SP, WGS84) subtracted the anchor's X from
Y (no caller used it).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
6 hours ago |
|
#ifndef __POSITION_SYSTEM_SANCHOR_HEADER__
#define __POSITION_SYSTEM_SANCHOR_HEADER__
#include "../base/basicPosition.h"
#include "../base/basicSettingsProvider.h"
#include <string.h>
#define TAG_POSITION_LAT "POSITION_LATITUDE"
#define TAG_POSITION_LON "POSITION_LONGITUDE"
#define TAG_POSITION_SOUTH_HS "SOUTH_HEMISPHERE"
#define TAG_POSITION_ALT "POSITION_ALT"
#define TAG_POSITION_ROLL "ORIENTATION_ROLL"
#define TAG_POSITION_PITCH "ORIENTATION_PITCH"
#define TAG_POSITION_YAW "ORIENTATION_YAW"
#define TAG_POSITION_LOCAL "POSITION_LOCAL_DIFF"
class systemAnchor : public position3D{ private:
config_setting_t * m_pSettings; coordConverter m_SCC; bool m_bUseJustLocalDiffCoords;
public:
static systemAnchor * getInstance( C3D_WGS84_LOC * ptr = NULL, bool just_local = false); virtual ~systemAnchor(void);
// local - C3D_SPH_RADIANS/C3D_SPH_DEGREES
// system - C3D_DECART
// global - C3D_WGS84_LOC
bool convertToLocal(basicPosition * SP, C3D_WGS84_LOC POS, C3D_SPH_DEGREES & LOC); bool convertToLocal(basicPosition * SP, C3D_WGS84_LOC POS, C3D_SPH_RADIANS & LOC); bool convertToLocal(basicPosition * SP, C3D_DECART POS, C3D_SPH_DEGREES & LOC); bool convertToLocal(basicPosition * SP, C3D_DECART POS, C3D_SPH_RADIANS & LOC);
bool convertToSystem(basicPosition * SP, C3D_WGS84_LOC POS, C3D_DECART & LOC); bool convertToSystem(basicPosition * SP, C3D_SPH_DEGREES POS, C3D_DECART & LOC); bool convertToSystem(basicPosition * SP, C3D_SPH_RADIANS POS, C3D_DECART & LOC); bool convertToSystem(C3D_WGS84_LOC POS, C3D_DECART & LOC); // in the anchor's own UTM zone (no source node)
bool convertToGlobal(basicPosition * SP, C3D_SPH_DEGREES POS, C3D_WGS84_LOC & LOC); bool convertToGlobal(basicPosition * SP, C3D_SPH_RADIANS POS, C3D_WGS84_LOC & LOC); bool convertToGlobal(basicPosition * SP, C3D_DECART POS, C3D_WGS84_LOC & LOC);
bool beLocal(void) { return m_bUseJustLocalDiffCoords; }
private:
static systemAnchor * _instance;
protected:
explicit systemAnchor( C3D_WGS84_LOC *ptr, bool beJustLocal);};
#endif
|