carrot/common/mock/generators.py
carrot f97149e1b5
liveLocationKalman, livePose, comfortBrake2.4, korean message (#159)
* fix routeinfo...

* livePose -> liveLocationKalman

* fix..

* for debug.. socketmaster

* fix.. SCC track

* fix.. carrotman

* comfortBrake 2.5 -> 2.4

* fix..

* test gps debug

* test gps

* revert

* test gps msg

* test restart

* ff

* ff

* ff

* liveDelay(SAD), latSmoothSeconds (#158)

* SAD default: 0 (use liveDelay)
2025-05-04 15:56:43 +09:00

21 lines
814 B
Python

from cereal import messaging
LOCATION1 = (32.7174, -117.16277)
LOCATION2 = (32.7558, -117.2037)
LLK_DECIMATION = 10
RENDER_FRAMES = 15
DEFAULT_ITERATIONS = RENDER_FRAMES * LLK_DECIMATION
def generate_liveLocationKalman(location=LOCATION1):
msg = messaging.new_message('liveLocationKalman')
msg.liveLocationKalman.positionGeodetic = {'value': [*location, 0], 'std': [0., 0., 0.], 'valid': True}
msg.liveLocationKalman.positionECEF = {'value': [0., 0., 0.], 'std': [0., 0., 0.], 'valid': True}
msg.liveLocationKalman.calibratedOrientationNED = {'value': [0., 0., 0.], 'std': [0., 0., 0.], 'valid': True}
msg.liveLocationKalman.velocityCalibrated = {'value': [0., 0., 0.], 'std': [0., 0., 0.], 'valid': True}
msg.liveLocationKalman.status = 'valid'
msg.liveLocationKalman.gpsOK = True
return msg